:root {
  --bg: #fbf6ee;
  --bg-alt: #f3e9d8;
  --surface: #fffaf2;
  --text: #2d2620;
  --muted: #6b5d50;
  --rule: #e2d4bf;
  --accent: #a4462a;
  --terracotta: #b8583a;
  --terracotta-dark: #8f3f27;
  --leaf: #7c9a4e;
  --olive: #4a4f2a;
  --hero-bg: #efe0c8;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1d1915;
    --bg-alt: #26211b;
    --surface: #2b251f;
    --text: #f1e8dc;
    --muted: #b9a998;
    --rule: #40372e;
    --accent: #e98a68;
    --terracotta: #b8583a;
    --terracotta-dark: #8f3f27;
    --leaf: #9bb86b;
    --olive: #c9c38a;
    --hero-bg: #2a231c;
  }
}
:root[data-theme="dark"] {
  --bg: #1d1915;
  --bg-alt: #26211b;
  --surface: #2b251f;
  --text: #f1e8dc;
  --muted: #b9a998;
  --rule: #40372e;
  --accent: #e98a68;
  --terracotta: #b8583a;
  --terracotta-dark: #8f3f27;
  --leaf: #9bb86b;
  --olive: #c9c38a;
  --hero-bg: #2a231c;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.65 "Source Sans 3", system-ui, sans-serif;
}

h1, h2, h3 {
  font-family: "Fraunces", Georgia, serif;
  line-height: 1.2;
  margin: 0 0 .5em;
}
h2 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); }
h3 { font-size: 1.2rem; }

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

/* Hero */
.hero {
  background: var(--hero-bg);
  border-bottom: 1px solid var(--rule);
}
.nav {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem 1.25rem;
  justify-content: center;
  padding: 1rem 16px 0;
  font-weight: 600;
}
.nav a { color: var(--text); text-decoration: none; }
.nav a:hover { color: var(--accent); }

.hero-inner {
  max-width: 760px;
  margin: 0 auto;
  padding: 2.5rem 16px 3.5rem;
  text-align: center;
}
.hero-art {
  width: 180px;
  color: var(--olive);
  margin-bottom: .5rem;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: .8rem;
  color: var(--muted);
  margin: 0 0 .5rem;
}
.hero h1 {
  font-size: clamp(2.6rem, 9vw, 4.5rem);
  font-weight: 800;
  color: var(--accent);
}
.lede {
  font-size: 1.15rem;
  color: var(--muted);
  margin: 0 auto;
  max-width: 600px;
}

/* Sections */
.section {
  max-width: 1000px;
  margin: 0 auto;
  padding: 3.5rem 16px;
}
.section.alt {
  max-width: none;
  background: var(--bg-alt);
}
.section.alt > * {
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
}
.section.alt > h2 { margin-bottom: 1rem; }

.two-col {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}
@media (min-width: 760px) {
  .two-col { grid-template-columns: 3fr 2fr; }
}

.card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
}
.persona { border-top: 4px solid var(--leaf); }

.gloss {
  font-style: italic;
  color: var(--muted);
  margin: -.25rem 0 .5rem;
}
.note {
  font-size: .92rem;
  color: var(--muted);
}
.intro { max-width: 720px; }

/* Book */
.book {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: start;
}
@media (min-width: 640px) {
  .book { grid-template-columns: 180px 1fr; }
}
.book-art {
  width: 160px;
  justify-self: center;
  filter: drop-shadow(0 6px 10px rgba(0,0,0,.18));
}
.facts {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: .25rem 1rem;
  margin: 1rem 0;
}
.facts dt { font-weight: 600; color: var(--muted); }
.facts dd { margin: 0; }

/* Columns */
.columns {
  list-style: none;
  padding: 0;
  margin: 2rem 0 1rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}
.col {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
}
.col time {
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  margin-bottom: .35rem;
}
.col h3 { color: var(--accent); }
.col p { margin: 0 0 .75rem; }
.col a {
  margin-top: auto;
  font-weight: 600;
}

/* Timeline */
.timeline {
  list-style: none;
  padding: 0;
  margin: 0;
  border-left: 3px solid var(--terracotta);
}
.timeline li {
  position: relative;
  padding: 0 0 1.25rem 1.5rem;
  display: grid;
  gap: .1rem;
}
.timeline li::before {
  content: "";
  position: absolute;
  left: -9px;
  top: .45rem;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--bg-alt);
  border: 3px solid var(--terracotta);
}
.when {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
}
@media (min-width: 640px) {
  .timeline li { grid-template-columns: 9rem 1fr; gap: 1rem; }
}

.sources li { margin-bottom: .5rem; }

/* Footer */
.footer {
  border-top: 1px solid var(--rule);
  background: var(--bg-alt);
  color: var(--muted);
  font-size: .92rem;
  padding: 2rem 16px 3rem;
}
.footer p {
  max-width: 760px;
  margin: 0 auto .75rem;
}
