:root {
  color-scheme: light;
  --paper: #f3efe5;
  --paper-deep: #e8e0d0;
  --ink: #20201d;
  --muted: #68645b;
  --line: #cfc5b2;
  --accent: #9d3d2b;
  --accent-dark: #6e291d;
  --max: 72rem;
}

* { box-sizing: border-box; }

html {
  background: var(--paper-deep);
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(rgba(70, 58, 39, 0.035) 1px, transparent 1px),
    var(--paper);
  background-size: 100% 1.75rem;
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  line-height: 1.65;
}

a { color: inherit; text-decoration-color: color-mix(in srgb, var(--accent) 55%, transparent); text-underline-offset: 0.2em; }
a:hover { color: var(--accent-dark); }

.site-shell {
  width: min(calc(100% - 2rem), var(--max));
  margin: 0 auto;
}

.masthead {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 2rem;
  padding: 2rem 0 1rem;
  border-bottom: 2px solid var(--ink);
}

.wordmark {
  display: inline-flex;
  align-items: baseline;
  gap: 0.75rem;
  text-decoration: none;
}

.wordmark strong {
  font-size: clamp(2rem, 6vw, 4.4rem);
  font-weight: 500;
  letter-spacing: -0.055em;
  line-height: 0.9;
}

.wordmark span,
.eyebrow,
.nav,
.meta,
.kicker,
.footer,
.archive-date {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  text-transform: uppercase;
  letter-spacing: 0.09em;
}

.wordmark span { color: var(--accent); font-size: 0.72rem; }

.nav { display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; font-size: 0.7rem; }
.nav a { text-decoration: none; border-bottom: 1px solid transparent; }
.nav a:hover, .nav a[aria-current="page"] { border-color: var(--accent); color: var(--accent-dark); }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(16rem, 0.75fr);
  gap: clamp(2rem, 6vw, 6rem);
  padding: clamp(3.5rem, 8vw, 7rem) 0;
  border-bottom: 1px solid var(--line);
}

.eyebrow, .kicker, .meta { color: var(--accent-dark); font-size: 0.68rem; }

h1, h2, h3, p { margin-top: 0; }
h1 { max-width: 13ch; margin-bottom: 1.5rem; font-size: clamp(3rem, 8vw, 7.5rem); font-weight: 400; letter-spacing: -0.065em; line-height: 0.88; }
h2 { font-size: clamp(2rem, 4vw, 3.5rem); font-weight: 400; letter-spacing: -0.04em; line-height: 1; }
h3 { font-size: 1.35rem; line-height: 1.15; }

.dek { max-width: 38rem; color: var(--muted); font-size: clamp(1.12rem, 2vw, 1.4rem); }

.hero-note {
  align-self: end;
  padding: 1.5rem 0 0 1.5rem;
  border-left: 3px solid var(--accent);
}
.hero-note p { margin-bottom: 0.75rem; font-size: 1.1rem; }
.hero-note small { color: var(--muted); }

.section { padding: clamp(3rem, 7vw, 6rem) 0; border-bottom: 1px solid var(--line); }
.section-heading { display: grid; grid-template-columns: 1fr 2fr; gap: 2rem; margin-bottom: 3rem; }
.section-heading p { max-width: 34rem; color: var(--muted); }

.notes-list { border-top: 1px solid var(--ink); }
.note-row {
  display: grid;
  grid-template-columns: 7rem minmax(0, 1fr) minmax(12rem, 0.7fr);
  gap: 2rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}
.note-row:hover h3 { color: var(--accent-dark); }
.note-row h3, .note-row p { margin-bottom: 0; }
.note-row p { color: var(--muted); }

.index-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.index-item { min-height: 15rem; padding: 1.5rem; background: var(--paper); }
.index-item:nth-child(2) { background: #ebe6da; }
.index-number { display: block; margin-bottom: 4rem; color: var(--accent); font-size: 0.75rem; font-family: ui-monospace, monospace; }

.article { display: grid; grid-template-columns: minmax(12rem, 0.55fr) minmax(0, 1.45fr); gap: clamp(2rem, 7vw, 7rem); padding: clamp(3.5rem, 8vw, 7rem) 0; }
.article-aside { color: var(--muted); font-size: 0.9rem; }
.article-body { max-width: 46rem; font-size: 1.08rem; }
.article-body h1 { max-width: 16ch; font-size: clamp(2.8rem, 7vw, 6rem); }
.article-body h2 { margin-top: 3rem; font-size: 2rem; }
.article-body blockquote { margin: 2.5rem 0; padding-left: 1.5rem; border-left: 3px solid var(--accent); color: var(--muted); font-size: 1.35rem; }

.archive-list { border-top: 2px solid var(--ink); }
.archive-item { display: grid; grid-template-columns: 8rem 1fr auto; gap: 1.5rem; align-items: baseline; padding: 1.1rem 0; border-bottom: 1px solid var(--line); }
.archive-item a { font-size: 1.15rem; }
.archive-item span:last-child { color: var(--muted); font-size: 0.85rem; }

.footer { display: grid; grid-template-columns: 1fr auto; gap: 2rem; padding: 2rem 0 4rem; color: var(--muted); font-size: 0.65rem; }

@media (max-width: 760px) {
  .masthead, .hero, .section-heading, .article { grid-template-columns: 1fr; }
  .masthead { align-items: start; }
  .note-row { grid-template-columns: 4.5rem 1fr; gap: 1rem; }
  .note-row p { grid-column: 2; }
  .index-grid { grid-template-columns: 1fr; }
  .index-item { min-height: auto; }
  .index-number { margin-bottom: 2rem; }
  .archive-item { grid-template-columns: 5rem 1fr; }
  .archive-item span:last-child { grid-column: 2; }
  .footer { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
