/*
 * Wangjie Su — personal site
 * A quiet scholar layout: profile column on the left, the homepage read top to
 * bottom on the right. Warm paper, ink-grey text, one slate-blue accent.
 * Plain CSS (no Sass) so GitHub Pages serves it as written.
 */

@font-face {
  font-family: "Newsreader";
  src: url("../fonts/newsreader/newsreader.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Newsreader";
  src: url("../fonts/newsreader/newsreader-italic.woff2") format("woff2");
  font-weight: 200 800;
  font-style: italic;
  font-display: swap;
}

/* ── Tokens ─────────────────────────────────────────────────────────── */
:root {
  --paper: #fbfaf7;
  --surface: #ffffff;
  --sunken: #f3f2ed;
  --ink: #262d30;
  --text: #353d40;
  --muted: #5e686c;
  --faint: #666f73;
  --line: #e4e3dd;
  --line-strong: #d3d3cb;
  --accent: #33607a;
  --accent-ink: #284d63;
  --accent-soft: #e5edf1;
  --accent-line: rgba(51, 96, 122, .35);
  --map-sea: #f1f2ee;
  --map-land: #dcddd5;
  --map-in: #cfd1c6;
  --map-edge: #fbfaf7;
  --map-visited: #8eaebf;
  --map-whole: #c3d3dc;
  --map-home: #c27a5c;
  --map-mark: #33607a;
  --map-v1: #cddbe2; --map-v2: #9db8c7; --map-v3: #6890a7; --map-v4: #33607a;
  --shadow: 0 14px 34px rgba(38, 45, 48, .1), 0 2px 6px rgba(38, 45, 48, .06);

  --serif: "Newsreader", "Iowan Old Style", "Palatino Linotype", Georgia, "Songti SC", "Noto Serif CJK SC", "Source Han Serif SC", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
  --mono: ui-monospace, "SFMono-Regular", "JetBrains Mono", Menlo, Consolas, monospace;

  --header-h: 60px;
  --wrap: 1080px;
  --gutter: 40px;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --paper: #191e21;
  --surface: #20272a;
  --sunken: #232a2e;
  --ink: #e6eaea;
  --text: #d3d9da;
  --muted: #a3afb3;
  --faint: #8a969b;
  --line: #313b40;
  --line-strong: #3e4a50;
  --accent: #9cc2d7;
  --accent-ink: #bcd7e6;
  --accent-soft: #24343d;
  --accent-line: rgba(156, 194, 215, .4);
  --map-sea: #1c2225;
  --map-land: #364247;
  --map-in: #43525a;
  --map-edge: #20272a;
  --map-visited: #5f8aa1;
  --map-whole: #445c69;
  --map-home: #c4805f;
  --map-mark: #bcd7e6;
  --map-v1: #3a5361; --map-v2: #52798e; --map-v3: #7aa3ba; --map-v4: #a9cde0;
  --shadow: 0 14px 34px rgba(0, 0, 0, .35), 0 2px 6px rgba(0, 0, 0, .25);
  color-scheme: dark;
}

/* ── Base ───────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body.site {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font: 16px/1.72 var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
.site h1, .site h2, .site h3, .site p, .site ul, .site ol, .site blockquote { margin-top: 0; }
.site img { max-width: 100%; height: auto; }
.site a { color: var(--accent); text-decoration: none; }
.site a:hover { color: var(--accent-ink); }
.site :focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }
:where(.site) button { font: inherit; color: inherit; }
::selection { background: var(--accent-soft); color: var(--ink); }
[hidden] { display: none !important; }

.skip-link {
  position: fixed; left: 12px; top: 10px; z-index: 100;
  padding: 10px 16px; border-radius: 4px;
  background: var(--ink); color: var(--paper) !important;
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.eyebrow {
  margin: 0 0 10px;
  font: 500 10.5px/1.4 var(--mono);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--faint);
}
.icon { display: inline-block; flex: none; vertical-align: -1px; }
.icon--external, .icon--arrow { margin-left: 3px; opacity: .8; }
.icon--down { margin-left: 4px; transition: transform .2s ease; }
details[open] > summary .icon--down { transform: rotate(180deg); }
summary { list-style: none; cursor: pointer; }
summary::-webkit-details-marker { display: none; }
#content:focus { outline: none; }

/* ── Header ─────────────────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: var(--paper);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  display: flex; align-items: center; gap: 28px;
  max-width: var(--wrap); height: var(--header-h);
  margin: 0 auto; padding: 0 var(--gutter);
}
.site-brand { display: flex; align-items: baseline; gap: 12px; color: var(--ink) !important; white-space: nowrap; }
.site-brand__name { font: 500 20px/1 var(--serif); letter-spacing: -.01em; }
.site-brand__place { font-size: 12px; color: var(--faint); }

.site-nav { display: flex; align-items: center; gap: 20px; margin-left: auto; font-size: 13.5px; }
.site-nav > a, .nav-menu > summary {
  position: relative; display: inline-flex; align-items: center;
  padding: 6px 0; color: var(--muted); white-space: nowrap;
}
.site-nav > a:hover, .nav-menu > summary:hover { color: var(--ink); }
.site-nav [aria-current]::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px;
  height: 1.5px; background: var(--accent); border-radius: 1px;
}
.site-nav [aria-current] { color: var(--ink); }
.nav-menu > summary[aria-current]::after { right: 14px; }
.site-nav__divider { width: 1px; height: 16px; background: var(--line-strong); }

.nav-menu { position: relative; }
.nav-menu__panel, .compact-menu__panel {
  position: absolute; z-index: 50;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
}
.nav-menu__panel { top: calc(100% + 12px); left: -18px; width: 300px; padding: 8px; }
.nav-menu__panel a { display: block; padding: 10px 12px; border-radius: 6px; color: var(--ink) !important; }
.nav-menu__panel a:hover { background: var(--sunken); }
.nav-menu__panel strong { display: flex; align-items: center; font-weight: 500; font-size: 14px; }
.nav-menu__panel span { display: block; font-size: 12px; color: var(--muted); }
.nav-menu__panel .nav-menu__overview {
  font-size: 12px; color: var(--accent) !important;
  border-bottom: 1px solid var(--line); border-radius: 6px 6px 0 0; margin-bottom: 4px;
}

.site-actions { display: flex; align-items: center; gap: 2px; }
.site-nav + .site-actions { margin-left: 6px; }
.icon-button {
  display: inline-grid; place-items: center;
  width: 36px; height: 36px; padding: 0;
  border: 0; border-radius: 8px; background: transparent;
  color: var(--muted) !important; cursor: pointer;
}
.icon-button:hover { background: var(--sunken); color: var(--ink) !important; }

.compact-menu { position: relative; display: none; }
.compact-menu > summary {
  display: inline-flex; align-items: center; height: 36px; padding: 0 10px;
  border-radius: 8px; font-size: 13.5px; color: var(--ink);
}
.compact-menu > summary:hover, .compact-menu[open] > summary { background: var(--sunken); }
.compact-menu__panel {
  top: calc(100% + 12px); right: -8px;
  width: 340px; max-width: calc(100vw - 32px);
  max-height: calc(100vh - var(--header-h) - 24px); overflow-y: auto; overscroll-behavior: contain;
  padding: 18px 18px 12px;
}
.compact-menu__sections { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; margin-bottom: 8px; }
.compact-menu__sections a, .compact-menu__pages a, .compact-menu__repos a {
  display: flex; align-items: center; min-height: 42px; color: var(--ink) !important; font-size: 14.5px;
}
.compact-menu__sections small { width: 26px; font: 11px var(--mono); color: var(--faint); }
.compact-menu__sections a[aria-current] { color: var(--accent) !important; }
.compact-menu__pages { display: flex; gap: 28px; padding: 4px 0 10px; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.compact-menu__repos a { gap: 8px; color: var(--accent) !important; }

/* ── Home: profile + reading column ─────────────────────────────────── */
.home {
  display: grid;
  grid-template-columns: 212px minmax(0, 1fr);
  grid-template-areas: "profile main" "widgets main";
  grid-template-rows: auto 1fr;
  column-gap: 72px;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 52px var(--gutter) 24px;
}
.profile { grid-area: profile; }
.home__main { grid-area: main; }
.widgets { grid-area: widgets; align-self: start; display: grid; gap: 14px; margin-top: 26px; }
.profile__avatar {
  display: block; width: 96px; height: 96px; margin-bottom: 22px;
  border-radius: 50%; object-fit: cover;
  border: 3px solid var(--surface);
  box-shadow: 0 0 0 1px var(--line-strong);
}
.site .profile__name { margin: 0; font: 500 30px/1.1 var(--serif); letter-spacing: -.015em; color: var(--ink); }
.site .profile__alias { margin: 4px 0 14px; font: italic 400 17px/1.3 var(--serif); color: var(--muted); }
.site .profile__affiliation { margin: 0 0 10px; font-size: 14px; color: var(--ink); }
.site .profile__field { margin: 0 0 18px; font-size: 12.5px; line-height: 1.65; color: var(--muted); }
.profile__links { display: flex; gap: 18px; padding: 0; margin: 0 0 18px; list-style: none; font-size: 13.5px; }
.profile__links a { border-bottom: 1px solid var(--accent-line); }
.profile__links a:hover { border-bottom-color: currentColor; }
.site .profile__status {
  display: inline-flex; align-items: center; gap: 8px; margin: 0 0 10px;
  padding: 4px 10px 4px 9px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent-ink); font-size: 12px;
}
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--accent-line); }
.site .profile__clock { display: flex; justify-content: space-between; margin: 0; font-size: 12px; color: var(--muted); }
.profile__clock time { font: 12px var(--mono); font-variant-numeric: tabular-nums; color: var(--faint); }

.profile__extras { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); }
.extra { display: block; padding: 9px 0; color: var(--ink) !important; }
.extra strong { display: flex; align-items: center; font-weight: 500; font-size: 13.5px; }
.extra > span:last-child { display: block; font-size: 12px; color: var(--muted); }
.extra:hover strong { color: var(--accent); }
.extra:hover .icon--arrow { transform: translateX(2px); }
.icon--arrow { transition: transform .15s ease; }

/* Greeting */
.site .profile__greeting { margin: 8px 0 0; font-size: 12px; line-height: 1.55; color: var(--muted); }

/* Widgets */
.widget {
  padding: 14px 15px 13px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface);
}
.site .widget__label {
  margin: 0 0 10px; font: 500 10.5px/1.4 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--faint);
}
.widget--explore { padding-bottom: 6px; }
.widget__action {
  margin-top: 8px; padding: 2px 9px; border: 1px solid var(--line-strong); border-radius: 999px;
  background: transparent; cursor: pointer; font-size: 12px; color: var(--muted);
}
.widget__action:hover { border-color: var(--accent); color: var(--accent-ink); }
.site .widget__foot { margin: 8px 0 0; font-size: 11.5px; color: var(--muted); }

.today__date { display: flex; align-items: flex-end; gap: 10px; margin-bottom: 4px; }
.today__day { font: 500 40px/0.9 var(--serif); color: var(--ink); font-variant-numeric: lining-nums; }
.today__month { display: flex; flex-direction: column; font-size: 12px; line-height: 1.35; color: var(--muted); }
.site .today__lunar { margin: 8px 0 10px; font-size: 13px; color: var(--ink); }
.today__rows { margin: 0 0 12px; display: grid; gap: 4px; }
.today__rows div { display: grid; grid-template-columns: 42px 1fr; gap: 6px; font-size: 12.5px; }
.today__rows dt { color: var(--faint); }
.today__rows dd { margin: 0; color: var(--text); }
.meter { display: block; margin-top: 8px; }
.meter__label { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-bottom: 4px; }
.meter__label span:last-child { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.meter__track { display: block; height: 4px; border-radius: 4px; background: var(--sunken); overflow: hidden; }
.meter__fill { display: block; height: 100%; width: 0; border-radius: 4px; background: var(--accent); }
[data-day-meter] .meter__fill { background: #c0603f; opacity: .75; }

.heatmap { display: grid; grid-template-rows: repeat(7, auto); grid-auto-flow: column; grid-auto-columns: 1fr; gap: 2px; }
.heatmap__cell { display: block; width: 100%; }
.heatmap__cell { aspect-ratio: 1; border-radius: 2px; background: var(--sunken); }
.heatmap__cell.l1 { background: color-mix(in srgb, var(--accent) 30%, var(--sunken)); }
.heatmap__cell.l2 { background: color-mix(in srgb, var(--accent) 52%, var(--sunken)); }
.heatmap__cell.l3 { background: color-mix(in srgb, var(--accent) 76%, var(--sunken)); }
.heatmap__cell.l4 { background: var(--accent); }

.home-world { max-width: var(--wrap); margin: 56px auto 0; padding: 0 var(--gutter); }
.home-world .card { scroll-margin-top: calc(var(--header-h) + 20px); }
.pond { position: relative; max-width: var(--wrap); margin: 56px auto 0; padding: 0 var(--gutter); }
.pond__canvas {
  display: block; width: 100%; height: 96px; cursor: crosshair; border-radius: 14px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent-soft) 60%, transparent), var(--accent-soft));
}
.site .pond__hint { margin: 6px 0 0; text-align: right; font-size: 11px; color: var(--faint); }
.pond + .site-footer { margin-top: 18px; }

/* ── Reading column (homepage markdown) ─────────────────────────────── */
.home__main { max-width: 680px; min-width: 0; counter-reset: section; }
.home__main > h2 {
  counter-increment: section;
  margin: 60px 0 22px; padding-top: 44px;
  border-top: 1px solid var(--line);
  font: 500 30px/1.15 var(--serif); letter-spacing: -.015em; color: var(--ink);
  scroll-margin-top: calc(var(--header-h) + 20px);
}
.home__main > h2::before {
  content: counter(section, decimal-leading-zero);
  display: block; margin-bottom: 10px;
  font: 500 11px/1 var(--mono); letter-spacing: .12em; color: var(--accent);
}
.home__main > h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.prose h2, .prose h3, .prose h4 { color: var(--ink); scroll-margin-top: calc(var(--header-h) + 20px); }
.prose h2 { margin: 40px 0 14px; font: 500 25px/1.2 var(--serif); letter-spacing: -.01em; }
.prose h3 { margin: 28px 0 10px; font: 600 17px/1.35 var(--sans); }
.prose h4 { margin: 22px 0 8px; font: 600 15px/1.4 var(--sans); }
.prose pre {
  margin: 0 0 18px; padding: 14px 16px; overflow-x: auto; border-radius: 8px;
  background: var(--sunken); border: 1px solid var(--line); font: 13px/1.6 var(--mono);
}
.prose pre code { padding: 0; background: none; font-size: inherit; }
.prose table { display: block; overflow-x: auto; max-width: 100%; margin: 0 0 18px; border-collapse: collapse; font-size: 13.5px; }
.prose th, .prose td { padding: 6px 10px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.prose th { font-weight: 600; color: var(--ink); border-bottom-color: var(--line-strong); }
.prose img { border-radius: 6px; }
.prose ol { padding-left: 22px; margin: 0 0 18px; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 28px 0; }

.prose p { margin: 0 0 18px; }
.prose strong { font-weight: 600; color: var(--ink); }
.prose p a, .prose li a {
  color: var(--accent);
  text-decoration: underline; text-decoration-color: var(--accent-line);
  text-decoration-thickness: 1px; text-underline-offset: 3px;
}
.prose p a:hover, .prose li a:hover { text-decoration-color: currentColor; }
.prose ul { padding: 0; margin: 0 0 18px; list-style: none; }
.prose li { position: relative; padding-left: 20px; margin-bottom: 12px; }
.prose li::before {
  content: ""; position: absolute; left: 2px; top: .85em;
  width: 7px; height: 1.5px; background: var(--faint);
}
.prose li:last-child { margin-bottom: 0; }
.prose li > em:first-child {
  font: normal 12.5px/1 var(--mono); font-variant-numeric: tabular-nums;
  letter-spacing: .02em; color: var(--muted);
  padding: 3px 6px; margin-right: 1px; border-radius: 4px; background: var(--sunken);
}
.prose code {
  font: .86em var(--mono); padding: 1px 5px; border-radius: 4px;
  background: var(--sunken); color: var(--ink);
}
.prose blockquote {
  margin: 30px 0 0; padding: 4px 0 4px 20px;
  border-left: 2px solid var(--accent-line);
  font: 16px/1.85 var(--serif); color: var(--muted);
}
.prose blockquote p { margin: 0; }

/* Projects */
.project { padding: 26px 0; border-top: 1px dashed var(--line-strong); }
#projects + .project { padding-top: 0; border-top: 0; }
.prose .project h3 { margin: 0 0 10px; font: 500 22px/1.25 var(--serif); letter-spacing: -.01em; }
.prose .project h3 a { color: var(--ink); text-decoration: none; }
.prose .project h3 a:hover { color: var(--accent); }
.prose .project p { font-size: 15px; line-height: 1.75; }
.prose .project p:last-child { margin-bottom: 0; }
.prose a.repo-link {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 11px 5px 9px; border: 1px solid var(--line-strong); border-radius: 999px;
  font: 12.5px/1.2 var(--mono); color: var(--ink); text-decoration: none;
  transition: border-color .15s ease, background-color .15s ease;
}
.prose a.repo-link::before, .prose a.repo-link::after {
  content: ""; width: 13px; height: 13px; flex: none; background: currentColor;
  -webkit-mask: var(--glyph) center / contain no-repeat; mask: var(--glyph) center / contain no-repeat;
}
.prose a.repo-link::before {
  --glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27s1.36.09 2 .27c1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.01 8.01 0 0 0 16 8c0-4.42-3.58-8-8-8'/%3E%3C/svg%3E");
}
.prose a.repo-link::after {
  width: 11px; height: 11px; opacity: .7;
  --glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='black' stroke-width='1.4'%3E%3Cpath d='M3.5 8.5 8.5 3.5M4.5 3.5h4v4'/%3E%3C/svg%3E");
}
.prose a.repo-link:hover { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-ink); }

/* Education & experience timeline */
.prose .timeline { position: relative; list-style: none; margin: 0; padding: 0 0 0 26px; }
.prose .timeline::before {
  content: ""; position: absolute; left: 5px; top: 10px; bottom: 10px; width: 1px; background: var(--line-strong);
}
.prose .tl-item { position: relative; margin: 0 0 26px; padding: 0; }
.prose .tl-item:last-child { margin-bottom: 0; }
.prose .tl-item::before {
  content: ""; position: absolute; left: -26px; top: 7px; width: 11px; height: 11px; border-radius: 50%;
  background: var(--paper); border: 1.5px solid var(--faint);
}
.prose .tl-item.is-current::before { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.tl-head { display: flex; justify-content: space-between; align-items: baseline; gap: 6px 18px; flex-wrap: wrap; }
.prose .tl-role { flex: 1 1 260px; margin: 0; font: 600 16px/1.45 var(--sans); color: var(--ink); }
.prose .tl-role strong { font-weight: 600; }
.prose .tl-date { flex: none; margin: 0; font: 12.5px/1.5 var(--mono); color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tl-now { color: var(--accent-ink); }
.tl-expected { color: var(--faint); }
.prose .tl-org { margin: 2px 0 0; font-size: 14.5px; color: var(--text); }
.prose .tl-people { margin: 2px 0 0; font-size: 13.5px; color: var(--muted); }
.tl-summary { margin-top: 8px; }
.prose .tl-summary p, .prose .tl-details p { margin: 0; font-size: 15px; line-height: 1.7; }
.tl-more { margin-top: 6px; }
.tl-more > summary {
  display: inline-flex; align-items: center; gap: 6px; padding: 2px 0;
  font-size: 13px; color: var(--accent); cursor: pointer;
}
.tl-more > summary::after {
  content: ""; width: 6px; height: 6px; margin-top: -3px; border-right: 1.3px solid currentColor; border-bottom: 1.3px solid currentColor;
  transform: rotate(45deg); transition: transform .15s ease;
}
.tl-more[open] > summary::after { transform: rotate(225deg); margin-top: 3px; }
.tl-more > summary:hover { color: var(--accent-ink); }
.tl-details { margin-top: 6px; padding: 10px 14px; border-left: 2px solid var(--accent-line); background: var(--sunken); border-radius: 0 8px 8px 0; }
.prose .tl-details p { font-size: 14.5px; color: var(--text); }
.site .tl-note { margin: 18px 0 0 26px; font-size: 14.5px; color: var(--muted); }
#education + .timeline .tl-item { margin-bottom: 16px; }

/* Publications */
.prose .pubs { list-style: none; padding: 0; margin: 0; }
.prose .pub { padding: 0 0 22px; margin: 0 0 22px; border-bottom: 1px dashed var(--line-strong); }
.prose .pub::before { display: none; }
.prose .pub:last-child { margin-bottom: 0; border-bottom: 0; }
.prose li.pub { padding-left: 0; }
.pub__meta { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.pub__type {
  padding: 2px 8px; border-radius: 4px; background: var(--sunken); color: var(--muted);
  font: 500 11px/1.5 var(--mono); letter-spacing: .04em; text-transform: uppercase;
}
.pub__type--accepted { background: var(--accent-soft); color: var(--accent-ink); }
.pub__year { font: 12px var(--mono); color: var(--faint); }
.prose .pub__title { margin: 0 0 4px; font: 500 19px/1.3 var(--serif); letter-spacing: -.005em; color: var(--ink); }
.prose .pub__authors { margin: 0 0 4px; font-size: 14px; color: var(--muted); }
.prose .pub__authors strong { color: var(--ink); }
.prose .pub__note { margin: 0 0 10px; font-size: 14px; color: var(--muted); }
.pub__links { display: flex; flex-wrap: wrap; gap: 8px; }
.prose .pub__links a, .pub__cite {
  display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: transparent; cursor: pointer;
  font: 12.5px/1.5 var(--sans); color: var(--ink); text-decoration: none;
}
.prose .pub__links a:hover, .pub__cite:hover { border-color: var(--accent); color: var(--accent-ink); }
.pub__cite.is-copied { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-ink); }

/* Project cards and README panel */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.card-project {
  position: relative; display: flex; flex-direction: column;
  padding: 18px 18px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface);
  transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.card-project:hover { border-color: var(--accent-line); transform: translateY(-2px); box-shadow: 0 8px 20px rgba(38, 45, 48, .07); }
.prose .card-project__name { margin: 0 0 6px; font: 500 20px/1.25 var(--serif); }
.prose .card-project__name a { color: var(--ink); text-decoration: none; }
.prose .card-project__name a::after { content: ""; position: absolute; inset: 0; border-radius: 12px; }
.prose .card-project__tagline { flex: 1; margin: 0 0 12px; font-size: 13.5px; line-height: 1.6; color: var(--muted); }
.prose .card-project__tags { display: flex; flex-wrap: wrap; gap: 5px; margin: 0 0 12px; }
.prose .card-project__tags li {
  padding: 1px 7px; margin: 0; border-radius: 4px; background: var(--sunken);
  font: 11px/1.6 var(--mono); color: var(--muted);
}
.prose .card-project__tags li::before { display: none; }
.card-project__foot { display: flex; justify-content: space-between; align-items: center; padding-top: 10px; border-top: 1px solid var(--line); }
.card-project__open { display: inline-flex; align-items: center; font-size: 12.5px; color: var(--accent); }
.card-project:hover .icon--arrow { transform: translateX(2px); }
.prose a.card-project__repo { position: relative; z-index: 1; display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; color: var(--muted); text-decoration: none; }
.prose a.card-project__repo:hover { background: var(--sunken); color: var(--ink); }

.drawer {
  width: min(760px, 100vw); max-width: 100vw; height: 100%; max-height: 100%;
  margin: 0 0 0 auto; padding: 0; border: 0; border-left: 1px solid var(--line);
  background: var(--paper); color: var(--text); box-shadow: var(--shadow);
}
.drawer[open] { display: flex; flex-direction: column; animation: drawer-in .22s ease; }
.drawer::backdrop { background: rgba(20, 25, 28, .38); }
@keyframes drawer-in { from { transform: translateX(32px); opacity: .4; } to { transform: none; opacity: 1; } }
.drawer__head {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 16px;
  padding: 20px 28px 16px; border-bottom: 1px solid var(--line); background: var(--paper);
}
.drawer__head .eyebrow { margin-bottom: 4px; text-transform: none; letter-spacing: .02em; }
.site .drawer__head h2 { margin: 0; font: 500 26px/1.2 var(--serif); color: var(--ink); }
.drawer__actions { display: flex; gap: 6px; align-items: center; flex: none; }
.drawer__body { flex: 1; overflow-y: auto; padding: 24px 28px 48px; outline: none; overscroll-behavior: contain; }
.drawer__body > :first-child, .drawer__body section > h2.plain:first-child { margin-top: 0; }
.prose h2.plain { margin-top: 36px; padding-bottom: 8px; border-bottom: 1px solid var(--line); font-size: 22px; }
.readme__source { font-size: 12.5px; color: var(--faint); }
.prose .readme h1 { margin: 28px 0 14px; font: 500 28px/1.2 var(--serif); color: var(--ink); }
.drawer__head { position: relative; }
.prose .readme-center { text-align: center; }
.prose .readme-center img { display: block; margin: 8px auto 12px; max-height: 140px; width: auto; }
.back-link { font-size: 13.5px; }
.project-page__links { margin-top: 16px; }

/* ── Generic page (CV, Explore) ─────────────────────────────────────── */
.page { max-width: 820px; margin: 0 auto; padding: 52px var(--gutter) 40px; }
.page--wide { max-width: var(--wrap); }
.page__header { margin-bottom: 36px; }
.site .page__header h1 { margin: 0 0 12px; font: 500 40px/1.1 var(--serif); letter-spacing: -.02em; color: var(--ink); }
.site .page__lede { max-width: 620px; margin: 0; color: var(--muted); }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  padding: 28px;
}
.card + .card, .card + .card-row, .card-row + .card { margin-top: 24px; }
.card__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 18px; }
.site .card h2 { margin: 0; font: 500 26px/1.2 var(--serif); letter-spacing: -.01em; color: var(--ink); }
.site .card__note { margin: 6px 0 0; font-size: 14px; color: var(--muted); max-width: 60ch; }
.badge {
  flex: none; padding: 3px 8px; border-radius: 4px;
  font: 600 10.5px/1.4 var(--mono); letter-spacing: .08em;
  background: #f6e7cf; color: #7b4f16;
}
:root[data-theme="dark"] .badge { background: #3d3324; color: #e8c58f; }
.text-button {
  padding: 0; border: 0; background: none; cursor: pointer;
  color: var(--accent); font-size: 13.5px;
  text-decoration: underline; text-decoration-color: var(--accent-line); text-underline-offset: 3px;
}
.text-button:hover { text-decoration-color: currentColor; }

/* World notebook */
.tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--line); margin-bottom: 22px; }
.tabs button {
  padding: 0 0 10px; margin-bottom: -1px; border: 0; border-bottom: 2px solid transparent;
  background: none; cursor: pointer; font-size: 14px; color: var(--muted);
}
.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent); }
.atlas__body { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 32px; align-items: start; }
.atlas__stage {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto;
  align-items: center; gap: 8px 12px; min-width: 0;
}
.atlas__crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; min-height: 32px; font-size: 13px; color: var(--muted); }
.atlas__crumb { padding: 4px 2px; border: 0; background: none; font: inherit; color: var(--accent); cursor: pointer; }
button.atlas__crumb { text-decoration: underline; text-decoration-color: var(--accent-line); text-underline-offset: 3px; }
button.atlas__crumb:hover { text-decoration-color: currentColor; }
.atlas__crumb.is-current { color: var(--ink); font-weight: 500; }
.atlas__crumb-sep { color: var(--faint); }
.atlas__zoom { display: flex; gap: 4px; }
.atlas__zoom button {
  width: 32px; height: 32px; padding: 0; border: 1px solid var(--line); border-radius: 8px;
  background: var(--surface); color: var(--ink); font-size: 16px; line-height: 1; cursor: pointer;
}
.atlas__zoom button:hover { border-color: var(--accent-line); }
.atlas__map {
  grid-column: 1 / -1; display: block; width: 100%; height: auto; aspect-ratio: 2 / 1;
  border-radius: 10px; background: var(--map-sea);
  touch-action: pan-y; cursor: grab; user-select: none; -webkit-user-select: none;
}
.atlas__map:active { cursor: grabbing; }
.atlas__map path { vector-effect: non-scaling-stroke; }
.atlas__map [role="button"]:focus { outline: none; }
.atlas__map [role="button"]:focus-visible { stroke: var(--ink); stroke-width: 2; }
.atlas__country { fill: var(--map-land); stroke: var(--map-edge); stroke-width: .6; transition: fill .2s ease, opacity .3s ease; }
.atlas__country.is-visited { fill: var(--map-visited); cursor: pointer; }
.atlas__country.is-visited:hover { fill: var(--map-mark); }
.atlas.is-zoomed .atlas__country { opacity: .45; }
.atlas.is-zoomed .atlas__country.is-visited { opacity: .7; }
.atlas__country.v1 { fill: var(--map-v1); }
.atlas__country.v2 { fill: var(--map-v2); }
.atlas__country.v3 { fill: var(--map-v3); }
.atlas__country.v4 { fill: var(--map-v4); }
.atlas__kashmir { fill: var(--map-sea); stroke: var(--faint); stroke-width: .8; stroke-dasharray: 3 2; }
.atlas__dash { fill: var(--muted); stroke: var(--muted); stroke-width: .8; }
.atlas__region { fill: var(--map-in); stroke: var(--map-edge); stroke-width: .8; transition: fill .2s ease; }
.atlas__region.is-whole { fill: var(--map-whole); }
.atlas__region.is-visited { fill: var(--map-visited); }
.atlas__region.is-home { fill: var(--map-home); }
.atlas__region[role="button"] { cursor: pointer; }
.atlas__region[role="button"]:hover { fill: var(--map-whole); }
.atlas__region.is-visited[role="button"]:hover { fill: var(--map-mark); }
.atlas__region.is-selected { stroke: var(--ink); stroke-width: 1.6; }
.atlas__mark { cursor: pointer; }
.atlas__mark-hit { fill: transparent; }
.atlas__mark-dot { fill: var(--map-mark); stroke: var(--surface); stroke-width: 1.5; }
.atlas__mark.is-home .atlas__mark-dot { fill: var(--map-home); }
.atlas__mark:hover .atlas__mark-dot, .atlas__mark:focus-visible .atlas__mark-dot { stroke: var(--ink); }
.atlas__mark:focus { outline: none; }
.site .atlas__tip {
  position: absolute; left: 0; top: 0; z-index: 3; max-width: 240px; margin: 0; padding: 4px 9px;
  border-radius: 6px; background: var(--ink); color: var(--paper); font-size: 12.5px; line-height: 1.45;
  pointer-events: none; white-space: nowrap;
}
.site .atlas__loading {
  position: absolute; left: 50%; top: 55%; transform: translate(-50%, -50%);
  margin: 0; font-size: 13px; color: var(--muted);
}
.atlas__tip[hidden], .atlas__loading[hidden], .atlas__inset[hidden] { display: none; }
.atlas__inset {
  position: absolute; right: 10px; top: 50px; z-index: 2; width: min(260px, 40%);
  max-height: calc(100% - 60px); overflow-y: auto; overscroll-behavior: contain;
  padding: 10px 12px 10px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface); box-shadow: var(--shadow);
}
.atlas.inset-left .atlas__inset { right: auto; left: 10px; }
.atlas__inset-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.site .atlas__inset h3 { margin: 0; font: 500 15px/1.3 var(--serif); color: var(--ink); }
.atlas__inset .icon-button { width: 28px; height: 28px; min-width: 28px; font-size: 13px; }
.atlas__inset-map { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; }
.atlas__part { fill: var(--map-land); stroke: var(--map-edge); stroke-width: .8; vector-effect: non-scaling-stroke; }
.atlas__part.is-visited { fill: var(--map-visited); }
.atlas__city-label.is-small { font-size: 14px; stroke-width: 3.5px; }
.atlas__frame { fill: var(--map-sea); stroke: var(--line-strong); stroke-width: 1; vector-effect: non-scaling-stroke; }
.atlas__frame-label { font: 600 13px var(--sans); fill: var(--ink); }
.atlas__frame-note { font: 11px var(--sans); fill: var(--muted); }
.atlas__leader { stroke: var(--muted); stroke-width: 1; vector-effect: non-scaling-stroke; }
.atlas__city { fill: var(--map-mark); stroke: var(--surface); stroke-width: 2; }
.atlas__city-label {
  font: 600 17px var(--sans); fill: var(--ink);
  paint-order: stroke; stroke: var(--surface); stroke-width: 4px; stroke-linejoin: round;
}
.site .atlas__inset-note { margin: 2px 0 0; font-size: 12.5px; color: var(--muted); }
.atlas__inset-list { display: flex; flex-wrap: wrap; gap: 2px 12px; margin: 2px 0 0; padding: 0; list-style: none; font-size: 12.5px; color: var(--ink); }
.atlas__inset-list span { margin-left: 4px; color: var(--faint); }
.atlas__side { padding-top: 40px; }
.site .atlas__credit { margin: 6px 0 0; font-size: 11.5px; color: var(--faint); }
.atlas__credit a { color: inherit; }
.metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 18px; margin: 0 0 16px; }
.metrics div { margin: 0; }
.metrics dt { font-size: 12px; line-height: 1.4; color: var(--muted); margin-top: 4px; }
.metrics dd { margin: 0; font: 500 30px/1.1 var(--serif); color: var(--ink); font-variant-numeric: tabular-nums lining-nums; }
.metrics div { display: flex; flex-direction: column; }
.metrics dd { order: -1; }
.site .world__note { margin: 0 0 10px; font-size: 13.5px; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 18px; }
.chip {
  display: inline-flex; gap: 8px; align-items: center;
  padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--paper); cursor: pointer; font-size: 12.5px; color: var(--ink);
}
.chip span { font: 11.5px var(--mono); color: var(--muted); font-variant-numeric: tabular-nums; }
.chip:hover, .chip[aria-pressed="true"] { border-color: var(--accent); }
.site .world__caption { margin: 18px 0 0; padding-top: 14px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--faint); }

/* Oscillator lab */
.lab { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 28px; align-items: center; }
.lab__rig { width: 100%; height: auto; display: block; }
.lab__plot { width: 100%; height: auto; display: block; overflow: visible; }
.lab svg text { font: 11px var(--mono); fill: var(--faint); }
.lab__axis { stroke: var(--line-strong); stroke-width: 1; }
.lab__grid { stroke: var(--line); stroke-width: 1; stroke-dasharray: 2 4; }
.lab__envelope { fill: none; stroke: var(--accent-line); stroke-width: 1; stroke-dasharray: 4 4; }
.lab__curve { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; }
.lab__now { stroke: #b4583c; stroke-width: 1; }
.lab__dot { fill: #b4583c; stroke: var(--surface); stroke-width: 2; }
.lab__wall { fill: var(--sunken); stroke: var(--line-strong); }
.lab__spring { fill: none; stroke: var(--muted); stroke-width: 1.6; stroke-linejoin: round; }
.lab__mass { fill: var(--accent); }
.lab__damper { fill: none; stroke: var(--faint); stroke-width: 1.4; }
.lab__controls { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 28px; margin-top: 22px; }
.control label { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.control output { font: 12.5px var(--mono); color: var(--ink); font-variant-numeric: tabular-nums; }
.control input[type="range"] { width: 100%; accent-color: var(--accent); margin: 0; }
.lab__buttons { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 18px; }
.button {
  display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 14px;
  border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface);
  cursor: pointer; font-size: 13.5px; color: var(--ink);
}
.button:hover { border-color: var(--accent); }
.button--primary { background: var(--accent); border-color: var(--accent); color: var(--paper); }
.button--primary:hover { background: var(--accent-ink); }
.lab__readout { margin-left: auto; font: 12.5px var(--mono); color: var(--muted); font-variant-numeric: tabular-nums; }
.regime { color: var(--accent-ink); }

.card-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.mini-card {
  display: block; padding: 20px 22px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--surface); color: var(--ink) !important;
  transition: border-color .15s ease, transform .15s ease;
}
.mini-card:hover { border-color: var(--accent); transform: translateY(-1px); }
.mini-card strong { display: flex; align-items: center; font: 500 19px/1.3 var(--serif); }
.mini-card span { display: block; margin-top: 4px; font-size: 13px; color: var(--muted); }

/* CV page */
.cv-switcher { display: flex; gap: 8px; flex-wrap: wrap; }
.cv-switcher__button {
  min-height: 36px; padding: 0 16px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); font-size: 14px;
}
.cv-switcher__button.is-active { background: var(--accent); border-color: var(--accent); color: var(--paper); }
.cv-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.cv-embed { height: 82vh; min-height: 640px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; }
.cv-embed__frame { display: block; width: 100%; height: 100%; border: 0; }
.site .cv-note { margin: 14px 0 0; font-size: 13.5px; color: var(--muted); }

/* ── Footer ─────────────────────────────────────────────────────────── */
.site-footer { margin-top: 64px; border-top: 1px solid var(--line); }
.site-footer__inner {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  max-width: var(--wrap); margin: 0 auto; padding: 22px var(--gutter) 30px;
  font-size: 12.5px; color: var(--faint);
}
.site-footer p { margin: 0; }
.site-footer nav { display: flex; gap: 20px; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--ink); }

/* ── Search dialog ──────────────────────────────────────────────────── */
.search {
  width: min(560px, calc(100vw - 32px)); max-height: min(560px, calc(100vh - 80px));
  margin: 12vh auto auto; padding: 0;
  border: 1px solid var(--line); border-radius: 14px;
  background: var(--surface); color: var(--text); box-shadow: var(--shadow);
  overflow: hidden;
}
.search[open] { display: flex; flex-direction: column; }
.search::backdrop { background: rgba(20, 25, 28, .35); }
.search__form { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); color: var(--faint); }
.search__form input {
  flex: 1; min-width: 0; border: 0; outline: 0; background: none;
  font: 16px var(--sans); color: var(--ink);
}
.search__form input::-webkit-search-cancel-button { display: none; }
.search kbd { font: 11px var(--mono); padding: 2px 6px; border: 1px solid var(--line); border-radius: 4px; color: var(--faint); }
.search__results { overflow-y: auto; padding: 8px 8px 12px; }
.search__results .eyebrow { margin: 12px 10px 4px; }
.search__results a {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  padding: 9px 10px; border-radius: 6px; color: var(--ink) !important; font-size: 14.5px;
}
.search__results a span { font-size: 12.5px; color: var(--muted); text-align: right; }
.search__results a:hover, .search__results a:focus-visible, .search__results a.is-active { background: var(--accent-soft); outline: none; }
.site .search__empty { margin: 16px 10px; font-size: 14px; color: var(--muted); }

/* ── Responsive ─────────────────────────────────────────────────────── */
@media (max-width: 1140px) {
  .site-nav { display: none; }
  .compact-menu { display: block; }
  .site-actions, .site-nav + .site-actions { margin-left: auto; }
  .site-header__inner { gap: 12px; }
  .home { grid-template-columns: 196px minmax(0, 1fr); column-gap: 48px; }
}
@media (max-width: 860px) {
  :root { --gutter: 28px; }
  .atlas__body { grid-template-columns: 1fr; gap: 20px; }
  .atlas__side { display: grid; grid-template-columns: 1fr 1fr; gap: 0 28px; padding-top: 0; }
  .atlas__side .metrics { grid-column: 1; grid-row: 1 / span 2; }
  .lab { grid-template-columns: 1fr; }
  .lab__rig { max-width: 320px; margin: 0 auto; }
  .card-row { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  :root { --gutter: 20px; --header-h: 56px; }
  body.site { font-size: 16px; }
  .site-brand__place { display: none; }
  .icon-button, .compact-menu > summary { min-width: 44px; height: 44px; }
  .drawer__head { padding: 14px 56px 12px 16px; flex-wrap: wrap; }
  .drawer__actions [data-drawer-close] { position: absolute; top: 8px; right: 8px; }
  .drawer__actions .button { min-height: 36px; padding: 0 10px; }
  .drawer__body { padding: 18px 16px 40px; }
  .site .drawer__head h2 { font-size: 22px; }
  .cards { grid-template-columns: 1fr; }
  .compact-menu { position: static; }
  .compact-menu__panel { left: 12px; right: 12px; top: calc(100% + 6px); width: auto; max-width: none; }
  .home { display: flex; flex-direction: column; padding-top: 28px; }
  .widgets { order: 3; align-self: stretch; margin-top: 48px; grid-template-columns: 1fr 1fr; }
  .widget--today, .widget--explore { grid-column: 1 / -1; }
  .profile { margin-bottom: 36px; padding-bottom: 26px; border-bottom: 1px solid var(--line); }
  .profile__inner { position: static; }
  .profile__identity { display: flex; align-items: center; gap: 18px; margin-bottom: 14px; }
  .profile__avatar { width: 72px; height: 72px; margin: 0; }
  .site .profile__name { font-size: 28px; }
  .site .profile__alias { margin: 2px 0 2px; font-size: 16px; }
  .site .profile__affiliation { margin: 0; font-size: 13.5px; }
  .site .profile__field { margin-bottom: 12px; }
  .profile__links { gap: 22px; margin-bottom: 14px; font-size: 15px; }
  .profile__links a { display: inline-block; padding: 6px 0; }
  .site .profile__clock { justify-content: flex-start; gap: 12px; }
  .profile__extras { margin-top: 20px; padding-top: 14px; }
  .profile__extras { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 18px; padding-top: 12px; }
  .profile__extras .eyebrow { width: 100%; margin: 0; }
  .extra { padding: 8px 0; }
  .extra strong { font-size: 14px; color: var(--accent); }
  .extra > span:last-child { display: none; }
  .prose h2 { margin-top: 48px; padding-top: 36px; font-size: 27px; }
  .prose .project h3 { font-size: 20px; }
  .page { padding-top: 32px; }
  .site .page__header h1 { font-size: 34px; }
  .card { padding: 20px 18px; border-radius: 10px; }
  .atlas__side { display: block; }
  .atlas__zoom button { width: 44px; height: 44px; }
  .atlas__map { aspect-ratio: 5 / 3; }
  .atlas__inset, .atlas.inset-left .atlas__inset { position: static; grid-column: 1 / -1; width: auto; max-height: none; box-shadow: none; }
  .atlas__inset .icon-button { width: 44px; height: 44px; min-width: 44px; }
  .atlas__inset-map { max-width: 400px; margin: 0 auto; }
  .lab__controls { grid-template-columns: 1fr; }
  .lab__rig { max-width: 210px; }
  .lab .lab__plot text { font-size: 20px; }
  .lab__readout { width: 100%; margin-left: 0; }
  .search { margin-top: 10px; max-height: calc(100vh - 20px); }
  .search__results a { flex-direction: column; gap: 0; }
  .search__results a span { text-align: left; }
  .site-footer__inner { flex-direction: column; }
}
@media (max-width: 480px) {
  .widgets { grid-template-columns: 1fr; }
  .pond__canvas { height: 80px; }
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
@media (prefers-reduced-motion: reduce) {
  .drawer[open] { animation: none; }
  .site *, .site *::before, .site *::after { transition: none !important; }
}
@media print {
  .site-header, .site-footer, .profile__extras, .profile__status, .search, .widgets, .pond { display: none !important; }
  body.site { background: #fff; color: #000; font-size: 11pt; }
  .home { display: block; padding: 0; }
  .profile__inner { position: static; }
  .project, .prose li { break-inside: avoid; }
  .tl-more > summary { display: none; }
}
