/* Generated from content/theme.yaml — do not edit this file by hand. */
@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,200..800&display=swap');
:root {
  --bg: #0b0b0d;
  --bg-elevated: #131317;
  --bg-card: #16161b;
  --bg-card-hover: #1d1d24;
  --border: #26262e;
  --border-strong: #3a3a45;
  --text: #f2f2f5;
  --text-muted: #a8a8b4;
  --text-dim: #6e6e7a;
  --accent: #73E5FE;
  --accent-soft: #73E5FE;
  --accent-contrast: #0b0b0d;
  --overlay: rgba(11, 11, 13, 0.82);
  --overlay-strong: rgba(6, 6, 8, 0.94);

  --font-display: 'Bricolage Grotesque', 'Georgia', 'Times New Roman', serif;
  --font-body: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, 'Cascadia Code', 'JetBrains Mono', Consolas, monospace;

  --fs-hero: 4.25rem;
  --fs-display: 2.85rem;
  --fs-h2: 1.6rem;
  --fs-h3: 1.2rem;
  --fs-body: 1.05rem;
  --fs-small: 0.85rem;
  --fs-micro: 0.72rem;

  --radius-card: 14px;
  --radius-media: 10px;
  --radius-pill: 999px;

  --max-content: 1120px;
  --max-project: 820px;
  /* Inline padding of .container. Also used by a full-bleed block to put its
     caption back where the text column starts. */
  --container-pad: clamp(18px, 4vw, 40px);
  /* Reading measure for text blocks. `none` = fill the container. */
  --measure: 72ch;
  --gap-card: 22px;
  --gap-section: 96px;
  /* Tallest a self-hosted video is allowed to get inside its frame (see the
     `.block__media video` rule). theme.yaml -> spacing.media_max_height. */
  --media-max-height: 78vh;

  --duration: 320ms;
  --easing: cubic-bezier(0.22, 1, 0.36, 1);
  --card-lift: 6px;
  --card-zoom: 1.06;

  --grid-columns: 2;
  --index-columns: 3;
  --nav-position: sticky;
  /* Hero texture (theme.yaml -> images.hero_background). */
  --hero-bg-image: url("/media/images/hero_background.webp?v=f55ab4b605fc");
}

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

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

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

img, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; }

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

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--accent);
  color: var(--accent-contrast);
  padding: 10px 16px;
  z-index: 100;
}
.skip-link:focus { left: 12px; top: 12px; }

/* --------------------------------------------------------------------------
   Layout shell
   -------------------------------------------------------------------------- */
.shell { width: 100%; }
.container {
  --container-max: var(--max-content);
  width: 100%;
  max-width: var(--max-content);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}
.container--narrow {
  --container-max: var(--max-project);
  max-width: var(--max-project);
  /* The narrow column already is the reading measure: let the blocks fill it,
     otherwise every block stops short and leaves a gap along the right edge. */
  --measure: none;
}

.section { padding-block: var(--gap-section); }
.section--tight { padding-block: calc(var(--gap-section) * 0.55); }
.section + .section { border-top: 1px solid var(--border); }
/* `container-type` makes the section the reference box for the `cqw` unit that a
   full-bleed block uses: 100cqw is the section's own width — the viewport minus
   the scrollbar — where `100vw` would include the scrollbar and invent a
   horizontal scroll. It also stops a wide child from widening the section.
   `overflow-x: clip` is the safety net for the `100vw` fallback. */
.section { container-type: inline-size; overflow-x: clip; }

/* --------------------------------------------------------------------------
   Navigation
   -------------------------------------------------------------------------- */
.site-nav {
  position: var(--nav-position);
  top: 0;
  z-index: 50;
  background: var(--overlay);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.site-nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 68px;
}
.site-nav__brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
}
.site-nav__name { white-space: nowrap; }
.brand-accent { color: var(--accent); }
.site-nav__logo {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border);
  object-fit: cover;
  flex: 0 0 auto;
}
.site-nav__links { display: flex; align-items: center; gap: 6px; list-style: none; margin: 0; padding: 0; }
.site-nav__links a {
  display: inline-block;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  font-size: var(--fs-small);
  letter-spacing: 0.04em;
  text-decoration: none;
  color: var(--text-muted);
  transition: color var(--duration) var(--easing), background var(--duration) var(--easing);
}
.site-nav__links a:hover, .site-nav__links a[aria-current="page"] { color: var(--text); background: var(--bg-card); }

/* --------------------------------------------------------------------------
   Buttons / CTAs
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 26px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  font-size: var(--fs-small);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-decoration: none;
  cursor: pointer;
  transition: transform var(--duration) var(--easing), background var(--duration) var(--easing),
              border-color var(--duration) var(--easing), color var(--duration) var(--easing);
}
.btn--primary { background: var(--accent); color: var(--accent-contrast); }
.btn--primary:hover { background: var(--accent-soft); transform: translateY(-2px); }
.btn--ghost { border-color: var(--border-strong); color: var(--text); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
.btn--link { padding-inline: 0; color: var(--text-muted); }
.btn--link:hover { color: var(--accent); }

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
/* Hero texture: tiles horizontally with no gaps, drawn at its own pixel size
   so it is never stretched vertically. The gradient dissolves its bottom edge
   into the page background instead of cutting it off on a hard line. */
.hero,
.project-head {
  background-image:
    linear-gradient(180deg, transparent 55%, var(--bg) 100%),
    var(--hero-bg-image);
  background-repeat: no-repeat, repeat-x;
  background-position: top left, top left;
  background-size: 100% 100%, auto auto;
}
.hero { padding-block: clamp(72px, 12vw, 148px) clamp(48px, 8vw, 96px); }
.hero__eyebrow {
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 22px;
}
.hero__title {
  font-family: var(--font-display);
  font-size: clamp(2.1rem, var(--fs-hero), 5rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 0 22px;
  max-width: 20ch;
}
.hero__title em { color: var(--accent); font-style: normal; }
.hero__subtitle {
  font-size: clamp(1.05rem, 1.35rem, 1.5rem);
  color: var(--text-muted);
  max-width: 52ch;
  margin: 0 0 34px;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; }
.hero--minimal { padding-block: clamp(48px, 7vw, 84px) 0; }
.hero--minimal .hero__title { max-width: 26ch; }

/* --------------------------------------------------------------------------
   Section headings
   -------------------------------------------------------------------------- */
.section-head { margin-bottom: 40px; }
.section-head__kicker {
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin: 0 0 10px;
}
.section-head__title {
  font-family: var(--font-display);
  font-size: var(--fs-h2);
  letter-spacing: -0.01em;
  margin: 0;
}
.section-head__note { color: var(--text-muted); max-width: 60ch; margin: 12px 0 0; }
/* inside the narrow column the note lines up with the media under it */
.container--narrow .section-head__note { max-width: var(--measure); }

/* --------------------------------------------------------------------------
   Project cards
   -------------------------------------------------------------------------- */
.card-grid {
  display: grid;
  gap: var(--gap-card);
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.card-grid--featured { grid-template-columns: repeat(var(--grid-columns), minmax(0, 1fr)); }
.card-grid--index { grid-template-columns: repeat(var(--index-columns), minmax(0, 1fr)); }

.card {
  display: block;
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  overflow: hidden;
  text-decoration: none;
  transition: transform var(--duration) var(--easing), border-color var(--duration) var(--easing),
              background var(--duration) var(--easing);
}
.card:hover { transform: translateY(calc(var(--card-lift) * -1)); border-color: var(--border-strong); background: var(--bg-card-hover); }
.card__media {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--bg-elevated);
}

.card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform calc(var(--duration) * 1.6) var(--easing);
}
.card:hover .card__media img { transform: scale(var(--card-zoom)); }
.card__media--placeholder::after {
  content: attr(data-label);
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.card__body { padding: 18px 20px 22px; }
.card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 10px;
}
.card__meta .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--accent); }
.card__title {
  font-family: var(--font-display);
  font-size: 1.18rem;
  line-height: 1.3;
  margin: 0 0 8px;
}
.card__one-liner { color: var(--text-muted); font-size: var(--fs-small); margin: 0; }
.card__role {
  margin-top: 12px;
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: 0.1em;
  color: var(--text-dim);
}

/* --------------------------------------------------------------------------
   About
   -------------------------------------------------------------------------- */
/* portrait | (lead text | skills list) — the AI callout spans the full width below */
.about { display: grid; gap: 44px; grid-template-columns: minmax(0, 1fr); align-items: start; }
.about--with-portrait { grid-template-columns: minmax(0, 260px) minmax(0, 1fr); }
.about__body { display: grid; gap: 40px; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: start; }
.about__portrait { margin: 0; }
.about__portrait img {
  width: 100%;
  border-radius: var(--radius-media);
  border: 1px solid var(--border);
}
.about__callout { margin-top: 44px; }
.about__lead { font-family: var(--font-display); font-size: clamp(1.2rem, 1.55rem, 1.75rem); line-height: 1.5; margin: 0; }
.about__list { margin: 0; padding: 0; list-style: none; display: grid; gap: 14px; }
.about__list li {
  position: relative;
  padding-left: 22px;
  color: var(--text-muted);
  font-size: var(--fs-small);
}
.about__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 9px;
  height: 1px;
  background: var(--accent);
}
.about__subhead {
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin: 0 0 16px;
}
.callout {
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-media);
  background: var(--bg-card);
  padding: 22px 24px;
}
.callout__title {
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 10px;
}
.callout p { margin: 0; color: var(--text-muted); font-size: var(--fs-small); }

/* --------------------------------------------------------------------------
   Contact
   -------------------------------------------------------------------------- */
.contact { text-align: left; }
.contact__status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 20px;
}
.contact__status::before {
  content: "";
  flex: none; /* never let the flex row squeeze the dot on narrow screens */
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent);
  animation: status-pulse 2.4s var(--easing) infinite;
}
.contact__title { font-family: var(--font-display); font-size: var(--fs-display); margin: 0 0 26px; letter-spacing: -0.02em; }
.contact__links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; list-style: none; padding: 0; }
.contact__links a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  font-size: var(--fs-small);
  text-decoration: none;
  color: var(--text-muted);
  transition: border-color var(--duration) var(--easing), color var(--duration) var(--easing);
}
.contact__links a:hover { border-color: var(--accent); color: var(--accent); }

/* Pulsating halo around the availability dot: the translucent ring expands
   outwards, fades, holds briefly, then loops. */
@keyframes status-pulse {
  0% {
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 30%, transparent);
  }
  65%, 100% {
    box-shadow: 0 0 0 9px color-mix(in srgb, var(--accent) 0%, transparent);
  }
}

/* --------------------------------------------------------------------------
   Project page
   -------------------------------------------------------------------------- */
.project-head { padding-block: clamp(48px, 8vw, 96px) 40px; }
.project-head__kicker {
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 16px;
}
.project-head__title {
  font-family: var(--font-display);
  font-size: clamp(2rem, var(--fs-display), 3.4rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 18px;
}
.project-head__one-liner { font-size: clamp(1.05rem, 1.3rem, 1.4rem); color: var(--text-muted); margin: 0 0 30px; max-width: 46ch; }
.project-head__cover {
  border-radius: var(--radius-media);
  overflow: hidden;
  border: 1px solid var(--border);
  margin-top: 8px;
}
.project-head__cover img { width: 100%; object-fit: cover; }

.tldr {
  display: grid;
  gap: 0;
  margin: 40px 0 0;
  border-top: 1px solid var(--border);
}
.tldr__row {
  display: grid;
  grid-template-columns: minmax(120px, 190px) minmax(0, 1fr);
  gap: 20px;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}
.tldr__label {
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.tldr__value { margin: 0; color: var(--text); }
.tldr__value--inline { font-family: var(--font-mono); font-size: var(--fs-small); color: var(--accent-soft); }

/* Content blocks.
   `minmax(0, 1fr)` is deliberate: an implicit grid track grows to fit its widest
   item, which is exactly what a full-bleed block must NOT do — the track has to
   stay the column width so `width: 100vw` can overflow it on purpose. */
.blocks { display: grid; grid-template-columns: minmax(0, 1fr); gap: 44px; }
.block { max-width: var(--measure); }
.block__title {
  font-family: var(--font-display);
  font-size: var(--fs-h2);
  margin: 0 0 16px;
  letter-spacing: -0.01em;
}
.block h3.block__title { font-size: var(--fs-h3); }
.block p { margin: 0 0 16px; color: var(--text-muted); }
.block p:last-child { margin-bottom: 0; }
.block--quote {
  border-left: 2px solid var(--accent);
  padding-left: 24px;
}
.block--quote p { font-family: var(--font-display); font-size: 1.2rem; line-height: 1.55; color: var(--text); }
.block__list { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.block__list li { position: relative; padding-left: 24px; color: var(--text-muted); }
.block__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 10px;
  height: 2px;
  background: var(--accent);
}
.block__list--numbered { counter-reset: item; }
.block__list--numbered li { counter-increment: item; }
.block__list--numbered li::before {
  content: counter(item);
  top: 0;
  width: auto;
  height: auto;
  background: none;
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  color: var(--accent);
  letter-spacing: 0.1em;
}
.kv { display: grid; gap: 14px; }
.kv__row { display: grid; grid-template-columns: minmax(110px, 180px) minmax(0, 1fr); gap: 16px; }
.kv__label {
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.kv__value { margin: 0; color: var(--text); }
.two-col { display: grid; gap: 34px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.software { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; padding: 0; list-style: none; }
.software li {
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 5px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  color: var(--text-muted);
}
.sub-blocks { display: grid; grid-template-columns: minmax(0, 1fr); gap: 30px; }
.divider { height: 1px; background: var(--border); max-width: var(--measure); }

/* One picture standing alone between two blocks (`type: image`).
   Same frame and caption treatment as a gallery item, so a single image and a
   gallery image clearly belong to the same system. */
.block--image { margin: 0; }
.block__media {
  border-radius: var(--radius-media);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
}
/* A picture fills its frame and gives up whatever sticks out. A video never
   does: `cover` would cut its top and bottom whenever the frame is wider than
   the film (most clips here are square, the frames are not), so a video keeps
   its own shape and the frame grows around it instead. The width/height the
   template puts on the element reserve that shape before the file loads.
   `--media-max-height` is the other half: a portrait clip shown at the full
   column width would be taller than the screen, so it stops there and the frame
   shows the bands at its sides — the whole film is visible, never cropped. */
.block__media img { width: 100%; object-fit: cover; }
.block__media video { width: 100%; height: auto; max-height: var(--media-max-height); object-fit: contain; }
.block--image figcaption {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
}
/* `full: true` — the picture leaves the text column and spans the viewport.
   50% is half the grid track, 50cqw half the section: the difference pulls the
   left edge exactly onto the section's left edge.
   The `vw` pair is written first and the `cqw` pair second: a browser without
   container queries cannot parse `cqw`, drops those two declarations and keeps
   the viewport version (a scrollbar-width wider than the viewport, which
   `overflow-x: clip` absorbs). */
.block--image--full {
  max-width: none;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  width: 100cqw;
  margin-left: calc(50% - 50cqw);
}
.block--image--full .block__media { border-radius: 0; border-inline-width: 0; }
/* Distance from the bleed edge back to where the surrounding text starts: half the
   margin the container has left over, plus its inline padding. `min()` covers the
   case where the container is already as wide as the section. */
.block--image--full {
  --bleed-pad: calc((100vw - min(var(--container-max, var(--max-content)), 100vw)) / 2 + var(--container-pad));
}
@supports (container-type: inline-size) {
  .block--image--full {
    --bleed-pad: calc((100cqw - min(var(--container-max, var(--max-content)), 100cqw)) / 2 + var(--container-pad));
  }
}
/* The heading and the caption stay aligned with the surrounding text. */
.block--image--full .block__title,
.block--image--full figcaption { padding-inline: var(--bleed-pad); }

/* Gallery */
.gallery { display: grid; gap: 30px; }
.gallery__item { margin: 0; }
.gallery__media {
  border-radius: var(--radius-media);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
}
/* Same rule as `.block__media`: stills fill the frame, a video is never cropped. */
.gallery__media img { width: 100%; object-fit: cover; }
.gallery__media video { width: 100%; height: auto; max-height: var(--media-max-height); object-fit: contain; }
.gallery__media--embed { aspect-ratio: 16 / 9; }
.gallery__media--embed iframe { width: 100%; height: 100%; border: 0; display: block; }
/* `align-items: start` keeps every half of a pair at its own height. The grid
   default stretches an item to the tallest one in its row, which would squash a
   square video into the shape of the still image beside it. */
.gallery__pair { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); align-items: start; }
.gallery__pair > video { width: 100%; height: auto; max-height: var(--media-max-height); object-fit: contain; }
/* Two stills: each half is a framed, captioned figure, so the pair reads as one item. */
.gallery__pair--images { align-items: start; }
.gallery__pair--stacked { grid-template-columns: 1fr; }
.gallery__pair__item { margin: 0; }
.gallery figcaption {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.missing-media {
  display: grid;
  place-items: center;
  min-height: 160px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-media);
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 12px;
  text-align: center;
}

/* Gallery lightbox — site.js builds .lightbox on click; the body attribute comes
   from theme.yaml -> layout.gallery_zoom. Nothing here is visible without JS. */
body[data-gallery-zoom] .gallery img,
body[data-gallery-zoom] .block--image img { cursor: zoom-in; }
body.has-lightbox { overflow: hidden; }
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: clamp(16px, 4vw, 56px);
  background: var(--overlay-strong);
  animation: lightbox-fade var(--duration) var(--easing);
}
.lightbox__figure {
  margin: 0;
  display: grid;
  gap: 14px;
  justify-items: center;
  width: 100%;
  min-width: 0;
  animation: lightbox-zoom var(--duration) var(--easing);
}
/* The picture is clipped by this box, so zooming scales it inside the frame
   instead of stretching the overlay. `touch-action: none` hands the pinch and
   drag gestures to site.js instead of the browser. */
.lightbox__viewport {
  width: 100%;
  height: min(72vh, calc(100vh - 230px));
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: var(--radius-media);
  background: var(--bg-elevated);
  touch-action: none;
}
.lightbox__img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  flex: 0 0 auto;
  object-fit: contain;
  transform-origin: center center;
  cursor: zoom-in;
  user-select: none;
  -webkit-user-drag: none;
}
.lightbox[data-zoomed="true"] .lightbox__img { cursor: grab; }
.lightbox[data-dragging="true"] .lightbox__img { cursor: grabbing; }
.lightbox__figure figcaption {
  margin: 0;
  max-width: 70ch;
  text-align: center;
  color: var(--text-muted);
}
.lightbox__close {
  position: fixed;
  top: 14px;
  left: 14px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  background: var(--bg-card);
  color: var(--text);
  cursor: pointer;
  transition: border-color var(--duration) var(--easing), color var(--duration) var(--easing);
}
.lightbox__close:hover { border-color: var(--accent); color: var(--accent); }
.lightbox__close svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}
/* Zoom controls: −  %  +  reset, centred under the picture. */
.lightbox__controls {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}
.lightbox__btn {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  background: var(--bg-card);
  color: var(--text);
  cursor: pointer;
  transition: border-color var(--duration) var(--easing), color var(--duration) var(--easing);
}
.lightbox__btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.lightbox__btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.lightbox__btn:disabled { opacity: 0.35; cursor: default; }
.lightbox__btn svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.lightbox__level {
  min-width: 5ch;
  text-align: center;
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: 0.1em;
  color: var(--text-dim);
}
.lightbox__hint {
  flex-basis: 100%;
  text-align: center;
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
}
@media (max-width: 520px) {
  .lightbox__viewport { height: min(58vh, calc(100vh - 220px)); }
  .lightbox__hint { display: none; }
}
@keyframes lightbox-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes lightbox-zoom { from { opacity: 0; transform: scale(0.9); } to { opacity: 1; transform: none; } }

/* Project pagination + tags */
.tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 26px 0 0; }
.tags li {
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 5px 12px;
}
.pager {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  border-top: 1px solid var(--border);
  margin-top: 64px;
  padding-top: 28px;
}
.pager__link {
  display: block;
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 18px 20px;
  transition: border-color var(--duration) var(--easing), background var(--duration) var(--easing);
}
.pager__link:hover { border-color: var(--accent); background: var(--bg-card); }
.pager__link--next { text-align: right; }
.pager__dir {
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-dim);
  display: block;
  margin-bottom: 6px;
}
.pager__title { font-family: var(--font-display); font-size: 1.05rem; }

/* Index groups */
.group + .group { margin-top: 56px; }
.group__title {
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin: 0 0 20px;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-elevated);
  padding-block: 40px;
}
.site-footer__inner { display: flex; flex-wrap: wrap; gap: 20px; justify-content: space-between; align-items: center; }
.site-footer__links { display: flex; flex-wrap: wrap; gap: 14px; list-style: none; margin: 0; padding: 0; }
.site-footer__links a {
  font-size: var(--fs-small);
  color: var(--text-muted);
  text-decoration: none;
}
.site-footer__links a:hover { color: var(--accent); }
.site-footer__colophon {
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin: 0;
}

/* --------------------------------------------------------------------------
   Utility / diagnostics
   -------------------------------------------------------------------------- */
.prose { max-width: var(--measure); }
.prose h2 { font-family: var(--font-display); font-size: var(--fs-h2); margin: 32px 0 14px; }
.prose h3 { font-family: var(--font-display); font-size: var(--fs-h3); margin: 26px 0 12px; }
.prose p { color: var(--text-muted); }
.prose blockquote { border-left: 2px solid var(--accent); margin: 20px 0; padding-left: 20px; color: var(--text); }
.prose ul { padding-left: 20px; color: var(--text-muted); }
.prose a { color: var(--accent); }

.notice {
  border: 1px solid var(--border-strong);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-media);
  background: var(--bg-card);
  padding: 20px 22px;
  margin-bottom: 32px;
}
.notice__title {
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 10px;
}
.notice ul { margin: 0; padding-left: 18px; color: var(--text-muted); font-size: var(--fs-small); }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
  .about, .about__body { grid-template-columns: 1fr; }
  .about--with-portrait { gap: 28px; }
  .about__portrait { max-width: 240px; }
}
@media (max-width: 760px) {
  :root { --gap-section: 64px; }
  .card-grid--featured, .card-grid--index { grid-template-columns: 1fr 1fr; }
  .tldr__row, .kv__row { grid-template-columns: 1fr; gap: 6px; }
  .pager__link--next { text-align: left; }
}
@media (max-width: 520px) {
  .card-grid--featured, .card-grid--index { grid-template-columns: 1fr; }
  .site-nav__inner { min-height: 60px; }
  .site-nav__links a { padding: 6px 10px; }
}

/* --------------------------------------------------------------------------
   Motion preferences
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
  /* the pulse loops forever, so switch it off entirely here */
  .contact__status::before { animation: none; }
}

/* --------------------------------------------------------------------------
   theme.yaml -> custom_css (your escape hatch)
   -------------------------------------------------------------------------- */
/* Example:
.project-card__title { font-style: italic; }
.hero__title { background: linear-gradient(90deg, #ff4d2e, #ffb347);
               -webkit-background-clip: text; color: transparent; }
*/
