/* research.gradstudent.me
 * Aesthetic: research preprint, but for the web.
 * Cool ink-on-paper · Spectral body · IBM Plex Mono chrome ·
 * spec-sheet article headers · blueprint-grid background.
 */

/* ─────────────────────────────────────────────────── Tokens ─── */

:root,
[data-theme="paper"] {
  --bg: #FBFBFA;
  --bg-soft: #F4F2EC;
  --ink: #0F1419;
  --mute: #5A5F69;
  --dim: #9095A0;
  --accent: #1F3A93;
  --spot: #B23A48;
  --rule: #0F1419;
  --rule-soft: rgba(15, 20, 25, 0.12);
  --code-bg: #F4F2EC;
  --grid: rgba(15, 20, 25, 0.022);
  --panel: rgba(251, 251, 250, 0.86);
  --panel-edge: rgba(15, 20, 25, 0.05);
  --selection-bg: rgba(31, 58, 147, 0.18);

  --kw: #B23A48;
  --str: #1F3A93;
  --const: #6B4FBB;
  --comment: #5A5F69;
  --num: #6B4FBB;
}

[data-theme="ink"] {
  --bg: #0F1419;
  --bg-soft: #181D24;
  --ink: #E8E6DE;
  --mute: #9095A0;
  --dim: #5A6068;
  --accent: #93B5FF;
  --spot: #FF8A95;
  --rule: #E8E6DE;
  --rule-soft: rgba(232, 230, 222, 0.14);
  --code-bg: #181D24;
  --grid: rgba(232, 230, 222, 0.025);
  --panel: rgba(15, 20, 25, 0.78);
  --panel-edge: rgba(232, 230, 222, 0.06);
  --selection-bg: rgba(147, 181, 255, 0.22);

  --kw: #FF8A95;
  --str: #93B5FF;
  --const: #C4A6FF;
  --comment: #9095A0;
  --num: #C4A6FF;
}

/* ─────────────────────────────────────────── Reset · Base ─── */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: 'Spectral', 'Source Serif 4', 'Georgia', serif;
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  font-feature-settings: "kern", "liga", "onum";
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;

  /* Blueprint-grid background — tactile, not loud */
  background-image:
    linear-gradient(to right, var(--grid) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid) 1px, transparent 1px);
  background-size: 32px 32px;
  background-attachment: fixed;
}

::selection { background: var(--selection-bg); }

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

/* Mono helper, used everywhere */
.mono {
  font-family: 'IBM Plex Mono', 'JetBrains Mono', ui-monospace, monospace;
  font-feature-settings: "ss01";
}

/* ─────────────────────────────────────────────── Header ─── */

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 28px 32px 20px;
  max-width: 1100px;
  margin: 0 auto;
  border-bottom: 1.5px solid var(--rule);
  position: relative;
}

.site-header::after {
  /* The double-rule that says "scholarly journal" */
  content: '';
  position: absolute;
  left: 32px;
  right: 32px;
  bottom: -5px;
  border-bottom: 1px solid var(--rule);
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 14px;
  text-decoration: none;
  color: var(--ink);
}

.brand-mark {
  font-family: 'Spectral', serif;
  font-style: italic;
  font-weight: 500;
  font-size: 26px;
  letter-spacing: -0.01em;
  line-height: 1;
}

.brand-period {
  color: var(--spot);
  font-style: normal;
}

.brand-sub {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  font-weight: 400;
  color: var(--mute);
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.06em;
}

.site-nav a {
  color: var(--mute);
  text-decoration: none;
  transition: color 0.15s ease;
  position: relative;
}
.site-nav a:hover { color: var(--ink); }
.site-nav a:hover::before {
  content: '§';
  position: absolute;
  left: -12px;
  color: var(--spot);
}

.theme-toggle {
  border: 1px solid var(--rule);
  background: transparent;
  width: 22px;
  height: 22px;
  cursor: pointer;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}
.theme-toggle:hover { background: var(--ink); }
.theme-toggle:hover .theme-toggle-glyph { background: var(--bg); }

.theme-toggle-glyph {
  width: 8px;
  height: 8px;
  background: var(--ink);
  transition: background 0.15s ease;
}

.admin-pill {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 3px 8px;
  border: 1px solid var(--spot);
  color: var(--spot) !important;
  text-decoration: none;
}
.admin-pill:hover { background: var(--spot); color: var(--bg) !important; }

/* ─────────────────────────────────────────────── Footer ─── */

.site-footer {
  max-width: 1100px;
  margin: 96px auto 32px;
  padding: 24px 32px;
  border-top: 1.5px solid var(--rule);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11.5px;
  color: var(--mute);
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
}

.footer-row {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 16px;
  align-items: baseline;
}

.footer-label {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--dim);
  font-size: 10px;
}

.footer-value em {
  font-family: 'Spectral', serif;
  font-style: italic;
  font-size: 13px;
  color: var(--ink);
}

.site-footer a {
  color: var(--mute);
  text-decoration: none;
  border-bottom: 1px dotted var(--dim);
}
.site-footer a:hover { color: var(--accent); border-bottom-color: var(--accent); }
.site-footer .sep { color: var(--dim); margin: 0 6px; }
.footer-admin-link { opacity: 0.6; }

/* ─────────────────────────────────────────── Page chrome ─── */

.page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 56px 32px 0;
}

/* ─────────────────────────────────────────────── Index ─── */

.page-index {
  max-width: 1100px;
}

.index-hero {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 48px;
  align-items: baseline;
  margin-bottom: 64px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--rule-soft);
}

.index-hero-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--dim);
}

.index-hero-content h1 {
  font-family: 'Spectral', serif;
  font-style: italic;
  font-weight: 400;
  font-size: clamp(36px, 6vw, 56px);
  line-height: 1.05;
  margin: 0 0 18px;
  color: var(--ink);
  letter-spacing: -0.012em;
}

.index-hero-content .dek {
  margin: 0;
  color: var(--mute);
  font-size: 19px;
  line-height: 1.5;
  max-width: 56ch;
}

.index-hero-content .dek::before {
  content: '— ';
  color: var(--spot);
}

.year-group { margin-bottom: 64px; }

.year-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--dim);
  margin: 0 0 16px;
  padding-bottom: 10px;
  border-bottom: 1.5px solid var(--rule);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.year-label::after {
  content: attr(data-count);
  color: var(--mute);
}

.post-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.post-item {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 48px;
  padding: 24px 0;
  border-bottom: 1px solid var(--rule-soft);
  align-items: baseline;
}
.post-item:last-child { border-bottom: none; }

.post-meta {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11.5px;
  color: var(--dim);
  text-transform: lowercase;
  letter-spacing: 0.06em;
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-start;
  padding-top: 6px;
}

.post-meta-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.post-meta-key {
  color: var(--dim);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  width: 56px;
  flex-shrink: 0;
}
.post-meta-val { color: var(--mute); }

.post-tags { color: var(--mute); }
.tag-link {
  color: var(--mute);
  text-decoration: none;
  border-bottom: 1px dotted var(--dim);
}
.tag-link:hover { color: var(--accent); border-bottom-color: var(--accent); }

.draft-badge {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  background: var(--spot);
  color: var(--bg);
  padding: 2px 7px;
  margin-left: 4px;
}

.post-title {
  font-family: 'Spectral', serif;
  font-weight: 500;
  font-size: 26px;
  line-height: 1.2;
  margin: 0 0 8px;
  letter-spacing: -0.005em;
}
.post-title a {
  color: var(--ink);
  text-decoration: none;
  background-image: linear-gradient(var(--accent), var(--accent));
  background-size: 0 1.5px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  transition: background-size 0.32s cubic-bezier(0.4, 0, 0.2, 1), color 0.15s ease;
}
.post-title a:hover {
  color: var(--accent);
  background-size: 100% 1.5px;
}

.post-dek {
  margin: 0;
  color: var(--mute);
  font-size: 17px;
  line-height: 1.55;
  max-width: 64ch;
}

/* ─────────────────────────────────────────────── Tags ─── */

.tags-cloud {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 4px 32px;
  font-family: 'IBM Plex Mono', monospace;
}
.tags-cloud li {
  font-size: 13px;
  padding: 8px 0;
  border-bottom: 1px solid var(--rule-soft);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.tags-cloud a {
  color: var(--ink);
  text-decoration: none;
}
.tags-cloud a:hover { color: var(--accent); }
.tag-count {
  color: var(--dim);
  font-size: 11px;
}

.tag-page-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--dim);
  margin: 0 0 6px;
}

/* Empty */
.empty {
  padding: 64px 0;
  color: var(--mute);
  font-style: italic;
  text-align: center;
}
.empty code {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 14px;
  background: var(--code-bg);
  padding: 2px 6px;
  border: 1px solid var(--rule-soft);
}

/* ─────────────────────────────────────────────── Post ─── */

.page-post { max-width: 1100px; padding-bottom: 32px; }

.post {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 48px;
  align-items: start;
}

.back-link {
  display: inline-block;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: var(--mute);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}
.back-link:hover { color: var(--spot); }

/* Spec-sheet header — left rail */
.post-aside {
  position: sticky;
  top: 32px;
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.spec-sheet {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  display: flex;
  flex-direction: column;
  border-top: 1.5px solid var(--rule);
  padding-top: 16px;
}

.spec-row {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 12px;
  padding: 6px 0;
  border-bottom: 1px dashed var(--rule-soft);
  align-items: baseline;
}
.spec-row:last-child { border-bottom: none; }

.spec-key {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 10px;
  color: var(--dim);
}
.spec-val { color: var(--ink); }
.spec-val a { color: var(--ink); border-bottom: 1px dotted var(--dim); text-decoration: none; }
.spec-val a:hover { color: var(--accent); border-bottom-color: var(--accent); }

/* Right column — title + body */
.post-main {
  min-width: 0;
  background: var(--panel);
  padding: 28px 36px 36px;
  box-shadow: 0 0 0 1px var(--panel-edge);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.post-eyebrow {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--dim);
  margin-bottom: 20px;
  display: flex;
  align-items: baseline;
  gap: 12px;
}
.post-eyebrow::before {
  content: '';
  display: inline-block;
  width: 24px;
  height: 1.5px;
  background: var(--spot);
  vertical-align: middle;
  position: relative;
  top: -3px;
}

.post-title-h1 {
  font-family: 'Spectral', serif;
  font-weight: 500;
  font-size: clamp(32px, 4.5vw, 48px);
  line-height: 1.1;
  margin: 0 0 20px;
  color: var(--ink);
  letter-spacing: -0.018em;
  max-width: 24ch;
}

.post-dek-h {
  font-family: 'Spectral', serif;
  font-style: italic;
  margin: 0 0 20px;
  color: var(--mute);
  font-size: 21px;
  line-height: 1.4;
  font-weight: 400;
  max-width: 56ch;
}

.updated-stamp {
  margin: 0;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  color: var(--dim);
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

/* Hero stat — the "31,638" tile */
.hero-stat {
  margin: 32px 0 40px;
  padding: 28px 0;
  border-top: 1.5px solid var(--rule);
  border-bottom: 1.5px solid var(--rule);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 32px;
  align-items: center;
}

.hero-stat-num {
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 300;
  font-size: clamp(56px, 9vw, 96px);
  line-height: 0.9;
  color: var(--accent);
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}

.hero-stat-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--mute);
  line-height: 1.5;
  max-width: 28ch;
}
.hero-stat-label::before {
  content: '↳ ';
  color: var(--spot);
}

/* TOC — mono, paper-style */
.toc {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  border-top: 1px solid var(--rule-soft);
  padding-top: 14px;
  margin-top: 8px;
}
.toc-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--dim);
  margin: 0 0 10px;
}
.toc ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
  counter-reset: toc-section;
}
.toc ul ul {
  padding-left: 18px;
  margin-top: 4px;
  font-size: 10.5px;
}
.toc > ul > li {
  counter-increment: toc-section;
  margin: 6px 0;
  position: relative;
  padding-left: 24px;
}
.toc > ul > li::before {
  content: '§' counter(toc-section);
  position: absolute;
  left: 0;
  color: var(--dim);
  font-size: 10px;
}
.toc li ul li::before { content: none; }
.toc a {
  color: var(--mute);
  text-decoration: none;
  line-height: 1.5;
}
.toc a:hover { color: var(--accent); }

/* ─────────────────────────────────────────── Post body ─── */

.post-body {
  font-size: 18px;
  line-height: 1.65;
  color: var(--ink);
  max-width: 68ch;
  counter-reset: section;
}

.post-body > * + * { margin-top: 1.1em; }

.post-body p {
  margin: 0 0 1.1em;
  hyphens: auto;
  -webkit-hyphens: auto;
}

/* h2 = section, with §N counter */
.post-body h2 {
  font-family: 'Spectral', serif;
  font-style: italic;
  font-weight: 500;
  font-size: 28px;
  line-height: 1.2;
  margin: 2.4em 0 0.5em;
  color: var(--ink);
  letter-spacing: -0.012em;
  counter-increment: section;
  counter-reset: subsection;
  position: relative;
  padding-top: 0.6em;
  border-top: 1px solid var(--rule-soft);
}

.post-body h2::before {
  content: '§' counter(section);
  font-family: 'IBM Plex Mono', monospace;
  font-style: normal;
  font-weight: 400;
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--spot);
  display: block;
  margin-bottom: 0.6em;
  text-transform: uppercase;
}

.post-body h3 {
  font-family: 'Spectral', serif;
  font-weight: 600;
  font-size: 19px;
  line-height: 1.3;
  margin: 1.8em 0 0.4em;
  color: var(--ink);
  counter-increment: subsection;
}

.post-body h3::before {
  content: counter(section) '.' counter(subsection) '  ';
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 400;
  color: var(--dim);
  font-size: 14px;
  letter-spacing: 0.04em;
}

.post-body h4 {
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 500;
  font-size: 12px;
  line-height: 1.3;
  margin: 1.6em 0 0.4em;
  color: var(--mute);
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

/* Anchor links on hover */
.post-body h2 .anchor,
.post-body h3 .anchor {
  display: inline-block;
  margin-left: 10px;
  color: var(--dim);
  text-decoration: none;
  opacity: 0;
  transition: opacity 0.15s ease;
  font-weight: 400;
  font-style: normal;
  font-size: 0.7em;
}
.post-body h2:hover .anchor,
.post-body h3:hover .anchor { opacity: 1; }
.post-body .anchor:hover { color: var(--spot); }

/* Body links */
.post-body a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-skip-ink: auto;
  transition: text-decoration-thickness 0.15s ease;
}
.post-body a:hover { text-decoration-thickness: 2.5px; }

/* Strong / emphasis — small drop into spot color for strong */
.post-body strong { color: var(--ink); font-weight: 600; }
.post-body em { font-style: italic; }

/* Lists */
.post-body ul, .post-body ol {
  padding-left: 1.6em;
  margin: 0 0 1.1em;
}
.post-body li { margin-bottom: 0.4em; }
.post-body li > p { margin-bottom: 0.4em; }
.post-body ul li::marker { color: var(--spot); }

/* Blockquote — set as a marginal aside */
.post-body blockquote {
  margin: 1.6em 0;
  padding: 4px 0 4px 24px;
  border-left: 2px solid var(--spot);
  color: var(--mute);
  font-style: italic;
}
.post-body blockquote p { margin: 0 0 0.6em; }

/* Inline code */
.post-body code {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.85em;
  background: var(--code-bg);
  padding: 1px 6px;
  border: 1px solid var(--rule-soft);
  color: var(--ink);
  font-feature-settings: "ss01";
}

/* Code block — break out wider than prose */
.post-body pre {
  background: var(--code-bg);
  border: 1px solid var(--rule-soft);
  border-left: 3px solid var(--accent);
  padding: 18px 22px;
  overflow-x: auto;
  margin: 1.6em 0;
  font-size: 13.5px;
  line-height: 1.55;
  width: calc(100% + 80px);
  margin-left: -40px;
  position: relative;
}

.post-body pre::before {
  content: '> code';
  position: absolute;
  top: 6px;
  right: 12px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--dim);
}

.post-body pre code {
  background: transparent;
  border: none;
  padding: 0;
  font-size: 13.5px;
  color: var(--ink);
}

@media (max-width: 900px) {
  .post-body pre {
    width: 100%;
    margin-left: 0;
    border-left: 3px solid var(--accent);
  }
}

/* Figures — break out slightly wider than prose, panel-anchored */
.post-body figure {
  margin: 2em -16px;
  padding: 0;
  text-align: center;
}
.post-body figure img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  border: 1.5px solid var(--rule);
  background: #FBFBFA;
  box-shadow: 0 1px 0 rgba(15, 20, 25, 0.04);
}
[data-theme="ink"] .post-body figure img {
  border-color: rgba(232, 230, 222, 0.18);
  box-shadow: 0 0 0 1px rgba(232, 230, 222, 0.04), 0 6px 24px rgba(0, 0, 0, 0.35);
}
.post-body figure figcaption {
  font-family: 'Spectral', serif;
  font-style: italic;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--mute);
  margin: 14px auto 0;
  padding: 0 24px;
  max-width: 60ch;
  text-align: left;
}
.post-body figure figcaption .fig-num {
  font-family: 'IBM Plex Mono', monospace;
  font-style: normal;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--spot);
  margin-right: 8px;
}
@media (max-width: 640px) {
  .post-body figure { margin: 1.6em 0; }
}

/* Pygments tokens */
.highlight .k, .highlight .kn, .highlight .kd, .highlight .kt, .highlight .kc { color: var(--kw); font-weight: 500; }
.highlight .s, .highlight .s1, .highlight .s2, .highlight .sa, .highlight .sd { color: var(--str); }
.highlight .c, .highlight .c1, .highlight .cm, .highlight .cs { color: var(--comment); font-style: italic; }
.highlight .n { color: var(--ink); }
.highlight .nb, .highlight .nf, .highlight .nc { color: var(--const); }
.highlight .mi, .highlight .mf, .highlight .mh, .highlight .mo { color: var(--num); font-variant-numeric: tabular-nums; }
.highlight .o { color: var(--mute); }
.highlight .p { color: var(--mute); }

/* Tables */
.post-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.6em 0;
  font-size: 14px;
  line-height: 1.5;
  font-family: 'IBM Plex Mono', monospace;
}
.post-body th {
  text-align: left;
  font-weight: 500;
  padding: 10px 14px;
  border-bottom: 1.5px solid var(--rule);
  color: var(--ink);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}
.post-body td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--rule-soft);
  vertical-align: top;
}
.post-body tr:last-child td { border-bottom: 1.5px solid var(--rule); }

/* HR — printers' fleuron */
.post-body hr {
  border: none;
  margin: 2.6em auto;
  text-align: center;
  height: 12px;
  background: none;
  position: relative;
}
.post-body hr::before {
  content: '·  ·  ·';
  font-family: 'IBM Plex Mono', monospace;
  color: var(--dim);
  letter-spacing: 0.5em;
  font-size: 16px;
}

/* Footnotes */
.post-body .footnote {
  margin-top: 4em;
  padding-top: 1.5em;
  border-top: 1.5px solid var(--rule);
  font-size: 14px;
  color: var(--mute);
  font-family: 'IBM Plex Mono', monospace;
}
.post-body .footnote ol { padding-left: 1.5em; margin: 0; }
.post-body .footnote li { margin-bottom: 0.6em; line-height: 1.55; }
.post-body .footnote-ref {
  font-size: 0.7em;
  vertical-align: super;
  margin-left: 1px;
  color: var(--accent);
  text-decoration: none;
  font-family: 'IBM Plex Mono', monospace;
}
.post-body .footnote-backref { color: var(--dim); margin-left: 6px; }

/* References */
.references {
  margin-top: 4em;
  padding-top: 1.5em;
  border-top: 1.5px solid var(--rule);
  font-size: 14px;
  font-family: 'IBM Plex Mono', monospace;
}
.references h2 {
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 500;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--dim);
  margin: 0 0 1em;
  padding: 0;
  border: none;
  font-style: normal;
}
.references h2::before { content: none; }
.references ol { padding-left: 1.5em; margin: 0; color: var(--mute); }
.references li { margin-bottom: 0.6em; line-height: 1.55; }

/* Compiled-stamp at bottom of post */
.post-stamp {
  margin-top: 4em;
  padding-top: 18px;
  border-top: 1px solid var(--rule-soft);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  color: var(--dim);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
}
.post-stamp-key { color: var(--dim); }
.post-stamp-val { color: var(--mute); }

/* ─────────────────────────────────────────────── Login ─── */

.page-login { padding-top: 48px; }
.login-shell {
  max-width: 480px;
  margin: 0 auto;
  padding: 0 24px;
}
.login-shell .back-link { margin-bottom: 32px; display: inline-block; }
.login-eyebrow {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--spot);
  margin: 0 0 12px;
}
.login-title {
  font-family: 'Spectral', serif;
  font-style: italic;
  font-weight: 500;
  font-size: clamp(2rem, 4vw, 2.75rem);
  line-height: 1.1;
  margin: 0 0 12px;
  color: var(--ink);
}
.login-dek {
  font-family: 'Spectral', serif;
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--mute);
  margin: 0 0 40px;
  padding-bottom: 24px;
  border-bottom: 1.5px solid var(--ink);
}
.login-form { display: flex; flex-direction: column; gap: 24px; }
.login-field { display: block; }
.login-label {
  display: block;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--dim);
  margin-bottom: 10px;
}
.login-input {
  width: 100%;
  padding: 12px 0;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 15px;
  background: transparent;
  color: var(--ink);
  border: none;
  border-bottom: 1.5px solid var(--rule);
  outline: none;
  transition: border-bottom-color 0.15s ease;
}
.login-input:focus { border-bottom-color: var(--accent); }
.login-input::placeholder { color: var(--dim); }
.login-btn {
  padding: 14px 24px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  background: var(--ink);
  color: var(--bg);
  border: none;
  cursor: pointer;
  align-self: flex-start;
  transition: background 0.15s ease, transform 0.1s ease;
}
.login-btn:hover { background: var(--accent); }
.login-btn:active { transform: translateY(1px); }
.login-error {
  color: var(--spot);
  font-size: 12px;
  font-family: 'IBM Plex Mono', monospace;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin: 0 0 16px;
  padding: 10px 12px;
  border-left: 2px solid var(--spot);
  background: color-mix(in srgb, var(--spot) 6%, transparent);
}
.login-sent {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 16px;
  padding: 16px 0;
  border-top: 1.5px solid var(--ink);
  border-bottom: 1.5px solid var(--ink);
}
.login-sent-key {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--dim);
  margin: 0;
  padding-top: 2px;
}
.login-sent-val {
  font-family: 'Spectral', serif;
  font-size: 1rem;
  color: var(--ink);
  margin: 0;
  line-height: 1.5;
}

/* ─────────────────────────────────────────────── Responsive ─── */

@media (max-width: 900px) {
  .index-hero {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .post-item {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .post-meta {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 4px 16px;
    padding-top: 0;
  }
  .post-meta-row { gap: 6px; }
  .post-meta-key { width: auto; }
  .post {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .post-aside {
    position: static;
    flex-direction: column-reverse;
  }
}

@media (max-width: 640px) {
  body { font-size: 17px; }
  .site-header {
    padding: 18px 20px 12px;
    flex-wrap: wrap;
    gap: 12px;
  }
  .site-header::after { left: 20px; right: 20px; }
  .site-nav { gap: 16px; font-size: 11px; }
  .site-footer {
    padding: 18px 20px;
    margin-top: 64px;
  }
  .footer-row { grid-template-columns: 64px 1fr; gap: 12px; }
  .page { padding: 36px 20px 0; }
  .post-body { font-size: 17px; }
  .hero-stat {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 24px 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
