/* ==========================================================================
   tomwilk.net — site styles
   Same family as The Simulation Semester and the Active Learning Library:
   ink and paper, Fraunces over Inter, mono kickers. The accent here is
   bronze, after the statue that has been on the front page since 2015.
   ========================================================================== */

:root {
  --ink: #0c1220;
  --ink-2: #131b2c;
  --ink-3: #1c263b;
  --ink-line: rgba(170, 200, 235, 0.14);
  --paper: #f6f1e6;
  --paper-2: #ede5d4;
  --paper-line: #dcd2bd;
  --card: #fffdf8;
  --text: #1c2029;
  --text-soft: #4c525e;
  --on-ink: #e9eef6;
  --on-ink-soft: #a7b3c6;
  --bronze: #d6a252;
  --bronze-deep: #9a6a22;
  --patina: #5cc8b0;
  --teal: #137a72;
  --brick: #a5422a;
  --claude: #c46a43;

  --t-research: #2f6fb0;
  --t-ai: #137a72;
  --t-teach: #c4553a;
  --t-build: #7a4fb5;
  --t-service: #b8862b;

  --f-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --f-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-read: "Source Serif 4", Georgia, serif;
  --f-mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 14px;
  --shadow: 0 1px 2px rgba(10, 18, 32, .06), 0 12px 32px -14px rgba(10, 18, 32, .28);
  color-scheme: light;
}

:root[data-theme="dark"] {
  --paper: #10172a; --paper-2: #151e33; --paper-line: #26314a; --card: #172038;
  --text: #e6ebf3; --text-soft: #a9b4c6; --teal: #5cc8b0; --brick: #e58a6c; --bronze-deep: #e0b36b;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation-duration: .001s !important; transition-duration: .001s !important; } }
body {
  margin: 0; background: var(--paper); color: var(--text);
  font-family: var(--f-body); font-size: 17px; line-height: 1.65;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--brick); }
::selection { background: var(--bronze); color: var(--ink); }
:focus-visible { outline: 3px solid var(--bronze); outline-offset: 3px; border-radius: 4px; }
button, input, select, textarea { font: inherit; color: inherit; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 780px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--bronze); color: var(--ink); padding: 8px 14px; border-radius: 8px; z-index: 100; font-weight: 600; }
.skip:focus { top: 12px; }

/* ---------- type ---------- */
h1, h2, h3, h4 { font-family: var(--f-display); font-weight: 600; line-height: 1.1; letter-spacing: -0.01em; margin: 0 0 .5em; font-variation-settings: "opsz" 96; text-wrap: balance; }
h2 { font-size: clamp(2rem, 4.4vw, 3.2rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.45rem); font-variation-settings: "opsz" 36; }
h4 { font-size: 1.05rem; font-family: var(--f-body); font-weight: 600; letter-spacing: 0; }
p { margin: 0 0 1.1em; }
.kicker {
  font-family: var(--f-mono); font-size: .76rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--teal); margin: 0 0 1.1rem; display: flex; align-items: center; gap: .6rem;
}
.kicker::before { content: ""; width: 26px; height: 1px; background: currentColor; }
.lede { font-size: clamp(1.1rem, 1.7vw, 1.28rem); line-height: 1.55; color: var(--text-soft); max-width: 46em; }
.mono { font-family: var(--f-mono); }
.prose { font-family: var(--f-read); font-size: 1.12rem; line-height: 1.7; }
.prose p { margin-bottom: 1.15em; }
.prose h3 { margin-top: 1.8em; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: .45em; }
.aside-note { font-size: .92rem; color: var(--text-soft); border-left: 2px solid var(--bronze); padding-left: 1rem; }

/* ---------- nav ---------- */
.nav { position: fixed; inset: 0 0 auto 0; z-index: 50; transition: background .3s, box-shadow .3s; }
.nav.is-solid, .nav.is-static { background: rgba(12, 18, 32, .95); backdrop-filter: blur(10px); box-shadow: 0 1px 0 var(--ink-line); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 1rem; }
.brand {
  color: var(--on-ink); text-decoration: none; white-space: nowrap;
  font-family: var(--f-body); font-weight: 400; font-size: 1.12rem; letter-spacing: .34em; text-transform: uppercase;
  display: flex; align-items: center; gap: .7rem;
}
.brand b { font-weight: 600; }
.brand:hover { color: #fff; }
.brand-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--bronze); box-shadow: 0 0 0 4px rgba(214, 162, 82, .18); flex: none; }
.nav-links { display: flex; align-items: center; gap: 1.5rem; list-style: none; margin: 0; padding: 0; }
.nav-links a { color: var(--on-ink-soft); text-decoration: none; font-size: .92rem; font-weight: 500; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: #fff; }
.nav-links a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--bronze); padding-bottom: 4px; }
.find-btn {
  display: inline-flex; align-items: center; gap: .5rem; background: rgba(255,255,255,.06); border: 1px solid var(--ink-line);
  color: var(--on-ink-soft); border-radius: 999px; padding: .38rem .55rem .38rem .8rem; font-size: .85rem; cursor: pointer;
}
.find-btn:hover { color: #fff; border-color: rgba(233,238,246,.35); }
.find-btn kbd { font-family: var(--f-mono); font-size: .72rem; background: rgba(255,255,255,.08); border-radius: 5px; padding: 1px 6px; }
.find-btn svg { width: 15px; height: 15px; }
.nav-toggle { display: none; background: none; border: 1px solid var(--ink-line); color: var(--on-ink); border-radius: 8px; padding: 6px 10px; font-size: .85rem; cursor: pointer; }
@media (max-width: 960px) {
  .nav-toggle { display: block; }
  .nav-links { position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; background: rgba(12, 18, 32, .98); padding: .5rem var(--gutter) 1.2rem; display: none; }
  .nav.is-open .nav-links { display: flex; }
  .nav.is-open { background: rgba(12, 18, 32, .98); }
  .nav-links a { display: block; padding: .75rem 0; border-bottom: 1px solid var(--ink-line); font-size: 1rem; }
  .nav-links a[aria-current="page"] { box-shadow: none; color: var(--bronze); }
  .nav-links li:last-child { padding-top: .9rem; }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem; padding: .85rem 1.35rem; border-radius: 999px;
  font-weight: 600; font-size: .95rem; text-decoration: none; transition: transform .15s, background .2s, color .2s, border-color .2s;
  border: 1px solid transparent; cursor: pointer; font-family: var(--f-body); line-height: 1.2;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--bronze); color: var(--ink); }
.btn-primary:hover { background: #e6b96f; color: var(--ink); }
.btn-ghost { border-color: rgba(233, 238, 246, .35); color: var(--on-ink); background: transparent; }
.btn-ghost:hover { border-color: var(--on-ink); color: #fff; }
.btn-line { background: transparent; color: var(--text); border-color: var(--paper-line); }
.btn-line:hover { border-color: var(--text); color: var(--text); }
.btn-sm { padding: .5rem .95rem; font-size: .85rem; }
.btn svg { width: 16px; height: 16px; }

/* ---------- hero (home) ---------- */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh; background: var(--ink); color: var(--on-ink);
  display: flex; align-items: center; overflow: hidden; isolation: isolate; padding: 120px 0 90px;
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(ellipse 60% 55% at 78% 40%, rgba(214, 162, 82, .12), transparent 70%),
    radial-gradient(ellipse 75% 75% at 28% 50%, rgba(12, 18, 32, .95) 0%, rgba(12, 18, 32, .82) 50%, rgba(12, 18, 32, .5) 100%),
    linear-gradient(180deg, rgba(12, 18, 32, .45) 0%, rgba(12, 18, 32, 0) 28%, rgba(12, 18, 32, .97) 100%);
}
.hero-grid { display: grid; grid-template-columns: 1.25fr .9fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.hero .kicker { color: var(--bronze); }
.hero h1 { font-size: clamp(2.8rem, 7.4vw, 5.9rem); line-height: .98; letter-spacing: -0.03em; margin-bottom: 1.6rem; font-variation-settings: "opsz" 144; }
.hero h1 em { font-style: italic; color: var(--bronze); font-weight: 500; }
.hero .lede { color: var(--on-ink-soft); margin-bottom: 2rem; }
.hero .lede strong { color: var(--on-ink); font-weight: 600; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: .8rem; }
.hero-roles { list-style: none; padding: 0; margin: 2.4rem 0 0; display: flex; flex-wrap: wrap; gap: .5rem .6rem; }
.hero-roles li { font-family: var(--f-mono); font-size: .74rem; letter-spacing: .04em; color: var(--on-ink-soft); border: 1px solid var(--ink-line); border-radius: 999px; padding: .3rem .75rem; }

.thinker { position: relative; margin: 0; }
.thinker-frame {
  position: relative; border-radius: 18px; overflow: hidden; aspect-ratio: 4 / 5;
  box-shadow: 0 30px 80px -30px rgba(0,0,0,.8), 0 0 0 1px var(--ink-line);
  background: #0a0f1a;
}
.thinker-frame img { width: 100%; height: 100%; object-fit: cover; object-position: 62% 50%; filter: saturate(.85) contrast(1.05); transform: scale(1.02); }
.thinker-frame::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(12,18,32,0) 55%, rgba(12,18,32,.85) 100%); }
.thinker figcaption { position: absolute; left: 18px; right: 18px; bottom: 14px; z-index: 2; font-family: var(--f-mono); font-size: .7rem; letter-spacing: .06em; color: var(--on-ink-soft); }
.bubble {
  position: absolute; z-index: 3; left: -8%; top: 7%; max-width: 72%;
  background: #fbf7ee; color: #1c2029; border-radius: 26px; padding: 1rem 1.2rem;
  font-family: var(--f-read); font-style: italic; font-size: clamp(1rem, 1.6vw, 1.15rem); line-height: 1.35;
  box-shadow: 0 18px 40px -18px rgba(0,0,0,.7); min-height: 3.2em;
  transition: opacity .35s ease, transform .35s ease;
}
.bubble::before, .bubble::after { content: ""; position: absolute; background: #fbf7ee; border-radius: 50%; }
.bubble::before { width: 22px; height: 22px; right: 18%; bottom: -16px; }
.bubble::after { width: 11px; height: 11px; right: 12%; bottom: -32px; }
.bubble.is-swapping { opacity: 0; transform: translateY(6px); }
.bubble small { display: block; font-family: var(--f-mono); font-style: normal; font-size: .64rem; letter-spacing: .08em; text-transform: uppercase; color: #8a6a3a; margin-top: .45rem; }
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .thinker { max-width: 420px; margin: 1rem auto 0; width: 100%; }
  .bubble { left: 4%; }
}

/* ---------- page hero (inner pages) ---------- */
.page-hero { background: var(--ink); color: var(--on-ink); padding: 150px 0 72px; position: relative; overflow: hidden; isolation: isolate; }
.page-hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(ellipse 55% 80% at 85% 0%, rgba(214, 162, 82, .12), transparent 70%),
    linear-gradient(90deg, rgba(12, 18, 32, .96) 0%, rgba(12, 18, 32, .88) 45%, rgba(12, 18, 32, .62) 100%),
    linear-gradient(180deg, rgba(12, 18, 32, .5) 0%, rgba(12, 18, 32, 0) 35%, rgba(12, 18, 32, .95) 100%);
}
.page-hero .kicker { color: var(--bronze); }
.page-hero h1 { font-size: clamp(2.5rem, 6vw, 4.6rem); line-height: 1; letter-spacing: -0.025em; margin-bottom: 1.2rem; font-variation-settings: "opsz" 144; max-width: 16ch; }
.page-hero h1 em { font-style: italic; color: var(--bronze); font-weight: 500; }
.page-hero .lede { color: var(--on-ink-soft); }
.page-hero .hero-ctas { margin-top: 1.8rem; }
.subnav { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 2rem; padding: 0; list-style: none; }
.subnav a { display: inline-block; font-size: .85rem; color: var(--on-ink-soft); text-decoration: none; border: 1px solid var(--ink-line); border-radius: 999px; padding: .35rem .85rem; }
.subnav a:hover { color: #fff; border-color: rgba(233,238,246,.4); }

/* ---------- stats ---------- */
.stats { background: var(--ink-2); color: var(--on-ink); border-top: 1px solid var(--ink-line); }
.stats ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); }
.stats li { padding: 1.7rem 1.4rem 1.6rem; border-left: 1px solid var(--ink-line); }
.stats li:first-child { border-left: 0; padding-left: 0; }
.stats b { display: block; font-family: var(--f-display); font-size: clamp(1.9rem, 3.6vw, 2.7rem); font-weight: 600; color: var(--bronze); line-height: 1.05; margin-bottom: .35rem; font-variation-settings: "opsz" 144; }
.stats span { font-size: .88rem; color: var(--on-ink-soft); line-height: 1.45; display: block; }
@media (max-width: 680px) { .stats ul { grid-template-columns: 1fr; } .stats li { border-left: 0 !important; padding-left: 0; border-top: 1px solid var(--ink-line); } .stats li:first-child { border-top: 0; } }

/* ---------- sections ---------- */
.section { padding: clamp(4.5rem, 9vw, 7.5rem) 0; }
.section-tight { padding: clamp(3rem, 6vw, 4.5rem) 0; }
.section-alt { background: var(--paper-2); }
.section-dark { background: var(--ink); color: var(--on-ink); }
.section-dark .kicker { color: var(--bronze); }
.section-dark .lede { color: var(--on-ink-soft); }
.section-dark a:not(.btn):not(.card-link) { color: var(--patina); }
.section-head { max-width: 820px; margin-bottom: clamp(2.2rem, 4.5vw, 3.4rem); }
.section-head h2 { margin-bottom: .9rem; }
.split { display: grid; grid-template-columns: 1.35fr .9fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
.split-even { grid-template-columns: 1fr 1fr; }
@media (max-width: 880px) { .split, .split-even { grid-template-columns: 1fr; } }

/* ---------- three tracks ---------- */
.tracks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
@media (max-width: 900px) { .tracks { grid-template-columns: 1fr; } }
.track {
  position: relative; background: var(--card); border: 1px solid var(--paper-line); border-radius: var(--radius); padding: 1.8rem 1.6rem 1.5rem;
  display: flex; flex-direction: column; text-decoration: none; color: var(--text); transition: transform .2s, box-shadow .2s, border-color .2s; overflow: hidden;
}
.track::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--tc); }
.track:hover { transform: translateY(-3px); box-shadow: var(--shadow); color: var(--text); border-color: transparent; }
.track .num { font-family: var(--f-mono); font-size: .75rem; color: var(--tc); letter-spacing: .1em; margin-bottom: .9rem; }
.track h3 { font-size: 1.6rem; margin-bottom: .6rem; }
.track p { color: var(--text-soft); font-size: .98rem; margin-bottom: 1.2rem; }
.track ul { list-style: none; margin: 0 0 1.3rem; padding: 0; font-size: .9rem; }
.track li { padding: .42rem 0; border-top: 1px dashed var(--paper-line); color: var(--text); }
.track .go { margin-top: auto; font-weight: 600; font-size: .9rem; color: var(--tc); display: inline-flex; align-items: center; gap: .4rem; }
.track:hover .go { gap: .7rem; }
.track .go, .track:hover .go { transition: gap .2s; }

/* ---------- cards (generic) ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.1rem; }
.card {
  position: relative; background: var(--card); border: 1px solid var(--paper-line); border-radius: var(--radius); padding: 1.35rem 1.35rem 1.2rem;
  display: flex; flex-direction: column; gap: .45rem; color: var(--text); text-decoration: none; transition: transform .2s, box-shadow .2s, border-color .2s;
}
a.card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: transparent; color: var(--text); }
.card .tag { font-family: var(--f-mono); font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--tc, var(--teal)); display: flex; align-items: center; gap: .45rem; }
.card .tag::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.card h3 { font-size: 1.22rem; margin: .1rem 0 .15rem; }
.card p { font-size: .93rem; color: var(--text-soft); margin: 0; }
.card .meta { margin-top: auto; padding-top: .7rem; font-family: var(--f-mono); font-size: .72rem; color: var(--text-soft); display: flex; justify-content: space-between; gap: .5rem; }
.card .meta .arrow { color: var(--tc, var(--teal)); }
.card.feature { grid-column: span 2; background: var(--ink); color: var(--on-ink); border-color: var(--ink-line); }
.card.feature p { color: var(--on-ink-soft); }
.card.feature .meta { color: var(--on-ink-soft); }
a.card.feature:hover { color: var(--on-ink); }
@media (max-width: 640px) { .card.feature { grid-column: auto; } }
.section-dark .card { background: var(--ink-2); border-color: var(--ink-line); color: var(--on-ink); }
.section-dark .card p, .section-dark .card .meta { color: var(--on-ink-soft); }
.section-dark a.card:hover { color: var(--on-ink); border-color: rgba(233,238,246,.25); }
.section-dark .card .tag { color: var(--tc, var(--patina)); }

/* ---------- book feature ---------- */
.book { display: grid; grid-template-columns: 300px 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
@media (max-width: 820px) { .book { grid-template-columns: 1fr; } .book-cover { max-width: 260px; } }
.book-cover {
  aspect-ratio: 2 / 3; border-radius: 4px 12px 12px 4px; background: linear-gradient(135deg, #1b2a48 0%, #0c1220 100%);
  box-shadow: inset 6px 0 0 rgba(255,255,255,.06), inset 8px 0 0 rgba(0,0,0,.25), 0 30px 60px -25px rgba(12,18,32,.6);
  color: #f3ead6; padding: 2rem 1.6rem; display: flex; flex-direction: column; position: relative; overflow: hidden;
}
.book-cover::after { content: "“”"; position: absolute; right: -10px; bottom: -70px; font-family: var(--f-display); font-size: 15rem; color: rgba(214,162,82,.13); line-height: 1; }
.book-cover .bc-title { font-family: var(--f-display); font-size: 2.2rem; line-height: 1; font-weight: 600; margin-top: auto; }
.book-cover .bc-title em { color: var(--bronze); font-style: italic; font-weight: 500; }
.book-cover .bc-sub { font-family: var(--f-read); font-size: .95rem; margin-top: .7rem; color: #cdbf9f; }
.book-cover .bc-auth { font-family: var(--f-mono); font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; margin-top: 2.6rem; color: #a7b3c6; }
.book-cover .bc-pub { font-family: var(--f-mono); font-size: .65rem; letter-spacing: .12em; text-transform: uppercase; color: #6f7c93; }

/* ---------- ledger (joke capital toy) ---------- */
.ledger { background: var(--card); border: 1px solid var(--paper-line); border-radius: var(--radius); padding: 1.4rem; box-shadow: var(--shadow); }
.ledger h3 { font-size: 1.25rem; margin-bottom: .2rem; }
.ledger .sub { font-size: .85rem; color: var(--text-soft); margin-bottom: 1rem; }
.ledger label { display: block; font-family: var(--f-mono); font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--text-soft); margin: .8rem 0 .3rem; }
.ledger select { width: 100%; padding: .6rem .7rem; border-radius: 10px; border: 1px solid var(--paper-line); background: var(--paper); }
.ledger-out { margin-top: 1.2rem; border-top: 2px solid var(--text); padding-top: .9rem; font-family: var(--f-mono); font-size: .85rem; }
.ledger-row { display: flex; justify-content: space-between; gap: 1rem; padding: .25rem 0; }
.ledger-row.total { border-top: 1px dashed var(--paper-line); margin-top: .4rem; padding-top: .55rem; font-weight: 600; }
.ledger-verdict { margin-top: .9rem; font-family: var(--f-read); font-size: 1rem; line-height: 1.5; }
.neg { color: var(--brick); }
.pos { color: var(--teal); }
.meter { height: 10px; border-radius: 999px; background: var(--paper-2); overflow: hidden; margin-top: .6rem; }
.meter i { display: block; height: 100%; width: 50%; background: linear-gradient(90deg, var(--brick), var(--bronze), var(--teal)); transition: width .4s ease; }

/* ---------- timeline / lists ---------- */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: grid; grid-template-columns: 7.5rem 1fr; gap: 1.2rem; padding: 1rem 0; border-top: 1px solid var(--paper-line); }
.timeline li:last-child { border-bottom: 1px solid var(--paper-line); }
.timeline .when { font-family: var(--f-mono); font-size: .78rem; color: var(--text-soft); padding-top: .2rem; }
.timeline b { font-weight: 600; }
.timeline p { margin: .2rem 0 0; color: var(--text-soft); font-size: .95rem; }
.section-dark .timeline li { border-color: var(--ink-line); }
.section-dark .timeline .when, .section-dark .timeline p { color: var(--on-ink-soft); }
@media (max-width: 560px) { .timeline li { grid-template-columns: 1fr; gap: .2rem; } }

.pubs { list-style: none; margin: 0; padding: 0; }
.pubs li { padding: 1rem 0; border-top: 1px solid var(--paper-line); display: grid; grid-template-columns: 4rem 1fr; gap: 1rem; }
.pubs .yr { font-family: var(--f-mono); font-size: .8rem; color: var(--text-soft); padding-top: .25rem; }
.pubs .t { font-family: var(--f-read); font-size: 1.1rem; line-height: 1.4; }
.pubs .t a { color: var(--text); text-decoration-color: var(--paper-line); }
.pubs .t a:hover { color: var(--brick); text-decoration-color: currentColor; }
.pubs .v { font-size: .9rem; color: var(--text-soft); }
.pubs .note { font-size: .82rem; color: var(--bronze-deep); font-family: var(--f-mono); }

/* ---------- quote / pull ---------- */
.pull { margin: 0; padding: 1.6rem 1.6rem 1.4rem; border-radius: var(--radius); background: var(--ink); color: var(--on-ink); position: relative; }
.pull blockquote { margin: 0; font-family: var(--f-display); font-size: clamp(1.25rem, 2.2vw, 1.6rem); line-height: 1.3; font-style: italic; font-weight: 400; }
.pull figcaption { margin-top: 1rem; font-family: var(--f-mono); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--bronze); }
.pull.light { background: var(--card); color: var(--text); border: 1px solid var(--paper-line); }
.pull.light figcaption { color: var(--bronze-deep); }

/* ---------- affiliations ---------- */
.affil { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .8rem; }
.affil > a { display: flex; flex-direction: column; gap: .15rem; padding: 1rem 1.1rem; border-radius: 12px; border: 1px solid var(--paper-line); background: var(--card); text-decoration: none; color: var(--text); transition: border-color .2s, transform .2s; }
.affil > a:hover { border-color: var(--bronze); transform: translateY(-2px); color: var(--text); }
.affil > a b { font-weight: 600; font-size: .95rem; line-height: 1.3; }
.affil > a span { font-size: .8rem; color: var(--text-soft); }

/* ---------- people strip ---------- */
.portrait { border-radius: 18px; overflow: hidden; box-shadow: var(--shadow); }
.portrait img { width: 100%; }

/* ---------- workshop directory ---------- */
.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.6rem; align-items: center; }
.chip { border: 1px solid var(--paper-line); background: var(--card); border-radius: 999px; padding: .42rem .9rem; font-size: .85rem; cursor: pointer; color: var(--text); display: inline-flex; align-items: center; gap: .45rem; }
.chip::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--tc, var(--text-soft)); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.filter-search { flex: 1 1 220px; min-width: 200px; padding: .55rem .9rem; border-radius: 999px; border: 1px solid var(--paper-line); background: var(--card); }
.dir-count { font-family: var(--f-mono); font-size: .75rem; color: var(--text-soft); margin-left: auto; }
.dir-empty { display: none; padding: 2rem; text-align: center; color: var(--text-soft); border: 1px dashed var(--paper-line); border-radius: var(--radius); }

/* ---------- CV ---------- */
.cv-layout { display: grid; grid-template-columns: 220px 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.cv-toc { position: sticky; top: 92px; font-size: .88rem; }
.cv-toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--paper-line); }
.cv-toc a { display: block; padding: .3rem 0 .3rem 1rem; color: var(--text-soft); text-decoration: none; margin-left: -1px; border-left: 2px solid transparent; }
.cv-toc a:hover, .cv-toc a.is-active { color: var(--text); border-left-color: var(--bronze); }
@media (max-width: 880px) { .cv-layout { grid-template-columns: 1fr; } .cv-toc { position: static; } .cv-toc ol { display: flex; flex-wrap: wrap; gap: .3rem; border: 0; } .cv-toc a { border: 1px solid var(--paper-line); border-radius: 999px; padding: .25rem .7rem; margin: 0; } }
.cv-section { padding-bottom: 2.4rem; margin-bottom: 2.4rem; border-bottom: 1px solid var(--paper-line); }
.cv-section:last-child { border-bottom: 0; }
.cv-section h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin-bottom: 1.2rem; }
.cv-section h3 { font-family: var(--f-mono); font-size: .76rem; letter-spacing: .12em; text-transform: uppercase; color: var(--teal); margin: 1.6rem 0 .6rem; font-weight: 500; }
.cv-list { list-style: none; margin: 0; padding: 0; }
.cv-list li { display: grid; grid-template-columns: 6.5rem 1fr; gap: 1rem; padding: .5rem 0; font-size: .97rem; line-height: 1.5; }
.cv-list .d { font-family: var(--f-mono); font-size: .78rem; color: var(--text-soft); padding-top: .18rem; }
.cv-list .x { color: var(--text-soft); font-size: .9rem; display: block; margin-top: .1rem; }
@media (max-width: 560px) { .cv-list li { grid-template-columns: 1fr; gap: 0; } }
.cv-head { display: flex; flex-wrap: wrap; gap: 1rem 2rem; font-size: .92rem; color: var(--text-soft); margin-bottom: 2.4rem; padding: 1.2rem 1.4rem; background: var(--card); border: 1px solid var(--paper-line); border-radius: var(--radius); }
.cv-head b { color: var(--text); font-weight: 600; display: block; font-size: .75rem; font-family: var(--f-mono); letter-spacing: .08em; text-transform: uppercase; }
.updated { font-family: var(--f-mono); font-size: .75rem; color: var(--text-soft); }

/* ---------- callout ---------- */
.callout { display: grid; grid-template-columns: auto 1fr auto; gap: 1.4rem; align-items: center; padding: 1.6rem 1.8rem; border-radius: var(--radius); background: var(--ink); color: var(--on-ink); }
.callout .ico { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; background: rgba(214,162,82,.15); color: var(--bronze); font-family: var(--f-display); font-size: 1.5rem; font-weight: 600; }
.callout h3 { margin: 0 0 .25rem; font-size: 1.3rem; }
.callout p { margin: 0; color: var(--on-ink-soft); font-size: .95rem; }
@media (max-width: 700px) { .callout { grid-template-columns: 1fr; } }

/* ---------- steps (AI governance diagram) ---------- */
.org { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; position: relative; }
@media (max-width: 860px) { .org { grid-template-columns: 1fr; } }
.org-box { border: 1px solid var(--ink-line); border-radius: var(--radius); padding: 1.3rem 1.3rem 1.1rem; background: var(--ink-2); }
.org-box .lvl { font-family: var(--f-mono); font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--patina); }
.org-box h3 { font-size: 1.3rem; margin: .5rem 0 .4rem; }
.org-box p { font-size: .92rem; color: var(--on-ink-soft); margin: 0; }
.org-box.me { border-color: rgba(214,162,82,.55); box-shadow: 0 0 0 1px rgba(214,162,82,.25) inset; }
.org-box.me .lvl { color: var(--bronze); }

/* ---------- footer ---------- */
.footer { background: var(--ink); color: var(--on-ink-soft); padding: 4.5rem 0 2.2rem; font-size: .9rem; }
.footer a { color: var(--on-ink-soft); text-decoration: none; }
.footer a:hover { color: #fff; }
.footer-top { display: grid; grid-template-columns: 1.3fr repeat(3, 1fr); gap: 2.4rem; padding-bottom: 2.6rem; border-bottom: 1px solid var(--ink-line); }
@media (max-width: 900px) { .footer-top { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-top { grid-template-columns: 1fr; } }
.footer h4 { color: var(--on-ink); font-family: var(--f-mono); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 500; margin-bottom: 1rem; }
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li { margin-bottom: .45rem; }
.footer .brand { margin-bottom: 1rem; }
.footer-blurb { max-width: 30em; }
.socials { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.2rem; }
.socials a { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--ink-line); display: grid; place-items: center; transition: border-color .2s, color .2s; }
.socials a:hover { border-color: var(--bronze); color: var(--bronze); }
.socials svg { width: 18px; height: 18px; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; padding-top: 1.6rem; font-size: .8rem; }
.theme-toggle { background: none; border: 1px solid var(--ink-line); color: var(--on-ink-soft); border-radius: 999px; padding: .3rem .8rem; cursor: pointer; font-size: .8rem; }
.theme-toggle:hover { color: #fff; }

/* ---------- finder (command palette) ---------- */
.finder { position: fixed; inset: 0; z-index: 200; display: none; align-items: flex-start; justify-content: center; padding: 12vh var(--gutter) 2rem; background: rgba(6, 10, 18, .6); backdrop-filter: blur(4px); }
.finder.is-open { display: flex; }
.finder-box { width: 100%; max-width: 640px; background: var(--card); color: var(--text); border-radius: 16px; box-shadow: 0 40px 100px -30px rgba(0,0,0,.7); overflow: hidden; border: 1px solid var(--paper-line); }
.finder-input { width: 100%; border: 0; border-bottom: 1px solid var(--paper-line); padding: 1.1rem 1.2rem; font-size: 1.1rem; background: transparent; outline: none; }
.finder-list { list-style: none; margin: 0; padding: .4rem; max-height: 56vh; overflow-y: auto; }
.finder-list li a { display: grid; grid-template-columns: auto 1fr auto; gap: .8rem; align-items: center; padding: .65rem .8rem; border-radius: 10px; text-decoration: none; color: var(--text); }
.finder-list li a .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--tc, var(--teal)); }
.finder-list li a .n { font-weight: 500; }
.finder-list li a .s { display: block; font-size: .8rem; color: var(--text-soft); }
.finder-list li a .k { font-family: var(--f-mono); font-size: .66rem; letter-spacing: .08em; text-transform: uppercase; color: var(--text-soft); }
.finder-list li.is-active a, .finder-list li a:hover { background: var(--paper-2); }
.finder-foot { display: flex; justify-content: space-between; gap: 1rem; padding: .6rem 1rem; border-top: 1px solid var(--paper-line); font-family: var(--f-mono); font-size: .7rem; color: var(--text-soft); }
.finder-empty { padding: 1.2rem; color: var(--text-soft); font-size: .92rem; }

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

/* ---------- misc ---------- */
.two-col-list { columns: 2; column-gap: 2.5rem; }
@media (max-width: 640px) { .two-col-list { columns: 1; } }
.badge { display: inline-block; font-family: var(--f-mono); font-size: .66rem; letter-spacing: .08em; text-transform: uppercase; padding: .15rem .5rem; border-radius: 6px; background: rgba(214,162,82,.18); color: var(--bronze-deep); vertical-align: middle; }
.section-dark .badge { color: var(--bronze); }
.mt-0 { margin-top: 0; } .mt-2 { margin-top: 2rem; } .mt-3 { margin-top: 3rem; } .mb-0 { margin-bottom: 0; }
.center { text-align: center; }
hr.rule { border: 0; border-top: 1px solid var(--paper-line); margin: 2.4rem 0; }
.photo-card { margin: 0; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.photo-card figcaption { background: var(--card); padding: .8rem 1rem; font-size: .85rem; color: var(--text-soft); border: 1px solid var(--paper-line); border-top: 0; border-radius: 0 0 var(--radius) var(--radius); }
@media print {
  .nav, .footer, .finder, .cv-toc, .page-hero .hero-ctas, .subnav { display: none !important; }
  .page-hero { padding: 0 0 1rem; background: none; color: #000; }
  .page-hero .lede { color: #333; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .cv-layout { grid-template-columns: 1fr; }
  .reveal { opacity: 1; transform: none; }
}

/* workshop group headings */
.dir-group + .dir-group { margin-top: 3rem; }
.h-group { font-size: clamp(1.4rem, 2.4vw, 1.8rem); margin-bottom: 1.1rem; display: flex; align-items: baseline; gap: .8rem; }
.h-group::after { content: ""; flex: 1; height: 1px; background: var(--paper-line); }
kbd.mono { font-size: .8em; padding: 1px 6px; border-radius: 5px; border: 1px solid currentColor; opacity: .85; }
.bubble { cursor: pointer; }

/* ---------- drifting wall (hero background) ---------- */
.hero-wall {
  position: absolute; inset: -14% -25%; z-index: -2; display: grid; gap: 14px; align-content: center;
  transform: rotate(-6deg); opacity: .6; pointer-events: none;
}
.page-hero .hero-wall { opacity: .5; inset: -40% -25%; }
.hero-row { display: flex; gap: 14px; width: max-content; animation: drift 170s linear infinite; will-change: transform; }
.hero-row:nth-child(2) { animation-direction: reverse; animation-duration: 200s; }
.hero-row:nth-child(3) { animation-duration: 185s; }
.hero-row:nth-child(4) { animation-direction: reverse; animation-duration: 215s; }
@keyframes drift { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .hero-row { animation: none; } }
.wall-photo { width: 282px; height: 176px; flex: none; object-fit: cover; border-radius: 6px; filter: saturate(.8) contrast(1.02); }
.wall-card {
  width: 290px; height: 176px; flex: none; border-radius: 6px; padding: 16px 18px; background: #fbf6ea; color: #23283a;
  border-top: 5px solid var(--fc, var(--bronze)); display: flex; flex-direction: column; gap: 6px; overflow: hidden;
  background-image: repeating-linear-gradient(transparent 0 25px, rgba(47, 111, 176, .16) 25px 26px);
  background-position: 0 34px;
}
.wall-card b { font-family: var(--f-display); font-size: 1.12rem; line-height: 1.15; font-weight: 600; }
.wall-card span { font-family: var(--f-read); font-size: .85rem; line-height: 1.5; color: #4c525e; }
@media (max-width: 700px) {
  .hero-wall { gap: 10px; opacity: .45; }
  .hero-row { gap: 10px; }
  .wall-photo { width: 200px; height: 125px; }
  .wall-card { width: 205px; height: 125px; padding: 11px 13px; }
  .wall-card b { font-size: .95rem; }
  .wall-card span { font-size: .74rem; }
}
@media (max-width: 900px) {
  .hero::before { background: linear-gradient(180deg, rgba(12, 18, 32, .78) 0%, rgba(12, 18, 32, .86) 55%, rgba(12, 18, 32, .97) 100%); }
  .page-hero::before { background: linear-gradient(180deg, rgba(12, 18, 32, .82) 0%, rgba(12, 18, 32, .9) 60%, rgba(12, 18, 32, .97) 100%); }
}

/* ---------- research hero: the bookshelf ---------- */
.page-hero.shelf { background: var(--ink) url(/assets/img/bookshelf.jpg) right center / cover no-repeat; padding-bottom: 96px; }
@media (max-width: 1000px) { .page-hero.shelf { background-image: url(/assets/img/bookshelf-1000.jpg); background-position: 38% center; } }
.page-hero.shelf::before {
  background:
    linear-gradient(90deg, rgba(12, 18, 32, .97) 0%, rgba(12, 18, 32, .92) 38%, rgba(12, 18, 32, .55) 72%, rgba(12, 18, 32, .3) 100%),
    linear-gradient(180deg, rgba(12, 18, 32, .55) 0%, rgba(12, 18, 32, 0) 30%, rgba(12, 18, 32, .85) 100%);
}
.shelf-cap { position: absolute; right: var(--gutter); bottom: 18px; margin: 0; font-family: var(--f-mono); font-size: .7rem; letter-spacing: .06em; color: var(--on-ink-soft); }
@media (max-width: 900px) {
  .page-hero.shelf::before { background: linear-gradient(180deg, rgba(12, 18, 32, .8) 0%, rgba(12, 18, 32, .88) 60%, rgba(12, 18, 32, .95) 100%); }
  .shelf-cap { left: var(--gutter); }
}

/* ---------- real book cover ---------- */
.book-cover-real { margin: 0; }
.book-cover-real img { width: 100%; border-radius: 3px 8px 8px 3px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08), 0 30px 60px -25px rgba(12,18,32,.6), 0 4px 10px rgba(12,18,32,.15); transform: rotate(-1.5deg); transition: transform .3s ease; }
.book-cover-real img:hover { transform: rotate(0deg) translateY(-3px); }
@media (max-width: 820px) { .book-cover-real { max-width: 260px; } }

/* ==========================================================================
   Quieter labels: serif small caps instead of mono caps with a rule.
   Mono stays only where it earns it (dates, the ledger, URLs, keys).
   ========================================================================== */
.kicker, .card .tag, .track .num, .org-box .lvl, .pull figcaption, .footer h4, .cv-section h3,
.hero-roles li, .bubble small, .thinker figcaption, .shelf-cap, .badge, .ledger label {
  font-family: var(--f-read); text-transform: none; font-variant-caps: all-small-caps;
  letter-spacing: .07em; font-weight: 600;
}
.kicker { font-size: 1.02rem; gap: 0; }
.kicker::before { display: none; }
.card .tag { font-size: .86rem; }
.card .tag::before { display: none; }
.track .num, .org-box .lvl, .cv-section h3 { font-size: .95rem; }
.pull figcaption, .footer h4, .badge { font-size: .9rem; }
.hero-roles li { font-size: .88rem; font-weight: 500; letter-spacing: .05em; }
.bubble small, .thinker figcaption, .shelf-cap { font-size: .84rem; font-weight: 500; }
.ledger label { font-size: .88rem; }
.section-head h2:first-child, .prose > h2:first-child { margin-top: 0; }
.prose h2 { font-family: var(--f-display); font-size: clamp(1.8rem, 3.6vw, 2.6rem); margin: 0 0 .7em; }
.prose h3.sub { font-family: var(--f-body); font-size: 1.05rem; font-weight: 600; margin: 1.6em 0 .35em; letter-spacing: 0; }
.prose .status { font-family: var(--f-read); font-variant-caps: all-small-caps; letter-spacing: .06em; color: var(--bronze-deep); font-size: 1rem; }
.section-dark .prose .status { color: var(--bronze); }
.section-dark .prose h3.sub { color: var(--on-ink); }
.photo-plain { margin: 0; }
.photo-plain img { width: 100%; border-radius: 10px; }
.photo-plain figcaption { font-size: .88rem; color: var(--text-soft); margin-top: .6rem; font-family: var(--f-read); font-style: italic; }
.section-dark .photo-plain figcaption { color: var(--on-ink-soft); }

/* ---------- gateway cards: one card, several closely related links ---------- */
.affil-groups > div { display: flex; flex-direction: column; gap: .3rem; padding: 1.05rem 1.15rem; border-radius: 12px; border: 1px solid var(--paper-line); background: var(--card); }
.affil-groups > div b { font-weight: 600; font-size: .98rem; }
.affil-groups > div span { font-size: .9rem; color: var(--text-soft); line-height: 1.55; }
.affil-groups > div a { color: var(--teal); display: inline; padding: 0; border: 0; background: none; }
a.callout { color: var(--on-ink); }
a.callout:hover { color: var(--on-ink); }
a.callout:hover .btn { transform: translateY(-1px); }
.affil.affil-groups { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
/* org boxes on a light section */
.section:not(.section-dark) .org-box { background: var(--card); border-color: var(--paper-line); }
.section:not(.section-dark) .org-box p { color: var(--text-soft); }
.section:not(.section-dark) .org-box .lvl { color: var(--teal); }
.section:not(.section-dark) .org-box.me { border-color: rgba(154, 106, 34, .45); box-shadow: 0 0 0 1px rgba(214,162,82,.18) inset; }
.section:not(.section-dark) .org-box.me .lvl { color: var(--bronze-deep); }

/* ---------- ported notes ---------- */
.page-hero-short { padding: 128px 0 52px; }
.page-hero-short h1 { font-size: clamp(2rem, 4.6vw, 3.3rem); max-width: 24ch; }
.pdf-frame { display: block; width: 100%; height: min(82vh, 1100px); border: 1px solid var(--paper-line); border-radius: 12px; background: var(--card); }
.pdf-frame p { padding: 1.4rem; }
.video { position: relative; aspect-ratio: 16 / 9; margin: 1.4rem 0; border-radius: 12px; overflow: hidden; background: #000; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- the little Hume next to the name ---------- */
.brand-mark { width: 30px; height: 30px; border-radius: 50%; flex: none; background: #1c263b;
  box-shadow: 0 0 0 1.5px var(--bronze), 0 0 0 5px rgba(214, 162, 82, .14);
  transition: transform .35s ease, box-shadow .35s ease; }
.brand:hover .brand-mark { transform: rotate(-8deg) scale(1.06); box-shadow: 0 0 0 1.5px #e6b96f, 0 0 0 6px rgba(214, 162, 82, .22); }
.footer .brand-mark { width: 26px; height: 26px; }
@media (prefers-reduced-motion: reduce) { .brand:hover .brand-mark { transform: none; } }

/* ---------- laughing Socrates paneling behind the book ---------- */
.has-soc { position: relative; overflow: hidden; isolation: isolate; }
.has-soc > .wrap { position: relative; z-index: 1; }
.soc-field {
  position: absolute; inset: -20px; z-index: 0; display: grid; grid-auto-rows: var(--cell, 132px);
  justify-content: center; align-content: center; pointer-events: none;
  -webkit-mask-image: radial-gradient(ellipse 70% 75% at 58% 50%, rgba(0,0,0,.25) 0%, rgba(0,0,0,.55) 45%, #000 85%);
          mask-image: radial-gradient(ellipse 70% 75% at 58% 50%, rgba(0,0,0,.25) 0%, rgba(0,0,0,.55) 45%, #000 85%);
}
.soc-panel { display: grid; place-items: center; }
.soc { width: 74%; aspect-ratio: 1; will-change: transform; }
.soc img { width: 100%; height: 100%; display: block; opacity: .26; mix-blend-mode: multiply; filter: sepia(.35) contrast(1.05); }
.soc img.is-flipped { transform: scaleX(-1); }
.soc-field.is-armed .soc { opacity: 0; }
[data-theme="dark"] .soc img { mix-blend-mode: screen; filter: invert(1) sepia(.3); opacity: .14; }
@media (max-width: 820px) {
  .soc-field { -webkit-mask-image: linear-gradient(180deg, #000 0%, rgba(0,0,0,.55) 30%, rgba(0,0,0,.55) 75%, #000 100%); mask-image: linear-gradient(180deg, #000 0%, rgba(0,0,0,.55) 30%, rgba(0,0,0,.55) 75%, #000 100%); }
  .soc img { opacity: .22; }
}
