/* ============================================================
   DESIGN TOKENS — DARK (default)
   ============================================================ */
:root {
  --bg:          #0d0d0f;
  --bg-alt:      #111114;
  --surface:     #18181d;
  --border:      #2e2e3a;
  --accent:      #8b7cf8;
  --accent-dim:  #5548b8;
  --text:        #f0f0fa;
  --text-muted:  #a8a8c0;
  --text-faint:  #565668;

  --font-sans:   'Inter', system-ui, sans-serif;
  --font-serif:  'Lora', Georgia, serif;

  --radius:      10px;
  --max-w:       1080px;
  --nav-h:       64px;

  /* nav glass */
  --nav-bg:      rgba(13,13,15,0.80);
}

/* ============================================================
   DESIGN TOKENS — LIGHT
   ============================================================ */
:root.light {
  --bg:          #f7f7fb;
  --bg-alt:      #eeeef5;
  --surface:     #e4e4ef;
  --border:      #d0d0e0;
  --accent:      #6355d8;
  --accent-dim:  #4a3fa0;
  --text:        #1a1a2e;
  --text-muted:  #555570;
  --text-faint:  #9999b8;

  --nav-bg:      rgba(247,247,251,0.85);
}

/* Smooth theme transition */
body, #nav, .section-alt, #footer {
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

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

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-weight: 400;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
strong { font-weight: 600; }

/* ============================================================
   NAV
   ============================================================ */
#nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  background: var(--nav-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}
#nav.scrolled { border-color: var(--border); }

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

.nav-name {
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  color: var(--text);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-links a {
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: color 0.2s, background 0.2s;
}
.nav-links a:hover { color: var(--text); background: var(--surface); }

.nav-cta {
  background: var(--accent) !important;
  color: #fff !important;
  font-weight: 500;
  padding: 0.4rem 1rem !important;
}
.nav-cta:hover { background: #9080f8 !important; }

/* Theme toggle */
#theme-toggle {
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.35rem 0.55rem;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
  display: flex;
  align-items: center;
}
#theme-toggle:hover {
  color: var(--text);
  border-color: var(--accent);
  background: var(--surface);
}
/* Show the right icon per mode */
#theme-toggle .icon-moon { display: block; }
#theme-toggle .icon-sun  { display: none; }
:root.light #theme-toggle .icon-moon { display: none; }
:root.light #theme-toggle .icon-sun  { display: block; }

/* ============================================================
   HERO
   ============================================================ */
#hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: calc(var(--nav-h) + 4rem) 2rem 6rem;
  position: relative;
  overflow: hidden;
}

/* Ambient gradient blob */
#hero::before {
  content: '';
  position: absolute;
  top: -20%;
  right: -10%;
  width: 60vw;
  height: 60vw;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124,109,240,0.12) 0%, transparent 70%);
  pointer-events: none;
}

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

.hero-text { flex: 1; }

.hero-label {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.25rem;
}

.hero-text h1 {
  font-family: var(--font-serif);
  font-size: clamp(3rem, 6vw, 5.5rem);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 1.5rem;
}

.hero-sub {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 540px;
  line-height: 1.75;
  margin-bottom: 2.5rem;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  padding: 0.6rem 1.25rem;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: #9080f8; transform: translateY(-1px); }

.btn-ghost {
  border: 1px solid var(--border);
  color: var(--text-muted);
  background: transparent;
}
.btn-ghost:hover { border-color: var(--accent); color: var(--text); transform: translateY(-1px); }

/* Badge / avatar placeholder */
.hero-badge {
  flex-shrink: 0;
}
.badge-ring {
  width: 300px;
  height: 300px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.badge-ring::before {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1px solid rgba(124,109,240,0.3);
}
.headshot {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

/* Scroll hint */
.hero-scroll-hint {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-faint);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--text-faint), transparent);
}

/* ============================================================
   LAYOUT UTILITIES
   ============================================================ */
.section {
  padding: 6rem 2rem;
}
.section-alt { background: var(--bg-alt); }

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

.two-col {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 3rem;
}

.two-col-equal {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
}

.section-label {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  display: block;
  padding-top: 0.35rem; /* align with lead text baseline */
}

.section-header {
  margin-bottom: 3rem;
}
.section-header .section-label { margin-bottom: 0.5rem; }
.section-header h2 {
  font-family: var(--font-serif);
  font-size: 2.25rem;
  font-weight: 400;
  color: var(--text);
}

/* ============================================================
   ABOUT
   ============================================================ */
.lead {
  font-size: 1.15rem;
  line-height: 1.75;
  color: var(--text);
  margin-bottom: 1rem;
}
.section-content p { color: var(--text-muted); margin-bottom: 1rem; }
.section-content p:last-of-type { margin-bottom: 1.5rem; }

.pill-row { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.5rem; }
.pill {
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 0.78rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

/* ============================================================
   PUBLICATIONS
   ============================================================ */
.pub-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.pub-item {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 2rem;
  padding: 2rem 0;
  border-bottom: 1px solid var(--border);
  transition: background 0.2s;
}
.pub-item:first-child { border-top: 1px solid var(--border); }

.pub-item:hover { background: var(--surface); }

.pub-featured .pub-body { border-left: 2px solid var(--accent); padding-left: 1.25rem; }
.pub-award .pub-body { border-left: 2px solid #f0c040; padding-left: 1.25rem; }

.pub-year {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-faint);
  padding-top: 0.2rem;
  font-variant-numeric: tabular-nums;
}

.pub-venue {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.35rem;
}

.pub-title {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 400;
  color: var(--text);
  line-height: 1.4;
  margin-bottom: 0.4rem;
}

.pub-authors {
  font-size: 0.83rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Linked titles — paper & press */
.pub-title a, .press-title a {
  color: inherit;
  text-decoration: none;
  background-image: linear-gradient(var(--accent), var(--accent));
  background-size: 0% 1px;
  background-repeat: no-repeat;
  background-position: left bottom;
  transition: background-size 0.25s ease;
}
.pub-title a:hover, .press-title a:hover {
  background-size: 100% 1px;
}

.pub-badge {
  display: inline-block;
  margin-top: 0.6rem;
  padding: 0.2rem 0.65rem;
  background: rgba(240,192,64,0.15);
  border: 1px solid rgba(240,192,64,0.4);
  color: #f0c040;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.04em;
}
.pub-badge-silver {
  background: rgba(180,180,210,0.1);
  border-color: rgba(180,180,210,0.35);
  color: #b4b4d2;
}

/* ============================================================
   PRESS
   ============================================================ */
.press-list { display: flex; flex-direction: column; gap: 0; }

.press-item {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  column-gap: 1.5rem;
  align-items: start;
}
.press-item:first-child { border-top: 1px solid var(--border); }

.press-outlet {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.press-year {
  font-size: 0.78rem;
  color: var(--text-faint);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.press-title {
  grid-column: 1 / -1;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.975rem;
  color: var(--text);
  line-height: 1.55;
  margin-top: 0.3rem;
}

/* ============================================================
   AWARDS & SERVICE
   ============================================================ */
.col-block { }
.col-block > .section-label { margin-bottom: 1.75rem; }

.award-list { display: flex; flex-direction: column; gap: 1.5rem; }
.award-name {
  display: block;
  font-weight: 600;
  color: var(--text);
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
}
.award-meta {
  display: block;
  font-size: 0.83rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.service-list { display: flex; flex-direction: column; gap: 0; }
.service-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}
.service-list li:first-child { border-top: 1px solid var(--border); }

.service-conf { color: var(--text); }
.service-conf em { color: var(--text-muted); font-style: normal; font-size: 0.82rem; }
.service-year { color: var(--text-faint); font-variant-numeric: tabular-nums; font-size: 0.82rem; }

/* ============================================================
   FOOTER
   ============================================================ */
#footer {
  padding: 3rem 2rem;
  border-top: 1px solid var(--border);
  background: var(--bg);
}
.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  text-align: center;
}
.footer-name {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: var(--text);
  margin-bottom: 0.5rem;
}
.footer-links {
  font-size: 0.83rem;
  color: var(--text-muted);
}
.footer-links a { color: var(--text-muted); border-bottom: 1px solid var(--border); }
.footer-links a:hover { color: var(--text); border-color: var(--text-muted); }

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

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .two-col, .two-col-equal {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .hero-inner { flex-direction: column; gap: 2.5rem; }
  .hero-badge { order: -1; }
  .badge-ring { width: 150px; height: 150px; }
  .badge-initials { font-size: 1.75rem; }
  .nav-links { gap: 0; }
  .nav-links a { padding: 0.4rem 0.5rem; font-size: 0.8rem; }
  .pub-item { grid-template-columns: 48px 1fr; gap: 1rem; }
}
