/*
Theme Name: My Custom Theme
Author: Marsel
Description: Тема на основе моей HTML-верстки
Version: 1.0
*/

/* ============================================================
   ЗАПИСКИ ИНДИ РАЗРАБОТЧИКА — styles.css
   ============================================================ */


/* ============================================================
   1. CSS ПЕРЕМЕННЫЕ
   ============================================================ */
:root {
    --color-bg: #060810;
    --color-bg2: #0c1020;
    --color-neon: #00ffaa;
    --color-neon2: #ff2d78;
    --color-neon3: #7b5cf0;
    --color-neon4: #f9c74f;
    --color-text: #e8eaf2;
    --color-muted: #8892a4;
    --color-border: rgba(255, 255, 255, 0.07);
    --color-surface: rgba(255, 255, 255, 0.03);

    --font-pixel: 'Press Start 2P', monospace;
    --font-mono: 'Space Mono', monospace;
    --font-body: 'Syne', sans-serif;

    --max-width: 1100px;
    --nav-height: 72px;

    --transition-fast: 150ms ease;
    --transition-normal: 300ms ease;
}


/* ============================================================
   2. СБРОС И БАЗОВЫЕ СТИЛИ
   ============================================================ */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-mono);
    font-size: 14px;
    line-height: 1.6;
    overflow-x: hidden;
    cursor: none;
}

/* Возвращаем курсор на touch-устройствах */
@media (pointer: coarse) {
    body {
        cursor: auto;
    }

    .cursor,
    .cursor-ring {
        display: none;
    }
}

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

ul {
    list-style: none;
}

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


/* ============================================================
   3. УТИЛИТЫ
   ============================================================ */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

.text-neon {
    color: var(--color-neon);
}

.text-neon2 {
    color: var(--color-neon2);
}

.text-neon3 {
    color: var(--color-neon3);
}

.text-neon4 {
    color: var(--color-neon4);
}

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


/* ============================================================
   4. KEYFRAMES
   ============================================================ */
@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

@keyframes glitch1 {

    0%,
    100% {
        clip-path: inset(0 0 95% 0);
        transform: translate(-3px, 0);
    }

    20% {
        clip-path: inset(30% 0 40% 0);
        transform: translate(3px, 0);
    }

    40% {
        clip-path: inset(60% 0 10% 0);
        transform: translate(-3px, 0);
    }

    60% {
        clip-path: inset(10% 0 70% 0);
        transform: translate(3px, 0);
    }

    80% {
        clip-path: inset(80% 0 5% 0);
        transform: translate(-3px, 0);
    }
}

@keyframes glitch2 {

    0%,
    100% {
        clip-path: inset(50% 0 30% 0);
        transform: translate(3px, 0);
    }

    25% {
        clip-path: inset(10% 0 70% 0);
        transform: translate(-3px, 0);
    }

    50% {
        clip-path: inset(70% 0 10% 0);
        transform: translate(3px, 0);
    }

    75% {
        clip-path: inset(30% 0 50% 0);
        transform: translate(-3px, 0);
    }
}

@keyframes cursorPulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.6;
    }

    50% {
        transform: scale(1.15);
        opacity: 0.3;
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes faqOpen {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* ============================================================
   5. КАСТОМНЫЙ КУРСОР
   ============================================================ */
.cursor {
    position: fixed;
    width: 8px;
    height: 8px;
    background: var(--color-neon);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: width .2s, height .2s, background .2s;
}

.cursor-ring {
    position: fixed;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(0, 255, 170, 0.3);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
    animation: cursorPulse 2s ease-in-out infinite;
}


/* ============================================================
   6. ФОНОВЫЙ CANVAS
   ============================================================ */
.bg-canvas {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: 0.5;
}


/* ============================================================
   7. ПОЛОСА ПРОГРЕССА СКРОЛЛА
   ============================================================ */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--color-neon3), var(--color-neon));
    z-index: 1000;
    width: 0%;
    transition: width 0.1s linear;
}


/* ============================================================
   8. НАВИГАЦИЯ
   ============================================================ */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 200;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    background: rgba(6, 8, 16, 0.92);
    border-bottom: 1px solid var(--color-border);
}

.nav__inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    height: var(--nav-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Логотип */
.nav__logo {
    font-family: var(--font-pixel);
    font-size: 10px;
    color: var(--color-neon);
    letter-spacing: 2px;
    flex-shrink: 0;
}

.nav__logo-accent {
    color: var(--color-neon2);
}

/* Десктопные ссылки */
.nav__links {
    display: flex;
    gap: 32px;
}

.nav__link {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--color-muted);
    position: relative;
    transition: color var(--transition-fast);
}

.nav__link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--color-neon);
    transition: width 0.3s ease;
}

.nav__link:hover,
.nav__link.active {
    color: var(--color-neon);
}

.nav__link:hover::after,
.nav__link.active::after {
    width: 100%;
}

/* ---- БУРГЕР ---- */
.burger {
    display: none;
    /* скрыт на десктопе */
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: none;
    border: 1px solid var(--color-border);
    cursor: pointer;
    padding: 8px;
    flex-shrink: 0;
}

.burger__line {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--color-neon);
    border-radius: 1px;
    transform-origin: center;
    transition: transform 0.35s cubic-bezier(0.23, 1, 0.32, 1),
        opacity 0.35s ease,
        width 0.35s ease;
}

/* Анимация бургера → крестик */
.burger.is-open .burger__line--top {
    transform: translateY(7px) rotate(45deg);
}

.burger.is-open .burger__line--mid {
    opacity: 0;
    width: 0;
}

.burger.is-open .burger__line--bot {
    transform: translateY(-7px) rotate(-45deg);
}

/* ---- Мобильное меню ---- */
.nav__mobile {
    display: none;
    /* скрыто по умолчанию */
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    border-top: 1px solid var(--color-border);
    background: rgba(6, 8, 16, 0.98);
}

/* Состояние открытого меню */
.nav__mobile.is-open {
    display: block;
    max-height: 400px;
    animation: slideDown 0.3s ease;
}

.nav__mobile-links {
    padding: 16px 24px 24px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav__mobile-link {
    display: block;
    padding: 14px 0;
    font-family: var(--font-mono);
    font-size: 13px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--color-muted);
    border-bottom: 1px solid var(--color-border);
    transition: color var(--transition-fast), padding-left var(--transition-normal);
}

.nav__mobile-link:last-child {
    border-bottom: none;
}

.nav__mobile-link:hover {
    color: var(--color-neon);
    padding-left: 12px;
}


/* ============================================================
   9. МЕТКИ СЕКЦИЙ
   ============================================================ */
.section-label {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--color-neon);
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.section-label__line {
    display: block;
    width: 20px;
    height: 1px;
    background: var(--color-neon);
    flex-shrink: 0;
}

.section-label__line--long {
    width: 60px;
    background: rgba(0, 255, 170, 0.5);
}

.section-label--center {
    justify-content: center;
}


/* ============================================================
   10. ЗАГОЛОВКИ СЕКЦИЙ
   ============================================================ */
.section-title {
    font-family: var(--font-body);
    font-weight: 800;
    font-size: clamp(28px, 3.5vw, 48px);
    letter-spacing: -1.5px;
    line-height: 1.1;
    margin-bottom: 16px;
}

.section-desc {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--color-muted);
    line-height: 1.8;
}

.section-header {
    margin-bottom: 56px;
}


/* ============================================================
   11. REVEAL ON SCROLL
   ============================================================ */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal--delay-0 {
    transition-delay: 0s;
}

.reveal--delay-1 {
    transition-delay: 0.1s;
}

.reveal--delay-2 {
    transition-delay: 0.2s;
}

.reveal--delay-3 {
    transition-delay: 0.3s;
}

.reveal--delay-4 {
    transition-delay: 0.4s;
}


/* ============================================================
   12. HERO
   ============================================================ */
.hero {
    position: relative;
    z-index: 2;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: calc(var(--nav-height) + 60px) 0 80px;
}

.hero__grid {
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 64px;
    align-items: center;
}

.hero__title {
    font-family: var(--font-body);
    font-weight: 800;
    font-size: clamp(36px, 5vw, 68px);
    line-height: 1.05;
    letter-spacing: -2px;
    margin-bottom: 24px;
}

.hero__title-line {
    display: block;
}

.hero__title-line--light {
    color: var(--color-text);
}

.hero__title-line--neon {
    color: var(--color-neon);
    position: relative;
}

.hero__title-line--outline {
    color: transparent;
    -webkit-text-stroke: 1px rgba(255, 255, 255, 0.2);
}

/* Glitch эффект */
.glitch {
    position: relative;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch::before {
    color: var(--color-neon2);
    animation: glitch1 4s infinite;
    opacity: 0.7;
}

.glitch::after {
    color: var(--color-neon3);
    animation: glitch2 4s infinite;
    opacity: 0.5;
}

.hero__desc {
    font-size: 14px;
    line-height: 1.8;
    color: var(--color-muted);
    max-width: 460px;
    margin-bottom: 40px;
}

.hero__buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

/* Кнопки */
.btn--primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    background: var(--color-neon);
    color: #000;
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 0 100%);
    transition: transform var(--transition-fast), box-shadow var(--transition-normal);
}

.btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 255, 170, 0.3);
}

.btn--outline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--color-text);
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 2px;
    text-transform: uppercase;
    clip-path: polygon(12px 0, 100% 0, 100% 100%, 0 100%, 0 12px);
    transition: border-color var(--transition-fast), color var(--transition-fast);
}

.btn--outline:hover {
    border-color: var(--color-neon);
    color: var(--color-neon);
}

/* Карточка персонажа */
.card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    padding: 28px;
    position: relative;
    clip-path: polygon(0 0, calc(100% - 24px) 0, 100% 24px, 100% 100%, 24px 100%, 0 calc(100% - 24px));
}

.card--terminal::before {
    content: '';
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    background: var(--color-neon);
}

.card__header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--color-border);
}

.card__dots {
    display: flex;
    gap: 6px;
}

.card__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.card__dot--red {
    background: #ff5f57;
}

.card__dot--yellow {
    background: #febc2e;
}

.card__dot--green {
    background: #28c840;
}

.card__title {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--color-muted);
    margin-left: 8px;
}

.card__character {
    display: flex;
    justify-content: center;
    margin: 20px 0;
    animation: float 3s ease-in-out infinite;
}

.card__stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 20px;
}

.stat {
    padding: 10px 12px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
}

.stat__label {
    font-family: var(--font-mono);
    font-size: 9px;
    color: var(--color-muted);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.stat__value {
    font-family: var(--font-pixel);
    font-size: 12px;
    color: var(--color-neon);
}

.card__terminal-line {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--color-border);
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--color-neon);
    min-height: 20px;
}

.blink {
    animation: blink 1s step-end infinite;
}


/* ============================================================
   13. ABOUT
   ============================================================ */
.about {
    position: relative;
    z-index: 2;
    padding: 120px 0;
}

.about__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: start;
}

.about__desc {
    font-size: 13px;
    color: var(--color-muted);
    line-height: 1.8;
    margin-bottom: 40px;
}

.skills {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 40px;
}

.skill__header {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    margin-bottom: 8px;
}

.skill__name {
    color: var(--color-text);
}

.skill__pct {
    color: var(--color-neon);
}

.skill__bar {
    height: 4px;
    background: rgba(255, 255, 255, 0.06);
    overflow: hidden;
}

.skill__fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--color-neon3), var(--color-neon));
    transition: width 1.2s ease-out;
}

/* Таймлайн */
.timeline {
    display: flex;
    flex-direction: column;
    gap: 32px;
    margin-top: 40px;
}

.timeline__item {
    display: flex;
    gap: 20px;
    position: relative;
}

.timeline__line {
    position: absolute;
    left: 20px;
    top: 40px;
    bottom: -32px;
    width: 1px;
    background: var(--color-border);
}

.timeline__icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    background: var(--color-bg2);
    border: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    position: relative;
    z-index: 1;
}

.timeline__date {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--color-neon);
    letter-spacing: 2px;
    margin-bottom: 4px;
}

.timeline__text {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--color-muted);
    line-height: 1.7;
}

.timeline__text strong {
    color: var(--color-text);
}


/* ============================================================
   14. PROJECTS
   ============================================================ */
.projects {
    position: relative;
    z-index: 2;
    padding: 120px 0;
    background: linear-gradient(to bottom, transparent, var(--color-bg2) 30%, var(--color-bg2) 70%, transparent);
}

.projects__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.project-card {
    position: relative;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    padding: 28px;
    overflow: hidden;
    clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 0 100%);
    transition: border-color var(--transition-normal), transform var(--transition-normal);
}

.project-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom right, rgba(0, 255, 170, 0.05), transparent);
    opacity: 0;
    transition: opacity var(--transition-normal);
    pointer-events: none;
}

.project-card:hover {
    border-color: rgba(0, 255, 170, 0.3);
    transform: translateY(-4px);
}

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

.project-card__icon {
    width: 56px;
    height: 56px;
    margin-bottom: 20px;
}

.project-card__wip {
    position: absolute;
    top: 16px;
    right: -24px;
    background: var(--color-neon4);
    color: #000;
    font-family: var(--font-mono);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 2px;
    padding: 4px 36px;
    transform: rotate(45deg);
    z-index: 10;
}

.project-card__platform {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 9px;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 4px 8px;
    margin-bottom: 12px;
}

.project-card__platform--yandex {
    background: rgba(255, 45, 120, 0.15);
    color: var(--color-neon2);
    border: 1px solid rgba(255, 45, 120, 0.3);
}

.project-card__platform--crazy {
    background: rgba(249, 199, 79, 0.1);
    color: var(--color-neon4);
    border: 1px solid rgba(249, 199, 79, 0.3);
}

.project-card__platform--steam {
    background: rgba(123, 92, 240, 0.15);
    color: var(--color-neon3);
    border: 1px solid rgba(123, 92, 240, 0.3);
}

.project-card__title {
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 18px;
    letter-spacing: -0.5px;
    color: var(--color-text);
    margin-bottom: 8px;
}

.project-card__desc {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--color-muted);
    line-height: 1.7;
    margin-bottom: 20px;
}

.project-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag {
    font-family: var(--font-mono);
    font-size: 9px;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 4px 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--color-border);
    color: var(--color-muted);
}


/* ============================================================
   15. BLOG
   ============================================================ */
.blog {
    position: relative;
    z-index: 2;
    padding: 120px 0;
}

.blog__header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 56px;
    flex-wrap: wrap;
    gap: 16px;
}

.blog__all-link {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--color-neon);
    letter-spacing: 2px;
    transition: letter-spacing var(--transition-normal);
}

.blog__all-link:hover {
    letter-spacing: 4px;
}

.blog__grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 20px;
}

.article-card--featured {
    grid-row: span 2;
}

.article-card {
    position: relative;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    padding: 24px;
    display: flex;
    flex-direction: column;
    transition: border-color var(--transition-normal);
    color: inherit;
}

.article-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--color-neon), transparent);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.article-card:hover {
    border-color: rgba(0, 255, 170, 0.25);
}

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

.article-card__cat {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 9px;
    color: var(--color-neon);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.article-card__cat-icon {
    width: 8px;
    height: 8px;
    flex-shrink: 0;
    background: var(--color-neon);
    clip-path: polygon(50% 0%, 100% 100%, 0% 100%);
}

.article-card__preview {
    border: 1px solid var(--color-border);
    margin-bottom: 20px;
    overflow: hidden;
}

.article-card__title {
    font-family: var(--font-body);
    font-weight: 700;
    letter-spacing: -0.3px;
    line-height: 1.3;
    color: var(--color-text);
    margin-bottom: 12px;
    flex: 1;
    font-size: 16px;
}

.article-card__title--lg {
    font-size: 22px;
}

.article-card__desc {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--color-muted);
    line-height: 1.7;
    margin-bottom: 20px;
}

.article-card__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--color-muted);
    padding-top: 16px;
    border-top: 1px solid var(--color-border);
    margin-top: auto;
}


/* ============================================================
   16. NEWSLETTER — подписка
   ============================================================ */
.newsletter {
    position: relative;
    z-index: 2;
    padding: 80px 0;
}

/* Обёртка с рамкой и неоновым свечением */
.newsletter__inner {
    position: relative;
    border: 1px solid rgba(0, 255, 170, 0.2);
    background: linear-gradient(135deg, rgba(0, 255, 170, 0.04) 0%, rgba(123, 92, 240, 0.04) 100%);
    padding: 60px 48px;
    overflow: hidden;
    clip-path: polygon(0 0,
            calc(100% - 32px) 0,
            100% 32px,
            100% 100%,
            32px 100%,
            0 calc(100% - 32px));
}

/* Фоновый декоративный текст */
.newsletter__bg-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: var(--font-pixel);
    font-size: clamp(40px, 8vw, 100px);
    color: rgba(0, 255, 170, 0.03);
    white-space: nowrap;
    pointer-events: none;
    user-select: none;
    letter-spacing: 0.3em;
}

/* Контент по центру */
.newsletter__content {
    position: relative;
    z-index: 1;
    max-width: 560px;
    margin: 0 auto;
    text-align: center;
}

.newsletter__title {
    font-family: var(--font-body);
    font-weight: 800;
    font-size: clamp(28px, 3.5vw, 44px);
    letter-spacing: -1.5px;
    line-height: 1.15;
    margin-bottom: 16px;
}

.newsletter__desc {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--color-muted);
    line-height: 1.8;
    margin-bottom: 32px;
}

/* Три фичи рассылки */
.newsletter__features {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.newsletter__feature {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--color-muted);
    letter-spacing: 1px;
}

.newsletter__feature-icon {
    font-size: 16px;
}

/* Форма: input + кнопка в одну строку */
.newsletter__input-wrap {
    display: flex;
    gap: 0;
    max-width: 480px;
    margin: 0 auto;
}

.newsletter__input {
    flex: 1;
    padding: 14px 20px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(0, 255, 170, 0.25);
    border-right: none;
    color: var(--color-text);
    font-family: var(--font-mono);
    font-size: 13px;
    outline: none;
    transition: border-color var(--transition-fast), background var(--transition-fast);
    min-width: 0;
    /* важно для flex на мобилке */
}

.newsletter__input::placeholder {
    color: var(--color-muted);
}

.newsletter__input:focus {
    border-color: var(--color-neon);
    background: rgba(0, 255, 170, 0.06);
}

.newsletter__btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 24px;
    background: var(--color-neon);
    color: #000;
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    transition: background var(--transition-fast), transform var(--transition-fast);
    flex-shrink: 0;
}

.newsletter__btn:hover {
    background: #00e699;
    transform: translateX(2px);
}

/* Сообщение об успехе/ошибке */
.newsletter__message {
    margin-top: 12px;
    font-family: var(--font-mono);
    font-size: 12px;
    min-height: 20px;
    transition: color var(--transition-fast);
}

.newsletter__message--success {
    color: var(--color-neon);
}

.newsletter__message--error {
    color: var(--color-neon2);
}


/* ============================================================
   17. FAQ — аккордеон
   ============================================================ */
.faq {
    position: relative;
    z-index: 2;
    padding: 120px 0;
    background: linear-gradient(to bottom, transparent, var(--color-bg2) 30%, var(--color-bg2) 70%, transparent);
}

/* Два столбца вопросов */
.faq__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 40px;
    align-items: start;
}

.faq__col {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Один вопрос-ответ */
.faq__item {
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    overflow: hidden;
    transition: border-color var(--transition-normal);
}

.faq__item:hover {
    border-color: rgba(0, 255, 170, 0.2);
}

/* Кнопка вопроса */
.faq__question {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px;
    background: none;
    border: none;
    color: var(--color-text);
    font-family: var(--font-mono);
    font-size: 12px;
    line-height: 1.5;
    text-align: left;
    cursor: pointer;
    transition: color var(--transition-fast);
}

.faq__question:hover {
    color: var(--color-neon);
}

/* Иконка +/− */
.faq__icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 300;
    color: var(--color-neon);
    transition: transform 0.35s cubic-bezier(0.23, 1, 0.32, 1),
        background var(--transition-normal),
        border-color var(--transition-normal);
    line-height: 1;
}

/* Активное состояние аккордеона */
.faq__item.is-open .faq__question {
    color: var(--color-neon);
}

.faq__item.is-open .faq__icon {
    transform: rotate(45deg);
    background: rgba(0, 255, 170, 0.1);
    border-color: rgba(0, 255, 170, 0.4);
}

/* Ответ — скрыт по умолчанию */
.faq__answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

/* Ответ открыт */
.faq__item.is-open .faq__answer {
    max-height: 400px;
}

.faq__answer p {
    padding: 0 20px 20px;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--color-muted);
    line-height: 1.8;
    border-top: 1px solid var(--color-border);
    padding-top: 16px;
    animation: faqOpen 0.3s ease;
}


/* ============================================================
   18. CONTACT
   ============================================================ */
.contact {
    position: relative;
    z-index: 2;
    padding: 120px 0;
    overflow: hidden;
}

.contact__glow {
    position: absolute;
    bottom: -200px;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 255, 170, 0.06) 0%, transparent 70%);
    pointer-events: none;
}

.contact__inner {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.contact__desc {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--color-muted);
    line-height: 1.8;
    margin-top: 16px;
}

.contact__email {
    display: block;
    font-family: var(--font-pixel);
    font-size: clamp(12px, 2vw, 22px);
    color: var(--color-neon);
    letter-spacing: 2px;
    margin: 40px 0;
    word-break: break-all;
    transition: text-shadow var(--transition-normal);
}

.contact__email:hover {
    text-shadow: 0 0 30px rgba(0, 255, 170, 0.6);
}

.contact__socials {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.social-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border: 1px solid var(--color-border);
    color: var(--color-muted);
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
    clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
    transition: border-color var(--transition-fast), color var(--transition-fast), transform var(--transition-fast);
}

.social-btn:hover {
    border-color: var(--color-neon);
    color: var(--color-neon);
    transform: translateY(-2px);
}


/* ============================================================
   19. ФУТЕР
   ============================================================ */
.footer {
    position: relative;
    z-index: 2;
    border-top: 1px solid var(--color-border);
    padding: 32px 0;
}

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

.footer__copy {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--color-muted);
}

.footer__nav {
    display: flex;
    gap: 24px;
}

.footer__link {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--color-muted);
    letter-spacing: 2px;
    text-transform: uppercase;
    transition: color var(--transition-fast);
}

.footer__link:hover {
    color: var(--color-neon);
}


/* ============================================================
   20. АДАПТИВ — ПЛАНШЕТ (≤ 1024px)
   ============================================================ */
@media (max-width: 1024px) {

    .hero__grid {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .hero__card {
        max-width: 460px;
        margin: 0 auto;
        width: 100%;
    }

    .about__grid {
        grid-template-columns: 1fr;
        gap: 48px;
    }

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

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

    .article-card--featured {
        grid-column: span 2;
        grid-row: span 1;
    }

    .faq__grid {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .faq__col {
        gap: 12px;
    }

    .faq__col:first-child {
        margin-bottom: 12px;
    }
}


/* ============================================================
   21. АДАПТИВ — МОБИЛЬНЫЙ (≤ 768px)
   ============================================================ */
@media (max-width: 768px) {

    /* Показываем бургер, скрываем ссылки */
    .burger {
        display: flex;
    }

    .nav__links {
        display: none;
    }

    /* Убираем кастомный курсор */
    .cursor,
    .cursor-ring {
        display: none;
    }

    /* Hero */
    .hero {
        padding-top: calc(var(--nav-height) + 32px);
        padding-bottom: 60px;
        min-height: auto;
    }

    .hero__title {
        font-size: clamp(28px, 9vw, 44px);
    }

    .hero__desc {
        font-size: 13px;
    }

    .hero__buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .hero__buttons .btn--primary,
    .hero__buttons .btn--outline {
        justify-content: center;
        text-align: center;
    }

    /* About */
    .about {
        padding: 80px 0;
    }

    /* Projects */
    .projects {
        padding: 80px 0;
    }

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

    /* Blog */
    .blog {
        padding: 80px 0;
    }

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

    .article-card--featured {
        grid-column: span 1;
        grid-row: span 1;
    }

    .article-card__title--lg {
        font-size: 18px;
    }

    /* Newsletter */
    .newsletter {
        padding: 60px 0;
    }

    .newsletter__inner {
        padding: 40px 24px;
        clip-path: none;
        border-radius: 2px;
    }

    .newsletter__features {
        gap: 16px;
        flex-direction: column;
        align-items: center;
    }

    /* Форма подписки: вертикальная на маленьких экранах */
    .newsletter__input-wrap {
        flex-direction: column;
        gap: 8px;
    }

    .newsletter__input {
        border-right: 1px solid rgba(0, 255, 170, 0.25);
        border-bottom: none;
        width: 100%;
    }

    .newsletter__input:focus {
        border-color: var(--color-neon);
    }

    .newsletter__btn {
        justify-content: center;
        padding: 14px;
        width: 100%;
    }

    /* FAQ */
    .faq {
        padding: 80px 0;
    }

    .section-header {
        margin-bottom: 40px;
    }

    /* Contact */
    .contact {
        padding: 80px 0;
    }

    .contact__socials {
        gap: 8px;
    }

    .social-btn {
        padding: 10px 14px;
        font-size: 10px;
        gap: 6px;
    }

    /* Footer */
    .footer__inner {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 12px;
    }

    .footer__nav {
        justify-content: center;
    }
}


/* ============================================================
   22. АДАПТИВ — МЕЛКИЕ ТЕЛЕФОНЫ (≤ 400px)
   ============================================================ */
@media (max-width: 400px) {

    .container {
        padding: 0 16px;
    }

    .nav__inner {
        padding: 0 16px;
    }

    .nav__logo {
        font-size: 8px;
    }

    .hero__title {
        font-size: clamp(24px, 10vw, 36px);
    }

    .card {
        padding: 20px 16px;
    }

    .card__stats {
        gap: 8px;
    }

    .stat__value {
        font-size: 10px;
    }

    .newsletter__inner {
        padding: 32px 16px;
    }

    .contact__email {
        font-size: 11px;
        word-break: break-all;
    }
}

/* ============================================================
   ДОПОЛНЕНИЕ К styles.css — страница поста (post.html)
   Добавь этот блок в конец своего styles.css
   ============================================================ */


/* ============================================================
   POST LAYOUT — двухколоночная сетка: контент + сайдбар
   ============================================================ */
.post-main {
    position: relative;
    z-index: 2;
    padding-top: var(--nav-height);
}

.post-layout {
    max-width: 1200px;
    margin: 0 auto;
    padding: 48px 24px 80px;
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 48px;
    align-items: start;
}


/* ============================================================
   ХЛЕБНЫЕ КРОШКИ
   ============================================================ */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--color-muted);
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.breadcrumb__link {
    color: var(--color-muted);
    transition: color var(--transition-fast);
}

.breadcrumb__link:hover {
    color: var(--color-neon);
}

.breadcrumb__sep {
    color: rgba(255, 255, 255, 0.15);
}

.breadcrumb__current {
    color: var(--color-text);
}


/* ============================================================
   ШАПКА ПОСТА
   ============================================================ */
.post__header {
    margin-bottom: 48px;
}

/* Категория */
.post__cat {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--color-neon);
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.post__cat-icon {
    width: 8px;
    height: 8px;
    background: var(--color-neon);
    clip-path: polygon(50% 0%, 100% 100%, 0% 100%);
    flex-shrink: 0;
}

/* Заголовок поста */
.post__title {
    font-family: var(--font-body);
    font-weight: 800;
    font-size: clamp(26px, 3.5vw, 44px);
    line-height: 1.15;
    letter-spacing: -1.5px;
    color: var(--color-text);
    margin-bottom: 28px;
}

/* Мета-строка */
.post__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding: 16px 0;
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 32px;
}

.post__author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.post__avatar {
    width: 36px;
    height: 36px;
    border: 1px solid var(--color-border);
    overflow: hidden;
    flex-shrink: 0;
}

.post__author-name {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 700;
    color: var(--color-text);
}

.post__author-role {
    font-family: var(--font-mono);
    font-size: 10px;
    margin-top: 2px;
}

.post__meta-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.post__meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--color-muted);
}

.post__meta-sep {
    color: var(--color-border);
}

/* Обложка */
.post__cover {
    border: 1px solid var(--color-border);
    overflow: hidden;
    margin-bottom: 24px;
}

/* Теги */
.post__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.post__tag {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 5px 10px;
    border: 1px solid var(--color-border);
    color: var(--color-muted);
    transition: border-color var(--transition-fast), color var(--transition-fast);
}

.post__tag:hover {
    border-color: var(--color-neon);
    color: var(--color-neon);
}


/* ============================================================
   ТЕЛО ПОСТА — типографика
   ============================================================ */
.post__body {
    font-family: var(--font-mono);
    font-size: 13px;
    line-height: 1.9;
    color: var(--color-muted);
}

/* Лид-абзац */
.post__lead {
    font-size: 15px;
    color: var(--color-text);
    line-height: 1.8;
    margin-bottom: 32px;
    padding-left: 16px;
    border-left: 2px solid var(--color-neon);
}

/* Заголовки внутри поста */
.post__body h2 {
    font-family: var(--font-body);
    font-weight: 700;
    font-size: clamp(18px, 2.2vw, 26px);
    letter-spacing: -0.5px;
    color: var(--color-text);
    margin: 40px 0 16px;
}

.post__body h3 {
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 18px;
    color: var(--color-text);
    margin: 28px 0 12px;
}

.post__body p {
    margin-bottom: 20px;
}

.post__body strong {
    color: var(--color-text);
    font-weight: 700;
}

/* Инлайн-код */
.post__body code {
    font-family: var(--font-mono);
    font-size: 12px;
    background: rgba(0, 255, 170, 0.06);
    border: 1px solid rgba(0, 255, 170, 0.15);
    color: var(--color-neon);
    padding: 2px 6px;
}

/* Callout-блоки (совет / предупреждение / успех) */
.post__callout {
    display: flex;
    gap: 14px;
    padding: 16px 20px;
    border-left: 2px solid;
    margin: 28px 0;
    font-size: 12px;
    line-height: 1.7;
}

.post__callout-icon {
    font-size: 18px;
    flex-shrink: 0;
    line-height: 1.4;
}

.post__callout--warn {
    border-color: var(--color-neon4);
    background: rgba(249, 199, 79, 0.06);
    color: var(--color-text);
}

.post__callout--info {
    border-color: var(--color-neon3);
    background: rgba(123, 92, 240, 0.06);
    color: var(--color-text);
}

.post__callout--success {
    border-color: var(--color-neon);
    background: rgba(0, 255, 170, 0.05);
    color: var(--color-text);
}

/* Блоки кода */
.post__code {
    margin: 28px 0;
    border: 1px solid var(--color-border);
    overflow: hidden;
}

.post__code-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid var(--color-border);
}

.post__code-lang {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--color-neon);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.post__code-copy {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--color-muted);
    background: none;
    border: 1px solid var(--color-border);
    padding: 4px 10px;
    cursor: pointer;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: color var(--transition-fast), border-color var(--transition-fast);
}

.post__code-copy:hover {
    color: var(--color-neon);
    border-color: rgba(0, 255, 170, 0.4);
}

.post__code-copy.copied {
    color: var(--color-neon);
    border-color: var(--color-neon);
}

.post__code-body {
    margin: 0;
    padding: 20px;
    overflow-x: auto;
    background: rgba(0, 0, 0, 0.3);
    font-family: var(--font-mono);
    font-size: 12px;
    line-height: 1.7;
}

.post__code-body code {
    background: none;
    border: none;
    padding: 0;
    color: var(--color-text);
}

/* Подсветка синтаксиса C# */
.code-keyword {
    color: #ff79c6;
}

.code-class {
    color: #8be9fd;
}

.code-fn {
    color: #50fa7b;
}

.code-string {
    color: #f1fa8c;
}

.code-num {
    color: #bd93f9;
}

.code-comment {
    color: #6272a4;
    font-style: italic;
}


/* ============================================================
   РЕАКЦИИ НА ПОСТ
   ============================================================ */
.post__reactions {
    margin: 48px 0 32px;
    padding: 28px;
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    text-align: center;
}

.post__reactions-label {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--color-muted);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.post__reactions-btns {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.reaction-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 14px 20px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    cursor: pointer;
    min-width: 72px;
    transition: border-color var(--transition-fast), transform var(--transition-fast);
}

.reaction-btn:hover {
    border-color: rgba(0, 255, 170, 0.3);
    transform: translateY(-2px);
}

.reaction-btn.is-active {
    border-color: var(--color-neon);
    background: rgba(0, 255, 170, 0.06);
}

.reaction-btn__icon {
    font-size: 22px;
    line-height: 1;
}

.reaction-btn__count {
    font-family: var(--font-pixel);
    font-size: 10px;
    color: var(--color-neon);
}


/* ============================================================
   ПОДЕЛИТЬСЯ
   ============================================================ */
.post__share {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 48px;
    padding-bottom: 48px;
    border-bottom: 1px solid var(--color-border);
}

.post__share-label {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--color-muted);
    letter-spacing: 2px;
    text-transform: uppercase;
    flex-shrink: 0;
}

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

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 16px;
    border: 1px solid var(--color-border);
    background: none;
    color: var(--color-muted);
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 1px;
    cursor: pointer;
    transition: border-color var(--transition-fast), color var(--transition-fast);
}

.share-btn:hover {
    border-color: var(--color-neon);
    color: var(--color-neon);
}

.share-btn.copied {
    border-color: var(--color-neon);
    color: var(--color-neon);
}


/* ============================================================
   КАРТОЧКА АВТОРА
   ============================================================ */
.post__author-card {
    display: flex;
    gap: 24px;
    padding: 28px;
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    margin-bottom: 56px;
    align-items: flex-start;
}

.post__author-card-avatar {
    width: 64px;
    height: 64px;
    border: 1px solid var(--color-border);
    overflow: hidden;
    flex-shrink: 0;
}

.post__author-card-name {
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 18px;
    color: var(--color-text);
    margin-bottom: 8px;
}

.post__author-card-bio {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--color-muted);
    line-height: 1.7;
    margin-bottom: 12px;
}

.post__author-card-link {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--color-neon);
    letter-spacing: 1px;
    transition: letter-spacing var(--transition-normal);
}

.post__author-card-link:hover {
    letter-spacing: 3px;
}


/* ============================================================
   КОММЕНТАРИИ
   ============================================================ */
.comments__header {
    margin-bottom: 28px;
}

.comments__title {
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 22px;
    color: var(--color-text);
    display: flex;
    align-items: center;
    gap: 12px;
}

.comments__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: rgba(0, 255, 170, 0.1);
    border: 1px solid rgba(0, 255, 170, 0.3);
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--color-neon);
}

/* Форма комментария */
.comment-form {
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    padding: 20px;
    margin-bottom: 32px;
}

.comment-form__header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.comment-form__avatar {
    width: 32px;
    height: 32px;
    border: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.comment-form__name {
    flex: 1;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--color-border);
    color: var(--color-text);
    font-family: var(--font-mono);
    font-size: 12px;
    padding: 8px 12px;
    outline: none;
    transition: border-color var(--transition-fast);
}

.comment-form__name:focus {
    border-color: rgba(0, 255, 170, 0.4);
}

.comment-form__name::placeholder {
    color: var(--color-muted);
}

.comment-form__text {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--color-border);
    color: var(--color-text);
    font-family: var(--font-mono);
    font-size: 12px;
    line-height: 1.7;
    padding: 12px;
    resize: vertical;
    outline: none;
    transition: border-color var(--transition-fast);
    min-height: 100px;
}

.comment-form__text:focus {
    border-color: rgba(0, 255, 170, 0.4);
}

.comment-form__text::placeholder {
    color: var(--color-muted);
}

.comment-form__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 12px;
    flex-wrap: wrap;
    gap: 8px;
}

.comment-form__hint {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--color-muted);
    letter-spacing: 1px;
}

.comment-form__submit {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--color-neon);
    color: #000;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    border: none;
    cursor: pointer;
    transition: background var(--transition-fast);
}

.comment-form__submit:hover {
    background: #00e699;
}

/* Список комментариев */
.comments__list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Один комментарий */
.comment {
    display: flex;
    gap: 14px;
}

/* Вложенный ответ */
.comment--reply {
    margin-top: 16px;
    margin-left: 0;
    padding-left: 16px;
    border-left: 1px solid var(--color-border);
}

.comment__avatar {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    border: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.comment__avatar-letter {
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 14px;
    color: var(--color-text);
    background: rgba(255, 255, 255, 0.06);
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.comment__body {
    flex: 1;
    min-width: 0;
}

.comment__header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.comment__name {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 700;
    color: var(--color-text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.comment__author-badge {
    font-size: 9px;
    padding: 2px 6px;
    background: rgba(0, 255, 170, 0.1);
    border: 1px solid rgba(0, 255, 170, 0.3);
    color: var(--color-neon);
    letter-spacing: 1px;
    text-transform: uppercase;
    font-weight: 400;
}

.comment__date {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--color-muted);
}

.comment__text {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--color-muted);
    line-height: 1.7;
    margin-bottom: 10px;
    word-break: break-word;
}

.comment__actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.comment__like {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: none;
    border: none;
    color: var(--color-muted);
    font-family: var(--font-mono);
    font-size: 11px;
    cursor: pointer;
    padding: 0;
    transition: color var(--transition-fast);
}

.comment__like:hover,
.comment__like.is-liked {
    color: var(--color-neon);
}

.comment__reply-btn {
    background: none;
    border: none;
    color: var(--color-muted);
    font-family: var(--font-mono);
    font-size: 11px;
    cursor: pointer;
    padding: 0;
    letter-spacing: 1px;
    transition: color var(--transition-fast);
}

.comment__reply-btn:hover {
    color: var(--color-neon);
}


/* ============================================================
   САЙДБАР
   ============================================================ */
.post-sidebar {
    position: sticky;
    top: calc(var(--nav-height) + 24px);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Виджет сайдбара */
.sidebar-widget {
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    padding: 20px;
}

/* Зелёная рамка для рассылки */
.sidebar-widget--newsletter {
    border-color: rgba(0, 255, 170, 0.2);
    background: rgba(0, 255, 170, 0.03);
}

/* Заголовок виджета */
.sidebar-widget__title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--color-neon);
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.sidebar-widget__title-line {
    display: block;
    width: 16px;
    height: 1px;
    background: var(--color-neon);
    flex-shrink: 0;
}

/* Оглавление */
.toc {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.toc__link {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--color-muted);
    padding: 6px 8px;
    border-left: 2px solid transparent;
    transition: color var(--transition-fast), border-color var(--transition-fast), padding-left var(--transition-normal);
    line-height: 1.5;
}

.toc__link:hover,
.toc__link--active {
    color: var(--color-neon);
    border-left-color: var(--color-neon);
    padding-left: 12px;
}

/* Статистика */
.sidebar-stats {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sidebar-stat {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--color-text);
}

.sidebar-stat .text-muted {
    margin-left: 2px;
    font-size: 11px;
}

/* Похожие статьи */
.related-posts {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.related-post {
    display: block;
    padding: 12px 0;
    border-bottom: 1px solid var(--color-border);
    transition: padding-left var(--transition-normal);
}

.related-post:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.related-post:hover {
    padding-left: 6px;
}

.related-post__cat {
    font-family: var(--font-mono);
    font-size: 9px;
    color: var(--color-neon);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.related-post__title {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--color-text);
    line-height: 1.5;
    margin-bottom: 4px;
}

.related-post__meta {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--color-muted);
}

/* Мини-форма подписки в сайдбаре */
.sidebar-newsletter__desc {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--color-muted);
    line-height: 1.6;
    margin-bottom: 12px;
}

.sidebar-newsletter__form {
    display: flex;
}

.sidebar-newsletter__input {
    flex: 1;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(0, 255, 170, 0.2);
    border-right: none;
    color: var(--color-text);
    font-family: var(--font-mono);
    font-size: 11px;
    padding: 9px 10px;
    outline: none;
    min-width: 0;
    transition: border-color var(--transition-fast);
}

.sidebar-newsletter__input:focus {
    border-color: var(--color-neon);
}

.sidebar-newsletter__input::placeholder {
    color: var(--color-muted);
}

.sidebar-newsletter__btn {
    padding: 9px 14px;
    background: var(--color-neon);
    color: #000;
    border: none;
    font-family: var(--font-mono);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    flex-shrink: 0;
    transition: background var(--transition-fast);
}

.sidebar-newsletter__btn:hover {
    background: #00e699;
}


/* ============================================================
   АДАПТИВ — POST (планшет ≤ 1024px)
   ============================================================ */
@media (max-width: 1024px) {
    .post-layout {
        grid-template-columns: 1fr;
        gap: 48px;
        padding: 32px 24px 60px;
    }

    /* Сайдбар снизу, не sticky */
    .post-sidebar {
        position: static;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }

    /* Оглавление на всю ширину */
    .sidebar-widget--toc {
        grid-column: span 2;
    }
}


/* ============================================================
   АДАПТИВ — POST (мобилка ≤ 768px)
   ============================================================ */
@media (max-width: 768px) {
    .post-layout {
        padding: 24px 16px 48px;
    }

    .post__meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .post__meta-right {
        flex-wrap: wrap;
        gap: 8px;
    }

    .post__meta-sep {
        display: none;
    }

    .post__reactions-btns {
        gap: 8px;
    }

    .reaction-btn {
        min-width: 60px;
        padding: 12px 14px;
    }

    .post__share {
        flex-direction: column;
        align-items: flex-start;
    }

    .post__author-card {
        flex-direction: column;
        gap: 16px;
    }

    .post__author-card-avatar {
        width: 56px;
        height: 56px;
    }

    /* Сайдбар — одна колонка */
    .post-sidebar {
        grid-template-columns: 1fr;
    }

    .sidebar-widget--toc {
        grid-column: span 1;
    }

    .comment-form__footer {
        flex-direction: column;
        align-items: flex-start;
    }

    .comment-form__submit {
        width: 100%;
        justify-content: center;
    }
}


/* ============================================================
   АДАПТИВ — POST (мелкий ≤ 400px)
   ============================================================ */
@media (max-width: 400px) {
    .post__title {
        font-size: 22px;
    }

    .post__code-body {
        font-size: 11px;
        padding: 14px;
    }

    .reaction-btn {
        min-width: 54px;
        padding: 10px 10px;
    }

    .reaction-btn__icon {
        font-size: 18px;
    }
}