/* Visualification V18.3: a consistent dark-first, accessible sitewide light/dark mode.
   Artwork and workshop photographs retain their original appearance. */
:root {color-scheme:dark}
html[data-theme="light"] { color-scheme:light }
body { transition: background-color .2s ease, color .2s ease; }
/* Public theme control is deliberately non-emoji and lives outside collapsing nav. */
.global-theme-toggle { display:inline-flex;align-items:center;justify-content:center;gap:8px;
  border:1px solid var(--rule, var(--stroke, #ffffff40));border-radius:100px;
  color:var(--text, var(--ink, #f0f0e9));background:transparent;
  padding:11px 13px;min-height:40px;white-space:nowrap;
  font:750 10px/1.2 'proxima-nova',Arial,sans-serif;letter-spacing:.055em;text-transform:uppercase;
  flex:0 0 auto;cursor:pointer;transition:background .18s,color .18s,border-color .18s;}
.global-theme-toggle:hover { border-color:var(--accent,var(--orange,#ed6046)); }
.global-theme-toggle:focus-visible {outline:2px solid var(--accent,var(--orange,#ed6046));outline-offset:3px;}
.global-theme-toggle svg {width:17px;height:17px;flex-shrink:0;display:block;stroke:currentColor;stroke-width:1.7;fill:none;stroke-linecap:round;stroke-linejoin:round}
.global-theme-toggle .icon-moon {display:none}
body[data-theme="light"] .global-theme-toggle .icon-sun {display:none}
body[data-theme="light"] .global-theme-toggle .icon-moon {display:block}
/* Dark already is the built-in default. Light is an intentional warm editorial palette. */
body[data-theme="light"] {
  --bg:#f5f4ee; --ink:#1b2a24; --text:#1b2a24; --muted:#59685f;
  --rule:#25352b33; --stroke:#25352b33; --accent:#ce523d; --orange:#ce523d;
  --paper:#1b2a24; --dark:#f5f4ee;
  color:var(--text);background:var(--bg);
}
/* Original dark-ink identity artwork, unchanged, correctly visible in either mode. */
body[data-theme="light"] .site-header .brand img,
body[data-theme="light"] .footer .brand img,
body[data-theme="light"] .home-header .brand img,
body[data-theme="light"] .home-footer .footer-brand img,
body[data-theme="light"] .brand-logos img,
body[data-theme="light"] .footer-identity img {filter:none !important;}
/* Light mode: navigation and surface colours, not a global image filter. */
body[data-theme="light"] .home-header {background:var(--bg)}
body[data-theme="light"] .home-nav a:hover {color:var(--accent)}
body[data-theme="light"] .hero-lede,
body[data-theme="light"] .intro-copy p {color:#4c5a51}
body[data-theme="light"] .hero-flare {opacity:.28}
body[data-theme="light"] .art-choice {border-top-color:#aab4ab}
body[data-theme="light"] .art-choice.is-active {border-top-color:var(--accent)}
body[data-theme="light"] .work-image {background:#e7e9e2}
body[data-theme="light"] .work-entry-cartoon .work-image img {background:#e7e9e2}
body[data-theme="light"] .between {background:#e6ebe5}
body[data-theme="light"] .home-room-feature {background:#e4ebe5;color:#192820}
body[data-theme="light"] .home-room-content p {color:#526159}
body[data-theme="light"] .home-room-feature a {color:#26372d}
body[data-theme="light"] .statement {background:#dce9d9;color:#1c2922}
body[data-theme="light"] .statement p {color:#455c4e}
/* Retain orange accent panels as intentional contrast in both themes. */
body[data-theme="light"] .studio-lead,
body[data-theme="light"] .hero-intro {color:var(--text)}
body[data-theme="light"] .studio-biography p {color:#45564b}
body[data-theme="light"] .studio-biography .studio-humboldt-link {color:#8c3f2f}
body[data-theme="light"] .studio-belief {background:#dde8dc;color:var(--text)}
body[data-theme="light"] .studio-belief-copy p {color:#465b4a}
body[data-theme="light"] .studio-moments {background:#edf0e9;border-top-color:var(--rule)}
body[data-theme="light"] .studio-moments h2 {color:var(--text)}
body[data-theme="light"] .studio-moments-intro>p {color:#4f5e54}
body[data-theme="light"] .moments-card figcaption,
body[data-theme="light"] .moments-card figcaption span {color:var(--muted)}
body[data-theme="light"] .room-statement {background:#dbe8df;color:var(--text)}
body[data-theme="light"] .room-statement em {color:#536353}
body[data-theme="light"] .room-closing,
body[data-theme="light"] .ed-ending,
body[data-theme="light"] .new-ending {background:#dce8df;color:var(--text)}
body[data-theme="light"] .ed-italic {color:#506052}
body[data-theme="light"] .closing {background:#dfe8dc}
/* The Studio photo viewer and other full-screen viewers keep their deliberate dark
   viewing environment, so detailed drawings and monochrome photography stay legible. */
body[data-theme="light"] .ed-viewer,
body[data-theme="light"] .new-viewer,
body[data-theme="light"] .room-dialog,
body[data-theme="light"] .viewer,
body[data-theme="light"] .art-dialog,
body[data-theme="light"] .moments-dialog {color:#f2f1eb;--text:#f2f1eb;--muted:#b7c2b9;--rule:#ffffff40;--stroke:#ffffff40}
/* All dropdown menus should follow the chosen background. */
@media(max-width:1680px){
 body[data-theme="light"] .site-header .top-nav,
 body[data-theme="light"] .site-header .navigation,
 body[data-theme="light"] .home-nav {background:var(--bg)!important;}
}
/* Scribing already has a lighter palette; leave its original theme variables intact.
   Its existing toggle is handled by the same shared JS as every other page. */
body[data-theme="light"] .scribing-menu {color:var(--text)}
/* Footer social links must remain readable on ivory. */
body[data-theme="light"] .site-social {color:#4b5f52}
body[data-theme="light"] .site-social .social-link {color:inherit}
/* The home header and nested portfolio headers have different flex systems. */
.home-header .global-theme-toggle {margin-left:0}
.site-header .global-theme-toggle {margin-left:2px}
@media(max-width:1500px) {
 .home-header {gap:clamp(8px,1.1vw,18px)}
 .home-header .home-nav {gap:clamp(10px,1vw,17px)}
 .home-header .home-nav a {font-size:9px}
}
@media(max-width:900px) {
 .home-header .global-theme-toggle {margin-left:auto}
 .site-header .global-theme-toggle {margin-left:auto}
}
@media(max-width:650px) {
 .global-theme-toggle {padding:8px 9px;min-height:34px;gap:5px;font-size:9px;letter-spacing:0}
 .global-theme-toggle svg {width:15px;height:15px}
 .global-theme-toggle .theme-toggle-label {display:none}
 .home-header .brand-wordmark {width:clamp(125px,36vw,180px)}
 .site-header .brand-wordmark {width:clamp(115px,35vw,175px)}
 .site-header .menu-toggle {padding:8px 10px}
}
@media(max-width:410px) {
 .home-header,.site-header {gap:6px}
 .home-header .brand-mark,.site-header .brand-mark {width:30px;height:30px}
 .home-header .brand-wordmark {width:clamp(112px,35vw,145px)}
 .site-header .brand-wordmark {width:clamp(109px,33vw,145px)}
 .home-header .mobile-menu {padding:8px 10px;gap:4px}
}
@media(prefers-reduced-motion:reduce){body{transition:none}}

/* Light-mode tuning of studio photographic captions and drawn white-outline personas. */
body[data-theme="light"] .moments-card figcaption {border-top-color:var(--rule)}
body[data-theme="light"] .moments-card figcaption strong {color:var(--text)}
body[data-theme="light"] .moments-footnote {color:var(--muted)}
body[data-theme="light"] .cartoon-person-image img {filter:brightness(.16)}
/* The dark artwork viewer retains the white original linework. */
body[data-theme="light"] .new-viewer .new-view-art img {filter:none}
.global-theme-toggle .theme-toggle-mobile-label {display:none}
@media(max-width:650px) {
 .global-theme-toggle .theme-toggle-mobile-label {display:inline;font-size:9px}
 .global-theme-toggle {padding:8px 10px}
}
@media(max-width:350px) {
 .global-theme-toggle .theme-toggle-mobile-label {display:none}
}

/* Scribing has a longer collection navigation. Collapse it earlier so the
   persistent theme switch never pushes the header past the viewport. */
@media(max-width:1750px){
 .site-header .scribing-menu{display:block;margin-left:auto}
 .site-header:has(.scribing-menu) .navigation{display:none;position:absolute;z-index:18;top:100%;left:0;right:0;background:#131a18;padding:23px clamp(24px,4vw,72px);border-bottom:1px solid var(--stroke);box-shadow:0 16px 28px #0008;flex-direction:column;align-items:flex-start;gap:18px}
 .site-header:has(.scribing-menu) .navigation.open{display:flex}
 .site-header:has(.scribing-menu) .navigation a{font-size:13px}
}
