:root {
  color-scheme: dark;
  --bg: #02060b; --ink: #eef6fa; --dim: rgba(238, 246, 250, .58); --line: rgba(238, 246, 250, .3);
  --display: "Space Grotesk", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --pad: clamp(18px, 3.4vw, 46px);
  --ease: cubic-bezier(.22, 1, .36, 1);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--bg); scrollbar-width: none; }
html::-webkit-scrollbar { display: none; }
body { background: var(--bg); color: var(--ink); font-family: var(--display); -webkit-font-smoothing: antialiased; overscroll-behavior: none; user-select: none; -webkit-user-select: none; }
#spacer { height: 500vh; height: 500svh; }
#scene { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: pan-y; cursor: grab; }
#scene.dragging { cursor: grabbing; }
.grain { position: fixed; inset: -50%; pointer-events: none; opacity: .07; mix-blend-mode: overlay; z-index: 2;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  animation: grain 1.2s steps(6) infinite; }
@keyframes grain { to { transform: translate3d(6%, -4%, 0); } }

.top { position: fixed; inset: 0 0 auto 0; z-index: 6; display: flex; align-items: center; justify-content: space-between; padding: calc(var(--pad) * .7) var(--pad); pointer-events: none; }
.top > * { pointer-events: auto; }
.brand { color: var(--ink); text-decoration: none; font-size: 14px; font-weight: 500; letter-spacing: -.01em; }
.brand span { color: var(--dim); }
nav { display: flex; gap: clamp(2px, 1.6vw, 18px); }
nav button { position: relative; background: none; border: 0; color: var(--dim); cursor: pointer; font: inherit; font-size: 14px; padding: 10px; transition: color .35s var(--ease); }
nav button::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: 5px; height: 1px; background: linear-gradient(90deg, #7ff3ff, #c79bff 60%, #fff); transform: scaleX(0); transform-origin: left; transition: transform .5s var(--ease); }
nav button:hover, nav button:focus-visible, nav button.on { color: var(--ink); }
nav button:hover::after, nav button:focus-visible::after, nav button.on::after { transform: scaleX(1); }
nav button:focus-visible { outline: 1px solid var(--line); outline-offset: 2px; }

.ch { position: fixed; inset: 0; z-index: 4; pointer-events: none; opacity: 0; will-change: opacity, transform; }
.fig, .hud, .tag i { font-family: var(--mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; }
.fig { position: absolute; left: var(--pad); top: clamp(74px, 12vh, 112px); color: var(--dim); }
.fig::before { content: ""; display: inline-block; width: 6px; height: 6px; background: var(--ink); margin-right: 10px; }
.lead { position: absolute; left: var(--pad); top: clamp(104px, 17vh, 150px); max-width: 21em; font-size: clamp(16px, 1.55vw, 22px); line-height: 1.25; letter-spacing: -.01em; text-wrap: balance; }
.giant { position: absolute; left: calc(var(--pad) - .04em); bottom: calc(var(--pad) * .5); font-weight: 500; font-size: clamp(84px, 19vw, 300px); line-height: .82; letter-spacing: -.055em; }
.sub { position: absolute; right: var(--pad); bottom: calc(var(--pad) + 26px); text-align: right; font-size: clamp(15px, 1.5vw, 21px); line-height: 1.25; letter-spacing: -.01em; }

.tags { position: fixed; inset: 0; z-index: 5; pointer-events: none; }
.tag { position: absolute; left: 0; top: 0; opacity: 0; white-space: nowrap; will-change: transform, opacity; }
.tag::before { content: ""; position: absolute; left: -3px; top: -3px; width: 5px; height: 5px; border: 1px solid var(--ink); border-radius: 50%; }
.tag::after { content: ""; position: absolute; top: 0; height: 1px; width: clamp(34px, 6vw, 84px); background: var(--line); }
.tag.r::after { left: 6px; } .tag.l::after { right: 6px; }
.tag b, .tag i { position: absolute; font-style: normal; }
.tag b { font-weight: 500; font-size: clamp(12px, 1.15vw, 15px); top: -.65em; line-height: 1.3; }
.tag i { color: var(--dim); top: 1.5em; font-size: 9px; }
.tag.r b, .tag.r i { left: calc(clamp(34px, 6vw, 84px) + 14px); }
.tag.l b, .tag.l i { right: calc(clamp(34px, 6vw, 84px) + 14px); text-align: right; }

.hud { position: fixed; inset: 0; z-index: 3; pointer-events: none; color: var(--dim); }
#count { position: absolute; right: var(--pad); bottom: calc(var(--pad) * .7); }
.scrollcue { position: absolute; left: 50%; bottom: calc(var(--pad) * .7); transform: translateX(-50%); transition: opacity .8s; }
.scrollcue::after { content: ""; display: block; width: 1px; height: 22px; margin: 8px auto 0; background: var(--line); animation: cue 1.8s var(--ease) infinite; transform-origin: top; }
@keyframes cue { 0% { transform: scaleY(0); } 60% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }
.scrollcue.off { opacity: 0; }
.x { position: absolute; width: 9px; height: 9px; background: linear-gradient(var(--line), var(--line)) center/100% 1px no-repeat, linear-gradient(var(--line), var(--line)) center/1px 100% no-repeat; }
.x1 { left: 31%; top: 24%; } .x2 { right: 18%; top: 71%; } .x3 { right: 12%; top: 16%; }

.veil { position: fixed; inset: 0; background: var(--bg); z-index: 9; pointer-events: none; transition: opacity 2.4s var(--ease); }
.ready .veil { opacity: 0; }

@media (max-width: 720px) {
  .giant { font-size: clamp(64px, 25vw, 150px); bottom: calc(var(--pad) + 64px); }
  .sub { left: var(--pad); right: auto; text-align: left; bottom: calc(var(--pad) + 14px); font-size: 14px; }
  .sub br { display: none; }
  .lead { max-width: 19em; }
  .tag i { display: none; }
  .scrollcue { display: none; }
}
@media (prefers-reduced-motion: reduce) { .grain, .scrollcue::after { animation: none; } .veil { transition-duration: .01s; } }

.reel { position: absolute; left: var(--pad); right: var(--pad); top: clamp(190px, 29vh, 290px); display: flex; gap: clamp(10px, 1.2vw, 20px); pointer-events: auto; }
.job { flex: 1 1 0; min-width: 0; color: var(--ink); text-decoration: none; display: flex; flex-direction: column; gap: 6px; }
.job__img { display: block; aspect-ratio: 16 / 9; background: rgba(238, 246, 250, .06) center/cover no-repeat; outline: 1px solid var(--line); outline-offset: -1px; position: relative; transition: transform .6s var(--ease), outline-color .3s; }
.job__img::after { content: ""; position: absolute; left: 50%; top: 50%; border: 10px solid transparent; border-left: 17px solid var(--ink); border-right: 0; transform: translate(-50%, -50%); opacity: .9; filter: drop-shadow(0 0 12px rgba(0, 0, 0, .6)); }
.job:hover .job__img, .job:focus-visible .job__img { transform: translateY(-6px); outline-color: var(--ink); }
.job b { font-weight: 500; font-size: clamp(14px, 1.35vw, 20px); margin-top: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.job i { font-family: var(--mono); font-style: normal; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }
.ch[data-i="1"] .giant { font-size: clamp(56px, 8.5vw, 140px); }
.ch[data-i="1"] .lead { max-width: 44em; }

.project { position: fixed; inset: 0; z-index: 8; background: rgba(2, 6, 11, .9); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); overflow-y: auto; overscroll-behavior: contain; user-select: text; -webkit-user-select: text; animation: pin .5s var(--ease); }
.project[hidden] { display: none; }
@keyframes pin { from { opacity: 0; } }
.project__in { max-width: 1180px; margin: 0 auto; padding: clamp(74px, 11vh, 110px) var(--pad) 80px; }
.project__fig, .project__meta, .cs h3 { font-family: var(--mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); font-weight: 400; }
.project h2 { font-weight: 500; font-size: clamp(34px, 6vw, 88px); line-height: .95; letter-spacing: -.04em; margin: 14px 0 12px; text-wrap: balance; }
.player__frame { aspect-ratio: 16 / 9; margin-top: 28px; background: rgba(238, 246, 250, .05); outline: 1px solid var(--line); outline-offset: -1px; }
.player__frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.project__vimeo { display: inline-block; margin-top: 14px; color: var(--ink); font-size: 14px; }
.cs { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: clamp(20px, 3vw, 44px); margin-top: clamp(36px, 6vh, 70px); padding-top: 22px; border-top: 1px solid var(--line); }
.cs p { margin-top: 12px; font-size: 16px; line-height: 1.5; color: var(--dim); }
.project__x { position: fixed; right: var(--pad); top: calc(var(--pad) * .7); z-index: 1; background: none; border: 0; color: var(--ink); font: inherit; font-size: 14px; cursor: pointer; padding: 10px; }
@media (max-width: 720px) {
  .reel { top: clamp(200px, 33vh, 280px); right: 0; overflow-x: auto; scroll-snap-type: x mandatory; padding-right: var(--pad); scrollbar-width: none; touch-action: pan-x; }
  .job { flex: 0 0 76vw; scroll-snap-align: start; }
}

/* copy is real, selectable text; the canvas keeps drag and click everywhere else */
.ch .fig, .ch .lead, .ch .giant, .ch .sub, .job b, .job i { pointer-events: auto; user-select: text; -webkit-user-select: text; cursor: text; }
.job b, .job i { cursor: pointer; }
::selection { background: rgba(127, 243, 255, .28); color: #fff; }

.lookdev main, .lookdev .tags, .lookdev .hud, .lookdev header, .lookdev .grain { display: none; }
