/* Sabuj Biswas: research portfolio */

:root {
  --bg: #F6F4EE;
  --bg-2: #EDEAE1;
  --surface: #FFFFFF;
  --text: #10262C;
  --muted: #4E6467;
  --faint: #8A9B9C;
  --line: rgba(16, 38, 44, 0.12);
  --accent: #0E7C72;
  --accent-ink: #FFFFFF;
  --water: #1B8FA6;
  --sediment: #B4781E;
  --pathogen: #C2513A;
  --fish: #6A5ACD;
  --glow: rgba(14, 124, 114, 0.16);
  --shadow: 0 1px 2px rgba(16, 38, 44, .06), 0 8px 24px rgba(16, 38, 44, .06);

  --f-display: "Source Serif 4", Georgia, "Times New Roman", serif;
  --f-sans: "Source Sans 3", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --f-mono: var(--f-sans); /* labels use the sans; no monospace on the page */
  --f-bn: "Noto Serif Bengali", serif;

  --wrap: 1160px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 16px;
}

:root[data-theme="dark"] {
  --bg: #0A1A1F;
  --bg-2: #0F242A;
  --surface: #12292F;
  --text: #E6EFEC;
  --muted: #A3B8B5;
  --faint: #6F8786;
  --line: rgba(230, 239, 236, 0.10);
  --accent: #46C7B5;
  --accent-ink: #062024;
  --water: #4CC3DC;
  --sediment: #E2A84B;
  --pathogen: #EE8466;
  --fish: #A99BF2;
  --glow: rgba(70, 199, 181, 0.18);
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 32px rgba(0, 0, 0, .25);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0A1A1F;
    --bg-2: #0F242A;
    --surface: #12292F;
    --text: #E6EFEC;
    --muted: #A3B8B5;
    --faint: #6F8786;
    --line: rgba(230, 239, 236, 0.10);
    --accent: #46C7B5;
    --accent-ink: #062024;
    --water: #4CC3DC;
    --sediment: #E2A84B;
    --pathogen: #EE8466;
    --fish: #A99BF2;
    --glow: rgba(70, 199, 181, 0.18);
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 32px rgba(0, 0, 0, .25);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 19px/1.65 var(--f-sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  transition: background-color .3s ease, color .3s ease;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
em { font-style: italic; }
h1, h2, h3 { margin: 0; font-weight: 500; line-height: 1.15; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--accent); color: var(--accent-ink); padding: 8px 14px; border-radius: 8px; }
.skip:focus { left: 8px; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease;
}
.site-header.scrolled { border-bottom-color: var(--line); }
.header-inner { display: flex; align-items: center; gap: 24px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; letter-spacing: -.01em; }
.brand-mark {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  background: var(--accent); color: var(--accent-ink);
  font: 700 14px/1 var(--f-sans); letter-spacing: .02em;
}
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a { text-decoration: none; color: var(--muted); font-size: 17px; padding: 8px 12px; border-radius: 999px; transition: color .2s, background-color .2s; }
.nav a:hover, .nav a.active { color: var(--text); background: var(--bg-2); }
.header-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--line); background: transparent; color: var(--text); cursor: pointer;
  transition: background-color .2s;
}
.icon-btn:hover { background: var(--bg-2); }
.icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.i-moon { display: none !important; }
:root[data-theme="dark"] .i-sun { display: none !important; }
:root[data-theme="dark"] .i-moon { display: block !important; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .i-sun { display: none !important; }
  :root:not([data-theme="light"]) .i-moon { display: block !important; }
}
.menu-btn { display: none; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 20px; border-radius: 999px;
  background: var(--accent); color: var(--accent-ink);
  font: 500 17px/1 var(--f-sans); text-decoration: none;
  border: 1px solid var(--accent);
  transition: transform .2s ease, box-shadow .2s ease, background-color .2s;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 20px var(--glow); }
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { background: var(--bg-2); box-shadow: none; }
.btn-small { padding: 9px 16px; font-size: 16px; }
.btn-lg { padding: 18px 28px; font-size: clamp(17px, 2.4vw, 22px); }

/* ---------- hero ---------- */
.hero { position: relative; padding: clamp(32px, 6vw, 72px) 0 24px; overflow-x: clip; }
.hero-figure::before {
  content: ""; position: absolute; inset: -18%;
  background: radial-gradient(closest-side, var(--glow), transparent 72%);
  pointer-events: none; z-index: -1;
}
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(24px, 5vw, 64px); align-items: center; }
.eyebrow, .kicker {
  font: 600 15px/1.4 var(--f-sans); letter-spacing: .12em; text-transform: uppercase; color: var(--accent);
}
.name {
  margin-top: 18px;
  font: 600 clamp(48px, 7.4vw, 88px)/1.02 var(--f-display);
  letter-spacing: -0.015em;
}
.name-bn {
  display: block; margin-top: 12px;
  font: 500 clamp(24px, 3.2vw, 34px)/1.3 var(--f-bn);
  color: var(--muted); letter-spacing: 0;
}
.lede { margin-top: 26px; max-width: 40ch; font: 400 clamp(20.5px, 2.2vw, 24px)/1.55 var(--f-display); }
.lede em { font-style: italic; color: var(--accent); }
.affil { display: flex; align-items: center; gap: 8px; margin-top: 18px; color: var(--muted); font-size: 17px; }
.affil svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.id-links { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 24px; }
.id-links a { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); text-decoration: none; font: 400 17px/1.4 var(--f-sans); transition: color .2s; overflow-wrap: anywhere; }
.id-links a:hover { color: var(--text); }
.id-links svg { width: 17px; height: 17px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; }
.id-links svg.fill { fill: currentColor; stroke: none; }
.rg { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 4px; background: #00CCBB; color: #fff; font: 700 9px/1 var(--f-sans); flex: none; letter-spacing: -.02em; }
.rg sup { font-size: 6px; line-height: 0; vertical-align: 3px; }
.alt-email { margin-top: 14px; color: var(--muted); font-size: 17px; }
.alt-email a { color: var(--text); }
.orcid { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: #A6CE39; color: #fff; font: 700 9px/1 var(--f-sans); flex: none; }

.hero-figure { position: relative; margin: 0; width: 100%; max-width: 540px; justify-self: center; aspect-ratio: 1; }
.tree { position: absolute; inset: 0; width: 100%; height: 100%; overflow: hidden; }
.tree .spin { transform-origin: 0 0; animation: spin 420s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.tree path { fill: none; stroke: var(--faint); stroke-width: 1.15; stroke-linecap: round; opacity: .75; }
.tree path.draw { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw .9s cubic-bezier(.6,.05,.3,1) forwards; animation-delay: var(--d, 0s); }
.tree path.align { stroke-dasharray: 1.5 3; stroke-width: .7; opacity: .45; }
.tree path.align.draw { stroke-dasharray: none; animation: fade .8s ease forwards; opacity: 0; animation-delay: var(--d, 0s); }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fade { to { opacity: .45; } }
.tree circle { opacity: 0; transform-box: fill-box; transform-origin: center; animation: pop .5s cubic-bezier(.3,1.6,.5,1) forwards; animation-delay: var(--d, 0s); }
@keyframes pop { from { opacity: 0; transform: scale(0); } to { opacity: 1; transform: scale(1); } }
.tree .c-water { fill: var(--water); }
.tree .c-sediment { fill: var(--sediment); }
.tree .c-pathogen { fill: var(--pathogen); }
.tree .c-fish { fill: var(--fish); }
.tree .ring { fill: none; stroke: var(--line); stroke-width: 1; opacity: 1; animation: none; }

.portrait {
  position: absolute; left: 50%; top: 50%; width: 47%; aspect-ratio: 1; transform: translate(-50%, -50%);
  border-radius: 50%; overflow: hidden;
  background:
    radial-gradient(circle at 50% 35%, color-mix(in srgb, var(--accent) 35%, var(--surface)) 0%, color-mix(in srgb, var(--accent) 12%, var(--bg-2)) 70%);
  box-shadow: 0 0 0 6px var(--bg), 0 0 0 7px var(--line), var(--shadow);
}
.portrait img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 6%; transform: scale(1.16) translateY(7%); }
.tree-caption { position: absolute; bottom: -6px; right: 0; font: italic 400 14.5px/1.3 var(--f-sans); color: var(--faint); }

/* stats */
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr); margin: clamp(40px, 6vw, 72px) 0 0;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.stats > div { padding: 22px 20px 20px; border-left: 1px solid var(--line); display: flex; flex-direction: column-reverse; gap: 4px; }
.stats > div:first-child { border-left: 0; padding-left: 0; }
.stats dt { color: var(--muted); font-size: 16px; }
.stats dd { margin: 0; font: 600 clamp(36px, 5vw, 54px)/1 var(--f-display); letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.stats-note { margin-top: 10px; font: italic 400 15px/1.4 var(--f-sans); color: var(--faint); }

/* ---------- sections ---------- */
.section { padding: clamp(72px, 10vw, 128px) 0 0; }
.section-head { max-width: 760px; margin-bottom: clamp(32px, 4vw, 48px); }
.section-head h2, .featured-text h2, .contact h2 {
  margin-top: 14px; font: 600 clamp(32px, 4.4vw, 50px)/1.12 var(--f-display);
  letter-spacing: -.01em;
}
.section-lede { margin-top: 18px; color: var(--muted); font-size: 19.5px; max-width: 62ch; }

/* research themes */
.themes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.theme {
  position: relative; padding: 26px 22px 22px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 10px;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s;
}
.theme:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.theme-ic { width: 40px; height: 40px; fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 6px; }
.theme-ic .dot { fill: var(--accent); stroke: none; }
.theme h3 { font: 600 22px/1.25 var(--f-display); }
.theme p { color: var(--muted); font-size: 18px; line-height: 1.55; }
.theme .theme-ex { margin-top: auto; padding-top: 12px; border-top: 1px dashed var(--line); font: 600 15.5px/1.4 var(--f-sans); color: var(--text); }

/* featured */
.featured-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(32px, 5vw, 64px); align-items: center; }
.featured-text > p { margin-top: 20px; color: var(--muted); font-size: 18.5px; }
.findings { margin-top: 26px; display: grid; gap: 14px; }
.findings li { display: grid; grid-template-columns: 40px 1fr; gap: 8px; align-items: baseline; font-size: 19px; }
.f-n { font: 600 16px/1 var(--f-sans); color: var(--accent); }
.status { display: inline-flex; align-items: center; gap: 10px; margin-top: 28px; padding: 9px 16px; border-radius: 999px; background: var(--bg-2); font-size: 16px; color: var(--muted); }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--sediment); box-shadow: 0 0 0 0 var(--sediment); animation: pulse 2.4s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--sediment) 60%, transparent); } 70% { box-shadow: 0 0 0 10px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

.river-fig { margin: 0; padding: clamp(16px, 3vw, 28px); border-radius: 22px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
#river { width: 100%; height: auto; overflow: visible; }
.rg-a { stop-color: var(--water); }
.rg-b { stop-color: var(--sediment); }
#river-bank { fill: none; stroke: color-mix(in srgb, var(--water) 18%, transparent); stroke-width: 44; stroke-linecap: round; }
#river-path { fill: none; stroke: url(#rg); stroke-width: 10; stroke-linecap: round; stroke-dasharray: 14 10; animation: flow 3s linear infinite; }
@keyframes flow { to { stroke-dashoffset: -24; } }
.site { cursor: default; }
.site circle.halo { fill: var(--surface); }
.site circle.core { stroke: var(--surface); stroke-width: 2.5; }
.site.up circle.core { fill: var(--water); }
.site.mid circle.core { fill: var(--fish); }
.site.down circle.core { fill: var(--pathogen); }
.site text { font: 600 12.5px var(--f-sans); fill: var(--muted); }
.r-label { font: italic 400 22px var(--f-display); fill: var(--text); }
.r-city { font: 600 14px var(--f-sans); letter-spacing: .3em; fill: var(--faint); }
.river-fig figcaption { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 14px; font-size: 15.5px; color: var(--muted); }
.legend { display: inline-flex; align-items: center; gap: 8px; }
.lg { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }
.lg-up { background: var(--water); }
.lg-mid { background: var(--fish); }
.lg-down { background: var(--pathogen); }
.schematic { flex-basis: 100%; font: italic 400 15px/1.4 var(--f-sans); color: var(--faint); }

/* publications */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.chip {
  padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--muted);
  font: 500 16px/1 var(--f-sans); cursor: pointer; transition: all .2s;
}
.chip:hover { color: var(--text); border-color: var(--faint); }
.chip.is-on { background: var(--text); color: var(--bg); border-color: var(--text); }
.pubs { border-top: 1px solid var(--line); }
.pub { display: grid; grid-template-columns: 96px 1fr; gap: 24px; padding: 26px 0; border-bottom: 1px solid var(--line); transition: opacity .3s; }
.pub[hidden] { display: none; }
.pub-year { font: 600 27px/1.15 var(--f-display); color: var(--faint); font-variant-numeric: tabular-nums; }
.pub h3 { font: 600 clamp(20px, 2vw, 23px)/1.35 var(--f-display); }
.authors { margin-top: 8px; font-size: 16.5px; color: var(--muted); }
.authors b { color: var(--text); font-weight: 600; }
.venue { margin-top: 8px; font-size: 16.5px; line-height: 2; }
.venue .badge, .venue .doi { margin-left: 8px; vertical-align: 1px; }
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font: 600 14px/1.4 var(--f-sans); background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); }
.badge-review { background: color-mix(in srgb, var(--sediment) 18%, transparent); color: var(--sediment); }
.doi { display: inline-block; font: 600 15px/1 var(--f-sans); text-decoration: none; color: var(--accent); padding: 5px 10px; border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); border-radius: 999px; transition: background-color .2s; }
.doi:hover { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.pubs-more { margin-top: 22px; color: var(--muted); font-size: 17px; }
.pubs-more a { color: var(--accent); }

/* path */
.path-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: start; }
.timeline { position: relative; padding-left: 28px; }
.timeline::before { content: ""; position: absolute; left: 5px; top: 8px; bottom: 8px; width: 1px; background: var(--line); }
.timeline li { position: relative; padding-bottom: 32px; }
.timeline li::before {
  content: ""; position: absolute; left: -28px; top: 7px; width: 11px; height: 11px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--accent);
}
.timeline li:first-child::before { background: var(--accent); box-shadow: 0 0 0 5px var(--glow); }
.t-date { font: 600 15.5px/1.4 var(--f-sans); color: var(--accent); }
.timeline h3 { margin-top: 6px; font: 600 23px/1.3 var(--f-display); }
.t-org { margin-top: 4px; color: var(--muted); font-size: 17px; }
.timeline li > p:not(.t-org) { margin-top: 8px; font-size: 18px; }
.honours { padding: 28px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); position: sticky; top: 96px; }
.honours h3 { font: 600 15px/1.4 var(--f-sans); letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.honours h3:not(:first-child) { margin-top: 28px; }
.honours ul { margin-top: 14px; display: grid; gap: 14px; }
.honours li { display: grid; grid-template-columns: 70px 1fr; gap: 10px; font-size: 17px; line-height: 1.5; }
.honours li span { font: 600 16px/1.55 var(--f-sans); color: var(--faint); }

/* toolkit */
.tool-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.tool { padding: 24px 22px; border-radius: var(--radius); border: 1px solid var(--line); }
.tool h3 { font: 600 20.5px/1.3 var(--f-display); margin-bottom: 16px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags li { padding: 6px 12px; border-radius: 8px; background: var(--bg-2); font: 400 16.5px/1.3 var(--f-sans); color: var(--text); }
.tags-sm li { font-size: 14px; padding: 5px 10px; }

/* software */
.apps { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.app {
  display: flex; flex-direction: column; gap: 14px; padding: 30px; border-radius: 22px;
  background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: inherit;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s;
}
a.app:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.app-top { display: flex; justify-content: space-between; align-items: baseline; }
.app h3 { font: 600 28px/1.15 var(--f-display); }
.app h3 span { font-family: var(--f-bn); font-size: .8em; color: var(--muted); margin-left: 6px; }
.arrow { font-size: 24px; color: var(--accent); transition: transform .25s; }
a.app:hover .arrow { transform: translate(3px, -3px); }
.app > p { color: var(--muted); font-size: 18.5px; }
.app-stats { display: flex; gap: 32px; margin: 4px 0 0; }
.app-stats div { display: flex; flex-direction: column-reverse; }
.app-stats dt { font-size: 15px; color: var(--muted); }
.app-stats dd { margin: 0; font: 600 31px/1.1 var(--f-display); }
.app .tags { margin-top: auto; padding-top: 6px; }

/* contact */
.contact { padding-bottom: clamp(72px, 10vw, 120px); }
.contact-inner { text-align: center; display: flex; flex-direction: column; align-items: center; }
.contact h2 { max-width: 20ch; margin-bottom: 32px; }
.contact address { margin-top: 28px; font-style: normal; color: var(--muted); font-size: 17px; line-height: 1.7; }
.contact-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; margin-top: 24px; }
.contact-links a { color: var(--text); text-decoration: none; border-bottom: 1px solid var(--line); padding-bottom: 2px; font-size: 17px; transition: border-color .2s, color .2s; }
.contact-links a:hover { color: var(--accent); border-color: var(--accent); }

/* footer */
.site-footer { border-top: 1px solid var(--line); padding: 24px 0; color: var(--faint); font-size: 15.5px; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }
.site-footer a { color: var(--muted); text-decoration: none; }

/* reveal on scroll (only when JS is running) */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s ease, transform .8s cubic-bezier(.2,.7,.2,1); }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 1020px) {
  .nav a { padding: 8px 9px; font-size: 16px; }
}
@media (max-width: 860px) {
  .menu-btn { display: grid; }
  .nav {
    position: absolute; top: 68px; left: 0; right: 0; margin: 0;
    flex-direction: column; gap: 0; padding: 8px var(--gutter) 16px;
    background: var(--bg); border-bottom: 1px solid var(--line);
    display: none;
  }
  .nav.open { display: flex; }
  .nav a { padding: 12px 4px; font-size: 18.5px; border-radius: 0; border-bottom: 1px solid var(--line); }
  .nav a:hover { background: transparent; }
  .header-actions { margin-left: auto; }
  .hero-grid, .featured-grid, .path-grid { grid-template-columns: 1fr; }
  .hero-figure { order: -1; max-width: 400px; }
  .honours { position: static; }
  .apps { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  body { font-size: 18px; }
  .themes, .tool-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stats > div:nth-child(3) { border-left: 0; padding-left: 0; }
  .stats > div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .pub { grid-template-columns: 1fr; gap: 6px; }
  .pub-year { font-size: 22px; }
  .brand-name { display: none; }
  .tree-caption { display: none; }
  .app { padding: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important; transition-duration: .001ms !important; }
  html { scroll-behavior: auto; }
  .tree .spin { animation: none; }
  #river-path { animation: none; }
}

@media print {
  .site-header, .hero-figure, .filters, .cta { display: none; }
  .js .reveal { opacity: 1; transform: none; }
}
