/* =========================================================
   dkrotov.com — основные стили
   ========================================================= */

/* ---------- Шрифт Manrope (SIL OFL 1.1, см. assets/fonts/OFL.txt) ---------- */

@font-face {
    font-family: "Manrope";
    font-style: normal;
    font-display: swap;
    font-weight: 200 800;
    src: url("/assets/fonts/manrope-cyrillic-wght-normal.woff2") format("woff2-variations"),
         url("/assets/fonts/manrope-cyrillic-wght-normal.woff2") format("woff2");
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
    font-family: "Manrope";
    font-style: normal;
    font-display: swap;
    font-weight: 200 800;
    src: url("/assets/fonts/manrope-latin-wght-normal.woff2") format("woff2-variations"),
         url("/assets/fonts/manrope-latin-wght-normal.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    --bg: #0b0d12;
    --bg-2: #10131a;
    --surface: #141823;
    --surface-2: #1a1f2c;
    --border: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.16);
    --text: #e9ebf1;
    --text-muted: #98a1b3;
    --accent: #8b6cff;
    --accent-2: #22d3ee;
    --gradient: linear-gradient(120deg, var(--accent) 0%, var(--accent-2) 100%);

    --radius: 18px;
    --radius-sm: 10px;
    --container: 1160px;
    --gutter: 24px;
    --header-h: 72px;

    --font: "Manrope", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
    --ease: cubic-bezier(.2, .8, .2, 1);

    color-scheme: dark;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-h);
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 17px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

img, svg, canvas { display: block; max-width: 100%; }

a { color: inherit; }

h1, h2, h3 { margin: 0; line-height: 1.1; font-weight: 700; letter-spacing: -0.02em; }

p { margin: 0; }

ul, ol { margin: 0; padding: 0; list-style: none; }

:focus-visible {
    outline: 2px solid var(--accent-2);
    outline-offset: 3px;
    border-radius: 6px;
}

::selection { background: rgba(139, 108, 255, .4); }

.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.text-gradient {
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.text-muted { color: var(--text-muted); font-weight: 500; }

/* ---------- Кнопки ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 26px;
    border-radius: 999px;
    border: 1px solid transparent;
    background: var(--gradient);
    color: #0b0d12;
    font-family: inherit;
    font-weight: 600;
    font-size: 16px;
    text-decoration: none;
    cursor: pointer;
    transition: box-shadow .3s var(--ease), background-color .3s var(--ease), border-color .3s var(--ease);
    will-change: transform;
}

.btn:hover { box-shadow: 0 10px 40px -10px rgba(139, 108, 255, .7); }

.btn--ghost {
    background: rgba(255, 255, 255, .04);
    border-color: var(--border-strong);
    color: var(--text);
}

.btn--ghost:hover {
    background: rgba(255, 255, 255, .08);
    box-shadow: 0 10px 40px -14px rgba(34, 211, 238, .5);
}

.btn--small { padding: 9px 18px; font-size: 14px; }

.btn--icon {
    width: 56px;
    height: 56px;
    padding: 0;
    justify-content: center;
}

.btn--icon .icon { width: 22px; height: 22px; }

.icon { width: 20px; height: 20px; flex: none; }

/* ---------- Шапка ---------- */

.site-header {
    position: fixed;
    inset: 0 0 auto;
    z-index: 50;
    height: var(--header-h);
    display: flex;
    align-items: center;
    transition: background-color .3s, border-color .3s, backdrop-filter .3s;
    border-bottom: 1px solid transparent;
}

.site-header.is-scrolled,
.page-legal .site-header {
    background: rgba(11, 13, 18, .72);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom-color: var(--border);
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.logo {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    border: 1px solid var(--border-strong);
    font-weight: 800;
    font-size: 15px;
    text-decoration: none;
    background: var(--surface);
}

.nav { display: flex; gap: 32px; }

.nav a,
.link-back {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 15px;
    transition: color .2s;
}

.nav a:hover,
.link-back:hover { color: var(--text); }

/* ---------- Hero ---------- */

.hero {
    position: relative;
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    align-items: center;
    padding: calc(var(--header-h) + 40px) 0 100px;
    overflow: hidden;
    isolation: isolate;
}

.hero__field {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.hero::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 200px;
    background: linear-gradient(to bottom, transparent, var(--bg));
    z-index: -1;
    pointer-events: none;
}

.hero__content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(240px, 320px);
    align-items: center;
    gap: 64px;
}

.hero__text { grid-column: 1; grid-row: 1; min-width: 0; }

/* ---------- Фото ---------- */

.hero__photo {
    grid-column: 2;
    grid-row: 1;
    position: relative;
    margin: 0;
    perspective: 1000px;
}

.hero__photo::before {
    content: "";
    position: absolute;
    inset: 8% -6% -4%;
    border-radius: 50%;
    background: var(--gradient);
    filter: blur(70px);
    opacity: .35;
    z-index: -1;
}

.photo-frame {
    --x: 50%;
    --y: 50%;
    position: relative;
    padding: 2px;
    border-radius: 28px;
    background: linear-gradient(140deg, var(--accent), rgba(255, 255, 255, .08) 45%, var(--accent-2));
    box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .8);
    animation: float 7s ease-in-out infinite;
}

.photo-frame img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 26px;
}

/* Затемнение снизу и блик, следующий за курсором */
.photo-frame::after {
    content: "";
    position: absolute;
    inset: 2px;
    border-radius: 26px;
    background:
        radial-gradient(380px circle at var(--x) var(--y), rgba(255, 255, 255, .12), transparent 45%),
        linear-gradient(180deg, transparent 55%, rgba(11, 13, 18, .55));
    pointer-events: none;
}

@keyframes float {
    50% { translate: 0 -10px; }
}

.hero__title {
    font-size: clamp(48px, 10vw, 128px);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: .95;
}

.hero__title span { display: block; width: fit-content; }

.hero__roles {
    position: relative;
    min-height: 1.4em;
    line-height: 1.4;
    margin: 24px 0 20px;
    font-size: clamp(20px, 2.6vw, 28px);
    font-weight: 600;
    overflow: hidden;
}

.hero__role {
    position: absolute;
    left: 0;
    top: 0;
    white-space: nowrap;
    opacity: 0;
    transform: translateY(100%);
    transition: opacity .5s var(--ease), transform .5s var(--ease);
}

.hero__role--marketplace {
    position: relative;
    display: block;
    white-space: normal;
}

.hero__role.is-active { opacity: 1; transform: none; }

.hero__role.is-leaving { opacity: 0; transform: translateY(-100%); }

.hero__lead {
    max-width: 600px;
    color: var(--text-muted);
    font-size: clamp(16px, 1.6vw, 19px);
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 36px;
}

.hero__scroll {
    position: absolute;
    left: 50%;
    bottom: 32px;
    width: 26px;
    height: 42px;
    margin-left: -13px;
    border: 2px solid var(--border-strong);
    border-radius: 14px;
}

.hero__scroll span {
    position: absolute;
    left: 50%;
    top: 8px;
    width: 4px;
    height: 8px;
    margin-left: -2px;
    border-radius: 2px;
    background: var(--text-muted);
    animation: scroll-hint 1.8s var(--ease) infinite;
}

@keyframes scroll-hint {
    0% { opacity: 0; transform: translateY(0); }
    30% { opacity: 1; }
    100% { opacity: 0; transform: translateY(14px); }
}

/* ---------- Секции ---------- */

.section { padding: 120px 0; position: relative; }

.section__title {
    font-size: clamp(34px, 5vw, 56px);
    margin-bottom: 56px;
}

/* ---------- Цифры ---------- */

.section.section--stats { padding-bottom: 0; }

.stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 0;
}

.stat {
    padding: 28px 24px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: linear-gradient(180deg, var(--surface) 0%, var(--bg-2) 100%);
}

.stat__num {
    display: block;
    font-size: clamp(44px, 5vw, 64px);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.03em;
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-variant-numeric: tabular-nums;
}

.stat__num small {
    font-size: .38em;
    margin-left: 6px;
    letter-spacing: 0;
}

.stat__label {
    display: block;
    margin-top: 12px;
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.4;
}

/* ---------- Таймлайн ---------- */

.timeline {
    position: relative;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
    padding-top: 36px;
}

.timeline::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 7px;
    height: 2px;
    background: linear-gradient(90deg, var(--border-strong), var(--accent) 60%, var(--accent-2));
}

.timeline__item { position: relative; }

.timeline__item::before {
    content: "";
    position: absolute;
    top: -36px;
    left: 0;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--bg);
    border: 2px solid var(--accent);
}

.timeline__item--now::before {
    background: var(--accent-2);
    border-color: var(--accent-2);
    box-shadow: 0 0 0 6px rgba(34, 211, 238, .18);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    50% { box-shadow: 0 0 0 10px rgba(34, 211, 238, 0); }
}

.timeline__year {
    display: block;
    color: var(--accent-2);
    font-weight: 700;
    font-size: 14px;
    letter-spacing: .04em;
    margin-bottom: 8px;
}

.timeline__item h3 { font-size: 18px; margin-bottom: 8px; }

.timeline__item p { color: var(--text-muted); font-size: 14px; line-height: 1.5; }

/* ---------- Образование ---------- */

.edu {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 56px;
    padding: 22px 26px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: linear-gradient(90deg, rgba(139, 108, 255, .10), transparent 70%), var(--surface);
}

.edu__icon {
    flex: none;
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: rgba(139, 108, 255, .14);
    color: var(--accent);
}

.edu__icon svg { width: 28px; height: 28px; }

.edu__label {
    display: block;
    margin-bottom: 4px;
    color: var(--accent-2);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .04em;
}

.edu__title { font-size: clamp(16px, 1.8vw, 20px); font-weight: 600; line-height: 1.35; }

/* ---------- Навыки ---------- */

.skills {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    perspective: 1000px;
}

.card {
    --x: 50%;
    --y: 50%;
    position: relative;
    padding: 32px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    overflow: hidden;
    transform-style: preserve-3d;
    transition: border-color .3s;
}

.card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(420px circle at var(--x) var(--y), rgba(139, 108, 255, .16), transparent 45%);
    opacity: 0;
    transition: opacity .3s;
    pointer-events: none;
}

.card:hover { border-color: var(--border-strong); }

.card:hover::before { opacity: 1; }

.card__icon {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: rgba(139, 108, 255, .12);
    color: var(--accent);
    margin-bottom: 22px;
}

.card__icon svg { width: 26px; height: 26px; }

.card h3 { font-size: 24px; margin-bottom: 10px; }

.card p { color: var(--text-muted); margin-bottom: 22px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }

.chips li {
    padding: 6px 12px;
    border: 1px solid var(--border-strong);
    border-radius: 999px;
    font-size: 14px;
    background: rgba(255, 255, 255, .03);
}

/* ---------- Модули ---------- */

.section__lead {
    max-width: 640px;
    margin: -32px 0 48px;
    color: var(--text-muted);
    font-size: 18px;
}

.section__lead a { color: var(--text); text-decoration-color: var(--accent); text-underline-offset: 3px; }

.section__lead a:hover { color: var(--accent-2); }

.mcp {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
    padding: 40px;
    border: 1px solid var(--border-strong);
    border-radius: 24px;
    background:
        radial-gradient(600px circle at 0% 0%, rgba(139, 108, 255, .14), transparent 60%),
        radial-gradient(500px circle at 100% 100%, rgba(34, 211, 238, .10), transparent 60%),
        var(--surface);
    margin-bottom: 20px;
}

.mcp__badges { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }

.badge {
    padding: 4px 12px;
    border: 1px solid var(--border-strong);
    border-radius: 999px;
    font-size: 13px;
    color: var(--text-muted);
}

.badge--accent {
    border-color: transparent;
    background: var(--gradient);
    color: #0b0d12;
    font-weight: 600;
}

.mcp__title { font-size: clamp(28px, 3.4vw, 40px); margin-bottom: 14px; }

.mcp__text { color: var(--text-muted); margin-bottom: 20px; }

.mcp__features { display: grid; gap: 10px; margin-bottom: 28px; }

.mcp__features li {
    position: relative;
    padding-left: 26px;
    font-size: 15px;
    line-height: 1.5;
}

.mcp__features li::before {
    content: "";
    position: absolute;
    left: 0;
    top: .45em;
    width: 14px;
    height: 8px;
    border-left: 2px solid var(--accent-2);
    border-bottom: 2px solid var(--accent-2);
    transform: rotate(-45deg);
}

.mcp__links { display: flex; flex-wrap: wrap; gap: 12px; }

.terminal {
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    background: #07080c;
    overflow: hidden;
    font-family: "JetBrains Mono", "Cascadia Code", Consolas, "SFMono-Regular", Menlo, monospace;
    font-size: 14px;
    line-height: 1.6;
    box-shadow: 0 30px 80px -30px rgba(139, 108, 255, .45);
}

.terminal__bar {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    background: rgba(255, 255, 255, .03);
}

.terminal__bar i {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: #ff5f57;
}

.terminal__bar i:nth-child(2) { background: #febc2e; }

.terminal__bar i:nth-child(3) { background: #28c840; }

.terminal__bar span { margin-left: 10px; color: var(--text-muted); font-size: 12px; }

.terminal__body { padding: 20px; min-height: 230px; }

.terminal__line { margin-bottom: 12px; color: #d6dae4; word-break: break-word; }

.terminal__line > span:first-child {
    display: inline-block;
    min-width: 54px;
    margin-right: 6px;
    font-weight: 700;
}

.t-user { color: var(--accent); }

.t-tool { color: #febc2e; }

.t-ok { color: #3ddc97; }

.t-agent { color: var(--accent-2); }

.terminal__line.is-typing::after {
    content: "";
    display: inline-block;
    width: 8px;
    height: 1.1em;
    margin-left: 2px;
    vertical-align: text-bottom;
    background: var(--accent-2);
    animation: blink 1s steps(1) infinite;
}

@keyframes blink { 50% { opacity: 0; } }

.modules {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    perspective: 1000px;
}

.module {
    --x: 50%;
    --y: 50%;
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    text-decoration: none;
    overflow: hidden;
    transition: border-color .3s;
}

.module::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(300px circle at var(--x) var(--y), rgba(34, 211, 238, .14), transparent 50%);
    opacity: 0;
    transition: opacity .3s;
    pointer-events: none;
}

.module:hover { border-color: var(--border-strong); }

.module:hover::before { opacity: 1; }

.module__stat {
    align-self: flex-start;
    margin-bottom: 18px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .03em;
    color: var(--accent-2);
}

.module h3 { font-size: 20px; margin-bottom: 8px; }

.module p { color: var(--text-muted); font-size: 15px; line-height: 1.5; flex: 1; }

.module__more {
    margin-top: 20px;
    font-size: 14px;
    color: var(--text-muted);
    transition: color .2s;
}

.module:hover .module__more { color: var(--text); }

.modules-more { margin-top: 24px; }

.modules-more__summary {
    display: flex;
    width: fit-content;
    margin-inline: auto;
}

.modules-more__summary::-webkit-details-marker { display: none; }

.modules-more__summary::after {
    content: "";
    width: 8px;
    height: 8px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateY(-2px) rotate(45deg);
}

.modules-more[open] .modules-more__summary::after { transform: translateY(2px) rotate(225deg); }

.modules-more:not([open]) > .modules,
.modules-more:not([open]) .modules-more__hide,
.modules-more[open] .modules-more__show { display: none; }

.modules-more .modules { margin-top: 24px; }

.quote {
    margin: 48px 0 0;
    padding-left: 24px;
    border-left: 3px solid var(--accent);
}

.quote blockquote {
    margin: 0 0 8px;
    font-size: clamp(20px, 2.4vw, 26px);
    font-weight: 600;
    line-height: 1.35;
}

.quote figcaption { color: var(--text-muted); font-size: 14px; }

/* ---------- Крупные проекты ---------- */

.projects {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
    perspective: 1000px;
}

.project {
    --x: 50%;
    --y: 50%;
    position: relative;
    grid-column: span 2;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 28px;
    min-height: 180px;
    padding: 28px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    overflow: hidden;
    transition: border-color .3s;
}

.project::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(360px circle at var(--x) var(--y), rgba(139, 108, 255, .16), transparent 50%);
    opacity: 0;
    transition: opacity .3s;
    pointer-events: none;
}

.project:hover { border-color: var(--border-strong); }

.project:hover::before { opacity: 1; }

.project--lead {
    grid-column: span 3;
    min-height: 240px;
    border-color: rgba(139, 108, 255, .35);
    background:
        radial-gradient(500px circle at 100% 0%, rgba(139, 108, 255, .14), transparent 60%),
        var(--surface);
}

.project__meta {
    display: flex;
    align-items: baseline;
    gap: 12px;
}

.project__role {
    padding: 4px 12px;
    border: 1px solid var(--border-strong);
    border-radius: 999px;
    font-size: 13px;
    color: var(--text-muted);
}

.project__role--lead {
    border-color: transparent;
    background: var(--gradient);
    color: #0b0d12;
    font-weight: 600;
}

.project__period {
    margin-inline-start: auto;
    color: var(--text-muted);
    font-size: 13px;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.project__name {
    font-size: clamp(22px, 2.4vw, 30px);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.15;
}

.project--lead .project__name { font-size: clamp(28px, 3.4vw, 44px); }

.project__name a {
    text-decoration-color: var(--accent);
    text-decoration-thickness: 1px;
    text-underline-offset: .16em;
}

.project__name a:hover { color: var(--accent-2); }

.project__note { margin-top: 8px; color: var(--text-muted); font-size: 15px; }

.project__body { flex: 1; }

.project__partner {
    color: rgba(152, 161, 179, .6);
    font-size: 13px;
}

.project__partner a {
    color: inherit;
    text-decoration: underline;
    text-decoration-color: rgba(152, 161, 179, .3);
    text-underline-offset: 3px;
    transition: color .2s, text-decoration-color .2s;
}

.project__partner a:hover { color: var(--text); text-decoration-color: var(--accent); }

/* ---------- Отзывы ---------- */

.video-review {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(240px, 1fr);
    gap: 40px;
    align-items: center;
    margin: 0;
}

.video-review__player {
    position: relative;
    padding: 2px;
    border-radius: 24px;
    background: linear-gradient(140deg, var(--accent), rgba(255, 255, 255, .08) 45%, var(--accent-2));
    box-shadow: 0 40px 80px -30px rgba(139, 108, 255, .45);
}

.video-review video {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    border-radius: 22px;
    background: #000;
    object-fit: cover;
}

.video-review__play {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 88px;
    height: 88px;
    margin: -44px 0 0 -44px;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: var(--gradient);
    color: #0b0d12;
    cursor: pointer;
    box-shadow: 0 0 0 10px rgba(139, 108, 255, .2), 0 20px 50px -10px rgba(0, 0, 0, .7);
    transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}

.video-review__play:not([hidden]) { display: grid; }

.video-review__play svg { width: 34px; height: 34px; margin-left: 4px; }

.video-review__play:hover {
    transform: scale(1.08);
    box-shadow: 0 0 0 16px rgba(139, 108, 255, .18), 0 20px 50px -10px rgba(0, 0, 0, .7);
}

.video-review__label {
    display: block;
    margin-bottom: 14px;
    color: var(--accent-2);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .04em;
}

.video-review__quote {
    margin: 0 0 22px;
    padding-inline-start: 16px;
    border-inline-start: 3px solid var(--accent);
    font-size: clamp(17px, 1.6vw, 22px);
    font-weight: 600;
    line-height: 1.55;
}

.video-review__name { font-size: 20px; font-weight: 800; line-height: 1.2; }

.video-review__role { margin-top: 4px; color: var(--text-muted); font-size: 15px; line-height: 1.45; }

.reviews-proof {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px 28px;
    margin-top: 32px;
    padding: 20px 24px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.reviews-proof h3 { font-size: 17px; font-weight: 700; }

.fl-badge {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    padding: 12px 18px 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    text-decoration: none;
    transition: border-color .3s;
}

.fl-badge:hover { border-color: var(--border-strong); }

.fl-badge__score { font-size: 26px; font-weight: 800; line-height: 1; }

.fl-badge__text { display: flex; flex-direction: column; gap: 2px; color: var(--text-muted); font-size: 13px; }

.fl-badge__stars { color: #febc2e; font-size: 13px; letter-spacing: 2px; }

/* ---------- Контакты ---------- */

.contact { padding-bottom: 140px; }

.contact::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 40%;
    width: 700px;
    height: 400px;
    max-width: 100%;
    transform: translate(-50%, -50%);
    background: radial-gradient(closest-side, rgba(139, 108, 255, .18), transparent);
    pointer-events: none;
}

.contact__inner { position: relative; text-align: center; }

.contact__title { font-size: clamp(40px, 7vw, 84px); letter-spacing: -0.04em; }

.contact__lead {
    max-width: 520px;
    margin: 24px auto 48px;
    color: var(--text-muted);
}

.contact__links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 340px));
    justify-content: center;
    gap: 20px;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 22px 24px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    background: var(--surface);
    text-decoration: none;
    text-align: left;
    transition: border-color .3s, background-color .3s;
    will-change: transform;
}

.contact-link:hover { border-color: var(--accent); background: var(--surface-2); }

.contact-link__icon {
    flex: none;
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--gradient);
    color: #0b0d12;
}

.contact-link__icon svg { width: 24px; height: 24px; }

.contact-link__text { display: flex; flex-direction: column; flex: 1; min-width: 0; }

.contact-link__name { font-weight: 700; font-size: 19px; }

.contact-link__handle { color: var(--text-muted); font-size: 14px; }

.contact-link__arrow {
    font-size: 22px;
    color: var(--text-muted);
    transition: transform .3s var(--ease), color .3s;
}

.contact-link:hover .contact-link__arrow { transform: translateX(4px); color: var(--text); }

/* ---------- Подвал ---------- */

.site-footer {
    border-top: 1px solid var(--border);
    padding: 28px 0;
    color: var(--text-muted);
    font-size: 14px;
}

.site-footer__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 24px;
}

.site-footer__links { display: flex; flex-wrap: wrap; gap: 8px 24px; }

.site-footer a { text-decoration: none; transition: color .2s; }

.site-footer a:hover { color: var(--text); }

/* ---------- Юридические страницы ---------- */

.legal {
    max-width: 820px;
    padding-top: calc(var(--header-h) + 56px);
    padding-bottom: 96px;
}

.legal h1 { font-size: clamp(30px, 5vw, 46px); margin-bottom: 32px; }

.legal h2 {
    font-size: 22px;
    margin: 44px 0 16px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.legal p,
.legal li { color: #c5cad6; margin-bottom: 12px; }

.legal ul { list-style: disc; padding-left: 22px; margin-bottom: 12px; }

.legal a { color: var(--accent-2); }

.legal__date { margin-top: 48px; color: var(--text-muted); font-style: italic; text-align: right; }

.legal__date strong { color: var(--text); font-style: normal; }

/* ---------- Cookie-баннер ---------- */

.cookie {
    position: fixed;
    left: 50%;
    bottom: 20px;
    z-index: 100;
    width: calc(100% - 32px);
    max-width: 760px;
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 18px 20px 18px 24px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    background: rgba(20, 24, 35, .92);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 20px 60px -20px rgba(0, 0, 0, .8);
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-muted);
    transform: translate(-50%, 0);
    animation: cookie-in .6s var(--ease) both;
}

.cookie a { color: var(--text); }

.cookie a:hover { color: var(--accent-2); }

.cookie .btn {
    flex: none;
    transition: box-shadow .5s ease, filter .5s ease, transform .5s ease;
}

.cookie .btn:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
    box-shadow: 0 8px 28px -10px rgba(139, 108, 255, .6);
}

.cookie .btn:active {
    transform: translateY(0);
    transition-duration: .15s;
}

.cookie.is-hiding {
    opacity: 0;
    transform: translate(-50%, 20px);
    transition: opacity .3s, transform .3s;
}

@keyframes cookie-in {
    from { opacity: 0; transform: translate(-50%, 30px); }
}

/* ---------- Эффекты: свечение за курсором ---------- */

.glow { display: none; }

@media (hover: hover) and (pointer: fine) {
    .glow {
        display: block;
        position: fixed;
        inset: 0;
        z-index: -2;
        pointer-events: none;
        background: radial-gradient(600px circle at var(--mx, 50%) var(--my, 30%), rgba(139, 108, 255, .08), transparent 60%);
    }
}

/* ---------- Появление при скролле ---------- */

.reveal.is-awaiting-reveal {
    opacity: .25;
    translate: 0 18px;
}

.reveal.is-revealing {
    animation: reveal-in .65s var(--ease) backwards;
}

@keyframes reveal-in {
    from { opacity: .25; translate: 0 18px; }
    to { opacity: 1; translate: 0 0; }
}

/* ---------- Адаптив ---------- */

@media (max-width: 960px) {
    .hero__content { grid-template-columns: minmax(0, 1fr) 220px; gap: 40px; }

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

    .mcp { grid-template-columns: 1fr; gap: 32px; }

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

    .projects { grid-template-columns: repeat(2, 1fr); }

    .video-review { grid-template-columns: 1fr; gap: 24px; }

    .project { grid-column: auto; }

    .project--lead { grid-column: span 2; }

    .project:last-child:nth-child(odd) { grid-column: span 2; }

    .timeline {
        grid-template-columns: 1fr;
        gap: 28px;
        padding-top: 0;
        padding-left: 36px;
    }

    .timeline::before {
        left: 7px;
        right: auto;
        top: 0;
        bottom: 0;
        width: 2px;
        height: auto;
        background: linear-gradient(180deg, var(--border-strong), var(--accent) 60%, var(--accent-2));
    }

    .timeline__item::before { top: 4px; left: -36px; }

    .timeline__item p { font-size: 15px; }
}

@media (max-width: 760px) {
    :root { --gutter: 16px; --header-h: 64px; }

    body { font-size: 16px; }

    .nav { display: none; }

    .section { padding: 80px 0; }

    .section__title { margin-bottom: 36px; }

    .skills { grid-template-columns: 1fr; }

    .card { padding: 24px; }

    .section__lead { margin: -20px 0 32px; font-size: 16px; }

    .mcp { padding: 24px 20px; border-radius: var(--radius); }

    .terminal { font-size: 13px; }

    .terminal__body { padding: 16px; min-height: 0; }

    .projects { grid-template-columns: 1fr; gap: 14px; }

    .project,
    .project--lead,
    .project:last-child:nth-child(odd) { grid-column: auto; min-height: 0; padding: 24px; }

    .video-review__play { width: 60px; height: 60px; margin: -30px 0 0 -30px; box-shadow: 0 0 0 6px rgba(139, 108, 255, .2); }

    .video-review__play svg { width: 24px; height: 24px; margin-left: 3px; }

    .video-review__player { border-radius: 18px; }

    .video-review video { border-radius: 16px; }

    .video-review video::cue { font-size: 14px; }

    .reviews-proof { padding: 18px; }

    .contact__links { grid-template-columns: 1fr; }

    .cookie {
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
        bottom: 12px;
        padding: 16px;
    }

    .cookie .btn { justify-content: center; }

    .hero__actions .btn { flex: 1; justify-content: center; }

    .hero__actions .btn--icon { flex: none; }

    .hero__actions { flex-wrap: nowrap; gap: 10px; }

    .hero__content { grid-template-columns: 1fr; gap: 24px; }

    .hero__text,
    .hero__photo { grid-column: 1; grid-row: auto; }

    .hero__photo { width: 112px; }

    .hero__photo::before { filter: blur(30px); opacity: .45; }

    .photo-frame { padding: 3px; border-radius: 50%; animation: none; }

    .photo-frame img {
        aspect-ratio: 1;
        object-fit: cover;
        object-position: 50% 22%;
        border-radius: 50%;
    }

    .photo-frame::after { inset: 3px; border-radius: 50%; background: none; }
}

@media (max-width: 600px) {
    .modules { grid-template-columns: 1fr; }
}

@media (max-width: 420px) {
    .stats { gap: 10px; }

    .stat { padding: 20px 16px; }

    .stat__num { font-size: 40px; }

    .stat__label { font-size: 13px; }


    .cookie { font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }

    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }

    .glow { display: none; }

    .reveal.is-awaiting-reveal {
        opacity: 1;
        translate: none;
    }
}

.nowrap { white-space: nowrap; }


/* ---------- Страница 404 ---------- */

.notfound { text-align: center; }

.notfound__code {
    font-size: clamp(120px, 24vw, 260px);
    font-weight: 800;
    line-height: .9;
    letter-spacing: -0.06em;
    margin: 0 auto 12px;
    width: fit-content;
}

.notfound__title { font-size: clamp(28px, 4vw, 44px); margin-bottom: 16px; }

.notfound__text { max-width: 460px; margin: 0 auto 36px; color: var(--text-muted); }
