/* Notes site — dark-first, gold accent (inspired by parcelo.ug), Manrope + Outfit */
:root {
  --bg: #0b0b0c; --surface: #141413; --surface-2: #1c1c1a;
  --line: rgba(255,255,255,.08); --line-2: rgba(255,255,255,.14);
  --text: #f4f3ee; --muted: #a3a29b; --dim: #74736d;
  --gold: #fbca0c; --gold-ink: #0a0a0b; --gold-soft: rgba(251,202,12,.10); --gold-line: rgba(251,202,12,.28);
  --link: #fbca0c;
  --radius: 16px; --ease: cubic-bezier(.2,.7,.2,1);
  --font: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Outfit", var(--font);
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #faf9f5; --surface: #ffffff; --surface-2: #f3f2ec;
  --line: rgba(20,20,19,.09); --line-2: rgba(20,20,19,.16);
  --text: #141413; --muted: #5b5a55; --dim: #85847e;
  --gold-soft: rgba(251,202,12,.18); --gold-line: rgba(176,140,0,.35);
  --link: #8a6d00;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; overflow-x: hidden; background: var(--bg); color: var(--text); font: 16px/1.65 var(--font); }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 28px; } }
h1, h2, h3 { font-family: var(--display); line-height: 1.15; letter-spacing: -.01em; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 700; }
h2 { font-size: 1.45rem; font-weight: 600; }
h3 { font-size: 1.1rem; font-weight: 600; }
.muted { color: var(--muted); } .small { font-size: .85rem; }
.eyebrow { display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); margin-bottom: .8rem; }
:root[data-theme="light"] .eyebrow { color: var(--link); }

/* nav */
.nav { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.nav-in { display: flex; align-items: center; gap: 16px; height: 62px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 600; color: var(--text); }
.brand:hover { text-decoration: none; }
.mark { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: var(--gold); color: var(--gold-ink); font-size: .8rem; font-weight: 700; }
.links { display: flex; gap: 4px; margin-left: 12px; }
.links a { color: var(--muted); padding: 6px 12px; border-radius: 999px; font-weight: 500; font-size: .95rem; }
.links a:hover, .links a[aria-current] { color: var(--text); background: var(--surface-2); text-decoration: none; }
.tools { margin-left: auto; display: flex; gap: 8px; }
.search-btn, .theme-btn { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); color: var(--muted); font: inherit; font-size: .9rem; cursor: pointer; }
.search-btn:hover, .theme-btn:hover { color: var(--text); border-color: var(--gold-line); }
kbd { font: 600 .72rem var(--font); border: 1px solid var(--line-2); border-radius: 6px; padding: 1px 6px; }
@media (max-width: 640px) { .links a[href$="#about"], .search-btn span, .search-btn kbd { display: none; } .links { margin-left: 4px; } .links a { padding: 6px 8px; } }

/* hero */
.hero { padding: 72px 0 40px; position: relative; }
.hero::before { content: ""; position: absolute; inset: -40px 0 auto auto; width: min(520px, 90vw); height: 420px; background: radial-gradient(closest-side, var(--gold-soft), transparent); pointer-events: none; z-index: -1; }
.hero h1 { max-width: 16ch; }
.lead { font-size: 1.12rem; color: var(--muted); max-width: 62ch; }
.cta { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 22px 0 6px; }
.btn { display: inline-flex; align-items: center; height: 44px; padding: 0 20px; border-radius: 999px; font-weight: 600; border: 1px solid var(--line-2); color: var(--text); transition: transform .2s var(--ease), border-color .2s; }
.btn:hover { text-decoration: none; transform: translateY(-1px); border-color: var(--gold-line); }
.btn.gold { background: var(--gold); color: var(--gold-ink); border-color: var(--gold); }
.stats { display: flex; flex-wrap: wrap; gap: 12px 40px; margin: 36px 0 0; }
.stats div { border-left: 2px solid var(--gold); padding-left: 14px; }
.stats dt { color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; }
.stats dd { margin: 0; font: 700 2rem/1.2 var(--display); }

/* sections + cards */
.block { padding: 28px 0; }
.head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.head h2 { margin: 0; }
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
.card { display: flex; flex-direction: column; gap: 6px; padding: 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); color: var(--text); transition: transform .25s var(--ease), border-color .25s; min-width: 0; }
.card[hidden] { display: none; }
.card:hover { text-decoration: none; transform: translateY(-2px); border-color: var(--gold-line); }
.card h3 { margin: 0; overflow-wrap: anywhere; }
.card p { margin: 0; color: var(--muted); font-size: .93rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card .eyebrow { margin: 0; font-size: .66rem; }
.card .meta { margin-top: auto; padding-top: 8px; color: var(--dim); font-size: .82rem; }
.card .meta b { color: var(--text); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0; }
.chip { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; font: 600 .74rem var(--font); background: var(--gold-soft); color: var(--text); border: 1px solid var(--gold-line); }
a.chip:hover { text-decoration: none; background: var(--gold); color: var(--gold-ink); }

/* latest finds */
.finds { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.finds li { padding: 16px 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--gold); overflow-wrap: anywhere; }
.finds li > a:first-child { font-weight: 700; }

/* page heads, prose */
.crumbs { padding-top: 28px; font-size: .88rem; color: var(--dim); }
.crumbs a { color: var(--muted); }
.page-head { padding: 22px 0 18px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.prose { max-width: 78ch; overflow-wrap: anywhere; }
.prose h2, .prose h3 { margin-top: 1.6em; }
.prose ul { padding-left: 1.1em; }
.prose li { margin: .55em 0; }
.notes > ul { list-style: none; padding: 0; display: grid; gap: 10px; }
.notes > ul > li { margin: 0; padding: 16px 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.notes > ul > li > a:first-child, .notes > ul > li > em:first-child { font-weight: 700; }
code.tag { font: 600 .74rem var(--font); padding: 2px 8px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line-2); color: var(--muted); white-space: nowrap; }
.wl { border-bottom: 1px dashed var(--gold-line); }
.wl:hover { text-decoration: none; border-bottom-style: solid; }
.wl-off { color: var(--muted); }
hr { border: 0; border-top: 1px solid var(--line); margin: 1.5em 0; }

/* home: interests, why */
.interest { gap: 8px; }
.interest:hover { transform: none; }
.interest p { -webkit-line-clamp: unset; }
.interest .chips { margin-top: auto; padding-top: 6px; }
.chip.pub { background: var(--surface-2); border-color: var(--line-2); }
h3.year { font-size: .95rem; color: var(--gold); margin: 22px 0 8px; letter-spacing: .06em; }
:root[data-theme="light"] h3.year { color: var(--link); }
.pubs { margin: 0; padding-left: 1.2em; display: grid; gap: 10px; max-width: 90ch; }
.pubs li { overflow-wrap: anywhere; scroll-margin-top: 80px; }
.pubs li:target { background: var(--gold-soft); border-radius: 8px; padding: 4px 8px; }
.pubs a { font-weight: 600; }
.bg .card:hover { transform: none; }
.bg ul { margin: 6px 0 0; padding-left: 1.1em; color: var(--muted); font-size: .93rem; }
.bg li { margin: .35em 0; }
.collab { margin: 8px 0; padding: 32px 28px; border-radius: var(--radius); background: linear-gradient(135deg, var(--gold-soft), transparent 60%), var(--surface); border: 1px solid var(--gold-line); }
.collab h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
.cv { max-width: 86ch; }
.cv h2 { margin-top: 2em; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.cv ul { padding-left: 1.1em; color: var(--muted); } .cv li { margin: .4em 0; }
.cv-entry { padding: 14px 0; border-bottom: 1px dashed var(--line); }
.cv-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; align-items: baseline; }
.cv-top h3 { margin: 0; }
.cv-org { margin: 2px 0 6px; }
.methods { margin: 18px 0 0; color: var(--muted); }
.methods .eyebrow { margin: 0 8px 0 0; }
.pillar { padding: 24px; }
.pillar .num { font: 700 .8rem var(--display); color: var(--gold); letter-spacing: .1em; }
:root[data-theme="light"] .pillar .num { color: var(--link); }
.pillar h3 { font-size: 1.25rem; }
.pillar p { -webkit-line-clamp: unset; }
.why { margin: 20px 0; padding: 32px 28px; border-radius: var(--radius); background: linear-gradient(135deg, var(--gold-soft), transparent 60%), var(--surface); border: 1px solid var(--gold-line); }
.why h2 { font-size: clamp(1.5rem, 3vw, 2rem); max-width: 24ch; }
.principles { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); margin-top: 20px; }
.principles h3 { font-size: 1rem; margin: 0 0 4px; }
.principles h3::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 2px; background: var(--gold); margin-right: 8px; vertical-align: middle; }
.principles p { margin: 0; color: var(--muted); font-size: .93rem; }
.hero h1 { max-width: 22ch; }
@media (max-width: 640px) { .brand-name { font-size: .95rem; } .links a[href$="#research"], .links a[href$="#publications"], .links a[href$="topics/"], .links a[href$="#collaborate"] { display: none; } .hero .cta .btn.ghost { height: 38px; padding: 0 14px; font-size: .9rem; } }

/* filters */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.filters .chip { cursor: pointer; background: var(--surface); border-color: var(--line-2); padding: 6px 12px; }
.filters .chip.on { background: var(--gold); color: var(--gold-ink); border-color: var(--gold); }

/* about + footer */
.about { margin-top: 12px; padding: 28px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.about p { max-width: 70ch; color: var(--muted); }
.foot { margin-top: 56px; border-top: 1px solid var(--line); padding: 36px 0 44px; }
.foot-in { display: grid; gap: 16px; }
.foot p { margin: 6px 0 0; max-width: 60ch; }
.socials { display: flex; flex-wrap: wrap; gap: 8px; }
.socials a { padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--text); font-weight: 600; font-size: .9rem; }
.socials a:hover { border-color: var(--gold); text-decoration: none; }

/* search */
.search { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.55); backdrop-filter: blur(4px); display: grid; place-items: start center; padding: 10vh 16px 16px; }
.search[hidden] { display: none; }
.search-box { width: 100%; max-width: 620px; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius); overflow: hidden; box-shadow: 0 30px 80px rgba(0,0,0,.45); }
.search input { width: 100%; padding: 18px 20px; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--text); font: 500 1.05rem var(--font); outline: none; }
.search ol { list-style: none; margin: 0; padding: 6px; max-height: 60vh; overflow: auto; }
.search li a { display: block; padding: 10px 14px; border-radius: 10px; color: var(--text); }
.search li a:hover, .search li a.sel { background: var(--gold-soft); text-decoration: none; }
.search li small { display: block; color: var(--muted); }
.search li .k { color: var(--gold); font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; margin-right: 6px; }
:root[data-theme="light"] .search li .k { color: var(--link); }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
@media (max-width: 440px) { .brand-name { display: none; } .nav-in { gap: 8px; } }

/* portrait */
.hero.has-photo { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 340px); gap: 48px; align-items: center; }
.portrait { margin: 0; border-radius: 22px; overflow: hidden; border: 1px solid var(--gold-line); box-shadow: 0 30px 80px rgba(0,0,0,.35); aspect-ratio: 2 / 3; background: #0b0b0c; }
.portrait img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 860px) {
  .hero.has-photo { grid-template-columns: 1fr; gap: 24px; }
  .portrait { order: -1; width: 140px; aspect-ratio: 1; border-radius: 50%; }
  .portrait img { object-position: 50% 0; transform: scale(2); transform-origin: 47% 33%; }
}
.cv-head { position: relative; }
.cv-photo { float: right; width: 150px; height: 150px; border-radius: 50%; overflow: hidden; border: 2px solid var(--gold-line); margin: 0 0 12px 20px; }
.cv-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; transform: scale(2); transform-origin: 47% 33%; }
@media (max-width: 640px) { .cv-photo { float: none; display: block; width: 110px; height: 110px; margin: 0 0 14px; } }

/* moving words */
.hero h1.rot-h1 { max-width: none; font-size: clamp(2rem, 4.2vw, 2.9rem); }
.rotator { color: var(--gold); display: inline-block; min-height: 1.15em; }
:root[data-theme="light"] .rotator { color: var(--link); }
.rot-word { display: inline-block; }
.rot-word.out { animation: rotOut .35s var(--ease) forwards; }
.rot-word.in { animation: rotIn .45s var(--ease); }
@keyframes rotOut { to { opacity: 0; transform: translateY(-0.45em); filter: blur(4px); } }
@keyframes rotIn { from { opacity: 0; transform: translateY(0.45em); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
.ticker { overflow: hidden; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 8px 0 12px; padding: 14px 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.ticker-track { display: flex; width: max-content; gap: 0; animation: ticker 60s linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker span { font: 600 1rem var(--display); color: var(--muted); white-space: nowrap; padding: 0 22px; }
.ticker span::after { content: "✦"; color: var(--gold); margin-left: 44px; font-size: .8em; }
@keyframes ticker { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .ticker-track { animation: none; flex-wrap: wrap; width: auto; } .rot-word { animation: none !important; } }

/* approach steps */
.steps { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.step { padding: 22px 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--gold); }
.step .num { font: 700 .8rem var(--display); color: var(--gold); letter-spacing: .12em; }
:root[data-theme="light"] .step .num { color: var(--link); }
.step h3 { margin: 8px 0 8px; font-size: 1.08rem; }
.step p { margin: 0; color: var(--muted); font-size: .92rem; }
.hero .lead + .lead { margin-top: 0; }

/* headings with italic last word */
h1 em, h2 em { font-style: italic; color: var(--gold); font-weight: inherit; }
:root[data-theme="light"] h1 em, :root[data-theme="light"] h2 em { color: var(--link); }
/* agenda */
.agenda-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.agenda { padding: 24px; border-top: 3px solid var(--gold); }
.agenda:hover { transform: none; }
.agenda .num { font: 700 .8rem var(--display); color: var(--gold); letter-spacing: .12em; }
.agenda h3 { font-size: 1.2rem; margin: 6px 0; }
.agenda p { -webkit-line-clamp: unset; }
.agenda ul { margin: 8px 0 0; padding-left: 1.1em; color: var(--muted); font-size: .9rem; }
.agenda li { margin: .3em 0; }
.agenda li a { color: var(--text); }
.agenda .more { margin-top: auto; padding-top: 12px; font-weight: 600; }
.interest { scroll-margin-top: 80px; }
/* hero links + portrait caption */
.minor-links { margin: 4px 0 0; color: var(--muted); font-size: .92rem; }
.minor-links a { color: var(--muted); }
.minor-links a:hover { color: var(--text); }
.status { margin: 14px 0 0; color: var(--text); font-weight: 600; }
.portrait-wrap { margin: 0; }
.portrait-wrap figcaption { margin-top: 14px; font: 600 1.05rem var(--display); color: var(--text); text-align: center; }
.portrait-wrap figcaption span { display: block; margin-top: 4px; font: 500 .85rem var(--font); color: var(--muted); }
@media (max-width: 860px) {
  .portrait-wrap { order: -1; display: flex; align-items: center; gap: 16px; }
  .portrait-wrap figcaption { margin: 0; text-align: left; }
  .portrait-wrap .portrait { flex: none; }
}

/* project explainers + status badges */
.status-badge { display: inline-block; align-self: flex-start; padding: 3px 10px; border-radius: 999px; font: 700 .7rem var(--font);
  letter-spacing: .08em; text-transform: uppercase; border: 1px solid var(--line-2); color: var(--muted); margin-bottom: 4px; }
.page-head .status-badge { margin-bottom: 12px; }
.s-working-paper { color: var(--gold); border-color: var(--gold-line); background: var(--gold-soft); }
:root[data-theme="light"] .s-working-paper { color: var(--link); }
.s-interactive-map, .s-live-platform, .s-forecast { color: #6fd3a4; border-color: rgba(111,211,164,.35); background: rgba(111,211,164,.08); }
:root[data-theme="light"] .s-interactive-map, :root[data-theme="light"] .s-live-platform, :root[data-theme="light"] .s-forecast { color: #1f7a52; }
.explainer { display: grid; gap: 14px; margin-top: 8px; }
.ex-block { padding: 20px 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.ex-block .eyebrow { margin-bottom: 6px; }
.ex-block p { margin: 0; }
.ex-q { font: 600 1.15rem/1.45 var(--display); color: var(--text); }
.ex-block ul { margin: 0; padding-left: 1.1em; }
.ex-block li { margin: .45em 0; }
.ex-note { margin-top: 14px; }

