/* Alex Zhang Photography
   One serif family (Newsreader) for everything; a basalt-slate ground so the photographs
   carry all of the colour. Captions follow museum wall-label conventions. */

/* ------------------------------------------------------------------ fonts */
@font-face {
  font-family: "Newsreader";
  src: url("../fonts/newsreader-roman-latin.woff2") format("woff2");
  font-weight: 200 800; font-style: normal; font-display: swap;
  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: "Newsreader";
  src: url("../fonts/newsreader-roman-latin-ext.woff2") format("woff2");
  font-weight: 200 800; font-style: normal; font-display: swap;
  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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Newsreader";
  src: url("../fonts/newsreader-italic-latin.woff2") format("woff2");
  font-weight: 200 800; font-style: italic; font-display: swap;
  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: "Newsreader";
  src: url("../fonts/newsreader-italic-latin-ext.woff2") format("woff2");
  font-weight: 200 800; font-style: italic; font-display: swap;
  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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Noto Serif SC";
  src: url("../fonts/noto-serif-sc-subset.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
  unicode-range: U+4E00-9FFF;
}

/* ------------------------------------------------------------------ tokens */
:root {
  --basalt: #171a1f;      /* page ground: Icelandic basalt, blue-hour slate */
  --night: #0e1013;       /* viewer ground */
  --fog: #e7e5e0;         /* primary text */
  --fog-soft: #d3d1cc;    /* long-form text inside the viewer */
  --ash: #9a9da1;         /* secondary text, 6.4:1 on basalt */
  --rule: #2c3038;        /* hairlines */
  --glacier: #a9c7d6;     /* focus ring */

  --serif: "Newsreader", "Noto Serif SC", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;

  --max: 1360px;
  --pad: clamp(20px, 5vw, 72px);
  --gap: clamp(14px, 1.8vw, 28px);
  --plate-h: 80vh;
  --bleed-h: 90vh;
  --pair-h: 76vh;
  --ease: cubic-bezier(.22, .65, .2, 1);
}
@supports (height: 1svh) {
  :root { --plate-h: 80svh; --bleed-h: 90svh; --pair-h: 76svh; }
}

/* ------------------------------------------------------------------ base */
*, *::before, *::after { box-sizing: border-box; }
html {
  background: var(--basalt);
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scrollbar-gutter: stable;
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
body {
  margin: 0;
  background: var(--basalt);
  color: var(--fog);
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.6;
  font-weight: 400;
  font-optical-sizing: auto;
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
p, h1, h2, h3, figure, dl, dd { margin: 0; }
h1, h2, h3 { font-weight: 300; line-height: 1.05; }
cite { font-style: italic; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .24em; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--glacier); outline-offset: 3px; }
::selection { background: rgba(169, 199, 214, .32); color: #fff; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 12px; top: 12px; z-index: 100;
  padding: 10px 16px; background: var(--fog); color: var(--basalt); text-decoration: none;
  transform: translateY(-180%); transition: transform .2s var(--ease);
}
.skip-link:focus { transform: none; }

.zh {
  font-family: "Noto Serif SC", "Songti SC", "SimSun", serif;
  font-size: .94em;
  letter-spacing: .06em;
  margin-left: .2em;
}

/* Photographs: no selection, no drag, no long-press menu. The transparent ::after layer
   sits over every image so "Save image as" is never offered on it. */
.protect, .protect * {
  -webkit-user-select: none; user-select: none;
  -webkit-touch-callout: none;
}
.protect img { -webkit-user-drag: none; pointer-events: none; }

/* Images fade up from their average colour once decoded. */
.js img.fade { opacity: 0; transition: opacity .7s var(--ease); }
.js img.fade.is-loaded { opacity: 1; }
.js img.fade:not(.is-loaded) { animation: failsafe-show 0s 6s forwards; }
@keyframes failsafe-show { to { opacity: 1; } }

/* ------------------------------------------------------------------ header */
.site-header {
  position: relative; z-index: 30;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: clamp(14px, 2vw, 26px) var(--pad);
}
.site-header--overlay { position: absolute; top: 0; left: 0; right: 0; color: #fff; }
.wordmark {
  font-size: 1.1875rem; font-weight: 430; letter-spacing: .005em;
  color: inherit; text-decoration: none; padding-block: 8px;
}
.site-nav ul { display: flex; gap: clamp(20px, 2.8vw, 40px); margin: 0; padding: 0; list-style: none; }
.site-nav a {
  display: inline-block; padding-block: 8px;
  font-size: 1.0625rem; color: var(--ash); text-decoration: none;
  transition: color .2s;
}
.site-nav a:hover { color: var(--fog); }
.site-nav a[aria-current="page"] {
  color: var(--fog);
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .4em;
}
.site-header--overlay .site-nav a { color: rgba(255, 255, 255, .8); text-shadow: 0 1px 12px rgba(0, 0, 0, .35); }
.site-header--overlay .site-nav a:hover,
.site-header--overlay .site-nav a[aria-current="page"] { color: #fff; }
.site-header--overlay .wordmark { text-shadow: 0 1px 12px rgba(0, 0, 0, .35); }

/* ------------------------------------------------------------------ home: hero */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: flex-end;
  background: var(--night); color: #fff;
}
.hero__media { position: absolute; inset: 0; z-index: -2; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 58%; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(to top, rgba(9, 10, 13, .78) 0%, rgba(9, 10, 13, .34) 30%, rgba(9, 10, 13, 0) 56%),
    linear-gradient(to bottom, rgba(9, 10, 13, .45) 0%, rgba(9, 10, 13, 0) 18%);
}
.hero__text {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 32px;
  padding: 0 var(--pad) clamp(28px, 4.6vw, 60px);
}
.hero__name {
  font-size: clamp(4rem, 12.6vw, 13.75rem);
  font-weight: 270;
  line-height: .84;
  letter-spacing: -.035em;
  margin-left: -.045em;
}
.hero__line {
  margin-top: clamp(16px, 1.8vw, 26px);
  max-width: 52ch;
  font-size: clamp(1.0625rem, 1.45vw, 1.375rem);
  line-height: 1.4;
  color: rgba(255, 255, 255, .88);
}
.hero__label {
  flex: none; text-align: right;
  font-size: .9375rem; line-height: 1.45;
  color: rgba(255, 255, 255, .74);
}
.hero__label cite { color: #fff; }
.when-portrait { display: none; }
@media (max-aspect-ratio: 4/5) {
  .hero__media img { object-position: 50% 42%; }
  .when-landscape { display: none; }
  .when-portrait { display: inline; }
}
@media (max-width: 700px) {
  .hero__text { flex-direction: column; align-items: flex-start; gap: 22px; }
  .hero__label { text-align: left; }
}

/* The one orchestrated moment: the cover photograph develops out of the dark. */
@media (prefers-reduced-motion: no-preference) {
  .js .hero__media img.fade {
    opacity: 0; transform: scale(1.035); filter: brightness(.5) saturate(.75);
    transition: opacity 1.6s var(--ease), transform 3.4s var(--ease), filter 2.8s var(--ease);
  }
  .js .hero__media img.fade.is-loaded { opacity: 1; transform: none; filter: none; }
  .js .hero__text { opacity: 0; transform: translateY(10px); transition: opacity 1.2s var(--ease) .8s, transform 1.2s var(--ease) .8s; }
  .js .hero.is-ready .hero__text { opacity: 1; transform: none; }
  .js .hero:not(.is-ready) .hero__text { animation: failsafe-show 0s 3s forwards; }
}

/* ------------------------------------------------------------------ home: statement + chapters */
.statement {
  max-width: calc(var(--max) + 2 * var(--pad));
  margin: 0 auto;
  padding: clamp(104px, 15vw, 224px) var(--pad) clamp(24px, 4vw, 64px);
}
.statement p {
  max-width: 27ch;
  margin-left: clamp(0px, 8.33%, 120px);
  font-size: clamp(1.75rem, 3.5vw, 3.25rem);
  line-height: 1.2;
  font-weight: 300;
  letter-spacing: -.012em;
  text-wrap: balance;
}

.collections {
  max-width: calc(var(--max) + 2 * var(--pad));
  margin: 0 auto;
  padding: clamp(80px, 10vw, 150px) var(--pad) clamp(120px, 14vw, 220px);
}
.collections__title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.collections__list { display: grid; row-gap: clamp(88px, 11vw, 168px); margin: 0; padding: 0; list-style: none; }
.collection__link {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap);
  align-items: end; color: inherit; text-decoration: none;
}
.collection__media { grid-column: 1 / span 8; grid-row: 1; display: block; background: var(--ph); }
.collection__media img { width: 100%; }
.collection__text { grid-column: 10 / span 3; grid-row: 1; display: flex; flex-direction: column; padding-bottom: 2px; }
.collection--right .collection__media { grid-column: 5 / span 8; }
.collection--right .collection__text { grid-column: 1 / span 3; }
.collection__name { font-size: clamp(2.375rem, 4.3vw, 3.875rem); font-weight: 280; letter-spacing: -.022em; line-height: 1; }
.collection__sub { margin-top: 14px; font-size: 1.125rem; line-height: 1.4; }
.collection__meta { margin-top: 4px; font-size: .9375rem; color: var(--ash); }
.collection__cta {
  margin-top: 28px; font-size: 1rem;
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .32em;
  text-decoration-color: rgba(231, 229, 224, .35);
  transition: text-decoration-color .2s;
}
.collection__link:hover .collection__cta,
.collection__link:focus-visible .collection__cta { text-decoration-color: currentColor; }
.collection__link:focus-visible { outline-offset: 8px; }
@media (max-width: 900px) {
  .collection__link { display: block; }
  .collection__text { margin-top: 22px; }
  .collection__cta { margin-top: 16px; }
}

/* ------------------------------------------------------------------ photography page */
.page-intro {
  max-width: calc(var(--max) + 2 * var(--pad));
  margin: 0 auto;
  padding: clamp(36px, 6vw, 104px) var(--pad) clamp(48px, 6vw, 88px);
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); align-items: end;
}
.page-intro__title {
  grid-column: 1 / span 8;
  font-size: clamp(3.5rem, 10vw, 9rem);
  font-weight: 260; letter-spacing: -.035em; line-height: .86;
  margin-left: -.045em;
}
.page-intro__text { grid-column: 9 / span 4; max-width: 38ch; color: var(--ash); text-wrap: pretty; }
@media (max-width: 900px) {
  .page-intro { display: block; }
  .page-intro__text { margin-top: 24px; }
}

.chapter-nav {
  position: sticky; top: 0; z-index: 20;
  background: rgba(23, 26, 31, .9);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
}
.chapter-nav ul {
  display: flex; gap: clamp(20px, 3.2vw, 48px);
  max-width: calc(var(--max) + 2 * var(--pad));
  margin: 0 auto; padding: 0 var(--pad); list-style: none;
  overflow-x: auto; scrollbar-width: none;
}
.chapter-nav ul::-webkit-scrollbar { display: none; }
.chapter-nav a {
  display: block; padding: 14px 0 13px;
  font-size: 1rem; color: var(--ash); text-decoration: none; white-space: nowrap;
  box-shadow: inset 0 -1px 0 transparent;
  transition: color .2s, box-shadow .2s;
}
.chapter-nav a:hover { color: var(--fog); }
.chapter-nav a[aria-current="true"] { color: var(--fog); box-shadow: inset 0 -1px 0 var(--fog); }
.chapter-nav a:focus-visible { outline-offset: -2px; }

.chapter { padding-top: clamp(104px, 13vw, 200px); }
.chapter__head {
  max-width: calc(var(--max) + 2 * var(--pad));
  margin: 0 auto clamp(64px, 9vw, 128px);
  padding: 0 var(--pad);
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); align-items: end;
}
.chapter + .chapter .chapter__head::before {
  content: ""; grid-column: 1 / -1; height: 1px; background: var(--rule);
  margin-bottom: clamp(48px, 6vw, 80px);
}
.chapter__heading { grid-column: 1 / span 6; }
.chapter__title {
  font-size: clamp(3rem, 7.6vw, 7rem);
  font-weight: 260; letter-spacing: -.03em; line-height: .92;
  margin-left: -.035em;
}
.chapter__sub { margin-top: clamp(14px, 1.6vw, 22px); font-size: clamp(1.125rem, 1.7vw, 1.5rem); line-height: 1.3; }
.chapter__meta { margin-top: 6px; font-size: .9375rem; color: var(--ash); }
.chapter__intro { grid-column: 8 / span 5; max-width: 48ch; line-height: 1.65; text-wrap: pretty; }
@media (max-width: 900px) {
  .chapter__head { display: block; }
  .chapter + .chapter .chapter__head::before { display: block; }
  .chapter__intro { margin-top: 28px; }
}

/* A chapter is a vertical run of plates. Bleed plates span the full window. */
.flow {
  display: grid;
  grid-template-columns:
    [full-start] minmax(var(--pad), 1fr)
    [content-start] minmax(0, var(--max))
    [content-end] minmax(var(--pad), 1fr) [full-end];
  row-gap: clamp(88px, 11vw, 176px);
}
.flow > * { grid-column: content; }
.flow > .plate--bleed { grid-column: full; }

.plate { min-width: 0; }
.plate__open {
  position: relative; display: block; width: 100%;
  margin: 0; padding: 0; border: 0; border-radius: 0;
  background: var(--ph, #22262c);
  cursor: zoom-in;
}
.plate__open::after { content: ""; position: absolute; inset: 0; }
.plate__open img { width: 100%; }
.plate__open:focus-visible { outline-offset: 5px; }

.plate--wide { justify-self: center; width: min(100%, calc(var(--plate-h) * var(--ar))); }
.plate--bleed { justify-self: center; width: min(100%, calc(var(--bleed-h) * var(--ar))); }
.plate--bleed .label { max-width: calc(var(--max) + 2 * var(--pad)); margin-inline: auto; padding-inline: var(--pad); }

/* Museum-label captions: italic title, place, exposure, and a note on the best frames. */
.label { margin-top: 18px; }
.label--described {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  column-gap: clamp(24px, 4vw, 64px); align-items: start;
}
.label__title { font-size: 1.1875rem; line-height: 1.35; }
.label__place { margin-top: 2px; font-size: .9375rem; line-height: 1.45; color: var(--ash); }
.label__tech { margin-top: 6px; font-size: .8125rem; line-height: 1.4; color: var(--ash); font-variant-numeric: lining-nums tabular-nums; }
.label__desc { max-width: 54ch; font-size: 1.0625rem; line-height: 1.62; text-wrap: pretty; }
@media (max-width: 760px) {
  .label--described { display: block; }
  .label__desc { margin-top: 12px; }
}

/* Side plates: the picture on one side, its label on the other. */
.plate--side { display: flex; align-items: flex-end; justify-content: center; gap: clamp(28px, 4.5vw, 80px); }
.plate--side.plate--right { flex-direction: row-reverse; }
.plate--side .plate__open { flex: 0 1 auto; width: calc(var(--plate-h) * var(--ar)); max-width: 64%; }
.plate--side .label { flex: 0 1 25rem; margin-top: 0; padding-bottom: 2px; }
.plate--side .label--described,
.pair .label--described { display: block; }
.plate--side .label__desc,
.pair .label__desc { margin-top: 12px; }
@media (max-width: 760px) {
  .plate--side { display: block; }
  .plate--side .plate__open { width: 100%; max-width: none; }
  .plate--side .label { margin-top: 18px; }
}

/* Diptychs: two frames at the same height. */
.pair {
  display: flex; align-items: flex-start; gap: clamp(16px, 2.2vw, 36px);
  justify-self: center;
  width: min(100%, calc(var(--pair-h) * var(--ar-sum) + clamp(16px, 2.2vw, 36px)));
}
.pair > .plate { flex: var(--ar) 1 0%; }
@media (max-width: 760px) {
  .pair { flex-direction: column; width: 100%; gap: clamp(64px, 14vw, 96px); }
  .pair > .plate { flex: none; width: 100%; }
}

.back-to-top {
  max-width: calc(var(--max) + 2 * var(--pad));
  margin: clamp(120px, 14vw, 200px) auto 0; padding: 0 var(--pad);
  text-align: center; font-size: 1rem;
}
.back-to-top a { color: var(--ash); }
.back-to-top a:hover { color: var(--fog); }

/* ------------------------------------------------------------------ about */
.about__hero { position: relative; }
.about__hero img {
  background: var(--ph);
  width: 100%;
  height: min(calc(100vw / var(--ar)), 92vh);
  object-fit: cover; object-position: 50% 52%;
}
@supports (height: 1svh) {
  .about__hero img { height: min(calc(100vw / var(--ar)), 92svh); }
}
.about__caption {
  max-width: calc(var(--max) + 2 * var(--pad));
  margin: 0 auto; padding: 16px var(--pad) 0;
  font-size: .9375rem; color: var(--ash);
}
.about__body {
  max-width: calc(var(--max) + 2 * var(--pad));
  margin: 0 auto;
  padding: clamp(80px, 11vw, 168px) var(--pad) 0;
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap);
}
.about__title {
  grid-column: 1 / span 8;
  font-size: clamp(2.375rem, 4.8vw, 4.5rem);
  font-weight: 280; line-height: 1.04; letter-spacing: -.024em;
  text-wrap: balance;
}
.about__text { grid-column: 1 / span 7; margin-top: clamp(40px, 5vw, 72px); max-width: 58ch; font-size: 1.1875rem; line-height: 1.7; }
.about__text p + p { margin-top: 1.1em; }
.about__facts {
  grid-column: 9 / span 4; grid-row: 2 / span 2; align-self: start;
  margin-top: clamp(40px, 5vw, 72px);
  border-top: 1px solid var(--rule);
}
.about__facts > div { padding: 14px 0 15px; border-bottom: 1px solid var(--rule); scroll-margin-top: 24px; }
.about__facts dt { font-size: .875rem; color: var(--ash); }
.about__facts dd { margin-top: 2px; font-size: 1.0625rem; line-height: 1.5; }
.about__email { overflow-wrap: anywhere; }
.about__more { grid-column: 1 / span 7; margin-top: clamp(40px, 5vw, 72px); }
@media (max-width: 900px) {
  .about__body { display: block; }
  .about__facts { margin-top: 56px; }
}

/* ------------------------------------------------------------------ not found */
.not-found {
  max-width: calc(var(--max) + 2 * var(--pad));
  margin: 0 auto;
  padding: clamp(96px, 16vw, 220px) var(--pad) clamp(24px, 4vw, 48px);
}
.not-found__title {
  max-width: 14ch;
  font-size: clamp(2.75rem, 7vw, 6rem);
  font-weight: 260; letter-spacing: -.03em; line-height: .95;
}
.not-found__text { margin-top: 28px; max-width: 46ch; color: var(--ash); }
.not-found__text a { color: var(--fog); }

/* ------------------------------------------------------------------ footer */
.site-footer { margin-top: clamp(104px, 13vw, 176px); border-top: 1px solid var(--rule); }
.page-home .site-footer { margin-top: 0; }
.site-footer__inner {
  max-width: calc(var(--max) + 2 * var(--pad));
  margin: 0 auto; padding: 28px var(--pad) 40px;
  display: flex; flex-wrap: wrap; gap: 10px 40px; justify-content: space-between;
  font-size: .875rem; line-height: 1.5; color: var(--ash);
}
.site-footer__rights { max-width: 62ch; }
.site-footer a { color: var(--fog); }

/* ------------------------------------------------------------------ viewer */
html.lb-open { overflow: hidden; }
.lightbox {
  position: fixed; inset: 0;
  width: 100%; height: 100%; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0; overflow: hidden;
  background: var(--night); color: var(--fog);
  opacity: 0; transition: opacity .22s ease;
}
.lightbox[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.lightbox.is-visible { opacity: 1; }
.lightbox::backdrop { background: var(--night); }

.lb__bar, .lb__caption, .lb__nav { transition: opacity .25s ease; }
.lb__bar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 60px; padding: 8px clamp(10px, 2.2vw, 28px) 8px clamp(16px, 2.6vw, 36px);
}
.lb__count { font-size: .9375rem; color: var(--ash); font-variant-numeric: lining-nums tabular-nums; }
.lb__close {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 44px; padding: 0 12px;
  background: none; border: 0; cursor: pointer; font-size: 1rem; color: var(--fog);
}
.lb__close:hover svg { transform: rotate(90deg); }
.lb__close svg { transition: transform .3s var(--ease); }

.lb__stage {
  position: relative; display: grid; place-items: center; overflow: hidden;
  grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr);
  padding: 0 clamp(8px, 6vw, 104px);
  touch-action: pan-y;
  touch-action: pan-y pinch-zoom;
}
.lb__stage.can-zoom { cursor: zoom-in; }
.lb__img {
  grid-area: 1 / 1;
  max-width: 100%; max-height: 100%; width: auto; height: auto;
  opacity: 0; transition: opacity .34s ease;
}
.lb__img.is-front { opacity: 1; }
.lb__img:not([src]) { visibility: hidden; }
.lb__spinner {
  grid-area: 1 / 1; width: 28px; height: 28px; border-radius: 50%;
  border: 1px solid rgba(231, 229, 224, .16); border-top-color: rgba(231, 229, 224, .8);
  opacity: 0; transition: opacity .2s; pointer-events: none;
  animation: spin 1s linear infinite;
}
.lb__stage.is-loading .lb__spinner { opacity: 1; transition-delay: .35s; }
@keyframes spin { to { transform: rotate(360deg); } }

.lb__nav {
  position: absolute; top: 0; bottom: 0; z-index: 2;
  width: clamp(52px, 8vw, 112px);
  display: flex; align-items: center; justify-content: center;
  padding: 0; background: none; border: 0; cursor: pointer;
  color: var(--fog); opacity: .5;
}
.lb__nav:hover, .lb__nav:focus-visible { opacity: 1; }
.lb__nav--prev { left: 0; }
.lb__nav--next { right: 0; }
@media (hover: none) {
  .lb__nav { width: 44px; opacity: .75; }
  .lb__nav svg { width: 14px; height: 26px; }
}

.lb__caption {
  display: flex; flex-wrap: wrap; align-items: flex-start; gap: 10px clamp(24px, 4vw, 64px);
  min-height: 96px;
  padding: 14px clamp(16px, 2.6vw, 36px) clamp(18px, 2.4vw, 28px);
}
.lb__id { flex: 0 1 26rem; }
.lb__title { font-size: 1.125rem; line-height: 1.35; }
.lb__place { margin-top: 2px; font-size: .9375rem; color: var(--ash); }
.lb__tech { margin-top: 4px; font-size: .8125rem; color: var(--ash); font-variant-numeric: lining-nums tabular-nums; }
.lb__desc { flex: 1 1 28rem; max-width: 62ch; font-size: 1rem; line-height: 1.6; color: var(--fog-soft); text-wrap: pretty; }
.lb__place[hidden], .lb__tech[hidden], .lb__desc[hidden] { display: none; }
@media (max-width: 760px) {
  .lb__caption { min-height: 0; }
  .lb__desc { font-size: .9375rem; max-height: 22vh; overflow: auto; }
}
.lightbox.is-clean .lb__bar,
.lightbox.is-clean .lb__caption,
.lightbox.is-clean .lb__nav { opacity: 0; pointer-events: none; }

/* Zoomed to full resolution: drag to look around. */
.lb__stage.is-zoomed {
  overflow: auto; place-items: start; padding: 0;
  cursor: grab; touch-action: auto; scrollbar-width: none;
}
.lb__stage.is-zoomed::-webkit-scrollbar { display: none; }
.lb__stage.is-zoomed.is-dragging { cursor: grabbing; }
.lb__stage.is-zoomed .lb__img.is-front { max-width: none; max-height: none; margin: auto; }
.lb__stage.is-zoomed .lb__img:not(.is-front),
.lb__stage.is-zoomed .lb__nav { display: none; }

/* ------------------------------------------------------------------ notice */
.toast {
  position: fixed; left: 50%; bottom: clamp(16px, 3vw, 32px); z-index: 1000;
  max-width: calc(100vw - 32px); margin: 0; padding: 10px 16px;
  background: #22262d; border: 1px solid #343944; color: var(--fog);
  font-size: .9375rem; line-height: 1.4;
  opacity: 0; transform: translate(-50%, 8px); pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ------------------------------------------------------------------ motion + print */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important; transition-delay: 0s !important;
    scroll-behavior: auto !important;
  }
}
@media print {
  img, picture, .lightbox, .chapter-nav, .toast { display: none !important; }
  html, body { background: #fff; color: #000; }
  main::before { content: "Photographs on this site are not available for printing. © Alex Zhang"; display: block; padding: 24px 0; }
}
