:root[data-theme="dark"] {
  color-scheme: dark;
  --background: #1b1b1d;
  --surface: #343236;
  --panel: #242427;
  --text: #f3eee8;
  --muted: #c0b8af;
  --accent: #ffad72;
  --line: #524c50;
  --shelf: linear-gradient(#38373b, #29282b);
  --bevel: inset 0 1px #ffffff12, 0 1px 2px #0006;
}

[data-theme="dark"] .site-header {
  background: linear-gradient(#28282b, #202023);
  border-bottom-color: #574036;
  box-shadow: inset 0 2px #a95836, 0 4px 12px #0005;
}
[data-theme="dark"] .nav-links { gap: 6px; }
[data-theme="dark"] .nav-links a {
  padding: 7px 10px;
  background: var(--shelf);
  border: 1px solid var(--line);
  border-radius: 3px;
  box-shadow: var(--bevel);
}
[data-theme="dark"] .nav-links a[aria-current], [data-theme="dark"] .nav-links a:hover {
  background: linear-gradient(#804429, #592e23);
  border-color: #b36c4c;
  color: #ffe7d4;
  text-decoration: none;
}
[data-theme="dark"] .theme-switch button[aria-pressed="true"] {
  background: #663b2d;
  color: #ffcca7;
}
[data-theme="dark"] .skip { color: #211510; }

[data-theme="dark"] .hero { padding-block: clamp(26px, 3.5vw, 52px) clamp(38px, 5vw, 68px); }
[data-theme="dark"] .hero > .wrap { position: relative; isolation: isolate; padding: clamp(18px, 4.2vw, 65px); }
[data-theme="dark"] .hero > .wrap::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  content: "";
  border: 1px solid #595057;
  border-top: 3px solid #a95836;
  border-radius: 4px;
  background:
    radial-gradient(ellipse at 82% 36%, #64514a40, transparent 54%),
    linear-gradient(#aaa0a00b 1px, transparent 1px) 0 0 / 24px 24px,
    linear-gradient(90deg, #aaa0a00b 1px, transparent 1px) 0 0 / 24px 24px,
    linear-gradient(135deg, #302e32, #252428 66%, #211f22);
  box-shadow: inset 0 0 48px #15141680, 0 10px 26px #0004;
}
[data-theme="dark"].opening-pending .hero > .wrap::before { opacity: 0; }
@media (prefers-reduced-motion: no-preference) {
  [data-theme="dark"].opening-active .hero > .wrap::before {
    animation: hero-content-in .8s ease-out var(--content-start) both;
  }
}

[data-theme="dark"] .button {
  background: var(--shelf);
  border-color: #665656;
  border-radius: 4px;
  box-shadow: var(--bevel);
}
[data-theme="dark"] .button-primary {
  color: #24150e;
  font-weight: 700;
  background: linear-gradient(#ffc08b, #e38e61);
  border-color: #ffc09b;
}
[data-theme="dark"] .button:hover { background: #ffba88; border-color: #ffd5ae; color: #24150e; }
[data-theme="dark"] :is(.work, .details, footer) { background: #202023; }
[data-theme="dark"] :is(.section-head, .detail-heading) { border-bottom: 1px solid #56443c; padding-bottom: 18px; }
[data-theme="dark"] :is(.section-head .meta, .breadcrumb a, .media-caption a) { color: var(--accent); }
[data-theme="dark"] :is(.project-card, .store-gallery, .store-summary) {
  padding: 6px;
  background: var(--panel);
  border: 1px solid #544c4e;
  border-radius: 4px;
  box-shadow: var(--bevel);
}
[data-theme="dark"] .project-card:hover { border-color: #bc7959; }
[data-theme="dark"] .card-image { background: #101011; border-color: #171619; }
[data-theme="dark"] .card-caption { margin-top: 4px; padding: 12px 10px; border-bottom: 0; background: var(--shelf); }
[data-theme="dark"] .about-panel {
  padding: clamp(16px, 2.3vw, 32px);
  background: var(--panel);
  border: 1px solid var(--line);
  border-top: 2px solid #b16f50;
  border-radius: 4px;
  box-shadow: var(--bevel);
}
[data-theme="dark"] .about h3 { color: #f9c8a5; }
[data-theme="dark"] :is(.store-gallery, .store-summary) { border-top: 2px solid #aa6a4b; }
[data-theme="dark"] .media-stage { background: #121214; }
[data-theme="dark"] .media-caption { padding-inline: 5px; }
[data-theme="dark"] .media-thumb[aria-current] { border-color: var(--accent); }
[data-theme="dark"] .media-preview:hover .play-control { background: var(--accent); color: #211510; }

@media (max-width: 670px) {
  [data-theme="dark"] .nav-links { gap: 5px; }
  [data-theme="dark"] .nav-links a { padding: 5px 7px; }
  [data-theme="dark"] .card-caption { padding-inline: 8px; }
}
