:root {
  --bg:       #FAF9F7;
  --fg:       #1C1917;
  --fg-muted: #57534E;
  --fg-dim:   #A8A29E;
  --accent:   #6B7F5E;
  --rule:     #D6D3D1;
  --max-w:    660px;
  --header-bg: url('assets/bg1.webp');
}

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

html {
  font-size: 18px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: "Fraunces", Georgia, serif;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.75;
}

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

/* ── Header with background image ── */
.header-wrap {
  position: relative;
  overflow: hidden;
}

.header-bg {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--header-bg) center / cover no-repeat;
  opacity: 0.45;
  z-index: 0;
}

.header-fade {
  position: relative;
  z-index: 1;
  background: linear-gradient(to bottom, transparent 0%, var(--bg) 100%);
  padding-bottom: 1rem;
}

.hero-top {
  text-align: center;
  padding: 10rem 0 0;
}

.headshot {
  width: 136px;
  height: 136px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 1rem;
  border: 3px solid rgba(255,255,255,0.5);
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.hero-top h1 {
  font-size: 1.8rem;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 0.3rem;
}

.hero-top .affiliation {
  color: var(--fg-muted);
  font-size: 0.92rem;
  margin-bottom: 0.8rem;
}

.hero-links {
  font-size: 0.88rem;
  color: var(--fg-muted);
}

.hero-links a {
  color: var(--fg-muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--rule);
  transition: color 0.15s, text-decoration-color 0.15s;
}

.hero-links a:hover {
  color: var(--fg);
  text-decoration-color: var(--fg);
}

/* ── Bio ── */
.bio {
  padding-top: 2.5rem;
  font-size: 0.95rem;
  line-height: 1.85;
}

.bio p + p {
  margin-top: 0.9rem;
}

/* ── Sections ── */
section {
  padding-top: 2.5rem;
}

.section-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 1.5rem;
}

/* ── Publications ── */
.pub-group-title {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--fg-dim);
  letter-spacing: 0.04em;
  margin-top: 2rem;
  margin-bottom: 0.8rem;
}

.pub-group-title:first-of-type {
  margin-top: 0;
}

.pub-entry {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 1.3rem;
  line-height: 1.65;
}

.pub-body {
  flex: 1;
  min-width: 0;
}

.pub-year {
  flex-shrink: 0;
  font-size: 0.85rem;
  color: var(--fg-dim);
  font-variant-numeric: tabular-nums;
  text-align: right;
  padding-top: 0.1em;
}

.pub-title {
  font-weight: 600;
  color: var(--fg);
  font-size: 0.95rem;
}

.pub-title a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--rule);
  transition: color 0.15s, text-decoration-color 0.15s;
}

.pub-title a:hover {
  color: var(--fg);
  text-decoration-color: var(--fg);
}

.pub-authors {
  font-size: 0.88rem;
  color: var(--fg-muted);
}

.pub-authors .you {
  color: var(--fg);
  font-weight: 600;
}

.pub-venue {
  font-size: 0.85rem;
  color: var(--fg-muted);
  font-style: italic;
}

.pub-note {
  font-size: 0.82rem;
  color: var(--fg-muted);
  font-style: italic;
}

/* ── Footer ── */
footer {
  margin-top: 3.5rem;
  padding: 2rem 0 3rem;
  border-top: 1px solid var(--rule);
  font-size: 0.78rem;
  color: var(--fg-dim);
  text-align: center;
}

/* ── Links in prose ── */
a {
  color: var(--fg);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--rule);
  transition: text-decoration-color 0.15s;
}

a:hover {
  text-decoration-color: var(--fg);
}

/* ── Responsive ── */
@media (max-width: 600px) {
  html { font-size: 16px; }
  .hero-top { padding: 3rem 0 0; }
  section { padding-top: 2rem; }
}

/* ── Print ── */
@media print {
  body { background: #fff; }
  .header-bg, .header-fade { display: none; }
  .hero-top { padding: 1rem 0 0; }
  footer { display: none; }
}
