/* Projects: a 3D stack of websites that flies past as you scroll */
.wv { max-width: none; padding-left: 0; padding-right: 0; padding-bottom: 0; overflow-x: clip; }
.wv > .head-row { box-sizing: content-box; max-width: min(1312px, calc(100% - 2 * var(--gutter))); margin-left: auto; margin-right: auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.wv-deck { display: none; }

/* captions: a plain list of links until JS takes over */
.wv-caps { list-style: none; display: grid; gap: 10px; margin: 0; padding: 0 var(--gutter); }
.wv-caps a { display: grid; grid-template-columns: 1.3fr 1.2fr auto; gap: 24px; align-items: center; padding: 16px 0; border-top: 1px dashed var(--red); }
.wv-caps small { display: block; font-size: 14px; color: var(--mute); }
.wv-caps strong { display: block; margin-top: 2px; font-size: clamp(24px, 3vw, 44px); font-weight: 500; line-height: 1.05; letter-spacing: -0.04em; }
.wv-caps__m { display: flex; align-items: baseline; gap: 14px; }
.wv-caps__m b { font-size: clamp(30px, 4vw, 60px); font-weight: 500; line-height: 1; letter-spacing: -0.05em; color: var(--red); white-space: nowrap; }
.wv-caps__m small { max-width: 17ch; line-height: 1.25; }
.wv-caps em { font-size: 15px; font-style: normal; font-weight: 500; white-space: nowrap; }
.wv-caps a:hover em { text-decoration: underline; text-underline-offset: 4px; }

/* live captions: stacked in one spot, only the active one shows */
.is-live .wv-caps { position: relative; z-index: 2; grid-template-columns: 1fr; gap: 0; background: linear-gradient(transparent, var(--bg) 22%); }
.is-live .wv-caps li { grid-area: 1 / 1; opacity: 0; transform: translateY(12px); pointer-events: none; transition: opacity .3s, transform .5s var(--ease); }
.is-live .wv-caps li.on { opacity: 1; transform: none; pointer-events: auto; }
.is-live .wv-caps a { border-top: 0; }

.is-live .wv__track { height: 400svh; }
.is-live .wv__pin { position: sticky; top: 0; height: 100svh; overflow: hidden; display: grid; grid-template-rows: 1fr auto; padding-top: 76px; padding-bottom: 28px; box-sizing: border-box; }

/* the stack */
.is-live .wv-deck { display: block; position: relative; min-height: 0; perspective: 1500px; perspective-origin: 50% 20%; }
.wv-deck__tilt { position: absolute; inset: 0; transform-style: preserve-3d; transform: rotateX(12deg); }
.wv-page { position: absolute; left: 50%; top: 56%; width: min(66vw, 860px, 104svh); aspect-ratio: 16 / 10; translate: -50% -50%; border-radius: 12px; overflow: hidden; background: #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.08), 0 40px 70px -30px rgba(0,0,0,.5); pointer-events: none; will-change: transform, opacity; -webkit-user-drag: none; }
.wv-page img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.wv-page.on { pointer-events: auto; }
.wv-page.on:hover { box-shadow: 0 0 0 2px var(--red), 0 40px 70px -30px rgba(0,0,0,.5); }

@media (max-width: 760px) {
  .wv-caps a { grid-template-columns: 1fr; gap: 6px; padding: 10px 0; }
  .wv-caps__m b { font-size: 34px; }
  .wv-caps em { font-size: 14px; }
  .wv-page { width: 86vw; top: 52%; }
}
