/* Dark theme for the blog pages. Load after the page's own <style> so these
   tokens win. Dark is the default; <html data-theme="light"> keeps the page's
   original light tokens. Values match the homepage's dark theme. */
:root:not([data-theme="light"]) {
  color-scheme: dark;
  --ink: #e8ece9;
  --muted: #9aa5a0;
  --line: #2a312d;
  --paper: #0f1311;
  --white: #171c19;
  --green: #5fb98a;
  --mint: #1c2f25;
  --blue: #172636;
  --rose: #34201d;
  --gold: #8a6a2c;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.5);
}

:root:not([data-theme="light"]) .site-header {
  border-bottom-color: var(--line);
  background: rgba(15, 19, 17, 0.88);
}

:root:not([data-theme="light"]) footer { border-top-color: var(--line); }

.theme-toggle {
  display: grid;
  flex: none;
  width: 38px;
  height: 38px;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink);
  background: var(--white);
  cursor: pointer;
}

.theme-toggle:hover { border-color: var(--muted); }
.theme-toggle:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; }
.theme-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.theme-toggle .sun { display: none; }
:root[data-theme="light"] .theme-toggle .sun { display: block; }
:root[data-theme="light"] .theme-toggle .moon { display: none; }
