/* ============================================
   Design tokens
   ============================================ */
:root {
  --bg: #04060c;
  --bg-2: #080d1a;
  --ink: #f4f7ff;
  --ink-dim: #b6bfd8;
  --ink-mute: #7d879f;
  --line: rgba(255,255,255,0.10);
  --line-strong: rgba(255,255,255,0.22);
  --card: rgba(12, 18, 32, 0.55);
  --card-hi: rgba(20, 28, 46, 0.72);

  --a1: #78dbff;   /* cyan */
  --a2: #c98bff;  /* violet */
  --a3: #ffb37a;  /* amber */
  --a4: #83f5c2;  /* mint */

  --grad-title: linear-gradient(100deg, #78dbff 0%, #c98bff 45%, #ffb37a 100%);

  --serif: 'Instrument Serif', 'Times New Roman', serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;

  --radius-sm: 8px;
  --radius: 16px;
  --radius-lg: 24px;

  --shell-x: clamp(20px, 5vw, 80px);
  --section-y: clamp(80px, 12vw, 160px);

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ============================================
   Body & layered backgrounds
   ============================================ */
body {
  background: var(--bg);
  color: var(--ink);
  cursor: none;
  position: relative;
}
@media (hover: none) { body { cursor: auto; } }

#bg-mesh, #bg-flow, #bg-particles {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
}
#bg-mesh { z-index: -5; }
#bg-flow { z-index: -4; opacity: 0.55; mix-blend-mode: screen; }
#bg-particles { z-index: -3; }

.grid-overlay {
  position: fixed; inset: 0;
  z-index: -2; pointer-events: none;
  background-image:
    linear-gradient(rgba(120,219,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120,219,255,.05) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at center, black 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 20%, transparent 75%);
}

.grain {
  position: fixed; inset: -50%;
  width: 200%; height: 200%;
  z-index: -1; pointer-events: none;
  opacity: 0.05; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240' viewBox='0 0 240 240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.6 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  animation: grain 8s steps(6) infinite;
}
@keyframes grain {
  0%,100% { transform: translate(0,0); }
  20% { transform: translate(-3%,-2%); }
  40% { transform: translate(2%,-3%); }
  60% { transform: translate(-2%,3%); }
  80% { transform: translate(3%,2%); }
}
.vignette {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse at 50% 40%, transparent 45%, rgba(0,0,0,0.6) 100%);
}

/* ============================================
   GLASS / HOVER-GLOW CARD SYSTEM
   ============================================ */
.glass {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  isolation: isolate;
  overflow: hidden;
  transition: border-color .4s var(--ease), background .4s var(--ease), transform .5s var(--ease);
}
.glass.pad { padding: clamp(28px, 4vw, 44px); }

/* Cursor-tracked highlight (radial glow that follows mouse inside card) */
.hover-glow {
  --mx: 50%;
  --my: 50%;
  --glow: 0;
}
.hover-glow::before {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    500px circle at var(--mx) var(--my),
    rgba(120, 219, 255, 0.22),
    rgba(201, 139, 255, 0.10) 30%,
    transparent 55%
  );
  opacity: var(--glow);
  transition: opacity .35s var(--ease);
  pointer-events: none;
  z-index: 0;
}
/* Gradient border that lights up on hover */
.hover-glow::after {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: radial-gradient(
    340px circle at var(--mx) var(--my),
    rgba(120, 219, 255, 0.8),
    rgba(201, 139, 255, 0.5) 40%,
    transparent 70%
  );
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  opacity: var(--glow);
  transition: opacity .35s var(--ease);
  pointer-events: none;
  z-index: 1;
}
.hover-glow:hover {
  --glow: 1;
  border-color: transparent;
  background: var(--card-hi);
  transform: translateY(-3px);
}
.hover-glow > * { position: relative; z-index: 2; }

/* ============================================
   Custom cursor
   ============================================ */
.cursor-dot,
.cursor-ring,
.cursor-label {
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 999;
  will-change: transform;
}
.cursor-dot {
  width: 6px; height: 6px;
  background: #fff;
  border-radius: 50%;
  transform: translate3d(-50%, -50%, 0);
  box-shadow: 0 0 12px rgba(120,219,255,.8), 0 0 30px rgba(201,139,255,.6);
  transition: opacity .2s ease, width .25s var(--ease), height .25s var(--ease), background .25s var(--ease);
}
.cursor-ring {
  width: 36px; height: 36px;
  border: 1.5px solid rgba(255,255,255,0.6);
  border-radius: 50%;
  transform: translate3d(-50%, -50%, 0);
  transition: width .3s var(--ease), height .3s var(--ease),
              border-color .3s var(--ease), background .3s var(--ease),
              opacity .2s ease;
  mix-blend-mode: difference;
}
.cursor-label {
  transform: translate3d(-50%, calc(-50% + 34px), 0);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.95);
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.10);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.18);
  opacity: 0;
  transition: opacity .2s ease, transform .3s var(--ease);
  white-space: nowrap;
}
.cursor-label.show { opacity: 1; }
body.hovering-link .cursor-ring {
  width: 64px; height: 64px;
  background: rgba(120, 219, 255, 0.08);
  border-color: rgba(120,219,255,.9);
}
body.hovering-link .cursor-dot { opacity: 0; }
body.pressing .cursor-ring { width: 28px; height: 28px; }

/* ============================================
   Navigation
   ============================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  padding: 20px var(--shell-x);
  display: flex; align-items: center; justify-content: space-between;
  background: linear-gradient(180deg, rgba(4,6,12,0.85) 0%, rgba(4,6,12,0) 100%);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: #fff;
  position: relative;
}
.brand-name {
  background: linear-gradient(120deg, #78dbff 0%, #ffffff 45%, #c98bff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  transition: filter .3s var(--ease);
}
.brand:hover .brand-name { filter: brightness(1.15) drop-shadow(0 0 12px rgba(120,219,255,.35)); }
.brand-dot { color: var(--a1); }
.nav-links {
  display: flex; align-items: center; gap: 6px;
  font-size: 13.5px;
  color: var(--ink-dim);
}
.nav-links a {
  padding: 8px 14px; border-radius: 999px;
  transition: color .25s var(--ease), background .25s var(--ease);
}
.nav-links a:hover { color: #fff; background: rgba(255,255,255,0.08); }
.nav-cta {
  color: #04060c !important;
  background: linear-gradient(120deg, #78dbff, #c98bff);
  font-weight: 500;
}
.nav-cta:hover { filter: brightness(1.1); background: linear-gradient(120deg, #78dbff, #c98bff) !important; }
@media (max-width: 720px) {
  .nav-links { gap: 2px; font-size: 12px; }
  .nav-links a { padding: 8px 10px; }
  .nav-links a:nth-child(2), .nav-links a:nth-child(3) { display: none; }
  .brand { font-size: 11px; letter-spacing: .18em; }
  .brand svg { width: 22px; height: 22px; }
}

/* ============================================
   Hero
   ============================================ */
.hero {
  min-height: 100vh;
  padding: 140px var(--shell-x) 100px;
  display: flex; flex-direction: column; justify-content: center;
  position: relative;
}
.hero-inner {
  padding: clamp(32px, 5vw, 64px);
  max-width: 1180px;
}

/* Hero lead — copy + portrait side by side */
.hero-lead {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
@media (max-width: 860px) {
  .hero-lead { grid-template-columns: 1fr; gap: 32px; }
}
.hero-copy { min-width: 0; }

.hero-name {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: transparent;
  background: var(--grad-title);
  -webkit-background-clip: text;
  background-clip: text;
  margin: 20px 0 18px;
  font-weight: 500;
}

.hero-portrait {
  position: relative;
  justify-self: center;
}
.hero-portrait-inner {
  --size: clamp(180px, 22vw, 280px);
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  position: relative;
  box-shadow: 0 20px 60px rgba(120, 219, 255, 0.25);
  transition: transform .5s var(--ease), box-shadow .5s var(--ease);
}
/* Rotating gradient ring behind the photo */
.hero-portrait-inner::before {
  content: "";
  position: absolute; inset: -3px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, #78dbff, #c98bff, #ffb37a, #83f5c2, #78dbff);
  animation: portraitSpin 14s linear infinite;
  z-index: 0;
}
/* Inner dark disc that masks the ring center */
.hero-portrait-inner::after {
  content: "";
  position: absolute; inset: 0;
  border-radius: 50%;
  background: #04060c;
  z-index: 1;
}
.hero-portrait-inner img {
  position: relative;
  z-index: 2;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 20%;
  border-radius: 50%;
  display: block;
}
@keyframes portraitSpin { to { transform: rotate(360deg); } }

.hero-portrait:hover .hero-portrait-inner {
  transform: scale(1.03);
  box-shadow: 0 24px 80px rgba(201, 139, 255, 0.4), 0 0 0 1px rgba(255,255,255,0.12);
}

.hero-portrait figcaption {
  position: absolute;
  bottom: -6px; right: -8px;
  padding: 6px 12px;
  border-radius: 999px;
  font-family: var(--mono); font-size: 10px;
  letter-spacing: .15em; text-transform: uppercase;
  color: #04060c;
  background: #fff;
  display: inline-flex; align-items: center; gap: 6px;
  transform: rotate(-4deg);
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
.hero-portrait figcaption span {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--a4);
  box-shadow: 0 0 8px var(--a4);
}
.hero-meta {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 12px;
  color: var(--ink-dim);
  letter-spacing: .1em; text-transform: uppercase;
  margin-bottom: 36px;
  width: fit-content;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,0.03);
}
.pulse {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--a4);
  box-shadow: 0 0 0 0 rgba(131,245,194,0.6);
  animation: pulse 2.2s ease-out infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(131,245,194,0.6); }
  70% { box-shadow: 0 0 0 12px rgba(131,245,194,0); }
  100% { box-shadow: 0 0 0 0 rgba(131,245,194,0); }
}
.hero-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(40px, 8.2vw, 118px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  max-width: 15ch;
  color: #fff;
}
.hero-title .line { display: block; }
.hero-title em { font-style: italic; color: #d5dcf3; font-weight: 400; }
.hero-title .grad {
  background: var(--grad-title);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  font-style: italic;
}
.hero-sub {
  margin-top: 32px;
  max-width: 58ch;
  font-size: clamp(15px, 1.5vw, 18px);
  color: var(--ink-dim);
  line-height: 1.65;
}
.hero-sub strong { color: #fff; font-weight: 500; }
.hl {
  color: #fff;
  background: linear-gradient(180deg, transparent 70%, rgba(120,219,255,.35) 70%);
  padding: 0 3px;
}
.hero-cta {
  margin-top: 36px;
  display: flex; gap: 12px; flex-wrap: wrap;
}
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  transition: transform .35s var(--ease), background .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease), box-shadow .3s var(--ease);
  border: 1px solid transparent;
}
.btn-primary {
  background: #fff; color: #04060c;
  box-shadow: 0 8px 30px rgba(120,219,255,.2);
}
.btn-primary:hover { transform: translateY(-2px); background: linear-gradient(120deg,#78dbff,#c98bff); color:#04060c; box-shadow: 0 12px 40px rgba(120,219,255,.35); }
.btn-ghost {
  border-color: var(--line-strong); color: var(--ink);
  background: rgba(255,255,255,0.04);
}
.btn-ghost:hover { background: rgba(255,255,255,0.09); border-color: rgba(255,255,255,0.4); transform: translateY(-2px); }
.btn.big { padding: 20px 30px; font-size: 16px; }
.hero-stack {
  margin-top: 44px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 12px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-dim);
  letter-spacing: .05em;
}
.hero-stack span { transition: color .25s ease; }

.scroll-hint {
  position: absolute;
  bottom: 32px; left: var(--shell-x);
  display: flex; align-items: center; gap: 12px;
  font-family: var(--mono); font-size: 10px;
  letter-spacing: .2em; text-transform: uppercase;
  color: var(--ink-mute);
}
.line-drop {
  width: 1px; height: 40px;
  background: linear-gradient(180deg, var(--a1), transparent);
  animation: drop 2.4s ease-in-out infinite;
  transform-origin: top;
}
@keyframes drop {
  0%,100% { transform: scaleY(0.4); opacity: .3; }
  50% { transform: scaleY(1); opacity: 1; }
}

/* ============================================
   Sections
   ============================================ */
.section {
  padding: var(--section-y) var(--shell-x);
  position: relative;
}
.section-head {
  display: flex; align-items: baseline; gap: 20px;
  margin-bottom: 56px;
  border-top: 1px solid var(--line);
  padding-top: 32px;
}
.section-num {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-mute);
  letter-spacing: .15em;
}
.section-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(30px, 4.5vw, 56px);
  letter-spacing: -0.01em;
  line-height: 1.05;
  color: #fff;
}

/* About */
.about-grid { display: grid; gap: 24px; }
.lede {
  font-family: var(--serif);
  font-size: clamp(22px, 2.4vw, 34px);
  line-height: 1.35;
  max-width: 30ch;
  color: #fff;
}
.lede em { color: var(--a1); font-style: italic; }
.about-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.micro-title {
  font-family: var(--mono); font-size: 11px;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--a1); margin-bottom: 14px;
}
.about-cols p { color: var(--ink-dim); font-size: 15px; line-height: 1.65; }
@media (max-width: 720px) { .about-cols { grid-template-columns: 1fr; gap: 16px; } }

/* Projects */
.projects {
  display: grid; gap: 24px;
  grid-template-columns: repeat(2, 1fr);
}
@media (max-width: 900px) { .projects { grid-template-columns: 1fr; } }
.project {
  display: flex; flex-direction: column;
  padding: 0;
}
.project-cover {
  aspect-ratio: 16/9;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 30% 40%, rgba(120,219,255,.35), transparent 60%),
    radial-gradient(ellipse at 70% 70%, rgba(201,139,255,.35), transparent 60%),
    linear-gradient(180deg, #0a0e1a, #04060c);
  color: rgba(255,255,255,0.9);
  border-bottom: 1px solid var(--line);
}
.project-cover-img { background: #04060c; }
.project-cover-img img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
  transition: transform 1.2s var(--ease), filter .6s var(--ease);
  filter: saturate(1.05) contrast(1.02);
}
.project-cover-img::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(4,6,12,0.55) 100%);
  pointer-events: none;
}
.project:hover .project-cover-img img {
  transform: scale(1.06);
  filter: saturate(1.15) contrast(1.05) brightness(1.05);
}
.project-body { padding: 32px; }
.project-tag {
  font-family: var(--mono); font-size: 11px;
  color: var(--a1); letter-spacing: .12em; text-transform: uppercase;
  margin-bottom: 14px;
}
.project h3 {
  font-family: var(--serif); font-size: clamp(24px, 2.4vw, 32px);
  line-height: 1.15; margin-bottom: 14px;
  color: #fff;
}
.project p { color: var(--ink-dim); font-size: 14.5px; line-height: 1.65; }
.project-meta {
  margin-top: 22px; display: grid; gap: 10px;
  border-top: 1px solid var(--line); padding-top: 20px;
}
.project-meta > div { display: grid; grid-template-columns: 90px 1fr; gap: 12px; font-size: 13px; }
.project-meta dt { font-family: var(--mono); color: var(--ink-mute); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; padding-top: 2px;}
.project-meta dd { color: var(--ink-dim); }

/* Project cover visuals */
.viz-voice {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  gap: 8px;
}
.viz-voice span {
  width: 6px; border-radius: 3px;
  background: linear-gradient(180deg, var(--a1), var(--a2));
  animation: bars 1.6s ease-in-out infinite;
}
.viz-voice span:nth-child(1) { height: 30px; animation-delay: -1.4s; }
.viz-voice span:nth-child(2) { height: 60px; animation-delay: -1.2s; }
.viz-voice span:nth-child(3) { height: 90px; animation-delay: -1.0s; }
.viz-voice span:nth-child(4) { height: 120px; animation-delay: -0.8s; }
.viz-voice span:nth-child(5) { height: 140px; animation-delay: -0.6s; }
.viz-voice span:nth-child(6) { height: 120px; animation-delay: -0.4s; }
.viz-voice span:nth-child(7) { height: 90px; animation-delay: -0.2s; }
.viz-voice span:nth-child(8) { height: 60px; animation-delay: 0s; }
.viz-voice span:nth-child(9) { height: 30px; animation-delay: 0.2s; }
@keyframes bars { 0%,100% { transform: scaleY(0.35); } 50% { transform: scaleY(1); } }

.viz-proof { position: absolute; inset: 0; }
.viz-proof .proof-lines { position: absolute; inset: 0; width: 100%; height: 100%; color: rgba(255,255,255,.6); }
.proof-node {
  position: absolute; width: 14px; height: 14px; border-radius: 50%;
  background: var(--a4); box-shadow: 0 0 24px var(--a4);
  animation: nodePulse 3s ease-in-out infinite;
}
.proof-node.n1 { top: 22%; left: 12%; }
.proof-node.n2 { top: 74%; left: 22%; background: var(--a1); box-shadow: 0 0 24px var(--a1); animation-delay: .4s;}
.proof-node.n3 { top: 30%; right: 14%; background: var(--a2); box-shadow: 0 0 24px var(--a2); animation-delay: .8s;}
.proof-node.n4 { top: 76%; right: 18%; background: var(--a3); box-shadow: 0 0 24px var(--a3); animation-delay: 1.2s;}
@keyframes nodePulse { 0%,100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.4); opacity: .7; } }

.viz-wind { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.blade {
  position: absolute; width: 4px; height: 90px;
  background: linear-gradient(180deg, var(--a4), rgba(120,219,255,.3));
  border-radius: 4px;
  transform-origin: 50% 100%;
  bottom: 50%;
  animation: spin 4s linear infinite;
}
.blade:nth-child(2) { animation-delay: -1.33s; }
.blade:nth-child(3) { animation-delay: -2.66s; }
@keyframes spin { to { transform: rotate(360deg); } }

.viz-agents { position: absolute; inset: 0; }
.orb {
  position: absolute; width: 60px; height: 60px; border-radius: 50%;
  filter: blur(2px);
  mix-blend-mode: screen;
  animation: float 6s ease-in-out infinite;
}
.orb.o1 { background: var(--a1); top: 20%; left: 15%; }
.orb.o2 { background: var(--a2); top: 55%; left: 30%; animation-delay: -1.5s; }
.orb.o3 { background: var(--a3); top: 25%; right: 20%; animation-delay: -3s; }
.orb.o4 { background: var(--a4); top: 65%; right: 12%; animation-delay: -4.5s; }
@keyframes float { 0%,100% { transform: translate(0,0) scale(1); opacity: .7; } 50% { transform: translate(20px, -25px) scale(1.15); opacity: 1; } }

/* Skills */
.skills-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 900px) { .skills-grid { grid-template-columns: 1fr; } }
.skill-card { padding: 32px; }
.skill-card h3 {
  font-family: var(--serif); font-size: 24px; margin-bottom: 20px; color: #fff;
}
.skill-card ul { display: flex; flex-direction: column; gap: 10px; }
.skill-card li {
  font-size: 14px; color: var(--ink);
  padding-left: 18px; position: relative;
}
.skill-card li::before {
  content: ""; position: absolute; left: 0; top: 8px;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--a1);
  box-shadow: 0 0 8px var(--a1);
}
.skill-card:nth-child(2) li::before { background: var(--a2); box-shadow: 0 0 8px var(--a2); }
.skill-card:nth-child(3) li::before { background: var(--a4); box-shadow: 0 0 8px var(--a4); }

/* Research */
.research-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
}
@media (max-width: 900px) { .research-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .research-grid { grid-template-columns: 1fr; } }
.rc { padding: 32px; }
.rc-num {
  font-family: var(--mono); font-size: 11px; color: var(--a1);
  letter-spacing: .15em; margin-bottom: 20px; display: block;
}
.rc h3 { font-family: var(--serif); font-size: 22px; margin-bottom: 10px; color: #fff; }
.rc p { color: var(--ink-dim); font-size: 14px; line-height: 1.6; }

/* Timeline */
.timeline {
  display: flex; flex-wrap: wrap; gap: 8px;
  align-items: center;
  font-family: var(--mono);
  font-size: 13px;
}
.timeline li { display: inline-flex; align-items: center; position: relative; }
.timeline li span {
  padding: 10px 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  backdrop-filter: blur(10px);
  transition: all .3s var(--ease);
}
.timeline li:hover span {
  background: linear-gradient(120deg, rgba(120,219,255,.22), rgba(201,139,255,.22));
  border-color: rgba(120,219,255,.6);
  transform: translateY(-2px);
  color: #fff;
}
.timeline li:not(:last-child)::after {
  content: "→"; color: var(--ink-mute); margin: 0 4px;
}

/* Vision */
.vision-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 900px) { .vision-grid { grid-template-columns: 1fr; } }
.vc { padding: 32px; }
.vc h3 { font-family: var(--serif); font-size: 22px; margin-bottom: 12px; color: #fff; }
.vc p { color: var(--ink-dim); font-size: 14.5px; line-height: 1.6; }

/* Contribute */
.contribute-row {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
}
@media (max-width: 900px) { .contribute-row { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .contribute-row { grid-template-columns: 1fr; } }
.cc {
  padding: 28px;
  display: flex; gap: 20px; align-items: flex-start;
}
.cc span {
  font-family: var(--mono); font-size: 11px; color: var(--a2);
  letter-spacing: .15em; padding-top: 4px;
}
.cc p { font-size: 15px; color: var(--ink); line-height: 1.5; }

/* Contact */
.contact {
  min-height: 80vh;
  display: flex; align-items: center;
}
.contact-inner {
  text-align: center; margin: 0 auto; max-width: 900px;
  padding: clamp(40px, 6vw, 72px);
}
.contact-eyebrow {
  font-family: var(--mono); font-size: 12px;
  color: var(--a1); letter-spacing: .2em; text-transform: uppercase;
  margin-bottom: 20px;
}
.contact-title {
  font-family: var(--serif);
  font-size: clamp(38px, 6vw, 84px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
  color: #fff;
}
.contact-title em {
  background: var(--grad-title);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.contact-sub {
  color: var(--ink-dim); font-size: 17px; max-width: 55ch;
  margin: 0 auto 36px; line-height: 1.65;
}
.contact-actions { display: flex; justify-content: center; margin-bottom: 40px; }

/* Social icons — LinkedIn */
.contact-socials {
  display: flex; justify-content: center; gap: 16px;
}
.social-icon {
  --size: 56px;
  width: var(--size); height: var(--size);
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--line-strong);
  color: #fff;
  position: relative;
  transition: transform .35s var(--ease), background .3s var(--ease),
              border-color .3s var(--ease), box-shadow .3s var(--ease), color .3s var(--ease);
}
.social-icon:hover {
  border-color: transparent;
  transform: translateY(-4px) scale(1.06);
  color: #fff;
}
.social-linkedin:hover {
  background: linear-gradient(135deg, #0a66c2, #78dbff);
  box-shadow: 0 12px 40px rgba(10, 102, 194, .5);
}
.social-github:hover {
  background: linear-gradient(135deg, #6e40c9, #c98bff);
  box-shadow: 0 12px 40px rgba(110, 64, 201, .5);
}
.social-icon .social-label {
  position: absolute; bottom: calc(100% + 10px); left: 50%;
  transform: translateX(-50%) translateY(4px);
  font-family: var(--mono); font-size: 10px;
  letter-spacing: .15em; text-transform: uppercase;
  color: var(--ink-dim);
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--line);
  padding: 4px 10px; border-radius: 999px;
  opacity: 0; pointer-events: none;
  transition: opacity .25s var(--ease), transform .35s var(--ease);
  white-space: nowrap;
}
.social-icon:hover .social-label { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Footer */
.foot {
  padding: 32px var(--shell-x);
  display: flex; justify-content: space-between;
  border-top: 1px solid var(--line);
  font-family: var(--mono); font-size: 11px; color: var(--ink-mute);
  letter-spacing: .1em; text-transform: uppercase;
  gap: 16px; flex-wrap: wrap;
}

/* Reveal animation */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.in { opacity: 1; transform: translateY(0); }

/* ============================================
   MOBILE POLISH
   ============================================ */
@media (max-width: 860px) {
  :root {
    --shell-x: 18px;
    --section-y: 80px;
  }

  /* Restore native cursor on touch */
  body { cursor: auto; }
  .cursor-dot, .cursor-ring, .cursor-label { display: none; }

  /* Nav — compact; drop text links, keep only brand + CTA */
  .nav { padding: 14px 16px; gap: 10px; }
  .brand { font-size: 15px; gap: 8px; }
  .brand svg { width: 20px; height: 20px; }
  .nav-links { gap: 4px; font-size: 11.5px; }
  .nav-links a { padding: 7px 10px; }
  .nav-links a:nth-child(1),
  .nav-links a:nth-child(2),
  .nav-links a:nth-child(3),
  .nav-links a:nth-child(4) { display: none; }
  .nav-cta { padding: 8px 14px; }

  /* Hero */
  .hero { padding: 100px var(--shell-x) 60px; min-height: auto; }
  .hero-inner { padding: 26px 22px; border-radius: 20px; }
  .hero-lead { gap: 24px; }
  .hero-copy { text-align: left; }

  .hero-meta { font-size: 10.5px; padding: 6px 12px; margin-bottom: 24px; }
  .hero-name { font-size: 11px; letter-spacing: .18em; margin: 14px 0 12px; }
  .hero-title { font-size: clamp(38px, 12vw, 62px); line-height: 1.02; }
  .hero-sub { font-size: 15px; margin-top: 24px; }

  .hero-portrait { order: -1; justify-self: center; }
  .hero-portrait-inner { --size: 150px; }
  .hero-portrait figcaption { font-size: 9px; padding: 5px 10px; bottom: -4px; right: -4px; }

  .hero-cta { margin-top: 26px; gap: 10px; flex-direction: column; }
  .btn { padding: 12px 18px; font-size: 13.5px; width: 100%; justify-content: center; }
  .btn.big { padding: 16px 22px; font-size: 15px; width: auto; }

  .hero-stack { margin-top: 32px; padding-top: 24px; gap: 8px; font-size: 11px; }
  .scroll-hint { display: none; }

  /* Sections */
  .section-head { margin-bottom: 36px; padding-top: 24px; gap: 12px; }
  .section-title { font-size: clamp(28px, 8vw, 40px); }
  .glass.pad { padding: 24px 20px; }

  /* About */
  .lede { font-size: 22px; line-height: 1.35; max-width: none; }
  .about-cols { gap: 14px; }

  /* Projects */
  .projects { gap: 18px; }
  .project-body { padding: 22px; }
  .project h3 { font-size: 22px; }
  .project p { font-size: 14px; }
  .project-meta > div { grid-template-columns: 70px 1fr; gap: 10px; font-size: 12px; }

  /* Skills */
  .skills-grid { gap: 14px; }
  .skill-card { padding: 24px; }
  .skill-card h3 { font-size: 20px; margin-bottom: 16px; }

  /* Research */
  .research-grid { gap: 12px; }
  .rc { padding: 24px; }
  .rc h3 { font-size: 20px; }

  /* Timeline */
  .timeline { gap: 6px; font-size: 11.5px; }
  .timeline li span { padding: 8px 12px; }
  .timeline li:not(:last-child)::after { margin: 0 2px; font-size: 11px; }

  /* Vision */
  .vision-grid { gap: 14px; }
  .vc { padding: 24px; }
  .vc h3 { font-size: 20px; }

  /* Contribute */
  .contribute-row { gap: 12px; }
  .cc { padding: 22px; gap: 14px; }
  .cc p { font-size: 14px; }

  /* Contact */
  .contact { min-height: auto; padding-top: 60px; padding-bottom: 60px; }
  .contact-inner { padding: 32px 22px; }
  .contact-title { font-size: clamp(30px, 9vw, 44px); line-height: 1.1; }
  .contact-sub { font-size: 15px; margin-bottom: 28px; }
  .contact-actions { margin-bottom: 28px; }
  .contact-socials { gap: 14px; }
  .social-icon { --size: 50px; }

  /* Footer */
  .foot { padding: 24px var(--shell-x); flex-direction: column; text-align: center; font-size: 10px; }

  /* Disable cursor-tracked highlight on touch */
  .hover-glow::before, .hover-glow::after { opacity: 0 !important; }
  .hover-glow:hover { transform: none; }

  /* Lighter blur on mobile for perf */
  .glass { backdrop-filter: blur(6px) saturate(120%); -webkit-backdrop-filter: blur(6px) saturate(120%); }
}

@media (max-width: 480px) {
  .nav-cta { font-size: 11px; padding: 7px 12px; }
  .brand { font-size: 9.5px; letter-spacing: .14em; }
  .brand-name { font-size: 9.5px; }
  .hero-title { font-size: 34px; }
  .lede { font-size: 20px; }
  .contact-title { font-size: 30px; }
  .section-title { font-size: 28px; }
  .hero-inner { padding: 22px 18px; }
}
