/* Site styles: dark nav bar, tinted header band, wide single column, purple accent */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Source+Serif+4:opsz,wght@8..60,400;8..60,600&display=swap');

:root {
  --bg: #fcfcfb;
  --text: #1d1b22;
  --muted: #5f5b6b;
  --rule: #e6e3ec;
  --accent: #4b2a99;
  --accent-soft: #f1ecfb;
  --nav-bg: #3a1f7a;
  --nav-text: #ffffff;
  --nav-muted: #d6ccf2;
  --header-bg: #ede7f8;
  --header-rule: #ddd3f0;
  --width: 1040px;
  /* side padding that lines full-width bands up with the content column */
  --gutter: max(24px, calc((100% - var(--width)) / 2 + 24px));
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15131a;
    --text: #ece9f2;
    --muted: #a49fb2;
    --rule: #2c2836;
    --accent: #b9a2f5;
    --accent-soft: #241e33;
    --nav-bg: #2a1f45;
    --nav-text: #f4f0fc;
    --nav-muted: #b9add6;
    --header-bg: #1d1828;
    --header-rule: #2f2840;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.65 Inter, system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

/* Nav: full-bleed dark bar, edge to edge like the original site */
.site-nav {
  background: var(--nav-bg);
  min-height: 60px;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.site-nav a { text-decoration: none; color: var(--nav-muted); }
.site-nav .brand {
  font-family: "Source Serif 4", Georgia, serif;
  font-weight: 600;
  font-size: 18px;
  color: var(--nav-text);
}
.site-nav nav { display: flex; gap: 26px; font-size: 15px; }
.site-nav nav a { padding: 4px 0; border-bottom: 2px solid transparent; white-space: nowrap; }
.site-nav nav a:hover { color: var(--nav-text); }
.site-nav nav a[aria-current="page"] { color: var(--nav-text); font-weight: 500; border-bottom-color: var(--nav-text); }

/* Header */
.hero {
  background: var(--header-bg);
  border-bottom: 1px solid var(--header-rule);
  padding: 56px var(--gutter) 44px;
}
.hero h1 {
  font-family: "Source Serif 4", Georgia, serif;
  font-weight: 600;
  font-size: clamp(34px, 6vw, 44px);
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 0 0 10px;
}
.hero p { margin: 0; color: var(--muted); font-size: 17px; }
.hero .role { display: inline; }
.hero .affil { display: inline; }
.hero .role::after { content: " · "; }
.hero-page { padding-top: 48px; padding-bottom: 36px; }

/* Content */
.content {
  max-width: var(--width);
  margin: 0 auto;
  padding: 40px 24px 56px;
}
.content::after { content: ""; display: block; clear: both; }

/* Bio: text column + photo column */
.bio {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 64px;
  align-items: start;
}
.bio::after { display: none; }
.bio .headshot { grid-column: 2; grid-row: 1; }
.bio-text { grid-column: 1; grid-row: 1; max-width: 680px; }
.bio-text p:last-child { margin-bottom: 0; }

.headshot {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: 50% 30%;
  border-radius: 12px;
  margin-top: 6px;
}
.lead {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 22px;
  line-height: 1.5;
  margin-top: 0;
}
.intro { color: var(--muted); margin-top: 0; max-width: 680px; }

h2 {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 44px 0 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--rule);
}

/* Papers / talks / teaching */
.entries { list-style: none; padding: 0; margin: 0; }
.entries li {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 24px;
  padding: 14px 0;
  border-bottom: 1px solid var(--rule);
  font-size: 15.5px;
  line-height: 1.6;
}
.entries li:last-child { border-bottom: 0; }
.entries .year { color: var(--muted); font-variant-numeric: tabular-nums; padding-top: 1px; }
.entries .title { font-weight: 500; }
.entries strong { font-weight: 600; }
.entries cite { font-style: italic; }
.entries .coauthors { display: block; color: var(--muted); font-size: 14.5px; }
.teaching li { grid-template-columns: 120px 1fr; }

.links { display: inline-flex; gap: 6px; margin-left: 4px; vertical-align: 1px; }
.links a, .note {
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--accent-soft);
  text-decoration: none;
}
.note { color: var(--muted); margin-left: 4px; }
.links a:hover { background: var(--accent); color: var(--bg); }

.site-footer {
  max-width: var(--width);
  margin: 0 auto;
  padding: 24px 24px 48px;
  color: var(--muted);
  font-size: 14.5px;
  border-top: 1px solid var(--rule);
}
.site-footer p { margin: 0; }

@media (max-width: 860px) {
  .bio { grid-template-columns: 1fr; gap: 28px; }
  .bio .headshot { grid-column: 1; grid-row: auto; max-width: 280px; }
  .bio .bio-text { grid-column: 1; grid-row: auto; }
}

@media (max-width: 640px) {
  .site-nav { padding: 14px 16px 10px; flex-wrap: wrap; row-gap: 6px; }
  .site-nav nav { gap: 4px 18px; flex-wrap: wrap; }
  .hero, .content, .site-footer { padding-left: 16px; padding-right: 16px; }
  .hero { padding-top: 36px; padding-bottom: 28px; }
  .bio .headshot { grid-row: auto; max-width: 320px; margin: 0; }
  .bio .bio-text { grid-row: auto; }
  .entries li, .teaching li { grid-template-columns: 1fr; gap: 2px; }
}

/* Projects */
.projects { list-style: none; padding: 0; margin: 8px 0 0; }
.projects li { padding: 24px 0; border-bottom: 1px solid var(--rule); }
.projects li:first-child { border-top: 1px solid var(--rule); }
.projects p { margin: 6px 0 0; max-width: 680px; }
h2.project-title {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text);
  margin: 0;
  padding: 0;
  border: 0;
}
.project-title a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 4px; }
.project-title a:hover { text-decoration-thickness: 2px; }
