:root {
  --bg: #fbfaf7;
  --surface: #ffffff;
  --text: #1c1b19;
  --muted: #6b6860;
  --rule: #e6e2d9;
  --accent: #57068c;          /* NYU violet */
  --accent-soft: #f2ecf7;
  --chip-text: #4a3a57;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #141316;
    --surface: #1c1b1f;
    --text: #ece9e4;
    --muted: #a29e96;
    --rule: #2e2c31;
    --accent: #c49bf0;
    --accent-soft: #2a2232;
    --chip-text: #d9c6ec;
  }
}
:root[data-theme="dark"] {
  --bg: #141316; --surface: #1c1b1f; --text: #ece9e4; --muted: #a29e96;
  --rule: #2e2c31; --accent: #c49bf0; --accent-soft: #2a2232; --chip-text: #d9c6ec;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 "Inter", system-ui, -apple-system, sans-serif;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

.wrap { max-width: 760px; margin: 0 auto; padding: 0 16px; }

/* nav */
nav {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}
nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 56px; }
nav .name { font-family: "Newsreader", Georgia, serif; font-size: 19px; color: var(--text); }
nav ul { list-style: none; display: flex; gap: 22px; margin: 0; padding: 0; font-size: 14px; }
nav ul a { color: var(--muted); }
nav ul a:hover { color: var(--text); text-decoration: none; }

/* hero */
header.hero {
  display: grid; grid-template-columns: 1fr 200px; gap: 40px;
  align-items: start; padding: 64px 0 40px;
}
h1 {
  font-family: "Newsreader", Georgia, serif; font-weight: 400;
  font-size: 44px; line-height: 1.1; margin: 0 0 8px; letter-spacing: -0.01em;
}
.role { color: var(--muted); font-size: 15px; margin: 0 0 24px; }
.bio p { margin: 0 0 14px; }
.photo {
  width: 200px; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 6px;
  display: block; background: var(--rule);
}
.links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 22px; }
.links a {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 13px; font-weight: 500; color: var(--text);
  border: 1px solid var(--rule); background: var(--surface);
  padding: 5px 10px; border-radius: 999px;
}
.links a:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.links svg { width: 15px; height: 15px; fill: currentColor; }

/* sections */
section { padding: 36px 0; border-top: 1px solid var(--rule); }
h2 {
  font-family: "Newsreader", Georgia, serif; font-weight: 500;
  font-size: 24px; margin: 0 0 22px;
}

/* publications */
.pub { display: grid; grid-template-columns: 84px 1fr; gap: 18px; padding: 18px 0; }
.pub + .pub { border-top: 1px dashed var(--rule); }
.venue {
  font-size: 11.5px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--accent); line-height: 1.3; padding-top: 3px;
}
.venue span { display: block; color: var(--muted); font-weight: 500; letter-spacing: 0; text-transform: none; font-size: 12.5px; }
.pub-title { font-weight: 600; margin: 0 0 4px; line-height: 1.4; }
.authors { color: var(--muted); font-size: 14.5px; margin: 0; }
.authors b { color: var(--text); font-weight: 600; }
.where { font-style: italic; color: var(--muted); font-size: 14px; margin: 2px 0 0; }
.note { font-size: 12.5px; color: var(--muted); margin: 2px 0 0; }
.pub-links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.pub-links a {
  font-size: 12px; font-weight: 500; padding: 2px 9px; border-radius: 4px;
  border: 1px solid var(--rule); color: var(--muted);
}
.pub-links a:hover { color: var(--accent); border-color: var(--accent); text-decoration: none; }

footer { border-top: 1px solid var(--rule); padding: 28px 0 48px; color: var(--muted); font-size: 13.5px; }

@media (max-width: 640px) {
  nav ul { gap: 14px; }
  header.hero { grid-template-columns: 1fr; gap: 24px; padding-top: 36px; }
  .photo { width: 140px; grid-row: 1; }
  h1 { font-size: 36px; }
  .pub { grid-template-columns: 1fr; gap: 4px; }
}

.research-text p { margin: 0 0 14px; max-width: 64ch; }
.badge { display: inline-block; font-size: 11.5px; font-weight: 600; color: var(--accent); background: var(--accent-soft); padding: 1px 8px; border-radius: 4px; margin-left: 6px; vertical-align: 1px; }
.bio strong { font-weight: 600; }

/* other pages (layout: page) */
.page { padding: 56px 0 40px; }
.page-body { max-width: 64ch; }
.page-body h2 { margin-top: 32px; }
.page-body img { max-width: 100%; height: auto; }
nav ul a[aria-current="page"] { color: var(--text); }

/* light/dark toggle: show the moon in light mode, the sun in dark mode */
nav ul { align-items: center; }
.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; padding: 0; border: 0; border-radius: 6px;
  background: none; color: var(--muted); cursor: pointer;
}
.theme-toggle:hover { color: var(--text); background: var(--accent-soft); }
.theme-toggle svg { width: 17px; height: 17px; fill: currentColor; }
.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: none; }
}
