/* Site styles. Colours live in :root; each research theme owns one (--t1 to --t6).
   Layout switches (map graph, ticks, whimsy, theme cards) are data-* attributes on <html>,
   set from _config.yml by _layouts/default.html. */
/* =================================================================
   Palettes (light only for now). Each research theme owns a colour.
   ================================================================= */
:root {
  --paper: #fbf8f1; --card: #fffdf8; --tint: #f3ecdf; --ink: #1c1a17; --muted: #4f4a42; --rule: #e2dacb;
  --link: #002bd6; --edge: #a39c8e;
  /* accents carried over from the previous site: the line under the name, the pronunciation, the fact label */
  --accent: #c0632f; --say: #00936f; --fun: #c4066b;
  --t1: #d97000; --t1-soft: #fcebd3;  --t2: #a0124b; --t2-soft: #f8dde6;
  --t3: #2e7d1f; --t3-soft: #e2f0da;  --t4: #5b2bc4; --t4-soft: #e9e1fa;
  --t5: #0b7285; --t5-soft: #d8eef2;  --t6: #8a5a2b; --t6-soft: #f2e6d8;
  --award: #a0124b; --gold-bg: #ffe39a; --gold-ink: #6e3d00;
}
:root {
  --air: 0px; /* extra room, grows with window height so the first screen ends at the rule */
  --serif: "Gentium Book Plus", "Gentium Plus", "Gentium Basic", serif;
  --sans:  "Lato", "Segoe UI", sans-serif;
  --gap: 2.4rem;
}
html { font-size: 17.5px; }
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--serif); line-height: 1.5; font-kerning: normal; -webkit-font-smoothing: antialiased; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 0.16em; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; border-radius: 2px; }
p { margin: 0 0 0.6em; }
.prose p, .j { text-align: justify; hyphens: auto; -webkit-hyphens: auto; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 1.75rem; }

/* =================================================================
   Landing: two halves of nearly equal width
   ================================================================= */
.landing { display: grid; grid-template-columns: 53fr 47fr; column-gap: var(--gap); padding-top: 1.15rem; }
.who { display: grid; grid-template-columns: 156px 1fr; column-gap: 1.3rem; align-items: center; margin-bottom: 0.9rem; }
.portrait { width: 156px; aspect-ratio: 5 / 4; border-radius: 8px; overflow: hidden; display: block; box-shadow: 0 2px 10px rgba(0,0,0,0.12); }
.portrait img { width: 100%; height: 100%; object-fit: cover; display: block; }
.name { font-size: 2.05rem; line-height: 1.1; font-weight: 400; margin: 0 0 0.25rem; }
.oneliner { font-family: var(--sans); font-size: 0.82rem; font-weight: 700; color: var(--accent); margin: 0 0 0.2rem; line-height: 1.4; }
.oneliner span { white-space: nowrap; }
.ol-short { display: none; }
.who > div { min-width: 0; }
@media (max-width: 520px) { .has-short .ol-full { display: none; } .has-short .ol-short { display: inline; } }
.say { font-family: var(--sans); font-size: 0.8rem; color: var(--muted); margin: 0 0 0.3rem; }
.say em { color: var(--say); font-weight: 700; }
.say em:nth-of-type(2) { color: var(--t2); }
.quote { font-style: italic; font-size: 0.86rem; color: var(--muted); margin: 0 0 0.45rem; line-height: 1.35; }
.quote cite { font-style: normal; font-family: var(--sans); font-size: 0.74rem; white-space: nowrap; }
.quote cite::before { content: "\2013\00a0"; }
.links { list-style: none; padding: 0; margin: 0; font-family: var(--sans); font-size: 0.8rem; font-weight: 700; display: flex; flex-wrap: wrap; column-gap: 0.8rem; }
.lead { font-size: 1.1rem; line-height: 1.4; margin: 0 0 0.5rem; }
.landing .prose p { font-size: 0.95rem; line-height: 1.45; }
.glance { margin: 0.95rem 0 0; }
html[data-themehead="none"] .glance { margin-top: 1.35rem; }
.glance h2, .news-box h2 { font-family: var(--sans); font-size: 0.86rem; font-weight: 700; color: var(--muted); margin: 0 0 0.4rem; }
.chips { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0.5rem; }
.chip { --c: var(--t1); --soft: var(--t1-soft); display: grid; grid-template-columns: 1.9rem 1fr; gap: 0.45rem; align-items: center; background: var(--soft); border-radius: 6px; padding: 0.32rem 0.55rem; min-height: 2.45rem; color: var(--ink); font-size: 0.86rem; line-height: 1.2; border: 1px solid transparent; }
.chip:hover { text-decoration: none; border-color: var(--c); }
.chip:hover b { text-decoration: underline; text-underline-offset: 0.16em; }
/* a header in the same pattern as News: label on the left, a quiet hint on the right */
.glance-head { display: flex; justify-content: space-between; align-items: baseline; font-family: var(--sans); font-size: 0.86rem; font-weight: 700; color: var(--muted); margin: 0 0 0.35rem; }
.glance-head .hint { font-size: 0.72rem; font-weight: 400; }
html[data-themehead="label"] .glance-head .hint, html[data-themehead="none"] .glance-head { display: none; }
.chip svg { width: 1.9rem; height: 1.4rem; }
.chip b { color: var(--c); display: block; font-weight: 700; }
.chip span { font-family: var(--sans); font-size: 0.72rem; color: var(--muted); }
.th2 { --c: var(--t2); --soft: var(--t2-soft); } .th3 { --c: var(--t3); --soft: var(--t3-soft); } .th4 { --c: var(--t4); --soft: var(--t4-soft); } .th5 { --c: var(--t5); --soft: var(--t5-soft); }
.epigraph { font-style: italic; font-size: 0.93rem; color: var(--muted); margin: 0.9rem 0 0; padding-top: 0.6rem; border-top: 1px dashed var(--rule); }
.epigraph cite { font-style: normal; font-family: var(--sans); font-size: 0.78rem; }

.market { background: var(--card); border: 1px solid var(--rule); border-left: 3px solid var(--t1); border-radius: 5px; padding: 0.42rem 0.7rem; font-family: var(--serif); font-size: 0.84rem; line-height: 1.4; margin: 0.2rem 0 0.9rem; color: var(--muted); }
.market b { display: block; font-family: var(--sans); font-size: 0.86rem; margin-bottom: 0.15rem; }
.role { color: var(--ink); font-weight: 700; }
.market .act { font-family: var(--sans); font-size: 0.84rem; font-weight: 700; margin-top: 0.3rem; display: flex; gap: 1rem; }
.news { list-style: none; padding: 0; margin: 0; }
.news li { display: grid; grid-template-columns: 4.1rem 1fr; gap: 0.6rem; padding: 0.16rem 0; font-size: 0.93rem; line-height: 1.38; }
.news time { font-family: var(--sans); font-size: 0.76rem; color: var(--muted); padding-top: 0.12rem; font-variant-numeric: tabular-nums; }
.kind { display: inline-block; width: 0.5rem; height: 0.5rem; border-radius: 50%; margin-right: 0.4rem; vertical-align: 0.06em; }
.k-teach { background: var(--t6); } .k-paper { background: var(--link); } .k-award { background: var(--award); } .k-bp { background: var(--t1); } .k-life { background: var(--t3); } .k-talk { background: var(--t4); }
/* all news in one window of fixed height: newest on top, older ones a scroll away */
.news-win { position: relative; }
.news-scroll { height: calc(13.9rem + var(--air)); overflow-y: auto; overscroll-behavior: contain; padding-right: 0.45rem; scrollbar-width: thin; scrollbar-color: var(--edge) transparent; }
.news-scroll::-webkit-scrollbar { width: 6px; }
.news-scroll::-webkit-scrollbar-thumb { background: var(--edge); border-radius: 3px; }
.news-win::after { content: ""; position: absolute; left: 0; right: 0.6rem; bottom: 0; height: 1rem; background: linear-gradient(to bottom, transparent, var(--paper)); pointer-events: none; transition: opacity 0.2s; }
.news-win.end::after { opacity: 0; }
.news-box h2 { display: flex; justify-content: space-between; align-items: baseline; }
.news-box h2 .hint { font-size: 0.72rem; font-weight: 400; transition: opacity 0.3s; }
.news-box.moved h2 .hint { opacity: 0; }

/* =================================================================
   The map: every section of the site, as tiles on a flickering graph
   ================================================================= */
.map { margin-top: 0.8rem; }
.map-graph { display: block; width: 100%; height: 70px; overflow: visible; }
html[data-graph="medium"] .map-graph { height: 62px; }
html[data-graph="tall"] .map-graph { height: 72px; }
.map-graph .relay { stroke-width: 1.1; }
.map-graph .tick { stroke: var(--edge); stroke-width: 1; stroke-dasharray: 1 3; opacity: 0.7; }
html[data-ticks="off"] .map-graph .tick { display: none; }
.map-graph .edge { stroke: var(--edge); stroke-width: 1.4; transition: opacity 0.45s ease, stroke 0.3s ease; }
.map-graph .edge.off { opacity: 0.1; }
.map-graph .edge { stroke: #7d7466; stroke-width: 2.2; stroke-linecap: round; }
.map-graph .edge.off { opacity: 0.16; stroke-width: 1.2; stroke-dasharray: 2 4; }
.map-graph .node { stroke-width: 1.6; }
.map-graph .edge.trail { stroke: var(--t1) !important; opacity: 1 !important; stroke-width: 3 !important; stroke-dasharray: none !important; }
.map-graph .walker .halo { fill: var(--t1); opacity: 0.18; }
.map-graph .wait { font-family: var(--sans); font-size: 10.5px; fill: var(--t1); font-weight: 700; }
.map-graph .node { fill: var(--paper); stroke: var(--ink); stroke-width: 1.2; }
.map-graph .walker { transition: transform 0.32s ease-in-out; }
html[data-walk="jump"] .map-graph .walker { transition: transform 0.6s cubic-bezier(.45,.05,.3,1); }
.map-graph .walker circle { fill: var(--t1); }
.tiles { display: grid; grid-template-columns: repeat(8, 1fr); gap: 0.55rem; }
.tile { --c: var(--ink); --soft: var(--tint); font: inherit; text-align: center; cursor: pointer; background: var(--card); color: var(--ink); border: 1px solid var(--rule); border-top: 3px solid var(--c); border-radius: 6px; padding: 0.4rem 0.4rem 0.42rem; display: flex; flex-direction: column; align-items: center; gap: 0.12rem; min-width: 0; }
.tile svg { width: 100%; height: 26px; }
.tile .tt { font-size: 0.98rem; font-weight: 700; line-height: 1.2; }
.tile .tp { font-family: var(--sans); font-size: 0.72rem; color: var(--muted); line-height: 1.3; }
.tile:hover { background: var(--soft); }
.tile[aria-selected="true"] { background: var(--soft); border-color: var(--c); box-shadow: inset 0 -3px 0 var(--c); }
.tile.c1 { --c: var(--t1); --soft: var(--t1-soft); } .tile.c2 { --c: var(--t2); --soft: var(--t2-soft); }
.tile.c3 { --c: var(--t3); --soft: var(--t3-soft); } .tile.c4 { --c: var(--t4); --soft: var(--t4-soft); }
.tile.c5 { --c: var(--t5); --soft: var(--t5-soft); } .tile.c6 { --c: var(--award); --soft: var(--t2-soft); }
.tile.c7 { --c: var(--link); --soft: #e3e9fb; } .tile.c8 { --c: var(--muted); --soft: var(--tint); } .tile.c9 { --c: var(--t6); --soft: var(--t6-soft); }
.map-cap { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; font-family: var(--sans); font-size: 0.7rem; color: var(--muted); margin-top: calc(0.5rem + 0.3 * var(--air)); }
html[data-capstyle="italic"] .map-cap span { font-style: italic; }
.map-cap button { white-space: nowrap; }
.map-cap a { font-weight: 700; }
.map-cap button { font: inherit; font-weight: 700; color: var(--link); background: none; border: 0; padding: 0; cursor: pointer; }

/* =================================================================
   Panels: one section at a time, below the map
   ================================================================= */
.panels { margin-top: calc(1rem + 0.5 * var(--air)); padding-top: 1.2rem; border-top: 1px solid var(--rule); padding-bottom: 2rem; }
.panel { display: none; }
.panel.on, .panels.all .panel { display: block; }
.panels.all .panel { margin-bottom: 2.4rem; }
.panel h2 { font-size: 1.55rem; font-weight: 700; margin: 0 0 0.35rem; line-height: 1.2; }
.panel-intro { font-size: 0.97rem; margin-bottom: 1rem; }

/* research: themes rail + content */
.res { display: grid; grid-template-columns: 190px minmax(0, 1fr); column-gap: var(--gap); }
.rail { position: sticky; top: 1rem; align-self: start; font-family: var(--sans); font-size: 0.86rem; }
.rail > a { display: grid; grid-template-columns: 0.6rem 1fr; gap: 0.5rem; align-items: baseline; color: var(--ink); padding: 0.28rem 0.4rem; border-radius: 4px; line-height: 1.3; }
.rail > a:hover { background: var(--tint); text-decoration: none; }
.rail > a.active { background: var(--tint); font-weight: 700; }
.rail .dot { width: 0.6rem; height: 0.6rem; border-radius: 50%; display: inline-block; }
.rail p { font-size: 0.78rem; color: var(--muted); margin: 0.8rem 0.4rem 0; line-height: 1.4; }

.theme { --c: var(--t1); --soft: var(--t1-soft); margin: 0 0 2.2rem; scroll-margin-top: 1rem; }
.theme.th2 { --c: var(--t2); --soft: var(--t2-soft); } .theme.th3 { --c: var(--t3); --soft: var(--t3-soft); } .theme.th4 { --c: var(--t4); --soft: var(--t4-soft); } .theme.th5 { --c: var(--t5); --soft: var(--t5-soft); }
.theme h3 { font-size: 1.32rem; font-weight: 700; color: var(--c); margin: 0; line-height: 1.25; }
.theme .q { font-style: italic; margin: 0.1rem 0 0.55rem; }
.theme .prose p { font-size: 0.98rem; }
.theme-fig { margin: 0.7rem 0 0.8rem; background: var(--soft); border-radius: 8px; padding: 0.6rem 0.8rem 0.5rem; }
.theme-fig svg { width: 100%; height: 190px; display: block; overflow: visible; }
.theme-fig figcaption { font-size: 0.85rem; line-height: 1.4; margin-top: 0.2rem; }
.theme-fig figcaption b { color: var(--c); }
.theme-fig .draft { font-family: var(--sans); font-size: 0.7rem; color: var(--c); font-weight: 700; margin-left: 0.4rem; }
details.more { margin: 0.1rem 0 0.7rem; }
details.more > summary { font-family: var(--sans); font-size: 0.84rem; font-weight: 700; color: var(--c); cursor: pointer; list-style: none; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::before { content: "+ "; }
details.more[open] > summary::before { content: "\2212  "; }
details.more > div { font-size: 0.94rem; padding: 0.4rem 0 0 0.8rem; border-left: 2px solid var(--c); margin-top: 0.3rem; }

.plist { margin-top: 0.4rem; }
.plist > h4 { font-family: var(--sans); font-size: 0.84rem; font-weight: 700; color: var(--c); margin: 0 0 0.4rem; }
.paper { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 0.95rem; padding: 0.5rem 0; align-items: start; }
.pthumb { background: var(--soft); border-radius: 6px; aspect-ratio: 16 / 10; display: grid; place-items: center; overflow: hidden; }
.pthumb svg { width: 88%; height: 88%; overflow: visible; }
.paper h5 { font-size: 1rem; font-weight: 700; margin: 0 0 0.05rem; line-height: 1.32; }
.paper h5 a { color: var(--ink); }
.paper h5 a:hover { color: var(--c); }
.authors { font-size: 0.9rem; margin: 0; }
.authors small { font-family: var(--sans); font-size: 0.72rem; color: var(--muted); margin-left: 0.3rem; }
.me { font-weight: 700; text-decoration: underline; text-decoration-color: var(--c); text-decoration-thickness: 2px; text-underline-offset: 0.2em; }
.venue { font-size: 0.9rem; color: var(--muted); margin: 0.05rem 0 0.2rem; }
.abbr { font-family: var(--sans); font-weight: 700; font-size: 0.76rem; color: var(--c); background: var(--soft); padding: 0.04rem 0.38rem; border-radius: 3px; margin-left: 0.3rem; white-space: nowrap; }
.badge { font-family: var(--sans); font-weight: 700; font-size: 0.74rem; padding: 0.05rem 0.42rem; border-radius: 3px; margin-left: 0.3rem; white-space: nowrap; vertical-align: 0.08em; }
.b-bp { background: var(--gold-bg); color: var(--gold-ink); } .b-oral { background: var(--award); color: #fff; }
.b-rev { background: var(--tint); color: var(--muted); }
.tldr { font-size: 0.93rem; margin: 0 0 0.15rem; }
.res-links { font-family: var(--sans); font-size: 0.8rem; font-weight: 700; }
.res-links a { margin-right: 0.9em; }
.res-links .na { color: var(--muted); font-weight: 400; }

/* per-paper and theme figure motion: plays in view and on hover, never forever */
.anim * { transform-box: fill-box; transform-origin: center; }
@keyframes blink { 0%, 100% { opacity: 1; } 45%, 60% { opacity: 0.1; } }
.playing .bl, .paper:hover .bl { animation: blink 1.6s ease-in-out var(--d, 0s) 3; }
@keyframes hop { 0%,100% { transform: translate(0,0); } 33% { transform: translate(var(--x1), var(--y1)); } 66% { transform: translate(var(--x2), var(--y2)); } }
.playing .hop, .paper:hover .hop { animation: hop 3s ease-in-out 2; }
@keyframes fade { 0% { opacity: var(--o); } 30% { opacity: var(--p, 1); } 100% { opacity: var(--o); } }
.playing .fd, .paper:hover .fd { animation: fade 1.5s ease-out var(--d, 0s) 3; }
@keyframes ringout { from { transform: scale(0.2); opacity: 0.9; } to { transform: scale(1); opacity: 0; } }
.rg { opacity: 0; }
.playing .rg, .paper:hover .rg { animation: ringout 1.5s ease-out 3; }
@keyframes slide { to { transform: translateX(var(--dx)); } }
.playing .sl, .paper:hover .sl { animation: slide 2.2s ease-in-out 0.3s both; }
@keyframes grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.gr { transform-origin: bottom !important; }
.playing .gr, .paper:hover .gr { animation: grow 0.45s ease-out var(--d, 0s) both; }
@keyframes draw { from { stroke-dashoffset: 300; } to { stroke-dashoffset: 0; } }
.dr { stroke-dasharray: 300; }
.playing .dr, .paper:hover .dr { animation: draw 1.4s ease-out var(--d, 0s) both; }
@keyframes pop { 0% { opacity: 0; } 100% { opacity: var(--o, 1); } }
.playing .pp, .paper:hover .pp { animation: pop 0.4s ease-out var(--d, 0s) both; }
@keyframes travel { from { transform: translateX(0); } to { transform: translateX(var(--dx)); } }
.playing .tv, .paper:hover .tv { animation: travel 1.8s linear var(--d, 0s) 2; }
.theme-fig .edge { stroke: var(--c); stroke-opacity: 0.6; stroke-width: 1.6; transition: opacity 0.45s ease; }
.theme-fig .edge.off { opacity: 0.08; }
.theme-fig .node { fill: var(--card); stroke: var(--ink); stroke-width: 1.3; transition: fill 0.6s ease; }
.theme-fig .walker { transition: transform 0.55s cubic-bezier(.45,.05,.3,1); }
.theme-fig .walker circle { fill: var(--c); }

/* other panels */
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.card { --c: var(--t1); --soft: var(--t1-soft); }
.card.th2 { --c: var(--t2); --soft: var(--t2-soft); } .card.th3 { --c: var(--t3); --soft: var(--t3-soft); } .card.th4 { --c: var(--t4); --soft: var(--t4-soft); }
.shot { aspect-ratio: 16 / 10; background: var(--soft); border-radius: 6px; position: relative; display: grid; place-items: center; margin-bottom: 0.4rem; overflow: hidden; }
.shot svg { width: 80%; height: 80%; }
.shot .play { position: absolute; right: 0.45rem; bottom: 0.4rem; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: var(--c); display: grid; place-items: center; }
.shot .play::after { content: ""; border-left: 0.5rem solid #fff; border-top: 0.32rem solid transparent; border-bottom: 0.32rem solid transparent; margin-left: 0.12rem; }
.card h4 { font-size: 0.95rem; font-weight: 700; margin: 0; line-height: 1.3; }
.card .meta { font-family: var(--sans); font-size: 0.76rem; color: var(--muted); margin: 0.1rem 0 0; line-height: 1.35; }

/* ---------- talks: slides / video / paper links under each card ---------- */
.card.th5 { --c: var(--t5); --soft: var(--t5-soft); }
.shot.drawn { background: none; box-shadow: inset 0 0 0 1px var(--rule); }
.shot.drawn svg { width: 94%; height: 94%; overflow: visible; }
button.shot { width: 100%; border: 0; padding: 0; font: inherit; cursor: pointer; }
a.shot, button.shot { transition: box-shadow 0.15s; }
a.shot:hover, button.shot:hover, button.shot:focus-visible { box-shadow: inset 0 0 0 2px var(--c); }
button.shot:hover .play { transform: scale(1.12); }
.shot .play { transition: transform 0.15s; }
.tlinks { font-family: var(--sans); font-size: 0.76rem; margin: 0.3rem 0 0; display: flex; flex-wrap: wrap; gap: 0.25rem 0.8rem; }
.tlinks a { font-weight: 700; }
.tlinks .later { color: var(--muted); }
.talk-player { width: min(960px, calc(100vw - 2rem)); padding: 0; border: 1px solid var(--rule); border-radius: 8px; background: var(--card); color: var(--ink); }
.talk-player::backdrop { background: rgba(28, 26, 23, 0.6); }
.tp-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.5rem 0.6rem 0.5rem 0.9rem; font-family: var(--sans); font-size: 0.9rem; }
.tp-close { border: 0; background: none; font-size: 1.5rem; line-height: 1; cursor: pointer; color: var(--muted); padding: 0 0.3rem; }
.tp-close:hover { color: var(--ink); }
.tp-body video, .tp-body iframe { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; background: #000; }

.two { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.7rem; margin-bottom: 0.9rem; }
.stat { background: var(--tint); border-radius: 6px; padding: 0.55rem 0.7rem; }
.stat b { display: block; font-size: 1.45rem; font-weight: 400; line-height: 1.1; color: var(--award); }
.stat span { font-family: var(--sans); font-size: 0.76rem; color: var(--muted); }
.plain { list-style: none; padding: 0; margin: 0; font-size: 0.93rem; }
.plain li { display: grid; grid-template-columns: 5rem 1fr; gap: 0.7rem; padding: 0.18rem 0; line-height: 1.4; }
.plain time { font-family: var(--sans); font-size: 0.76rem; color: var(--muted); padding-top: 0.12rem; }
.aw { color: var(--award); font-weight: 700; }
.sub-h { font-family: var(--sans); font-size: 0.86rem; font-weight: 700; color: var(--muted); margin: 0 0 0.45rem; }

.site-foot { border-top: 1px solid var(--rule); padding: 0.9rem 0 2rem; font-family: var(--sans); font-size: 0.76rem; color: var(--muted); display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }

/* ---------- link glyphs ---------- */
.links a { display: inline-flex; align-items: center; gap: 0.28rem; }
.links svg { width: 0.95em; height: 0.95em; flex: none; }
.links i { font-size: 1.02em; width: 1.05em; text-align: center; flex: none; }

/* ---------- colour richness ---------- */
.aw { color: var(--award); font-weight: 700; }
.tro { width: 0.95rem; height: 0.95rem; color: var(--award); }
.news .ptitle { color: var(--c, var(--link)); font-weight: 700; }

/* ---------- alignment ---------- */

/* ---------- news ---------- */
.news-box .news li { font-size: 0.85rem; line-height: 1.33; grid-template-columns: 3.7rem 1fr; gap: 0.5rem; padding: 0.12rem 0; }
.news-box .news time { font-size: 0.72rem; }

/* ---------- whimsy slot on the landing ---------- */
.wh { display: none; }
html[data-whimsy="comic"] .wh-comic, html[data-whimsy="fact"] .wh-fact, html[data-whimsy="both"] .wh { display: block; }
/* the fact: no card, a quiet italic line; the die re-rolls it */
.wh-fact { margin-top: calc(0.6rem + 0.6 * var(--air)); padding-top: 0.4rem; border-top: 1px dashed var(--rule); }
/* two columns: the fact and comic sit at the bottom of the right column, so the comic ends level with the intro text */
@media (min-width: 961px) {
  .landing > div:last-child { display: flex; flex-direction: column; }
  .landing > div:last-child > .wh-fact, html[data-whimsy="comic"] .landing > div:last-child > .wh-comic { margin-top: auto; }
  .landing > div:last-child > .wh-comic { margin-bottom: 0; }
  .intro-prose > p:last-child { margin-bottom: 0; }
  /* the news list grows to fill the room above the fact (its usual height is the minimum) */
  .landing > div:last-child > .news-box { flex: 1 1 auto; display: flex; flex-direction: column; }
  .news-box .news-win { flex: 1 1 0; display: flex; flex-direction: column; min-height: calc(13.9rem + var(--air)); }
  .news-box .news-scroll { flex: 1 1 0; height: auto; min-height: 0; }
  .landing > div:last-child > .wh-fact { margin-top: 0.6rem; }
}
.fact-head { display: flex; justify-content: space-between; align-items: center; font-family: var(--sans); font-size: 0.74rem; font-weight: 700; color: var(--muted); }
.fact-head > span { color: var(--fun); }
.roll { font: inherit; display: inline-flex; align-items: center; gap: 0.3rem; color: var(--link); background: none; border: 0; padding: 0; cursor: pointer; }
.roll svg { width: 1.1em; height: 1.1em; }
.roll:hover span { text-decoration: underline; text-underline-offset: 0.16em; }
.roll.rolling svg { animation: tumble 0.55s cubic-bezier(.3,.7,.4,1); }
@keyframes tumble { 0% { transform: rotate(0) scale(1); } 50% { transform: rotate(200deg) scale(1.2); } 100% { transform: rotate(360deg) scale(1); } }
.fact-text { display: flex; align-items: center; font-style: italic; font-size: 0.88rem; line-height: 1.4; margin: 0.1rem 0 0; }
.fact-text > span { transition: opacity 0.18s ease; }
.fact-text > span.swap { opacity: 0; }
.fact-text small { font-style: normal; font-family: var(--sans); font-size: 0.72rem; color: var(--muted); }
.wh-comic { margin: 0.5rem 0 0; }
.wh-comic svg { width: 100%; height: auto; display: block; }

/* ---------- research chips toggle ---------- */
html[data-chips="off"] .glance { display: none; }

.map-graph .lbl { display: none; font-family: var(--serif); font-style: italic; font-size: 11px; fill: var(--muted); }

/* ---------- Bloch sphere state arrow ---------- */
@keyframes precess { from { transform: rotate(-28deg); } to { transform: rotate(28deg); } }
.bloch .state { transform-origin: 0 0 !important; transform-box: view-box !important; }
.playing .bloch .state, .paper:hover .bloch .state { animation: precess 1.6s ease-in-out 4 alternate; }

/* medium windows: the left column is narrow, so shrink the card a little to keep each line whole */
@media (min-width: 961px) and (max-width: 1150px) {
  .who { grid-template-columns: 118px 1fr; column-gap: 0.9rem; }
  .portrait { width: 118px; }
  .name { font-size: 1.75rem; }
  .oneliner { font-size: 0.74rem; }
  .links { font-size: 0.76rem; column-gap: 0.75rem; }
}
@media (max-width: 960px) {
  .landing { grid-template-columns: 1fr; padding-top: 1.6rem; }
  .landing > div + div { margin-top: 1.2rem; }
  .chips { grid-template-columns: 1fr 1fr; }
  .tiles { display: flex; overflow-x: auto; padding-bottom: 0.3rem; }
  .tile { flex: 0 0 8.4rem; }
  .map-graph, .map-cap span { display: none; }
  .res { grid-template-columns: 1fr; }
  .rail { position: static; display: flex; flex-wrap: wrap; gap: 0.3rem; margin-bottom: 0.8rem; }
  .rail p { display: none; }
  .cards { grid-template-columns: 1fr 1fr; }
  .two { grid-template-columns: 1fr; gap: 1.2rem; }
}
@media (max-width: 560px) {
  .wrap { padding: 0 1rem; }
  .who { grid-template-columns: 96px 1fr; column-gap: 1rem; }
  .portrait { width: 96px; }
  .name { font-size: 1.6rem; }
  .cards, .stats { grid-template-columns: 1fr; }
  .chip { font-size: 0.8rem; }
  .paper { grid-template-columns: 1fr; }
  .pthumb { max-width: 220px; }
  .news li, .plain li { grid-template-columns: 1fr; gap: 0; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- emphasis in Markdown text ---------- */
/* **bold** in the intro and the news is an honor, shown in the award colour; in the job note it marks a role */
.news strong { color: var(--award); font-weight: 700; }
.news strong.plain { color: var(--ink); }
.intro-prose strong { color: var(--ink); font-weight: 700; }
.intro-prose a { font-weight: 700; }
.intro-prose strong.aw { color: var(--award); }  /* award names: crimson, unlike the black keyword bold */
.intro-prose .awc { color: var(--award); }        /* what the award means: crimson, not bold */
.intro-prose a.jump { font-family: var(--sans); font-weight: 400; font-size: 0.78em; color: var(--muted); margin-left: 0.15em; padding: 0 0.1em; }  /* small arrow after a topic: jumps to its section */
.intro-prose a.jump:hover { color: var(--link); text-decoration: none; }
.market strong { color: var(--ink); font-weight: 700; }

/* talks on phones: compact rows, small picture on the left */
@media (max-width: 560px) {
  .cards.talks .card { display: grid; grid-template-columns: 6.5rem 1fr; column-gap: 0.8rem; align-items: start; }
  .cards.talks .shot { grid-row: span 3; margin: 0; }
  .cards.talks .shot .play { width: 1.3rem; height: 1.3rem; right: 0.3rem; bottom: 0.25rem; }
}

/* ---------- writing: empty state, and the post list once there are posts ---------- */
.empty-note { display: flex; align-items: center; gap: 1rem; max-width: 40rem; padding: 0.9rem 1.1rem; border: 1px dashed var(--rule); border-radius: 6px; }
.empty-note svg { flex: 0 0 3.2rem; width: 3.2rem; height: 2rem; color: var(--t2); }
.empty-note.proj svg { color: var(--t3); }
.empty-note p { margin: 0; font-size: 0.97rem; color: var(--muted); }
.posts .post-desc { font-size: 0.9rem; color: var(--muted); }

/* ---------- experience: two columns of role cards, Skills last ---------- */
.xp { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; margin-top: 0.4rem; }
.xp-col { display: flex; flex-direction: column; gap: 1.1rem; min-width: 0; }
.xp-item { background: var(--card); border: 1px solid var(--rule); border-radius: 8px; padding: 1rem 1.1rem 0.9rem; }
.xp-item.now { border-top: 3px solid var(--t3); }
.xp-top { display: grid; grid-template-columns: 64px minmax(0, 1fr); column-gap: 0.9rem; align-items: center; }
.xp-logo { width: 64px; height: 64px; border-radius: 12px; background: #fff; border: 1px solid var(--rule); display: grid; place-items: center; overflow: hidden; }
.xp-logo img { width: 52px; height: 52px; object-fit: contain; }
.xp-logo span { font-family: var(--sans); font-weight: 700; font-size: 1.1rem; color: var(--muted); }
.xp-logo.glyph { background: var(--t3-soft); border-color: transparent; }
.xp-logo.glyph svg { width: 44px; height: 28px; color: var(--t3); }
.xp-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.15rem 0.8rem; }
.xp-head h4 { font-size: 1.12rem; font-weight: 700; margin: 0; line-height: 1.3; }
.xp-head h4 a { color: var(--ink); }
.xp-head h4 a:hover { color: var(--link); }
.xp-when { font-family: var(--sans); font-size: 0.76rem; color: var(--muted); white-space: nowrap; background: var(--tint); border-radius: 999px; padding: 0.06rem 0.6rem; }
.xp-item.now .xp-when { background: var(--t3-soft); color: var(--t3); font-weight: 700; }
.xp-role { margin: 0.1rem 0 0; font-size: 0.96rem; font-style: italic; line-height: 1.35; }
.xp-with { margin: 0.1rem 0 0; font-family: var(--sans); font-size: 0.78rem; color: var(--muted); }
.xp ul { margin: 0.75rem 0 0; padding-left: 1.05rem; font-size: 0.93rem; line-height: 1.5; }
.xp ul li { margin-bottom: 0.32rem; }
.xp ul li::marker { color: var(--edge); }
.xp ul strong { color: var(--ink); }
.xp-tools, .skills dd { display: flex; flex-wrap: wrap; gap: 0.3rem; margin: 0.5rem 0 0; }
.xp-tools span, .skills dd span { font-family: var(--sans); font-size: 0.72rem; color: var(--muted); background: var(--paper); border: 1px solid var(--rule); border-radius: 4px; padding: 0.05rem 0.45rem; }
.skills { margin: 0.8rem 0 0; display: grid; grid-template-columns: 6rem 1fr; gap: 0.55rem 0.7rem; }
.skills dt { font-family: var(--sans); font-size: 0.76rem; color: var(--muted); padding-top: 0.15rem; }
.skills dd { margin: 0; }
@media (max-width: 900px) { .xp { display: flex; flex-direction: column; } .xp-col { display: contents; } }
@media (max-width: 560px) {
  .xp-item { padding: 0.85rem 0.85rem 0.7rem; }
  .xp-top { grid-template-columns: 48px minmax(0, 1fr); column-gap: 0.7rem; }
  .xp-logo { width: 48px; height: 48px; border-radius: 9px; }
  .xp-logo img { width: 38px; height: 38px; }
  .xp-logo.glyph svg { width: 34px; height: 22px; }
  .skills { grid-template-columns: 1fr; gap: 0.15rem; }
  .skills dd { margin-bottom: 0.5rem; }
}

/* ---------- teaching: numbers and honors, role cards, then lectures ---------- */
#teaching { --tc: var(--t6); --tc-soft: var(--t6-soft); }
.tc-top { display: grid; grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr); gap: 1.1rem; margin: 0.3rem 0 1.2rem; }
.tc-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.7rem; }
.tc-stat { background: var(--tc-soft); border-radius: 8px; padding: 0.75rem 0.85rem 0.7rem; }
.tc-stat b { display: block; font-size: 1.9rem; font-weight: 700; line-height: 1; color: var(--tc); margin-bottom: 0.3rem; }
.tc-stat span { display: block; font-family: var(--sans); font-size: 0.76rem; line-height: 1.35; color: var(--muted); }
.tc-honors { display: flex; align-items: center; gap: 0.8rem; background: var(--card); border: 1px solid var(--rule); border-left: 3px solid var(--award); border-radius: 8px; padding: 0.7rem 0.9rem; }
.tc-honors svg { flex: 0 0 2.6rem; width: 2.6rem; height: 1.8rem; color: var(--award); }
.tc-honors ul { list-style: none; margin: 0; padding: 0; font-size: 0.92rem; line-height: 1.35; }
.tc-honors li + li { margin-top: 0.45rem; }
.tc-why { display: block; font-family: var(--sans); font-size: 0.74rem; color: var(--muted); }

.tc-roles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.1rem; align-items: start; }
.tc-role.now { border-top-color: var(--tc); }
.tc-role.now .xp-when { background: var(--tc-soft); color: var(--tc); }
.tc-role .xp-top { grid-template-columns: 52px minmax(0, 1fr); }
.xp-logo.glyph.tc { width: 52px; height: 52px; background: var(--tc-soft); }
.xp-logo.glyph.tc svg { width: 40px; height: 26px; color: var(--tc); }
.tc-role .xp-head { flex-direction: column; align-items: flex-start; gap: 0.25rem; }
.tc-role .xp-head h4 { font-size: 1.05rem; }
.tc-roles ul { margin: 0.75rem 0 0; padding-left: 1.05rem; font-size: 0.93rem; line-height: 1.5; }
.tc-roles ul li { margin-bottom: 0.32rem; }
.tc-roles ul li::marker { color: var(--edge); }
.tc-roles ul strong { color: var(--ink); }
.tc-courses { list-style: none; padding: 0 !important; margin: 0.8rem 0 0 !important; display: grid; gap: 0.45rem; }
.tc-roles .tc-courses li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.55rem; align-items: baseline; margin: 0 !important; }
.tc-code { font-family: var(--sans); font-size: 0.7rem; font-weight: 700; color: var(--tc); background: var(--tc-soft); border-radius: 4px; padding: 0.06rem 0.4rem; white-space: nowrap; }
.tc-name { font-size: 0.93rem; line-height: 1.35; }
.tc-meta { display: block; font-family: var(--sans); font-size: 0.74rem; color: var(--muted); }

.tc-sub { font-size: 1.15rem; font-weight: 700; margin: 1.8rem 0 0.15rem; }
.tc-note { font-size: 0.92rem; color: var(--muted); margin: 0 0 0.9rem; }
.lecs { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; align-items: start; }
.lec { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 1rem; background: var(--card); border: 1px solid var(--rule); border-radius: 8px; padding: 0.85rem; align-items: start; }
.lec-art { position: relative; display: block; width: 100%; aspect-ratio: 16 / 10; border: 0; padding: 0; border-radius: 6px; overflow: hidden; background: var(--paper); box-shadow: inset 0 0 0 1px var(--rule); cursor: pointer; }
div.lec-art { cursor: default; }
.lec-art > svg { display: block; width: 100%; height: 100%; }
.lec-art .play { position: absolute; right: 0.45rem; bottom: 0.4rem; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: var(--tc); display: grid; place-items: center; }
.lec-art .play::after { content: ""; border-left: 0.5rem solid #fff; border-top: 0.32rem solid transparent; border-bottom: 0.32rem solid transparent; margin-left: 0.12rem; }
.lec-kind { font-family: var(--sans); font-size: 0.72rem; font-weight: 700; color: var(--tc); text-transform: uppercase; letter-spacing: 0.04em; margin: 0 0 0.2rem; }
.lec h4 { font-size: 1.02rem; font-weight: 700; margin: 0; line-height: 1.3; }
.lec-blurb { font-size: 0.9rem; line-height: 1.45; margin: 0.35rem 0 0; }
.lec .tlinks { margin-top: 0.5rem; }

/* lecture art: bandit intervals tighten */
.bd-bar { fill: #efe6d4; stroke: #a39c8e; stroke-width: 1; transition: fill 0.5s, stroke 0.5s; }
.bd-ci { stroke: #1c1a17; stroke-width: 2.2; stroke-linecap: round; transform-box: fill-box; transform-origin: center; transition: transform 1.1s cubic-bezier(.45,.05,.3,1); }
.bd .ucb .bd-bar { fill: #f2e6d8; stroke: #8a5a2b; stroke-width: 1.6; }
.bd-pull2 { opacity: 0; }
.bd-pull, .bd-pull2 { transition: opacity 0.4s 0.6s; }
.lec:hover .bd-ci, .lec:focus-within .bd-ci { transform: scaleY(var(--k, .5)); }
.lec:hover .bd .ucb .bd-bar, .lec:focus-within .bd .ucb .bd-bar { fill: #efe6d4; stroke: #a39c8e; stroke-width: 1; }
.lec:hover .bd .top .bd-bar, .lec:focus-within .bd .top .bd-bar { fill: #f2e6d8; stroke: #8a5a2b; stroke-width: 1.6; transition-delay: 0.6s; }
.lec:hover .bd-pull, .lec:focus-within .bd-pull { opacity: 0; }
.lec:hover .bd-pull2, .lec:focus-within .bd-pull2 { opacity: 1; }

@media (max-width: 1100px) { .tc-top { grid-template-columns: 1fr; } .lecs { grid-template-columns: 1fr; } }
@media (max-width: 900px) { .tc-roles { grid-template-columns: 1fr; } .tc-role .xp-head { flex-direction: row; align-items: baseline; } }
@media (max-width: 560px) {
  .tc-stats { grid-template-columns: 1fr 1fr; }
  .tc-stat b { font-size: 1.6rem; }
  .lec { grid-template-columns: 1fr; }
  .lec-art { max-width: 320px; }
}
/* lecture art: the house is drawn in one stroke on hover */
.hs-ink { stroke-dasharray: 1; stroke-dashoffset: 1; }
.hs-num text { opacity: 0; }
.lec:hover .hs-ink, .lec:focus-within .hs-ink { animation: hs-draw 4s linear forwards; }
.lec:hover .hs-num text, .lec:focus-within .hs-num text { animation: hs-pop 0.3s ease-out var(--d, 0s) forwards; }
@keyframes hs-draw { to { stroke-dashoffset: 0; } }
@keyframes hs-pop { from { opacity: 0; transform: translateY(2px); } to { opacity: 1; transform: none; } }

/* ---------- awards: headline cards, every other award as a tile, service ---------- */
.aw-hi { display: grid; grid-template-columns: 1.15fr 1fr 1fr; gap: 0.9rem; margin: 0.3rem 0 1.2rem; }
.aw-card { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 0.75rem; align-items: start; background: var(--card); border: 1px solid var(--rule); border-top: 3px solid var(--award); border-radius: 8px; padding: 0.8rem 0.9rem 0.75rem; }
.aw-card.gold { background: linear-gradient(160deg, color-mix(in srgb, var(--gold-bg) 40%, var(--card)) 0%, var(--card) 75%); border-color: color-mix(in srgb, var(--gold-bg) 75%, var(--gold-ink)); border-top-color: color-mix(in srgb, var(--gold-ink) 40%, var(--gold-bg)); }  /* gold from the two gold variables only, so it is the same in every theme */
.aw-icon { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--t2-soft); }
.aw-icon svg { width: 32px; height: 22px; color: var(--award); }
.aw-card.gold .aw-icon { background: var(--gold-bg); }
.aw-card.gold .aw-icon svg { color: color-mix(in srgb, var(--gold-ink) 75%, var(--gold-bg)); }
.aw-where { display: flex; justify-content: space-between; gap: 0.6rem; font-family: var(--sans); font-size: 0.68rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--award); margin: 0 0 0.1rem; }
.aw-card.gold .aw-where { color: var(--gold-ink); }
.aw-where span { color: var(--muted); font-weight: 400; }
.aw-card h4 { font-size: 1.04rem; font-weight: 700; line-height: 1.25; margin: 0; }
.aw-line { font-size: 0.86rem; line-height: 1.4; color: var(--muted); margin: 0.25rem 0 0; }
.aw-line a { font-weight: 700; }

.aw-groups { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.1rem; align-items: start; }
.aw-gh { display: flex; align-items: center; gap: 0.4rem; font-family: var(--sans); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); margin: 0 0 0.5rem; }
.aw-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.aw-tile { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 0.6rem; align-items: start; background: var(--card); border: 1px solid var(--rule); border-left: 3px solid var(--award); border-radius: 6px; padding: 0.5rem 0.65rem 0.5rem 0.55rem; }
.aw-ti { width: 30px; height: 30px; border-radius: 50%; background: var(--t2-soft); display: grid; place-items: center; margin-top: 0.05rem; }
.aw-ti svg { width: 22px; height: 15px; color: var(--award); }
.aw-name { margin: 0; font-size: 0.94rem; line-height: 1.3; }
.aw-x { display: inline-block; font-family: var(--sans); font-size: 0.68rem; font-weight: 700; color: #fff; background: var(--award); border-radius: 999px; padding: 0.02rem 0.42rem; margin-left: 0.4rem; vertical-align: 0.12em; }
.aw-meta { margin: 0.1rem 0 0; font-size: 0.84rem; line-height: 1.38; color: var(--muted); }
.aw-meta time { font-family: var(--sans); font-size: 0.72rem; font-weight: 700; color: var(--ink); }

.aw-service { margin-top: 1.4rem; background: var(--tint); border-radius: 8px; padding: 0.8rem 1rem; }
.aw-service .aw-gh { border: 0; padding: 0; margin-bottom: 0.45rem; }
.aw-service p { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem; }
.aw-label { font-family: var(--sans); font-size: 0.76rem; color: var(--muted); margin-right: 0.3rem; }
.aw-chip { font-family: var(--sans); font-size: 0.74rem; background: var(--card); border: 1px solid var(--rule); border-radius: 4px; padding: 0.06rem 0.45rem; }
.aw-service p.aw-other { display: block; margin-top: 0.5rem; font-size: 0.9rem; }

@media (max-width: 900px) { .aw-hi, .aw-groups { grid-template-columns: 1fr; } }

/* ---------- email menu under the name ---------- */
.mail { position: relative; }
.mail summary { list-style: none; cursor: pointer; color: var(--link); display: inline-flex; align-items: center; gap: 0.28rem; }
.mail summary::-webkit-details-marker { display: none; }
.mail summary::after { content: ""; border-top: 0.28em solid currentColor; border-left: 0.24em solid transparent; border-right: 0.24em solid transparent; transition: transform 0.15s; }
.mail[open] summary::after { transform: rotate(180deg); }
.mail summary:hover { text-decoration: underline; }
.mail-pop { position: absolute; z-index: 20; top: calc(100% + 0.35rem); left: 0; min-width: max-content; background: var(--card); border: 1px solid var(--rule); border-radius: 8px; box-shadow: 0 6px 20px rgba(28, 26, 23, 0.12); padding: 0.45rem 0.55rem; font-weight: 400; }
.mail-pop p { display: flex; align-items: center; gap: 0.5rem; margin: 0; padding: 0.22rem 0; }
.mail-pop p + p { border-top: 1px dashed var(--rule); }
.mail-pop a { font-weight: 700; }
.mail-note { font-size: 0.7rem; color: var(--muted); background: var(--tint); border-radius: 999px; padding: 0 0.45rem; }
.mail-copy { margin-left: auto; font: inherit; font-size: 0.7rem; font-weight: 700; color: var(--muted); background: none; border: 1px solid var(--rule); border-radius: 4px; padding: 0.05rem 0.45rem; cursor: pointer; }
.mail-copy:hover { color: var(--ink); border-color: var(--edge); }
@media (max-width: 560px) {
  .links { position: relative; }
  .mail { position: static; }
  .mail-pop { left: 0; right: auto; min-width: 0; width: min(15.5rem, calc(100vw - 8rem)); }
  .mail-pop p { flex-wrap: wrap; gap: 0.15rem 0.5rem; }
  .mail-pop a { flex-basis: 100%; font-size: 0.76rem; overflow-wrap: anywhere; }
  .mail-copy { margin-left: 0; }
}

/* ---------- miscellany: hobby cards ---------- */
.hob-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; align-items: start; }
.hob { --c: var(--t1); --soft: var(--t1-soft); background: var(--card); border: 1px solid var(--rule); border-top: 3px solid var(--c); border-radius: 8px; padding: 0.9rem 0.95rem 0.85rem; }
.hob.th2 { --c: var(--t2); --soft: var(--t2-soft); } .hob.th3 { --c: var(--t3); --soft: var(--t3-soft); } .hob.th4 { --c: var(--t4); --soft: var(--t4-soft); } .hob.th5 { --c: var(--t5); --soft: var(--t5-soft); } .hob.th6 { --c: var(--t6); --soft: var(--t6-soft); }
.hob.has-posts { grid-column: span 2; }
.hob-top { display: flex; align-items: center; gap: 0.7rem; margin-bottom: 0.5rem; }
.hob-icon { flex: none; width: 52px; height: 52px; border-radius: 12px; background: var(--soft); display: grid; place-items: center; }
.hob-icon svg { width: 40px; height: 26px; color: var(--c); }
.hob h4 { font-size: 1.08rem; font-weight: 700; margin: 0; }
.hob-text { font-size: 0.92rem; line-height: 1.5; margin: 0; }
.hob-links { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.6rem 0 0; }
.hob-links a { font-family: var(--sans); font-size: 0.78rem; font-weight: 700; border: 1px solid var(--rule); border-radius: 999px; padding: 0.12rem 0.7rem; background: var(--paper); }
.hob-links a:hover { border-color: var(--link); }
.hob-posts { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 0.7rem; margin-top: 0.7rem; }
.hob-posts .instagram-media { margin: 0 !important; min-width: 0 !important; width: 100% !important; }
@media (max-width: 1100px) { .hob-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .hob-grid { grid-template-columns: 1fr; } .hob.has-posts { grid-column: auto; } }
