:root {
  --bg: #000; --ink: #fff; --muted: rgba(255,255,255,.45); --line: rgba(255,255,255,.08);
  --pad: clamp(16px, 4vw, 56px);
  --ease: cubic-bezier(.32, .72, 0, 1);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html.snap { scroll-snap-type: y mandatory; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.5 "Handjet", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif; -webkit-font-smoothing: none; font-smooth: never; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
.s { font: 400 clamp(10px, .9vw, 13px)/1 "Silkscreen", monospace; letter-spacing: .3em; text-transform: uppercase; color: var(--muted); }

.bar { position: fixed; inset: 0 0 auto; z-index: 50; display: flex; justify-content: space-between; align-items: center; padding: var(--pad); mix-blend-mode: difference; }
.bar nav { display: flex; gap: clamp(16px, 3vw, 40px); }
.bar a { transition: color .3s; } .bar a:hover { color: var(--ink); }

/* hero */
.hero { position: relative; height: 100svh; min-height: 480px; display: grid; place-items: center; overflow: hidden; perspective: 1000px; }
.hero > .fx { position: absolute; inset: 0; pointer-events: none; }
.flare { background: radial-gradient(circle at 50% 50%, rgba(255,255,255,.15), transparent 70%); }
.hero > .floor { top: auto; height: 30%; background: linear-gradient(to top, rgba(255,255,255,.1), transparent); filter: blur(64px); }
.scan { z-index: 4; background: repeating-linear-gradient(to bottom, rgba(0,0,0,.35) 0 1px, transparent 1px 3px); mix-blend-mode: multiply; }
.fade { background: linear-gradient(to bottom, #000, transparent 30%, transparent 70%, #000), linear-gradient(to right, #000, transparent 25%, transparent 75%, #000); }

.slit { position: absolute; left: 50%; top: 20%; width: 2px; height: 60%; margin-left: -1px; background: #fff; opacity: .9;
  box-shadow: 0 0 40px rgba(255,255,255,.8), 0 0 100px rgba(255,255,255,.4);
  transform: rotateX(10deg); animation: open 1.8s var(--ease) both; }
.slit::before { content: ""; position: absolute; inset: 0 -10rem; filter: blur(80px); background: linear-gradient(180deg, transparent, rgba(255,255,255,.6) 50%, transparent); }
@keyframes open { from { clip-path: inset(50% 0); } to { clip-path: inset(-50% -200%); } }

.mark { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; will-change: transform; }
.mark h1 { margin: 0; font-weight: 700; font-size: clamp(80px, 24vw, 320px); line-height: 1; letter-spacing: .02em; text-shadow: 0 0 20px rgba(255,255,255,.5);
  animation: in 1.6s .7s var(--ease) both; }
.mark hr { width: 48px; height: 1px; margin: clamp(20px, 3vw, 32px) 0 clamp(16px, 2vw, 24px); border: 0; background: rgba(255,255,255,.4); animation: grow 1.2s 1.4s var(--ease) both; }
.mark h2 { margin: 0 -1.2em 0 0; font: 400 clamp(12px, 1.3vw, 18px)/1 "Silkscreen", monospace; letter-spacing: 1.2em; text-transform: uppercase; opacity: .8; animation: in 1.6s 1.6s var(--ease) both; }
/* RGB glitch: the white wordmark stays on top; behind it its three guns burst apart on the
   font's own pixel grid (1/16 em), blurred, and snap back together. The pattern is made per burst in JS. */
.g { position: relative; display: inline-block; isolation: isolate; }
.g i { position: absolute; inset: 0; z-index: -1; font-style: normal; text-shadow: none; opacity: 0; mix-blend-mode: screen; filter: blur(.018em); pointer-events: none; }
.g .cr { color: #f00; } .g .cg { color: #0f0; } .g .cb { color: #00f; }
@keyframes in { from { opacity: 0; filter: blur(14px); transform: translateY(20px) scale(.98); } }
@keyframes grow { from { transform: scaleX(0); } }

.dust i { position: absolute; width: var(--z); height: var(--z); background: #fff; opacity: 0; animation: drift var(--t) steps(24) var(--d) infinite; }
@keyframes drift { 0% { opacity: 0; transform: translate(0, 0); } 15%, 85% { opacity: .35; } 100% { opacity: 0; transform: translate(var(--x), -14vh); } }

.cue { position: absolute; bottom: var(--pad); left: 50%; width: 1px; height: 48px; background: linear-gradient(transparent, rgba(255,255,255,.6)); transform-origin: top; animation: cue 2.4s 2s ease-in-out infinite both; }
@keyframes cue { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); opacity: 1; } 100% { transform: scaleY(1); opacity: 0; } }

.tilt { position: absolute; bottom: calc(var(--pad) + 64px); left: 50%; transform: translateX(-50%); z-index: 3; padding: 12px 18px 12px 24px; border: 1px solid var(--line); border-radius: 999px; background: none; color: var(--muted); cursor: pointer; }

/* marquee */
/* the marquee is a thin band (a third of --fs tall) with its letters stretched twice as wide */
.marquee { --fs: clamp(36px, 6vw, 96px); border-block: 1px solid var(--line); overflow: hidden; padding: clamp(6px, 1vw, 12px) 0; }
.track { display: flex; align-items: flex-start; width: max-content; height: calc(var(--fs) / 3); animation: slide 40s linear infinite; }
.track span { display: block; transform: scaleY(.1667); transform-origin: top; font-weight: 700; font-size: calc(var(--fs) * 2); line-height: 1; letter-spacing: .02em; padding-right: .2em; white-space: nowrap; color: var(--c); text-shadow: 0 0 .25em var(--c); }
.track span:nth-child(3n+1) { --c: #ff2a4d; }
.track span:nth-child(3n+2) { --c: #2aff7a; }
.track span:nth-child(3n+3) { --c: #2a7aff; }
@keyframes slide { to { transform: translateX(-50%); } }

/* work */
/* pages: each screen snaps into place; the hero sinks back as the next one arrives */
.hero, .page { scroll-snap-align: start; scroll-snap-stop: always; }
.page { position: relative; min-height: 100svh; }
@supports (animation-timeline: view()) {
  .hero { animation: away linear both; animation-timeline: view(); animation-range: exit 0% exit 100%; }
  @keyframes away { to { opacity: .15; transform: scale(.94); filter: blur(4px); } }
}
.work { display: flex; flex-direction: column; justify-content: center; gap: clamp(40px, 7vw, 96px); padding: calc(var(--pad) * 2.5) 0; }
.work .list { padding: 0 var(--pad); }
.list { list-style: none; margin: 0; padding: 0; }
.list li { position: relative; isolation: isolate; border-bottom: 1px solid var(--line); overflow: hidden; }
.list a { display: grid; grid-template-columns: clamp(48px, 8vw, 120px) 1fr auto; align-items: center; padding: clamp(10px, 1.4vw, 20px) 0; }
.list li:first-child { border-top: 1px solid var(--line); }
.list li::before { content: ""; position: absolute; inset: 0; z-index: -1; background: #fff; transform: scaleY(0); transform-origin: bottom; transition: transform .7s var(--ease); }
.list a > * { transition: color .5s var(--ease), letter-spacing .7s var(--ease), transform .7s var(--ease), opacity .5s; }
.list b { font-weight: 700; font-size: clamp(32px, 5.5vw, 88px); line-height: 1; letter-spacing: .02em; }
.list i { font-style: normal; font-size: clamp(18px, 2vw, 32px); padding-right: .4em; transform: translateX(-40%); opacity: 0; }
@media (hover: hover) {
  .list li:hover::before { transform: scaleY(1); }
  .list li:hover a > * { color: #000; }
  .list li:hover b { letter-spacing: .08em; }
  .list li:hover i { transform: none; opacity: 1; }
}

/* contact */
.contact { display: grid; place-content: center; justify-items: center; gap: clamp(24px, 4vw, 48px); text-align: center; border-top: 1px solid var(--line); overflow: hidden; }
.contact::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse 50% 40% at 50% 50%, rgba(255,255,255,.08), transparent 70%); }
.mail { position: relative; font-weight: 400; font-size: clamp(28px, 7vw, 120px); line-height: 1.1; letter-spacing: .02em; overflow-wrap: anywhere; transition: text-shadow .6s; }
.mail:hover { text-shadow: 0 0 24px rgba(255,255,255,.6); }
footer { position: absolute; left: 0; right: 0; bottom: 0; padding: var(--pad); display: flex; justify-content: space-between; gap: 16px; border-top: 1px solid var(--line); }

/* about */
.about { display: grid; grid-template-columns: 1.1fr 1fr; align-items: center; gap: clamp(32px, 6vw, 96px); padding: calc(var(--pad) * 2.5) var(--pad); border-top: 1px solid var(--line); word-break: keep-all; }
.about-text { container-type: inline-size; }
/* one line: the heading is sized to its column (it runs about 9.7em wide) */
.about h2 { margin: .5em 0 0; font-weight: 700; font-size: clamp(28px, 6vw, 96px); font-size: min(96px, 10cqi); white-space: nowrap; line-height: 1; letter-spacing: .02em; text-shadow: 0 0 20px rgba(255,255,255,.35); }
.about .prose { margin-top: clamp(20px, 3vw, 40px); max-width: 32em; }
.about-img { width: 100%; height: auto; max-height: 70svh; object-fit: contain; -webkit-mask-image: radial-gradient(ellipse closest-side, #000 70%, transparent); mask-image: radial-gradient(ellipse closest-side, #000 70%, transparent); }
@media (max-width: 760px) {
  .about { grid-template-columns: 1fr; align-content: center; }
  .about-img { max-height: 32svh; }
}
.socials { display: flex; flex-wrap: wrap; justify-content: center; gap: .6em 2em; }
.socials a { transition: color .3s; }
.socials a:hover { color: var(--ink); }
a:focus-visible, button:focus-visible { outline: 1px dashed #fff; outline-offset: 4px; }

/* work detail page */
.detail { max-width: 920px; margin: 0 auto; padding: max(120px, calc(var(--pad) * 3)) var(--pad) calc(var(--pad) * 2); word-break: keep-all; overflow-wrap: anywhere; }
.detail .crumb { display: flex; gap: 1.2em; }
.detail .crumb a:hover { color: var(--ink); }
.detail h1 { margin: .3em 0 0; font-weight: 700; font-size: clamp(56px, 12vw, 176px); line-height: 1; letter-spacing: .02em; text-shadow: 0 0 20px rgba(255,255,255,.5); }
.detail .summary { margin: 1em 0 0; font-size: clamp(22px, 2.6vw, 34px); line-height: 1.3; color: rgba(255,255,255,.7); }
.detail .cover { display: block; width: 100%; height: auto; margin: clamp(32px, 5vw, 64px) 0 0; border: 1px solid var(--line); image-rendering: auto; }
.prose { margin-top: clamp(32px, 5vw, 64px); font-size: clamp(20px, 1.8vw, 24px); line-height: 1.6; color: rgba(255,255,255,.85); }
.prose h2, .prose h3 { margin: 1.6em 0 .4em; font-weight: 700; line-height: 1.1; color: #fff; }
.prose h2 { font-size: 1.8em; } .prose h3 { font-size: 1.4em; }
.prose a { text-decoration: underline; text-underline-offset: .2em; }
.prose img, .prose video { max-width: 100%; height: auto; border: 1px solid var(--line); }
.prose blockquote { margin: 1.2em 0; padding-left: 1em; border-left: 2px solid rgba(255,255,255,.3); color: rgba(255,255,255,.6); }
.prose code { font-family: ui-monospace, Consolas, monospace; font-size: .85em; }
.prose pre { overflow-x: auto; padding: 1em; border: 1px solid var(--line); }
.pager { display: flex; justify-content: space-between; gap: 16px; margin-top: clamp(64px, 10vw, 128px); padding-top: var(--pad); border-top: 1px solid var(--line); }
.pager a { display: grid; gap: .6em; }
.pager a:last-child { text-align: right; }
.pager b { font-weight: 700; font-size: clamp(24px, 3vw, 40px); line-height: 1; transition: text-shadow .5s; }
.pager a:hover b { text-shadow: 0 0 .4em rgba(255,255,255,.7); }
.detail + footer { position: static; }
.detail.gallery { max-width: 1280px; }
.grid { list-style: none; margin: clamp(40px, 6vw, 80px) 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: clamp(12px, 2vw, 24px); }
.tile { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; border: 1px solid var(--line); background: #050505; }
.tile img { display: block; width: 100%; height: 100%; object-fit: cover; transition: filter .5s var(--ease), transform .7s var(--ease); }
.tile span { position: absolute; inset: 0; display: grid; place-items: center; padding: 1em; text-align: center; font-weight: 700; font-size: clamp(28px, 3vw, 44px); line-height: 1.05; text-shadow: 0 0 20px rgba(255,255,255,.6); opacity: 0; transform: translateY(8px); transition: opacity .4s, transform .6s var(--ease); }
.tile:hover img, .tile:focus-visible img { filter: blur(10px) brightness(.45); transform: scale(1.06); }
.tile:hover span, .tile:focus-visible span { opacity: 1; transform: none; }
/* no hover on touch screens: the title sits on the image instead */
@media (hover: none) {
  .tile span { opacity: 1; transform: none; place-items: end start; font-size: 24px; background: linear-gradient(transparent 55%, rgba(0,0,0,.75)); }
}
.detail.post h1 { font-size: clamp(40px, 7vw, 104px); }
.posts { margin-top: clamp(64px, 10vw, 128px); display: grid; gap: clamp(16px, 2vw, 24px); }
.posts .list b { font-size: clamp(24px, 3.2vw, 48px); }
.posts .list a { grid-template-columns: clamp(96px, 12vw, 150px) 1fr auto; }
.posts .empty { margin: 0; padding: 2em 0; border-block: 1px solid var(--line); }

.rv { opacity: 0; transform: translateY(48px); filter: blur(8px); transition: opacity 1.2s var(--ease), transform 1.2s var(--ease), filter 1.2s var(--ease); transition-delay: calc(var(--d, 0) * 100ms); }
.rv.in { opacity: 1; transform: none; filter: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .rv { opacity: 1; transform: none; filter: none; }
}
