/* ==========================================================================
   Said Abdullah Abid Portfolio — dark terminal theme
   ========================================================================== */

:root {
  --bg: #0a0e12;
  --bg-alt: #0d1218;
  --bg-elevated: #10161d;
  --bg-card: #121920;
  --border: #1e2933;
  --border-soft: #182028;
  --text: #d7e0e8;
  --text-dim: #7c8b98;
  --text-faint: #52616c;
  --accent: #2de2c8;
  --accent-2: #56c8ff;
  --accent-soft: rgba(45, 226, 200, 0.12);
  --danger: #ff6b81;
  --warning: #ffd166;
  --radius: 10px;
  --mono: "JetBrains Mono", "Fira Code", "SFMono-Regular", Consolas, monospace;
  --sans: "Inter", "Segoe UI", system-ui, sans-serif;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.scroll-progress {
  position: fixed;
  inset: 0 0 auto;
  z-index: 200;
  height: 2px;
  pointer-events: none;
}

.scroll-progress span {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 12px rgba(45, 226, 200, 0.75);
  transform: scaleX(0);
  transform-origin: left;
  will-change: transform;
}

.cursor-glow {
  position: fixed;
  z-index: 0;
  left: 0;
  top: 0;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(45, 226, 200, 0.075), transparent 67%);
  transform: translate3d(calc(var(--cursor-x, -500px) - 50%), calc(var(--cursor-y, -500px) - 50%), 0);
  pointer-events: none;
  will-change: transform;
}

/* Ambient background: grid + glow */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(rgba(45, 226, 200, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(45, 226, 200, 0.05) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 40%, transparent 100%);
}

body::after {
  content: "";
  position: fixed;
  top: -20%;
  left: 50%;
  width: 1200px;
  height: 800px;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(45, 226, 200, 0.16) 0%, transparent 65%);
  z-index: -1;
  pointer-events: none;
}

.parallax-scene {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

main,
footer {
  position: relative;
  z-index: 1;
}

[data-parallax] {
  --parallax-x: 0px;
  --parallax-y: 0px;
}

.parallax-orb,
.parallax-ring,
.parallax-grid,
.parallax-code {
  position: absolute;
  transform: translate3d(var(--parallax-x), var(--parallax-y), 0);
  will-change: transform;
}

.parallax-grid {
  inset: -12%;
  opacity: 0.25;
  background-image:
    linear-gradient(rgba(86, 200, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(86, 200, 255, 0.05) 1px, transparent 1px);
  background-size: 84px 84px;
  mask-image: linear-gradient(to bottom, transparent, #000 20%, #000 75%, transparent);
}

.parallax-orb {
  border-radius: 50%;
  filter: blur(2px);
  opacity: 0.8;
  animation: orb-float 6s ease-in-out infinite alternate;
}

.orb-one {
  width: 260px;
  height: 260px;
  top: 18%;
  left: -110px;
  background: radial-gradient(circle, rgba(45, 226, 200, 0.2), transparent 68%);
}

.orb-two {
  width: 360px;
  height: 360px;
  top: 58%;
  right: -160px;
  background: radial-gradient(circle, rgba(86, 200, 255, 0.16), transparent 68%);
  animation-delay: -3s;
}

.parallax-code {
  color: rgba(86, 200, 255, 0.24);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  white-space: nowrap;
  animation: code-float 5s ease-in-out infinite alternate;
}

.code-one { top: 24%; right: 5%; }
.code-two { top: 72%; left: 4%; animation-delay: -2.5s; }

.parallax-ring {
  width: 150px;
  aspect-ratio: 1;
  border: 1px solid rgba(45, 226, 200, 0.13);
  border-radius: 50%;
  box-shadow: inset 0 0 28px rgba(45, 226, 200, 0.035);
}

.parallax-ring::before,
.parallax-ring::after {
  content: "";
  position: absolute;
  border-radius: inherit;
  border: 1px dashed rgba(86, 200, 255, 0.12);
}

.parallax-ring::before { inset: 18px; }
.parallax-ring::after { inset: 45px; }
.ring-one { top: 42%; left: 8%; animation: ring-spin 28s linear infinite; }
.ring-two { top: 82%; right: 9%; scale: 1.45; animation: ring-spin 34s linear infinite reverse; }

@keyframes orb-float {
  from { translate: 0 -14px; scale: 0.96; }
  to { translate: 18px 16px; scale: 1.08; }
}

@keyframes code-float {
  from { translate: 0 -8px; opacity: 0.45; }
  to { translate: 16px 10px; opacity: 1; }
}

@keyframes ring-spin {
  to { rotate: 360deg; }
}

/* Scroll-triggered content reveals */
.scroll-reveal {
  opacity: 0;
  transform: translate3d(0, 34px, 0) scale(0.985);
  filter: blur(4px);
  transition:
    opacity 700ms cubic-bezier(0.22, 1, 0.36, 1) var(--reveal-delay, 0ms),
    transform 700ms cubic-bezier(0.22, 1, 0.36, 1) var(--reveal-delay, 0ms),
    filter 600ms ease var(--reveal-delay, 0ms);
}

.scroll-reveal.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
  filter: blur(0);
}

.timeline-item.scroll-reveal {
  transform: translate3d(-28px, 22px, 0);
}

.timeline-item.scroll-reveal.is-visible {
  transform: translate3d(0, 0, 0);
}

::selection {
  background: var(--accent);
  color: #0a0e12;
}

a {
  color: var(--accent);
  text-decoration: none;
}

code, .mono {
  font-family: var(--mono);
}

.container {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------------------------------- Nav ---------------------------------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
  background: rgba(10, 14, 18, 0.75);
  border-bottom: 1px solid var(--border-soft);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  max-width: 1080px;
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-weight: 600;
  color: var(--text);
  font-size: 15px;
}

.brand-icon {
  color: var(--accent);
  font-weight: 700;
}

.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-family: var(--mono);
  font-size: 13.5px;
}

.nav-links a {
  color: var(--text-dim);
  position: relative;
  padding: 4px 0;
  transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-links a:focus-visible,
.nav-links a.active {
  color: var(--accent);
}

.nav-links a::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.25s ease;
}

.nav-links a:hover::before,
.nav-links a.active::before {
  width: 100%;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  width: 38px;
  height: 34px;
  cursor: pointer;
}

/* --------------------------------- Hero ---------------------------------- */

.hero {
  padding: 52px 0 58px;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
  min-height: min(760px, calc(100vh - 65px));
}

.hero-copy {
  transform: translate3d(var(--parallax-x, 0), var(--parallax-y, 0), 0);
  will-change: transform;
}

.hero-visual {
  position: relative;
  align-self: center;
  padding: 0 0 72px 34px;
  transform: translate3d(var(--parallax-x, 0), var(--parallax-y, 0), 0);
  will-change: transform;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
}

.eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
  animation: pulse 1.8s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.hero h1 {
  font-size: clamp(32px, 5vw, 48px);
  line-height: 1.15;
  margin: 0 0 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.hero h1 .gradient {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero .role-line {
  font-family: var(--mono);
  font-size: clamp(16px, 2.4vw, 20px);
  color: var(--text-dim);
  margin: 0 0 22px;
  min-height: 28px;
}

.hero .role-line .cursor {
  display: inline-block;
  width: 9px;
  height: 1.1em;
  background: var(--accent);
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: blink 1s step-end infinite;
}

/* -------------------------- Profile & experience ------------------------- */

.content-section {
  padding-top: 88px;
}

.expertise-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.expertise-card,
.education-card {
  background: linear-gradient(145deg, rgba(18, 25, 32, 0.96), rgba(13, 18, 24, 0.96));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: transform 280ms cubic-bezier(0.22, 1, 0.36, 1), border-color 280ms ease, box-shadow 280ms ease;
}

.expertise-card:hover,
.education-card:hover {
  transform: translateY(-5px);
  border-color: rgba(45, 226, 200, 0.34);
  box-shadow: 0 16px 35px rgba(0, 0, 0, 0.24);
}

.expertise-card h3,
.timeline-item h3,
.education-card h3 {
  margin: 7px 0 6px;
}

.expertise-card p,
.timeline-item p,
.education-card p {
  color: var(--text-dim);
  margin: 0;
}

.expertise-icon,
.timeline-date {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 13px;
}

.timeline {
  border-left: 1px solid var(--border);
  margin-left: 8px;
  padding-left: 30px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 145px 1fr;
  gap: 24px;
  position: relative;
  padding: 0 0 34px;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -36px;
  top: 7px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px rgba(45, 226, 200, 0.65);
}

.timeline-item .org {
  color: var(--accent-2);
  font-family: var(--mono);
  font-size: 13px;
  margin-bottom: 8px;
}

.education-card {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px;
  margin-top: 10px;
}

@media (max-width: 700px) {
  .expertise-grid,
  .education-card {
    grid-template-columns: 1fr;
  }

  .timeline-item {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.hero p.lead {
  color: var(--text-dim);
  font-size: 16px;
  max-width: 52ch;
  margin: 0 0 28px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.professional-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  max-width: 470px;
  margin-top: 18px;
}

.professional-links a {
  display: grid;
  grid-template-columns: 29px 1fr auto;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 10px 12px;
  color: var(--text);
  background: rgba(18, 25, 32, 0.64);
  border: 1px solid var(--border);
  border-radius: 9px;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.professional-links a:hover,
.professional-links a:focus-visible {
  transform: translateY(-2px);
  background: rgba(45, 226, 200, 0.055);
  border-color: rgba(45, 226, 200, 0.38);
}

.professional-links svg {
  width: 23px;
  height: 23px;
  fill: var(--accent);
}

.professional-links span {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.25;
}

.professional-links small {
  overflow: hidden;
  color: var(--text-faint);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.045em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.professional-links strong {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
}

.professional-links b {
  color: var(--text-faint);
  font-size: 11px;
  transition: color 180ms ease, transform 180ms ease;
}

.professional-links a:hover b {
  color: var(--accent);
  transform: translate(2px, -2px);
}

.hero-context {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 18px;
  margin-top: 21px;
  color: var(--text-faint);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.035em;
}

.hero-context span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.hero-context span::before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 6px rgba(45, 226, 200, 0.7);
}

.btn {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 500;
  padding: 12px 22px;
  border-radius: 8px;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-primary {
  background: var(--accent);
  color: #06110f;
  border-color: var(--accent);
}

.btn-primary:hover {
  box-shadow: 0 0 0 4px var(--accent-soft);
  transform: translateY(-1px);
}

.btn-resume {
  color: var(--accent-2);
  background: rgba(86, 200, 255, 0.075);
  border-color: rgba(86, 200, 255, 0.28);
}

.btn-resume span {
  color: var(--accent-2);
  transition: transform 180ms ease;
}

.btn-resume:hover,
.btn-resume:focus-visible {
  color: #8edcff;
  background: rgba(86, 200, 255, 0.13);
  border-color: rgba(86, 200, 255, 0.55);
  box-shadow: 0 0 0 4px rgba(86, 200, 255, 0.07);
  transform: translateY(-1px);
}

.btn-resume:hover span {
  transform: translate(2px, -2px);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.stat-row {
  display: flex;
  gap: 36px;
  margin-top: 40px;
}

.stat-item .num {
  font-family: var(--mono);
  font-size: 26px;
  font-weight: 700;
  color: var(--text);
}

.stat-item .num .accent {
  color: var(--accent);
}

.stat-item .label {
  font-size: 12.5px;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.stat-link {
  position: relative;
  color: inherit;
  padding: 2px 0 7px;
}

.stat-link::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 1px;
  background: linear-gradient(90deg, var(--accent), transparent);
  transform: scaleX(0.35);
  transform-origin: left;
  opacity: 0.45;
  transition: transform 220ms ease, opacity 220ms ease;
}

.stat-link-action {
  display: block;
  margin-top: 4px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.03em;
  opacity: 0.72;
}

.stat-link:hover::after,
.stat-link:focus-visible::after {
  transform: scaleX(1);
  opacity: 1;
}

.stat-link:hover .stat-link-action {
  opacity: 1;
}

.scroll-cue {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 34px;
  color: var(--text-faint);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color 180ms ease;
}

.scroll-cue:hover { color: var(--accent); }

.scroll-cue-mouse {
  width: 18px;
  height: 28px;
  border: 1px solid currentColor;
  border-radius: 12px;
  display: grid;
  place-items: start center;
  padding-top: 5px;
}

.scroll-cue-mouse span {
  width: 2px;
  height: 6px;
  border-radius: 2px;
  background: currentColor;
  animation: scroll-cue 1.7s ease-in-out infinite;
}

@keyframes scroll-cue {
  0% { opacity: 0; transform: translateY(0); }
  30% { opacity: 1; }
  100% { opacity: 0; transform: translateY(8px); }
}

/* Terminal window mock */

.terminal {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  --tilt-x: 0deg;
  --tilt-y: 0deg;
  transform: translate3d(var(--parallax-x, 0), var(--parallax-y, 0), 0)
    perspective(900px) rotateX(var(--tilt-x)) rotateY(var(--tilt-y));
  transform-style: preserve-3d;
  will-change: transform;
  transition: transform 180ms ease-out, border-color 200ms ease, box-shadow 200ms ease;
}

.terminal-overlay {
  position: absolute;
  z-index: 5;
  left: -26px;
  right: 44px;
  bottom: 20px;
  transform: none;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.62);
}

.terminal-overlay .terminal-body {
  min-height: 246px;
  max-height: 246px;
  padding: 18px 20px;
  overflow: hidden;
  font-size: 12px;
}

.terminal-overlay .terminal-body .line {
  margin-bottom: 7px;
}

.terminal:hover {
  border-color: rgba(45, 226, 200, 0.35);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.52), 0 0 30px rgba(45, 226, 200, 0.07);
}

@media (prefers-reduced-motion: reduce) {
  [data-parallax],
  .terminal {
    transform: none !important;
    transition: none !important;
  }

  .parallax-scene { display: none; }

  .parallax-orb,
  .parallax-ring,
  .parallax-code,
  .scroll-cue-mouse span { animation: none !important; }

  .cursor-glow { display: none; }

  .scroll-reveal {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    transition: none !important;
  }
}

@media (max-width: 700px) {
  .parallax-code { display: none; }
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-soft);
}

.dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}

.dot.red { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #27c93f; }

.terminal-title {
  margin: 0 auto;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-faint);
}

.terminal-body {
  padding: 20px 22px 24px;
  font-family: var(--mono);
  font-size: 13.5px;
  min-height: 220px;
}

.terminal-body .line {
  margin: 0 0 10px;
  color: var(--text-dim);
  white-space: pre-wrap;
}

.terminal-body .prompt {
  color: var(--accent);
}

.terminal-body .path {
  color: var(--accent-2);
}

.terminal-body .out {
  color: var(--text);
}

.terminal-body .comment {
  color: var(--text-faint);
}

#term-output .line:last-child .cursor {
  display: inline-block;
  width: 8px;
  height: 1em;
  background: var(--accent);
  margin-left: 3px;
  vertical-align: text-bottom;
  animation: blink 1s step-end infinite;
}

/* -------------------------------- Sections -------------------------------- */

.technology-ribbon {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 22px;
  min-height: 58px;
  padding-top: 11px;
  padding-bottom: 11px;
  background: linear-gradient(90deg, rgba(45, 226, 200, 0.045), rgba(86, 200, 255, 0.035));
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.16);
}

.technology-ribbon-label {
  flex: 0 0 auto;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.technology-ribbon-list {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 1;
  gap: 12px;
  min-width: 0;
}

.technology-ribbon-list span {
  color: var(--text-dim);
  font-family: var(--mono);
  font-size: 11px;
  white-space: nowrap;
}

.technology-ribbon-list span + span::before {
  content: "·";
  margin-right: 12px;
  color: var(--text-faint);
}

section {
  padding: 70px 0;
  position: relative;
  scroll-margin-top: 70px;
}

section:not(.hero)::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: min(1032px, calc(100% - 48px));
  height: 1px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, var(--border), transparent);
}

.section-head {
  margin-top: 36px;
  margin-bottom: 36px;
}

.section-tag {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--accent);
  margin: 0 0 8px;
}

.section-tag::before {
  content: "// ";
  color: var(--text-faint);
}

.section-head h2 {
  font-size: 30px;
  margin: 0 0 10px;
  letter-spacing: -0.01em;
}

.section-head p {
  color: var(--text-dim);
  max-width: 60ch;
  margin: 0;
}

/* Filters */

.filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.filter-btn {
  font-family: var(--mono);
  font-size: 12.5px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-dim);
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-btn:hover {
  color: var(--text);
  border-color: var(--accent);
}

.filter-btn.active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

/* Project grid */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: 24px;
}

.card {
  --category-color: var(--accent);
  --category-rgb: 45, 226, 200;
  background: linear-gradient(155deg, rgba(18, 25, 32, 0.98), rgba(10, 15, 20, 0.98));
  border: 1px solid rgba(var(--category-rgb), 0.16);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s ease, transform 0.5s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  position: relative;
  isolation: isolate;
}

.card[data-category="enterprise"] {
  --category-color: #8b9cff;
  --category-rgb: 139, 156, 255;
}

.card[data-category="business"] {
  --category-color: #ffd166;
  --category-rgb: 255, 209, 102;
}

.card[data-category="other"] {
  --category-color: #d58cff;
  --category-rgb: 213, 140, 255;
}

.card::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 0;
  opacity: 0;
  background: radial-gradient(420px circle at var(--card-x, 50%) var(--card-y, 50%), rgba(var(--category-rgb), 0.11), transparent 43%);
  transition: opacity 250ms ease;
  pointer-events: none;
}

.card::after {
  content: "";
  position: absolute;
  z-index: 3;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--category-color), transparent);
  opacity: 0.7;
}

.card.reveal {
  opacity: 1;
  transform: translateY(0);
}

.card:hover {
  border-color: rgba(var(--category-rgb), 0.42);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.42), 0 0 28px rgba(var(--category-rgb), 0.055);
  transform: translateY(-6px);
}

.card:hover::before { opacity: 1; }

.card-bar {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 11px 15px;
  background: rgba(8, 13, 18, 0.68);
  border-bottom: 1px solid rgba(var(--category-rgb), 0.1);
}

.card-bar .dot {
  width: 9px;
  height: 9px;
}

.card-file {
  margin-left: 8px;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--text-faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-index {
  margin-left: auto;
  color: rgba(var(--category-rgb), 0.48);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
}

.card-body {
  position: relative;
  z-index: 1;
  padding: 23px 22px 21px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.card-heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 30px;
}

.card-symbol {
  color: rgba(var(--category-rgb), 0.38);
  font-family: var(--mono);
  font-size: 23px;
  font-weight: 400;
  line-height: 1;
  transition: color 220ms ease, transform 280ms cubic-bezier(0.22, 1, 0.36, 1);
}

.card:hover .card-symbol {
  color: var(--category-color);
  transform: rotate(-6deg) scale(1.08);
}

.card-body h3 {
  margin: 0;
  color: #edf5fa;
  font-size: 18px;
  line-height: 1.32;
  letter-spacing: -0.015em;
}

.card-body .org {
  font-size: 13px;
  color: var(--text-dim);
  margin: 0;
  line-height: 1.5;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

/* Hero layout without a profile photograph */
.hero-visual {
  padding: 0 0 0 20px;
}

.hero-visual .terminal-overlay {
  position: relative;
  inset: auto;
  width: 100%;
  transform: translate3d(var(--parallax-x, 0), var(--parallax-y, 0), 0)
    perspective(900px) rotateX(var(--tilt-x)) rotateY(var(--tilt-y));
}

@media (max-width: 700px) {
  .hero-visual {
    padding: 0;
  }

  .hero-visual .terminal-overlay {
    inset: auto;
    width: 100%;
  }
}

.tech-label {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 10px;
  color: var(--text-faint);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.tech-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(var(--category-rgb), 0.25), transparent);
}

.category-badge {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 0;
  padding: 5px 10px;
  color: var(--category-color);
  background: rgba(var(--category-rgb), 0.075);
  border: 1px solid rgba(var(--category-rgb), 0.2);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.category-badge::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 7px currentColor;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 12px;
  min-height: 19px;
  margin-top: 2px;
}

.project-tag {
  padding: 0;
  color: var(--text-faint);
  background: transparent;
  border: 0;
  font-family: var(--mono);
  font-size: 9.5px;
  transition: color 180ms ease;
}

.card:hover .project-tag {
  color: var(--text-dim);
}

.technology-stack {
  margin-top: 12px;
  padding: 14px;
  background:
    linear-gradient(135deg, rgba(var(--category-rgb), 0.035), transparent 55%),
    rgba(4, 9, 13, 0.48);
  border: 1px solid rgba(var(--category-rgb), 0.1);
  border-radius: 11px;
  transition: border-color 220ms ease, background-color 220ms ease;
}

.card:hover .technology-stack {
  border-color: rgba(var(--category-rgb), 0.2);
}

.tag {
  --tech-color: 86, 200, 255;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 500;
  padding: 6px 8px;
  border-radius: 7px;
  background: rgba(var(--tech-color), 0.07);
  color: rgba(var(--tech-color), 0.94);
  border: 1px solid rgba(var(--tech-color), 0.15);
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.tag::before {
  content: "";
  width: 5px;
  height: 5px;
  flex: 0 0 auto;
  border-radius: 2px;
  background: rgb(var(--tech-color));
  box-shadow: 0 0 6px rgba(var(--tech-color), 0.55);
}

.tag:hover {
  transform: translateY(-1px);
  background: rgba(var(--tech-color), 0.13);
  border-color: rgba(var(--tech-color), 0.32);
}

.tag.tech-frontend { --tech-color: 86, 200, 255; }
.tag.tech-backend { --tech-color: 139, 156, 255; }
.tag.tech-database { --tech-color: 255, 209, 102; }
.tag.tech-geo { --tech-color: 45, 226, 200; }
.tag.tech-data { --tech-color: 213, 140, 255; }
.tag.tech-cloud { --tech-color: 255, 139, 106; }
.tag.tech-default { --tech-color: 160, 177, 190; }

.card-footer {
  margin-top: auto;
  padding-top: 17px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px solid rgba(var(--category-rgb), 0.09);
}

.visit-link {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--category-color);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  letter-spacing: 0.03em;
  padding: 7px 11px;
  background: rgba(var(--category-rgb), 0.07);
  border: 1px solid rgba(var(--category-rgb), 0.14);
  border-radius: 7px;
  transition: gap 180ms ease, color 180ms ease, background 180ms ease, border-color 180ms ease;
}

.visit-link:hover {
  gap: 10px;
  background: rgba(var(--category-rgb), 0.13);
  border-color: rgba(var(--category-rgb), 0.3);
}

button.visit-link {
  cursor: pointer;
}

/* Access request dialog */
.access-dialog {
  width: min(560px, calc(100% - 32px));
  padding: 30px;
  color: var(--text);
  background: linear-gradient(145deg, #121920, #0d1218);
  border: 1px solid rgba(45, 226, 200, 0.35);
  border-radius: 14px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.7), 0 0 40px rgba(45, 226, 200, 0.08);
}

.access-dialog::backdrop {
  background: rgba(3, 7, 10, 0.82);
  backdrop-filter: blur(8px);
}

.access-dialog[open] {
  animation: dialog-enter 260ms cubic-bezier(0.22, 1, 0.36, 1);
}

.access-dialog h2 {
  margin: 6px 35px 10px 0;
  font-size: clamp(23px, 4vw, 31px);
  line-height: 1.2;
}

.access-dialog > p:not(.section-tag) {
  color: var(--text-dim);
}

.dialog-close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 34px;
  height: 34px;
  color: var(--text-dim);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 23px;
  cursor: pointer;
}

.dialog-contact-list {
  display: grid;
  gap: 9px;
  margin: 22px 0;
}

.dialog-contact-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 14px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  transition: border-color 180ms ease, transform 180ms ease;
}

.dialog-contact-item:hover {
  border-color: var(--accent);
  transform: translateX(3px);
}

.dialog-contact-item span {
  color: var(--text-faint);
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
}

.dialog-contact-item strong {
  font-size: 13px;
  text-align: right;
}

.whatsapp-link strong { color: #52d273; }

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

@keyframes dialog-enter {
  from { opacity: 0; transform: translateY(18px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 560px) {
  .access-dialog { padding: 24px 18px; }
  .dialog-contact-item { align-items: flex-start; flex-direction: column; gap: 3px; }
  .dialog-contact-item strong { text-align: left; overflow-wrap: anywhere; }
  .dialog-actions .btn { width: 100%; justify-content: center; }
}

.visit-link:hover {
  text-decoration: none;
}

.no-link {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-faint);
  padding: 7px 10px;
  border: 1px dashed var(--border);
  border-radius: 7px;
}

.creds-toggle {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--text-dim);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 5px 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.creds-toggle:hover {
  border-color: var(--warning);
  color: var(--warning);
}

.creds-box {
  display: none;
  margin-top: 4px;
  padding: 10px 12px;
  background: var(--bg-elevated);
  border: 1px dashed var(--border);
  border-radius: 8px;
  font-family: var(--mono);
  font-size: 12px;
}

.creds-box.open {
  display: block;
}

.creds-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 3px 0;
}

.creds-row + .creds-row {
  border-top: 1px solid var(--border-soft);
}

.creds-row .k {
  color: var(--text-faint);
}

.creds-row .v {
  color: var(--text);
}

.copy-btn {
  background: none;
  border: none;
  color: var(--text-faint);
  cursor: pointer;
  font-size: 13px;
  padding: 2px 4px;
  line-height: 1;
}

.copy-btn:hover {
  color: var(--accent);
}

.copy-btn.copied {
  color: var(--accent);
}

/* Empty state for "other" (no-link) items already handled via no-link */

/* --------------------------------- Footer --------------------------------- */

footer {
  margin-top: 60px;
  border-top: 1px solid var(--border-soft);
  padding: 32px 0 40px;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--text-faint);
}

.footer-inner .accent {
  color: var(--accent);
}

/* -------------------------------- Responsive ------------------------------- */

@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
    padding-top: 42px;
  }

  .hero-visual {
    width: min(560px, 100%);
    margin: 22px auto 0;
  }

  .stat-row {
    gap: 26px;
  }
}

@media (max-width: 640px) {
  .cursor-glow { display: none; }

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border-soft);
    flex-direction: column;
    padding: 16px 24px;
    gap: 16px;
    display: none;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-toggle {
    display: block;
  }

  .hero {
    padding-top: 32px;
  }

  .hero-visual {
    padding: 0;
  }

  .terminal-overlay {
    inset: auto;
    width: 100%;
  }

  .stat-row {
    flex-wrap: wrap;
    row-gap: 18px;
  }

  .professional-links {
    grid-template-columns: 1fr;
    max-width: 100%;
  }

  .technology-ribbon {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .technology-ribbon-list {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .technology-ribbon-list span + span::before {
    display: none;
  }

  .scroll-cue { display: none; }
}
