:root {
  color-scheme: light;
  --bg-base: #f4f3ee;
  --surface-base: #e9e9e2;
  --bg: var(--bg-base);
  --surface: var(--surface-base);
  --ink: #101216;
  --muted: #5b6067;
  --accent: #101216;
  --line: #c9ccc2;
  --accent-fill: var(--acid);
  --button-ink: #101216;
  --button-hover: color-mix(in srgb, var(--acid) 90%, #101216);
  --control-line: #787e70;
  --contact-bg: var(--acid-base);
  --contact-ink: #101216;
  --contact-muted: #3f472b;
  --rose: #ffb8d2;
  --paper: #f4f3ee;
  --acid-base: #e9ff64;
  --acid: var(--acid-base);
  --cobalt: #234ce8;
  --water: #a9dbe3;
  --peach: #ffb08b;
  --lavender: #c4b9ff;
}

/* System appearance also works when JavaScript is unavailable. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg-base: #101216;
    --surface-base: #191c21;
    --ink: #e9ebef;
    --muted: #a5a9b0;
    --accent: var(--acid);
    --line: #393d43;
    --button-hover: color-mix(in srgb, var(--acid) 50%, white);
    --control-line: #70767e;
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg-base: #101216;
  --surface-base: #191c21;
  --ink: #e9ebef;
  --muted: #a5a9b0;
  --accent: var(--acid);
  --line: #393d43;
  --button-hover: color-mix(in srgb, var(--acid) 50%, white);
  --control-line: #70767e;
}

/* The page catches the same sky light as the glass, at half its intensity.
   Without a fresh weather observation, both colours stay at the theme baseline. */
@supports (background: color-mix(in srgb, white, black)) {
  :root {
    --contact-bg: color-mix(in srgb, var(--acid) 35%, var(--acid-base));
    --bg: color-mix(in srgb, var(--bg-base), var(--weather-tint, var(--bg-base)) calc(var(--weather-tint-share, 0%) * .5));
    --surface: color-mix(in srgb, var(--surface-base), var(--weather-tint, var(--surface-base)) calc(var(--weather-tint-share, 0%) * .5));
  }
}
