/* Ethan Walker — photographs & short films */

:root {
  --bg: #f4f2ee;
  --bg-2: #e8e5df;
  --surface: #fbfaf8;
  --fg: #1c1b19;
  --muted: #5c5851;
  --line: #d8d3c9;
  --accent: #8a3d20;
  --focus: #1f5fbf;
  --serif: "Iowan Old Style", "Charter", "Sitka Text", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --gutter: clamp(16px, 4vw, 64px);
  --wide: 1680px;
  --text: 40rem;
  --gap: clamp(6px, 0.8vw, 14px);
  --row: clamp(170px, 17vw, 360px);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121211;
    --bg-2: #1d1c1a;
    --surface: #191917;
    --fg: #ebe8e2;
    --muted: #a39e95;
    --line: #302f2b;
    --accent: #e39a70;
    --focus: #8ab4ff;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #121211;
  --bg-2: #1d1c1a;
  --surface: #191917;
  --fg: #ebe8e2;
  --muted: #a39e95;
  --line: #302f2b;
  --accent: #e39a70;
  --focus: #8ab4ff;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 1.0625rem/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}
img { max-width: 100%; height: auto; display: block; }
picture { display: block; background: var(--ph, var(--bg-2)); }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.12; letter-spacing: -0.01em; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--fg); color: var(--bg); padding: 0.6em 1em; z-index: 20; text-decoration: none;
}
.skip:focus { left: 16px; top: 16px; }

.wrap { max-width: var(--wide); margin: 0 auto; padding: 0 var(--gutter); }

/* header */
.site-header {
  display: flex; align-items: center; gap: 1.5rem;
  max-width: var(--wide); margin: 0 auto; padding: 1.4rem var(--gutter);
}
.brand { display: flex; align-items: center; gap: 0.75rem; text-decoration: none; margin-right: auto; }
.brand:hover { color: inherit; }
.brand svg { width: 36px; height: 36px; flex: none; }
.brand-name { font-family: var(--serif); font-size: 1.25rem; line-height: 1.1; display: block; }
.brand-sub { font-size: 0.78rem; color: var(--muted); display: block; letter-spacing: 0.02em; }
.nav ul { display: flex; gap: clamp(1rem, 2.4vw, 2.2rem); list-style: none; margin: 0; padding: 0; }
.nav a { text-decoration: none; font-size: 0.95rem; padding: 0.3rem 0; border-bottom: 1px solid transparent; }
.nav a[aria-current] { border-bottom-color: currentColor; }
.theme-toggle {
  flex: none; display: inline-grid; place-items: center;
  width: 2.3rem; height: 2.3rem; padding: 0;
  background: none; color: inherit; border: 1px solid var(--line); border-radius: 50%; cursor: pointer;
}
.theme-toggle[hidden] { display: none; }
.theme-toggle:hover { border-color: var(--fg); }
.theme-toggle svg { width: 1.05rem; height: 1.05rem; }

@media (max-width: 640px) {
  .site-header { flex-wrap: wrap; row-gap: 0.9rem; padding-top: 1rem; padding-bottom: 1rem; }
  .nav { order: 3; width: 100%; border-top: 1px solid var(--line); padding-top: 0.7rem; }
  .nav ul { justify-content: space-between; }
  .brand-sub { display: none; }
}

/* type helpers */
.eyebrow {
  font: 500 0.76rem/1.4 var(--mono); letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 1rem;
}
.eyebrow a { text-decoration: none; }
.eyebrow a:hover { text-decoration: underline; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); font-size: 0.82rem; }

/* home intro */
.intro {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(2rem, 6vw, 6rem); align-items: end;
  padding: clamp(2.5rem, 7vw, 6.5rem) 0 clamp(2.5rem, 6vw, 5rem);
}
.intro-figure { margin: 0; justify-self: end; width: 100%; max-width: 34rem; }
@media (max-width: 860px) { .intro { grid-template-columns: 1fr; } .intro-figure { justify-self: start; } }
.display { font-size: clamp(2.5rem, 6.6vw, 5.8rem); max-width: 14ch; margin: 0 0 1.5rem; }
.lede { font-size: clamp(1.06rem, 1.5vw, 1.3rem); line-height: 1.55; max-width: 36rem; color: var(--muted); margin: 0 0 2rem; }
.links { display: flex; flex-wrap: wrap; gap: 0.75rem 1.75rem; margin: 0; padding: 0; list-style: none; }
.links a { font-size: 1rem; }

.section { padding: clamp(2.5rem, 6vw, 5rem) 0; border-top: 1px solid var(--line); }
.section-head {
  display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap;
  gap: 0.5rem 1rem; margin-bottom: clamp(1.25rem, 3vw, 2.5rem);
}
.section-head h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); margin: 0; }
.more { font-size: 0.95rem; white-space: nowrap; }

/* justified mosaic: items grow in proportion to their aspect ratio */
.mosaic { display: flex; flex-wrap: wrap; gap: var(--gap); }
.mosaic::after { content: ""; flex: 999 1 0; }
.tile { margin: 0; min-width: 0; flex: var(--ar) 1 calc(var(--ar) * var(--row)); }
.tile a { display: block; text-decoration: none; }
.tile a:hover img { opacity: 0.9; }
.tile img { width: 100%; transition: opacity 0.3s; }
.tile figcaption {
  display: flex; justify-content: space-between; gap: 1rem;
  font: 0.74rem/1.4 var(--mono); color: var(--muted);
  padding: 0.5rem 0 0.4rem; white-space: nowrap;
}
.tile figcaption span { overflow: hidden; text-overflow: ellipsis; }
.tile figcaption .t { color: var(--fg); flex: none; }
@media (max-width: 640px) { .tile { flex-basis: 100%; } }

/* home: editorial grid, every row the same height */
.feature { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--gap); }
.feature .tile { grid-column: span var(--span); }
.feature img { width: 100%; height: clamp(220px, 34vw, 580px); object-fit: cover; }
@media (max-width: 760px) {
  .feature { grid-template-columns: 1fr; }
  .feature .tile { grid-column: auto; }
  .feature img { height: auto; }
}

/* films */
.films { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: clamp(1.25rem, 2.5vw, 2.5rem); }
.film-card a { display: block; text-decoration: none; }
.frame { position: relative; }
.play {
  position: absolute; left: 1rem; bottom: 1rem;
  width: 3.2rem; height: 3.2rem; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(14, 14, 13, 0.55); border: 1px solid rgba(255, 255, 255, 0.55);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  transition: transform 0.25s, background 0.25s;
}
.play::before {
  content: ""; margin-left: 4px;
  border-left: 14px solid #fff; border-top: 9px solid transparent; border-bottom: 9px solid transparent;
}
.film-card a:hover .play { transform: scale(1.08); background: rgba(14, 14, 13, 0.75); }
.duration {
  position: absolute; right: 1rem; bottom: 1.15rem;
  font: 0.72rem var(--mono); color: #fff; background: rgba(14, 14, 13, 0.55); padding: 0.15rem 0.45rem; border-radius: 3px;
}
.film-card h3 { font-size: 1.3rem; margin: 0.9rem 0 0.25rem; }
.film-card p { margin: 0; color: var(--muted); font-size: 0.92rem; }

/* post cards */
.posts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: clamp(1.75rem, 3vw, 3rem); }
.post-card { border-top: 1px solid var(--fg); padding-top: 1rem; }
.post-card h3 { font-size: 1.5rem; margin: 0.45rem 0 0.6rem; }
.post-card h3 a { text-decoration: none; }
.post-card p { color: var(--muted); margin: 0; }
.date { font: 0.78rem/1.4 var(--mono); color: var(--muted); letter-spacing: 0.02em; }

/* page header */
.page-head { padding: clamp(2.25rem, 7vw, 6rem) 0 clamp(1.5rem, 3.5vw, 3rem); }
.page-head h1 { font-size: clamp(2.6rem, 7vw, 6rem); margin: 0 0 1.1rem; }
.page-head .lede { margin-bottom: 0; }
.facts { display: flex; flex-wrap: wrap; gap: 0.5rem 2.25rem; margin: 0; font: 0.8rem/1.5 var(--mono); }
.facts div { display: flex; gap: 0.6rem; }
.facts dt { color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.facts dd { margin: 0; }

/* work index */
.series-list { display: grid; gap: clamp(3rem, 8vw, 7rem); padding-bottom: clamp(3rem, 6vw, 6rem); }
.series-card { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: clamp(1.25rem, 3.5vw, 3.5rem); align-items: end; }
.series-card:nth-child(even) { grid-template-columns: minmax(0, 1fr) minmax(0, 1.65fr); }
.series-card:nth-child(even) .series-media { order: 2; }
.series-media a { display: block; }
.series-media img { aspect-ratio: 3 / 2; object-fit: cover; width: 100%; }
.series-card h2 { font-size: clamp(2rem, 4.2vw, 3.6rem); margin: 0.2rem 0 0.9rem; }
.series-card h2 a { text-decoration: none; }
.series-card p { color: var(--muted); max-width: 30rem; }
.num { font: 0.78rem var(--mono); color: var(--muted); }
@media (max-width: 820px) {
  .series-card, .series-card:nth-child(even) { grid-template-columns: 1fr; }
  .series-card:nth-child(even) .series-media { order: 0; }
}

/* series page */
.series-intro { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: clamp(1.5rem, 5vw, 6rem); padding-bottom: clamp(2rem, 5vw, 4rem); }
.series-intro .prose p:first-child { font-family: var(--serif); font-size: clamp(1.25rem, 2vw, 1.5rem); line-height: 1.45; }
@media (max-width: 860px) { .series-intro { grid-template-columns: 1fr; } }
.prose { max-width: var(--text); }
.prose p { margin: 0 0 1.15em; }

.notes { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: clamp(1.5rem, 5vw, 6rem); }
.notes h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); margin: 0; }
.notes dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 0.75rem 2rem; margin: 0; }
.notes dt { font: 0.76rem/1.9 var(--mono); text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.notes dd { margin: 0; }
@media (max-width: 860px) { .notes { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .notes dl { grid-template-columns: 1fr; gap: 0.15rem; } .notes dd { margin-bottom: 0.9rem; } }

.related ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.75rem; }
.related a { font-family: var(--serif); font-size: 1.25rem; }

.pager { display: flex; justify-content: space-between; gap: 1.5rem; border-top: 1px solid var(--line); padding: 2rem 0 clamp(2.5rem, 5vw, 4rem); }
.pager a { text-decoration: none; max-width: 48%; }
.pager small { display: block; font: 0.74rem var(--mono); text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-bottom: 0.3rem; }
.pager span { font-family: var(--serif); font-size: clamp(1.15rem, 2vw, 1.5rem); line-height: 1.25; }
.pager .next { text-align: right; margin-left: auto; }

/* journal */
.journal-layout { display: grid; grid-template-columns: minmax(0, 1fr) 15rem; gap: clamp(2rem, 6vw, 6rem); padding-bottom: clamp(3rem, 6vw, 5rem); }
@media (max-width: 900px) { .journal-layout { grid-template-columns: 1fr; } }
.entry-row { display: grid; grid-template-columns: minmax(0, 15rem) minmax(0, 1fr); gap: clamp(1.25rem, 3vw, 2.5rem); padding: 2rem 0; border-top: 1px solid var(--line); }
.entry-row:first-child { border-top-color: var(--fg); }
.entry-row img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.entry-row h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin: 0.35rem 0 0.6rem; }
.entry-row h2 a { text-decoration: none; }
.entry-row p { margin: 0 0 0.8rem; color: var(--muted); max-width: 38rem; }
.entry-row .frame .play { width: 2.5rem; height: 2.5rem; left: 0.7rem; bottom: 0.7rem; }
.entry-row .frame .play::before { border-left-width: 11px; border-top-width: 7px; border-bottom-width: 7px; }
@media (max-width: 560px) { .entry-row { grid-template-columns: 1fr; } }

.aside h2 { font: 500 0.76rem/1.4 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin: 2rem 0 0.9rem; }
.aside h2:first-child { margin-top: 0; }
.aside ul { list-style: none; padding: 0; margin: 0; }
.aside li { padding: 0.3rem 0; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 1rem; }
.aside li a { text-decoration: none; }
.aside .count { font: 0.78rem var(--mono); color: var(--muted); }

.tags { list-style: none; display: flex; flex-wrap: wrap; gap: 0.45rem; padding: 0; margin: 0; }
.tags a {
  display: inline-block; font: 0.74rem/1.5 var(--mono); text-decoration: none;
  border: 1px solid var(--line); border-radius: 999px; padding: 0.15rem 0.65rem;
}
.tags a:hover { border-color: currentColor; }

.pagination { display: flex; align-items: center; gap: 0.5rem; border-top: 1px solid var(--line); padding-top: 1.5rem; font: 0.85rem var(--mono); }
.pagination a, .pagination span { padding: 0.35rem 0.75rem; border: 1px solid var(--line); border-radius: 3px; text-decoration: none; }
.pagination [aria-current] { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.pagination .sep { border: 0; color: var(--muted); }

.archive-year { display: grid; grid-template-columns: 8rem minmax(0, 1fr); gap: 1.5rem; border-top: 1px solid var(--line); padding: 1.5rem 0; }
.archive-year h2 { font-size: 2rem; margin: 0; }
.archive-year ul { list-style: none; padding: 0; margin: 0; }
.archive-year li { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: 1rem; padding: 0.4rem 0; }
.archive-year li a { font-family: var(--serif); font-size: 1.2rem; text-decoration: none; }
.archive-year li a:hover { text-decoration: underline; }
@media (max-width: 600px) { .archive-year, .archive-year li { grid-template-columns: 1fr; gap: 0.2rem; } }

/* article */
.article {
  display: grid;
  grid-template-columns:
    [full-start] minmax(var(--gutter), 1fr)
    [wide-start] minmax(0, 9rem)
    [text-start] min(var(--text), 100% - 2 * var(--gutter)) [text-end]
    minmax(0, 9rem) [wide-end]
    minmax(var(--gutter), 1fr) [full-end];
}
.article > * { grid-column: text; }
.article > .wide { grid-column: wide; }
.article-head { padding: clamp(2.25rem, 6vw, 5rem) 0 clamp(1.5rem, 3vw, 2.5rem); }
.article-head h1 { font-size: clamp(2.2rem, 5.6vw, 4.2rem); margin: 0 0 1.1rem; }
.byline { font: 0.8rem/1.6 var(--mono); color: var(--muted); margin: 0 0 1rem; }
.byline .upd { color: var(--accent); }
.lead-figure { margin: 0 0 clamp(2rem, 5vw, 3.5rem); }
.article-body { font-size: 1.125rem; line-height: 1.72; }
.article-body > p:first-child { font-family: var(--serif); font-size: 1.32rem; line-height: 1.5; }
.article-body h2 { font-size: clamp(1.5rem, 2.6vw, 1.85rem); margin: 2.1em 0 0.6em; }
.article-body p, .article-body ul { margin: 0 0 1.15em; }
.article-body li { margin-bottom: 0.35em; }
.article-body blockquote {
  margin: 2em 0; padding: 0.1em 0 0.1em 1.4rem; border-left: 2px solid var(--accent);
  font-family: var(--serif); font-size: clamp(1.3rem, 2.4vw, 1.6rem); line-height: 1.35;
}
.article-body blockquote p { margin: 0; }
.article-body figure { margin: 2.6rem 0; }
.caption { font-size: 0.86rem; line-height: 1.5; color: var(--muted); margin-top: 0.7rem; }
.caption .mono { font-size: 0.74rem; margin-left: 0.6em; white-space: nowrap; }
.article-foot { padding: 2rem 0 0; display: grid; gap: 1.25rem; }
.article > .pager { grid-column: wide; margin-top: 2.5rem; }

/* about */
.about-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(2rem, 6vw, 6rem); padding-bottom: clamp(2.5rem, 6vw, 5rem); align-items: start; }
.about-grid .prose p:first-child { font-family: var(--serif); font-size: clamp(1.25rem, 2vw, 1.5rem); line-height: 1.45; }
@media (max-width: 860px) { .about-grid { grid-template-columns: 1fr; } }
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: clamp(1.5rem, 5vw, 6rem); }
.two-col > h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); margin: 0; }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; } }
.timeline { list-style: none; padding: 0; margin: 0; border-left: 1px solid var(--line); }
.timeline li { display: grid; grid-template-columns: 4rem minmax(0, 1fr); gap: 1rem; padding: 0.55rem 0 0.55rem 1.4rem; position: relative; }
.timeline li::before { content: ""; position: absolute; left: -4px; top: 1.05rem; width: 7px; height: 7px; border-radius: 50%; background: var(--bg); border: 1px solid var(--fg); }
.timeline time { font: 0.85rem/1.9 var(--mono); color: var(--muted); }

/* contact */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: clamp(2rem, 6vw, 6rem); padding-bottom: clamp(3rem, 6vw, 6rem); align-items: start; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }
dialog.form-wrap {
  position: static; display: block; width: 100%; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0; background: none; color: inherit;
}
dialog.form-wrap:not([open]) { display: none; }
.field { display: grid; gap: 0.4rem; margin-bottom: 1.15rem; }
.field label { font: 0.76rem var(--mono); text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
input, select, textarea {
  font: inherit; color: inherit; width: 100%;
  background: var(--surface); border: 1px solid var(--line); border-radius: 4px; padding: 0.7rem 0.8rem;
}
input:hover, select:hover, textarea:hover { border-color: var(--muted); }
textarea { resize: vertical; min-height: 9rem; }
.btn {
  font: 500 1rem var(--sans); cursor: pointer;
  background: var(--fg); color: var(--bg); border: 1px solid var(--fg); border-radius: 999px; padding: 0.8rem 1.7rem;
}
.btn:hover { background: var(--accent); border-color: var(--accent); }
.form-note { font-size: 0.86rem; color: var(--muted); margin-top: 1rem; }
.form-thanks { display: none; font-family: var(--serif); font-size: clamp(1.4rem, 2.6vw, 1.9rem); line-height: 1.35; border-top: 1px solid var(--fg); padding-top: 1.25rem; margin: 0; }
dialog.form-wrap:not([open]) + .form-thanks { display: block; }

/* 404 */
.notfound { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; padding: clamp(2rem, 6vw, 6rem) 0; }
.notfound h1 { font-size: clamp(2.6rem, 7vw, 5.5rem); margin: 0 0 1rem; }
@media (max-width: 760px) { .notfound { grid-template-columns: 1fr; } }

/* footer */
.site-footer { border-top: 1px solid var(--line); margin-top: clamp(2rem, 5vw, 4rem); }
.site-footer .wrap { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 2rem; padding-top: 2.5rem; padding-bottom: 2.5rem; }
.site-footer p { margin: 0; color: var(--muted); font-size: 0.92rem; max-width: 30rem; }
.site-footer nav ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.5rem 1.4rem; justify-content: flex-end; }
.site-footer nav a { font-size: 0.92rem; text-decoration: none; }
.site-footer nav a:hover { text-decoration: underline; }
.site-footer .legal { grid-column: 1 / -1; font: 0.76rem/1.6 var(--mono); border-top: 1px solid var(--line); padding-top: 1.25rem; max-width: none; }
@media (max-width: 700px) {
  .site-footer .wrap { grid-template-columns: 1fr; }
  .site-footer nav ul { justify-content: flex-start; }
}

/* lightbox (enhancement only) */
.lightbox {
  position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0; background: #0d0d0c; color: #ece9e3;
}
.lightbox::backdrop { background: #0d0d0c; }
.lightbox figure { margin: 0; height: 100%; display: grid; grid-template-rows: minmax(0, 1fr) auto; padding: 3.75rem clamp(0.75rem, 6vw, 5rem) 1.25rem; }
.lightbox picture { background: none; display: grid; place-items: center; min-height: 0; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 8rem); max-height: calc(100dvh - 8rem); width: auto; height: auto; object-fit: contain; }
.lightbox figcaption { text-align: center; font: 0.78rem/1.5 var(--mono); color: #b5b0a7; padding-top: 0.9rem; }
.lightbox button {
  position: absolute; background: rgba(255, 255, 255, 0.06); color: #ece9e3; border: 1px solid rgba(255, 255, 255, 0.2);
  width: 2.75rem; height: 2.75rem; border-radius: 50%; cursor: pointer; display: grid; place-items: center; font: 1.2rem/1 var(--sans);
}
.lightbox button:hover { background: rgba(255, 255, 255, 0.16); }
.lightbox .lb-close { top: 0.75rem; right: 0.75rem; }
.lightbox .lb-prev { left: 0.75rem; top: 50%; transform: translateY(-50%); }
.lightbox .lb-next { right: 0.75rem; top: 50%; transform: translateY(-50%); }
.lightbox .lb-count { position: absolute; top: 1.4rem; left: 1rem; font: 0.76rem var(--mono); color: #b5b0a7; }
@media (max-width: 640px) {
  .lightbox .lb-prev, .lightbox .lb-next { top: auto; bottom: 0.75rem; transform: none; }
  .lightbox figure { padding-bottom: 4.5rem; }
}

/* lazy images fade in once loaded (only when the script is running) */
.js img[loading="lazy"] { opacity: 0; transition: opacity 0.5s ease; }
.js img[loading="lazy"].is-loaded { opacity: 1; }

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