:root {
  --bg: #f7f5f1;
  --charcoal: #171614;
  --line: #dcd6ca;
  --muted: #8a8378;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--charcoal);
  font-family: 'Space Grotesk', sans-serif;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}

.reel {
  height: 100vh;
  display: flex;
  align-items: stretch;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x proximity;
  cursor: grab;
}

.reel.dragging { cursor: grabbing; scroll-snap-type: none; }
.reel::-webkit-scrollbar { height: 4px; }
.reel::-webkit-scrollbar-thumb { background: var(--line); }

.page {
  flex-shrink: 0;
  height: 100%;
  scroll-snap-align: start;
  position: relative;
  padding: 60px 70px;
  border-right: 1px solid var(--line);
}

.page-num {
  position: absolute;
  bottom: 28px;
  right: 32px;
  font-size: 12px;
  color: var(--muted);
}

/* About text page */

.about-text { max-width: 420px; }

.about-text .name {
  font-size: clamp(28px, 3.4vw, 38px);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin: 0 0 28px;
}

.about-text .bio {
  font-size: 15px;
  line-height: 1.7;
  margin: 0 0 20px;
}
.about-text .bio:last-child { margin-bottom: 0; }

/* Photo scatter */

.scatter {
  display: flex;
  align-items: flex-start;
  gap: 40px;
  height: calc(100% - 40px);
}

.ph {
  margin: 0;
  flex-shrink: 0;
  display: flex;
  align-items: stretch;
  gap: 8px;
}

.ph.sm { width: 200px; }
.ph.md { width: 290px; }
.ph.lg { width: 380px; }

.ph.land.sm { width: 280px; }
.ph.land.md { width: 400px; }
.ph.land.lg { width: 500px; }

.ph.mt-0 { margin-top: 0; }
.ph.mt-1 { margin-top: 9vh; }
.ph.mt-2 { margin-top: 17vh; }
.ph.self-end { align-self: flex-end; }
.ph.self-start { align-self: flex-start; }

.ph.note {
  width: 230px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--charcoal);
  padding-top: 6px;
}

.ph.note.lg { width: 340px; }

.frame {
  flex: 1;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  position: relative;
  background: #111;
  border: 4px solid #111;
  box-sizing: border-box;
}

.ph.land .frame { aspect-ratio: 3 / 2; }

.frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  -webkit-user-drag: none;
}

.ph.contain .frame img { object-fit: contain; }

.ph figcaption {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-family: 'Source Serif 4', serif;
  font-style: italic;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  align-self: stretch;
  display: flex;
  align-items: flex-end;
}

/* Outro */

.page.outro {
  width: 40vw;
  min-width: 320px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-right: none;
}

.page.outro .quote {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted);
  margin: 0 0 16px;
}

.page.outro a {
  font-size: 18px;
  color: var(--charcoal);
  text-decoration: none;
  border-bottom: 1px solid var(--charcoal);
  padding-bottom: 2px;
  align-self: flex-start;
}

.page.outro a:hover { opacity: 0.6; }

/* Scroll hint arrow */

.scroll-hint {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(247, 245, 241, 0.9);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--charcoal);
  pointer-events: none;
  z-index: 50;
  animation: hint-bounce 1.6s ease-in-out infinite;
  transition: opacity 0.4s ease;
}

.scroll-hint-label {
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.scroll-hint-arrow { font-size: 18px; }

.scroll-hint.hidden { opacity: 0; }

@keyframes hint-bounce {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(8px); }
}

/* Lightbox */

.frame img { cursor: zoom-in; }

.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10, 9, 8, 0.94);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 32px;
  z-index: 200;
  cursor: zoom-out;
}

.lightbox.open { display: flex; }

.lightbox img {
  max-width: 92vw;
  max-height: 80vh;
  object-fit: contain;
  cursor: default;
}

.lightbox p {
  color: #eae6de;
  font-size: 13px;
  letter-spacing: 0.04em;
  margin: 18px 0 0;
  text-align: center;
  max-width: 600px;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  background: none;
  border: none;
  color: #eae6de;
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
  padding: 6px 10px;
}

/* Mobile: same look and feel, but scrolling down instead of sideways */

@media (max-width: 720px) {
  .reel {
    flex-direction: column;
    align-items: stretch;
    height: auto;
    overflow-x: hidden;
    overflow-y: visible;
    scroll-snap-type: none;
    cursor: default;
  }

  .reel.dragging { cursor: default; }

  .page {
    width: 100% !important;
    min-width: 0 !important;
    height: auto;
    padding: 44px 20px;
    border-right: none;
    border-bottom: 1px solid var(--line);
  }

  .scatter {
    flex-direction: column;
    align-items: stretch;
    height: auto;
    gap: 34px;
  }

  .ph.mt-0, .ph.mt-1, .ph.mt-2 { margin-top: 0; }
  .ph.self-end { align-self: flex-end; }
  .ph.self-start { align-self: flex-start; }

  .ph.sm { width: 62vw; }
  .ph.md { width: 78vw; }
  .ph.lg { width: 90vw; }

  .ph.land.sm { width: 78vw; }
  .ph.land.md { width: 90vw; }
  .ph.land.lg { width: 94vw; }

  .ph.note { width: 82vw; }
  .ph.note.lg { width: 88vw; }

  .about-text { max-width: 84vw; }

  .page.outro {
    width: 100%;
    min-width: 0;
    align-items: center;
    text-align: center;
    border-bottom: none;
  }

  .page.outro a { align-self: center; }

  .scroll-hint {
    top: 50%;
    left: 50%;
    right: auto;
    bottom: auto;
    width: 74px;
    height: 74px;
    animation: hint-bounce-down 1.6s ease-in-out infinite;
  }

  .scroll-hint-arrow {
    font-size: 20px;
    display: inline-block;
    transform: rotate(90deg);
  }
}

@keyframes hint-bounce-down {
  0%, 100% { transform: translate(-50%, -50%) translateY(0); }
  50% { transform: translate(-50%, -50%) translateY(8px); }
}
