/* Portfolio and project pages. Tokens, nav, buttons, cursor and footer come from ../style.css */

body { background: var(--bg); }
.page { position: relative; z-index: 1; overflow-x: clip; }
.mono { font-family: var(--mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; }
.line { display: block; overflow: hidden; padding-bottom: .05em; }
.line > span { display: block; }
.nav-links a.on::after { transform: scaleX(1); }

/* ---------- iris page transition ---------- */
.iris { position: fixed; inset: 0; z-index: 120; background: #08090a; pointer-events: none; }
.iris.block { pointer-events: auto; }
.iris-mark { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); font-family: var(--mono); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-2); white-space: nowrap; transition: opacity .3s; }

/* ---------- portfolio index ---------- */
.p-head { padding: 140px var(--gut) 40px; position: relative; }
.p-head .top { display: flex; justify-content: space-between; gap: 20px; align-items: baseline; border-top: 1px solid var(--line); padding-top: 18px; flex-wrap: wrap; }
.p-head .top p { margin: 0; font-size: 19px; max-width: 440px; }
.p-title { font-size: clamp(110px, 25vw, 470px); margin: 30px 0 0; line-height: .8; letter-spacing: -.045em; display: flex; align-items: flex-start; gap: .04em; }
.p-title sup { font-family: var(--mono); font-size: clamp(14px, 1.6vw, 24px); font-weight: 400; letter-spacing: .1em; color: var(--orange); margin-top: .5em; }
.p-sub { display: grid; grid-template-columns: 1fr auto; gap: 20px; align-items: end; margin-top: 36px; }
.p-sub p { margin: 0; font-size: clamp(19px, 1.7vw, 24px); max-width: 560px; line-height: 1.35; }

.toolbar { position: sticky; top: 74px; z-index: 30; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px var(--gut); background: rgba(15, 17, 19, .82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.filters, .views { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { background: none; border: 1.5px solid var(--line); border-radius: 999px; padding: 8px 16px; font-size: 14px; transition: border-color .3s, background .3s, color .3s; }
.chip sup { font-family: var(--mono); font-size: 10px; margin-left: 4px; color: var(--ink-2); }
.chip:hover { border-color: var(--ink); }
.chip.on { background: var(--ink); color: var(--dark-ink); border-color: var(--ink); }
.chip.on sup { color: var(--dark-ink); }
.views .chip { padding: 8px 14px; font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }

.index { padding: 10px var(--gut) clamp(90px, 10vw, 150px); }
.row { display: grid; grid-template-columns: 70px 1fr 240px 260px 60px; gap: 24px; align-items: center; padding: 26px 0; border-bottom: 1px solid var(--line); position: relative; }
.row > * { transition: opacity .5s var(--ease); }
.row .n { font-family: var(--mono); font-size: 13px; color: var(--ink-2); transition: color .3s; }
.row h2 { margin: 0; font-size: clamp(38px, 6.2vw, 112px); font-weight: 650; text-transform: uppercase; line-height: .92; letter-spacing: -.025em; transition: transform .6s var(--ease), color .4s; }
.row .sec { font-size: 16px; color: var(--ink-2); }
.row .srv { font-family: var(--mono); font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); line-height: 1.7; }
.row .go { width: 52px; height: 52px; border-radius: 50%; border: 1.5px solid var(--line); display: grid; place-items: center; transition: background .4s, border-color .4s, color .4s, transform .5s var(--ease); justify-self: end; }
.row .thumb { display: none; }
.row:hover h2 { transform: translateX(22px); color: var(--orange); }
.row:hover .n { color: var(--orange); }
.row:hover .go { background: var(--orange); border-color: var(--orange); color: var(--dark-ink); transform: rotate(45deg); }
.index.dim .row:not(:hover) > * { opacity: .32; }
.row.out { display: none; }
.row::after { content: ''; position: absolute; left: 0; bottom: -1px; height: 1px; width: 100%; background: var(--orange); transform: scaleX(0); transform-origin: left; transition: transform .7s var(--ease); }
.row:hover::after { transform: scaleX(1); }

.grid { display: none; grid-template-columns: repeat(2, 1fr); gap: clamp(16px, 2.4vw, 34px); padding: 30px var(--gut) clamp(90px, 10vw, 150px); }
.view-grid .grid { display: grid; }
.view-grid .index { display: none; }
.card { display: grid; gap: 14px; }
.card:nth-child(even) { margin-top: 110px; }
.card.out { display: none; }
.card .media { position: relative; aspect-ratio: 4/5; overflow: hidden; border-radius: 6px; background: var(--bg-2); }
.card:nth-child(4n+1) .media, .card:nth-child(4n) .media { aspect-ratio: 3/2; }
.card .media img, .card .media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease), opacity .6s; }
.card .media video { opacity: 0; }
.card:hover .media img { transform: scale(1.06); }
.card:hover .media video { opacity: 1; }
.card .tag { position: absolute; left: 14px; top: 14px; font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; background: rgba(15, 17, 19, .7); padding: 6px 10px; border-radius: 999px; backdrop-filter: blur(6px); }
.card .cap { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; }
.card h3 { margin: 0; font-size: clamp(26px, 2.6vw, 44px); font-weight: 650; text-transform: uppercase; line-height: .95; letter-spacing: -.02em; }
.card .cap span { font-size: 15px; color: var(--ink-2); text-align: right; }

#preview { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 20; pointer-events: none; }

.cta-band { margin: 0 var(--gut) clamp(90px, 10vw, 140px); border-radius: 18px; background: var(--orange); color: var(--dark-ink); padding: clamp(40px, 6vw, 90px); display: grid; grid-template-columns: 1fr auto; gap: 30px; align-items: end; overflow: hidden; position: relative; }
.cta-band h2 { font-size: clamp(48px, 8vw, 150px); }
.cta-band .eyebrow { color: var(--dark-ink); }
.cta-band .btn { background: var(--dark-ink); color: var(--ink); }
.cta-band .btn::before { background: var(--ink); }
.cta-band .btn:hover { color: var(--dark-ink); }

/* ---------- project page ---------- */
.pj-hero { position: relative; height: 100vh; height: 100svh; overflow: hidden; }
#heroGL { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.pj-hero .shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(15, 17, 19, .55), transparent 24%, transparent 46%, rgba(15, 17, 19, .92)); pointer-events: none; }
.back { position: absolute; top: 96px; left: var(--gut); font-family: var(--mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; display: inline-flex; gap: 10px; align-items: center; z-index: 2; }
.back:hover { color: var(--orange); }
.pj-copy { position: absolute; left: var(--gut); right: var(--gut); bottom: clamp(30px, 6vh, 64px); display: grid; grid-template-columns: 1fr auto; gap: 30px 60px; align-items: end; z-index: 2; }
.pj-copy .eyebrow { color: var(--ink); }
.pj-title { font-size: clamp(56px, 10.6vw, 210px); margin-top: 14px; }
.pj-title.long { font-size: clamp(52px, 7.6vw, 150px); }
.pj-title .wd { display: inline-block; white-space: nowrap; overflow: hidden; vertical-align: top; padding-bottom: .04em; }
.pj-title .ch { display: inline-block; }
.pj-lead { margin: 18px 0 0; font-size: clamp(19px, 1.8vw, 26px); max-width: 620px; line-height: 1.3; }
.pj-meta { display: grid; gap: 14px; min-width: 240px; font-size: 15px; }
.pj-meta div { border-top: 1px solid rgba(244, 241, 235, .3); padding-top: 8px; display: grid; gap: 2px; }
.pj-meta small { font-family: var(--mono); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); }
.pj-hud { position: absolute; top: 96px; right: var(--gut); font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; display: flex; gap: 16px; z-index: 2; }
.pj-hud .rec::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #ff3b2f; margin-right: 8px; animation: blink 1.2s steps(2) infinite; }

.sec-head { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; border-top: 1px solid var(--line); padding-top: 18px; margin-bottom: 40px; flex-wrap: wrap; }
.sec-head p { margin: 0; font-size: 18px; color: var(--ink-2); max-width: 460px; }

.intro { padding: clamp(100px, 12vw, 170px) var(--gut); }
.intro-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 50px 80px; align-items: start; }
.pj-statement { margin: 0; font-size: clamp(32px, 3.6vw, 62px); font-weight: 500; line-height: 1.1; letter-spacing: -.015em; }
.pj-statement .w { display: inline-block; opacity: .16; transition: opacity .5s; }
.pj-statement .w.on { opacity: 1; }
.facts { display: grid; gap: 0; margin: 0; }
.facts div { display: grid; grid-template-columns: 140px 1fr; gap: 20px; padding: 18px 0; border-top: 1px solid var(--line); }
.facts div:last-child { border-bottom: 1px solid var(--line); }
.facts dt { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--orange); padding-top: 4px; }
.facts dd { margin: 0; font-size: 17px; line-height: 1.45; }
.facts .tags { margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.facts .tags span { border: 1.5px solid var(--line); border-radius: 999px; padding: 4px 12px; font-size: 14px; }
.credit { margin: 28px 0 0; font-size: 15px; color: var(--ink-2); }

.films { padding: 0 var(--gut) clamp(100px, 12vw, 170px); }
.player { position: relative; border-radius: 10px; overflow: hidden; background: #000; aspect-ratio: 16/9; }
.player video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.player .cover { position: absolute; inset: 0; display: grid; place-items: center; background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, .65)); transition: opacity .5s; }
.player.playing .cover { opacity: 0; pointer-events: none; }
.player .play { width: clamp(96px, 11vw, 150px); aspect-ratio: 1; border-radius: 50%; background: var(--orange); color: var(--dark-ink); display: grid; place-items: center; border: 0; font-weight: 600; font-size: 15px; transition: transform .6s var(--ease); }
.player .play span { display: block; font-size: 26px; line-height: 1; margin-bottom: 4px; }
.player:hover .play { transform: scale(1.08); }
.player .label { position: absolute; left: 22px; bottom: 20px; right: 22px; display: flex; justify-content: space-between; align-items: end; gap: 20px; pointer-events: none; }
.player .label b { font-size: clamp(22px, 2.4vw, 38px); font-weight: 650; text-transform: uppercase; letter-spacing: -.015em; line-height: 1; }
.player .label span { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }
.player .bar { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 18px; display: flex; align-items: center; gap: 14px; background: linear-gradient(transparent, rgba(0, 0, 0, .7)); opacity: 0; transition: opacity .4s; font-family: var(--mono); font-size: 11px; letter-spacing: .08em; }
.player.playing:hover .bar, .player.paused .bar { opacity: 1; }
.player .bar button { background: none; border: 0; padding: 4px; font-size: 13px; font-family: var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.player .track { flex: 1; height: 4px; background: rgba(255, 255, 255, .25); border-radius: 4px; position: relative; cursor: pointer; }
.player .track i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--orange); border-radius: 4px; }
.films-more { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(16px, 2.4vw, 34px); margin-top: clamp(16px, 2.4vw, 34px); }
.film-cap { margin: 12px 0 0; font-size: 15px; color: var(--ink-2); }

.gallery { padding: 0 var(--gut) clamp(80px, 10vw, 140px); }
.chapter { margin-bottom: clamp(70px, 9vw, 130px); }
.chapter-head { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 60px; align-items: end; margin-bottom: 36px; }
.chapter-head h3 { margin: 10px 0 0; font-size: clamp(40px, 6vw, 110px); font-weight: 650; text-transform: uppercase; line-height: .9; letter-spacing: -.025em; }
.chapter-head p { margin: 0; font-size: 19px; max-width: 460px; justify-self: end; color: var(--ink-2); }
.mosaic { display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(10px, 1.4vw, 20px); }
.ph { width: 100%; min-width: 0; justify-self: stretch; margin: 0; position: relative; overflow: hidden; border-radius: 4px; background: var(--bg-2); grid-column: span 6; aspect-ratio: 3/2; clip-path: inset(0 0 0 0); }
.ph.w12 { grid-column: span 12; aspect-ratio: 21/9; }
.ph.w8 { grid-column: span 8; }
.ph.w4 { grid-column: span 4; aspect-ratio: 4/5; }
.ph.w7 { grid-column: span 7; }
.ph.w5 { grid-column: span 5; aspect-ratio: 4/5; }
.ph.tall { aspect-ratio: 4/5; }
.ph.full { grid-column: span 12; aspect-ratio: 3/2; }
.ph img { position: absolute; left: 0; top: -8%; width: 100%; height: 116%; object-fit: cover; transition: filter .6s; will-change: transform; }
.ph:hover img { filter: brightness(1.06); }
.ph figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 16px 14px; background: linear-gradient(transparent, rgba(0, 0, 0, .7)); display: flex; justify-content: space-between; gap: 14px; font-size: 14px; transform: translateY(101%); transition: transform .6s var(--ease); }
.ph figcaption span { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; color: var(--orange); }
.ph:hover figcaption { transform: none; }
.ph button { position: absolute; inset: 0; background: none; border: 0; width: 100%; }

/* single photo: the picture, then its details */
.loupe { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(10px, 1.4vw, 20px); margin-top: clamp(10px, 1.4vw, 20px); }
.loupe .ph { grid-column: auto; aspect-ratio: 1; }
.loupe .ph img { top: 0; height: 100%; transform: scale(2.4); }

.lightbox { position: fixed; inset: 0; z-index: 110; background: rgba(8, 9, 10, .96); display: grid; grid-template-rows: auto 1fr auto; opacity: 0; pointer-events: none; transition: opacity .4s; }
.lightbox.on { opacity: 1; pointer-events: auto; }
.lb-top, .lb-bot { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 18px var(--gut); font-family: var(--mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; }
.lb-top button, .lb-bot button { background: none; border: 1.5px solid var(--line); border-radius: 999px; padding: 10px 18px; font-family: var(--mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; }
.lb-top button:hover, .lb-bot button:hover { border-color: var(--orange); color: var(--orange); }
.lb-stage { position: relative; display: grid; place-items: center; padding: 0 var(--gut); min-height: 0; touch-action: pan-y; }
.lb-stage img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 4px; user-select: none; -webkit-user-drag: none; }
.lb-cap { font-family: var(--sans); font-size: 16px; letter-spacing: 0; text-transform: none; text-align: center; flex: 1; }

.next { display: block; position: relative; overflow: hidden; padding: clamp(80px, 10vw, 150px) var(--gut); border-top: 1px solid var(--line); isolation: isolate; }
.next .media { position: absolute; inset: 0; z-index: -1; clip-path: inset(50% 30% 50% 30%); transition: clip-path 1.1s var(--ease); }
.next .media img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.15); transition: transform 1.4s var(--ease); }
.next .media::after { content: ''; position: absolute; inset: 0; background: rgba(15, 17, 19, .55); }
.next:hover .media { clip-path: inset(0 0 0 0); }
.next:hover .media img { transform: scale(1); }
.next .k { display: flex; justify-content: space-between; gap: 20px; }
.next h2 { margin: 26px 0 0; font-size: clamp(56px, 12vw, 230px); font-weight: 650; text-transform: uppercase; line-height: .86; letter-spacing: -.035em; }
.next .meta { margin-top: 22px; font-size: 17px; color: var(--ink-2); display: flex; gap: 16px; flex-wrap: wrap; }
.next .arrow { position: absolute; right: var(--gut); bottom: clamp(80px, 10vw, 150px); width: clamp(70px, 8vw, 120px); aspect-ratio: 1; border-radius: 50%; background: var(--orange); color: var(--dark-ink); display: grid; place-items: center; font-size: clamp(26px, 3vw, 40px); transition: transform .6s var(--ease); }
.next:hover .arrow { transform: rotate(45deg) scale(1.08); }

@media (max-width: 1020px) {
  .row { grid-template-columns: 50px 1fr 54px; }
  .row .sec, .row .srv { display: none; }
  .intro-grid { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .p-head { padding-top: 110px; }
  .p-title { font-size: 21vw; }
  .p-title sup { font-size: 12px; margin-top: .3em; }
  .p-sub { grid-template-columns: 1fr; }
  .toolbar { top: 64px; flex-direction: column; align-items: stretch; gap: 10px; padding: 12px 16px; }
  .filters { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; }
  .filters::-webkit-scrollbar { display: none; }
  .chip { white-space: nowrap; padding: 7px 14px; font-size: 13px; }
  .views { display: none; }
  .row { grid-template-columns: 1fr; gap: 12px; padding: 22px 0 28px; }
  .row .n { display: flex; justify-content: space-between; }
  .row .thumb { display: block; order: -1; aspect-ratio: 16/10; border-radius: 6px; overflow: hidden; position: relative; }
  .row .thumb img { width: 100%; height: 100%; object-fit: cover; }
  .row h2 { font-size: clamp(36px, 11vw, 60px); }
  .row .go { display: none; }
  .row .sec { display: block; font-size: 15px; }
  .row:hover h2 { transform: none; }
  .index.dim .row:not(:hover) > * { opacity: 1; }
  .cta-band { grid-template-columns: 1fr; }
  .back, .pj-hud { top: 80px; }
  .pj-hud span:not(.rec) { display: none; }
  .pj-copy { grid-template-columns: 1fr; gap: 22px; bottom: 28px; }
  .pj-title { font-size: clamp(44px, 13vw, 90px); }
  .pj-lead { font-size: 18px; }
  .pj-meta { grid-template-columns: 1fr 1fr; gap: 12px 16px; min-width: 0; font-size: 14px; }
  .facts div { grid-template-columns: 1fr; gap: 6px; }
  .films-more { grid-template-columns: 1fr; }
  .player .label b { font-size: 18px; }
  .player .label span { display: none; }
  .player .play { width: 68px; font-size: 11px; }
  .player .play span { font-size: 18px; }
  .player .bar .fs { display: none; }
  .chapter-head { grid-template-columns: 1fr; }
  .chapter-head p { justify-self: start; }
  .mosaic { grid-template-columns: 1fr 1fr; }
  .ph, .ph.w8, .ph.w7 { grid-column: span 2; }
  .ph.w12 { grid-column: span 2; aspect-ratio: 3/2; }
  .ph.w4, .ph.w5 { grid-column: span 1; }
  .ph figcaption { transform: none; padding: 30px 10px 8px; font-size: 12px; }
  .ph figcaption b { display: none; }
  .loupe { grid-template-columns: 1fr 1fr 1fr; }
  .grid { grid-template-columns: 1fr; }
  .card:nth-child(even) { margin-top: 0; }
  .lb-cap { font-size: 14px; }
  .next .arrow { position: static; margin-top: 30px; }
}
@media (hover: none) { .next .media { clip-path: inset(0 0 0 0); } .next .media img { transform: none; } }
@keyframes blink { 50% { opacity: 0; } }

/* Project imagery remains available before decorative effects initialize. */
body:not(.portfolio-motion) { cursor: auto; }
body:not(.portfolio-motion) :is(a, button) { cursor: pointer; }
body:not(.portfolio-motion) :is(.iris, .vf) { display: none; }
body:not(.portfolio-motion) .pj-statement .w { color: var(--ink); }
.pj-poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
#heroGL:not(.ready) { visibility: hidden; }
@media (min-width: 821px) {
  .row { grid-template-columns: 84px 56px minmax(0, 1fr) minmax(90px, 15vw) minmax(100px, 16vw) 52px; gap: 16px; }
  .row .thumb { display: block; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 4px; }
  .row .thumb img { width: 100%; height: 100%; object-fit: cover; }
}
@media (min-width: 821px) and (max-width: 1020px) {
  .row { grid-template-columns: 84px 42px minmax(0, 1fr) 52px; }
}
