:root {
  --bg: #faf8f4;
  --frame: #e8dfd2;
  --surface: #ffffff;
  --ink: #1f2328;
  --muted: #5b6168;
  --line: #e4dfd6;
  --accent: #a8322d;
  --accent-dark: #7f2420;
  --header-bg: #a8322d;
  --footer-bg: #6e1f1b;
  --on-red: #ffffff;
  --on-red-soft: #fde3df;
  --read: 48rem;
  --page: 68rem;
  --gutter: 2.5rem;
  --serif: Charter, "Bitstream Charter", "Iowan Old Style", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

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

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

img { max-width: 100%; height: auto; }

a { color: var(--accent); text-underline-offset: 0.15em; }
a:hover { color: var(--accent-dark); }

h1, h2, h3 {
  font-family: var(--sans);
  line-height: 1.2;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2rem, 5vw, 3rem); margin: 0 0 1rem; }
h2 { font-size: 1.5rem; margin: 2.5rem 0 0.75rem; }
h3 { font-size: 1.2rem; margin: 2rem 0 0.5rem; }

.wrap { max-width: var(--page); margin: 0 auto; padding: 0 var(--gutter); }

.skip-link {
  position: absolute; left: -10000px; top: 0;
  background: var(--ink); color: #fff; padding: 0.5rem 1rem;
}
.skip-link:focus { left: 1rem; }

/* The page: a cream panel the same width as the header's content,
   with the tan frame showing on the left and right. */
main {
  max-width: var(--page); margin: 0 auto;
  background: var(--bg);
  box-shadow: 1px 0 0 #d9cfc0, -1px 0 0 #d9cfc0;
  padding-bottom: 4rem;
}

/* Header */
.site-header { background: var(--header-bg); color: var(--on-red); }
.site-header__inner {
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: 0.75rem 2rem; padding-top: 0.75rem; padding-bottom: 0.75rem;
}
.site-name {
  display: inline-flex; align-items: center; gap: 0.75rem;
  font-family: var(--sans); font-weight: 700; font-size: 1.15rem;
  color: var(--on-red); text-decoration: none;
}
.site-name:hover { color: var(--on-red); }
.site-logo {
  width: 2.75rem; height: 2.75rem; flex: none;
  border-radius: 50%; object-fit: cover; object-position: center 25%;
  background: var(--surface);
  box-shadow: 0 0 0 2px var(--on-red);
}
.site-name__tag {
  margin-left: 0.5rem; font-family: var(--mono); font-weight: 400;
  font-size: 0.8rem; color: var(--on-red-soft);
}
.site-nav ul {
  display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem;
  list-style: none; margin: 0; padding: 0;
}
.site-nav a {
  font-family: var(--sans); font-size: 0.95rem;
  color: var(--on-red); text-decoration: none;
}
.site-nav a:hover { color: var(--on-red); text-decoration: underline; }
.site-header a:focus-visible { outline: 2px solid var(--on-red); outline-offset: 3px; }

/* Footer */
.site-footer {
  background: var(--footer-bg);
  font-family: var(--sans); font-size: 0.95rem; color: var(--on-red-soft);
}
.site-footer__inner { padding-top: 2rem; padding-bottom: 2.5rem; }
.site-footer p { margin: 0.25rem 0; }
.site-footer__name { font-weight: 600; color: var(--on-red); }
.site-footer a { color: var(--on-red); text-decoration: underline; }
.site-footer a:hover { color: var(--on-red-soft); }
.site-footer a:focus-visible { outline: 2px solid var(--on-red); outline-offset: 3px; }

/* Shared building blocks */
.eyebrow {
  font-family: var(--mono); font-size: 0.85rem; color: var(--accent);
  margin: 0 0 0.75rem; letter-spacing: 0.02em;
}
.lede { font-size: 1.3rem; color: var(--muted); margin: 0; }
.button {
  display: inline-block; font-family: var(--sans); font-weight: 600;
  background: var(--accent); color: #fff; text-decoration: none;
  padding: 0.7rem 1.2rem; border-radius: 0.4rem;
}
.button:hover { background: var(--accent-dark); color: #fff; }

/* Story pages: the wrap matches the header so the left edges line up;
   the content inside is held to a comfortable reading width. */
.story-hero { padding: 3.5rem 0 1rem; }
.story-hero .wrap > *,
.story-part .wrap > *,
.story-next .wrap > * { max-width: var(--read); }
.story-part h2 { margin-top: 2rem; }
.story-part p { margin: 0 0 1.1rem; }
.story-aside {
  margin-top: 1rem; padding: 1.25rem 1.5rem;
  background: var(--surface); border-left: 3px solid var(--accent);
  border-radius: 0 0.4rem 0.4rem 0;
}
.story-next { margin-top: 2.5rem; }
.story-next .wrap > :first-child { border-top: 1px solid var(--line); padding-top: 1.5rem; }
.story-next ul { list-style: none; padding: 0; margin: 0; font-family: var(--sans); }
.story-next li { margin: 0.5rem 0; }

/* About portrait */
.about-portrait {
  display: block; width: 10rem; height: 10rem;
  margin: 0 0 1.5rem; border-radius: 50%;
  object-fit: cover; border: 3px solid var(--surface);
  box-shadow: 0 0 0 1px var(--line);
}

@media (max-width: 40rem) {
  :root { --gutter: 1.25rem; }
  body { font-size: 1.0625rem; }
  .story-hero { padding-top: 2.25rem; }
  .about-portrait { width: 8rem; height: 8rem; }
  .site-logo { width: 2.25rem; height: 2.25rem; }
}