/* Additive theme layer: the existing Light palette and layout remain authoritative. */
:root { color-scheme: light; }
.theme-control { position:relative; display:inline-flex; align-items:center; justify-content:center; width:40px; height:40px; flex-shrink:0; border:1px solid var(--line); border-radius:50%; color:inherit; }
.theme-control svg { width:19px; height:19px; pointer-events:none; }
.theme-control select { position:absolute; inset:0; width:100%; height:100%; margin:0; padding:0; opacity:0; cursor:pointer; }
.theme-control:focus-within { outline:3px solid #8a9d63; outline-offset:4px; }
.theme-control:hover { background:#69736314; }
.theme-moon { display:none; }
html[data-theme="dark"] .theme-sun { display:none; }
html[data-theme="dark"] .theme-moon { display:block; }
.voice-page .theme-control { border-color:#6e7e5b; }
/* Existing voice sections have their own intentionally dark surfaces in both modes. */
.voice-page, .voice-track, .voice-preview { color-scheme:dark; }
html[data-theme="dark"] {
  color-scheme:dark;
  --paper:#181c19; --ink:#e6eade; --muted:#b5beb0;
  --green:#a1c7a5; --line:#424d41; --wood:#c6b28b; --dark:#141815;
}
html[data-theme="dark"] body { background:var(--paper); color:var(--ink); }
html[data-theme="dark"] header { background:#181c19f5; border-color:var(--line); }
html[data-theme="dark"] .tinted { background:#202720; }
html[data-theme="dark"] .academic-track,
html[data-theme="dark"] .featured-project { background:#242d25; }
html[data-theme="dark"] .project-label { background:#2b352b; border-left-color:var(--wood); }
html[data-theme="dark"] .academic-portrait-frame,
html[data-theme="dark"] .track-portrait,
html[data-theme="dark"] .about-portrait { background:#293229; border-color:var(--line); }
html[data-theme="dark"] .research-gallery img,
html[data-theme="dark"] .project-evidence img { background:#242d25; border-color:var(--line); }
html[data-theme="dark"] .track-role,
html[data-theme="dark"] .authors,
html[data-theme="dark"] .metadata,
html[data-theme="dark"] .project-label>p:not(.eyebrow),
html[data-theme="dark"] .project-evidence figcaption,
html[data-theme="dark"] .findings li,
html[data-theme="dark"] .chips span { color:var(--muted); }
html[data-theme="dark"] .pub-date,
html[data-theme="dark"] .timeline .date,
html[data-theme="dark"] .findings li:before { color:var(--wood); }
html[data-theme="dark"] .project-number { color:#b1bd9e; }
html[data-theme="dark"] .publication .eyebrow,
html[data-theme="dark"] .text-link,
html[data-theme="dark"] .links,
html[data-theme="dark"] .evidence-link,
html[data-theme="dark"] .research-gallery figcaption a { color:var(--green); }
html[data-theme="dark"] :is(.focus-grid,.publication,.featured-project,.chips span,.findings li,.method-grid article,.timeline,.membership-grid p,.training-card,.profile-links a,.project-label>.eyebrow,.insight-card,.original-research) { border-color:var(--line); }
html[data-theme="dark"] .button:not(.light) { background:#a1c7a5; border-color:#a1c7a5; color:#17231a; }
html[data-theme="dark"] .button:not(.light):hover { background:#b8d9b8; border-color:#b8d9b8; color:#17231a; }
html[data-theme="dark"] .button.light { color:#e2e6d5; }
html[data-theme="dark"] a:hover { color:#c3deb6; }
html[data-theme="dark"] .cv-button:hover { background:#29372a; }
html[data-theme="dark"] input,
html[data-theme="dark"] textarea,
html[data-theme="dark"] select { color:var(--ink); background:#242d25; border-color:#71836b; }
html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder { color:#b5beb0; opacity:1; }
html[data-theme="dark"] :focus-visible,
html[data-theme="dark"] .theme-control:focus-within { outline-color:#b1d698; }
html[data-theme="dark"] .menu-toggle { border-color:#71836b; }
@media(max-width:800px) {
  html[data-theme="dark"] nav { background:#202720; border-color:var(--line); }
}
