/* ============================================================
   TOKENS
   ============================================================ */
:root {
  --void:       #0b1829;
  --void-alt:   #0f2035;
  --surface:    #f4f7fc;
  --card:       #eaeff8;
  --ink:        #1a2640;
  --ink-muted:  #4a5772;
  --blue:       #3B8FD9;
  --blue-dark:  #2470B8;
  --amber:      #d07040;
  --mist:       #cdd6ea;
  --mist-light: #e2e9f5;

  --font-display: 'Syne', sans-serif;
  --font-body:    'Inter', sans-serif;
  --font-mono:    'JetBrains Mono', monospace;

  --nav-h:      60px;
  --section-py: 5.5rem;
  --card-r:     12px;
  --max-w:      1100px;
}

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

html { font-size: 16px; scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--surface);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--blue);
  text-decoration: none;
  transition: color 0.18s;
}
a:hover { color: var(--blue-dark); }
a:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ============================================================
   UTILITIES
   ============================================================ */
.mono { font-family: var(--font-mono); }

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 2rem;
}

section { padding: var(--section-py) 0; }

/* ============================================================
   SECTION HEADER
   ============================================================ */
.section-header { margin-bottom: 2.75rem; }

.section-label {
  font-size: 0.72rem;
  color: var(--blue);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 0.45rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.section-label::before {
  content: '';
  display: inline-block;
  width: 1.5rem;
  height: 1px;
  background: var(--blue);
  flex-shrink: 0;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  color: var(--ink);
  letter-spacing: -0.025em;
  line-height: 1.15;
}

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  transition: background 0.3s, box-shadow 0.3s;
}
.nav.scrolled {
  background: rgba(12, 18, 25, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 rgba(255,255,255,0.06);
}

.nav-inner {
  max-width: var(--max-w);
  width: 100%;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  color: #fff;
  letter-spacing: -0.02em;
}
.nav-logo:hover { color: var(--blue); }

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}
.nav-links a {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: rgba(255,255,255,0.55);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--blue); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: rgba(255,255,255,0.8);
  padding: 4px;
  line-height: 1;
}

/* ============================================================
   HERO
   ============================================================ */
#hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: var(--void);
  overflow: hidden;
}

#attention-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    108deg,
    rgba(11, 24, 41, 0.95) 0%,
    rgba(11, 24, 41, 0.80) 42%,
    rgba(11, 24, 41, 0.18) 100%
  );
  pointer-events: none;
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: calc(var(--nav-h) + 1.25rem) 2rem 4rem;
  width: 100%;
}

.hero-photo {
  width: 148px;
  height: 148px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 15%;
  border: 3px solid var(--blue);
  box-shadow: 0 0 0 6px rgba(59, 143, 217, 0.15), 0 8px 24px rgba(0,0,0,0.3);
  margin-bottom: 1.5rem;
  display: block;
}

.hero-eyebrow {
  font-size: 0.76rem;
  color: var(--blue);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.hero-eyebrow::before {
  content: '';
  display: block;
  width: 2rem;
  height: 1px;
  background: var(--blue);
  flex-shrink: 0;
}

.hero-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(3rem, 8.5vw, 6rem);
  color: #fff;
  line-height: 1.0;
  letter-spacing: -0.035em;
  margin-bottom: 1.25rem;
}
.hero-name span { color: var(--blue); }

.hero-role {
  font-size: 1rem;
  color: rgba(255,255,255,0.55);
  margin-bottom: 2rem;
  line-height: 1.6;
}
.hero-role strong {
  color: rgba(255,255,255,0.85);
  font-weight: 500;
}

.hero-thesis {
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  color: rgba(255,255,255,0.8);
  max-width: 560px;
  line-height: 1.7;
  border-left: 2px solid var(--blue);
  padding-left: 1.25rem;
  margin-bottom: 2.75rem;
  font-style: normal;
}

.hero-links {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.58rem 1.15rem;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  font-weight: 500;
  transition: all 0.2s;
  border: none;
  cursor: pointer;
  line-height: 1;
}
.btn-primary {
  background: var(--blue);
  color: #fff;
}
.btn-primary:hover {
  background: var(--blue-dark);
  color: #fff;
}
.btn-outline {
  background: transparent;
  color: rgba(255,255,255,0.65);
  border: 1px solid rgba(255,255,255,0.18);
}
.btn-outline:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.hero-scroll {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: rgba(255,255,255,0.25);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  animation: scroll-pulse 2.2s ease-in-out infinite;
  z-index: 1;
}
.scroll-line {
  width: 1px;
  height: 2.25rem;
  background: linear-gradient(to bottom, rgba(255,255,255,0.25), transparent);
}
@keyframes scroll-pulse {
  0%, 100% { opacity: 0.4; transform: translateX(-50%) translateY(0); }
  50%       { opacity: 0.8; transform: translateX(-50%) translateY(5px); }
}

/* ============================================================
   ABOUT
   ============================================================ */
#about { background: var(--surface); }

.about-grid {
  display: grid;
  grid-template-columns: 1fr 290px;
  gap: 4rem;
  align-items: start;
}

.about-text p {
  font-size: 1.02rem;
  color: var(--ink-muted);
  line-height: 1.75;
  margin-bottom: 1.2rem;
}
.about-text p:last-child { margin-bottom: 0; }
.about-text a { font-weight: 500; }

.about-meta { display: flex; flex-direction: column; gap: 1.25rem; }

.meta-block {
  background: var(--card);
  border: 1px solid var(--mist-light);
  border-radius: var(--card-r);
  padding: 1.1rem 1.2rem;
}
.meta-label {
  font-size: 0.68rem;
  color: var(--blue);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 0.4rem;
}
.meta-value {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.2rem;
}
.meta-sub {
  font-size: 0.8rem;
  color: var(--ink-muted);
  line-height: 1.5;
}

.tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.5rem;
}
.tag {
  display: inline-block;
  padding: 0.22rem 0.55rem;
  background: var(--mist-light);
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--ink-muted);
}

/* ============================================================
   RESEARCH
   ============================================================ */
#research { background: var(--card); }

.research-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
}

.research-card {
  background: var(--surface);
  border: 1px solid var(--mist-light);
  border-top: 3px solid var(--thread, var(--blue));
  border-radius: var(--card-r);
  padding: 1.6rem;
  position: relative;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  transition: transform 0.22s, box-shadow 0.22s;
}
.research-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(59,143,217,0.12);
}

.card-status {
  position: absolute;
  top: 1.1rem;
  right: 1.1rem;
  font-size: 0.63rem;
  color: #fff;
  background: var(--thread, var(--blue));
  padding: 0.18rem 0.5rem;
  border-radius: 2px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.card-tag {
  font-size: 0.68rem;
  color: var(--thread, var(--blue));
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.65rem;
}

.card-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.03rem;
  color: var(--ink);
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin-bottom: 0.75rem;
}

.card-desc {
  font-size: 0.875rem;
  color: var(--ink-muted);
  line-height: 1.65;
  margin-bottom: 0.9rem;
}

.card-stat {
  font-size: 0.75rem;
  color: var(--thread, var(--blue));
  font-weight: 500;
  margin-bottom: 0.4rem;
}

.card-advisors {
  font-size: 0.78rem;
  color: var(--ink-muted);
  padding-top: 0.85rem;
  margin-top: 0.85rem;
  border-top: 1px solid var(--mist-light);
}

/* ============================================================
   PUBLICATIONS
   ============================================================ */
#publications { background: var(--surface); }

.pub-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 820px;
}

.pub-item {
  display: grid;
  grid-template-columns: 2rem 1fr;
  gap: 0 1rem;
  align-items: start;
}

.pub-num {
  font-size: 0.72rem;
  color: var(--blue);
  font-weight: 500;
  padding-top: 0.15rem;
}

.pub-body {
  border-left: 1px solid var(--mist);
  padding-left: 1.2rem;
}

.pub-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.45;
  margin-bottom: 0.25rem;
}
.pub-title a {
  color: inherit;
  border-bottom: 1px solid var(--mist);
  transition: color 0.2s, border-color 0.2s;
}
.pub-title a:hover {
  color: var(--blue);
  border-color: var(--blue);
}

.pub-authors {
  font-size: 0.845rem;
  color: var(--ink-muted);
  margin-bottom: 0.25rem;
}
.pub-authors em { font-style: italic; }

.pub-venue {
  font-size: 0.72rem;
  color: var(--ink-muted);
}

.pub-badge {
  display: inline-block;
  margin-left: 0.5rem;
  padding: 0.14rem 0.45rem;
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 0.63rem;
  letter-spacing: 0.04em;
  vertical-align: middle;
  border: 1px solid;
}
.badge-prep {
  background: #f3e8ff;
  border-color: #b07fd4;
  color: #5a3a8a;
}
.badge-arxiv {
  background: #fff3e0;
  border-color: #ffb84d;
  color: #8a5a0a;
}
.badge-pub {
  background: #e8f5e9;
  border-color: #81c784;
  color: #2e6b3a;
}

/* ============================================================
   EXPERIENCE
   ============================================================ */
#experience { background: var(--card); }

.exp-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--mist);
  margin-bottom: 2rem;
}
.exp-tab {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.55rem 1.1rem 0.7rem;
  cursor: pointer;
  border: none;
  background: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.18s, border-color 0.18s;
}
.exp-tab:hover { color: var(--blue); }
.exp-tab.active {
  color: var(--blue);
  border-bottom-color: var(--blue);
}
.exp-tab:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.exp-panel { display: none; }
.exp-panel.active {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.exp-item {
  background: var(--surface);
  border: 1px solid var(--mist-light);
  border-radius: var(--card-r);
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  padding: 1.35rem 1.5rem;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.2rem 1rem;
  align-items: start;
}

.exp-role {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--ink);
  grid-column: 1;
  grid-row: 1;
}

.exp-date {
  font-size: 0.7rem;
  color: var(--ink-muted);
  grid-column: 2;
  grid-row: 1 / 3;
  align-self: start;
  text-align: right;
  white-space: nowrap;
  padding-top: 0.1rem;
}

.exp-org {
  font-size: 0.845rem;
  color: var(--blue);
  font-weight: 500;
  grid-column: 1;
  grid-row: 2;
}

.exp-details {
  list-style: none;
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-top: 0.75rem;
}
.exp-details li {
  font-size: 0.86rem;
  color: var(--ink-muted);
  line-height: 1.55;
  padding-left: 1rem;
  position: relative;
}
.exp-details li::before {
  content: '\00B7';
  position: absolute;
  left: 0;
  color: var(--blue);
  font-weight: 700;
}

/* ============================================================
   AWARDS
   ============================================================ */
#awards { background: var(--surface); }

.awards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  max-width: 900px;
}

.award-item {
  background: var(--card);
  border: 1px solid var(--mist-light);
  border-left: 3px solid var(--amber);
  border-radius: var(--card-r);
  padding: 1.1rem 1.2rem;
}
.award-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--ink);
  margin-bottom: 0.3rem;
  line-height: 1.35;
}
.award-meta {
  font-size: 0.7rem;
  color: var(--ink-muted);
}

/* ============================================================
   FOOTER
   ============================================================ */
footer {
  background: var(--void);
  padding: 4rem 0 3rem;
  color: rgba(255,255,255,0.55);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  align-items: end;
  margin-bottom: 0;
}

.footer-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  color: #fff;
  letter-spacing: -0.02em;
  margin-bottom: 0.6rem;
}

.footer-desc {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.45);
  max-width: 420px;
  line-height: 1.65;
}

.footer-links {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.75rem;
}

.footer-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: rgba(255,255,255,0.5);
  transition: color 0.2s;
}
.footer-link:hover { color: var(--blue); }

.footer-divider {
  border: none;
  border-top: 1px solid rgba(255,255,255,0.07);
  margin: 2.5rem 0 1.5rem;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: rgba(255,255,255,0.22);
}

/* ============================================================
   SCROLL FADE-IN
   ============================================================ */
.fade-up {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.fade-up.in-view {
  opacity: 1;
  transform: none;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 820px) {
  :root { --section-py: 4rem; }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .footer-inner {
    grid-template-columns: 1fr;
  }
  .footer-links {
    align-items: flex-start;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 1rem;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 0.4rem;
    text-align: center;
  }
}

@media (max-width: 640px) {
  .nav-links {
    display: none;
    position: fixed;
    top: var(--nav-h);
    left: 0; right: 0;
    background: rgba(12, 18, 25, 0.98);
    flex-direction: column;
    padding: 1.5rem 2rem;
    gap: 1.25rem;
    border-top: 1px solid rgba(255,255,255,0.05);
  }
  .nav-links.open { display: flex; }
  .nav-links a { font-size: 0.9rem; }
  .nav-toggle { display: block; }

  .hero-name { font-size: clamp(2.6rem, 12vw, 3.5rem); }

  .exp-item {
    grid-template-columns: 1fr;
  }
  .exp-date {
    grid-column: 1;
    grid-row: auto;
    text-align: left;
    margin-bottom: 0.2rem;
  }

  .research-grid { grid-template-columns: 1fr; }
  .awards-grid   { grid-template-columns: 1fr; }
}

@media (max-width: 400px) {
  .container { padding: 0 1.1rem; }
  .hero-content { padding-left: 1.1rem; padding-right: 1.1rem; }
}
