/* ============================================================
   Портфолио — тёмная «студийная» тема
   Токены → база → компоненты → движение → адаптив
   ============================================================ */

/* ---------- 1. Токены ---------- */

:root {
    /* Тёплый почти-чёрный вместо синевато-серого: тепло — это то,
       что отличает «дорого» от «терминал хакера». Акцент — латунь. */
    --ink:         #0c0b0a;
    --ink-2:       #100e0c;
    --surface:     #15130f;
    --surface-2:   #1c1916;
    --border:      #2a2621;
    --border-lit:  #3a352d;
    --text:        #f2eee7;
    --muted:       #a89f92;
    --faint:       #8f8779;  /* 5.53:1 на --ink — WCAG AA */
    --brass:       #c9a76a;
    --brass-lit:   #e6cf9c;
    --brass-soft:  rgba(201, 167, 106, 0.12);
    --ok:          #7bc49a;
    --err:         #e88a7d;
    --ok-soft:     rgba(123, 196, 154, 0.10);
    --err-soft:    rgba(232, 138, 125, 0.10);

    /* Шрифты: Unbounded — характерный дисплейный (кириллица есть),
       строго для крупных заголовков. Manrope — текст. Mono — данные. */
    --font-display: 'Unbounded', 'Manrope', system-ui, sans-serif;
    --font-sans:    'Manrope', system-ui, -apple-system, sans-serif;
    --font-mono:    'JetBrains Mono', ui-monospace, monospace;

    --fs-xs:   0.8125rem;
    --fs-sm:   0.9375rem;
    --fs-base: 1.0625rem;
    --fs-lg:   clamp(1.125rem, 0.4vw + 1.02rem, 1.3rem);
    --fs-xl:   clamp(1.35rem, 1.2vw + 1rem,  1.75rem);
    --fs-2xl:  clamp(1.8rem,  2.4vw + 1rem,  2.75rem);
    --fs-3xl:  clamp(2.4rem,  5.5vw + 1rem, 4.75rem);
    --fs-mega: clamp(3rem,    11vw,         9rem);

    --lh-tight: 1.05;
    --lh-snug:  1.25;
    --lh-body:  1.65;
    --track-wide: 0.16em;
    --measure: 62ch;

    --sp-1: 0.25rem;  --sp-2: 0.5rem;   --sp-3: 0.75rem;
    --sp-4: 1rem;     --sp-5: 1.5rem;   --sp-6: 2rem;
    --sp-7: 2.5rem;   --sp-8: 3rem;     --sp-9: 4rem;
    --sp-10: 5.5rem;  --sp-11: 7rem;    --sp-12: 9rem;

    --section-gap: clamp(5rem, 10vw, 9rem);
    --gutter:      clamp(1.25rem, 5vw, 4rem);
    --maxw:        78rem;

    --radius:    14px;
    --radius-sm: 8px;
    --hairline:  1px;
    --ease:      cubic-bezier(0.4, 0, 0.2, 1);
    --ease-out:  cubic-bezier(0.16, 1, 0.3, 1);
    --t:         220ms var(--ease);
    --header-h:  4.5rem;
}

/* ---------- 2. База ---------- */

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

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

body {
    font-family: var(--font-sans);
    font-size: var(--fs-base);
    line-height: var(--lh-body);
    background: var(--ink);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5 { line-height: var(--lh-tight); font-weight: 700; text-wrap: balance; }
p { text-wrap: pretty; }
a { color: inherit; text-decoration: none; transition: color var(--t); }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; border-radius: var(--radius-sm); }
::selection { background: var(--brass); color: var(--ink); }

.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }

.skip-link {
    position: absolute; left: var(--sp-4); top: var(--sp-4); z-index: 200;
    padding: var(--sp-3) var(--sp-5);
    background: var(--brass); color: var(--ink);
    font-weight: 700; border-radius: var(--radius-sm);
    transform: translateY(-200%); transition: transform var(--t);
}
.skip-link:focus { transform: translateY(0); }

/* ---------- 3. Курсор и прогресс ---------- */

.cursor, .cursor-ring {
    position: fixed; top: 0; left: 0; z-index: 300;
    pointer-events: none; border-radius: 50%;
    opacity: 0;
}
.cursor      { width: 6px;  height: 6px;  background: var(--brass); }
.cursor-ring { width: 34px; height: 34px; border: var(--hairline) solid var(--border-lit); }

.progress {
    position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 150;
    background: var(--brass); transform: scaleX(0); transform-origin: left;
}

/* ---------- 4. Шапка ---------- */

.site-header {
    position: sticky; top: 0; z-index: 100;
    height: var(--header-h);
    display: flex; align-items: center;
    background: color-mix(in srgb, var(--ink) 78%, transparent);
    backdrop-filter: blur(16px) saturate(140%);
    border-bottom: var(--hairline) solid transparent;
    transition: border-color var(--t), background var(--t);
}
.site-header.is-stuck { border-bottom-color: var(--border); }

.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-5); }

.brand {
    font-family: var(--font-mono);
    font-size: var(--fs-xs); font-weight: 500;
    letter-spacing: var(--track-wide); text-transform: uppercase;
    white-space: nowrap;
    /* min-width:0 обязателен: без него длинное ФИО в nowrap
       не даёт flex-элементу сжаться и выталкивает кнопку за экран. */
    min-width: 0; overflow: hidden; text-overflow: ellipsis;
}
.brand b { color: var(--brass); font-weight: 500; }
.brand-short { display: none; }
.brand:hover { color: var(--brass); }

.nav { display: flex; gap: var(--sp-5); font-size: var(--fs-sm); color: var(--muted); }
.nav a { position: relative; padding-block: var(--sp-1); white-space: nowrap; }
.nav a::after {
    content: ''; position: absolute; left: 0; bottom: -2px;
    width: 100%; height: 1px; background: var(--brass);
    transform: scaleX(0); transform-origin: left; transition: transform var(--t);
}
.nav a:hover { color: var(--text); }
.nav a:hover::after, .nav a.is-active::after { transform: scaleX(1); }
.nav a.is-active { color: var(--text); }

.nav-cta { display: inline-flex; }

.header-actions { display: flex; align-items: center; gap: var(--sp-4); flex-shrink: 0; }

/* Бургер — только на узких экранах */
.burger {
    display: none;
    width: 2.5rem; height: 2.5rem;
    flex-direction: column; justify-content: center; align-items: center; gap: 6px;
    border: var(--hairline) solid var(--border); border-radius: 50%;
}
.burger span {
    display: block; width: 15px; height: 1.5px; background: var(--text);
    transition: transform var(--t), opacity var(--t);
}
.burger[aria-expanded="true"] span:first-child { transform: translateY(3.75px) rotate(45deg); }
.burger[aria-expanded="true"] span:last-child  { transform: translateY(-3.75px) rotate(-45deg); }

.mobile-nav {
    position: fixed; inset: var(--header-h) 0 0 0; z-index: 90;
    background: color-mix(in srgb, var(--ink) 96%, transparent);
    backdrop-filter: blur(20px);
    display: grid; place-items: center;
}
.mobile-nav[hidden] { display: none; }
.mobile-nav nav { display: flex; flex-direction: column; gap: var(--sp-6); text-align: center; }
.mobile-nav a {
    font-family: var(--font-display); font-weight: 600;
    font-size: clamp(1.6rem, 7vw, 2.4rem); letter-spacing: -0.03em;
}
.mobile-nav a:hover { color: var(--brass); }

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

main { counter-reset: section; }

.section { padding-block: var(--section-gap); counter-increment: section; position: relative; }
.section + .section { border-top: var(--hairline) solid var(--border); }

.section-head { margin-bottom: var(--sp-9); }

.eyebrow {
    display: inline-flex; align-items: center; gap: var(--sp-3);
    font-family: var(--font-mono); font-size: var(--fs-xs);
    letter-spacing: var(--track-wide); text-transform: uppercase;
    color: var(--brass); margin-bottom: var(--sp-4);
}
.eyebrow::before {
    content: counter(section, decimal-leading-zero);
    padding-right: var(--sp-3); border-right: var(--hairline) solid var(--border-lit);
    color: var(--faint);
}

.section-title {
    font-family: var(--font-display);
    font-size: var(--fs-2xl); font-weight: 600;
    letter-spacing: -0.03em;
}

.section-sub { max-width: var(--measure); color: var(--muted); font-size: var(--fs-lg); margin-top: var(--sp-4); }

/* ---------- 6. Hero ---------- */

.hero { position: relative; padding-block: clamp(4rem, 11vw, 8rem) var(--section-gap); overflow: hidden; }

.hero::before {
    content: ''; position: absolute; inset: -30% 40% 30% -20%;
    background: radial-gradient(closest-side, var(--brass-soft), transparent 70%);
    pointer-events: none;
}

.hero > * { position: relative; }

.hero-status {
    display: inline-flex; align-items: center; gap: var(--sp-3);
    font-family: var(--font-mono); font-size: var(--fs-xs);
    letter-spacing: var(--track-wide); text-transform: uppercase;
    color: var(--muted); margin-bottom: var(--sp-6);
    padding: var(--sp-2) var(--sp-4);
    border: var(--hairline) solid var(--border); border-radius: 100px;
}
.hero-status::before {
    content: ''; width: 6px; height: 6px; border-radius: 50%;
    background: var(--ok); animation: pulse 2.4s ease-out infinite;
}
@keyframes pulse {
    0%   { box-shadow: 0 0 0 0 rgba(123, 196, 154, 0.5); }
    70%  { box-shadow: 0 0 0 8px rgba(123, 196, 154, 0); }
    100% { box-shadow: 0 0 0 0 rgba(123, 196, 154, 0); }
}

.hero-title {
    font-family: var(--font-display);
    font-size: var(--fs-3xl); font-weight: 600;
    letter-spacing: -0.045em; line-height: 1.02;
    margin-bottom: var(--sp-6); max-width: 20ch;
}
.hero-title em { font-style: normal; color: var(--brass); }

.hero-lede { max-width: var(--measure); color: var(--muted); font-size: var(--fs-lg); margin-bottom: var(--sp-8); }

.hero-actions { display: flex; flex-wrap: wrap; gap: var(--sp-4); align-items: center; }

.hero-name {
    font-family: var(--font-mono); font-size: var(--fs-xs);
    letter-spacing: var(--track-wide); text-transform: uppercase;
    color: var(--faint); margin-bottom: var(--sp-5);
}

/* ---------- 7. Бегущая строка ---------- */

.marquee {
    border-block: var(--hairline) solid var(--border);
    padding-block: var(--sp-5);
    overflow: hidden;
    display: flex;
    user-select: none;
}
.marquee-row { display: flex; flex-shrink: 0; gap: var(--sp-8); padding-right: var(--sp-8); }
.marquee-item {
    font-family: var(--font-display); font-weight: 600;
    font-size: clamp(1.1rem, 2.2vw, 1.9rem);
    letter-spacing: -0.02em; color: var(--faint);
    display: inline-flex; align-items: center; gap: var(--sp-8);
    white-space: nowrap;
}
.marquee-item::after { content: '✦'; font-size: 0.5em; color: var(--brass); }

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

.stats { display: grid; gap: var(--sp-6); grid-template-columns: repeat(auto-fit, minmax(min(14rem, 100%), 1fr)); }

.stat { border-top: 2px solid var(--border); padding-top: var(--sp-5); }
.stat-num {
    font-family: var(--font-display); font-weight: 600;
    font-size: clamp(2.5rem, 5vw, 4rem); line-height: 1;
    letter-spacing: -0.04em; color: var(--brass);
    display: block; margin-bottom: var(--sp-3);
}
.stat-label { color: var(--text); font-weight: 600; display: block; margin-bottom: var(--sp-2); }
.stat-note { color: var(--muted); font-size: var(--fs-sm); }

/* ---------- 9. Что входит (стек) ---------- */

.stack { display: grid; gap: var(--hairline); background: var(--border); border: var(--hairline) solid var(--border); border-radius: var(--radius); overflow: hidden; }

.layer {
    background: var(--ink-2);
    padding: var(--sp-6);
    display: grid; grid-template-columns: 3.5rem 1fr; gap: var(--sp-5);
    align-items: start;
    transition: background var(--t);
}
.layer:hover { background: var(--surface-2); }

.layer-num { font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--brass); padding-top: 0.35em; }
.layer-title { font-size: var(--fs-lg); margin-bottom: var(--sp-2); }
.layer-desc { color: var(--muted); font-size: var(--fs-sm); max-width: var(--measure); }

/* ---------- 10. Работы ---------- */

.works { display: flex; flex-direction: column; gap: var(--sp-12); }

.work { display: grid; gap: var(--sp-6) var(--sp-8); grid-template-columns: 1fr 1fr; align-items: center; }
.work:nth-child(even) .work-visual { order: 2; }

.work-visual {
    position: relative; overflow: hidden;
    border: var(--hairline) solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    aspect-ratio: 16 / 10;
    transition: border-color var(--t);
}
.work:hover .work-visual { border-color: var(--border-lit); }

/* <picture> — инлайновый элемент. Без display:contents картинка меряла бы
   height:100% от него, а не от .work-visual с её aspect-ratio, и схлопнулась. */
.work-visual picture { display: contents; }
.detail-cover picture { display: block; }
.detail-cover img { display: block; width: 100%; height: auto; }

/* Запас под параллакс даёт scale, а не height: при height > 100%
   object-fit: cover срезал бы картинку по бокам. */
.work-visual img {
    width: 100%; height: 100%;
    object-fit: cover; object-position: top center;
    transform: scale(1.12);
    will-change: transform;
}

/* Заглушка для проектов без скриншота (закрыты логином) */
.work-ph {
    position: absolute; inset: 0;
    display: grid; place-items: center; gap: var(--sp-4);
    background:
        repeating-linear-gradient(45deg, transparent 0 10px, rgba(201,167,106,0.03) 10px 20px),
        var(--surface);
    color: var(--faint); text-align: center; padding: var(--sp-6);
}
.work-ph i { font-size: 2rem; color: var(--brass); }
.work-ph span { font-family: var(--font-mono); font-size: var(--fs-xs); letter-spacing: var(--track-wide); }

.work-industry {
    display: inline-block;
    font-family: var(--font-mono); font-size: var(--fs-xs);
    letter-spacing: var(--track-wide); text-transform: uppercase;
    color: var(--brass);
}

/* Отрасль и моя роль стоят рядом: клиент сразу видит, писал я сайт
   или веду чужой. Приписывать себе чужую разработку — плохая продажа. */
.work-meta {
    display: flex; flex-wrap: wrap; align-items: center;
    gap: var(--sp-3); margin-bottom: var(--sp-4);
}

.work-role {
    font-family: var(--font-mono); font-size: var(--fs-xs);
    letter-spacing: var(--track-wide); text-transform: uppercase;
    padding: 0.25em 0.7em; border-radius: 999px;
    border: 1px solid currentColor;
}
.work-role--dev { color: var(--brass); }
.work-role--support { color: var(--faint); }

.work-title {
    font-family: var(--font-display); font-weight: 600;
    font-size: var(--fs-2xl); letter-spacing: -0.035em;
    margin-bottom: var(--sp-4);
}
.work-title a:hover { color: var(--brass); }

.work-desc { color: var(--muted); margin-bottom: var(--sp-6); max-width: var(--measure); }

.work-tech { display: flex; flex-wrap: wrap; gap: var(--sp-3); margin-bottom: var(--sp-6); }

.work-links { display: flex; flex-wrap: wrap; gap: var(--sp-5); align-items: center; }

/* ---------- 11. Кнопки, теги ---------- */

.btn {
    position: relative;
    display: inline-flex; align-items: center; gap: var(--sp-3);
    padding: var(--sp-4) var(--sp-6);
    border-radius: 100px;
    border: var(--hairline) solid var(--brass);
    background: var(--brass); color: var(--ink);
    font-weight: 700; font-size: var(--fs-sm);
    transition: background var(--t), border-color var(--t), color var(--t);
    will-change: transform;
}
.btn:hover { background: var(--brass-lit); border-color: var(--brass-lit); }

.btn-ghost { background: none; color: var(--text); border-color: var(--border-lit); }
.btn-ghost:hover { background: var(--surface-2); border-color: var(--brass); color: var(--brass); }

.btn-sm { padding: var(--sp-2) var(--sp-5); font-size: var(--fs-xs); }

.link-arrow { display: inline-flex; align-items: center; gap: var(--sp-2); font-size: var(--fs-sm); color: var(--muted); }
.link-arrow i { transition: transform var(--t); }
.link-arrow:hover { color: var(--brass); }
.link-arrow:hover i { transform: translate(3px, -3px); }

.tag-list { display: flex; flex-wrap: wrap; gap: var(--sp-3); }
.tag {
    font-family: var(--font-mono); font-size: var(--fs-xs);
    padding: var(--sp-2) var(--sp-4);
    border: var(--hairline) solid var(--border); border-radius: 100px;
    color: var(--muted); transition: border-color var(--t), color var(--t);
}
.tag:hover { border-color: var(--brass); color: var(--text); }

/* ---------- 12. Услуги ---------- */

.services { display: grid; gap: var(--sp-5); grid-template-columns: repeat(auto-fit, minmax(min(18rem, 100%), 1fr)); }

.service {
    padding: var(--sp-7) var(--sp-6);
    border: var(--hairline) solid var(--border); border-radius: var(--radius);
    background: var(--ink-2);
    display: flex; flex-direction: column; gap: var(--sp-3);
    transition: border-color var(--t), background var(--t), transform var(--t);
}
.service:hover { border-color: var(--border-lit); background: var(--surface); }

.service-icon { font-size: 1.5rem; color: var(--brass); margin-bottom: var(--sp-2); }
.service-title { font-size: var(--fs-lg); }
.service-desc { color: var(--muted); font-size: var(--fs-sm); flex: 1; }
.service-price {
    font-family: var(--font-mono); font-size: var(--fs-sm); color: var(--brass);
    padding-top: var(--sp-4); border-top: var(--hairline) solid var(--border); margin-top: var(--sp-2);
}

/* ---------- 13. Резюме ---------- */

.resume-grid { display: grid; gap: var(--sp-9) var(--sp-8); grid-template-columns: repeat(auto-fit, minmax(min(20rem, 100%), 1fr)); }
.timeline-title {
    font-family: var(--font-mono); font-size: var(--fs-xs); font-weight: 500;
    letter-spacing: var(--track-wide); text-transform: uppercase;
    color: var(--faint); margin-bottom: var(--sp-6);
}
.tl-item { position: relative; padding-left: var(--sp-5); padding-bottom: var(--sp-6); border-left: var(--hairline) solid var(--border); }
.tl-item:last-child { padding-bottom: 0; border-left-color: transparent; }
.tl-item::before { content: ''; position: absolute; left: -3px; top: 0.6em; width: 5px; height: 5px; border-radius: 50%; background: var(--brass); }
.tl-period { display: block; font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--brass); margin-bottom: var(--sp-2); }
.tl-title { font-size: var(--fs-lg); margin-bottom: var(--sp-1); }
.tl-org { font-size: var(--fs-sm); color: var(--muted); }
.tl-desc { font-size: var(--fs-sm); color: var(--muted); margin-top: var(--sp-3); max-width: var(--measure); }

/* ---------- 14. Финальный призыв ---------- */

.cta {
    text-align: center;
    padding-block: var(--section-gap);
    border-top: var(--hairline) solid var(--border);
    position: relative; overflow: hidden;
}
.cta::before {
    content: ''; position: absolute; inset: 20% -10% -60% -10%;
    background: radial-gradient(closest-side, var(--brass-soft), transparent 70%);
    pointer-events: none;
}
.cta > * { position: relative; }
.cta-title {
    font-family: var(--font-display); font-weight: 600;
    font-size: var(--fs-mega); letter-spacing: -0.05em; line-height: 0.95;
    margin-bottom: var(--sp-6);
}
.cta-sub { color: var(--muted); font-size: var(--fs-lg); max-width: 44ch; margin: 0 auto var(--sp-8); }

/* ---------- 15. Контакты и форма ---------- */

.contact-grid { display: grid; gap: var(--sp-9) var(--sp-8); grid-template-columns: repeat(auto-fit, minmax(min(19rem, 100%), 1fr)); align-items: start; }

.contact-list { display: flex; flex-direction: column; gap: var(--sp-4); font-size: var(--fs-sm); }
.contact-list li { display: flex; align-items: center; gap: var(--sp-3); color: var(--muted); }
.contact-list i { color: var(--brass); width: 1.1em; }
.contact-list a:hover { color: var(--brass); }

.socials { display: flex; gap: var(--sp-3); margin-top: var(--sp-6); }
.socials a {
    width: 2.75rem; height: 2.75rem; display: grid; place-items: center;
    border: var(--hairline) solid var(--border); border-radius: 50%;
    color: var(--muted); transition: border-color var(--t), color var(--t), background var(--t);
}
.socials a:hover { border-color: var(--brass); color: var(--brass); background: var(--brass-soft); }

.form { display: flex; flex-direction: column; gap: var(--sp-5); }
.field { display: flex; flex-direction: column; gap: var(--sp-2); }
.field label {
    font-family: var(--font-mono); font-size: var(--fs-xs);
    letter-spacing: var(--track-wide); text-transform: uppercase; color: var(--faint);
}
.field input, .field select, .field textarea {
    width: 100%; padding: var(--sp-4);
    font-family: inherit; font-size: var(--fs-sm); color: var(--text);
    background: var(--ink-2); border: var(--hairline) solid var(--border);
    border-radius: var(--radius-sm); transition: border-color var(--t), background var(--t);
}
.field textarea { min-height: 8rem; resize: vertical; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--border-lit); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--brass); background: var(--surface); }
.field input::placeholder, .field textarea::placeholder { color: var(--faint); }
.field-error { font-size: var(--fs-xs); color: var(--err); }

.alert { padding: var(--sp-4) var(--sp-5); border-radius: var(--radius-sm); border: var(--hairline) solid; font-size: var(--fs-sm); margin-bottom: var(--sp-5); }
.alert-success { background: var(--ok-soft); border-color: var(--ok); color: var(--ok); }
.alert-error { background: var(--err-soft); border-color: var(--err); color: var(--err); }

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

.site-footer { border-top: var(--hairline) solid var(--border); padding-block: var(--sp-8); font-size: var(--fs-sm); color: var(--faint); }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: var(--sp-4); justify-content: space-between; align-items: center; }
.site-footer a:hover { color: var(--brass); }

/* ---------- 17. Страница проекта ---------- */

.detail { padding-block: var(--sp-9) var(--section-gap); }
.detail-back { display: inline-flex; align-items: center; gap: var(--sp-2); font-family: var(--font-mono); font-size: var(--fs-xs); letter-spacing: var(--track-wide); text-transform: uppercase; color: var(--muted); margin-bottom: var(--sp-8); }
.detail-back:hover { color: var(--brass); }
.detail-title { font-family: var(--font-display); font-weight: 600; font-size: var(--fs-2xl); letter-spacing: -0.035em; margin-bottom: var(--sp-4); }
.detail-lede { max-width: var(--measure); color: var(--muted); font-size: var(--fs-lg); margin-bottom: var(--sp-6); }
.detail-meta { display: flex; flex-wrap: wrap; gap: var(--sp-4); align-items: center; padding-bottom: var(--sp-7); border-bottom: var(--hairline) solid var(--border); margin-bottom: var(--sp-8); }
.detail-cover { border: var(--hairline) solid var(--border); border-radius: var(--radius); overflow: hidden; margin-bottom: var(--sp-8); }
.detail-body { max-width: var(--measure); color: var(--muted); white-space: pre-line; font-size: var(--fs-lg); }

/* ---------- 18. Движение ---------- */

/* Стартовое состояние ставит только при работающем JS, иначе контент
   остался бы невидимым при заблокированном CDN. */
.js .reveal { opacity: 0; }
.js .split-line { overflow: hidden; }

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

@media (max-width: 60rem) {
    .work { grid-template-columns: 1fr; gap: var(--sp-5); }
    .work:nth-child(even) .work-visual { order: 0; }
    .works { gap: var(--sp-10); }
}

@media (max-width: 48rem) {
    .nav { display: none; }
    .nav-cta { display: inline-flex; flex-shrink: 0; }
    .brand-loc { display: none; }
    .burger { display: flex; }
    .layer { grid-template-columns: 1fr; gap: var(--sp-3); }
    .cursor, .cursor-ring { display: none; }
}

/* Телефоны от 360px: ФИО + кнопка + бургер втроём не помещаются.
   Оставляем фамилию целиком — читаемое слово вместо «ПАРШАКОВ МАКСИМ ВАЛ…». */
@media (max-width: 30rem) {
    .site-header .wrap { gap: var(--sp-3); }
    .brand-full { display: none; }
    .brand-short { display: inline; }
    .header-actions { gap: var(--sp-2); }
    .nav-cta { padding-inline: var(--sp-3); }
}

/* Курсор — только для мыши */
@media (hover: none), (pointer: coarse) {
    .cursor, .cursor-ring { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .js .reveal { opacity: 1; }
    .cursor, .cursor-ring, .progress { display: none; }
}

/* ─── Автоматизация ───
   Список, а не карточки: у скрипта нет обложки, и притворяться,
   что есть, — значит рисовать пустые прямоугольники. */
.autos { display: grid; gap: var(--sp-4); }

@media (min-width: 760px) {
    .autos { grid-template-columns: 1fr 1fr; gap: var(--sp-5); }
}

.auto {
    display: flex; gap: var(--sp-4); align-items: flex-start;
    padding: var(--sp-5);
    border: 1px solid var(--border); border-radius: var(--radius);
    background: var(--surface);
}

.auto-icon {
    display: inline-flex; align-items: center; justify-content: center;
    flex: none; width: 2.75rem; height: 2.75rem;
    border-radius: var(--radius-sm);
    background: var(--brass-soft); color: var(--brass);
    font-size: 1.25rem;
}

.auto-title {
    font-family: var(--font-sans); font-weight: 700;
    font-size: var(--fs-lg); margin-bottom: var(--sp-2);
}

.auto-desc { color: var(--muted); font-size: var(--fs-sm); }

/* ─── Другие проекты ───
   Компактная сетка вместо крупных карточек: без скриншота и без ссылки
   большая карточка выглядела бы пустой рамкой. */
.others { display: grid; gap: var(--sp-4); }

@media (min-width: 720px)  { .others { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1100px) { .others { grid-template-columns: repeat(3, 1fr); } }

.other {
    display: flex; flex-direction: column; gap: var(--sp-3);
    padding: var(--sp-5);
    border: 1px solid var(--border); border-radius: var(--radius);
    background: var(--surface);
    transition: border-color .25s ease, transform .25s ease;
}
.other:hover { border-color: var(--border-lit); transform: translateY(-2px); }

.other-title { font-family: var(--font-sans); font-weight: 700; font-size: var(--fs-lg); }
.other-title a { color: var(--text); }
.other-title a:hover { color: var(--brass); }
.other-desc { color: var(--muted); font-size: var(--fs-sm); flex: 1; }
