:root {
  --bg: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.92);
  --ink: #151515;
  --muted: #8a877f;
  --line: rgba(21, 21, 21, 0.14);
  --tile: #eeece8;
  --serif: "Cormorant Garamond", "Songti SC", "Noto Serif SC", "Times New Roman", serif;
  --sans: "Jost", "Helvetica Neue", Arial, sans-serif;
  --pad: clamp(20px, 4vw, 56px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --gap: clamp(20px, 2.6vw, 40px);
}

.theme-dark {
  --bg: #262626;
  --bg-glass: rgba(38, 38, 38, 0.92);
  --ink: #ececea;
  --muted: #8e8d89;
  --line: rgba(255, 255, 255, 0.14);
  --tile: #303030;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }

.eyebrow {
  font-size: 11px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  font-weight: 400;
}

/* Header */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 26px var(--pad);
  transition: background-color 0.5s var(--ease), color 0.5s var(--ease), padding 0.5s var(--ease);
}
.site-header--light { color: #fff; }
.site-header.is-scrolled {
  background: var(--bg-glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--ink);
  padding-top: 18px;
  padding-bottom: 18px;
}
.brand {
  font-family: var(--serif);
  font-size: 22px;
  letter-spacing: 0.04em;
  font-weight: 500;
}
.nav { display: flex; gap: clamp(18px, 3vw, 40px); }
.nav a {
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  position: relative;
  padding-bottom: 4px;
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.5s var(--ease);
}
.nav a:hover::after,
.nav a[aria-current="page"]::after { transform: scaleX(1); transform-origin: left; }

/* About the photographer */
.about { position: relative; }
.about__trigger {
  background: none;
  border: 0;
  padding: 0;
  color: inherit;
  cursor: default;
  font-size: 18px;
}
.about__card {
  position: absolute;
  top: calc(100% + 18px);
  left: 0;
  width: min(760px, calc(100vw - 2 * var(--pad)));
  display: grid;
  grid-template-columns: 46% 1fr;
  background: #fff;
  color: #151515;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.22);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.45s var(--ease), transform 0.45s var(--ease), visibility 0.45s;
}
/* Invisible bridge so the card stays open while the pointer crosses the gap. */
.about__card::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -18px;
  height: 18px;
}
.about.is-open .about__card {
  opacity: 1;
  visibility: visible;
  transform: none;
}
@media (hover: hover) {
  .about:hover .about__card {
    opacity: 1;
    visibility: visible;
    transform: none;
  }
}
.about__close { display: none; }
.about__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 22% 50%;
}
.about__body { padding: 28px 30px 30px; }
.about__eyebrow { color: #8a877f; }
.about__facts { margin: 16px 0 0; }
.about__facts div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(21, 21, 21, 0.1);
}
.about__facts dt {
  font-size: 12px;
  color: #6f6c66;
}
.about__facts dd {
  margin: 0;
  font-family: var(--serif);
  font-size: 18px;
  white-space: nowrap;
}
.about__quote {
  margin: 18px 0 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: 17px;
  line-height: 1.45;
}

/* Hero */
.hero {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 560px;
  overflow: hidden;
  color: #fff;
  background: #6f6f6f;
}
.hero__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 70%;
  transform: scale(1.06);
  animation: heroIn 2.4s var(--ease) forwards;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.18), rgba(0,0,0,0) 30%, rgba(0,0,0,0) 60%, rgba(0,0,0,0.28));
}
.hero__content {
  position: absolute;
  z-index: 1;
  left: var(--pad);
  right: var(--pad);
  top: 22vh;
  text-align: center;
}
.hero__title {
  margin: 18px 0 0;
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(48px, 9vw, 128px);
  line-height: 0.95;
  letter-spacing: -0.01em;
}
.hero__title em { font-style: italic; }
.hero__foot {
  position: absolute;
  z-index: 1;
  left: var(--pad);
  right: var(--pad);
  bottom: 30px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}
.scroll-cue { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.scroll-cue span {
  width: 1px;
  height: 46px;
  background: rgba(255,255,255,0.6);
  transform-origin: top;
  animation: cue 2.2s var(--ease) infinite;
}

@keyframes heroIn { to { transform: scale(1); } }
@keyframes cue {
  0% { transform: scaleY(0); opacity: 1; }
  60% { transform: scaleY(1); opacity: 1; }
  100% { transform: scaleY(1); opacity: 0; }
}

/* Intro */
.intro {
  max-width: 800px;
  margin: 0 auto;
  padding: clamp(64px, 9vw, 120px) var(--pad) clamp(48px, 6vw, 88px);
  text-align: center;
}
.intro p {
  margin: 18px 0 0;
  font-family: var(--serif);
  font-size: clamp(20px, 2.3vw, 28px);
  line-height: 1.45;
  letter-spacing: 0.005em;
  font-weight: 300;
}
.intro .eyebrow { color: var(--muted); }

/* Series */
.series {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 3vw, 48px);
  padding: 0 var(--pad) clamp(96px, 14vw, 180px);
  max-width: 1440px;
  margin: 0 auto;
}
.series__media {
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background: var(--tile);
}
.series__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.4s var(--ease), filter 1.4s var(--ease);
}
.series__item:hover .series__media img { transform: scale(1.045); }
.series__meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-top: 22px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 16px;
}
.series__name {
  margin: 0;
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(26px, 2.5vw, 38px);
  line-height: 1.1;
}
.series__name small {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.3em;
  color: var(--muted);
  margin-right: 14px;
  vertical-align: middle;
}
.series__more {
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.4s, transform 0.6s var(--ease);
}
.series__item:hover .series__more { color: var(--ink); transform: translateX(6px); }

/* Full-screen viewer (Alone) */
.viewer-page { overflow: hidden; }
.viewer {
  position: fixed;
  inset: 0;
  background: var(--bg);
}
.viewer__brand,
.viewer__close {
  position: absolute;
  top: 22px;
  z-index: 2;
}
.viewer__brand { left: var(--pad); }
.viewer__close {
  background: none;
  border: 0;
  padding: 8px 0;
  color: var(--ink);
  cursor: pointer;
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  transition: opacity 0.3s;
}
.viewer__close { right: var(--pad); top: 26px; }
.viewer__close:hover,
.viewer__arrow:hover { opacity: 0.5; }
.viewer__stage {
  position: absolute;
  top: 72px;
  bottom: 24px;
  left: 64px;
  right: 64px;
}
.viewer__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.7s var(--ease);
}
.viewer__img.is-active { opacity: 1; }
.viewer__arrow {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 56px;
  height: 96px;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  background: none;
  border: 0;
  padding: 0;
  color: var(--ink);
  cursor: pointer;
  transition: opacity 0.3s;
}
.viewer__arrow svg {
  width: 18px;
  height: 36px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.2;
}
.viewer__prev { left: 6px; }
.viewer__next { right: 6px; }
.viewer__count {
  position: absolute;
  z-index: 2;
  color: var(--muted);
  line-height: 1;
  white-space: nowrap;
}
.viewer__count.is-inside {
  color: #fff;
  text-shadow: 0 0 6px rgba(0, 0, 0, 0.7);
}

@media (max-width: 640px) {
  .viewer__stage { left: 0; right: 0; }
  .viewer__arrow { width: 44px; color: #fff; filter: drop-shadow(0 0 4px rgba(0, 0, 0, 0.6)); }
  .viewer__prev { left: 0; }
  .viewer__next { right: 0; }
}

.series__item--center { grid-column: 2; }
.page-head {
  padding: clamp(150px, 20vw, 240px) var(--pad) clamp(56px, 8vw, 110px);
  max-width: 1440px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 32px;
}
.page-head .eyebrow { color: var(--muted); }
.page-title {
  margin: 14px 0 0;
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(56px, 10vw, 150px);
  line-height: 0.92;
  letter-spacing: -0.015em;
}
.page-title em { font-style: italic; }
.page-desc {
  max-width: 340px;
  margin: 0;
  color: var(--ink);
  opacity: 0.75;
  font-size: 14px;
}
.page-desc .eyebrow { display: block; margin-bottom: 12px; color: var(--muted); }

.gallery {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 var(--pad);
  columns: 3;
  column-gap: clamp(20px, 2.6vw, 40px);
}
.gallery--2 {
  columns: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: end;
  gap: clamp(20px, 3vw, 48px);
  max-width: 1180px;
}
.gallery.is-masonry {
  columns: auto;
  display: block;
}
.gallery__row {
  display: flex;
  align-items: flex-start;
  gap: var(--gap);
}
.gallery__col { flex: 1; min-width: 0; }
@media (min-width: 901px) {
  /* Match the width of two portrait columns plus the gap between them. */
  .gallery__wide {
    width: calc((100% - 2 * var(--gap)) * 2 / 3 + var(--gap));
  }
}
.gallery figure {
  margin: 0 0 clamp(44px, 5vw, 72px);
  break-inside: avoid;
}
.gallery--2 figure { margin-bottom: 0; }
.gallery a {
  display: block;
  overflow: hidden;
  background: var(--tile);
  cursor: zoom-in;
}
.gallery img {
  width: 100%;
  transition: transform 1.2s var(--ease), opacity 0.6s;
}
.gallery a:hover img { transform: scale(1.03); }
.gallery a:focus-visible { outline: 1px solid var(--ink); outline-offset: 4px; }

.gallery figcaption {
  padding-top: 16px;
  line-height: 1.5;
}
.gallery figcaption > span { display: inline; }
.cap-zh, .cap-en { margin-right: 14px; }
.cap-zh {
  font-family: var(--serif);
  font-size: 20px;
  letter-spacing: 0.08em;
}
.cap-en {
  font-size: 11px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
}
.cap-la {
  font-family: var(--serif);
  font-style: italic;
  font-size: 16px;
  color: var(--muted);
}
.gallery figcaption > .cap-rarity {
  display: block;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--muted);
}

.next-series {
  display: block;
  max-width: 1440px;
  margin: clamp(96px, 14vw, 180px) auto 0;
  padding: clamp(48px, 7vw, 90px) var(--pad);
  border-top: 1px solid var(--line);
  text-align: center;
}
.next-series .eyebrow { color: var(--muted); }
.next-series__title {
  display: block;
  margin-top: 16px;
  font-family: var(--serif);
  font-weight: 300;
  font-style: italic;
  font-size: clamp(44px, 7vw, 96px);
  line-height: 1;
  transition: letter-spacing 0.8s var(--ease);
}
.next-series:hover .next-series__title { letter-spacing: 0.02em; }

/* Footer */
.site-footer {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 32px var(--pad);
  border-top: 1px solid var(--line);
  color: var(--muted);
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.45s var(--ease), visibility 0.45s;
}
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox__img {
  max-width: calc(100vw - 180px);
  max-height: calc(100vh - 140px);
  width: auto;
  height: auto;
  object-fit: contain;
  transition: opacity 0.35s var(--ease);
}
.lightbox__img.is-loading { opacity: 0; }
.lightbox button {
  position: absolute;
  background: none;
  border: 0;
  padding: 16px;
  color: var(--ink);
  cursor: pointer;
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  transition: opacity 0.3s;
}
.lightbox button:hover { opacity: 0.5; }
.lightbox__close { top: 18px; right: calc(var(--pad) - 16px); }
.lightbox__prev { left: calc(var(--pad) - 16px); top: 50%; transform: translateY(-50%); }
.lightbox__next { right: calc(var(--pad) - 16px); top: 50%; transform: translateY(-50%); }
.lightbox__count {
  position: absolute;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--muted);
  white-space: pre;
}

/* Reveal */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 1.1s var(--ease), transform 1.1s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }

@media (max-width: 900px) {
  .gallery { columns: 2; }
  .page-head { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .series { grid-template-columns: 1fr; max-width: 520px; }
  .series__item--center { grid-column: auto; }
  .site-header { flex-direction: column; gap: 8px; }
  .nav { gap: 8px 16px; flex-wrap: wrap; justify-content: center; }
  .nav a { letter-spacing: 0.16em; font-size: 10px; }
  .about__card {
    position: fixed;
    top: 100px;
    left: var(--pad);
    right: var(--pad);
    width: auto;
    max-height: calc(100svh - 120px);
    overflow-y: auto;
    grid-template-columns: 1fr;
    box-shadow: 0 0 0 100vmax rgba(0, 0, 0, 0.5);
    text-align: left;
  }
  .about__card::before { display: none; }
  .about__img { aspect-ratio: 16 / 10; height: auto; object-position: 30% 45%; }
  .about__body { padding: 22px 22px 24px; }
  .about__facts dd { font-size: 16px; }
  .about__quote { font-size: 16px; }
  .about__close {
    display: block;
    position: absolute;
    top: 8px;
    right: 8px;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    color: #151515;
    font-size: 22px;
    line-height: 36px;
    cursor: pointer;
  }
}

@media (max-width: 640px) {
  .gallery { columns: 1; }
  .gallery--2 { grid-template-columns: 1fr; }
  .hero__content { top: 26vh; }
  .lightbox__img { max-width: 100vw; max-height: calc(100vh - 160px); }
  .lightbox__prev, .lightbox__next { top: auto; bottom: 10px; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  .hero__img { transform: none; }
}
