/* ── DESIGN TOKENS ── */
:root {
  --color-primary:              #000000;
  --color-primary-active:       #1a1a1a;
  --color-text-link:            #0d74ce;
  --color-ink:                  #171717;
  --color-body:                 #60646c;
  --color-muted:                #999999;
  --color-muted-soft:           #cccccc;
  --color-hairline:             #f0f0f3;
  --color-hairline-soft:        #f5f5f7;
  --color-hairline-strong:      #dcdee0;
  --color-canvas:               #ffffff;
  --color-canvas-soft:          #fafafa;
  --color-surface-card:         #ffffff;
  --color-surface-strong:       #f0f0f3;
  --color-surface-dark:         #171717;
  --color-surface-dark-elevated:#1a1a1a;
  --color-on-primary:           #ffffff;
  --color-on-dark:              #ffffff;
  --color-on-dark-soft:         #b0b4ba;
  --color-sky-light:            #cfe7ff;
  --color-sky-mid:              #a8c8e8;

  --font-sans: 'Inter', -apple-system, system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  --space-xxs:    4px;
  --space-xs:     8px;
  --space-sm:    12px;
  --space-base:  16px;
  --space-md:    20px;
  --space-lg:    24px;
  --space-xl:    32px;
  --space-xxl:   48px;
  --space-section: 60px;

  --radius-xs:   4px;
  --radius-sm:   6px;
  --radius-md:   8px;
  --radius-lg:  12px;
  --radius-xl:  16px;
  --radius-xxl: 24px;
  --radius-pill: 9999px;
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--color-body);
  background: var(--color-canvas);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* ── LAYOUT ── */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-xxl);
}

.container--narrow {
  max-width: 720px;
}

/* ── BUTTONS ── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xxs);
  background: var(--color-primary);
  color: var(--color-on-primary);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  padding: 10px 18px;
  height: 40px;
  border-radius: var(--radius-md);
  transition: background 0.15s ease;
}

.btn-primary:hover {
  background: var(--color-primary-active);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xxs);
  background: var(--color-surface-card);
  color: var(--color-ink);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  padding: 9px 17px;
  height: 40px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-hairline-strong);
  transition: background 0.15s ease, border-color 0.15s ease;
}

.btn-secondary:hover {
  background: var(--color-surface-strong);
}

/* ── BADGE PILL ── */
.badge-pill {
  display: inline-flex;
  align-items: center;
  background: var(--color-surface-strong);
  color: var(--color-ink);
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.88px;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}

/* ── TOP NAV ── */
.top-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  height: 64px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-hairline);
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
  height: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-xxl);
}

.nav-brand {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-ink);
  letter-spacing: -0.3px;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
  margin-left: auto;
}

.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-body);
  transition: color 0.15s ease;
}

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

.nav-cta {
  flex-shrink: 0;
  margin-left: var(--space-sm);
}

.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 24px;
  padding: 4px 0;
  margin-left: auto;
}

.nav-hamburger span {
  display: block;
  width: 100%;
  height: 1.5px;
  background: var(--color-ink);
  transition: transform 0.2s ease, opacity 0.2s ease;
  border-radius: 1px;
}

.nav-hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ── HERO ── */
.hero {
  min-height: auto;
  background: var(--color-canvas);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 45% at 50% 85%, rgba(207,231,255,0.45) 0%, transparent 65%);
  pointer-events: none;
}

.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xl);
  padding-top: var(--space-section);
  padding-bottom: var(--space-section);
  position: relative;
}

.hero-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-lg);
}

.hero-photo-wrap {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--color-hairline-strong);
  background: var(--color-surface-strong);
  flex-shrink: 0;
}

.hero-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-photo-fallback {
  display: none;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 600;
  color: var(--color-muted);
  background: var(--color-surface-strong);
  font-family: var(--font-sans);
}

.hero-badge {
  align-self: center;
}

.hero-name {
  font-family: var(--font-sans);
  font-size: clamp(40px, 5vw, 64px);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -1.92px;
  color: var(--color-ink);
}

.hero-tagline {
  font-size: 18px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--color-body);
  max-width: 52ch;
}

.hero-ctas {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
  justify-content: center;
}

.hero-viz-col {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.hero-social-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  justify-content: center;
  background: linear-gradient(160deg, #07111f 0%, #0a1528 100%);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 20px;
  padding: 14px 22px;
}

/* ── NEURO VIZ ── */
.neuro-viz {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1.25fr 1fr;
  gap: 14px;
  background: linear-gradient(160deg, #07111f 0%, #0a1528 100%);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 20px;
  padding: 22px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 32px 72px rgba(0,0,0,0.18), 0 4px 16px rgba(0,0,0,0.10);
}

.nv-bg-glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 22% 18%, rgba(0,229,255,0.07), transparent 28%),
    radial-gradient(circle at 78% 82%, rgba(0,120,255,0.09), transparent 28%);
  pointer-events: none;
}

.nv-panel {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 14px;
  padding: 18px;
  position: relative;
  z-index: 1;
  overflow: hidden;
}

.nv-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 1;
  padding: 0 8px;
}

.nv-panel-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #9ec8ff;
  margin-bottom: 14px;
}

.nv-label-center {
  text-align: center;
}

/* EEG waveforms */
.eeg-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.eeg-wave {
  width: 100%;
  height: 44px;
  display: block;
  overflow: visible;
}

.eeg-path {
  fill: none;
  stroke: #57d0ff;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 4px rgba(87,208,255,0.5));
  stroke-dasharray: 600;
  stroke-dashoffset: 600;
  animation: eegDraw 3.6s ease-in-out infinite;
}

.eeg-path--2 {
  stroke: #7ed8ff;
  animation-delay: 1.2s;
}

.eeg-path--3 {
  stroke: #47c2ff;
  animation-delay: 2.4s;
}

@keyframes eegDraw {
  0%   { stroke-dashoffset: 600; opacity: 0.35; }
  15%  { opacity: 0.95; }
  85%  { opacity: 0.95; }
  100% { stroke-dashoffset: 0;   opacity: 0.35; }
}

/* EEG metrics grid */
.eeg-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.eeg-metric {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 10px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  font-size: 11px;
}

.eeg-metric span {
  color: #9db3cb;
}

.eeg-metric strong {
  color: #e9f2ff;
  font-family: var(--font-mono);
  font-weight: 400;
}

/* Floating numbers */
.float-nums {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.float-nums span {
  position: absolute;
  font-family: var(--font-mono);
  font-size: 9px;
  color: rgba(87,208,255,0.4);
  animation: floatNum 5s ease-in-out infinite;
}

@keyframes floatNum {
  0%, 100% { transform: translateY(0);   opacity: 0.2; }
  50%       { transform: translateY(-7px); opacity: 0.75; }
}

/* Neural network SVG */
.nn-svg {
  width: 100%;
  height: auto;
  display: block;
}

/* Prediction bars */
.pred-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.pred-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pred-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.pred-name {
  font-size: 11px;
  font-weight: 500;
  color: #c8dff5;
  letter-spacing: 0.02em;
}

.pred-pct {
  font-size: 10px;
  font-weight: 600;
  color: #72e3ff;
  font-family: var(--font-mono);
}

.pred-bar-track {
  height: 5px;
  background: rgba(255,255,255,0.07);
  border-radius: 3px;
  overflow: hidden;
}

.pred-bar {
  height: 100%;
  width: 0%;
  border-radius: 3px;
  background: linear-gradient(90deg, #296dff 0%, #72e3ff 100%);
  box-shadow: 0 0 8px rgba(70,180,255,0.4);
  transition: width 1.4s cubic-bezier(0.4,0,0.2,1);
}

.pred-bar--warm {
  background: linear-gradient(90deg, #7c3aed 0%, #06b6d4 100%);
  box-shadow: 0 0 8px rgba(124,58,237,0.35);
}

.pred-bar.loaded {
  width: calc(var(--w) * 1%);
}

.pred-footer {
  display: flex;
  gap: 20px;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.pred-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pred-stat span {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(158,200,255,0.5);
}

.pred-stat strong {
  font-size: 13px;
  font-weight: 600;
  color: #6ee7b7;
  font-family: var(--font-mono);
}

/* ── SECTION BASE ── */
.section {
  padding: var(--space-section) 0;
}

.section--soft {
  background: var(--color-canvas-soft);
}

.section--dark {
  background: var(--color-surface-dark);
}

.section-label {
  display: block;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.88px;
  text-transform: uppercase;
  color: var(--color-muted);
  margin-bottom: var(--space-sm);
}

.section-label--dark {
  color: var(--color-on-dark-soft);
}

.section-heading {
  font-family: var(--font-sans);
  font-size: 36px;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -1.08px;
  color: var(--color-ink);
  margin-bottom: var(--space-xl);
}

.section-heading--dark {
  color: var(--color-on-dark);
}

/* ── ABOUT ── */
.about-text {
  font-size: 17px;
  line-height: 1.7;
  color: var(--color-body);
  margin-bottom: var(--space-base);
}

.about-text:last-child {
  margin-bottom: 0;
}

/* ── TIMELINE ── */
.timeline {
  display: flex;
  flex-direction: column;
}

.timeline-item {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: var(--space-xl);
  padding-bottom: var(--space-xl);
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-connector {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 4px;
}

.timeline-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-ink);
  flex-shrink: 0;
  outline: 3px solid var(--color-canvas-soft);
  outline-offset: 1px;
}

.timeline-line {
  width: 1px;
  flex: 1;
  background: var(--color-hairline-strong);
  margin-top: 8px;
}

.timeline-item:last-child .timeline-line {
  display: none;
}

.timeline-date {
  display: block;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--color-muted);
  margin-bottom: var(--space-xs);
}

.timeline-role {
  font-size: 18px;
  font-weight: 600;
  color: var(--color-ink);
  margin-bottom: 2px;
}

.timeline-org {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-link);
  margin-bottom: var(--space-sm);
}

.timeline-desc {
  font-size: 15px;
  line-height: 1.65;
  color: var(--color-body);
  margin-bottom: var(--space-sm);
}

.pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
}

/* ── PUBLICATIONS ── */
.section-intro {
  font-size: 16px;
  line-height: 1.7;
  color: var(--color-body);
  margin-bottom: var(--space-xxl);
}

.achievement-card {
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: var(--space-xl);
  background: var(--color-surface-card);
  border: 1px solid var(--color-hairline-strong);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  margin-bottom: var(--space-xl);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.achievement-card:hover {
  border-color: var(--color-hairline);
}

.achievement-rank {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  width: 60px;
  height: 60px;
  border-radius: var(--radius-md);
  background: var(--color-surface-strong);
  font-family: var(--font-sans);
  font-size: 28px;
  font-weight: 600;
  color: var(--color-ink);
  flex-shrink: 0;
}

.achievement-content {
  display: flex;
  flex-direction: column;
  gap: var(--space-base);
}

.achievement-title {
  font-family: var(--font-sans);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.6px;
  color: var(--color-ink);
  line-height: 1.2;
  margin: 0;
}

.achievement-subtitle {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-link);
}

.achievement-desc {
  font-size: 15px;
  line-height: 1.65;
  color: var(--color-body);
}

.achievement-desc em {
  font-style: italic;
}

.achievement-desc strong {
  font-weight: 600;
  color: var(--color-ink);
}

.achievement-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  margin-top: var(--space-xs);
}

.tag {
  display: inline-flex;
  align-items: center;
  background: var(--color-surface-strong);
  color: var(--color-body);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-hairline);
}

.pub-footer {
  margin-top: var(--space-xxl);
  padding-top: var(--space-xl);
  border-top: 1px solid var(--color-hairline);
  text-align: center;
}

.pub-footer-text {
  font-size: 15px;
  line-height: 1.65;
  color: var(--color-body);
  margin-bottom: var(--space-lg);
}

.pub-card {
  background: var(--color-surface-card);
  border: 1px solid var(--color-hairline-strong);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
}

.pub-desc {
  font-size: 16px;
  line-height: 1.7;
  color: var(--color-body);
  margin-bottom: var(--space-xl);
}

.pub-desc em {
  font-style: italic;
}

.pub-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-base);
  padding: var(--space-lg) 0;
  border-top: 1px solid var(--color-hairline);
  border-bottom: 1px solid var(--color-hairline);
  margin-bottom: var(--space-xl);
}

.pub-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xxs);
  text-align: center;
}

.pub-stat-number {
  font-family: var(--font-sans);
  font-size: 36px;
  font-weight: 600;
  letter-spacing: -1.08px;
  color: var(--color-ink);
  line-height: 1;
}

.pub-stat-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--color-muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

/* ── SKILLS ── */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xl);
}

.skill-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.skill-group-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-ink);
  margin-bottom: var(--space-xxs);
}

/* ── CONTACT ── */
.contact-inner {
  text-align: center;
}

.contact-desc {
  font-size: 17px;
  line-height: 1.7;
  color: var(--color-on-dark-soft);
  margin-bottom: var(--space-xxl);
  max-width: 52ch;
  margin-left: auto;
  margin-right: auto;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  justify-content: center;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: 14px;
  font-weight: 500;
  color: var(--color-on-dark-soft);
  padding: 10px 20px;
  height: 40px;
  border-radius: var(--radius-md);
  border: 1px solid #2d2d2d;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.contact-link:hover {
  color: var(--color-on-dark);
  border-color: #484848;
  background: rgba(255,255,255,0.04);
}

.contact-link--primary {
  background: #ffffff;
  color: var(--color-ink);
  border-color: #ffffff;
}

.contact-link--primary:hover {
  background: #f0f0f3;
  border-color: #f0f0f3;
  color: var(--color-ink);
}

/* ── FOOTER ── */
.footer {
  background: var(--color-canvas);
  border-top: 1px solid var(--color-hairline);
  padding: var(--space-xxl) 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
}

.footer-brand {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-ink);
  flex-shrink: 0;
}

.footer-nav {
  display: flex;
  gap: var(--space-xl);
  margin: 0 auto;
}

.footer-nav a {
  font-size: 14px;
  color: var(--color-body);
  transition: color 0.15s ease;
}

.footer-nav a:hover {
  color: var(--color-ink);
}

.footer-copy {
  font-size: 13px;
  color: var(--color-muted);
  flex-shrink: 0;
}

/* ── SCROLL REVEAL ── */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .container {
    padding: 0 var(--space-xl);
  }
  .nav-inner {
    padding: 0 var(--space-xl);
  }
}

@media (max-width: 768px) {
  .nav-hamburger {
    display: flex;
  }
  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--color-canvas);
    border-bottom: 1px solid var(--color-hairline);
    flex-direction: column;
    align-items: flex-start;
    padding: var(--space-base) var(--space-xl);
    gap: var(--space-base);
    margin-left: 0;
  }
  .nav-links.open {
    display: flex;
  }
  .nav-cta {
    display: none;
  }
  .nav-inner {
    position: relative;
  }

  .hero-inner {
    padding-top: var(--space-xxl);
    padding-bottom: var(--space-xxl);
  }
  .hero-name {
    font-size: 40px;
    letter-spacing: -1.2px;
  }
  .hero-tagline {
    font-size: 16px;
  }
  .neuro-viz {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .nv-center {
    padding: 0;
  }
  .nn-svg {
    max-height: 200px;
  }

  .section-heading {
    font-size: 28px;
    letter-spacing: -0.84px;
  }
  .achievement-card {
    grid-template-columns: 1fr;
  }
  .achievement-rank {
    width: 100%;
  }
  .skills-grid {
    grid-template-columns: 1fr;
  }
  .footer-inner {
    flex-direction: column;
    gap: var(--space-base);
    text-align: center;
  }
  .footer-nav {
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-base);
    margin: 0;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 var(--space-base);
  }
  .nav-inner {
    padding: 0 var(--space-base);
  }
  .nav-links {
    padding: var(--space-base);
  }
  .hero-name {
    font-size: 32px;
    letter-spacing: -1px;
  }
  .pub-stats {
    grid-template-columns: 1fr;
  }
  .contact-links {
    flex-direction: column;
  }
  .contact-link {
    justify-content: center;
  }
}
