* { box-sizing: border-box; }
html, body { background: #fff; }
body { margin: 0; color: #171717; font: 13px/1 -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif; }
a:focus-visible, button:focus-visible { outline: 2px solid #171717; outline-offset: 4px; }
img { display: block; width: 100%; height: auto; }

.progress { position: fixed; z-index: 10; inset: 0 0 auto; height: 2px; background: #171717; transform: scaleX(0); transform-origin: left; }
.top-links { position: fixed; z-index: 10; top: 18px; right: clamp(16px, 3vw, 36px); display: flex; gap: 10px; align-items: stretch; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.insta { display: flex; align-items: center; gap: 8px; padding: 10px 14px; background: #fff; color: #171717; font-weight: 500; letter-spacing: .02em; cursor: default; box-shadow: 0 2px 10px rgba(0,0,0,.12); }
.insta svg { display: block; }
.main-link {
  display: flex; align-items: center;
  padding: 10px 14px; background: #fff; color: #171717;
  font-weight: 600; letter-spacing: .14em; text-decoration: none;
  box-shadow: 0 2px 10px rgba(0,0,0,.12);
}
.main-link:hover { background: #171717; color: #fff; }

.wall {
  display: flex; flex-direction: column; gap: clamp(32px, 3.6vw, 48px);
  max-width: 1160px; margin: 0 auto;
  padding: 88px clamp(24px, 5vw, 56px) clamp(72px, 8vw, 112px);
}
.pair { display: flex; gap: clamp(24px, 3.6vw, 48px); }
.pair.narrow { width: 100%; max-width: 780px; margin: 0 auto; }

/* Each photo's width follows its shape, so both photos in a row match in height. */
.a075 { --ratio: .75; }
.a088 { --ratio: .8815; }
.a133 { --ratio: 1.3333; }
.a150 { --ratio: 1.5; }
.a173 { --ratio: 1.731; }
.a174 { --ratio: 1.736; }
.a178 { --ratio: 1.778; }

figure {
  flex: var(--ratio) 1 0; min-width: 0; margin: 0; padding: 8px; background: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 6px 14px rgba(0,0,0,.08), 0 18px 40px rgba(0,0,0,.11);
  transition: transform .3s ease, box-shadow .3s ease;
}
figure:hover { transform: translateY(-4px); box-shadow: 0 2px 4px rgba(0,0,0,.08), 0 10px 20px rgba(0,0,0,.1), 0 28px 56px rgba(0,0,0,.15); }
figure a { display: block; cursor: zoom-in; }
figure img { aspect-ratio: var(--ratio); object-fit: cover; }

.reveal .pair { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal .pair.in { opacity: 1; transform: none; }

.viewer { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: #fff; overflow: hidden; }
.viewer[open] { display: flex; align-items: center; justify-content: center; }
.viewer img { width: auto; height: auto; max-width: calc(100vw - 150px); max-height: calc(100dvh - 64px); box-shadow: 0 10px 28px rgba(0,0,0,.12), 0 34px 80px rgba(0,0,0,.18); }
.viewer button { position: absolute; width: 48px; height: 48px; border: 0; background: #fff; color: #171717; font-size: 25px; cursor: pointer; }
.close { top: 10px; right: 12px; }
.prev { left: 12px; top: calc(50% - 24px); }
.next { right: 12px; top: calc(50% - 24px); }

@media (max-width: 620px) {
  .wall { padding: 76px 20px 64px; gap: 24px; }
  .pair { flex-direction: column; gap: 24px; }
  figure { flex: none; }
  .viewer img { max-width: 100vw; max-height: calc(100dvh - 140px); }
  .prev, .next { top: auto; bottom: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  figure { transition: none; }
  figure:hover { transform: none; }
  .reveal .pair { opacity: 1; transform: none; transition: none; }
}

/* A single photo on the last row sits centered at a comfortable size */
.pair.solo { width: 100%; max-width: 620px; margin: 0 auto; }
