/* ==========================================================================
   Watershed theme
   ========================================================================== */

:root {
  --bg: #ffffff;
  --bg-soft: #f5f8fb;
  --sky: #edf4fa;
  --surface: #ffffff;
  --ink: #13212f;
  --muted: #55667a;
  --line: #e3eaf1;
  --line-strong: #d3dee9;
  --mix: #000;
  --contour-opacity: 0.2;
  --shadow: 0 1px 2px rgba(19, 33, 47, 0.04), 0 8px 24px rgba(19, 33, 47, 0.06);
  --shadow-lift: 0 2px 4px rgba(19, 33, 47, 0.05), 0 18px 40px rgba(19, 33, 47, 0.12);
  --radius: 16px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --primary-ink: color-mix(in srgb, var(--primary) 82%, var(--mix));
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #0b1724;
  --bg-soft: #0e1c2b;
  --sky: #0f2133;
  --surface: #122436;
  --ink: #e6eef6;
  --muted: #9aaec2;
  --line: #1d3247;
  --line-strong: #2a4259;
  --mix: #fff;
  --contour-opacity: 0.3;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.25);
  --shadow-lift: 0 2px 4px rgba(0, 0, 0, 0.3), 0 18px 40px rgba(0, 0, 0, 0.45);
  --primary-ink: color-mix(in srgb, var(--primary) 55%, #fff);
  color-scheme: dark;
}

/* Accent families: each sets --a; tints and text colors derive from it. */
.acc-blue   { --a: #2f6fc0; }
.acc-teal   { --a: #17998a; }
.acc-amber  { --a: #e0982a; }
.acc-violet { --a: #6e58d6; }
.acc-green  { --a: #2e9c6e; }
.acc-rose   { --a: #d2557a; }
[class*="acc-"] {
  --a-tint: color-mix(in srgb, var(--a) 13%, var(--surface));
  --a-ink: color-mix(in srgb, var(--a) 72%, var(--mix));
}
[data-theme="dark"] [class*="acc-"] { --a-ink: color-mix(in srgb, var(--a) 55%, #fff); --a-tint: color-mix(in srgb, var(--a) 20%, var(--surface)); }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
html.anim { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.65 var(--font-body);
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.3s, color 0.3s;
}
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, p { margin: 0; }
a { color: var(--primary-ink); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; border-radius: 4px; }
.muted { color: var(--muted); }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: var(--bg); padding: 10px 14px; border-radius: 8px; }
.skip:focus { top: 12px; }
.ic { flex: none; }

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 32px; }
.section { padding-top: 56px; padding-bottom: 24px; }
.section:last-child { padding-bottom: 88px; }
.narrow { max-width: 820px; }

/* ---------- Header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--sky) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, background-color 0.3s;
  view-transition-name: site-header;
}
.site-header.is-scrolled { border-bottom-color: var(--line-strong); }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; height: 72px; }
.brand { font: 600 21px/1 var(--font-head); color: var(--ink); text-decoration: none; letter-spacing: -0.01em; white-space: nowrap; }

.nav {
  display: flex; gap: 2px; padding: 5px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  border: 1px solid var(--line-strong); border-radius: 14px;
}
.nav a {
  position: relative; display: block; padding: 7px 12px; border-radius: 9px;
  color: var(--ink); text-decoration: none; font-size: 15px; font-weight: 500; white-space: nowrap;
  transition: background-color 0.2s, color 0.2s;
}
.nav a:hover { background: var(--bg-soft); }
.nav-pill { position: absolute; inset: 0; border-radius: 9px; background: var(--ink); view-transition-name: nav-pill; }
.nav-text { position: relative; }
.nav a.is-active { color: var(--bg); }
.nav a.is-active:hover { background: transparent; }

.header-tools { display: flex; gap: 6px; }
.icon-btn {
  width: 42px; height: 42px; display: inline-grid; place-items: center;
  border-radius: 12px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); cursor: pointer;
  transition: transform 0.2s var(--ease), background-color 0.2s;
}
.icon-btn:hover { transform: translateY(-1px); }
.icon-btn:active { transform: scale(0.94); }
.icon-btn .ic { grid-area: 1 / 1; transition: transform 0.45s var(--ease), opacity 0.3s; }
.theme-toggle .ic:last-child { opacity: 0; transform: rotate(-90deg) scale(0.6); }
[data-theme="dark"] .theme-toggle .ic:first-child { opacity: 0; transform: rotate(90deg) scale(0.6); }
[data-theme="dark"] .theme-toggle .ic:last-child { opacity: 1; transform: none; }
.menu-btn { display: none; }
.menu-btn .ic:last-child { opacity: 0; }
.menu-btn[aria-expanded="true"] .ic:first-child { opacity: 0; }
.menu-btn[aria-expanded="true"] .ic:last-child { opacity: 1; }

/* ---------- Contours ---------- */

/* Overscan so drift and parallax never reveal an edge, on any screen size. */
.contours { position: absolute; left: -80px; top: -60px; width: calc(100% + 160px); height: calc(100% + 120px); pointer-events: none; }
/* Note: no vector-effect here. Combined with the pathLength dash animation, non-scaling
   strokes make Chrome stop the dash early on large screens, leaving rings unfinished. */
.contours g { fill: none; stroke: var(--primary); stroke-width: 0.85; opacity: var(--contour-opacity); }
html.anim .contours path { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 2.6s var(--ease) forwards; animation-delay: calc(var(--i) * 70ms); }
html.anim .contours { animation: drift 40s ease-in-out infinite alternate; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes drift { from { transform: translate(0, 0) scale(1); } to { transform: translate(-28px, 12px) scale(1.03); } }

/* ---------- Hero ---------- */

.hero, .page-header { position: relative; overflow: hidden; background: var(--sky); border-bottom: 1px solid var(--line-strong); margin-top: -72px; padding-top: 72px; }
.hero-grid { position: relative; display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 56px; align-items: center; padding-top: 48px; padding-bottom: 72px; }
.hero-grid.no-photo { grid-template-columns: minmax(0, 1fr); }
.hero-photo { margin: 0; aspect-ratio: 4 / 5; border-radius: 22px; overflow: hidden; background: var(--surface); border: 1px solid var(--line-strong); box-shadow: 12px 12px 0 var(--highlight); transition: transform 0.6s var(--ease), box-shadow 0.6s var(--ease); }
.hero-photo:hover { transform: translate(-3px, -3px); box-shadow: 16px 16px 0 var(--highlight); }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.hero-name { font: 500 clamp(40px, 5.2vw, 62px)/1.04 var(--font-head); letter-spacing: -0.025em; }
.hero-role { margin-top: 14px; font-size: 20px; font-weight: 600; color: var(--primary-ink); }
.hero-summary { margin-top: 18px; font-size: 18px; color: var(--muted); max-width: 62ch; }
.hero .hero-chips { margin-top: 22px; }
.hero-links { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 24px; font-size: 15px; font-weight: 600; }

html.anim [data-hero] { opacity: 0; animation: rise 0.9s var(--ease) forwards; }
html.anim [data-hero="1"] { animation-delay: 0.05s; }
html.anim [data-hero="2"] { animation-delay: 0.12s; }
html.anim [data-hero="3"] { animation-delay: 0.2s; }
html.anim [data-hero="4"] { animation-delay: 0.28s; }
html.anim [data-hero="5"] { animation-delay: 0.36s; }
html.anim [data-hero="6"] { animation-delay: 0.44s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* Page header */
.page-header-inner { position: relative; padding-top: 40px; padding-bottom: 52px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 14px; color: var(--muted); margin-bottom: 14px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--ink); }
.page-title { font: 500 clamp(36px, 4.6vw, 54px)/1.08 var(--font-head); letter-spacing: -0.022em; max-width: 22ch; view-transition-name: page-title; }
.page-intro { margin-top: 14px; font-size: 19px; color: var(--muted); max-width: 64ch; }
.page-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 18px; color: var(--muted); font-size: 15px; }
.page-meta > span { display: inline-flex; align-items: center; gap: 6px; }
.page-cta { margin-top: 22px; }

/* ---------- Buttons, chips, tags ---------- */

.btn { display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 18px; border-radius: 12px; font-weight: 600; text-decoration: none; border: 1px solid var(--line-strong); color: var(--ink); background: var(--surface); transition: transform 0.2s var(--ease), box-shadow 0.2s; }
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }

.chips, .tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { padding: 6px 13px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line-strong); font-size: 14px; font-weight: 500; }
.chips-tint li { background: var(--a-tint); border-color: transparent; color: var(--a-ink); padding: 4px 11px; border-radius: 8px; }
.tags { gap: 6px; margin-top: 14px; }
.tags li { padding: 3px 10px; border-radius: 7px; background: var(--bg-soft); border: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.tags-strong li { background: var(--a-tint, var(--bg-soft)); color: var(--a-ink, var(--ink)); border-color: transparent; font-weight: 600; }
.pill { flex: none; align-self: flex-start; padding: 4px 12px; border-radius: 999px; background: var(--a-tint, var(--bg-soft)); color: var(--a-ink, var(--muted)); font-size: 14px; font-weight: 600; white-space: nowrap; }

/* ---------- Blocks ---------- */

.split { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 56px; align-items: start; }
.split-right { grid-template-columns: minmax(0, 1fr) 320px; }
.split-side, .split-main { display: flex; flex-direction: column; gap: 44px; min-width: 0; }
.section:not(.split) > .blk + .blk { margin-top: 44px; }

.blk-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 18px; }
.blk-head h2 { font: 600 26px/1.2 var(--font-head); letter-spacing: -0.01em; }
.split-side .blk-head h2 { font-size: 22px; }
.blk-link { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.blk-link .ic { transition: transform 0.25s var(--ease); }
.blk-link:hover .ic { transform: translateX(4px); }
.sub-h { font: 600 20px/1.3 var(--font-head); margin-bottom: 14px; }
.sub-h .count { font: 600 13px var(--font-body); color: var(--muted); background: var(--bg-soft); border-radius: 999px; padding: 2px 9px; vertical-align: middle; }
.sub-label { font-size: 13px; color: var(--muted); margin-bottom: 8px; font-weight: 500; }
.empty { color: var(--muted); padding: 28px; border: 1px dashed var(--line-strong); border-radius: var(--radius); text-align: center; }
.stack { display: flex; flex-direction: column; gap: 18px; }
.panel { padding: 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.panel-accent { background: var(--a-tint); border-color: transparent; }

/* Timeline */
.timeline { list-style: none; margin: 0 0 0 7px; padding: 0 0 0 26px; border-left: 2px solid var(--line-strong); display: flex; flex-direction: column; gap: 22px; }
.timeline li { position: relative; }
.timeline li::before { content: ""; position: absolute; left: -34px; top: 6px; width: 14px; height: 14px; border-radius: 50%; background: var(--surface); border: 2px solid var(--line-strong); box-sizing: border-box; }
.timeline li.is-current::before { background: var(--primary); border: 3px solid var(--surface); box-shadow: 0 0 0 2px var(--primary); }
html.anim .timeline li.is-current::before { animation: pulse 2.6s ease-out infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 2px var(--primary), 0 0 0 0 color-mix(in srgb, var(--primary) 45%, transparent); } 70%, 100% { box-shadow: 0 0 0 2px var(--primary), 0 0 0 10px transparent; } }
.tl-date { font-size: 14px; color: var(--muted); }
.tl-title { font-weight: 700; font-size: 18px; margin-top: 2px; }
.tl-text { color: var(--muted); margin-top: 2px; }

/* Entries */
.entry { padding: 28px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--a, var(--primary)); box-shadow: var(--shadow); }
.entry-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 20px; }
.entry h3 { font: 600 23px/1.25 var(--font-head); letter-spacing: -0.01em; }
.entry-org { margin-top: 2px; font-weight: 600; color: var(--a-ink, var(--primary-ink)); }
.entry-text { margin-top: 12px; color: var(--muted); }
.bullets { margin: 16px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 7px; }
.bullets li::marker { color: var(--a, var(--primary)); }
.thesis { margin-top: 16px; padding: 14px 18px; border-radius: 12px; background: var(--bg-soft); font: 500 17px/1.5 var(--font-head); }
.thesis span { display: block; font: 600 13px var(--font-body); color: var(--muted); margin-bottom: 4px; }
.entry-lead { margin-top: 12px; font-size: 18px; color: var(--ink); max-width: 68ch; }
.entry-lead + .entry-text { margin-top: 8px; }
.callout { margin-top: 16px; padding: 14px 18px; border-radius: 12px; background: var(--a-tint, var(--bg-soft)); border-left: 3px solid var(--a, var(--primary)); }
.callout span { display: block; font: 600 13px var(--font-body); color: var(--a-ink, var(--muted)); margin-bottom: 4px; }
.entry-links { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 15px; font-weight: 600; }
.entry-links a { display: inline-flex; align-items: center; gap: 6px; }
.more { margin-top: 14px; }
.more + .more { margin-top: 8px; }
.entry .more { border-top: 1px solid var(--line); padding-top: 12px; }
.more summary { list-style: none; display: flex; align-items: center; gap: 8px; }
.more summary::-webkit-details-marker { display: none; }
.more summary::before { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); transition: transform 0.25s var(--ease); flex: none; }
.more[open] summary::before { transform: rotate(45deg); }
.more-body { margin-top: 10px; color: var(--muted); font-size: 16px; }
.more summary { cursor: pointer; font-weight: 600; color: var(--primary-ink); width: fit-content; }
.two-col { columns: 2; column-gap: 32px; margin: 10px 0 0; padding-left: 20px; font-size: 15px; }
.two-col li { break-inside: avoid; margin-bottom: 4px; }

/* Rows and dots */
.rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.rows li { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.row-title { font-weight: 600; }
.row-title a { color: var(--ink); text-decoration: none; }
.row-title a:hover { color: var(--primary-ink); text-decoration: underline; }
.row-sub { font-size: 14px; color: var(--muted); }
.row-meta { flex: none; font-size: 14px; color: var(--muted); white-space: nowrap; }
.dots { list-style: none; margin: 0; padding: 0; }
.dots li { position: relative; padding: 10px 0 10px 20px; border-bottom: 1px solid var(--line); }
.dots li:last-child { border-bottom: 0; }
.dots li::before { content: ""; position: absolute; left: 0; top: 19px; width: 8px; height: 8px; border-radius: 50%; background: var(--highlight); }

.edu-compact { display: flex; flex-direction: column; gap: 10px; }
.edu-box { padding: 14px 16px; border-radius: 12px; background: var(--bg-soft); border: 1px solid var(--line); transition: transform 0.25s var(--ease), border-color 0.25s; }
.edu-box:hover { transform: translateX(4px); border-color: var(--line-strong); }
.edu-hl { margin-top: 6px; font-size: 14px; font-weight: 700; color: var(--primary-ink); }
.tool-box { padding: 18px; border-radius: 14px; border: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; }
.skill-groups { display: flex; flex-direction: column; gap: 16px; }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.card { display: flex; flex-direction: column; border-radius: var(--radius); overflow: hidden; background: var(--surface); border: 1px solid var(--line); color: var(--ink); text-decoration: none; transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s; }
a.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); border-color: var(--line-strong); }
.card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.card-kicker { font-size: 13px; font-weight: 600; color: var(--muted); }
.card-title { font: 600 19px/1.3 var(--font-head); }
.card-title a { color: inherit; text-decoration: none; }
.card-text { color: var(--muted); font-size: 15px; }
.art { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--a-tint, var(--bg-soft)); }
.art svg { position: absolute; inset: 0; width: 100%; height: 100%; transition: transform 0.8s var(--ease); }
.art g { fill: none; stroke: var(--a, var(--primary)); stroke-width: 1.3; opacity: 0.55; }
.art path { vector-effect: non-scaling-stroke; }
.art-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s var(--ease); }
a.card:hover .art svg, a.card:hover .art-img img, a.feature:hover .art svg { transform: scale(1.06); }

.feature { display: grid; grid-template-columns: 1.1fr 1fr; border-radius: 20px; overflow: hidden; border: 1px solid var(--line); background: var(--surface); color: var(--ink); text-decoration: none; transition: box-shadow 0.35s var(--ease); }
.feature:hover { box-shadow: var(--shadow-lift); }
.feature .art { aspect-ratio: auto; min-height: 240px; }
.feature-body { padding: 28px; display: flex; flex-direction: column; gap: 8px; justify-content: center; }
.feature-title { font: 600 26px/1.2 var(--font-head); }

/* Latest */
.latest { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.latest-card { display: flex; flex-direction: column; gap: 6px; padding: 18px; border-radius: 14px; background: var(--a-tint); color: var(--ink); text-decoration: none; transition: transform 0.3s var(--ease); }
.latest-card:hover { transform: translateY(-3px) rotate(-0.4deg); }
.latest-kind { font-size: 13px; font-weight: 700; color: var(--a-ink); }
.latest-title { font-weight: 600; line-height: 1.35; }
.latest-meta { font-size: 13px; color: var(--muted); margin-top: auto; }

/* Publications */
.cites { list-style: none; margin: 0; padding: 0; }
.cites > li { padding: 14px 0; border-bottom: 1px solid var(--line); }
.cites > li:last-child { border-bottom: 0; }
.cites-numbered { list-style: decimal; padding-left: 26px; }
.cites-numbered > li { padding-left: 6px; }
.cites-numbered > li::marker { color: var(--muted); font-size: 14px; }
.cite strong { font-weight: 700; }
.cite-title a { font-weight: 500; }
.cite-status { margin-top: 4px; font-size: 14px; color: var(--muted); }
.pub-group + .pub-group { margin-top: 40px; }

/* Skill levels */
.levels { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 0 24px; }
.levels li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.lv { display: inline-flex; align-items: center; gap: 3px; font-size: 13px; color: var(--muted); }
.lv i { width: 12px; height: 5px; border-radius: 2px; background: var(--line-strong); }
.lv em { font-style: normal; margin-left: 8px; }
.lv[data-r="1"] i:nth-child(-n+1), .lv[data-r="2"] i:nth-child(-n+2), .lv[data-r="3"] i:nth-child(-n+3) { background: var(--a, var(--primary)); }

/* Skill bars and radar */
.skill-panels { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 18px; }
.skillbars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.sb-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.sb-icon { width: 22px; height: 22px; object-fit: contain; border-radius: 5px; }
.sb-name { font-weight: 600; flex: 1; min-width: 0; }
.sb-level { font-size: 13px; color: var(--muted); white-space: nowrap; }
.sb-track { height: 9px; border-radius: 999px; background: color-mix(in srgb, var(--a, var(--primary)) 12%, var(--line)); overflow: hidden; }
.sb-fill { display: block; height: 100%; width: calc(var(--p) * 1%); border-radius: inherit;
  background: linear-gradient(90deg, color-mix(in srgb, var(--a, var(--primary)) 70%, var(--surface)), var(--a, var(--primary)));
  transform-origin: left center; transition: transform 1.2s var(--ease); transition-delay: calc(var(--d, 0ms) + 150ms); }
html.js.anim [data-reveal]:not(.is-in) .sb-fill { transform: scaleX(0); }

.radar-wrap { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 20px; align-items: center; }
.radar { width: 100%; height: auto; overflow: visible; }
.radar .grid { fill: none; stroke: var(--line-strong); stroke-width: 1; }
.radar .grid:last-of-type { stroke: color-mix(in srgb, var(--a, var(--primary)) 35%, var(--line-strong)); }
.radar .axis { stroke: var(--line); stroke-width: 1; }
.radar .area { fill: color-mix(in srgb, var(--a, var(--primary)) 22%, transparent); stroke: var(--a, var(--primary)); stroke-width: 2; stroke-linejoin: round; }
.radar .dot { fill: var(--surface); stroke: var(--a, var(--primary)); stroke-width: 2; }
.radar text { font: 500 13px var(--font-body); fill: var(--muted); }
.radar .area-g { transform-origin: 200px 170px; transition: transform 1.1s var(--ease) 0.15s, opacity 0.6s; }
html.js.anim [data-reveal]:not(.is-in) .radar .area-g { transform: scale(0.1); opacity: 0; }
.radar-list { list-style: none; margin: 0; padding: 0; font-size: 15px; }
.radar-list li { display: flex; align-items: center; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.radar-list li:last-child { border-bottom: 0; }
.radar-list span { flex: 1; min-width: 0; }
.radar-list em { font-style: normal; font-size: 13px; color: var(--a-ink, var(--muted)); font-weight: 600; }
@media (max-width: 640px) { .radar-wrap { grid-template-columns: minmax(0, 1fr); } }

/* News */
.news { list-style: none; margin: 0; padding: 0; }
.news > li { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 24px; padding: 24px 0; border-bottom: 1px solid var(--line); }
.news-meta { font-size: 14px; color: var(--muted); }
.news-meta time { display: block; font-weight: 700; color: var(--ink); }
.news-body h3 { font: 600 20px/1.3 var(--font-head); }
.news-body .prose { margin-top: 6px; color: var(--muted); }
.news-img { margin-top: 14px; border-radius: 12px; max-width: min(460px, 100%); }

/* Episodes and player */
.episode { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 22px; padding: 20px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); }
.episode .art, .episode-cover { aspect-ratio: 1; border-radius: 14px; width: 100%; object-fit: cover; }
.episode-cover.lg { max-width: 220px; }
.episode-body { display: flex; flex-direction: column; gap: 6px; }
.episode-hero { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 28px; align-items: center; margin-bottom: 36px; }
.episode-hero .art { aspect-ratio: 1; border-radius: 16px; }
.player { display: flex; align-items: center; gap: 14px; margin-top: 10px; padding: 10px 14px 10px 10px; border-radius: 16px; background: var(--bg-soft); border: 1px solid var(--line); }
.play { width: 46px; height: 46px; flex: none; border-radius: 50%; border: 0; background: var(--primary); color: #fff; display: grid; place-items: center; cursor: pointer; transition: transform 0.2s var(--ease); }
.play:hover { transform: scale(1.06); }
.play .ic { grid-area: 1 / 1; }
.play .ic:last-child, .player.is-playing .play .ic:first-child { display: none; }
.player.is-playing .play .ic:last-child { display: block; }
.player-track { flex: 1; min-width: 0; }
.player-track input { width: 100%; accent-color: var(--primary); }
.player-time { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* Text, figures, embeds */
.prose { max-width: 70ch; overflow-wrap: anywhere; }
.prose img { height: auto; }
.prose table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; font-size: 15px; overflow-wrap: normal; }
.prose th { white-space: nowrap; }
.prose th, .prose td { padding: 8px 12px; border-bottom: 1px solid var(--line); text-align: left; }
.prose iframe, .prose video { max-width: 100%; }
.prose > * + * { margin-top: 1em; }
.prose h2 { font: 600 26px/1.25 var(--font-head); margin-top: 1.6em; }
.prose h3 { font: 600 21px/1.3 var(--font-head); margin-top: 1.4em; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li + li { margin-top: 4px; }
.prose img { border-radius: 12px; }
.prose blockquote { margin: 0; padding: 4px 0 4px 18px; border-left: 3px solid var(--highlight); color: var(--muted); font-family: var(--font-head); font-size: 1.1em; }
.prose code { font-size: 0.9em; background: var(--bg-soft); padding: 2px 6px; border-radius: 5px; }
.prose pre { background: var(--bg-soft); padding: 16px; border-radius: 12px; overflow-x: auto; }
.prose pre code { background: none; padding: 0; }
.prose-lg { font-size: 18px; line-height: 1.75; }
.text-panel { padding: 26px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); }
.text-callout { padding: 26px; border-radius: 20px; background: color-mix(in srgb, var(--highlight) 14%, var(--surface)); }
.figure { margin: 0; }
.figure img { border-radius: 16px; width: 100%; }
.figure figcaption { margin-top: 8px; font-size: 14px; color: var(--muted); }
.figure.cover { margin-bottom: 32px; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin-top: 32px; }
.gallery figure { margin: 0; }
.gallery img { border-radius: 12px; aspect-ratio: 4 / 3; object-fit: cover; width: 100%; transition: transform 0.4s var(--ease); }
.gallery a:hover img { transform: scale(1.03); }
.gallery figcaption { font-size: 13px; color: var(--muted); margin-top: 6px; }
.embed { position: relative; aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; background: var(--bg-soft); }
.embed-audio { aspect-ratio: auto; height: 232px; }
.embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin: 0; }
.facts div { padding: 16px 18px; border-radius: 14px; background: var(--bg-soft); }
.facts dt { font-size: 13px; color: var(--muted); }
.facts dd { margin: 2px 0 0; font-weight: 700; }
.contact { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.contact li { display: flex; align-items: center; gap: 10px; color: var(--muted); overflow-wrap: anywhere; min-width: 0; }
.link-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.link-list a { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.divider { height: 8px; }
.divider.has-line { height: 1px; background: var(--line); margin: 8px 0; }
.prevnext { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 48px; }
.prevnext a { padding: 16px 18px; border-radius: 14px; border: 1px solid var(--line); text-decoration: none; color: var(--ink); font-weight: 600; transition: border-color 0.2s, transform 0.25s var(--ease); }
.prevnext a:hover { border-color: var(--primary); transform: translateY(-2px); }
.prevnext a span { display: block; font-size: 13px; color: var(--muted); font-weight: 500; }
.prevnext .next { text-align: right; }

/* Footer */
.site-footer { background: var(--sky); border-top: 1px solid var(--line-strong); margin-top: 24px; }
.site-footer { position: relative; overflow: hidden; }
.site-footer > .wrap { position: relative; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(auto-fit, minmax(150px, 1fr)); gap: 32px; padding-top: 44px; padding-bottom: 28px; font-size: 15px; }
.footer-about { display: flex; flex-direction: column; gap: 4px; overflow-wrap: anywhere; min-width: 0; }
.footer-h { font-size: 13px; font-weight: 700; color: var(--muted); margin-bottom: 4px; }
.footer-top { color: var(--muted); text-decoration: none; }
.footer-top:hover { color: var(--ink); }
.footer-name { font: 600 20px var(--font-head); margin-bottom: 4px; }
.footer-nav { display: flex; flex-direction: column; gap: 6px; }
.footer-nav a { color: var(--ink); text-decoration: none; }
.footer-nav a:hover { color: var(--primary-ink); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-top: 18px; padding-bottom: 32px; border-top: 1px solid var(--line-strong); font-size: 14px; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 24px; background: rgba(5, 12, 20, 0.86); opacity: 0; transition: opacity 0.25s; cursor: zoom-out; }
.lightbox.is-open { opacity: 1; }
.lightbox img { max-height: 90vh; border-radius: 12px; }

/* ---------- Scroll reveal ---------- */

html.js.anim [data-reveal] { opacity: 0; transform: translateY(22px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
html.js.anim [data-reveal].is-in { opacity: 1; transform: none; }

/* ---------- Page transitions (supporting browsers) ---------- */

@view-transition { navigation: auto; }
::view-transition-old(root) { animation: 0.28s var(--ease) both fade-out; }
::view-transition-new(root) { animation: 0.45s var(--ease) both fade-in; }
::view-transition-group(nav-pill), ::view-transition-group(page-title) { animation-duration: 0.45s; animation-timing-function: var(--ease); }
@keyframes fade-out { to { opacity: 0; transform: translateY(-6px); } }
@keyframes fade-in { from { opacity: 0; transform: translateY(10px); } }
::view-transition-old(theme), ::view-transition-new(theme) { animation: none; mix-blend-mode: normal; }

/* ---------- Responsive ---------- */

@media (max-width: 1080px) {
  .nav a { padding: 7px 9px; font-size: 14px; }
  .split { grid-template-columns: 290px minmax(0, 1fr); gap: 40px; }
}

@media (max-width: 920px) {
  .menu-btn { display: inline-grid; }
  .nav {
    position: fixed; left: 16px; right: 16px; top: 80px; flex-direction: column; padding: 10px;
    background: var(--surface); box-shadow: var(--shadow-lift);
    opacity: 0; transform: translateY(-8px) scale(0.98); pointer-events: none; transition: opacity 0.25s, transform 0.3s var(--ease);
  }
  .nav.is-open { opacity: 1; transform: none; pointer-events: auto; }
  .nav a { padding: 12px 14px; font-size: 16px; }
  /* One column, in the same order as desktop: left column first, then right column. */
  .split, .split-right { grid-template-columns: minmax(0, 1fr); }
  /* Unless a phone order was set in the designer. */
  .split.phone-ordered { display: flex; flex-direction: column; gap: 44px; }
  .split.phone-ordered > .split-side, .split.phone-ordered > .split-main { display: contents; }
  .split.phone-ordered .blk { order: var(--mo, 999); }
  .hero-grid { grid-template-columns: 200px minmax(0, 1fr); gap: 32px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  /* Side padding only: the shorthand used to wipe out vertical spacing. */
  .wrap { padding-left: 20px; padding-right: 20px; }
  .section { padding-top: 40px; }
  .split, .split-side, .split-main, .split.phone-ordered { gap: 36px; }
  .hero-grid { padding-bottom: 48px; }
  .page-header-inner { padding-top: 28px; padding-bottom: 36px; }
  .blk-head { flex-wrap: wrap; gap: 4px 16px; }
  .blk-head h2 { font-size: 23px; }
  .entry-head .pill { white-space: normal; }
  .card-body { padding: 16px; }
  .feature-body { padding: 20px; }
  .panel, .text-panel, .text-callout { padding: 18px; }
  .footer-grid { padding-top: 36px; gap: 26px; }
  .prevnext .next { text-align: left; }
  .prose img, .figure img { max-height: 80vh; width: auto; margin-left: auto; margin-right: auto; }
  .gallery { grid-template-columns: minmax(0, 1fr); }
  .hero-grid { grid-template-columns: minmax(0, 1fr); padding-top: 24px; gap: 28px; }
  .hero-photo { max-width: 180px; box-shadow: 8px 8px 0 var(--highlight); }
  .feature, .episode, .episode-hero { grid-template-columns: minmax(0, 1fr); }
  .episode .art, .episode-cover { max-width: 160px; }
  .news > li { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .rows li { flex-direction: column; gap: 2px; }
  .two-col { columns: 1; }
  .prevnext { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .entry { padding: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  html.anim [data-hero], html.js.anim [data-reveal] { opacity: 1 !important; transform: none !important; animation: none !important; transition: none !important; }
  html.anim .contours path, html.anim .contours, html.anim .timeline li.is-current::before { animation: none !important; stroke-dashoffset: 0; }
  @view-transition { navigation: none; }
}

@media print {
  .site-header, .site-footer, .contours, .player, .menu-btn { display: none !important; }
  .hero, .page-header { margin-top: 0; padding-top: 0; background: none; }
  html.js.anim [data-reveal], html.anim [data-hero] { opacity: 1; transform: none; }
}
