/* Project appearance is stored per project. Media keep their original colours. */
html[data-project-theme="dark"] {
  --bg: #080808;
  --fg: #fff;
  --muted: rgb(255 255 255 / 65%);
  --line: #fff;
  color-scheme: dark;
  scrollbar-color: #aaa #080808;
}

html[data-project-theme="dark"] .nav-grid a,
html[data-project-theme="dark"] .nav-grid button,
html[data-project-theme="dark"] .nav-mmm__short,
html[data-project-theme="dark"] .nav-mmm__full,
html[data-project-theme="dark"] .nav-burger,
html[data-project-theme="dark"] .lang-toggle__btn,
html[data-project-theme="dark"] .detail-gallery .project-question-frame__text {
  color: var(--fg);
}

html[data-project-theme="dark"] .nav-burger__bar {
  background: currentColor;
}

html[data-project-theme="dark"] .project-media {
  background: #151515;
}

html[data-project-theme="dark"] .project-media-frame__loader {
  background: rgb(20 20 20 / 90%);
}

html[data-project-theme="dark"] .project-media-frame__spinner {
  border-color: rgb(255 255 255 / 20%);
  border-top-color: rgb(255 255 255 / 80%);
}

html[data-project-theme="dark"] .project-media-frame--error .project-media-frame__loader {
  background: #291919;
}

html[data-project-theme="dark"] .project-media-frame--error .project-media-frame__loader::after {
  color: #ffc4c4;
}

/* About keeps its existing light background, including navigation above it. */
html[data-project-theme="dark"] .home-about-panel {
  --bg: #fff;
  --fg: #000;
  --muted: rgb(0 0 0 / 60%);
  --line: #000;
  color-scheme: light;
}

html[data-project-theme="dark"].home-about-open:not(.contact-open):not(.media-preview-open) body:not(.nav-open) .nav-grid,
html[data-project-theme="dark"].home-about-open:not(.contact-open):not(.media-preview-open) body:not(.nav-open) .nav-burger,
html[data-project-theme="dark"].home-about-open:not(.contact-open):not(.media-preview-open) body:not(.nav-open) > .lang-toggle {
  --fg: #000;
}

html[data-project-theme="dark"] ::selection {
  color: #080808;
  background: #fff;
}

html[data-project-theme="dark"] .home-about-panel ::selection {
  color: #fff;
  background: #000;
}
