/* =============================================================================
   colinodell.com — "engineered" design system.

   Every colour token is a light-dark() pair and `color-scheme: dark light` on
   :root hands the choice to the reader's OS — no toggle, no second palette to
   keep in sync. A browser with no preference gets dark.

   Bootstrap is gone. Anything a legacy content body still needs from it is
   shimmed in site-additions.css — not here.
   ========================================================================== */

:root {
  /* light value first. */

  /* Ground and surfaces: four steps of depth, all blue-graphite, never black. */
  --bg: light-dark(#f4f6f7, #0f1418);
  --bg-sunken: light-dark(#e9edef, #0a0e12);
  --surface: light-dark(#ffffff, #151b21);
  --surface-2: light-dark(#eef2f4, #1a2229);

  /* Hairlines do the work that shadows would. */
  --line: light-dark(#dbe2e6, #232c34);
  --line-strong: light-dark(#c2ccd2, #2f3a43);

  --text: light-dark(#16202a, #dce3e9);
  --text-dim: light-dark(#56646e, #94a3ae);
  --text-faint: light-dark(#6f7d87, #7a8892);

  /* One accent: copper. Verdigris is reserved for a single state (upcoming). */
  --accent: light-dark(#a35314, #e0955a);
  --accent-hover: light-dark(#7f3f0b, #f0aa74);
  --accent-line: light-dark(#d3ae8b, #7a4e2c);
  --accent-soft: light-dark(rgba(163, 83, 20, 0.08), rgba(224, 149, 90, 0.12));
  --live: light-dark(#0f6d5a, #62c6ac);
  --live-soft: light-dark(rgba(15, 109, 90, 0.09), rgba(98, 198, 172, 0.12));

  --font-display: 'Space Grotesk', 'IBM Plex Sans', system-ui, sans-serif;
  --font-body: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --shell: 1280px;
  --gutter: 40px;
  --rail: 88px;
  --rail-gap: 28px;

  color-scheme: dark light;
}

/* ======= Reset-ish base ================================================== */

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; height: auto; border: 0; }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; text-underline-offset: 3px; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.015em;
  line-height: 1.22;
  margin: 0;
}

p, ul, ol, dl, figure, pre, table { margin: 0; }

button { font: inherit; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

.shell {
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.skip-link { background: var(--accent); color: #10161b; padding: 10px 16px; }

/* ======= Masthead ======================================================== */

.masthead {
  background: linear-gradient(180deg, var(--bg-sunken), var(--surface));
  border-bottom: 1px solid var(--line);
}

.masthead-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 26px;
  padding-bottom: 22px;
}

.identity {
  display: flex;
  align-items: center;
  gap: 18px;
  color: inherit;
  min-width: 0;
}
.identity:hover { text-decoration: none; }

.identity-portrait {
  width: 58px;
  height: 58px;
  flex: none;
  filter: saturate(0.85);
}
.identity:hover .identity-portrait { filter: none; }

.identity-text { display: block; min-width: 0; }

.identity-name {
  display: block;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}
.identity:hover .identity-name { color: var(--accent); }

.identity-spec {
  display: block;
  margin-top: 3px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.identity-sep { color: var(--accent-line); margin: 0 7px; }

.masthead-controls { display: flex; align-items: center; gap: 20px; }

.social { display: flex; flex-wrap: wrap; gap: 4px; list-style: none; margin: 0; padding: 0; }
.social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 3px;
  color: var(--text-dim);
  font-size: 15px;
}
.social a:hover { color: var(--accent); background: var(--accent-soft); text-decoration: none; }

/* ======= Primary navigation ============================================== */

.masthead-nav { border-top: 1px solid var(--line); background: var(--bg-sunken); }

/* The rail wraps rather than scrolls: a sideways scroller hides items behind an
   edge nobody sees, so below ~700px the menu simply takes a second row and
   every item stays on screen. Nothing is ever clipped mid-word. */
.primary-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0 24px;
}

.primary-nav-list {
  display: flex;
  align-items: stretch;
  flex-wrap: wrap;
  gap: 2px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.primary-nav-list a {
  display: block;
  padding: 14px 14px 12px;
  border-bottom: 2px solid transparent;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  white-space: nowrap;
}
.primary-nav-list a:hover { color: var(--text); text-decoration: none; background: var(--accent-soft); }
.primary-nav-list .active a { color: var(--accent); border-bottom-color: var(--accent); }

.primary-nav-feed {
  flex: none;
  /* Redundant while the rail is one row; keeps the feed link on the right when
     the menu wraps and pushes it onto a row of its own. */
  margin-left: auto;
  padding: 6px 0;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.primary-nav-feed:hover { color: var(--accent); text-decoration: none; }

/* ======= Layout ========================================================== */

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 296px;
  gap: 60px;
  padding-top: 56px;
  padding-bottom: 80px;
  align-items: start;
}

.layout-content { min-width: 0; }

/* `align-items: start` above would collapse this column to its content height,
   leaving the sticky inner nothing to travel through. */
.layout-aside { align-self: stretch; }

.layout-aside-inner { position: sticky; top: 28px; display: grid; gap: 20px; }

/* ======= Page head ======================================================= */

.page-head { margin-bottom: 40px; }

.page-eyebrow,
.hero-index {
  margin: 0 0 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}
.page-eyebrow-sep,
.hero-index-sep { color: var(--accent-line); margin: 0 8px; }

.page-title {
  font-size: clamp(30px, 4.2vw, 42px);
  font-weight: 700;
  letter-spacing: -0.03em;
}

.page-meta {
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--text-faint);
}

.page-intro { margin-bottom: 40px; }

.section-heading {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 0 0 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.section-heading::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}
.section-heading-live { color: var(--live); }
.section-heading-live::after { background: linear-gradient(90deg, var(--live), var(--line)); }

/* ======= Home hero ======================================================= */

.hero { margin-bottom: 64px; }

.hero-title {
  max-width: 20ch;
  font-size: clamp(32px, 5.2vw, 52px);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.08;
}

.hero-lede {
  max-width: 62ch;
  margin-top: 26px;
  font-size: 18px;
  line-height: 1.72;
  color: var(--text-dim);
}
/* With no headline above it -- the state the site ships in -- the intro is the
   hero, so it takes the weight and the top margin the h1 would have had. */
.hero-lede-lead {
  max-width: 52ch;
  margin-top: 6px;
  font-size: clamp(20px, 2.1vw, 25px);
  line-height: 1.58;
  letter-spacing: -0.005em;
  color: var(--text);
}

.hero-lede p { margin: 0 0 14px; }
.hero-lede p:last-child { margin-bottom: 0; }
.hero-lede a { color: var(--text); box-shadow: inset 0 -1px 0 var(--accent-line); }
.hero-lede a:hover { color: var(--accent); text-decoration: none; box-shadow: inset 0 -1px 0 var(--accent); }

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

/* ======= Buttons ========================================================= */

.button {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 11px 18px;
  border: 1px solid var(--accent-line);
  border-radius: 3px;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.button:hover {
  text-decoration: none;
  color: var(--accent-hover);
  border-color: var(--accent);
  background: var(--accent-soft);
}
.button-quiet {
  border-color: var(--line-strong);
  background: transparent;
  color: var(--text-dim);
}
.button-quiet:hover { color: var(--text); border-color: var(--text-faint); }

/* ======= Entry list — the spine ========================================== */

.entry-list { margin-bottom: 8px; }

.entry {
  display: grid;
  grid-template-columns: var(--rail) minmax(0, 1fr);
  gap: var(--rail-gap);
  padding: 28px 0;
  border-top: 1px solid var(--line);
}
.section-heading + .entry { border-top: 0; }

.entry-rail { padding-top: 3px; }

.entry-stamp { display: block; font-family: var(--font-mono); }
.entry-stamp-day {
  display: block;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--text);
  white-space: nowrap;
}
.entry-stamp-year { display: block; font-size: 12px; color: var(--text-faint); }

.entry-kind {
  display: block;
  margin-top: 12px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.entry-body {
  min-width: 0;
  border-left: 1px solid var(--line);
  padding-left: var(--rail-gap);
  transition: border-color 0.15s ease;
}
.entry:hover .entry-body { border-left-color: var(--accent-line); }
.entry:hover .entry-stamp-day { color: var(--accent); }

.entry-body::after { content: ''; display: block; clear: both; }

.entry-title {
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.3;
}
.entry-title a { color: var(--text); }
.entry-title a:hover { color: var(--accent); text-decoration: none; }

.entry-meta {
  margin-top: 7px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--text-faint);
}
.entry-meta-key { color: var(--text-dim); }
.entry-meta-sep { color: var(--line-strong); margin: 0 8px; }

.entry-teaser {
  margin-top: 12px;
  font-size: 16px;
  line-height: 1.68;
  color: var(--text-dim);
}
.entry-teaser p { margin: 0 0 12px; }
.entry-teaser p:last-child { margin-bottom: 0; }
.entry-teaser h2,
.entry-teaser h3 { font-size: 17px; margin: 16px 0 8px; }
.entry-teaser > *:first-child { margin-top: 0; }
.entry-teaser img { border: 1px solid var(--line); border-radius: 3px; }
.entry-teaser ul,
.entry-teaser ol { margin: 0 0 12px; padding-left: 20px; }
.entry-teaser li::marker { color: var(--accent-line); }
.entry-teaser code {
  font-family: var(--font-mono);
  font-size: 0.86em;
  padding: 1px 5px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--surface-2);
  color: var(--text);
}
.entry-teaser pre {
  margin: 14px 0;
  padding: 12px 14px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--surface);
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.6;
}
.entry-teaser pre code { padding: 0; border: 0; background: none; font-size: inherit; }

.entry-media {
  float: right;
  width: 240px;
  margin: 4px 0 16px 24px;
}
/* Thumbnails are capped square-ish and cropped so one tall photo cannot stretch
   a row out of step with the rest of the index. */
.entry-media img {
  display: block;
  width: 100%;
  max-height: 210px;
  object-fit: cover;
  object-position: center;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--surface);
}
.entry-media a:hover img { border-color: var(--accent-line); }
.entry-media-cover { width: 150px; }
.entry-media-cover img { max-height: none; object-fit: contain; }
.entry-media-video { width: 300px; }

.entry-links {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.entry-links a { color: var(--text-dim); }
.entry-links a:hover { color: var(--accent); text-decoration: none; }
.entry-links i { font-size: 10px; }
.entry-links-sep { color: var(--line-strong); }

/* Upcoming talks: the one place a second hue is allowed. */
.entry-list-upcoming .entry-body { border-left-color: var(--live); }
.entry-list-upcoming .entry-stamp-day { color: var(--live); }
.entry-list-upcoming .entry-kind { color: var(--live); }
.entry-list-upcoming .entry:hover .entry-body { border-left-color: var(--live); }
.entry-list-upcoming .entry:hover .entry-stamp-day { color: var(--live); }

/* ======= Tags ============================================================ */

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
}
.tags a {
  display: block;
  padding: 3px 9px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--surface);
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.03em;
}
.tags a:hover {
  text-decoration: none;
  color: var(--accent);
  border-color: var(--accent-line);
  background: var(--accent-soft);
}

/* ======= Pagination ====================================================== */

.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.pager-list { display: flex; flex-wrap: wrap; gap: 4px; list-style: none; margin: 0; padding: 0; }
.pager-list a,
.pager-list span,
.pager-step {
  display: block;
  min-width: 34px;
  padding: 7px 11px;
  border: 1px solid transparent;
  border-radius: 3px;
  text-align: center;
  color: var(--text-dim);
}
.pager-list a:hover,
.pager-step:hover { color: var(--accent); border-color: var(--accent-line); text-decoration: none; }
.pager-list .is-current { color: var(--accent); border-color: var(--accent-line); background: var(--accent-soft); }
.pager-step.is-disabled { color: var(--line-strong); }

/* ======= Sidebar panels ================================================== */

.panel {
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--surface);
  padding: 20px 22px 22px;
  font-size: 15px;
  line-height: 1.6;
}

.panel-heading {
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.panel-body p { margin: 0 0 14px; color: var(--text-dim); }
.panel-body p:last-child { margin-bottom: 0; }

.spec-list { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px 16px; margin: 0; }
.spec-list dt {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-faint);
  padding-top: 3px;
}
.spec-list dd {
  margin: 0;
  font-size: 14px;
  color: var(--text-dim);
  overflow-wrap: anywhere;
}

.panel-share .a2a_kit { display: flex; flex-wrap: wrap; gap: 6px; }

/* ======= Long-form content =============================================== */

.prose {
  font-size: 18px;
  line-height: 1.72;
  color: var(--text-dim);
  overflow-wrap: break-word;
}
.prose > *:first-child { margin-top: 0; }

.prose p { margin: 0 0 22px; }

.prose h2 {
  margin: 46px 0 16px;
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
}
.prose h3 {
  margin: 36px 0 14px;
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
}
.prose h4 { margin: 28px 0 12px; font-size: 17px; color: var(--text); }

.prose ul,
.prose ol { margin: 0 0 22px; padding-left: 26px; }
.prose li { margin-bottom: 8px; }
.prose li::marker { color: var(--accent-line); }

.prose dl { margin: 0 0 22px; }
.prose dt { font-weight: 600; color: var(--text); margin-top: 14px; }
.prose dd { margin: 4px 0 0 22px; }

.prose strong { color: var(--text); font-weight: 600; }

.prose a { box-shadow: inset 0 -1px 0 var(--accent-line); }
.prose a:hover { text-decoration: none; box-shadow: inset 0 -1px 0 var(--accent); }

.prose blockquote {
  margin: 26px 0;
  padding: 4px 0 4px 24px;
  border-left: 2px solid var(--accent-line);
  color: var(--text-dim);
  font-style: italic;
}
.prose blockquote p:last-child { margin-bottom: 0; }

.prose hr { margin: 40px 0; border: 0; border-top: 1px solid var(--line); }

.prose img { border-radius: 3px; }
.prose figure { margin: 26px 0; }

.prose iframe { max-width: 100%; border-radius: 3px; }

/* Inline code and code blocks. Prism's own theme is /css/prism-theme.css and
   only loads on blog pages, so the block chrome is defined here. */
.prose code {
  font-family: var(--font-mono);
  font-size: 0.86em;
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--surface-2);
  color: var(--text);
}
.prose pre {
  margin: 26px 0;
  padding: 18px 20px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.62;
  tab-size: 4;
}
.prose pre code {
  padding: 0;
  border: 0;
  background: none;
  font-size: inherit;
  color: inherit;
}

.prose table {
  width: 100%;
  margin: 26px 0;
  border-collapse: collapse;
  font-size: 15px;
}
.prose th,
.prose td { padding: 10px 14px; border-bottom: 1px solid var(--line); text-align: left; }
.prose th {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
  border-bottom-color: var(--line-strong);
}

/* Tables inside content bodies scroll rather than blowing out the column. */
.prose > table { display: block; overflow-x: auto; }

/* ======= Blog post ======================================================= */

.post-head { margin-bottom: 32px; }
.post-head .tags { margin-top: 20px; }

.post-hero {
  margin: 0 0 36px;
}
.post-hero img {
  display: block;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 4px;
}

.author-note {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  margin-top: 56px;
  padding: 24px;
  border: 1px solid var(--line);
  border-left: 2px solid var(--accent-line);
  border-radius: 3px;
  background: var(--surface);
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--text-dim);
}
.author-note-portrait {
  width: 68px;
  height: 68px;
  flex: none;
  border-radius: 3px;
  filter: saturate(0.85);
}
.author-note-body p { margin: 0; }
.author-note-label {
  margin-bottom: 8px !important;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-faint);
}

/* Disqus renders in an iframe and picks its own light/dark from the colour it
   sees behind the embed, so the wrapper is given a real surface rather than
   being left transparent. */
#disqus_thread {
  margin-top: 48px;
  padding: 28px 24px 8px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--surface);
}

/* ======= Work experience (about page) ==================================== */

.block-work-experience { margin-top: 64px; }
.block-work-experience .content { margin-top: 6px; }
.block-work-experience .item {
  padding: 26px 0;
  border-top: 1px solid var(--line);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text-dim);
}
.block-work-experience .item .title {
  margin-bottom: 10px;
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
}
.block-work-experience .item .place a { color: var(--accent); }
.block-work-experience .item .year {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--text-faint);
  white-space: nowrap;
}
.block-work-experience .item p { margin: 0 0 12px; }
.block-work-experience .item ul { margin: 0; padding-left: 22px; }
.block-work-experience .item li { margin-bottom: 8px; }
.block-work-experience .item li::marker { color: var(--accent-line); }

/* ======= Video embeds ==================================================== */

.video-embed { position: relative; height: 0; padding-bottom: 56.25%; }
.video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 1px solid var(--line);
  border-radius: 3px;
}

/* ======= Footer ========================================================== */

.footer {
  border-top: 1px solid var(--line);
  background: var(--bg-sunken);
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding-top: 36px;
  padding-bottom: 40px;
}
.footer-mark {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.footer-mark-name { color: var(--text); }
.footer-mark-sep { color: var(--accent-line); margin: 0 6px; }
.copyright {
  margin-top: 10px;
  font-size: 13.5px;
  color: var(--text-faint);
}
.footer-block-links { display: grid; gap: 12px; justify-items: flex-start; }
.footer-feed {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.footer-feed a { color: var(--text-faint); }
.footer-feed a:hover { color: var(--accent); text-decoration: none; }

/* ======= Responsive ====================================================== */

@media (max-width: 1080px) {
  .layout { grid-template-columns: minmax(0, 1fr); gap: 48px; }
  .layout-aside-inner { position: static; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
}

@media (max-width: 900px) {
  :root { --gutter: 28px; }
  .masthead-inner { flex-wrap: wrap; }
  .masthead-controls { width: 100%; justify-content: space-between; }
}

/* Below this the menu alone needs the full rail: the feed link would push it
   onto a second row for the sake of one link that the footer also carries. */
@media (max-width: 820px) {
  .primary-nav-feed { display: none; }
}

@media (max-width: 700px) {
  :root { --rail-gap: 18px; }
  body { font-size: 16px; }
  .layout { padding-top: 40px; padding-bottom: 56px; }
  .hero { margin-bottom: 48px; }
  .hero-lede { font-size: 17px; }
  .hero-lede-lead { font-size: 19.5px; line-height: 1.62; }
  .prose { font-size: 17px; }

  .entry { grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 24px 0; }
  .entry-rail { display: flex; align-items: baseline; gap: 12px; padding-top: 0; }
  .entry-stamp { display: flex; gap: 6px; }
  .entry-stamp-year { color: var(--text-faint); }
  .entry-kind { margin-top: 0; }
  .entry-body { border-left: 0; padding-left: 0; }
  .entry:hover .entry-body { border-left: 0; }
  .entry-list-upcoming .entry-body { border-left: 0; }

  .entry-media { float: none; width: min(100%, 280px); margin: 14px 0; }
  .entry-media-cover { width: 130px; }
  .entry-media-video { width: 100%; }

  /* The nav takes as many rows as it needs; the items tighten up so all eight
     land in two rows at 500px with nothing clipped. */
  .primary-nav-list a { padding: 10px 9px 8px; letter-spacing: 0.1em; }
}

@media (max-width: 560px) {
  :root { --gutter: 20px; }
  .identity-portrait { width: 46px; height: 46px; }
  .identity-name { font-size: 19px; }
  .identity-spec { font-size: 10px; }
  .identity-sep { margin: 0 4px; }
  .masthead-controls { gap: 12px; }
  .social a { width: 28px; height: 28px; font-size: 14px; }
  .author-note { flex-direction: column; gap: 14px; }
  .pager { flex-wrap: wrap; justify-content: center; }
  .prose pre { padding: 14px; font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
