/* ---------- Tokens ---------- */
:root {
  --paper: #EAE9E4;
  --cream: #F4E8D4;
  --ink: #121211;
  --muted: #76746E;
  --line: rgba(18, 18, 17, .16);

  --night: #121211;
  --night-2: #262523;
  --on-night: #ECEBE6;
  --on-night-muted: #8C8A84;
  --night-line: rgba(236, 235, 230, .13);

  --accent: #EE5A24; /* underline colour, follows the gradient theme */
  --live: #27C46A;

  /* gradient theme; JS swaps these for the palette picked on load */
  --g1: #B86B2A; --g2: #C9502A; --g3: #A8302F; --g4: #5A2C63; --g5: #3E2350; --flare: #FFD93D; --hot: #FFF3C2;

  --pad: clamp(16px, 2.4vw, 36px);
  --gap: clamp(12px, 1.6vw, 24px);
  --r: clamp(22px, 2.6vw, 40px);

  --ease: cubic-bezier(.22, .8, .2, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);

  /* Type system: two families, four styles.
     Sans 400 (text, UI) · Sans 500 (headings, links) · Serif 400 (statement) · Serif 400 italic (accents). */
  --sans: "Inter Tight", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Noto Serif Display", Georgia, "Times New Roman", serif;
  --serif-width: 75%;

  --fs-s: 14px;                                       /* labels, nav, buttons */
  --fs-m: 17px;                                       /* body text */
  --fs-l: clamp(17px, 1.4vw, 21px);                   /* table rows */
  --fs-xl: clamp(22px, 2.2vw, 34px);                  /* hero links, marquee, footer */
  --fs-h2: clamp(30px, 3.5vw, 56px);                  /* section titles, CTA */
  --fs-statement: clamp(34px, 4.6vw, 80px);
  --fs-display: clamp(40px, min(6.6vw, 11.5vh), 124px);

  --track-display: -.045em;
  --track-h2: -.03em;
}
/* English uses DM Sans (no Cyrillic there, so Russian stays on Inter Tight) */
html[lang="en"] { --sans: "DM Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; --track-display: -.04em; }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--fs-m);
  font-weight: 400;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, p { font-weight: inherit; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; border-radius: 4px; }
svg path { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Film grain on the light sections only: on the dark panel it lifts the tone and its wavy top edge
   (a separate SVG) would read as a darker seam; the gradient block stays clean too */
.hero::before, .foot::before {
  content: ""; position: absolute; inset: 0; z-index: 50; pointer-events: none; opacity: .065;
  border-radius: inherit;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%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)'/%3E%3C/svg%3E");
  animation: grain 1.2s steps(5) infinite;
}
@keyframes grain {
  0% { background-position: 0 0; } 20% { background-position: -9px 7px; } 40% { background-position: 7px -11px; }
  60% { background-position: -4px -7px; } 80% { background-position: 11px 4px; } 100% { background-position: 0 0; }
}

/* ---------- Cursor ---------- */
.cursor {
  position: fixed; top: 0; left: 0; z-index: 100; pointer-events: none;
  width: 0; height: 0; opacity: 0; transition: opacity .3s;
  mix-blend-mode: difference;
}
.cursor::before {
  content: ""; position: absolute; left: -6px; top: -6px; width: 12px; height: 12px; border-radius: 50%;
  background: #fff; transition: transform .45s var(--ease-out);
}
.cursor__label {
  position: absolute; left: 0; top: 0; transform: translate(-50%, -50%) scale(.4); opacity: 0;
  font-size: 18px; line-height: 1; color: #000;
  transition: opacity .25s, transform .45s var(--ease-out);
}
.cursor.is-visible { opacity: 1; }
.cursor.is-link::before { transform: scale(5.4); }
.cursor.is-link .cursor__label { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.cursor.is-small::before { transform: scale(2.6); }
.cursor.is-down::before { transform: scale(4.4); }
.has-cursor, .has-cursor * { cursor: none !important; }

/* ---------- Text roll on hover ---------- */
.roll { position: relative; display: inline-block; overflow: hidden; vertical-align: top; line-height: 1.15; }
.roll__t { position: relative; display: inline-block; transition: transform .6s var(--ease-out); }
.roll__t::after { content: attr(data-text); position: absolute; top: 100%; left: 0; right: 0; }
a:hover .roll__t, button:hover .roll__t, a:focus-visible .roll__t { transform: translateY(-100%); }

/* ---------- Reveal ---------- */
.js [data-reveal] {
  opacity: 0; transform: translate3d(0, 26px, 0);
  transition: opacity .9s var(--ease-out), transform 1.1s var(--ease-out);
  transition-delay: var(--d, 0ms);
}
.js [data-reveal].is-in { opacity: 1; transform: none; }

/* Split words */
.split .w {
  display: inline-block; overflow: hidden; vertical-align: top;
  padding: .06em .04em .14em; margin: -.06em -.04em -.14em;
}
.split .w > span { display: inline-block; transform-origin: 0 100%; }
.split .nw { white-space: nowrap; }
.split .nw wbr { display: none; } /* Chrome breaks at <wbr> even inside nowrap */
@media (max-width: 600px) {
  .split .nw:not(.nw--keep) { white-space: normal; }
  .split .nw:not(.nw--keep) wbr { display: inline; }
  /* an accent phrase wider than the screen wraps inside itself instead of widening the page */
  .split .em { max-width: 100%; white-space: normal; }
}
.js .split .w > span {
  transform: translate3d(0, 115%, 0) rotate(5deg);
  transition: transform 1.15s var(--ease-out);
  transition-delay: calc(var(--i, 0) * 38ms + var(--base, 0ms));
}
.js .split.is-in .w > span { transform: none; }

/* Serif accent inside sans headlines */
.split .em { position: relative; display: inline-block; white-space: nowrap; }
.split .em .w > span {
  font-family: var(--serif); font-style: italic; font-weight: 400; font-stretch: var(--serif-width);
  font-size: 1.06em; line-height: .9; letter-spacing: -.01em;
}
.scribble {
  position: absolute; left: -3%; bottom: -.02em; width: 106%; height: .24em; overflow: visible; pointer-events: none;
}
.scribble path { stroke: var(--accent); stroke-width: .07em; stroke-dasharray: 1; stroke-dashoffset: 1; }
.js .split.is-in .scribble path { stroke-dashoffset: 0; transition: stroke-dashoffset 1.1s var(--ease) calc(var(--i, 0) * 38ms + 650ms); }
html:not(.js) .scribble path { stroke-dashoffset: 0; }

/* Inline photo pill */
.w--photo .photo {
  display: inline-block; width: 1.42em; height: .74em; margin-top: .17em;
  border-radius: 1em; overflow: hidden; vertical-align: top; background: var(--line);
  transition: width .8s var(--ease-out);
}
.w--photo .photo img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 32%; transform: scale(1.06); transition: transform .8s var(--ease-out); }
.w--photo + .w > span { margin-left: -.07em; } /* tuck a comma against the rounded pill */
.w--photo:hover .photo { width: 2.3em; }
.w--photo:hover .photo img { transform: scale(1.14); }

/* ---------- Screen 1 ---------- */
/* Navigation bar on top, then the content framed like the CV: a solid dark border set in from the screen edges */
.hero {
  --frame: clamp(8px, 1.1vw, 16px);
  --inset: calc(var(--pad) - var(--frame) + 8px); /* content padding inside the frame */
  position: relative; display: flex; flex-direction: column; gap: var(--frame);
  min-height: 100svh; padding: var(--frame);
  isolation: isolate; /* keeps its grain layer from painting over the gradient block */
  transform-origin: 50% 0;
}
.hero__inner {
  flex: 1 0 auto;
  display: grid; grid-template-rows: 1fr auto; gap: clamp(28px, 4.5vh, 64px);
  padding: var(--inset);
  border: 3px solid var(--ink);
}

/* Top bar: section navigation with equal gaps between the items */
.bar {
  display: flex; align-items: center;
  padding: 6px calc(var(--inset) + 3px) 2px;
  font-size: var(--fs-s); line-height: 1.4;
}
.bar__nav { flex: 1; display: flex; flex-wrap: wrap; gap: 8px clamp(24px, 2.8vw, 44px); }
.bar__nav a[href="#contact"] { margin-left: auto; } /* contact sits apart, at the right edge */
.bar__nav a { display: flex; align-items: center; gap: 8px; padding-block: 14px; margin-block: -14px; }
/* the hover dot takes no room at rest (its 7px + 8px gap are cancelled by the margin), so gaps stay equal */
.bar__nav a::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ink); flex: none;
  transform: scale(0); margin-right: -15px; transition: transform .5s var(--ease-out), margin .5s var(--ease-out);
}
.bar__nav a:hover::before, .bar__nav a:focus-visible::before { transform: scale(1); margin-right: 0; }

/* Availability pill */
.status {
  --mx: 0px; --my: 0px;
  position: relative; display: inline-flex; align-items: center; gap: 10px; isolation: isolate; overflow: hidden;
  padding: 8px 16px 8px 13px; border: 1px solid var(--line); border-radius: 999px;
  font-size: var(--fs-s); white-space: nowrap;
  transform: translate(var(--mx), var(--my));
  transition: transform .45s var(--ease-out), color .45s var(--ease), border-color .45s;
}
/* on hover it fills with the gradient theme loaded for this visit */
.status::before {
  content: ""; position: absolute; inset: -1px; z-index: -1; border-radius: inherit;
  background:
    radial-gradient(circle at 0 0, var(--flare) 0, transparent 45%),
    linear-gradient(110deg, var(--g1), var(--g2) 30%, var(--g3) 55%, var(--g4) 80%, var(--g5));
  background-size: 220% 100%;
  transform: translateY(102%); transition: transform .55s var(--ease-out);
  animation: status-drift 3.5s ease-in-out infinite alternate paused;
}
.status:hover { color: var(--cream); border-color: transparent; }
.status:hover::before { transform: none; animation-play-state: running; }
@keyframes status-drift { from { background-position: 0 0; } to { background-position: 100% 0; } }
/* hero pill: filled with the theme at rest. It starts at the second band and skips the flare,
   so white text keeps at least 4.5:1 on every palette; on hover the gradient drifts */
.status--fill { color: #fff; border-color: transparent; }
.status--fill::before {
  background: linear-gradient(110deg, var(--g2), var(--g3) 35%, var(--g4) 65%, var(--g5) 90%);
  background-size: 160% 100%; transform: none;
}
.status--fill:hover { color: #fff; }
.status--fill:focus-visible { outline-color: var(--ink); }
.status--fill .status__dot { box-shadow: 0 0 0 2px rgba(255, 255, 255, .9); }
.status__dot { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--live); flex: none; }
.status__dot::after {
  content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 1.5px solid var(--live);
  animation: pulse 2s var(--ease) infinite;
}
@keyframes pulse { 0% { transform: scale(.5); opacity: .9; } 100% { transform: scale(1.9); opacity: 0; } }

/* Language switch */
.lang {
  position: relative; display: inline-grid; grid-template-columns: 1fr 1fr; padding: 3px;
  border-radius: 999px; font-size: var(--fs-s);
}
.lang__pill {
  position: absolute; top: 3px; bottom: 3px; left: 3px; width: calc(50% - 3px);
  border-radius: 999px; background: var(--ink); transition: transform .55s var(--ease-out);
}
.lang[data-active="ru"] .lang__pill { transform: translateX(100%); }
.lang button {
  position: relative; z-index: 1; padding: 5px 11px; border-radius: 999px; line-height: 1.4;
  color: var(--muted); transition: color .4s var(--ease);
}
.lang button:hover { color: var(--ink); }
.lang button[aria-pressed="true"] { color: var(--paper); }

/* Availability pill + headline, sitting at the bottom of the frame */
.hero__title { align-self: end; display: flex; flex-direction: column; align-items: flex-start; gap: clamp(20px, 3.2vh, 36px); }
.headline {
  margin: 0;
  font-size: var(--fs-display); font-weight: 500; line-height: .98; letter-spacing: var(--track-display);
  text-wrap: balance;
}

/* Hero links */
.hero__foot { display: flex; }
.hlinks { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 12px clamp(20px, 2.6vw, 44px); }
.hlinks a {
  display: inline-flex; align-items: center; gap: .18em;
  padding-block: 8px; margin-block: -8px;
  font-size: var(--fs-xl); font-weight: 500; letter-spacing: -.02em; line-height: 1.15;
}
.hlinks svg { width: .7em; height: .7em; transition: transform .55s var(--ease-out); }
.hlinks a:hover svg { transform: rotate(45deg); }
/* experience: same links at the size of the table text, aligned with the row text */
.hlinks--exp { margin-top: clamp(48px, 5vw, 80px); padding-inline: 12px; column-gap: clamp(24px, 2.6vw, 40px); }
.hlinks--exp a { font-size: var(--fs-l); letter-spacing: -.01em; }

/* ---------- Statement ---------- */
.statement {
  position: relative; z-index: 2; overflow: hidden; isolation: isolate;
  padding: clamp(112px, 15vw, 240px) var(--pad) calc(clamp(112px, 15vw, 240px) + var(--r));
  /* static fallback; the WebGL canvas fades in on top of it. Colours come from the palette picked in JS */
  background:
    radial-gradient(circle at 0 0, var(--hot) 0, var(--flare) 12%, transparent 34%),
    linear-gradient(118deg, var(--g1) 0%, var(--g2) 34%, var(--g3) 52%, var(--g4) 74%, var(--g5) 100%);
  color: var(--cream); text-align: center;
  border-radius: var(--r) var(--r) 0 0;
  box-shadow: 0 -24px 60px rgba(18, 18, 17, .1);
  /* parallax: lags behind the scroll while the dark panel slides over it */
  transform: translate3d(0, var(--shift, 0px), 0) scale(calc(1 - var(--sp, 0) * .04));
  transform-origin: 50% 0;
}
.statement::after {
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: #0B0B0A; opacity: calc(var(--sp, 0) * .45);
}
.statement ::selection { background: var(--cream); color: var(--ink); }
.statement__bg {
  position: absolute; inset: 0; z-index: -1; display: block; width: 100%; height: 100%;
  opacity: 0; transition: opacity 1.2s var(--ease);
}
.statement__bg.is-on { opacity: 1; }
.statement__text {
  margin: 0 auto; max-width: 17em;
  font-family: var(--serif); font-stretch: var(--serif-width); font-weight: 400;
  font-size: var(--fs-statement); line-height: 1; letter-spacing: -.02em; text-wrap: balance;
}
.statement__link {
  display: inline-flex; align-items: center; gap: .18em; margin-top: clamp(28px, 3.6vw, 48px); padding-block: 8px;
  font-size: max(24px, var(--fs-xl)); font-weight: 500; letter-spacing: -.02em; line-height: 1.15;
}
.statement__link svg { width: .7em; height: .7em; transition: transform .55s var(--ease-out); }
.statement__link:hover svg { transform: rotate(45deg); }

/* ---------- Screen 2 (dark panel) ---------- */
.panel {
  position: relative; z-index: 4;
  margin-top: calc(-1 * var(--r));
  padding: 0 var(--pad) clamp(56px, 7vw, 112px);
  background: var(--night); color: var(--on-night);
  border-radius: 0 0 var(--r) var(--r);
}
/* live wavy top edge, as if the panel is floating */
.panel__wave {
  position: absolute; left: 0; bottom: 100%; display: block; width: 100%; height: clamp(36px, 5vw, 80px);
  margin-bottom: -1px; pointer-events: none;
}
.panel__wave path { fill: var(--night); stroke: none; }
.panel ::selection { background: var(--on-night); color: var(--night); }

/* Marquee */
.marquee {
  margin: 0 calc(-1 * var(--pad)); padding: clamp(20px, 2.6vw, 34px) 0; overflow: hidden;
  border-bottom: 1px solid var(--night-line);
}
.marquee__track { display: flex; width: max-content; animation: marquee var(--dur, 48s) linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__group { display: flex; flex: none; }
.marquee__item {
  display: flex; align-items: center; gap: clamp(18px, 2.2vw, 34px); padding-right: clamp(18px, 2.2vw, 34px);
  font-size: var(--fs-xl); font-weight: 500; letter-spacing: -.02em; line-height: 1.2; white-space: nowrap;
}
.marquee__item:nth-child(even) {
  font-family: var(--serif); font-style: italic; font-weight: 400; font-stretch: var(--serif-width);
  font-size: calc(var(--fs-xl) * 1.06); letter-spacing: -.01em; color: var(--on-night-muted);
}
.marquee__item::after { content: "✦"; font-family: var(--sans); font-style: normal; font-size: .42em; color: var(--on-night-muted); }
@keyframes marquee { to { transform: translate3d(-50%, 0, 0); } }

/* Section blocks: label + headline in the right half, table below */
.block { padding-top: clamp(80px, 10vw, 150px); }
.block__head {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--gap);
  margin-bottom: clamp(32px, 4vw, 56px);
}
.block__label, .block__title { grid-column: 2; }
.block__label { margin: 0 0 14px; font-size: var(--fs-s); line-height: 1.4; color: var(--on-night-muted); }
.block__title {
  margin: 0; max-width: 15em;
  font-size: var(--fs-h2); font-weight: 500; line-height: 1.04; letter-spacing: var(--track-h2); text-wrap: balance;
}

/* Table rows (static, no hover) */
.rows { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--night-line); }
.row {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--gap); align-items: baseline;
  padding: clamp(20px, 1.9vw, 28px) 12px; border-bottom: 1px solid var(--night-line);
  font-size: var(--fs-l); line-height: 1.3; letter-spacing: -.01em;
}
.row__name { grid-column: 1; font-weight: 500; }
.row__mid, .row__end { grid-row: 1; grid-column: 2; color: var(--on-night-muted); }
.row__mid { justify-self: start; max-width: calc(100% - 7.5em); } /* leaves room for "2026–Present" */
.row__end { justify-self: end; font-variant-numeric: tabular-nums; }
/* company on the first line, products below it */
.row__co, .row__sub { display: block; }
.row__co { color: var(--on-night); }
.row__sub { margin-top: 6px; font-size: var(--fs-m); }
/* column headers over the experience table, same style as the card labels */
.row--head {
  padding-top: 0; padding-bottom: 14px; border-bottom: 0;
  font-size: var(--fs-s); line-height: 1.35; letter-spacing: .02em; text-transform: uppercase;
}
.row--head .row__name { font-weight: 400; color: var(--on-night-muted); }

/* Results from the CV, between the experience title and the table */
.stats {
  margin: 0 0 clamp(56px, 6vw, 96px); padding: 0 12px; list-style: none;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: var(--gap); row-gap: 28px;
}
.stat { display: flex; flex-direction: column; gap: 12px; }
.stat__num { font-size: var(--fs-h2); font-weight: 400; line-height: 1; letter-spacing: var(--track-h2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.stat__label { max-width: 26ch; font-size: var(--fs-s); line-height: 1.4; color: var(--on-night-muted); }


/* Recognition: award cards across the full width, jury table under the title column */
.rec { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--gap); row-gap: clamp(56px, 7vw, 96px); align-items: start; }
.rec__awards { grid-column: 1 / -1; }
.rec__jury {
  grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--gap); align-items: start;
  border-top: 1px solid var(--night-line);
}
.rec__jury .sublabel { margin: 0; padding: 22px 0 0; }
.rec__jury .rows { border-top: 0; }
.sublabel {
  display: flex; justify-content: space-between; gap: 12px; margin: 0 0 14px; padding: 0 12px;
  font-size: var(--fs-s); line-height: 1.4; color: var(--on-night-muted);
}
.sublabel--flush { padding: 0; }

.cards { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(10px, 1.4vw, 20px); }
.card {
  --x: 50%; --y: 50%; /* cursor position, set from JS */
  position: relative; display: flex; flex-direction: column; aspect-ratio: 4 / 5; overflow: hidden; isolation: isolate;
  padding: clamp(18px, 1.9vw, 28px);
  border-radius: 8px;
  /* many eased stops instead of two, so the faint light doesn't break into visible steps */
  background:
    radial-gradient(120% 90% at 78% 22%,
      rgba(236, 235, 230, .07) 0%, rgba(236, 235, 230, .055) 14%, rgba(236, 235, 230, .037) 28%,
      rgba(236, 235, 230, .02) 42%, rgba(236, 235, 230, .008) 54%, rgba(236, 235, 230, 0) 66%),
    #1B1B1A;
}
/* on hover the card lights up under the cursor in the current theme; each card mixes its own two colours */
.card::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .7s var(--ease);
  background:
    radial-gradient(240px circle at var(--x) var(--y),
      color-mix(in srgb, var(--ca) 62%, transparent) 0%, color-mix(in srgb, var(--ca) 44%, transparent) 16%,
      color-mix(in srgb, var(--ca) 26%, transparent) 34%, color-mix(in srgb, var(--ca) 12%, transparent) 52%,
      color-mix(in srgb, var(--ca) 4%, transparent) 72%, transparent 100%),
    radial-gradient(460px circle at var(--x) var(--y),
      color-mix(in srgb, var(--cb) 34%, transparent) 0%, color-mix(in srgb, var(--cb) 20%, transparent) 25%,
      color-mix(in srgb, var(--cb) 9%, transparent) 50%, color-mix(in srgb, var(--cb) 3%, transparent) 72%,
      transparent 100%);
}
/* fine noise on top of the light dithers the 8-bit gradients that would otherwise band on dark */
.card::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='d'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.4' numOctaves='1' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23d)'/%3E%3C/svg%3E");
}
.card:nth-child(1) { --ca: var(--g1); --cb: var(--g3); }
.card:nth-child(2) { --ca: var(--g2); --cb: var(--g5); }
.card:nth-child(3) { --ca: var(--g4); --cb: var(--flare); }
.card:nth-child(4) { --ca: var(--g3); --cb: var(--g2); }
@media (hover: hover) { .card:hover::before { opacity: 1; } }
.card__num { font-size: var(--fs-display); font-weight: 400; line-height: .82; letter-spacing: -.05em; font-variant-numeric: tabular-nums; }
.card__label {
  margin-top: clamp(18px, 2.6vw, 40px); max-width: 9em;
  font-size: var(--fs-s); line-height: 1.35; letter-spacing: .02em; text-transform: uppercase; color: var(--on-night-muted);
}
.card__name {
  margin-top: auto; align-self: flex-end; max-width: 100%; text-align: right;
  font-size: var(--fs-xl); font-weight: 400; line-height: 1.02; letter-spacing: -.01em; text-transform: uppercase;
}

.rows--compact .row { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); padding-top: 20px; padding-bottom: 20px; }

/* Contact */
.contact__top {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding-bottom: 18px; border-bottom: 1px solid var(--night-line);
}
.contact__top .block__label { margin: 0; }
.status--dark { border-color: var(--night-line); }
.contact__title {
  margin: clamp(32px, 4.5vw, 64px) 0 0; max-width: 14em;
  font-size: var(--fs-display); font-weight: 500; line-height: .98; letter-spacing: var(--track-display); text-wrap: balance;
}
.mail { display: flex; flex-wrap: wrap; align-items: center; gap: 14px clamp(32px, 4.4vw, 72px); margin-top: clamp(40px, 6vw, 88px); }
.mail__link {
  display: inline-flex; align-items: center; gap: .15em; padding-block: 6px;
  font-size: var(--fs-h2); font-weight: 500; letter-spacing: var(--track-h2); line-height: 1.1;
}
.mail__link svg { width: .66em; height: .66em; transition: transform .55s var(--ease-out); }
.mail__link:hover svg { transform: rotate(45deg); }
.contact__note { margin: 18px 0 0; max-width: 48ch; font-size: var(--fs-m); line-height: 1.45; color: var(--on-night-muted); }

/* ---------- Footer ---------- */
.foot {
  position: relative; z-index: 3;
  margin-top: calc(-1 * var(--r));
  padding: calc(var(--r) + clamp(48px, 6vw, 88px)) var(--pad) clamp(28px, 3vw, 44px);
  background: var(--paper); color: var(--ink);
  font-weight: 500;
}
.foot__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.foot__col { display: flex; flex-direction: column; }
.foot__col--center { text-align: center; }
.foot__col--end { text-align: right; }
.foot__list { margin: 0; padding: 0; list-style: none; }
.foot__list li { padding: 3px 0; }
.foot__list a { font-size: var(--fs-xl); line-height: 1.15; letter-spacing: -.02em; }
.foot__list a { display: inline-block; transition: transform .6s var(--ease-out); }
.foot__col:not(.foot__col--center):not(.foot__col--end) .foot__list a:hover { transform: translateX(8px); }
.foot__col--end .foot__list a:hover { transform: translateX(-8px); }


/* Language swap */
[data-i18n] { transition: opacity .28s var(--ease), filter .28s var(--ease); }
.is-swapping [data-i18n] { opacity: 0; filter: blur(6px); }

/* ---------- Layout: desktop stacking ---------- */
@media (min-width: 900px) and (min-height: 620px) {
  .hero {
    position: sticky; top: 0; height: 100svh;
    transform: scale(calc(1 - var(--p, 0) * .06));
    opacity: calc(1 - var(--p, 0) * .55);
  }
  .hero__inner { flex: 1 1 auto; min-height: 0; }
}

/* ---------- Layout: mobile ---------- */
@media (max-width: 899px) {
  .bar__nav { column-gap: 20px; }
  .hero__inner { gap: 32px; border-width: 2px; }
  .headline, .contact__title { font-size: clamp(38px, 10.4vw, 72px); }

  .statement__text { max-width: none; }

  .block__head { grid-template-columns: minmax(0, 1fr); }
  .block__label, .block__title { grid-column: 1; }
  .row, .rows--compact .row { grid-template-columns: minmax(0, 1fr) auto; row-gap: 6px; padding-left: 0; padding-right: 0; }
  .row__name { grid-column: 1; grid-row: 1; }
  .row__end { grid-column: 2; grid-row: 1; }
  .row__mid { grid-column: 1 / -1; grid-row: 2; max-width: none; }
  .row__sub { margin-top: 2px; font-size: var(--fs-s); }
  .row--head { display: none; }
  .sublabel { padding: 0; }
  .rec { grid-template-columns: minmax(0, 1fr); }
  .rec__jury { grid-column: 1; grid-template-columns: minmax(0, 1fr); }
  .rec__jury .sublabel { padding: 18px 0 4px; }
  .stats { grid-template-columns: minmax(0, 1fr); padding: 0; }
  .hlinks--exp { padding-inline: 0; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card { aspect-ratio: auto; min-height: clamp(210px, 58vw, 340px); }
  .card__num { font-size: clamp(52px, 15vw, 96px); }

  /* footer columns stack */
  .foot__grid { grid-template-columns: minmax(0, 1fr); row-gap: 32px; }
  .foot__col--center, .foot__col--end { text-align: left; }
  .foot__col--end .foot__list a:hover { transform: translateX(8px); }
  .foot__list li { padding: 8px 0; } /* 40px+ tap height */
}

/* ---------- 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: 0ms !important; }
  .hero::before, .foot::before { animation: none; }
  .marquee__track { animation: none; }
  .js [data-reveal] { opacity: 1; transform: none; }
  .js .split .w > span { transform: none; }
  .scribble path { stroke-dashoffset: 0; }
}
