:root {
  --background: #faf8f4;
  --paper: #fffdf9;
  --ink: #11100e;
  --muted: #655d52;
  --soft: #8c8377;
  --rule: #ded6ca;
  --accent: #b88655;
}

[data-theme="dark"] {
  --background: #141210;
  --paper: #1c1a17;
  --ink: #f0ece4;
  --muted: #a89e91;
  --soft: #6b6258;
  --rule: #2e2b27;
  --accent: #c99a6a;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--background);
  color: var(--ink);
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--background);
  color: var(--ink);
  font-family: Newsreader, "Source Serif 4", Georgia, serif;
  font-size: 18px;
  line-height: 1.7;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  width: 100%;
  padding: 22px 30px 16px;
  border-bottom: 1px solid rgba(222, 214, 202, 0.72);
  background: rgba(250, 248, 244, 0.96);
  font-family: Inter, Arial, sans-serif;
}

.header-inner {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) auto;
  align-items: center;
  max-width: 1180px;
  margin: 0 auto;
  gap: 34px;
}

.brand,
.main-nav a,
.text-cta,
.kicker,
.publication-tagline,
.article-meta,
.back-link,
.article-action,
.article-action-status,
.now-ledger h2 {
  font-family: Inter, Arial, sans-serif;
}

.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 30;
  width: 100%;
  height: 3px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left center;
}

.brand {
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  line-height: 1;
}

.main-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(18px, 2.8vw, 32px);
}

.main-nav a {
  position: relative;
  padding: 7px 0 9px;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1;
}

.main-nav a::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 1px;
  background: var(--accent);
  content: "";
  opacity: 0;
  transform: scaleX(0.72);
  transition: opacity 160ms ease, transform 160ms ease;
}

.main-nav a:hover::after,
.main-nav a.active::after {
  opacity: 1;
  transform: scaleX(1);
}

.publication-hero,
.publication-layout,
.essay-page,
.article-shell,
.site-footer {
  max-width: 1180px;
  margin: 0 auto;
  padding-right: 30px;
  padding-left: 30px;
}

.site-footer {
  padding-top: 40px;
  padding-bottom: 40px;
  border-top: 1px solid var(--rule);
}

.footer-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-brand strong {
  font-family: Inter, Arial, sans-serif;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--ink);
}

.footer-brand p {
  margin: 0;
  color: var(--soft);
  font-size: 0.9rem;
  line-height: 1.5;
  max-width: 280px;
}

.footer-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}

.footer-nav {
  display: flex;
  gap: 20px;
}

.footer-nav a {
  font-family: Inter, Arial, sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--muted);
  transition: color 140ms ease;
}

.footer-nav a:hover {
  color: var(--accent);
}

.footer-copy {
  font-family: Inter, Arial, sans-serif;
  font-size: 0.74rem;
  color: var(--soft);
  letter-spacing: 0.03em;
}

.footer-social {
  display: flex;
  gap: 16px;
}

.footer-social a {
  color: var(--soft);
  transition: color 140ms ease;
}

.footer-social a:hover { color: var(--accent); }

.footer-social svg {
  width: 17px;
  height: 17px;
  display: block;
}

.publication-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 0.72fr);
  gap: clamp(54px, 8vw, 104px);
  align-items: center;
  padding-top: 52px;
  padding-bottom: 36px;
}

.publication-tagline,
.kicker {
  margin: 0;
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  line-height: 1.35;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  font-family: "Source Serif 4", Georgia, serif;
}

.publication-hero h1 {
  max-width: 780px;
  margin: 23px 0 28px;
  font-size: 4.55rem;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 0.97;
}

.publication-hero h1 span {
  color: var(--accent);
}

.publication-hero .hero-copy > p:not(.publication-tagline) {
  max-width: 610px;
  margin: 0;
  color: var(--muted);
  font-size: 1.34rem;
  line-height: 1.62;
}

.text-cta {
  display: inline-flex;
  margin-top: 38px;
  border-bottom: 1px solid var(--accent);
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.45;
}

.hero-side {
  margin: 0;
  min-width: 0;
}

.hero-featured {
  display: block;
  margin-bottom: 32px;
  padding: 24px;
  border: 1px solid var(--rule);
  border-radius: 4px;
  background: var(--paper);
  transition: border-color 160ms ease;
}

.hero-featured:hover {
  border-color: var(--accent);
}

.hero-featured-kicker {
  margin: 0 0 10px;
  color: var(--accent);
  font-family: Inter, Arial, sans-serif;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.hero-featured h2 {
  margin: 0 0 10px;
  font-family: Newsreader, "Source Serif 4", Georgia, serif;
  font-size: 1.65rem;
  font-weight: 600;
  line-height: 1.2;
}

.hero-featured:hover h2 {
  color: var(--accent);
}

.hero-featured-excerpt {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.6;
}

.hero-featured-meta {
  color: var(--soft);
  font-family: Inter, Arial, sans-serif;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.hero-side blockquote {
  margin: 0;
  padding: 28px 0 0;
  border-top: 1px solid var(--rule);
}

.hero-quote {
  align-self: end;
  max-width: 380px;
}

.hero-side blockquote p {
  margin: 0 0 8px;
  font-size: 1.38rem;
  font-weight: 600;
  line-height: 1.35;
  overflow-wrap: break-word;
}

.hero-side cite {
  color: var(--muted);
  font-size: 1rem;
  font-style: normal;
}


.publication-layout {
  max-width: 920px;
  padding-top: 36px;
  padding-bottom: clamp(70px, 10vw, 118px);
  border-top: 1px solid var(--rule);
}

.section-heading {
  margin-bottom: 34px;
}

.section-heading h2 {
  max-width: 620px;
  margin: 13px 0 0;
  font-size: 3.1rem;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.06;
}

.essay-feed {
  min-width: 0;
}

.essay-item {
  border-top: 1px solid var(--rule);
}

.essay-item:last-child {
  border-bottom: 1px solid var(--rule);
}

.essay-item a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px 28px;
  padding: 28px 0 30px;
}

.essay-item h3 {
  grid-column: 1;
  margin: 0;
  font-family: Newsreader, "Source Serif 4", Georgia, serif;
  font-size: 1.72rem;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.18;
}

.essay-item p {
  grid-column: 1;
  max-width: 560px;
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.55;
}

.essay-item time {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: start;
  padding-top: 5px;
  color: var(--soft);
  font-family: Inter, Arial, sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.4;
  white-space: nowrap;
}

.essay-item a:hover h3 {
  color: var(--accent);
}

.essay-page {
  padding-top: clamp(86px, 12vw, 142px);
  padding-bottom: 100px;
}

.page-intro {
  max-width: 820px;
  margin-bottom: clamp(56px, 8vw, 86px);
}

.page-intro h1,
.about-story h1 {
  margin: 16px 0 24px;
  font-size: 4.1rem;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.04;
}

.page-intro p,
.about-story p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  font-size: 1.24rem;
  line-height: 1.75;
}

.now-ledger {
  display: grid;
  max-width: 940px;
  border-top: 1px solid var(--rule);
}

.now-ledger div {
  display: grid;
  grid-template-columns: minmax(150px, 0.3fr) minmax(0, 1fr);
  gap: 28px;
  padding: 30px 0;
  border-bottom: 1px solid var(--rule);
}

.now-ledger h2 {
  margin: 0;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  line-height: 1.35;
  text-transform: uppercase;
}

.now-ledger p {
  margin: 0;
  font-size: 2.2rem;
  font-weight: 600;
  line-height: 1.14;
}

.about-story {
  max-width: 820px;
}

.about-story p + p {
  margin-top: 28px;
}

.article-shell {
  padding-top: clamp(72px, 10vw, 118px);
  padding-bottom: 110px;
}

.article-body {
  max-width: 760px;
  margin: 0 auto;
}

.article-header {
  margin-bottom: 24px;
}

.back-link {
  display: inline-flex;
  margin-bottom: 38px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

.article-header h1 {
  margin: 0 0 22px;
  font-size: 4.75rem;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1;
}

.article-deck {
  max-width: 680px;
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 1.38rem;
  line-height: 1.55;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  color: var(--soft);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.article-body > h2 {
  margin: 38px 0 12px;
  font-family: Inter, Arial, sans-serif;
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.35;
}

.article-body > p {
  margin: 0 0 18px;
  font-size: 1.24rem;
  line-height: 1.68;
}

.article-body > ul {
  margin: 0 0 18px;
  padding-left: 1.4em;
  font-size: 1.24rem;
  line-height: 1.68;
  color: var(--ink);
}

.article-body > ul li {
  margin-bottom: 6px;
}
.article-body > blockquote {
  margin: 50px 0;
  padding: 5px 0 5px 28px;
  border-left: 2px solid var(--accent);
  color: var(--ink);
  font-size: 2rem;
  font-weight: 600;
  line-height: 1.3;
}

.quote-block p {
  margin: 0;
}

.copy-quote {
  margin-top: 18px;
  padding: 0;
  border: 0;
  border-bottom: 1px solid var(--accent);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-family: Inter, Arial, sans-serif;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.copy-quote:hover {
  color: var(--ink);
}

.article-toc {
  margin: 0 0 28px;
  padding: 16px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.article-toc h2 {
  margin: 0 0 14px;
  color: var(--accent);
  font-family: Inter, Arial, sans-serif;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  line-height: 1.35;
  text-transform: uppercase;
}

.article-toc nav {
  display: grid;
  gap: 8px;
}

.article-toc a {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.45;
}

.article-toc a:hover {
  color: var(--ink);
}

.article-interactions {
  margin-top: 64px;
  padding-top: 30px;
  border-top: 1px solid var(--rule);
}

.article-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.article-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1;
}

.article-action {
  gap: 8px;
  padding: 0 14px;
}

.article-action svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.article-action:hover,
.article-action:focus-visible {
  border-color: var(--accent);
  color: var(--ink);
}

.article-action-status {
  min-height: 1.4em;
  margin: 14px 0 0;
  color: var(--soft);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── Dark mode toggle ── */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: border-color 160ms ease, color 160ms ease;
  flex-shrink: 0;
}

.theme-toggle:hover {
  border-color: var(--accent);
  color: var(--ink);
}

.theme-toggle svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.icon-moon { display: none; }

[data-theme="dark"] .icon-sun  { display: none; }
[data-theme="dark"] .icon-moon { display: block; }

/* ── Scroll animations ── */
[data-fade] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

[data-fade].is-visible {
  opacity: 1;
  transform: translateY(0);
}

[data-fade-delay="1"] { transition-delay: 0.1s; }
[data-fade-delay="2"] { transition-delay: 0.2s; }
[data-fade-delay="3"] { transition-delay: 0.3s; }
[data-fade-delay="4"] { transition-delay: 0.4s; }

@media (prefers-reduced-motion: reduce) {
  [data-fade] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

@media (max-width: 900px) {
  .header-inner {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .main-nav {
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .publication-hero {
    grid-template-columns: 1fr;
  }

  .publication-hero h1 {
    font-size: 3.65rem;
  }

  .article-header h1,
  .page-intro h1,
  .about-story h1 {
    font-size: 3.35rem;
  }
}

@media (max-width: 560px) {
  body {
    font-size: 17px;
  }

  .site-header,
  .publication-hero,
  .publication-layout,
  .essay-page,
  .article-shell,
  .site-footer {
    padding-right: 20px;
    padding-left: 20px;
  }

  .brand {
    letter-spacing: 0.1em;
  }

  .main-nav {
    flex-wrap: wrap;
    gap: 12px 20px;
  }

  .publication-hero {
    padding-top: 44px;
  }

  .hero-quote {
    max-width: 100%;
  }

  .publication-hero h1 {
    font-size: 2.65rem;
    overflow-wrap: break-word;
  }

  .publication-hero .hero-copy > p:not(.publication-tagline),
  .page-intro p,
  .about-story p,
  .article-deck,
  .article-body > p {
    font-size: 1.1rem;
  }

  .section-heading h2,
  .page-intro h1,
  .about-story h1,
  .article-header h1 {
    font-size: 2.55rem;
    overflow-wrap: break-word;
  }

  .essay-item a {
    grid-template-columns: 1fr;
  }

  .essay-item time {
    grid-column: 1;
    grid-row: auto;
    padding-top: 0;
  }

  .essay-item h3 {
    font-size: 1.55rem;
  }

  .now-ledger div {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .now-ledger p {
    font-size: 1.65rem;
  }

  .article-body > blockquote {
    margin: 38px 0;
    padding-left: 20px;
    font-size: 1.55rem;
  }

  .article-interactions {
    margin-top: 48px;
  }

  .article-action-row {
    display: grid;
    grid-template-columns: 1fr;
  }
}
