/* ===== zolfex fx layer: bold motion, still monochrome ===== */
:root { --serif: "Instrument Serif", Georgia, serif; --ease: cubic-bezier(.77, 0, .175, 1); --out: cubic-bezier(.16, 1, .3, 1); }
::selection { background: var(--ink); color: var(--bg); }

/* film grain */
body::after {
  content: ""; position: fixed; inset: -50%; z-index: 90; pointer-events: none; opacity: .07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1s steps(6) infinite;
}
@keyframes grain { 0%{transform:translate(0,0)} 20%{transform:translate(-4%,3%)} 40%{transform:translate(3%,-5%)} 60%{transform:translate(-6%,-2%)} 80%{transform:translate(5%,4%)} 100%{transform:translate(0,0)} }

/* scroll progress */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; background: var(--ink); transform-origin: 0 50%; transform: scaleX(0); z-index: 60; }

/* ---- loader (first visit per session) ---- */
.loader { display: none; }
.first .loader {
  display: flex; position: fixed; inset: 0; z-index: 100; background: #050505; color: var(--ink);
  flex-direction: column; justify-content: space-between; padding: clamp(20px, 4vw, 48px);
  transition: clip-path 1s var(--ease); clip-path: inset(0 0 0 0);
}
.first .loader.out { clip-path: inset(0 0 100% 0); }
.loader-in { display: flex; justify-content: space-between; gap: 20px; font-size: 14px; text-transform: uppercase; letter-spacing: .12em; color: var(--ink-2); }
.loader-name { color: var(--ink); }
.loader-num { font-size: clamp(110px, 26vw, 360px); font-weight: 700; line-height: .8; letter-spacing: -.06em; align-self: flex-end; font-variant-numeric: tabular-nums; }
.first.loading body { overflow: hidden; }

/* ---- split headline words ---- */
.w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .08em; margin-bottom: -.08em; }
.w > span { display: inline-block; transform: translateY(105%); transition: transform 1.1s var(--out); transition-delay: calc(var(--i, 0) * 70ms); }
.split.on .w > span { transform: none; }
.w.serif > span { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -.01em; }

/* ---- hero ---- */
.hero { position: relative; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(520px circle at var(--mx, 70%) var(--my, 30%), rgba(255,255,255,.07), transparent 60%); }
.hero h1 { font-size: clamp(48px, 8.4vw, 128px); line-height: .95; letter-spacing: -.045em; max-width: 12ch; }
.hero .w.serif > span { font-size: 1.08em; }
.js .hero .fade { opacity: 0; transform: translateY(16px); transition: opacity 1s var(--out), transform 1s var(--out); }
.js .hero.on .fade { opacity: 1; transform: none; }
.hero.on .fade:nth-of-type(1) { transition-delay: .45s; }
.hero.on .row.fade { transition-delay: .55s; }
.hero.on .skills.fade { transition-delay: .65s; }
.me-wrap { position: relative; perspective: 900px; }
.me { transition: transform .6s var(--out); will-change: transform; }
.js .me-wrap .me { clip-path: inset(100% 0 0 0 round var(--radius)); transition: clip-path 1.3s var(--ease) .25s, transform .6s var(--out); }
.js .hero.on .me-wrap .me { clip-path: inset(0 0 0 0 round var(--radius)); }
.badge { position: absolute; left: -46px; bottom: -40px; width: 132px; height: 132px; z-index: 2; animation: spin 16s linear infinite; mix-blend-mode: difference; }
.badge text { font: 600 15.5px/1 var(--font); letter-spacing: .14em; fill: #fff; }
@keyframes spin { to { transform: rotate(360deg); } }
.btn { position: relative; overflow: hidden; isolation: isolate; transition: transform .35s var(--out), color .35s; }
.btn::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--bg); transform: translateY(101%); border-radius: inherit; transition: transform .45s var(--out); }
.btn:hover { background: var(--ink); color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.btn:hover::before { transform: none; }

/* ---- giant marquee ---- */
.marquee { overflow: hidden; border-block: 1px solid var(--rule); padding: clamp(16px, 2.4vw, 30px) 0; }
.marquee-track { display: flex; width: max-content; will-change: transform; animation: none; }
.marquee span {
  display: inline-flex; align-items: center; white-space: nowrap; padding-right: .5em;
  font-size: clamp(44px, 8vw, 120px); font-weight: 700; letter-spacing: -.04em; line-height: 1;
  color: transparent; -webkit-text-stroke: 1px #6b6b68; transition: color .35s, -webkit-text-stroke-color .35s;
}
.marquee span::after { content: "✳"; -webkit-text-stroke: 0; color: var(--ink-2); font-size: .45em; padding-left: .55em; }
.marquee span:nth-child(odd) { color: var(--ink); -webkit-text-stroke-color: transparent; }
.marquee span:nth-child(even) { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -.01em; }
.marquee span:hover { color: var(--ink); }

/* ---- section heads ---- */
.sec-head { align-items: end; }
.sec-head h2, .contact h2 { font-size: clamp(42px, 6.4vw, 92px); line-height: .95; letter-spacing: -.045em; }
.sec-num { display: block; width: 100%; font: 400 15px/1 var(--font); letter-spacing: .12em; color: var(--ink-2); margin-bottom: 14px; }
.sec-num::before { content: ""; display: inline-block; width: 38px; height: 1px; background: var(--ink-2); vertical-align: middle; margin-right: 12px; transform-origin: 0 50%; }
.sub { position: relative; }

/* ---- image wipes ---- */
.js .wipe { clip-path: inset(0 0 100% 0); transition: clip-path 1.15s var(--ease); transition-delay: var(--d, 0ms); }
.js .wipe img, .js .wipe video { transform: scale(1.25); transition: transform 1.6s var(--out); transition-delay: var(--d, 0ms); }
.js .wipe.in { clip-path: inset(0 0 0 0); }
.js .wipe.in img, .js .wipe.in video { transform: none; }
.js .wipe.in.done img { transition: transform .7s var(--out); }
.grid-case figure, .duo figure, .grid-posts figure, .grid-thumbs figure { overflow: hidden; border-radius: var(--radius); }
.wipe.done:hover img.zoomable { transform: scale(1.06); }

/* reels + sites */
.reel { transition: transform .5s var(--out), border-radius .5s; }
.reels figure:hover .reel { transform: translateY(-6px) rotate(-1deg); }
.reels figure:nth-child(even):hover .reel { transform: translateY(-6px) rotate(1deg); }
.site { transform-style: preserve-3d; transition: transform .5s var(--out); will-change: transform; }
.site img { transition: transform .8s var(--out); }
.site:hover img { transform: scale(1.04); }

/* quotes */
.quotes blockquote p { font-family: var(--serif); font-size: clamp(22px, 2.3vw, 30px); line-height: 1.2; letter-spacing: -.01em; }

/* ---- contact ---- */
.contact h2 .w.serif > span { font-size: 1.05em; }
.contact .mail {
  display: inline-block; font-size: clamp(26px, 5.4vw, 76px); font-weight: 600; letter-spacing: -.04em; text-decoration: none;
  background: linear-gradient(90deg, var(--ink) 50%, #4a4a48 50%) 100% 0 / 200% 100% no-repeat; -webkit-background-clip: text; background-clip: text; color: transparent;
  transition: background-position .8s var(--ease);
}
.contact .mail:hover, .contact .mail.lit { background-position: 0 0; }

/* nav */
.top nav a:not(.btn) { position: relative; }
.top nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -5px; height: 1px; background: var(--ink); transform: scaleX(0); transform-origin: 100% 50%; transition: transform .45s var(--out); }
.top nav a:hover::after, .top nav a.on::after { transform: scaleX(1); transform-origin: 0 50%; }
.top nav a.on { color: var(--ink); }

/* ---- custom cursor (mouse only) ---- */
.cur { position: fixed; top: 0; left: 0; z-index: 95; pointer-events: none; mix-blend-mode: difference; display: none; }
.has-cur .cur { display: block; }
.cur-dot { position: absolute; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: #fff; transition: width .35s var(--out), height .35s var(--out), margin .35s var(--out); display: grid; place-items: center; }
.cur-dot b { font: 600 13px/1 var(--font); letter-spacing: .06em; text-transform: uppercase; color: #000; opacity: 0; transition: opacity .2s; }
.cur.big .cur-dot { width: 92px; height: 92px; margin: -46px 0 0 -46px; }
.cur.big .cur-dot b { opacity: 1; }
.cur.link .cur-dot { width: 46px; height: 46px; margin: -23px 0 0 -23px; }
.cur.down .cur-dot { transform: scale(.8); }
.has-cur .zoomable, .has-cur .reel, .has-cur .site { cursor: none; }

/* ---- lightbox ---- */
.lb { position: fixed; inset: 0; z-index: 80; background: rgba(5,5,5,.92); backdrop-filter: blur(10px); display: grid; place-items: center; padding: 24px; cursor: zoom-out; opacity: 0; transition: opacity .35s; }
.lb.show { opacity: 1; }
.lb[hidden] { display: none; }
.lb img { max-width: min(1400px, 100%); max-height: 100%; object-fit: contain; border-radius: 8px; cursor: default; transform: scale(.94); transition: transform .5s var(--out); }
.lb.show img { transform: none; }
.lb-x { position: absolute; top: 16px; right: 16px; width: 48px; height: 48px; border-radius: 50%; border: 1px solid #3a3a3a; background: #141414; color: var(--ink); font-size: 16px; cursor: pointer; transition: transform .4s var(--out); }
.lb-x:hover { transform: rotate(90deg); }
.zoomable { cursor: zoom-in; }
.zoomable:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

@media (max-width: 900px) {
  .badge { left: auto; right: -18px; bottom: -34px; width: 108px; height: 108px; }
  .me-wrap { max-width: 360px; }
  .hero { padding-bottom: 72px; }
}

@media (prefers-reduced-motion: reduce) {
  body::after { animation: none; }
  .w > span, .js .hero .fade { transform: none !important; opacity: 1 !important; transition: none !important; }
  .js .wipe, .js .me-wrap .me { clip-path: none !important; transition: none !important; }
  .js .wipe img, .js .wipe video { transform: none !important; }
  .badge { animation: none; }
  .marquee-track { flex-wrap: wrap; width: auto; justify-content: center; transform: none !important; }
  .marquee .dup { display: none; }
}

/* ---- reel player ---- */
.vp { position: fixed; inset: 0; z-index: 85; background: rgba(5,5,5,.95); backdrop-filter: blur(12px); display: flex; align-items: center; justify-content: center; gap: clamp(8px, 3vw, 40px); padding: 64px 16px 56px; opacity: 0; transition: opacity .35s; }
.vp.show { opacity: 1; }
.vp[hidden] { display: none; }
.vp video { height: 100%; max-height: 86vh; max-width: min(100%, 560px); aspect-ratio: 9 / 16; background: #000; border-radius: 14px; transform: scale(.94); transition: transform .5s var(--out); }
.vp.show video { transform: none; }
.vp-nav { flex: none; width: 52px; height: 52px; border-radius: 50%; border: 1px solid #3a3a3a; background: #141414; color: var(--ink); font-size: 20px; cursor: pointer; transition: background .3s, color .3s; }
.vp-nav:hover { background: var(--ink); color: var(--bg); }
.vp-cap { position: absolute; left: 0; right: 0; bottom: 18px; margin: 0; text-align: center; color: var(--ink-2); font-size: 14px; letter-spacing: .08em; text-transform: uppercase; }
@media (max-width: 560px) { .vp { padding: 64px 8px 56px; } .vp-nav { position: absolute; bottom: 8px; width: 44px; height: 44px; } .vp-prev { left: 16px; } .vp-next { right: 16px; } .vp video { max-height: 78vh; } }

/* ---- films + reels ---- */
.films { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 28px; }
.films figure { margin: 0; }
.films figcaption { margin-top: 8px; font-size: 13px; color: var(--ink-2); }
.reel.wide { aspect-ratio: 16 / 9; }
.films figcaption em, .reels figcaption em { font-style: normal; color: #6f6f6c; }
.films figcaption em::before, .reels figcaption em::before { content: " · "; }
.js .reels:not(.all) figure:nth-child(n+9) { display: none; }
.more { display: block; margin: 28px auto 0; min-height: 48px; padding: 0 26px; border-radius: 999px; border: 1px solid var(--rule); background: transparent; color: var(--ink); font: 500 15px var(--font); cursor: pointer; transition: background .3s, color .3s; }
.more:hover { background: var(--ink); color: var(--bg); }
.vp video { aspect-ratio: auto; width: auto; height: auto; max-width: min(100%, 1100px); max-height: 84vh; }
.vp.tall video { height: 84vh; }
@media (max-width: 560px) { .films { grid-template-columns: minmax(0, 1fr); } .vp.tall video { height: auto; width: 100%; max-height: 76vh; } }
