/* ============================================================
   akifhameed.com — premium futuristic AI portfolio
   ============================================================ */

:root {
  /* base */
  --bg:        #05060d;
  --bg-2:      #080b16;
  --bg-3:      #0c1020;
  --surface:   rgba(255, 255, 255, 0.028);
  --surface-2: rgba(255, 255, 255, 0.05);
  --border:    rgba(255, 255, 255, 0.08);
  --border-2:  rgba(255, 255, 255, 0.14);

  /* text */
  --text:   #e9edf7;
  --text-2: #aab2c8;
  --muted:  #6f7891;
  --faint:  #4a5168;

  /* accents */
  --cyan:   #2ad4ee;
  --cyan-2: #5ce1f5;
  --indigo: #6d72f6;
  --violet: #9b6df6;
  --glow-cyan:   rgba(42, 212, 238, 0.55);
  --glow-indigo: rgba(109, 114, 246, 0.5);
  --glow-violet: rgba(155, 109, 246, 0.45);

  /* type */
  --display: "Space Grotesk", system-ui, sans-serif;
  --body:    "Manrope", system-ui, sans-serif;
  --mono:    "JetBrains Mono", ui-monospace, monospace;

  /* layout */
  --maxw: 1240px;
  --gutter: clamp(20px, 5vw, 64px);
  --radius: 18px;
  --radius-lg: 26px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: 88px; }

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

/* ambient page glow */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(900px 600px at 78% 8%, rgba(42, 212, 238, 0.10), transparent 60%),
    radial-gradient(800px 700px at 10% 30%, rgba(109, 114, 246, 0.10), transparent 60%),
    radial-gradient(900px 800px at 60% 100%, rgba(155, 109, 246, 0.07), transparent 60%);
}

/* faint grid texture */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.5;
  background-image:
    linear-gradient(rgba(255,255,255,0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.018) 1px, transparent 1px);
  background-size: 58px 58px;
  -webkit-mask-image: radial-gradient(circle at 50% 30%, #000 0%, transparent 80%);
          mask-image: radial-gradient(circle at 50% 30%, #000 0%, transparent 80%);
}

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

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
::selection { background: rgba(42, 212, 238, 0.28); color: #fff; }

/* ---------- shared layout ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }

section { padding-block: clamp(38px, 5vw, 68px); position: relative; }

.kicker {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--cyan);
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.kicker::before {
  content: "";
  width: 26px; height: 1px;
  background: linear-gradient(90deg, var(--cyan), transparent);
}

.section-head { max-width: 720px; margin-bottom: clamp(26px, 3.5vw, 44px); }
.section-head h2 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(30px, 4.6vw, 54px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-top: 20px;
  text-wrap: balance;
}
.section-head p {
  color: var(--text-2);
  font-size: clamp(15px, 1.5vw, 18px);
  margin-top: 18px;
  max-width: 600px;
  text-wrap: pretty;
}
.grad {
  background: linear-gradient(110deg, var(--cyan-2) 0%, var(--indigo) 55%, var(--violet) 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--body); font-weight: 600; font-size: 14.5px;
  padding: 13px 22px; border-radius: 100px;
  border: 1px solid var(--border-2);
  color: var(--text); background: var(--surface);
  transition: all .35s var(--ease);
  position: relative; overflow: hidden;
  white-space: nowrap;
}
.btn svg { width: 17px; height: 17px; }
.btn:hover { border-color: rgba(42,212,238,0.5); background: rgba(42,212,238,0.07); transform: translateY(-2px); }
.btn-primary {
  border: none;
  background: linear-gradient(110deg, var(--cyan) 0%, var(--indigo) 100%);
  color: #04111b; font-weight: 700;
  box-shadow: 0 8px 30px -8px var(--glow-cyan), 0 0 0 1px rgba(255,255,255,0.06) inset;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 40px -8px var(--glow-cyan); }
.btn-ghost { background: transparent; }

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  transition: all .4s var(--ease);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 72px; margin-top: 14px;
  padding: 0 22px 0 26px;
  border-radius: 100px;
  border: 1px solid transparent;
  transition: all .4s var(--ease);
}
.nav.scrolled .nav-inner {
  height: 62px; margin-top: 12px;
  background: rgba(8, 11, 22, 0.6);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border-color: var(--border);
  box-shadow: 0 18px 50px -20px rgba(0,0,0,0.8);
}
.nav-left { display: flex; align-items: center; gap: 16px; }
.brand { display: flex; align-items: center; gap: 12px; font-family: var(--display); font-weight: 600; letter-spacing: -0.01em; }
.brand .mark {
  width: 30px; height: 30px; border-radius: 9px;
  background: linear-gradient(135deg, var(--cyan), var(--indigo));
  display: grid; place-items: center; color: #04111b; font-weight: 700; font-size: 15px;
  box-shadow: 0 0 22px -4px var(--glow-cyan);
}
.brand .dot { color: var(--cyan); }
/* flashing role next to the name */
.brand-role {
  position: relative; padding-left: 16px;
  font-family: var(--mono); font-size: 12.5px; font-weight: 600; letter-spacing: 0.04em;
  white-space: nowrap;
  background: linear-gradient(100deg, var(--cyan-2) 0%, var(--violet) 40%, var(--indigo) 60%, var(--cyan-2) 100%);
  background-size: 220% auto; -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  animation: availFlow 5s linear infinite, roleBlink 2.6s ease-in-out infinite;
}
.brand-role::before {
  content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 1px; height: 18px; background: linear-gradient(var(--cyan), transparent);
}
@keyframes roleBlink { 0%,100% { opacity: 1; filter: drop-shadow(0 0 6px rgba(42,212,238,0.5)); } 50% { opacity: 0.6; filter: drop-shadow(0 0 2px rgba(42,212,238,0.15)); } }
@media (prefers-reduced-motion: reduce) { .brand-role { animation: none; color: var(--cyan-2); -webkit-text-fill-color: currentColor; } }
/* email next to the role */
.brand-mail {
  position: relative; padding-left: 16px; display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--mono); font-size: 12.5px; color: var(--text-2); white-space: nowrap;
  transition: color .25s;
}
.brand-mail::before {
  content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 1px; height: 18px; background: linear-gradient(var(--violet), transparent);
}
.brand-mail svg { width: 15px; height: 15px; color: var(--cyan); }
.brand-mail:hover { color: var(--text); }
/* flashy "open to roles" line in place of a menu */
.nav-avail {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 13px; letter-spacing: 0.04em;
  padding: 9px 18px 9px 14px; border-radius: 100px;
  border: 1px solid rgba(42,212,238,0.35);
  background: rgba(8,11,22,0.5); backdrop-filter: blur(10px);
  position: relative; overflow: hidden; white-space: nowrap;
  box-shadow: 0 0 22px -6px var(--glow-cyan);
  animation: availGlow 3.2s ease-in-out infinite;
}
@keyframes availGlow {
  0%,100% { box-shadow: 0 0 22px -8px var(--glow-cyan);   border-color: rgba(42,212,238,0.35); }
  50%     { box-shadow: 0 0 30px -4px var(--glow-violet); border-color: rgba(155,109,246,0.5); }
}
/* shine sweep */
.nav-avail::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(105deg, transparent 30%, rgba(255,255,255,0.14) 48%, transparent 62%);
  transform: translateX(-120%); animation: availShine 3.6s var(--ease) infinite;
}
@keyframes availShine { 0%,55% { transform: translateX(-120%); } 78%,100% { transform: translateX(120%); } }
.nav-avail .al-short { display: none; }   /* short label only swaps in on phones */
.nav-avail .avail-dot {
  width: 9px; height: 9px; border-radius: 50%; background: #34e2a0; flex-shrink: 0;
  box-shadow: 0 0 0 0 rgba(52,226,160,0.7); animation: pulse 2.2s infinite;
}
.nav-avail .avail-text {
  font-weight: 600; position: relative;
  background: linear-gradient(100deg, var(--cyan-2) 0%, var(--indigo) 45%, var(--violet) 70%, var(--cyan-2) 100%);
  background-size: 220% auto; -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  animation: availFlow 5s linear infinite;
}
@keyframes availFlow { to { background-position: 220% center; } }
@media (prefers-reduced-motion: reduce) {
  .nav-avail, .nav-avail::after, .nav-avail .avail-text, .nav-avail .avail-dot { animation: none; }
  .nav-avail .avail-text { color: var(--cyan-2); -webkit-text-fill-color: currentColor; }
}

/* ============================================================
   HERO  (research rubric robot left · VLA network sphere right)
   ============================================================ */
/* content height (no forced min-height → no big empty gap before section 02) */
.hero { position: relative; padding: 94px 0 56px; }

/* header: "01 — Research" kicker, then the flashy title on the NEXT line; 50px gap to the scenes */
.hero-head { margin-bottom: 50px; }
.hero-rtitle {
  display: block; margin-top: 14px;
  font-family: var(--display); font-weight: 700;
  font-size: clamp(28px, 4vw, 52px); line-height: 1.04; letter-spacing: -0.02em; white-space: nowrap;
  background: linear-gradient(100deg, var(--cyan-2) 0%, var(--indigo) 38%, var(--violet) 60%, var(--cyan-2) 100%);
  background-size: 220% auto; -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  filter: drop-shadow(0 0 18px rgba(42,212,238,0.28));
  animation: availFlow 5s linear infinite, rtitleGlow 3.2s ease-in-out infinite;
}
@keyframes rtitleGlow {
  0%,100% { filter: drop-shadow(0 0 16px rgba(42,212,238,0.25)); }
  50%     { filter: drop-shadow(0 0 26px rgba(155,109,246,0.45)); }
}
@media (prefers-reduced-motion: reduce) { .hero-rtitle { animation: none; color: var(--cyan-2); -webkit-text-fill-color: currentColor; } }

.hero-grid {
  display: grid; grid-template-columns: 1.06fr 0.94fr; gap: clamp(40px, 7vw, 110px);
  align-items: center; width: 100%;
}

/* left — research rubric robot, in the OPEN (no box), big */
.hero-research { position: relative; width: 100%; aspect-ratio: 5 / 4; min-height: 440px; }
#rubric-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hero-research .rfx-case { bottom: 6px; gap: 9px; padding: 8px 14px; transform: translate(-50%, 50px); }
.hero-research .rfx-case .rfx-lvl { font-size: 16px; }
.hero-research .rfx-case .rfx-out { font-size: 11px; }
.hero-research .rfx-case .rfx-bar i { width: 14px; height: 5px; }

/* right — networked-intelligence sphere */
.hero-stage { position: relative; aspect-ratio: 1 / 1; width: 100%; min-height: 440px; }
#hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

/* floating label on the sphere */
.hero-tag {
  position: absolute; z-index: 2;
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.12em;
  color: var(--text-2); padding: 6px 12px; border-radius: 100px;
  border: 1px solid var(--border); background: rgba(8,11,22,0.5); backdrop-filter: blur(8px);
  display: flex; align-items: center; gap: 7px; white-space: nowrap;
}
.hero-tag .od { width: 6px; height: 6px; border-radius: 50%; }
.tag-net { right: 1%; top: 6%; }

.hero-scroll {
  position: absolute; bottom: 26px; left: var(--gutter);
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--muted); display: flex; align-items: center; gap: 12px;
}
.hero-scroll .line { width: 1px; height: 34px; background: linear-gradient(var(--cyan), transparent); animation: scrolldn 2.2s var(--ease) infinite; transform-origin: top; }
@keyframes scrolldn { 0%{transform:scaleY(0);opacity:0} 40%{transform:scaleY(1);opacity:1} 100%{transform:scaleY(1);transform-origin:bottom;opacity:0} }

/* ============================================================
   ABOUT
   ============================================================ */
.about-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: clamp(30px, 5vw, 70px); align-items: start; }
.about-body p { color: var(--text-2); font-size: clamp(16px, 1.7vw, 19px); line-height: 1.75; }
.about-body p + p { margin-top: 20px; }
.about-body b { color: var(--text); font-weight: 600; }
.identity-chips { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 30px; }
.chip {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.04em;
  padding: 8px 14px; border-radius: 100px; border: 1px solid var(--border);
  color: var(--text-2); background: var(--surface); transition: all .3s var(--ease);
}
.chip:hover { border-color: rgba(42,212,238,0.4); color: var(--text); transform: translateY(-2px); }

.stat-stack { display: grid; gap: 14px; }
.stat-card {
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); padding: 24px 26px; position: relative; overflow: hidden;
  transition: all .4s var(--ease);
}
.stat-card::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2px;
  background: linear-gradient(var(--cyan), var(--indigo)); opacity: .8;
}
.stat-card:hover { border-color: var(--border-2); background: var(--surface-2); transform: translateX(4px); }
.stat-card .num { font-family: var(--display); font-size: 34px; font-weight: 600; letter-spacing: -0.02em; }
.stat-card .lbl { font-size: 13.5px; color: var(--muted); margin-top: 4px; }

/* ============================================================
   RESEARCH / DISSERTATION
   ============================================================ */
.research { }
.research-card {
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  background:
    radial-gradient(700px 380px at 88% -10%, rgba(42,212,238,0.10), transparent 60%),
    radial-gradient(600px 400px at -8% 120%, rgba(155,109,246,0.10), transparent 60%),
    var(--surface);
  padding: clamp(28px, 4vw, 52px);
  overflow: hidden; position: relative;
}
.research-top { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; margin-bottom: 26px; }
.research-tagline { font-family: var(--mono); font-size: 12px; letter-spacing: 0.16em; color: var(--cyan); text-transform: uppercase; }
.research-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: clamp(28px, 4vw, 56px); align-items: center; }
.research h3 {
  font-family: var(--display); font-weight: 600; font-size: clamp(23px, 2.8vw, 34px);
  line-height: 1.18; letter-spacing: -0.02em; text-wrap: balance;
}
.research-desc { color: var(--text-2); margin-top: 20px; font-size: clamp(15px, 1.5vw, 17px); line-height: 1.7; }
.research-meta { display: flex; flex-wrap: wrap; gap: 22px; margin-top: 28px; }
.research-meta .m .k { font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; color: var(--muted); text-transform: uppercase; }
.research-meta .m .v { font-size: 15px; color: var(--text); margin-top: 4px; font-weight: 600; }

/* ---- full-bleed 3D rubric scene (robot demonstrating L0–L4) ---- */
.research-fx {
  position: relative; width: 100%; min-height: 100svh; padding: 0; overflow: hidden;
  display: flex; isolation: isolate;
}
#rubric-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; z-index: 0; }
.rfx-scrim {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(5,6,13,0.7), transparent 45%),
    radial-gradient(120% 70% at 50% 100%, rgba(5,6,13,0.85), transparent 50%);
}
.rfx-head {
  position: absolute; top: clamp(64px, 12vh, 128px); left: 0; right: 0; z-index: 3;
  text-align: center; pointer-events: none; perspective: 900px;
}
.rfx-head .kicker { justify-content: center; }
.rfx-title {
  font-family: var(--display); font-weight: 600; letter-spacing: -0.025em;
  font-size: clamp(34px, 6.5vw, 78px); line-height: 1.02; margin-top: 16px;
  text-wrap: balance; transform-style: preserve-3d;
  text-shadow: 0 12px 50px rgba(5,6,13,0.85), 0 0 60px rgba(42,212,238,0.12);
  animation: rfxFloat 7s var(--ease) infinite;
}
@keyframes rfxFloat {
  0%,100% { transform: perspective(900px) rotateX(7deg) translateY(0) translateZ(0); }
  50%     { transform: perspective(900px) rotateX(7deg) translateY(-14px) translateZ(40px); }
}
.rfx-case {
  position: absolute; bottom: clamp(34px, 7vh, 84px); left: 50%; transform: translateX(-50%);
  z-index: 3; display: flex; align-items: center; gap: 14px;
  padding: 12px 20px; border-radius: 100px; pointer-events: none;
  border: 1px solid color-mix(in srgb, var(--c) 50%, transparent);
  background: rgba(8,11,22,0.55); backdrop-filter: blur(10px);
  box-shadow: 0 0 30px -8px var(--c); transition: border-color .5s, box-shadow .5s;
}
.rfx-case .rfx-lvl { font-family: var(--mono); font-weight: 700; font-size: 20px; color: var(--c); }
.rfx-case .rfx-out { font-family: var(--mono); font-size: 13px; letter-spacing: 0.06em; color: var(--text); text-transform: uppercase; }
.rfx-case .rfx-bar { display: flex; gap: 5px; }
.rfx-case .rfx-bar i { width: 18px; height: 6px; border-radius: 3px; background: rgba(255,255,255,0.12); transition: background .4s; }
.rfx-case .rfx-bar i.on { background: var(--c); box-shadow: 0 0 8px color-mix(in srgb, var(--c) 70%, transparent); }

/* severity rubric — 3D slider */
.severity .sv-title { font-family: var(--mono); font-size: 12px; letter-spacing: 0.16em; color: var(--muted); text-transform: uppercase; margin-bottom: 18px; }
.sev-slider { perspective: 1300px; }
.sev-stage { position: relative; height: 252px; transform-style: preserve-3d; }
.sev-card {
  position: absolute; top: 0; left: 7%; right: 7%; min-height: 232px; padding: 24px 26px;
  border-radius: var(--radius); border: 1px solid var(--border-2);
  background:
    radial-gradient(360px 200px at 82% -25%, color-mix(in srgb, var(--c) 24%, transparent), transparent 64%),
    linear-gradient(160deg, rgba(255,255,255,0.05), rgba(255,255,255,0.012)), var(--bg-2);
  box-shadow: 0 30px 60px -38px rgba(0,0,0,0.92);
  transition: transform .55s var(--ease), opacity .55s var(--ease);
  backface-visibility: hidden; will-change: transform, opacity;
  display: flex; flex-direction: column; gap: 12px; overflow: hidden;
}
.sev-card::before {
  content: ""; position: absolute; left: 0; top: 18px; bottom: 18px; width: 3px; border-radius: 3px;
  background: var(--c); box-shadow: 0 0 18px var(--c);
}
.sev-top { display: flex; align-items: center; gap: 12px; }
.sev-lvl { font-family: var(--mono); font-weight: 700; font-size: 30px; color: var(--c); letter-spacing: -0.02em; }
.sev-tag {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--c);
  border: 1px solid color-mix(in srgb, var(--c) 42%, transparent); padding: 4px 10px; border-radius: 100px;
  background: color-mix(in srgb, var(--c) 12%, transparent);
}
.sev-name { font-family: var(--display); font-weight: 600; font-size: clamp(18px, 2vw, 23px); letter-spacing: -0.01em; }
.sev-ex { color: var(--text-2); font-size: 14.5px; line-height: 1.62; flex: 1; }
.sev-meter { display: flex; gap: 6px; margin-top: 4px; }
.sev-meter i { width: 26px; height: 7px; border-radius: 4px; background: rgba(255,255,255,0.08); }
.sev-meter i.on { background: var(--c); box-shadow: 0 0 10px color-mix(in srgb, var(--c) 70%, transparent); }
.sev-ctrl { display: flex; align-items: center; gap: 14px; margin-top: 22px; }
.sev-nav {
  width: 40px; height: 40px; flex-shrink: 0; border-radius: 50%; border: 1px solid var(--border-2);
  background: var(--surface); color: var(--text); font-size: 20px; line-height: 1; display: grid; place-items: center;
  transition: all .3s var(--ease);
}
.sev-nav:hover { border-color: rgba(42,212,238,0.5); background: rgba(42,212,238,0.08); color: var(--cyan); transform: translateY(-2px); }
.sev-range { -webkit-appearance: none; appearance: none; flex: 1; height: 4px; border-radius: 4px; background: linear-gradient(90deg, #34e2a0, #ffd98a, #ff6b6b); outline: none; }
.sev-range::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 3px solid var(--cyan); cursor: pointer; box-shadow: 0 0 12px var(--glow-cyan); }
.sev-range::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 3px solid var(--cyan); cursor: pointer; box-shadow: 0 0 12px var(--glow-cyan); }
.sev-dots { display: flex; gap: 8px; justify-content: center; margin-top: 16px; }
.sev-dots span { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,0.18); transition: all .3s var(--ease); cursor: pointer; }
.sev-dots span.on { background: var(--cyan); transform: scale(1.3); box-shadow: 0 0 10px var(--glow-cyan); }

/* featured "lead" skills card (Safe AI / Research) */
.skill-card.lead {
  border-color: rgba(42,212,238,0.35);
  background:
    radial-gradient(460px 260px at 90% -30%, rgba(42,212,238,0.12), transparent 60%),
    var(--surface-2);
}
.skill-card.lead h3 { font-size: 22px; font-weight: 700; }
.skill-card.lead .skill-ic { color: var(--cyan); border-color: rgba(42,212,238,0.4); }
.skill-card.lead .skill-tags span { font-weight: 600; color: var(--text); border-color: rgba(42,212,238,0.28); }

/* ============================================================
   PROJECTS — full-width auto slider
   ============================================================ */
.projects-fx { overflow: hidden; }
.projects-fx .section-head { margin-bottom: clamp(20px, 3vw, 36px); }
.pfx { position: relative; }
.pfx-viewport { width: 100%; overflow: hidden; }
.pfx-track { display: flex; will-change: transform; transition: transform .9s cubic-bezier(0.76, 0, 0.24, 1); }
.pfx-slide { flex: 0 0 100%; min-width: 100%; }
.pfx-inner {
  display: flex; flex-direction: column; align-items: center; gap: clamp(18px, 2.6vw, 30px);
  padding-block: 6px;
}

/* the project screenshot = the whole showcase image */
.pfx-shot {
  position: relative; display: block; width: 100%; max-width: 1080px;
  aspect-ratio: 1734 / 907; border-radius: var(--radius-lg); overflow: hidden;
  border: 1px solid var(--border-2);
  box-shadow: 0 40px 90px -50px rgba(0,0,0,1), inset 0 1px 0 rgba(255,255,255,0.04);
  transition: transform .5s var(--ease), box-shadow .5s var(--ease), opacity .7s var(--ease);
}
.pfx-shot img { width: 100%; height: 100%; object-fit: cover; display: block; transform: scale(1.06); transition: transform 6.5s var(--ease); }
.pfx-slide.active .pfx-shot img { transform: scale(1); }      /* slow Ken-Burns on the active slide */
.pfx-shot:hover { transform: translateY(-4px); box-shadow: 0 54px 110px -50px rgba(0,0,0,1), 0 0 70px -30px var(--glow-indigo); }
.pfx-sheen {
  position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: linear-gradient(105deg, transparent 38%, rgba(255,255,255,0.10) 50%, transparent 62%);
  transform: translateX(-100%);
}
.pfx-slide.active .pfx-sheen { animation: sheen 1.2s var(--ease) .4s forwards; }

.pfx-actions { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }

/* entrance — active slide fades/rises in */
.pfx-slide .pfx-shot { opacity: 0; }
.pfx-slide.active .pfx-shot { opacity: 1; }
.pfx-slide .pfx-actions { opacity: 0; transform: translateY(22px); transition: opacity .6s var(--ease) .15s, transform .6s var(--ease) .15s; }
.pfx-slide.active .pfx-actions { opacity: 1; transform: none; }

/* controls */
.pfx-ui { display: flex; align-items: center; justify-content: center; gap: 22px; margin-top: clamp(22px, 3vw, 38px); }
.pfx-nav {
  width: 46px; height: 46px; flex-shrink: 0; border-radius: 50%; border: 1px solid var(--border-2);
  background: var(--surface); color: var(--text); font-size: 22px; line-height: 1; display: grid; place-items: center;
  transition: all .3s var(--ease);
}
.pfx-nav:hover { border-color: rgba(42,212,238,0.5); background: rgba(42,212,238,0.08); color: var(--cyan); transform: translateY(-2px); }
.pfx-dots { display: flex; gap: 10px; align-items: center; }
.pfx-dots button {
  width: 9px; height: 9px; padding: 0; border-radius: 50%; border: none; cursor: pointer;
  background: rgba(255,255,255,0.18); transition: all .35s var(--ease);
}
.pfx-dots button.on { width: 26px; border-radius: 5px; background: linear-gradient(90deg, var(--cyan), var(--indigo)); box-shadow: 0 0 12px var(--glow-cyan); }

/* ============================================================
   PROJECTS  (legacy grid — unused)
   ============================================================ */
.projects { perspective: 1600px; }
.proj-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(18px, 2.2vw, 26px); }
.proj {
  position: relative; border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background:
    linear-gradient(155deg, rgba(255,255,255,0.06), rgba(255,255,255,0.015) 40%),
    var(--bg-2);
  padding: 0; overflow: hidden;
  transform-style: preserve-3d;
  transition: transform .2s var(--ease), border-color .4s var(--ease), box-shadow .4s var(--ease);
  box-shadow: 0 30px 60px -40px rgba(0,0,0,0.9);
  min-height: 300px;
  display: flex; flex-direction: column;
}
.proj:hover { border-color: var(--border-2); box-shadow: 0 50px 90px -50px rgba(0,0,0,1), 0 0 60px -30px var(--glow-indigo); }
/* size assignments */
.proj.lg { grid-column: span 7; }
.proj.md { grid-column: span 5; }
.proj.half { grid-column: span 6; }
.proj.eq { grid-column: span 4; }

.proj-glow {
  position: absolute; inset: 0; opacity: 0; transition: opacity .4s var(--ease);
  background: radial-gradient(420px 300px at var(--mx,50%) var(--my,30%), rgba(42,212,238,0.16), transparent 60%);
  pointer-events: none; z-index: 3;
}
.proj:hover .proj-glow { opacity: 1; }
.proj-sheen {
  position: absolute; inset: 0; z-index: 4; pointer-events: none;
  background: linear-gradient(105deg, transparent 30%, rgba(255,255,255,0.06) 48%, transparent 60%);
  transform: translateX(-100%); transition: none;
}
.proj:hover .proj-sheen { animation: sheen 0.9s var(--ease) forwards; }
@keyframes sheen { to { transform: translateX(100%); } }

.proj-visual {
  position: relative; height: 168px; flex-shrink: 0;
  background: linear-gradient(160deg, var(--bg-3), var(--bg));
  overflow: hidden; transform: translateZ(20px);
  border-bottom: 1px solid var(--border);
}
.proj-visual .scene {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(42,212,238,0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(109,114,246,0.10) 1px, transparent 1px);
  background-size: 26px 26px;
  transform: perspective(400px) rotateX(58deg) translateY(-8%) scale(1.5);
  -webkit-mask-image: linear-gradient(#000, transparent 78%);
          mask-image: linear-gradient(#000, transparent 78%);
  animation: gridflow 9s linear infinite;
}
@keyframes gridflow { to { background-position: 0 26px, 26px 0; } }
.proj-emblem {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  font-family: var(--display); font-weight: 700; font-size: 40px; letter-spacing: -0.02em;
  color: transparent;
}
.proj-emblem .glyph {
  display: grid; place-items: center; width: 72px; height: 72px; border-radius: 18px;
  background: linear-gradient(135deg, rgba(42,212,238,0.18), rgba(109,114,246,0.18));
  border: 1px solid var(--border-2); color: var(--text);
  box-shadow: 0 0 40px -10px var(--glow-cyan), inset 0 1px 0 rgba(255,255,255,0.1);
  backdrop-filter: blur(6px);
}
.proj-num {
  position: absolute; top: 14px; left: 16px; font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.18em; color: var(--muted); z-index: 2;
}
.proj-live {
  position: absolute; top: 13px; right: 14px; z-index: 2;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--cyan); border: 1px solid rgba(42,212,238,0.32); padding: 4px 9px; border-radius: 100px;
  display: flex; align-items: center; gap: 6px; background: rgba(8,11,22,0.55);
}
.proj-live .ld { width: 6px; height: 6px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }

.proj-body { padding: 22px 24px 24px; transform: translateZ(38px); display: flex; flex-direction: column; flex: 1; }
.proj-body h3 { font-family: var(--display); font-weight: 600; font-size: 21px; letter-spacing: -0.015em; }
.proj-body .desc { color: var(--text-2); font-size: 14.5px; margin-top: 10px; line-height: 1.6; flex: 1; }
.proj-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 18px; }
.proj-tags span {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.02em;
  padding: 5px 10px; border-radius: 7px; border: 1px solid var(--border);
  color: var(--text-2); background: rgba(255,255,255,0.02);
}
.proj-links { display: flex; gap: 16px; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--border); }
.proj-links a {
  display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600;
  color: var(--text-2); transition: color .25s, gap .25s;
}
.proj-links a:hover { color: var(--cyan); gap: 10px; }
.proj-links a svg { width: 15px; height: 15px; }

/* ============================================================
   SKILLS
   ============================================================ */
.skills-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(16px, 2vw, 22px); }
.skill-card {
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); padding: 28px 28px 26px; position: relative; overflow: hidden;
  transition: all .4s var(--ease); transform-style: preserve-3d;
}
.skill-card:hover { border-color: var(--border-2); background: var(--surface-2); transform: translateY(-4px); }
.skill-card::after {
  content: ""; position: absolute; right: -40px; top: -40px; width: 140px; height: 140px; border-radius: 50%;
  background: radial-gradient(circle, rgba(42,212,238,0.16), transparent 70%); opacity: 0; transition: opacity .4s;
}
.skill-card:hover::after { opacity: 1; }
.skill-card.feat { grid-column: span 2; }
.skill-head { display: flex; align-items: center; gap: 14px; }
.skill-ic {
  width: 46px; height: 46px; border-radius: 13px; flex-shrink: 0;
  display: grid; place-items: center; color: var(--cyan);
  background: linear-gradient(135deg, rgba(42,212,238,0.14), rgba(109,114,246,0.10));
  border: 1px solid var(--border-2); box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}
.skill-ic svg { width: 23px; height: 23px; }
.skill-head h3 { font-family: var(--display); font-weight: 600; font-size: 18.5px; letter-spacing: -0.01em; }
.skill-head .sub { font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; color: var(--muted); text-transform: uppercase; margin-top: 3px; }
.skill-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.skill-tags span {
  font-size: 13px; padding: 6px 12px; border-radius: 100px; border: 1px solid var(--border);
  color: var(--text-2); background: rgba(255,255,255,0.02); transition: all .3s var(--ease);
}
.skill-card:hover .skill-tags span { border-color: rgba(42,212,238,0.22); }

/* ============================================================
   EDUCATION + EXPERIENCE
   ============================================================ */
.edu-exp-grid { display: grid; grid-template-columns: 1fr 1.25fr; gap: clamp(34px, 5vw, 72px); align-items: start; }

.edu-card {
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  background:
    radial-gradient(500px 300px at 100% 0%, rgba(109,114,246,0.12), transparent 60%),
    var(--surface);
  padding: clamp(26px, 3vw, 38px); position: relative; overflow: hidden;
}
.edu-card .cap { font-family: var(--display); font-size: 44px; font-weight: 700; letter-spacing: -0.02em; }
.edu-deg { font-family: var(--display); font-weight: 600; font-size: 22px; margin-top: 18px; letter-spacing: -0.01em; }
.edu-school { color: var(--text-2); margin-top: 6px; }
.edu-pill {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 20px;
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 8px 14px; border-radius: 100px; color: #ffd98a;
  border: 1px solid rgba(255,200,90,0.3); background: rgba(255,200,90,0.06);
}
.edu-focus { margin-top: 24px; padding-top: 22px; border-top: 1px solid var(--border); }
.edu-focus .k { font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.edu-focus .v { color: var(--text-2); margin-top: 8px; font-size: 14.5px; line-height: 1.6; }

/* timeline */
.timeline { position: relative; padding-left: 30px; }
.timeline::before { content: ""; position: absolute; left: 5px; top: 6px; bottom: 6px; width: 1px; background: linear-gradient(var(--cyan), var(--indigo), transparent); }
.tl-item { position: relative; padding-bottom: 34px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before {
  content: ""; position: absolute; left: -30px; top: 5px; width: 11px; height: 11px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--cyan); box-shadow: 0 0 14px -2px var(--glow-cyan);
}
.tl-date { font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; color: var(--cyan); }
.tl-role { font-family: var(--display); font-weight: 600; font-size: 19px; margin-top: 8px; letter-spacing: -0.01em; }
.tl-org { color: var(--text-2); font-size: 14.5px; margin-top: 3px; }
.tl-desc { color: var(--muted); font-size: 14px; margin-top: 10px; line-height: 1.65; max-width: 540px; }

/* ============================================================
   CONTACT
   ============================================================ */
.contact { padding-bottom: clamp(60px, 8vw, 110px); }
.contact-card {
  border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden;
  background:
    radial-gradient(800px 460px at 50% -30%, rgba(42,212,238,0.14), transparent 60%),
    radial-gradient(700px 500px at 50% 130%, rgba(155,109,246,0.12), transparent 60%),
    var(--surface);
  padding: clamp(40px, 6vw, 80px) var(--gutter); text-align: center; position: relative;
}
.contact-card h2 {
  font-family: var(--display); font-weight: 600; font-size: clamp(32px, 5vw, 62px);
  letter-spacing: -0.03em; line-height: 1.02; text-wrap: balance;
}
.contact-card p { color: var(--text-2); font-size: clamp(15px, 1.6vw, 18px); margin: 20px auto 0; max-width: 520px; text-wrap: pretty; }
.contact-cta { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 36px; }
.contact-channels { display: flex; flex-wrap: wrap; gap: 28px; justify-content: center; margin-top: 44px; padding-top: 34px; border-top: 1px solid var(--border); }
.channel { display: flex; align-items: center; gap: 11px; font-size: 14px; color: var(--text-2); transition: color .25s; }
.channel:hover { color: var(--cyan); }
.channel svg { width: 18px; height: 18px; }

/* footer */
footer { border-top: 1px solid var(--border); padding: 38px 0; }
.foot-inner { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; }
.foot-inner .l { font-family: var(--mono); font-size: 12px; color: var(--muted); letter-spacing: 0.04em; }
.foot-inner .r { display: flex; gap: 22px; }
.foot-inner .r a { font-size: 13px; color: var(--text-2); transition: color .25s; }
.foot-inner .r a:hover { color: var(--cyan); }

/* ============================================================
   SCROLL REVEAL
   ============================================================ */
.reveal { opacity: 0; transform: translateY(26px); transition: transform .85s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-d="1"] { transition-delay: .08s; }
.reveal[data-d="2"] { transition-delay: .16s; }
.reveal[data-d="3"] { transition-delay: .24s; }
.reveal[data-d="4"] { transition-delay: .32s; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
}
@media print {
  .reveal { opacity: 1 !important; transform: none !important; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1000px) {
  .hero { padding: 96px 0 56px; min-height: auto; }
  .hero-head { flex-wrap: wrap; gap: 6px 14px; }
  .hero-rtitle { white-space: normal; font-size: clamp(26px, 6.6vw, 40px); }
  .hero-grid { grid-template-columns: 1fr; gap: 18px; }
  .hero-research { order: 1; aspect-ratio: 4 / 3; min-height: 340px; min-width: 0; }
  .hero-stage { order: 2; aspect-ratio: 1 / 1; min-height: 340px; max-height: 64vh; margin-inline: auto; max-width: 520px; width: 100%; min-width: 0; }
  .brand-mail { display: none; }     /* keep the nav from crowding on laptops/tablets */
  .about-grid { grid-template-columns: 1fr; gap: 30px; }   /* heading is full-width above; body no longer squeezed */
  .research-grid { grid-template-columns: 1fr; gap: 36px; }
  .edu-exp-grid { grid-template-columns: 1fr; gap: 40px; }
  .proj.lg, .proj.md, .proj.half, .proj.eq { grid-column: span 12; }
  .pfx-inner { grid-template-columns: 1fr; gap: 22px; }
  .pfx-media { aspect-ratio: 16 / 10; }
  .hero-scroll { display: none; }
}
@media (max-width: 640px) {
  .skills-grid { grid-template-columns: 1fr; }
  .skill-card.feat { grid-column: span 1; }
  .hero-head { margin-bottom: 32px; }
  /* keep the flashy nav line on one line, just smaller */
  .nav-inner { padding: 0 14px 0 16px; }
  .brand span:not(.mark) { font-size: 15px; }
  .brand-role { display: none; }     /* drop the role on phones to avoid crowding */
  .nav-avail { font-size: 10px; padding: 6px 11px 6px 9px; gap: 6px; }
  .nav-avail .avail-dot { width: 7px; height: 7px; }
  .nav-avail .al-full { display: none; }     /* "Open to AI / ML & DevOps roles" is too wide on phones */
  .nav-avail .al-short { display: inline; }  /* → "Open to roles" so the nav fits, no page overflow */
  .rfx-case { gap: 9px; padding: 9px 14px; }
  .rfx-case .rfx-lvl { font-size: 16px; }
  .rfx-case .rfx-out { font-size: 11px; }
  .rfx-case .rfx-bar i { width: 13px; }

  /* ---- phone alignment: kickers/headings stay left, content centers ---- */

  /* Identity — chips wrap to fit the screen (as many per line as fit, rest below) */
  .about-body, .stat-stack { min-width: 0; }   /* let the grid columns shrink — no horizontal overflow */
  .identity-chips { flex-wrap: wrap; gap: 8px; margin-top: 20px; }
  .chip { font-size: 11.5px; padding: 7px 12px; }   /* a touch smaller so more fit per row */

  /* Skills — center each card's content */
  .skill-card { text-align: center; }
  .skill-head { flex-direction: column; align-items: center; gap: 10px; }
  .skill-tags { justify-content: center; }

  /* Education — center the MSc highlight card (timeline stays left) */
  .edu-card { text-align: center; }

  /* Projects — keep the slide + buttons centered */
  .pfx-actions { justify-content: center; }

  /* Footer — stack and center */
  .foot-inner { flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 14px; }
  .foot-inner .r { justify-content: center; }
}

/* mobile drawer */
.drawer {
  position: fixed; inset: 0; z-index: 200; background: rgba(5,6,13,0.92);
  backdrop-filter: blur(16px); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  opacity: 0; pointer-events: none; transition: opacity .35s var(--ease);
}
.drawer.open { opacity: 1; pointer-events: auto; }
.drawer a { font-family: var(--display); font-size: 26px; font-weight: 600; color: var(--text-2); padding: 10px; transition: color .25s; }
.drawer a:hover { color: var(--cyan); }
.drawer .close { position: absolute; top: 26px; right: 26px; width: 46px; height: 46px; border-radius: 12px; border: 1px solid var(--border); background: none; color: var(--text); font-size: 22px; }
