/* ─────────────────────────────────────────────────────────────
   Calvin — site stylesheet
   Editorial / lab-notebook layout · warm-neutral palette
   Serif display (EB Garamond) · sans body (Inter) · mono accents

   Sizing: 1rem = 16px (browser default, honors user scaling).
   Letter-spacing, borders, outlines, and radii stay in px — they
   are typographic / optical details that shouldn't scale.
   Media queries use em (most reliable for user-scaling).
   ───────────────────────────────────────────────────────────── */

:root {
  color-scheme: light dark;       /* default: follow OS; overridden by [data-theme] */

  /* Warm-neutral palette — light-dark() resolves via active color-scheme */
  --bg:        light-dark(#ebe7df, #1a1814);
  --panel:     light-dark(#f4f1ea, #25221d);
  --ink:       light-dark(#1a1814, #ebe7df);
  --muted:     light-dark(rgba(26,24,20,0.72),  rgba(235,231,223,0.72));
  --faint:     light-dark(rgba(26,24,20,0.55),  rgba(235,231,223,0.55));
  --rule:      light-dark(rgba(26,24,20,0.18),  rgba(235,231,223,0.18));
  --highlight: light-dark(#e7dfc7, #4a3f1f);

  /* Single editorial accent (lightened in dark for contrast) */
  --accent:    light-dark(#8a3a2a, #c8624c);

  /* Placeholder tones — .dark variant inverts in dark mode so it remains the
     "highlight" tone (becomes a light card on dark bg) */
  --tone-warm: light-dark(#d6d1c4, #2d2720);
  --tone-cool: light-dark(#cfd0cc, #232525);
  --tone-dark: light-dark(#2a2722, #c4bdaf);

  /* Type */
  --serif:    "EB Garamond", "Source Serif Pro", Iowan Old Style, Georgia, serif;
  --sans:     "Inter", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --mono:     "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;

  --pad: 3.5rem;        /* 56px */
  --maxw: 77.5rem;      /* 1240px */
}

/* Theme cycling — system | dark | light */
[data-theme="light"]  { color-scheme: light; }
[data-theme="dark"]   { color-scheme: dark; }
[data-theme="system"] { color-scheme: light dark; }

* { box-sizing: border-box; }
html { font-size: 100%; }   /* 16px base — honors user font-size preference */
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.0625rem;     /* 17px */
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "kern", "liga";
}
img, video, svg { max-width: 100%; display: block; height: auto; }
a { color: inherit; text-decoration: none; transition: opacity .15s; }
a:hover { opacity: 0.65; }
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
  opacity: 1;
}
hr { border: 0; border-top: 1px solid var(--rule); margin: 2rem 0; }

/* Skip link — visible on focus only */
.skip-link {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.skip-link:focus {
  position: fixed;
  top: 0.75rem; left: 0.75rem;
  width: auto; height: auto;
  padding: 0.625rem 0.875rem;
  margin: 0;
  clip: auto;
  background: var(--ink);
  color: var(--panel);
  font-family: var(--sans);
  font-size: 0.8125rem;
  border-radius: 2px;
  z-index: 100;
}

/* Utilities ─────────────────────────────────────────────────── */
.kicker {
  font-family: var(--mono);
  font-size: 0.8125rem;       /* 13px */
  color: var(--faint);
  letter-spacing: 1.6px;
  text-transform: uppercase;
}
.muted { color: var(--muted); }
.faint { color: var(--faint); }

/* Nav ───────────────────────────────────────────────────────── */
.site-nav {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: 2rem var(--pad) 1.75rem;
  border-bottom: 1px solid var(--rule);
}
.site-nav .brand {
  font-size: 1.0625rem;
  font-style: italic;
  color: var(--ink);
  letter-spacing: -0.2px;
}
.site-nav .brand strong { font-style: normal; font-weight: 600; margin-right: 0.375rem; }
.site-nav .brand .sub { color: var(--muted); font-size: 0.8125rem; margin-left: 0.375rem; }

.site-nav nav {
  margin-left: auto;
  display: flex;
  gap: 1.75rem;
  font-family: var(--sans);
  font-size: 0.8125rem;
}
.site-nav nav a {
  color: var(--muted);
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
}
.site-nav nav a.is-active {
  color: var(--ink);
  font-weight: 500;
  border-bottom-color: var(--accent);
}

/* Theme toggle — single icon button, no border, cycles modes */
.theme-toggle {
  align-self: center;             /* parent uses baseline; icon has none */
  margin-left: 1.25rem;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  transition: color .15s, opacity .15s;
}
.theme-toggle:hover { color: var(--ink); opacity: 1; }
.theme-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}
.theme-toggle svg {
  width: 1.125rem;
  height: 1.125rem;
  display: none;
}
[data-theme="light"]  .theme-toggle .icon-sun,
[data-theme="dark"]   .theme-toggle .icon-moon,
[data-theme="system"] .theme-toggle .icon-system { display: block; }

/* Home — hero (split, no full-bleed image) ─────────────────── */
.home-hero {
  padding: 4rem var(--pad) 0;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 4rem;
  align-items: start;
}
.home-hero .meta {
  display: block;
  margin-bottom: 1.5rem;
}
.home-hero h1 {
  font-size: clamp(2.5rem, 5vw, 3.75rem);
  line-height: 1.06;
  font-weight: 500;
  letter-spacing: -0.8px;
  margin: 0 0 1.5rem;
  text-wrap: pretty;
}
.home-hero h1 em { color: var(--accent); font-style: italic; font-weight: 500; }
.home-hero .lede {
  font-size: 1.1875rem;
  line-height: 1.55;
  color: var(--muted);
  max-width: 35rem;
  margin: 0;
  text-wrap: pretty;
}
.home-hero .lede strong { color: var(--ink); font-weight: 500; }

.home-hero .cta-row {
  display: flex;
  align-items: baseline;
  gap: 1.25rem;
  margin-top: 2.25rem;
  font-family: var(--sans);
  font-size: 0.875rem;
}
.home-hero .cta-row a.secondary {
  padding: 0.625rem 0;
  color: var(--muted);
  border-bottom: 1px solid var(--rule);
}

.home-hero .hero-fig figcaption {
  font-family: var(--mono);
  font-size: 0.6875rem;       /* 11px */
  color: var(--faint);
  letter-spacing: 0.4px;
  margin-top: 0.625rem;
}

/* Home — recent notes (two-col label + list) ───────────────── */
.recent {
  padding: 5rem var(--pad) 0;
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 3.5rem;
}
.recent .label .kicker {
  display: block;
  margin: 0;
  font-weight: inherit;
}
.recent .label .gloss {
  font-style: italic;
  font-size: 0.9375rem;
  color: var(--muted);
  margin: 0.5rem 0 0;
  max-width: 15rem;
}
.recent .list .item {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--rule);
  display: block;
}
.recent .list .item:first-child { padding-top: 0; }
.recent .list .item .date {
  display: block;
  font-family: var(--mono);
  font-size: 0.6875rem;
  color: var(--faint);
  letter-spacing: 0.4px;
}
.recent .list .item h3 {
  font-size: 1.375rem;
  font-weight: 500;
  letter-spacing: -0.2px;
  color: var(--ink);
  margin: 0.25rem 0 0.25rem;
  text-wrap: pretty;
}
.recent .list .item .sub {
  font-size: 0.9375rem;
  color: var(--muted);
  font-style: italic;
  margin: 0;
  text-wrap: pretty;
}

/* Section pages — header ───────────────────────────────────── */
.page-header { padding: 3.5rem var(--pad) 0; max-width: 47.5rem; }
.page-header .kicker { display: block; margin-bottom: 1rem; }
.page-header h1 {
  font-size: clamp(2.25rem, 4.5vw, 3rem);
  line-height: 1.08;
  font-weight: 500;
  letter-spacing: -0.6px;
  margin: 0 0 0.75rem;
  text-wrap: pretty;
}
.page-header .lede {
  font-size: 1.0625rem;
  color: var(--muted);
  line-height: 1.6;
  margin: 0 0 3rem;
  max-width: 36.25rem;
  text-wrap: pretty;
}

/* Article body ─────────────────────────────────────────────── */
.article > .kicker { display: block; margin-bottom: 0.75rem; }
.article h1 {
  font-size: clamp(2rem, 3.5vw, 2.625rem);
  line-height: 1.1;
  font-weight: 500;
  letter-spacing: -0.4px;
  margin: 0 0 0.5rem;
  text-wrap: pretty;
}
.article h1 em { color: var(--accent); font-style: italic; font-weight: 500; }
.article h2 {
  font-size: 1.625rem;
  font-weight: 500;
  letter-spacing: -0.2px;
  line-height: 1.2;
  margin: 3.5rem 0 0.75rem;
}
.article h3 {
  font-size: 1.25rem;
  font-weight: 500;
  letter-spacing: -0.1px;
  margin: 2.25rem 0 0.625rem;
}
.article p {
  font-size: 1.1875rem;
  line-height: 1.65;
  margin: 0 0 1.125rem;
  text-wrap: pretty;
}
.article .lede {
  font-size: 1.375rem;
  line-height: 1.5;
  color: var(--ink);
  margin: 1.25rem 0 0.5rem;
  text-wrap: pretty;
}
.article .lede em { font-style: italic; }
.article .byline {
  display: flex;
  gap: 1rem;
  margin: 1rem 0 1rem 0;
  font-family: var(--mono);
  font-size: 0.6875rem;
  color: var(--faint);
  letter-spacing: 0.6px;
  text-transform: uppercase;
}
.article ul, .article ol {
  font-size: 1.1875rem;
  line-height: 1.65;
  padding-left: 1.375rem;
  margin: 0 0 1.25rem;
}
.article ul li, .article ol li { margin: 0 0 0.375rem; }
.article strong { font-weight: 600; color: var(--ink); }
.article a {
  border-bottom: 1px solid var(--rule);
}
.article mark {
  background: var(--highlight);
  color: var(--ink);
  padding: 0 0.125rem;
}
.article figure { margin: 3rem 0 1.5rem; }
.article figcaption {
  font-family: var(--sans);
  font-size: 0.8125rem;
  color: var(--muted);
  margin-top: 0.75rem;
  max-width: 37.5rem;
  line-height: 1.55;
}
.article figcaption strong { color: var(--ink); font-weight: 500; }
.article blockquote {
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  padding: 2rem 0;
  margin: 2.5rem auto;
  text-align: center;
  font-style: italic;
  font-size: 1.625rem;
  line-height: 1.3;
  font-weight: 400;
  letter-spacing: -0.2px;
  max-width: 40rem;
  text-wrap: pretty;
}
.article blockquote p { font-size: inherit; line-height: inherit; margin: 0; font-style: inherit; }
.article code {
  font-family: var(--mono);
  font-size: 0.88em;          /* relative to surrounding text — keep em */
  background: var(--panel);
  padding: 1px 0.3125rem;
  border-radius: 2px;
}
.article pre {
  font-family: var(--mono);
  font-size: 0.8125rem;
  background: var(--panel);
  padding: 1.125rem 1.25rem;
  overflow: auto;
  line-height: 1.6;
  margin: 1.5rem 0;
  border-left: 2px solid var(--accent);
}
.article pre code { background: none; padding: 0; }

/* Article used standalone (post page) ──────────────────────── */
.article.standalone {
  padding: 3.5rem var(--pad) 0;
  max-width: 45rem;
  margin: 0 auto;
}

/* Image placeholders ───────────────────────────────────────── */
.ph {
  aspect-ratio: 4 / 5;
  width: 100%;
  background: var(--tone-warm);
  background-image: repeating-linear-gradient(135deg, color-mix(in srgb, var(--ink) 6%, transparent) 0 1px, transparent 1px 8px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 0.6875rem;
  color: color-mix(in srgb, var(--ink) 50%, transparent);
  letter-spacing: 0.6px;
  text-transform: uppercase;
}
.ph > span {
  padding: 0.25rem 0.5rem;
  border: 1px solid currentColor;
  border-radius: 2px;
}
.ph.cool { background: var(--tone-cool); }
.ph.dark {
  background: var(--tone-dark);
  background-image: repeating-linear-gradient(135deg, color-mix(in srgb, var(--bg) 5%, transparent) 0 1px, transparent 1px 8px);
  color: color-mix(in srgb, var(--bg) 55%, transparent);
}
.ph.r-21  { aspect-ratio: 21 / 9; }
.ph.r-169 { aspect-ratio: 16 / 9; }
.ph.r-43  { aspect-ratio: 4 / 3;  }
.ph.r-11  { aspect-ratio: 1 / 1;  }

/* Schematics — blueprint-style architectural maps ──────────── */
.schematic-wrap {
  padding: 0 var(--pad);
  max-width: var(--maxw);
  margin: 0 auto;
}
.schematic {
  display: block;
  width: 100%;
  height: auto;
  margin: 1.5rem 0 0.5rem;
  color: var(--ink);
  overflow: visible;
  background: var(--tone-warm);
  background-image: repeating-linear-gradient(135deg, color-mix(in srgb, var(--ink) 6%, transparent) 0 1px, transparent 1px 8px);
}
.schematic .node {
  fill: var(--bg);
  stroke: currentColor;
  stroke-width: 1;
}
.schematic .label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  fill: currentColor;
  dominant-baseline: middle;
}
.schematic .sub {
  font-family: var(--sans);
  font-size: 10px;
  fill: var(--muted);
  dominant-baseline: middle;
}
.schematic .edge {
  fill: none;
  stroke: currentColor;
  stroke-width: 1;
}
.schematic .edge.accent { stroke: var(--accent); stroke-width: 1.5; }
.schematic .edge.power  { stroke-dasharray: 3 3; opacity: 0.55; }
.schematic .edge-label {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.4px;
  text-transform: lowercase;
  fill: var(--muted);
  paint-order: stroke;
  stroke: var(--tone-warm);
  stroke-width: 4;
  stroke-linejoin: round;
}
.schematic-caption {
  font-family: var(--mono);
  font-size: 0.6875rem;
  color: var(--faint);
  letter-spacing: 0.4px;
  text-transform: uppercase;
  margin: 0.5rem 0 2.5rem;
}

/* Component detail — list + anchored sections under a schematic */
.component-detail {
  padding: 0 var(--pad);
  max-width: 47.5rem;
  margin: 0 auto;
}
.component-detail .component-list {
  list-style: none;
  padding: 0;
  margin: 0 0 3rem;
  border-top: 1px solid var(--rule);
}
.component-detail .component-list li {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--rule);
  font-size: 1.0625rem;
  margin: 0;
  display: flex;
  align-items: baseline;
  gap: 0.875rem;
  text-wrap: pretty;
}
.component-detail .component-list a {
  font-weight: 500;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--ink);
  border-bottom: none;
}
.component-detail .component-list a:hover { color: var(--accent); opacity: 1; }
.component-detail .component-list-sub {
  color: var(--muted);
  font-style: italic;
  font-size: 1rem;
}
.component-detail h2:first-of-type { margin-top: 0; }
.component-detail h2 {
  scroll-margin-top: 1.5rem;
}

/* Gallery / plates grid ────────────────────────────────────── */
.plates-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
  padding: 0 var(--pad);
  max-width: var(--maxw);
  margin: 0 auto;
}
.plates-grid figure { margin: 0; }
.plates-grid figcaption {
  font-family: var(--mono);
  font-size: 0.6875rem;
  color: var(--faint);
  letter-spacing: 0.4px;
  margin-top: 0.5rem;
  text-transform: uppercase;
}

/* Git / repo cards ─────────────────────────────────────────── */
.repo-section {
  margin-bottom: 4rem;
}
.repo-section-title {
  padding: 0 var(--pad);
  max-width: var(--maxw);
  margin: 0 auto 1.5rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--faint);
}

.repo-grid {
  list-style: none;
  margin: 0 auto;
  padding: 0 var(--pad);
  max-width: var(--maxw);
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.75rem;
}
.repo-card { margin: 0; }
.repo-card-link {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  height: 100%;
  padding: 1.5rem 1.5rem 1.25rem;
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: 2px;
  color: inherit;
  transition: border-color .15s, transform .15s;
}
.repo-card-link:hover {
  opacity: 1;
  border-color: var(--accent);
  transform: translateY(-1px);
}
.repo-card-head {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
}
.repo-card-name {
  font-family: var(--serif);
  font-size: 1.375rem;
  font-weight: 500;
  letter-spacing: -0.2px;
  line-height: 1.2;
  margin: 0;
  flex: 1;
  text-wrap: pretty;
}
.repo-card-scope {
  color: var(--faint);
  font-weight: 400;
}
.repo-card-status {
  font-family: var(--mono);
  font-size: 0.625rem;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0.1875rem 0.5rem;
  border: 1px solid var(--rule);
  border-radius: 999px;
  white-space: nowrap;
}
.repo-card-status--active   { color: var(--accent); border-color: var(--accent); }
.repo-card-status--wip      { color: var(--ink);    background: var(--highlight); border-color: transparent; }
.repo-card-status--archived { color: var(--faint); }

.repo-card-desc {
  font-style: italic;
  font-size: 1rem;
  color: var(--muted);
  margin: 0;
  text-wrap: pretty;
}
.repo-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin: 0;
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}
.repo-card-meta > div { display: flex; gap: 0.4rem; }
.repo-card-meta dt { color: var(--faint); margin: 0; }
.repo-card-meta dd { color: var(--ink);  margin: 0; }

.repo-card-tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  padding: 0;
  margin: 0;
}
.repo-card-tags li {
  font-family: var(--sans);
  font-size: 0.6875rem;
  letter-spacing: 0.2px;
  color: var(--muted);
  padding: 0.1875rem 0.5rem;
  border: 1px solid var(--rule);
  border-radius: 2px;
}

.repo-card-host {
  margin-top: auto;
  padding-top: 0.5rem;
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--faint);
  display: flex;
  align-items: center;
  gap: 0.375rem;
}
.repo-card-arrow { transition: transform .15s; }
.repo-card-link:hover .repo-card-arrow { transform: translate(2px, -2px); }

/* Field notes / blog index ─────────────────────────────────── */
.notes {
  padding: 0 var(--pad);
  max-width: 47.5rem;
  margin: 0 auto;
}
.notes .item {
  display: block;
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--rule);
}
.notes .item:first-child { border-top: 1px solid var(--rule); }
.notes .meta {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 0.375rem;
}
.notes .meta .date {
  font-family: var(--mono);
  font-size: 0.6875rem;
  color: var(--faint);
  letter-spacing: 0.4px;
}
.notes .item h2 {
  font-size: 1.625rem;
  font-weight: 500;
  letter-spacing: -0.3px;
  line-height: 1.2;
  margin: 0 0 0.375rem;
  text-wrap: pretty;
}
.notes .item p {
  font-style: italic;
  font-size: 1rem;
  color: var(--muted);
  margin: 0;
  text-wrap: pretty;
}

/* Related posts ────────────────────────────────────────────── */
.related {
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
}
.related-title {
  font-family: var(--serif);
  font-size: 1.375rem;
  font-weight: 500;
  letter-spacing: -0.2px;
  color: var(--ink);
  margin: 0 0 1rem;
}
.related-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.related-list li {
  margin: 0;
  border-bottom: 1px solid var(--rule);
}
.related-list li:last-child { border-bottom: none; }
.related-list .item {
  display: block;
  padding: 1.25rem 0;
  border-bottom: none;
  color: var(--ink);
}
.related-list .item:hover h3 { color: var(--accent); }
.related-list .item .date {
  display: block;
  font-family: var(--mono);
  font-size: 0.6875rem;
  color: var(--faint);
  letter-spacing: 0.4px;
}
.related-list .item h3 {
  font-size: 1.375rem;
  font-weight: 500;
  letter-spacing: -0.2px;
  color: var(--ink);
  margin: 0.25rem 0 0.25rem;
  text-wrap: pretty;
}
.related-list .item .lede {
  font-size: 0.9375rem;
  color: var(--muted);
  font-style: italic;
  margin: 0;
  text-wrap: pretty;
}

/* Post nav ─────────────────────────────────────────────────── */
.post-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  font-family: var(--sans);
  font-size: 0.8125rem;
}
.post-nav-prev,
.post-nav-next { display: flex; flex-direction: column; gap: 0.25rem; }
.post-nav-next { margin-left: auto; text-align: right; }
.post-nav a { color: var(--muted); border-bottom: none; }

/* Footer ───────────────────────────────────────────────────── */
.site-footer {
  padding: 3.5rem var(--pad) 2.25rem;
  margin-top: 6rem;
  border-top: 1px solid var(--rule);
  display: flex;
  align-items: baseline;
  gap: 2rem;
  font-family: var(--sans);
  font-size: 0.75rem;
  color: var(--muted);
}
.site-footer .copyright { color: var(--muted); }
.site-footer .copyright strong { color: var(--ink); font-weight: 500; }
.site-footer .spacer { flex: 1; }
.site-footer .links { display: flex; gap: 1.5rem; }
.site-footer .links a { color: var(--muted); }

/* Responsive ───────────────────────────────────────────────── */
@media (max-width: 68.75em) {     /* 1100px */
  .plates-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 61.25em) {     /* 980px */
  :root { --pad: 1.75rem; }
  .home-hero { grid-template-columns: 1fr; gap: 2.5rem; }
  .recent { grid-template-columns: 1fr; gap: 1.5rem; }
  .repo-grid { grid-template-columns: 1fr; }
  .site-footer { flex-wrap: wrap; }
}

@media (max-width: 37.5em) {      /* 600px */
  :root { --pad: 1.25rem; }
  .site-nav {
    position: relative;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.875rem;
    padding: 1.25rem var(--pad) 1rem;
  }
  .site-nav nav {
    margin-left: 0;
    gap: 1.25rem;
    flex-wrap: wrap;
  }
  .theme-toggle {
    position: absolute;
    top: 1.25rem;
    right: var(--pad);
    margin-left: 0;
  }
  .plates-grid { grid-template-columns: 1fr; }
}

/* Reduced motion ───────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}
