/* ===== Base ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #6b6459;
  --fg: #f0eadd;
  --sans: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --mono: "Courier Prime", "Courier New", monospace;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--mono);
  background: var(--bg);
  color: var(--fg);
  line-height: 1.75;
  /* the whole page darkens as the evening progresses */
  transition: background-color 1.1s ease, color 1.1s ease;
}

em {
  font-family: var(--sans);
  font-style: italic;
  font-weight: 400;
}

button {
  font: inherit;
}

/* ===== Header ===== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 22px 4vw;
  mix-blend-mode: difference;
  color: #fff;
}

.wordmark {
  font-family: var(--sans);
  font-style: italic;
  font-weight: 500;
  font-size: 17px;
  letter-spacing: 0.02em;
  color: #fff;
  text-decoration: none;
}

.site-nav a {
  margin-left: 26px;
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 4px;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  opacity: 0.85;
  transition: opacity 0.2s;
}

.site-nav a:hover {
  opacity: 1;
}

/* ===== Hero ===== */
.hero {
  position: relative;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  background: #23201c;
}

.hero-bg {
  position: absolute;
  inset: 0;
}

.hero-base {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.62) saturate(0.9);
  opacity: 0;
  transition: opacity 1.2s ease;
}

.hero-base.is-active {
  opacity: 1;
}

/* calm gradient scrim so the strip and the name sit naturally on the image */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to bottom,
    rgba(12, 13, 18, 0.35) 0%,
    rgba(12, 13, 18, 0) 35%,
    rgba(12, 13, 18, 0) 55%,
    rgba(12, 13, 18, 0.72) 100%
  );
  pointer-events: none;
}

/* name block, reference-style: quiet, upper-left in the sky */
.hero-id {
  position: absolute;
  left: 6vw;
  top: 30%;
  z-index: 3;
  color: #f0ebdf;
  text-shadow: 0 1px 22px rgba(0, 0, 0, 0.6);
}

/* chronological contact strip along the bottom — drifts by itself,
   pauses while you hover it (JS builds the looping track) */
.hero-strip {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  gap: 14px;
  padding: 4vh 0 4.5vh;
  overflow: hidden;
  scrollbar-width: none;
}

.hero-strip::-webkit-scrollbar {
  display: none;
}

.strip-track {
  display: flex;
  align-items: flex-end;
  will-change: transform;
}

.hero-strip {
  cursor: grab;
  touch-action: pan-y;
}

.hero-strip.is-dragging {
  cursor: grabbing;
}

.strip-copy {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  padding-right: 14px;
}


.still {
  flex: 0 0 auto;
  border: none;
  padding: 0;
  background: none;
  cursor: zoom-in;
  transition: transform 0.3s ease;
}

.still img {
  height: 15vh;
  width: auto;
  display: block;
  box-shadow: 0 14px 34px -12px rgba(0, 0, 0, 0.6);
}

.still span {
  display: block;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: #e8e3d7;
  opacity: 0.7;
  text-align: left;
  padding-top: 7px;
}

.still:hover {
  transform: translateY(-6px);
}

.still:hover span {
  opacity: 1;
}

.hero-name {
  font-family: var(--sans);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(30px, 3.4vw, 46px);
  line-height: 1.1;
  letter-spacing: 0.01em;
  display: inline-block;
  border-bottom: 1px solid rgba(240, 235, 223, 0.75);
  padding-bottom: 8px;
  margin-bottom: 14px;
}

.hero-role {
  font-size: 13.5px;
  letter-spacing: 0.03em;
  opacity: 0.95;
}

.hero-date {
  font-size: 12.5px;
  letter-spacing: 0.03em;
  opacity: 0.7;
  margin-top: 4px;
}

.hero-scroll {
  position: absolute;
  bottom: 26px;
  right: 4vw;
  z-index: 3;
  color: #f0ebdf;
  font-size: 13px;
  opacity: 0.8;
}

/* ===== Intro ===== */
.intro {
  padding: 24vh 4vw;
}

.intro-text {
  font-size: clamp(16px, 1.8vw, 21px);
  line-height: 2;
  max-width: 34em;
  margin: 0 auto 36px;
}

.intro-text em {
  font-size: 1.15em;
}

.intro-meta {
  font-size: 13px;
  letter-spacing: 0.05em;
  opacity: 0.55;
  max-width: 34em;
  margin: 0 auto;
}

/* ===== Frames ===== */
.frame {
  padding: 13vh 4vw;
  max-width: 1500px;
  margin: 0 auto;
}

/* default layout: photo + text block overlapping the photo edge */
.frame:not(.lay-on):not(.is-full) {
  display: grid;
  grid-template-columns: minmax(250px, 4fr) 7fr;
  align-items: end;
}

.frame:not(.lay-on):not(.is-full) .frame-meta {
  z-index: 2;
  margin-right: -7vw;
  margin-bottom: 5vh;
  text-shadow: 0 1px 14px rgba(10, 10, 12, 0.65);
}

.frame.is-flipped:not(.lay-on) {
  grid-template-columns: 7fr minmax(250px, 4fr);
  align-items: start;
}

.frame.is-flipped:not(.lay-on) .frame-meta {
  order: 2;
  margin-right: 0;
  margin-left: -9vw;
  margin-top: 7vh;
  margin-bottom: 0;
}

.frame.is-flipped:not(.lay-on) .frame-photo {
  order: 1;
}

.frame-no {
  font-size: 12px;
  letter-spacing: 0.1em;
  opacity: 0.55;
  margin-bottom: 18px;
}

.frame-time {
  font-family: var(--mono);
  font-weight: 700;
  font-size: clamp(34px, 3.6vw, 56px);
  line-height: 1;
  letter-spacing: -0.02em;
}

.frame-title {
  font-family: var(--sans);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(20px, 2vw, 28px);
  margin-top: 12px;
}

.frame-desc {
  font-size: 14px;
  max-width: 26em;
  margin-top: 12px;
  opacity: 0.9;
}

.frame-data {
  font-size: 12px;
  letter-spacing: 0.03em;
  margin-top: 16px;
  opacity: 0.65;
}

/* photos: square, frameless */
.frame-photo {
  cursor: zoom-in;
  width: 100%;
}

.frame-photo img {
  width: 100%;
  display: block;
  box-shadow: 0 30px 70px -30px rgba(0, 0, 0, 0.65);
}

.frame-photo.is-tall {
  max-width: 560px;
}

/* lay-on: the text sits on the photo */
.frame.lay-on {
  position: relative;
  max-width: 1240px;
}

.frame.lay-on .frame-photo {
  max-width: 1080px;
  margin: 0 auto;
}

.frame.lay-on .frame-photo.is-tall {
  max-width: 620px;
}

.frame.lay-on .frame-meta {
  position: absolute;
  z-index: 2;
  max-width: 30em;
  color: #f2ede2;
  text-shadow: 0 1px 4px rgba(8, 8, 10, 0.8), 0 2px 22px rgba(8, 8, 10, 0.55);
}

.frame.lay-on.pos-bl .frame-meta { left: 8%;  bottom: 9%; }
.frame.lay-on.pos-tl .frame-meta { left: 8%;  top: 9%; }
.frame.lay-on.pos-tr .frame-meta { right: 8%; top: 9%; text-align: right; }
.frame.lay-on.pos-br .frame-meta { right: 8%; bottom: 9%; text-align: right; }

/* full-bleed with picture-in-picture */
.frame.is-full {
  max-width: none;
  padding: 13vh 0;
}

.frame-photo.is-bleed {
  position: relative;
  cursor: default;
}

.frame-photo.is-bleed > img {
  width: 100%;
  max-height: 94vh;
  object-fit: cover;
  box-shadow: none;
}

.frame-meta.on-bleed {
  position: absolute;
  right: 6%;
  bottom: 12%;
  z-index: 2;
  text-align: right;
  max-width: 26em;
  color: #f2e9da;
  text-shadow: 0 1px 4px rgba(20, 10, 5, 0.8), 0 2px 24px rgba(20, 10, 5, 0.5);
}

/* full-bleed text in the dark upper-left instead of lower-right */
.frame-meta.on-bleed.at-tl {
  left: 6%;
  right: auto;
  top: 10%;
  bottom: auto;
  text-align: left;
}

/* per-frame placement helpers:
   meta-top   — text aligns to the top of the photo instead of sinking
   meta-clear — text stays entirely off the photo (no overlap, no shadow)
   keep-ratio — a full-width photo keeps its whole height, no cropping */
.frame.meta-top:not(.lay-on):not(.is-full) {
  align-items: start;
}

.frame.meta-top:not(.lay-on) .frame-meta {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

.frame.meta-clear:not(.lay-on) .frame-meta {
  margin-left: 3vw !important;
  margin-right: 3vw !important;
  text-shadow: none;
}

.frame-photo.is-bleed.keep-ratio > img {
  max-height: none;
}

/* scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ===== About / Contact ===== */
.about {
  padding: 24vh 4vw;
}

.about-kicker,
.contact-kicker {
  font-size: 13px;
  letter-spacing: 0.06em;
  opacity: 0.55;
  margin-bottom: 28px;
}

.about-kicker {
  max-width: 34em;
  margin-left: auto;
  margin-right: auto;
}

.about-text {
  font-size: clamp(16px, 1.8vw, 21px);
  line-height: 2;
  max-width: 34em;
  margin: 0 auto;
}

.about-text em {
  font-size: 1.15em;
}

.contact {
  padding: 18vh 4vw 8vh;
  text-align: center;
}

.contact-link {
  font-family: var(--sans);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(22px, 2.8vw, 38px);
  color: currentColor;
  text-decoration: underline;
  text-underline-offset: 7px;
  text-decoration-thickness: 1px;
  transition: opacity 0.2s;
}

.contact-link:hover {
  opacity: 0.65;
}

.footer-note {
  font-size: 12px;
  letter-spacing: 0.04em;
  margin-top: 14vh;
  opacity: 0.4;
}

/* ===== Lightbox ===== */
.lightbox[hidden] {
  display: none;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(8, 8, 11, 0.95);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 5vh 4vw;
}

.lightbox-img {
  max-width: 100%;
  max-height: 84vh;
  object-fit: contain;
}

.lightbox-caption {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.05em;
  color: #b3afa5;
  margin-top: 18px;
}

.lightbox-close {
  position: absolute;
  top: 14px;
  right: 26px;
  background: none;
  border: none;
  color: #fff;
  font-size: 42px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.8;
}

.lightbox-close:hover {
  opacity: 1;
}

/* ===== Responsive ===== */
@media (max-width: 880px) {
  .frame:not(.lay-on):not(.is-full),
  .frame.is-flipped:not(.lay-on) {
    grid-template-columns: 1fr;
    gap: 30px;
    padding: 9vh 6vw;
  }

  .frame:not(.lay-on):not(.is-full) .frame-meta,
  .frame.is-flipped:not(.lay-on) .frame-meta {
    order: 1;
    margin: 0;
    text-shadow: none;
  }

  .frame:not(.lay-on):not(.is-full) .frame-photo,
  .frame.is-flipped:not(.lay-on) .frame-photo {
    order: 2;
  }

  .frame-photo.is-tall {
    max-width: none;
  }

  /* lay-on keeps text on the photo, just closer to the edge */
  .frame.lay-on.pos-bl .frame-meta { left: 6%;  bottom: 6%; }
  .frame.lay-on.pos-tl .frame-meta { left: 6%;  top: 6%; }

  .frame.lay-on .frame-desc {
    display: none; /* keep overlays light on small screens */
  }

  /* hero: name below the stacked header, strip swipes horizontally */
  .hero-id {
    left: 6vw;
    top: 26%;
  }

  .still img {
    height: 13vh;
  }

  .frame-meta.on-bleed {
    right: 6%;
    bottom: 8%;
  }

  .frame-meta.on-bleed .frame-desc {
    display: none;
  }
}

@media (max-width: 560px) {
  .site-header {
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 14px 5vw;
  }

  .site-nav a {
    margin: 0 8px;
  }
}

/* respect users who prefer no motion */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  body,
  .still {
    transition: none;
  }

  /* let the strip be swiped by hand instead of drifting */
  .strip-track {
    animation: none;
  }

  .hero-strip {
    overflow-x: auto;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
