/* jameslamken.info — one stylesheet, no framework.
   Archivo by Omnibus-Type, SIL Open Font License 1.1 (see fonts/OFL.txt). */

@font-face {
  font-family: "Archivo";
  src: url("/assets/fonts/archivo.woff2") format("woff2");
  font-weight: 400 800;
  font-stretch: 75% 100%;
  font-style: normal;
  font-display: swap;
}

/* ---------------------------------------------------------------- tokens */

:root {
  --bg: #f4f2ed;
  --bg-2: #ebe8e1;
  --ink: #171614;
  --ink-2: #47443e;
  --ink-3: #6a665e;
  --line: #d9d5cb;
  --accent: #c2410c;
  --accent-ink: #ffffff;
  --media-bg: #e3dfd6;
  --shadow: 0 1px 2px rgb(23 22 20 / 0.06), 0 8px 24px -12px rgb(23 22 20 / 0.18);

  --sans: "Archivo", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", "Roboto Mono", Menlo, Consolas, monospace;

  --max: 1240px;
  --wide: 1240px;
  --medium: 960px;
  --text: 680px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 4px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #131210;
    --bg-2: #1b1a17;
    --ink: #eeebe4;
    --ink-2: #bcb7ac;
    --ink-3: #8f8a80;
    --line: #2f2d29;
    --accent: #ff8a4c;
    --accent-ink: #1a0c04;
    --media-bg: #22211e;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 8px 24px -12px rgb(0 0 0 / 0.6);
    color-scheme: dark;
  }
}

/* ---------------------------------------------------------------- base */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
}

body {
  margin: 0;
  overflow-x: clip;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; }

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

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { color: var(--accent); }

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

h1, h2, h3 {
  margin: 0;
  font-weight: 720;
  font-stretch: 78%;
  line-height: 1;
  letter-spacing: -0.005em;
  text-wrap: balance;
}

p { margin: 0; text-wrap: pretty; }

[role="list"] { list-style: none; margin: 0; padding: 0; }

::selection { background: var(--accent); color: var(--accent-ink); }

.wrap {
  width: min(var(--max), 100% - 2 * var(--gutter));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 10;
  padding: 10px 14px;
  background: var(--ink);
  color: var(--bg);
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { top: 12px; color: var(--bg); }

.eyebrow,
.section-label,
.crumbs,
figcaption,
.tags li,
.more,
.facts dt {
  font-family: var(--mono);
  font-size: 0.75rem;
  line-height: 1.5;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.eyebrow { color: var(--ink-3); }

.more {
  display: inline-flex;
  gap: 0.6em;
  align-items: center;
  color: var(--accent);
  font-weight: 600;
}
.more span { transition: transform 0.3s var(--ease); }
a:hover .more span { transform: translateX(4px); }

.button {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  padding: 0.85em 1.3em;
  background: var(--ink);
  color: var(--bg);
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: background-color 0.2s, color 0.2s;
}
.button:hover { background: var(--accent); color: var(--accent-ink); }

.text-link { font-weight: 600; font-size: 0.95rem; }

/* ---------------------------------------------------------------- header & footer */

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 64px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 760;
  font-stretch: 78%;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
}
.brand:hover { color: inherit; }
.brand-mark {
  width: 12px;
  height: 12px;
  background: var(--accent);
  border-radius: 2px;
  transition: transform 0.4s var(--ease);
}
.brand:hover .brand-mark { transform: rotate(45deg); }

.site-header ul { display: flex; gap: clamp(14px, 3vw, 32px); }
.site-header nav a {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  padding-block: 8px;
}
.site-header nav a[aria-current] { color: var(--accent); }

@media (max-width: 380px) {
  .nav-about { display: none; }
}

.site-footer { margin-top: auto; }
.site-footer .wrap {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 24px;
  align-items: baseline;
  padding-block: 40px 48px;
  border-top: 1px solid var(--line);
}
.footer-name {
  font-weight: 760;
  font-stretch: 78%;
  font-size: 1.15rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: flex-end; }
.footer-links a { font-size: 0.95rem; }
.footer-note { grid-column: 1 / -1; color: var(--ink-3); font-size: 0.875rem; }

@media (max-width: 560px) {
  .site-footer .wrap { grid-template-columns: 1fr; }
  .footer-links { justify-content: flex-start; }
}

/* ---------------------------------------------------------------- home: hero */

.hero { padding-top: clamp(32px, 6vw, 80px); }
.hero-text { container-type: inline-size; }

/* The name is sized to the container so it always fills the measure exactly:
   two stacked lines on phones, one line from 640px up. */
.hero h1 {
  margin-top: 16px;
  font-size: clamp(4rem, 24vw, 9rem);
  font-size: 28cqi;
  font-weight: 800;
  font-stretch: 75%;
  line-height: 0.84;
  letter-spacing: -0.015em;
  text-transform: uppercase;
}
.hero h1 span { display: block; }
@container (min-width: 640px) {
  .hero h1 { font-size: 15.2cqi; white-space: nowrap; }
  .hero h1 span { display: inline; }
}

.hero-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px 48px;
  margin-top: clamp(28px, 4vw, 48px);
}

.hero-lead {
  max-width: 34ch;
  font-size: clamp(1.2rem, 0.95rem + 1vw, 1.65rem);
  line-height: 1.35;
  color: var(--ink-2);
}

.hero-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }

/* featured banner: the old site's cover photo, edge to edge */
.feature {
  display: block;
  margin-top: clamp(36px, 5vw, 64px);
  text-decoration: none;
  color: inherit;
}
.feature:hover { color: inherit; }
.feature-media { display: block; overflow: hidden; background: var(--media-bg); }
.feature-img {
  width: 100%;
  aspect-ratio: 21 / 9;
  max-height: 82vh;
  object-fit: cover;
  object-position: 50% 50%;
  transition: transform 1.2s var(--ease);
}
.feature:hover .feature-img { transform: scale(1.015); }
.feature-caption {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 24px;
  padding-top: 14px;
}
.feature-label {
  font-weight: 720;
  font-stretch: 78%;
  font-size: 1.35rem;
  line-height: 1.2;
  transition: color 0.2s;
}
.feature-label span {
  margin-right: 0.9em;
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 600;
  font-stretch: 100%;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  vertical-align: 0.2em;
}
.feature:hover .feature-label { color: var(--accent); }
.feature-text { flex: 1 1 28ch; color: var(--ink-2); font-size: 0.975rem; }
.feature .more { margin-left: auto; }

@media (max-width: 640px) {
  .feature-img { aspect-ratio: 4 / 3; }
  .feature .more { margin-left: 0; }
}

/* portraits at the end of the About section */
.portraits {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(6px, 1vw, 12px);
  margin-top: clamp(40px, 6vw, 72px);
}
.portraits img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--media-bg);
}
.portraits img:nth-child(even) { margin-top: clamp(16px, 4vw, 48px); }

@media (max-width: 719px) {
  .portraits { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------------------------------------------------------------- home: sections */

.section { padding-block: clamp(48px, 7vw, 96px); }
.section > .wrap:first-child { border-top: 1px solid var(--line); padding-top: 24px; }

.section-grid {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 9fr);
  gap: 16px clamp(24px, 4vw, 56px);
}

.section-label { color: var(--ink-3); padding-top: 0.4em; }
.section-label span { color: var(--accent); margin-right: 1.2em; }

.section h2 { font-size: clamp(2.25rem, 1.4rem + 3.4vw, 4.25rem); }

.section-intro {
  margin-top: 20px;
  max-width: 62ch;
  font-size: clamp(1.05rem, 0.98rem + 0.3vw, 1.2rem);
  color: var(--ink-2);
}

@media (max-width: 760px) {
  .section-grid { grid-template-columns: 1fr; }
}

.skills {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-top: clamp(32px, 5vw, 56px);
}
.skills > li { border-top: 2px solid var(--ink); padding-top: 16px; }
.skills h3 { font-size: 1.5rem; }
.skills ul { margin-top: 12px; display: grid; gap: 6px; color: var(--ink-2); }
.skills ul li { position: relative; padding-left: 18px; }
.skills ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 7px;
  height: 7px;
  background: var(--accent);
  border-radius: 1px;
}

@media (max-width: 760px) {
  .skills { grid-template-columns: 1fr; }
}

/* project list */

.projects { margin-top: clamp(32px, 5vw, 56px); counter-reset: project; }

.project + .project { border-top: 1px solid var(--line); }
.project > a {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 20px clamp(24px, 4vw, 56px);
  padding-block: clamp(24px, 3.5vw, 40px);
  text-decoration: none;
  color: inherit;
}

.project-media {
  aspect-ratio: 3 / 2;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--media-bg);
}
.project-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease);
}
.project > a:hover .project-media img { transform: scale(1.035); }

.project-body { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; padding-top: 4px; }
.project-meta { font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); }
.project-meta .num { color: var(--accent); margin-right: 1.2em; }
.project h3 {
  font-size: clamp(2rem, 1.3rem + 2.6vw, 3.5rem);
  transition: color 0.2s;
}
.project > a:hover h3 { color: var(--accent); }
.project-summary { color: var(--ink-2); max-width: 44ch; }
.project .more { margin-top: auto; padding-top: 8px; }

.tags { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; }
.tags li {
  font-size: 0.6875rem;
  padding: 3px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-2);
}

@media (max-width: 760px) {
  .project > a { grid-template-columns: 1fr; }
}

/* volunteer cards */

.orgs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(12px, 2vw, 24px);
  margin-top: clamp(32px, 5vw, 56px);
}
.org > a {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  height: 100%;
  padding: clamp(20px, 2.5vw, 28px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-2);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s, transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.org > a:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow); }
.org-logo { width: 56px; height: 56px; object-fit: contain; border-radius: 6px; margin-bottom: 8px; }
.org h3 { font-size: 1.6rem; }
.org-role { font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--accent); }
.org-summary { color: var(--ink-2); font-size: 0.975rem; }
.org .more { margin-top: auto; padding-top: 8px; }

@media (max-width: 900px) {
  .orgs { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------------- inner pages */

.page-head { padding-block: clamp(32px, 6vw, 80px) clamp(28px, 3.5vw, 48px); }

.crumbs { display: flex; flex-wrap: wrap; gap: 0.75em; }
.crumbs a { color: var(--accent); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }

.page-title { display: flex; align-items: center; gap: clamp(16px, 2.5vw, 28px); margin-top: 20px; }
.page-title h1 {
  font-size: clamp(2.75rem, 1rem + 6.5vw, 6.75rem);
  font-weight: 780;
  font-stretch: 75%;
  line-height: 0.9;
  letter-spacing: -0.01em;
  max-width: 15ch;
}
.head-logo {
  flex: none;
  width: clamp(56px, 8vw, 96px);
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
  border-radius: 8px;
}

.page-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 32px clamp(32px, 5vw, 72px);
  margin-top: clamp(28px, 4vw, 48px);
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.page-intro.has-facts { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }

.lead {
  font-size: clamp(1.15rem, 1rem + 0.6vw, 1.45rem);
  line-height: 1.5;
  color: var(--ink-2);
  max-width: 46ch;
}

.facts { margin: 0; border-top: 2px solid var(--ink); }
.facts div {
  display: grid;
  grid-template-columns: 8.5rem minmax(0, 1fr);
  gap: 12px;
  padding-block: 11px;
  border-bottom: 1px solid var(--line);
}
.facts dt { color: var(--ink-3); padding-top: 0.15em; }
.facts dd { margin: 0; font-size: 0.95rem; line-height: 1.45; }
.facts dd a { color: var(--accent); }

@media (max-width: 860px) {
  .page-intro.has-facts { grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
  .facts div { grid-template-columns: 1fr; gap: 2px; }
}

/* prose: text column with figures breaking out to --wide */

.prose {
  --side: max(var(--gutter), (100% - var(--wide)) / 2);
  display: grid;
  --inset: calc((var(--medium) - var(--text)) / 2);
  grid-template-columns:
    [full-start] var(--side)
    [wide-start] minmax(0, 1fr)
    [medium-start] minmax(0, var(--inset))
    [text-start] min(var(--text), 100% - 2 * var(--side))
    [text-end] minmax(0, var(--inset))
    [medium-end] minmax(0, 1fr)
    [wide-end] var(--side) [full-end];
  row-gap: 1.3em;
  padding-bottom: clamp(64px, 9vw, 120px);
  font-size: 1.125rem;
  line-height: 1.7;
}
.prose > * { grid-column: text; margin: 0; }
.prose > .fig, .prose > .gallery { grid-column: medium; margin-block: 1.4em; }
.prose > .gallery, .prose > .fig.wide { grid-column: wide; }
.prose > .fig-diagram { grid-column: text; }
.prose > :first-child { margin-top: 0; }
/* Opening photo spans the full measure, cropped to a banner; the lightbox shows it whole. */
.fig.hero img { aspect-ratio: 16 / 9; object-fit: cover; }

.prose h2 {
  font-size: clamp(1.75rem, 1.35rem + 1.5vw, 2.5rem);
  margin-top: 1.4em;
}
.prose a { color: var(--accent); }
.prose a:hover { color: var(--ink); }
.prose ul { padding-left: 1.25em; display: grid; gap: 0.45em; }
.prose li { padding-left: 0.3em; }
.prose li::marker { color: var(--accent); }
.prose strong { font-weight: 650; }

.prose blockquote {
  margin-block: 0.8em;
  padding-left: 24px;
  border-left: 3px solid var(--accent);
  font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.25rem);
  font-weight: 700;
  font-stretch: 80%;
  line-height: 1.15;
}

.note {
  padding: 16px 20px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: var(--bg-2);
  font-size: 0.975rem;
  color: var(--ink-2);
}
.signature { font-family: var(--mono); font-size: 0.875rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); }
.signature::before { content: "— "; }

/* figures */

.fig { margin: 0; min-width: 0; }
.fig-media {
  display: block;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--media-bg);
}
.fig-media img, .fig-media video { width: 100%; }
a.fig-media { cursor: zoom-in; }
a.fig-media img { transition: transform 0.6s var(--ease), opacity 0.2s; }
a.fig-media:hover img { transform: scale(1.015); }

figcaption {
  display: flex;
  gap: 1em;
  margin-top: 10px;
  color: var(--ink-3);
  text-transform: none;
  letter-spacing: 0.01em;
  line-height: 1.45;
}
.fig-no { flex: none; color: var(--accent); text-transform: uppercase; letter-spacing: 0.06em; }

.gallery { display: flex; gap: clamp(8px, 1.2vw, 14px); align-items: flex-start; }
@media (max-width: 639px) {
  .gallery { flex-direction: column; align-items: stretch; }
  .gallery > .fig { flex: none !important; }
}

.fig-diagram .fig-media { background: #fff; padding: clamp(8px, 2vw, 20px); }
.fig-chart .fig-media { background: #fff; }
@media (max-width: 760px) {
  .fig-chart .fig-media { overflow-x: auto; }
  .fig-chart .fig-media img { width: 760px; max-width: none; }
}

/* looping clips */

.fig-video video { aspect-ratio: auto; }
.vid-toggle {
  position: absolute;
  right: 10px;
  bottom: 10px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgb(0 0 0 / 0.55);
  color: #fff;
  cursor: pointer;
  opacity: 0.85;
  transition: opacity 0.2s, background-color 0.2s;
}
.vid-toggle:hover, .vid-toggle:focus-visible { opacity: 1; background: rgb(0 0 0 / 0.75); }
.vid-toggle svg { width: 14px; height: 14px; fill: currentColor; }
.vid-toggle .i-play { display: none; }
.vid-toggle[aria-pressed="false"] .i-play { display: block; }
.vid-toggle[aria-pressed="false"] .i-pause { display: none; }

/* YouTube facade: nothing loads from YouTube until it's clicked */

.yt {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius);
  background: #000;
  color: #fff;
  text-decoration: none;
}
.yt img { width: 100%; height: 100%; object-fit: cover; opacity: 0.72; transition: opacity 0.3s, transform 0.6s var(--ease); }
.yt::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgb(0 0 0 / 0.75), transparent 55%); }
.yt:hover { color: #fff; }
.yt:hover img { opacity: 0.85; transform: scale(1.02); }
.yt-badge {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 1;
  display: grid;
  place-items: center;
  width: clamp(56px, 8vw, 80px);
  aspect-ratio: 1;
  translate: -50% -50%;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  transition: transform 0.3s var(--ease);
}
.yt:hover .yt-badge { transform: scale(1.08); }
.yt-badge svg { width: 40%; fill: currentColor; margin-left: 6%; }
.yt-title {
  position: absolute;
  left: clamp(14px, 2.5vw, 28px);
  right: clamp(14px, 2.5vw, 28px);
  bottom: clamp(12px, 2.2vw, 24px);
  z-index: 1;
  display: grid;
  gap: 4px;
  font-weight: 650;
  font-size: clamp(1rem, 0.9rem + 0.5vw, 1.3rem);
  line-height: 1.25;
}
.yt-title .eyebrow { color: rgb(255 255 255 / 0.75); }
.yt-player {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius);
  background: #000;
}
.yt-player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* next-page band */

.next > a {
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px clamp(24px, 5vw, 64px);
  align-items: center;
  padding-block: clamp(40px, 6vw, 72px);
  text-decoration: none;
  color: inherit;
}
.next-text { display: grid; gap: 14px; justify-items: start; }
.next-title {
  font-size: clamp(2.5rem, 1.2rem + 5vw, 5.5rem);
  font-weight: 780;
  font-stretch: 75%;
  line-height: 0.9;
  transition: color 0.2s;
}
.next > a:hover .next-title { color: var(--accent); }
.next-media { display: block; aspect-ratio: 3 / 2; overflow: hidden; border-radius: var(--radius); background: var(--media-bg); }
.next-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.7s var(--ease); }
.next > a:hover .next-media img { transform: scale(1.035); }

@media (max-width: 760px) {
  .next > a { grid-template-columns: 1fr; }
  .next-media { order: -1; }
}

/* ---------------------------------------------------------------- lightbox */

.lightbox {
  width: 100vw;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: #0b0b0a;
  color: #f2efe8;
  overscroll-behavior: contain;
}
.lightbox::backdrop { background: #0b0b0a; }
.lightbox[open] { display: grid; grid-template-rows: 1fr auto; }
.lb-stage { position: relative; display: grid; place-items: center; min-height: 0; padding: 56px clamp(8px, 6vw, 88px) 8px; }
.lb-stage img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; border-radius: 2px; }
.lb-bar {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 12px clamp(16px, 4vw, 32px) max(16px, env(safe-area-inset-bottom));
  font-family: var(--mono);
  font-size: 0.8rem;
  line-height: 1.5;
}
.lb-count { flex: none; color: #a8a398; }
.lightbox button {
  position: absolute;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgb(255 255 255 / 0.1);
  color: #fff;
  cursor: pointer;
  transition: background-color 0.2s;
}
.lightbox button:hover { background: rgb(255 255 255 / 0.22); }
.lightbox button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.lb-close { top: 8px; right: 8px; }
.lb-prev, .lb-next { top: 50%; translate: 0 -50%; }
.lb-prev { left: 8px; }
.lb-next { right: 8px; }
@media (max-width: 640px) {
  .lb-prev, .lb-next { top: auto; bottom: max(8px, env(safe-area-inset-bottom)); translate: none; }
  .lb-bar { flex-direction: column; align-items: center; gap: 2px; padding-inline: 64px; text-align: center; min-height: 64px; }
}

/* ---------------------------------------------------------------- motion & print */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

@media print {
  .site-header nav, .next, .vid-toggle, .skip-link, .fig-yt { display: none !important; }
  body { background: #fff; color: #000; }
  .prose a::after { content: " (" attr(href) ")"; font-size: 0.8em; }
}
