/* =========================================================================
   Photo Reason — portfolio template
   Monochrome, editorial, image-first. Color comes from the photographs,
   not the UI. Zero build: plain CSS, no framework.
   To recolor the chrome, change --paper and --ink below.
   ========================================================================= */

:root {
  /* Neutral ramp (matches the Photo Reason brand system). */
  --paper: #fafafa; /* neutral-50  */
  --ink: #171717; /* neutral-900 */
  --muted: #737373; /* neutral-500 */
  --faint: #a3a3a3; /* neutral-400 */
  --hairline: #e5e5e5; /* neutral-200 */
  --paper-veil: rgba(250, 250, 250, 0.86);

  /* Privacy-friendly system fonts; no third-party font request. */
  --font-sans:
    system-ui, -apple-system, "Segoe UI", "Hiragino Sans",
    "Hiragino Kaku Gothic ProN", "PingFang SC", "Microsoft YaHei",
    "Noto Sans JP", "Noto Sans SC", sans-serif;

  --wrap: 1400px;
  --pad: clamp(1.25rem, 5vw, 4rem);
  --gap: clamp(0.5rem, 2vw, 1.25rem);

  --dur: 0.6s;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  font-feature-settings: "kern", "liga";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a {
  color: inherit;
  text-decoration: none;
}

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

/* Over photography (hero, lightbox) and the blend-mode switch, an ink outline
   can vanish — use white there. */
.hero :focus-visible,
.lightbox :focus-visible,
.lang-switch button:focus-visible {
  outline-color: #fff;
}

/* --- Shared type utilities ------------------------------------------------ */

.eyebrow {
  font-size: 0.72rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--faint);
}

.section__label {
  margin: 0 0 clamp(1.5rem, 4vw, 2.75rem);
}

/* --- Language switch ------------------------------------------------------ */

.lang-switch {
  position: fixed;
  top: clamp(1rem, 2.5vw, 1.75rem);
  right: var(--pad);
  z-index: 40;
  display: flex;
  gap: 0.75rem;
  padding: 0.35rem 0.5rem;
  border-radius: 4px;
  background: var(--paper-veil);
  color: var(--ink);
}

.lang-switch button {
  appearance: none;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font: inherit;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: inherit;
  opacity: 0.72;
  transition: opacity 0.2s;
}

.lang-switch button:hover {
  opacity: 0.85;
}

.lang-switch button[aria-pressed="true"] {
  opacity: 1;
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* --- Hero ----------------------------------------------------------------- */

.hero {
  position: relative;
  height: 100svh;
  min-height: 34rem;
  color: #fff;
  overflow: hidden;
}

.hero__media {
  position: absolute;
  inset: 0;
  background-color: #111;
}

.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.28) 0%,
    rgba(0, 0, 0, 0) 32%,
    rgba(0, 0, 0, 0) 55%,
    rgba(0, 0, 0, 0.55) 100%
  );
}

.hero__frame {
  position: relative;
  z-index: 1;
  height: 100%;
  padding: clamp(1.25rem, 3vw, 2.25rem) var(--pad) clamp(1.75rem, 4vw, 3rem);
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(1rem, 3vw, 2.25rem);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.nav a {
  opacity: 0.82;
  transition: opacity 0.2s;
}

.nav a:hover {
  opacity: 1;
}

.hero__wordmark {
  align-self: end;
  max-width: 20ch;
}

/* Body-sized ch units should not force CJK names into one character per line. */
.hero__wordmark:lang(zh-Hans),
.hero__wordmark:lang(ja) {
  max-width: min(100%, 40rem);
}
.hero__wordmark:lang(zh-Hans) .hero__tagline,
.hero__wordmark:lang(ja) .hero__tagline {
  max-width: 20ch;
}

.hero__name {
  margin: 0.4rem 0 0;
  font-size: clamp(2.75rem, 9vw, 7rem);
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: -0.02em;
}

.hero__tagline {
  margin: 0.9rem 0 0;
  font-size: clamp(0.95rem, 1.6vw, 1.15rem);
  font-weight: 400;
  opacity: 0.9;
  letter-spacing: 0.01em;
}

.hero__scroll {
  justify-self: start;
  align-self: end;
  width: 1px;
  height: clamp(2.5rem, 6vh, 4.5rem);
  background: rgba(255, 255, 255, 0.6);
  position: relative;
}

.hero__scroll span {
  position: absolute;
  inset: 0;
  background: #fff;
  transform-origin: top;
  animation: scrollcue 2.2s var(--ease) infinite;
}

@keyframes scrollcue {
  0% {
    transform: scaleY(0);
    transform-origin: top;
  }
  45% {
    transform: scaleY(1);
    transform-origin: top;
  }
  55% {
    transform: scaleY(1);
    transform-origin: bottom;
  }
  100% {
    transform: scaleY(0);
    transform-origin: bottom;
  }
}

/* Filmic load reveal for the wordmark. */
.hero__wordmark > * {
  opacity: 0;
  transform: translateY(12px);
  animation: rise 1s var(--ease) forwards;
}
.hero__wordmark .eyebrow {
  animation-delay: 0.15s;
}
.hero__name {
  animation-delay: 0.28s;
}
.hero__tagline {
  animation-delay: 0.45s;
}

@keyframes rise {
  to {
    opacity: 1;
    transform: none;
  }
}

/* --- Sections ------------------------------------------------------------- */

.section {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: clamp(4rem, 10vw, 9rem) var(--pad);
}

/* --- Click-controlled projects and separate About page ------------------- */
.projects {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--hairline);
}
.project-row {
  border-bottom: 1px solid var(--hairline);
}
.project-row__title {
  font-size: clamp(1.5rem, 4vw, 2.75rem);
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.015em;
}
.project-row__meta {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  white-space: nowrap;
}
.project-row__meta .ongoing::before {
  content: "· ";
}
.project-summary {
  display: block;
  cursor: pointer;
  padding: clamp(1.6rem, 3.2vw, 2.8rem) 0;
  list-style: none;
}
.project-summary::-webkit-details-marker {
  display: none;
}
.project-summary::marker {
  content: "";
}
.project-summary__heading {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  justify-content: space-between;
}
.project-row__title {
  line-height: 1.25;
}
.project-summary__side {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3vw, 2.5rem);
  flex-shrink: 0;
}
.project-indicator {
  width: 26px;
  height: 26px;
  position: relative;
  display: inline-block;
}
.project-indicator::before,
.project-indicator::after {
  content: "";
  position: absolute;
  background: var(--ink);
  width: 18px;
  height: 1px;
  left: 4px;
  top: 12px;
}
.project-indicator::after {
  transform: rotate(90deg);
  transition: transform 0.22s ease;
}
.project-disclosure[open] .project-indicator::after {
  transform: rotate(0deg);
}
.project-excerpt {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-width: 64ch;
  font-size: clamp(0.95rem, 1.25vw, 1.08rem);
  line-height: 1.8;
  color: #656565;
  margin-top: 1rem;
  padding-right: 2rem;
}
.project-disclosure[open] .project-excerpt {
  display: block;
  overflow: visible;
}
.project-summary:hover .project-indicator {
  opacity: 0.55;
}
.project-panel {
  padding: 0 0 2rem;
}
.project-preview-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(0.7rem, 1.5vw, 1.5rem);
  align-items: center;
}
.project-preview-strip img {
  width: 100%;
  height: clamp(9rem, 18vw, 15rem);
  object-fit: contain;
}
.project-panel__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1.8rem;
  gap: 1rem;
}
.project-row .project-open {
  display: inline-flex;
  padding: 0 0 0.1rem;
  border-bottom: 1px solid var(--ink);
  font-size: 0.9rem;
  gap: 0;
}
.project-count {
  color: var(--muted);
  font-size: 0.78rem;
}
.project-summary:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 6px;
}
.about-topbar {
  max-width: var(--wrap);
  margin: auto;
  padding: 2rem var(--pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}
.about-topbar__brand {
  font-weight: 500;
  letter-spacing: 0.05em;
}
.about-topbar nav {
  display: flex;
  gap: 2rem;
  font-size: 0.9rem;
}
.about-topbar [aria-current] {
  border-bottom: 1px solid;
}
.about-page {
  max-width: var(--wrap);
  margin: auto;
  padding: 4rem var(--pad) 0;
}
.about-heading {
  margin: 0;
  font-size: clamp(3rem, 7vw, 6rem);
  font-weight: 450;
  letter-spacing: -0.04em;
  line-height: 1.15;
}
.about-kicker {
  margin: 1rem 0 3.5rem;
  color: var(--muted);
  font-size: 0.9rem;
}
.about-intro {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(2rem, 7vw, 7rem);
  align-items: start;
  padding-bottom: 4.5rem;
}
.about-artwork {
  margin: 0;
}
.about-artwork img {
  width: 100%;
  max-height: 530px;
  object-fit: contain;
  object-position: left top;
}
.about-artwork figcaption {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 1rem;
}
.about-intro__text .about-statement {
  color: var(--ink);
  margin: 0 0 1.6rem;
  font-weight: 400;
  font-size: clamp(1.35rem, 2.2vw, 1.85rem);
  line-height: 1.6;
  letter-spacing: -0.02em;
}
.about-intro__text p {
  color: #5f5f5f;
  line-height: 1.95;
  margin: 0 0 1.2rem;
  font-size: 0.98rem;
}
.about-intro__text .about-representation {
  margin-top: 2rem;
  font-size: 0.85rem;
  color: var(--muted);
}
.cv-section {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(2rem, 7vw, 7rem);
  padding: 2.2rem 0 2.7rem;
  border-top: 1px solid var(--hairline);
}
.cv-section h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 500;
}
.cv-section__en {
  display: block;
  font-weight: 400;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  margin-top: 0.35rem;
}
.cv-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.cv-list li {
  display: grid;
  grid-template-columns: 3.8rem minmax(0, 1fr);
  gap: 1.2rem;
  margin-bottom: 1.3rem;
  font-size: 0.92rem;
  line-height: 1.7;
}
.cv-list li:last-child {
  margin-bottom: 0;
}
.cv-year {
  color: var(--muted);
  font-size: 0.8rem;
  padding-top: 0.15rem;
}
.cv-place {
  display: block;
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 0.25rem;
}
.about-contact {
  border-top: 1px solid var(--hairline);
  padding: 3rem 0 4rem;
}
.about-contact p {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.85rem;
}
.about-contact a {
  font-size: clamp(1.4rem, 4vw, 2.5rem);
  letter-spacing: -0.03em;
  border-bottom: 1px solid;
}
.about-footer {
  max-width: var(--wrap);
  margin: auto;
  padding: 1.6rem var(--pad) 2rem;
  color: var(--muted);
  font-size: 0.72rem;
}

.about-page [hidden],
.contact [hidden] {
  display: none !important;
}
.about-intro.-no-image {
  grid-template-columns: 1fr;
  max-width: 48rem;
}
.about-topbar nav {
  margin-left: auto;
}
.about-page-body .lang-switch {
  position: static;
  z-index: auto;
  flex-shrink: 0;
}
.about-page-body .lang-switch button:focus-visible {
  outline-color: var(--ink);
}
.cv-list li.-undated {
  grid-template-columns: 1fr;
}
.about-topbar nav a {
  padding: 0.4rem 0;
}
@media (max-width: 650px) {
  .project-row__title {
    font-size: 1.65rem;
  }
  .project-summary__side {
    gap: 0.6rem;
  }
  .project-row__meta {
    font-size: 0.65rem;
  }
  .project-preview-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
  }
  .project-preview-strip img {
    height: 160px;
  }
  .project-excerpt {
    padding-right: 0;
    font-size: 0.92rem;
  }
  .about-topbar {
    flex-wrap: wrap;
    padding-top: 1.4rem;
    gap: 1rem;
  }
  .about-topbar nav {
    margin-left: 0;
    gap: 1.1rem;
    font-size: 0.82rem;
  }
  .about-topbar__brand {
    flex-basis: 100%;
  }
  .about-topbar .lang-switch {
    margin-left: auto;
    padding: 0;
  }
  .about-page {
    padding-top: 2rem;
  }
  .about-kicker {
    margin-bottom: 2rem;
  }
  .about-intro,
  .cv-section {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .about-artwork img {
    max-height: 400px;
  }
  .about-intro {
    padding-bottom: 2.5rem;
  }
  .cv-list li {
    grid-template-columns: 3rem minmax(0, 1fr);
    gap: 0.7rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  .project-indicator::after {
    transition: none;
  }
}

/* --- Contact -------------------------------------------------------------- */

.contact__email {
  display: inline-block;
  font-size: clamp(1.5rem, 5vw, 3rem);
  font-weight: 500;
  letter-spacing: -0.015em;
  overflow-wrap: anywhere;
  border-bottom: 1px solid var(--hairline);
  padding-bottom: 0.15em;
  transition: border-color 0.25s;
}

.contact__email:hover {
  border-color: var(--ink);
}

.social {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin: 2rem 0 0;
  padding: 0;
}

.social a {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  transition: color 0.2s;
}

.social a:hover {
  color: var(--ink);
}

/* --- Footer --------------------------------------------------------------- */

.footer {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 2.5rem var(--pad);
  border-top: 1px solid var(--hairline);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--faint);
}

/* --- Project detail view -------------------------------------------------- */

.project-view {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: var(--paper);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.project-view[hidden] {
  display: none;
}

.pv__bar {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem var(--pad);
  background: var(--paper-veil);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--hairline);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.pv__back {
  color: var(--ink);
}

.pv__meta {
  color: var(--muted);
}

.pv__body {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: clamp(1.5rem, 4vw, 3.5rem) var(--pad) 2rem;
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr);
  align-items: start;
  gap: clamp(2rem, 5vw, 5rem);
}
.pv__head {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  padding-top: 1rem;
}
.pv__title {
  margin: 0;
  font-size: clamp(1.7rem, 3.4vw, 3rem);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.pv__desc {
  margin: 1.4rem 0 0;
  max-width: 42ch;
  color: #656565;
  font-size: 1rem;
  line-height: 1.85;
  white-space: pre-line;
}
.pv__stage {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
}
.pv__single {
  margin: 0;
}
.pv__single .pv__enlarge {
  height: clamp(240px, 64dvh, 720px);
  display: flex;
  align-items: center;
  justify-content: center;
}
.pv__single img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.pv__single figcaption {
  color: var(--muted);
  font-size: 0.78rem;
  margin-top: 1rem;
}
.pv__controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  margin-top: 0.8rem;
}
.pv__controls button {
  border: 0;
  background: none;
  color: var(--ink);
  font: inherit;
  font-size: 1.3rem;
  min-width: 44px;
  min-height: 44px;
  cursor: pointer;
}
.pv__count {
  color: var(--muted);
  font-size: 0.8rem;
  min-width: 5rem;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.pv__empty {
  color: var(--muted);
}
.pv__stage[hidden],
.pv__index[hidden],
.pv__gallery[hidden],
.pv__controls [hidden],
.pv__single [hidden] {
  display: none;
}
@media (max-width: 760px) {
  .pv__body {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .pv__head {
    grid-column: 1;
    grid-row: 1;
    padding-top: 0;
  }
  .pv__stage {
    grid-column: 1;
    grid-row: 2;
  }
  .pv__single .pv__enlarge {
    height: clamp(220px, 48dvh, 520px);
  }
  .pv__desc {
    margin-top: 1rem;
    font-size: 0.95rem;
  }
}

/* Handoff to the next body of work at the end of a project. */
.pv__next {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--pad) 2.5rem;
}

.pv__next a {
  display: block;
  border-top: 1px solid var(--hairline);
  padding-top: 1.25rem;
  transition: opacity 0.25s var(--ease);
}

.pv__next a:hover {
  opacity: 0.55;
}

.pv__next-label {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--faint);
}

.pv__next-title {
  display: block;
  margin-top: 0.6rem;
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.015em;
  color: var(--ink);
}

/* --- Missing-image placeholder (so the layout reads before photos exist) -- */

.ph {
  background: repeating-linear-gradient(
    45deg,
    #ededed,
    #ededed 12px,
    #e6e6e6 12px,
    #e6e6e6 24px
  );
  display: grid;
  place-items: center;
  min-height: 12rem;
  color: var(--faint);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

/* --- Contact sheets: the same quiet project index, in miniature ------------ */

.pv__gallery,
.pv__enlarge,
.photo-thumb {
  font: inherit;
  color: inherit;
  border: 0;
  padding: 0;
  background: none;
  cursor: pointer;
}
.pv__gallery {
  margin-top: 1.5rem;
  padding: 0.5rem 0;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-decoration: underline;
  text-underline-offset: 0.4em;
}
.pv__enlarge {
  display: block;
  width: 100%;
  cursor: zoom-in;
}
.pv__index {
  margin-top: 1.25rem;
}
.pv__index-label {
  padding: 0.7rem 0;
  cursor: pointer;
  color: var(--muted);
  font-size: 0.78rem;
}
.pv__index .photo-index {
  margin-top: 0.75rem;
}
.photo-index {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(3rem, 1fr));
  gap: 0.5rem;
}
.photo-thumb {
  min-width: 0;
  min-height: 44px;
  border-radius: 4px;
  overflow: hidden;
}
.photo-thumb img,
.photo-thumb .ph {
  width: 100%;
  height: 100%;
  min-height: 0;
  aspect-ratio: 1;
  object-fit: cover;
}

/* --- Gallery: photographs hold the screen --------------------------------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: #101010;
  color: #f5f5f5;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}
.lightbox:not([open]) {
  display: none;
}
.lightbox::backdrop {
  background: #101010;
}
.lightbox :focus-visible {
  outline-color: #f5f5f5;
}
.lightbox button {
  color: inherit;
  font: inherit;
  border: 0;
  background: none;
  cursor: pointer;
}
.lightbox__bar {
  grid-row: 1;
  grid-column: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem clamp(0.75rem, 3vw, 2rem);
  font-size: 0.75rem;
}
.lightbox__bar > div:first-child {
  min-width: 0;
  overflow-wrap: anywhere;
}
.lightbox__count {
  display: block;
  color: #b0b0b0;
  font-variant-numeric: tabular-nums;
}
.lightbox__tools {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.25rem 1rem;
}
.lightbox__tools button {
  min-height: 44px;
  padding: 0.25rem;
  white-space: nowrap;
}
.lightbox button:disabled {
  opacity: 0.4;
  cursor: default;
}
.lightbox__stage {
  grid-row: 2;
  grid-column: 1;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  min-height: 0;
  padding: 0 clamp(0px, 1vw, 1rem);
}
.lightbox__canvas {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  display: block;
  scrollbar-width: none;
  overscroll-behavior: contain;
}
.lightbox__canvas::-webkit-scrollbar {
  display: none;
}
.lightbox__surface {
  display: grid;
  place-items: center;
  min-width: 100%;
  min-height: 100%;
}
.lightbox__zoom-control {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 44px;
}
.lightbox__zoom-control input {
  width: clamp(5rem, 9vw, 8rem);
  min-height: 44px;
  margin: 0;
  accent-color: #e5e5e5;
  cursor: pointer;
}
.lightbox__zoom-control input:disabled {
  opacity: 0.4;
  cursor: default;
}
.lightbox__zoom-control output {
  min-width: 3.5em;
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: #b0b0b0;
}
.lightbox__image-button {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 0;
  cursor: zoom-in !important;
}
.lightbox__img {
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: contain;
  border-radius: 4px;
}
.lightbox__canvas.is-zoomed {
  display: block;
  cursor: grab;
}
.lightbox__canvas.is-zoomed .lightbox__image-button {
  cursor: zoom-out !important;
}
.lightbox__nav {
  align-self: center;
  min-height: 44px;
  padding: 0.5rem;
  font-size: 2rem !important;
  line-height: 1;
  opacity: 0.65;
}
.lightbox__nav:hover {
  opacity: 1;
}
.lightbox__footer {
  grid-row: 3;
  grid-column: 1;
  min-width: 0;
  padding: 0.75rem max(1rem, env(safe-area-inset-right))
    max(1rem, env(safe-area-inset-bottom));
}
.lightbox__caption {
  color: #b0b0b0;
  font-size: 0.75rem;
  text-align: center;
  margin: 0 0 0.75rem;
}
.lightbox__caption:empty {
  display: none;
}
.lightbox__thumbs {
  display: flex;
  gap: 0.5rem;
  max-width: 100%;
  width: max-content;
  margin: 0 auto;
  padding: 4px;
  overflow-x: auto;
}
.lightbox__thumbs .photo-thumb {
  flex: 0 0 52px;
  height: 52px;
  padding: 3px;
  opacity: 0.5;
}
.lightbox__thumbs .photo-thumb[aria-current="true"] {
  opacity: 1;
  box-shadow: inset 0 0 0 1px #f5f5f5;
}
.lightbox__sheet {
  grid-row: 2 / 4;
  grid-column: 1;
  min-height: 0;
  z-index: 1;
  position: relative;
  padding: 1rem var(--pad) 2rem;
  overflow: auto;
  background: #101010;
}
.lightbox__sheet h2 {
  font: inherit;
  margin: 0 0 1.5rem;
}
.lightbox__sheet .photo-index {
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 1rem;
}
.lightbox__sheet .photo-thumb[aria-current="true"] {
  outline: 1px solid #f5f5f5;
  outline-offset: 4px;
}
.lightbox__error {
  position: absolute;
  inset: 40% 15% auto;
  text-align: center;
  font-size: 0.875rem;
}
.lightbox [hidden] {
  display: none;
}
@media (max-width: 600px) {
  .lightbox__bar {
    grid-row: 1;
    grid-column: 1;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: flex-start;
  }
  .lightbox__tools {
    width: 100%;
    gap: 0.25rem 0.75rem;
    justify-content: space-between;
  }
  .lightbox__stage {
    grid-row: 2;
    grid-column: 1;
    grid-template-columns: 32px minmax(0, 1fr) 32px;
  }
}

/* --- Reduced motion ------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .hero__wordmark > * {
    opacity: 1;
    transform: none;
  }
}

/* Keep navigation clear of the fixed language switch, including embedded previews. */
@media (max-width: 600px) {
  .hero__frame {
    padding-top: 4.5rem;
  }
  .nav {
    flex-wrap: wrap;
  }
}
.hero .eyebrow {
  color: rgba(255, 255, 255, 0.85);
}

/* Gradient ASCII: the photograph remains a fallback if WebGL2 is unavailable. */
#gradientAscii { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.hero__media.-ascii-ready { background: #070c13; }
.hero__media.-ascii-ready #heroImg { opacity: 0; }
.hero__media::after { pointer-events: none; }
