/* ==========================================================
   MUHAMMAD HUNAIN — PORTFOLIO
   Design language: systems engineering console, elevated to a
   premium SaaS-grade finish. Dark-first, glass surfaces, one
   signature 3D scene in the hero, everything else disciplined.
========================================================== */

:root{
  color-scheme: dark;

  /* ---- surfaces ---- */
  --void:#07080B;
  --bg:#0A0C10;
  --bg-elevated:#0E1116;
  --surface:#12151B;
  --surface-2:#171B22;
  --glass: rgba(255,255,255,.035);
  --glass-strong: rgba(255,255,255,.06);
  --border:rgba(255,255,255,.08);
  --border-strong:rgba(255,255,255,.16);

  /* ---- text ---- */
  --text:#EEF1F4;
  --text-dim:#9AA3AE;
  --text-faint:#5B6472;

  /* ---- signal colors ---- */
  --c-teal:#4FE0C3;
  --c-teal-dim:#153B34;
  --c-amber:#F0AC4E;
  --c-violet:#9A8CFB;
  --c-rose:#F0708C;

  --accent-1:#4DE1C1;
  --accent-2:#62F2D0;
  --accent-3:#7AF5E3;

  --accent: var(--c-teal);
  --accent-ink:#04140F;
  --shadow: 0 24px 70px -24px rgba(0,0,0,.65);
  --shadow-lg: 0 40px 100px -32px rgba(0,0,0,.75);

  --font-display:'Space Grotesk', sans-serif;
  --font-mono:'IBM Plex Mono', monospace;
  --font-body:'Inter', sans-serif;

  --container: 1180px;
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --ease: cubic-bezier(.22,1,.36,1);
}

[data-theme="light"]{
  color-scheme: light;
  --void:#F4F5F7;
  --bg:#F6F7F9;
  --bg-elevated:#FFFFFF;
  --surface:#FFFFFF;
  --surface-2:#EEF1F4;
  --glass: rgba(15,20,28,.03);
  --glass-strong: rgba(15,20,28,.05);
  --border:rgba(15,25,35,.09);
  --border-strong:rgba(15,25,35,.18);
  --text:#10151C;
  --text-dim:#4B5563;
  --text-faint:#8A93A0;

  --c-teal:#0E9A82;
  --c-teal-dim:#D8F2EC;
  --c-amber:#B9740A;
  --c-violet:#6653E0;
  --c-rose:#C93F60;

  --accent-1:#0E9A82;
  --accent-2:#0B7F6D;
  --accent-3:#106B5E;

  --shadow: 0 24px 60px -26px rgba(15,25,40,.18);
  --shadow-lg: 0 40px 90px -30px rgba(15,25,40,.2);
}

*{ box-sizing:border-box; margin:0; padding:0; }
html{ scroll-behavior:smooth; }
body{
  background:var(--bg);
  color:var(--text);
  font-family:var(--font-body);
  font-size:16px;
  line-height:1.65;
  overflow-x:hidden;
  transition: background .35s ease, color .35s ease;
}
.mono{ font-family:var(--font-mono); letter-spacing:.01em; }
a{ color:inherit; text-decoration:none; }
ul{ list-style:none; }
img{ max-width:100%; display:block; }
button{ font-family:inherit; background:none; border:none; cursor:pointer; color:inherit; }
::selection{ background:var(--accent); color:var(--accent-ink); }
:focus-visible{ outline:2px solid var(--accent); outline-offset:3px; border-radius:4px; }

@media (prefers-reduced-motion: reduce){
  *{ animation-duration:.001ms !important; animation-iteration-count:1 !important; transition-duration:.001ms !important; scroll-behavior:auto !important; }
}

.container{ max-width:var(--container); margin:0 auto; padding:0 28px; }

/* faint blueprint grid backdrop — quiet, not a glow-fest */
.grid-overlay{
  position:fixed; inset:0; pointer-events:none; z-index:0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 64px 64px;
  opacity:.28;
  mask-image: radial-gradient(ellipse 90% 55% at 50% 0%, black 5%, transparent 65%);
}

/* ---------------- reveal-on-scroll ---------------- */
.reveal{ opacity:0; transform:translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease); transition-delay: var(--delay, 0s); }
.reveal.in{ opacity:1; transform:translateY(0); }

/* ---------------- typography ---------------- */
h1,h2,h3,h4,h5{ font-family:var(--font-display); font-weight:600; letter-spacing:-.02em; color:var(--text); }
h2{ font-size:clamp(28px,3.6vw,42px); line-height:1.15; }
h3{ font-size:20px; }
p{ color:var(--text-dim); }
strong{ color:var(--text); font-weight:600; }

.eyebrow{ display:inline-flex; align-items:center; gap:8px; font-size:12.5px; letter-spacing:.08em; text-transform:uppercase; color:var(--accent); font-weight:600; }
.section-head{ max-width:640px; margin-bottom:52px; }
.section-head h2{ margin-top:10px; }
.section-sub{ margin-top:14px; font-size:15.5px; max-width:520px; }
.section{ position:relative; padding:clamp(90px,11vw,150px) 0; z-index:1; }
.section-alt{ background:linear-gradient(180deg, transparent, var(--bg-elevated) 8%, var(--bg-elevated) 92%, transparent); }

/* ---------------- buttons ---------------- */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  padding:13px 24px; border-radius:999px; font-size:14.5px; font-weight:600;
  transition: transform .35s var(--ease), background .3s ease, border-color .3s ease, box-shadow .3s ease;
  white-space:nowrap;
}
.btn:active{ transform:scale(.97); }
.btn-primary{ background:var(--accent); color:var(--accent-ink); box-shadow:0 1px 0 rgba(255,255,255,.25) inset, 0 14px 30px -14px var(--accent); }
.btn-outline{ border:1px solid var(--border-strong); color:var(--text); background:var(--glass); backdrop-filter:blur(10px); }
.btn-ghost{ color:var(--text-dim); padding:10px 16px; }
.btn-ghost:hover{ color:var(--text); }
.btn .ext{ opacity:.55; font-size:12px; }
.btn.full{ width:100%; }

/* ============================================================
   NAV
============================================================ */
.nav{ position:fixed; top:0; left:0; right:0; z-index:100; padding:18px 0; transition: padding .3s var(--ease), background .3s ease, border-color .3s ease; }
.nav.scrolled{ padding:11px 0; background:rgba(10,12,16,.72); backdrop-filter:blur(16px) saturate(140%); border-bottom:1px solid var(--border); }
[data-theme="light"] .nav.scrolled{ background:rgba(246,247,249,.78); }
.nav-inner{ max-width:var(--container); margin:0 auto; padding:0 28px; display:flex; align-items:center; justify-content:space-between; gap:24px; }

.brand{ display:flex; align-items:center; gap:10px; font-family:var(--font-display); font-weight:600; font-size:15px; }
.brand-mark{ width:34px; height:34px; border-radius:9px; display:grid; place-items:center; background:linear-gradient(155deg, var(--surface-2), var(--surface)); border:1px solid var(--border-strong); position:relative; overflow:hidden; }
.brand-mark svg{ width:19px; height:19px; position:relative; z-index:1; }
.brand-mark::after{ content:''; position:absolute; inset:0; background:radial-gradient(circle at 30% 20%, rgba(79,224,195,.35), transparent 60%); }
.brand-text{ display:flex; flex-direction:column; line-height:1.15; }
.brand-text b{ color:var(--text); }
.brand-text span{ font-family:var(--font-mono); font-size:10.5px; color:var(--text-faint); font-weight:500; }

.nav-links{ display:flex; align-items:center; gap:2px; padding:5px; border-radius:999px; background:var(--glass); border:1px solid var(--border); }
.nav-links a{ position:relative; padding:9px 16px; font-size:13.5px; font-weight:500; color:var(--text-dim); border-radius:999px; transition:color .25s ease, background .25s ease; }
.nav-links a:hover{ color:var(--text); background:var(--glass-strong); }
.nav-links a.active{ color:var(--text); background:var(--surface-2); }

.nav-actions{ display:flex; align-items:center; gap:10px; }
.theme-toggle{ width:42px; height:24px; border-radius:999px; background:var(--surface-2); border:1px solid var(--border); position:relative; flex-shrink:0; }
.toggle-track{ display:block; width:100%; height:100%; position:relative; }
.toggle-thumb{ position:absolute; top:2px; left:2px; width:18px; height:18px; border-radius:50%; background:var(--accent); transition: transform .35s var(--ease); }
[data-theme="light"] .toggle-thumb{ transform:translateX(18px); }
.nav-cta{ display:none; }
@media (min-width:900px){ .nav-cta{ display:inline-flex; } }

.burger{ display:none; flex-direction:column; gap:4px; width:34px; height:34px; align-items:center; justify-content:center; }
.burger span{ width:18px; height:1.5px; background:var(--text); transition: transform .3s ease, opacity .3s ease; }
@media (max-width:860px){
  .nav-links{ position:fixed; top:70px; left:16px; right:16px; flex-direction:column; align-items:stretch; padding:10px; background:var(--bg-elevated); border:1px solid var(--border); box-shadow:var(--shadow-lg); transform-origin:top; transform:scaleY(0); opacity:0; pointer-events:none; transition:transform .3s var(--ease), opacity .25s ease; }
  .nav-links.open{ transform:scaleY(1); opacity:1; pointer-events:auto; }
  .nav-links a{ padding:13px 16px; text-align:left; border-radius:10px; }
  .burger{ display:flex; }
}

/* ============================================================
   HERO
============================================================ */
.hero{ position:relative; min-height:100svh; display:flex; flex-direction:column; justify-content:center; padding:150px 0 60px; overflow:hidden; }

.hero-inner{ position:relative; z-index:2; max-width:var(--container); margin:0 auto; width:100%; padding:0 28px; display:grid; grid-template-columns:1.1fr .9fr; gap:72px; align-items:start; }
@media (max-width:960px){ .hero-inner{ grid-template-columns:1fr; gap:56px; } }

.hero-copy .eyebrow{ margin-bottom:22px; }
.hero-name{ font-size:clamp(40px,6.4vw,74px); line-height:1.02; letter-spacing:-.035em; }
.accent-text{ color:var(--accent); }
.hero-role{ display:flex; align-items:center; gap:10px; margin-top:18px; font-size:16px; color:var(--text-dim); min-height:24px; }
.prompt-caret{ color:var(--accent); }
.cursor-blink{ animation:blink 1s step-end infinite; color:var(--accent); }
@keyframes blink{ 50%{ opacity:0; } }

.domain-row{ display:flex; flex-wrap:wrap; gap:8px; margin-top:18px; max-width:520px; }
.domain-row span{ font-size:11.5px; padding:6px 12px; border-radius:999px; background:var(--glass); border:1px solid var(--border); color:var(--text-dim); }

.hero-desc{ margin-top:24px; max-width:520px; font-size:16.5px; line-height:1.75; color:var(--text-dim); }
.hero-desc strong{
  color:var(--accent-2);
  font-weight:700;
  letter-spacing:-.005em;
  transition:color .25s ease, text-shadow .25s ease;
}
.hero-desc strong:nth-of-type(3n+2){ color:var(--accent-1); }
.hero-desc strong:nth-of-type(3n){ color:var(--accent-3); }
.hero-desc strong:hover{ color:var(--accent-3); text-shadow:0 0 16px rgba(77,225,193,.45); }

.hero-actions{ display:flex; align-items:center; gap:14px; margin-top:34px; flex-wrap:wrap; }

/* ---- improved button hovers ---- */
.btn-primary:hover{
  transform:translateY(-3px);
  box-shadow:0 1px 0 rgba(255,255,255,.3) inset, 0 20px 44px -12px rgba(79,224,195,.35);
}
.btn-outline:hover{
  border-color:var(--accent); color:var(--accent);
  transform:translateY(-3px);
  box-shadow:0 8px 30px -10px rgba(79,224,195,.12);
}

.social-row{ display:flex; align-items:center; gap:10px; margin-top:30px; }
.social-row a{ width:40px; height:40px; border-radius:11px; display:grid; place-items:center; border:1px solid var(--border); background:var(--glass); color:var(--text-dim); transition: color .25s ease, border-color .25s ease, transform .3s var(--ease), background .25s ease, box-shadow .3s ease; }
.social-row a:hover{ color:var(--accent); border-color:var(--accent); transform:translateY(-3px); background:var(--glass-strong); box-shadow:0 6px 20px -8px rgba(79,224,195,.12); }
.social-row svg{ width:17px; height:17px; }

.status-line{ display:flex; align-items:center; gap:9px; margin-top:32px; font-size:12.5px; color:var(--text-faint); }
.dot-pulse{ width:7px; height:7px; border-radius:50%; background:var(--c-teal); position:relative; flex-shrink:0; }
.dot-pulse::after{ content:''; position:absolute; inset:-5px; border-radius:50%; background:var(--c-teal); opacity:.4; animation:pulse 2s ease-out infinite; }
@keyframes pulse{ 0%{ transform:scale(.5); opacity:.5; } 100%{ transform:scale(2.2); opacity:0; } }

/* ---- hero visual: premium layered portrait scene ---- */
.hero-visual{ display:flex; justify-content:center; align-items:center; }

.portrait-scene{
  position:relative; width:min(517px,73vw); max-width:100%;
  aspect-ratio:1.04;
  display:flex; justify-content:center; align-items:flex-end;
  margin-top:12px;
}

/* shared base for all background layers inside portrait-scene */
.pb-layer{
  position:absolute; inset:0; z-index:1; pointer-events:none;
  display:flex; justify-content:center; align-items:center;
  will-change:transform, translate, opacity;
  --px:0px; --py:0px; --pr:0deg;
  translate:var(--px) var(--py);
}

/* ---- Layer 1: Teal/cyan radial glow — soft, elegant, minimal ---- */
.pb-glow-cyan{
  z-index:1;
  inset:-25%;
  background:radial-gradient(ellipse 54% 50% at 52% 34%, rgba(77,225,193,.20), transparent 68%);
  filter:blur(80px);
  animation:glowPulse 8s ease-in-out infinite;
}
@keyframes glowPulse{
  0%,100%{ transform:scale(1); opacity:1; }
  50%{ transform:scale(1.05); opacity:.8; }
}

/* ---- Layer 2: Soft cyan secondary glow (kept within the teal/cyan family) ---- */
.pb-glow-purple{
  z-index:1;
  inset:-18%;
  background:radial-gradient(ellipse 44% 42% at 42% 60%, rgba(122,245,227,.13), transparent 65%);
  filter:blur(70px);
  animation:glowPulse 9s ease-in-out infinite;
  animation-delay:-4.5s;
}

/* ---- Layer 2b: Tech grid (very subtle) ---- */
.pb-tech-grid{
  z-index:1;
  inset:-5%;
  color:var(--text-faint);
  opacity:.35;
  mask-image:radial-gradient(ellipse 60% 55% at 50% 42%, black 15%, transparent 68%);
  -webkit-mask-image:radial-gradient(ellipse 60% 55% at 50% 42%, black 15%, transparent 68%);
}
.pb-tech-grid svg{ width:100%; height:100%; }

/* ---- Layer 3: Glass circle (glassmorphism, floats) ---- */
.pb-glass-circle{
  z-index:2;
  width:66%; height:66%;
  inset:auto;
  top:17%; left:17%;
  border-radius:50%;
  background:rgba(255,255,255,.015);
  backdrop-filter:blur(1px);
  border:1px solid rgba(255,255,255,.04);
  box-shadow:0 0 60px rgba(79,224,195,.02);
  animation:glassFloat 10s ease-in-out infinite;
}
[data-theme="light"] .pb-glass-circle{
  background:rgba(0,0,0,.008);
  border-color:rgba(0,0,0,.035);
  box-shadow:0 0 60px rgba(14,154,130,.02);
}
@keyframes glassFloat{
  0%,100%{ transform:translateY(0) translateX(0); }
  33%{ transform:translateY(-5px) translateX(2px); }
  66%{ transform:translateY(3px) translateX(-3px); }
}

/* ---- Layer 3b: Glowing orbit ring (slow rotation) ---- */
.pb-ring-orbit{
  z-index:2;
  inset:-10%;
  color:var(--accent-1);
  opacity:.5;
  filter:drop-shadow(0 0 6px rgba(77,225,193,.25));
  animation:ringRotate 100s linear infinite;
}
.pb-ring-orbit svg{ width:100%; height:100%; }
@keyframes ringRotate{
  from{ transform:rotate(0deg); }
  to{ transform:rotate(360deg); }
}

/* ---- Layer 3c: Dotted glowing counter-ring (reverse, subtle) ---- */
.pb-ring-dotted{
  z-index:2;
  inset:6%;
  color:var(--accent-3);
  opacity:.4;
  filter:drop-shadow(0 0 5px rgba(122,245,227,.2));
  animation:orbitReverse 80s linear infinite;
}
.pb-ring-dotted svg{ width:100%; height:100%; }
@keyframes orbitReverse{
  from{ transform:rotate(0deg); }
  to{ transform:rotate(-360deg); }
}

/* ---- Layer 4: Portrait (focal point) ---- */
.portrait-tilt{
  position:relative; z-index:4; width:100%; height:100%;
  display:flex; justify-content:center; align-items:flex-end;
  transform-style:preserve-3d; transition:transform .35s ease-out;
  transform:translateY(8px); /* shifted up ~18px from original 26px */
}

.portrait-img{
  width:92%; height:auto; display:block; object-fit:contain;
  filter:drop-shadow(0 30px 60px rgba(0,0,0,.32)) drop-shadow(0 0 46px rgba(77,225,193,.10));
  transform-origin:center bottom;
  animation: portraitFloat 6.5s ease-in-out infinite;
  mix-blend-mode:normal; /* real alpha transparency — no cutout hack needed */
  margin:0 auto;
}
@keyframes portraitFloat{ 0%,100%{ transform:translateY(0); } 50%{ transform:translateY(-7px); } }

/* ---- Layer 5: Rotating tech-icon orbit ----
   Structure per icon: orbit-item (spins) > orbit-icon-inner (counter-spins,
   pinned to the top of the circle → keeps the icon upright while it travels)
   > orbit-icon-bob (independent float) > orbit-icon-glass (hover state only).
   Every layer only ever animates `transform`/`opacity`, so it stays on the
   compositor and runs smoothly at 60fps. All six icons share one circle and
   are spaced 60° apart purely via staggered negative animation-delay, so a
   single pair of keyframes drives the whole ring. */
.tech-orbit{
  position:absolute;
  top:38%; left:50%;
  width:90%;
  aspect-ratio:1; /* forces a true circle regardless of the (tall) portrait-scene ratio */
  transform:translate(-50%,-50%);
  z-index:5;
  pointer-events:none;
}

.orbit-item{
  position:absolute;
  inset:0;
  animation:orbitSpin 21s linear infinite;
  animation-delay:var(--delay);
  will-change:transform;
}
@keyframes orbitSpin{ to{ transform:rotate(360deg); } }

.orbit-icon-inner{
  position:absolute;
  top:1%; left:50%;
  transform:translate(-50%,-50%);
  animation:orbitCounterSpin 21s linear infinite;
  animation-delay:var(--delay);
  will-change:transform;
}
@keyframes orbitCounterSpin{ to{ transform:translate(-50%,-50%) rotate(-360deg); } }

.orbit-icon-bob{
  animation:orbitBob 4.5s ease-in-out infinite;
  animation-delay:var(--bob-delay);
}
@keyframes orbitBob{
  0%,100%{ transform:translateY(0); }
  50%{ transform:translateY(-6px); }
}

.orbit-icon-glass{
  position:relative;
  pointer-events:auto;
  width:48px; height:48px;
  border-radius:15px;
  display:grid; place-items:center;
  color:var(--accent-1);
  background:linear-gradient(155deg, rgba(255,255,255,.09), rgba(255,255,255,.02));
  border:1px solid rgba(122,245,227,.28);
  backdrop-filter:blur(14px) saturate(140%);
  -webkit-backdrop-filter:blur(14px) saturate(140%);
  box-shadow:
    0 10px 34px -12px rgba(0,0,0,.45),
    0 0 0 1px rgba(255,255,255,.02) inset,
    0 0 22px -4px rgba(77,225,193,.35);
  opacity:.92;
  transition:transform .35s var(--ease), box-shadow .35s ease, border-color .35s ease, opacity .3s ease;
  will-change:transform;
}
.orbit-icon-glass svg{ width:23px; height:23px; position:relative; z-index:1; }

/* soft pulsing halo behind the glass — opacity-only, compositor friendly */
.orbit-icon-glow{
  position:absolute; inset:-10px;
  border-radius:inherit;
  background:radial-gradient(circle, rgba(77,225,193,.5), transparent 70%);
  filter:blur(10px);
  opacity:.55;
  animation:orbitGlowPulse 4.5s ease-in-out infinite;
  animation-delay:var(--bob-delay);
  z-index:0;
}
@keyframes orbitGlowPulse{
  0%,100%{ opacity:.35; }
  50%{ opacity:.7; }
}

.orbit-icon-glass:hover,
.orbit-icon-glass:focus-visible{
  transform:scale(1.16);
  border-color:rgba(122,245,227,.6);
  opacity:1;
  box-shadow:
    0 14px 40px -12px rgba(0,0,0,.5),
    0 0 0 1px rgba(255,255,255,.04) inset,
    0 0 40px -4px rgba(77,225,193,.65);
}

[data-theme="light"] .orbit-icon-glass{
  background:linear-gradient(155deg, rgba(255,255,255,.75), rgba(255,255,255,.35));
  border-color:rgba(14,154,130,.22);
  box-shadow:
    0 10px 30px -14px rgba(15,25,40,.25),
    0 0 18px -4px rgba(14,154,130,.18);
}
[data-theme="light"] .orbit-icon-glass:hover,
[data-theme="light"] .orbit-icon-glass:focus-visible{
  border-color:rgba(14,154,130,.4);
  box-shadow:
    0 14px 34px -14px rgba(15,25,40,.3),
    0 0 30px -6px rgba(14,154,130,.3);
}

/* per-icon radius / accent tuning — evenly spaced 60° apart via --delay stagger */
.oi-code .orbit-icon-glass{ color:var(--c-violet); }
.oi-database .orbit-icon-glass{ color:var(--c-violet); }
.oi-hexagon .orbit-icon-glass{ width:42px; height:42px; opacity:.82; }
.oi-hexagon .orbit-icon-glass svg{ width:20px; height:20px; }

/* ---- Layer 6: Particles (above cards) ---- */
.pb-particles{ z-index:6; }
.particle{
  position:absolute;
  width:2.5px; height:2.5px;
  border-radius:50%;
  background:var(--c-teal);
  opacity:.3;
  will-change:transform, opacity;
}
.particle.p1{ top:14%; left:18%; animation:particleDrift1 12s ease-in-out infinite; }
.particle.p2{ top:62%; left:78%; animation:particleDrift2 15s ease-in-out infinite; background:var(--accent-3); }
.particle.p3{ top:28%; left:72%; animation:particleDrift3 11s ease-in-out infinite; }
.particle.p4{ top:76%; left:25%; animation:particleDrift1 14s ease-in-out infinite 2s; background:var(--accent-3); }
.particle.p5{ top:8%; left:55%; animation:particleDrift2 13s ease-in-out infinite 1s; }
.particle.p6{ top:85%; left:60%; animation:particleDrift3 16s ease-in-out infinite 3s; }
.particle.p7{ top:44%; left:10%; animation:particleDrift1 10s ease-in-out infinite 4s; background:var(--accent-3); }
.particle.p8{ top:38%; left:88%; animation:particleDrift2 14s ease-in-out infinite 2.5s; }

@keyframes particleDrift1{
  0%,100%{ transform:translate(0,0); opacity:.2; }
  25%{ transform:translate(6px,-10px); opacity:.4; }
  50%{ transform:translate(-3px,-14px); opacity:.3; }
  75%{ transform:translate(5px,-5px); opacity:.35; }
}
@keyframes particleDrift2{
  0%,100%{ transform:translate(0,0); opacity:.15; }
  30%{ transform:translate(-8px,6px); opacity:.35; }
  60%{ transform:translate(5px,10px); opacity:.25; }
}
@keyframes particleDrift3{
  0%,100%{ transform:translate(0,0); opacity:.25; }
  40%{ transform:translate(10px,-6px); opacity:.4; }
  70%{ transform:translate(-6px,8px); opacity:.2; }
}

/* ---- responsive adjustments ---- */
@media (max-width:640px){
  .portrait-scene{ width:min(314px,70vw); margin-top:4px; }
  .portrait-tilt{ transform:translateY(4px); }
  .portrait-img{ width:90%; }
  .pb-glow-cyan{ filter:blur(50px); }
  .pb-glow-purple{ filter:blur(45px); }
  .tech-orbit{ width:94%; }
  .orbit-icon-glass{ width:37px; height:37px; border-radius:12px; }
  .orbit-icon-glass svg{ width:17px; height:17px; }
  .oi-hexagon .orbit-icon-glass{ width:32px; height:32px; }
  .oi-hexagon .orbit-icon-glass svg{ width:15px; height:15px; }
}

@media (min-width:641px) and (max-width:960px){
  .tech-orbit{ width:92%; }
  .orbit-icon-glass{ width:44px; height:44px; }
}


.scroll-cue{ position:absolute; bottom:34px; left:50%; transform:translateX(-50%); display:flex; flex-direction:column; align-items:center; gap:8px; font-size:11px; color:var(--text-faint); letter-spacing:.08em; text-transform:uppercase; z-index:2; }
.scroll-line{ width:1px; height:34px; background:var(--border-strong); overflow:hidden; }
.scroll-line i{ display:block; width:100%; height:10px; background:var(--accent); animation:scrollLine 2s ease-in-out infinite; }
@keyframes scrollLine{ 0%{ transform:translateY(-12px);} 100%{ transform:translateY(34px);} }

/* ============================================================
   ABOUT
============================================================ */
.about-grid{ display:grid; grid-template-columns:1.3fr 1fr; gap:40px; }
@media (max-width:860px){ .about-grid{ grid-template-columns:1fr; } }
.about-bio p{ font-size:16px; margin-bottom:18px; }
.about-bio p:last-of-type{ margin-bottom:0; }
.stats-strip{ display:flex; flex-wrap:wrap; gap:28px; margin-top:28px; padding-top:24px; border-top:1px solid var(--border); }
.stat-item{ display:flex; flex-direction:column; gap:3px; }
.stat-item b{ font-family:var(--font-display); font-size:26px; color:var(--accent); line-height:1; }
.stat-item span{ font-size:11.5px; color:var(--text-faint); text-transform:uppercase; letter-spacing:.05em; }
@media (max-width:480px){ .stats-strip{ gap:20px; } .stat-item b{ font-size:22px; } }

.cv-link{ margin-top:24px; font-size:13px; }
.cv-link a{ color:var(--accent); border-bottom:1px dashed var(--c-teal-dim); padding-bottom:2px; }

.spec-panel{ background:var(--glass); border:1px solid var(--border); border-radius:var(--radius); padding:22px 24px; backdrop-filter:blur(14px); align-self:start; }
.spec-head{ display:flex; align-items:center; gap:8px; font-size:12px; color:var(--text-faint); padding-bottom:14px; margin-bottom:14px; border-bottom:1px solid var(--border); }
.spec-dot{ width:6px; height:6px; border-radius:50%; background:var(--accent); }
.spec-list li{ display:flex; justify-content:space-between; gap:16px; padding:9px 0; font-size:13.5px; border-bottom:1px solid var(--border); }
.spec-list li:last-child{ border-bottom:none; }
.spec-list .k{ color:var(--text-faint); }
.spec-list .v{ color:var(--text); text-align:right; }
.status-ok{ color:var(--c-teal); }

.timeline{ margin-top:64px; }
.timeline-head{ font-size:12px; color:var(--text-faint); margin-bottom:22px; }
.timeline-track{ display:grid; grid-template-columns:repeat(4,1fr); gap:18px; position:relative; }
@media (max-width:900px){ .timeline-track{ grid-template-columns:1fr; gap:0; } }
.tl-item{ position:relative; padding-top:22px; }
@media (max-width:900px){ .tl-item{ padding-left:26px; padding-top:0; padding-bottom:26px; } .tl-item:last-child{ padding-bottom:0; } }
.tl-node{ position:absolute; top:0; left:0; width:9px; height:9px; border-radius:50%; background:var(--accent); box-shadow:0 0 0 4px var(--c-teal-dim); }
.tl-node.cert{ background:var(--c-violet); box-shadow:0 0 0 4px rgba(154,140,251,.18); }
@media (max-width:900px){ .tl-node{ top:5px; } }
.tl-item::before{ content:''; position:absolute; top:4px; left:9px; right:-18px; height:1px; background:var(--border); }
@media (max-width:900px){ .tl-item::before{ top:0; left:4px; right:auto; width:1px; height:100%; } }
.tl-item:last-child::before{ display:none; }
.tl-card h4{ font-size:14.5px; margin-top:10px; }
.tl-card p{ font-size:12.5px; margin-top:3px; }
.tl-year{ font-size:11px; color:var(--text-faint); }

/* ============================================================
   SKILLS — animated tabs
============================================================ */
.tabs{ margin-top:8px; }
.tab-nav{ display:flex; flex-wrap:wrap; gap:8px; padding:6px; border-radius:20px; background:var(--glass); border:1px solid var(--border); width:100%; margin-bottom:36px; }
@media (max-width:640px){ .tab-nav{ border-radius:16px; gap:6px; padding:8px; } }
.tab-btn{ padding:10px 18px; border-radius:999px; font-size:13px; font-weight:500; color:var(--text-dim); white-space:nowrap; position:relative; transition:color .3s ease; flex:0 0 auto; }
@media (max-width:640px){ .tab-btn{ padding:9px 14px; font-size:12.5px; } }
.tab-btn:hover{ color:var(--text); }
.tab-btn.active{ color:var(--accent-ink); }
.tab-btn .tab-bg{ position:absolute; inset:0; border-radius:999px; background:var(--accent); z-index:-1; opacity:0; transition:opacity .3s ease; }
.tab-btn.active .tab-bg{ opacity:1; }
.tab-btn span{ position:relative; z-index:1; }

.tab-panel{ display:none; }
.tab-panel.active{ display:block; animation: tabIn .45s var(--ease); }
@keyframes tabIn{ from{ opacity:0; transform:translateY(10px);} to{ opacity:1; transform:translateY(0);} }

.tab-panel-head{ display:flex; align-items:baseline; justify-content:space-between; margin-bottom:20px; gap:16px; flex-wrap:wrap; }
.tab-panel-head h3{ font-size:17px; }
.tab-panel-head span{ font-size:12.5px; color:var(--text-faint); }

.pill-grid{ display:flex; flex-wrap:wrap; gap:10px; }
.pill{ display:inline-flex; align-items:center; gap:8px; padding:10px 16px; border-radius:999px; background:var(--glass); border:1px solid var(--border); font-size:13.5px; color:var(--text-dim); backdrop-filter:blur(10px); transition: border-color .25s ease, color .25s ease, transform .25s var(--ease), background .25s ease; animation: pillIn .5s var(--ease) backwards; }
.pill:hover{ border-color:var(--accent); color:var(--text); transform:translateY(-2px); background:var(--glass-strong); }
.pill i{ width:6px; height:6px; border-radius:50%; background:var(--pc, var(--accent)); flex-shrink:0; }
@keyframes pillIn{ from{ opacity:0; transform:translateY(8px);} to{ opacity:1; transform:translateY(0);} }

/* ============================================================
   EDUCATION
============================================================ */
.edu-card{ background:var(--glass); border:1px solid var(--border); border-radius:var(--radius-lg); padding:36px 38px; backdrop-filter:blur(14px); position:relative; overflow:hidden; }
.edu-card::before{ content:''; position:absolute; top:-40%; right:-15%; width:340px; height:340px; background:radial-gradient(circle, rgba(79,224,195,.08), transparent 65%); pointer-events:none; }
.edu-top{ display:flex; justify-content:space-between; gap:24px; flex-wrap:wrap; align-items:flex-start; margin-bottom:26px; position:relative; }
.edu-degree h3{ font-size:22px; }
.edu-degree p{ margin-top:6px; font-size:14.5px; }
.edu-stats{ display:flex; gap:28px; flex-wrap:wrap; }
.edu-stat{ text-align:right; }
.edu-stat b{ display:block; font-family:var(--font-display); font-size:24px; color:var(--accent); }
.edu-stat span{ font-size:11.5px; color:var(--text-faint); text-transform:uppercase; letter-spacing:.06em; }
.edu-divider{ height:1px; background:var(--border); margin:26px 0; position:relative; }
.course-label{ font-size:12px; color:var(--text-faint); margin-bottom:14px; position:relative; }
.course-grid{ display:flex; flex-wrap:wrap; gap:9px; position:relative; }
.course-chip{ padding:8px 14px; border-radius:9px; background:var(--surface-2); border:1px solid var(--border); font-size:12.5px; color:var(--text-dim); }

/* ============================================================
   PROJECTS
============================================================ */
.project-grid{ display:grid; grid-template-columns:repeat(auto-fit,minmax(320px,1fr)); gap:24px; }
.project-card{ position:relative; border-radius:var(--radius); background:var(--glass); border:1px solid var(--border); overflow:hidden; transition: transform .1s linear, border-color .3s ease, box-shadow .3s ease; transform-style:preserve-3d; will-change:transform; }
.project-card:hover{ border-color:var(--border-strong); box-shadow:var(--shadow); }
.project-thumb{ position:relative; aspect-ratio:16/10; overflow:hidden; background:linear-gradient(135deg, var(--surface-2), var(--surface)); }
.project-thumb img{ width:100%; height:100%; object-fit:cover; transition:transform .6s var(--ease); }
.project-card:hover .project-thumb img{ transform:scale(1.06); }
.project-thumb-fallback{ position:absolute; inset:0; display:grid; place-items:center; }
.project-thumb-fallback svg{ width:42px; height:42px; opacity:.25; }
.project-thumb::after{ content:''; position:absolute; inset:0; background:linear-gradient(0deg, rgba(7,8,11,.55), transparent 55%); }
/* ── Hover overlay: Demo / GitHub buttons over the screenshot ── */
.project-thumb-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    background: linear-gradient(180deg, rgba(7,9,13,.45), rgba(7,9,13,.82));
    opacity: 0;
    pointer-events: none;
    transition: opacity .35s var(--ease), background .35s ease;
}

.project-card:hover .project-thumb-overlay,
.project-card:focus-within .project-thumb-overlay {
    opacity: 1;
    pointer-events: auto;
}

.thumb-overlay-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 26px;
    border-radius: 999px;
    background: rgba(255,255,255,.07);
    border: 1px solid rgba(122,245,227,.35);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #F3F6F8;
    font-size: 13.5px;
    font-weight: 600;
    letter-spacing: .01em;
    min-width: 132px;
    justify-content: center;
    transform: translateY(14px);
    opacity: 0;
    transition: transform .4s var(--ease), opacity .4s var(--ease), background .25s ease, border-color .25s ease, box-shadow .25s ease, color .25s ease;
}

.project-card:hover .thumb-overlay-btn,
.project-card:focus-within .thumb-overlay-btn {
    transform: translateY(0);
    opacity: 1;
}

.thumb-overlay-btn:nth-of-type(2) {
    transition-delay: .06s;
}

.thumb-overlay-btn:hover {
    background: var(--accent);
    color: #04140f;
    border-color: var(--accent);
    box-shadow: 0 10px 28px -10px rgba(77,225,193,.55);
}

.project-body{ padding:22px 24px 26px; }
.project-top{ display:flex; align-items:flex-start; justify-content:space-between; gap:12px; margin-bottom:10px; }
.project-name{ font-size:17.5px; }
.project-featured{ display:flex; align-items:center; gap:6px; font-size:10.5px; color:var(--c-amber); font-family:var(--font-mono); text-transform:uppercase; letter-spacing:.05em; flex-shrink:0; padding-top:4px; }
.led{ width:5px; height:5px; border-radius:50%; background:var(--c-amber); box-shadow:0 0 0 3px rgba(240,172,78,.18); }
.project-desc{ font-size:14px; line-height:1.65; margin-bottom:16px; }
.project-tags{ display:flex; flex-wrap:wrap; gap:7px; margin-bottom:20px; }
.project-tags span{ font-size:11px; padding:5px 10px; border-radius:6px; background:var(--surface-2); color:var(--text-faint); font-family:var(--font-mono); }
.project-actions{ display:flex; gap:18px; padding-top:16px; border-top:1px solid var(--border); }
.project-actions a{ font-size:13px; font-weight:500; color:var(--text-dim); display:flex; align-items:center; gap:6px; transition:color .25s ease; }
.project-actions a:hover{ color:var(--accent); }

.more-cta{ margin-top:44px; display:flex; justify-content:center; }
.empty-state{ padding:60px 20px; text-align:center; border:1px dashed var(--border-strong); border-radius:var(--radius); grid-column:1/-1; }

/* ============================================================
   JOURNEY (experience substitute)
============================================================ */
.journey-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:22px; }
@media (max-width:860px){ .journey-grid{ grid-template-columns:1fr; } }
.journey-card{ background:var(--glass); border:1px solid var(--border); border-radius:var(--radius); padding:28px 26px; backdrop-filter:blur(12px); transition: transform .35s var(--ease), border-color .3s ease; }
.journey-card:hover{ transform:translateY(-4px); border-color:var(--border-strong); }
.journey-icon{ width:42px; height:42px; border-radius:11px; display:grid; place-items:center; background:var(--surface-2); border:1px solid var(--border); margin-bottom:18px; color:var(--accent); }
.journey-icon svg{ width:20px; height:20px; }
.journey-card h3{ font-size:16px; margin-bottom:9px; }
.journey-card p{ font-size:13.5px; line-height:1.65; }

/* ============================================================
   CONTACT
============================================================ */
.contact-grid{ display:grid; grid-template-columns:.9fr 1.1fr; gap:44px; }
@media (max-width:860px){ .contact-grid{ grid-template-columns:1fr; } }
.contact-lede{ font-size:16px; margin-bottom:30px; max-width:400px; }
.endpoint-list li{ border-top:1px solid var(--border); }
.endpoint-list li:last-child{ border-bottom:1px solid var(--border); }
.endpoint-list a, .endpoint-list span{ display:flex; justify-content:space-between; align-items:center; padding:16px 4px; transition: padding-left .3s var(--ease); }
.endpoint-list a:hover{ padding-left:10px; }
.endpoint-list a:hover .ep-v{ color:var(--accent); }
.ep-k{ font-size:11.5px; color:var(--text-faint); text-transform:uppercase; letter-spacing:.06em; }
.ep-v{ font-size:14.5px; color:var(--text); transition:color .25s ease; }

.contact-form{ background:var(--glass); border:1px solid var(--border); border-radius:var(--radius-lg); padding:32px; backdrop-filter:blur(14px); display:flex; flex-direction:column; gap:18px; }
.field{ position:relative; }
.field input, .field textarea{
  width:100%; padding:16px 16px 8px; background:var(--surface-2); border:1px solid var(--border); border-radius:11px;
  color:var(--text); font-family:var(--font-body); font-size:14.5px; resize:vertical; transition:border-color .25s ease, background .25s ease;
}
.field input:focus, .field textarea:focus{ border-color:var(--accent); outline:none; }
.field label{ position:absolute; left:17px; top:16px; font-size:14.5px; color:var(--text-faint); pointer-events:none; transition: transform .2s ease, font-size .2s ease, color .2s ease, top .2s ease; }
.field input:focus + label, .field input:not(:placeholder-shown) + label,
.field textarea:focus + label, .field textarea:not(:placeholder-shown) + label{
  top:8px; font-size:10.5px; color:var(--accent); text-transform:uppercase; letter-spacing:.05em;
}
.form-note{ font-size:12.5px; min-height:16px; color:var(--text-faint); }
.form-note.ok{ color:var(--c-teal); }
.form-note.error{ color:var(--c-rose); }

/* ============================================================
   FOOTER
============================================================ */
.footer{ position:relative; z-index:1; padding:34px 0; border-top:1px solid var(--border); }
.footer-inner{ display:flex; align-items:center; justify-content:space-between; gap:20px; flex-wrap:wrap; }
.footer-brand{ display:flex; align-items:center; gap:10px; }
.footer-brand span{ font-size:12.5px; color:var(--text-faint); }
.footer-links{ display:flex; gap:22px; }
.footer-links a{ font-size:13px; color:var(--text-dim); transition:color .25s ease; }
.footer-links a:hover{ color:var(--accent); }
.footer-meta{ display:flex; align-items:center; gap:8px; font-size:11.5px; color:var(--text-faint); }
.footer-dot{ opacity:.6; }
.footer-actions{ display:flex; align-items:center; gap:16px; }
.admin-link{ font-size:11.5px; color:var(--text-faint); opacity:.5; transition:opacity .25s ease; }
.admin-link:hover{ opacity:1; }
.back-to-top{ width:38px; height:38px; border-radius:10px; border:1px solid var(--border); display:grid; place-items:center; color:var(--text-dim); transition: color .25s ease, border-color .25s ease, transform .3s var(--ease); }
.back-to-top:hover{ color:var(--accent); border-color:var(--accent); transform:translateY(-3px); }
.back-to-top svg{ width:15px; height:15px; }

@media (max-width:640px){
  .container{ padding:0 20px; }
  .hero{ padding-top:120px; }
  .hero-inner{ padding:0 20px; }
  .edu-card{ padding:26px 22px; }
  .edu-stats{ gap:20px; }
}
