/* Shared interface colors. Project artwork retains its original palette. */
:root {
  color-scheme: light;
  --paper: #fff;
  --ink: #232522;
  --muted: #72746e;
  --surface: #fff;
  --surface-soft: #f3f4f2;
  --control-track: #f3f3f1;
  --control-hover: #e8ebe5;
  --secondary-ink: #505a53;
  --nav-shadow: 0 10px 22px -9px #24252224;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #171a18;
  --ink: #f2f3ef;
  --muted: #afb6ae;
  --line: #414a42;
  --surface: #252b26;
  --surface-soft: #222722;
  --control-track: #292f29;
  --control-hover: #3c463d;
  --secondary-ink: #c2cac1;
  --nav-shadow: 0 10px 24px -8px #0009;
}

.site-header nav {
  background: var(--surface);
  box-shadow: var(--nav-shadow);
}
.site-header .nav-right { gap: 10px; min-width: max-content; }
.site-header nav a:hover { color: var(--muted); }
.language-segments { background: var(--control-track); }
.language-segments button { color: var(--secondary-ink); }
.language-segments button:hover { color: var(--ink); background: var(--control-hover); }
.language-segments button[aria-pressed="true"] { color: var(--ink); background: var(--surface); }

.theme-toggle {
  display: grid;
  place-items: center;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--control-track);
  color: var(--ink);
  transition: background-color .18s ease, color .18s ease;
}
.theme-toggle[hidden] { display: none; }
.theme-toggle:hover { background: var(--control-hover); }
.theme-toggle .icon { width: 20px; height: 20px; }
.theme-icon-sun { display: none; }
[data-theme="dark"] .theme-icon-sun { display: block; }
[data-theme="dark"] .theme-icon-moon { display: none; }

html[data-theme="dark"] .hero h1 { color: var(--ink); }
[data-theme="dark"] :is(.hero-description,.return-work,.profile-intro p,.profile-process p,.profile-main figcaption,.sample-note,.qc-page .product-heading>p) { color: var(--secondary-ink); }
[data-theme="dark"] .profile-intro p.profile-lead { color: var(--ink); }
[data-theme="dark"] .work-card { background: var(--surface-soft); }
[data-theme="dark"] .work-card-subtitle { color: var(--secondary-ink); }
[data-theme="dark"] .work-card-meta>span { color: var(--secondary-ink); background: var(--surface); }
[data-theme="dark"] .site-footer { background: #111512; }
[data-theme="dark"] .skip-link { background: var(--surface); color: var(--ink); }
[data-theme="dark"] ::selection { background: #803d27; color: #fff; }

@media (prefers-reduced-motion: reduce) {
  .theme-toggle { transition: none; }
}
