:root {
  --bg: #05070d;
  --bg-2: #0a0f1c;
  --panel: rgba(255, 255, 255, 0.035);
  --panel-2: rgba(255, 255, 255, 0.055);
  --stroke: rgba(255, 255, 255, 0.08);
  --stroke-2: rgba(255, 255, 255, 0.14);
  --ink: #e7ecf7;
  --ink-soft: #b4bccf;
  --muted: #7a869f;
  --blue: #3b82f6;
  --blue-2: #60a5fa;
  --cyan: #22d3ee;
  --aqua: #7cf4e2;
  --violet: #8b5cf6;
  --magenta: #ec4899;
  --lime: #a3e635;
  --grad: linear-gradient(135deg, #60a5fa 0%, #22d3ee 50%, #8b5cf6 100%);
  --grad-warm: linear-gradient(135deg, #fca5a5 0%, #f472b6 50%, #a78bfa 100%);
  --radius: 18px;
  --radius-sm: 12px;
  --max: 1320px;
  --shadow-hi: 0 30px 80px rgba(0, 0, 0, 0.45);
  --shadow-lo: 0 10px 30px rgba(0, 0, 0, 0.35);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
  background: var(--bg);
}

body {
  margin: 0;
  color: var(--ink);
  font-family: "Sora", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  overflow-x: hidden;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Ambient aurora + grid backdrop, fixed to viewport */
body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
}
body::before {
  background:
    radial-gradient(60% 45% at calc(12% + var(--aurora-x, 0px)) calc(8% + var(--aurora-y, 0px)), rgba(59, 130, 246, 0.38), transparent 60%),
    radial-gradient(45% 40% at calc(88% - var(--aurora-x, 0px)) calc(18% + var(--aurora-y, 0px)), rgba(34, 211, 238, 0.26), transparent 60%),
    radial-gradient(55% 50% at calc(50% + var(--aurora-x, 0px)) calc(110% - var(--aurora-y, 0px)), rgba(139, 92, 246, 0.32), transparent 60%),
    linear-gradient(180deg, #05070d, #080d1a 40%, #05070d);
  transition: background-position 400ms var(--ease);
}
body::after {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 100% 80% at 50% 30%, black 40%, transparent 80%);
  opacity: 0.6;
}

/* Hero interactive particle canvas */
.hero-particles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  transition: opacity 900ms var(--ease);
}
.hero-shell { position: relative; }
.hero-shell.is-ready .hero-particles { opacity: 1; }
.hero-shell > .hero-copy,
.hero-shell > .hero-visual { position: relative; z-index: 1; }

/* Tilt + shine */
.tilt {
  transform-style: preserve-3d;
  transform: perspective(1100px) rotateX(var(--tiltY, 0deg)) rotateY(var(--tiltX, 0deg)) translateZ(0);
  transition: transform 300ms var(--ease);
  will-change: transform;
}
.tilt::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(420px circle at var(--shineX, 50%) var(--shineY, 50%), rgba(255, 255, 255, 0.12), transparent 55%);
  opacity: 0;
  transition: opacity 300ms var(--ease);
  pointer-events: none;
  z-index: 2;
  mix-blend-mode: screen;
}
.tilt.is-hot::after { opacity: 1; }

/* Magnetic buttons — damped pull toward cursor */
.magnetic {
  transition: transform 280ms var(--ease), box-shadow 200ms var(--ease);
  will-change: transform;
}

/* Cursor glow follower */
.cursor-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 520px;
  height: 520px;
  margin: -260px 0 0 -260px;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(circle, rgba(96, 165, 250, 0.22), transparent 55%);
  filter: blur(30px);
  opacity: 0;
  transition: opacity 300ms ease;
  transform: translate3d(var(--cx, 50vw), var(--cy, 50vh), 0);
  will-change: transform;
}
body.is-ready .cursor-glow { opacity: 1; }

/* Top scroll progress bar */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 100%;
  transform-origin: 0 50%;
  transform: scaleX(var(--progress, 0));
  background: var(--grad);
  z-index: 50;
  box-shadow: 0 0 18px rgba(96, 165, 250, 0.65);
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }

.site-header,
.hero-shell,
.about-section,
.research-section,
.papers-section,
.lab-section,
.portfolio-section,
.evidence-section,
.stack-section,
.contact-section,
.site-footer {
  margin-inline: auto;
  max-width: var(--max);
  padding-inline: 32px;
  position: relative;
}

/* ================= HEADER ================= */
.site-header {
  align-items: center;
  display: flex;
  justify-content: space-between;
  padding-block: 18px;
  position: sticky;
  top: 12px;
  z-index: 40;
}
.site-header::before {
  content: "";
  position: absolute;
  inset: 8px 20px;
  border-radius: 999px;
  background: rgba(10, 15, 28, 0.65);
  backdrop-filter: blur(22px) saturate(140%);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
  border: 1px solid var(--stroke);
  z-index: -1;
}

.brand {
  align-items: center;
  display: inline-flex;
  gap: 12px;
  padding: 4px 16px 4px 4px;
  border-radius: 14px;
  font-weight: 800;
  letter-spacing: -0.01em;
  transition: transform 220ms var(--ease);
}
.brand:hover { transform: translateY(-1px); }
.brand-mark {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: white;
  overflow: hidden;
  box-shadow: 0 10px 26px rgba(59, 130, 246, 0.35), inset 0 0 0 1px rgba(255, 255, 255, 0.2);
  transition: transform 320ms var(--ease), box-shadow 320ms var(--ease);
}
.brand:hover .brand-mark {
  transform: rotate(-6deg) scale(1.04);
  box-shadow: 0 14px 34px rgba(96, 165, 250, 0.55), inset 0 0 0 1px rgba(255, 255, 255, 0.3);
}
.brand-mark svg { width: 100%; height: 100%; display: block; }
.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.brand-name {
  font-size: 0.98rem;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.brand-sub {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
  letter-spacing: 0.02em;
  margin-top: 2px;
}

.site-nav {
  align-items: center;
  display: flex;
  gap: 4px;
  padding: 6px;
}
.site-nav a {
  border-radius: 999px;
  color: var(--ink-soft);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 9px 14px;
  transition: color 180ms var(--ease), background 180ms var(--ease);
}
.site-nav a:hover { color: var(--ink); background: var(--panel-2); }

.header-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-weight: 700;
  font-size: 0.86rem;
  transition: transform 180ms var(--ease), box-shadow 180ms var(--ease);
}
.header-cta:hover { transform: translateY(-1px); box-shadow: 0 10px 26px rgba(231, 236, 247, 0.2); }
.header-cta .arrow { transition: transform 180ms var(--ease); }
.header-cta:hover .arrow { transform: translate(2px, -2px); }

.nav-toggle {
  display: none;
  background: var(--panel);
  border: 1px solid var(--stroke);
  border-radius: 10px;
  padding: 8px 10px;
  color: var(--ink);
  cursor: pointer;
}

/* ================= HERO ================= */
.hero-shell {
  display: grid;
  gap: 32px;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  padding-block: 44px 80px;
  align-items: center;
}

.hero-copy {
  padding: 8px 8px 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 14px 7px 10px;
  background: var(--panel);
  border: 1px solid var(--stroke);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-soft);
  width: fit-content;
  margin-bottom: 26px;
  backdrop-filter: blur(10px);
}
.status-pill .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 0 0 rgba(163, 230, 53, 0.6);
  animation: pulse 1.8s ease-in-out infinite;
}

.eyebrow,
.kicker {
  color: var(--blue-2);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  margin: 0 0 14px;
  text-transform: uppercase;
}

.hero-copy h1 {
  color: var(--ink);
  font-size: clamp(2.1rem, 4.4vw, 3.8rem);
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin: 0 0 22px;
  font-weight: 700;
  max-width: 18ch;
}
.hero-copy h1 .grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display: inline-block;
}
.hero-copy h1 .rotator {
  display: inline-block;
  min-width: 8ch;
  position: relative;
  vertical-align: baseline;
}
.hero-copy h1 .rotator span {
  display: inline-block;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: fadeSlide 420ms var(--ease) both;
}

.hero-lede {
  color: var(--ink-soft);
  font-size: 1.05rem;
  line-height: 1.65;
  max-width: 560px;
  margin: 0 0 30px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 34px;
}

.button {
  align-items: center;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  font-weight: 600;
  font-size: 0.92rem;
  gap: 10px;
  justify-content: center;
  min-height: 50px;
  padding: 0 22px;
  transition: transform 200ms var(--ease), box-shadow 200ms var(--ease), background 200ms var(--ease), border-color 200ms var(--ease);
  position: relative;
  overflow: hidden;
}
.button.primary {
  background: var(--ink);
  color: var(--bg);
}
.button.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(231, 236, 247, 0.18);
}
.button.secondary {
  background: var(--panel);
  border-color: var(--stroke-2);
  color: var(--ink);
  backdrop-filter: blur(10px);
}
.button.secondary:hover {
  background: var(--panel-2);
  border-color: rgba(96, 165, 250, 0.5);
  transform: translateY(-2px);
}
.button .arrow { transition: transform 220ms var(--ease); }
.button:hover .arrow { transform: translate(3px, -3px); }

.hero-proof {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}
.hero-proof span {
  background: var(--panel);
  border: 1px solid var(--stroke);
  border-radius: 999px;
  color: var(--ink-soft);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 8px 14px;
  backdrop-filter: blur(10px);
}

/* Hero visual: bento of portrait + live signal */
.hero-visual {
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto auto;
}

.bento {
  background: var(--panel);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  backdrop-filter: blur(18px) saturate(130%);
  -webkit-backdrop-filter: blur(18px) saturate(130%);
  position: relative;
  overflow: hidden;
  transition: transform 400ms var(--ease), border-color 400ms var(--ease);
}
.bento::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(96, 165, 250, 0.35), transparent 40%, transparent 60%, rgba(139, 92, 246, 0.35));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 500ms var(--ease);
  pointer-events: none;
}
.bento:hover::before { opacity: 1; }

.bento-portrait {
  grid-column: 1;
  grid-row: 1 / span 2;
  min-height: 340px;
  aspect-ratio: 4 / 5;
}
.bento-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  filter: saturate(0.92) contrast(1.02);
}
.bento-portrait .portrait-info {
  position: absolute;
  inset: auto 0 0 0;
  padding: 60px 20px 18px;
  background: linear-gradient(180deg, transparent, rgba(5, 7, 13, 0.92));
}
.bento-portrait .portrait-info strong {
  display: block;
  color: #fff;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.bento-portrait .portrait-info span {
  color: var(--ink-soft);
  font-size: 0.82rem;
  font-weight: 500;
}

.bento-signal {
  grid-column: 2;
  grid-row: 1;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 220px;
}
.signal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.signal-header .live {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  color: var(--lime);
}
.signal-header .live .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--lime);
  animation: pulse 1.4s ease-in-out infinite;
}

.map-stage {
  flex: 1;
  border-radius: 12px;
  background: radial-gradient(100% 80% at 50% 0%, rgba(59, 130, 246, 0.15), transparent 70%), rgba(0, 0, 0, 0.35);
  border: 1px solid var(--stroke);
  overflow: hidden;
  position: relative;
}
.map-stage svg { display: block; width: 100%; height: 100%; }
.grid-path { fill: none; stroke: rgba(255, 255, 255, 0.06); stroke-width: 1; }
.route {
  fill: none;
  filter: url("#softGlow");
  stroke: url("#routeBlue");
  stroke-dasharray: 10 8;
  stroke-linecap: round;
  stroke-width: 3;
}
.route-one { animation: routeDash 9s linear infinite; }
.route-two { animation: routeDash 12s linear reverse infinite; opacity: 0.65; }
.pin circle {
  fill: var(--blue-2);
  stroke: rgba(10, 15, 28, 0.9);
  stroke-width: 3;
  filter: drop-shadow(0 0 8px rgba(96, 165, 250, 0.6));
}
.pin.active circle { fill: var(--cyan); filter: drop-shadow(0 0 12px rgba(34, 211, 238, 0.9)); }
.pin text {
  fill: var(--ink-soft);
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  font-weight: 600;
}

.bento-stats {
  grid-column: 2;
  grid-row: 2;
  padding: 18px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: center;
  gap: 8px;
}
.bento-stats article { text-align: left; }
.bento-stats strong {
  display: block;
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1;
}
.bento-stats span {
  display: block;
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 4px;
  font-weight: 500;
}

.bento-tags {
  grid-column: 1 / -1;
  grid-row: 3;
  padding: 14px 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.bento-tags .label {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  color: var(--muted);
  text-transform: uppercase;
  margin-right: 6px;
}
.bento-tags .chip {
  padding: 6px 11px;
  background: var(--panel-2);
  border: 1px solid var(--stroke);
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--ink-soft);
}

/* ================= SECTIONS ================= */
.lab-section,
.portfolio-section,
.evidence-section,
.stack-section,
.contact-section {
  padding-block: 80px;
  scroll-margin-top: 100px;
}

.section-heading {
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(0, 1.1fr) minmax(260px, 0.5fr);
  margin-bottom: 40px;
  align-items: end;
}
.section-heading h2 {
  color: var(--ink);
  font-size: clamp(1.9rem, 3.6vw, 3rem);
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin: 0;
  font-weight: 700;
  max-width: 24ch;
}
.chapter {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  margin: 0 0 14px;
  text-transform: uppercase;
  color: var(--blue-2);
}
.chapter .chapter-num {
  color: var(--muted);
  padding: 3px 8px;
  background: var(--panel);
  border: 1px solid var(--stroke);
  border-radius: 6px;
  letter-spacing: 0.1em;
}
.section-heading h2 .grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.section-heading p {
  color: var(--ink-soft);
  font-size: 1rem;
  line-height: 1.65;
  margin: 0;
  max-width: 440px;
}

/* ================= PROTOTYPE LAB ================= */
.prototype-lab {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(340px, 0.9fr);
  background: var(--panel);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  overflow: hidden;
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow-hi);
}

.lab-screen {
  background: linear-gradient(135deg, #0a0f1c, #050810);
  min-height: 520px;
  position: relative;
  overflow: hidden;
  border-right: 1px solid var(--stroke);
}
.screen-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--stroke);
  background: rgba(5, 7, 13, 0.6);
  backdrop-filter: blur(10px);
}
.screen-topbar .left {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}
.screen-topbar .left span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--stroke-2);
}
.screen-topbar .left span:nth-child(1) { background: #ff5f57; }
.screen-topbar .left span:nth-child(2) { background: #febc2e; }
.screen-topbar .left span:nth-child(3) { background: #28c840; }
.screen-topbar #active-category {
  font-size: 0.78rem;
  color: var(--ink-soft);
  font-weight: 600;
  margin-left: 12px;
}
.screen-topbar #active-status {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  color: var(--blue-2);
  padding: 4px 10px;
  border: 1px solid rgba(96, 165, 250, 0.3);
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.08);
}
.lab-screen img {
  width: 100%;
  height: calc(100% - 49px);
  object-fit: cover;
  transition: opacity 300ms var(--ease), transform 500ms var(--ease);
}
.lab-screen.is-swapping img { opacity: 0; transform: scale(1.02); }

.lab-copy {
  display: grid;
  align-content: center;
  gap: 20px;
  padding: 38px;
}
.lab-copy h3 {
  font-size: clamp(1.7rem, 3vw, 2.6rem);
  letter-spacing: -0.03em;
  line-height: 1;
  margin: 0;
  font-weight: 700;
}
.lab-copy #active-description {
  color: var(--ink-soft);
  line-height: 1.65;
  margin: 0;
}

.active-meta {
  display: grid;
  gap: 14px;
  margin: 6px 0 0;
}
.active-meta div {
  border-left: 2px solid var(--blue-2);
  padding-left: 14px;
}
.active-meta dt {
  color: var(--blue-2);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.active-meta dd {
  color: var(--ink-soft);
  line-height: 1.6;
  margin: 4px 0 0;
  font-size: 0.92rem;
}

.active-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.active-stack span {
  background: var(--panel-2);
  border: 1px solid var(--stroke);
  border-radius: 999px;
  color: var(--ink-soft);
  font-size: 0.76rem;
  font-weight: 600;
  padding: 6px 12px;
}

.lab-tabs {
  grid-column: 1 / -1;
  border-top: 1px solid var(--stroke);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 18px;
  background: rgba(5, 7, 13, 0.4);
}
.prototype-tab {
  align-items: center;
  background: transparent;
  border: 1px solid var(--stroke);
  border-radius: 999px;
  color: var(--ink-soft);
  cursor: pointer;
  display: inline-flex;
  font-size: 0.82rem;
  font-weight: 600;
  min-height: 38px;
  padding: 0 14px;
  transition: all 180ms var(--ease);
}
.prototype-tab:hover {
  background: var(--panel-2);
  color: var(--ink);
  border-color: var(--stroke-2);
}
.prototype-tab.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
}

/* ================= PORTFOLIO ================= */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}
.filter-chip {
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--stroke);
  border-radius: 999px;
  color: var(--ink-soft);
  cursor: pointer;
  display: inline-flex;
  font-size: 0.84rem;
  font-weight: 600;
  min-height: 40px;
  padding: 0 16px;
  transition: all 180ms var(--ease);
  backdrop-filter: blur(10px);
}
.filter-chip:hover { color: var(--ink); border-color: var(--stroke-2); }
.filter-chip.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
}

.project-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.project-card {
  background: var(--panel);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 400ms var(--ease), border-color 300ms var(--ease), box-shadow 400ms var(--ease);
  backdrop-filter: blur(14px);
  position: relative;
  display: flex;
  flex-direction: column;
}
.project-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(300px circle at var(--mx, 50%) var(--my, 50%), rgba(96, 165, 250, 0.12), transparent 60%);
  opacity: 0;
  transition: opacity 300ms var(--ease);
  pointer-events: none;
}
.project-card:hover {
  border-color: rgba(96, 165, 250, 0.4);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(96, 165, 250, 0.1) inset;
  transform: translateY(-4px);
}
.project-card:hover::after { opacity: 1; }
.project-card.featured {
  grid-column: span 2;
  flex-direction: row;
}
.project-card.featured > .card-media { flex: 1.1; }
.project-card.featured > .card-body { flex: 0.95; min-width: 320px; }
.project-card.is-hidden { display: none; }

.card-media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}
.project-card.featured .card-media { aspect-ratio: auto; }
.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 600ms var(--ease), filter 400ms var(--ease);
  filter: saturate(0.9) contrast(1.02);
}
.project-card:hover .card-media img {
  transform: scale(1.05);
  filter: saturate(1.05);
}
.card-media::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(5, 7, 13, 0.65));
  z-index: 1;
  pointer-events: none;
}

.card-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px 22px 24px;
}
.card-body .tag {
  align-self: flex-start;
  color: var(--blue-2);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 4px 10px;
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(96, 165, 250, 0.2);
  border-radius: 999px;
}
.card-body h3 {
  font-size: 1.25rem;
  line-height: 1.2;
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.card-body p {
  color: var(--ink-soft);
  font-size: 0.9rem;
  line-height: 1.6;
  margin: 0;
}
.card-cta {
  margin-top: auto;
  padding-top: 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 600;
  opacity: 0.75;
  transition: opacity 200ms var(--ease), gap 200ms var(--ease);
}
.project-card:hover .card-cta { opacity: 1; gap: 12px; }

/* ================= EVIDENCE ================= */
.track-board {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.track-board article {
  background: var(--panel);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-sm);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  backdrop-filter: blur(10px);
  position: relative;
  transition: transform 300ms var(--ease), border-color 300ms var(--ease);
  overflow: hidden;
}
.track-board article::before {
  content: attr(data-idx);
  position: absolute;
  top: 14px;
  right: 16px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.7rem;
  color: var(--muted);
  letter-spacing: 0.1em;
}
.track-board article:hover {
  transform: translateY(-3px);
  border-color: rgba(96, 165, 250, 0.3);
}
.track-board strong {
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
  padding-right: 40px;
}
.track-board span {
  color: var(--ink-soft);
  font-size: 0.86rem;
  line-height: 1.55;
}

/* ================= STACK ================= */
.stack-panel {
  display: grid;
  gap: 32px;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  background: var(--panel);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  padding: 44px;
  backdrop-filter: blur(14px);
  align-items: center;
}
.stack-intro h2 {
  font-size: clamp(1.9rem, 3.6vw, 3rem);
  letter-spacing: -0.035em;
  line-height: 1.02;
  margin: 0;
  font-weight: 700;
}
.stack-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.stack-grid article {
  background: var(--panel-2);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-sm);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 300ms var(--ease), border-color 300ms var(--ease);
}
.stack-grid article:hover {
  transform: translateY(-3px);
  border-color: rgba(96, 165, 250, 0.35);
}
.stack-grid .icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(96, 165, 250, 0.18), rgba(139, 92, 246, 0.18));
  border: 1px solid rgba(96, 165, 250, 0.25);
  color: var(--blue-2);
}
.stack-grid strong {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.stack-grid span {
  color: var(--ink-soft);
  font-size: 0.86rem;
  line-height: 1.55;
}

/* ================= CONTACT ================= */
.contact-panel {
  background: var(--panel);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  padding: 56px;
  backdrop-filter: blur(18px);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.contact-panel::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(96, 165, 250, 0.45), transparent 40%, transparent 60%, rgba(139, 92, 246, 0.45));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
.contact-panel .eyebrow { margin: 0 auto 16px; }
.contact-panel h2 {
  margin: 0 auto 16px;
  max-width: 820px;
  font-size: clamp(1.9rem, 4vw, 3.4rem);
  letter-spacing: -0.035em;
  line-height: 1.05;
  font-weight: 700;
}
.contact-panel h2 .grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.contact-panel p {
  color: var(--ink-soft);
  font-size: 1rem;
  line-height: 1.65;
  max-width: 680px;
  margin: 0 auto 28px;
}
.contact-panel .hero-actions {
  justify-content: center;
  margin: 0;
}

/* ================= FOOTER ================= */
.site-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-block: 32px 48px;
  border-top: 1px solid var(--stroke);
  margin-top: 40px;
  color: var(--muted);
  font-size: 0.85rem;
}
.footer-links { display: flex; gap: 18px; }
.footer-links a {
  transition: color 180ms var(--ease);
}
.footer-links a:hover { color: var(--ink); }

/* ================= REVEAL ANIMATIONS ================= */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 700ms var(--ease), transform 700ms var(--ease);
}
.reveal.is-in {
  opacity: 1;
  transform: none;
}
.reveal.delay-1 { transition-delay: 80ms; }
.reveal.delay-2 { transition-delay: 160ms; }
.reveal.delay-3 { transition-delay: 240ms; }
.reveal.delay-4 { transition-delay: 320ms; }

/* ================= KEYFRAMES ================= */
@keyframes routeDash {
  to { stroke-dashoffset: -220; }
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(163, 230, 53, 0.55); }
  70%  { box-shadow: 0 0 0 12px rgba(163, 230, 53, 0); }
  100% { box-shadow: 0 0 0 0 rgba(163, 230, 53, 0); }
}
@keyframes fadeSlide {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

/* ================= ABOUT ================= */
.about-section {
  padding-block: 80px;
  scroll-margin-top: 100px;
}
.about-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.9fr);
  align-items: stretch;
}
.about-bio {
  background: var(--panel);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  padding: 40px;
  backdrop-filter: blur(14px);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.about-bio::before {
  content: "";
  position: absolute;
  top: -80px;
  right: -80px;
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, rgba(96,165,250,0.15), transparent 70%);
  pointer-events: none;
}
.bio-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  z-index: 1;
}
.bio-body p {
  color: var(--ink-soft);
  line-height: 1.65;
  margin: 0;
  font-size: 0.94rem;
}
.bio-body strong, .bio-body em {
  color: var(--ink);
}
.bio-body em { font-style: italic; }
.bio-quickfacts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 8px;
  padding-top: 18px;
  border-top: 1px solid var(--stroke);
}
.bio-quickfacts div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.bio-quickfacts strong {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.bio-quickfacts span {
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.3;
}

.about-edu {
  background: var(--panel);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  padding: 32px;
  backdrop-filter: blur(14px);
}
.timeline {
  list-style: none;
  padding: 0;
  margin: 0 0 4px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: relative;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: linear-gradient(180deg, var(--blue-2), transparent);
  opacity: 0.5;
}
.timeline li {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2px;
  padding-left: 22px;
  position: relative;
}
.tl-dot {
  position: absolute;
  left: 0;
  top: 6px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--grad);
  box-shadow: 0 0 0 3px rgba(96,165,250,0.18);
}
.tl-year {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  color: var(--blue-2);
  letter-spacing: 0.08em;
  font-weight: 600;
}
.timeline strong {
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.tl-meta {
  color: var(--ink-soft);
  font-size: 0.86rem;
}
.tl-grade {
  color: var(--lime);
  font-size: 0.82rem;
  font-weight: 600;
  font-family: "IBM Plex Mono", monospace;
  margin-top: 2px;
}
.tl-note {
  color: var(--muted);
  font-size: 0.8rem;
  font-style: italic;
}
.about-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.about-badges .chip {
  padding: 6px 11px;
  font-size: 0.76rem;
  font-weight: 600;
  background: var(--panel-2);
  border: 1px solid var(--stroke);
  border-radius: 999px;
  color: var(--ink-soft);
}
.about-badges .chip.expert {
  background: rgba(59, 130, 246, 0.12);
  border-color: rgba(96, 165, 250, 0.35);
  color: var(--blue-2);
}

/* ================= RESEARCH ================= */
.research-section {
  padding-block: 80px;
  scroll-margin-top: 100px;
}
.research-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.research-card {
  background: var(--panel);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  backdrop-filter: blur(14px);
  position: relative;
  transition: transform 300ms var(--ease), border-color 300ms var(--ease), box-shadow 300ms var(--ease);
}
.research-card:hover {
  border-color: rgba(96, 165, 250, 0.4);
  box-shadow: 0 24px 60px rgba(0,0,0,0.4);
}
.research-card.featured {
  grid-column: span 2;
  background: linear-gradient(135deg, rgba(59,130,246,0.08), var(--panel) 60%);
  border-color: rgba(96,165,250,0.3);
}
.research-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.research-year {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.7rem;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.research-badge {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 600;
  background: var(--panel-2);
  border: 1px solid var(--stroke);
  color: var(--ink-soft);
}
.research-badge.funded {
  background: rgba(163, 230, 53, 0.12);
  border-color: rgba(163, 230, 53, 0.35);
  color: var(--lime);
}
.research-badge.sponsored {
  background: rgba(34, 211, 238, 0.12);
  border-color: rgba(34, 211, 238, 0.35);
  color: var(--cyan);
}
.research-badge.internship {
  background: rgba(139, 92, 246, 0.14);
  border-color: rgba(139, 92, 246, 0.35);
  color: #b19cfa;
}
.research-badge.fellowship {
  background: rgba(236, 72, 153, 0.14);
  border-color: rgba(236, 72, 153, 0.35);
  color: #f7a4cb;
}
.research-card h3 {
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.25;
  margin: 0;
  color: var(--ink);
}
.research-card p {
  color: var(--ink-soft);
  font-size: 0.88rem;
  line-height: 1.55;
  margin: 0;
}
.research-card strong { color: var(--ink); }
.research-meta {
  margin-top: auto;
  padding-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--muted);
}
.research-meta .dot-sep { color: var(--stroke-2); }
.research-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: 8px;
  border-top: 1px solid var(--stroke);
}
.research-tags span {
  font-size: 0.7rem;
  padding: 4px 9px;
  background: var(--panel-2);
  border: 1px solid var(--stroke);
  border-radius: 999px;
  color: var(--ink-soft);
  font-weight: 600;
}

/* ================= PAPERS ================= */
.papers-section {
  padding-block: 80px;
  scroll-margin-top: 100px;
}
.scholar-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
  align-items: center;
  gap: 14px;
  padding: 18px 24px;
  margin-bottom: 22px;
  background: linear-gradient(135deg, rgba(59,130,246,0.1), rgba(139,92,246,0.08));
  border: 1px solid rgba(96,165,250,0.25);
  border-radius: var(--radius);
  backdrop-filter: blur(14px);
}
.scholar-strip article {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-right: 16px;
  border-right: 1px solid var(--stroke);
}
.scholar-strip article:nth-child(4) { border-right: none; }
.scholar-strip strong {
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1;
}
.scholar-strip span {
  font-size: 0.76rem;
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.scholar-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: var(--ink);
  color: var(--bg);
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 600;
  transition: transform 200ms var(--ease), box-shadow 200ms var(--ease);
}
.scholar-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(231, 236, 247, 0.18);
}
.scholar-link .arrow { transition: transform 220ms var(--ease); }
.scholar-link:hover .arrow { transform: translate(3px, -3px); }

.paper-cites {
  color: var(--lime);
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
}
.papers-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.paper {
  background: var(--panel);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  padding: 24px 26px 24px 22px;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 18px;
  backdrop-filter: blur(14px);
  align-items: start;
  transition: transform 300ms var(--ease), border-color 300ms var(--ease), box-shadow 300ms var(--ease);
  position: relative;
}
.paper:hover {
  border-color: rgba(96,165,250,0.4);
  box-shadow: 0 18px 50px rgba(0,0,0,0.4);
}
.paper-num {
  font-family: "IBM Plex Mono", monospace;
  font-size: 1.6rem;
  font-weight: 700;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1;
  padding-top: 2px;
}
.paper-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.paper-venue {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  color: var(--blue-2);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin: 0;
  font-weight: 600;
}
.paper-body h3 {
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--ink);
}
.paper-authors {
  color: var(--ink-soft);
  font-size: 0.88rem;
  margin: 0;
}
.paper-authors strong {
  color: var(--ink);
  font-weight: 700;
}
.paper-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}
.paper-chips .chip {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.7rem;
  padding: 5px 10px;
  background: var(--panel-2);
  border: 1px solid var(--stroke);
  border-radius: 999px;
  color: var(--ink-soft);
  font-weight: 600;
  letter-spacing: 0.02em;
}
.paper-chips .chip.pub-published {
  background: rgba(163, 230, 53, 0.12);
  border-color: rgba(163, 230, 53, 0.35);
  color: var(--lime);
}
.paper-chips .chip.pub-review {
  background: rgba(250, 204, 21, 0.12);
  border-color: rgba(250, 204, 21, 0.35);
  color: #facc15;
}
.paper-chips .chip.pub-accepted {
  background: rgba(34, 211, 238, 0.12);
  border-color: rgba(34, 211, 238, 0.35);
  color: var(--cyan);
}
.paper-chips .chip.pub-submitted {
  background: rgba(139, 92, 246, 0.14);
  border-color: rgba(139, 92, 246, 0.35);
  color: #b19cfa;
}

/* ================= RESPONSIVE ================= */
/* Large laptop / small desktop */
@media (max-width: 1280px) {
  .research-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .research-card.featured { grid-column: span 2; }
}

/* Tablet landscape */
@media (max-width: 1180px) {
  .site-header { padding-inline: 24px; }
  .brand-sub { display: none; }
  .hero-shell {
    grid-template-columns: 1fr;
    padding-block: 32px 60px;
  }
  .hero-visual { grid-template-columns: 1fr 1fr; }
  .prototype-lab,
  .project-card.featured,
  .stack-panel,
  .section-heading,
  .about-grid,
  .about-bio {
    grid-template-columns: 1fr;
  }
  .about-bio { grid-template-rows: 220px 1fr; }
  .bio-portrait img { object-position: center 20%; }
  .bio-quickfacts { grid-template-columns: repeat(4, 1fr); }
  .project-card.featured { flex-direction: column; }
  .project-grid,
  .track-board {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .lab-screen { border-right: none; border-bottom: 1px solid var(--stroke); }
  .lab-screen { min-height: 420px; }
  .section-heading { margin-bottom: 28px; }
  .section-heading h2 { font-size: clamp(2rem, 5vw, 3rem); }
}

/* Scholar strip responsive */
@media (max-width: 900px) {
  .scholar-strip {
    grid-template-columns: repeat(2, 1fr);
    padding: 18px;
  }
  .scholar-strip article { border-right: none; padding-right: 0; }
  .scholar-link { grid-column: 1 / -1; justify-content: center; }
  .scholar-strip strong { font-size: 1.5rem; }
}

/* Tablet portrait */
@media (max-width: 900px) {
  .site-header,
  .hero-shell,
  .lab-section,
  .portfolio-section,
  .evidence-section,
  .stack-section,
  .contact-section,
  .about-section,
  .research-section,
  .papers-section,
  .site-footer {
    padding-inline: 22px;
  }
  .header-cta { padding: 8px 12px; font-size: 0.8rem; }
  .site-nav a { padding: 8px 11px; font-size: 0.82rem; }
  .research-grid { grid-template-columns: 1fr; }
  .research-card.featured { grid-column: auto; }
  .bio-quickfacts { grid-template-columns: repeat(2, 1fr); }
  .paper { padding: 20px 20px 20px 18px; grid-template-columns: 44px minmax(0, 1fr); gap: 14px; }
  .paper-num { font-size: 1.35rem; }
  .paper-body h3 { font-size: 1rem; }
  .lab-section, .portfolio-section, .evidence-section,
  .stack-section, .contact-section, .about-section,
  .research-section, .papers-section {
    padding-block: 60px;
  }
}

/* Mobile */
@media (max-width: 780px) {
  .site-header,
  .hero-shell,
  .lab-section,
  .portfolio-section,
  .evidence-section,
  .stack-section,
  .contact-section,
  .about-section,
  .research-section,
  .papers-section,
  .site-footer {
    padding-inline: 18px;
  }
  html { scroll-padding-top: 78px; }
  .site-header { top: 8px; padding-block: 12px; }
  .site-header::before { inset: 6px 12px; }
  .site-nav { display: none; }
  .site-nav.is-open {
    display: flex;
    position: absolute;
    top: 62px;
    right: 16px;
    left: 16px;
    background: rgba(10, 15, 28, 0.94);
    border: 1px solid var(--stroke);
    border-radius: 18px;
    padding: 10px;
    flex-direction: column;
    gap: 2px;
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow-hi);
  }
  .site-nav.is-open a { padding: 12px 14px; font-size: 0.95rem; }
  .nav-toggle { display: inline-flex; }
  .header-cta { display: none; }
  .brand-name { font-size: 0.9rem; }
  .brand-mark { width: 36px; height: 36px; }

  .hero-shell { padding-block: 28px 48px; gap: 24px; }
  .hero-visual { grid-template-columns: 1fr; gap: 12px; }
  .bento-portrait { grid-column: 1; grid-row: 1; aspect-ratio: 5 / 4; min-height: 260px; }
  .bento-signal { grid-column: 1; grid-row: 2; min-height: 220px; }
  .bento-stats { grid-column: 1; grid-row: 3; }
  .bento-tags { grid-row: 4; }
  .hero-copy h1 { font-size: clamp(2rem, 9vw, 3rem); }
  .hero-copy { padding: 0; }
  .hero-actions .button { flex: 1; min-width: 140px; }

  .section-heading { margin-bottom: 22px; gap: 12px; }
  .section-heading h2 { font-size: clamp(1.6rem, 7vw, 2.4rem); }

  .about-bio { grid-template-rows: 200px 1fr; }
  .bio-body { padding: 22px; gap: 12px; }
  .bio-body h3 { font-size: 1.2rem; }
  .bio-quickfacts { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .about-edu { padding: 24px; }

  .research-card { padding: 20px; }
  .research-card h3 { font-size: 1rem; }
  .research-head { gap: 6px; }

  .paper { padding: 18px; grid-template-columns: 38px 1fr; gap: 12px; }
  .paper-num { font-size: 1.2rem; }

  .lab-screen { min-height: 320px; }
  .lab-copy { padding: 22px; gap: 14px; }
  .lab-copy h3 { font-size: clamp(1.5rem, 6vw, 2rem); }
  .lab-tabs { padding: 12px; gap: 6px; }
  .prototype-tab { font-size: 0.76rem; padding: 0 11px; min-height: 34px; }
  .screen-topbar #active-category { display: none; }

  .project-grid,
  .track-board,
  .stack-grid {
    grid-template-columns: 1fr;
  }
  .stack-panel, .contact-panel { padding: 28px 24px; }
  .contact-panel h2 { font-size: clamp(1.6rem, 7vw, 2.4rem); }
  .site-footer {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }
  .hero-particles { opacity: 0 !important; }
}

/* Very small phones */
@media (max-width: 420px) {
  .hero-actions { flex-direction: column; }
  .hero-actions .button { width: 100%; }
  .filter-bar { gap: 6px; }
  .filter-chip { font-size: 0.78rem; padding: 0 12px; min-height: 36px; }
  .bio-quickfacts { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
}

/* Print / PDF capture — force all content visible */
@media print {
  .reveal { opacity: 1 !important; transform: none !important; }
  .hero-particles, .cursor-glow, .scroll-progress { display: none !important; }
  body::before, body::after { display: none !important; }
  body { background: #05070d !important; }
}
