/* Dark mode (Jordan, Nov 24). Values follow the Dark mode of the Figma "Color" collection:
   page gray/900, surface gray/800, text and lines gray/50, placeholder gray/700. The warm
   yellow accent stays the same in both modes, as highlight/fill does in Figma.
   Switched by the header toggle, which sets <html data-theme> and keeps it in this browser. */
html[data-theme="dark"] {
  --field: #2C2B29;      /* gray/900 */
  --ink: #F4F3F1;        /* gray/50 */
  --ink-2: #BEBEBB;      /* gray/300, secondary text */
  --ink-soft: #50504E;   /* gray/700, placeholder fill */
  color-scheme: dark;
}
html[data-theme="dark"][data-bg="dither"] body,
html[data-theme="dark"][data-bg="dither"] .mast,
html[data-theme="dark"][data-bg="dither"] .tb__cell {
  background-image: url("../img/grain-dither-dark@1x.png");
  background-image: -webkit-image-set(url("../img/grain-dither-dark@1x.png") 1x, url("../img/grain-dither-dark@2x.png") 2x, url("../img/grain-dither-dark@3x.png") 3x);
  background-image: image-set(url("../img/grain-dither-dark@1x.png") 1x, url("../img/grain-dither-dark@2x.png") 2x, url("../img/grain-dither-dark@3x.png") 3x);
}
/* multiply only works on light paper: on the dark page the photos and header sit as they are */
html[data-theme="dark"] .mast,
html[data-theme="dark"] .collage,
html[data-theme="dark"] .proj__ph, html[data-theme="dark"] .collage__piece,
html[data-theme="dark"] .ph-img, html[data-theme="dark"] .proj img, html[data-theme="dark"] .work-grid img,
html[data-theme="dark"] .cs__photo, html[data-theme="dark"] .squares img,
html[data-theme="dark"] main canvas, html[data-theme="dark"] .page canvas { mix-blend-mode: normal; }
/* the textured logo, header icons, process icons and footer mark are dark brown pixels:
   flip them light. The yellow icons on the home masthead stay as they are. */
html[data-theme="dark"] img.tex:not([data-tex="icons-accent"]),
html[data-theme="dark"] img[data-wm],
html[data-theme="dark"] .foot__mark { filter: invert(1) hue-rotate(180deg); }
html[data-theme="dark"] .btn,
html[data-theme="dark"] ::selection { color: #2C2B29; }
html[data-theme="dark"][data-headings="blur"] .projects .proj .h24,
html[data-theme="dark"][data-headings="blur"] .work-grid .proj .h24,
html[data-theme="dark"][data-headings="blur"] .cs__title { text-shadow: 0 0 0.5px rgba(244, 243, 241, .15); }

/* the toggle, set like the nav links beside it */
.theme-toggle { font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit;
  background: none; border: 0; padding: 0; margin: 0; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.theme-toggle:hover { color: var(--ink); }
.theme-toggle:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.theme-toggle__mark { width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid currentColor;
  background: linear-gradient(90deg, currentColor 50%, transparent 50%); flex: none; }
