:root {
  --paper: #f7f3ea;
  --paper-2: #efe9dc;
  --ink: #2c2722;
  --ink-soft: #5c5347;
  --muted: #877c6b;
  --accent: #8a3f33;      /* brick red */
  --accent-dark: #6d3127;
  --rule: #ddd3c1;
  --measure: 44rem;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.65;
}

.wrap {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 1.25rem;
}

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

/* in-text links: make them unmistakable against body text */
.prose a:not(.tag),
.intro a:not(.tag) {
  color: var(--accent);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(138, 63, 51, .45);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  transition: background-color .12s ease, text-decoration-color .12s ease;
}
.prose a:not(.tag):hover,
.intro a:not(.tag):hover {
  color: var(--accent-dark);
  text-decoration-color: var(--accent-dark);
  background-color: rgba(138, 63, 51, .07);
}
/* links that wrap images shouldn't draw an underline stub */
.prose a:has(> img) { text-decoration: none; background: none; }

/* ---- header / footer ---- */
.site-header {
  border-bottom: 1px solid var(--rule);
  background: var(--paper-2);
}
.site-header .wrap {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 1rem; padding-top: .9rem; padding-bottom: .9rem;
}
.site-name {
  font-size: 1.15rem; font-weight: 700; letter-spacing: .01em;
  color: var(--ink); text-decoration: none;
}
.site-nav a { margin-left: 1.1rem; color: var(--ink-soft); text-decoration: none; }
.site-nav a:hover { color: var(--accent); }

.site-footer {
  margin-top: 4rem; padding: 2rem 0;
  border-top: 1px solid var(--rule); background: var(--paper-2);
  font-size: .95rem; color: var(--ink-soft);
}
.site-footer p { margin: .2rem 0; }
.muted { color: var(--muted); }

main.wrap { padding-top: 2rem; }

/* ---- hero ---- */
.hero { text-align: center; margin: 1rem 0 2rem; }
.hero h1 { font-size: 2.6rem; margin: 0 0 .3rem; letter-spacing: .01em; }
.hero-tagline { font-size: 1.2rem; color: var(--ink-soft); font-style: italic; margin: 0; }

/* ---- prose ---- */
.prose { }
.prose h1 { font-size: 2rem; line-height: 1.2; margin: 0 0 1rem; }
.prose h2 { font-size: 1.5rem; margin: 2rem 0 .6rem; }
.prose p { margin: 0 0 1.1rem; }
.prose img {
  display: block; max-width: 100%; height: auto; margin: 1.4rem auto .3rem;
  border: 1px solid var(--rule); background: #fff; padding: 4px;
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
}
.prose a img { border-color: var(--rule); }
.prose img + em {          /* image captions */
  display: block; text-align: center; font-size: .85rem;
  color: var(--muted); margin: 0 auto 1.4rem; max-width: 90%; font-style: italic;
}
.prose table { border-collapse: collapse; margin: 1.2rem 0; font-size: .95rem; width: 100%; }
.prose th, .prose td { border: 1px solid var(--rule); padding: .4rem .6rem; text-align: left; vertical-align: top; }
.prose blockquote {
  margin: 1.2rem 0; padding: .3rem 1.1rem; border-left: 3px solid var(--accent);
  color: var(--ink-soft); font-style: italic;
}
.intro { border-bottom: 1px solid var(--rule); padding-bottom: 1.5rem; margin-bottom: 2.5rem; }

/* ---- timeline ---- */
.timeline h2, .people h2 { font-size: 1.6rem; border-bottom: 2px solid var(--accent); padding-bottom: .3rem; }
.timeline-list { list-style: none; margin: 1.2rem 0 0; padding: 0; }
.tl-item {
  display: flex; align-items: flex-start; gap: 1rem;
  padding: .85rem 0; border-bottom: 1px solid var(--rule);
}
.tl-year {
  flex: 0 0 3.4rem; font-weight: 700; font-size: 1.05rem;
  color: var(--accent); text-decoration: none; padding-top: .1rem;
}
.tl-body { flex: 1 1 auto; }
.tl-title { display: block; font-size: 1.15rem; color: var(--ink); text-decoration: none; }
.tl-title:hover { color: var(--accent); text-decoration: underline; }
.tl-tags { display: block; margin-top: .25rem; }
.tl-thumb { flex: 0 0 auto; }
.tl-thumb img { width: 72px; height: 54px; object-fit: cover; border: 1px solid var(--rule); border-radius: 2px; }

/* ---- tags / chips ---- */
.tag {
  display: inline-block; font-size: .8rem; font-family: var(--serif);
  background: var(--paper-2); color: var(--ink-soft); border: 1px solid var(--rule);
  border-radius: 999px; padding: .05rem .6rem; margin: 0 .25rem .25rem 0;
  text-decoration: none; line-height: 1.5;
}
a.tag:hover { border-color: var(--accent); color: var(--accent); }
.tag-sm { font-size: .72rem; padding: 0 .5rem; }

/* ---- people cards ---- */
.card-list {
  list-style: none; padding: 0; margin: 1.2rem 0 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 1rem;
}
.card a { display: block; text-decoration: none; color: var(--ink); }
.card-thumb {
  width: 100%; aspect-ratio: 4/3; object-fit: cover;
  border: 1px solid var(--rule); border-radius: 3px; margin-bottom: .4rem; background: var(--paper-2);
}
.card-title { font-size: 1rem; line-height: 1.3; }
.card a:hover .card-title { color: var(--accent); text-decoration: underline; }
.browse-more { margin-top: 2rem; font-size: 1.05rem; }

.section-note { color: var(--ink-soft); font-style: italic; margin: .2rem 0 1rem; font-size: 1rem; }

/* ---- key records + plain lists ---- */
.key-records { margin-top: 2rem; }
.key-records h3 { font-size: 1.15rem; margin: 0 0 .4rem; color: var(--ink-soft); }
.plain-list { list-style: none; padding: 0; margin: .4rem 0; }
.plain-list li { padding: .18rem 0; border-bottom: 1px dotted var(--rule); }
.plain-list a { text-decoration: none; color: var(--ink); }
.plain-list a:hover { color: var(--accent); }

/* ---- people grid (home + index) ---- */
.people-grid {
  list-style: none; padding: 0; margin: 1.2rem 0 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem;
}
.person-card { }
.person-card a { display: flex; gap: .8rem; align-items: center; text-decoration: none;
  color: var(--ink); border: 1px solid var(--rule); border-radius: 6px; padding: .7rem;
  background: var(--paper-2); transition: border-color .15s; }
.person-card a:hover { border-color: var(--accent); }
.person-thumb { flex: 0 0 auto; width: 64px; height: 64px; object-fit: cover; object-position: top;
  border-radius: 50%; border: 1px solid var(--rule); background: var(--paper); }
.person-thumb--blank { display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; font-weight: 700; color: var(--muted); }
.person-card-body { display: flex; flex-direction: column; }
.person-card-name { font-size: 1.1rem; font-weight: 700; }
.person-card-role { font-size: .85rem; color: var(--ink-soft); }
.person-card-years { font-size: .8rem; color: var(--accent); }

/* ---- person page ---- */
.person-head h1 { font-size: 2.1rem; margin: 0 0 .2rem; }
.person-role { color: var(--ink-soft); font-size: 1.05rem; margin: 0 0 1.2rem; }
.person-years { color: var(--accent); font-weight: 700; }
.person-bio { border-bottom: 1px solid var(--rule); padding-bottom: 1.4rem; }
.person-entries h2 { font-size: 1.4rem; border-bottom: 2px solid var(--accent); padding-bottom: .3rem; margin-top: 1.6rem; }
.undated-label { color: var(--muted); font-size: .85rem; margin: 1rem 0 .2rem; text-transform: uppercase; letter-spacing: .04em; }

/* ---- sources ---- */
.sources { margin-top: 2.4rem; padding-top: 1.2rem; border-top: 1px solid var(--rule); }
.sources h2 { font-size: 1.1rem; color: var(--ink-soft); border: 0; margin: 0 0 .5rem; }
.source-list { margin: 0; padding-left: 1.3rem; font-size: .92rem; color: var(--ink-soft); }
.source-list li { padding: .25rem 0; }
.source-note { color: var(--muted); font-style: italic; }

/* ---- single entry ---- */
.breadcrumb { font-size: .9rem; margin-bottom: .5rem; }
.breadcrumb a { text-decoration: none; color: var(--ink-soft); }
.breadcrumb a:hover { color: var(--accent); }
.entry-head h1 { font-size: 2.1rem; line-height: 1.15; margin: 0 0 .2rem; }
.entry-year { color: var(--accent); font-weight: 700; font-size: 1.1rem; margin: 0 0 1rem; }
.entry-tags { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--rule); }
.tags-label { color: var(--muted); font-size: .85rem; margin-right: .3rem; }

/* ---- tags page ---- */
.tag-cloud { margin: 1rem 0 2.5rem; line-height: 2.2; }
.tag-group { margin: 2rem 0; }
.tag-group h2 { font-size: 1.3rem; border-bottom: 1px solid var(--rule); padding-bottom: .25rem; }
.anchor-top { font-size: .8rem; text-decoration: none; color: var(--muted); }
.tag-entries { list-style: none; padding: 0; margin: .6rem 0; }
.tag-entries li { padding: .15rem 0; }
.tag-entries a { text-decoration: none; color: var(--ink); }
.tag-entries a:hover { color: var(--accent); }
.te-year { display: inline-block; min-width: 3rem; color: var(--accent); font-weight: 700; }

/* ---- responsive ---- */
@media (max-width: 480px) {
  body { font-size: 1.05rem; }
  .hero h1 { font-size: 2rem; }
  .tl-thumb { display: none; }
  .site-header .wrap { flex-direction: column; align-items: flex-start; gap: .3rem; }
}

/* ---- gallery ---- */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1.2rem; margin-top: 1.4rem; }
.gal-item { margin: 0; }
.gal-item img {
  width: 100%; height: 180px; object-fit: cover; display: block;
  border: 1px solid var(--rule); background: #fff; padding: 3px;
  box-shadow: 0 1px 4px rgba(0,0,0,.08); margin: 0;
}
.gal-item a { text-decoration: none; }
.gal-item figcaption { font-size: .8rem; color: var(--ink-soft); margin-top: .35rem; line-height: 1.4; }
.gal-item figcaption a { color: var(--ink-soft); font-weight: 600; text-decoration: none; }
.gal-item figcaption a:hover { color: var(--accent); text-decoration: underline; }
