/* ══════════════════════════════════════
   TOKENS
══════════════════════════════════════ */
:root {
  --bg:        #272523;
  --ink:       #f0ece4;
  --ink-dim:   rgba(240,236,228,0.42);
  --ink-nav:   rgba(240,236,228,0.82);
  --accent:    #e05a2b;
  --shadow:    rgba(0,0,0,0.55);
  --menu-bg:   rgba(30,28,26,0.97);

  --top-h: 64px;
  --bot-h: 52px;

  --font-logo:    'Bebas Neue', Impact, sans-serif;
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body:    'DM Sans', system-ui, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

[data-theme="light"] {
  --bg:      #e0dbd3;
  --ink:     #1a1714;
  --ink-dim: rgba(26,23,20,0.40);
  --ink-nav: rgba(26,23,20,0.80);
  --shadow:  rgba(0,0,0,0.13);
  --menu-bg: rgba(224,219,211,0.97);
}

/* ══════════════════════════════════════
   RESET
══════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  width: 100%; height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 14px;
  line-height: 1.65;
  transition: background 0.4s var(--ease), color 0.4s var(--ease);
}

a { color: inherit; text-decoration: none; }
button { background: none; border: none; cursor: pointer; color: inherit; font-family: inherit; padding: 0; }
img { display: block; max-width: 100%; }

/* ══════════════════════════════════════
   GRAIN CANVAS
   JS renders animated Perlin-style noise
   on a half-resolution canvas.
══════════════════════════════════════ */
#grain {
  position: fixed;
  inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 1;   /* behind the stage, nav, everything — only tints bare bg */
  opacity: 0.12;
  mix-blend-mode: overlay;
}
[data-theme="light"] #grain {
  opacity: 0.13;
  mix-blend-mode: multiply;
}

/* ══════════════════════════════════════
   TOP BAR
══════════════════════════════════════ */
.top-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--top-h);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 14px 28px 0;
  z-index: 200;
}

/* LOGO */
.logo {
  font-family: var(--font-logo);
  font-size: clamp(1.1rem, 3.2vw, 2.8rem);  /* smaller floor for mobile */
  line-height: 0.88;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  background: var(--ink);
  color: var(--bg);
  padding: 5px 9px 7px;
  display: inline-block;
  transition: opacity 0.2s, background 0.4s, color 0.4s;
}
.logo:hover { opacity: 0.72; }

/* DESKTOP NAV */
.desktop-nav {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
  padding-top: 2px;
}
.top-nav__link {
  font-family: var(--font-body);
  font-size: clamp(15px, 1.3vw, 18px);
  font-weight: 400;
  letter-spacing: 0.01em;
  color: var(--ink-nav);
  transition: color 0.2s;
  line-height: 1.7;
}
.top-nav__link:hover  { color: var(--accent); }
.top-nav__link.active { color: var(--accent); }

/* HAMBURGER (mobile only) */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px; height: 40px;
  padding: 4px;
  margin-top: -2px;
  z-index: 300;
}
.hamburger span {
  display: block;
  width: 22px; height: 1.5px;
  background: var(--ink);
  transition: transform 0.3s var(--ease), opacity 0.2s;
}
.hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ══════════════════════════════════════
   MOBILE DROPDOWN MENU
══════════════════════════════════════ */
.mobile-menu {
  position: fixed;
  top: var(--top-h);
  right: 0;
  width: min(280px, 88vw);
  background: var(--menu-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 190;
  border-left: 1px solid rgba(255,255,255,0.06);
  border-bottom: 1px solid rgba(255,255,255,0.06);

  /* hidden state */
  transform: translateY(-12px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.35s var(--ease), opacity 0.3s var(--ease);
}
[data-theme="light"] .mobile-menu {
  border-color: rgba(0,0,0,0.07);
}
.mobile-menu.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: all;
}

.mobile-menu__nav {
  display: flex;
  flex-direction: column;
  padding: 12px 0 0;
}
.mobile-menu__link {
  font-family: var(--font-body);
  font-size: 18px;
  font-weight: 400;
  color: var(--ink-nav);
  padding: 14px 24px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  transition: color 0.2s;
}
[data-theme="light"] .mobile-menu__link { border-bottom-color: rgba(0,0,0,0.06); }
.mobile-menu__link:hover  { color: var(--accent); }
.mobile-menu__link.active { color: var(--accent); }

.mobile-menu__bottom {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 14px 18px;
}
.mobile-menu__icon-btn {
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px;
  color: var(--ink-dim);
  border-radius: 50%;
  transition: color 0.2s;
}
.mobile-menu__icon-btn:hover { color: var(--ink); }

/* ══════════════════════════════════════
   STAGE
══════════════════════════════════════ */
.stage {
  position: fixed;
  top: var(--top-h); left: 0; right: 0; bottom: var(--bot-h);
  z-index: 10;
}

/* ══════════════════════════════════════
   VIEWS
══════════════════════════════════════ */
.view {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.55s var(--ease);
}
.view.active {
  opacity: 1;
  pointer-events: all;
}

/* ══════════════════════════════════════
   PIC PICKS — internal scroll, snapping
══════════════════════════════════════ */
.view--work { display: flex; flex-direction: column; }

.filmstrip-scroll {
  flex: 1;
  overflow-y: scroll;
  overflow-x: hidden;
  scrollbar-width: none;
  /* snap container */
  scroll-snap-type: y mandatory;
  -webkit-overflow-scrolling: touch;
}
.filmstrip-scroll::-webkit-scrollbar { display: none; }

.filmstrip {
  display: flex;
  flex-direction: column;
  gap: clamp(16px, 3vh, 36px);
}

/* Each row is exactly the scroll container height so photos snap to centre */
.photo-row {
  scroll-snap-align: center;
  /* removed scroll-snap-stop: always so first/last aren't blocked */

  height: 100%;
  flex-shrink: 0;

  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 clamp(64px, 14vw, 220px);
}

.photo-img {
  /* never taller than 82% of the row, never wider than available width */
  max-width: 100%;
  max-height: 82%;
  width: auto;
  height: auto;
  display: block;
  box-shadow: 0 8px 48px var(--shadow);
  filter: grayscale(1);
  transition: filter 0.8s ease;
  object-fit: contain;
}
.photo-row.in-view .photo-img { filter: grayscale(0); }

/* ══════════════════════════════════════
   ABOUT — matches reference layout
══════════════════════════════════════ */
.view--about { overflow: hidden; }

.about {
  display: grid;
  grid-template-columns: 300px 1fr;
  height: 100%;
  max-width: 1100px;      /* cap width so it doesn't sprawl on wide screens */
  margin: 0 auto;         /* centre the whole block */
}

/* LEFT: portrait flush to top */
.about__left {
  height: 100%;
  overflow: hidden;
}
.about__portrait {
  width: 100%;
  height: 100%;
  max-height: 500px;
  overflow: hidden;
}
.about__portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  filter: none;
}

/* RIGHT: greeting top, text below */
.about__right {
  display: flex;
  flex-direction: column;
  padding: 32px 40px 32px 48px;
  height: 100%;
}

.about__greeting {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 1.8vw, 1.55rem);
  font-weight: 400;
  font-style: italic;
  color: var(--ink);
  margin-bottom: 36px;
  line-height: 1.2;
}

.about__cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 44px;
  align-items: start;
}

.about__text {
  font-family: var(--font-body);
  font-size: clamp(0.82rem, 1vw, 0.95rem);
  font-weight: 300;
  line-height: 1.85;
  color: var(--ink);
}
.about__text--dim { color: var(--ink-dim); }

.about__link {
  color: var(--ink);
  font-weight: 400;
  border-bottom: 1px solid currentColor;
  padding-bottom: 1px;
  transition: color 0.2s;
}
.about__link:hover { color: var(--accent); }

/* ══════════════════════════════════════
   BOTTOM BAR
══════════════════════════════════════ */
.bottom-bar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--bot-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
  z-index: 100;
}

.bottom-bar__copy {
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--ink-dim);
  position: absolute;
  left: 50%; transform: translateX(-50%);
}

.bottom-bar__btn {
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px;
  color: var(--ink-dim);
  border-radius: 50%;
  transition: color 0.2s;
}
.bottom-bar__btn:hover { color: var(--ink); }
.bottom-bar__icons { display: flex; gap: 4px; }
.icon { width: 24px; height: 24px; flex-shrink: 0; }

/* ══════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════ */
@media (max-width: 768px) {
  .desktop-nav { display: none; }
  .hamburger   { display: flex; }
  .bottom-bar  { display: none; }  /* icons live in mobile menu on phone */

  .stage { bottom: 0; }

  .about {
    grid-template-columns: 1fr;
    overflow-y: auto;
    height: auto;
    min-height: 100%;
    max-width: 100%;
  }
  .about__left { height: 260px; max-height: 260px; }
  .about__portrait { max-height: 260px; }
  .about__right { padding: 24px 20px 40px; height: auto; }
  .about__cols  { grid-template-columns: 1fr; gap: 16px; }

  .photo-row { padding: 0 16px; }
}

/* ══════════════════════════════════════
   REDUCED MOTION
══════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  .photo-img, .view, .mobile-menu { transition-duration: 0.01ms !important; }
}
