/* Landing page theme controls and ink-and-paper daylight palette. */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: 14px var(--mono);
  letter-spacing: .08em;
  cursor: pointer;
  transition: color .2s ease;
}
.theme-toggle:hover { color: #ffda91; }
.theme-toggle:focus-visible { outline: 1px solid currentColor; outline-offset: 5px; }
.theme-toggle svg { width: 20px; height: 20px; stroke: currentColor; stroke-width: 1.4; }
.theme-moon { display: none; }
[data-theme="day"] .theme-sun { display: none; }
[data-theme="day"] .theme-moon { display: block; }

.section-theme-toggle {
  display: none;
  position: fixed;
  z-index: 10;
  inset-block-start: max(12px, env(safe-area-inset-top));
  inset-inline-end: 4.5vw;
  padding-inline: 12px;
  color: var(--ivory);
  transition: color .2s ease, opacity .25s ease, visibility .25s;
}
.section-theme-toggle.is-past-statement {
  opacity: 0;
  visibility: hidden;
}
/* Use the diary wall's existing interaction state to reveal the control. */
body:has(#wall:not([inert])) .section-theme-toggle { display: inline-flex; }

:root[data-theme="day"] {
  --black: #f4f4f0;
  --ivory: #252b28;
  --brass: #626b66;
  color-scheme: light;
}
[data-theme="day"] .stage { background: #ededeb; }
[data-theme="day"] #loader { background: #f4f4f0; }
[data-theme="day"] .load-track { background: #a7ada8; }
[data-theme="day"] .shade { background: linear-gradient(180deg, #27352b06, transparent 60%, #27352b0d); }
[data-theme="day"] .door {
  background: linear-gradient(90deg, #cdd1ce, #eff1ee 6%, #e2e6e1 12%, #e7eae6 97%, #3b4449 99%, #b7bfba);
}
[data-theme="day"] .door:after { border-color: #48544b40; }
[data-theme="day"] .door-left,
[data-theme="day"] .door-right { border-color: #404c51; }
[data-theme="day"] .diary-paper {
  color: #434b44;
  background: #e1e5de;
  border-color: #f5f8f2;
}
[data-theme="day"] .diary-paper::before {
  background: #6c7772;
  border-color: #9aa59e;
}
[data-theme="day"] .hero-note { color: #515b54; }
[data-theme="day"] .hero .eyebrow { color: #4c5850; }
[data-theme="day"] .stage .exhibit {
  background: linear-gradient(180deg, #f7f8f5f5, #eaede8ed);
  color: #252b28;
}
[data-theme="day"] .stage .exhibit .eyebrow { color: #4c5850; }
[data-theme="day"] .stage .exhibit p { color: #515c53; }
[data-theme="day"] #wall {
  background: #e9ece7;
  box-shadow: inset 0 0 180px #56655a12;
}
[data-theme="day"] .notebook-word { color: #26382b0b; }
[data-theme="day"] #wall h2 { text-shadow: none; }
[data-theme="day"] #wall .eyebrow,
[data-theme="day"] #wall .notebook-description { color: #4f5c53; }
[data-theme="day"] .diary-link { color: #34483a; border-color: #65766a; background: #f8faf6cc; }
[data-theme="day"] .diary-link:hover { background: #677d6e15; }
[data-theme="day"] .diary-paper { box-shadow: 4px 12px 28px #243c2c20, inset 0 0 30px #52684c0a; }
[data-theme="day"] .about { background: #f4f4f0; }
[data-theme="day"] #about-heading,
[data-theme="day"] .about-record h3.eyebrow { color: #91640f; }
[data-theme="day"] .about-copy p,
[data-theme="day"] .career-list p { color: #4c5950; }
[data-theme="day"] .about-details small,
[data-theme="day"] .about-details p > span,
[data-theme="day"] .career-date { color: #536258; }
[data-theme="day"] .about-record,
[data-theme="day"] .career-list li:last-child,
[data-theme="day"] .about-details section + section,
[data-theme="day"] .site-footer { border-color: #4a615345; }
[data-theme="day"] .site-footer { color: #4e6054; }
[data-theme="day"] .header-nav a:hover,
[data-theme="day"] .theme-toggle:hover,
[data-theme="day"] .hero .enter:hover,
[data-theme="day"] .stage .exhibit a:hover,
[data-theme="day"] .diary-link:hover,
[data-theme="day"] .footer-home:hover,
[data-theme="day"] .footer-linkedin:hover { color: #a87512; text-shadow: none; }

@media (max-width: 700px) {
  .header-nav { gap: 14px; }
  .theme-toggle-label { display: none; }
  .theme-toggle { min-width: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  .theme-toggle { transition: none; }
}
