/* =============================================================================
   cahelle.com

   Contents
   1. Fonts
   2. Design tokens
   3. Reset & base
   4. Page texture
   5. Layout primitives
   6. Typography
   7. Site header & footer
   8. Buttons & links
   9. Hero
  10. Tag rows
  11. Stat strip
  12. Timeline (experience & education)
  13. Skills
  14. Focusverse page components
  15. Helpers

   The home page, the book, has its own stylesheet: book.css.
   ========================================================================== */

/* 1. Fonts =================================================================
   Self-hosted so the site has no third-party dependency at runtime.
   Fraunces and Karla are both under the SIL Open Font License, see
   assets/fonts/OFL.txt.
   ========================================================================== */

@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url("../fonts/fraunces-latin.woff2") format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212,
    U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url("../fonts/fraunces-latin-ext.woff2") format("woff2");
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304,
    U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB,
    U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Karla";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/karla-latin.woff2") format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212,
    U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Karla";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/karla-latin-ext.woff2") format("woff2");
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304,
    U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB,
    U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* 2. Design tokens ========================================================= */

:root {
  color-scheme: light;

  /* Warm paper, lamp light, one terracotta accent and a quiet green. */
  --bg: #fbf5ec;
  --bg-sunk: #f4ead9;
  --surface: #fffcf6;
  --surface-2: #f8f0e3;
  --border: #e7dac4;
  --border-strong: #d3c0a3;

  --ink: #23190f;
  --ink-soft: #4c3f31;
  --ink-muted: #756450;

  --accent: #b04a1c;
  --accent-tint: #f7e5d7;
  --accent-2: #4a6b4d;
  --accent-2-tint: #e3ecdf;

  --note: #7a5a12;
  --note-bg: #f8e9c4;

  --wash-1: rgba(215, 140, 90, 0.22);
  --wash-2: rgba(120, 155, 120, 0.16);
  --grain-opacity: 0.05;
  --grain-blend: multiply;

  --shadow-soft:
    0 1px 2px rgba(80, 55, 25, 0.05), 0 14px 32px -20px rgba(80, 55, 25, 0.35);
  --shadow-lift:
    0 2px 4px rgba(80, 55, 25, 0.06), 0 22px 44px -22px rgba(80, 55, 25, 0.42);

  /* Type scale */
  --step--1: 0.8438rem;
  --step-0: 1.0313rem;
  --step-1: 1.1875rem;
  --step-2: clamp(1.35rem, 1.2rem + 0.6vw, 1.6rem);
  --step-3: clamp(1.6rem, 1.35rem + 1.1vw, 2.15rem);
  --step-4: clamp(2.4rem, 1.75rem + 2.9vw, 3.9rem);

  /* Spacing */
  --space-2xs: 0.25rem;
  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1.25rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-2xl: clamp(3.5rem, 2rem + 6vw, 5.5rem);

  --measure: 35rem;
  --wrap: 64rem;
  --radius: 16px;
  --radius-sm: 10px;

  --font-display: "Fraunces", ui-serif, Georgia, "Times New Roman", serif;
  --font-body:
    "Karla", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
    sans-serif;
  --font-mono:
    ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;

    --bg: #17120d;
    --bg-sunk: #120e0a;
    --surface: #211a13;
    --surface-2: #2a211a;
    --border: #382d22;
    --border-strong: #4d3f31;

    --ink: #f4ece0;
    --ink-soft: #d5c8b7;
    --ink-muted: #a8977f;

    --accent: #eda274;
    --accent-tint: #3a2718;
    --accent-2: #a8c4a5;
    --accent-2-tint: #24301f;

    --note: #e6c37f;
    --note-bg: #33290f;

    --wash-1: rgba(220, 130, 70, 0.16);
    --wash-2: rgba(120, 170, 130, 0.1);
    --grain-opacity: 0.07;
    --grain-blend: screen;

    --shadow-soft:
      0 1px 2px rgba(0, 0, 0, 0.4), 0 14px 32px -20px rgba(0, 0, 0, 0.8);
    --shadow-lift:
      0 2px 4px rgba(0, 0, 0, 0.45), 0 22px 44px -22px rgba(0, 0, 0, 0.9);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;

  --bg: #17120d;
  --bg-sunk: #120e0a;
  --surface: #211a13;
  --surface-2: #2a211a;
  --border: #382d22;
  --border-strong: #4d3f31;

  --ink: #f4ece0;
  --ink-soft: #d5c8b7;
  --ink-muted: #a8977f;

  --accent: #eda274;
  --accent-tint: #3a2718;
  --accent-2: #a8c4a5;
  --accent-2-tint: #24301f;

  --note: #e6c37f;
  --note-bg: #33290f;

  --wash-1: rgba(220, 130, 70, 0.16);
  --wash-2: rgba(120, 170, 130, 0.1);
  --grain-opacity: 0.07;
  --grain-blend: screen;

  --shadow-soft:
    0 1px 2px rgba(0, 0, 0, 0.4), 0 14px 32px -20px rgba(0, 0, 0, 0.8);
  --shadow-lift:
    0 2px 4px rgba(0, 0, 0, 0.45), 0 22px 44px -22px rgba(0, 0, 0, 0.9);
}

/* 3. Reset & base ========================================================== */

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

* {
  margin: 0;
}

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

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  min-height: 100vh;
  background-color: var(--bg);
  background-image:
    radial-gradient(54rem 36rem at 82% -8%, var(--wash-1), transparent 62%),
    radial-gradient(46rem 34rem at -10% 6%, var(--wash-2), transparent 60%);
  background-repeat: no-repeat;
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

/* Hidden means hidden, whatever display a component sets: the header
   buttons stay out of sight until their script shows them. */
[hidden] {
  display: none !important;
}

:where(a, button, summary):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection {
  background: var(--accent-tint);
}

/* 4. Page texture ==========================================================
   A very light grain over everything, so the background reads as paper rather
   than as a flat fill. Non-interactive and hidden from assistive tech.
   ========================================================================== */

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  opacity: var(--grain-opacity);
  mix-blend-mode: var(--grain-blend);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23g)'/%3E%3C/svg%3E");
}

/* 5. Layout primitives ===================================================== */

.wrap {
  width: min(100% - 2.5rem, var(--wrap));
  margin-inline: auto;
}

.section {
  padding-block: var(--space-2xl);
}

.section + .section {
  padding-top: 0;
}

.section > * + * {
  margin-top: var(--space-lg);
}

.section__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-xs) var(--space-md);
}

/* One quiet line beside a section title: what the section is, or where the
   longer version lives. Moves to the right once there is room for it. */
.section__lede {
  max-width: 26rem;
  font-size: var(--step--1);
  color: var(--ink-muted);
}

@media (min-width: 46em) {
  .section__lede {
    margin-left: auto;
    text-align: right;
  }
}

.skip-link {
  position: absolute;
  top: 0;
  left: 1rem;
  z-index: 110;
  padding: 0.6rem 0.9rem;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: none;
}

/* 6. Typography ============================================================ */

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.012em;
  text-wrap: balance;
}

h1 {
  font-size: var(--step-4);
  letter-spacing: -0.028em;
}

h2 {
  font-size: var(--step-3);
}

h3 {
  font-size: var(--step-1);
  line-height: 1.25;
}

p,
li {
  text-wrap: pretty;
}

.eyebrow {
  font-size: var(--step--1);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

/* Section titles carry a short accent rule, so headings read as openings
   rather than as another line of text. */
.section-title::after {
  content: "";
  display: block;
  width: 2.25rem;
  height: 3px;
  margin-top: 0.7rem;
  border-radius: 3px;
  background: var(--accent);
}

.lead {
  font-size: var(--step-1);
  color: var(--ink-soft);
  max-width: 38rem;
}

.prose {
  max-width: var(--measure);
  color: var(--ink-soft);
}

.prose > * + * {
  margin-top: var(--space-md);
}

.prose strong {
  color: var(--ink);
  font-weight: 700;
}

.meta {
  font-size: var(--step--1);
  color: var(--ink-muted);
}

/* 7. Site header & footer ================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(150%) blur(12px);
  border-bottom: 1px solid var(--border);
}

.site-header__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-md);
  min-height: 3.75rem;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-display);
  font-size: var(--step-1);
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}

.wordmark::before {
  content: "";
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  background: var(--accent);
  flex: none;
}

@media (max-width: 33em) {
  .wordmark__surname {
    display: none;
  }
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(0.6rem, 3vw, 1.4rem);
  margin-left: auto;
  font-size: var(--step--1);
  font-weight: 500;
}

.site-nav a {
  color: var(--ink-muted);
  text-decoration: none;
  padding-block: 0.75rem;
}

.site-nav a:hover {
  color: var(--ink);
}

.site-nav a[aria-current="page"] {
  color: var(--ink);
  font-weight: 700;
}

.theme-toggle,
.edition-menu__button {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  color: var(--ink-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
}

.theme-toggle:hover,
.edition-menu__button:hover,
.edition-menu__button[aria-expanded="true"] {
  color: var(--accent);
  border-color: var(--border-strong);
}

.theme-toggle svg,
.edition-menu__button svg {
  width: 1rem;
  height: 1rem;
}

/* The edition menu, on the home page only: a round button like the theme
   toggle, with a panel of editions of the book under it. edition.js wires
   it up; each edition's look lives in its own book-*.css. */
.edition-menu {
  position: relative;
}

.edition-menu__panel {
  position: absolute;
  top: calc(100% + 0.6rem);
  right: 0;
  display: grid;
  gap: 0.15rem;
  min-width: 11.5rem;
  padding: 0.45rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lift);
}

.edition-menu__title {
  padding: 0.15rem 0.6rem 0.3rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.edition-menu__option {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.45rem 0.6rem;
  border: 0;
  border-radius: 6px;
  color: var(--ink-soft);
  background: none;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.edition-menu__option:hover {
  color: var(--ink);
  background: var(--surface-2);
}

.edition-menu__option[aria-pressed="true"] {
  color: var(--ink);
  font-weight: 700;
  background: var(--accent-tint);
}

.edition-menu__option[aria-pressed="true"]::after {
  content: "✓";
  margin-left: auto;
  color: var(--accent);
}

.edition-menu__option svg {
  flex: none;
  width: 1.1rem;
  height: 1.1rem;
}

/* With the edition menu the header holds one button more than on the other
   pages. On a phone it closes up a little, so that it stays on one line. */
@media (max-width: 30em) {
  .site-header__inner:has(.edition-menu:not([hidden])) {
    width: min(100% - 1.5rem, var(--wrap));
    gap: var(--space-sm);
  }

  .site-nav:has(.edition-menu:not([hidden])) {
    gap: 0.5rem;
  }

  .site-nav:has(.edition-menu:not([hidden]))
    :is(.theme-toggle, .edition-menu__button) {
    width: 2rem;
    height: 2rem;
  }
}

.site-footer {
  margin-top: var(--space-2xl);
  padding-block: var(--space-xl);
  background: var(--bg-sunk);
  border-top: 1px solid var(--border);
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm) var(--space-lg);
  align-items: baseline;
  justify-content: space-between;
  font-size: var(--step--1);
  color: var(--ink-muted);
}

.site-footer a {
  color: var(--ink-soft);
}

.site-footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.site-footer__nav a {
  text-decoration: none;
}

.site-footer__nav a:hover {
  color: var(--accent);
}

/* 8. Buttons & links ======================================================= */

a {
  color: var(--accent);
  text-underline-offset: 0.18em;
  text-decoration-thickness: from-font;
}

a:hover {
  text-decoration-thickness: 2px;
}

.button {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  min-height: 2.85rem;
  padding: 0.6rem 1.25rem;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: var(--step-0);
  font-weight: 700;
  text-decoration: none;
  border: 1px solid transparent;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease;
}

.button--primary {
  background: var(--accent);
  color: var(--bg);
  box-shadow: var(--shadow-soft);
}

.button--ghost {
  color: var(--ink);
  border-color: var(--border-strong);
  background: color-mix(in srgb, var(--surface) 70%, transparent);
}

.button--ghost:hover {
  background: var(--surface);
}

@media (prefers-reduced-motion: no-preference) {
  .button:hover {
    transform: translateY(-2px);
  }
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

/* 9. Hero ================================================================== */

.hero {
  padding-block: clamp(3rem, 2rem + 6vw, 5.5rem) var(--space-2xl);
}

.hero h1 {
  max-width: 16ch;
  margin-top: var(--space-sm);
}

.hero .lead {
  margin-top: var(--space-md);
}

.hero .lead + .lead {
  margin-top: var(--space-sm);
}

.hero .button-row {
  margin-top: var(--space-lg);
}

/* The resume leads with the same block, at a tighter rhythm. */
.resume-hero {
  padding-block: clamp(2.5rem, 2rem + 4vw, 4rem) var(--space-lg);
}

.print-hint {
  font-style: italic;
}

/* A dot list at body size, used where a section is just a handful of facts. */
.plain-list {
  display: grid;
  gap: var(--space-xs);
  max-width: 44rem;
  color: var(--ink-soft);
}

.plain-list li {
  position: relative;
  padding-left: 1rem;
}

.plain-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.7em;
  width: 0.35rem;
  height: 0.35rem;
  border-radius: 50%;
  background: var(--border-strong);
}

/* Spacing helpers, used sparingly. */
.mt-md {
  margin-top: var(--space-md);
}

/* 10. Tag rows ============================================================ */

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2xs) var(--space-sm);
  font-size: var(--step--1);
  color: var(--ink-muted);
}

.tag-row li:not(:last-child)::after {
  content: "·";
  margin-left: var(--space-sm);
  color: var(--border-strong);
}

/* 11. Stat strip =========================================================== */

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.stats dt {
  order: 2;
  font-size: var(--step--1);
  color: var(--ink-muted);
}

.stats dd {
  order: 1;
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--step-2);
  font-weight: 600;
  line-height: 1.2;
  color: var(--ink);
}

.stats > div {
  display: flex;
  flex-direction: column;
}

/* 12. Timeline =============================================================
   One spine with a dot per entry. On narrow screens the spine runs down the
   left edge and the date sits above each entry; from 46em the date moves into
   its own column to the left of the spine. Entries with .is-now get a filled
   dot. The spine fades in above the first dot and out below the last one.
   ========================================================================== */

.timeline {
  --tl-when: 8.5rem;
  --tl-dot: 12px;
  --tl-line: 2px;
  --tl-bg: var(--bg);
  --tl-fade-in: linear-gradient(
    to bottom,
    transparent 0.6rem,
    var(--border) 0.6rem
  );
  --tl-fade-out: linear-gradient(to bottom, var(--border), transparent);
  display: grid;
}

/* Room for "Sep 2023 – Apr 2026" on one line, for the resume. */
.timeline--wide {
  --tl-when: 10.5rem;
}

.timeline > li {
  position: relative;
  display: grid;
  gap: var(--space-2xs);
  padding-left: calc(var(--space-md) + var(--tl-dot));
  padding-bottom: var(--space-lg);
  border-left: var(--tl-line) solid var(--border);
}

.timeline > li:first-child {
  border-image: var(--tl-fade-in) 1;
}

.timeline > li:last-child {
  padding-bottom: 0;
  border-image: var(--tl-fade-out) 1;
}

/* The dot, centred on the spine. */
.timeline > li::before {
  content: "";
  position: absolute;
  top: 0.32rem;
  left: calc(-1 * (var(--tl-line) + var(--tl-dot)) / 2);
  width: var(--tl-dot);
  height: var(--tl-dot);
  border-radius: 50%;
  background: var(--tl-bg);
  border: 2px solid var(--accent);
}

.timeline > .is-now::before {
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-tint);
}

.timeline__when {
  font-family: var(--font-display);
  font-size: var(--step--1);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1.5;
  color: var(--ink-soft);
}

/* What kind of entry it is: work, study, a publication. Inline after the
   date on narrow screens, on its own line beneath it from 46em. */
.timeline__kind {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.timeline__kind::before {
  content: "·";
  margin-inline: 0.15em 0.5em;
  color: var(--border-strong);
}

.timeline__body > * + * {
  margin-top: var(--space-2xs);
}

.timeline__role {
  font-family: var(--font-display);
  font-size: var(--step-1);
  font-weight: 600;
  line-height: 1.25;
  color: var(--ink);
}

.timeline__org {
  color: var(--ink-soft);
}

.timeline__note {
  max-width: var(--measure);
  font-size: var(--step--1);
  color: var(--ink-soft);
}

.timeline__notes {
  display: grid;
  gap: var(--space-2xs);
  margin-top: var(--space-xs);
  max-width: var(--measure);
  color: var(--ink-soft);
  font-size: var(--step--1);
}

@media (min-width: 46em) {
  .timeline > li {
    grid-template-columns: var(--tl-when) minmax(0, 1fr);
    padding-left: 0;
    padding-bottom: 0;
    border-left: 0;
    border-image: none;
  }

  .timeline > li::before {
    left: calc(var(--tl-when) + (var(--tl-line) - var(--tl-dot)) / 2);
  }

  .timeline__when {
    padding-right: var(--space-md);
    text-align: right;
  }

  .timeline__kind {
    display: block;
  }

  .timeline__kind::before {
    content: none;
  }

  .timeline__body {
    padding-left: calc(var(--space-md) + var(--tl-dot));
    padding-bottom: var(--space-lg);
    border-left: var(--tl-line) solid var(--border);
  }

  .timeline > li:first-child .timeline__body {
    border-image: var(--tl-fade-in) 1;
  }

  .timeline > li:last-child .timeline__body {
    padding-bottom: 0;
    border-image: var(--tl-fade-out) 1;
  }
}

.timeline__notes li {
  padding-left: 1rem;
  position: relative;
}

.timeline__notes li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 0.35rem;
  height: 0.35rem;
  border-radius: 50%;
  background: var(--border-strong);
}

/* 13. Skills ===============================================================
   Four cards, each with a line icon, one sentence, and a row of chips. The
   chips marked .chip--core are tinted: they are the everyday tools. That is
   the whole depth scale, on purpose. Percentages and bars say nothing.
   ========================================================================== */

.skillset {
  display: grid;
  gap: var(--space-md);
}

@media (min-width: 46em) {
  .skillset {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-lg);
  }

  /* An odd card out takes the whole row rather than leaving a gap. */
  .skill--wide {
    grid-column: 1 / -1;
  }
}

.skill {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  /* Cards in a row are stretched to the same height; keep the rows packed at
     the top rather than spread through the extra space. */
  align-content: start;
  column-gap: var(--space-sm);
  padding: var(--space-md) var(--space-md) var(--space-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.skill__icon {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 12px;
  color: var(--accent);
  background: var(--accent-tint);
}

.skill__icon svg {
  width: 1.3rem;
  height: 1.3rem;
}

.skill h3 {
  color: var(--ink);
}

.skill p {
  grid-column: 1 / -1;
  margin-top: var(--space-sm);
  font-size: var(--step--1);
  color: var(--ink-soft);
}

.chips {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  margin-top: var(--space-sm);
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.7rem;
  font-size: var(--step--1);
  line-height: 1.45;
  color: var(--ink-soft);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
}

.chip--core {
  color: var(--ink);
  font-weight: 500;
  background: var(--accent-tint);
  border-color: color-mix(in srgb, var(--accent) 35%, transparent);
}

/* 14. Focusverse page components =========================================== */

.case-hero {
  padding-block: clamp(2.5rem, 2rem + 4vw, 4rem) var(--space-lg);
}

.case-hero h1 {
  font-size: var(--step-3);
  max-width: 22ch;
  margin-top: var(--space-sm);
}

.case-hero .lead {
  margin-top: var(--space-md);
}

.facts {
  display: grid;
  gap: var(--space-md) var(--space-xl);
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  margin-top: var(--space-lg);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--border);
}

.facts dt {
  font-size: var(--step--1);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: var(--space-2xs);
}

.facts dd {
  margin: 0;
  color: var(--ink-soft);
}

figure {
  margin: 0;
}

figure img {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

figcaption {
  margin-top: var(--space-sm);
  font-size: var(--step--1);
  color: var(--ink-muted);
  max-width: var(--measure);
}

.figure-pair {
  display: grid;
  gap: var(--space-md);
}

.figure-pair img {
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

@media (min-width: 46em) {
  .figure-pair {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg);
  }
}

.figure--narrow img {
  max-width: 32rem;
}

.figure--narrow .placeholder--wide {
  max-width: 46rem;
}

/* Numbered sections on the Focusverse page. */
.step-number {
  font-family: var(--font-display);
  font-size: var(--step--1);
  font-weight: 600;
  color: var(--accent);
}

.decisions {
  display: grid;
  gap: var(--space-md);
}

.decisions > li {
  padding: var(--space-md) var(--space-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-soft);
}

@media (min-width: 46em) {
  .decisions > li {
    display: grid;
    grid-template-columns: 15rem 1fr;
    gap: var(--space-xl);
    padding: var(--space-lg);
  }
}

.decisions h3 {
  color: var(--ink);
  margin-bottom: var(--space-xs);
}

@media (min-width: 46em) {
  .decisions h3 {
    margin-bottom: 0;
  }
}

.decisions p {
  color: var(--ink-soft);
  max-width: var(--measure);
}

.decisions .trade {
  margin-top: var(--space-xs);
  font-size: var(--step--1);
  color: var(--ink-muted);
}

/* Two lists of user requests: shipped, and still waiting. */
.requests {
  display: grid;
  gap: var(--space-lg);
}

@media (min-width: 46em) {
  .requests {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-xl);
  }
}

.requests h3 {
  font-family: var(--font-body);
  font-size: var(--step--1);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: var(--space-sm);
}

.ticks {
  display: grid;
  gap: var(--space-2xs);
  color: var(--ink-soft);
}

.ticks li {
  position: relative;
  padding-left: 1.5rem;
}

.ticks li::before {
  position: absolute;
  left: 0;
  color: var(--accent-2);
  font-weight: 700;
}

.ticks--done li::before {
  content: "✓";
}

.ticks--waiting li::before {
  content: "•";
  color: var(--ink-muted);
}

/* The shipping history. */
.releases {
  display: grid;
  gap: 0;
  border-left: 2px solid var(--border);
  padding-left: var(--space-md);
}

.releases > div {
  position: relative;
  padding-block: var(--space-sm);
}

.releases > div::before {
  content: "";
  position: absolute;
  left: calc(-1 * var(--space-md) - 6px);
  top: 1.35rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--accent);
}

.releases dt {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--ink);
}

.releases dd {
  margin: 0;
  max-width: var(--measure);
  color: var(--ink-soft);
  font-size: var(--step--1);
}

/* 15. Helpers ============================================================== */

/* A slot for an image that has not been added yet. Deliberately obvious, and
   sized so it shows exactly how much room the real image will take. */
.placeholder {
  display: grid;
  place-content: center;
  gap: var(--space-2xs);
  padding: var(--space-md);
  text-align: center;
  font-size: var(--step--1);
  color: var(--note);
  background: var(--note-bg);
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius);
}

.placeholder--wide {
  max-width: 46rem;
  aspect-ratio: 16 / 9;
}

/* Marks content that still needs a real value. Visible on purpose. */
.tbd {
  padding: 0.05em 0.4em;
  font-size: 0.9em;
  font-family: var(--font-mono);
  color: var(--note);
  background: var(--note-bg);
  border-radius: 4px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
