:root {
  --bg: #f7f5f1;
  --ink: #1e1b22;
  --muted: #6b6570;
  --line: #e2ddd5;
  --accent: #7a5c73;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", sans-serif;
  --measure: 40rem;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.7;
}
img { max-width: 100%; display: block; }
a { color: inherit; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
  align-items: center;
  justify-content: space-between;
  padding: 1rem clamp(1rem, 4vw, 3rem);
  background: rgba(247, 245, 241, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  font-family: var(--sans);
  font-size: 0.9rem;
}
.site-header .brand { font-family: var(--serif); font-size: 1.15rem; text-decoration: none; }
.site-header nav { display: flex; flex-wrap: wrap; gap: 1.5rem; }
.site-header nav a { text-decoration: none; color: var(--muted); letter-spacing: 0.04em; }
.site-header nav a:hover,
.site-header nav a[aria-current="page"] { color: var(--ink); }

/* Transparent header over the landing hero */
.home .site-header {
  position: absolute;
  left: 0; right: 0;
  background: transparent;
  backdrop-filter: none;
  border-bottom: 0;
  color: #fff;
}
.home .site-header nav a { color: rgba(255, 255, 255, 0.8); }
.home .site-header nav a:hover { color: #fff; }

/* ---------- Landing hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  padding: clamp(1rem, 6vw, 5rem);
  color: #fff;
  background: #2a2433 url("../images/hero.png") center / cover no-repeat;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(20, 16, 26, 0.75), rgba(20, 16, 26, 0) 60%);
}
.hero-content { position: relative; max-width: 54rem; }
.eyebrow {
  font-family: var(--sans);
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.85;
  margin: 0 0 1rem;
}
.hero h1 {
  font-size: clamp(2.2rem, 5.5vw, 3.8rem);
  line-height: 1.05;
  font-weight: 400;
  margin: 0 0 1.25rem;
}
.hero p { font-size: 1.2rem; margin: 0 0 2rem; opacity: 0.9; }

/* ---------- Buttons ---------- */
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.btn {
  display: inline-block;
  padding: 0.75rem 1.4rem;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 0.9rem;
  letter-spacing: 0.03em;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}
.btn-solid { background: #fff; color: var(--ink); border-color: #fff; }
.btn-solid:hover { background: transparent; color: #fff; }
.btn-ghost:hover { background: #fff; color: var(--ink); }
.btn-dark { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn-dark:hover { background: transparent; color: var(--ink); }

/* ---------- Sections ---------- */
.section {
  padding: clamp(3rem, 8vw, 6rem) clamp(1rem, 4vw, 3rem);
  max-width: 72rem;
  margin: 0 auto;
}
.section-title {
  font-weight: 400;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin: 0 0 0.5rem;
}
.section-lede { color: var(--muted); margin: 0 0 3rem; max-width: var(--measure); }

/* ---------- Essay cards ---------- */
.essay-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 18rem), 1fr));
  gap: 2.5rem 2rem;
}
.essay-card { text-decoration: none; display: block; }
.essay-card .thumb { overflow: hidden; border-radius: 4px; aspect-ratio: 16 / 10; background: var(--line); }
.essay-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.essay-card:hover img { transform: scale(1.04); }
.essay-card .num {
  display: block;
  margin-top: 1.1rem;
  font-family: var(--sans);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
}
.essay-card h3 { font-weight: 400; font-size: 1.45rem; line-height: 1.25; margin: 0.35rem 0 0.5rem; }
.essay-card p { color: var(--muted); font-size: 1rem; margin: 0; }

/* ---------- PDF band ---------- */
.pdf-band {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: center;
}
.pdf-band .actions { justify-content: center; }

/* ---------- Essay article ---------- */
.article-hero { max-width: 72rem; margin: 0 auto; padding: 0 clamp(1rem, 4vw, 3rem); }
.article-hero img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 4px; }
.article {
  max-width: var(--measure);
  margin: 0 auto;
  padding: clamp(2rem, 6vw, 4rem) clamp(1rem, 4vw, 1.5rem) 5rem;
}
.article-head {
  max-width: var(--measure);
  margin: 0 auto;
  padding: clamp(2.5rem, 7vw, 5rem) clamp(1rem, 4vw, 1.5rem) 0;
}
.article-title { font-weight: 400; font-size: clamp(2.2rem, 5vw, 3.4rem); line-height: 1.1; margin: 0.25rem 0 1rem; }
.article-meta { font-family: var(--sans); font-size: 0.85rem; color: var(--muted); margin: 0 0 2.5rem; }
.article h2 { font-weight: 400; font-size: 1.6rem; margin: 2.5rem 0 0.75rem; }
.article figure { margin: 2.5rem 0; }
.article figure img { border-radius: 4px; }
.article figcaption { font-family: var(--sans); font-size: 0.85rem; color: var(--muted); margin-top: 0.6rem; }
.article blockquote {
  margin: 2rem 0;
  padding-left: 1.25rem;
  border-left: 2px solid var(--accent);
  font-style: italic;
  color: var(--muted);
}
.article-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  font-family: var(--sans);
  font-size: 0.9rem;
}
.article-nav a { text-decoration: none; color: var(--muted); }
.article-nav a:hover { color: var(--ink); }

/* ---------- About ---------- */
.about-page {
  --bg: #fdf6f3;
  --ink: #111;
  --line: #111;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --display: "Libre Caslon Text", Georgia, serif;
}
.about-page .site-header { background: var(--bg); border-bottom-color: var(--ink); }
.about-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 3fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
  padding: clamp(2rem, 5vw, 3.5rem) clamp(1rem, 4vw, 3rem) 5rem 0;
}
/* Portrait stays pinned below the header while the text column scrolls */
.about-portrait { position: sticky; top: 4rem; }
.about-portrait img {
  width: 100%;
  aspect-ratio: 7 / 12;
  max-height: calc(100vh - 4rem);
  max-height: calc(100svh - 4rem);
  object-fit: cover;
  object-position: center 30%;
}
.about-heading {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin: 0 0 2rem;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.9rem, 3.4vw, 2.6rem);
  line-height: 1.15;
}
.about-heading::after { content: ""; flex: 1; height: 1px; background: var(--ink); }
.about-intro {
  max-width: 50rem;
  font-family: var(--mono);
  font-size: 0.95rem;
  line-height: 1.65;
  letter-spacing: 0.02em;
}
.about-intro p { margin: 0 0 1.5rem; }
.about-intro a { text-underline-offset: 3px; text-decoration-thickness: 1px; }
.about-intro a:hover { background: var(--ink); color: var(--bg); text-decoration: none; }
@media (max-width: 760px) {
  .about-layout { grid-template-columns: 1fr; padding-left: clamp(1rem, 4vw, 3rem); }
  .about-portrait { position: static; }
  .about-portrait img { aspect-ratio: 4 / 5; max-width: 22rem; max-height: none; }
}

/* ---------- Footer ---------- */
.site-footer {
  padding: 2rem clamp(1rem, 4vw, 3rem);
  border-top: 1px solid var(--line);
  font-family: var(--sans);
  font-size: 0.85rem;
  color: var(--muted);
  text-align: center;
}
