/* ==========================================================================
   Haddag Abdelkader — site styles (light and dark themes)
   Palette and type come from the brand book (Pomelli):
   Obsidian Black #101010 · Honey Brown #B18558 · Desert Peach #D8B99C
   Pastel Tan #EBD3BE · Pastel Apricot #F5E0CF
   Type: Nunito Sans (primary) · Noto Serif (secondary)

   Theme: <html data-theme="light|dark"> is set before first paint by a small
   script in the layout (saved choice, else the system setting). Colors use
   light-dark(), which follows `color-scheme`.
   ========================================================================== */

:root {
  --ease: cubic-bezier(.22, 1, .36, 1);       /* smooth ease-out, no overshoot */
  --ease-io: cubic-bezier(.65, 0, .35, 1);
  color-scheme: light dark;
  --obsidian: #101010;
  --honey: #b18558;
  --peach: #d8b99c;
  --tan: #ebd3be;
  --apricot: #f5e0cf;

  /* Semantic tokens: light-dark(light value, dark value) */
  --bg:           light-dark(#f5e0cf, #14110f);
  --surface:      light-dark(#fbf3ea, #1d1915);
  --surface-2:    light-dark(#ebd3be, #1a1612);
  --text:         light-dark(#101010, #f5e0cf);
  --muted:        light-dark(rgba(16, 16, 16, 0.78), rgba(245, 224, 207, 0.76));
  --accent:       light-dark(#7a5429, #d8b99c);   /* links on the page background (AA contrast) */
  --eyebrow:      light-dark(#7a5429, #b18558);
  --line:         light-dark(rgba(16, 16, 16, 0.14), rgba(245, 224, 207, 0.16));
  --header-bg:    light-dark(#f5e0cf, #101010);
  --hero-bg:      light-dark(#ebd3be, #101010);
  --hero-accent:  light-dark(#7a5429, #d8b99c);
  --band-bg:      light-dark(#101010, #1e1a15);
  --footer-bg:    light-dark(#101010, #0b0a09);
  --logo-wing:    light-dark(#101010, #f5e0cf);

  --font-sans: "Nunito Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-serif: "Noto Serif", Georgia, "Times New Roman", serif;

  --wrap: 72rem;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --radius: 0.75rem;
  --logo-h: 1.6rem;
}
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"]  { color-scheme: dark; }
@media (min-width: 56rem) { :root { --logo-h: 1.85rem; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 6.5rem; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
img { height: auto; }
a { color: var(--accent); text-underline-offset: 0.2em; }
a:hover { color: var(--text); }
:focus-visible { outline: 3px solid var(--honey); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--honey); color: var(--obsidian); }

h1, h2, h3 { font-family: var(--font-serif); font-weight: 500; line-height: 1.15; letter-spacing: -0.01em; margin: 0 0 0.6em; }
h1 { font-size: clamp(2.5rem, 7vw, 4.5rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h3 { font-size: 1.35rem; }
p { margin: 0 0 1em; }

.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.section { padding-block: clamp(3.5rem, 8vw, 6rem); }
.eyebrow {
  font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--eyebrow); margin: 0 0 1rem;
}
.lead { font-size: clamp(1.15rem, 2.4vw, 1.35rem); line-height: 1.55; max-width: 38rem; }

.skip-link { position: absolute; left: 1rem; top: -4rem; background: var(--obsidian); color: var(--apricot); padding: 0.6rem 1rem; z-index: 100; border-radius: 0 0 var(--radius) var(--radius); }
.skip-link:focus { top: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  font: inherit; font-weight: 700; font-size: 1rem; text-decoration: none;
  padding: 0.85rem 1.5rem; border-radius: 999px; border: 2px solid transparent;
  cursor: pointer; transition: background-color .4s var(--ease), color .4s var(--ease), border-color .4s var(--ease), transform .4s var(--ease);
}
.btn--sm { padding: 0.55rem 1.1rem; font-size: 0.95rem; }
.btn--primary { background: var(--honey); color: var(--obsidian); }
.btn--primary:hover { background: var(--peach); color: var(--obsidian); transform: translateY(-1px); }
.btn--ghost { border-color: var(--honey); color: var(--text); }
.btn--ghost:hover { background: var(--honey); color: var(--obsidian); }
.btn--dark { background: var(--obsidian); color: var(--apricot); }
.btn--dark:hover { background: #7a5429; color: var(--apricot); }
:root[data-theme="dark"] .btn--dark { background: var(--honey); color: var(--obsidian); }
:root[data-theme="dark"] .btn--dark:hover { background: var(--peach); color: var(--obsidian); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header-bg); color: var(--text);
  border-bottom: 1px solid var(--line);
}
.site-header .bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 0.65rem; }
.brand { display: inline-flex; align-items: center; gap: 0.75rem; color: var(--text); text-decoration: none; font-weight: 700; letter-spacing: 0.02em; min-width: 0; }
.brand:hover { color: var(--accent); }
.brand .logo { height: var(--logo-h); width: auto; flex: none; }
.logo-wing { fill: var(--logo-wing); }
.logo-base { fill: var(--honey); }
.brand__name { font-size: 1.05rem; white-space: nowrap; }
@media (max-width: 30rem) {
  .brand { gap: 0.6rem; }
  .brand__name { font-size: 0.95rem; }
  .nav-toggle { width: 2.5rem; height: 2.5rem; padding: 0; justify-content: center; }
  .nav-toggle__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }  /* icon-only, still read by screen readers */
}
@media (max-width: 22.5rem) { .brand__name { display: none; } }

.bar__tools { display: flex; align-items: center; gap: 0.5rem; }
.theme-toggle {
  display: inline-grid; place-items: center; width: 2.5rem; height: 2.5rem; padding: 0;
  background: none; border: 1px solid var(--line); border-radius: 999px; color: var(--text); cursor: pointer;
  transition: border-color .4s var(--ease), color .4s var(--ease);
}
.theme-toggle:hover { border-color: var(--honey); color: var(--accent); }

.nav-toggle { display: inline-flex; align-items: center; gap: 0.6rem; background: none; border: 1px solid var(--line); color: var(--text); font: inherit; font-weight: 700; padding: 0.5rem 0.9rem; border-radius: 999px; cursor: pointer; }
.nav-toggle__bars, .nav-toggle__bars::before { content: ""; display: block; width: 1.1rem; height: 2px; background: currentColor; position: relative; transition: transform .4s var(--ease); }
.nav-toggle__bars::before { position: absolute; top: -5px; left: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars { transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { transform: translateY(5px) rotate(-90deg); }

.site-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--header-bg); padding: 1rem var(--gutter) 1.5rem; border-bottom: 1px solid var(--line); }
.site-nav.is-open { display: block; }
.site-nav ul { list-style: none; margin: 0 0 1rem; padding: 0; }
.site-nav li a { display: block; padding: 0.8rem 0; color: var(--text); text-decoration: none; font-weight: 600; border-bottom: 1px solid var(--line); }
.site-nav li a:hover, .site-nav li a[aria-current="page"] { color: var(--accent); }
.site-nav .btn { width: 100%; }

@media (min-width: 64rem) {
  .nav-toggle { display: none; }
  .bar__tools { order: 3; }
  .site-nav { display: flex; position: static; align-items: center; gap: 1.75rem; padding: 0; background: none; border: 0; margin-left: auto; margin-right: 0.75rem; }
  .site-nav ul { display: flex; gap: 1.5rem; margin: 0; }
  .site-nav li a { padding: 0.4rem 0; border: 0; font-size: 0.975rem; position: relative; }
  .site-nav li a[aria-current="page"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; background: var(--honey); }
  .site-nav .btn { width: auto; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  background: var(--hero-bg); color: var(--text);
  padding-block: clamp(3rem, 8vw, 6rem) clamp(4rem, 9vw, 7rem);
}
.hero__grid { display: grid; gap: 2.5rem; align-items: center; }
.hero h1 { margin-bottom: 0.35em; }
.hero__tagline { font-family: var(--font-serif); font-style: italic; font-size: clamp(1.2rem, 3vw, 1.6rem); line-height: 1.4; color: var(--hero-accent); margin: 0 0 1.5rem; max-width: 30rem; }
.hero__text { max-width: 36rem; color: var(--muted); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 2rem; }
.hero__tags { list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; padding: 0; margin: 2rem 0 0; font-size: 0.9rem; letter-spacing: 0.06em; color: var(--hero-accent); }

@media (min-width: 56rem) {
  .hero__grid { grid-template-columns: 1.14fr 0.86fr; gap: 1.5rem; }
  .portrait { margin-inline: 0 -10%; justify-self: end; width: min(128%, 40rem); }
}

/* ---------- Pattern layer: rows of the mirrored wing mark that drift with the mouse ----------
   Built by assets/js/site.js. Odd and even rows move in opposite directions.
   Kept small and faint on purpose; it is a texture, not a feature. */
:root { --pattern-op: 0.07; }
:root[data-theme="dark"] { --pattern-op: 0.045; }
.pattern {
  --tile-w: clamp(5rem, 10vw, 7.5rem);
  --tile-h: calc(var(--tile-w) * 0.868);
  --amp: calc(var(--tile-w) * 0.45);
  position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none;
  opacity: 0; transition: opacity 1.1s var(--ease);
}
.pattern.is-ready { opacity: var(--po, var(--pattern-op)); }
.pattern__row {
  position: absolute; left: -35%; right: -35%; height: var(--tile-h); top: calc(var(--i) * var(--tile-h));
  background: url("../img/brand/pattern-honey.svg") repeat-x 0 0 / var(--tile-w) var(--tile-h);
  transform: translate3d(calc(var(--px, 0) * var(--amp) * var(--dir)), 0, 0);
  will-change: transform;
}
.pattern__row.is-odd { background-position-x: calc(var(--tile-w) / 2); }
.hero > .pattern { -webkit-mask-image: linear-gradient(to bottom, #000 0%, transparent 85%); mask-image: linear-gradient(to bottom, #000 0%, transparent 85%); }
.band > .pattern { --po: 0.035; }
:root[data-theme="dark"] .band > .pattern { --po: 0.03; }
.page-hero > .pattern { --po: 0.06; }
:root[data-theme="dark"] .page-hero > .pattern { --po: 0.04; }
@media (prefers-reduced-motion: reduce) { .pattern__row { transform: none; } }

/* ---------- Amazigh divider: repeating Tifinagh yaz (ⵣ) ---------- */
.zigzag { height: 20px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='20' viewBox='0 0 36 20'%3E%3Cpath d='M13 4 L23 16 M23 4 L13 16 M18 1.5 L18 18.5 M13 4 L11.5 2.5 M23 4 L24.5 2.5 M13 16 L11.5 17.5 M23 16 L24.5 17.5' fill='none' stroke='%23B18558' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") repeat-x center / 36px 20px; }
.zigzag--top { margin-top: -10px; position: relative; z-index: 1; }

/* ---------- Facets (what I do) ---------- */
.section-head { max-width: 40rem; margin-bottom: 2.5rem; }
.facets { display: grid; gap: 1.25rem; }
.facet {
  position: relative; display: flex; flex-direction: column; padding: 1.75rem 1.75rem 1.5rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  text-decoration: none; color: inherit; transition: transform .4s var(--ease), border-color .4s var(--ease), box-shadow .4s var(--ease);
}
.facet:hover { transform: translateY(-3px); border-color: var(--honey); box-shadow: 0 10px 30px -14px rgba(0,0,0,.45); color: inherit; }
.facet__num { font-family: var(--font-serif); font-size: 0.95rem; color: var(--eyebrow); letter-spacing: 0.1em; margin-bottom: 1rem; }
.facet h3 { margin-bottom: 0.4em; }
.facet p { color: var(--muted); flex: 1; }
.facet__more { font-weight: 700; color: var(--accent); }
@media (min-width: 48rem) { .facets { grid-template-columns: repeat(3, 1fr); } }

/* ---------- Values strip ---------- */
.values { background: var(--surface-2); border-block: 1px solid var(--line); }
.values ul { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem 1.75rem; margin: 0; padding: 1.25rem 0; font-family: var(--font-serif); font-size: 1.05rem; }
.values li + li::before { content: "◆"; font-size: 0.5em; margin-right: 1.75rem; vertical-align: 0.2em; color: var(--eyebrow); }
@media (max-width: 40rem) { .values li + li::before { display: none; } .values ul { gap: 0.4rem 1.25rem; } }

/* ---------- Latest ---------- */
.latest { display: grid; gap: 2.5rem; }
.latest__col h2 { font-size: 1.6rem; display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.latest__col h2 a { font-family: var(--font-sans); font-size: 0.95rem; font-weight: 700; }
.entry-list { list-style: none; padding: 0; margin: 0; }
.entry-list li { padding: 1rem 0; border-top: 1px solid var(--line); }
.entry-list li:last-child { border-bottom: 1px solid var(--line); }
.entry-list time { display: block; font-size: 0.85rem; color: var(--eyebrow); font-weight: 700; letter-spacing: 0.04em; }
.entry-list a { font-family: var(--font-serif); font-size: 1.2rem; color: var(--text); text-decoration: none; }
.entry-list a:hover { color: var(--accent); text-decoration: underline; }
.empty { color: var(--muted); font-style: italic; }
@media (min-width: 48rem) { .latest { grid-template-columns: 1fr 1fr; gap: 4rem; } }

/* ---------- Work with me band (dark in both themes) ---------- */
.band { position: relative; overflow: hidden; isolation: isolate; background: var(--band-bg); color: var(--apricot); }
.band .eyebrow { color: var(--honey); }
.band__grid { display: grid; gap: 2.5rem; align-items: center; }
.band h2 { color: var(--apricot); }
.band .lead { color: rgba(245,224,207,.85); }
.offers { list-style: none; padding: 0; margin: 1.75rem 0 2rem; display: grid; gap: 0.75rem; }
.offers li { display: flex; gap: 0.9rem; align-items: center; }
.offers strong { color: var(--apricot); }
.offers span { color: rgba(245,224,207,.7); }
.avatar { width: min(70%, 16rem); margin-inline: auto; position: relative; }
.avatar::before { content: ""; position: absolute; inset: 12% -8% 0 -8%; border-radius: 999px 999px 0 0; background: linear-gradient(to bottom, rgba(177,133,88,.42), rgba(177,133,88,.12) 55%, transparent 92%); z-index: -1; }
.avatar img { width: 100%; }
@media (min-width: 56rem) {
  .band__grid { grid-template-columns: 0.55fr 1fr; gap: 5rem; }
  .avatar { width: 100%; max-width: 19rem; }
}

/* ---------- Inner pages ---------- */
.page-hero { background: var(--hero-bg); color: var(--text); padding-block: clamp(3rem, 7vw, 5rem); position: relative; overflow: hidden; isolation: isolate; }
.page-hero h1 { font-size: clamp(2.25rem, 6vw, 3.5rem); margin-bottom: 0.3em; }
.page-hero .lead { color: var(--muted); margin-bottom: 0; }
.prose { max-width: 44rem; }
.prose h2 { margin-top: 2em; font-size: 1.75rem; }
.stub-note { border: 1px dashed var(--honey); background: var(--surface); border-radius: var(--radius); padding: 1.25rem 1.5rem; }
.stub-note p:last-child { margin: 0; }
.cards { display: grid; gap: 1rem; margin-top: 1.5rem; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem 1.5rem; }
.card h3 { font-size: 1.15rem; margin-bottom: 0.25em; }
.card p { margin: 0; color: var(--muted); }
.card small { display: block; color: var(--eyebrow); font-weight: 700; margin-bottom: 0.4rem; }
@media (min-width: 48rem) { .cards { grid-template-columns: 1fr 1fr; } }

/* ---------- Footer (dark in both themes) ---------- */
.site-footer { background: var(--footer-bg); color: rgba(245,224,207,.8); padding-top: 0; }
.site-footer a { color: var(--apricot); text-decoration: none; }
.site-footer a:hover { color: var(--honey); text-decoration: underline; }
.footer-grid { display: grid; gap: 2.5rem; padding-block: 3.5rem 2.5rem; }
.footer-brand img { width: 7.5rem; margin-bottom: 1rem; }
.footer-brand p { max-width: 20rem; font-family: var(--font-serif); font-style: italic; color: var(--peach); }
.footer-title { font-family: var(--font-sans); font-size: 0.8rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--honey); margin: 0 0 1rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.footer-affil { font-style: normal; display: grid; gap: 0.9rem; max-width: 24rem; font-size: 0.92rem; line-height: 1.5; }
.footer-affil__row { display: flex; gap: 0.7rem; align-items: flex-start; }
.footer-affil .ti { color: var(--honey); margin-top: 0.15rem; }
.footer-affil strong { color: var(--apricot); font-weight: 700; }
/* Social matrix: icons only, animated label on hover/focus */
.site-footer .social-grid { display: flex; flex-wrap: wrap; gap: 0.6rem; list-style: none; margin: 0; padding: 0; }
.social-nav { display: grid; gap: 1.1rem; }
.social-group__title { margin: 0 0 .55rem; font-family: var(--font-sans); font-size: .68rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--sand, #d8b99c); opacity: .75; }
.sr-only { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }
.social-grid a {
  position: relative; display: grid; place-items: center; width: 3.25rem; height: 3.25rem; border-radius: 1rem;
  border: 1px solid rgba(245,224,207,.2); background: rgba(245,224,207,.04); color: var(--apricot); text-decoration: none;
  transition: transform .5s var(--ease), background-color .4s var(--ease), border-color .4s var(--ease), color .4s var(--ease);
}
.social-grid .ti__svg { width: 1.45rem; height: 1.45rem; }
.social-grid a:hover, .social-grid a:focus-visible { transform: translateY(-4px); background: var(--honey); border-color: var(--honey); color: var(--obsidian); text-decoration: none; }
.social-grid a:focus-visible { outline: 2px solid var(--apricot); outline-offset: 3px; }
.social-grid a::after {
  content: attr(data-tip); position: absolute; left: 50%; top: calc(100% + 0.6rem); z-index: 5;
  transform: translate(-50%, -6px) scale(.85); transform-origin: 50% 0; opacity: 0; pointer-events: none; white-space: nowrap;
  padding: 0.35rem 0.7rem; border-radius: 0.5rem; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.02em;
  background: var(--apricot); color: var(--obsidian); box-shadow: 0 8px 20px -8px rgba(0,0,0,.7);
  transition: opacity .4s var(--ease), transform .5s var(--ease);
}
.social-grid a::before {
  content: ""; position: absolute; left: 50%; top: calc(100% + 0.25rem); z-index: 5; width: .6rem; height: .6rem;
  background: var(--apricot); transform: translate(-50%, -6px) rotate(45deg) scale(.5); opacity: 0; pointer-events: none;
  transition: opacity .4s var(--ease), transform .5s var(--ease);
}
.social-grid a:hover::after, .social-grid a:focus-visible::after { opacity: 1; transform: translate(-50%, 0) scale(1); }
.social-grid a:hover::before, .social-grid a:focus-visible::before { opacity: 1; transform: translate(-50%, 0) rotate(45deg) scale(1); }
.social-grid a:hover .ti, .social-grid a:focus-visible .ti { transform: none; }
.footer-base { border-top: 1px solid rgba(245,224,207,.16); padding-block: 1.25rem 1.75rem; font-size: 0.9rem; color: rgba(245,224,207,.6); }
.footer-base p { margin: 0; }
@media (min-width: 48rem) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; } }

/* ---------- Icons (Tabler, MIT) ---------- */
.ti { display: inline-grid; place-items: center; flex: none; line-height: 0; }
.ti__svg { width: 1.2em; height: 1.2em; display: block; }
.icon-link { display: inline-flex; align-items: center; gap: 0.5rem; }
.icon-link .ti { transition: transform .45s var(--ease); }
.icon-link:hover .ti { transform: translateY(-2px) scale(1.15); }

/* Theme toggle: icon swap + spin */
.theme-toggle { overflow: hidden; }
.theme-toggle .ti { grid-area: 1 / 1; transition: transform .7s var(--ease), opacity .45s var(--ease); }
.theme-toggle .ti__svg { width: 1.3rem; height: 1.3rem; }
.theme-toggle .icon--sun { transform: rotate(-90deg) scale(.4); opacity: 0; }
:root[data-theme="dark"] .theme-toggle .icon--sun { transform: none; opacity: 1; }
:root[data-theme="dark"] .theme-toggle .icon--moon { transform: rotate(90deg) scale(.4); opacity: 0; }
.theme-toggle:hover .ti { transform: rotate(18deg); }
:root[data-theme="dark"] .theme-toggle:hover .icon--sun { transform: rotate(45deg); }
.theme-toggle:active { transform: scale(.92); transition-duration: .12s; }

/* Buttons */
.btn { position: relative; }
.btn .ti { transition: transform .45s var(--ease); }
.btn:hover .ti--arrow-right { transform: translateX(5px); }
.btn:hover .ti--microscope, .btn:hover .ti--mail { transform: rotate(-12deg) scale(1.12); }
.btn:active { transform: scale(.97); transition-duration: .12s; }
.btn:focus-visible { outline: 3px solid var(--honey); outline-offset: 3px; }
.btn--primary { box-shadow: 0 6px 18px -8px rgba(177,133,88,.9); }
.btn--primary:hover { box-shadow: 0 12px 26px -10px rgba(177,133,88,1); }
.btn--pulse::after {
  content: ""; position: absolute; inset: -2px; border-radius: inherit; border: 2px solid var(--honey);
  opacity: 0; pointer-events: none; animation: btn-pulse 3.2s ease-out 1.6s infinite;
}
.btn--pulse:hover::after { animation: none; }
@keyframes btn-pulse { 0% { opacity: .7; transform: scale(1); } 70%, 100% { opacity: 0; transform: scale(1.18, 1.45); } }
.btn[data-magnetic] { transition: background-color .4s var(--ease), color .4s var(--ease), border-color .4s var(--ease), box-shadow .4s var(--ease); will-change: transform; }

/* Hero chips */
.hero__tags li {
  display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.4rem 0.85rem 0.4rem 0.7rem;
  border: 1px solid var(--line); border-radius: 999px; background: color-mix(in srgb, var(--surface) 70%, transparent);
  transition: transform .45s var(--ease), border-color .4s var(--ease), color .4s var(--ease);
}
.hero__tags li:hover { transform: translateY(-3px); border-color: var(--honey); color: var(--text); }
.hero__tags .ti { color: var(--honey); transition: transform .6s var(--ease); }
.hero__tags li:hover .ti { transform: rotate(-10deg) scale(1.2); }

/* Facet cards */
.facet { position: relative; overflow: hidden; isolation: isolate; }
.facet::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .5s var(--ease);
  background: radial-gradient(18rem circle at var(--mx, 50%) var(--my, 0%), color-mix(in srgb, var(--honey) 22%, transparent), transparent 70%);
}
.facet:hover::before, .facet:focus-visible::before { opacity: 1; }
.facet__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.25rem; }
.facet__icon {
  width: 3.25rem; height: 3.25rem; border-radius: 1rem; color: var(--accent);
  background: color-mix(in srgb, var(--honey) 16%, transparent); border: 1px solid color-mix(in srgb, var(--honey) 40%, transparent);
  transition: transform .6s var(--ease), background-color .45s var(--ease), color .45s var(--ease);
}
.facet__icon .ti__svg { width: 1.7rem; height: 1.7rem; }
.facet:hover .facet__icon { transform: rotate(-8deg) scale(1.08); background: var(--honey); color: var(--obsidian); }
.facet__num { margin-bottom: 0; }
.facet__more { display: inline-flex; align-items: center; gap: 0.4rem; }
.facet__more .ti { transition: transform .45s var(--ease); }
.facet:hover .facet__more .ti { transform: translateX(6px); }

/* Latest */
.latest__title { display: inline-flex; align-items: center; gap: 0.6rem; }
.latest__title .ti { color: var(--accent); }
.more-link { display: inline-flex; align-items: center; gap: 0.35rem; text-decoration: none; }
.more-link .ti { transition: transform .45s var(--ease); }
.more-link:hover .ti { transform: translateX(4px); }
.entry-list a { display: grid; grid-template-columns: 1fr auto; column-gap: 1rem; align-items: center; }
.entry-list time { grid-column: 1; }
.entry-list .entry-list__title { grid-column: 1; background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size .5s var(--ease); justify-self: start; }
.entry-list a:hover { text-decoration: none; }
.entry-list a:hover .entry-list__title { background-size: 100% 1px; }
.entry-list a > .ti { grid-column: 2; grid-row: 1 / span 2; opacity: 0; transform: translateX(-8px); transition: opacity .45s var(--ease), transform .45s var(--ease); color: var(--accent); }
.entry-list a:hover > .ti, .entry-list a:focus-visible > .ti { opacity: 1; transform: none; }

/* Offers (dark band) */
.offers li { transition: transform .45s var(--ease); }
.offers li:hover { transform: translateX(6px); }
.offers__icon {
  width: 2.5rem; height: 2.5rem; border-radius: 50%; color: var(--honey);
  border: 1px solid rgba(177,133,88,.5); background: rgba(177,133,88,.12);
  transition: background-color .45s var(--ease), color .45s var(--ease), transform .6s var(--ease);
}
.offers li:hover .offers__icon { background: var(--honey); color: var(--obsidian); transform: scale(1.1) rotate(-8deg); }
.offers li > span:last-child { display: block; }

/* Nav link underline */
.site-nav a:not(.btn) { background: linear-gradient(var(--honey), var(--honey)) 0 100% / 0 2px no-repeat; transition: background-size .5s var(--ease), color .4s var(--ease); }
.site-nav a:not(.btn):hover, .site-nav a[aria-current="page"] { background-size: 100% 2px; }

/* Scroll progress */
.site-header { position: sticky; }
.progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; pointer-events: none; }
.progress__bar { transition: transform .35s var(--ease); display: block; height: 100%; width: 100%; background: linear-gradient(90deg, var(--honey), var(--peach)); transform-origin: 0 50%; transform: scaleX(var(--progress, 0)); }

/* Back to top */
.to-top {
  position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 40; width: 3rem; height: 3rem; border-radius: 50%;
  display: grid; place-items: center; border: 0; cursor: pointer; background: var(--honey); color: var(--obsidian);
  box-shadow: 0 10px 24px -10px rgba(0,0,0,.6); opacity: 0; transform: translateY(1rem) scale(.8); pointer-events: none;
  transition: opacity .5s var(--ease), transform .6s var(--ease), background-color .4s var(--ease);
}
.to-top.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { background: var(--peach); }
.to-top:hover .ti { animation: nudge-up .6s ease-in-out infinite alternate; }
.to-top:focus-visible { outline: 3px solid var(--text); outline-offset: 3px; }
@keyframes nudge-up { to { transform: translateY(-3px); } }

/* Portrait parallax */

/* Values hover */
.values li { transition: color .45s var(--ease), transform .45s var(--ease); }
.values li:hover { transform: translateY(-2px); color: var(--accent); }

/* Scroll reveal */
.js [data-reveal] { opacity: 0; transform: translateY(1.25rem); transition: opacity 1s var(--ease), transform 1s var(--ease); transition-delay: var(--d, 0ms); }
.js [data-reveal].is-in { opacity: 1; transform: none; }
.js [data-reveal]:not(.is-in) { animation: reveal-failsafe .01s 3s forwards; }
@keyframes reveal-failsafe { to { opacity: 1; transform: none; } }
.facet[data-reveal].is-in { transition: opacity 1s var(--ease), transform .45s var(--ease), border-color .4s var(--ease), box-shadow .4s var(--ease); transition-delay: var(--d, 0ms), 0ms, 0ms, 0ms; }

/* ---------- 3D clay objects: depth + parallax (positions set by JS) ---------- */
.clay-host { position: relative; isolation: isolate; overflow: hidden; }
.clay-host > .wrap { position: relative; z-index: 1; }
.clay-layer { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.clay {
  position: absolute; left: var(--x); top: var(--y); width: var(--s); aspect-ratio: 1; will-change: transform;
  transform: translate3d(var(--tx, 0px), var(--ty, 0px), 0) perspective(700px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) rotate(var(--r, 0deg)) scale(var(--sc, 1));
  animation: clay-in 1.2s var(--ease) both; animation-delay: var(--in, 200ms);
}
.clay:nth-child(2) { --in: 350ms; --dur: 11s; --delay: -3s; }
.clay:nth-child(3) { --in: 500ms; --dur: 8s; --delay: -5s; }
.clay:nth-child(4) { --in: 650ms; --dur: 12s; --delay: -7s; }
.clay-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.clay-gl .clay { visibility: hidden; animation: none; }
.clay__float { display: block; animation: clay-float var(--dur, 9s) ease-in-out var(--delay, 0s) infinite alternate; }
.clay img { display: block; width: 100%; height: auto; filter: drop-shadow(calc(var(--sx, 0) * 1px) calc(var(--sy, 12) * 1.3px) 14px rgba(70,42,16,.24)); }
:root[data-theme="dark"] .clay img { filter: drop-shadow(calc(var(--sx, 0) * 1px) calc(var(--sy, 12) * 1.3px) 16px rgba(0,0,0,.55)) brightness(.92); }
.band .clay img { filter: drop-shadow(0 16px 18px rgba(0,0,0,.6)) brightness(.95); }
@keyframes clay-in { from { opacity: 0; scale: .5; } to { opacity: 1; scale: 1; } }
@keyframes clay-float { from { transform: translateY(-9px) rotate(-2deg); } to { transform: translateY(9px) rotate(2deg); } }
@media (max-width: 47.99rem) {
  .clay--lg { opacity: .55; }
  .clay--md { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
}

/* ---------- Research & publications ---------- */
.prose--wide { max-width: none; }
.research > section + section { margin-top: clamp(2.5rem, 6vw, 4rem); }
.research h2 { margin-top: 0; }
.research__count { font-family: var(--font-sans, inherit); font-size: .85rem; font-weight: 700; color: var(--eyebrow); letter-spacing: .06em; text-transform: uppercase; margin-left: .5rem; }
.research__links { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.25rem; }
.chips { list-style: none; padding: 0; margin: 1rem 0 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.chip { padding: .3rem .8rem; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: .9rem; color: var(--muted); transition: border-color .4s var(--ease), color .4s var(--ease), transform .4s var(--ease); }
.chip:hover { border-color: var(--honey); color: var(--text); transform: translateY(-1px); }

.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1.25rem 0 2rem; }
.filter { display: inline-flex; align-items: center; gap: .4rem; padding: .45rem .9rem; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--text); font: inherit; font-size: .92rem; font-weight: 600; cursor: pointer; transition: background .4s var(--ease), border-color .4s var(--ease), color .4s var(--ease), transform .3s var(--ease); }
.filter span { font-size: .78rem; opacity: .7; }
.filter:hover { border-color: var(--honey); transform: translateY(-1px); }
.filter.is-on { background: var(--honey); border-color: var(--honey); color: var(--obsidian); }
.filter:focus-visible { outline: 3px solid var(--honey); outline-offset: 2px; }
.js .pubgroup[hidden] { display: none; }

.pubgroup + .pubgroup { margin-top: 2.5rem; }
.pubgroup__title { display: flex; align-items: center; gap: .55rem; font-size: 1.2rem; padding-bottom: .6rem; border-bottom: 1px solid var(--line); margin: 0 0 1rem; }
.pubgroup__title .ti { color: var(--accent); }
.publist { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; }
.pub { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem 1.5rem; transition: transform .5s var(--ease), border-color .5s var(--ease), box-shadow .5s var(--ease); }
.pub:hover { transform: translateY(-3px); border-color: var(--honey); box-shadow: 0 10px 30px -16px rgba(0,0,0,.45); }
.pub__when { margin: 0 0 .35rem; font-size: .8rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--eyebrow); }
.pub__title { font-size: 1.15rem; line-height: 1.35; margin: 0 0 .5rem; }
.pub__title a { color: var(--text); text-decoration: none; background: linear-gradient(var(--honey), var(--honey)) 0 100% / 0 2px no-repeat; transition: background-size .5s var(--ease); }
.pub:hover .pub__title a { background-size: 100% 2px; }
.pub__authors { margin: 0 0 .25rem; color: var(--muted); }
.pub__me { color: var(--text); }
.pub__venue { margin: 0; color: var(--muted); font-size: .95rem; }
.pub__actions { display: flex; flex-wrap: wrap; gap: .5rem; margin: .9rem 0 0; }
.pub__btn { display: inline-flex; align-items: center; gap: .35rem; padding: .3rem .75rem; border: 1px solid var(--line); border-radius: 999px; font-size: .85rem; font-weight: 700; color: var(--accent); text-decoration: none; transition: background .4s var(--ease), color .4s var(--ease), border-color .4s var(--ease); }
.pub__btn:hover { background: var(--honey); border-color: var(--honey); color: var(--obsidian); }
.pub__btn .ti { width: 1em; height: 1em; }
.research__cta { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.5rem, 4vw, 2.25rem); }
.research__cta p { max-width: 36rem; }

/* single publication page */
.backlink { display: inline-flex; align-items: center; gap: .4rem; font-weight: 700; color: var(--accent); text-decoration: none; margin-bottom: 1rem; }
.backlink .ti { transition: transform .45s var(--ease); }
.backlink:hover .ti { transform: translateX(-4px); }
.pubpage .eyebrow { display: flex; align-items: center; gap: .45rem; }
.pubpage .page-hero h1 { max-width: 48rem; font-size: clamp(1.75rem, 4.6vw, 2.75rem); }
.pubpage .page-hero .pub__authors { font-size: 1.1rem; color: var(--text); margin-bottom: .4rem; }
.pubpage .page-hero .pub__venue { font-size: 1rem; max-width: 46rem; }
.pubpage__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2.5rem; }
.pubpage__grid > * { min-width: 0; }
@media (min-width: 56rem) { .pubpage__grid { grid-template-columns: minmax(0, 1fr) 17rem; gap: 3.5rem; } .pubpage__side { position: sticky; top: 6rem; align-self: start; } }
.pubpage__side h2 { font-size: 1.1rem; margin-top: 0; }
.linklist { list-style: none; padding: 0; margin: 0 0 1.5rem; display: grid; gap: .6rem; }
.linklist .btn { width: 100%; justify-content: flex-start; overflow-wrap: anywhere; }
.facts { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: .4rem 1rem; font-size: .92rem; }
.facts dt { font-weight: 800; color: var(--eyebrow); }
.facts dd { margin: 0; color: var(--muted); }
.pub__muted { color: var(--muted); margin-top: 1.25rem; }
.pub__note { display: flex; gap: .6rem; align-items: flex-start; padding: .9rem 1.1rem; border: 1px dashed var(--honey); border-radius: var(--radius); background: var(--surface); }
.pub__note .ti { flex: none; margin-top: .15em; color: var(--accent); }
.bib { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.bib__bar { display: flex; align-items: center; justify-content: space-between; padding: .5rem .75rem .5rem 1rem; border-bottom: 1px solid var(--line); font-weight: 800; font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; color: var(--eyebrow); }
.bib pre { margin: 0; padding: 1rem; overflow-x: auto; font-size: .85rem; line-height: 1.55; }
.bib__i2 { display: none; }
.bib [data-copy].is-done .bib__i1 { display: none; }
.bib [data-copy].is-done .bib__i2 { display: inline-flex; }


/* ---------- Global light: one source lights every card, button and shadow ---------- */
:root { --sx: 0; --sy: 12; }
.lit { --la: 0; --lx: 50%; --ly: -20%; }
/* soft key-light sheen, brightest on the edge facing the light and fading with distance from it */
.facet.lit, .pub.lit, .research__cta.lit, .card.lit, .offers li.lit, .values li.lit {
  background-image: radial-gradient(130% 150% at var(--lx) var(--ly), light-dark(rgba(255, 248, 238, calc(var(--la) * .75)), rgba(245, 205, 160, calc(var(--la) * .13))), transparent 64%);
}
.btn--primary.lit { background-image: radial-gradient(120% 220% at var(--lx) var(--ly), rgba(255, 244, 226, calc(.18 + var(--la) * .5)), transparent 70%); }
.btn--dark.lit { background-image: radial-gradient(120% 220% at var(--lx) var(--ly), rgba(255, 224, 190, calc(var(--la) * .22)), transparent 70%); }
.social-grid a.lit { background-image: radial-gradient(120% 120% at var(--lx) var(--ly), rgba(245, 205, 160, calc(var(--la) * .16)), transparent 70%); }
/* cast shadows lean away from the light */
.pub, .facet, .research__cta { box-shadow: calc(var(--sx) * .35px) calc(var(--sy) * .5px) 18px -14px rgba(60, 35, 10, .38); }
.facet:hover, .pub:hover { box-shadow: calc(var(--sx) * .9px) calc(var(--sy) * 1.6px) 30px -14px rgba(0, 0, 0, .5); }
.btn--primary { box-shadow: calc(var(--sx) * .35px) calc(var(--sy) * .7px) 18px -8px rgba(120, 78, 36, .85); }
.btn--primary:hover { box-shadow: calc(var(--sx) * .6px) calc(var(--sy) * 1.2px) 26px -10px rgba(120, 78, 36, .95); }
[data-parallax], [data-mouse] { will-change: translate; }


/* ---------- Portrait: a small solar system. Photo = sun, roles = planets on tilted orbits ---------- */
.portrait { position: relative; width: min(100%, 40rem); aspect-ratio: 1; margin-inline: auto; isolation: isolate; container-type: inline-size; --ty: 0px; }
.portrait__corona { position: absolute; z-index: 0; left: 50%; top: 50%; width: 62%; aspect-ratio: 1; translate: -50% -50%; pointer-events: none; }
.portrait__corona::before { /* warm glow */
  content: ""; position: absolute; inset: -34%; border-radius: 50%;
  background: radial-gradient(closest-side, light-dark(rgba(255,226,186,.95), rgba(216,150,80,.38)) 0%, light-dark(rgba(240,200,160,.45), rgba(177,133,88,.16)) 55%, transparent 100%);
  animation: corona 7s ease-in-out infinite alternate;
}
.portrait__corona i { position: absolute; inset: 0; border-radius: 50%; border: 1.5px solid light-dark(rgba(177,133,88,.5), rgba(216,185,156,.4)); opacity: 0; animation: pulse 6.5s cubic-bezier(.2,.6,.3,1) infinite; }
.portrait__corona i:nth-child(2) { animation-delay: -3.25s; }
@keyframes corona { from { transform: scale(.94); opacity: .85; } to { transform: scale(1.06); opacity: 1; } }
@keyframes pulse { 0% { transform: scale(.98); opacity: 0; } 15% { opacity: .8; } 100% { transform: scale(1.55); opacity: 0; } }

.orbits { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; fill: none; }
.orbits--back { z-index: 1; } .orbits--front { z-index: 3; }
.orbits path { stroke: light-dark(rgba(122,84,41,.34), rgba(216,185,156,.3)); stroke-width: .28; stroke-linecap: round; vector-effect: non-scaling-stroke; stroke-width: 1.2px; stroke-dasharray: 2 7; }
.orbits--front path { stroke: light-dark(rgba(122,84,41,.6), rgba(216,185,156,.5)); stroke-dasharray: none; stroke-width: 1.4px; }

.portrait__frame {
  position: absolute; z-index: 2; left: 27%; top: 27%; width: 46%; aspect-ratio: 1; border-radius: 50%; padding: 0.4rem;
  background: light-dark(#fbf3ea, #1d1915); border: 1.5px solid var(--honey);
  box-shadow: calc(var(--sx) * .3px) calc(var(--sy) * .4px) 6px -2px rgba(60,35,10,.35), calc(var(--sx) * 1px) calc(var(--sy) * 1.8px) 40px -10px rgba(60,35,10,.65), 0 0 0 clamp(.35rem, 1.6cqw, .6rem) light-dark(rgba(245,224,207,.55), rgba(177,133,88,.14)), inset 0 1.5px 0 rgba(255,255,255,.55);
}
.portrait__window { position: relative; overflow: hidden; border-radius: 50%; width: 100%; height: 100%; background: #8a7867; }
.portrait__window::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(235,211,190,.30), rgba(177,133,88,.42)); mix-blend-mode: soft-light; }
.portrait__window::before { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; border-radius: 50%; background: radial-gradient(90% 70% at calc(50% + var(--sx) * -2%) 0%, rgba(255,240,222,.26), transparent 70%); box-shadow: inset 0 0 0 1px rgba(255,255,255,.18), inset 0 -16px 28px -16px rgba(40,22,6,.5); }
.portrait__window picture { display: block; height: 100%; transform: translate3d(0, var(--ty), 0); transition: transform .3s var(--ease); }
.portrait__window img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 10%; transform: scale(1.06); filter: saturate(.92) contrast(1.02); }
:root[data-theme="dark"] .portrait__window img { filter: saturate(.9) contrast(1.02) brightness(.9); }

.planets { list-style: none; margin: 0; padding: 0; position: absolute; inset: 0; pointer-events: none; } /* no z-index: each planet sorts itself against the photo */
.planet { position: absolute; left: 0; top: 0; will-change: transform; }
.planet__pill {
  position: relative; display: inline-flex; align-items: center; gap: .4em; padding: .42em .8em; border-radius: 999px; pointer-events: auto; cursor: default;
  font-size: clamp(.62rem, 2.35cqw, .84rem); font-weight: 700; letter-spacing: .01em; line-height: 1.15; white-space: nowrap; color: var(--text);
  background-color: light-dark(rgba(251,243,234,.92), rgba(29,25,21,.88)); border: 1px solid var(--line);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  --d: .5; --pa: .4; --px: 50%; --py: -30%; --shx: 0; --shy: 6;
  background-image: radial-gradient(150% 220% at var(--px) var(--py), light-dark(rgba(255,250,242,calc(var(--pa) * .9)), rgba(245,205,160,calc(var(--pa) * .22))), transparent 70%);
  filter: brightness(calc(.8 + var(--d) * .2)) saturate(calc(.75 + var(--d) * .25)) blur(calc((1 - var(--d)) * .7px));
  box-shadow: calc(var(--shx) * 1px) calc(var(--shy) * 1px) calc(8px + var(--d) * 12px) -6px rgba(60,35,10,.65), inset 0 1px 0 light-dark(rgba(255,255,255,.55), rgba(255,235,210,.1));
  transition: border-color .5s var(--ease), background-color .5s var(--ease);
}
.planet__pill { transition: transform .6s var(--ease), border-color .5s var(--ease), background-color .5s var(--ease); }
.planet__pill .ti__svg { width: 1.2em; height: 1.2em; flex: none; color: var(--accent); }
.planet__pill:hover, .planet.is-hot .planet__pill { transform: scale(1.12); border-color: var(--honey); box-shadow: 0 0 0 4px light-dark(rgba(177,133,88,.18), rgba(216,185,156,.12)), calc(var(--sx) * .6px) calc(var(--sy) * 1px) 22px -6px rgba(60,35,10,.7); }
/* without JS: a tidy row under the photo */
.portrait:not(.is-orbit) { aspect-ratio: auto; padding-bottom: 0; }
.portrait:not(.is-orbit) .portrait__frame { position: relative; left: auto; top: auto; width: 62%; margin: 0 auto 1.25rem; }
.portrait:not(.is-orbit) .orbits, .portrait:not(.is-orbit) .portrait__corona { display: none; }
.portrait:not(.is-orbit) .planets { position: static; display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; }
.portrait:not(.is-orbit) .planet { position: static; }
@media (prefers-reduced-motion: reduce) { .portrait__corona::before, .portrait__corona i { animation: none; } .portrait__corona i { opacity: .35; } }

/* starfield: two layers of tiny dots twinkling out of phase */
.portrait { --star: light-dark(rgba(177,133,88,.8), rgba(245,224,207,.85)); }
.portrait__stars { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.portrait__stars::before, .portrait__stars::after { content: ""; position: absolute; left: 0; top: 0; width: 1.5px; height: 1.5px; border-radius: 50%; animation: twinkle 4.5s ease-in-out infinite alternate; }
.portrait__stars::before { box-shadow: 43cqw 21cqw 0 0px var(--star) ,85cqw 8cqw 0 0px var(--star) ,70cqw 14cqw 0 0px var(--star) ,76cqw 9cqw 0 0.5px var(--star) ,29cqw 6cqw 0 0px var(--star) ,57cqw 55cqw 0 0px var(--star) ,32cqw 13cqw 0 0.5px var(--star) ,56cqw 9cqw 0 0.5px var(--star) ,17cqw 30cqw 0 0.5px var(--star) ,82cqw 76cqw 0 0px var(--star) ,75cqw 76cqw 0 0px var(--star) ,8cqw 30cqw 0 0px var(--star) ,73cqw 19cqw 0 0px var(--star) ,55cqw 20cqw 0 0.5px var(--star) ,17cqw 75cqw 0 0px var(--star) ,73cqw 89cqw 0 0px var(--star) ,15cqw 76cqw 0 0.5px var(--star) ,83cqw 26cqw 0 0px var(--star) ,14cqw 72cqw 0 0.5px var(--star) ,10cqw 74cqw 0 0px var(--star) ,81cqw 28cqw 0 0px var(--star) ,89cqw 70cqw 0 0px var(--star); }
.portrait__stars::after { box-shadow: 42cqw 61cqw 0 0.5px var(--star) ,60cqw 48cqw 0 0.5px var(--star) ,33cqw 25cqw 0 0.5px var(--star) ,33cqw 12cqw 0 0.5px var(--star) ,40cqw 69cqw 0 0.5px var(--star) ,45cqw 95cqw 0 0.5px var(--star) ,38cqw 79cqw 0 0px var(--star) ,17cqw 67cqw 0 0.5px var(--star) ,23cqw 98cqw 0 0.5px var(--star) ,21cqw 64cqw 0 0.5px var(--star) ,7cqw 87cqw 0 0px var(--star) ,73cqw 75cqw 0 0.5px var(--star) ,45cqw 90cqw 0 0.5px var(--star) ,78cqw 65cqw 0 0.5px var(--star) ,60cqw 10cqw 0 0px var(--star) ,36cqw 62cqw 0 0.5px var(--star); animation-delay: -2.2s; animation-duration: 6s; }
@keyframes twinkle { from { opacity: .15; } to { opacity: .95; } }
@media (prefers-reduced-motion: reduce) { .portrait__stars::before, .portrait__stars::after { animation: none; opacity: .5; } }

@media (min-width: 56rem) { .portrait { margin-inline: 0 -10%; justify-self: end; width: min(128%, 40rem); } }
@media (max-width: 55.99rem) { .portrait { width: min(112%, 30rem); margin-inline: -6%; } }

/* ---------- Research hub: sub-navigation, status ripple, project and call cards ---------- */

.status { --c: light-dark(#1f8a4c, #4cc27f); display: inline-flex; align-items: center; gap: .55rem; padding: .28rem .8rem .28rem .65rem; border-radius: 999px; font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; line-height: 1.2; color: var(--c); border: 1px solid color-mix(in srgb, var(--c) 40%, transparent); background: color-mix(in srgb, var(--c) 12%, transparent); }
.status--ended { --c: light-dark(#c0392b, #ef6b5f); }
.status__dot { position: relative; width: .55rem; height: .55rem; border-radius: 50%; background: var(--c); flex: none; }
.status__dot::before, .status__dot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 1.5px solid var(--c); opacity: 0; animation: ripple 2.6s cubic-bezier(.2,.6,.3,1) infinite; }
.status__dot::after { animation-delay: 1.3s; }
.status--ended .status__dot::before, .status--ended .status__dot::after { animation-duration: 3.8s; }
.status--ended .status__dot::after { animation-delay: 1.9s; }
@keyframes ripple { 0% { transform: scale(1); opacity: .85; } 100% { transform: scale(3.4); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .status__dot::before, .status__dot::after { animation-name: ripple-soft; } }
@keyframes ripple-soft { 0%, 100% { transform: scale(2); opacity: 0; } 50% { transform: scale(2); opacity: .55; } }
.legend { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; margin: 0 0 2rem; color: var(--muted); font-size: .95rem; }
.legend span:not(.status) { margin-right: .75rem; }
.projectpage__status { margin: .25rem 0 1rem; }

.rgrid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 22rem), 1fr)); }
.rcard { display: flex; flex-direction: column; gap: .7rem; padding: 1.35rem 1.5rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); transition: transform .5s var(--ease), border-color .4s var(--ease), box-shadow .5s var(--ease); }
.rcard:hover { transform: translateY(-4px); border-color: var(--honey); box-shadow: calc(var(--sx) * .5px) calc(var(--sy) * 1px) 28px -14px rgba(60,35,10,.55); }
.rcard.is-closed { opacity: .82; }
.rcard__top { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; }
.rcard__meta { font-size: .85rem; color: var(--muted); }
.rcard__title { font-size: 1.25rem; line-height: 1.3; margin: 0; }
.rcard__title a { color: var(--text); text-decoration: none; }
.rcard__title a:hover { color: var(--accent); }
.rcard__text { margin: 0; color: var(--muted); }
.rcard .chips { margin: 0; }
.chips--sm .chip { font-size: .8rem; padding: .2rem .65rem; }
.rcard__foot { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin: auto 0 0; padding-top: .8rem; border-top: 1px solid var(--line); font-size: .9rem; color: var(--muted); }
.rcard__foot > span { display: inline-flex; align-items: center; gap: .4rem; }
.calltype { display: inline-flex; align-items: center; gap: .4rem; font-size: .78rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--eyebrow); }

.hubgrid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); margin-top: 1.25rem; }
.hubcard { display: flex; flex-direction: column; gap: .5rem; padding: 1.5rem; border: 1px solid var(--line); border-radius: var(--radius); background-color: var(--surface); color: var(--text); text-decoration: none; transition: transform .5s var(--ease), border-color .4s var(--ease); }
.hubcard:hover { transform: translateY(-5px); border-color: var(--honey); color: var(--text); }
.hubcard > .ti { color: var(--accent); }
.hubcard > .ti .ti__svg { width: 1.9rem; height: 1.9rem; }
.hubcard h3 { margin: .2rem 0 0; font-size: 1.3rem; }
.hubcard p { margin: 0; color: var(--muted); }
.hubcard__count { margin-top: auto; padding-top: .6rem; font-size: .9rem; color: var(--eyebrow); font-weight: 700; }
.hubcard__count b { font-size: 1.15rem; }
.hubcard.lit { background-image: radial-gradient(130% 150% at var(--lx) var(--ly), light-dark(rgba(255,248,238,calc(var(--la) * .75)), rgba(245,205,160,calc(var(--la) * .13))), transparent 64%); }

.minipubs { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; gap: .25rem; }
.minipub { display: grid; gap: .1rem; padding: .75rem 0; border-top: 1px solid var(--line); }
.minipub:last-child { border-bottom: 1px solid var(--line); }
.minipub a { font-weight: 700; color: var(--text); text-decoration: none; }
.minipub a:hover { color: var(--accent); }
.minipub span { font-size: .9rem; color: var(--muted); }
.rempty { color: var(--muted); }
.rempty--card { display: flex; gap: 1.1rem; align-items: flex-start; padding: 1.5rem; border: 1px dashed var(--line); border-radius: var(--radius); background: var(--surface); }
.rempty--card > .ti { color: var(--accent); margin-top: .2rem; }
.rempty--card h3 { margin: 0 0 .3rem; }
.rempty--card p { margin: 0 0 .8rem; max-width: 40rem; }

/* ---------- Research pages: no hero, intro line, tidier spacing, ledger, profiles, call to action ---------- */
.section--research { padding-top: clamp(1.75rem, 4vw, 3rem); }
.research__intro { margin: 0 0 1.75rem; font-size: 1.1rem; color: var(--muted); max-width: 40rem; }
.research .minipubs + .more, .research .more { margin-top: 1.75rem; }
.minipubs + p { margin-top: 1.75rem; }

.profiles__lead { margin: 0 0 .9rem; color: var(--muted); }
.profiles { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem 1.6rem; }
.profiles a { display: inline-flex; align-items: center; gap: .5rem; font-weight: 700; color: var(--accent); text-decoration: none; border-bottom: 1.5px solid transparent; padding-block: .2rem; transition: border-color .4s var(--ease), color .4s var(--ease); }
.profiles a:hover, .profiles a:focus-visible { color: var(--text); border-color: var(--honey); }

.ledger { list-style: none; margin: 1.25rem 0 0; padding: 0; display: grid; gap: 0; border-top: 1px solid var(--line); }
.ledger__row { display: grid; grid-template-columns: 3.4rem 1fr; gap: 1.1rem; padding: 1.4rem 0; border-bottom: 1px solid var(--line); }
.ledger__mark { display: grid; place-items: center; width: 3.4rem; height: 3.4rem; border-radius: 50%; background: var(--honey); color: #101010; font: 700 1.5rem var(--font-serif); box-shadow: calc(var(--sx) * .4px) calc(var(--sy) * .5px) 14px -6px rgba(60,35,10,.6); }
.ledger__name { margin: 0; font-size: 1.3rem; }
.ledger__role { margin: .15rem 0 .5rem; font-size: .85rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--eyebrow); }
.ledger__note { margin: 0 0 .6rem; color: var(--muted); }
.ledger__works { list-style: none; margin: 0; padding: 0; display: grid; gap: .3rem; font-size: .92rem; }
.ledger__works li { position: relative; padding-left: 1.1rem; }
.ledger__works li::before { content: ""; position: absolute; left: 0; top: .6em; width: .45rem; height: 1.5px; background: var(--honey); }
.ledger__works a { color: var(--accent); }

/* call to action: a dark band with a warm glow, clay shapes and clear choices */
.research .cta, .cta { position: relative; isolation: isolate; overflow: hidden; margin-top: clamp(2.5rem, 6vw, 4rem); padding: clamp(1.75rem, 5vw, 3.25rem); border-radius: calc(var(--radius) * 1.5); color: var(--apricot); background: radial-gradient(90% 140% at 100% 0%, rgba(177,133,88,.42), transparent 60%), radial-gradient(60% 90% at 0% 100%, rgba(216,185,156,.14), transparent 70%), var(--band-bg); border: 1px solid rgba(216,185,156,.22); box-shadow: calc(var(--sx) * 1px) calc(var(--sy) * 1.6px) 48px -18px rgba(60,35,10,.7); }
.cta__body { position: relative; z-index: 1; max-width: 36rem; }
.cta__eyebrow { margin: 0 0 .6rem; font-size: .78rem; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; color: var(--peach); }
.cta h2 { margin: 0 0 .6rem; font-size: clamp(1.9rem, 4.6vw, 2.9rem); line-height: 1.12; color: #fbf3ea; }
.cta__text { margin: 0 0 1.3rem; font-size: 1.1rem; color: rgba(245,224,207,.86); }
.cta__ways { list-style: none; margin: 0 0 1.8rem; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.cta__ways li { display: inline-flex; align-items: center; gap: .45rem; padding: .35rem .85rem; border: 1px solid rgba(216,185,156,.3); border-radius: 999px; font-size: .9rem; color: var(--apricot); background: rgba(245,224,207,.05); }
.cta__ways .ti__svg { width: 1.05em; height: 1.05em; color: var(--peach); }
.cta__actions { display: flex; flex-wrap: wrap; gap: .8rem; margin: 0; }
.cta__ghost { color: var(--apricot); border-color: rgba(216,185,156,.55); }
.cta__ghost:hover { color: #101010; background: var(--apricot); border-color: var(--apricot); }
.cta .clay-layer { z-index: 0; }
@media (max-width: 40rem) { .ledger__row { grid-template-columns: 2.6rem 1fr; gap: .8rem; } .ledger__mark { width: 2.6rem; height: 2.6rem; font-size: 1.15rem; } }

/* ---------- Round logos, avatars, role badges, timeline, notices ---------- */
.org { display: inline-flex; align-items: center; gap: .6rem; vertical-align: middle; }
.org__logo { position: relative; display: grid; place-items: center; flex: none; width: 2.6rem; height: 2.6rem; border-radius: 50%; overflow: hidden; background: #fff; border: 1.5px solid color-mix(in srgb, var(--honey) 55%, transparent); box-shadow: 0 2px 8px -3px rgba(60,35,10,.4); }
.org__logo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 0; background: #fff; border-radius: 50%; }
.org__mark { font: 800 .62rem var(--font-sans); letter-spacing: .04em; color: #7a5429; }
.org--sm .org__logo { width: 2rem; height: 2rem; }
.org--sm .org__mark { font-size: .52rem; }
.org__name { font-size: .92rem; color: var(--muted); line-height: 1.3; }
.facts .org, .footer-affil__row .org { display: inline-flex; }
.facts__lab { margin-left: .5rem; }
.footer-affil__row .org__logo { margin-top: .1rem; }

.avatar { position: relative; display: grid; place-items: center; flex: none; border-radius: 50%; overflow: hidden; background: var(--honey); color: #101010; box-shadow: calc(var(--sx) * .4px) calc(var(--sy) * .5px) 16px -6px rgba(60,35,10,.65); border: 2px solid light-dark(#fbf3ea, #1d1915); outline: 1.5px solid color-mix(in srgb, var(--honey) 70%, transparent); }
.avatar--lg { width: 4.6rem; height: 4.6rem; }
.avatar__mark { font: 700 1.7rem var(--font-serif); }
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

.rolebadge { display: inline-flex; align-items: center; gap: .4rem; padding: .28rem .8rem; border-radius: 999px; font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; line-height: 1.2; background: var(--honey); color: #101010; border: 1px solid var(--honey); }
.rolebadge--co-supervised { background: transparent; color: var(--eyebrow); border-color: color-mix(in srgb, var(--honey) 70%, transparent); }
.rolebadge .ti__svg { width: 1.05em; height: 1.05em; }
.supvpage__meta { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem 1.2rem; margin: .6rem 0 1.1rem; }
.supvpage__meta .org__name { color: var(--text); }
.people { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: .5rem; }
.people li { display: grid; font-weight: 700; }
.people small { font-weight: 400; color: var(--muted); }
.refs { padding-left: 1.2rem; display: grid; gap: .6rem; font-size: .95rem; color: var(--muted); }

.timeline { list-style: none; margin: 1.5rem 0 0; padding: 0; position: relative; display: grid; gap: 1.5rem; }
.timeline::before { content: ""; position: absolute; left: 6.6rem; top: .6rem; bottom: .6rem; width: 2px; background: linear-gradient(var(--honey), transparent); opacity: .5; }
.timeline__item { display: grid; grid-template-columns: 5.6rem 1fr; gap: 2.2rem; position: relative; }
.timeline__when { margin: .35rem 0 0; font-weight: 800; font-size: .85rem; letter-spacing: .02em; white-space: nowrap; color: var(--eyebrow); text-align: right; position: relative; }
.timeline__when::after { content: ""; position: absolute; right: -1.4rem; top: .3rem; width: .7rem; height: .7rem; border-radius: 50%; background: var(--honey); box-shadow: 0 0 0 4px var(--bg), 0 0 0 5.5px color-mix(in srgb, var(--honey) 45%, transparent); }
.timeline__students { display: flex; align-items: flex-start; gap: .5rem; margin: 0; font-size: .92rem; color: var(--muted); }
.timeline__students .ti__svg { width: 1.1em; height: 1.1em; margin-top: .2em; }
.timeline .rcard__foot { align-items: center; }
@media (max-width: 40rem) { .timeline::before { left: .35rem; } .timeline__item { grid-template-columns: 1fr; gap: .4rem; padding-left: 1.6rem; } .timeline__when { text-align: left; } .timeline__when::after { right: auto; left: -1.6rem; top: .3rem; } }

.notice { display: flex; gap: 1.1rem; align-items: flex-start; margin-top: clamp(2rem, 5vw, 3rem); padding: 1.5rem; border-radius: var(--radius); border: 1px solid color-mix(in srgb, var(--honey) 55%, transparent); background: linear-gradient(135deg, color-mix(in srgb, var(--honey) 16%, var(--surface)), var(--surface)); }
.notice > .ti { color: var(--accent); margin-top: .2rem; }
.notice > .ti .ti__svg { width: 1.8rem; height: 1.8rem; }
.notice h2 { margin: 0 0 .3rem; font-size: 1.3rem; }
.notice p { margin: 0 0 .9rem; color: var(--muted); max-width: 38rem; }
.notice p:last-child { margin-bottom: 0; }

.ledger__row { grid-template-columns: 4.6rem 1fr; gap: 1.3rem; }
.ledger__org { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .7rem; margin: 0 0 .6rem; }
.ledger__aff { font-size: .88rem; color: var(--muted); }
.ledger__mark { display: none; }

/* subnav: Calls stands apart */

/* Where to start: big tilted background icon, arrow chip, hover micro-interactions */
.hubcard { position: relative; overflow: hidden; isolation: isolate; }
.hubcard > .ti { display: none; }
.hubcard__bg { position: absolute; z-index: -1; right: -1.2rem; bottom: -1.6rem; width: 8.5rem; height: 8.5rem; color: var(--honey); opacity: .14; transform: rotate(-14deg); transform-origin: 60% 60%; transition: transform .8s var(--ease), opacity .6s var(--ease); pointer-events: none; }
.hubcard__bg .ti, .hubcard__bg .ti__svg { width: 100%; height: 100%; stroke-width: 1.1; }
.hubcard:hover .hubcard__bg, .hubcard:focus-visible .hubcard__bg { transform: rotate(-4deg) scale(1.16) translate(-.7rem, -.5rem); opacity: .26; }
.hubcard h3 { position: relative; display: inline-block; align-self: flex-start; background: linear-gradient(var(--honey), var(--honey)) 0 100% / 0 2px no-repeat; transition: background-size .6s var(--ease); padding-bottom: .15rem; }
.hubcard:hover h3, .hubcard:focus-visible h3 { background-size: 100% 2px; }
.hubcard__go { position: absolute; top: 1.2rem; right: 1.2rem; display: grid; place-items: center; width: 2.2rem; height: 2.2rem; border-radius: 50%; background: var(--honey); color: #101010; opacity: 0; transform: translate(-8px, 8px) scale(.7) rotate(-45deg); transition: opacity .45s var(--ease), transform .6s var(--ease); }
.hubcard__go .ti__svg { width: 1.1rem; height: 1.1rem; }
.hubcard:hover .hubcard__go, .hubcard:focus-visible .hubcard__go { opacity: 1; transform: none; }
.hubcard__count { transition: transform .5s var(--ease); }
.hubcard:hover .hubcard__count { transform: translateX(.35rem); }
.hubcard p { max-width: 18rem; }
.hubcard--calls { flex-direction: row; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem 2rem; margin-top: 1.25rem; padding: 1.4rem 1.75rem; border-style: dashed; border-color: color-mix(in srgb, var(--honey) 70%, transparent); background-color: color-mix(in srgb, var(--honey) 10%, var(--surface)); }
.hubcard--calls h3 { margin: 0 0 .2rem; }
.hubcard--calls p { max-width: 32rem; }
.hubcard--calls .hubcard__count { margin: 0; padding: 0; margin-right: 2.6rem; }
.hubcard--calls .hubcard__bg { right: 3rem; bottom: -2.2rem; width: 7rem; height: 7rem; }

.hubgrid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr)); }
@media (min-width: 44rem) { .hubgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.facts dd .org { align-items: center; }
.facts dd .org__name { font-size: .88rem; }
.avatar { align-self: start; aspect-ratio: 1; min-width: 0; }
.avatar--lg { width: 4.6rem; height: 4.6rem; }
.notice--top { margin: 0 0 clamp(1.5rem, 4vw, 2.25rem); }

/* ---------- Research sub-navigation: a second deck of the header ---------- */
.has-deck { padding-bottom: 0; }
.deck { border-top: 1px solid var(--line); background: color-mix(in srgb, var(--honey) 10%, var(--header-bg)); position: relative; }
.deck::before { content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 1px; background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--honey) 70%, transparent), transparent); }
.subnav { position: relative; }
.subnav__row { position: relative; display: flex; align-items: center; gap: 1rem; min-height: 3rem; }
.subnav a.subnav__crumb { flex: none; font-size: .72rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--eyebrow); text-decoration: none; padding-right: 1rem; border-right: 1px solid var(--line); line-height: 1.8; }
.subnav__list { list-style: none; margin: 0; padding: 0; display: flex; align-items: stretch; gap: .15rem; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; }
.subnav__list::-webkit-scrollbar { display: none; }
.subnav__list li { flex: none; scroll-snap-align: center; display: flex; }
.subnav a { display: inline-flex; align-items: center; gap: .45rem; padding: .85rem .8rem; font-weight: 700; font-size: .9rem; color: var(--muted); text-decoration: none; white-space: nowrap; transition: color .35s var(--ease); }
.subnav a:hover, .subnav a[aria-current="page"] { color: var(--text); }
.subnav a .ti__svg { width: 1.1em; height: 1.1em; transition: transform .5s var(--ease), color .35s; }
.subnav a:hover .ti__svg { transform: translateY(-2px) rotate(-8deg); }
.subnav a[aria-current="page"] .ti__svg { color: var(--accent); }
.subnav__end { margin-left: auto; align-items: center; }
.subnav__calls { padding: .3rem .85rem !important; margin: .35rem 0 .35rem .6rem; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--honey) 65%, transparent); color: var(--eyebrow) !important; }
.subnav__calls:hover { background: color-mix(in srgb, var(--honey) 18%, transparent); }
.subnav__calls[aria-current="page"] { background: var(--honey); color: #101010 !important; }
.subnav__calls[aria-current="page"] .ti__svg { color: #101010; }
.subnav__dot { width: .5rem; height: .5rem; border-radius: 50%; background: light-dark(#1f8a4c, #4cc27f); animation: ripple-soft 2.4s ease-in-out infinite; }
/* the sliding ink: one honey line that glides to the active tab (JS sets --ix / --iw) */
.subnav__ink { position: absolute; bottom: 0; left: 0; height: 3px; width: var(--iw, 0); transform: translateX(var(--ix, 0)); background: var(--honey); border-radius: 3px 3px 0 0; opacity: 0; transition: transform .6s var(--ease), width .6s var(--ease), opacity .3s; pointer-events: none; }
.subnav__ink.is-on { opacity: 1; }
.js .subnav a[aria-current="page"]:not(.subnav__calls) { box-shadow: none; }
html:not(.js) .subnav a[aria-current="page"]:not(.subnav__calls) { box-shadow: inset 0 -3px 0 var(--honey); }
/* primary "Research" link and the deck read as one piece */
@media (min-width: 62rem) { .site-nav a[aria-current="page"] { position: relative; } }

@media (max-width: 52rem) {
  .subnav a.subnav__crumb { display: none; }
  .subnav__row { padding-inline: 0; gap: 0; }
  .subnav__list { padding-inline: var(--gutter); scroll-padding-inline: var(--gutter); -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 1rem, #000 calc(100% - 2.25rem), transparent 100%); mask-image: linear-gradient(90deg, transparent 0, #000 1rem, #000 calc(100% - 2.25rem), transparent 100%); }
  .subnav a { padding: .8rem .65rem; font-size: .88rem; }
  .subnav__end { margin-left: 0; }
  .subnav .wrap.subnav__row { max-width: none; width: 100%; }
}
.section--research { padding-top: clamp(1.5rem, 4vw, 2.5rem); }

.org--lg .org__logo { width: 4.6rem; height: 4.6rem; }
.org--lg .org__mark { font-size: .95rem; }
.ledger__row--org { grid-template-columns: 4.6rem 1fr; }
.ledger__name a { color: inherit; text-decoration-color: color-mix(in srgb, var(--honey) 70%, transparent); text-underline-offset: .2em; }
.ledger__name a:hover { color: var(--accent); }
@media (min-width: 64rem) { .hubgrid { grid-template-columns: repeat(6, minmax(0, 1fr)); } .hubgrid > .hubcard { grid-column: span 2; } .hubgrid > .hubcard:nth-child(n+4) { grid-column: span 3; } }

/* ---------- Honorable mentions: a light, open gallery ---------- */
.gallery { list-style: none; margin: 2rem 0 0; padding: 0; display: grid; gap: 2.75rem 1.5rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 14rem), 1fr)); }
.pcard { display: flex; flex-direction: column; align-items: center; text-align: center; gap: .3rem; }
.avatar--xl { width: 5.5rem; height: 5.5rem; margin-bottom: .75rem; box-shadow: none; border: 0; outline: 1px solid color-mix(in srgb, var(--honey) 60%, transparent); outline-offset: 5px; transition: outline-offset .5s var(--ease), outline-color .4s; }
.avatar--xl .avatar__mark { font-size: 2.1rem; }
.pcard:hover .avatar--xl { outline-offset: 8px; outline-color: var(--honey); }
.pcard__name { margin: 0; font-size: 1.15rem; line-height: 1.3; font-weight: 400; }
.pcard__roles { margin: 0; font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--eyebrow); }
.pcard__place { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: .2rem .5rem; margin: .35rem 0 0; font-size: .85rem; color: var(--muted); }
.pcard__place .org { gap: .4rem; }
.pcard__place .org__logo { width: 1.4rem; height: 1.4rem; border-width: 1px; box-shadow: none; }
.pcard__place .org__mark { font-size: .4rem; }
.pcard__place .org__name { font-size: .85rem; font-weight: 700; color: var(--text); }
.pcard__aff::before { content: "·"; margin-right: .5rem; }
.pcard__handles { display: flex; gap: .15rem; margin: .5rem 0 0; }
.handle { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; color: var(--muted); transition: color .3s, background .3s, transform .45s var(--ease); }
.handle .ti__svg { width: 1.05rem; height: 1.05rem; }
.handle:hover, .handle:focus-visible { color: var(--accent); background: color-mix(in srgb, var(--honey) 16%, transparent); transform: translateY(-2px); }
/* Honorable mentions: calmer type scale */
.gallery { gap: 2.5rem 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 13rem), 1fr)); }
.avatar--xl { width: 4.75rem; height: 4.75rem; margin-bottom: .6rem; }
.avatar--xl .avatar__mark { font-size: 1.8rem; }
.pcard { gap: .2rem; }
.pcard__name { font: 700 .98rem/1.35 var(--font-sans); letter-spacing: .005em; color: var(--text); }
.pcard__roles { font-size: .68rem; letter-spacing: .09em; line-height: 1.5; }
.pcard__place { font-size: .8rem; margin-top: .3rem; }
.pcard__place .org__name { font-size: .8rem; }
.pcard__place .org__logo { width: 1.25rem; height: 1.25rem; }
.gallery { grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); }
.gallery .pcard__name { font: 700 1rem/1.35 var(--font-sans); letter-spacing: 0; margin: 0; }
.gallery .pcard__place { flex-direction: column; gap: .1rem; }
.gallery .pcard__aff::before { content: none; }
.gallery .pcard__roles { max-width: 15rem; }
.gallery .pcard__roles { max-width: 18rem; }

/* Honorable mentions: cards, with the calmer type scale */
.gallery { gap: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15.5rem), 1fr)); }
.pcard { position: relative; padding: 2rem 1.25rem 1.5rem; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); overflow: hidden; isolation: isolate; gap: .35rem; transition: transform .6s var(--ease), box-shadow .6s var(--ease), border-color .4s; }
.pcard::before { content: ""; position: absolute; z-index: -1; left: 50%; top: 0; width: 120%; aspect-ratio: 1; transform: translate(-50%, -62%); border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--honey) 34%, transparent), transparent); transition: transform .8s var(--ease), opacity .6s; opacity: .8; }
.pcard:hover { transform: translateY(-6px); border-color: color-mix(in srgb, var(--honey) 60%, transparent); box-shadow: calc(var(--sx) * .6px) 22px 36px -22px rgba(60,35,10,.55); }
.pcard:hover::before { transform: translate(-50%, -54%) scale(1.15); opacity: 1; }
.avatar--xl { width: 5.75rem; height: 5.75rem; border: 2px solid light-dark(#fbf3ea, #1d1915); outline: 1.5px solid color-mix(in srgb, var(--honey) 70%, transparent); outline-offset: 0; box-shadow: calc(var(--sx) * .4px) calc(var(--sy) * .5px) 16px -6px rgba(60,35,10,.65); margin-bottom: .6rem; }
.pcard:hover .avatar--xl { outline-offset: 0; outline-color: var(--honey); transform: scale(1.06) rotate(-3deg); }
.gallery .pcard__roles { display: flex; flex-wrap: wrap; justify-content: center; gap: .3rem; margin: .1rem 0 .4rem; max-width: none; }
.gallery .pcard__roles span { padding: .2rem .65rem; border-radius: 999px; font-size: .66rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--eyebrow); border: 1px solid color-mix(in srgb, var(--honey) 55%, transparent); background: color-mix(in srgb, var(--honey) 12%, transparent); }
.gallery .pcard__handles { margin-top: auto; padding-top: .75rem; }
.gallery .handle { width: 2.2rem; height: 2.2rem; border: 1px solid var(--line); background: var(--surface); color: var(--text); }
.gallery .handle:hover, .gallery .handle:focus-visible { background: var(--honey); color: #101010; border-color: var(--honey); }
@media (prefers-reduced-motion: reduce) { .pcard, .pcard:hover { transform: none; } }

/* ---------- Home: static 3D avatar in a real 3D space of clay relics ---------- */
.cosmos-wrap { width: min(100%, 26rem); margin-inline: auto; }
.cosmos { --ry: 0deg; --rx: 0deg; position: relative; aspect-ratio: 5 / 6; perspective: 900px; perspective-origin: 50% 42%; container-type: inline-size; isolation: isolate; }
.cosmos__stars { position: absolute; inset: 0; z-index: 0; pointer-events: none; --star: rgba(245,224,207,.85); }
.cosmos__stars::before, .cosmos__stars::after { content: ""; position: absolute; left: 0; top: 0; width: 1.5px; height: 1.5px; border-radius: 50%; animation: twinkle 4.5s ease-in-out infinite alternate; }
.cosmos__stars::before { box-shadow: 12cqw 8cqw 0 0 var(--star), 88cqw 14cqw 0 .5px var(--star), 6cqw 40cqw 0 0 var(--star), 94cqw 52cqw 0 0 var(--star), 20cqw 92cqw 0 .5px var(--star), 80cqw 96cqw 0 0 var(--star), 46cqw 3cqw 0 0 var(--star), 62cqw 66cqw 0 0 var(--star), 33cqw 30cqw 0 0 var(--star), 78cqw 40cqw 0 .5px var(--star); }
.cosmos__stars::after { box-shadow: 30cqw 12cqw 0 .5px var(--star), 72cqw 6cqw 0 0 var(--star), 3cqw 66cqw 0 .5px var(--star), 97cqw 80cqw 0 .5px var(--star), 52cqw 98cqw 0 0 var(--star), 14cqw 56cqw 0 0 var(--star), 90cqw 30cqw 0 0 var(--star), 40cqw 88cqw 0 .5px var(--star); animation-delay: -2.2s; animation-duration: 6s; }
.cosmos__sway, .cosmos__space { position: absolute; inset: 0; transform-style: preserve-3d; }
.cosmos__sway { animation: cosmos-sway 16s ease-in-out infinite; }
.cosmos__space { transform: rotateY(var(--ry)) rotateX(var(--rx)); will-change: transform; }
@keyframes cosmos-sway { 0%, 100% { transform: rotateY(-7deg) rotateX(1.5deg); } 50% { transform: rotateY(7deg) rotateX(-1.5deg); } }
.cosmos__avatar { position: absolute; left: 25%; top: 7%; width: 50%; height: auto; -webkit-mask-image: linear-gradient(to bottom, #000 74%, transparent 97%); mask-image: linear-gradient(to bottom, #000 74%, transparent 97%); filter: drop-shadow(0 16px 20px rgba(0,0,0,.35)); }
.cosmos__halo { position: absolute; left: 12%; top: 12%; width: 76%; height: 74%; border-radius: 50%; transform: translateZ(-120px) scale(1.12); background: radial-gradient(closest-side, rgba(177,133,88,.42), rgba(177,133,88,.12) 58%, transparent 100%); }
/* each relic lives at its own depth; far ones are softer and dimmer, near ones larger (perspective) with a longer shadow */
.relic { position: absolute; left: var(--x); top: var(--y); width: var(--w); transform: translateZ(var(--z)) rotate(var(--r)); pointer-events: none; }
.relic__bob { display: block; animation: relic-float var(--t) ease-in-out var(--b) infinite; }
.relic img { display: block; width: 100%; height: auto; filter: drop-shadow(0 10px 10px rgba(0,0,0,.4)); }
.relic[style*="--z:-"] img { filter: blur(1.2px) brightness(.82) drop-shadow(0 6px 8px rgba(0,0,0,.35)); }
.relic[style*="--z:-2"] img { filter: blur(1.8px) brightness(.7) drop-shadow(0 6px 8px rgba(0,0,0,.3)); }
.relic[style*="--z:24"] img, .relic[style*="--z:17"] img { filter: blur(.8px) drop-shadow(0 18px 16px rgba(0,0,0,.45)); }
@keyframes relic-float { 0%, 100% { transform: translateY(0) rotate(0); } 33% { transform: translateY(-5%) rotate(3deg); } 66% { transform: translateY(2.5%) rotate(-2.5deg); } }
@media (min-width: 56rem) { .cosmos-wrap { width: 112%; max-width: 30rem; margin-inline: -6% auto; } }
@media (prefers-reduced-motion: reduce) { .cosmos__sway, .relic__bob, .cosmos__stars::before, .cosmos__stars::after { animation: none; } }

/* ---------- Photos inside articles ---------- */
.prose figure { margin: 2rem 0; }
.prose figure img { display: block; width: 100%; height: auto; border-radius: var(--radius, 12px); box-shadow: 0 10px 28px -14px rgba(60,35,10,.55); }
.prose figcaption { margin-top: .6rem; font-size: .85rem; color: var(--muted, inherit); opacity: .8; text-align: center; }

/* ---------- Teaching: course cards and delivery-mode tags ---------- */
.tcards { list-style: none; margin: 1.25rem 0 0; padding: 0; display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr)); }
.tcard { display: flex; flex-direction: column; }
.tcard .rcard__foot { margin-top: auto; padding-top: .9rem; }
.modebadge { display: inline-flex; align-items: center; gap: .4rem; padding: .28rem .8rem; border-radius: 999px; font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; line-height: 1.2; border: 1px solid color-mix(in srgb, var(--honey) 70%, transparent); color: var(--eyebrow); background: transparent; }
.modebadge .ti__svg { width: 1.05em; height: 1.05em; }
.modebadge--online { background: color-mix(in srgb, var(--honey) 22%, transparent); }
.modebadge--hybrid { background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--honey) 22%, transparent)); }
.tcard__award { display: flex; align-items: center; gap: .5rem; margin: .5rem 0 0; font-weight: 700; color: var(--eyebrow); font-size: .92rem; }
.tcard__award .ti__svg { width: 1.1em; height: 1.1em; }

/* ---------- Catalog (rows), course pages, request form ---------- */
.catalog__bar { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin: 1.25rem 0 .5rem; }
.catalog__count { margin: 0; font-size: .9rem; color: var(--muted); }
.catalog__tools { display: flex; align-items: center; gap: .6rem; margin-left: auto; }
.catalog__search { position: relative; display: block; }
.catalog__search svg { position: absolute; left: .85rem; top: 50%; width: 1.1rem; height: 1.1rem; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.catalog__search input { width: min(18rem, 60vw); padding: .65rem 1rem .65rem 2.6rem; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--text); font: inherit; }
.catalog__search input:focus-visible, .catalog__filterbtn:focus-visible { outline: 3px solid var(--honey); outline-offset: 2px; border-color: var(--honey); }
.catalog__filterbtn { position: relative; display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); color: var(--text); cursor: pointer; transition: border-color .3s var(--ease), background .3s var(--ease); }
.catalog__filterbtn:hover, .catalog__filterbtn[aria-expanded="true"] { border-color: var(--honey); background: color-mix(in srgb, var(--honey) 18%, var(--surface)); }
.catalog__filterbtn svg { width: 1.25rem; height: 1.25rem; }
.catalog__badge { position: absolute; top: -.35rem; right: -.35rem; min-width: 1.2rem; height: 1.2rem; padding: 0 .3rem; display: grid; place-items: center; border-radius: 999px; background: var(--honey); color: #101010; font: 800 .7rem/1 var(--font-sans, inherit); font-style: normal; }
.catalog__panel { position: absolute; z-index: 5; right: 0; top: calc(100% + .5rem); width: min(100%, 36rem); display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: 1rem 1.5rem; padding: 1.25rem; border: 1px solid color-mix(in srgb, var(--honey) 55%, transparent); border-radius: var(--radius); background: var(--surface); box-shadow: 0 18px 40px -20px rgba(60,35,10,.6); }
.catalog__panel[hidden] { display: none; }
.catalog__panel fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: .4rem; align-content: start; min-width: 0; }
.catalog__panel legend { padding: 0; margin-bottom: .4rem; font-weight: 800; font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; color: var(--eyebrow); }
.catalog__panel label { display: flex; align-items: center; gap: .5rem; font-size: .92rem; cursor: pointer; }
.catalog__panel input { accent-color: var(--honey); width: 1rem; height: 1rem; }
.catalog__panelfoot { grid-column: 1 / -1; margin: 0; text-align: right; }
.catalog__empty { padding: 1.5rem; border: 1px dashed var(--line); border-radius: var(--radius); color: var(--muted); }
.crows { list-style: none; margin: 1rem 0 0; padding: 0; border-top: 1px solid var(--line); }
.crow { position: relative; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 1rem; padding: 1.35rem .5rem; border-bottom: 1px solid var(--line); transition: background .4s var(--ease), padding .4s var(--ease); }
.crow[hidden] { display: none; }
.crow:hover, .crow:focus-within { background: color-mix(in srgb, var(--honey) 12%, transparent); padding-left: 1rem; }
.crow__title { margin: 0; font-size: 1.3rem; line-height: 1.3; }
.crow__title a { color: var(--text); text-decoration: none; }
.crow__title a::after { content: ""; position: absolute; inset: 0; }
.crow__title a:focus-visible { outline: 3px solid var(--honey); outline-offset: 4px; }
.crow:hover .crow__title a { color: var(--accent); }
.crow__text { margin: .3rem 0 .6rem; color: var(--muted); max-width: 42rem; }
.crow__meta { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin: 0; font-size: .85rem; color: var(--muted); }
.crow__go { color: var(--accent); transition: transform .45s var(--ease); }
.crow:hover .crow__go { transform: translateX(.35rem); }
.crow__go .ti__svg { width: 1.4rem; height: 1.4rem; }
.facts__modes { display: flex; flex-wrap: wrap; gap: .35rem; }
.clients { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 1rem 1.5rem; }
.custom { margin-top: clamp(2.5rem, 6vw, 4rem); padding-top: 2rem; border-top: 1px solid var(--line); }
.outline { margin: 0; padding-left: 1.3rem; display: grid; gap: .35rem; }
.resources { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; }
.resources__empty { padding: 1rem 1.2rem; border: 1px dashed var(--line); border-radius: var(--radius); color: var(--muted); }
.reqform { display: grid; gap: 1rem; padding: 1.4rem; border: 1px solid color-mix(in srgb, var(--honey) 55%, transparent); border-radius: var(--radius); background: linear-gradient(135deg, color-mix(in srgb, var(--honey) 12%, var(--surface)), var(--surface)); max-width: 40rem; }
.reqform__lead { margin: 0; color: var(--muted); }
.reqform__grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); }
.reqform label { display: grid; gap: .35rem; font-weight: 700; font-size: .9rem; }
.reqform input, .reqform select, .reqform textarea { padding: .65rem .8rem; border: 1px solid var(--line); border-radius: 10px; background: var(--bg, var(--surface)); color: var(--text); font: inherit; font-weight: 400; }
.reqform input:focus-visible, .reqform select:focus-visible, .reqform textarea:focus-visible { outline: 3px solid var(--honey); outline-offset: 1px; }
.reqform__actions { margin: 0; }
.reqform__note { margin: 0; font-size: .85rem; color: var(--muted); }

/* Guest lectures and talks: simple static rows */
.crow--static:hover, .crow--static:focus-within { background: transparent; padding-left: .5rem; }
.crow--static { grid-template-columns: 1fr; }
.trow { display: grid; gap: .45rem 2rem; grid-template-columns: repeat(auto-fit, minmax(12rem, max-content)); margin: .7rem 0 0; }
.trow div { display: grid; gap: .1rem; }
.trow dt { font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--eyebrow); }
.trow dd { margin: 0; }

/* Guest lectures and talks: date block + calm meta line */
.talks { list-style: none; margin: 1.5rem 0 0; padding: 0; border-top: 1px solid var(--line); }
.talk { display: grid; grid-template-columns: 5.5rem 1fr; gap: 1.5rem; padding: 1.75rem 0; border-bottom: 1px solid var(--line); }
.talk__when { margin: 0; display: grid; align-content: start; justify-items: center; padding: .6rem 0; border-radius: var(--radius); background: color-mix(in srgb, var(--honey) 16%, var(--surface)); border: 1px solid color-mix(in srgb, var(--honey) 45%, transparent); }
.talk__when span { font-size: .8rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--eyebrow); }
.talk__when b { font: 700 1.3rem/1.2 var(--font-serif); text-transform: capitalize; }
.talk__title { margin: 0; font-size: clamp(1.25rem, 2.6vw, 1.6rem); line-height: 1.3; }
.talk__meta { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.1rem; margin: .8rem 0 0; color: var(--muted); }
.talk__item { display: inline-flex; align-items: center; gap: .45rem; }
.talk__item .ti__svg { width: 1.1em; height: 1.1em; color: var(--accent); }
.talk__aud { margin: .5rem 0 0; font-size: .92rem; color: var(--muted); }
.talk__links { display: flex; gap: .6rem; margin: .9rem 0 0; }
@media (max-width: 36rem) { .talk { grid-template-columns: 1fr; gap: 1rem; } .talk__when { grid-auto-flow: column; justify-content: start; justify-items: start; gap: .5rem; padding: .35rem .8rem; width: fit-content; align-items: baseline; } }

/* Service: roles with their own dates */
.svc__pub { margin: .2rem 0 .7rem; }
.roles { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.roles li { display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem .9rem; }
.roles li::before { content: ""; width: .45rem; height: 1.5px; background: var(--honey); align-self: center; }
.roles__name { font-weight: 700; }
.roles__dates { color: var(--eyebrow); font-size: .9rem; font-weight: 700; letter-spacing: .04em; text-transform: capitalize; }
.research > .ledger:first-child { margin-top: 0; }

/* Honorable mentions as a list */
.ledger__row .avatar { align-self: start; }
.ledger__aff--org { display: flex; align-items: center; flex-wrap: wrap; gap: .4rem .75rem; margin: .2rem 0 .7rem; }
.ledger__handles { display: flex; flex-wrap: wrap; gap: .5rem; margin: .8rem 0 0; }
.roles--inline { display: flex; flex-wrap: wrap; gap: .3rem 1.4rem; }

/* Brand lists: thin dotted dividers */
:root { --dots: color-mix(in srgb, var(--honey) 95%, transparent); }
.ledger, .crows, .talks, .entry-list li:first-child, .entry-list li { border-top: 1px dotted var(--dots); }
.ledger__row, .crow, .talk { border-bottom: 1px dotted var(--dots); }
.entry-list li:last-child { border-bottom: 1px dotted var(--dots); }
.ledger__row:last-child, .crow:last-child, .talk:last-child { border-bottom-style: dotted; }

/* Honorable mentions: quieter, smaller */
.people .ledger__row { grid-template-columns: 3rem 1fr; gap: 1rem; padding: 1.1rem 0; }
.people .avatar--lg { width: 3rem; height: 3rem; }
.people .avatar--lg .avatar__mark { font-size: 1.2rem; }
.people .ledger__name { margin: 0; font: 700 1.02rem/1.35 var(--font-sans); letter-spacing: .005em; }
.people .ledger__aff--org { margin: .25rem 0 .35rem; font-size: .85rem; }
.people .roles--soft { gap: .2rem .6rem; }
.people .roles--soft li::before { display: none; }
.people .roles--soft li + li::before { display: inline; content: "·"; width: auto; height: auto; background: none; color: var(--honey); font-weight: 800; margin: 0 .6rem 0 0; align-self: auto; }
.people .roles--soft li { gap: 0; }
.people .ledger__aff--org span { font-weight: 400; }
.people .ledger__aff--org { color: var(--muted); }
.people .roles__name { font-weight: 400; font-size: .88rem; color: var(--muted); }
.people .ledger__handles { margin: .5rem 0 0; gap: .35rem; }
.people .ledger__handles .ti__svg { width: 1em; height: 1em; }

/* Honorable mentions: aligned columns (person | roles | links) */
.persons { list-style: none; margin: 0; padding: 0; border-top: 1px dotted var(--dots); }
.person { display: grid; grid-template-columns: 3rem minmax(0, 1fr) 11.5rem 2.25rem; column-gap: 1.1rem; align-items: start; padding: 1.1rem 0; border-bottom: 1px dotted var(--dots); }
.person .avatar--lg { width: 3rem; height: 3rem; }
.person .avatar--lg .avatar__mark { font-size: 1.2rem; }
.person__name { margin: 0; font: 700 1.02rem/1.35 var(--font-sans); }
.person__org { display: flex; align-items: flex-start; gap: .55rem; margin: .4rem 0 0; }
.person__org .org { flex: none; margin-top: .1rem; }
.person__org .org--sm .org__logo { width: 2rem; height: 2rem; }
.person__orgtext { display: grid; gap: .05rem; min-width: 0; font-size: .85rem; color: var(--muted); }
.person__uni { color: var(--text); overflow-wrap: anywhere; }
.person__roles { list-style: none; margin: .1rem 0 0; padding: 0; display: grid; gap: .25rem; font-size: .88rem; color: var(--muted); }
.person__roles li { position: relative; padding-left: .9rem; }
.person__roles li::before { content: ""; position: absolute; left: 0; top: .65em; width: .4rem; height: 1.5px; background: var(--honey); }
.person__links { grid-column: 4; grid-row: 1; margin: 0; display: grid; justify-items: end; gap: .35rem; }
.person__links .ti__svg { width: 1.05em; height: 1.05em; }
@media (max-width: 46rem) {
  .person { grid-template-columns: 3rem minmax(0, 1fr); row-gap: .6rem; }
  .person__roles { grid-column: 2; }
  .person__links { grid-column: 2; grid-row: auto; display: flex; justify-content: flex-start; gap: .5rem; }
}
.persons .person .person__name { font: 700 1.02rem/1.35 var(--font-sans); letter-spacing: 0; }

/* Honorable mentions: larger rounded-square portraits */
.person { grid-template-columns: 4.75rem minmax(0, 1fr) 11.5rem 2.25rem; column-gap: 1.25rem; }
.person .avatar--lg { width: 4.75rem; height: 4.75rem; border-radius: 16px; box-shadow: 0 8px 18px -10px rgba(60,35,10,.6); }
.person .avatar--lg img, .person .avatar--lg .avatar__mark { border-radius: inherit; }
.person .avatar--lg .avatar__mark { font-size: 1.9rem; }
@media (max-width: 46rem) { .person { grid-template-columns: 4.25rem minmax(0, 1fr); } .person .avatar--lg { width: 4.25rem; height: 4.25rem; } }

/* ---------- Blog figures (inline SVG that follows the theme) ---------- */
.fig { margin: 2.25rem 0; padding: 1rem 1rem .75rem; border: 1px dotted var(--dots); border-radius: var(--radius); background: color-mix(in srgb, var(--honey) 6%, var(--surface)); }
.fig svg { display: block; width: 100%; height: auto; }
.fig figcaption { margin-top: .6rem; }
.fig .t { fill: var(--text); font: 700 14px var(--font-sans); }
.fig .m { fill: var(--muted); font: 400 12.5px var(--font-sans); }
.fig .ln { stroke: var(--text); stroke-width: 2.4; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.fig .hn { stroke: var(--honey); stroke-width: 3.2; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.fig .hn.tick { stroke-width: 3.2; }
.fig .thin { stroke: var(--muted); stroke-width: 1.2; fill: none; opacity: .75; }
.fig .thin2 { stroke: var(--text); stroke-width: 1.6; }
.fig .dash { stroke-dasharray: 4 5; }
.fig .dash2 { stroke-dasharray: 7 6; }
.fig .hline { stroke: var(--honey); stroke-width: 1.8; fill: none; }
.fig .hf { fill: color-mix(in srgb, var(--honey) 32%, transparent); }
.fig .hfs { fill: var(--honey); }
.fig .sf { fill: var(--surface); }
.fig .glow { fill: color-mix(in srgb, var(--honey) 35%, transparent); }
.fig .ln.hf, .fig .ln.sf { stroke: var(--text); }
.series { display: inline-flex; align-items: center; gap: .5rem; margin: 0 0 1.5rem; padding: .3rem .85rem; border: 1px dotted var(--dots); border-radius: 999px; font-size: .78rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--eyebrow); }
.prose .eq, .prose pre { border-radius: var(--radius); }
.callout { margin: 1.75rem 0; padding: 1rem 1.25rem; border-left: 3px solid var(--honey); background: color-mix(in srgb, var(--honey) 10%, transparent); border-radius: 0 var(--radius) var(--radius) 0; }
.callout p { margin: 0; }
.lif { margin: 0; }
.lif canvas { display: block; width: 100%; height: 280px; border-radius: 10px; background: var(--surface); border: 1px dotted var(--dots); }
.lif__controls { display: grid; gap: .9rem 1.5rem; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); margin-top: 1rem; }
.lif__controls label { display: grid; gap: .25rem; font-size: .9rem; font-weight: 700; }
.lif__controls output { color: var(--eyebrow); font-variant-numeric: tabular-nums; }
.lif__controls input[type=range] { width: 100%; accent-color: var(--honey); }
.lif__bar { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.25rem; margin-top: 1rem; }
.lif__stat { margin: 0; font-size: .92rem; color: var(--muted); }
.lif__stat b { color: var(--text); }

/* ---------- Blog: timeline, series, series navigation ---------- */
.blogbar { margin-top: 0; }
.tline { display: flex; align-items: center; gap: .5rem; margin: 0 0 .25rem; }
.tline[hidden] { display: none; }
.tline__track { flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; padding: .25rem 0 .1rem; -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 1.1rem, #000 calc(100% - 1.1rem), transparent 100%); mask-image: linear-gradient(90deg, transparent 0, #000 1.1rem, #000 calc(100% - 1.1rem), transparent 100%); }
.tline__track::-webkit-scrollbar { display: none; }
.tline__inner { position: relative; display: flex; align-items: flex-start; gap: .15rem; width: max-content; min-width: 100%; padding: 0 1.1rem; }
.tline__inner::before { content: ""; position: absolute; left: 0; right: 0; top: .9rem; height: 1px; background: repeating-linear-gradient(90deg, var(--honey) 0 2px, transparent 2px 7px); opacity: .85; }
.tline__year { position: relative; flex: none; align-self: stretch; display: flex; align-items: flex-start; padding: .35rem .6rem 0 .9rem; font: 800 .74rem/1 var(--font-sans); letter-spacing: .14em; color: var(--eyebrow); }
.tline__year::before { content: ""; position: absolute; left: 0; top: .2rem; bottom: .2rem; border-left: 1px dotted var(--honey); }
.tline__year span { padding: .2rem .45rem; background: var(--bg); border-radius: 999px; position: relative; }
.tline__m { position: relative; flex: none; scroll-snap-align: center; display: grid; justify-items: center; gap: .15rem; min-width: 3.5rem; padding: 0 .55rem .45rem; border: 0; background: none; color: var(--muted); font: 700 .88rem/1.2 var(--font-sans); cursor: pointer; border-radius: var(--radius); }
.tline__m::before { content: ""; width: .6rem; height: .6rem; margin-top: .6rem; border-radius: 50%; background: var(--bg); border: 2px solid var(--honey); transition: background .3s var(--ease), transform .3s var(--ease); }
.tline__m i { font: 700 .68rem/1 var(--font-sans); font-style: normal; color: var(--eyebrow); }
.tline__m:hover { color: var(--text); }
.tline__m:hover::before { transform: scale(1.25); }
.tline__m[aria-pressed="true"] { color: var(--text); }
.tline__m[aria-pressed="true"]::before { background: var(--honey); transform: scale(1.35); }
.tline__m:focus-visible, .tline__all:focus-visible, .tline__arrow:focus-visible { outline: 3px solid var(--honey); outline-offset: 2px; }
.tline__all { flex: none; align-self: flex-start; margin-top: .25rem; padding: .4rem .9rem; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--text); font: 700 .85rem/1 var(--font-sans); cursor: pointer; }
.tline__all[aria-pressed="true"] { border-color: var(--honey); background: color-mix(in srgb, var(--honey) 22%, var(--surface)); }
.tline__arrow { flex: none; align-self: flex-start; display: grid; place-items: center; width: 2rem; height: 2rem; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); color: var(--text); cursor: pointer; transition: border-color .3s var(--ease); }
.tline__arrow:hover { border-color: var(--honey); }
.tline__arrow svg { width: 1rem; height: 1rem; }
.prow__part { display: block; margin-bottom: .25rem; font: 800 .72rem/1 var(--font-sans); letter-spacing: .14em; text-transform: uppercase; color: var(--eyebrow); }
.prow__kind { font-weight: 800; letter-spacing: .1em; text-transform: uppercase; font-size: .72rem; color: var(--eyebrow); }
.series__title { margin: 0 0 .5rem; }
.series__lead { margin: 0 0 .5rem; color: var(--muted); max-width: 42rem; }
.page-hero .eyebrow a { color: inherit; text-decoration: none; border-bottom: 1px dotted currentColor; }
.seriesnav { margin: 3rem auto 0; max-width: 44rem; padding-top: 1.25rem; border-top: 1px dotted var(--dots); }
.seriesnav__title { margin: 0 0 .9rem; font: 800 .75rem/1.3 var(--font-sans); letter-spacing: .12em; text-transform: uppercase; color: var(--eyebrow); }
.seriesnav__title a { color: inherit; text-decoration: none; }
.seriesnav__row { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: .9rem; }
.seriesnav__a { display: flex; align-items: center; gap: .8rem; padding: .9rem 1rem; border: 1px dotted var(--dots); border-radius: var(--radius); color: var(--text); text-decoration: none; font-weight: 700; transition: background .35s var(--ease), border-color .35s var(--ease); }
.seriesnav__a:hover { background: color-mix(in srgb, var(--honey) 12%, transparent); border-color: var(--honey); }
.seriesnav__a small { display: block; font: 800 .68rem/1.2 var(--font-sans); letter-spacing: .1em; text-transform: uppercase; color: var(--eyebrow); margin-bottom: .2rem; }
.seriesnav__a--next { justify-content: space-between; text-align: right; }
.seriesnav__a--next:only-child { grid-column: -2 / -1; }
.seriesnav__a .ti__svg { flex: none; width: 1.3rem; height: 1.3rem; color: var(--accent); }
.crow .chips { margin: .7rem 0 0; }
.crow__meta .status { font-size: inherit; }

/* ---------- Code blocks (Rouge tokens), inline code, math ---------- */
.prose code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: .88em; padding: .12em .4em; border-radius: 6px; background: color-mix(in srgb, var(--honey) 16%, transparent); }
div.highlighter-rouge { position: relative; margin: 1.75rem 0; border: 1px dotted var(--dots); border-radius: var(--radius); background: color-mix(in srgb, var(--text) 5%, var(--surface)); }
div.highlighter-rouge::before { position: absolute; top: .55rem; left: 1rem; font: 800 .68rem/1 var(--font-sans); letter-spacing: .14em; text-transform: uppercase; color: var(--eyebrow); }
div.language-python::before { content: "Python"; } div.language-text::before, div.language-plaintext::before { content: "Text"; } div.language-bash::before, div.language-shell::before { content: "Shell"; } div.language-javascript::before, div.language-js::before { content: "JavaScript"; } div.language-yaml::before { content: "YAML"; } div.language-html::before { content: "HTML"; } div.language-css::before { content: "CSS"; } div.language-liquid::before { content: "Liquid"; } div.language-latex::before { content: "LaTeX"; }
div.highlighter-rouge .highlight, div.highlighter-rouge pre { margin: 0; background: none; }
div.highlighter-rouge pre { padding: 2.2rem 1.1rem 1rem; overflow-x: auto; font: 400 .88rem/1.65 ui-monospace, "SF Mono", Menlo, Consolas, monospace; tab-size: 4; }
div.highlighter-rouge pre code { padding: 0; background: none; font: inherit; border-radius: 0; }
.codecopy { position: absolute; top: .35rem; right: .45rem; display: inline-flex; align-items: center; gap: .35rem; padding: .3rem .65rem; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--muted); font: 700 .72rem/1 var(--font-sans); cursor: pointer; transition: color .3s var(--ease), border-color .3s var(--ease); }
.codecopy:hover, .codecopy:focus-visible { color: var(--text); border-color: var(--honey); }
.codecopy .ti__svg { width: .95em; height: .95em; }
.highlight { --c-com: light-dark(#6f5a46, #a6917c); --c-kw: light-dark(#8a3d12, #f0a066); --c-str: light-dark(#3f6a22, #a9c97a); --c-num: light-dark(#8a2f5a, #e69ac0); --c-fn: light-dark(#1f5f7a, #7cc4cf); --c-op: light-dark(#5a4630, #cdb69c); color: var(--text); }
.highlight .c, .highlight .c1, .highlight .cm, .highlight .cs, .highlight .cp, .highlight .ch { color: var(--c-com); font-style: italic; }
.highlight .k, .highlight .kd, .highlight .kn, .highlight .kc, .highlight .kr, .highlight .kp, .highlight .kt, .highlight .ow { color: var(--c-kw); font-weight: 700; }
.highlight .s, .highlight .s1, .highlight .s2, .highlight .sa, .highlight .sb, .highlight .sc, .highlight .sd, .highlight .se, .highlight .sh, .highlight .si, .highlight .sx, .highlight .sr, .highlight .ss, .highlight .dl { color: var(--c-str); }
.highlight .m, .highlight .mi, .highlight .mf, .highlight .mh, .highlight .mo, .highlight .mb, .highlight .il { color: var(--c-num); }
.highlight .nf, .highlight .nb, .highlight .bp, .highlight .nc, .highlight .nd, .highlight .fm, .highlight .nn, .highlight .py { color: var(--c-fn); }
.highlight .o, .highlight .p { color: var(--c-op); }
.highlight .err { color: inherit; background: none; }
.prose .katex-display { margin: 1.5rem 0; overflow-x: auto; overflow-y: hidden; padding: .25rem 0; }
.prose .katex { font-size: 1.1em; }
.prose table .katex { font-size: 1em; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: .95rem; display: block; overflow-x: auto; }
.prose th { text-align: left; padding: .6rem .8rem; font: 800 .74rem/1.2 var(--font-sans); letter-spacing: .1em; text-transform: uppercase; color: var(--eyebrow); border-bottom: 1px solid var(--honey); }
.prose td { padding: .6rem .8rem; border-bottom: 1px dotted var(--dots); vertical-align: top; }
.gdemo__plots { display: grid; gap: 1rem 1.25rem; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); }
.gdemo__plots h4 { margin: 0 0 .25rem; font: 800 .74rem/1.2 var(--font-sans); letter-spacing: .12em; text-transform: uppercase; color: var(--eyebrow); }
.gdemo__plots svg { background: var(--surface); border: 1px dotted var(--dots); border-radius: 10px; }
.gdemo__plots .lif__stat { margin-top: .5rem; }
.fig .dots { stroke-dasharray: 0.1 6; stroke-width: 3; }
.lif__controls select { width: 100%; padding: .5rem .7rem; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--text); font: inherit; }
.idemo svg { background: var(--surface); border: 1px dotted var(--dots); border-radius: 10px; }
.idemo .bar { fill: color-mix(in srgb, var(--text) 38%, transparent); }
.idemo .win { fill: color-mix(in srgb, var(--honey) 28%, transparent); }
.idemo__stats { display: grid; gap: .5rem 1.5rem; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); margin: .9rem 0 0; }
.idemo__stats p { margin: 0; font-size: .88rem; color: var(--muted); }
.idemo__stats b { display: block; font: 700 1.5rem/1.2 var(--font-serif); color: var(--text); }
.prose th .katex { text-transform: none; letter-spacing: 0; }

/* Part 4: trained-network figures and the digit demo */
.fig .px { fill: var(--text); }
.fig .win2 { fill: color-mix(in srgb, var(--honey) 16%, transparent); }
.fig .ln-s { fill: var(--text); }
.fig .bar2 { fill: color-mix(in srgb, var(--text) 35%, transparent); }
.fig .cm-ok { fill: var(--honey); }
.fig .cm-bad { fill: var(--text); }
.fig .cmt { fill: var(--text); font: 700 12.5px var(--font-sans); }
.fig .ln.soft { stroke-width: 1.2; opacity: .3; }
.ddemo__row { display: grid; gap: 1rem 1.5rem; grid-template-columns: minmax(11rem, 15rem) 1fr; align-items: start; }
@media (max-width: 38rem) { .ddemo__row { grid-template-columns: 1fr; } }
.ddemo svg { background: var(--surface); border: 1px dotted var(--dots); border-radius: 10px; }
.ddemo [data-grid] { touch-action: none; cursor: crosshair; width: 100%; max-width: 15rem; }
.ddemo__say { margin: 0; font: 700 3.4rem/1 var(--font-serif); color: var(--text); }
.ddemo .lif__bar { margin-top: .75rem; }
.ddemo .lif__stat { margin: .25rem 0 .6rem; }
.ddemo button[aria-pressed="true"] { border-color: var(--honey); background: color-mix(in srgb, var(--honey) 18%, transparent); }

/* Table of contents beside a long post: sticky, scrollable, hideable */
.postgrid { display: block; }
.toc { font-size: .88rem; }
.toc__panel { border: 1px dotted var(--dots); border-radius: var(--radius); background: color-mix(in srgb, var(--honey) 6%, var(--surface)); }
.toc__head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .7rem .9rem .55rem; }
.toc__title { margin: 0; font: 800 .72rem/1.2 var(--font-sans); letter-spacing: .14em; text-transform: uppercase; color: var(--eyebrow); }
.toc__btn { display: inline-flex; align-items: center; gap: .4rem; padding: .3rem .6rem; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--text); font: 700 .78rem/1 var(--font-sans); cursor: pointer; }
.toc__btn:hover, .toc__btn:focus-visible { border-color: var(--honey); }
.toc__btn svg { width: .9rem; height: .9rem; flex: none; }
.toc__list { margin: 0; padding: 0 .5rem .6rem; list-style: none; max-height: calc(100vh - 14rem); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--honey) 55%, transparent) transparent; }
.toc__list ol { margin: 0; padding: 0; list-style: none; }
.toc a { display: block; padding: .3rem .55rem; border-left: 2px solid transparent; border-radius: 0 6px 6px 0; color: var(--muted); text-decoration: none; line-height: 1.35; }
.toc a:hover { color: var(--text); background: color-mix(in srgb, var(--honey) 10%, transparent); }
.toc a[aria-current="true"] { color: var(--text); font-weight: 700; border-left-color: var(--honey); background: color-mix(in srgb, var(--honey) 14%, transparent); }
.toc__sub a { padding-left: 1.25rem; font-size: .84rem; }
.toc__open { display: none; align-items: center; gap: .45rem; }
.toc.is-off .toc__panel { display: none; }
.toc.is-off .toc__open { display: inline-flex; }
.prose h2, .prose h3 { scroll-margin-top: 8rem; }
@media (min-width: 70rem) {
  .postgrid { display: grid; grid-template-columns: minmax(0, 44rem) minmax(13rem, 17rem); justify-content: space-between; gap: 2.5rem; align-items: start; }
  .toc { position: sticky; top: 8.5rem; align-self: start; }
  .toc.is-off { justify-self: end; }
}
@media (max-width: 69.99rem) {
  .toc { margin: 0 0 1.75rem; max-width: 44rem; }
  .toc__list { max-height: 45vh; }
  .postgrid .toc { order: -1; }
  .postgrid { display: flex; flex-direction: column; }
}
@media print { .toc { display: none; } }

/* Part 5: delayed-cue figures and memory lab */
.fig:not(.idemo) .win { fill: color-mix(in srgb, var(--honey) 16%, transparent); }
.fig .idemo .win, .idemo .win { fill: color-mix(in srgb, var(--honey) 28%, transparent); }
.mdemo__grid { display: grid; gap: 1rem 1.25rem; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); }
.mdemo__grid h4 { margin: 0 0 .25rem; font: 800 .74rem/1.2 var(--font-sans); letter-spacing: .12em; text-transform: uppercase; color: var(--eyebrow); }
.mdemo__grid svg { background: var(--surface); border: 1px dotted var(--dots); border-radius: 10px; }

/* Friendly empty states */
.emptystate { display: flex; flex-direction: column; align-items: center; text-align: center; gap: .35rem; padding: clamp(2rem, 6vw, 3.5rem) 1.5rem; border: 1px dotted var(--line); border-radius: var(--radius); background: var(--surface); max-width: 40rem; margin-inline: auto; }
.emptystate__icon { display: grid; place-items: center; width: 3.5rem; height: 3.5rem; border-radius: 50%; background: color-mix(in srgb, var(--honey) 18%, transparent); color: var(--accent); margin-bottom: .6rem; }
.emptystate__icon .ti { width: 1.6rem; height: 1.6rem; }
.emptystate__title { margin: 0; font-size: clamp(1.25rem, 3vw, 1.6rem); }
.emptystate__text { margin: 0 0 .6rem; max-width: 30rem; color: var(--muted); }
.emptystate__actions { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center; margin: .4rem 0 0; }

/* Page that holds only an empty state: centred in the space between header and footer */
.emptypage { display: grid; place-items: center; min-height: clamp(26rem, 62vh, 40rem); }
.emptypage .emptystate { width: 100%; }

/* Empty state inside a page that keeps its own header: centred in the remaining space */
.emptypage--sub { min-height: clamp(16rem, 38vh, 28rem); }
/* A container that only holds an empty state spans the full width, so the card sits in the middle of the page */
.prose:has(> .emptypage) { max-width: none; }
.emptystate .emptystate__title { margin: 0; }


/* ---------- Projects browser: search, sidebar filters, list and gallery ---------- */
.works { --wgap: 1.5rem; }
.wtools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 1rem; padding-bottom: 1rem; margin-bottom: 1.25rem; border-bottom: 1px dotted var(--line); }
.wtools__count { margin: 0; color: var(--muted); font-size: .95rem; }
.wtools__count b { color: var(--text); }
.wtools__right { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
.wtools__search { min-width: 12rem; flex: 1 1 14rem; }
.wsort select { appearance: none; font: inherit; font-size: .92rem; color: var(--text); background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right .6rem center / 1rem; border: 1px solid var(--line); border-radius: 999px; padding: .55rem 2.1rem .55rem 1rem; cursor: pointer; }
.wview { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: var(--surface); }
.wview button { display: grid; place-items: center; width: 2.6rem; height: 2.5rem; border: 0; background: none; color: var(--muted); cursor: pointer; transition: background .3s var(--ease), color .3s var(--ease); }
.wview button svg { width: 1.15rem; height: 1.15rem; }
.wview button[aria-pressed="true"] { background: color-mix(in srgb, var(--honey) 24%, transparent); color: var(--text); }
.wfilterbtn { display: inline-flex; align-items: center; gap: .45rem; font-weight: 700; }
.wfilterbtn span { font-size: .92rem; }
.works--nofilters .wfilterbtn { display: none; }

.wlayout { display: grid; gap: var(--wgap); grid-template-columns: minmax(0, 1fr); align-items: start; }
.wside { display: none; padding: 1.1rem 1.2rem; border: 1px dotted var(--line); border-radius: var(--radius); background: var(--surface); }
.wside.is-open { display: block; }
.wside__head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: .4rem; }
.wside__head h2 { margin: 0; font-size: .74rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--eyebrow); }
.wside__clear { border: 0; background: none; padding: 0; font: inherit; font-size: .85rem; font-weight: 700; color: var(--accent); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.wfacet { border-top: 1px dotted var(--line); margin: .5rem 0 0; padding: .35rem 0 0; min-width: 0; }
.wfacet__head { display: flex; align-items: center; gap: .5rem; width: 100%; padding: .5rem 0; border: 0; background: none; color: var(--text); font: inherit; font-weight: 800; font-size: .92rem; text-align: left; cursor: pointer; }
.wfacet__name { flex: 1; }
.wfacet__n { font-style: normal; font-size: .75rem; font-weight: 800; min-width: 1.35rem; height: 1.35rem; line-height: 1.35rem; text-align: center; border-radius: 999px; background: var(--honey); color: #fff; }
.wfacet__head svg { width: 1.05rem; height: 1.05rem; color: var(--muted); transition: transform .35s var(--ease); }
.wfacet.is-open .wfacet__head svg { transform: rotate(180deg); }
.wfacet__head:hover .wfacet__name { color: var(--accent); }
.wfacet__body { padding: 0 0 .5rem; }
.wfacet__body[hidden] { display: none; }
.wfacet label { display: flex; align-items: center; gap: .55rem; padding: .22rem 0; font-size: .93rem; cursor: pointer; color: var(--text); }
.wfacet label span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.wfacet label i { font-style: normal; font-size: .8rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.wfacet label.is-zero { opacity: .45; }
.wfacet input { accent-color: var(--honey); width: 1rem; height: 1rem; }
@media (min-width: 56rem) {
  .wlayout { grid-template-columns: 15.5rem minmax(0, 1fr); }
  .wside, .wside.is-open { display: block; position: sticky; top: 5.5rem; max-height: calc(100vh - 7rem); overflow: auto; }
  .wfilterbtn { display: none; }
}
.works--nofilters .wlayout { grid-template-columns: minmax(0, 1fr); }

.wlist { list-style: none; margin: 0; padding: 0; }
.work { position: relative; display: grid; grid-template-columns: 5rem minmax(0, 1fr) auto; gap: 1.1rem; align-items: center; padding: 1.15rem 0; border-bottom: 1px dotted var(--line); }
.work[hidden] { display: none; }
.work__title { margin: 0 0 .25rem; font-size: 1.3rem; }
.work__title a { color: var(--text); text-decoration: none; }
.work__title a::after { content: ""; position: absolute; inset: 0; }
.work__summary { margin: 0 0 .5rem; color: var(--muted); max-width: 42rem; }
.work__meta { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .6rem; margin: 0; font-size: .88rem; color: var(--muted); }
.work__chips { margin-top: .6rem; }
.work__go { color: var(--accent); transition: transform .4s var(--ease); }
.work:hover .work__go { transform: translateX(4px); }
.work:hover .work__title a { color: var(--accent); }

.works[data-view="gallery"] .wlist { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(16.5rem, 1fr)); }
.works[data-view="gallery"] .work { grid-template-columns: 1fr; align-items: start; gap: .9rem; padding: 1.1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); transition: transform .4s var(--ease), border-color .4s var(--ease), box-shadow .4s var(--ease); }
.works[data-view="gallery"] .work:hover { transform: translateY(-3px); border-color: var(--honey); box-shadow: 0 .8rem 1.6rem -1rem rgba(0,0,0,.25); }
.works[data-view="gallery"] .work__go { display: none; }
.works[data-view="gallery"] .work__summary { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 36rem) {
  .work { grid-template-columns: 3.75rem minmax(0, 1fr); gap: .85rem; }
  .work__media { width: 3.75rem; height: 3.75rem; border-radius: .9rem; }
  .work__mark b { font-size: 1.6rem; }
  .work__go { display: none; }
}

/* Status as a small coloured ripple after a project's name (green = ongoing, red = ended) */
.work__title .statusdot { display: inline-flex; vertical-align: middle; margin-left: .7rem; padding: 0; gap: 0; background: none; border: 0; box-shadow: none; position: relative; top: -.1em; }
.work__title .statusdot .status__dot { width: .6rem; height: .6rem; }

/* Project marks: one tile shape for every project. Logo (or the initial when there is none) sits centred on a tint of the project's own accent colour. */
.work__media, .workpage__logo { --tint: var(--honey); display: grid; place-items: center; flex: none; width: 5rem; height: 5rem; border-radius: 1.15rem; border: 1px solid color-mix(in srgb, var(--tint) 32%, var(--line)); background: color-mix(in srgb, var(--tint) 14%, var(--surface)); color: color-mix(in srgb, var(--tint) 78%, var(--text)); overflow: hidden; }
.work__mark { display: grid; place-items: center; width: 100%; height: 100%; }
.work__mark img { width: 56%; height: 56%; object-fit: contain; display: block; }
.work__mark b { font-family: var(--font-serif); font-weight: 500; font-size: 2.2rem; line-height: 1; }
.works[data-view="gallery"] .work__media { width: 100%; height: 8.5rem; border-radius: .9rem; }
.works[data-view="gallery"] .work__mark { width: 4.6rem; height: 4.6rem; border-radius: 1.15rem; background: var(--surface); border: 1px solid color-mix(in srgb, var(--tint) 32%, var(--line)); box-shadow: 0 .5rem 1rem -.7rem rgba(0,0,0,.35); }
.workpage__logo { margin: 0 0 1.1rem; }
.work__media { text-decoration: none; }

/* Pages fill the same content width as the header and sub-menu; running text keeps a readable line length. */
.research > p, .research > section > p, .research > section > .lede { max-width: 46rem; }

/* Teaching browsers reuse the works browser: date tile for talks, spacing for the blocks below the list. */
.work__mark--date { flex-direction: column; gap: .15rem; align-content: center; }
.work__mark--date small { font-size: .7rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; opacity: .8; }
.work__mark--date b { font-size: 1.35rem; }
.works--nolink .work__go { display: none; }
.research--browse > .works + section, .research--browse > .works + aside { margin-top: clamp(2.5rem, 6vw, 4rem); }
.work .talk__links { margin: .6rem 0 0; display: flex; flex-wrap: wrap; gap: .5rem; position: relative; z-index: 1; }
.work__meta .badge, .work__meta .mode { margin: 0; }

/* Sidebar call to action and modal dialog. */
.wcta { margin-top: 1.1rem; padding-top: 1.1rem; border-top: 1px dotted var(--line); }
.wcta__title { margin: 0 0 .4rem; font-size: 1.05rem; }
.wcta__text { margin: 0 0 .9rem; font-size: .9rem; color: var(--muted); }
.linkbtn { border: 0; background: none; padding: 0; font: inherit; color: var(--accent); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.modal { width: min(42rem, calc(100vw - 2rem)); max-height: calc(100vh - 2rem); padding: 0; border: 1px solid color-mix(in srgb, var(--honey) 55%, transparent); border-radius: calc(var(--radius) * 1.3); background: var(--surface); color: var(--text); box-shadow: 0 30px 80px -30px rgba(0,0,0,.55); overflow: auto; }
.modal::backdrop { background: rgba(16,16,16,.55); backdrop-filter: blur(3px); }
.modal__box { position: relative; padding: clamp(1.25rem, 4vw, 2rem); }
.modal__title { margin: 0 2.5rem .4rem 0; font-size: 1.5rem; }
.modal__text { margin: 0 0 1.25rem; color: var(--muted); }
.modal__close { position: absolute; top: .9rem; right: .9rem; display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); color: var(--text); cursor: pointer; }
.modal__close:hover { border-color: var(--honey); }
.modal__close svg { width: 1.1rem; height: 1.1rem; }
.modal .reqform { padding: 0; border: 0; background: none; max-width: none; }
.modal .reqform__lead { display: none; }

/* ---------- Research overview: intro + lower thirds, profiles, bento ---------- */
.rintro { display: grid; gap: clamp(2rem, 5vw, 3rem); grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 64rem) { .rintro { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 3.5rem; } }
.rintro__lead > p { max-width: 38rem; }
.rintro .profiles { margin-top: 1.6rem; padding-top: 1.2rem; border-top: 1px dotted var(--dots, var(--line)); gap: .5rem 1.4rem; }
.rintro .profiles a { font-size: .95rem; }
.rintro .profiles .ti__svg { width: 1.25rem; height: 1.25rem; }

.rlatest__head { display: flex; align-items: center; gap: .6rem; margin: 0 0 1rem; font-family: var(--font-sans, inherit); font-size: .78rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--eyebrow); }
.rlatest__live { position: relative; width: .6rem; height: .6rem; border-radius: 50%; background: #d9534f; }
.rlatest__live::after { content: ""; position: absolute; inset: -.3rem; border-radius: 50%; border: 2px solid #d9534f; opacity: 0; animation: lt-ping 2s ease-out infinite; }
@keyframes lt-ping { 0% { transform: scale(.4); opacity: .8; } 100% { transform: scale(1.4); opacity: 0; } }
.rlatest__more { margin: 1.1rem 0 0; }

.bento { display: grid; gap: 1.1rem; margin-top: 1.25rem; grid-template-columns: minmax(0, 1fr); }
.bento > .hubcard { margin: 0; min-height: 10.5rem; }
.bento .hubcard--calls { flex-wrap: nowrap; }
.hubcard--feature { padding: 1.75rem; background-color: color-mix(in srgb, var(--honey) 9%, var(--surface)); }
.hubcard--feature h3 { font-size: 1.6rem; }
.hubcard--feature .hubcard__bg { width: 12rem; height: 12rem; right: -2rem; bottom: -2.4rem; }
.hubcard__types { list-style: none; margin: 1rem 0 .5rem; padding: 0; max-width: 20rem; position: relative; }
.hubcard__types li { display: flex; justify-content: space-between; gap: 1rem; padding: .4rem 0; border-top: 1px dotted var(--line); font-size: .92rem; color: var(--muted); }
.hubcard__types b { color: var(--text); font-variant-numeric: tabular-nums; }
.hubcard--feature .hubcard__count b { font-family: var(--font-serif); font-weight: 500; font-size: 2.6rem; line-height: 1; margin-right: .3rem; }
@media (min-width: 44rem) {
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bento > .hubcard--feature, .bento > .hubcard--calls { grid-column: 1 / -1; }
}
@media (min-width: 64rem) {
  .bento { grid-template-columns: repeat(12, minmax(0, 1fr)); grid-auto-rows: minmax(10.5rem, auto); }
  .bento > .hubcard--feature { grid-column: 1 / 6; grid-row: 1 / 3; }
  .bento > :nth-child(2) { grid-column: 6 / 13; }
  .bento > :nth-child(3) { grid-column: 6 / 10; }
  .bento > :nth-child(4) { grid-column: 10 / 13; }
  .bento > :nth-child(5) { grid-column: 1 / 6; }
  .bento > .hubcard--calls { grid-column: 6 / 13; }
}
.research .rlatest__head { font-size: .78rem; margin: 0 0 1rem; line-height: 1.2; }
.rintro + section { margin-top: clamp(2.5rem, 6vw, 4rem); }

/* Latest work: a quiet list that features one item at a time (progress line, then the next). */
.rnews { list-style: none; margin: 0; padding: 0; border-top: 1px dotted var(--dots, var(--line)); }
.rnews__item { position: relative; border-bottom: 1px dotted var(--dots, var(--line)); animation: rn-in .8s var(--ease) both; animation-delay: calc(.1s + var(--i, 0) * .14s); }
.rnews__item:nth-child(2) { --i: 1; } .rnews__item:nth-child(3) { --i: 2; }
.rnews__link { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 1rem; align-items: center; padding: 1.05rem 0 1.05rem 1.1rem; color: var(--text); text-decoration: none; }
.rnews__link::before { content: ""; position: absolute; left: 0; top: 1.15rem; bottom: 1.15rem; width: 2px; background: var(--honey); transform: scaleY(0); transform-origin: top; transition: transform .6s var(--ease); }
.rnews__meta { grid-column: 1; font-size: .74rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--eyebrow); }
.rnews__title { grid-column: 1; margin-top: .25rem; font-family: var(--font-serif); font-size: 1.12rem; line-height: 1.35; transition: color .4s var(--ease); }
.rnews__venue { grid-column: 1; display: block; font-size: .85rem; color: var(--muted); }
.rnews__go { grid-column: 2; grid-row: 1 / span 3; color: var(--accent); opacity: .5; transform: translateX(-.4rem); transition: transform .5s var(--ease), opacity .4s var(--ease); }
.rnews__go .ti__svg { width: 1.2rem; height: 1.2rem; }
.rnews__bar { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; overflow: hidden; pointer-events: none; }
.rnews__bar i { display: block; width: 100%; height: 100%; background: var(--honey); transform: scaleX(0); transform-origin: left; }
.rnews__link:hover .rnews__title, .rnews__link:focus-visible .rnews__title { color: var(--accent); }
.rnews__link:focus-visible { outline: 3px solid var(--honey); outline-offset: 2px; }
/* With the script running only the active item opens up. */
.rnews.is-live .rnews__venue { display: grid; grid-template-rows: 0fr; opacity: 0; transition: grid-template-rows .6s var(--ease), opacity .5s var(--ease); }
.rnews.is-live .rnews__venue > span { overflow: hidden; min-height: 0; }
.rnews.is-live .rnews__item:not(.is-active) .rnews__meta, .rnews.is-live .rnews__item:not(.is-active) .rnews__title { opacity: .55; }
.rnews.is-live .rnews__meta, .rnews.is-live .rnews__title { transition: opacity .5s var(--ease), color .4s var(--ease); }
.rnews.is-live .rnews__item.is-active .rnews__venue { grid-template-rows: 1fr; opacity: 1; margin-top: .35rem; }
.rnews.is-live .rnews__item.is-active .rnews__link::before { transform: scaleY(1); }
.rnews.is-live .rnews__item.is-active .rnews__go, .rnews__link:hover .rnews__go { opacity: 1; transform: none; }
.rnews.is-live .rnews__item.is-active .rnews__bar i { animation: rn-bar var(--rn-t, 6s) linear forwards; }
.rnews.is-paused .rnews__bar i { animation-play-state: paused; }
@keyframes rn-in { from { opacity: 0; transform: translateY(.8rem); } to { opacity: 1; transform: none; } }
@keyframes rn-bar { to { transform: scaleX(1); } }
@media (prefers-reduced-motion: reduce) { .rnews__item { animation: none; } .rnews.is-live .rnews__bar i { animation: none; } }

/* One work at a time: items share one cell, the active one slides up into view and the previous one leaves upward. */
.rnews.is-live { display: grid; }
.rnews.is-live .rnews__item { grid-area: 1 / 1; opacity: 0; visibility: hidden; transform: translateY(1rem); transition: opacity .6s var(--ease), transform .7s var(--ease), visibility 0s .7s; animation: none; }
.rnews.is-live .rnews__item.is-active { opacity: 1; visibility: visible; transform: none; transition: opacity .7s var(--ease) .15s, transform .8s var(--ease) .15s, visibility 0s; }
.rnews.is-live .rnews__item.is-leaving { transform: translateY(-1rem); }
.rnews.is-live .rnews__meta, .rnews.is-live .rnews__title { opacity: 1 !important; }
.rnews.is-live .rnews__venue { display: block; opacity: 1; margin-top: .35rem; }
.rnews.is-live .rnews__bar { display: none; }
.rnews.is-live .rnews__link::before { transform: scaleY(1); }
.rnews.is-live .rnews__item.is-active .rnews__title { animation: rn-title .9s var(--ease) .2s both; }
@keyframes rn-title { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 0 0); } }
.rnews__nav { display: flex; align-items: center; gap: .5rem; margin-top: .4rem; }
.rnews__seg { position: relative; width: 2.6rem; height: 1.4rem; padding: 0; border: 0; background: none; cursor: pointer; }
.rnews__seg::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 2px; margin-top: -1px; background: var(--line); }
.rnews__seg i { position: absolute; left: 0; top: 50%; width: 100%; height: 2px; margin-top: -1px; background: var(--honey); transform: scaleX(0); transform-origin: left; }
.rnews__seg.is-done i { transform: scaleX(1); }
.rnews__seg.is-active i { animation: rn-bar var(--rn-t, 6s) linear forwards; }
.rnews__seg:focus-visible { outline: 3px solid var(--honey); outline-offset: 2px; }
.rnews__count { margin-left: auto; font-size: .78rem; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.rlatest.is-paused .rnews__seg.is-active i { animation-play-state: paused; }
.rlatest.is-paused .rnews__item.is-active .rnews__title { animation: none; }

/* Reduced motion: still one work at a time, switched by hand with the segments (no sliding, no automatic advance). */
@media (prefers-reduced-motion: reduce) {
  .rnews.is-live .rnews__item.is-active .rnews__title { animation: none; }
  .rnews__seg.is-active i, .rnews__seg.is-done i { transform: scaleX(1); }
}

/* Align the two columns on shared rows so the dotted lines meet (wide screens). */
@media (min-width: 64rem) {
  @supports (grid-template-rows: subgrid) {
    .rintro { grid-template-rows: auto auto; row-gap: 0; }
    .rintro__lead, .rlatest { grid-row: 1 / span 2; display: grid; grid-template-rows: subgrid; }
    .rintro__text { padding-bottom: 1.6rem; }
    .rintro .profiles { margin-top: 0; align-self: start; }
    .rlatest__stage { display: flex; flex-direction: column; min-height: 0; }
    .rlatest__stage .rnews { flex: 1; }
    .rnews.is-live .rnews__item { height: 100%; }
    .rnews.is-live .rnews__link { height: 100%; align-content: center; box-sizing: border-box; }
    .rlatest__foot { padding-top: 1.2rem; }
    .rlatest__foot .rnews__nav { margin-top: 0; }
  }
}
/* Reduced motion still hands over to the next work by itself, with a plain cross-fade. */
@media (prefers-reduced-motion: reduce) {
  .rnews.is-live .rnews__item, .rnews.is-live .rnews__item.is-leaving { transform: none !important; transition: opacity .7s ease, visibility 0s .7s !important; }
  .rnews.is-live .rnews__item.is-active { transition: opacity .7s ease, visibility 0s !important; }
}

/* ---------- Research corrections ---------- */
/* Small status pills: only the ongoing dot ripples. */
.status { gap: .4rem; padding: .16rem .6rem .16rem .5rem; font-size: .62rem; letter-spacing: .1em; }
.status__dot { width: .42rem; height: .42rem; }
.status--ended .status__dot::before, .status--ended .status__dot::after { display: none; }
.crow__meta .status { font-size: .62rem; }
.legend .status { font-size: .62rem; }

/* Side details: long values sit under their label. */
.facts dt.is-block { grid-column: 1 / -1; margin-bottom: -.25rem; }
.facts dd.is-block { grid-column: 1 / -1; overflow-wrap: anywhere; }
.facts dt.is-block:not(:first-child) { margin-top: .5rem; }
.facts dd.is-block .org { align-items: center; }
.linklist--after { margin-top: 2rem; }

/* Detail pages: the first block of the text column lines up with the first heading of the side column. */
.pubpage__grid > .prose > :first-child { margin-top: 0; }
.pubpage__side > :first-child { margin-top: 0; }

/* Publication header DOI and the footnote under the citation. */
.pub__doi { display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem; margin: .5rem 0 0; font-size: .95rem; color: var(--muted); }
.pub__doi span { font-size: .72rem; font-weight: 800; letter-spacing: .14em; color: var(--eyebrow); }
.pub__doi a { color: var(--accent); overflow-wrap: anywhere; }
.pub__foot { margin: .75rem 0 0; font-size: .82rem; color: var(--muted); }

/* Code: wrapped by default, with a wrap toggle beside the copy button. */
.bib pre, div.highlighter-rouge pre { white-space: pre-wrap; overflow-wrap: anywhere; overflow-x: hidden; }
.bib pre.is-nowrap, div.highlighter-rouge pre.is-nowrap { white-space: pre; overflow-wrap: normal; overflow-x: auto; }
.bib__tools { display: inline-flex; align-items: center; gap: .4rem; }
.iconbtn { display: inline-grid; place-items: center; width: 2.1rem; height: 2.1rem; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); color: var(--muted); cursor: pointer; transition: border-color .3s var(--ease), color .3s var(--ease), background .3s var(--ease); }
.iconbtn svg, .iconbtn .ti__svg { width: 1.05rem; height: 1.05rem; }
.iconbtn:hover, .iconbtn:focus-visible { color: var(--text); border-color: var(--honey); }
.iconbtn[aria-pressed="true"] { color: var(--text); background: color-mix(in srgb, var(--honey) 22%, var(--surface)); border-color: color-mix(in srgb, var(--honey) 55%, var(--line)); }
.codetools { position: absolute; top: .35rem; right: .45rem; display: flex; align-items: center; gap: .35rem; }
.codetools .codecopy { position: static; }
.codetools .iconbtn { width: 1.9rem; height: 1.9rem; }

/* Service: journal names at the size used for people. */
.ledger__row--org .ledger__name { font: 700 1.02rem/1.35 var(--font-sans); letter-spacing: 0; }

/* Honorable mentions: portrait, then name, organisation, how we worked together, links in one row. */
.person { grid-template-columns: 4.75rem minmax(0, 1fr); }
.person__main { min-width: 0; }
.person__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.person__who { min-width: 0; }
.person__links { grid-column: auto; grid-row: auto; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .4rem; margin: 0; }
.person__tags { list-style: none; margin: .8rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.person__tags li { padding: .18rem .65rem; border-radius: 999px; font-size: .78rem; font-weight: 700; color: var(--accent); background: color-mix(in srgb, var(--honey) 14%, transparent); border: 1px solid color-mix(in srgb, var(--honey) 35%, transparent); }
.person__note { margin: .65rem 0 0; font-size: .92rem; color: var(--muted); max-width: 40rem; }
.person__works { margin-top: .6rem; font-size: .88rem; }
.person__works summary { display: inline-flex; align-items: center; gap: .4rem; list-style: none; cursor: pointer; font-weight: 700; color: var(--accent); }
.person__works summary::-webkit-details-marker { display: none; }
.person__works summary::after { content: ""; width: .45rem; height: .45rem; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); transition: transform .3s var(--ease); }
.person__works[open] summary::after { transform: rotate(-135deg) translateY(-2px); }
.person__works ol { list-style: none; margin: .6rem 0 0; padding: 0 0 0 .9rem; display: grid; gap: .45rem; border-left: 1.5px solid var(--honey); }
.person__works li { display: grid; gap: .05rem; }
.person__works li a { color: var(--text); text-decoration: none; }
.person__works li a:hover { color: var(--accent); }
.person__works li span { font-size: .8rem; color: var(--muted); }
@media (max-width: 46rem) { .person { grid-template-columns: 4.25rem minmax(0, 1fr); } .person__head { flex-direction: column; gap: .6rem; } .person__links { justify-content: flex-start; } }

/* Call to action with the avatar on the end side. */
.cta--me { min-height: clamp(19rem, 30vw, 24rem); }
.cta__halo { position: absolute; z-index: 0; right: clamp(-1rem, 3vw, 3rem); top: -2rem; width: clamp(15rem, 28vw, 24rem); aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(216,185,156,.38), rgba(177,133,88,.16) 45%, transparent 68%); pointer-events: none; }
.cta__avatar { position: absolute; z-index: 1; right: clamp(1rem, 6vw, 5rem); top: clamp(1.25rem, 3vw, 2rem); width: clamp(11rem, 19vw, 15rem); height: auto; pointer-events: none; filter: drop-shadow(0 1.2rem 1.4rem rgba(0,0,0,.45)); animation: cta-float 8s ease-in-out infinite; }
@keyframes cta-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-.55rem); } }
@media (max-width: 52rem) { .cta__avatar, .cta__halo { display: none; } .cta--me { min-height: 0; } }
.bib pre code { padding: 0; background: none; border-radius: 0; font: inherit; }

/* ---------- Home refinements ---------- */
/* Hover light on the option cards: a soft white (light) or honey (dark) glow under the cursor, plus a thin lit edge. */
.facet::before { background: radial-gradient(20rem circle at var(--mx, 50%) var(--my, 50%), light-dark(rgba(255, 255, 255, .8), color-mix(in srgb, var(--honey) 18%, transparent)), transparent 70%); }
.facet::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; padding: 1px; pointer-events: none; opacity: 0; transition: opacity .5s var(--ease); background: radial-gradient(13rem circle at var(--mx, 50%) var(--my, 50%), var(--honey), transparent 70%); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); }
.facet:hover::after, .facet:focus-visible::after { opacity: 1; }
.facet:hover { border-color: color-mix(in srgb, var(--honey) 30%, var(--line)); box-shadow: 0 1.1rem 2rem -1.6rem rgba(60, 35, 10, .45); }

/* News ticker in place of the values strip. */
.newsbar { background: var(--surface-2); border-block: 1px solid var(--line); }
.newsbar__row { display: flex; align-items: center; gap: 1rem; padding-block: .7rem; }
.newsbar__label { flex: none; display: inline-flex; align-items: center; gap: .55rem; padding: .4rem .9rem .4rem .75rem; border-radius: 999px; font: 800 .72rem/1 var(--font-sans); letter-spacing: .16em; text-transform: uppercase; color: var(--text); text-decoration: none; background: color-mix(in srgb, var(--honey) 20%, transparent); border: 1px solid color-mix(in srgb, var(--honey) 45%, transparent); transition: background .35s var(--ease), color .35s var(--ease); }
.newsbar__label:hover, .newsbar__label:focus-visible { background: var(--honey); color: #101010; text-decoration: none; }
.newsbar__dot { position: relative; width: .5rem; height: .5rem; border-radius: 50%; background: #d9534f; }
.newsbar__dot::after { content: ""; position: absolute; inset: -.25rem; border-radius: 50%; border: 2px solid #d9534f; opacity: 0; animation: lt-ping 2s ease-out infinite; }
.newsbar__view { flex: 1; min-width: 0; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); }
.newsbar__track { display: flex; width: max-content; animation: newsbar-run var(--nb-t, 80s) linear infinite; }
.newsbar__list { display: flex; flex: none; list-style: none; margin: 0; padding: 0; }
.newsbar__list li { position: relative; flex: none; padding-right: 3.2rem; }
.newsbar__list li::after { content: ""; position: absolute; right: 1.4rem; top: 50%; width: .32rem; height: .32rem; margin-top: -.16rem; background: var(--honey); transform: rotate(45deg); }
.newsbar__list a { display: inline-flex; align-items: baseline; gap: .65rem; color: var(--text); text-decoration: none; font-family: var(--font-serif); font-size: 1rem; white-space: nowrap; }
.newsbar__list a:hover, .newsbar__list a:focus-visible { color: var(--accent); }
.newsbar__list time, .newsbar__list em { font: 800 .68rem/1 var(--font-sans); font-style: normal; letter-spacing: .1em; text-transform: uppercase; color: var(--eyebrow); }
.newsbar:hover .newsbar__track, .newsbar:focus-within .newsbar__track, .newsbar.is-paused .newsbar__track { animation-play-state: paused; }
.newsbar__pause { flex: none; width: 1.9rem; height: 1.9rem; }
.newsbar__pause svg { width: .8rem; height: .8rem; }
.newsbar__i2 { display: none; }
.newsbar.is-paused .newsbar__i1 { display: none; }
.newsbar.is-paused .newsbar__i2 { display: block; }
@keyframes newsbar-run { to { transform: translateX(-50%); } }
@media (max-width: 40rem) { .newsbar__row { gap: .6rem; } .newsbar__label { padding: .35rem .7rem .35rem .6rem; } }
/* The ticker keeps moving under reduced motion, only slower, and can be paused with the button. */
@media (prefers-reduced-motion: reduce) {
  .newsbar .newsbar__track { animation: newsbar-run calc(var(--nb-t, 80s) * 1.6) linear infinite !important; }
  .newsbar:hover .newsbar__track, .newsbar:focus-within .newsbar__track, .newsbar.is-paused .newsbar__track { animation-play-state: paused !important; }
}

/* Saturn-style belt of relics and dust around the 3D avatar. */
.belt { --R: 43cqw; position: absolute; left: 50%; top: 55%; width: 0; height: 0; transform-style: preserve-3d; transform: rotateX(-20deg); }
.belt__spin { position: absolute; left: 0; top: 0; width: 0; height: 0; transform-style: preserve-3d; animation: belt-spin 72s linear infinite; }
.bi { position: absolute; left: 0; top: 0; width: 0; height: 0; transform-style: preserve-3d; transform: rotateY(var(--a)) translateZ(var(--R)); }
.bi--dust { transform: rotateY(var(--a)) translateY(var(--yj)) translateZ(calc(var(--R) + var(--rj))); }
.bi__face, .bi__unspin { position: absolute; left: 0; top: 0; width: 0; height: 0; transform-style: preserve-3d; transform-origin: 0 0; }
.bi__face { transform: rotateY(calc(var(--a) * -1)); }
.bi__unspin { animation: belt-unspin 72s linear infinite; }
.bi__tilt { position: absolute; left: 0; top: 0; transform-origin: 0 0; transform: rotateX(20deg) translate(-50%, -50%); }
.bi__depth { display: block; animation: belt-depth 72s ease-in-out calc(var(--ph) * -1) infinite; }
.bi__depth .relic__bob { display: block; }
.bi__depth img { display: block; max-width: none; height: auto; filter: drop-shadow(0 .5rem .5rem rgba(0, 0, 0, .4)); }
.bi--dust i { display: block; width: var(--s); height: var(--s); border-radius: 50%; background: radial-gradient(circle at 30% 30%, #f3d9bd, #b18558 55%, #6b4a2b); box-shadow: 0 .12rem .25rem rgba(0, 0, 0, .45); }
@keyframes belt-spin { to { transform: rotateY(360deg); } }
@keyframes belt-unspin { to { transform: rotateY(-360deg); } }
@keyframes belt-depth { 0%, 100% { filter: brightness(1) blur(0); } 50% { filter: brightness(.66) blur(1.3px); } }
@media (prefers-reduced-motion: reduce) { .belt__spin, .bi__unspin, .bi__depth { animation: none; } }

/* The Tifinagh row sits centred on the line where the last section meets the footer. */
.site-footer > .zigzag { position: relative; top: -10px; z-index: 2; }

/* ---------- Footer: brand + contact, page links, social rows; dotted column dividers ---------- */
.footer-grid { gap: 2rem; padding-block: 3rem 2.25rem; }
.footer-col { min-width: 0; }
.footer-brand img { width: 4.6rem; margin-bottom: .8rem; }
.footer-brand p { margin: 0 0 1.6rem; }
.footer-col--brand .footer-title { margin-top: 0; }
.footer-col--links { display: grid; gap: 1.75rem; align-content: start; }
.footer-linkgroup .footer-title { margin-bottom: .7rem; }
.footer-links { display: grid; gap: .35rem; }
.site-footer .footer-links a { display: inline-flex; align-items: center; gap: .65rem; padding: .25rem 0; color: var(--apricot); }
.footer-links .ti { color: var(--honey); opacity: .85; }
.footer-links .ti__svg { width: 1.1rem; height: 1.1rem; }
.footer-links a span:last-child { background: linear-gradient(var(--honey), var(--honey)) 0 100% / 0 1px no-repeat; transition: background-size .45s var(--ease); }
.site-footer .footer-links a:hover { text-decoration: none; color: #fff; }
.footer-links a:hover span:last-child { background-size: 100% 1px; }
.site-footer .social-nav { gap: .55rem; }
.site-footer .social-group { display: grid; grid-template-columns: 5.6rem minmax(0, 1fr); align-items: center; gap: .3rem 1rem; padding: .5rem 0; border-top: 1px dotted rgba(245, 224, 207, .18); }
.site-footer .social-group:first-child { border-top: 0; padding-top: 0; }
.site-footer .social-group__title { margin: 0; }
.site-footer .social-grid { gap: .45rem; }
.site-footer .social-grid a { width: 2.55rem; height: 2.55rem; border-radius: 50%; }
.site-footer .social-grid .ti__svg { width: 1.2rem; height: 1.2rem; }
.footer-base { border-top: 1px dotted rgba(245, 224, 207, .22); }
@media (max-width: 47.99rem) { .footer-col + .footer-col { padding-top: 2rem; border-top: 1px dotted rgba(245, 224, 207, .22); } }
@media (min-width: 48rem) {
  .footer-grid { grid-template-columns: minmax(0, 1.25fr) minmax(0, .8fr) minmax(0, 1.2fr); gap: 0; }
  .footer-col { padding-inline: 2.25rem; }
  .footer-col:first-child { padding-left: 0; }
  .footer-col:last-child { padding-right: 0; }
  .footer-col + .footer-col { border-left: 1px dotted rgba(245, 224, 207, .22); }
}

/* Freelance call to action under the projects. */
.cta--freelance .cta__body { max-width: 40rem; }
.cta--freelance .cta__eyebrow { margin-bottom: .9rem; }
.cta--freelance .status { font-size: .68rem; }
.wrap > .cta--freelance { margin-bottom: clamp(2rem, 5vw, 3.5rem); }

/* Slim notice: one line of text and a button. */
.notice--slim { align-items: center; flex-wrap: wrap; gap: .6rem 1.1rem; padding: .85rem 1.1rem; }
.notice--slim > .ti { margin-top: 0; }
.notice--slim > .ti .ti__svg { width: 1.5rem; height: 1.5rem; }
.notice--slim p { flex: 1 1 18rem; margin: 0; max-width: none; color: var(--text); }
.notice--slim p strong { margin-right: .35rem; }
.notice--slim .btn { flex: none; }
