/* ===== Tokens ===== */
:root {
  --bg: #0a0706;
  --bg-2: #120d0b;
  --surface: rgba(255, 236, 222, .03);
  --surface-2: rgba(255, 236, 222, .055);
  --line: rgba(255, 236, 222, .09);
  --line-2: rgba(255, 236, 222, .16);
  --text: #f3ece6;
  --muted: #9d8f85;
  --fire-1: #ff6a1f;
  --fire-2: #ff8a3d;
  --fire-3: #ffa347; /* phoenix orange */
  --fire-4: #ffd08a;
  --fire-grad: linear-gradient(100deg, var(--fire-2), var(--fire-3));
  --radius: 22px;
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1200px;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);
  /* thin geometric caps, in the spirit of the VLADIS FIRE lettering */
  --font-display: "Montserrat", "Manrope", system-ui, sans-serif;
  --font-body: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* ===== Base ===== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.65 var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
body::after { /* film grain */
  content: "";
  position: fixed; inset: -10%;
  z-index: 100; pointer-events: none;
  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='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
  opacity: .06;
  animation: grain 1.2s steps(6) infinite;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
::selection { background: var(--fire-2); color: #1a0d05; }
:focus-visible { outline: 2px solid var(--fire-3); outline-offset: 4px; border-radius: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.skip {
  position: fixed; left: 16px; top: -60px; z-index: 200;
  padding: 10px 16px; border-radius: 12px; background: var(--fire-2); color: #1a0d05; font-weight: 700;
  transition: top .3s var(--ease-out);
}
.skip:focus { top: 16px; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 14px;
  margin: 0 0 20px;
  font: 500 12px/1 var(--font-display);
  letter-spacing: .32em; text-transform: uppercase;
  color: var(--fire-3);
}
.eyebrow::before { content: ""; width: 32px; height: 1px; background: currentColor; opacity: .6; }
.fire-text { color: var(--fire-3); }
/* Fire words in body copy: warm color and a slow, uneven glow */
.ember {
  position: relative; isolation: isolate; white-space: nowrap;
  color: var(--fire-3);
  text-shadow: 0 0 7px rgba(255, 110, 36, .28), 0 0 2px rgba(255, 190, 120, .45);
}
/* the brighter glow is a copy of the word (data-glow, set from JS) behind it; it breathes by opacity,
   which the GPU animates without repainting the text */
.ember::after {
  content: attr(data-glow); position: absolute; left: 0; top: 0; z-index: -1;
  color: transparent; pointer-events: none;
  text-shadow: 0 0 18px rgba(255, 140, 50, .55), 0 0 3px rgba(255, 214, 160, .5);
  opacity: .3;
  animation: ember-glow 3.4s ease-in-out infinite;
}
.ember:nth-of-type(2n)::after { animation-duration: 4.3s; animation-delay: -1.6s; }
@keyframes ember-glow { 0%, 100% { opacity: .3; } 38% { opacity: 1; } 52% { opacity: 0; } 70% { opacity: .75; } }

/* ===== Scroll progress ===== */
.progress {
  position: fixed; inset: 0 0 auto; height: 2px; z-index: 120;
  background: var(--fire-grad);
  transform-origin: 0 50%;
  transform: scaleX(var(--p, 0));
  box-shadow: 0 0 10px var(--fire-2);
}
@supports (animation-timeline: scroll()) {
  .progress { animation: progress linear both; animation-timeline: scroll(root); }
}

/* ===== Nav ===== */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 110;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px;
  padding: 16px max(var(--gutter), calc((100vw - var(--max)) / 2));
  border-bottom: 1px solid transparent;
  transition: transform .6s var(--ease-out), background-color .4s, border-color .4s, padding .4s;
}
.nav.is-scrolled {
  padding-block: 10px;
  background: rgba(10, 7, 6, .72);
  border-color: var(--line);
  -webkit-backdrop-filter: blur(18px) saturate(1.3); backdrop-filter: blur(18px) saturate(1.3);
}
.nav.is-hidden { transform: translateY(-100%); }
.nav__brand { justify-self: start; display: block; }
.nav__brand img {
  width: 40px; height: 40px;
  filter: drop-shadow(0 0 0 rgba(255, 138, 61, 0));
  transition: transform .6s var(--ease-out), filter .5s;
}
.nav__brand:hover img { transform: translateY(-2px) scale(1.06); filter: drop-shadow(0 0 12px rgba(255, 138, 61, .7)); }
.nav__links { display: flex; gap: clamp(18px, 3vw, 40px); }
.nav__links a {
  position: relative; padding: 8px 0;
  font: 500 12px/1 var(--font-display); letter-spacing: .24em; text-transform: uppercase;
  color: var(--muted);
  transition: color .3s;
}
.nav__links a::after {
  content: ""; position: absolute; left: 50%; bottom: -4px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%;
  background: var(--fire-3); box-shadow: 0 0 8px var(--fire-2);
  transform: scale(0); transition: transform .4s var(--ease-out);
}
.nav__links a:hover { color: var(--text); }
.nav__links a.is-active { color: var(--text); }
.nav__links a.is-active::after { transform: scale(1); }
.nav__right { justify-self: end; display: flex; align-items: center; gap: 12px; }

/* language switch with a sliding thumb */
.lang {
  position: relative; display: inline-grid; grid-template-columns: 1fr 1fr;
  padding: 3px; border-radius: 999px; border: 1px solid var(--line-2);
}
.lang::before {
  content: ""; position: absolute; top: 3px; bottom: 3px; left: 3px; width: calc(50% - 3px);
  border-radius: 999px; background: rgba(255, 138, 61, .16); border: 1px solid rgba(255, 163, 71, .45);
  box-shadow: 0 0 14px rgba(255, 106, 31, .25);
  transition: transform .5s var(--ease-out);
}
.lang[data-active="ru"]::before { transform: translateX(100%); }
.lang button {
  position: relative; z-index: 1; padding: 9px 11px;
  font: 500 11px/1 var(--font-display); letter-spacing: .16em;
  color: var(--muted); transition: color .3s;
}
.lang button[aria-pressed="true"] { color: var(--text); }
.lang button:hover { color: var(--text); }

/* content fades while the language swaps */
main, .nav__links, .side-nav__label, .footer, .nav__cta span { transition: opacity .22s ease, filter .22s ease; }
.is-switching main, .is-switching .nav__links, .is-switching .side-nav__label, .is-switching .footer, .is-switching .nav__cta span { opacity: 0; filter: blur(4px); }

/* ===== Side nav: sections with a sliding ember marker ===== */
.side-nav {
  --h: 34px; --gap: 4px;
  position: fixed; left: clamp(18px, 2.2vw, 40px); top: 50%; z-index: 105;
  transform: translateY(-50%);
  display: none;
}
@media (min-width: 1100px) { .side-nav { display: block; } }
.side-nav ol { list-style: none; margin: 0; padding: 0; position: relative; display: grid; gap: var(--gap); }
.side-nav ol::before { /* track */
  content: ""; position: absolute; left: 0; top: 4px; bottom: 4px; width: 1px;
  background: linear-gradient(transparent, var(--line-2) 12%, var(--line-2) 88%, transparent);
}
.side-nav__indicator {
  position: absolute; left: -1px; top: 0; z-index: 1;
  width: 3px; height: var(--h); border-radius: 3px;
  background: linear-gradient(var(--fire-4), var(--fire-2) 50%, var(--fire-1));
  box-shadow: 0 0 10px var(--fire-2), 0 0 26px rgba(255, 106, 31, .55);
  transform: translateY(calc(var(--active, 0) * (var(--h) + var(--gap))));
  transition: transform .75s var(--ease-out);
}
.side-nav__indicator::after { /* soft light spilling onto the page */
  content: ""; position: absolute; left: -14px; top: 50%; width: 46px; height: 46px; margin-top: -23px;
  background: radial-gradient(closest-side, rgba(255, 120, 40, .28), transparent);
  pointer-events: none;
}
.side-nav a {
  position: relative; display: flex; align-items: center; gap: 12px;
  height: var(--h); padding-left: 18px;
  font: 500 11px/1 var(--font-display); letter-spacing: .24em; text-transform: uppercase;
  color: var(--muted);
  transition: color .3s;
}
.side-nav a::before { /* tick */
  content: ""; position: absolute; left: 0; top: 50%; width: 8px; height: 1px;
  background: var(--line-2);
  transition: width .5s var(--ease-out), background-color .3s;
}
.side-nav__num { min-width: 20px; transition: color .3s, text-shadow .3s; }
.side-nav__label {
  white-space: nowrap; opacity: 0; transform: translateX(-8px);
  transition: opacity .4s, transform .5s var(--ease-out), color .3s;
}
.side-nav:hover .side-nav__label { opacity: .65; transform: none; }
.side-nav a:hover { color: var(--text); }
.side-nav a:hover::before { width: 12px; background: var(--fire-3); }
.side-nav a:hover .side-nav__label { opacity: 1; }
.side-nav a.is-active { color: var(--text); }
.side-nav a.is-active::before { width: 12px; background: var(--fire-3); }
.side-nav a.is-active .side-nav__num { color: var(--fire-3); text-shadow: 0 0 12px rgba(255, 138, 61, .7); }
.side-nav a.is-active .side-nav__label { opacity: 1; transform: none; }
@media (max-width: 1359px) { .side-nav__label { display: none; } } /* only numbers where the margin is narrow */

/* ===== Buttons ===== */
.btn {
  --pad: 17px 28px;
  position: relative; isolation: isolate;
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  padding: var(--pad);
  border-radius: 999px;
  font: 500 12.5px/1 var(--font-display);
  letter-spacing: .2em; text-transform: uppercase;
  overflow: hidden;
  transform: translate3d(var(--mx, 0), var(--my, 0), 0);
  transition: transform .5s var(--ease-out), box-shadow .4s, border-color .3s, background-color .3s, color .3s;
  will-change: transform;
}
.btn span, .btn svg { position: relative; z-index: 1; transition: transform .5s var(--ease-out); }
.btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn:hover svg { transform: translateY(3px); }
.btn--small { --pad: 12px 20px; font-size: 11.5px; }
.btn--big { --pad: 21px 34px; }
.btn--mail { text-transform: none; letter-spacing: .03em; font-size: 16px; font-weight: 500; }
.btn--fire {
  color: #1b0d04; font-weight: 600;
  background: var(--fire-grad);
  box-shadow: 0 12px 40px -14px rgba(255, 106, 31, .75), inset 0 1px 0 rgba(255, 255, 255, .3);
}
.btn--fire::after { /* shine sweep */
  content: ""; position: absolute; inset: 0; z-index: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .5) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform .8s var(--ease-out);
}
.btn--fire:hover { box-shadow: 0 16px 56px -10px rgba(255, 106, 31, .9), inset 0 1px 0 rgba(255, 255, 255, .3); }
.btn--fire:hover::after { transform: translateX(120%); }
.btn--ghost { border: 1px solid var(--line-2); background: rgba(255, 236, 222, .02); }
.btn--ghost::before {
  content: ""; position: absolute; inset: 0; z-index: 0; border-radius: inherit;
  background: radial-gradient(120px circle at var(--hx, 50%) var(--hy, 50%), rgba(255, 138, 61, .2), transparent 70%);
  opacity: 0; transition: opacity .3s;
}
.btn--ghost:hover { border-color: rgba(255, 163, 71, .6); }
.btn--ghost:hover::before { opacity: 1; }

.link-arrow {
  position: relative; display: inline-flex; align-items: center; gap: 8px;
  padding-bottom: 5px;
  font: 500 12px/1 var(--font-display); letter-spacing: .18em; text-transform: uppercase;
}
.link-arrow::after { content: "↗"; display: inline-block; color: var(--fire-3); letter-spacing: 0; transition: transform .4s var(--ease-out); }
.link-arrow::before {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: var(--fire-grad);
  transform: scaleX(.25); transform-origin: left; opacity: .6;
  transition: transform .5s var(--ease-out), opacity .3s;
}
.link-arrow:hover::after { transform: translate(3px, -3px); }
.link-arrow:hover::before { transform: scaleX(1); opacity: 1; }
.link-arrow[href^="/"]::after { content: "→"; }
.link-arrow[href^="/"]:hover::after { transform: translateX(4px); }

/* ===== Hero: title screen ===== */
.hero {
  position: relative;
  min-height: 100vh; min-height: 100svh;
  display: grid; place-items: center;
  padding: 104px var(--gutter) 96px;
  overflow: hidden;
  text-align: center;
}
.hero::after { /* warm light from the fire below */
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 40%; z-index: 0; pointer-events: none;
  background: linear-gradient(to top, rgba(255, 90, 20, .13), transparent);
}
.hero__embers { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.hero__glow {
  position: absolute; z-index: 0; left: 50%; bottom: -40vh;
  width: 130vw; height: 70vh; transform: translateX(-50%);
  animation: breathe 7s ease-in-out infinite;
  pointer-events: none;
}
.hero__glow::before { /* the light itself: soft by its gradient, flickers by opacity, so the GPU never re-blurs it */
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(closest-side, rgba(255, 106, 31, .41), rgba(255, 106, 31, .26) 25%, rgba(255, 106, 31, .115) 55%, rgba(255, 106, 31, .045) 78%, transparent);
  opacity: .87;
  animation: firelight 3.1s ease-in-out infinite;
}
.hero__inner { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; }

/* the original logo lockup, rebuilt from its two parts so they can animate separately */
.lockup {
  position: relative;
  width: min(470px, 76vw, 46svh);
  aspect-ratio: 1024 / 1020;
  margin-bottom: clamp(20px, 3.4vh, 36px);
  transform: perspective(1000px) rotateX(var(--tx, 0deg)) rotateY(var(--ty, 0deg));
}
.lockup__phoenix {
  position: absolute; left: 0; top: 9.31%; width: 100%; height: auto;
  /* the tail sinks into the fire bed; the glow around comes from the aura canvas */
  -webkit-mask-image: linear-gradient(to bottom, #000 72%, rgba(0, 0, 0, .45) 86%, transparent 97%);
          mask-image: linear-gradient(to bottom, #000 72%, rgba(0, 0, 0, .45) 86%, transparent 97%);
}
/* WebGL aura and fire bed behind the bird, wider than the lockup so the flames have room */
.lockup__fire { position: absolute; left: -30%; top: -8%; width: 160%; height: 112%; pointer-events: none; }
/* warm light from the fire below, painted only on the bird itself */
.lockup__underlight {
  --near: 0; /* 0..1, cursor close to the logo; set from JS only when it changes */
  position: absolute; left: 0; top: 9.31%; width: 100%; aspect-ratio: 720 / 650; pointer-events: none;
  -webkit-mask-image: url(/assets/img/phoenix.webp), linear-gradient(to bottom, #000 72%, rgba(0, 0, 0, .45) 86%, transparent 97%);
          mask-image: url(/assets/img/phoenix.webp), linear-gradient(to bottom, #000 72%, rgba(0, 0, 0, .45) 86%, transparent 97%);
  -webkit-mask-size: 100% 100%; mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-composite: source-in; mask-composite: intersect;
  mix-blend-mode: screen;
}
.lockup__underlight::before {
  --ul: calc(.35 + var(--near) * .19);
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(255, 214, 140, var(--ul)), rgba(255, 150, 60, calc(var(--ul) * .4)) 20%, rgba(255, 120, 40, 0) 40%);
  opacity: .8;
  animation: underlight-flicker 2.9s ease-in-out infinite;
}
.lockup__type { position: absolute; left: 15.43%; top: 0; width: 69.92%; height: auto; opacity: .92; }
.lockup__light {
  position: absolute; left: 50%; top: 62%; width: 96%; aspect-ratio: 1;
  transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, rgba(255, 120, 40, .3), rgba(255, 100, 30, .1) 50%, transparent 74%);
}
.hero__tagline {
  margin: 0 0 14px;
  font: 500 12.5px/1.7 var(--font-display); letter-spacing: .38em; text-transform: uppercase;
  color: var(--fire-3);
}
.hero__tagline { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px 18px; }
.hero__tagline > span { white-space: nowrap; }
/* role as an outlined tag */
.hero__tag {
  padding: 7px calc(15px - .3em) 7px 15px; border-radius: 999px;
  border: 1px solid rgba(255, 163, 71, .32); background: rgba(255, 138, 61, .06);
  font-size: 10.5px; letter-spacing: .3em; color: var(--text);
}
/* motto: from a pale spark to a deep flame */
.hero__motto {
  background: linear-gradient(90deg, #fff1cc, var(--fire-4) 22%, var(--fire-3) 52%, var(--fire-1) 82%, #ff4d1a);
  background-size: 160% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 10px rgba(255, 106, 31, .3));
  animation: motto-heat 6s steps(72) infinite alternate; /* repaints 12 times a second, not every frame */
}
@keyframes motto-heat { from { background-position: 0% 0; } to { background-position: 100% 0; } }
.hero__lead { max-width: 30em; margin: 0 auto 32px; color: var(--muted); font-size: clamp(16px, 1.35vw, 18px); }
.hero__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }

.scroll-cue {
  position: absolute; left: 50%; bottom: 20px; z-index: 2; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  font: 500 10px/1 var(--font-display); letter-spacing: .36em; text-transform: uppercase; color: var(--muted);
  transition: color .3s;
}
.scroll-cue::after {
  content: ""; width: 1px; height: 44px;
  background: linear-gradient(var(--fire-3), transparent);
  transform-origin: top;
  animation: drip 2.4s var(--ease-in-out) infinite;
}
.scroll-cue:hover { color: var(--text); }

/* intro */
.js .lockup__phoenix, .js .lockup__type, .js .lockup__light, .js .lockup__fire, .js .lockup__underlight,
.js .hero__tagline, .js .hero__lead, .js .hero__actions, .js .nav, .js .scroll-cue, .js .side-nav { opacity: 0; }
.is-loaded .lockup__light { animation: fade-in 2s ease .1s both, light-pulse 5s ease-in-out 2.1s infinite; }
.is-loaded .lockup__phoenix { animation: phoenix-in 1.8s var(--ease-out) .25s both, hover 7s ease-in-out 2.1s infinite; }
.is-loaded .lockup__type { animation: type-in 1.5s var(--ease-in-out) 1s both; }
.is-loaded .lockup__fire, .is-loaded .lockup__underlight { animation: fade-in 1.6s ease 1.3s both, hover 7s ease-in-out 2.1s infinite; }
.is-loaded .hero__tagline { animation: rise 1s var(--ease-out) 1.55s both; }
.is-loaded .hero__lead { animation: rise 1s var(--ease-out) 1.7s both; }
.is-loaded .hero__actions { animation: rise 1s var(--ease-out) 1.85s both; }
.is-loaded .nav { animation: drop 1s var(--ease-out) .8s both; }
.is-loaded .scroll-cue { animation: fade-in 1s ease 2.4s both; }
.is-loaded .side-nav { animation: fade-in 1.2s ease 2.2s both; }

/* ===== Sections ===== */
.section { position: relative; max-width: var(--max); margin: 0 auto; padding: clamp(90px, 12vw, 150px) var(--gutter); }
.section__head { margin-bottom: clamp(40px, 6vw, 64px); }
.section__title {
  margin: 0;
  font: 300 clamp(1.9rem, 4.3vw, 3.4rem)/1.15 var(--font-display);
  letter-spacing: .03em; text-transform: uppercase;
}
.section__lead { max-width: 36em; margin: 22px 0 0; color: var(--muted); font-size: clamp(16px, 1.35vw, 18px); }

/* ===== Career: switchable stages ===== */
.tl__now {
  display: inline-block; margin-right: 12px; padding: 5px 9px; border-radius: 999px; vertical-align: 1px;
  background: rgba(255, 138, 61, .14); color: var(--fire-3);
  font: 600 10px/1 var(--font-display); letter-spacing: .18em; text-transform: uppercase;
  position: relative;
}
.tl__now::after { /* a ring pulses around the label by opacity only, nothing is repainted */
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  box-shadow: 0 0 0 3px rgba(255, 138, 61, .3);
  opacity: 0;
  animation: now-pulse 2.4s ease-in-out infinite;
}
/* segment width ~ months at the company */
.career-tl__track { display: grid; grid-template-columns: 26fr 36fr 38fr 30fr; gap: 10px; margin-bottom: 28px; }
.stage { display: grid; gap: 12px; padding: 6px 0; text-align: left; color: var(--muted); min-width: 0; }
.stage__org {
  font: 500 12px/1.2 var(--font-display); letter-spacing: .16em; text-transform: uppercase;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: color .3s;
}
.stage__bar {
  position: relative; height: 6px; overflow: hidden;
  border-radius: 999px; background: var(--surface-2);
  transition: box-shadow .5s, background-color .3s;
}
.stage__bar i {
  position: absolute; inset: 0; border-radius: inherit;
  background: var(--fire-grad);
  transform: scaleX(0); transform-origin: left;
  transition: transform .9s var(--ease-out), opacity .4s;
}
.stage__years { font: 500 12px/1 var(--font-display); letter-spacing: .08em; transition: color .3s; }
.stage:hover .stage__bar { background: rgba(255, 236, 222, .12); }
.stage:hover .stage__org { color: var(--text); }
.stage.is-past .stage__bar i { transform: scaleX(1); opacity: .25; }
.stage[aria-selected="true"] .stage__bar { box-shadow: 0 0 18px rgba(255, 106, 31, .6); }
.stage[aria-selected="true"] .stage__bar i { transform: scaleX(1); opacity: 1; }
.stage[aria-selected="true"] .stage__org { color: var(--text); }
.stage[aria-selected="true"] .stage__years { color: var(--fire-3); }

.career-tl__panels { display: grid; }
.stage-panel {
  grid-area: 1 / 1; position: relative; overflow: hidden; isolation: isolate;
  display: grid; grid-template-columns: 1.15fr .85fr; align-items: center; gap: clamp(20px, 4vw, 48px);
  padding: clamp(24px, 3.4vw, 44px);
  border-radius: var(--radius); border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
}
.stage-panel[hidden] { display: grid; visibility: hidden; opacity: 0; pointer-events: none; }
.stage-panel--solo { grid-template-columns: 1fr; }
.stage-panel::before { /* big year in the background */
  content: attr(data-bg-year); position: absolute; right: -.04em; bottom: -.2em; z-index: -1;
  font: 200 clamp(110px, 17vw, 220px)/1 var(--font-display); letter-spacing: -.02em;
  color: rgba(255, 236, 222, .04);
}
.stage-panel.is-active .stage-panel__info > *, .stage-panel.is-active .game { animation: rise .8s var(--ease-out) both; }
.stage-panel.is-active .stage-panel__info > :nth-child(2) { animation-delay: .06s; }
.stage-panel.is-active .stage-panel__info > :nth-child(3) { animation-delay: .12s; }
.stage-panel.is-active .stage-panel__info > :nth-child(4) { animation-delay: .18s; }
.stage-panel.is-active .game { animation-delay: .22s; }
.stage-panel.is-active .game + .game { animation-delay: .3s; }
.stage-panel__when { margin: 0 0 16px; font: 500 12px/1.5 var(--font-display); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.stage-panel__role { margin: 0 0 8px; font: 300 clamp(1.5rem, 2.8vw, 2.2rem)/1.15 var(--font-display); letter-spacing: .03em; text-transform: uppercase; }
.stage-panel__org { margin: 0 0 16px; color: var(--fire-3); font-weight: 600; font-size: 17px; }
.stage-panel__text { margin: 0; color: var(--muted); max-width: 34em; }
.stage-panel .games { flex-direction: column; margin: 0; }
.career-tl__nav { display: flex; align-items: center; justify-content: flex-end; gap: 14px; margin-top: 18px; }
.career-tl__count { font: 500 12px/1 var(--font-display); letter-spacing: .12em; color: var(--muted); min-width: 64px; text-align: center; }
.career-tl__count b { color: var(--text); font-weight: 500; }
.career-tl__arrow {
  display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%;
  border: 1px solid var(--line-2); font-size: 17px;
  transition: border-color .3s, color .3s, transform .4s var(--ease-out), background-color .3s;
}
.career-tl__arrow:hover { border-color: var(--fire-3); color: var(--fire-3); background: rgba(255, 138, 61, .06); }
.career-tl__arrow[data-step="-1"]:hover { transform: translateX(-3px); }
.career-tl__arrow[data-step="1"]:hover { transform: translateX(3px); }
.career-tl__arrow:disabled { opacity: .3; pointer-events: none; }

.games { list-style: none; margin: 20px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 12px; }
.game {
  display: flex; align-items: center; gap: 14px;
  padding: 10px 18px 10px 10px; border-radius: 18px;
  border: 1px solid var(--line); background: rgba(0, 0, 0, .22);
  transition: border-color .3s, background-color .3s;
}
.game:hover { border-color: rgba(255, 163, 71, .35); background: rgba(255, 138, 61, .05); }
.game img { width: 56px; height: 56px; flex: none; border-radius: 14px; box-shadow: 0 10px 22px -10px rgba(0, 0, 0, .8); transition: transform .6s var(--ease-out); }
.game:hover img { transform: rotate(-6deg) scale(1.08); }
.game b { display: block; margin-bottom: 6px; font-size: 15px; font-weight: 600; line-height: 1.25; }
.game span { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; line-height: 1.3; }
.game span a { color: var(--muted); transition: color .3s; }
.game span a::after { content: " ↗"; color: var(--fire-3); }
.game span a:hover { color: var(--text); }
.game span i { font-style: normal; color: var(--muted); }

/* ===== Own games ===== */
.projects { display: grid; gap: clamp(28px, 4vw, 44px); }
.project {
  --rx: 0deg; --ry: 0deg;
  position: relative; isolation: isolate; overflow: hidden;
  display: grid; grid-template-columns: 1.3fr 1fr; align-items: center; gap: clamp(24px, 4vw, 56px);
  padding: clamp(14px, 1.6vw, 18px);
  border-radius: calc(var(--radius) + 6px);
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line);
  transform: perspective(1400px) rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform .7s var(--ease-out), border-color .4s, box-shadow .5s;
}
.project:hover { border-color: rgba(255, 163, 71, .28); box-shadow: 0 40px 80px -40px rgba(255, 106, 31, .4); }
.project--flip { grid-template-columns: 1fr 1.3fr; }
.project--flip .project__media { order: 2; }
.project__spot {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(520px circle at var(--sx, 50%) var(--sy, 50%), rgba(255, 138, 61, .12), transparent 60%);
  opacity: 0; transition: opacity .4s;
}
.project:hover .project__spot { opacity: 1; }
.project__media {
  position: relative; display: block; overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  background: var(--bg-2);
}
.project__media::after { /* inner edge */
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06), inset 0 -60px 80px -40px rgba(10, 7, 6, .6);
}
.project__media img {
  width: 100%; height: 100%; object-fit: cover;
  transform: scale(1.1) translateY(var(--py, 0px));
  transition: transform 1.2s var(--ease-out), filter .6s;
}
.project:hover .project__media img { transform: scale(1.16) translateY(var(--py, 0px)); }
.project--archive .project__media img { filter: grayscale(.9) brightness(.75); }
.project--archive:hover .project__media img { filter: none; }
.project--archive .project__media::before {
  content: attr(data-archive-label); position: absolute; top: 16px; left: 16px; z-index: 1;
  padding: 8px 13px; border-radius: 999px;
  background: rgba(10, 7, 6, .72); border: 1px solid var(--line-2);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  font: 500 10.5px/1 var(--font-display); letter-spacing: .22em; text-transform: uppercase; color: var(--fire-4);
}
.project__body { padding: clamp(8px, 2vw, 28px) clamp(8px, 2vw, 28px) clamp(8px, 2vw, 28px) 0; }
.project--flip .project__body { padding: clamp(8px, 2vw, 28px) 0 clamp(8px, 2vw, 28px) clamp(8px, 2vw, 28px); }
.project__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 18px; }
.project__num { font: 500 12px/1 var(--font-display); letter-spacing: .12em; color: var(--fire-3); margin-right: 8px; }
.chip {
  padding: 7px 12px; border-radius: 999px;
  font-size: 12.5px; font-weight: 600; line-height: 1; color: var(--muted);
  border: 1px solid var(--line); background: var(--surface);
}
.chip--archive { color: var(--fire-4); border-color: rgba(255, 163, 71, .35); background: rgba(255, 138, 61, .08); }
.project__title { margin: 0 0 14px; font: 300 clamp(1.6rem, 3vw, 2.4rem)/1.1 var(--font-display); letter-spacing: .04em; text-transform: uppercase; }
.project__text { margin: 0 0 26px; color: var(--muted); max-width: 30em; }
.project__links { display: flex; flex-wrap: wrap; gap: 24px; }

/* ===== About ===== */
.about { display: grid; grid-template-columns: .8fr 1fr; gap: clamp(36px, 7vw, 100px); align-items: center; }
.about__photo {
  position: relative; margin: 0; overflow: hidden;
  border-radius: calc(var(--radius) + 6px);
  aspect-ratio: 4 / 5; max-width: 440px;
  background: var(--bg-2);
}
.about__photo img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.05); transform: scale(1.08); transition: transform 1.4s var(--ease-out); }
.about__photo::after { /* ember duotone */
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(200deg, rgba(255, 106, 31, 0) 30%, rgba(255, 106, 31, .55));
  mix-blend-mode: color; opacity: .55;
  transition: opacity .8s;
}
.about__photo::before {
  content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .07);
}
.about__photo:hover img { transform: scale(1.02); }
.about__photo:hover::after { opacity: 1; }
.about__text p:not(.eyebrow) { color: var(--muted); font-size: clamp(16px, 1.35vw, 18px); margin: 0 0 18px; max-width: 34em; }
.about__text .section__title { margin-bottom: 28px; }

/* ===== Contact ===== */
.contact { text-align: center; padding-bottom: clamp(90px, 11vw, 140px); overflow: hidden; }
.contact .eyebrow::after { content: ""; width: 32px; height: 1px; background: currentColor; opacity: .6; }
.contact__glow {
  position: absolute; z-index: -1; left: 50%; top: 58%; width: min(900px, 120vw); aspect-ratio: 1;
  transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, rgba(255, 106, 31, .18), rgba(255, 106, 31, .07) 60%, transparent);
  animation: breathe-c 8s ease-in-out infinite;
}
.contact__title { margin: 0 0 24px; font: 200 clamp(2.2rem, 7vw, 5.6rem)/1.06 var(--font-display); letter-spacing: .04em; text-transform: uppercase; }
.contact__lead { max-width: 32em; margin: 0 auto 38px; color: var(--muted); font-size: clamp(16px, 1.35vw, 18px); }
.contact__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-bottom: 24px; }

/* glowing VLADIS FIRE lettering with sparks drifting up */
.signature {
  position: relative; width: min(100%, 520px); margin: 8px auto 0;
  aspect-ratio: 716 / 432; /* lettering at the bottom, room for sparks above */
}
.signature__fire {
  position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2;
  mix-blend-mode: screen; pointer-events: none;
}
.signature__glyphs { position: absolute; left: 0; right: 0; bottom: 0; height: 58.8%; z-index: 1; }
/* the glow comes from a still copy of the lettering, so it is blurred once instead of every frame */
.signature__glow { position: absolute; inset: 0; filter: drop-shadow(0 0 10px rgba(255, 106, 31, .6)) drop-shadow(0 0 28px rgba(255, 106, 31, .3)); }
.signature__glow::before, .signature__text {
  -webkit-mask: url("/assets/img/signature.png") center / contain no-repeat; mask: url("/assets/img/signature.png") center / contain no-repeat;
}
.signature__glow::before { content: ""; position: absolute; inset: 0; background: var(--fire-2); }
.signature__text { position: absolute; inset: 0; overflow: hidden; }
.signature__text::before { /* the colours drift along the letters by transform, without repainting */
  content: ""; position: absolute; left: 0; top: 0; width: 100%; height: 220%;
  background: linear-gradient(0deg, #fff1cf 0%, var(--fire-4) 18%, var(--fire-3) 42%, var(--fire-2) 66%, var(--fire-1) 100%);
  animation: burn-shift 3s ease-in-out infinite alternate;
}

/* ===== Footer ===== */
.footer {
  max-width: var(--max); margin: 0 auto;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px;
  padding: 28px var(--gutter) calc(28px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  font-size: 14px; color: var(--muted);
}
.footer__links { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.footer__links a { transition: color .3s; }
.footer__links a:hover { color: var(--text); }
.footer__top {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--line-2); font-size: 17px; transition: border-color .3s, transform .5s var(--ease-out), color .3s;
}
.footer__top:hover { border-color: var(--fire-3); color: var(--fire-3); transform: translateY(-4px); }

/* ===== Toast ===== */
.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 130;
  padding: 12px 20px; border-radius: 999px;
  background: rgba(24, 16, 12, .88); border: 1px solid rgba(255, 163, 71, .35);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  font-weight: 600; font-size: 14px;
  transform: translate(-50%, 30px); opacity: 0; pointer-events: none;
  transition: transform .5s var(--ease-out), opacity .3s;
}
.toast.is-shown { transform: translate(-50%, 0); opacity: 1; }

/* ===== Reveal on scroll ===== */
.js .reveal { opacity: 0; transform: translateY(44px); }
.js .reveal.is-in {
  opacity: 1; transform: none;
  transition: opacity 1s var(--ease-out), transform 1.2s var(--ease-out);
  transition-delay: var(--d, 0s);
}
.js .project.reveal.is-in { transform: perspective(1400px) rotateX(var(--rx)) rotateY(var(--ry)); transition: opacity 1s var(--ease-out), transform .7s var(--ease-out), border-color .4s, box-shadow .5s; }
/* clip-path lives on the image: Chrome treats a fully clipped element as not intersecting */
.js .reveal--clip { opacity: 1; transform: none; filter: none; background: transparent; transition: background-color .6s .6s; }
.js .reveal--clip::before, .js .reveal--clip::after { opacity: 0; }
.js .reveal--clip img { clip-path: inset(100% 0 0 0); transform: scale(1.3); }
.js .reveal--clip.is-in { background: var(--bg-2); }
.js .reveal--clip.is-in::before { opacity: 1; transition: opacity .6s 1s; }
.js .reveal--clip.is-in::after { opacity: .55; transition: opacity .8s 1s; }
.js .reveal--clip.is-in:hover::after { opacity: 1; transition-delay: 0s; }
.js .reveal--clip.is-in img { clip-path: inset(0 0 0 0); transform: scale(1.08); transition: clip-path 1.4s var(--ease-in-out), transform 1.8s var(--ease-out); }
.js .reveal--clip.is-in:hover img { transform: scale(1.02); }

/* ===== Keyframes ===== */
@keyframes progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes grain {
  0% { transform: translate(0, 0); } 20% { transform: translate(-3%, 2%); } 40% { transform: translate(2%, -3%); }
  60% { transform: translate(-2%, -1%); } 80% { transform: translate(3%, 3%); } 100% { transform: translate(0, 0); }
}
@keyframes breathe { 0%, 100% { opacity: .85; transform: translateX(-50%) scale(1); } 50% { opacity: 1; transform: translateX(-50%) scale(1.06); } }
@keyframes breathe-c { 0%, 100% { opacity: .8; transform: translate(-50%, -50%) scale(1); } 50% { opacity: 1; transform: translate(-50%, -50%) scale(1.08); } }
@keyframes firelight { /* uneven flicker of a fire just out of frame */
  0% { opacity: .87; } 9% { opacity: .974; } 17% { opacity: .817; } 31% { opacity: .922; } 44% { opacity: .843; }
  58% { opacity: 1; } 66% { opacity: .887; } 79% { opacity: .8; } 91% { opacity: .939; }
}
@keyframes underlight-flicker { /* the fire under the bird breathes unevenly */
  0%, 100% { opacity: .8; } 13% { opacity: .93; } 27% { opacity: .7; } 41% { opacity: .88; } 55% { opacity: .64; } 68% { opacity: .96; } 82% { opacity: .75; }
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes light-pulse { 0%, 100% { opacity: 1; transform: translate(-50%, -50%) scale(1); } 50% { opacity: .75; transform: translate(-50%, -50%) scale(1.05); } }
@keyframes phoenix-in {
  from { opacity: 0; transform: translateY(7%) scale(.93); filter: blur(14px) brightness(1.8); }
  to { opacity: 1; transform: none; filter: blur(0) brightness(1); }
}
@keyframes hover { 0%, 100% { translate: 0 0; } 50% { translate: 0 -8px; } }
@keyframes type-in {
  from { opacity: 0; clip-path: inset(0 50% 0 50%); }
  to { opacity: .92; clip-path: inset(0 0 0 0); }
}
@keyframes drip { 0% { transform: scaleY(0); opacity: 1; } 60% { transform: scaleY(1); opacity: 1; } 100% { transform: scaleY(1); opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(22px); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes drop { from { opacity: 0; translate: 0 -20px; } to { opacity: 1; translate: 0 0; } }
@keyframes now-pulse { 0%, 50%, 100% { opacity: 0; } 25%, 75% { opacity: .6; } }
@keyframes burn-shift { from { transform: translateY(0); } to { transform: translateY(-54.5455%); } }

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .project, .project--flip { grid-template-columns: 1fr; }
  .project--flip .project__media { order: 0; }
  .project__body, .project--flip .project__body { padding: 8px 10px 14px; }
  .about { grid-template-columns: 1fr; }
  .about__photo { max-width: 360px; }
  .stage-panel { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .nav { grid-template-columns: 1fr auto; padding-block: 12px; }
  .nav__links { display: none; }
  .hero__tagline { letter-spacing: .26em; font-size: 11.5px; }
  .hero__tagline { flex-direction: column; gap: 12px; }
  .hero__actions .btn { flex: 1 1 auto; }
  .contact__actions .btn { width: 100%; }
  .career-tl__track { grid-template-columns: repeat(4, 1fr); gap: 6px; }
  .stage__org { font-size: 10.5px; letter-spacing: .08em; }
  .stage__years { font-size: 11px; letter-spacing: 0; }
  .career-tl__nav { justify-content: space-between; }
  .footer { justify-content: center; text-align: center; }
  .footer__top { display: none; }
}

/* sections out of view pause their looping animations (toggled from JS) */
.is-off, .is-off *, .is-off *::before, .is-off *::after { animation-play-state: paused !important; }

/* ===== Reduced motion ===== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; transition-delay: 0s !important; }
  body::after { animation: none; }
  .hero__embers { display: none; }
}
