/* ==========================================================================
   Elyorbek Raxmatullayev — Portfolio
   Monochrome design system. No colour. Contrast, type and motion only.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */
:root {
    /* Surface */
    --ink: #060606;
    --ink-raised: #0d0d0e;
    --ink-sunken: #030303;

    /* Foreground */
    --paper: #f4f3ef;
    --paper-80: rgba(244, 243, 239, .80);
    --paper-56: rgba(244, 243, 239, .56);
    --paper-38: rgba(244, 243, 239, .38);
    --paper-22: rgba(244, 243, 239, .22);
    --paper-12: rgba(244, 243, 239, .12);
    --paper-06: rgba(244, 243, 239, .06);

    --line: rgba(244, 243, 239, .11);
    --line-strong: rgba(244, 243, 239, .24);

    /* Type */
    /* Anton has no Cyrillic — Oswald 700 catches those glyphs so Russian
       headings stay a heavy condensed grotesque instead of dropping to Arial. */
    --font-display: 'Anton', 'Oswald', 'Arial Narrow', sans-serif;
    --font-serif: 'Instrument Serif', Georgia, serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

    /* Rhythm */
    --gutter: clamp(1.25rem, 4vw, 4.5rem);
    --shell: 1560px;
    --section-y: clamp(4.5rem, 9vh, 7.5rem);

    /* Motion */
    --ease-out: cubic-bezier(.16, 1, .3, 1);
    --ease-io: cubic-bezier(.65, .05, .36, 1);
    --dur: .8s;
}

/* --------------------------------------------------------------------------
   2. Reset / base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: auto; /* Lenis owns scrolling */
}

body {
    margin: 0;
    background: var(--ink);
    color: var(--paper);
    font-family: var(--font-body);
    font-size: clamp(.95rem, .35vw + .85rem, 1.05rem);
    font-weight: 400;
    line-height: 1.6;
    letter-spacing: -.005em;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

body.is-locked { overflow: hidden; height: 100vh; }

img, svg, canvas { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, textarea { font: inherit; color: inherit; }

a { color: inherit; text-decoration: none; }

::selection { background: var(--paper); color: var(--ink); }

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--ink); }
::-webkit-scrollbar-thumb { background: var(--paper-22); }
::-webkit-scrollbar-thumb:hover { background: var(--paper-38); }

:focus-visible { outline: 1px solid var(--paper); outline-offset: 4px; }

/* --------------------------------------------------------------------------
   3. Type primitives
   -------------------------------------------------------------------------- */
.display {
    font-family: var(--font-display);
    font-weight: 400;
    text-transform: uppercase;
    line-height: .84;
    letter-spacing: -.015em;
    margin: 0;
}

.serif-accent {
    font-family: var(--font-serif);
    font-style: italic;
    text-transform: none;
    letter-spacing: -.01em;
    font-weight: 400;
}

.mono {
    font-family: var(--font-mono);
    font-size: .68rem;
    font-weight: 400;
    letter-spacing: .22em;
    text-transform: uppercase;
}

.lede {
    font-size: clamp(1.15rem, 1.5vw + .7rem, 1.9rem);
    line-height: 1.42;
    letter-spacing: -.02em;
    font-weight: 300;
    color: var(--paper-80);
    margin: 0;
}

.muted { color: var(--paper-56); }

/* --------------------------------------------------------------------------
   4. Layout shell
   -------------------------------------------------------------------------- */
.shell {
    width: 100%;
    max-width: var(--shell);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.section { position: relative; padding-block: var(--section-y); }

.section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 2rem;
    padding-bottom: 1.1rem;
    margin-bottom: clamp(2.5rem, 6vh, 5rem);
    border-bottom: 1px solid var(--line);
}

.section-head__index { color: var(--paper-38); }
.section-head__label { color: var(--paper-80); }

.rule { height: 1px; background: var(--line); border: 0; margin: 0; }

/* --------------------------------------------------------------------------
   5. Ambience: liquid canvas, grain, vignette
   -------------------------------------------------------------------------- */
#liquid {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity 1.6s ease 0.1s;
}

#liquid.is-ready { opacity: 1; }

/* Fallback / base wash painted under the canvas */
.ambience {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(78% 58% at 22% 8%, rgba(255, 255, 255, .07) 0%, transparent 62%),
        radial-gradient(62% 52% at 84% 74%, rgba(255, 255, 255, .045) 0%, transparent 60%),
        var(--ink);
}

.grain {
    position: fixed;
    inset: -120%;
    z-index: 60;
    pointer-events: none;
    opacity: .13;
    mix-blend-mode: overlay;
    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='.82' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    animation: grain-shift 700ms steps(1) infinite;
    will-change: transform;
}

@keyframes grain-shift {
    0%   { transform: translate3d(0, 0, 0); }
    20%  { transform: translate3d(-3%, 2%, 0); }
    40%  { transform: translate3d(2%, -3%, 0); }
    60%  { transform: translate3d(-2%, -2%, 0); }
    80%  { transform: translate3d(3%, 1%, 0); }
    100% { transform: translate3d(0, 0, 0); }
}

.vignette {
    position: fixed;
    inset: 0;
    z-index: 55;
    pointer-events: none;
    background: radial-gradient(120% 90% at 50% 45%, transparent 42%, rgba(0, 0, 0, .55) 100%);
}

/* Everything above the canvas */
.page { position: relative; z-index: 10; }

/* Icon sprite holder — present in the DOM, never rendered */
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* --------------------------------------------------------------------------
   6. Cursor
   -------------------------------------------------------------------------- */
.cursor,
.cursor-ring {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 90;
    pointer-events: none;
    border-radius: 50%;
    mix-blend-mode: difference;
    opacity: 0;
    transition: opacity .3s ease;
}

.cursor { width: 6px; height: 6px; background: var(--paper); margin: -3px 0 0 -3px; }

.cursor-ring {
    width: 38px; height: 38px;
    margin: -19px 0 0 -19px;
    border: 1px solid var(--paper-38);
    transition: opacity .3s ease, width .35s var(--ease-out), height .35s var(--ease-out),
                margin .35s var(--ease-out), border-color .35s var(--ease-out);
}

body.cursor-ready .cursor,
body.cursor-ready .cursor-ring { opacity: 1; }

body.cursor-hot .cursor-ring {
    width: 74px; height: 74px;
    margin: -37px 0 0 -37px;
    border-color: var(--paper-80);
}

body.cursor-hot .cursor { opacity: 0; }

@media (hover: none), (pointer: coarse) {
    .cursor, .cursor-ring { display: none; }
}

/* --------------------------------------------------------------------------
   7. Preloader
   -------------------------------------------------------------------------- */
.preloader {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: var(--ink-sunken);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: var(--gutter);
    transition: transform 1.1s var(--ease-io), opacity .5s ease .6s;
}

.preloader.is-done { transform: translateY(-101%); opacity: 0; pointer-events: none; }

.preloader__row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 2rem;
    padding-bottom: 1.25rem;
}

.preloader__name { color: var(--paper-56); }

.preloader__count {
    font-family: var(--font-display);
    font-size: clamp(4rem, 16vw, 14rem);
    line-height: .8;
    letter-spacing: -.03em;
}

.preloader__bar { height: 1px; background: var(--paper-12); position: relative; overflow: hidden; }
.preloader__bar span { position: absolute; inset: 0 100% 0 0; background: var(--paper); }

/* --------------------------------------------------------------------------
   8. Navigation
   -------------------------------------------------------------------------- */
.nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 70;
    padding-block: 1.35rem;
    transition: background .5s ease, backdrop-filter .5s ease, padding .5s ease, border-color .5s ease;
    border-bottom: 1px solid transparent;
}

.nav.is-stuck {
    padding-block: .85rem;
    background: rgba(6, 6, 6, .68);
    backdrop-filter: blur(14px) saturate(120%);
    -webkit-backdrop-filter: blur(14px) saturate(120%);
    border-bottom-color: var(--line);
}

.nav.is-hidden { transform: translateY(-102%); }
.nav { transition: transform .55s var(--ease-out), background .5s ease, backdrop-filter .5s ease, padding .5s ease, border-color .5s ease; }

.nav__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

/* Wordmark — pure type, no image */
.wordmark {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    font-family: var(--font-display);
    font-size: clamp(.86rem, 2.6vw, 1.02rem);
    letter-spacing: .04em;
    text-transform: uppercase;
    white-space: nowrap;
    min-width: 0;      /* let the wordmark absorb the squeeze, not the controls */
    overflow: hidden;
}

.wordmark__dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--paper);
    animation: pulse-dot 2.6s var(--ease-io) infinite;
}

@keyframes pulse-dot {
    0%, 100% { transform: scale(1); opacity: 1; }
    50%      { transform: scale(.55); opacity: .35; }
}

.wordmark__dot { flex: none; }

.nav__links { display: flex; align-items: center; gap: clamp(1.2rem, 2.4vw, 2.6rem); }

.nav__link {
    position: relative;
    font-family: var(--font-mono);
    font-size: .66rem;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--paper-56);
    padding-block: .3rem;
    transition: color .35s ease;
}

.nav__link::after {
    content: '';
    position: absolute;
    left: 0; bottom: 0;
    width: 100%; height: 1px;
    background: var(--paper);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform .45s var(--ease-out);
}

.nav__link:hover, .nav__link.is-active { color: var(--paper); }
.nav__link:hover::after, .nav__link.is-active::after { transform: scaleX(1); transform-origin: left; }

.nav__link-index { color: var(--paper-22); margin-right: .35rem; }

.nav__side { display: flex; align-items: center; gap: 1rem; flex: none; }

/* Language switch */
.lang {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    overflow: hidden;
    flex: none;
}

.lang a {
    font-family: var(--font-mono);
    font-size: .6rem;
    letter-spacing: .16em;
    padding: .42rem .68rem;
    color: var(--paper-38);
    transition: color .3s ease, background .3s ease;
}

.lang a:hover { color: var(--paper-80); }
.lang a.is-active { background: var(--paper); color: var(--ink); }

/* Burger — 32px square so the tap target is real, lines drawn inside it */
.burger { display: none; width: 32px; height: 32px; position: relative; flex: none; }
.burger span {
    position: absolute; left: 1px;
    width: 30px; height: 1px;
    background: var(--paper);
    transition: transform .45s var(--ease-out), width .45s var(--ease-out);
}
.burger span:nth-child(1) { top: 13px; }
.burger span:nth-child(2) { top: 19px; width: 18px; }
body.menu-open .burger span:nth-child(1) { transform: translateY(3px) rotate(45deg); }
body.menu-open .burger span:nth-child(2) { transform: translateY(-3px) rotate(-45deg); width: 30px; }

/* Mobile drawer */
.drawer {
    position: fixed;
    inset: 0;
    z-index: 65;
    background: var(--ink-sunken);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: var(--gutter);
    clip-path: inset(0 0 100% 0);
    transition: clip-path .8s var(--ease-io);
}

body.menu-open .drawer { clip-path: inset(0 0 0 0); }

.drawer__link {
    display: block;
    font-family: var(--font-display);
    text-transform: uppercase;
    font-size: clamp(2.4rem, 11vw, 4.5rem);
    line-height: 1.05;
    letter-spacing: -.02em;
    padding-block: .3rem;
    color: var(--paper-80);
    opacity: 0;
    transform: translateY(30px);
    transition: color .3s ease, opacity .5s ease, transform .6s var(--ease-out);
}

body.menu-open .drawer__link { opacity: 1; transform: none; }
.drawer__link:hover { color: var(--paper); }

.drawer__foot { margin-top: 2.5rem; display: flex; flex-wrap: wrap; gap: .6rem; }

/* --------------------------------------------------------------------------
   9. Hero
   -------------------------------------------------------------------------- */
.hero {
    position: relative;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding-top: clamp(5.5rem, 12vh, 8rem);
    padding-bottom: clamp(1.5rem, 4vh, 3rem);
}

.hero__status {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    align-self: flex-start;
    padding: .5rem .95rem .5rem .8rem;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    color: var(--paper-80);
    margin-bottom: auto;
}

.hero__status i {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--paper);
    box-shadow: 0 0 0 0 var(--paper-38);
    animation: beacon 2.4s var(--ease-io) infinite;
}

@keyframes beacon {
    0%   { box-shadow: 0 0 0 0 rgba(244, 243, 239, .45); }
    70%  { box-shadow: 0 0 0 9px rgba(244, 243, 239, 0); }
    100% { box-shadow: 0 0 0 0 rgba(244, 243, 239, 0); }
}

/* Capped by viewport HEIGHT as well as width — four lines of Anton must
   always fit above the meta row without overflowing the hero. */
/* Positioning context for the badge. flow-root stops the title's top margin
   collapsing out, so the stage box matches the type block exactly. */
.hero__stage {
    position: relative;
    display: flow-root;
    margin-block: clamp(1.25rem, 4vh, 3rem) 0;
}

.hero__title {
    font-size: clamp(2.8rem, min(18vw, 13.5vh), 13rem);
    margin-block: 0;
}

.hero__title .line { display: block; overflow: hidden; }
.hero__title .line > span { display: block; will-change: transform; }

.hero__title .thin {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: .82em;
    letter-spacing: -.02em;
    color: var(--paper-56);
}

.hero__meta {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 1.5rem 1.5rem;
    align-items: end;
    margin-top: clamp(2rem, 6vh, 3.6rem);
    padding-top: 1.5rem;
    border-top: 1px solid var(--line);
}

.hero__role { grid-column: 1 / span 4; }
.hero__role strong { display: block; font-weight: 500; font-size: 1.05rem; letter-spacing: -.01em; }
.hero__role span { color: var(--paper-38); }

.hero__pitch { grid-column: 6 / span 4; color: var(--paper-56); max-width: 40ch; }

.hero__scroll {
    grid-column: 11 / span 2;
    justify-self: end;
    display: flex;
    align-items: center;
    gap: .7rem;
    color: var(--paper-38);
}

.hero__scroll-line {
    width: 1px; height: 46px;
    background: linear-gradient(var(--paper-38), transparent);
    position: relative;
    overflow: hidden;
}

.hero__scroll-line::after {
    content: '';
    position: absolute;
    left: 0; top: 0;
    width: 100%; height: 40%;
    background: var(--paper);
    animation: scroll-cue 2.2s var(--ease-io) infinite;
}

@keyframes scroll-cue {
    0%   { transform: translateY(-100%); }
    100% { transform: translateY(260%); }
}

/* Rotating badge — anchors the empty right half of the hero */
.hero__aside {
    position: absolute;
    right: clamp(2rem, 13vw, 14rem);
    top: 50%;
    transform: translateY(-50%);
    display: grid;
    justify-items: center;
    gap: 1.4rem;
}

.hero__badge {
    position: relative;
    width: clamp(140px, 16vw, 216px);
    aspect-ratio: 1;
    display: grid;
    place-items: center;
}

.hero__badge-ring {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    animation: badge-spin 26s linear infinite;
}

.hero__badge-ring text {
    font-family: var(--font-mono);
    font-size: 6.4px;
    letter-spacing: .16em;
    text-transform: uppercase;
    fill: var(--paper-56);
    transition: fill .45s ease;
}

.hero__badge:hover .hero__badge-ring text { fill: var(--paper); }

@keyframes badge-spin { to { transform: rotate(360deg); } }

.hero__badge-core {
    width: 38%;
    aspect-ratio: 1;
    border: 1px solid var(--line-strong);
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 1.05rem;
    color: var(--paper-80);
    transition: background .5s var(--ease-out), color .5s var(--ease-out),
                border-color .5s var(--ease-out), transform .5s var(--ease-out);
}

.hero__badge:hover .hero__badge-core {
    background: var(--paper);
    color: var(--ink);
    border-color: var(--paper);
    transform: translateY(4px);
}

.hero__coords { color: var(--paper-22); font-size: .6rem; letter-spacing: .2em; }

/* --------------------------------------------------------------------------
   10. Marquee ticker
   -------------------------------------------------------------------------- */
.ticker {
    position: relative;
    padding-block: clamp(1.1rem, 2.4vh, 1.8rem);
    border-block: 1px solid var(--line);
    overflow: hidden;
    background: rgba(6, 6, 6, .35);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.ticker__track { display: flex; width: max-content; will-change: transform; }

.ticker__group {
    display: flex;
    align-items: center;
    gap: 2.4rem;
    padding-right: 2.4rem;
    flex: none;
}

.ticker__item {
    font-family: var(--font-display);
    text-transform: uppercase;
    font-size: clamp(1.1rem, 2.6vw, 2.1rem);
    letter-spacing: .01em;
    white-space: nowrap;
    color: var(--paper-80);
}

.ticker__item.is-ghost {
    color: transparent;
    -webkit-text-stroke: 1px var(--paper-22);
}

.ticker__star { font-size: 1rem; color: var(--paper-38); flex: none; }

/* --------------------------------------------------------------------------
   11. About
   -------------------------------------------------------------------------- */
.about__grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: clamp(2rem, 5vw, 4rem);
    align-items: start;
}

.about__statement { grid-column: 1 / span 7; }
.about__statement p + p { margin-top: 1.6rem; }

.about__aside { grid-column: 9 / span 4; }

.about__aside dl { margin: 0; display: grid; gap: 0; }

.about__aside .row {
    display: flex;
    justify-content: space-between;
    gap: 1.5rem;
    padding-block: .95rem;
    border-bottom: 1px solid var(--line);
}

.about__aside dt { color: var(--paper-38); font-family: var(--font-mono); font-size: .64rem; letter-spacing: .18em; text-transform: uppercase; }
.about__aside dd { margin: 0; text-align: right; font-size: .92rem; color: var(--paper-80); }

/* Stats */
.stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1px;
    margin-top: clamp(3rem, 8vh, 5.5rem);
    background: var(--line);
    border-block: 1px solid var(--line);
}

.stat { background: var(--ink); padding: clamp(1.4rem, 3vw, 2.4rem) clamp(1rem, 2vw, 1.8rem); }

.stat__num {
    font-family: var(--font-display);
    font-size: clamp(2.6rem, 5.5vw, 4.6rem);
    line-height: .9;
    letter-spacing: -.02em;
    display: flex;
    align-items: baseline;
    gap: .06em;
}

.stat__suffix { font-size: .42em; color: var(--paper-38); }
.stat__label { margin-top: .8rem; color: var(--paper-38); }

/* --------------------------------------------------------------------------
   12. Expertise — sticky index + panels
   -------------------------------------------------------------------------- */
.expertise__grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: clamp(2rem, 5vw, 4rem);
    align-items: start;
}

.expertise__index { grid-column: 1 / span 4; position: sticky; top: 22vh; }

.expertise__index h2 {
    font-family: var(--font-display);
    text-transform: uppercase;
    font-size: clamp(2.2rem, 5vw, 4.2rem);
    line-height: .92;
    letter-spacing: -.02em;
    margin: 0 0 2rem;
}

.expertise__index ol { list-style: none; margin: 0; padding: 0; }

.expertise__index li {
    display: flex;
    align-items: baseline;
    gap: .9rem;
    padding-block: .55rem;
    color: var(--paper-22);
    transition: color .45s var(--ease-out);
}

.expertise__index li .n { font-family: var(--font-mono); font-size: .62rem; letter-spacing: .18em; }
.expertise__index li .t { font-size: 1rem; letter-spacing: -.01em; }
.expertise__index li.is-active { color: var(--paper); }

.expertise__panels { grid-column: 6 / span 7; display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }

.panel {
    background: var(--ink);
    padding: clamp(1.8rem, 4vw, 3.2rem);
    position: relative;
    transition: background .5s var(--ease-out), color .5s var(--ease-out);
}

.panel__n { color: var(--paper-22); }

.panel h3 {
    font-family: var(--font-display);
    text-transform: uppercase;
    font-size: clamp(1.5rem, 3vw, 2.4rem);
    line-height: 1;
    letter-spacing: -.01em;
    margin: 1.1rem 0 1rem;
}

.panel p { margin: 0; color: var(--paper-56); max-width: 54ch; transition: color .5s var(--ease-out); }

.panel__tags { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: 1.6rem; }

.panel__tags span {
    font-family: var(--font-mono);
    font-size: .6rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    padding: .34rem .62rem;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    color: var(--paper-56);
    transition: border-color .5s var(--ease-out), color .5s var(--ease-out);
}

/* Invert on hover — the core monochrome interaction */
.panel:hover { background: var(--paper); color: var(--ink); }
.panel:hover .panel__n { color: rgba(6, 6, 6, .4); }
.panel:hover p { color: rgba(6, 6, 6, .68); }
.panel:hover .panel__tags span { border-color: rgba(6, 6, 6, .28); color: rgba(6, 6, 6, .7); }

/* --------------------------------------------------------------------------
   13. Stack
   -------------------------------------------------------------------------- */
.stack__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
}

.stack__col { background: var(--ink); padding: clamp(1.5rem, 3vw, 2.4rem); }
.stack__col h3 { margin: 0 0 1.4rem; color: var(--paper-38); font-family: var(--font-mono); font-size: .64rem; letter-spacing: .2em; text-transform: uppercase; font-weight: 400; }
.stack__col ul { list-style: none; margin: 0; padding: 0; }

.stack__col li {
    position: relative;
    padding: .55rem 0 .55rem 1.15rem;
    color: var(--paper-80);
    font-size: .95rem;
    letter-spacing: -.01em;
    transition: color .3s ease, padding-left .4s var(--ease-out);
}

.stack__col li::before {
    content: '';
    position: absolute;
    left: 0; top: 50%;
    width: 5px; height: 1px;
    background: var(--paper-38);
    transition: width .4s var(--ease-out), background .3s ease;
}

.stack__col li:hover { color: var(--paper); padding-left: 1.5rem; }
.stack__col li:hover::before { width: 12px; background: var(--paper); }

/* --------------------------------------------------------------------------
   14. Work — sticky stacked cards
   -------------------------------------------------------------------------- */
.work__list { display: flex; flex-direction: column; gap: 2.5rem; }

.work-card {
    position: sticky;
    top: calc(12vh + 2rem);
    background: var(--ink-raised);
    border: 1px solid var(--line);
    padding: clamp(1.8rem, 4vw, 3.4rem);
    overflow: hidden;
    will-change: transform;
}

.work-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(90% 120% at 88% 0%, rgba(255, 255, 255, .06), transparent 62%);
    pointer-events: none;
}

.work-card__top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1.5rem;
    padding-bottom: 1.4rem;
    border-bottom: 1px solid var(--line);
}

.work-card__n { color: var(--paper-38); }
.work-card__year { color: var(--paper-38); }

.work-card__body {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 1.5rem clamp(2rem, 4vw, 3.5rem);
    padding-top: clamp(1.6rem, 3vw, 2.4rem);
    align-items: start;
}

.work-card__title { grid-column: 1 / span 4; }

.work-card__title h3 {
    font-family: var(--font-display);
    text-transform: uppercase;
    font-size: clamp(1.9rem, 4.4vw, 3.8rem);
    line-height: .92;
    letter-spacing: -.02em;
    margin: 0 0 .7rem;
}

.work-card__kind { color: var(--paper-38); }

.work-card__desc { grid-column: 6 / span 7; }
.work-card__desc p { margin: 0; color: var(--paper-56); }

.work-card__points { list-style: none; margin: 1.4rem 0 0; padding: 0; display: grid; gap: .5rem; }

.work-card__points li {
    display: flex;
    gap: .7rem;
    color: var(--paper-80);
    font-size: .9rem;
}

.work-card__points li::before { content: '—'; color: var(--paper-22); flex: none; }

.work-card__tags { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: 1.8rem; }

.work-card__tags span {
    font-family: var(--font-mono);
    font-size: .6rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    padding: .34rem .62rem;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    color: var(--paper-56);
}

/* Secondary work — revealed by the "more projects" toggle */
.work__more { margin-top: clamp(2.5rem, 6vh, 4rem); }

.work__more-sign { display: inline-block; transition: transform .5s var(--ease-out); }
.work__more-btn[aria-expanded="true"] .work__more-sign { transform: rotate(135deg); }

.mini-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
    margin-top: clamp(1.5rem, 4vh, 2.5rem);
}

.mini-grid[hidden] { display: none; }

.mini-card {
    background: var(--ink);
    padding: clamp(1.3rem, 2.6vw, 2rem);
    display: flex;
    flex-direction: column;
    gap: .7rem;
    opacity: 0;
    transform: translateY(18px);
    transition: opacity .7s var(--ease-out), transform .8s var(--ease-out),
                background .5s var(--ease-out), color .5s var(--ease-out);
}

.mini-grid.is-open .mini-card { opacity: 1; transform: none; }

.mini-card h4 {
    font-family: var(--font-display);
    text-transform: uppercase;
    font-size: clamp(1.05rem, 1.7vw, 1.45rem);
    line-height: 1;
    letter-spacing: -.01em;
    margin: 0;
}

.mini-card p { margin: 0; color: var(--paper-56); font-size: .89rem; transition: color .5s var(--ease-out); }
.mini-card__tag { color: var(--paper-38); margin-top: auto; padding-top: .5rem; transition: color .5s var(--ease-out); }

.mini-card:hover { background: var(--paper); color: var(--ink); }
.mini-card:hover p { color: rgba(6, 6, 6, .68); }
.mini-card:hover .mini-card__tag { color: rgba(6, 6, 6, .45); }

/* --------------------------------------------------------------------------
   15. Experience timeline
   -------------------------------------------------------------------------- */
.timeline { display: grid; gap: 0; }

.tl-row {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 1rem clamp(1.5rem, 3vw, 3rem);
    padding-block: clamp(1.6rem, 3.5vw, 2.6rem);
    border-top: 1px solid var(--line);
    position: relative;
    align-items: start;
}

.tl-row:last-child { border-bottom: 1px solid var(--line); }

.tl-row::after {
    content: '';
    position: absolute;
    left: 0; top: -1px;
    width: 0; height: 1px;
    background: var(--paper);
    transition: width .9s var(--ease-out);
}

.tl-row:hover::after { width: 100%; }

.tl-row__when { grid-column: 1 / span 2; color: var(--paper-38); padding-top: .35rem; }
.tl-row__what { grid-column: 3 / span 5; }

.tl-row__what h3 {
    margin: 0 0 .35rem;
    font-size: clamp(1.15rem, 1.8vw, 1.6rem);
    font-weight: 500;
    letter-spacing: -.02em;
}

.tl-row__where { color: var(--paper-38); font-size: .9rem; }
.tl-row__detail { grid-column: 9 / span 4; color: var(--paper-56); font-size: .92rem; }

/* --------------------------------------------------------------------------
   15b. Process
   -------------------------------------------------------------------------- */
.process__head {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: clamp(1.5rem, 5vw, 4rem);
    align-items: end;
    margin-bottom: clamp(2.5rem, 6vh, 4rem);
}

.process__head h2 {
    grid-column: 1 / span 6;
    font-family: var(--font-display);
    text-transform: uppercase;
    font-size: clamp(2.2rem, 5vw, 4.2rem);
    line-height: .92;
    letter-spacing: -.02em;
    margin: 0;
}

.process__head p { grid-column: 8 / span 5; margin: 0; }

/* Service tiers */
.tier-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
}

.tier {
    background: var(--ink);
    padding: clamp(1.5rem, 3vw, 2.4rem);
    transition: background .5s var(--ease-out), color .5s var(--ease-out);
}

.tier__kind { color: var(--paper-38); transition: color .5s var(--ease-out); }

.tier__time {
    font-family: var(--font-display);
    text-transform: uppercase;
    font-size: clamp(1.5rem, 3vw, 2.4rem);
    line-height: 1;
    letter-spacing: -.02em;
    margin: 1rem 0 .8rem;
}

.tier__note { margin: 0; color: var(--paper-56); font-size: .9rem; transition: color .5s var(--ease-out); }

.tier:hover { background: var(--paper); color: var(--ink); }
.tier:hover .tier__kind { color: rgba(6, 6, 6, .45); }
.tier:hover .tier__note { color: rgba(6, 6, 6, .68); }

/* Numbered stages */
.steps { margin-top: clamp(3rem, 7vh, 5rem); }

.step {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: .6rem clamp(1.5rem, 3vw, 3rem);
    padding-block: clamp(1.4rem, 3vw, 2.2rem);
    border-top: 1px solid var(--line);
    position: relative;
    align-items: start;
}

.step:last-child { border-bottom: 1px solid var(--line); }

.step::after {
    content: '';
    position: absolute;
    left: 0; top: -1px;
    width: 0; height: 1px;
    background: var(--paper);
    transition: width .9s var(--ease-out);
}

.step:hover::after { width: 100%; }

.step__n {
    grid-column: 1 / span 1;
    font-family: var(--font-display);
    font-size: clamp(1.3rem, 2.2vw, 1.9rem);
    line-height: 1;
    color: var(--paper-22);
    transition: color .5s var(--ease-out);
}

.step:hover .step__n { color: var(--paper); }

.step__title {
    grid-column: 2 / span 4;
    margin: 0;
    font-size: clamp(1.02rem, 1.5vw, 1.35rem);
    font-weight: 500;
    letter-spacing: -.02em;
}

.step__text { grid-column: 7 / span 6; margin: 0; color: var(--paper-56); font-size: .93rem; }

/* Terms */
.terms {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
    margin-top: clamp(2.5rem, 6vh, 4rem);
}

.term { background: var(--ink); padding: clamp(1.5rem, 3vw, 2.4rem); }

.term h3 {
    margin: 0 0 .9rem;
    font-family: var(--font-display);
    text-transform: uppercase;
    font-size: clamp(1.05rem, 2vw, 1.5rem);
    line-height: 1;
    letter-spacing: -.01em;
}

.term p { margin: 0; color: var(--paper-56); font-size: .93rem; }

/* --------------------------------------------------------------------------
   15c. Audio toggle — equaliser bars, animated only while playing
   -------------------------------------------------------------------------- */
.audio-toggle {
    display: inline-flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 3px;
    width: 20px;
    height: 16px;
    padding: 0;
    flex: none;
}

.audio-toggle span {
    display: block;
    width: 3px;
    height: 24%;
    background: var(--paper-38);
    transition: background .3s ease, height .3s var(--ease-out);
}

.audio-toggle:hover span { background: var(--paper-80); }

.audio-toggle.is-playing span {
    background: var(--paper);
    animation: eq 1.1s ease-in-out infinite;
}

.audio-toggle.is-playing span:nth-child(1) { animation-delay: -.55s; }
.audio-toggle.is-playing span:nth-child(2) { animation-delay: -.15s; }
.audio-toggle.is-playing span:nth-child(3) { animation-delay: -.75s; }
.audio-toggle.is-playing span:nth-child(4) { animation-delay: -.35s; }

@keyframes eq {
    0%, 100% { height: 22%; }
    50%      { height: 100%; }
}

/* --------------------------------------------------------------------------
   16. Contact
   -------------------------------------------------------------------------- */
.contact { padding-bottom: clamp(3rem, 8vh, 6rem); }

.contact__cta {
    font-size: clamp(2.8rem, 11vw, 11rem);
    margin: 0 0 clamp(2.5rem, 6vh, 4.5rem);
}

/* Cyrillic carries ascending diacritics (Й, Ё) that a .84 line-height crowds
   into the rule above. Latin headings keep the tighter setting. */
:root[lang="ru"] .contact__cta { line-height: .96; }

.contact__cta a { display: inline-block; position: relative; }

.contact__cta a::after {
    content: '';
    position: absolute;
    left: 0; bottom: .08em;
    width: 100%; height: 2px;
    background: var(--paper);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform .7s var(--ease-out);
}

.contact__cta a:hover::after { transform: scaleX(1); transform-origin: left; }

.contact__grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: clamp(2.5rem, 5vw, 4rem);
    align-items: start;
}

.contact__channels { grid-column: 1 / span 5; }

.channel {
    display: grid;
    grid-template-columns: auto auto minmax(0, 1fr);
    align-items: center;
    gap: .85rem;
    padding-block: 1.15rem;
    border-bottom: 1px solid var(--line);
    position: relative;
    overflow: hidden;
}

.channel__icon {
    width: 16px;
    height: 16px;
    fill: var(--paper-38);
    flex: none;
    transition: fill .4s ease;
}

.channel:hover .channel__icon { fill: var(--paper); }

.channel__label { color: var(--paper-38); flex: none; }
.channel__value { justify-self: end; }
.channel__value { font-size: 1.02rem; letter-spacing: -.01em; transition: transform .5s var(--ease-out); }
.channel:hover .channel__value { transform: translateX(-6px); }

.channel__arrow { position: absolute; right: 0; opacity: 0; transform: translateX(-8px); transition: opacity .4s ease, transform .5s var(--ease-out); }
.channel:hover .channel__arrow { opacity: 1; transform: translateX(0); }

/* Form */
.contact__form { grid-column: 7 / span 6; }

.field { position: relative; margin-bottom: 2rem; }

.field label {
    position: absolute;
    left: 0; top: .85rem;
    color: var(--paper-38);
    font-family: var(--font-mono);
    font-size: .64rem;
    letter-spacing: .18em;
    text-transform: uppercase;
    pointer-events: none;
    transition: transform .45s var(--ease-out), color .3s ease;
    transform-origin: left top;
}

.field input,
.field textarea {
    width: 100%;
    background: none;
    border: 0;
    border-bottom: 1px solid var(--line-strong);
    padding: .85rem 0 .8rem;
    font-size: 1.02rem;
    letter-spacing: -.01em;
    resize: none;
    outline: none;
    transition: border-color .4s ease;
}

.field textarea { min-height: 120px; }

.field input:focus, .field textarea:focus { border-bottom-color: var(--paper); }

.field.is-filled label,
.field input:focus + label,
.field textarea:focus + label { transform: translateY(-1.5rem) scale(.92); color: var(--paper-80); }

/* Button */
.btn {
    --btn-fg: var(--paper);
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: .8rem;
    padding: 1.05rem 2rem;
    border: 1px solid var(--paper);
    border-radius: 999px;
    overflow: hidden;
    font-family: var(--font-mono);
    font-size: .66rem;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--btn-fg);
    isolation: isolate;
    transition: color .45s var(--ease-out);
}

.btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--paper);
    transform: translateY(101%);
    transition: transform .55s var(--ease-io);
    z-index: -1;
}

.btn:hover { color: var(--ink); }
.btn:hover::before { transform: translateY(0); }
.btn:disabled { opacity: .5; pointer-events: none; }

.form-note { margin-top: 1.2rem; min-height: 1.2rem; color: var(--paper-56); font-size: .85rem; }
.form-note.is-ok { color: var(--paper); }
.form-note.is-err { color: var(--paper-80); }

/* --------------------------------------------------------------------------
   17. Footer
   -------------------------------------------------------------------------- */
.footer { border-top: 1px solid var(--line); padding-block: 2.2rem; }

.footer__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.2rem;
    color: var(--paper-38);
}

.footer__socials { display: flex; gap: .6rem; }

/* Circular icon button — inverts to solid white on hover like everything else */
.social {
    width: 40px;
    height: 40px;
    border: 1px solid var(--line-strong);
    border-radius: 50%;
    display: grid;
    place-items: center;
    flex: none;
    transition: background .45s var(--ease-out), border-color .45s var(--ease-out);
}

.social svg {
    width: 16px;
    height: 16px;
    fill: var(--paper-56);
    transition: fill .45s var(--ease-out);
}

.social:hover { background: var(--paper); border-color: var(--paper); }
.social:hover svg { fill: var(--ink); }

.to-top { display: inline-flex; align-items: center; gap: .5rem; color: var(--paper-56); transition: color .3s ease; }
.to-top:hover { color: var(--paper); }

/* --------------------------------------------------------------------------
   18. Reveal primitives (JS toggles .is-in)
   -------------------------------------------------------------------------- */
/* Uses the standalone `translate` property, not `transform`. An element can
   then carry its own transform (the hero badge is centred with translateY(-50%))
   without the reveal's reset wiping it out. */
[data-reveal] { opacity: 0; translate: 0 28px; transition: opacity .9s var(--ease-out), translate 1s var(--ease-out); }
[data-reveal].is-in { opacity: 1; translate: none; }

[data-reveal-line] { display: block; overflow: hidden; }
[data-reveal-line] > * { display: block; transform: translateY(105%); transition: transform 1s var(--ease-out); }
[data-reveal-line].is-in > * { transform: none; }

.no-js [data-reveal] { opacity: 1; translate: none; }
.no-js [data-reveal-line] > * { opacity: 1; transform: none; }

/* --------------------------------------------------------------------------
   19. Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1100px) {
    /* Collapse the 12-column grids to a single track. Keeping 12 tracks and
       spanning all of them leaves 11 column gaps inside the container — in
       .contact__grid that was 11 x 40px of gap in a 350px shell, which pushed
       the whole layout viewport wider than the phone. */
    .about__grid,
    .expertise__grid,
    .work-card__body,
    .contact__grid { grid-template-columns: minmax(0, 1fr); }

    .about__statement, .about__aside,
    .expertise__index, .expertise__panels,
    .work-card__title, .work-card__desc,
    .contact__channels, .contact__form { grid-column: 1; }

    .expertise__index { position: static; }

    .stack__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .mini-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

    .process__head { grid-template-columns: minmax(0, 1fr); }
    .process__head h2, .process__head p { grid-column: 1; }

    .tl-row__when { grid-column: 1 / span 12; }
    .tl-row__what { grid-column: 1 / span 7; }
    .tl-row__detail { grid-column: 8 / span 5; }
}

@media (max-width: 860px) {
    .nav__links { display: none; }
    .burger { display: block; }

    .hero__meta { grid-template-columns: minmax(0, 1fr); }
    .hero__role, .hero__pitch, .hero__scroll { grid-column: 1; }
    .hero__scroll { justify-self: start; }
    .hero__aside { display: none; }   /* no room beside the title on phones */

    .tl-row { grid-template-columns: minmax(0, 1fr); }
    .tl-row__when, .tl-row__what, .tl-row__detail { grid-column: 1; }

    .tier-grid { grid-template-columns: minmax(0, 1fr); }
    .terms { grid-template-columns: minmax(0, 1fr); }
    .step { grid-template-columns: repeat(6, minmax(0, 1fr)); }
    .step__n { grid-column: 1 / span 1; }
    .step__title { grid-column: 2 / span 5; }
    .step__text { grid-column: 2 / span 5; }

    .work-card { position: relative; top: auto; }
    .work__list { gap: 1.25rem; }
}

@media (max-width: 560px) {
    .stack__grid { grid-template-columns: minmax(0, 1fr); }
    .stats { grid-template-columns: minmax(0, 1fr); }
    .mini-grid { grid-template-columns: minmax(0, 1fr); }
    .section-head { flex-direction: column; align-items: flex-start; gap: .6rem; }
    .channel { flex-direction: column; align-items: flex-start; gap: .3rem; }
}

/* --------------------------------------------------------------------------
   20. Reduced motion
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
    }
    .grain { animation: none; }
    [data-reveal] { opacity: 1 !important; translate: none !important; }
    [data-reveal-line] > * { opacity: 1 !important; transform: none !important; }
    .work-card { position: relative; top: auto; }
}
