@font-face { font-family: "Bricolage Grotesque"; src: url(fonts/bricolage.woff2) format("woff2-variations"); font-weight: 200 800; font-stretch: 75% 100%; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url(fonts/source-serif.woff2) format("woff2-variations"); font-weight: 200 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url(fonts/source-serif-italic.woff2) format("woff2-variations"); font-weight: 200 900; font-style: italic; font-display: swap; }

/* Naresh Khanal: forest-to-market atlas
   Light: clean paper, deep forest ink, forest green, sap gold, sky blue.
   Dark: night forest with the same accents. */
:root {
  --paper: #fafaf6;
  --paper-2: #eef3ea;       /* sage tint for alternating bands */
  --paper-3: #e3ebdf;
  --card: #ffffff;
  --ink: #10261f;
  --ink-soft: #4a5d54;
  --rule: #d7e0d4;
  --forest: #1e6b4e;
  --forest-deep: #134634;
  --sap: #e9a92c;           /* warm gold */
  --sap-soft: #fbefd2;
  --sky: #5fa8c8;
  --sky-soft: #dceef5;
  --land: #e4ecdf;
  --land-line: #c3d2bf;
  --sea: #f3f7f8;
  --display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --wrap: 1200px;
  --shadow: 0 1px 2px rgba(16, 38, 31, .06), 0 12px 32px -12px rgba(16, 38, 31, .18);
  color-scheme: light;
}
[data-theme="dark"] {
  --paper: #0d1c17;
  --paper-2: #12251e;
  --paper-3: #183026;
  --card: #152a22;
  --ink: #e8efe8;
  --ink-soft: #a9bab0;
  --rule: #26402f;
  --forest: #7cc4a0;
  --forest-deep: #a6dcc0;
  --sap: #f2be55;
  --sap-soft: #3a3016;
  --sky: #8ccbe6;
  --sky-soft: #183843;
  --land: #1b3329;
  --land-line: #2e4c3e;
  --sea: #0f201a;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 32px -12px rgba(0, 0, 0, .6);
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--serif); font-size: 1.15rem; line-height: 1.65; -webkit-font-smoothing: antialiased; transition: background .3s, color .3s; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-color: var(--sap); text-decoration-thickness: 2px; text-underline-offset: 4px; }
a:hover { color: var(--forest); }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; letter-spacing: -0.02em; line-height: 1.06; margin: 0; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 clamp(20px, 4vw, 48px); }
.narrow { max-width: 860px; }
.skip { position: absolute; left: -999px; top: 10px; z-index: 60; background: var(--sap); color: #10261f; padding: 8px 14px; font-family: var(--display); }
.skip:focus { left: 10px; }
.btn { display: inline-flex; align-items: center; gap: 8px; font-family: var(--display); font-weight: 600; font-size: 1.05rem; text-decoration: none; background: var(--forest); color: var(--paper); padding: 14px 24px; border-radius: 999px; border: 0; cursor: pointer; transition: transform .15s, background .15s, box-shadow .15s; }
.btn:hover { background: var(--forest-deep); color: var(--paper); transform: translateY(-2px); box-shadow: var(--shadow); }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--rule); }
.btn.ghost:hover { box-shadow: inset 0 0 0 2px var(--forest); color: var(--forest); }
.btn.gold { background: var(--sap); color: #10261f; }
.btn.gold:hover { background: #f3bb45; color: #10261f; }
.eyebrowless { font-family: var(--display); font-weight: 600; font-size: 1.05rem; }

/* ---------- navigation ---------- */
.nav { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid transparent; transition: border-color .25s, background .3s; }
.nav.scrolled { border-bottom-color: var(--rule); }
.nav-inner { max-width: var(--wrap); margin: 0 auto; padding: 14px clamp(20px, 4vw, 48px); display: flex; align-items: center; gap: 20px; }
.mark { display: flex; align-items: center; gap: 12px; text-decoration: none; font-family: var(--display); font-weight: 700; margin-right: auto; }
.mono { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--forest); color: var(--paper); font-size: .95rem; letter-spacing: .02em; font-weight: 700; transition: transform .4s cubic-bezier(.3, 1.6, .5, 1); }
.mark:hover .mono { transform: rotate(-12deg) scale(1.06); }
.mark-name { font-size: 1.2rem; letter-spacing: -0.01em; }
nav { display: flex; gap: clamp(16px, 2.2vw, 30px); font-family: var(--display); font-size: 1.1rem; font-weight: 500; }
nav a { text-decoration: none; color: var(--ink-soft); padding: 4px 0; border-bottom: 2px solid transparent; transition: color .2s, border-color .2s; }
nav a:hover, nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--sap); }
.nav-group { position: relative; }
.nav-top { display: inline-flex; align-items: center; gap: 6px; font: inherit; color: var(--ink-soft); background: none; border: 0; border-bottom: 2px solid transparent; padding: 4px 0; cursor: pointer; transition: color .2s, border-color .2s; }
.nav-top svg { width: 11px; height: 8px; fill: none; stroke: currentColor; stroke-width: 1.8; transition: transform .2s; }
.nav-top:hover, .nav-group.open .nav-top, .nav-top[data-current] { color: var(--ink); border-bottom-color: var(--sap); }
.nav-group.open .nav-top svg { transform: rotate(180deg); }
.dropdown { position: absolute; top: calc(100% + 14px); left: -20px; min-width: 290px; padding: 10px; background: var(--card); border-radius: 18px; box-shadow: var(--shadow), 0 0 0 1px var(--rule); opacity: 0; visibility: hidden; transform: translateY(-6px); transition: opacity .18s, transform .18s, visibility .18s; z-index: 50; }
.dropdown::before { content: ""; position: absolute; left: 0; right: 0; top: -16px; height: 16px; }
.nav-group.open .dropdown { opacity: 1; visibility: visible; transform: none; }
@media (hover: hover) and (min-width: 761px) {
  .nav-group:hover .dropdown { opacity: 1; visibility: visible; transform: none; }
  .nav-group:hover .nav-top svg { transform: rotate(180deg); }
}
nav .dropdown a { display: block; padding: 10px 14px; border: 0; border-radius: 12px; color: var(--ink); }
nav .dropdown a:hover, nav .dropdown a:focus-visible { background: var(--paper-2); color: var(--ink); }
nav .dropdown a[aria-current="page"] { background: var(--sap-soft); }
.dropdown strong { display: block; font-weight: 600; font-size: 1.02rem; }
.dropdown span { display: block; font-size: .88rem; color: var(--ink-soft); font-weight: 400; margin-top: 1px; }
.tools { display: flex; gap: 8px; }
.icon-btn { display: inline-flex; align-items: center; gap: 8px; height: 42px; min-width: 42px; justify-content: center; padding: 0 12px; border-radius: 999px; border: 1.5px solid var(--rule); background: var(--card); color: var(--ink); font: 500 .95rem var(--display); cursor: pointer; transition: border-color .2s, transform .2s; }
.icon-btn:hover { border-color: var(--forest); }
.icon-btn svg { width: 19px; height: 19px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; }
.icon-btn kbd { font: inherit; font-size: .8rem; color: var(--ink-soft); }
.theme-btn .sun { display: none; }
[data-theme="dark"] .theme-btn .sun { display: block; }
[data-theme="dark"] .theme-btn .moon { display: none; }
.theme-btn:hover svg { transform: rotate(25deg); transition: transform .3s; }
.menu { display: none; }

/* ---------- hero ---------- */
.hero { position: relative; min-height: calc(100svh - 70px); overflow: hidden; display: flex; align-items: flex-end; background: radial-gradient(900px 600px at 72% 40%, var(--sky-soft) 0%, transparent 70%), var(--paper); cursor: crosshair; }
#flow { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-inner { position: relative; z-index: 1; max-width: var(--wrap); width: 100%; margin: 0 auto; padding: 60px clamp(20px, 4vw, 48px) clamp(40px, 8vh, 90px); pointer-events: none; }
.hero-inner a, .hero-inner button { pointer-events: auto; }
.hello { font-family: var(--display); font-size: clamp(1.15rem, 1.8vw, 1.45rem); font-weight: 500; color: var(--forest); margin: 0 0 10px; }
.hello .wave { display: inline-block; transform-origin: 70% 70%; animation: wave 2.4s 1s ease-in-out 2; }
@keyframes wave { 0%, 60%, 100% { transform: rotate(0); } 10%, 30% { transform: rotate(14deg); } 20%, 40% { transform: rotate(-8deg); } }
.hero-name { font-size: clamp(4rem, 13.5vw, 12rem); font-weight: 800; line-height: .9; letter-spacing: 0; font-stretch: 86%; font-variation-settings: "wdth" 86, "opsz" 96; color: var(--ink); }
.hero-name .hl { color: var(--forest); }
.hero-line { font-family: var(--serif); font-size: clamp(1.25rem, 2vw, 1.6rem); line-height: 1.45; max-width: 28em; margin: 26px 0 30px; color: var(--ink-soft); }
.hero-line strong { color: var(--ink); font-weight: 600; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 0; }
.hero-legend { position: absolute; z-index: 1; right: clamp(20px, 4vw, 48px); bottom: clamp(40px, 8vh, 90px); width: 300px; padding: 18px 20px; border-radius: 18px; background: color-mix(in srgb, var(--card) 82%, transparent); backdrop-filter: blur(6px); box-shadow: var(--shadow); font-family: var(--display); font-size: 1rem; color: var(--ink-soft); pointer-events: none; }
.readout { margin: 0; display: flex; align-items: baseline; gap: 8px; }
.readout strong { color: var(--forest); font-size: 1.7rem; font-variant-numeric: tabular-nums; font-weight: 700; min-width: 3.2ch; }
.readout + .readout strong { color: #b97c0c; }
[data-theme="dark"] .readout + .readout strong { color: var(--sap); }
.hint { margin: 12px 0 0; padding-top: 12px; border-top: 1px solid var(--rule); line-height: 1.45; font-size: .95rem; }
@media (prefers-reduced-motion: no-preference) {
  .hello, .hero-name, .hero-line, .hero-actions, .hero-legend { opacity: 0; transform: translateY(20px); animation: rise .9s cubic-bezier(.2, .7, .2, 1) forwards; }
  .hero-name { animation-delay: .08s; }
  .hero-line { animation-delay: .25s; }
  .hero-actions { animation-delay: .38s; }
  .hero-legend { animation-delay: .9s; }
  .hello { animation-name: rise; }
  @keyframes rise { to { opacity: 1; transform: none; } }
}

/* ---------- shared section heads ---------- */
.band { padding: clamp(80px, 10vw, 140px) 0; }
.band.tint { background: var(--paper-2); }
.section-head { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: 40px; align-items: end; margin-bottom: 48px; }
.section-head h2, .big-h { font-size: clamp(2.6rem, 5.6vw, 4.8rem); }
.section-head p { margin: 0; max-width: 32em; color: var(--ink-soft); }

/* ---------- intro ---------- */
.intro { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
.portrait { margin: 0; position: relative; }
.portrait img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 30%; border-radius: 240px 240px 24px 24px; box-shadow: var(--shadow); }
.portrait .tag { position: absolute; left: -14px; bottom: 34px; background: var(--sap); color: #10261f; font: 700 1rem var(--display); padding: 10px 16px; border-radius: 14px; transform: rotate(-4deg); box-shadow: var(--shadow); }
.portrait .tag2 { left: auto; right: -12px; bottom: auto; top: 46px; background: var(--sky); color: #0b2430; transform: rotate(5deg); }
.intro h2 { font-size: clamp(2.6rem, 5vw, 4.4rem); margin-bottom: 26px; }
.intro p { max-width: 34em; margin: 0 0 18px; }
.intro-links { display: flex; flex-wrap: wrap; gap: 26px; font-family: var(--display); font-weight: 600; font-size: 1.08rem; margin-top: 26px !important; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 0; padding: 0; list-style: none; }
.chips li { font: 500 .95rem var(--display); padding: 6px 14px; border-radius: 999px; background: var(--paper-2); color: var(--ink); border: 1px solid var(--rule); }

/* ---------- in print ---------- */
.outlets { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.outlets a { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr) auto; gap: 28px; align-items: baseline; padding: 24px 8px; border-bottom: 1px solid var(--rule); text-decoration: none; border-radius: 10px; transition: background .25s; }
.outlet { font-family: var(--display); font-size: clamp(1.6rem, 3.2vw, 2.6rem); font-weight: 700; letter-spacing: -0.025em; line-height: 1.1; transition: transform .25s, color .25s; }
.headline { color: var(--ink-soft); font-size: 1.1rem; line-height: 1.45; }
.when { font-family: var(--display); font-size: .95rem; color: var(--ink-soft); white-space: nowrap; }
.outlets a:hover { background: var(--card); }
.outlets a:hover .outlet { color: var(--forest); transform: translateX(8px); }
.outlets a:hover .headline { color: var(--ink); }

/* ---------- mill game ---------- */
.game { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(28px, 5vw, 64px); align-items: start; }
.game-side h2 { font-size: clamp(2.4rem, 4.6vw, 4rem); margin-bottom: 20px; }
.game-side p { margin: 0 0 16px; color: var(--ink-soft); }
.game-side .small { font-size: 1rem; }
.board { position: relative; border-radius: 24px; overflow: hidden; background: var(--card); box-shadow: var(--shadow); }
#mill-canvas { width: 100%; aspect-ratio: 16 / 10; display: block; cursor: crosshair; touch-action: manipulation; }
.board-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; padding: 16px 20px; border-top: 1px solid var(--rule); font-family: var(--display); }
.score { display: flex; flex-direction: column; line-height: 1.2; }
.score span { font-size: .9rem; color: var(--ink-soft); }
.score strong { font-size: 1.5rem; font-variant-numeric: tabular-nums; }
.score.best strong { color: var(--forest); }
.verdict { flex: 1 1 220px; margin: 0; font-size: 1.05rem; font-weight: 600; }
.board-actions { display: flex; gap: 8px; }
.board-actions .btn { padding: 10px 18px; font-size: .98rem; }
.board-prompt { position: absolute; inset: 0 0 auto 0; top: 18px; display: flex; justify-content: center; pointer-events: none; }
.board-prompt span { background: var(--ink); color: var(--paper); font: 600 1rem var(--display); padding: 10px 18px; border-radius: 999px; box-shadow: var(--shadow); animation: bob 2.2s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-5px); } }
.board.played .board-prompt { display: none; }
.game-key { display: flex; flex-wrap: wrap; gap: 16px; font: 500 .95rem var(--display); color: var(--ink-soft); margin: 18px 0 0; padding: 0; list-style: none; }
.game-key i { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }

/* ---------- themes ---------- */
.themes { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(32px, 6vw, 96px); }
.themes-side { position: sticky; top: 110px; align-self: start; }
.themes-side h2 { font-size: clamp(2.4rem, 4.6vw, 4rem); margin-bottom: 20px; }
.themes-side p { color: var(--ink-soft); margin: 0 0 20px; }
.theme { padding: 0 0 44px; margin-bottom: 44px; border-bottom: 1px solid var(--rule); }
.theme:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
.theme-num { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: var(--sap-soft); color: #9a6508; font: 700 1.1rem var(--display); margin-bottom: 16px; }
[data-theme="dark"] .theme-num { color: var(--sap); }
.theme h3 { font-size: clamp(1.7rem, 2.8vw, 2.3rem); margin-bottom: 14px; }
.theme p { margin: 0 0 18px; max-width: 38em; }
.paper { display: flex; flex-direction: column; gap: 3px; padding: 16px 20px; margin-top: 10px; background: var(--card); border: 1px solid var(--rule); border-left: 4px solid var(--forest); border-radius: 0 14px 14px 0; text-decoration: none; transition: transform .2s, box-shadow .2s; }
.paper:hover { transform: translateX(4px); box-shadow: var(--shadow); color: inherit; }
.paper-venue { font-family: var(--display); font-size: .92rem; color: var(--ink-soft); }
.paper-title { font-size: 1.08rem; line-height: 1.4; }
.wip { display: flex; flex-direction: column; gap: 3px; padding: 14px 20px; margin: 10px 0 0; border: 1px dashed var(--rule); border-left: 4px dashed var(--sap); border-radius: 0 14px 14px 0; color: var(--ink-soft); }
.wip-stage { font-family: var(--display); font-size: .92rem; color: var(--ink-soft); }
.wip-stage::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: var(--sap); vertical-align: 1px; }

/* ---------- atlas ---------- */
.atlas-wrap { position: relative; border-radius: 24px; overflow: hidden; background: var(--sea); box-shadow: var(--shadow); }
#atlas { width: 100%; height: min(68vh, 600px); display: block; touch-action: pan-y; }
#atlas .land { fill: var(--land); stroke: var(--land-line); stroke-width: .6; }
#atlas .state { fill: none; stroke: var(--land-line); stroke-width: .4; }
#atlas .grat { fill: none; stroke: var(--rule); stroke-width: .5; stroke-dasharray: 2 3; }
#atlas .pin { cursor: pointer; transition: r .2s; }
#atlas .country { font: 600 13px var(--display); fill: var(--ink-soft); text-anchor: middle; letter-spacing: .08em; opacity: .7; pointer-events: none; }
#atlas .pin circle.halo { opacity: .25; }
#atlas .pin:hover circle.core, #atlas .pin:focus circle.core { stroke-width: 3; }
.atlas-controls { position: absolute; top: 16px; left: 16px; display: flex; flex-wrap: wrap; gap: 6px; }
.atlas-controls button { font: 600 .95rem var(--display); padding: 8px 14px; border-radius: 999px; border: 0; background: var(--card); color: var(--ink); box-shadow: var(--shadow); cursor: pointer; }
.atlas-controls button[aria-pressed="true"] { background: var(--forest); color: var(--paper); }
.atlas-legend { position: absolute; right: 16px; bottom: 16px; display: flex; gap: 14px; padding: 10px 14px; border-radius: 14px; background: color-mix(in srgb, var(--card) 88%, transparent); font: 500 .92rem var(--display); color: var(--ink-soft); }
.atlas-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }
.pop { position: absolute; z-index: 3; width: min(340px, calc(100% - 32px)); background: var(--card); color: var(--ink); border-radius: 16px; box-shadow: var(--shadow); padding: 16px 18px 14px; font-family: var(--display); font-size: .98rem; transform: translate(-50%, calc(-100% - 18px)); }
.pop[hidden] { display: none; }
.pop strong { display: block; font-size: 1.15rem; margin-right: 26px; }
.pop .pop-kind { display: block; color: var(--ink-soft); font-size: .9rem; margin-bottom: 6px; }
.pop p { margin: 4px 0; }
.pop ul { margin: 8px 0 0; padding-left: 18px; }
.pop li { margin-bottom: 5px; line-height: 1.35; }
.pop .x { position: absolute; top: 8px; right: 8px; width: 30px; height: 30px; border-radius: 50%; border: 0; background: var(--paper-2); color: var(--ink); cursor: pointer; font-size: 1rem; }

/* ---------- journey ---------- */
.journey ol { list-style: none; margin: 48px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); position: relative; }
.journey ol::before { content: ""; position: absolute; left: 0; right: 0; top: 46px; height: 3px; border-radius: 3px; background: linear-gradient(90deg, var(--sky), var(--forest), var(--sap)); }
.journey li { padding: 0 22px 0 0; position: relative; }
.journey li::before { content: ""; position: absolute; top: 39px; left: 0; width: 17px; height: 17px; border-radius: 50%; background: var(--paper); border: 3px solid var(--forest); }
.j-year { display: block; font-family: var(--display); font-size: 1.8rem; font-weight: 800; color: var(--forest); margin-bottom: 30px; }
.j-place { display: block; font-family: var(--display); font-weight: 700; font-size: 1.12rem; margin-bottom: 6px; }
.journey p { margin: 0; font-size: 1.02rem; color: var(--ink-soft); line-height: 1.5; }

/* ---------- photo strip ---------- */
.strip-head { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; margin-bottom: 30px; }
.strip-head h2 { font-size: clamp(2.2rem, 4.4vw, 3.6rem); }
.strip-head a { font-family: var(--display); font-weight: 600; font-size: 1.08rem; }
.strip-track { --edge: calc(max((100vw - var(--wrap)) / 2, 0px) + clamp(20px, 4vw, 48px)); display: flex; gap: 16px; overflow-x: auto; padding: 0 var(--edge) 14px; scroll-padding-left: var(--edge); scroll-snap-type: x proximity; scrollbar-width: thin; }
.strip-item { flex: 0 0 auto; scroll-snap-align: start; border-radius: 18px; overflow: hidden; }
.strip-item img { height: clamp(240px, 32vw, 400px); width: auto; object-fit: cover; transition: transform .5s; }
.strip-item:hover img { transform: scale(1.04); }
.strip-item:nth-child(3n+2) { margin-top: 40px; }

/* ---------- contact ---------- */
.contact h2 { font-size: clamp(3rem, 8vw, 6.6rem); margin-bottom: 18px; }
.contact p { max-width: 34em; color: var(--ink-soft); }
.mail { display: inline-block; margin-top: 12px; font-family: var(--display); font-size: clamp(1.4rem, 3.6vw, 2.6rem); font-weight: 700; letter-spacing: -0.02em; overflow-wrap: anywhere; }

/* ---------- planted forest + footer ---------- */
.grove { position: relative; height: 150px; background: linear-gradient(180deg, transparent, var(--paper-2)); cursor: pointer; }
#grove-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.grove-note { position: absolute; left: 50%; top: 18px; transform: translateX(-50%); margin: 0; font: 500 .95rem var(--display); color: var(--ink-soft); pointer-events: none; text-align: center; white-space: nowrap; }
.grove-note strong { color: var(--forest); }
.foot { background: var(--forest-deep); color: #d9e8de; padding: 56px 0 28px; font-family: var(--display); font-size: 1.05rem; }
[data-theme="dark"] .foot { background: #08130f; }
.foot-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 32px; }
.foot-name { font-size: 1.6rem; font-weight: 700; color: #fff; margin: 0 0 6px; }
.foot-line { margin: 0; max-width: 26em; }
.foot-links { display: grid; grid-template-columns: repeat(2, auto); gap: 10px 36px; align-content: start; }
.foot a { color: #fff; text-decoration-color: rgba(233, 169, 44, .7); }
.foot a:hover { color: var(--sap); }
.foot-small { margin-top: 40px; font-size: .92rem; color: #a7c1b2; }

/* ---------- search palette ---------- */
.palette { position: fixed; inset: 0; z-index: 90; background: rgba(8, 20, 15, .45); backdrop-filter: blur(3px); display: flex; justify-content: center; align-items: flex-start; padding: 12vh 16px 16px; }
.palette[hidden] { display: none; }
.palette-box { width: min(640px, 100%); background: var(--card); border-radius: 20px; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .5); overflow: hidden; }
.palette input { width: 100%; border: 0; border-bottom: 1px solid var(--rule); padding: 20px 22px; font: 500 1.2rem var(--display); background: transparent; color: var(--ink); outline: none; }
.palette ul { list-style: none; margin: 0; padding: 8px; max-height: 52vh; overflow: auto; }
.palette li a { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 12px; text-decoration: none; }
.palette li a .k { font: 600 .85rem var(--display); color: var(--forest); }
.palette li a .t { font: 500 1.05rem var(--display); color: var(--ink); line-height: 1.3; }
.palette li[aria-selected="true"] a, .palette li a:hover { background: var(--paper-2); }
.palette .empty { padding: 18px; color: var(--ink-soft); font-family: var(--display); }
.palette-foot { padding: 10px 18px; border-top: 1px solid var(--rule); font: .88rem var(--display); color: var(--ink-soft); }

/* ---------- inner pages ---------- */
.page-head { padding-top: clamp(56px, 8vw, 110px); padding-bottom: clamp(28px, 4vw, 48px); }
.page-head h1 { font-size: clamp(3.2rem, 8vw, 6.8rem); margin-bottom: 20px; letter-spacing: -0.04em; }
.item .page-head h1 { font-size: clamp(2.2rem, 4.8vw, 3.6rem); letter-spacing: -0.025em; line-height: 1.1; }
.lede { font-size: 1.28rem; max-width: 36em; color: var(--ink-soft); margin: 0 0 24px; }
.back { display: inline-block; font-family: var(--display); font-weight: 600; font-size: 1.02rem; margin-bottom: 24px; color: var(--ink-soft); }
.back::before { content: "← "; }
.item-meta { display: flex; flex-wrap: wrap; gap: 6px 22px; font-family: var(--display); font-size: 1.05rem; color: var(--ink-soft); margin: 0 0 26px; }
.read-time { color: var(--forest); font-weight: 600; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.filter { font: 500 1.02rem var(--display); color: var(--ink); background: var(--card); border: 1.5px solid var(--rule); border-radius: 999px; padding: 9px 18px; cursor: pointer; transition: border-color .2s, background .2s; }
.filter span { color: var(--ink-soft); font-size: .9rem; margin-left: 6px; }
.filter:hover { border-color: var(--forest); }
.filter[aria-pressed="true"] { background: var(--forest); border-color: var(--forest); color: var(--paper); }
.filter[aria-pressed="true"] span { color: var(--sap-soft); }

.entries { list-style: none; margin: 0 0 80px; padding: 0; border-top: 2px solid var(--ink); }
.entry { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: 24px; padding: 26px 0; border-bottom: 1px solid var(--rule); align-items: start; }
.entry[hidden] { display: none; }
.entry-year { font-family: var(--display); font-weight: 800; font-size: 1.45rem; color: var(--forest); }
.entry-main { display: flex; flex-direction: column; gap: 5px; }
.entry-kind { font-family: var(--display); font-size: .95rem; font-weight: 600; }
.k-article { color: var(--forest); } .k-thesis { color: #2a7ea3; } .k-oped { color: #a86d06; } .k-essay { color: #7b5ea7; } .k-contribution { color: var(--ink-soft); }
[data-theme="dark"] .k-thesis { color: var(--sky); } [data-theme="dark"] .k-oped { color: var(--sap); } [data-theme="dark"] .k-essay { color: #c3a9ec; }
.entry-title { font-size: 1.28rem; line-height: 1.4; text-decoration: none; font-weight: 600; }
.entry-title:hover { text-decoration: underline; text-decoration-color: var(--sap); }
.entry-venue { color: var(--ink-soft); font-style: italic; font-size: 1.08rem; }
.entry-sum { color: var(--ink-soft); font-size: 1.05rem; margin: 4px 0 0; max-width: 46em; }
.entry-out { font-family: var(--display); font-weight: 600; font-size: 1rem; padding: 8px 16px; border: 1.5px solid var(--rule); border-radius: 999px; text-decoration: none; white-space: nowrap; background: var(--card); }
.entry-out:hover { border-color: var(--sap); }
.year-block { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 24px; }
.year { font-size: 3.2rem; color: var(--paper-3); -webkit-text-stroke: 1.5px var(--forest); position: sticky; top: 100px; align-self: start; padding-top: 18px; }
.year-block .entries { margin-bottom: 40px; }

.research-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 20px; margin: 12px 0 72px; }
.r-card { background: var(--card); border: 1px solid var(--rule); border-radius: 22px; padding: 28px; display: flex; flex-direction: column; gap: 12px; }
.r-card h2 { font-size: 1.7rem; }
.r-card p { margin: 0; color: var(--ink-soft); font-size: 1.08rem; }
.tools-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 28px; margin: 24px 0 80px; }
.tools-list h3 { font-size: 1.3rem; margin-bottom: 12px; }
.tools-list ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tools-list li { font: 500 1rem var(--display); padding: 7px 14px; border-radius: 999px; background: var(--paper-2); border: 1px solid var(--rule); }

.prose { padding-bottom: 90px; }
.prose p, .prose li { max-width: 40em; }
.prose h2 { font-size: 1.9rem; margin: 2em 0 .6em; }
.prose h3 { font-size: 1.45rem; margin: 1.8em 0 .5em; }
.prose img { border-radius: 14px; margin: 14px 0; cursor: zoom-in; display: inline-block; max-width: 100%; }
.prose p:has(img) { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; max-width: none; }
.prose p:has(img) img { width: 100%; height: 100%; object-fit: cover; margin: 0; }
.prose blockquote { margin: 1.5em 0; padding: 6px 0 6px 22px; border-left: 4px solid var(--sap); font-size: 1.25rem; }
.essay-page .prose { font-size: 1.24rem; line-height: 1.75; }
.essay-page .prose > p:first-of-type::first-letter { font-family: var(--display); font-weight: 800; float: left; font-size: 4.4em; line-height: .82; padding: 6px 10px 0 0; color: var(--forest); }
.citation { margin-top: 40px; padding: 18px 20px; background: var(--paper-2); border-radius: 14px; font-size: 1.02rem; }
.progress { position: fixed; top: 0; left: 0; height: 4px; width: 0; z-index: 50; background: linear-gradient(90deg, var(--forest), var(--sap)); }

.album-index { display: flex; flex-wrap: wrap; gap: 10px; font-family: var(--display); font-size: 1rem; }
.album-index a { text-decoration: none; padding: 6px 14px; border-radius: 999px; background: var(--paper-2); border: 1px solid var(--rule); color: var(--ink); }
.album-index a:hover { border-color: var(--forest); }
.group { padding-top: 40px; }
.group-title { font-size: clamp(2rem, 3.8vw, 3rem); padding-bottom: 14px; border-bottom: 2px solid var(--ink); margin-bottom: 36px; }
.album { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(24px, 4vw, 56px); margin-bottom: 72px; scroll-margin-top: 100px; }
.album-text h3 { font-size: 1.6rem; margin-bottom: 12px; line-height: 1.2; }
.album-text p { font-size: 1.06rem; color: var(--ink-soft); margin: 0 0 10px; }
.album-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; align-content: start; }
.album-grid a { display: block; border-radius: 12px; overflow: hidden; aspect-ratio: 4 / 3; }
.album-grid a:first-child { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; }
.album-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease, filter .4s; }
.album-grid a:hover img { transform: scale(1.04); filter: saturate(1.12); }

.cv { padding-bottom: 90px; }
.cv-section { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); gap: 32px; padding: 34px 0; border-top: 1px solid var(--rule); }
.cv-section h2 { font-size: 1.55rem; position: sticky; top: 100px; align-self: start; color: var(--forest); }
.cv-body ul { margin: 0; padding-left: 0; list-style: none; }
.cv-body li { margin-bottom: 12px; padding-left: 20px; position: relative; }
.cv-body li::before { content: ""; position: absolute; left: 0; top: .72em; width: 8px; height: 8px; border-radius: 50%; background: var(--sap); }
.cv-body li li::before { background: transparent; border: 2px solid var(--sap); }
.cv-body ul ul { margin-top: 6px; }
.cv-body p { margin: 0; }

/* ---------- photo viewer ---------- */
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(6, 14, 10, .94); display: grid; place-items: center; }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 92vw; max-height: 86vh; width: auto; border-radius: 10px; }
.lightbox button { position: absolute; background: rgba(255, 255, 255, .1); color: #fff; border: 0; border-radius: 999px; font: 600 1.05rem var(--display); cursor: pointer; }
.lightbox button:hover { background: rgba(255, 255, 255, .2); }
.lb-close { top: 18px; right: 18px; padding: 10px 18px; }
.lb-prev, .lb-next { top: 50%; transform: translateY(-50%); width: 54px; height: 54px; font-size: 1.9rem !important; }
.lb-prev { left: 16px; } .lb-next { right: 16px; }
.lb-count { position: absolute; bottom: 14px; left: 0; right: 0; text-align: center; color: #c6d3c4; font-family: var(--display); margin: 0; }
body.lb-open, body.pal-open { overflow: hidden; }

/* ---------- small screens ---------- */
@media (max-width: 1000px) {
  nav { gap: 14px; font-size: 1.02rem; }
  .icon-btn kbd, .icon-btn .lbl { display: none; }
}
@media (max-width: 900px) {
  .intro, .themes, .section-head, .album, .cv-section, .year-block, .game { grid-template-columns: 1fr; }
  .themes-side, .year, .cv-section h2 { position: static; }
  .portrait { max-width: 420px; }
  .outlets a { grid-template-columns: 1fr; gap: 6px; }
  .hero { flex-direction: column; justify-content: flex-end; align-items: stretch; }
  .hero-legend { position: relative; right: auto; bottom: auto; width: auto; margin: -10px clamp(20px, 4vw, 48px) 32px; }
  .journey ol { grid-template-columns: 1fr; gap: 28px; padding-left: 32px; }
  .journey ol::before { left: 7px; right: auto; top: 0; bottom: 0; width: 3px; height: auto; background: linear-gradient(180deg, var(--sky), var(--forest), var(--sap)); }
  .journey li::before { left: -32px; top: 10px; }
  .j-year { margin-bottom: 4px; }
  .year { font-size: 2.2rem; padding-top: 0; }
}
@media (max-width: 760px) {
  body { font-size: 1.08rem; }
  .menu { display: inline-flex; }
  nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; gap: 0; background: var(--card); padding: 8px clamp(20px, 4vw, 48px) 20px; box-shadow: var(--shadow); }
  nav a { padding: 14px 0; border-bottom: 1px solid var(--rule); font-size: 1.25rem; color: var(--ink); }
  body.menu-open nav { display: flex; max-height: calc(100svh - 80px); overflow-y: auto; }
  .nav-top { pointer-events: none; padding: 18px 0 4px; font-size: .82rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; border: 0; color: var(--ink-soft); }
  .nav-top svg { display: none; }
  .dropdown { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; background: none; padding: 0; min-width: 0; }
  .dropdown::before { display: none; }
  nav .dropdown a { padding: 10px 0; border-radius: 0; border-bottom: 1px solid var(--rule); }
  nav .dropdown a:hover { background: none; }
  .dropdown strong { font-size: 1.15rem; }
  .dropdown span { display: none; }
  .mark-name { display: none; }
  .entry { grid-template-columns: 1fr; gap: 6px; }
  .entry-out { justify-self: start; }
  .strip-item:nth-child(3n+2) { margin-top: 0; }
  .atlas-legend { display: none; }
  #atlas { height: 460px; }
  .grove-note { white-space: normal; width: 90%; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before { transition: none !important; animation: none !important; }
}

/* ---------- visitors around the world (globe.js) ---------- */
.night { background: radial-gradient(120% 95% at 72% 45%, #4f9e7f 0%, #31795f 55%, #26654f 100%); color: #fff; }
[data-theme="dark"] .night { background: radial-gradient(120% 95% at 72% 45%, #2f7660 0%, #1d5242 60%, #163f33 100%); }
.vhome { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
.vhome h2 { font-size: clamp(2.4rem, 5vw, 4.2rem); color: #fff; }
.vhome-count { font-family: var(--display); font-size: clamp(1.45rem, 2.5vw, 2rem); margin: 26px 0 2px; color: #fff; }
.vhome-count strong { color: #ffd57a; font-variant-numeric: tabular-nums; }
.vhome-extra { font-family: var(--display); color: #dcebe3; margin: 0 0 20px; }
.vhome-text > p:not(.vhome-count):not(.vhome-extra) { color: #eef6f1; max-width: 30em; margin: 0 0 28px; }
.vglobe-box { width: 100%; max-width: 580px; aspect-ratio: 1; justify-self: center; }
.vglobe { width: 100%; height: 100%; display: block; cursor: grab; touch-action: pan-y; -webkit-tap-highlight-color: transparent; }
.vglobe.grabbing { cursor: grabbing; }

.vpage { padding-bottom: clamp(70px, 9vw, 130px); }
.vcards { list-style: none; padding: 0; margin: 0 0 18px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.vcards li { background: var(--card); border-radius: 18px; padding: 18px 22px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 2px; }
.vcards span { font: 600 .95rem var(--display); color: var(--ink-soft); }
.vcards strong { font: 700 clamp(2rem, 3.6vw, 2.8rem)/1.1 var(--display); color: var(--forest); font-variant-numeric: tabular-nums; }
.vnote { color: var(--ink-soft); font-size: 1rem; max-width: 52em; margin: 0 0 12px; }
.vfilter { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; margin: 30px 0 6px; }
.vfilter label { display: flex; flex-direction: column; gap: 6px; font: 600 .92rem var(--display); color: var(--ink-soft); }
.vfilter input { font: 500 1rem var(--display); padding: 10px 12px; border-radius: 12px; border: 1px solid var(--rule); background: var(--card); color: var(--ink); }
.vfilter .btn { padding: 11px 18px; font-size: .98rem; }
.vstatus { font-family: var(--display); margin: 10px 0 22px; }
.vglobe-card { position: relative; border-radius: 24px; overflow: hidden; box-shadow: var(--shadow); padding: clamp(10px, 2.5vw, 28px); }
.vglobe.big { height: min(76vh, 680px); }
.vglobe-tip { position: absolute; transform: translate(-50%, calc(-100% - 14px)); background: #fff; color: #10261f; font: 600 .92rem var(--display); padding: 6px 11px; border-radius: 10px; pointer-events: none; white-space: nowrap; box-shadow: 0 8px 24px -8px rgba(0, 0, 0, .5); }
.vglobe-hint { position: absolute; left: 22px; bottom: 14px; margin: 0; color: #e3efe8; font: 500 .9rem var(--display); pointer-events: none; }
.vtables { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 36px 40px; margin-top: 52px; align-items: start; }
.vtable.full { grid-column: 1 / -1; }
.vtable h2 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); margin-bottom: 14px; }
.vtable table { width: 100%; border-collapse: collapse; font-family: var(--display); font-size: .98rem; }
.vtable th { text-align: left; font-weight: 600; color: var(--ink-soft); border-bottom: 2px solid var(--rule); padding: 8px 10px; }
.vtable td { padding: 8px 10px; border-bottom: 1px solid var(--rule); }
.vtable .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.vtable .date { white-space: nowrap; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.vtable .empty { color: var(--ink-soft); font-style: italic; }
.vtable .bar { display: inline-block; height: 8px; border-radius: 4px; background: var(--sap); margin-right: 10px; vertical-align: middle; }
.btn.small { padding: 8px 16px; font-size: .95rem; margin-top: 14px; }
.vignore { display: flex; gap: 10px; align-items: center; margin-top: 52px; font: 500 1rem var(--display); color: var(--ink-soft); cursor: pointer; }
.vignore input { width: 18px; height: 18px; accent-color: var(--forest); }
@media (max-width: 900px) {
  .vhome, .vtables { grid-template-columns: 1fr; }
  .vcards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .vtable { overflow-x: auto; }
  .vglobe.big { height: 380px; }
  .vglobe-hint { display: none; }
}

/* ---------- people: mentors and collaborators ---------- */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[data-accent="forest"] { --acc: var(--forest); --acc-ink: #fff; --acc-soft: color-mix(in srgb, var(--forest) 14%, transparent); }
[data-accent="sap"] { --acc: var(--sap); --acc-ink: #10261f; --acc-soft: color-mix(in srgb, var(--sap) 22%, transparent); }
[data-accent="sky"] { --acc: var(--sky); --acc-ink: #10261f; --acc-soft: color-mix(in srgb, var(--sky) 20%, transparent); }
[data-theme="dark"] [data-accent="forest"] { --acc-ink: #0d1c17; }
.pstats { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-wrap: wrap; gap: 10px 28px; font-family: var(--display); color: var(--ink-soft); }
.pstats strong { font-size: 1.6rem; color: var(--forest); margin-right: 6px; }
.pchapter { padding: clamp(56px, 7vw, 96px) 0; border-top: 1px solid var(--rule); }
.pchapter:nth-child(even) { background: var(--paper-2); }
.pchapter-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
.prail { position: sticky; top: 100px; }
.pnum { display: block; font: 800 clamp(4rem, 8vw, 6.5rem)/0.9 var(--display); color: transparent; -webkit-text-stroke: 2px var(--acc); letter-spacing: -0.04em; margin-bottom: 14px; }
.pyears { font: 700 .95rem var(--display); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); margin: 0 0 6px; }
.prail h2 { font-size: clamp(2rem, 3.6vw, 3rem); margin-bottom: 16px; }
.plab { font: 600 1.12rem/1.35 var(--display); margin: 0 0 12px; }
.plab span { font-weight: 500; color: var(--ink-soft); font-size: 1rem; }
.prole { display: inline-block; font: 600 .9rem var(--display); background: var(--acc-soft); color: var(--ink); padding: 6px 12px; border-radius: 999px; margin: 0 0 16px; }
.ptextrail { color: var(--ink-soft); font-size: 1.05rem; margin: 0; }
.pgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.pgrid.three { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.pcard { position: relative; display: flex; flex-direction: column; background: var(--card); border-radius: 22px; padding: 24px; box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s; }
.pcard .plink { margin-top: auto; }
.phead { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 16px; align-items: center; margin-bottom: 14px; }
.phead .ptitle { margin: 0; }
.pcard:hover { transform: translateY(-3px); }
.pcard.lead { grid-column: 1 / -1; display: grid; grid-template-columns: 148px minmax(0, 1fr); gap: 28px; align-items: start; padding: 30px; overflow: hidden; }
.pcard.lead::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 5px; background: var(--acc); }
.pphoto { width: 100%; aspect-ratio: 1; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: radial-gradient(circle at 30% 25%, color-mix(in srgb, var(--acc) 70%, #fff), var(--acc)); box-shadow: 0 0 0 4px var(--card), 0 0 0 6px var(--acc-soft); }
.pphoto img { width: 100%; height: 100%; object-fit: cover; }
.pphoto span { font: 700 1.55rem var(--display); color: var(--acc-ink); letter-spacing: .02em; }
.pcard.lead .pphoto span { font-size: 2.6rem; }
.ptag { display: inline-block; font: 700 .78rem var(--display); letter-spacing: .1em; text-transform: uppercase; background: var(--acc); color: var(--acc-ink); padding: 4px 10px; border-radius: 999px; margin-bottom: 10px; }
.pcard h3 { font-size: 1.4rem; margin-bottom: 6px; }
.pcard.lead h3 { font-size: clamp(1.7rem, 2.6vw, 2.2rem); }
.ptitle { font: 500 .95rem/1.4 var(--display); color: var(--ink-soft); margin: 0 0 10px; }
.ptext { font-size: 1.02rem; line-height: 1.55; margin: 0 0 12px; }
.plink { font: 600 .98rem var(--display); color: var(--forest); text-decoration: none; }
.plink:hover { text-decoration: underline; }
.pstrip { display: flex; align-items: center; gap: 22px; margin-top: clamp(48px, 6vw, 72px); padding: 18px 26px 18px 18px; background: var(--card); border-radius: 999px; box-shadow: var(--shadow); text-decoration: none; max-width: 860px; transition: transform .2s; }
.pstrip:hover { transform: translateY(-2px); color: inherit; }
.pstrip-faces { display: flex; flex: none; }
.pface { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; overflow: hidden; font: 700 .82rem var(--display); background: var(--acc); color: var(--acc-ink); box-shadow: 0 0 0 3px var(--card); }
.pface + .pface { margin-left: -6px; }
.pface img { width: 100%; height: 100%; object-fit: cover; }
.pstrip-text { font-family: var(--display); color: var(--ink-soft); line-height: 1.35; }
.pstrip-text strong { display: block; color: var(--ink); font-size: 1.15rem; }
@media (max-width: 1000px) { .pgrid.three { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) {
  .pchapter-grid { grid-template-columns: 1fr; }
  .prail { position: static; }
}
@media (max-width: 640px) {
  .pgrid, .pgrid.three { grid-template-columns: 1fr; }
  .pcard { padding: 20px; }
  .pcard.lead { grid-template-columns: 72px minmax(0, 1fr); padding: 22px; gap: 16px; }
  .pcard.lead .pphoto span { font-size: 1.5rem; }
  .pstrip { border-radius: 24px; flex-direction: column; align-items: flex-start; }
}

/* ---------- Bluesky page (bluesky.js) ---------- */
.bsky { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(28px, 5vw, 72px); align-items: start; padding-bottom: clamp(70px, 9vw, 130px); }
.bsky-profile { position: sticky; top: 100px; background: var(--card); border-radius: 24px; padding: 28px; box-shadow: var(--shadow); }
.bsky-big-av { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; margin-bottom: 16px; box-shadow: 0 0 0 4px var(--card), 0 0 0 6px var(--sky-soft); }
.bsky-name { font: 700 1.6rem/1.15 var(--display); margin: 0; }
.bsky-handle { font: 500 1rem var(--display); color: var(--ink-soft); margin: 2px 0 14px; }
.bsky-bio { font-size: 1.02rem; margin: 0 0 12px; white-space: pre-line; }
.bsky-bio:empty, .bsky-stats:empty { display: none; }
.bsky-stats { font: 500 .95rem var(--display); color: var(--ink-soft); margin: 0 0 20px; }
.bsky-profile .btn { background: #1185fe; }
.bsky-profile .btn:hover { background: #0a6fd6; }
.bsky-logo { width: 20px; height: 18px; fill: currentColor; }
.bsky-posts { display: flex; flex-direction: column; gap: 18px; }
.bsky-post { background: var(--card); border-radius: 20px; padding: 20px 22px; box-shadow: var(--shadow); }
.bsky-repost { font: 600 .85rem var(--display); color: var(--ink-soft); margin: 0 0 8px; }
.bsky-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.bsky-av { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; }
.bsky-who { display: flex; flex-direction: column; line-height: 1.2; font-family: var(--display); }
.bsky-who span { color: var(--ink-soft); font-size: .9rem; }
.bsky-text { margin: 0 0 12px; font-size: 1.06rem; overflow-wrap: anywhere; }
.bsky-text a { color: var(--forest); }
.bsky-imgs { display: grid; gap: 4px; border-radius: 14px; overflow: hidden; margin-bottom: 12px; }
.bsky-imgs.n2, .bsky-imgs.n4 { grid-template-columns: 1fr 1fr; }
.bsky-imgs.n3 { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; }
.bsky-imgs.n3 a:first-child { grid-row: span 2; }
.bsky-imgs img { width: 100%; height: 100%; max-height: 460px; object-fit: cover; }
.bsky-imgs.n2 img, .bsky-imgs.n3 img, .bsky-imgs.n4 img { aspect-ratio: 4 / 3; }
.bsky-video { position: relative; display: block; border-radius: 14px; overflow: hidden; margin-bottom: 12px; background: #000; }
.bsky-video img { width: 100%; max-height: 420px; object-fit: cover; opacity: .85; }
.bsky-play { position: absolute; left: 14px; bottom: 14px; font: 600 .95rem var(--display); color: #fff; background: rgba(0, 0, 0, .6); padding: 6px 12px; border-radius: 999px; }
.bsky-card { display: grid; grid-template-columns: 120px minmax(0, 1fr); border: 1px solid var(--rule); border-radius: 14px; overflow: hidden; text-decoration: none; margin-bottom: 12px; }
.bsky-card:not(:has(img)) { grid-template-columns: 1fr; }
.bsky-card img { width: 100%; height: 100%; object-fit: cover; }
.bsky-card-body { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; font-family: var(--display); }
.bsky-card-host { font-size: .82rem; color: var(--ink-soft); }
.bsky-card strong { font-size: 1rem; line-height: 1.3; }
.bsky-card-desc { font-size: .88rem; color: var(--ink-soft); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bsky-quote { display: block; border: 1px solid var(--rule); border-radius: 14px; padding: 12px 14px; text-decoration: none; margin-bottom: 12px; }
.bsky-quote-who { display: block; font: 600 .9rem var(--display); color: var(--ink-soft); white-space: pre; }
.bsky-quote-text { display: block; font-size: .98rem; margin-top: 4px; }
.bsky-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; font: 500 .92rem var(--display); color: var(--ink-soft); }
.bsky-date { color: var(--ink-soft); text-decoration: none; }
.bsky-date:hover { color: var(--forest); text-decoration: underline; }
.bsky-counts { display: flex; gap: 16px; }
.bsky-status { font-family: var(--display); color: var(--ink-soft); margin: 18px 0; }
.bsky-status:empty { display: none; }
.bsky-error { margin: 0; }
#bsky-more { margin-top: 18px; }
@media (max-width: 900px) {
  .bsky { grid-template-columns: 1fr; }
  .bsky-profile { position: static; }
}
@media (max-width: 640px) {
  .bsky-card { grid-template-columns: 1fr; }
  .bsky-card img { max-height: 180px; }
}

/* ---------- moving map: journey route and pulsing pins (atlas.js) ---------- */
#atlas .route, #atlas .route-fx { pointer-events: none; }
#atlas .route-leg { fill: none; stroke: var(--forest); stroke-width: 1.8; stroke-linecap: round; stroke-dasharray: 1 6; opacity: .75; }
#atlas .route-tail { fill: none; stroke: var(--sap); stroke-width: 3.2; stroke-linecap: round; opacity: .9; }
#atlas .traveler-glow { fill: var(--sap); opacity: .3; }
#atlas .traveler { fill: #fff; stroke: var(--sap); stroke-width: 2.5; }
#atlas .ping { fill: none; stroke: var(--sap); stroke-width: 2.5; transform-box: fill-box; transform-origin: center; animation: atlas-ping 1.6s ease-out forwards; }
#atlas .stop-tag { animation: atlas-tag 2.6s ease forwards; }
#atlas .stop-tag rect { fill: var(--card); stroke: var(--sap); stroke-width: 1.5; }
#atlas .stop-tag text { font: 600 12.5px var(--display); fill: var(--ink); }
.atlas-legend .route-key { width: 22px; height: 0; border-radius: 0; border-top: 3px dotted var(--forest); background: none; vertical-align: 3px; }
@media (prefers-reduced-motion: no-preference) {
  #atlas .route-leg { animation: atlas-flow 1.1s linear infinite; }
  #atlas .pin circle.halo { transform-box: fill-box; transform-origin: center; animation: atlas-pulse 3s ease-out infinite; animation-delay: var(--d, 0s); }
}
@keyframes atlas-flow { to { stroke-dashoffset: -7; } }
@keyframes atlas-pulse { 0% { transform: scale(.55); opacity: .5; } 75% { opacity: 0; } 100% { transform: scale(1.7); opacity: 0; } }
@keyframes atlas-ping { from { transform: scale(.6); opacity: 1; } to { transform: scale(3.2); opacity: 0; } }
@keyframes atlas-tag { 0% { opacity: 0; transform: translateY(6px); } 12%, 75% { opacity: 1; transform: none; } 100% { opacity: 0; } }

/* ---------- citation counts (OpenAlex) ---------- */
.cited { display: inline-block; margin-left: 12px; padding: 2px 10px; border-radius: 999px; background: var(--sap-soft); color: var(--ink); font: 600 .85rem var(--display); text-decoration: none; vertical-align: 2px; white-space: nowrap; }
.cited:hover { background: var(--sap); color: #10261f; }
.cite-total { font-family: var(--display); color: var(--ink-soft); margin: -8px 0 24px; }

/* ---------- latest news strip (home) ---------- */
.latest { border-bottom: 1px solid var(--rule); background: var(--card); }
.latest-inner { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 28px; align-items: center; padding-top: 22px; padding-bottom: 22px; }
.latest-label { display: flex; align-items: center; gap: 10px; font: 800 .95rem var(--display); letter-spacing: .14em; text-transform: uppercase; color: var(--forest); margin: 0; }
.live { width: 9px; height: 9px; border-radius: 50%; background: var(--sap); box-shadow: 0 0 0 0 var(--sap); animation: live 2.4s ease-out infinite; }
@keyframes live { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--sap) 60%, transparent); } 80%, 100% { box-shadow: 0 0 0 10px transparent; } }
.latest-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.latest-list a { display: flex; flex-direction: column; gap: 2px; padding: 8px 14px; border-left: 3px solid var(--rule); text-decoration: none; transition: border-color .2s; }
.latest-list a:hover { border-left-color: var(--sap); }
.latest-meta { font: 600 .82rem var(--display); color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.latest-text { font: 600 1rem/1.3 var(--display); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.latest-all { font: 600 .98rem var(--display); color: var(--forest); text-decoration: none; white-space: nowrap; }
.latest-all:hover { text-decoration: underline; }
@media (max-width: 1000px) {
  .latest-inner { grid-template-columns: 1fr; gap: 12px; }
  .latest-list { grid-template-columns: 1fr; gap: 6px; }
}

/* ---------- news and media page ---------- */
.news-list .entry-year { font-size: 1.05rem; font-weight: 700; white-space: nowrap; }
.entry-kind.nk-paper { color: var(--forest); }
.entry-kind.nk-oped { color: #b77d0a; }
[data-theme="dark"] .entry-kind.nk-oped { color: var(--sap); }
.entry-kind.nk-talk { color: #2f7ea0; }
[data-theme="dark"] .entry-kind.nk-talk { color: var(--sky); }

/* ---------- awards page ---------- */
.awards-wrap { padding-bottom: clamp(70px, 9vw, 130px); }
.aw-year { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 32px; padding: 28px 0; border-top: 1px solid var(--rule); }
.aw-y { font: 800 clamp(2rem, 4vw, 3rem)/1 var(--display); color: var(--forest); }
.aw-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.aw-card { position: relative; background: var(--card); border-radius: 18px; padding: 20px 22px 18px; box-shadow: var(--shadow); overflow: hidden; }
.aw-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--acc); }
.aw-kind { font: 700 .75rem var(--display); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); }
.aw-card h3 { font-size: 1.25rem; line-height: 1.2; margin: 6px 0 6px; }
.aw-org { margin: 0 0 10px; font-size: 1rem; color: var(--ink-soft); }
.aw-amount { display: inline-block; font: 700 .9rem var(--display); padding: 3px 10px; border-radius: 999px; background: var(--acc-soft); color: var(--ink); }
.aw-note { margin-top: 28px; }
@media (max-width: 760px) {
  .aw-year { grid-template-columns: 1fr; gap: 14px; }
}
.entry-kind.nk-essay { color: #7b5ea7; }
[data-theme="dark"] .entry-kind.nk-essay { color: #c3a9ec; }
.grove-clear { pointer-events: auto; margin-left: 6px; font: 600 .85rem var(--display); color: var(--forest); background: var(--card); border: 1.5px solid var(--rule); border-radius: 999px; padding: 2px 12px; cursor: pointer; }
.grove-clear:hover { border-color: var(--forest); }

/* ---------- seasons (html[data-season], set from the visitor's date; try ?season=winter) ---------- */
:root { --stand: #1e6b4e; }
[data-theme="dark"] { --stand: #7cc4a0; }
[data-season="autumn"] { --stand: #cf7428; }
[data-theme="dark"][data-season="autumn"] { --stand: #eb9a4c; }
[data-season="winter"] { --stand: #5f88a0; }
[data-theme="dark"][data-season="winter"] { --stand: #a6c9dc; }
[data-season="spring"] { --stand: #4f9f45; }
[data-theme="dark"][data-season="spring"] { --stand: #98d98a; }
.season-tag { font-weight: 600; color: var(--ink); }
[data-season="autumn"] .season-tag::before { content: "🍂 Autumn in the Maine woods."; }
[data-season="winter"] .season-tag::before { content: "❄️ Winter in the Maine woods."; }
[data-season="spring"] .season-tag::before { content: "🌸 Spring in the Maine woods."; }
[data-season="summer"] .season-tag::before { content: "🌲 Summer in the Maine woods."; }

/* ---------- scroll reveal (site.js adds .rv, then .in when the element is on screen) ---------- */
.rv { opacity: 0; transform: translateY(22px); transition: opacity .75s cubic-bezier(.2, .7, .2, 1) var(--rv-d, 0ms), transform .75s cubic-bezier(.2, .7, .2, 1) var(--rv-d, 0ms); }
.rv.in { opacity: 1; transform: none; }

/* ---------- smooth page-to-page transitions (Chrome, Edge, Safari 18+; others just load normally) ---------- */
@view-transition { navigation: auto; }
.nav { view-transition-name: site-nav; }
.page-head h1 { view-transition-name: page-title; }
::view-transition-old(root) { animation: vt-out .22s ease both; }
::view-transition-new(root) { animation: vt-in .45s cubic-bezier(.2, .7, .2, 1) both; }
::view-transition-group(page-title) { animation-duration: .45s; animation-timing-function: cubic-bezier(.2, .7, .2, 1); }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; transform: translateY(14px); } }
@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  .rv { opacity: 1; transform: none; }
}

/* ---------- "at a glance" numbers (home) ---------- */
.numbers { list-style: none; margin: clamp(48px, 6vw, 80px) 0 0; padding: 28px 0 0; border-top: 2px solid var(--ink); display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 28px 24px; }
.numbers li { display: flex; flex-direction: column; gap: 6px; padding-left: 18px; border-left: 3px solid var(--sap); }
.numbers strong { font: 800 clamp(2.6rem, 5vw, 4rem)/0.95 var(--display); color: var(--forest); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.numbers span { font: 500 1rem/1.3 var(--display); color: var(--ink-soft); }

/* Share buttons (papers, op-eds, essays) */
.share { margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--rule); }
.share-label { margin: 0 0 12px; font: 600 .95rem var(--display); color: var(--ink-soft); letter-spacing: .02em; }
.share-row { display: flex; flex-wrap: wrap; gap: 10px; }
.share-btn { display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 16px; border-radius: 999px; border: 1.5px solid var(--rule); background: var(--card); color: var(--ink); font: 500 .95rem var(--display); text-decoration: none; cursor: pointer; transition: border-color .2s, color .2s, transform .15s; }
.share-btn:hover, .share-btn:focus-visible { border-color: var(--forest); color: var(--forest); transform: translateY(-1px); }
.share-btn svg { width: 17px; height: 17px; fill: currentColor; flex: none; }
.share-btn svg.stroke { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.share-btn[hidden] { display: none; }
@media (max-width: 520px) { .share-btn { padding: 0 12px; } .share-btn span { font-size: .9rem; } }

/* Home: research themes as four compact cards (full detail lives on the Research page) */
.themes-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.theme-card { display: flex; flex-direction: column; gap: 10px; padding: 26px; background: var(--card); border: 1px solid var(--rule); border-radius: 22px; color: var(--ink); text-decoration: none; transition: transform .2s, box-shadow .2s, border-color .2s; }
.theme-card:hover, .theme-card:focus-visible { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--forest); }
.theme-card .theme-num { margin-bottom: 2px; }
.theme-card h3 { font-size: clamp(1.35rem, 2vw, 1.6rem); margin: 0; }
.theme-card p { margin: 0; color: var(--ink-soft); font-size: 1.04rem; flex: 1; }
.theme-meta { font: 600 .95rem var(--display); color: var(--forest); }
.r-card { scroll-margin-top: 100px; }
.r-card:target { border-color: var(--forest); box-shadow: 0 0 0 3px var(--sap-soft); }
@media (max-width: 720px) { .themes-grid { grid-template-columns: 1fr; } }

/* Photos for essays and op-eds, figures for papers */
.entry.has-pic { grid-template-columns: 96px 168px minmax(0, 1fr) auto; }
.entry-pic { display: block; width: 168px; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; background: var(--paper-2); border: 1px solid var(--rule); }
.entry-pic img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s; }
.entry-pic.is-figure { background: #fff; }
.entry-pic.is-figure img { object-fit: cover; object-position: 50% 40%; }
.entry:hover .entry-pic img { transform: scale(1.04); }
.item-photo { margin: 8px auto 44px; }
.item-photo img { display: block; width: 100%; aspect-ratio: 2 / 1; object-fit: cover; border-radius: 22px; background: var(--paper-2); cursor: zoom-in; }
.item-photo figcaption, .item-figure figcaption { margin-top: 10px; font-size: .95rem; color: var(--ink-soft); }
.item-figure { margin: 8px auto 40px; }
.item-figure img { display: block; width: auto; max-width: 100%; margin: 0 auto; border-radius: 16px; border: 1px solid var(--rule); background: #fff; cursor: zoom-in; }
.zoom-hint { white-space: nowrap; }
@media (max-width: 1000px) {
  .entry.has-pic { grid-template-columns: 96px 120px minmax(0, 1fr) auto; }
  .entry-pic { width: 120px; }
}
@media (max-width: 760px) {
  /* phones: a small square picture beside the year, so the list stays short */
  .entry.has-pic { grid-template-columns: minmax(0, 1fr) 76px; align-items: center; }
  .entry.has-pic .entry-year { grid-column: 1; grid-row: 1; }
  .entry.has-pic .entry-pic { grid-column: 2; grid-row: 1; width: 76px; aspect-ratio: 1; border-radius: 12px; }
  .entry.has-pic .entry-main, .entry.has-pic .entry-out { grid-column: 1 / -1; }
  .item-photo img { aspect-ratio: 3 / 2; border-radius: 16px; }
}

/* Writing: "Also contributed to" (acknowledged contributions, kept apart from my own papers) */
.also { margin: -32px 0 80px; padding: 28px 30px; background: var(--paper-2); border-radius: 22px; scroll-margin-top: 100px; }
.also[hidden] { display: none; }
.also h2 { font-size: clamp(1.4rem, 2.2vw, 1.7rem); margin: 0 0 6px; }
.also-lede { margin: 0 0 14px; color: var(--ink-soft); font-size: 1rem; }
.also-list { list-style: none; margin: 0; padding: 0; }
.also-list li { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 16px; align-items: baseline; padding: 12px 0; border-top: 1px solid var(--rule); font-size: 1.02rem; }
.also-year { font: 700 1rem var(--display); color: var(--forest); }
.also-main a { color: var(--ink); text-decoration: none; font-weight: 600; }
.also-main a:hover { color: var(--forest); text-decoration: underline; }
.also-venue { display: block; font-size: .92rem; font-style: italic; color: var(--ink-soft); }
.also-out { font: 600 .92rem var(--display); white-space: nowrap; }
@media (max-width: 640px) { .also { padding: 22px 18px; } .also-list li { grid-template-columns: 1fr; gap: 2px; } }

/* Writing: follow links (RSS, Bluesky) */
.follow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: -6px 0 22px; font: 500 .98rem var(--display); color: var(--ink-soft); }
.follow a { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); text-decoration: none; border-bottom: 2px solid var(--sap); padding-bottom: 1px; }
.follow a:hover { color: var(--forest); }
.follow svg { width: 15px; height: 15px; fill: currentColor; }

/* Home: link to Grad Assistantships USA, with today's live count */
.opps-band { padding-top: 0; }
.opps-card { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 32px; padding: clamp(28px, 4vw, 48px); border-radius: 28px; overflow: hidden; color: #eef4ec; text-decoration: none; background: radial-gradient(700px 300px at 85% 20%, #1f5a40 0%, transparent 70%), linear-gradient(135deg, #0c2217, #143524); box-shadow: var(--shadow); transition: transform .3s, box-shadow .3s; }
.opps-card::after { content: ""; position: absolute; right: -120px; bottom: -160px; width: 420px; height: 420px; border-radius: 50%; background: repeating-radial-gradient(circle, transparent 0 16px, rgba(159, 224, 183, .12) 16px 18px); pointer-events: none; }
.opps-card:hover { transform: translateY(-4px); color: #fff; }
.opps-text { position: relative; z-index: 1; max-width: 40em; }
.opps-kicker { margin: 0 0 8px; font: 600 .95rem var(--display); color: #e9a92c; letter-spacing: .02em; }
.opps-card h2 { margin: 0 0 10px; color: #fff; font-size: clamp(2rem, 4vw, 3rem); }
.opps-card p { color: rgba(238, 244, 236, .85); }
.opps-cta { display: inline-flex; gap: 8px; margin-top: 8px; padding: 10px 18px; border-radius: 999px; background: #e9a92c; color: #10261f; font: 700 1rem var(--display); }
.opps-stat { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; text-align: center; min-width: 170px; }
.opps-num { font: 700 clamp(3.4rem, 7vw, 5.4rem)/1 var(--display); color: #fff; font-variant-numeric: tabular-nums; }
.opps-label { margin-top: 6px; color: rgba(238, 244, 236, .8); font-size: 1rem; }
@media (max-width: 760px) { .opps-card { flex-direction: column-reverse; align-items: flex-start; gap: 18px; } .opps-stat { align-items: flex-start; text-align: left; } }
