/* Gabriel Demombynes — site styles. "Working paper meets atlas." */
:root {
  --paper: #ffffff;
  --surface: #ffffff;
  --ink: #000000;
  --muted: #000000;
  --hair: #d5d9dc;
  --hair-2: #e6e9eb;
  --accent: #1f5c48;
  --accent-ink: #000000;
  --red: #a3382b;
  --blue: #3d5a80;
  --gold: #d29b16;
  --hero-bg: #ffffff;
  --hero-bg2: #ffffff;
  --hero-ink: #000000;
  --hero-muted: #000000;
  --hero-kicker: #f5b335;
  --land: #dfe3e0;
  --sea: transparent;
  --cover-shadow: 0 1px 0 rgba(0,0,0,.05);
  --serif: "Newsreader", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: "IBM Plex Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --measure: 68ch;
  --maxw: 1040px;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --paper: #101315;
  --surface: #171b1e;
  --ink: #e6e8e6;
  --muted: #9aa4ad;
  --hair: #2b3236;
  --hair-2: #22282c;
  --accent: #6fb59a;
  --accent-ink: #8fcbb3;
  --red: #e0776a;
  --blue: #8fb0d9;
  --land: #262c30;
  color-scheme: dark;
}


* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 17.5px;
  line-height: 1.55;
  font-variant-numeric: oldstyle-nums;
  -webkit-font-smoothing: antialiased;
}
a { color: #000; text-decoration: underline; text-decoration-color: var(--hair); text-underline-offset: 3px; }
a:hover { text-decoration-color: #000; }
a:focus-visible, button:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px;
}
img { max-width: 100%; height: auto; display: block; }
:root[data-theme="dark"] img.cover, :root[data-theme="dark"] img.feature-img { filter: brightness(.9); }

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 500; letter-spacing: -.01em; line-height: 1.15; margin: 0; }
p { margin: 0 0 1em; max-width: var(--measure); }
.mono { font-family: var(--mono); font-size: .85rem; letter-spacing: .01em; font-variant-numeric: tabular-nums; }
.sans { font-family: var(--sans); }
.muted { color: var(--muted); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; }

/* ---------- Masthead ---------- */
.masthead {
  position: sticky; top: 0; z-index: 50; border-top: 4px solid var(--hero-kicker);
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--hair);
}
.masthead-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 10px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand { font-family: var(--serif); font-size: 1.05rem; font-weight: 500; color: var(--ink); letter-spacing: .01em; white-space: nowrap; text-decoration: none; }
.brand small { font-family: var(--mono); font-size: .85rem; color: var(--muted); margin-left: 10px; letter-spacing: .08em; text-transform: uppercase; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  font-family: var(--sans); font-size: .85rem; color: var(--ink); padding: 6px 9px; border-bottom: 2px solid transparent;
}
.nav a:hover { text-decoration: none; border-bottom-color: var(--hair); }
.nav a[aria-current="true"] { border-bottom-color: var(--accent); color: var(--accent-ink); }
.theme-btn {
  font-family: var(--mono); font-size: .85rem; letter-spacing: .08em; text-transform: uppercase;
  background: none; border: 1px solid var(--hair); color: var(--muted); padding: 5px 9px; cursor: pointer; margin-left: 8px;
}
.theme-btn:hover { color: var(--ink); border-color: var(--muted); }
.nav-details { display: none; }
.nav-details summary { list-style: none; cursor: pointer; font-family: var(--sans); font-size: .95rem; padding: 6px 0; }
.nav-details summary::-webkit-details-marker { display: none; }
.nav-details[open] .nav { display: flex; flex-direction: column; align-items: flex-start; padding: 8px 0 12px; }
@media (max-width: 760px) {
  .nav-wrap > .nav, .nav-wrap > .theme-btn { display: none; }
  .nav-details { display: block; }
  .nav-details .theme-btn { margin: 8px 0 0; }
}

/* ---------- Layout ---------- */
.page { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.content { min-width: 0; max-width: 980px; margin: 0 auto; }
  display: grid; grid-template-columns: 2.6rem 1fr; gap: 6px; align-items: baseline;
  font-family: var(--sans); font-size: .85rem; color: var(--muted); padding: 5px 0 5px 14px; margin-left: -1px; border-left: 2px solid transparent;
}

section.sec { padding: 56px 0 24px; border-top: 3px solid var(--sec, var(--hair)); scroll-margin-top: 60px; }
#ai { --sec: var(--accent); }
#places { --sec: var(--blue); }
#mvp { --sec: var(--red); }
#papers { --sec: var(--gold); }
#writing { --sec: var(--muted); }
.sec > h2 .num, .runhead .num { color: var(--sec, var(--accent-ink)); }
section.sec:first-of-type { border-top: 0; }
.runhead {
  display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: baseline; margin-bottom: 18px;
  font-family: var(--mono); font-size: .85rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted);
}
.runhead .num { color: var(--accent-ink); }
.sec > h2, .sec-h2 { font-size: clamp(1.7rem, 3vw, 2.35rem); margin: 0 0 18px; max-width: 24ch; }
.lead { font-size: 1.12rem; line-height: 1.5; max-width: 62ch; }
.sub-h { font-family: var(--sans); font-size: .85rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 34px 0 12px; padding-top: 12px; border-top: 1px solid var(--hair-2); }

/* ---------- Hero ---------- */
.hero { padding: 0 0 24px; border-top: 0; }
.hero-grid { color: var(--hero-ink); background: #fff; padding: 56px 0 24px; margin: 0; width: auto; box-sizing: border-box; }

.hero-grid a { color: var(--hero-ink); }
.hero .kicker { color: var(--hero-kicker); }
.hero h1 { color: #000; }
.hero .role { color: var(--hero-ink); }
.hero .profile { color: var(--hero-ink); }
.hero .facts { border-top-color: var(--hair); }
.hero .facts dt { color: var(--hero-muted); }
.hero .metrics { color: var(--hero-muted); }
.hero .links-row a { color: #000; text-decoration: underline; }
.hero .plate { background: #fff; border-color: var(--hair); color: #000; }
.hero .plate .grat { stroke: var(--hair); }
.hero .plate .mk text { fill: var(--hero-ink); }
.hero .plate .mk circle { stroke: #fff; }
.hero .plate .lbl { fill: var(--hero-ink) !important; }
.hero .plate .route { stroke: var(--red); }
.hero .plate .route-yr { fill: var(--red); }
.hero .plate figcaption { color: #000; border-top-color: var(--hair); }
.logos { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 36px; margin: 6px 0 26px; }
.logos img { height: 64px; width: auto; display: block; }
.logos a { display: block; opacity: .95; }
.logos a:hover { opacity: 1; }
.foot-logos { margin: 0 0 22px; }
.foot-logos img { height: 48px; }
.logo-white { display: none; }
:root[data-theme="dark"] .logo-white { display: block; }
:root[data-theme="dark"] .logo-navy { display: none; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(260px, 1fr); gap: 48px; align-items: start; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } .plate { max-width: 420px; } }
.kicker { font-family: var(--mono); font-size: .85rem; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-ink); margin-bottom: 18px; }
.hero h1 { font-size: clamp(2.6rem, 6vw, 4.4rem); line-height: 1.02; font-weight: 500; letter-spacing: -.02em; margin-bottom: 14px; }
.hero h1 .mid { color: var(--muted); font-weight: 400; }
.hero .role { font-family: var(--sans); font-size: 1.02rem; color: var(--ink); margin-bottom: 26px; max-width: 48ch; }
.hero .profile { font-size: 1.16rem; line-height: 1.5; max-width: 60ch; }
.hero .bio p { max-width: 64ch; }
.facts { display: grid; grid-template-columns: 7.5rem 1fr; gap: 6px 18px; margin: 26px 0 0; padding: 18px 0 0; border-top: 1px solid var(--hair); font-family: var(--sans); font-size: .95rem; max-width: 60ch; }
.facts dt { color: var(--muted); font-family: var(--mono); font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; padding-top: 3px; }
.facts dd { margin: 0; }
.metrics { margin-top: 22px; font-family: var(--mono); font-size: .85rem; color: var(--muted); letter-spacing: .02em; }
.metrics a { color: var(--accent-ink); }
.plate { border: 1px solid var(--hair); background: var(--surface); box-shadow: var(--cover-shadow); }
.plate svg { display: block; width: 100%; height: auto; }
.plate figcaption { font-family: var(--mono); font-size: .85rem; color: var(--muted); padding: 8px 12px; border-top: 1px solid var(--hair); letter-spacing: .04em; }
.links-row { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 14px; font-family: var(--sans); font-size: .85rem; }
.links-row a::after { content: " ↗"; color: var(--muted); font-size: .8em; }

/* ---------- Experience timeline ---------- */
.timeline { margin-top: 44px; }
.tl-svg-wrap { overflow-x: auto; }
.tl-svg { width: 100%; min-width: 900px; height: auto; display: block; }
.tl-svg text { font-family: var(--mono); font-size: 15px; fill: var(--muted); }
.tl-svg text.lbl { font-family: var(--sans); fill: var(--ink); font-size: 15px; }
.tl-svg .axis { stroke: var(--hair); }
.tl-svg .bar { fill: var(--accent); opacity: .85; }
.tl-svg .bar.alt { fill: var(--blue); opacity: .75; }
.tl-svg .tick { stroke: var(--hair); }
.tl-svg .dot { fill: var(--paper); stroke: var(--accent); stroke-width: 1.5; }
.exp-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 0 32px; }
.exp-list details { border-top: 1px solid var(--hair-2); padding: 10px 0; }
.exp-list summary { cursor: pointer; display: grid; grid-template-columns: 6.4rem 1fr; gap: 12px; align-items: baseline; list-style: none; }
.exp-list summary::-webkit-details-marker { display: none; }
.exp-list summary .yrs { font-family: var(--mono); font-size: .85rem; color: var(--muted); }
.exp-list summary .r { font-family: var(--sans); font-size: .95rem; }
.exp-list summary .o { display: block; font-family: var(--sans); font-size: .85rem; color: var(--muted); }
.exp-list ul { margin: 8px 0 0 6.4rem; padding-left: 1rem; font-size: .95rem; }
.exp-list ul li { margin-bottom: 4px; }
.exp-list ul li::marker { color: var(--muted); }

/* ---------- Feature card (China Daily) ---------- */
.feature {
  display: grid; grid-template-columns: minmax(200px, 300px) 1fr; gap: 28px; align-items: stretch;
  background: var(--surface); border: 1px solid var(--hair); border-left: 4px solid var(--red); margin: 8px 0 34px; box-shadow: var(--cover-shadow);
}
.feature .fimg { position: relative; min-height: 220px; overflow: hidden; }
.feature .fimg img { width: 100%; height: 100%; object-fit: cover; }
.feature .fbody { padding: 24px 28px 22px 0; }
.feature .fk { font-family: var(--mono); font-size: .85rem; letter-spacing: .1em; text-transform: uppercase; color: var(--red); margin-bottom: 10px; }
.feature blockquote { margin: 0 0 14px; font-size: 1.32rem; line-height: 1.35; font-style: italic; max-width: 30ch; }
.feature blockquote::before { content: "\201C"; color: var(--red); }
.feature blockquote::after { content: "\201D"; color: var(--red); }
.feature .fmeta { font-family: var(--mono); font-size: .85rem; color: var(--muted); margin-bottom: 12px; }
.feature .fp { font-size: .95rem; max-width: 52ch; }
.feature .cta { font-family: var(--sans); font-size: .95rem; }
@media (max-width: 700px) { .feature { grid-template-columns: 1fr; } .feature .fbody { padding: 18px 20px 20px; } .feature .fimg { max-height: 220px; } }

/* ---------- Highlight card (country) ---------- */
.highlight { border: 1px solid var(--hair); border-left: 4px solid var(--place, var(--accent)); background: var(--surface); padding: 24px 28px 20px; margin: 8px 0 30px; box-shadow: var(--cover-shadow); max-width: 980px; }
.highlight .hk { font-family: var(--mono); font-size: .85rem; letter-spacing: .1em; text-transform: uppercase; color: var(--place, var(--accent-ink)); margin-bottom: 8px; }
.highlight h3 { font-size: 1.5rem; margin-bottom: 14px; max-width: 30ch; }
.highlight .hgrid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(220px, 1fr); gap: 28px 40px; align-items: start; }
.highlight .htext p { font-size: 1rem; max-width: 60ch; }
.highlight .hstats { display: grid; gap: 14px; border-left: 1px solid var(--hair); padding-left: 24px; }
.highlight .stat .n { font-family: var(--serif); font-size: 1.9rem; line-height: 1; color: var(--place, var(--accent-ink)); font-variant-numeric: lining-nums; }
.highlight .stat .l { font-family: var(--sans); font-size: .95rem; color: var(--muted); margin-top: 3px; max-width: 26ch; }
.highlight .hlinks { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-top: 16px; font-family: var(--sans); font-size: .95rem; }
.highlight .hsrc { font-family: var(--mono); font-size: .85rem; color: var(--muted); margin-top: 10px; }
@media (max-width: 760px) { .highlight { padding: 18px 20px; } .highlight .hgrid { grid-template-columns: 1fr; } .highlight .hstats { border-left: 0; padding-left: 0; grid-template-columns: 1fr 1fr; } }

/* ---------- Figures ---------- */
figure.fig { margin: 24px 0 30px; max-width: 720px; }
.fig-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 0 40px; }
.fig-row figure.fig { max-width: none; }
figure.fig svg { width: 100%; height: auto; display: block; overflow: visible; }
figure.fig .fig-h { font-family: var(--sans); font-size: .95rem; margin: 0 0 4px; }
figure.fig .fig-h b { font-family: var(--mono); font-weight: 500; font-size: .85rem; color: var(--accent-ink); letter-spacing: .08em; text-transform: uppercase; margin-right: 10px; }
figure.fig .fig-unit { font-family: var(--mono); font-size: .85rem; color: var(--muted); margin-bottom: 10px; }
figure.fig figcaption { font-family: var(--sans); font-size: .85rem; color: var(--muted); margin-top: 8px; max-width: 70ch; }
figure.fig figcaption .src { font-family: var(--mono); font-size: .85rem; display: block; margin-top: 4px; }
.chart text { font-family: var(--sans); font-size: 17px; fill: currentColor; }
.chart text.val { font-family: var(--mono); font-size: 16px; font-variant-numeric: tabular-nums; }
.chart text.lab { fill: var(--muted); }
.chart .axis { stroke: var(--hair); stroke-width: 1; }
.chart .grid { stroke: var(--hair-2); stroke-width: 1; }
.chart .s0 { fill: var(--accent); }
.chart .s1 { fill: var(--blue); }
.chart .s-red { fill: var(--red); }
.chart .line { fill: none; stroke: var(--accent); stroke-width: 2.2; }
.chart .pt { fill: var(--paper); stroke: var(--accent); stroke-width: 2; }
.chart .legend { font-family: var(--sans); font-size: 16px; }
.chart .na { fill: none; stroke: var(--hair); stroke-dasharray: 3 3; }

/* ---------- Places map ---------- */
.map-wrap { border: 1px solid var(--hair); background: var(--surface); margin: 8px 0 18px; box-shadow: var(--cover-shadow); }
.map-wrap svg { width: 100%; height: auto; display: block; }
.map .land { fill: var(--land); stroke: none; }
.map .grat { stroke: var(--hair); stroke-width: .6; fill: none; }
.map .route { fill: none; stroke: var(--red); stroke-width: 1.6; stroke-dasharray: 5 4; opacity: .85; }
.map .route-yr { font-family: var(--mono); font-size: 13px; fill: var(--red); }
.map .region { fill: none; stroke: var(--accent); stroke-width: 1.2; stroke-dasharray: 4 3; opacity: .8; }
.map .mk circle { fill: var(--place, var(--accent)); stroke: var(--paper); stroke-width: 1.5; }
.map .mk.cur circle { fill: var(--red); }
.map .mk text { font-family: var(--mono); font-size: 16px; fill: var(--ink); }
.map .mk text.n { fill: var(--paper); font-size: 12px; text-anchor: middle; font-weight: 600; }
.map .mk:hover circle { r: 11; }
.map .mk:hover text.city { text-decoration: underline; }
.map .lbl { font-family: var(--sans); font-size: 15px; fill: var(--muted); }
.place-index { display: flex; flex-wrap: wrap; gap: 8px 26px; font-family: var(--sans); font-size: .95rem; margin: 0 0 8px; padding: 0; list-style: none; }
.place-index a { color: var(--ink); display: inline-flex; gap: 8px; align-items: baseline; text-decoration: none; }
.place-index a .n { font-family: var(--mono); font-size: .85rem; color: #fff; background: var(--place, var(--accent)); padding: 1px 7px; }
.place-index a:hover { color: var(--accent-ink); text-decoration: none; }
@media (max-width: 700px) { .map-wrap { display: none; } .place-index { flex-direction: column; gap: 6px; font-size: 1rem; } }

/* ---------- Country section ---------- */
.chead { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 28px 40px; align-items: start; }
.locator-wrap { border: 1px solid var(--hair); border-top: 4px solid var(--place, var(--hair)); background: var(--surface); box-shadow: var(--cover-shadow); aspect-ratio: 1 / .78; }
.locator-wrap svg { width: 100%; height: 100%; display: block; }
.map.locator .sea { fill: var(--surface); }
.map.locator .grat { stroke-width: .25; opacity: .6; }
.map.locator .land { fill: color-mix(in srgb, var(--land) 80%, var(--ink)); }
.map.locator .halo { fill: var(--place, var(--red)); opacity: .28; }
.map.locator .dot { fill: var(--place, var(--red)); }
.map.locator .city { font-family: var(--mono); font-size: 7px; fill: var(--ink); }
.map.locator .region { stroke: var(--place, var(--red)); stroke-width: 1.4; }
@media (max-width: 760px) { .chead { grid-template-columns: 1fr; } .locator-wrap { max-width: 320px; } }
.country { padding-top: 44px; }
.country { --sec: var(--place, var(--accent)); }
.country .runhead .coord { font-variant-numeric: tabular-nums; }
.country .sub-h { border-top-color: color-mix(in srgb, var(--place) 35%, var(--hair-2)); }
.country .role-line { color: var(--place); font-weight: 500; }
.country .cgrid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 40px; align-items: start; }
@media (max-width: 900px) { .country .cgrid { grid-template-columns: 1fr; } }
.country .role-line { font-family: var(--sans); font-size: .95rem; color: var(--muted); margin-bottom: 14px; }
.shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 22px 20px; margin: 10px 0 24px; }
.country .shelf { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); max-width: 980px; }
.posts.cols { columns: 2; column-gap: 40px; }
.posts.cols li { break-inside: avoid; }
@media (max-width: 760px) { .posts.cols { columns: 1; } }
.shelf .item { display: grid; gap: 8px; }
.shelf .item a.t { color: var(--ink); font-family: var(--sans); font-size: .85rem; line-height: 1.3; }
.shelf .item a.t:hover { color: var(--accent-ink); }
.shelf .item .m { font-family: var(--mono); font-size: .85rem; color: var(--muted); }
.cover, .cover-card { aspect-ratio: 2 / 3; width: 100%; border: 1px solid var(--hair); box-shadow: var(--cover-shadow); background: var(--surface); object-fit: cover; }
.cover-card { display: flex; flex-direction: column; justify-content: space-between; padding: 10px 11px; position: relative; overflow: hidden; }
.cover-card .bar { position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--accent); }
.cover-card.journal .bar { background: var(--blue); }
.cover-card.comment .bar { background: var(--red); }
.cover-card.chapter .bar { background: var(--muted); }
.cover-card .ini { font-family: var(--serif); font-size: 1.15rem; line-height: 1.1; color: var(--ink); margin-left: 6px; }
.cover-card .ct { font-family: var(--sans); font-size: .85rem; line-height: 1.25; color: var(--muted); margin-left: 6px; display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.cover-card .cy { font-family: var(--mono); font-size: .85rem; color: var(--muted); margin-left: 6px; }
.posts { list-style: none; margin: 0; padding: 0; }
.posts li { display: grid; grid-template-columns: 7.4rem 1fr; gap: 12px; padding: 7px 0; border-top: 1px solid var(--hair-2); align-items: baseline; }
.posts li:last-child { border-bottom: 1px solid var(--hair-2); }
.posts .d { font-family: var(--mono); font-size: .85rem; color: var(--muted); white-space: nowrap; }
.posts a { color: var(--ink); font-family: var(--sans); font-size: .95rem; }
.posts a:hover { color: var(--accent-ink); }
.posts .o { display: block; font-family: var(--mono); font-size: .85rem; color: var(--muted); letter-spacing: .04em; margin-top: 2px; }
@media (max-width: 480px) { .posts li { grid-template-columns: 1fr; gap: 2px; } }

/* ---------- MVP ---------- */
.mvp .runhead .num { color: var(--red); }
.mvp-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 44px; align-items: start; }
@media (max-width: 900px) { .mvp-grid { grid-template-columns: 1fr; } }
.tl { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--red); }
.tl li { position: relative; padding: 0 0 16px 22px; font-size: .95rem; }
.tl li::before { content: ""; position: absolute; left: -7px; top: 8px; width: 10px; height: 10px; border-radius: 50%; background: var(--paper); border: 2px solid var(--red); }
.tl li .d { font-family: var(--mono); font-size: .85rem; color: var(--red); letter-spacing: .06em; text-transform: uppercase; display: block; margin-bottom: 2px; }
.tl li a { color: var(--ink); }
.tl li a:hover { color: var(--red); }

/* ---------- Leadership & media lists ---------- */
.dated { list-style: none; margin: 0; padding: 0; max-width: 72ch; }
.dated li { display: grid; grid-template-columns: 5.4rem 1fr; gap: 12px; padding: 8px 0; border-top: 1px solid var(--hair-2); font-size: .95rem; }
.dated li:last-child { border-bottom: 1px solid var(--hair-2); }
.dated .y { font-family: var(--mono); font-size: .85rem; color: var(--muted); padding-top: 4px; }
.two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 0 44px; }
.media { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; max-width: 72ch; }
.media li { display: grid; grid-template-columns: 72px 1fr; gap: 16px; padding: 12px 0; border-top: 1px solid var(--hair-2); }
.media li:last-child { border-bottom: 1px solid var(--hair-2); }
.media .art { width: 72px; height: 72px; border: 1px solid var(--hair); }
.media .glyph { width: 40px; height: 40px; border: 1px solid var(--hair); display: grid; place-items: center; color: var(--accent); }
.media .glyph svg { width: 16px; height: 16px; }
.media .t { font-family: var(--sans); font-size: .95rem; color: var(--ink); }
.media .t:hover { color: var(--accent-ink); }
.media .mm { font-family: var(--mono); font-size: .85rem; color: var(--muted); margin: 3px 0 4px; }
.media .b { font-size: .95rem; color: var(--ink); max-width: 60ch; }
.media .ll { font-family: var(--sans); font-size: .85rem; margin-top: 4px; }
.media .ll a + a::before { content: " · "; color: var(--muted); }
.card-link {
  display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: center; border: 1px solid var(--hair); background: var(--surface); padding: 16px 20px; margin: 14px 0 8px; max-width: 640px; color: var(--ink);
}
.card-link { text-decoration: none; }
.card-link:hover { border-color: var(--accent); }
.card-link .big { font-family: var(--serif); font-size: 2rem; color: var(--accent); line-height: 1; }
.card-link .ct { font-family: var(--sans); font-size: .95rem; }
.card-link .cs { font-family: var(--mono); font-size: .85rem; color: var(--muted); margin-top: 3px; }
.feat-card { display: grid; grid-template-columns: 96px 1fr; gap: 20px; align-items: start; border: 1px solid var(--hair); background: var(--surface); padding: 18px; margin: 14px 0 8px; max-width: 640px; }
.feat-card .ft { font-family: var(--sans); font-size: 1rem; color: var(--ink); }
.feat-card .fm { font-family: var(--mono); font-size: .85rem; color: var(--muted); margin: 4px 0 8px; }
.feat-card p { font-size: .95rem; margin: 0; }

/* ---------- Papers list ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; margin: 4px 0 22px; font-family: var(--sans); font-size: .85rem; }
.filters button { font-family: var(--sans); font-size: .85rem; background: none; border: 1px solid var(--hair); color: var(--ink); padding: 5px 11px; cursor: pointer; }
.filters button[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.filters select { font-family: var(--sans); font-size: .85rem; background: var(--surface); color: var(--ink); border: 1px solid var(--hair); padding: 5px 8px; }
.filters .count { font-family: var(--mono); font-size: .85rem; color: var(--muted); margin-left: auto; }
.plist { list-style: none; margin: 0; padding: 0; }
.plist > li { display: grid; grid-template-columns: 72px 1fr; gap: 18px; padding: 16px 0; border-top: 1px solid var(--hair-2); }
.plist > li:last-child { border-bottom: 1px solid var(--hair-2); }
.plist .pt { font-family: var(--serif); font-size: 1.12rem; line-height: 1.3; color: var(--ink); }
.plist .pt:hover { color: var(--accent-ink); }
.plist .pv { font-family: var(--mono); font-size: .85rem; color: var(--muted); margin: 5px 0 4px; }
.plist .pv .y { color: var(--ink); margin-right: 8px; }
.plist .pc { font-family: var(--sans); font-size: .85rem; color: var(--muted); }
.plist .pb { font-size: .95rem; margin: 6px 0 0; max-width: 66ch; }
.plist .pl { font-family: var(--sans); font-size: .85rem; margin-top: 6px; }
.plist .pl a + a::before { content: " · "; color: var(--muted); }
.plist .tag { display: inline-block; font-family: var(--mono); font-size: .85rem; letter-spacing: .06em; text-transform: uppercase; color: var(--red); border: 1px solid currentColor; padding: 1px 5px; margin-left: 8px; vertical-align: middle; }
@media (max-width: 480px) { .plist > li { grid-template-columns: 56px 1fr; gap: 12px; } }

/* ---------- Writing ---------- */
.writing-group { margin-bottom: 26px; }
.writing-group h3 { font-family: var(--sans); font-size: .85rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 0 0 6px; }

/* ---------- Footer ---------- */
footer.foot { border-top: 1px solid var(--hair); margin-top: 48px; padding: 28px 0 56px; font-family: var(--sans); font-size: .85rem; color: var(--muted); }
footer .frow { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-bottom: 10px; }
footer .colophon { font-family: var(--mono); font-size: .85rem; }

/* ---------- Motion ---------- */
.reveal { opacity: 0; transform: translateY(8px); transition: opacity .5s ease, transform .5s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* ---------- Print ---------- */
@media print {
  .masthead,   .reveal { opacity: 1 !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .page { display: block; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-family: var(--mono); font-size: .7em; color: #444; }
  .plist > li { break-inside: avoid; }
}
