:root {
  color-scheme: dark;
  --bg: #161819;
  --surface: #222526;
  --surface-soft: #2b3031;
  --ink: #e8ebec;
  --heading: #f5f6f5;
  --muted: #c3c9c9;
  --abstract: #cdd2d2;
  --note: #b0b8b9;
  --line: #414747;
  --media-line: #474d4d;
  --media-frame: #2b2f30;
  --accent: #87c6bb;
  --accent-strong: #a5dbd0;
  --warm: #ffaba0;
  --warm-paper: #3e2a29;
  --warm-rule: #794e49;
  --highlight-ink: #f3ca8b;
  --highlight-paper: #3d3222;
  --tone-highlight: #d8ab6b;
  --tone-oral: #dd8c84;
  --tone-spotlight: #a8c9fa;
  --tone-first: #78b8ab;
  --tone-corresponding: #bd9dd3;
  --tone-other: #505656;
  --link: #9bcaff;
  --author-link: #a8c7db;
  --link-paper: #283542;
  --link-hover-paper: #42332c;
  --nav-solid: #202323;
  --nav-glass: rgba(27, 30, 30, .95);
  --shadow: 0 14px 34px rgba(0,0,0,.22);
  --portrait-shadow: 0 16px 36px rgba(0,0,0,.32);
}

.bio .research-focus {
  background: #25322f;
  border-color: #41534d;
  border-bottom-color: #69877f;
}
.bio .research-focus strong { color: #c9eae0; }
.paper-venue { color: var(--ink); }
.publication-card:hover, .publication-card:focus-within { border-color: #63837c; }
.paper-media-frame { box-shadow: inset 0 1px rgba(255,255,255,.06); }
/* A neutral backing preserves black annotations in transparent scientific figures. */
.gallery-tile img, img.media-layer { background-color: #f2f3f2; }
video.media-layer { background-color: #1b1d1e; }
.gallery-tile::before {
  background-image: linear-gradient(90deg, transparent, rgba(255,255,255,.08), transparent),
    linear-gradient(135deg, #292e2f, #373e3e);
}

.gallery-badge {
  --badge-paper: #303031;
  --badge-ink: #dddcd9;
  border-color: #555455;
}
.gallery-badge.role-first {
  --badge-paper: #2f3231;
  --badge-ink: #e2e3df;
  border-inline-start-color: #8c9690;
}
.gallery-badge.role-corresponding {
  --badge-paper: #333134;
  --badge-ink: #e6e1e5;
  border-inline-start-color: #9b919e;
}
.badge-honor { border-color: #575657; }
.honor-oral { color: #e0c9ce; }
.honor-highlight { color: #dfd5bf; }
.honor-spotlight { color: #cad5df; }

#appearance-toggle .icon-moon { opacity: 0; transform: rotate(22deg) scale(.8); }
#appearance-toggle .icon-sun { opacity: 1; transform: none; }
