/* ============================================================
   Ink & Paper — editorial/academic theme for A. Khalatyan
   2×2 theme system on <html>:
     data-theme  = light | dark
     data-accent = ocean | paper
   → ocean-light, ocean-dark, paper-light, paper-dark (four distinct
   palettes — not a mix). :root = ocean-LIGHT (no-JS fallback only;
   the static default on <html> is ocean-DARK). No gradients, no glow,
   no radius, no shadow, no emoji. All colors var()-driven.
   ============================================================ */
:root {
  /* OCEAN · LIGHT — cool paper, deep-blue accent */
  --paper:        #EFF3F6;
  --paper-2:      #E3E9EF;
  --ink:          #16232E;
  --body:         #33465A;
  --muted:        #5E7186;
  --rule:         #C9D4DE;
  --rule-strong:  #9FB0C0;
  --accent:       #1D6A96;
  --accent-deep:  #14506F;

  --serif:  "Fraunces","Iowan Old Style",Georgia,"Times New Roman",serif;
  --text:   "Spectral",Georgia,"Times New Roman",serif;
  --mono:   "Spline Sans Mono",ui-monospace,"SF Mono",Menlo,Consolas,monospace;

  --wrap: 820px;
  --pad: 24px;
  --nav-h: 56px;
  color-scheme: light;
}

[data-accent="paper"][data-theme="light"] {
  /* PAPER · LIGHT — warm paper, oxblood accent (scoped to light so a
     missing/invalid data-theme can never override the dark block) */
  --paper:        #F6F4EE;
  --paper-2:      #EFECE3;
  --ink:          #1C1B18;
  --body:         #3A3833;
  --muted:        #6E6A60;
  --rule:         #D9D4C7;
  --rule-strong:  #B7B0A0;
  --accent:       #A02C1E;
  --accent-deep:  #7C1F14;
}

[data-accent="ocean"][data-theme="dark"] {
  /* OCEAN · DARK — deep-sea navy, ocean-blue accent */
  --paper:        #0B1626;
  --paper-2:      #11202F;
  --ink:          #E8EDF4;
  --body:         #B7C4D4;
  --muted:        #7E93AA;
  --rule:         #24384C;
  --rule-strong:  #3A5470;
  --accent:       #4FA3D1;
  --accent-deep:  #7FC4E8;
  color-scheme: dark;
}

[data-accent="paper"][data-theme="dark"] {
  /* PAPER · DARK — warm charcoal, terracotta accent */
  --paper:        #1B1915;
  --paper-2:      #23201B;
  --ink:          #ECE7DB;
  --body:         #C4BDB0;
  --muted:        #8D867A;
  --rule:         #3A362E;
  --rule-strong:  #565043;
  --accent:       #D4714B;
  --accent-deep:  #E28F6B;
  color-scheme: dark;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--text);
  font-size: 16px;
  line-height: 1.7;
  color: var(--body);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-deep); text-decoration: underline; text-underline-offset: 3px; }
::selection { background: var(--accent); color: var(--paper); }

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

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--pad); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ============================================================
   TOP NAV
   ============================================================ */
.topnav {
  position: sticky; top: 0; z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}
.nav-inner {
  /* wider than the 820px reading column: 8 links + 2 toggles + brand need
     ~900px on one line (the brand used to wrap and the page overflowed) */
  max-width: 1080px; margin: 0 auto; gap: 16px;
  padding: 0 var(--pad);
  display: flex; align-items: center; justify-content: space-between;
  min-height: var(--nav-h);
}
.brand {
  white-space: nowrap; flex: none;
  font-family: var(--serif); font-weight: 600; font-size: 19px;
  color: var(--ink); letter-spacing: -0.01em;
}
.brand:hover { color: var(--accent); text-decoration: none; }
.brand .dot { color: var(--accent); }

/* nav toggle (checkbox hack — no JS); kept in the a11y tree for keyboard users */
.nav-toggle {
  position: absolute; left: 0; top: 0;
  width: 1px; height: 1px; opacity: 0; margin: 0;
}
.nav-burger {
  display: none;
  width: 44px; height: 44px;
  border: 1px solid var(--rule);
  background: transparent;
  cursor: pointer; position: relative;
}
.nav-burger span,
.nav-burger span::before,
.nav-burger span::after {
  content: ""; position: absolute; left: 11px; right: 11px; height: 1.5px;
  background: var(--ink); transition: transform .2s ease, opacity .2s ease;
}
.nav-burger span { top: 50%; transform: translateY(-50%); }
.nav-burger span::before { left: 0; right: 0; top: -6px; }
.nav-burger span::after  { left: 0; right: 0; top: 6px; }

/* dark/light + palette toggles (44px touch targets) */
.theme-toggle, .accent-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; flex: none;
  border: 1px solid var(--rule); background: transparent;
  color: var(--body); cursor: pointer;
  transition: color .15s ease, border-color .15s ease;
}
.theme-toggle:hover, .accent-toggle:hover { color: var(--accent); border-color: var(--accent); }
.theme-toggle .ic-moon { display: block; }
.theme-toggle .ic-sun  { display: none; }
[data-theme="dark"] .theme-toggle .ic-moon { display: none; }
[data-theme="dark"] .theme-toggle .ic-sun  { display: block; }

.nav-links { display: flex; gap: 2px; align-items: center; }
/* theme controls — grouped at the end of the nav bar */
.nav-tools {
  display: inline-flex; align-items: center; gap: 6px;
  margin-left: 12px; padding-left: 12px;
  border-left: 1px solid var(--rule);
}
.nav-link {
  font-family: var(--text); font-weight: 500; font-size: 14.5px;
  color: var(--body); padding: 8px 10px; letter-spacing: 0.01em;
  white-space: nowrap;
}
.nav-link:hover { color: var(--accent); text-decoration: none; }
.nav-link.active {
  color: var(--accent);
  box-shadow: inset 0 -2px 0 var(--accent);
}

/* ============================================================
   PAGE HEADER
   ============================================================ */
.pagehead { padding: 56px 0 8px; border-bottom: 1px solid var(--rule); }
.pagehead h1 {
  font-family: var(--serif); font-weight: 600; font-size: 44px;
  line-height: 1.1; letter-spacing: -0.01em; color: var(--ink);
}
.pagehead .meta {
  font-family: var(--mono); font-weight: 500; font-size: 12.5px;
  letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--muted); margin-top: 12px;
}
.pagehead .meta .n { color: var(--accent); }

/* ============================================================
   SECTION
   ============================================================ */
.section { padding: 64px 0; }
.section.tint { background: var(--paper-2); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.section-title {
  font-family: var(--serif); font-weight: 600; font-size: 30px;
  line-height: 1.2; letter-spacing: -0.01em; color: var(--ink);
  display: flex; align-items: baseline; gap: 14px;
}
.section-title .idx {
  font-family: var(--mono); font-weight: 500; font-size: 13px;
  color: var(--accent); letter-spacing: 0.04em;
}
.section-intro { max-width: 62ch; color: var(--muted); margin-top: 14px; }

/* ============================================================
   HERO (home)
   ============================================================ */
.hero { padding: 56px 0 40px; border-bottom: 1px solid var(--rule); }
.hero-grid {
  display: grid; grid-template-columns: 1fr; gap: 32px; align-items: start;
}
.kicker {
  font-family: var(--mono); font-weight: 500; font-size: 13px;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent);
}
.hero h1 {
  font-family: var(--serif); font-weight: 600; font-size: 48px;
  line-height: 1.05; letter-spacing: -0.015em; color: var(--ink);
  margin-top: 14px;
}
.hero .org { font-size: 16px; color: var(--muted); margin-top: 12px; }
.hero .tagline { font-size: 18px; line-height: 1.65; color: var(--body); margin-top: 20px; max-width: 52ch; }
.portrait {
  width: 100%; max-width: 300px; justify-self: start;
  border: 1px solid var(--rule-strong);
}

/* ============================================================
   CONTENTS / OVERVIEW (home)
   ============================================================ */
.contents { border-top: 1px solid var(--rule); }
.contents-row {
  display: grid; grid-template-columns: auto 1fr auto; gap: 4px 20px;
  align-items: baseline; padding: 22px 8px;
  border-bottom: 1px solid var(--rule);
  transition: background-color .15s ease;
}
.contents-row:hover { background: var(--paper-2); }
.contents-row:hover, .row:hover { text-decoration: none; }
.contents-row .cnum {
  font-family: var(--mono); font-weight: 500; font-size: 14px;
  color: var(--accent);
}
.contents-row .ctitle {
  font-family: var(--serif); font-weight: 600; font-size: 24px;
  color: var(--ink);
}
.contents-row:hover .ctitle { color: var(--accent); }
.contents-row .cdesc {
  grid-column: 2; font-size: 14.5px; color: var(--muted); margin-top: 4px;
}
.contents-row .arrow {
  font-family: var(--mono); font-size: 18px; color: var(--muted);
  transition: transform .15s ease, color .15s ease;
}
.contents-row:hover .arrow { color: var(--accent); transform: translateX(4px); }

/* ============================================================
   LEDGER (generic row list: projects, software, pubs, contact)
   ============================================================ */
.ledger { border-top: 1px solid var(--rule); }
.row {
  display: grid; gap: 4px; padding: 22px 8px;
  border-bottom: 1px solid var(--rule);
  transition: background-color .15s ease;
}
.row:hover { background: var(--paper-2); }
.row .rhead {
  display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap;
}
.row .rnum {
  font-family: var(--mono); font-weight: 500; font-size: 13px;
  color: var(--accent); flex: none;
}
.row .rtitle {
  font-family: var(--serif); font-weight: 600; font-size: 21px;
  color: var(--ink);
}
.row:hover .rtitle { color: var(--accent); }
.row .rtitle .lang {
  font-family: var(--mono); font-weight: 500; font-size: 12px;
  color: var(--muted); margin-left: 10px; letter-spacing: 0.02em;
}
.row .rdesc { font-size: 15px; line-height: 1.6; color: var(--body); margin-top: 6px; }
.row .rmeta {
  font-family: var(--mono); font-size: 12.5px; color: var(--muted);
  display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 14px;
}
.row .rmeta b { color: var(--body); font-weight: 500; }
.row ul.tags { list-style: none; display: flex; flex-wrap: wrap; gap: 0 0; margin-top: 12px; }
.row ul.tags li {
  font-family: var(--mono); font-size: 12.5px; color: var(--muted);
  padding-right: 14px; margin-right: 14px; border-right: 1px solid var(--rule);
}
.row ul.tags li:last-child { border-right: none; }

/* ============================================================
   EXPERTISE (mono-kicker grid)
   ============================================================ */
.exp-grid {
  display: grid; grid-template-columns: 1fr; gap: 0;
  border-top: 1px solid var(--rule);
}
.exp {
  padding: 22px 0; border-bottom: 1px solid var(--rule);
}
.exp h4 {
  font-family: var(--mono); font-weight: 500; font-size: 12.5px;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink);
  margin-bottom: 8px;
}
.exp p { font-size: 15px; line-height: 1.6; color: var(--body); }

/* ============================================================
   PUBLICATIONS
   ============================================================ */
.pubs { border-top: 1px solid var(--rule); }
.pubs li {
  list-style: none; display: grid; grid-template-columns: 56px 1fr; gap: 4px 20px;
  padding: 16px 8px; border-bottom: 1px solid var(--rule);
  transition: background-color .15s ease;
}
.pubs li:hover { background: var(--paper-2); }
.pubs .year {
  grid-row: 1 / span 2;
  font-family: var(--mono); font-size: 13px; color: var(--muted);
  align-self: start; padding-top: 2px;
}
.pubs .cite { font-size: 15.5px; line-height: 1.55; color: var(--body); overflow-wrap: anywhere; }
.pubs .doi {
  grid-column: 2; justify-self: start; align-self: start; padding-top: 4px;
  font-family: var(--mono); font-size: 11.5px; font-weight: 500;
  letter-spacing: 0.04em; text-transform: uppercase; color: var(--accent);
}

/* ============================================================
   GALLERY — single figure centered; multiple flow as an auto grid
   ============================================================ */
.gallery { margin-top: 32px; }
.gallery.single figure { max-width: 560px; margin: 0 auto; }
.gallery img { border: 1px solid var(--rule); width: 100%; }
.gallery figcaption {
  font-family: var(--mono); font-size: 12.5px; color: var(--muted);
  margin-top: 14px; line-height: 1.6;
}
@media (min-width: 760px) {
  .gallery:not(.single) {
    display: grid; grid-template-columns: 1fr 1fr; gap: 28px;
  }
}
@media (min-width: 900px) {
  .gallery:not(.single) { grid-template-columns: repeat(3, 1fr); }
}

/* ============================================================
   BENCHMARK PLOTS
   ============================================================ */
.bench-fig { margin: 32px 0 8px; }
.bench-fig img { border: 1px solid var(--rule); width: 100%; }
.bench-fig figcaption {
  font-family: var(--mono); font-size: 12px; color: var(--muted);
  margin-top: 10px; line-height: 1.6;
}
.bench-table { width: 100%; border-collapse: collapse; margin: 20px 0 8px; font-size: 14px; }
.bench-table caption {
  text-align: left; font-family: var(--mono); font-size: 12px;
  color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em;
  padding-bottom: 10px;
}
.bench-table th, .bench-table td {
  text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--rule);
}
.bench-table th {
  font-family: var(--mono); font-size: 11.5px; text-transform: uppercase;
  letter-spacing: 0.04em; color: var(--muted); font-weight: 500;
}
.bench-table td { color: var(--body); }
.bench-table td.win { color: var(--accent); font-weight: 500; }
.bench-table .mnum { font-family: var(--mono); font-size: 13px; }
.bench-note { font-size: 14px; color: var(--muted); line-height: 1.65; }

/* ============================================================
   DEEP-DIVE DETAIL PANEL (projects)
   ============================================================ */
.detail { margin-top: 28px; border: 1px solid var(--rule); background: var(--paper-2); }
.detail > summary {
  cursor: pointer; list-style: none; padding: 18px 22px;
  display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap;
}
.detail > summary::-webkit-details-marker { display: none; }
.detail > summary .dmark { font-family: var(--mono); color: var(--accent); font-size: 13px; transition: transform .15s ease; }
.detail[open] > summary .dmark { transform: rotate(90deg); }
.detail > summary .dtitle { font-family: var(--serif); font-weight: 600; font-size: 20px; color: var(--ink); }
.detail > summary .dsub { font-size: 13px; color: var(--muted); }
.detail .dbody { padding: 6px 22px 26px; border-top: 1px solid var(--rule); background: var(--paper); }
.detail h4 {
  font-family: var(--serif); font-weight: 600; font-size: 16.5px;
  color: var(--ink); margin: 26px 0 4px; letter-spacing: 0.01em;
}
.detail p { margin: 9px 0; color: var(--body); max-width: 74ch; font-size: 15px; }

/* L0–L4 ladder */
.ladder { margin-top: 14px; border-top: 1px solid var(--rule); }
.ladder .lvl {
  display: grid; grid-template-columns: 48px 190px 1fr; gap: 4px 16px;
  padding: 12px 0; border-bottom: 1px solid var(--rule); align-items: baseline;
}
.ladder .lv { font-family: var(--mono); font-weight: 500; font-size: 13px; color: var(--accent); }
.ladder .ln { font-family: var(--serif); font-weight: 600; font-size: 15px; color: var(--ink); }
.ladder .lc { font-size: 13.5px; color: var(--body); line-height: 1.55; }

/* component roles */
.roles { list-style: none; margin-top: 12px; border-top: 1px solid var(--rule); }
.roles li {
  display: grid; grid-template-columns: 150px 1fr; gap: 14px;
  padding: 9px 0; border-bottom: 1px solid var(--rule); font-size: 13.5px;
}
.roles .rk { font-family: var(--mono); font-size: 12px; color: var(--accent); padding-top: 2px; letter-spacing: 0.02em; }
.roles .rv { color: var(--body); line-height: 1.5; }

/* stat strip */
.statline { display: flex; flex-wrap: wrap; margin-top: 16px; border: 1px solid var(--rule); }
.statline div { flex: 1 1 105px; padding: 12px 14px; border-right: 1px solid var(--rule); }
.statline div:last-child { border-right: none; }
.statline .sv { font-family: var(--serif); font-size: 21px; font-weight: 600; color: var(--ink); }
.statline .sk {
  font-family: var(--mono); font-size: 10px; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.06em; margin-top: 2px;
}
@media (max-width: 599px) {
  .ladder .lvl { grid-template-columns: 40px 1fr; }
  .ladder .lc { grid-column: 2; }
  .roles li { grid-template-columns: 1fr; gap: 2px; }
  .detail .dbody { padding: 4px 18px 22px; }
}

/* ============================================================
   CONTACT
   ============================================================ */
.contact-list { border-top: 1px solid var(--rule); }
.contact-list a {
  display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 20px;
  padding: 20px 8px; border-bottom: 1px solid var(--rule);
  transition: background-color .15s ease;
}
.contact-list a:hover { background: var(--paper-2); text-decoration: none; }
.contact-list .clabel {
  font-family: var(--serif); font-weight: 600; font-size: 18px; color: var(--ink);
}
.contact-list a:hover .clabel { color: var(--accent); }
.contact-list .cval {
  font-family: var(--mono); font-size: 14px; color: var(--muted);
  overflow-wrap: anywhere; text-align: right;
}
.contact-list .cval .arrow { color: var(--muted); }
.contact-list a:hover .cval { color: var(--accent); }

/* ============================================================
   FOOTER
   ============================================================ */
.footbar {
  border-top: 1px solid var(--rule); margin-top: 0; padding: 26px 0;
}
.footbar .wrap {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.footbar .cr, .footbar .fl {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.02em; color: var(--muted);
}
.footbar a { color: var(--muted); }
.footbar a:hover { color: var(--accent); }

/* skip link */
.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--paper); color: var(--ink); border: 1px solid var(--accent); padding: 8px 14px; z-index: 100;
}
.skip:focus { left: 12px; top: 12px; }

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* ---------- TABLET & UP (>=760px): full nav bar fits ---------- */
@media (min-width: 760px) {
  .exp-grid { grid-template-columns: 1fr 1fr; }
  .exp { border-right: 1px solid var(--rule); padding-right: 24px; }
  .exp:nth-child(even) { border-right: none; padding-right: 0; padding-left: 24px; }
  .bench-table { font-size: 15px; }
}

/* ---------- DESKTOP (>=900px) ---------- */
@media (min-width: 900px) {
  .section { padding: 96px 0; }
  .hero { padding: 96px 0 72px; }
  .hero-grid { grid-template-columns: 1fr 300px; gap: 56px; align-items: start; }
  .portrait { justify-self: end; }
  .hero h1 { font-size: 58px; }
  .pagehead h1 { font-size: 44px; }
  .section-title { font-size: 30px; }
  .exp-grid { grid-template-columns: 1fr 1fr 1fr; }
  .exp { border-right: 1px solid var(--rule); padding-right: 24px; }
  .exp:nth-child(3n) { border-right: none; padding-right: 0; padding-left: 24px; }
  .exp:nth-child(3n+1) { padding-left: 0; }
  .pubs li { grid-template-columns: 60px 1fr auto; }
  .pubs .year { grid-row: auto; }
}

/* ---------- MOBILE & SMALL TABLET (<760px): hamburger nav ---------- */
@media (max-width: 759px) {
  :root { --pad: 20px; }
  body { font-size: 15.5px; }
  .section { padding: 48px 0; }
  .section.tint { padding: 48px 0; }
  .hero { padding: 48px 0 36px; }
  .hero h1 { font-size: 38px; }
  .hero .tagline { font-size: 16.5px; }
  .pagehead { padding: 40px 0 6px; }
  .pagehead h1 { font-size: 34px; }
  .section-title { font-size: 24px; }
  .contents-row { grid-template-columns: auto 1fr; gap: 4px 14px; padding: 18px 4px; }
  .contents-row .ctitle { font-size: 20px; }
  .contents-row .arrow { display: none; }
  .row { padding: 18px 4px; }
  .row .rtitle { font-size: 19px; }
  .pubs li { grid-template-columns: 48px 1fr; gap: 2px 14px; }
  .pubs .doi { grid-column: 2; }
  .bench-table { display: block; overflow-x: auto; white-space: nowrap; }
  .bench-table .mnum { font-size: 12.5px; }
}

/* ---------- HAMBURGER NAV (<1024px): 8 links + toggles need ~950px in the web fonts ---------- */
@media (max-width: 1023px) {
  /* hamburger */
  .nav-burger { display: block; }
  .nav-links {
    position: absolute; top: var(--nav-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--rule);
    max-height: 0; overflow: hidden; visibility: hidden;
    transition: max-height .25s ease, visibility .25s;
  }
  .nav-link {
    padding: 14px var(--pad); border-top: 1px solid var(--rule);
    font-size: 16px;
  }
  .nav-link.active { box-shadow: inset 3px 0 0 var(--accent); }
  /* theme controls: bottom row of the mobile menu */
  .nav-tools {
    margin: 0; padding: 12px var(--pad);
    border-left: none; border-top: 1px solid var(--rule);
  }
  .nav-toggle:checked ~ .nav-links { max-height: 640px; visibility: visible; }
  .nav-toggle:focus-visible ~ .nav-burger { outline: 2px solid var(--accent); outline-offset: 2px; }
  .nav-toggle:checked ~ .nav-burger span { transform: translateY(-50%) rotate(45deg); }
  .nav-toggle:checked ~ .nav-burger span::before { top: 0; }
  .nav-toggle:checked ~ .nav-burger span::after { top: 0; transform: rotate(-90deg); }
}

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* ============================================================
   BLOG — list rows reuse .row; posts use a reading-width prose column
   ============================================================ */
.post-row .rnum { min-width: 9.5em; }
.post-row .rtitle { flex: 1 1 24ch; }
.post-head h1 { margin-top: 14px; max-width: 24ch; }
.post-head .meta a { color: var(--accent); }
.blog-prose {
  max-width: 68ch; font-family: var(--text);
  font-size: 18.5px; line-height: 1.8; color: var(--body);
}
.blog-prose p { margin: 0 0 1.4em; }
.blog-prose h2, .blog-prose h3 {
  font-family: var(--serif); font-weight: 600; color: var(--ink);
  line-height: 1.25; letter-spacing: -0.01em; margin: 2.2em 0 .7em;
}
.blog-prose h2 { font-size: 27px; }
.blog-prose h3 { font-size: 21px; }
.blog-prose strong { color: var(--ink); font-weight: 500; }
.blog-prose a { text-decoration: underline; text-underline-offset: 3px; }
/* the closing italic notes read as an aside */
.blog-prose p:last-child, .blog-prose p:nth-last-child(2):has(> em:only-child) {
  font-size: 15px; color: var(--muted); border-top: 1px solid var(--rule); padding-top: 1.1em;
}
.blog-prose p:nth-last-child(2):has(> em:only-child) { margin-top: 2.6em; }
.blog-prose p:last-child { border-top: none; padding-top: 0; }
.post-foot {
  max-width: 68ch; margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--rule);
  font-family: var(--mono); font-size: 13px; letter-spacing: 0.02em;
}
@media (max-width: 759px) {
  .post-row .rnum { min-width: 0; }
  .blog-prose { font-size: 17px; line-height: 1.75; }
  .blog-prose h2 { font-size: 23px; }
}
