:root {
  --bg: rgb(238, 234, 233);
  --accent: #37332e;
  --text: rgb(22, 20, 19);
  --muted: rgba(22, 20, 19, 0.56);
  --line: rgba(22, 20, 19, 0.14);
  --nav-h: 80px;
  --font: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

button,
a { color: inherit; }

a { text-decoration: none; }

.site-nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--nav-h);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 42px;
  color: rgba(248, 246, 244, 0.84);
  mix-blend-mode: normal;
  pointer-events: none;
}

.site-nav a,
.site-nav button { pointer-events: auto; }

.logo {
  justify-self: start;
  font-size: 13px;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.nav-links {
  justify-self: center;
  display: flex;
  gap: 32px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.nav-links a,
.back-link {
  font-size: 11px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.back-link { justify-self: end; }

.photo-viewer {
  position: relative;
  width: 100%;
  height: 100%;
}

.photo-track {
  width: 100%;
  height: 100%;
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
  touch-action: pan-x;
}

.photo-track::-webkit-scrollbar { display: none; }

.photo-slide {
  position: relative;
  flex: 0 0 100vw;
  width: 100vw;
  height: 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #0d0d0e;
}

.photo-slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}

.photo-slide.is-cover img {
  object-fit: cover;
  filter: brightness(0.82);
  transform: scale(1.015);
}

.cover-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(10, 10, 11, 0.12), transparent 40%, rgba(10, 10, 11, 0.52)),
    linear-gradient(90deg, rgba(10, 10, 11, 0.34), transparent 55%);
}

.cover-copy {
  position: absolute;
  left: 40px;
  right: 40px;
  bottom: 38px;
  color: rgb(241, 238, 235);
}

.cover-title {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  margin: 0;
  font-size: clamp(66px, 13.6vw, 220px);
  line-height: 0.76;
  letter-spacing: -0.085em;
  text-transform: uppercase;
  font-weight: 500;
  white-space: normal;
  overflow-wrap: normal;
}

.cover-side {
  position: absolute;
  right: 0;
  bottom: calc(100% + 28px);
  max-width: 360px;
}

.cover-meta {
  margin: 0 0 18px;
  font-size: 11px;
  line-height: 1.45;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  opacity: 0.72;
}

.cover-statement {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: rgba(241, 238, 235, 0.82);
}

.cover-hint {
  position: absolute;
  top: 50%;
  right: 32px;
  transform: translateY(-50%);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(241, 238, 235, 0.72);
  writing-mode: vertical-rl;
}

.photo-number {
  position: absolute;
  left: 28px;
  bottom: 24px;
  z-index: 3;
  color: rgba(248, 246, 244, 0.76);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  mix-blend-mode: difference;
}

.viewer-controls {
  position: fixed;
  z-index: 90;
  left: 0;
  right: 0;
  bottom: 0;
  height: 66px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 28px;
  pointer-events: none;
  color: rgba(248, 246, 244, 0.84);
  mix-blend-mode: difference;
}

.viewer-controls button {
  width: 44px;
  height: 44px;
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 25px;
  line-height: 1;
  cursor: pointer;
  pointer-events: auto;
}

.viewer-controls button:disabled {
  opacity: 0.22;
  cursor: default;
}

.prev-button { justify-self: start; }
.next-button { justify-self: end; }

.viewer-status {
  min-width: 90px;
  text-align: center;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.viewer-progress {
  position: fixed;
  z-index: 91;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: rgba(248, 246, 244, 0.10);
  mix-blend-mode: difference;
}

.viewer-progress span {
  display: block;
  width: 100%;
  height: 100%;
  background: rgba(248, 246, 244, 0.86);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 300ms cubic-bezier(0.16, 1, 0.3, 1);
}

@media (max-width: 840px) {
  :root { --nav-h: 52px; }

  .site-nav {
    display: flex;
    justify-content: space-between;
    padding: 0 16px;
  }

  .nav-links { display: none; }

  .logo,
  .back-link { font-size: 10px; }

  .cover-copy {
    left: 18px;
    right: 18px;
    bottom: 82px;
  }

  .cover-title {
    font-size: clamp(48px, 14.4vw, 82px);
    line-height: 0.8;
    white-space: normal;
  }

  .cover-side {
    position: static;
    max-width: 330px;
    margin-top: 28px;
  }

  .cover-meta { margin-bottom: 12px; }
  .cover-statement { font-size: 12px; }
  .cover-hint { display: none; }

  .photo-slide img {
    width: 100%;
    height: auto;
    max-height: calc(100vh - 52px);
  }

  .photo-slide.is-cover img {
    width: 100%;
    height: 100%;
  }

  .photo-number {
    left: 18px;
    bottom: 74px;
  }

  .viewer-controls { padding: 0 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .photo-track { scroll-behavior: auto; }
  .viewer-progress span { transition: none; }
}


/* Requested photography-viewer refinements */
.cover-hint,
.photo-number { display: none !important; }
.viewer-status:empty { opacity: 0; }
.photo-slide.is-portrait img {
  width: auto !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: contain !important;
}
.photo-slide.is-cover.is-portrait img {
  object-fit: contain !important;
  transform: none !important;
}


/* Final photo viewer fit fixes */
.photo-viewer,
.photo-track,
.photo-slide {
  height: 100svh !important;
  padding-top: 0 !important;
  margin-top: 0 !important;
}
.photo-slide:not(.is-cover) img,
.photo-slide.is-portrait:not(.is-cover) img {
  width: auto !important;
  height: auto !important;
  max-width: 100vw !important;
  max-height: 100svh !important;
  object-fit: contain !important;
  transform: none !important;
}
.photo-slide.is-cover img {
  width: 100% !important;
  height: 100% !important;
}
body[data-no-gesture="true"] .site-nav {
  top: 0 !important;
  background: transparent !important;
}
@media (max-width: 840px) {
  .photo-slide img,
  .photo-slide:not(.is-cover) img,
  .photo-slide.is-portrait:not(.is-cover) img {
    max-height: 100svh !important;
  }
}

.photo-slide.is-force-contain img { width: auto !important; height: auto !important; max-width: 100vw !important; max-height: 100svh !important; object-fit: contain !important; transform: none !important; }
