/*
 * METAMORPHOSIS — From Teraflops to Gigawatts
 * Design v2: warm-paper broadsheet. Fraunces (display) + Source Serif 4 (body)
 * + IBM Plex Mono (labels). Structure follows the essay-series template
 * (masthead / nav / single column / TOC / fine print) with its own identity.
 */

:root {
  --bg: #f7f2e9;
  --ink: #16130e;
  --text: #2b261e;
  --muted: #8a8172;
  --accent: #b4530a;
  --rule: #ddd3c0;
  --rule-strong: #16130e;
}

* {
  box-sizing: border-box;
}

html {
  font-size: 17px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Source Serif 4", "Iowan Old Style", Georgia, serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--ink);
}

.mono {
  font-family: "IBM Plex Mono", "SF Mono", Menlo, monospace;
}

/* ---------- Masthead ---------- */

.site-header {
  margin: 56px auto 0;
  max-width: 1060px;
  padding: 0 24px;
  text-align: center;
}

.site-title {
  margin: 0;
  font-family: "Fraunces", Georgia, serif;
  font-size: 52px;
  font-weight: 900;
  letter-spacing: 0.045em;
  line-height: 1.1;
  color: var(--ink);
}

.site-title a {
  color: var(--ink);
  text-decoration: none;
}

.site-description {
  margin: 14px 0 0;
  font-family: "IBM Plex Mono", monospace;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--accent);
}

.main-navigation {
  margin: 34px auto 0;
  border-top: 1px solid var(--rule-strong);
  border-bottom: 1px solid var(--rule-strong);
  padding: 4px 0;
}

.main-navigation ul {
  margin: 0;
  padding: 0;
  list-style: none;
  text-align: center;
}

.main-navigation li {
  display: inline-block;
}

.main-navigation a {
  display: inline-block;
  padding: 9px 11px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
}

.main-navigation a:hover {
  color: var(--accent);
}

.main-navigation .current-menu-item a {
  color: var(--accent);
}

/* ---------- Article column ---------- */

.site-main {
  max-width: 700px;
  margin: 0 auto;
  padding: 96px 22px 90px;
}

.part-label {
  margin: 0 0 18px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent);
}

.entry-title {
  margin: 0;
  font-family: "Fraunces", Georgia, serif;
  font-size: 44px;
  font-weight: 600;
  line-height: 1.18;
  color: var(--ink);
}

.byline {
  margin: 26px 0 0;
  font-family: "IBM Plex Mono", monospace;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.entry-content {
  margin-top: 44px;
}

.entry-content h2 {
  margin: 56px 0 18px;
  font-family: "Fraunces", Georgia, serif;
  font-size: 30px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--ink);
}

.entry-content p {
  margin: 0 0 24px;
  font-size: 19.5px;
  line-height: 1.65;
}

.entry-content a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 3px;
}

.entry-content a:hover {
  color: var(--accent);
}

.entry-content strong {
  color: var(--ink);
  font-weight: 600;
}

/* Opening drop cap */
.entry-content > p.opener::first-letter {
  float: left;
  font-family: "Fraunces", Georgia, serif;
  font-size: 74px;
  font-weight: 600;
  line-height: 0.82;
  padding: 6px 10px 0 0;
  color: var(--accent);
}

/* Footnote references */
sup.fn {
  font-size: 0.6em;
  line-height: 0;
}

sup.fn a {
  font-family: "IBM Plex Mono", monospace;
  color: var(--accent);
  text-decoration: none;
}

/* ---------- Rules and spacing ---------- */

hr.separator {
  width: 72px;
  height: 3px;
  margin: 44px auto;
  border: 0;
  background: var(--accent);
}

hr.separator.wide {
  width: 100%;
  height: 1px;
  background: var(--rule);
}

.spacer-30 { height: 30px; }
.spacer-20 { height: 20px; }

/* ---------- Table of contents ---------- */

.toc-item {
  margin: 0 0 26px;
}

.toc-item .toc-num {
  font-family: "IBM Plex Mono", monospace;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.08em;
  margin-right: 6px;
}

.toc-item .toc-title {
  font-family: "Fraunces", Georgia, serif;
  font-size: 22px;
  font-weight: 600;
}

.toc-item .toc-title a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 2px solid var(--accent);
}

.toc-item .toc-title a:hover {
  color: var(--accent);
}

.toc-item .toc-desc {
  display: block;
  margin-top: 6px;
  font-size: 17px;
  line-height: 1.55;
  color: var(--text);
}

/* ---------- Next / prev navigation ---------- */

.series-nav {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 30px;
}

.series-nav .slot {
  max-width: 48%;
}

.series-nav .slot.next {
  margin-left: auto;
  text-align: right;
}

.series-nav .label {
  display: block;
  font-family: "IBM Plex Mono", monospace;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}

.series-nav a {
  font-family: "Fraunces", Georgia, serif;
  font-size: 20px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 2px solid var(--accent);
}

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

/* ---------- Footnotes ---------- */

.footnotes {
  margin-top: 26px;
}

.footnotes .footnotes-label {
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 18px;
}

.footnotes ol {
  margin: 0;
  padding-left: 26px;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--text);
}

.footnotes li {
  margin-bottom: 12px;
  padding-left: 4px;
}

.footnotes li::marker {
  font-family: "IBM Plex Mono", monospace;
  font-size: 12.5px;
  color: var(--accent);
}

.footnotes a {
  color: var(--muted);
  text-decoration-color: var(--rule);
  word-break: break-all;
}

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

/* ---------- Fine print / dedication ---------- */

.entry-content p.fine-print {
  font-size: 16.5px;
  line-height: 1.6;
  color: var(--text);
}

/* ---------- Works cited ---------- */

.works-cited h3 {
  margin: 40px 0 14px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
}

.works-cited p {
  font-size: 16px;
  line-height: 1.55;
  margin: 0 0 14px;
  padding-left: 28px;
  text-indent: -28px;
}

.works-cited a {
  color: var(--muted);
  word-break: break-all;
}

/* ---------- Footer ---------- */

.site-footer {
  max-width: 700px;
  margin: 0 auto;
  padding: 0 22px 70px;
  text-align: center;
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- Responsive ---------- */

@media (max-width: 760px) {
  .site-header {
    margin-top: 36px;
  }

  .site-title {
    font-size: 34px;
  }

  .site-description {
    font-size: 11px;
    letter-spacing: 0.22em;
  }

  .site-main {
    padding-top: 56px;
  }

  .entry-title {
    font-size: 32px;
  }

  .entry-content p {
    font-size: 18px;
  }

  .series-nav {
    flex-direction: column;
  }

  .series-nav .slot {
    max-width: 100%;
  }
}
