/* ===================================================================
   Dana Edwards: Swiss/typographic minimalism
   Off-white background, near-black text, single sans-serif,
   hairline borders, no shadows, no gradients, massive whitespace.
   =================================================================== */

:root {
  --bg: #fafafa;
  --bg-soft: #f4f4f4;
  --surface: #ffffff;
  --surface-2: #f0f0f0;
  --text: #111111;
  --muted: #555555;
  --muted-2: #777777;
  --line: rgba(17, 17, 17, 0.12);
  --line-strong: rgba(17, 17, 17, 0.22);
  --accent: #111111;
  --accent-2: #111111;
  --accent-3: #111111;
  --accent-4: #111111;
  --danger: #8a1a1a;
  --button-text: #fafafa;
  --radius: 0px;
  --radius-sm: 0px;
  --container: 860px;
  --font-body: "Helvetica Neue", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --font-display: "Helvetica Neue", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --font-mono: "SF Mono", "SFMono-Regular", ui-monospace, "JetBrains Mono", "Cascadia Code", Consolas, monospace;
}

[data-theme="dark"] {
  --bg: #0a0a0a;
  --bg-soft: #111111;
  --surface: #141414;
  --surface-2: #1a1a1a;
  --text: #f2f2f2;
  --muted: #a0a0a0;
  --muted-2: #808080;
  --line: rgba(242, 242, 242, 0.12);
  --line-strong: rgba(242, 242, 242, 0.22);
  --accent: #f2f2f2;
  --accent-2: #f2f2f2;
  --accent-3: #f2f2f2;
  --accent-4: #f2f2f2;
  --danger: #d97070;
  --button-text: #0a0a0a;
}

* { box-sizing: border-box; }
html {
  max-width: 100%;
  overflow-x: hidden;
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; text-decoration-color: var(--line-strong); }
a:hover { color: var(--muted); text-decoration-color: var(--muted); }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 3px;
}
::selection {
  background: var(--text);
  color: var(--bg);
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  background: var(--text);
  color: var(--bg);
  padding: .75rem 1rem;
  text-decoration: none;
}
.skip-link:focus { top: 1rem; }

.container {
  width: min(calc(100% - 3rem), var(--container));
  margin: 0 auto;
}

/* ===== Header / nav ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.nav-wrap {
  position: relative;
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.nav-right {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
}
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--text);
  border-radius: 0;
  min-width: 40px;
  min-height: 40px;
  cursor: pointer;
}
.nav-toggle svg { display: block; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  font-weight: 600;
  font-size: .95rem;
  letter-spacing: -0.01em;
  min-width: max-content;
  text-decoration: none;
}
.brand img { filter: none; }
.brand span { letter-spacing: -0.01em; }

.main-nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  color: var(--muted);
  font-size: .85rem;
}
.main-nav a {
  border-bottom: none;
  padding: .2rem 0;
  text-decoration: none;
}
.main-nav a:hover {
  color: var(--text);
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--text);
  border-radius: 0;
  min-width: 40px;
  min-height: 40px;
  cursor: pointer;
}
.theme-toggle svg { display: block; width: 18px; height: 18px; }
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

/* ===== Sections ===== */
.section { padding: 96px 0; }
.section.alt {
  background: var(--bg-soft);
  border-block: 1px solid var(--line);
}

.hero { padding-top: 96px; padding-bottom: 64px; background-color: var(--bg); background-blend-mode: overlay; position: relative; overflow: hidden; }
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--bg);
  opacity: 0.88;
  pointer-events: none;
  z-index: 0;
}
.hero > .container { position: relative; z-index: 1; }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, .8fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
.hero-copy, .profile-panel, .project-card, .packet-card, .matrix-card, .cta-card, .snapshot-list, .proof-links, .timeline-list {
  min-width: 0;
}

.eyebrow {
  margin: 0 0 1.25rem;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: .7rem;
  color: var(--muted-2);
  font-weight: 500;
}

h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0;
  font-weight: 500;
}
h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); max-width: 14ch; font-weight: 400; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.6rem); }
h3 { font-size: 1.15rem; font-weight: 600; letter-spacing: -0.01em; }

.lede {
  font-size: clamp(1.05rem, 1.8vw, 1.25rem);
  color: var(--muted);
  max-width: 640px;
  margin: 1.5rem 0 0;
  overflow-wrap: break-word;
  line-height: 1.6;
}

.hero-actions, .card-actions, .cta-actions {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  align-items: center;
}
.hero-actions { margin-top: 2.5rem; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0;
  padding: .7rem 1.1rem;
  font-weight: 500;
  font-size: .9rem;
  border: 1px solid var(--text);
  min-height: 42px;
  max-width: 100%;
  text-align: center;
  overflow-wrap: anywhere;
  text-decoration: none;
  transition: background 160ms ease, color 160ms ease;
}
.button.primary {
  background: var(--text);
  color: var(--button-text);
  border-color: var(--text);
}
.button.primary:hover { background: var(--muted); border-color: var(--muted); color: var(--button-text); }
.button.secondary { background: transparent; color: var(--text); border-color: var(--line-strong); }
.button.secondary:hover { border-color: var(--text); color: var(--text); }

.signal-strip {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}
.signal-strip span, .project-meta span {
  border: 1px solid var(--line);
  color: var(--muted);
  background: transparent;
  border-radius: 0;
  padding: .25rem .55rem;
  font-size: .72rem;
  overflow-wrap: anywhere;
}

.proof-links {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  max-width: 100%;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.proof-links a {
  display: grid;
  gap: .2rem;
  padding: 1rem 1.1rem;
  background: transparent;
  border: none;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  text-decoration: none;
  transition: background 160ms ease;
}
.proof-links a:hover {
  background: var(--surface);
  color: inherit;
}
.proof-links span {
  color: var(--muted-2);
  font-size: .68rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.proof-links strong {
  color: var(--text);
  line-height: 1.3;
  font-weight: 500;
  font-size: .92rem;
}

/* ===== Profile panel (hero right) ===== */
.profile-panel, .project-card, .matrix-card, .packet-card, .cta-card {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none;
}

.profile-panel {
  overflow: hidden;
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 0;
}
.avatar {
  width: 100%;
  height: 100%;
  min-height: 220px;
  object-fit: cover;
  border-right: 1px solid var(--line);
  filter: grayscale(1) contrast(1.05);
}
.profile-copy {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.card-topline {
  color: var(--muted-2);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: .68rem;
  font-weight: 500;
}
.profile-copy h2 { font-size: clamp(1.3rem, 2.6vw, 1.8rem); margin: .6rem 0; font-weight: 500; }
.profile-copy p { color: var(--muted); margin: 0; font-size: .92rem; }

.quick-facts {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 0;
  border-top: 1px solid var(--line);
}
.quick-facts div { padding: .9rem 1rem; border-right: 1px solid var(--line); }
.quick-facts div:last-child { border-right: 0; }
.quick-facts dt { color: var(--muted-2); font-size: .68rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.08em; }
.quick-facts dd { margin: .25rem 0 0; font-weight: 500; font-size: .85rem; }
.quick-facts dd a { text-decoration: none; border-bottom: 1px solid var(--line-strong); }

/* ===== Snapshot / timeline ===== */
.snapshot { padding-top: 42px; }
.snapshot-grid {
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: 2rem;
  align-items: start;
}
.snapshot-list {
  display: grid;
  gap: 0;
}
.snapshot-list article {
  border-top: 1px solid var(--line);
  padding: 1rem 0;
}
.snapshot-list article:last-child { border-bottom: 1px solid var(--line); }
.snapshot-list strong { color: var(--text); font-weight: 600; }
.snapshot-list p { margin: .25rem 0 0; color: var(--muted); font-size: .92rem; }

.timeline-grid {
  display: grid;
  grid-template-columns: .75fr 1.25fr;
  gap: 2rem;
  align-items: start;
}
.timeline-list {
  display: grid;
  gap: 0;
}
.timeline-list article {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 1rem;
  padding: 1.25rem 0;
  border-top: 1px solid var(--line);
}
.timeline-list article:last-child { border-bottom: 1px solid var(--line); }
.timeline-list span {
  color: var(--muted-2);
  font-weight: 500;
  text-transform: uppercase;
  font-size: .72rem;
  letter-spacing: 0.06em;
  font-family: var(--font-mono);
}
.timeline-list strong { color: var(--text); font-weight: 600; font-size: .98rem; }
.timeline-list p {
  grid-column: 2;
  margin: .3rem 0 0;
  color: var(--muted);
  font-size: .92rem;
  line-height: 1.6;
}

/* ===== Section headings ===== */
.section-heading {
  max-width: 680px;
  margin-bottom: 2.5rem;
}
.section-heading p { color: var(--muted); font-size: 1rem; margin-top: .75rem; }

/* ===== Project grid ===== */
.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.project-card {
  padding: 1.5rem;
  min-height: 0;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  border: none;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  transition: background 160ms ease;
}
.project-card::before { display: none; }
.project-card.featured::before { display: none; }
.project-card.new-build::before { display: none; }
.project-card:hover {
  background: var(--surface);
  transform: none;
  border-color: var(--line);
}
.project-card.featured { border-color: var(--line); }
.project-card.new-build { border-color: var(--line); }
.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin-bottom: 1rem;
}
.project-card p, .project-card li { color: var(--muted); font-size: .92rem; }
.project-card ul { padding-left: 1.1rem; margin: 1rem 0; }
.project-card .note { margin-top: auto; color: var(--text); }
.value-note {
  border-top: 1px solid var(--line);
  padding-top: .85rem;
  margin: .5rem 0 1rem;
  color: var(--muted);
  font-size: .88rem;
  line-height: 1.55;
}
.card-actions { margin-top: auto; }
.card-actions a {
  color: var(--text);
  font-weight: 500;
  font-size: .88rem;
  border-bottom: 1px solid var(--text);
  text-decoration: none;
}
.card-actions a::after { content: " →"; }

/* ===== Two column ===== */
.two-col {
  display: grid;
  grid-template-columns: .85fr 1.15fr;
  gap: 3rem;
  align-items: start;
}
.two-col p { color: var(--muted); font-size: 1rem; }
.matrix-card { padding: 0; overflow-x: auto; background: transparent; }
.matrix { width: 100%; border-collapse: collapse; }
.matrix th, .matrix td {
  padding: .9rem 1rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-size: .9rem;
}
.matrix th {
  color: var(--muted-2);
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 500;
}
.matrix td { color: var(--muted); }
.matrix tr:last-child td { border-bottom: 0; }
.matrix td:first-child { color: var(--text); font-weight: 500; }

/* ===== Packet grid ===== */
.packet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.source-grid, .metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.metric-card {
  background: transparent;
  border: none;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none;
  padding: 1.25rem;
  min-height: 200px;
}
.metric-card span {
  color: var(--muted-2);
  font-weight: 500;
  text-transform: uppercase;
  font-size: .68rem;
  letter-spacing: 0.08em;
}
.metric-card strong {
  display: block;
  margin: .6rem 0;
  font-family: var(--font-mono);
  font-size: clamp(1.6rem, 2.6vw, 2.2rem);
  line-height: 1;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--text);
}
.metric-card p, .method-note {
  color: var(--muted);
  font-size: .88rem;
  line-height: 1.55;
}
.method-note {
  margin: 1rem 0 0;
  font-size: .88rem;
}
.packet-card {
  padding: 1.25rem;
  min-height: 160px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: none;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: transparent;
  transition: background 160ms ease;
  text-decoration: none;
}
.packet-card span { color: var(--muted-2); font-weight: 500; font-size: .68rem; text-transform: uppercase; letter-spacing: 0.08em; }
.packet-card strong { font-size: .92rem; line-height: 1.35; font-weight: 500; color: var(--text); }
.packet-card:hover {
  color: inherit;
  background: var(--surface);
  transform: none;
}

/* ===== Writing list ===== */
.writing-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  border-top: 1px solid var(--line);
}
@media (min-width: 760px) {
  .writing-list { grid-template-columns: 1fr 1fr; }
  .writing-list li:nth-child(odd) { border-right: 1px solid var(--line); }
}
.writing-list li {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: .85rem;
  padding: 1.1rem 1.25rem;
  border: none;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  transition: background 160ms ease;
}
.writing-list span { color: var(--muted-2); font-weight: 500; font-family: var(--font-mono); font-size: .78rem; }
.writing-list p { grid-column: 2; margin: .2rem 0 0; color: var(--muted); font-size: .88rem; line-height: 1.5; }
.writing-list a { display: block; text-decoration: none; }
.writing-list a strong { color: var(--text); font-weight: 500; font-size: .95rem; }
.writing-list li:hover {
  background: var(--surface);
  transform: none;
}

.subsection-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  margin: 2.5rem 0 1rem;
  padding-bottom: .5rem;
  border-bottom: 1px solid var(--line);
}
.subsection-title:first-of-type { margin-top: 0; }

/* ===== Ideas ===== */
.ideas-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
.idea-card {
  padding: 2rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}
.idea-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 .75rem;
  color: var(--text);
}
.idea-summary {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  margin: 0 0 1.5rem;
}
.idea-lineage {
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}
.idea-lineage .eyebrow {
  margin-bottom: .5rem;
}
.idea-lineage p {
  font-size: .9rem;
  line-height: 1.6;
  color: var(--muted);
  margin: 0 0 1rem;
}
.idea-lineage .pull-quote {
  margin: 1rem 0 0;
  padding: 1rem 1.25rem;
  border-left: 3px solid var(--accent);
  background: var(--bg);
  border-radius: 0 4px 4px 0;
}
.idea-lineage .pull-quote p {
  font-size: .9rem;
  font-style: italic;
  color: var(--text);
  margin: 0 0 .5rem;
}
.idea-lineage .pull-quote cite {
  font-size: .8rem;
  color: var(--muted-2);
  font-style: normal;
}

.writing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.writing-card {
  padding: 1.25rem;
  min-height: 150px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: none;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  transition: background 160ms ease;
  text-decoration: none;
}
.writing-card span { color: var(--muted-2); font-weight: 500; font-size: .68rem; text-transform: uppercase; letter-spacing: 0.08em; }
.writing-card strong { font-size: .95rem; line-height: 1.3; font-weight: 500; color: var(--text); }
.writing-card p { margin: .3rem 0 0; color: var(--muted); font-size: .85rem; line-height: 1.5; }
.writing-card:hover {
  color: inherit;
  background: var(--surface);
  transform: none;
}

#zenofcis-track { scroll-margin-top: 76px; }
.track-card {
  min-height: 175px;
  border-top: 2px solid var(--text);
}
.track-note {
  max-width: 720px;
  margin: 1.25rem 0 0;
  color: var(--muted);
  font-size: .9rem;
}
.track-note a { color: var(--text); }

/* ===== CTA ===== */
.cta-section { padding-top: 48px; }
.cta-section .network-note {
  margin-top: 1.25rem;
  padding: 1rem 1.25rem;
  border-left: 3px solid var(--accent);
  background: var(--surface);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: .9rem;
  line-height: 1.55;
  color: var(--muted);
}
.cta-section .network-note a { color: var(--accent); font-weight: 600; }
.cta-card {
  padding: 2rem 0;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 2rem;
  border: none;
  background: transparent;
  box-shadow: none;
}
.cta-card p { color: var(--muted); }
.site-footer {
  border-top: 1px solid var(--line);
  padding: 2rem 0;
  color: var(--muted-2);
  font-size: .82rem;
}
.footer-grid { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }

/* ===== Case study pages ===== */
.page-hero { padding: 96px 0 48px; }
.page-hero h1 { max-width: 16ch; }
.breadcrumb {
  color: var(--muted);
  font-weight: 500;
  margin-bottom: 1.25rem;
  display: inline-block;
  border-bottom: none;
  text-decoration: underline;
  text-underline-offset: 2px;
  font-size: .85rem;
}
.content-grid {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 3rem;
  align-items: start;
}
.side-nav { position: sticky; top: 96px; display: grid; gap: .25rem; }
.side-nav a {
  color: var(--muted);
  padding: .35rem 0;
  border-radius: 0;
  border: none;
  font-size: .85rem;
  text-decoration: none;
}
.side-nav a:hover {
  background: transparent;
  color: var(--text);
  border-color: transparent;
}
.prose { max-width: 720px; }
.prose h2 { font-size: 1.5rem; margin: 2.5rem 0 .85rem; font-weight: 500; }
.prose h3 { margin: 1.75rem 0 .5rem; font-size: 1.05rem; font-weight: 600; }
.prose p, .prose li { color: var(--muted); font-size: .98rem; line-height: 1.7; }
.prose code {
  background: var(--surface-2);
  border: none;
  padding: .12rem .35rem;
  border-radius: 0;
  font-size: .85em;
}
.callout {
  border: none;
  border-left: 2px solid var(--text);
  background: transparent;
  padding: .5rem 0 .5rem 1.25rem;
  border-radius: 0;
  font-size: .92rem;
  color: var(--muted);
}
.callout strong { color: var(--text); }
.claim-table { width: 100%; border-collapse: collapse; margin: 1rem 0; }
.claim-table th, .claim-table td {
  border: 1px solid var(--line);
  padding: .75rem;
  text-align: left;
  vertical-align: top;
  font-size: .9rem;
}
.claim-table th { color: var(--muted-2); font-weight: 500; text-transform: uppercase; font-size: .72rem; letter-spacing: 0.08em; }
.claim-table td { color: var(--muted); }
.claim-table td:first-child { color: var(--text); }
.status { font-weight: 600; font-size: .82rem; }
.status.supported { color: var(--text); }
.status.partial { color: var(--muted); }
.status.open { color: var(--danger); }

/* ===== Media figures ===== */
.card-media {
  position: relative;
  aspect-ratio: 16 / 9;
  margin-bottom: 1.25rem;
  border: 1px solid var(--line);
  border-radius: 0;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: var(--surface-2);
}
.card-media .ph {
  color: var(--muted-2);
  font-size: .68rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0 .6rem;
  text-align: center;
}
.card-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(.3);
}

.system-card-media {
  padding: clamp(1.1rem, 3vw, 2rem);
  background-color: var(--bg);
  background-image:
    linear-gradient(to right, var(--line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line) 1px, transparent 1px);
  background-size: 24px 24px;
}
.system-kicker {
  position: absolute;
  top: .7rem;
  left: .75rem;
  padding: .2rem .35rem;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: .58rem;
  font-weight: 500;
  letter-spacing: .08em;
  line-height: 1.2;
  text-transform: uppercase;
}
.system-path {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(.1rem, .35vw, .3rem);
}
.system-node {
  min-width: 0;
  padding: .4rem .25rem;
  border: 1px solid var(--line-strong);
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: clamp(.46rem, .55vw, .58rem);
  font-weight: 600;
  letter-spacing: .02em;
  line-height: 1;
  text-align: center;
  text-transform: uppercase;
  white-space: nowrap;
}
.system-arrow {
  flex: 0 0 auto;
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: .62rem;
}

.media-figure { margin: 2rem 0; }
.media-figure video,
.media-figure > img,
.media-figure .diagram {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none;
  background: var(--surface);
}
.media-figure figcaption { color: var(--muted); font-size: .85rem; margin-top: .6rem; line-height: 1.5; }
.media-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}
.media-gallery img {
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 0;
  display: block;
}

/* ===== Stat grid ===== */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 0;
  overflow: hidden;
}
.stat {
  background: var(--bg);
  padding: 1.15rem 1.2rem;
}
.stat b {
  display: block;
  font-family: var(--font-mono);
  font-size: clamp(1.5rem, 2.6vw, 1.9rem);
  line-height: 1;
  color: var(--text);
  font-weight: 500;
  letter-spacing: -0.02em;
}
.stat span { display: block; color: var(--muted); font-size: .85rem; margin-top: .4rem; }
.stat a { color: var(--text); font-weight: 500; border-bottom: 1px solid var(--line-strong); text-decoration: none; }

/* ===== Big number ===== */
.bignum {
  font-family: var(--font-mono);
  font-size: clamp(2.2rem, 6vw, 4rem);
  line-height: 1;
  color: var(--text);
  letter-spacing: -0.03em;
  font-weight: 500;
}
.bignum-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.5rem; margin: 1.5rem 0; }
.bignum-row > div strong { display: block; font-size: .88rem; color: var(--muted); margin-top: .4rem; font-weight: 500; }

/* ===== Method steps ===== */
.method-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.method-steps li {
  border: none;
  border-top: none;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 1.25rem;
  background: transparent;
}
.method-steps b { display: block; font-size: 1rem; margin-bottom: .4rem; font-weight: 600; }
.method-steps p { margin: 0; color: var(--muted); font-size: .9rem; }

/* ===== VS grid ===== */
.vs-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin: 1.5rem 0; border: 1px solid var(--line); }
.vs-grid > div { border: none; border-radius: 0; padding: 1.25rem; }
.vs-grid > div:first-child { border-right: 1px solid var(--line); }
.vs-grid .no { border-left: 2px solid var(--danger); }
.vs-grid .yes { border-left: 2px solid var(--text); }
.vs-grid h4 { margin: 0 0 .6rem; font-size: .98rem; font-weight: 600; }
.vs-grid ul { margin: 0; padding-left: 1.1rem; color: var(--muted); font-size: .9rem; }

/* ===== Fineprint ===== */
.fineprint {
  margin-top: 1rem;
  padding: .85rem 1rem;
  border-left: 2px solid var(--line);
  background: transparent;
  border-radius: 0;
  color: var(--muted-2);
  font-size: .8rem;
  line-height: 1.6;
}
.fineprint strong { color: var(--muted); }
.fineprint a { color: var(--text); border-bottom: 1px solid var(--line-strong); text-decoration: none; }

/* ===== Refs / tags ===== */
.ref { font-size: .7em; vertical-align: super; color: var(--muted-2); font-weight: 500; margin-left: .12em; }
.tag {
  display: inline-block;
  font-size: .62rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: .1rem .4rem;
  border-radius: 0;
  border: 1px solid var(--line);
  vertical-align: middle;
}
.tag.hard { color: var(--text); border-color: var(--line-strong); }
.tag.est { color: var(--muted); border-color: var(--line); }

/* ===== Sources details ===== */
details.sources {
  border: 1px solid var(--line);
  border-radius: 0;
  padding: .3rem 1.25rem;
  margin: 2rem 0;
  background: transparent;
}
details.sources > summary {
  cursor: pointer;
  font-weight: 500;
  color: var(--text);
  padding: .75rem 0;
  list-style: none;
  font-size: .9rem;
}
details.sources > summary::-webkit-details-marker { display: none; }
details.sources > summary::before { content: "+ "; font-family: var(--font-mono); }
details.sources[open] > summary::before { content: "− "; }
details.sources[open] > summary { border-bottom: 1px solid var(--line); margin-bottom: .75rem; }
.source-list { font-size: .85rem; line-height: 1.6; }
.source-list li { margin-bottom: .5rem; color: var(--muted); }
.source-list a { color: var(--text); text-decoration: none; border-bottom: 1px solid var(--line-strong); }

/* ===== Scroll-spy ===== */
.main-nav a.is-active { color: var(--text); }
.side-nav a.is-active { color: var(--text); font-weight: 600; }

/* ===== Scroll-reveal (motion-safe only), disabled for minimalism ===== */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .reveal.reveal-in { opacity: 1; transform: none; }
}

/* ===== Mobile nav ===== */
@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }
  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: .5rem 1.5rem 1.25rem;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    box-shadow: none;
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: .75rem 0; border-bottom: 1px solid var(--line); text-decoration: none; }
  .main-nav a:last-child { border-bottom: 0; }
}

@media (max-width: 760px) {
  .method-steps { grid-template-columns: 1fr; }
  .vs-grid { grid-template-columns: 1fr; }
  .vs-grid > div:first-child { border-right: none; border-bottom: 1px solid var(--line); }
}

@media (max-width: 980px) {
  .hero-grid, .two-col, .content-grid, .cta-card, .snapshot-grid, .timeline-grid { grid-template-columns: 1fr; }
  .project-grid, .packet-grid, .source-grid, .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .side-nav { position: static; display: flex; flex-wrap: wrap; gap: 1rem; }
  .profile-panel { grid-template-columns: 120px 1fr; }
}

@media (max-width: 680px) {
  .container {
    width: auto;
    max-width: none;
    margin-left: 20px;
    margin-right: 20px;
  }
  .hero-grid { display: block; }
  .hero-copy { max-width: 100%; }
  .nav-wrap {
    min-height: 56px;
    padding: .5rem 0;
  }
  .section { padding: 64px 0; }
  .hero { padding-top: 64px; }
  .lede { max-width: 100%; }
  .hero-actions, .signal-strip {
    width: auto;
    max-width: calc(100% - 40px);
  }
  .hero-actions { align-items: stretch; flex-direction: column; }
  .hero-actions .button {
    width: 100%;
    max-width: calc(100vw - 40px);
    align-self: flex-start;
  }
  .signal-strip {
    display: flex;
    flex-direction: column;
  }
  .proof-links {
    grid-template-columns: 1fr;
    width: 100%;
    max-width: calc(100vw - 40px);
  }
  .signal-strip span {
    width: 100%;
    max-width: calc(100vw - 40px);
    text-align: center;
  }
  .project-grid, .packet-grid, .source-grid, .metric-grid { grid-template-columns: 1fr; }
  .matrix-card { overflow-x: visible; }
  .matrix,
  .matrix thead,
  .matrix tbody,
  .matrix tr,
  .matrix th,
  .matrix td {
    display: block;
    width: 100%;
  }
  .matrix thead { display: none; }
  .matrix tr {
    border-bottom: 1px solid var(--line);
    padding: .45rem 0;
  }
  .matrix tr:last-child { border-bottom: 0; }
  .matrix th,
  .matrix td {
    border-bottom: 0;
    padding: .5rem .35rem;
  }
  .matrix td:first-child {
    color: var(--text);
    font-weight: 600;
  }
  .profile-panel { grid-template-columns: 1fr; }
  .avatar {
    width: 100%;
    height: auto;
    max-height: 320px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .quick-facts { grid-template-columns: 1fr; }
  .quick-facts div { border-right: 0; border-bottom: 1px solid var(--line); }
  .quick-facts div:last-child { border-bottom: 0; }
  .timeline-list article { grid-template-columns: 1fr; }
  .timeline-list p { grid-column: 1; }
  h1 { font-size: 2.25rem; max-width: 100%; }
}

@media print {
  .site-header, .site-footer, .theme-toggle, .hero-actions, .cta-section { display: none; }
  body { background: #fff; color: #000; }
  .section, .page-hero { padding: 24px 0; }
  .project-card, .profile-panel, .matrix-card, .packet-card, .cta-card { box-shadow: none; border-color: #ccc; }
}

/* ===================================================================
   Hero / value layer (preserved classes, minimal styling)
   =================================================================== */

.hero .eyebrow { color: var(--muted-2); }
.hero h1 { font-size: clamp(2.25rem, 5vw, 4rem); max-width: 18ch; font-weight: 400; }

.bio {
  font-size: 1.05rem;
  line-height: 1.65;
  margin: 1rem 0 0;
  max-width: 48ch;
  color: var(--muted);
}

.claim {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2vw, 1.5rem);
  line-height: 1.4;
  margin: 1.25rem 0 0;
  max-width: 36ch;
  color: var(--text);
  font-weight: 400;
}
.claim b { color: var(--text); font-weight: 600; }

.hero-band { margin-top: clamp(2rem, 4vw, 3rem); }
.value-pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 0;
  overflow: hidden;
  box-shadow: none;
}
.pillar {
  background: transparent;
  padding: 1.5rem;
  position: relative;
  border-right: 1px solid var(--line);
}
.pillar:last-child { border-right: 0; }
.pillar::before { display: none; }
.pillar:nth-child(2)::before { display: none; }
.pillar:nth-child(3)::before { display: none; }
.pillar h3 {
  font-size: .98rem;
  font-weight: 600;
  margin: 0 0 .5rem;
  color: var(--text);
  letter-spacing: -0.01em;
}
.pillar p { margin: 0; color: var(--muted); font-size: .9rem; line-height: 1.55; }
.pillar .k { color: var(--text); font-weight: 600; }

.hero-cred {
  margin: 1.25rem 0 0;
  font-family: var(--font-mono);
  font-size: .78rem;
  letter-spacing: 0;
  color: var(--muted-2);
  line-height: 1.6;
}
.hero-cred strong { color: var(--text); font-weight: 600; }
.hero-cred a { color: var(--text); text-decoration: underline; }

.pull-quote {
  margin: 1.75rem 0 0;
  padding: .75rem 0 .75rem 1.5rem;
  border-left: 2px solid var(--line-strong);
  background: transparent;
  border-radius: 0;
}
.pull-quote p {
  margin: 0;
  font-size: .95rem;
  line-height: 1.7;
  color: var(--muted);
  font-style: normal;
}
.pull-quote cite {
  display: block;
  margin-top: .75rem;
  font-size: .82rem;
  font-style: normal;
  color: var(--muted-2);
}
.pull-quote cite a {
  color: var(--text);
  text-decoration: underline;
}

.influences-heading {
  margin: 2rem 0 .5rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}
.influences-text {
  margin: .5rem 0;
  font-size: .95rem;
  line-height: 1.7;
  color: var(--muted);
}

/* Reviewer depth paths */
.depths {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.depths li {
  border: none;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 1.25rem;
  background: transparent;
}
.depths .t {
  font-family: var(--font-mono);
  font-size: .72rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted-2);
}
.depths b { display: block; font-size: 1.05rem; margin: .35rem 0 .35rem; font-weight: 600; }
.depths p { margin: 0; color: var(--muted); font-size: .88rem; line-height: 1.5; }

/* Numbers in monospace with tabular nums */
.metric-card strong, .stat b, .matrix td:first-child { font-variant-numeric: tabular-nums; }
.metric-card strong { font-family: var(--font-mono); font-weight: 500; letter-spacing: -0.02em; }

@media (max-width: 860px) {
  .value-pillars { grid-template-columns: 1fr; }
  .value-pillars .pillar { border-right: 0; border-bottom: 1px solid var(--line); }
  .value-pillars .pillar:last-child { border-bottom: 0; }
  .depths { grid-template-columns: 1fr; }
  .depths li { border-right: 0; border-bottom: 1px solid var(--line); }
  .depths li:last-child { border-bottom: 0; }
}

/* ===== Essay prose ===== */
.essay-prose { max-width: 720px; }
.essay-prose > p:first-child { margin-top: 0; }
.essay-prose p { color: var(--muted); font-size: 1.02rem; line-height: 1.75; margin: 1.1rem 0; }
.essay-prose p.lead { color: var(--text); font-size: 1.12rem; line-height: 1.65; margin: 1.5rem 0; }
.essay-prose h2 { font-size: 1.45rem; margin: 3rem 0 .85rem; font-weight: 500; color: var(--text); }
.essay-prose h3 { font-size: 1.08rem; margin: 2rem 0 .5rem; font-weight: 600; color: var(--text); }
.essay-prose ul, .essay-prose ol { color: var(--muted); font-size: 1.02rem; line-height: 1.75; padding-left: 1.5rem; margin: 1.1rem 0; }
.essay-prose li { margin: .35rem 0; }
.essay-prose strong { color: var(--text); font-weight: 600; }
.essay-prose em { font-style: italic; }
.essay-prose a { text-decoration-color: var(--line-strong); }
.essay-prose a:hover { text-decoration-color: var(--muted); }

.essay-prose blockquote {
  border-left: 2px solid var(--text);
  padding: .25rem 0 .25rem 1.25rem;
  margin: 1.5rem 0;
  color: var(--text);
  font-size: 1.05rem;
  line-height: 1.65;
}
.essay-prose blockquote p { color: var(--text); margin: .5rem 0; }

.essay-prose pre {
  background: var(--surface-2);
  border: 1px solid var(--line);
  padding: 1rem 1.25rem;
  overflow-x: auto;
  margin: 1.5rem 0;
  font-size: .85rem;
  line-height: 1.6;
}
.essay-prose code {
  background: var(--surface-2);
  border: none;
  padding: .12rem .35rem;
  border-radius: 0;
  font-size: .85em;
  font-family: var(--font-mono);
}
.essay-prose pre code { background: transparent; padding: 0; }

.essay-prose figure { margin: 2.5rem 0; }
.essay-prose figure object,
.essay-prose figure img { display: block; width: 100%; max-width: 560px; margin: 0 auto; }
.essay-prose figcaption { color: var(--muted); font-size: .85rem; margin-top: .75rem; line-height: 1.5; text-align: center; }

.essay-prose table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: .9rem; }
.essay-prose th, .essay-prose td { border: 1px solid var(--line); padding: .6rem .75rem; text-align: left; vertical-align: top; }
.essay-prose th { color: var(--muted-2); font-weight: 500; text-transform: uppercase; font-size: .72rem; letter-spacing: 0.08em; }
.essay-prose td { color: var(--muted); }
.essay-prose td:first-child { color: var(--text); }
.essay-prose tr:nth-child(even) td { background: var(--surface-2); }

.essay-prose hr { border: none; border-top: 1px solid var(--line); margin: 3rem 0; }

.essay-prose .math-inline { white-space: nowrap; }
.essay-prose .math-block { display: block; text-align: center; margin: 1.5rem 0; overflow-x: auto; }

.essay-footnotes { max-width: 720px; margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.essay-footnotes p { color: var(--muted-2); font-size: .82rem; line-height: 1.6; margin: .4rem 0; }
.essay-footnotes a { text-decoration-color: var(--line); }
.essay-footnotes sup { font-size: .7rem; }

.essay-meta { max-width: 720px; margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.essay-meta p { color: var(--muted-2); font-size: .82rem; margin: .25rem 0; }
.essay-meta strong { color: var(--muted); font-weight: 500; }

.essay-nav { max-width: 720px; margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 1rem; }
.essay-nav a { font-size: .9rem; }

@media (max-width: 720px) {
  .essay-prose figure object,
  .essay-prose figure img { max-width: 100%; }
  .essay-nav { flex-direction: column; }
}

/* ===== Figure click-to-zoom ===== */
.essay-prose figure.zoomable { cursor: zoom-in; position: relative; }
.essay-prose figure.zoomable:focus { outline: 2px solid var(--text); outline-offset: 4px; }
.essay-prose figure.zoomable object { pointer-events: none; }
.essay-prose figure.zoomable::after {
  content: "Click to enlarge";
  position: absolute; bottom: .5rem; right: .5rem;
  font-size: .72rem; color: var(--muted-2);
  background: var(--surface); border: 1px solid var(--line);
  padding: .2rem .5rem; pointer-events: none;
  opacity: 0; transition: opacity .2s;
}
.essay-prose figure.zoomable:hover::after { opacity: 1; }

.figure-modal {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.85);
  padding: 2rem;
}
.figure-modal[hidden] { display: none; }
.figure-modal-inner {
  max-width: 94vw; max-height: 90vh;
  display: flex; flex-direction: column; align-items: center; gap: 1rem;
}
.figure-modal-inner img {
  max-width: 94vw; max-height: 78vh;
  width: auto; height: auto;
  background: #fff; border: 1px solid rgba(255,255,255,0.15);
}
.figure-modal-caption { color: #ccc; font-size: .9rem; text-align: center; max-width: 600px; line-height: 1.5; }
.figure-modal-link { color: #999; font-size: .82rem; text-decoration: underline; text-underline-offset: 2px; }
.figure-modal-link:hover { color: #fff; }
.figure-modal-close {
  position: absolute; top: 1rem; right: 1rem;
  background: transparent; border: none; color: #fff;
  cursor: pointer; padding: .5rem; line-height: 0;
  border-radius: 50%; opacity: .7;
}
.figure-modal-close:hover { opacity: 1; }
.figure-modal-close:focus { outline: 2px solid #fff; outline-offset: 2px; }

