/* Shared palette for the homepage and Projects 2.0. */
:root {
  color-scheme: light;
  --ground: #f5f2e9;
  --ink: #232b28;
  --quiet: #505a53;
  --faint: #4a514c;
  --well: #fffdf4;
  --rule: #c5c8bb;
  --focus: #995127;
  --dock: #eeefe9;
  --dock-active: #fffef7;
  --dock-shadow: 0 3px 12px -5px #20272045;
}

:root:not([data-theme="dark"]) .v2 {
  --ground: #e9eae4;
  --ink: #262c2a;
  --quiet: #56605d;
  --faint: #6a726b;
  --rule: #b9c0b9;
  --focus: #95642e;
}
:root:not([data-theme="dark"]) :is(.hero-role span, .hero h1 em, .about h2 em) { color: #874c38; }
:root:not([data-theme="dark"]) .portrait-print { box-shadow: 0 12px 25px -14px #181c2499; }
:root:not([data-theme="dark"]) .v2-print {
  box-shadow: 0 1px 1px #2225, 0 8px 12px -6px #1d24244d, 0 21px 25px -17px #1d24248a;
}
:root:not([data-theme="dark"]) .v2-print::before { background: radial-gradient(ellipse at var(--shine,50%) var(--shine-y,4%), #fff1cf30, transparent 62%); }
:root:not([data-theme="dark"]) .section-dock { border-color: #c9cdc6; color: #4a514c; }
:root:not([data-theme="dark"]) .section-dock a[aria-current] { color: #202723; box-shadow: 0 1px 4px #20272026; }
:root:not([data-theme="dark"]) .section-dock a:is(:hover,:focus-visible) { background: #dce0d8; color: #202723; }
:root:not([data-theme="dark"]) .section-dock a span { background: #2a302b; color: white; }
@media (hover: hover) and (pointer: fine) {
  :root:not([data-theme="dark"]) .v2-row:hover { color: #65495e; }
}
@media (prefers-reduced-motion: no-preference) and (hover: hover) and (pointer: fine) {
  :root:not([data-theme="dark"]) .v2-card:hover .v2-print { box-shadow: 0 23px 30px -13px #1d24247a; }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --ground: #0e0f11;
  --ink: #f1f1ef;
  --quiet: #d3d3d0;
  --faint: #8d8d8a;
  --well: #1a1b1e;
  --rule: rgba(241,241,239,.1);
  --focus: #6cbcff;
  --dock: #1b1c1f;
  --dock-active: #303136;
  --dock-shadow: 0 1px 2px rgba(0,0,0,.3), 0 10px 30px -6px rgba(0,0,0,.5);
}
[data-theme="dark"] .v2-print { outline: 1px solid var(--rule); box-shadow: 0 9px 19px -5px #000a; }
.theme-switch {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; min-width: 44px; padding: 5px 10px; border: 1px solid var(--rule);
  background: transparent; color: inherit; border-radius: 5px; font: 500 13px/1.2 Arial,sans-serif; cursor: pointer;
}
.theme-switch[hidden] { display: none; }
.theme-switch::before {
  content: ""; display: inline-block; width: 14px; height: 14px; box-sizing: border-box;
  border: 1px solid currentColor; border-radius: 50%; box-shadow: inset 6px 0 currentColor;
}
.theme-switch:hover { border-color: currentColor; }
.theme-switch:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.v2-bar .theme-switch { align-self: center; }
header.v2-bar a:nth-child(2) { margin-left: auto; }
@media (max-width: 520px) {
  .theme-switch span { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; }
}
@media (prefers-reduced-motion: no-preference) {
  body, .v2, .v2-row, .site-header, .v2-heading, .v2-register-heading, .hero .hero-button, .theme-switch {
    transition: color .22s ease, background-color .22s ease, border-color .22s ease;
  }
  .theme-switch::before { transition: transform .25s ease; }
  [data-theme="dark"] .theme-switch::before { transform: rotate(180deg); }
}
