:root {
  --paper: #f7f5ee;
  --ink: #1a1a1a;
  --muted: #5a5a55;
  --accent: #2a4d3a;
  --accent-warm: #b8763d;
  --rule: #d8d4c8;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: Georgia, "Iowan Old Style", "Palatino Linotype", serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  font-size: 17px;
}
a { color: inherit; }

/* ── Top nav (shared across pages) ───────────────────── */
nav.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.6rem 2.4rem;
  font-family: ui-sans-serif, system-ui, -apple-system, sans-serif;
}
nav.top .brand {
  font-family: Georgia, "Iowan Old Style", serif;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  text-decoration: none;
  color: inherit;
}
nav.top ul {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  gap: 1.8rem;
}
nav.top a {
  text-decoration: none;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  opacity: 0.92;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s, opacity 0.15s;
  color: inherit;
}
nav.top a:hover { opacity: 1; border-bottom-color: currentColor; }

/* Hero variant: nav floats white over photo */
header.hero nav.top { color: #fff; }
header.hero nav.top .brand { color: #fff; }

/* Solid variant: nav on paper background, dark text */
header.solid {
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}
header.solid nav.top { color: var(--ink); }

/* ── Hero ───────────────────────────────────────────── */
header.hero {
  position: relative;
  width: 100%;
  height: 86svh;
  min-height: 500px;
  max-height: 760px;
  background-image: url("/hero-work.jpg");
  background-image: image-set(
    url("/hero-work.webp") type("image/webp"),
    url("/hero-work.jpg") type("image/jpeg")
  );
  background-size: cover;
  background-position: center 42%;
  color: #fff;
  overflow: hidden;
}
header.hero nav.top {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 10;
}
header.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(15, 25, 18, 0.30) 0%,
    rgba(15, 25, 18, 0.10) 35%,
    rgba(15, 25, 18, 0.20) 65%,
    rgba(0, 0, 0, 0.65) 100%
  );
}
header.hero .hero-inner {
  position: relative;
  z-index: 5;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0 2.4rem 2.8rem;
  max-width: 1100px;
  margin: 0 auto;
}
header.hero h1 {
  font-family: Georgia, "Iowan Old Style", serif;
  font-size: clamp(3.4rem, 8vw, 6.2rem);
  line-height: 0.95;
  margin: 0 0 1rem;
  letter-spacing: 0;
  font-weight: 700;
  text-shadow: 0 2px 18px rgba(0,0,0,0.35);
}
header.hero .hero-copy {
  max-width: 590px;
  margin: 0 0 1.5rem;
  font-size: clamp(1.05rem, 2vw, 1.32rem);
  line-height: 1.55;
  text-shadow: 0 2px 16px rgba(0,0,0,0.34);
}
header.hero .hero-cta {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.72rem 1.1rem;
  border: 1px solid rgba(255,255,255,0.72);
  border-radius: 3px;
  background: rgba(0,0,0,0.18);
  color: #fff;
  font-family: ui-sans-serif, system-ui, -apple-system, sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-decoration: none;
  text-transform: uppercase;
}
header.hero .hero-cta:hover {
  background: rgba(255,255,255,0.14);
}

/* ── Lead / bio (homepage) ──────────────────────────── */
section.lead {
  max-width: 680px;
  margin: 0 auto;
  padding: 4.5rem 2rem 3rem;
}
section.lead .bio,
section.lead.work-lead {
  font-size: 1.12rem;
  line-height: 1.75;
  color: var(--ink);
}
section.lead .bio p,
section.lead.work-lead p { margin: 0 0 1.2em; }
section.lead .bio p:last-child,
section.lead.work-lead p:last-child { margin-bottom: 0; }

/* ── Inner page (research, teaching, writing, contact) ─ */
section.inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 4rem 2rem 5rem;
}
section.inner h1 {
  font-family: Georgia, "Iowan Old Style", serif;
  font-size: clamp(2.2rem, 4.5vw, 3.2rem);
  line-height: 1.05;
  margin: 0 0 1.4rem;
  letter-spacing: -0.015em;
  font-weight: 700;
}
section.inner h2 {
  font-family: ui-sans-serif, system-ui, -apple-system, sans-serif;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
  margin: 3rem 0 1rem;
  font-weight: 600;
}
section.inner p {
  font-size: 1.08rem;
  line-height: 1.75;
  margin: 0 0 1.2em;
}
section.inner ul {
  padding-left: 1.4em;
  margin: 0 0 1.2em;
}
section.inner ul li {
  margin-bottom: 0.6em;
  line-height: 1.6;
}
section.inner a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
section.inner a:hover { color: var(--accent-warm); }
section.inner em { font-style: italic; }
section.inner .footnote {
  font-size: 0.92rem;
  color: var(--muted);
  font-style: italic;
  border-top: 1px solid var(--rule);
  padding-top: 1.5rem;
  margin-top: 3rem;
}

/* ── Footer ─────────────────────────────────────────── */
footer.bottom {
  border-top: 1px solid var(--rule);
  padding: 2.2rem 2rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  font-family: ui-sans-serif, system-ui, sans-serif;
}

@media (max-width: 640px) {
  nav.top {
    padding: 1.2rem 1.1rem;
  }

  header.hero {
    height: 82svh;
    min-height: 460px;
  }

  header.hero .hero-inner {
    padding: 0 1.2rem 2.2rem;
  }
}
