/* zlatko-minev.com — same family as Zlatko's Quantum Notebook (tokens kept in sync with
   notebook site/style.css). Direction A "Lab notebook": cool neutrals, copper accent for links
   and focus, teal spine for papers, cream band for moments. */
[hidden] { display: none !important; }
@font-face { font-family: "Literata"; src: url(fonts/literata-latin-opsz-normal.woff2) format("woff2"); font-weight: 200 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Literata"; src: url(fonts/literata-latin-opsz-italic.woff2) format("woff2"); font-weight: 200 900; font-style: italic; font-display: swap; }
@font-face { font-family: "Public Sans"; src: url(fonts/public-sans-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Public Sans"; src: url(fonts/public-sans-latin-500-normal.woff2) format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Public Sans"; src: url(fonts/public-sans-latin-600-normal.woff2) format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url(fonts/jetbrains-mono-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url(fonts/jetbrains-mono-latin-500-normal.woff2) format("woff2"); font-weight: 500; font-display: swap; }

:root {
  --bg: #ffffff; --surface: #ffffff; --ink: #111c29; --muted: #566475; --line: #d9dfe6;
  --ctl: #6b7889;
  --accent: #a2541f; --accent-ink: #ffffff; --accent-soft: #f6e7dc; --chip: #e8edf2; --bar: #8794a3; --metal: #aeb9c6;
  --paper: #0a6377; --mat: #069abc; --on-mat: #042433;
  --moment: #fff2c7; --on-moment: #111c29;
  --todo-bg: #fff4d6; --todo-ink: #6b4a00;
  --shadow: 0 1px 2px rgb(17 28 41 / .06), 0 8px 24px rgb(17 28 41 / .07);
  --f-display: "Literata", "Iowan Old Style", Georgia, serif;
  --f-body: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --radius: 10px;
  color-scheme: light;  /* white only, by choice (2026-11-15): figures and slides are on white */
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.6 var(--f-body); }
img { max-width: 100%; height: auto; }
a { color: var(--accent); text-underline-offset: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.wrap { max-width: 1200px; margin: 0 auto; padding-inline: 16px; }
@media (min-width: 700px) { .wrap { padding-inline: 28px; } }
.prose { max-width: 68ch; }
.mono { font-family: var(--f-mono); }
.muted { color: var(--muted); }

/* draft flags: every unconfirmed fact is visible in the draft */
.todo { background: var(--todo-bg); color: var(--todo-ink); font: 500 12.5px/1.4 var(--f-mono); padding: 1px 6px; border-radius: 4px; }
.draft-flag { display: inline-block; margin-left: 6px; font: 500 11px/1.6 var(--f-mono); letter-spacing: .03em; color: var(--todo-ink); background: var(--todo-bg); padding: 0 6px; border-radius: 4px; vertical-align: 2px; }

/* top bar */
.topbar { border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 92%, transparent); position: sticky; top: 0; z-index: 5; backdrop-filter: blur(8px); }
.topbar-inner { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-block: 10px; }
.me { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 15px; }
.mark { width: 30px; height: 30px; flex: none; }
.mark .mk-t { fill: #fff; }
.mark path { fill: none; stroke-linecap: round; }
.mark .mk-l { stroke: var(--ink); stroke-width: 4; }
.mark .mk-a { stroke: var(--accent); stroke-width: 5; }
.mark .mk-d { stroke: var(--bar); stroke-width: 2; stroke-dasharray: 1 4.5; }
.nav { display: flex; align-items: center; gap: 4px; font-size: 14.5px; }
.nav a { color: var(--muted); text-decoration: none; padding: 8px 10px; border-radius: 8px; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); background: var(--chip); }
.nav-toggle { display: none; }
@media (max-width: 860px) {
  .nav-toggle { display: inline-grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--ctl); border-radius: 8px; background: var(--surface); color: var(--ink); cursor: pointer; }
  .nav { position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; background: var(--surface); border-bottom: 1px solid var(--line); padding: 8px 16px 14px; display: none; }
  .nav.open { display: flex; }
  .nav a { padding: 12px 10px; font-size: 16px; }
  }

/* type */
h1, h2, h3 { font-family: var(--f-display); letter-spacing: -.02em; text-wrap: balance; }
h1 { font-weight: 650; font-size: clamp(36px, 6vw, 64px); line-height: 1.04; margin: 0; }
h2 { font-weight: 600; font-size: clamp(26px, 3.4vw, 38px); line-height: 1.12; margin: 0 0 8px; }
h3 { font-weight: 600; font-size: 20px; line-height: 1.25; margin: 0 0 6px; }
.eyebrow { margin: 0 0 12px; font: 500 13px/1.4 var(--f-mono); letter-spacing: .04em; color: var(--accent); }
.lede { font-size: clamp(18px, 2vw, 21px); line-height: 1.5; color: var(--muted); max-width: 52ch; margin: 18px 0 0; text-wrap: pretty; }
.page-head { padding-block: clamp(40px, 7vw, 80px) clamp(16px, 3vw, 28px); }
section.band { padding-block: clamp(40px, 6vw, 72px); }
section.band + section.band { border-top: 1px solid var(--line); }
.band-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.band-head p { margin: 0; color: var(--muted); max-width: 60ch; }
.more { font-weight: 500; text-decoration: none; white-space: nowrap; }
.more::after { content: " →"; }

/* buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 999px; border: 1px solid var(--ctl); background: var(--surface); color: var(--ink); text-decoration: none; font-weight: 500; font-size: 15px; min-height: 44px; }
.btn:hover { border-color: var(--accent); color: var(--accent); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.08); color: var(--accent-ink); }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }

/* hero */
.hero { padding-block: clamp(40px, 7vw, 88px) clamp(32px, 5vw, 64px); }
.hero-grid { display: grid; gap: clamp(24px, 4vw, 56px); align-items: center; grid-template-columns: 1fr; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1.35fr 1fr; } }
.hero h1 { font-size: clamp(40px, 6.4vw, 76px); }
.hero .role { margin: 14px 0 0; font: 500 15px/1.5 var(--f-mono); color: var(--muted); }
.hero .statement { font: 500 clamp(21px, 2.5vw, 28px)/1.35 var(--f-display); margin: 22px 0 0; max-width: 34ch; text-wrap: pretty; }
.portrait { margin: 0; justify-self: center; max-width: 380px; width: 100%; }
.portrait img { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 16px; box-shadow: var(--shadow); }
.portrait figcaption { font-size: 12.5px; color: var(--muted); margin-top: 8px; }
.icon-row { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 22px; font-size: 14px; }
.icon-row a { color: var(--muted); text-decoration: none; }
.icon-row a:hover { color: var(--accent); text-decoration: underline; }

/* "now" band with the isometric figure */
.now { background: var(--surface); border-block: 1px solid var(--line); }
.now-grid { display: grid; gap: 32px; grid-template-columns: 1fr; align-items: center; }
@media (min-width: 960px) { .now-grid { grid-template-columns: 1.1fr 1fr; } }
.now-figure { margin: 0; }
.now-figure img { display: block; width: 100%; border-radius: 12px; background: #fff; }
.now-figure figcaption { font-size: 13px; color: var(--muted); margin-top: 8px; }
.now-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.now-list li { border-left: 3px solid var(--mat); padding-left: 16px; }
.now-list h3 { font-size: 18px; margin: 0 0 4px; }
.now-list h3 a { color: var(--ink); text-decoration: none; }
.now-list h3 a:hover { color: var(--accent); }
.now-list p { margin: 0; color: var(--muted); font-size: 15px; }

/* cards */
.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.card { position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: transform .2s ease; }
.card:hover { transform: translateY(-3px); }
@media (prefers-reduced-motion: reduce) { .card, .card:hover { transition: none; transform: none; } }
.card .thumb { aspect-ratio: 16 / 10; background: #fff; border-bottom: 1px solid var(--line); }
.card .thumb img { display: block; width: 100%; height: 100%; object-fit: contain; }
.card .thumb.cover img { object-fit: cover; }
.card .body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card h3 { font-size: 18px; }
.card h3 a { color: var(--ink); text-decoration: none; }
.card h3 a::after { content: ""; position: absolute; inset: 0; }
.card h3 a:hover { color: var(--accent); }
.card p { margin: 0; font-size: 14.5px; color: var(--muted); }
.card .meta { font: 500 12.5px/1.4 var(--f-mono); color: var(--muted); margin-top: auto; padding-top: 8px; }
.card.paper { border-left: 4px solid var(--paper); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font: 500 11.5px/1.6 var(--f-mono); padding: 1px 8px; border-radius: 999px; background: var(--chip); color: var(--muted); }

/* recognition strip */
.recog { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.recog li { display: flex; gap: 14px; align-items: center; background: var(--moment); color: var(--on-moment); border-radius: var(--radius); padding: 14px 16px; }
.recog img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; flex: none; background: #fff; }
.recog .yr { font: 500 12.5px var(--f-mono); opacity: .8; }
.recog a { color: inherit; }
.recog strong { display: block; font-weight: 600; font-size: 15px; line-height: 1.35; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-top: 24px; }
.stats div { border-left: 3px solid var(--accent); padding: 4px 0 4px 14px; }
.stats dd { margin: 0; font: 600 30px/1.1 var(--f-display); }
.stats dt { font-size: 13.5px; color: var(--muted); }

/* lists (latest feed, citation list) */
.feed { list-style: none; padding: 0; margin: 0; }
.feed li { display: grid; grid-template-columns: 96px 1fr; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.feed .when { font: 500 13px/1.5 var(--f-mono); color: var(--muted); }
.feed .kind { font: 500 11.5px var(--f-mono); color: var(--paper); text-transform: uppercase; letter-spacing: .05em; }
.feed a { color: var(--ink); text-decoration: none; font-weight: 500; }
.feed a:hover { color: var(--accent); text-decoration: underline; }
.cites { list-style: none; padding: 0; margin: 0; }
.cites li { padding: 14px 0; border-bottom: 1px solid var(--line); }
.cites .t { font-weight: 600; color: var(--ink); text-decoration: none; }
.cites .t:hover { color: var(--accent); text-decoration: underline; }
.cites .a { font-size: 14px; color: var(--muted); }
.cites .a b { color: var(--ink); font-weight: 600; }
.cites .v { font-size: 14px; }
.cites .v em { font-style: italic; }
.linkrow { display: flex; flex-wrap: wrap; gap: 4px 14px; font: 500 13px var(--f-mono); margin-top: 4px; }
.year-h { font: 600 15px var(--f-mono); color: var(--muted); margin: 28px 0 0; padding-bottom: 6px; border-bottom: 2px solid var(--line); }

/* filters */
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 20px; }
.filters button { font: 500 13.5px var(--f-body); padding: 7px 14px; border-radius: 999px; border: 1px solid var(--ctl); background: var(--surface); color: var(--ink); cursor: pointer; min-height: 36px; }
.filters button[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.filters input { font: inherit; padding: 8px 12px; border-radius: 8px; border: 1px solid var(--ctl); background: var(--surface); color: var(--ink); min-width: min(100%, 260px); }

/* paper page */
.paper-head .venue { font: 500 14px var(--f-mono); color: var(--paper); margin: 0 0 12px; }
.paper-head .authors { color: var(--muted); margin: 16px 0 0; max-width: 80ch; }
.paper-head .authors b { color: var(--ink); }
.layout-2 { display: grid; gap: 40px; grid-template-columns: 1fr; }
@media (min-width: 980px) { .layout-2 { grid-template-columns: minmax(0, 1fr) 300px; } }
.summary { font: 450 clamp(19px, 2vw, 22px)/1.5 var(--f-display); margin: 0; }
figure.fig { margin: 28px 0; }
figure.fig img { display: block; width: 100%; border-radius: 10px; background: #fff; border: 1px solid var(--line); }
figure.fig figcaption { font-size: 14px; color: var(--muted); margin-top: 10px; }
details.abstract { margin: 24px 0; }
details.abstract summary { cursor: pointer; font-weight: 600; }
.side { display: grid; gap: 22px; align-content: start; }
.side h2 { font: 600 13px var(--f-mono); letter-spacing: .05em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; }
.side ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.cite-box pre { background: var(--chip); border-radius: 8px; padding: 12px; font: 12.5px/1.5 var(--f-mono); overflow-x: auto; white-space: pre-wrap; word-break: break-word; margin: 0; }
.copy { margin-top: 8px; }
.posts { list-style: none; padding: 0; margin: 0; }
.posts li { display: grid; grid-template-columns: 96px 1fr; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.lead-post { background: var(--moment); color: var(--on-moment); border-radius: var(--radius); padding: 18px 20px; margin: 0 0 16px; font-size: 16px; }
.lead-post cite { display: block; font: 500 12.5px var(--f-mono); margin-top: 8px; font-style: normal; opacity: .8; }
.video-facade { position: relative; display: block; aspect-ratio: 16 / 9; background: #000 center / cover no-repeat; border-radius: 10px; overflow: hidden; color: #fff; text-decoration: none; }
.video-facade span { position: absolute; left: 12px; bottom: 10px; right: 12px; font-size: 14px; font-weight: 500; text-shadow: 0 1px 4px rgb(0 0 0 / .8); }
.video-facade::before { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 50%, rgb(0 0 0 / .65)); }
.video-facade::after { content: "▶"; position: absolute; left: 50%; top: 45%; transform: translate(-50%, -50%); width: 58px; height: 40px; display: grid; place-items: center; background: rgb(0 0 0 / .7); border-radius: 10px; font-size: 18px; }
.video-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }

/* education */
.course { display: grid; gap: 20px; grid-template-columns: 1fr; padding: 28px 0; border-bottom: 1px solid var(--line); }
@media (min-width: 820px) { .course { grid-template-columns: 240px 1fr; } }
.course .img { background: #fff; border-radius: 10px; border: 1px solid var(--line); aspect-ratio: 4 / 3; display: grid; place-items: center; overflow: hidden; }
.course .img img { width: 100%; height: 100%; object-fit: contain; }
.course .img .ph { font: 600 42px var(--f-display); color: var(--metal); }
.level { font: 500 12.5px var(--f-mono); color: var(--paper); }
.decks { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 4px; font-size: 15px; }
.decks .y { font: 500 12.5px var(--f-mono); color: var(--muted); margin-right: 8px; }
.book { display: flex; gap: 16px; background: var(--moment); color: var(--on-moment); border-radius: var(--radius); padding: 18px; }
.book img { width: 90px; height: 120px; object-fit: cover; border-radius: 4px; flex: none; }

/* writing */
.post-body { max-width: 72ch; }
.post-body img { border-radius: 8px; }
.post-body iframe { max-width: 100%; }
.callout { border-left: 3px solid var(--accent); padding: 8px 16px; background: var(--surface); border-radius: 0 8px 8px 0; color: var(--muted); font-size: 14.5px; }

/* footer */
footer.site { border-top: 1px solid var(--line); margin-top: 48px; padding-block: 32px 48px; font-size: 14px; color: var(--muted); }
footer.site .cols { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
footer.site h2 { font: 600 12.5px var(--f-mono); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 8px; }
footer.site ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
footer.site a { color: var(--ink); text-decoration: none; }
footer.site a:hover { color: var(--accent); text-decoration: underline; }

/* review pass (2026-10-25): tap targets, mobile hero, course start boxes, scope lines */
.students { margin: 14px 0 0; font-size: 15px; color: var(--muted); }
.icon-row a, .linkrow a, footer.site a { display: inline-block; padding-block: 10px; }
.filters button, .asof { display: block; font: 500 11.5px var(--f-mono); color: var(--muted); }
.scope { font-size: 15px; color: var(--muted); margin: 14px 0 0; max-width: 68ch; }
.scope b { color: var(--ink); }
.start { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 12px 0 0; font-size: 15px; color: var(--muted); }
.start-box { display: grid; gap: 8px; margin-top: 20px; padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 0 10px 10px 0; max-width: 72ch; }
.start-box p { margin: 0; color: var(--muted); }
.start-box .btn { justify-self: start; }
details.older { margin: 2px 0 6px 0; }
details.older summary { cursor: pointer; font-size: 13.5px; color: var(--muted); }
ol.path { margin: 6px 0 0; padding-left: 20px; display: grid; gap: 6px; font-size: 15px; }
.bio + .bio { margin-top: 18px; }
@media (max-width: 899px) {
  .hero-portrait { max-width: 160px; justify-self: start; }
  .hero-portrait img { aspect-ratio: 1; border-radius: 50%; }
  .hero-portrait figcaption { max-width: 40ch; }
}

.post-body, .feed a { overflow-wrap: anywhere; }
/* Highlight cards: keep every image in the same 16:10 frame, whatever its intrinsic size. */
.card.highlight .thumb { overflow: hidden; }
.card.highlight .thumb img { height: 100%; width: 100%; object-fit: contain; }
.card.highlight .thumb:has(img[src*="portrait-fridge"]) img { object-fit: cover; }

/* ---------- the chip stack (home) ---------- */
.stack-band .now-grid { align-items: center; }
#chip-stack { width: 100%; height: auto; display: block; overflow: visible; }
#chip-stack .pkg.f-t { fill: color-mix(in srgb, var(--metal) 55%, var(--surface)); }
#chip-stack .pkg.f-l { fill: color-mix(in srgb, var(--metal) 70%, var(--ink)); }
#chip-stack .pkg.f-r { fill: color-mix(in srgb, var(--metal) 55%, var(--ink)); }
#chip-stack .pin { fill: var(--accent); }
#chip-stack .sub.f-t { fill: var(--chip); stroke: var(--line); }
#chip-stack .sub.f-l { fill: color-mix(in srgb, var(--chip) 70%, var(--ink)); }
#chip-stack .sub.f-r { fill: color-mix(in srgb, var(--chip) 55%, var(--ink)); }
#chip-stack .qb { fill: var(--metal); stroke: color-mix(in srgb, var(--metal) 60%, var(--ink)); stroke-width: .5; }
#chip-stack .glass { fill: color-mix(in srgb, var(--surface) 55%, transparent); stroke: var(--line); stroke-dasharray: 3 3; }
#chip-stack .cpl { fill: none; stroke: var(--paper); stroke-width: 1.6; stroke-linecap: round; }
#chip-stack .rdo { fill: none; stroke: var(--accent); stroke-width: 1.4; }
#chip-stack .chk { stroke: var(--surface); stroke-width: .6; transition: fill .25s, opacity .25s; }
#chip-stack .chk.z { fill: color-mix(in srgb, var(--paper) 30%, transparent); }
#chip-stack .chk.x { fill: color-mix(in srgb, var(--accent) 28%, transparent); }
#chip-stack .chk.hit { fill: var(--accent); }
#chip-stack .dq { fill: var(--ink); }
#chip-stack .logical { fill: var(--accent); stroke: var(--accent); stroke-width: 1.5; }
#chip-stack .psi { font: 600 22px var(--f-display); fill: var(--accent-ink); text-anchor: middle; }
#chip-stack .lbl { font: 500 13px var(--f-mono); fill: var(--muted); }
#chip-stack .lead { stroke: var(--muted); stroke-width: 1; }
.hello { font: 500 15px var(--f-mono); color: var(--accent); margin: 0 0 6px; letter-spacing: .02em; }
.directions { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 10px; }
.directions li { padding-left: 14px; border-left: 3px solid var(--accent); line-height: 1.5; }
.directions b { font-weight: 600; }
.card.highlight .aside { font-size: 13.5px; color: var(--muted); font-style: italic; }
.card.highlight .thumb a { display: block; height: 100%; }
.hero .intro { font-size: 18px; line-height: 1.6; max-width: 38em; margin: 14px 0 0; }
.grid.highlights { grid-template-columns: repeat(auto-fill, minmax(min(100%, 440px), 1fr)); }

/* ---------- stories: one per row, image left, text right, no boxes ---------- */
.stories { display: grid; gap: 40px; margin-top: 8px; }
.story { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 32px; align-items: start; }
.story .story-img { display: flex; justify-content: center; }
.story .story-img img { width: 100%; height: auto; max-height: 300px; object-fit: contain; border-radius: var(--radius); }
.story h3 { font: 600 clamp(21px, 2.2vw, 25px)/1.25 var(--f-display); margin: 4px 0 8px; }
.story p { margin: 0 0 10px; line-height: 1.65; max-width: 44em; }
.story .aside { font-size: 14px; color: var(--muted); font-style: italic; }
.story .meta { font-size: 14px; }
@media (max-width: 720px) { .story { grid-template-columns: 1fr; gap: 14px; } .story .story-img img { max-height: 220px; } }

/* ---------- teaching rows and the recognition list ---------- */
.courses { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 0; }
.course-row { padding: 22px 0; border-top: 1px solid var(--line); }
.course-row h3 { font: 600 21px/1.3 var(--f-display); margin: 4px 0 6px; }
.course-row p { margin: 0 0 10px; max-width: 46em; }
.recog-list { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 10px; }
.recog-list li { display: grid; grid-template-columns: 3.4em 1fr; gap: 10px; line-height: 1.45; }
.recog-list .y { font: 500 13px var(--f-mono); color: var(--muted); padding-top: 2px; }
.bio h4 { margin: 0 0 4px; font-size: 15px; }

/* ---------- one long home page ---------- */
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
section[id] { scroll-margin-top: 72px; }
.band { padding-block: clamp(56px, 8vw, 96px); }
.directions-strip { padding-block: 0 8px; }
.directions-strip .directions { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 14px 24px; margin: 0; }
.directions-strip .directions li { font-size: 15px; }
.intro-about { font-size: 18px; line-height: 1.65; }
.wgmr { margin: 20px 0 8px; }
.wgmr img { width: 100%; max-width: 520px; height: auto; border-radius: var(--radius); display: block; }
.wgmr figcaption { font-size: 14px; color: var(--muted); margin-top: 8px; max-width: 520px; }

/* ---------- Quantum Metal reel: a slow loop, paused on hover, still for reduced motion ---------- */
.reel-wrap { margin-top: 28px; overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.reel-cap { font-size: 14px; color: var(--muted); margin: 0 0 10px; }
.reel { list-style: none; padding: 0; margin: 0; display: flex; gap: 14px; width: max-content; animation: reel 70s linear infinite; }
.reel:hover { animation-play-state: paused; }
.reel li { flex: none; width: 150px; text-align: center; font-size: 12.5px; color: var(--muted); }
.reel img { width: 150px; height: 150px; object-fit: contain; background: var(--chip); border-radius: var(--radius); padding: 12px; box-sizing: border-box; display: block; margin-bottom: 6px; }
@keyframes reel { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .reel { animation: none; flex-wrap: wrap; width: auto; } .reel li[aria-hidden] { display: none; } .reel-wrap { mask-image: none; } }
.cov { list-style: none; padding: 0; margin: 8px 0 0; columns: 2 340px; column-gap: 40px; }
.cov li { break-inside: avoid; padding: 6px 0; line-height: 1.45; font-size: 15px; }
.cov .o { display: block; font: 500 12.5px var(--f-mono); color: var(--muted); }

/* ---------- expandable sections ---------- */
details.fold { border-top: 1px solid var(--line); padding: 4px 0; }
details.fold:last-of-type { border-bottom: 1px solid var(--line); }
details.fold > summary { cursor: pointer; list-style: none; padding: 14px 0; font: 600 18px/1.3 var(--f-display); display: flex; justify-content: space-between; align-items: center; min-height: 44px; }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary::after { content: "+"; font: 400 22px var(--f-body); color: var(--accent); transition: transform .2s; }
details.fold[open] > summary::after { transform: rotate(45deg); }
details.fold > :not(summary) { margin-bottom: 18px; }
#about details.fold { margin-top: 20px; }

/* ---------- tools and the Built-with-Metal reel ---------- */
.card.tool .thumb { display: block; background: var(--chip); }
.card.tool .thumb img { object-fit: cover; object-position: top left; }
.reel li { width: 240px; text-align: left; }
.reel li img { width: 240px; height: 180px; padding: 0; background: #fff; object-fit: contain; }
.reel li.comp { width: 150px; text-align: center; }
.reel li.comp img { width: 150px; height: 150px; padding: 12px; background: var(--chip); }
.reel li span { display: block; line-height: 1.35; }
.reel li b { color: var(--ink); font-weight: 600; }
.reel { animation-duration: 120s; }

/* ---------- teaching tracks ---------- */
a.card.track { text-decoration: none; color: inherit; transition: transform .15s, box-shadow .15s; }
a.card.track:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
a.card.track h3 { color: var(--ink); }
a.card.track .more { margin-top: auto; }
.cov .when { display: block; font-size: 13px; color: var(--muted); }
.cov:empty { display: none; }

/* ---------- the Notebook, as its own band on the home page ---------- */
.notebook-band { background: color-mix(in srgb, var(--paper) 10%, var(--bg)); border-block: 1px solid var(--line); }
.nb-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(24px, 4vw, 56px); align-items: center; }
.nb-grid h2 { font-size: clamp(30px, 4vw, 44px); margin: 4px 0 12px; }
.nb-lede { font-size: 18px; line-height: 1.6; margin: 0 0 22px; max-width: 34em; }
.btn.big { font-size: 17px; padding: 14px 26px; }
.nb-fan { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.nb-fan a { display: block; border-radius: 8px; overflow: hidden; box-shadow: var(--shadow); transition: transform .15s; }
.nb-fan a:hover { transform: translateY(-3px) rotate(-1deg); }
.nb-fan img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; }
.nb-sub { margin: 44px 0 14px; font: 600 20px var(--f-display); }
@media (max-width: 800px) { .nb-grid { grid-template-columns: 1fr; } }
#about .directions { margin: 18px 0 22px; }

/* icon links, About lines, a smaller Now band */
.icon-row { gap: 4px 6px; align-items: center; }
.icon-row a { display: inline-flex; padding: 8px; border-radius: 8px; color: var(--muted); }
.icon-row a:hover { color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.icon-row svg { width: 20px; height: 20px; display: block; }
.side-icons { margin-top: 4px; }
.side-icons a { padding: 6px; }
.about-line { margin: 0 0 14px; }
.about-line b { font-weight: 650; }
@media (min-width: 960px) { .stack-band .now-grid { grid-template-columns: minmax(0, 300px) 1fr; gap: 48px; } }
.stack-band .now-figure { max-width: 300px; margin-inline: auto; }
.stack-band .now-figure figcaption { font-size: 12px; }
@media (max-width: 959px) { .stack-band .now-figure { max-width: 230px; } }

/* Notebook totals */
#about > .fold { margin-top: 22px; }
.nb-stats { list-style: none; padding: 0; margin: 4px 0 22px; display: flex; flex-wrap: wrap; gap: 10px 26px; }
.nb-stats li { color: var(--muted); font-size: 14px; }
.nb-stats b { display: block; font: 600 28px/1.1 var(--f-display); color: var(--ink); }
.story-points { margin: 10px 0 12px; padding-left: 18px; display: grid; gap: 7px; }
.story-points li { line-height: 1.5; }
.story-points li::marker { color: var(--accent); }

/* the Notebook link in the menu invites a click rather than looking selected */
.nav a.nav-cta { color: var(--accent); border: 1.5px solid var(--accent); padding: 6px 12px; border-radius: 999px; font-weight: 600; margin-left: 4px; }
.nav a.nav-cta:hover { background: var(--accent); color: var(--accent-ink); }
.icon-sep { width: 1px; height: 22px; background: var(--line); margin: 0 6px; }

/* Research page: theme figures, "my part" note */
.theme-fig { margin: 18px 0 0; max-width: 420px; }
.theme-fig img { display: block; width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--line); background: #fff; }
.my-part { margin: 6px 0 0; padding: 6px 10px; border-left: 3px solid var(--accent); background: var(--accent-soft); font-size: 14px; font-weight: 500; }

/* Review fixes: research theme pills scroll in one row on phones; the reel pauses for keyboard and touch too */
@media (max-width: 700px) { .page-head .filters { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; } .page-head .filters .btn { flex: none; } }
.reel-wrap:focus-within .reel, .reel-wrap:active .reel { animation-play-state: paused; }
.nb-courses { margin: 18px 0 0; font-size: 14.5px; line-height: 1.7; color: var(--muted); }

/* Tools I started: two wide cards, picture left, short text right */
#tools > .grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr)); gap: 22px; }
#tools .card.tool { display: grid; grid-template-columns: 1fr; border-color: #cdd5de; box-shadow: 0 1px 2px rgb(17 28 41 / .05), 0 3px 12px rgb(17 28 41 / .05); }
#tools .card.tool .thumb { aspect-ratio: 4 / 3; overflow: hidden; border-bottom: 1px solid var(--line); }
#tools .card.tool .thumb img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
@media (min-width: 900px) {
  #tools .card.tool { grid-template-columns: 46% 1fr; }
  #tools .card.tool .thumb { aspect-ratio: auto; height: 100%; min-height: 240px; border-bottom: 0; border-right: 1px solid var(--line); }
}
#tools .card.tool .body { display: grid; align-content: start; gap: 8px; padding: 20px 22px; }
#tools .card.tool h3 { font-size: 22px; margin: 0; }
#tools .card.tool p { margin: 0; font-size: 15px; }
#tools .card.tool .meta { font-size: 12.5px; }

/* Source artwork in the software cards; preserve the scientific image geometry. */
.card.tool .thumb .tool-art { display:block; position:relative; width:100%; height:100%; min-height:260px; background:linear-gradient(135deg,#f0edf9,#edf6f9 60%,#fff); }
.card.tool .thumb .tool-art img, #tools .card.tool .thumb .tool-art img { position:absolute; object-fit:contain; border-radius:5px; box-shadow:0 6px 14px #17213130; }
.card.tool .thumb .tool-art .tool-chip, #tools .card.tool .thumb .tool-art .tool-chip { width:78%; height:80%; right:4%; top:6%; }
.card.tool .thumb .tool-art .tool-analysis, #tools .card.tool .thumb .tool-art .tool-analysis { width:86%; height:auto; left:4%; bottom:7%; }
.card.tool .thumb:has(.tool-field) { background:white; }
.card.tool .tool-field { display:block; width:100%; height:100%; overflow:hidden; }
.card.tool .tool-links { display:flex; flex-wrap:wrap; gap:8px 18px; position:relative; z-index:1; margin-top:8px; }
.card.tool .tool-links a { font-size:14px; }
.hero .motto { margin: 8px 0 0; font: italic 400 17px/1.4 var(--f-display); color: var(--accent); }

/* Research: favorites as journal-cover tiles; smaller theme figures */
.covers { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(min(46%, 150px), 1fr)); }
.cover { position: relative; display: block; aspect-ratio: 3 / 4; border-radius: 10px; overflow: hidden; background: #0d1520; color: #fff; text-decoration: none;
  box-shadow: 0 2px 6px rgb(17 28 41 / .12), 0 14px 30px rgb(17 28 41 / .14); transition: transform .25s ease, box-shadow .25s ease; }
.cover:hover { transform: translateY(-5px) rotate(-.4deg); box-shadow: 0 4px 10px rgb(17 28 41 / .16), 0 22px 44px rgb(17 28 41 / .22); }
.cover-img, .cover-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; background: #fff; }
.cover-text { position: absolute; inset: auto 0 0 0; display: grid; gap: 4px; padding: 44px 14px 14px; background: linear-gradient(180deg, transparent, rgb(10 16 26 / .78) 38%, rgb(10 16 26 / .94)); }
.cover-text b { font: 650 16px/1.25 var(--f-display); }
.cover-venue { font: 500 11px var(--f-mono); letter-spacing: .04em; text-transform: uppercase; color: #f0c9a8; }
.theme-fig { max-width: 240px; }
.tools-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.covers { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 640px) { .covers { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .covers { grid-template-columns: repeat(6, minmax(0, 1fr)); } }

/* Card hierarchy: stronger outlines; copper reserved for the featured tool. */
.card { border-color: #8794a3; box-shadow: 0 2px 4px rgb(17 28 41 / .08); }
.card p { color: #434f60; }
#tools .card.tool { border-color: #8794a3; box-shadow: none; }
#tools .card.tool.featured { border-color: var(--accent); border-top-width: 3px; box-shadow: 0 3px 6px rgb(17 28 41 / .08), 0 12px 24px -16px rgb(162 84 31 / .35); }
.card:hover, .card:focus-within, #tools .card.tool:hover, #tools .card.tool:focus-within { border-color: var(--accent); box-shadow: 0 3px 12px rgb(17 28 41 / .12); }

/* Small, deliberate contact entry; the address appears on request. */
.about-copy { max-width: 72ch; }
.about-motto { font: italic 400 17px/1.5 var(--f-display); color: var(--accent); margin: 12px 0 22px; }
.contact-quiet { margin: 18px 0; font-size: 14px; scroll-margin-top: 90px; }
.contact-reveal { border: 0; border-bottom: 1px solid currentColor; padding: 8px 0; background: transparent; color: var(--accent); font: inherit; cursor: pointer; }
#contact-address { display: inline-block; margin-left: 14px; }
.nb-course-entry { margin: 18px 0 0; }
/* Favorite papers: a manual ribbon with three covers visible on desktop. */
.favorites-head { display:flex; align-items:center; justify-content:space-between; gap:16px; max-width:960px; }
.ribbon-controls { display:flex; gap:8px; }
.ribbon-controls[hidden] { display:none; }
.ribbon-controls button { width:44px; height:44px; border:1px solid #8794a3; border-radius:50%; background:#fff; color:var(--ink); font-size:22px; cursor:pointer; }
.ribbon-controls button:disabled { opacity:.35; cursor:default; }
.covers { display:flex; max-width:960px; gap:18px; overflow-x:auto; padding:6px 3px 18px; scroll-snap-type:x mandatory; overscroll-behavior-x:contain; scrollbar-width:thin; }
.covers>li { flex:0 0 calc((100% - 36px) / 3); min-width:0; scroll-snap-align:start; }
.cover-text b { font-size:18px; }
.cover:hover { transform:translateY(-2px); }
@media(max-width:760px){.covers>li{flex-basis:calc((100% - 18px)/2)}}
@media(max-width:480px){.covers>li{flex-basis:82%}.favorites-head h2{font-size:25px}.cover-text b{font-size:17px}}
@media(prefers-reduced-motion:reduce){.cover,.cover:hover{transform:none;transition:none}}

/* A small editorial paper ribbon: readable labels, uncropped figures. */
.covers>li { display:flex; }
.cover { display:grid; grid-template-columns:100px minmax(0,1fr); gap:14px; align-items:center; width:100%; min-height:164px; aspect-ratio:auto; background:#fff; color:var(--ink); border:0; border-bottom:1px solid #8794a3; border-radius:0; box-shadow:none; overflow:visible; padding:12px 2px; }
.cover-img { position:static; display:flex; align-items:center; width:100px; height:116px; background:#fff; }
.cover-img img { position:static; width:100%; height:100%; object-fit:contain; }
.cover-text { position:static; background:none; padding:0; gap:9px; align-content:center; }
.cover-text b { font:600 17px/1.35 var(--f-display); }
.cover-venue { color:var(--muted); font-size:10px; line-height:1.5; letter-spacing:.02em; }
.cover-open { color:var(--accent); font:500 12px var(--f-body); }
.cover:hover { transform:none; box-shadow:none; border-color:var(--accent); }
.cover:focus-visible { outline:3px solid var(--accent); outline-offset:3px; }
@media(max-width:480px){.cover{min-height:160px}.cover-text b{font-size:17px}}

/* Progressive motion: a static showcase until usable playback controls exist. */
.reel-wrap .reel { animation:none; flex-wrap:wrap; width:auto; }
.reel-wrap { mask-image:none; }
.reel li[aria-hidden] { display:none; }
.reel-toggle { display:block; margin:0 0 12px; padding:8px 12px; min-height:44px; border:1px solid #8794a3; border-radius:6px; background:#fff; color:var(--ink); font:500 13px var(--f-body); cursor:pointer; }
.reel-toggle[hidden] { display:none; }
@media(prefers-reduced-motion:no-preference) {
 .reel-wrap.motion-ready .reel { animation:reel 120s linear infinite; flex-wrap:nowrap; width:max-content; }
 .reel-wrap.motion-ready .reel li[aria-hidden] { display:list-item; }
 .reel-wrap.motion-ready[data-reel-paused] .reel, .reel-wrap.motion-ready:hover .reel, .reel-wrap.motion-ready:focus-within .reel { animation-play-state:paused; }
}

.nb-course-heading { margin:24px 0 0; font:600 19px/1.4 var(--f-display); }
.nb-course-heading+.nb-course-entry { margin-top:8px; }

/* Quiet interference behind the homepage hero. */
.hero-waves{position:relative;isolation:isolate}
.hero-waves .hero-grid{position:relative;z-index:1}
.wave-canvas{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;z-index:0}
.wave-toggle{position:absolute;right:28px;bottom:8px;z-index:2;border:0;background:transparent;color:var(--muted);font:11px var(--f-body);padding:6px;cursor:pointer;text-decoration:underline;text-underline-offset:3px}
.wave-toggle:hover{color:var(--ink)}
.wave-toggle:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
