/* ------------------------------------------------------------------
   Yan Mark Darunday — "The Exhibition"
   Monochrome: the screenshots carry all the colour.
------------------------------------------------------------------- */
:root {
  --bg: #0a0a0b;
  --fg: #f2efe9;
  --ink: #0a0a0b;        /* fixed dark, for text on fixed-light surfaces */
  --paper: #f2efe9;      /* fixed light */

  --fg-72: color-mix(in srgb, var(--fg) 72%, transparent);
  --fg-32: color-mix(in srgb, var(--fg) 32%, transparent);
  --fg-16: color-mix(in srgb, var(--fg) 16%, transparent);
  --fg-08: color-mix(in srgb, var(--fg) 8%, transparent);

  --f-display: "Inter Tight", "Helvetica Neue", Arial, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, monospace;

  --ease-osmo: cubic-bezier(0.625, 0.05, 0, 1);
  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);

  --gutter: clamp(16px, 2.2vw, 36px);
  --hud: 72px;
}
html[data-theme="light"] { --bg: #f2efe9; --fg: #0a0a0b; }

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); color-scheme: dark; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; } /* hidden, not clip: clip would also block the deep-link jump made while stopped */

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 16px/1.6 var(--f-display);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
::selection { background: var(--fg); color: var(--bg); }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
h1, h2, h3, p { margin: 0; }
:focus-visible { outline: 2px solid var(--fg); outline-offset: 4px; }

.mono {
  font: 500 11px/1.5 var(--f-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.dim { color: var(--fg-72); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Hover text roll */
.roll { display: inline-block; overflow: hidden; vertical-align: top; }
.roll > span { position: relative; display: block; transition: transform .5s var(--ease-osmo); }
.roll > span::after { content: attr(data-text); position: absolute; left: 0; top: 100%; }
a:hover .roll > span, a:focus-visible .roll > span { transform: translateY(-100%); }

/* ------------------------------------------------------------------
   Atmosphere
------------------------------------------------------------------- */
.grain {
  position: fixed; inset: -50%; z-index: 90; pointer-events: none; opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%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 0.8s steps(4) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); } 25% { transform: translate(-3%, 2%); }
  50% { transform: translate(2%, -3%); } 75% { transform: translate(-2%, -1%); }
  100% { transform: translate(0, 0); }
}

/* ------------------------------------------------------------------
   Cursor
------------------------------------------------------------------- */
.cursor {
  position: fixed; top: 0; left: 0; z-index: 95; pointer-events: none;
  width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%;
  background: #fff; mix-blend-mode: difference;
  display: grid; place-items: center;
  transition: width .45s var(--ease-expo), height .45s var(--ease-expo), margin .45s var(--ease-expo);
}
.cursor.is-active { width: 96px; height: 96px; margin: -48px 0 0 -48px; }
.cursor-label {
  font: 500 9px/1.2 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: #000;
  text-align: center; padding: 0 8px; opacity: 0; transition: opacity .2s;
}
.cursor.is-active .cursor-label { opacity: 1; }
@media (hover: none), (pointer: coarse) { .cursor { display: none; } }

/* ------------------------------------------------------------------
   HUD
------------------------------------------------------------------- */
.hud { position: fixed; inset: 0; z-index: 50; pointer-events: none; }
.hud > * { pointer-events: auto; position: absolute; margin: 0; }
.brand { top: 22px; left: var(--gutter); display: flex; align-items: center; }
.brand-logo { font: 400 24px/1 "Major Mono Display", var(--f-mono); letter-spacing: -0.2em; transition: opacity .3s var(--ease-osmo); }
.brand:hover .brand-logo { opacity: .7; }

.nav { top: 22px; right: var(--gutter); display: flex; gap: 28px; }
.nav-link { position: relative; font: 500 11px/1 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; padding: 4px 0 6px; }
.nav-link::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: 0 50%; transition: transform .5s var(--ease-osmo);
}
.nav-link.is-active::after { transform: scaleX(1); }

.hud-role, .hud-status { bottom: 22px; color: var(--fg-72); transition: opacity .5s var(--ease-osmo); }
.hud-role { left: var(--gutter); }
.hud-status { right: var(--gutter); display: flex; align-items: flex-start; gap: 8px; text-align: right; }
.pulse { width: 7px; height: 7px; margin-top: 4px; border-radius: 50%; background: var(--fg); animation: pulse 1.6s var(--ease-osmo) infinite; }
@keyframes pulse { 50% { opacity: .25; transform: scale(.7); } }
.hud.is-past-hero .hud-role, .hud.is-past-hero .hud-status { opacity: 0; pointer-events: none; }

/* ------------------------------------------------------------------
   Sections
------------------------------------------------------------------- */
main { position: relative; z-index: 1; }
section { position: relative; min-height: 100svh; } /* every section is a full-screen room */

@media (max-width: 899px) {
  :root { --hud: 64px; }
  .nav { gap: 16px; }
  .hud::before { content: ""; position: absolute; inset: 0 0 auto; height: 72px; background: linear-gradient(var(--bg) 35%, transparent); pointer-events: none; }
}
@media (max-width: 520px) {
  .nav { gap: 14px; top: 16px; }
  .nav-link { letter-spacing: .04em; padding: 10px 0 12px; } /* 24px+ touch targets */
}

@media (prefers-reduced-motion: reduce) {
  .grain, .pulse { animation: none; }
}
