/* Films read as a screening program, with the title alongside each frame. */
#videos .grid { display: block; }
#videos .project:nth-child(n) {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr);
  align-items: center;
  gap: clamp(16px, 4vw, 64px);
  width: 100%;
  margin: 0;
  padding-block: clamp(14px, 2vw, 28px);
  border-bottom: 1px solid #f2f0e72e;
}
#videos .project-info { grid-area: 1 / 1; border: 0; }
#videos .project-info strong { font-size: clamp(24px, 4vw, 66px); line-height: .96; }
#videos .project-image { grid-area: 1 / 2; aspect-ratio: 2.05; }
#videos .project:first-child .project-image { aspect-ratio: 1.64; }
#videos .project:is(:hover, :focus-visible) strong { color: var(--chapter); }

/* The photo viewer pairs a single print with a selectable contact sheet. */
.photo-stage {
  background: #261b24;
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  border: 1px solid #f3a5d36b;
}
.photo-stage-frame {
  position: relative;
  display: grid;
  isolation: isolate;
  place-items: center;
  width: 100%;
  aspect-ratio: 1.46;
  border: 0;
  --print-margin: clamp(12px, 2.7vw, 44px);
  padding: 0;
  background: radial-gradient(ellipse, #8d536f 0%, #463042 58%, #241922 100%);
  overflow: hidden;
  cursor: zoom-in;
  touch-action: pan-y pinch-zoom;
}
.photo-stage-frame::before {
  content: "";
  inset: 8% 8%;
  position: absolute;
  z-index: -1;
  border: 1px solid #f3a5d34a;
  border-radius: 50%;
  transform: rotate(-14deg);
}
.photo-stage-frame img {
  position: absolute;
  inset: var(--print-margin);
  width: calc(100% - 2 * var(--print-margin));
  height: calc(100% - 2 * var(--print-margin));
  object-fit: contain;
  filter: drop-shadow(0 14px 22px #130b11a6);
}
.photo-enlarge {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 7px 9px;
  font-size: 13px;
  background: #110b10e6;
  border: 1px solid #f3a5d361;
}
.photo-stage-console {
  display: flex;
  flex-direction: column;
  justify-content: end;
  align-items: start;
  gap: clamp(16px, 4vw, 50px);
  padding: clamp(20px, 4vw, 62px);
}
.photo-stage-count { font: 14px ui-monospace, monospace; color: var(--chapter); }
.photo-stage-caption h3 {
  margin: 12px 0 0;
  color: var(--text);
  font: italic 400 clamp(30px, 4.5vw, 75px)/.94 Georgia, serif;
  letter-spacing: -.07em;
}
.photo-stage-controls { display: flex; gap: 10px; }
.photo-stage-controls button {
  width: 46px;
  height: 46px;
  border: 1px solid var(--chapter);
  background: transparent;
  color: var(--chapter);
  cursor: pointer;
  font-size: 24px;
}
.photo-stage-controls button:is(:hover, :focus-visible) { background: var(--chapter); color: var(--ink); }
#photos .contact-sheet {
  display: grid;
  grid-template-columns: none;
  grid-auto-flow: column;
  grid-auto-columns: clamp(78px, 10vw, 152px);
  gap: 10px;
  overflow-x: auto;
  padding: 17px 6px;
  background: repeating-linear-gradient(90deg, #f3a5d342 0 6px, transparent 6px 15px) top / 100% 3px no-repeat;
  margin-top: 17px;
  scrollbar-color: #9f6c8c #261b24;
}
.contact-sheet .photo { border: 2px solid transparent; }
.contact-sheet .photo[aria-current] { border-color: var(--chapter); }
.contact-sheet .photo img { aspect-ratio: 1; object-fit: cover; }
.contact-sheet .photo span { font-size: 12px; padding: 7px; }

/* Personal work alternates between wide scenes and smaller editorial frames. */
#personal > .grid { grid-template-columns: repeat(12, minmax(0, 1fr)); }
#personal > .grid > .project:nth-child(1) { grid-column: span 12; }
#personal > .grid > .project:nth-child(2n) { grid-column: span 7; }
#personal > .grid > .project:nth-child(2n+3) { grid-column: span 5; align-self: end; }
#personal .project-info { border: 0; }
#personal .project-info strong { font-family: Georgia, serif; font-weight: 400; letter-spacing: -.045em; }
/* Leeds is laid out as a film contact print. Beach is a spread of loose prints. */
.personal-collection { padding: clamp(16px, 4vw, 60px); }
.personal-collection .section-head { margin-bottom: clamp(20px, 4vw, 52px); }
.personal-collection h3 { font: italic 400 clamp(36px, 6.2vw, 96px)/.89 Georgia, serif; }
.leeds-edit {
  background: #202033;
  color: #e8e7ff;
  border: 1px solid #b9bcff66;
}
#personal .leeds-grid {
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(12px, 2.1vw, 32px);
  align-items: center;
}
.leeds-grid .photo {
  position: relative;
  grid-column: span 6;
  padding: 12px 0;
  background:
    repeating-linear-gradient(90deg, #b9bcff65 0 6px, transparent 6px 14px) top / 100% 3px no-repeat,
    repeating-linear-gradient(90deg, #b9bcff65 0 6px, transparent 6px 14px) bottom / 100% 3px no-repeat,
    #100f16;
  border: 0;
}
.leeds-grid .photo:nth-child(4n+1) { grid-column: span 8; }
.leeds-grid .photo:nth-child(4n+2) { grid-column: span 4; }
.leeds-grid .photo:nth-child(4n+3) { grid-column: 2 / span 5; }
.leeds-grid .photo:nth-child(4n+4) { grid-column: 7 / span 5; }
.leeds-grid .photo img { width: 100%; height: auto; }
.leeds-grid .photo:is(:hover, :focus-visible) img { transform: scale(1.035); filter: brightness(1.1); }
.beach-edit {
  background: radial-gradient(ellipse at 65% 22%, #18394b, #101d29 72%);
  color: #e4f7ff;
  border: 1px solid #87cbd76b;
}
#personal .beach-grid {
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: clamp(13px, 2.4vw, 36px);
  align-items: start;
}
.beach-grid .photo {
  --angle: -4deg;
  position: relative;
  grid-column: span 2;
  border: clamp(4px, .8vw, 10px) solid #e6ebe5;
  background: #e6ebe5;
  box-shadow: 0 12px 24px #04091088;
  transform: rotate(var(--angle));
  transition: transform .32s cubic-bezier(.2,.7,.25,1), box-shadow .32s;
}
.beach-grid .photo:first-child {
  grid-column: 2 / span 6;
  max-width: 760px;
  margin-bottom: clamp(14px, 3vw, 38px);
  --angle: -2deg;
}
.beach-grid .photo:nth-child(even) { --angle: 4deg; }
.beach-grid .photo:nth-child(3), .beach-grid .photo:nth-child(5) { margin-top: clamp(12px, 3vw, 44px); }
.beach-grid .photo:is(:hover, :focus-visible) {
  z-index: 1;
  transform: translateY(-6px) rotate(0);
  box-shadow: 0 18px 36px #040910a8;
}
.beach-grid .photo:is(:hover, :focus-visible) img { transform: none; }
@media (max-width: 670px) {
  #personal .leeds-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .leeds-grid .photo:nth-child(n) { grid-column: auto; }
  .leeds-grid .photo:nth-child(4n+1) { grid-column: 1 / -1; }
  .leeds-grid .photo:nth-child(4n+4) { grid-column: 2; }
  #personal .beach-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .beach-grid .photo { grid-column: span 1; }
  .beach-grid .photo:first-child { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) {
  .leeds-grid .photo:is(:hover, :focus-visible) img { transform: none; }
  .beach-grid .photo:is(:hover, :focus-visible) { transform: rotate(var(--angle)); }
}

/* BTS mixes portrait snapshots with strips of footage, like a production wall. */
#bts .bts-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: start; }
.bts-grid > .project { grid-column: span 2; }
.bts-grid > .project:nth-of-type(3n+2) .project-image { aspect-ratio: 1.75; }
.bts-grid > .project:nth-of-type(3n+3) { grid-column: span 3; }
.bts-grid .bts-photo {
  align-self: center;
  border: clamp(4px, 1vw, 12px) solid #e8d6c4;
  aspect-ratio: 3/4;
  transform: rotate(3deg);
  margin: 8%;
}
.bts-grid .bts-photo:nth-of-type(even) { transform: rotate(-4deg); }
@media (max-width: 670px) {
  .photo-stage { grid-template-columns: 1fr; }
  .photo-stage-frame { aspect-ratio: 1.15; }
  .photo-stage-console { flex-direction: row; justify-content: space-between; align-items: center; gap: 10px; padding: 14px; }
  .photo-stage-caption h3 { font-size: clamp(28px, 7vw, 44px); }
  .photo-stage-controls button { width: 40px; height: 44px; }
  #videos .project:nth-child(n) { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); }
  #videos .project-image { aspect-ratio: 1.48; }
  #videos .play, .bts-grid .play { width: 33px; height: 33px; font-size: 11px; inset: auto 7px 7px auto; }
  #bts .bts-grid { gap: 13px; }
}

/* Keep vertical campaign previews fully visible in the screening program. */
#videos .portrait-project video { object-fit: contain; background: #0c0c0b; }
