/* =========================================================
   ARSEN BALABEK — dark, monochrome, glass
   ========================================================= */
:root {
  --bg: #070707;
  --fg: #f1efea;
  --fg-2: rgba(241, 239, 234, 0.62);
  --fg-3: rgba(241, 239, 234, 0.38);
  --line: rgba(255, 255, 255, 0.13);

  --glass-bg: linear-gradient(140deg, rgba(255,255,255,0.11) 0%, rgba(255,255,255,0.035) 55%, rgba(255,255,255,0.06) 100%);
  --glass-border: rgba(255, 255, 255, 0.14);

  --nis-1: rgba(62, 214, 128, 0.38);
  --nis-2: rgba(10, 110, 62, 0.22);
  --nis-border: rgba(140, 255, 190, 0.42);
  --nis-fg: #dcffea;

  --r-sm: 18px;
  --r: 30px;
  --r-lg: 44px;

  --display: "Archivo", "Arial Black", sans-serif;
  --body: "Inter Tight", "Helvetica Neue", Arial, sans-serif;

  --gutter: clamp(16px, 3.4vw, 56px);
  --header-h: 96px;
  --wt: clamp(54px, min(8.2vw, 13.5vh), 160px);        /* wheel title size, fits width AND height */
  --wheel-h: calc(var(--wt) * 1.64 + 4vh);

  --ease: cubic-bezier(.19, 1, .22, 1);
  --ease-io: cubic-bezier(.76, 0, .24, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--body);
  font-size: 18px;
  line-height: 1.4;
  overflow: hidden;
  overscroll-behavior: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  touch-action: none;
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
em { font-style: normal; color: var(--fg); }
sup { font-size: .42em; vertical-align: top; position: relative; top: .25em; margin-left: .04em; }

@media (hover: hover) and (pointer: fine) {
  body.has-cursor, body.has-cursor * { cursor: none !important; }
}

/* ---------- canvas & film ---------- */
#webgl { position: fixed; inset: 0; width: 100%; height: 100%; display: block; z-index: 0; }
.grain {
  position: fixed; inset: -50%; z-index: 40; pointer-events: none;
  opacity: .085; mix-blend-mode: overlay;
  animation: grain 1s steps(6) infinite;
}
@keyframes grain {
  0% { transform: translate(0,0) } 20% { transform: translate(-3%, 2%) } 40% { transform: translate(2%, -4%) }
  60% { transform: translate(-4%, -1%) } 80% { transform: translate(3%, 3%) } 100% { transform: translate(0,0) }
}
.vignette {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(120% 90% at 50% 45%, transparent 55%, rgba(0,0,0,.65) 100%),
    linear-gradient(to bottom, rgba(0,0,0,.45), transparent 22%, transparent 70%, rgba(0,0,0,.55));
}

/* ---------- glass ---------- */
.glass {
  position: relative;
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(24px) saturate(150%) brightness(1.05);
  backdrop-filter: blur(24px) saturate(150%) brightness(1.05);
  border: 1px solid var(--glass-border);
  border-radius: var(--r);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.22),
    inset 0 -1px 0 rgba(255,255,255,.05),
    inset 0 0 40px rgba(255,255,255,.03),
    0 40px 90px -30px rgba(0,0,0,.75);
  overflow: hidden;
  isolation: isolate;
}
.glass::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(420px circle at var(--mx, 30%) var(--my, 0%), rgba(255,255,255,.16), transparent 45%);
  opacity: .9; transition: opacity .4s;
}
.glass::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(160deg, rgba(255,255,255,.18), transparent 28%);
  mask: linear-gradient(#000, #000) content-box, linear-gradient(#000, #000);
  -webkit-mask: linear-gradient(#000, #000) content-box, linear-gradient(#000, #000);
  -webkit-mask-composite: xor; mask-composite: exclude;
  padding: 1px;
}

.glass-green {
  position: relative;
  display: inline-flex; align-items: center; gap: .55em;
  padding: .55em 1.1em .55em .6em;
  border-radius: 999px;
  color: var(--nis-fg);
  background:
    radial-gradient(120% 140% at 20% 0%, rgba(160,255,200,.35), transparent 50%),
    linear-gradient(135deg, var(--nis-1), var(--nis-2));
  border: 1px solid var(--nis-border);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  box-shadow:
    inset 0 1px 0 rgba(210,255,228,.55),
    inset 0 -8px 20px rgba(0,60,30,.25),
    0 0 50px -6px rgba(62,214,128,.45),
    0 20px 50px -20px rgba(0,0,0,.6);
  font-size: 18px; letter-spacing: .02em;
  white-space: nowrap;
}
.glass-green b { font-family: var(--display); font-stretch: 125%; font-weight: 900; letter-spacing: .02em; }
.nis-mark {
  width: 2.1em; height: 2.1em; flex: none; border-radius: 50%;
  display: grid; place-items: center; color: #fff;
  background: radial-gradient(circle at 30% 25%, rgba(190,255,215,.55), rgba(40,150,85,.55) 60%, rgba(10,80,45,.7));
  border: 1px solid rgba(200,255,220,.55);
  box-shadow: inset 0 1px 1px rgba(255,255,255,.7), inset 0 -4px 10px rgba(0,50,25,.45), 0 0 18px rgba(62,214,128,.55);
}
.nis-mark svg { width: 64%; height: 64%; filter: drop-shadow(0 1px 1px rgba(0,60,30,.5)); }
.nis-badge.big { font-size: clamp(20px, 1.9vw, 30px); padding: .5em 1.2em .5em .55em; }

/* ---------- loader ---------- */
#loader {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center;
}
.loader-curtain { position: absolute; inset: 0; width: 100%; height: 100%; }
.loader-curtain path { fill: #0a0a0a; }
.loader-inner { position: relative; display: grid; justify-items: center; gap: 48px; width: min(680px, 86vw); }
.signature { width: 100%; height: auto; overflow: visible; }
.signature path {
  stroke: var(--fg); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round;
  filter: drop-shadow(0 0 6px rgba(255,255,255,.35));
}
.loader-enter {
  display: flex; align-items: center; gap: 28px; flex-wrap: wrap; justify-content: center;
  opacity: 0; transform: translateY(16px); pointer-events: none;
  transition: opacity 1s var(--ease), transform 1s var(--ease);
}
.loader-enter.is-ready { opacity: 1; transform: none; pointer-events: auto; }
.pill {
  display: inline-flex; align-items: center; gap: 14px;
  padding: 18px 30px; border-radius: 999px;
  font-size: 18px; font-weight: 500; letter-spacing: .01em;
  transition: transform .5s var(--ease);
}
.pill:hover { transform: scale(1.04); }
.link-btn { font-size: 18px; color: var(--fg-2); position: relative; padding: 6px 0; transition: color .3s; }
.link-btn::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: currentColor; transform: scaleX(.25); transform-origin: left; transition: transform .6s var(--ease); }
.link-btn:hover { color: var(--fg); }
.link-btn:hover::after { transform: scaleX(1); }
.loader-meta {
  position: absolute; left: var(--gutter); right: var(--gutter); bottom: 28px;
  display: flex; justify-content: space-between; align-items: end;
  font-size: 14px; letter-spacing: .06em; text-transform: uppercase; color: var(--fg-3);
  transition: opacity .6s;
}
.loader-count { font-family: var(--display); font-stretch: 125%; font-weight: 900; font-size: 18px; color: var(--fg); letter-spacing: .04em; }
#loader.is-leaving .loader-meta { opacity: 0; }
#loader.is-leaving .loader-inner { transition: transform 1.6s var(--ease-io), opacity 1.1s ease, filter 1.2s; transform: translateY(-14vh) scale(.85); opacity: 0; filter: blur(12px); }
#loader.is-gone { display: none; }

/* equalizer */
.eq { display: inline-flex; align-items: end; gap: 3px; height: 14px; }
.eq i { width: 2px; height: 100%; background: currentColor; border-radius: 2px; transform-origin: bottom; transform: scaleY(.25); transition: transform .4s; }
.is-sound-on .eq i { animation: eq 1.1s ease-in-out infinite; }
.pill .eq i { animation: eq 1.1s ease-in-out infinite; }
.eq i:nth-child(2) { animation-delay: -.3s !important; }
.eq i:nth-child(3) { animation-delay: -.6s !important; }
.eq i:nth-child(4) { animation-delay: -.9s !important; }
@keyframes eq { 0%,100% { transform: scaleY(.25) } 50% { transform: scaleY(1) } }

/* ---------- header / hud ---------- */
.site-header {
  position: fixed; z-index: 30; top: 0; left: 0; right: 0;
  height: var(--header-h); padding: 0 var(--gutter);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  font-size: 17px; font-weight: 500;
}
.brand { display: inline-flex; align-items: center; gap: 12px; justify-self: start; letter-spacing: .01em; }
.brand-sign { width: clamp(110px, 9vw, 150px); height: auto; overflow: visible; }
.brand-sign path { stroke: var(--fg); stroke-width: 3.6; filter: drop-shadow(0 0 4px rgba(255,255,255,.3)); stroke-linecap: round; stroke-linejoin: round; }
.hud-counter {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--display); font-stretch: 125%; font-weight: 900; font-size: 15px; letter-spacing: .05em;
}
.hud-sep { width: 38px; height: 1px; background: var(--fg-3); }
.hud-total { color: var(--fg-3); }
.hud-label {
  margin-left: 10px; font-family: var(--body); font-stretch: normal; font-weight: 500; font-size: 15px;
  letter-spacing: .08em; text-transform: uppercase; color: var(--fg-2);
}
.nav { justify-self: end; display: flex; gap: 10px; }
.nav button {
  padding: 12px 22px; border-radius: 999px; border: 1px solid var(--line);
  background: rgba(255,255,255,.04);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  transition: background .4s, border-color .4s;
}
.nav button:hover { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.3); }

.site-header, #wheel, .progress, .sound, #phases { opacity: 0; transition: opacity 1.4s ease .2s; }
body.is-ready .site-header, body.is-ready #wheel, body.is-ready .progress, body.is-ready .sound, body.is-ready #phases { opacity: 1; }

.progress {
  position: fixed; z-index: 30; right: calc(var(--gutter) - 6px); top: 50%; transform: translateY(-50%);
  display: grid; gap: 4px;
}
.progress button { display: block; width: 34px; height: 16px; position: relative; }
.progress button::before {
  content: ""; position: absolute; right: 6px; top: 50%; height: 1px; width: 10px;
  background: var(--fg-3); transition: width .6s var(--ease), background .4s;
}
.progress button:hover::before { width: 18px; background: var(--fg-2); }
.progress button.is-active::before { width: 26px; background: var(--fg); }

.sound {
  position: fixed; z-index: 30; right: var(--gutter); bottom: 26px;
  display: inline-flex; align-items: center; gap: 12px;
  padding: 12px 18px; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(255,255,255,.04);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--fg-2);
}

/* ---------- phases ---------- */
#phases { position: fixed; inset: 0; z-index: 10; pointer-events: none; }
.phase { position: absolute; inset: 0; visibility: hidden; }
.phase.is-active, .phase.is-leaving { visibility: visible; }
.phase-grid {
  position: absolute;
  top: calc(var(--header-h) + 2vh); bottom: calc(var(--wheel-h) + 2vh);
  left: var(--gutter); right: calc(var(--gutter) + 30px);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 26vw) minmax(0, 1fr);
  align-items: center; gap: 2vw;
}
.col { display: grid; gap: 22px; align-content: center; pointer-events: auto; }
.col-l { grid-column: 1; justify-items: start; }
.col-r { grid-column: 3; justify-items: stretch; max-width: 520px; justify-self: end; width: 100%; }
.stack { gap: 14px; }

/* reveal */
.r {
  opacity: 0;
  transform: translate3d(0, 46px, 0);
  filter: blur(10px);
  transition: opacity .45s ease, transform .6s var(--ease), filter .45s ease;
}
.phase.is-active .r {
  opacity: 1; transform: none; filter: blur(0);
  transition: opacity 1.1s ease var(--d, 0s), transform 1.4s var(--ease) var(--d, 0s), filter 1.1s ease var(--d, 0s);
}
.phase.is-leaving .r { opacity: 0; transform: translate3d(0, -34px, 0); filter: blur(8px); }

/* typography */
.kicker {
  margin: 0; font-size: 14px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--fg-2);
  display: inline-flex; align-items: center; gap: 12px;
}
.kicker::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--fg); box-shadow: 0 0 12px rgba(255,255,255,.8); }
.display {
  margin: 0; font-family: var(--display); font-stretch: 125%; font-weight: 900;
  font-size: clamp(44px, min(5.2vw, 9vh), 104px); line-height: .86; letter-spacing: -.01em; text-transform: uppercase;
}
.huge {
  margin: 0; font-family: var(--display); font-stretch: 125%; font-weight: 900;
  font-size: clamp(88px, min(11vw, 19vh), 210px); line-height: .8; letter-spacing: -.02em;
}
.title-md {
  margin: 0; font-family: var(--display); font-stretch: 125%; font-weight: 800;
  font-size: clamp(28px, min(2.9vw, 5.2vh), 54px); line-height: .98; letter-spacing: -.01em; text-transform: uppercase;
  max-width: 13em;
}
.dim { color: var(--fg-3); }
.lead { margin: 0; font-size: clamp(18px, min(1.5vw, 2.7vh), 27px); line-height: 1.22; letter-spacing: -.012em; color: var(--fg); max-width: 19em; font-weight: 400; }
.lead { text-wrap: pretty; }
.note { margin: 0; font-size: 15px; letter-spacing: .02em; color: var(--fg-3); }
.hint { margin: 0; display: inline-flex; align-items: center; gap: 14px; font-size: 14px; letter-spacing: .12em; text-transform: uppercase; color: var(--fg-2); justify-self: end; }
.hint-line { width: 44px; height: 1px; background: var(--fg-2); position: relative; overflow: hidden; }
.hint-line::after { content: ""; position: absolute; inset: 0; background: var(--fg); animation: hint 2.2s var(--ease-io) infinite; }
@keyframes hint { 0% { transform: translateX(-100%) } 60%,100% { transform: translateX(100%) } }

/* cards */
.card { padding: 30px 32px; display: grid; gap: 16px; }
.card-k { margin: 0; font-size: 14px; letter-spacing: .12em; text-transform: uppercase; color: var(--fg-2); }
.card-t { margin: 0; font-family: var(--display); font-stretch: 125%; font-weight: 800; font-size: clamp(22px, min(1.9vw, 3.4vh), 34px); line-height: 1; text-transform: uppercase; }
.card-p { margin: 0; font-size: clamp(18px, 1.35vw, 23px); line-height: 1.3; color: var(--fg); opacity: .88; }
.card-row { margin: 0; display: flex; align-items: center; gap: 20px; font-size: clamp(17px, 1.25vw, 21px); line-height: 1.3; }
.card-row > b { font-family: var(--display); font-stretch: 125%; font-weight: 900; font-size: clamp(44px, 4.2vw, 76px); line-height: .9; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags span { padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line); font-size: 15px; background: rgba(255,255,255,.04); }

.mini-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mini-stats div { display: grid; gap: 4px; padding: 16px 14px; border-radius: var(--r-sm); background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08); }
.mini-stats b { font-family: var(--display); font-stretch: 125%; font-weight: 900; font-size: clamp(24px, min(2vw, 3.6vh), 36px); line-height: 1; }
.mini-stats span { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--fg-2); }

.stat { padding: 22px 28px; display: flex; align-items: baseline; justify-content: space-between; gap: 20px; }
.stat b { font-family: var(--display); font-stretch: 125%; font-weight: 900; font-size: clamp(40px, min(4vw, 7.2vh), 76px); line-height: .9; letter-spacing: -.01em; white-space: nowrap; }
.stat > span { font-size: 15px; letter-spacing: .1em; text-transform: uppercase; color: var(--fg-2); text-align: right; max-width: 12em; }
.stat--col { flex-direction: column; align-items: flex-start; gap: 10px; }
.stat--col > span { text-align: left; max-width: none; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid-2 .stat { flex-direction: column; align-items: flex-start; gap: 14px; padding: 24px; }
.grid-2 .stat b { font-size: clamp(28px, min(2.6vw, 4.8vh), 52px); }
.grid-2 .stat > span { text-align: left; font-size: 13px; }

.list { list-style: none; margin: 0; padding: 10px 30px; }
.list li { display: grid; grid-template-columns: 5.2em 1fr; align-items: center; gap: 18px; padding: 22px 0; border-top: 1px solid var(--line); }
.list li:first-child { border-top: 0; }
.list-n { font-family: var(--display); font-stretch: 125%; font-weight: 900; font-size: clamp(28px, min(2.3vw, 4.2vh), 44px); line-height: 1; }
.list li > span:last-child { font-size: clamp(18px, min(1.4vw, 2.5vh), 24px); line-height: 1.15; }
.list small { display: block; font-size: 15px; color: var(--fg-2); margin-top: 6px; letter-spacing: .01em; }

.mail {
  font-family: var(--display); font-stretch: 125%; font-weight: 800;
  font-size: clamp(18px, 1.45vw, 28px); line-height: 1.1; overflow-wrap: anywhere;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size .7s var(--ease); padding-bottom: 4px;
}
.mail:hover { background-size: 100% 1px; }
.socials { display: flex; flex-wrap: wrap; gap: 8px; }
.socials a { padding: 12px 20px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255,255,255,.05); transition: background .4s; font-size: 16px; }
.socials a:hover { background: rgba(255,255,255,.15); }

/* ---------- wheel ---------- */
#wheel {
  position: fixed; z-index: 20; transform-style: preserve-3d; left: 0; right: 0; bottom: 0; height: var(--wheel-h);
  perspective: 1500px; perspective-origin: 50% 30%;
  pointer-events: none; overflow: visible;
}
.wheel-item {
  position: absolute; left: 50%; bottom: 3vh;
  font-family: var(--display); font-stretch: 125%; font-weight: 900;
  font-size: var(--wt); line-height: .82; letter-spacing: -.012em;
  text-transform: uppercase; text-align: center; white-space: nowrap;
  color: rgba(241,239,234,0);
  -webkit-text-stroke: 3.5px rgba(241,239,234,.55);
  transform-origin: 50% 62%;
  transition: color .7s ease, -webkit-text-stroke-color .7s ease, text-shadow .7s;
  will-change: transform, opacity;
  pointer-events: auto;
  backface-visibility: hidden;
}
.wheel-item.is-active {
  color: rgba(241,239,234,1);
  -webkit-text-stroke-color: rgba(241,239,234,0);
  text-shadow: 0 0 60px rgba(255,255,255,.18);
}

/* ---------- index overlay ---------- */
#index {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(6,6,6,.55);
  -webkit-backdrop-filter: blur(34px) saturate(130%); backdrop-filter: blur(34px) saturate(130%);
  opacity: 0; visibility: hidden;
  transition: opacity .8s var(--ease), visibility 0s linear .8s;
}
#index.is-open { opacity: 1; visibility: visible; transition: opacity .8s var(--ease); }
.index-scroll { position: absolute; inset: 0; overflow-y: auto; padding: 130px var(--gutter) 80px; overscroll-behavior: contain; touch-action: pan-y; }
.index-close {
  position: fixed; top: 26px; right: var(--gutter);
  padding: 12px 22px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255,255,255,.06);
}
.index-bio {
  margin: 0 0 80px; max-width: 24em;
  font-size: clamp(28px, 3.3vw, 58px); line-height: 1.1; letter-spacing: -.02em; color: var(--fg-2);
}
.index-bio b { color: var(--fg); font-weight: 500; }
.index-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 6vw; }
.index-h { margin: 0 0 14px; font-size: 14px; letter-spacing: .12em; text-transform: uppercase; color: var(--fg-3); }
.index-list { list-style: none; margin: 0 0 56px; padding: 0; }
.index-list li { display: grid; grid-template-columns: 4.4em 1fr; gap: 18px; padding: 16px 0; border-top: 1px solid var(--line); font-size: clamp(18px, 1.4vw, 23px); line-height: 1.3; }
.index-list span { font-family: var(--display); font-stretch: 125%; font-weight: 900; color: var(--fg-2); font-size: .9em; }
.index-links { display: flex; flex-wrap: wrap; gap: 10px; }
.index-links a { padding: 14px 24px; border-radius: 999px; border: 1px solid var(--line); font-size: 18px; transition: background .4s; }
.index-links a:hover { background: rgba(255,255,255,.12); }
#index .index-scroll > * { opacity: 0; transform: translateY(40px); transition: opacity .6s, transform .9s var(--ease); }
#index.is-open .index-scroll > * { opacity: 1; transform: none; }
#index.is-open .index-scroll > *:nth-child(2) { transition-delay: .08s; }
#index.is-open .index-scroll > *:nth-child(3) { transition-delay: .16s; }
#index.is-open .index-scroll > *:nth-child(4) { transition-delay: .24s; }

/* ---------- cursor ---------- */
#sparks { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 200; pointer-events: none; }
#cursor { position: fixed; left: 0; top: 0; z-index: 210; pointer-events: none; display: none; }
body.has-cursor #cursor { display: block; }
.cursor-star {
  position: absolute; left: 0; top: 0; width: 18px; height: 18px; margin: -9px 0 0 -9px;
  color: #fff; mix-blend-mode: difference; will-change: transform;
}
.cursor-lens {
  position: absolute; left: 0; top: 0; width: 64px; height: 64px; margin: -32px 0 0 -32px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.35);
  background: radial-gradient(circle at 30% 25%, rgba(255,255,255,.2), rgba(255,255,255,.02) 60%);
  -webkit-backdrop-filter: blur(3px) brightness(1.35) contrast(1.1); backdrop-filter: blur(3px) brightness(1.35) contrast(1.1);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 10px 30px rgba(0,0,0,.35);
  display: grid; place-items: center;
  will-change: transform;
  transition: width .5s var(--ease), height .5s var(--ease), margin .5s var(--ease), background .4s, opacity .4s;
}
.cursor-label {
  font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  opacity: 0; transform: scale(.6); transition: opacity .3s, transform .5s var(--ease);
}
#cursor.is-hover .cursor-lens { width: 104px; height: 104px; margin: -52px 0 0 -52px; background: radial-gradient(circle at 30% 25%, rgba(255,255,255,.28), rgba(255,255,255,.06) 60%); }
#cursor.is-hover .cursor-label { opacity: 1; transform: none; }
#cursor.is-down .cursor-lens { width: 44px; height: 44px; margin: -22px 0 0 -22px; }
#cursor.is-hidden { opacity: 0; }
#cursor { transition: opacity .3s; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .phase-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 14vw) minmax(0, 1fr); }
}
@media (max-width: 1100px) and (min-width: 861px) {
  .grid-2 { grid-template-columns: 1fr; }
  .grid-2 .stat { flex-direction: row; align-items: baseline; justify-content: space-between; padding: 16px 22px; }
}
@media (max-width: 860px) {
  .phase-grid::-webkit-scrollbar { display: none; }
  :root { --header-h: 72px; --wt: clamp(44px, 14vw, 96px); }
  body { font-size: 16px; }
  .site-header { grid-template-columns: 1fr auto; }
  .hud-counter { display: none; }
  .brand-sign { width: 96px; }
  .nav button { padding: 10px 16px; font-size: 15px; }
  .progress { display: none; }
  .phase-grid {
    right: var(--gutter);
    display: flex; flex-direction: column; justify-content: flex-start; gap: 18px;
    overflow-y: auto; overscroll-behavior: contain; touch-action: pan-y;
    padding-bottom: 20px;
    scrollbar-width: none;
    overflow-anchor: none;
    mask: linear-gradient(to bottom, #000 90%, transparent);
    -webkit-mask: linear-gradient(to bottom, #000 90%, transparent);
  }
  .col { gap: 16px; }
  .col-r { max-width: none; justify-self: stretch; }
  .display { font-size: clamp(44px, 13vw, 80px); }
  .huge { font-size: clamp(88px, 28vw, 160px); }
  .title-md { font-size: clamp(28px, 8vw, 44px); }
  .lead { font-size: 20px; }
  .card { padding: 22px; border-radius: 24px; }
  .glass { border-radius: 24px; }
  .stat { padding: 18px 22px; border-radius: 22px; }
  .stat b { font-size: clamp(40px, 12vw, 64px); }
  .list { padding: 4px 22px; }
  .list li { padding: 16px 0; grid-template-columns: 4.4em 1fr; }
  .hint { display: none; }
  .wheel-item { bottom: 2.5vh; -webkit-text-stroke-width: 1px; }
  .sound { bottom: calc(var(--wheel-h) + 6px); right: var(--gutter); padding: 10px 14px; }
  .sound-label { display: none; }
  .index-cols { grid-template-columns: 1fr; gap: 0; }
  .index-scroll { padding-top: 100px; }
  .loader-meta span:first-child, .loader-meta span:last-child { display: none; }
  .loader-meta { justify-content: center; }
}
@media (max-height: 760px) and (min-width: 861px) {
  .stat { padding: 16px 24px; }
  .stat b { font-size: clamp(40px, 4vw, 70px); }
  .card { padding: 24px 28px; gap: 12px; }
  .list li { padding: 14px 0; }
}
@media (prefers-reduced-motion: reduce) {
  .r, .phase.is-active .r { transition-duration: .01s !important; transition-delay: 0s !important; }
  .grain { animation: none; }
}

/* ---------- portrait (home) ---------- */
#portrait {
  position: fixed; z-index: 5; left: 50%; bottom: 0; height: 94vh;
  aspect-ratio: 720 / 1280; pointer-events: none;
  transform: translateX(-50%);
  opacity: 0; filter: blur(18px);
  transition: opacity .9s ease, filter 1s ease;
}
body.is-ready.is-home #portrait { opacity: 1; filter: blur(0); transition: opacity 1.6s ease .25s, filter 1.6s ease .25s; }
.portrait-inner {
  position: absolute; inset: 0; will-change: transform;
  transform: translate3d(var(--px, 0px), calc(var(--py, 0px) + 6%), 0) scale(1.02);
  transition: transform 1.8s var(--ease);
  -webkit-mask: linear-gradient(to bottom, #000 58%, rgba(0,0,0,.55) 74%, transparent 92%);
  mask: linear-gradient(to bottom, #000 58%, rgba(0,0,0,.55) 74%, transparent 92%);
}
body.is-ready.is-home .portrait-inner { transform: translate3d(var(--px, 0px), var(--py, 0px), 0) scale(1); }
.portrait-inner img {
  width: 100%; height: 100%; object-fit: contain; display: block;
  filter: grayscale(.82) contrast(1.12) brightness(.9) drop-shadow(0 0 1px rgba(255,255,255,.5)) drop-shadow(0 0 28px rgba(255,245,230,.16)) drop-shadow(0 40px 60px rgba(0,0,0,.6));
}
/* light sweep clipped to the silhouette */
.portrait-inner::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,.22) 48%, transparent 60%) no-repeat;
  background-size: 250% 100%; background-position: 130% 0;
  -webkit-mask: url(../assets/img/arsen-cutout.png) center / contain no-repeat;
  mask: url(../assets/img/arsen-cutout.png) center / contain no-repeat;
  mix-blend-mode: screen;
  animation: sweep 7s var(--ease-io) 2s infinite;
}
@keyframes sweep { 0% { background-position: 130% 0 } 45%, 100% { background-position: -30% 0 } }

/* ---------- company badge ---------- */
.company { display: inline-flex; align-items: center; gap: 14px; padding: 10px 22px 10px 10px; border-radius: 999px; }
.company img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 1px rgba(255,255,255,.2), 0 6px 20px rgba(0,0,0,.4); }
.company b { display: block; font-family: var(--display); font-stretch: 125%; font-weight: 900; font-size: 20px; letter-spacing: .01em; }
.company small { display: block; font-size: 14px; color: var(--fg-2); margin-top: 2px; }

/* ---------- favorite ---------- */
.fav-btn {
  margin-top: 56px; display: inline-flex; align-items: center; gap: 12px;
  padding: 6px 18px 6px 6px; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(255,255,255,.05);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  font-size: 15px; color: var(--fg-2);
  transition: background .4s, color .4s, transform .5s var(--ease);
}
.fav-btn img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; object-position: 50% 30%; }
.fav-btn svg { width: 14px; height: 14px; opacity: .7; }
.fav-btn:hover { background: rgba(255,255,255,.12); color: var(--fg); transform: translateY(-2px); }
.fav-btn:hover svg { animation: beat 1s ease-in-out infinite; }
@keyframes beat { 0%,100% { transform: scale(1) } 30% { transform: scale(1.3) } 60% { transform: scale(.95) } }

#fav {
  position: fixed; inset: 0; z-index: 80; display: grid; place-items: center;
  background: rgba(5,5,5,.5); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  opacity: 0; visibility: hidden; transition: opacity .6s var(--ease), visibility 0s linear .6s;
}
#fav.is-open { opacity: 1; visibility: visible; transition: opacity .6s var(--ease); }
.fav-card {
  margin: 0; padding: 14px 14px 18px; border-radius: 36px; width: min(420px, 84vw);
  transform: translateY(40px) rotate(-3deg) scale(.94); transition: transform 1s var(--ease);
}
#fav.is-open .fav-card { transform: rotate(-1.5deg); }
.fav-card img { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 30%; border-radius: 24px; }
.fav-card figcaption { display: flex; justify-content: space-between; align-items: center; padding: 16px 10px 0; font-family: var(--display); font-stretch: 125%; font-weight: 900; font-size: 20px; text-transform: uppercase; }
.fav-card figcaption svg { width: 20px; height: 20px; animation: beat 1.4s ease-in-out infinite; }

@media (max-width: 860px) {
  #portrait { height: 62vh; bottom: calc(var(--wheel-h) * .3); }
  .phase:first-child .col-l .lead, .phase:first-child .col-r { display: none; }
  .phase:first-child .display { font-size: clamp(34px, 10vw, 56px); }
}

/* =========================================================
   PHONE LAYOUT — compact, readable, fits one screen
   ========================================================= */
@media (max-width: 860px) {
  :root { --header-h: 64px; --gutter: 18px; --wt: clamp(38px, 12.5vw, 78px); }
  body { font-size: 15px; }

  /* darker top so text never fights the scene */
  .vignette {
    background:
      linear-gradient(to bottom, rgba(0,0,0,.72) 0%, rgba(0,0,0,.5) 45%, rgba(0,0,0,.1) 68%, rgba(0,0,0,.35) 100%);
  }

  /* header */
  .site-header { height: var(--header-h); font-size: 14px; }
  .brand-sign { width: 84px; }
  .nav { gap: 6px; }
  .nav button { padding: 9px 14px; font-size: 14px; }
  .sound {
    top: 14px; bottom: auto; left: calc(var(--gutter) + 96px); right: auto; transform: none;
    width: 36px; height: 36px; padding: 0; justify-content: center;
  }
  .sound-label { display: none; }

  /* content area */
  .phase-grid {
    top: calc(var(--header-h) + 6px);
    bottom: calc(var(--wheel-h) + 4px);
    left: var(--gutter); right: var(--gutter);
    gap: 14px; padding: 4px 0 24px;
  }
  .col { gap: 12px; }
  .kicker { font-size: 11px; letter-spacing: .12em; gap: 8px; }
  .kicker::before { width: 6px; height: 6px; }
  .display { font-size: clamp(36px, 11vw, 56px); }
  .huge { font-size: clamp(72px, 23vw, 120px); }
  .title-md { font-size: clamp(22px, 6.6vw, 34px); max-width: none; }
  .lead { font-size: 16px; line-height: 1.3; max-width: none; }
  .note { font-size: 13px; }

  /* glass */
  .glass { border-radius: 20px; }
  .card { padding: 16px 18px; gap: 10px; border-radius: 20px; }
  .card-k { font-size: 11px; }
  .card-t { font-size: 20px; }
  .card-p { font-size: 15px; line-height: 1.35; }
  .card-row { gap: 14px; font-size: 14px; }
  .card-row > b { font-size: 40px; }
  .tags { gap: 6px; }
  .tags span { padding: 6px 12px; font-size: 13px; }

  /* stats: small tiles in a row instead of huge stacked slabs */
  .stack { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 8px; }
  .stack > .card { grid-column: 1 / -1; }
  .stat, .stat--col, .grid-2 .stat {
    flex-direction: column; align-items: flex-start; justify-content: flex-start;
    gap: 6px; padding: 14px 14px; border-radius: 18px;
  }
  .stat b, .grid-2 .stat b { font-size: clamp(26px, 8.4vw, 40px); }
  .stat > span, .grid-2 .stat > span { font-size: 10.5px; letter-spacing: .08em; text-align: left; max-width: none; }
  .stack .stat b { font-size: clamp(24px, 7.4vw, 38px); }
  .grid-2 { gap: 8px; }

  .list { padding: 2px 16px; }
  .list li { grid-template-columns: 3.6em 1fr; gap: 12px; padding: 12px 0; }
  .list-n { font-size: 22px; }
  .list li > span:last-child { font-size: 16px; }
  .list small { font-size: 12.5px; margin-top: 3px; }

  .nis-badge, .nis-badge.big { font-size: 15px; padding: .4em .95em .4em .45em; }
  .mini-stats div { padding: 10px; border-radius: 14px; }
  .mini-stats b { font-size: 24px; }
  .mini-stats span { font-size: 11px; }

  .company { gap: 10px; padding: 6px 16px 6px 6px; }
  .company img { width: 38px; height: 38px; }
  .company b { font-size: 16px; }
  .company small { font-size: 12px; }

  .mail { font-size: 18px; }
  .socials a { padding: 9px 14px; font-size: 14px; }

  /* home: headline on top, portrait below, card hidden */
  .phase:first-child .display { font-size: clamp(34px, 10.5vw, 52px); }
  #portrait { height: min(60vh, 60dvh); bottom: calc(var(--wheel-h) * .25); }

  /* bottom titles */
  .wheel-item { bottom: max(14px, env(safe-area-inset-bottom)); -webkit-text-stroke-width: 2.5px; }

  /* index overlay */
  .index-scroll { padding: 84px var(--gutter) 60px; }
  .index-close { top: 14px; padding: 9px 16px; font-size: 14px; z-index: 2; background: rgba(20,20,20,.7); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
  .index-bio { font-size: 22px; margin-bottom: 40px; }
  .index-list li { grid-template-columns: 3.6em 1fr; gap: 12px; padding: 12px 0; font-size: 15px; }
  .index-links a { padding: 10px 16px; font-size: 14px; }
  .fav-btn { margin-top: 32px; }
}

/* very short phones (iPhone SE etc.) */
@media (max-width: 860px) and (max-height: 700px) {
  .display { font-size: 34px; }
  .huge { font-size: 72px; }
  .title-md { font-size: 22px; }
  .lead { font-size: 15px; }
  .stat b, .grid-2 .stat b { font-size: 26px; }
}
@media (max-width: 860px) {
  .phase:first-child .col-l .lead { display: block; font-size: 15px; color: var(--fg-2); max-width: 30em; }
}
@media (max-width: 860px) and (max-height: 700px) {
  .phase:first-child .col-l .lead { display: none; }
}

/* =========================================================
   TOUCH DEVICES — performance mode
   backdrop-filter, full-screen blend modes and animated filters
   are the most expensive things on iOS; replace them with
   opaque-looking glass that reads the same.
   ========================================================= */
@media (hover: none), (pointer: coarse) {
  .grain { display: none; }

  .glass, .nav button, .sound, .company, .fav-btn, .index-close, .glass-green {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
  }
  .glass {
    background:
      linear-gradient(140deg, rgba(255,255,255,.10), rgba(255,255,255,.03) 55%, rgba(255,255,255,.05)),
      rgba(22, 21, 20, .78);
  }
  .glass::before { display: none; }
  .nav button, .sound, .index-close { background: rgba(24, 23, 22, .8); }
  .glass-green {
    background:
      radial-gradient(120% 140% at 20% 0%, rgba(160,255,200,.3), transparent 50%),
      linear-gradient(135deg, rgba(40,150,90,.75), rgba(10,70,40,.8));
  }
  .company, .fav-btn { background: rgba(24, 23, 22, .8); }
  #index { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(6, 6, 6, .94); }
  #fav { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(5, 5, 5, .9); }

  /* reveal without blur filters */
  .r, .phase.is-active .r, .phase.is-leaving .r { filter: none !important; }
  .loader-inner, #loader.is-leaving .loader-inner { filter: none !important; }
  .signature path { filter: none; }

  /* portrait: one cheap filter, no masked light sweep */
  #portrait, body.is-ready.is-home #portrait { filter: none; }
  .portrait-inner img { filter: grayscale(.82) contrast(1.12) brightness(.9); }
  .portrait-inner::after { display: none; }

  .wheel-item, .wheel-item.is-active { text-shadow: none; filter: none !important; }
  .eq i { animation: none !important; }
}
