:root {
  --paper: #f4f0e7;
  --paper-deep: #ece6da;
  --ink: #191918;
  --muted: #6b685f;
  --rule: #cfc7b9;
  --accent: #5f6958;
  --accent-soft: #dfe3da;
  --max: 1180px;
  --reading: 720px;
  --serif: Georgia, 'Times New Roman', Times, serif;
  --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --shadow: 0 18px 50px rgba(37,31,22,.08);
}

html[data-theme="dark"] {
  --paper: #171713;
  --paper-deep: #201f19;
  --ink: #f1ecdf;
  --muted: #aaa597;
  --rule: #3d3a32;
  --accent: #aeb9a2;
  --accent-soft: #292e27;
  --shadow: 0 18px 50px rgba(0,0,0,.28);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .18em; }
button, input { font: inherit; }
::selection { background: var(--accent-soft); }

.skip-link { position: fixed; top: .8rem; left: .8rem; transform: translateY(-160%); background: var(--ink); color: var(--paper); padding: .6rem .9rem; z-index: 100; }
.skip-link:focus { transform: translateY(0); }
.top-rule { height: 4px; background: var(--ink); }
.shell { width: min(calc(100% - 40px), var(--max)); margin-inline: auto; }

.site-header { min-height: 100px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 2rem; border-bottom: 1px solid var(--rule); }
.compact-header { min-height: 84px; }
.brand { display: inline-flex; flex-direction: column; width: max-content; text-decoration: none; line-height: .92; letter-spacing: .03em; }
.brand-kicker { font-family: var(--sans); font-size: .58rem; font-weight: 800; letter-spacing: .38em; margin-left: .18em; margin-bottom: .24rem; }
.brand-name { font-family: var(--serif); font-size: 1.34rem; font-weight: 700; letter-spacing: .09em; }
.site-nav { display: flex; gap: 1.45rem; align-items: center; font-family: var(--sans); font-size: .74rem; text-transform: uppercase; letter-spacing: .12em; }
.site-nav a { text-decoration: none; border-bottom: 1px solid transparent; }
.site-nav a:hover { border-color: var(--ink); }
.header-actions { display: flex; align-items: center; justify-content: flex-end; gap: .8rem; }
.icon-button, .nav-toggle { border: 1px solid var(--rule); background: transparent; color: var(--ink); border-radius: 999px; min-width: 38px; height: 38px; cursor: pointer; }
.nav-toggle { display: none; padding-inline: .9rem; width: auto; font-family: var(--sans); font-size: .75rem; }
.subscribe-link { font-family: var(--sans); font-size: .72rem; text-transform: uppercase; letter-spacing: .12em; text-decoration: none; padding: .66rem .95rem; border: 1px solid var(--ink); border-radius: 999px; }
.subscribe-link:hover { background: var(--ink); color: var(--paper); }

.eyebrow, .small-label, .story-kicker { font-family: var(--sans); font-size: .68rem; text-transform: uppercase; letter-spacing: .16em; color: var(--muted); margin: 0 0 1rem; }

.hero { min-height: 520px; padding: 7.5rem 0 5.5rem; display: grid; grid-template-columns: minmax(0, 1fr) 240px; align-items: end; gap: 4rem; }
.hero-copy { max-width: 830px; }
.hero h1 { font-size: clamp(3.9rem, 8vw, 7.4rem); line-height: .9; margin: 0; letter-spacing: -.045em; font-weight: 500; }
.hero h1 a { text-decoration: none; }
.hero-intro { max-width: 700px; font-size: 1.28rem; color: var(--muted); margin: 2rem 0 0; }
.hero-meta { display: flex; gap: 1.25rem; margin-top: 1.7rem; font-family: var(--sans); font-size: .68rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.hero-read { margin-top: 1.5rem; }
.journey-mark { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .8rem; padding-bottom: 1.3rem; }
.journey-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink); }
.journey-line { height: 1px; background: var(--rule); }
.journey-arrow { font-family: var(--sans); color: var(--muted); }
.text-link { display: inline-block; font-family: var(--sans); text-transform: uppercase; letter-spacing: .12em; font-size: .7rem; font-weight: 700; text-decoration: none; }

.section-strip { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--ink); border-bottom: 1px solid var(--rule); }
.section-strip a { min-height: 150px; padding: 1.35rem 1.4rem 1.5rem; text-decoration: none; border-right: 1px solid var(--rule); display: flex; flex-direction: column; }
.section-strip a:last-child { border-right: 0; }
.section-strip span, .section-strip small { font-family: var(--sans); font-size: .65rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.section-strip strong { font-size: 1.5rem; font-weight: 500; margin: auto 0 .25rem; }
.section-strip a:hover { background: var(--paper-deep); }

.section { padding: 6rem 0; }
.section-tinted { background: var(--paper-deep); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.section-heading { display: flex; justify-content: space-between; align-items: end; margin-bottom: 2.2rem; }
.section-heading h2, .empty-section h2 { font-size: clamp(2.5rem, 5vw, 4.6rem); line-height: .95; font-weight: 500; letter-spacing: -.035em; margin: 0; }
.latest-piece { display: grid; grid-template-columns: 70px minmax(0, 1fr) auto; gap: 2rem; align-items: center; padding: 2.5rem 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--rule); }
.latest-number { font-family: var(--sans); font-size: .7rem; color: var(--muted); }
.latest-copy h3 { font-size: clamp(2rem, 4vw, 3.5rem); font-weight: 500; line-height: 1; letter-spacing: -.025em; margin: .25rem 0 1rem; }
.latest-copy h3 a { text-decoration: none; }
.latest-copy > p:last-child { color: var(--muted); max-width: 680px; margin-bottom: 0; }
.latest-arrow { text-decoration: none; font-size: 2rem; font-family: var(--sans); padding: 1rem; }
.quiet-note { margin: 1.4rem 0 0; color: var(--muted); font-style: italic; }

.empty-section { display: grid; grid-template-columns: 1.2fr .8fr; gap: 5rem; align-items: end; }
.empty-section > p { color: var(--muted); max-width: 460px; font-size: 1.08rem; margin: 0; }

.books-section { padding: 6.5rem 0; display: grid; grid-template-columns: 1fr 320px; align-items: center; gap: 6rem; border-top: 1px solid var(--rule); }
.books-copy h2 { font-size: clamp(2.8rem, 5vw, 5rem); line-height: .95; font-weight: 500; letter-spacing: -.035em; margin: 0 0 1.4rem; }
.books-copy p:not(.eyebrow) { max-width: 610px; color: var(--muted); font-size: 1.1rem; }
.book-placeholder { aspect-ratio: .68; background: var(--ink); color: var(--paper); padding: 2rem; display: flex; flex-direction: column; justify-content: space-between; box-shadow: var(--shadow); }
.book-placeholder span, .book-placeholder small { font-family: var(--sans); font-size: .68rem; text-transform: uppercase; letter-spacing: .14em; }
.book-placeholder strong { font-size: 2.6rem; line-height: .95; font-weight: 500; }

.subscribe-section { background: var(--ink); color: var(--paper); padding: 5rem 0; }
.subscribe-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 5rem; align-items: end; }
.subscribe-inner h2 { font-size: clamp(2.2rem, 4vw, 3.5rem); line-height: 1; margin: 0 0 1rem; font-weight: 500; }
.subscribe-inner p { color: color-mix(in srgb, var(--paper) 72%, transparent); }
.subscribe-form label { display: block; font-family: var(--sans); font-size: .68rem; text-transform: uppercase; letter-spacing: .12em; margin-bottom: .6rem; }
.subscribe-row { display: flex; gap: .6rem; }
.subscribe-row input { flex: 1; min-width: 0; background: transparent; color: var(--paper); border: 1px solid color-mix(in srgb, var(--paper) 45%, transparent); padding: .9rem 1rem; border-radius: 0; }
.subscribe-row button { border: 1px solid var(--paper); background: var(--paper); color: var(--ink); padding: .9rem 1.2rem; cursor: pointer; }
.subscribe-form small { display: block; margin-top: .8rem; color: color-mix(in srgb, var(--paper) 55%, transparent); font-family: var(--sans); font-size: .7rem; }

.site-footer { min-height: 170px; padding: 2.5rem 0; display: grid; grid-template-columns: 1fr auto auto; align-items: start; gap: 3rem; border-top: 1px solid var(--rule); font-family: var(--sans); }
.site-footer strong { font-family: var(--serif); font-size: 1.1rem; }
.site-footer p { margin: .4rem 0 0; color: var(--muted); font-size: .75rem; }
.footer-links { display: flex; gap: 1.2rem; font-size: .75rem; }
.copyright { white-space: nowrap; }

.article-shell { width: min(calc(100% - 40px), 900px); margin: 0 auto; }
.article-header { padding: 6.5rem 0 3.5rem; border-bottom: 1px solid var(--rule); }
.article-header h1 { font-size: clamp(3.2rem, 7vw, 6.1rem); line-height: .92; font-weight: 500; letter-spacing: -.045em; margin: 0 0 1.5rem; }
.article-deck { font-size: 1.28rem; color: var(--muted); max-width: 760px; }
.article-meta { display: flex; gap: 1.5rem; margin-top: 2rem; font-family: var(--sans); font-size: .68rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.prose { width: min(100%, var(--reading)); margin: 4.5rem auto; font-size: 1.15rem; }
.prose p { margin: 0 0 1.5em; }
.prose .lead { font-size: 1.36rem; line-height: 1.6; }
.prose h2 { font-size: 2.05rem; line-height: 1.15; font-weight: 500; margin: 2.2em 0 .7em; }
.prose blockquote { margin: 2.5rem -3rem; padding: 1rem 2.5rem; border-left: 2px solid var(--ink); font-size: 1.45rem; font-style: italic; }
.prose hr { border: 0; height: 1px; background: var(--rule); margin: 3.5rem 0; }
.article-footer { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; padding: 2.5rem 0 6rem; border-top: 1px solid var(--rule); }
.article-signature { display: flex; flex-direction: column; }
.article-next { text-align: right; }
.article-next span { display: block; font-family: var(--sans); font-size: .68rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.article-next a { font-size: 1.2rem; }
.reading-progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; background: var(--accent); z-index: 200; }

.about-shell { width: min(calc(100% - 40px), 1040px); margin: 0 auto; padding: 6.5rem 0; }
.about-shell > h1 { font-size: clamp(3.8rem, 8vw, 7rem); line-height: .86; letter-spacing: -.045em; font-weight: 500; margin: 0 0 4rem; }
.about-grid { display: grid; grid-template-columns: 1.45fr .7fr; gap: 5rem; }
.about-prose { margin: 0; width: 100%; }
.about-facts { border-top: 1px solid var(--ink); }
.about-facts div { padding: 1.2rem 0; border-bottom: 1px solid var(--rule); }
.about-facts span { display: block; font-family: var(--sans); font-size: .65rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin-bottom: .3rem; }
.about-facts strong { font-weight: 500; }

.not-found { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; }
.centered-brand { margin-bottom: 5rem; }
.not-found h1 { font-size: clamp(3rem, 8vw, 6rem); font-weight: 500; margin: .3rem 0 1rem; }
.not-found p:not(.eyebrow) { color: var(--muted); }

@media (max-width: 900px) {
  .site-header { grid-template-columns: 1fr auto auto; }
  .nav-toggle { display: inline-flex; align-items: center; }
  .site-nav { display: none; position: absolute; top: 104px; left: 20px; right: 20px; background: var(--paper); border: 1px solid var(--rule); padding: 1rem; z-index: 50; flex-direction: column; align-items: stretch; box-shadow: var(--shadow); }
  .site-nav.open { display: flex; }
  .article-nav { position: static; display: none; }
  .subscribe-link { display: none; }
  .hero { grid-template-columns: 1fr; min-height: 450px; padding-top: 5.5rem; }
  .journey-mark { max-width: 260px; }
  .section-strip { grid-template-columns: repeat(2, 1fr); }
  .section-strip a:nth-child(2) { border-right: 0; }
  .section-strip a:nth-child(-n+2) { border-bottom: 1px solid var(--rule); }
  .empty-section { grid-template-columns: 1fr; gap: 1.5rem; }
  .books-section { grid-template-columns: 1fr; }
  .book-placeholder { width: min(100%, 320px); }
  .subscribe-inner { grid-template-columns: 1fr; gap: 2rem; }
  .site-footer { grid-template-columns: 1fr; gap: 1rem; }
  .about-grid { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .shell, .article-shell, .about-shell { width: min(calc(100% - 28px), var(--max)); }
  .site-header { min-height: 84px; gap: .8rem; }
  .brand-name { font-size: 1.08rem; }
  .hero { padding: 4.5rem 0 3.8rem; min-height: 410px; }
  .hero h1 { font-size: clamp(3.4rem, 15vw, 5rem); }
  .hero-intro { font-size: 1.1rem; }
  .section-strip { grid-template-columns: 1fr; }
  .section-strip a { min-height: 116px; border-right: 0; border-bottom: 1px solid var(--rule); }
  .section-strip a:last-child { border-bottom: 0; }
  .section { padding: 4.5rem 0; }
  .latest-piece { grid-template-columns: 40px minmax(0, 1fr); gap: 1rem; }
  .latest-arrow { display: none; }
  .books-section { padding: 4.5rem 0; gap: 3rem; }
  .subscribe-row { flex-direction: column; }
  .article-header { padding-top: 4.5rem; }
  .article-meta { flex-wrap: wrap; gap: .7rem 1.2rem; }
  .prose { font-size: 1.07rem; margin: 3.5rem auto; }
  .prose blockquote { margin-inline: 0; padding-left: 1.2rem; font-size: 1.28rem; }
  .article-footer { grid-template-columns: 1fr; }
  .article-next { text-align: left; }
}

/* Cloudflare/Substack integration layer — additive only. */
.prose img,
.prose video,
.prose iframe {
  max-width: 100%;
  height: auto;
}
.prose figure { margin: 2.2rem 0; }
.prose figcaption {
  margin-top: .6rem;
  color: var(--muted);
  font-family: var(--sans);
  font-size: .75rem;
  line-height: 1.5;
}
.prose ul, .prose ol { padding-left: 1.4rem; margin: 0 0 1.5em; }
.prose li { margin: .35em 0; }
.prose a { overflow-wrap: anywhere; }
.prose pre {
  overflow-x: auto;
  padding: 1rem;
  border: 1px solid var(--rule);
  background: var(--paper-deep);
  font-size: .9rem;
}
.prose code { font-size: .92em; }
.category-list .latest-piece:first-of-type { border-top-color: var(--ink); }
.category-list .latest-piece + .latest-piece { border-top: 0; }
.section-more {
  display: inline-block;
  margin-top: 1.5rem;
  font-family: var(--sans);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  text-decoration: none;
}
.section-more:hover { text-decoration: underline; }
.source-note {
  width: min(100%, var(--reading));
  margin: -2.5rem auto 4.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-family: var(--sans);
  font-size: .72rem;
}
.source-note a { color: inherit; }
.status-box {
  margin: 3rem 0;
  padding: 1.2rem 1.4rem;
  border: 1px solid var(--rule);
  background: var(--paper-deep);
  color: var(--muted);
}
.subscribe-row .subscribe-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--paper);
  background: var(--paper);
  color: var(--ink);
  padding: .9rem 1.2rem;
  text-decoration: none;
  white-space: nowrap;
}
.archive-header {
  padding: 6rem 0 2rem;
  border-bottom: 1px solid var(--rule);
}
.archive-header h1 {
  margin: 0;
  font-size: clamp(3.2rem, 7vw, 6.2rem);
  line-height: .9;
  letter-spacing: -.045em;
  font-weight: 500;
}
.archive-list { padding: 2rem 0 6rem; }
.archive-empty { color: var(--muted); font-style: italic; }
.book-placeholder.dynamic-book strong { font-size: clamp(1.8rem, 3vw, 2.6rem); }
.book-placeholder.dynamic-book a { color: inherit; text-decoration: none; }
.paywall-note {
  margin: 3rem 0 0;
  padding: 1.2rem 1.4rem;
  border: 1px solid var(--rule);
  background: var(--paper-deep);
  font-family: var(--sans);
  font-size: .82rem;
}
.paywall-note a { font-weight: 700; }
@media (max-width: 620px) {
  .archive-header { padding-top: 4.2rem; }
}
