/* =====================================================
   СОДЕРЖАНИЕ
   -----------------------------------------------------
   01. Базовые настройки и переменные
   02. Утилиты
   03. Стартовый экран (обёртка, интро, кнопки)
   04. Карточки выбора раздела
   05. Основной сайт, шапка, контейнер
   06. Портфолио (проекты)
   07. Видеомонтаж: вкладки, портфолио, шоурилы
   08. Фриланс-ссылки
   09. Модальные окна
   10. Схема стека технологий
   11. Видео-модалка, «золотое сечение»
   12. Тёмная тема основного сайта
   13. Тост о недоступности YouTube / VK
   14. Активность на GitHub
   15. Шапка раздела, подвал
   16. Фон раздела «Видеомонтаж»
   17. Папки типов роликов
   ===================================================== */

/* =====================================================
   01. БАЗОВЫЕ НАСТРОЙКИ И ПЕРЕМЕННЫЕ
   ===================================================== */
:root {
    --font-sans: 'Manrope', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-mono: 'Space Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

    /* Акценты разделов. Значения ниже переопределяются
       в блоках body[data-mode] и в тёмной теме. */
    --accent-dev:   #0e80c0;
    --accent-video: #8a30cc;

    --radius-sm: 10px;
    --radius-md: 15px;
    --radius-lg: 20px;
    --radius-pill: 30px;

    --z-modal: 1000;
    --z-toast: 1100;
    --z-tooltip: 1200;
}

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

* {
    margin: 0;
    padding: 0;
}

/* Формы не наследуют шрифт автоматически — задаём явно */
button,
input,
select,
textarea { font: inherit; color: inherit; }

body {
    font-family: var(--font-sans);
    background-color: #0a0a0f;
    color: #e0e0e0;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Пока открыта модалка — страница под ней не прокручивается */
body.body--modal-open { overflow: hidden; }

/* Цветовые переменные для кнопок и свечения */
body {
    --theme-color: #24292e;
    --theme-color-rgb: 36, 41, 46;
}
body[data-mode="dev"] { 
    --theme-color: #0e80c0; 
    --theme-color-rgb: 14, 128, 192; 
}
body[data-mode="video"] { 
    --theme-color: #8a30cc; 
    --theme-color-rgb: 138, 48, 204; 
}
@media (prefers-color-scheme: dark) {
    body[data-mode="dev"] { 
        --theme-color: #4dd9ff; 
        --theme-color-rgb: 77, 217, 255; 
    }
    body[data-mode="video"] { 
        --theme-color: #c97dff; 
        --theme-color-rgb: 201, 125, 255; 
    }
}

/* =====================================================
   УТИЛИТЫ
   ===================================================== */
.hidden { display: none !important; }

/* =====================================================
   СТАРТОВЫЙ ЭКРАН — обёртка
   ===================================================== */
.entry-screen {
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #0a0a0f;
    /* Тонкая зернистость фона */
    background-image:
        radial-gradient(ellipse at 25% 35%, rgba(0, 100, 200, 0.07) 0%, transparent 55%),
        radial-gradient(ellipse at 75% 60%, rgba(120, 40, 200, 0.07) 0%, transparent 55%);
    transition: opacity 0.45s ease, transform 0.45s ease;
}

.entry-screen--exit {
    opacity: 0;
    transform: scale(1.03);
    pointer-events: none;
}

/* =====================================================
   ФАЗА 1: ИНТРО — профиль
   ===================================================== */
.intro {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 64px 24px 48px;
    gap: 0;
}

/* =====================================================
   Кнопки на стартовом экране (Разделенные на 2 ряда)
   ===================================================== */
.intro__actions {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 36px;
    width: 100%;
    align-items: center;
}

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

.contact-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
    padding: 8px 22px;
    border-radius: 30px;
    background: transparent;
    transition: all 0.3s ease;
    letter-spacing: 0.05em;
    cursor: pointer;
    font-family: inherit;
}

.contact-pill i { font-size: 1.1rem; margin: 0; }

/* GitHub и YouTube — одинаковый нейтральный цвет */
.contact-pill--gh,
.contact-pill--yt {
    color: rgba(190, 190, 205, 0.65);
    border: 1.5px solid rgba(190, 190, 205, 0.3);
}
.contact-pill--gh:hover,
.contact-pill--yt:hover {
    color: rgba(210, 210, 225, 0.9);
    border-color: rgba(210, 210, 225, 0.5);
    background: rgba(200, 200, 215, 0.08);
    transform: translateY(-2px);
}

/* Образование */
.contact-pill--edu { color: #ffd700; border: 1.5px solid #ffd700; }
.contact-pill--edu:hover { background: rgba(255,215,0,0.1); transform: translateY(-2px); }

/* Telegram (Свечение) */
.contact-pill--tg {
    color: #4dd9ff;
    border: 1.5px solid #4dd9ff;
    animation: pulseStartTg 2.5s infinite;
}
.contact-pill--tg:hover { background: rgba(77, 217, 255, 0.1); transform: translateY(-2px); }

@keyframes pulseStartTg {
    0% { box-shadow: 0 0 0 0 rgba(77, 217, 255, 0.4); }
    70% { box-shadow: 0 0 0 12px rgba(77, 217, 255, 0); }
    100% { box-shadow: 0 0 0 0 rgba(77, 217, 255, 0); }
}

/* Email (Свечение) */
.contact-pill--email {
    color: #c97dff;
    border: 1.5px solid #c97dff;
    animation: pulseStartEmail 2.5s infinite;
    animation-delay: 1.25s; 
}
.contact-pill--email:hover { background: rgba(201, 125, 255, 0.1); transform: translateY(-2px); }

@keyframes pulseStartEmail {
    0% { box-shadow: 0 0 0 0 rgba(201, 125, 255, 0.4); }
    70% { box-shadow: 0 0 0 12px rgba(201, 125, 255, 0); }
    100% { box-shadow: 0 0 0 0 rgba(201, 125, 255, 0); }
}

/* Общий класс анимируемого элемента */
.anim-item {
    opacity: 0;
    transform: translateY(22px);
    animation: fadeUpIn 0.65s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    animation-delay: var(--d, 0s);
}

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

/* Аватарка */
.intro__avatar {
    position: relative;
    width: 110px;
    height: 110px;
    margin-bottom: 28px;
}

.intro__avatar img {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    position: relative;
    z-index: 1;
    border: 2px solid rgba(255,255,255,0.08);
}

/* Пульсирующее кольцо вокруг аватарки */
.intro__avatar-ring {
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 1.5px solid rgba(255,255,255,0.12);
    animation: ringPulse 2.8s ease-in-out infinite;
    animation-delay: 1.2s;
}

@keyframes ringPulse {
    0%, 100% { transform: scale(1);    opacity: 0.5; }
    50%       { transform: scale(1.08); opacity: 0; }
}

/* Имя */
.intro__name {
    font-size: clamp(1.9rem, 5vw, 2.8rem);
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: 14px;
}

/* Биография */
.intro__bio {
    font-size: 1rem;
    color: rgba(255,255,255,0.45);
    max-width: 360px;
    line-height: 1.7;
    margin-bottom: 36px;
    font-weight: 400;
}

/* Подсказка «выбери направление» */
.intro__scroll-hint {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.2);
}

.intro__scroll-hint i {
    margin: 0;
    font-size: 0.75rem;
    animation: bounceDown 1.6s ease-in-out infinite;
    animation-delay: 2s;
}

@keyframes bounceDown {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(4px); }
}

/* =====================================================
   ФАЗА 2: КАРТОЧКИ ВЫБОРА
   ===================================================== */
.split-row {
    display: flex;
    width: 100%;
    max-width: 860px;
    gap: 16px;
    padding: 0 24px 60px;
    opacity: 0;
    transform: translateY(28px);
    animation: fadeUpIn 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    animation-delay: 1.7s;
}

.split-card {
    flex: 1;
    position: relative;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    overflow: hidden;
    border-radius: 20px;
    padding: 36px 28px;
    display: flex;
    align-items: flex-start;
    transition: flex 0.45s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.3s,
                transform 0.25s;
    border: 1px solid rgba(255,255,255,0.06);
}

.split-card:hover {
    flex: 1.3;
    transform: translateY(-3px);
}

.split-card__glow {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.4s;
    pointer-events: none;
    border-radius: 20px;
}

.split-card:hover .split-card__glow { opacity: 1; }

/* Dev */
.split-card--dev {
    background: linear-gradient(145deg, #091520 0%, #0e2438 60%, #091d30 100%);
    box-shadow: 0 4px 24px rgba(0, 100, 200, 0.1);
}

.split-card--dev .split-card__glow {
    background: radial-gradient(ellipse at 30% 40%, rgba(0, 170, 255, 0.14) 0%, transparent 65%);
}

.split-card--dev:hover {
    box-shadow: 0 8px 40px rgba(0, 140, 255, 0.2);
}

/* Video */
.split-card--video {
    background: linear-gradient(145deg, #100520 0%, #230a42 60%, #1a063a 100%);
    box-shadow: 0 4px 24px rgba(120, 40, 200, 0.1);
}

.split-card--video .split-card__glow {
    background: radial-gradient(ellipse at 70% 40%, rgba(180, 80, 255, 0.16) 0%, transparent 65%);
}

.split-card--video:hover {
    box-shadow: 0 8px 40px rgba(150, 50, 255, 0.2);
}

/* Вспышка при выборе */
.split-card--chosen::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.07);
    border-radius: 20px;
    animation: flashPick 0.35s ease forwards;
}

@keyframes flashPick {
    0%   { opacity: 0; }
    40%  { opacity: 1; }
    100% { opacity: 0; }
}

.split-card__inner {
    position: relative;
    z-index: 1;
    width: 46%;
    min-width: 128px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.split-card__icons { display: flex; gap: 14px; font-size: 1.5rem; }
.split-card--dev   .split-card__icons { color: #4dd9ff; }
.split-card--video .split-card__icons { color: #c97dff; }

.split-card__title {
    font-size: 1.65rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.split-card__tags {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.split-card__tags li {
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    padding: 4px 12px;
    border-radius: 20px;
    display: inline-block;
    width: fit-content;
}

.split-card--dev .split-card__tags li {
    background: rgba(77, 217, 255, 0.1);
    color: #9eeeff;
    border: 1px solid rgba(77, 217, 255, 0.2);
}

.split-card--video .split-card__tags li {
    background: rgba(201, 125, 255, 0.1);
    color: #ddb5ff;
    border: 1px solid rgba(201, 125, 255, 0.2);
}

.split-card__cta {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.25s, transform 0.25s;
    margin-top: 4px;
}

.split-card--dev   .split-card__cta { color: #4dd9ff; }
.split-card--video .split-card__cta { color: #c97dff; }

.split-card:hover .split-card__cta { opacity: 1; transform: translateY(0); }
.split-card__cta i { margin: 0; }

/* =====================================================
   МОБИЛЬНАЯ АДАПТАЦИЯ
   ===================================================== */
@media (max-width: 600px) {
    .intro { padding: 48px 20px 36px; }

    .split-row {
        flex-direction: column;
        padding: 0 20px 48px;
    }

    .split-card:hover { flex: 1; transform: translateY(-2px); }
    .split-card__cta  { opacity: 1; transform: none; }

    .intro__name { font-size: 1.8rem; }
}

/* =====================================================
   ОСНОВНОЙ САЙТ
   ===================================================== */
.main-site {
    min-height: 100vh;
    background-color: #f4f4f9;
    color: #333;
}

.main-site--enter {
    animation: siteReveal 0.5s ease both;
}

@keyframes siteReveal {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* =====================================================
   КНОПКА «СМЕНИТЬ РАЗДЕЛ»
   ===================================================== */
.back-btn {
    display: inline-flex;
    text-decoration: none;
    align-items: center;
    gap: 8px;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--theme-color);
    background: rgba(var(--theme-color-rgb), 0.08);
    border: 1.5px solid rgba(var(--theme-color-rgb), 0.4);
    border-radius: 30px;
    cursor: pointer;
    padding: 9px 20px;
    margin-bottom: 32px;
    font-family: inherit;
    transition: all 0.25s ease;
    letter-spacing: 0.03em;
}

.back-btn i { margin: 0; }
.back-btn:hover {
    color: var(--theme-color);
    background: rgba(var(--theme-color-rgb), 0.15);
    border-color: rgba(var(--theme-color-rgb), 0.7);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(var(--theme-color-rgb), 0.25);
}

/* =====================================================
   КОНТЕЙНЕР И ШАПКА
   ===================================================== */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
}

header { text-align: center; margin-bottom: 40px; }

.profile-img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin: 0 auto 20px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.profile-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

h1 { font-size: 2.5rem; margin-bottom: 5px; color: #111; }
h2 { font-size: 1.1rem; color: #666; font-weight: 500; margin-bottom: 20px; }


/* =====================================================
   Кнопки главного сайта (2 ряда)
   ===================================================== */
.links-row {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.links-row i { margin-right: 8px; }

.btn {
    display: inline-block;
    padding: 10px 25px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    font-family: inherit;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-outline {
    background-color: transparent !important;
    color: rgba(150, 150, 165, 0.85);
    border: 2px solid rgba(150, 150, 165, 0.4);
}

.btn-outline:hover {
    background-color: rgba(150, 150, 165, 0.1) !important;
    color: rgba(180, 180, 195, 1);
    border-color: rgba(180, 180, 195, 0.6);
    transform: translateY(-2px);
}

/* YouTube такой же нейтральный, как GitHub */
.btn-outline-youtube {
    color: rgba(150, 150, 165, 0.85) !important;
    border-color: rgba(150, 150, 165, 0.4) !important;
}
.btn-outline-youtube:hover {
    background-color: rgba(150, 150, 165, 0.1) !important;
    color: rgba(180, 180, 195, 1) !important;
    border-color: rgba(180, 180, 195, 0.6) !important;
}

/* Telegram CTA — всегда голубой */
.btn-cta--tg {
    color: #4dd9ff !important;
    border-color: #4dd9ff !important;
}
.btn-cta--tg:hover {
    background-color: rgba(77, 217, 255, 0.1) !important;
    color: #4dd9ff !important;
    border-color: #4dd9ff !important;
}

/* Email CTA — всегда фиолетовый */
.btn-cta--email {
    color: #c97dff !important;
    border-color: #c97dff !important;
}
.btn-cta--email:hover {
    background-color: rgba(201, 125, 255, 0.1) !important;
    color: #c97dff !important;
    border-color: #c97dff !important;
}

/* Призыв к действию (Анимация подсветки) */
.btn-cta { position: relative; }
.btn-cta--tg { animation: pulseCTATg 2s infinite; }
.btn-cta--email { animation: pulseCTAEmail 2s infinite; animation-delay: 1s; }

@keyframes pulseCTATg {
    0% { box-shadow: 0 0 0 0 rgba(var(--theme-color-rgb), 0.4); }
    70% { box-shadow: 0 0 0 12px rgba(var(--theme-color-rgb), 0); }
    100% { box-shadow: 0 0 0 0 rgba(var(--theme-color-rgb), 0); }
}
@keyframes pulseCTAEmail {
    0% { box-shadow: 0 0 0 0 rgba(var(--theme-color-rgb), 0.4); }
    70% { box-shadow: 0 0 0 12px rgba(var(--theme-color-rgb), 0); }
    100% { box-shadow: 0 0 0 0 rgba(var(--theme-color-rgb), 0); }
}




/* =====================================================
   ПОРТФОЛИО
   ===================================================== */
.portfolio h3 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 1.8rem;
    color: #111;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.project-card {
    background: #fff;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    transition: transform 0.2s, box-shadow 0.2s;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
}

.project-card h4 { margin-bottom: 10px; font-size: 1.1rem; }
.project-card p  { color: #666; margin-bottom: 15px; font-size: 0.95rem; }

/* ── Стек технологий ── */
.project-card__stack {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
}

.project-card__stack span {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    padding: 3px 10px;
    border-radius: 20px;
    background: rgba(14, 128, 192, 0.08);
    color: #0e80c0;
    border: 1px solid rgba(14, 128, 192, 0.2);
    transition: background 0.2s, color 0.2s;
}

[data-mode="video"] .project-card__stack span {
    background: rgba(138, 48, 204, 0.08);
    color: #8a30cc;
    border-color: rgba(138, 48, 204, 0.2);
}

@media (prefers-color-scheme: dark) {
    .project-card__stack span {
        background: rgba(77, 217, 255, 0.08);
        color: #4dd9ff;
        border-color: rgba(77, 217, 255, 0.2);
    }
    [data-mode="video"] .project-card__stack span {
        background: rgba(201, 125, 255, 0.08);
        color: #c97dff;
        border-color: rgba(201, 125, 255, 0.2);
    }
}

/* ── Кнопка «Посмотреть код» ── */
.project-card__link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.88rem;
    letter-spacing: 0.03em;
    padding: 7px 16px;
    border-radius: 8px;
    border: 1.5px solid currentColor;
    color: #0e80c0;
    background: transparent;
    transition: background 0.22s ease, color 0.22s ease,
                box-shadow 0.22s ease, transform 0.2s ease;
}

[data-mode="video"] .project-card__link { color: #8a30cc; }

@media (prefers-color-scheme: dark) {
    .project-card__link             { color: #4dd9ff; }
    [data-mode="video"] .project-card__link { color: #c97dff; }
}

/* Два текста: обычный и hover — переключаются через clip */
.project-card__link-text,
.project-card__link-hover {
    display: block;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1),
                opacity   0.2s ease;
    white-space: nowrap;
}

.project-card__link-hover {
    position: absolute;
    left: 16px;
    opacity: 0;
    transform: translateY(8px);
}

.project-card__link-icon {
    font-size: 1rem;
    margin: 0;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    flex-shrink: 0;
}

/* Hover: скрываем «Посмотреть код», показываем «Открыть GitHub» */
.project-card__link:hover .project-card__link-text {
    opacity: 0;
    transform: translateY(-8px);
}

.project-card__link:hover .project-card__link-hover {
    opacity: 1;
    transform: translateY(0);
}

.project-card__link:hover .project-card__link-icon {
    transform: rotate(10deg) scale(1.15);
}

.project-card__link:hover {
    background: rgba(14, 128, 192, 0.1);
    box-shadow: 0 0 0 3px rgba(14, 128, 192, 0.12);
    transform: translateY(-1px);
}

[data-mode="video"] .project-card__link:hover {
    background: rgba(138, 48, 204, 0.1);
    box-shadow: 0 0 0 3px rgba(138, 48, 204, 0.12);
}

@media (prefers-color-scheme: dark) {
    .project-card__link:hover {
        background: rgba(77, 217, 255, 0.08);
        box-shadow: 0 0 0 3px rgba(77, 217, 255, 0.1);
    }
    [data-mode="video"] .project-card__link:hover {
        background: rgba(201, 125, 255, 0.08);
        box-shadow: 0 0 0 3px rgba(201, 125, 255, 0.1);
    }
}

.projects-content { animation: fadeInSlideUp 0.4s ease-out both; }

@keyframes fadeInSlideUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* =====================================================
   ВИДЕОМОНТАЖ — таб-переключатель
   ===================================================== */
.video-tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 36px;
    padding: 6px;
    background: rgba(155, 80, 255, 0.08);
    border: 1px solid rgba(155, 80, 255, 0.25);
    border-radius: 14px;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

.video-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 22px;
    border-radius: 10px;
    border: none;
    background: transparent;
    color: rgba(175, 120, 255, 0.85); 
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: background 0.22s ease, color 0.22s ease, box-shadow 0.22s ease;
    position: relative;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.video-tab i { margin: 0; font-size: 0.9rem; }

.video-tab__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 800;
    line-height: 1;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(155, 80, 255, 0.2);
    color: rgba(190, 140, 255, 0.95);
    transition: background 0.22s, color 0.22s;
}

.video-tab--active {
    background: linear-gradient(135deg, rgba(155, 80, 255, 0.25) 0%, rgba(120, 40, 230, 0.3) 100%);
    color: #f4ebff; 
    box-shadow: 0 2px 12px rgba(130, 40, 230, 0.25), inset 0 1px 0 rgba(255,255,255,0.08);
}

.video-tab--active .video-tab__count { background: rgba(155, 80, 255, 0.5); color: #ffffff; }
.video-tab:not(.video-tab--active):hover { background: rgba(155, 80, 255, 0.15); color: #d1a8ff; }

.video-tab-panel { animation: fadeInSlideUp 0.32s ease-out both; }
.video-tab-panel--hidden { display: none !important; }

@media (max-width: 480px) {
    .video-tab { padding: 8px 14px; font-size: 0.82rem; }
    .video-tab__count { width: 18px; height: 18px; font-size: 0.65rem; }
}

/* =====================================================
   ВИДЕОМОНТАЖ — портфолио и шоурилы
   ===================================================== */
.video-cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 28px;
    align-items: start; /* карточки не растягиваются по высоте соседних (вертикальных) */
}

.video-case-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    border: 1px solid rgba(0,0,0,0.06);
}

.video-case-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 36px rgba(180,80,255,0.18), 0 4px 16px rgba(0,0,0,0.1);
}

/* 16:9 embed */
.video-embed { position: relative; padding-bottom: 56.25%; height: 0; background: #000; }

.video-embed iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

.video-embed video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    background: #000;
}

.video-case-info { padding: 20px 22px 22px; }

.video-case-info h4 {
    font-size: 1.05rem;
    font-weight: 700;
    color: #111;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.video-case-info h4 i { margin: 0; color: #c97dff; font-size: 0.95rem; }
.video-case-info h4 .fa-youtube { color: #ff0000; }

.video-case-info p { font-size: 0.92rem; color: #666; line-height: 1.6; margin: 0 0 14px; }

/* ── Развёрнутое описание ролика: акты и титры ──
   Нужно, когда у работы есть сценарий, а не одна строка.
   Заголовки актов — h5, чтобы не ломать порядок заголовков
   на странице (h3 группа → h4 карточка → h5 акт). ── */
.video-story p { margin: 0 0 6px; }

.video-story__act {
    margin: 15px 0 5px;
    font-size: 0.92rem;
    font-weight: 800;
    color: #111;
    letter-spacing: -0.01em;
}

.video-credits {
    margin: 16px 0 14px;
    padding-top: 12px;
    border-top: 1px solid rgba(0, 0, 0, 0.09);
}

.video-credits p {
    margin: 0 0 4px;
    font-size: 0.84rem;
    line-height: 1.55;
}

.video-credits__label {
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #999;
    margin-right: 4px;
}

.video-story a,
.video-credits a,
.video-case-info p a {
    color: #8a30cc;
    font-weight: 700;
    text-decoration: none;
    border-bottom: 1px solid rgba(138, 48, 204, 0.35);
    transition: border-color 0.2s ease;
}

.video-story a:hover,
.video-credits a:hover,
.video-case-info p a:hover { border-bottom-color: #8a30cc; }

@media (prefers-color-scheme: dark) {
    .video-story__act    { color: #f0f0f0; }
    .video-credits       { border-top-color: rgba(255, 255, 255, 0.1); }
    .video-credits p     { color: #999; }
    .video-credits__label { color: #7d7d90; }

    .video-story a,
    .video-credits a,
    .video-case-info p a {
        color: #c97dff;
        border-bottom-color: rgba(201, 125, 255, 0.35);
    }

    .video-story a:hover,
    .video-credits a:hover,
    .video-case-info p a:hover { border-bottom-color: #c97dff; }
}

/* Ссылка на исходную публикацию — стоит в одном ряду
   с бейджами источника, поэтому и выглядит как бейдж,
   но с рамкой и стрелкой «наружу» */
.video-post-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 20px;
    color: #8a30cc;
    background: rgba(138, 48, 204, 0.07);
    border: 1px solid rgba(138, 48, 204, 0.3);
    text-decoration: none;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.video-post-link i { margin: 0; font-size: 0.7rem; }

.video-post-link:hover {
    background: rgba(138, 48, 204, 0.14);
    border-color: rgba(138, 48, 204, 0.6);
}

@media (prefers-color-scheme: dark) {
    .video-post-link {
        color: #c97dff;
        background: rgba(201, 125, 255, 0.1);
        border-color: rgba(201, 125, 255, 0.32);
    }
    .video-post-link:hover {
        background: rgba(201, 125, 255, 0.18);
        border-color: rgba(201, 125, 255, 0.65);
    }
}

/* Бейдж источника видео */
.video-source-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 20px;
}

.video-source-badge i { margin: 0; font-size: 0.75rem; }

.video-source-badge--yt {
    background: rgba(255, 0, 0, 0.1);
    color: #cc0000;
    border: 1px solid rgba(255, 0, 0, 0.2);
}

@media (prefers-color-scheme: dark) {
    .video-case-card {
        background: #1a1a2e;
        border-color: rgba(201,125,255,0.12);
        box-shadow: 0 4px 20px rgba(0,0,0,0.4);
    }

    .video-case-card:hover { box-shadow: 0 12px 40px rgba(180,80,255,0.25), 0 4px 16px rgba(0,0,0,0.5); }

    .video-case-info h4 { color: #f0f0f0; }
    .video-case-info p  { color: #999; }

    .video-source-badge--yt    { color: #ff5555; background: rgba(255,0,0,0.12); }
}

@media (max-width: 600px) {
    .video-cases-grid { grid-template-columns: 1fr; gap: 20px; }
}

/* =====================================================
   ===================================================== */
footer {
    text-align: center;
    margin-top: 60px;
    padding-top: 24px;
    border-top: 1px solid #ddd;
    color: #888;
    font-size: 0.9rem;
}

/* ── Блок фриланс-иконок ── */
.footer-freelance {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
}

.footer-freelance__label {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    color: rgba(0,0,0,0.28);
}

.footer-freelance__links {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-fl-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 14px 6px 10px;
    border-radius: 30px;
    border: 1.5px solid currentColor;
    text-decoration: none;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    transition: background 0.22s ease, transform 0.2s ease, box-shadow 0.22s ease;
}

.footer-fl-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.footer-fl-pill:hover {
    transform: translateY(-2px);
}

/* Profi.ru — красный */
.footer-fl-pill--profi {
    color: #c0231a;
}
.footer-fl-pill--profi:hover {
    background: rgba(192, 35, 26, 0.08);
    box-shadow: 0 0 0 3px rgba(192, 35, 26, 0.1);
}

/* FL.ru — зелёный */
.footer-fl-pill--fl {
    color: #1a8a4a;
}
.footer-fl-pill--fl:hover {
    background: rgba(26, 138, 74, 0.08);
    box-shadow: 0 0 0 3px rgba(26, 138, 74, 0.1);
}

/* Kwork — жёлтый */
.footer-fl-pill--kwork {
    color: #a07800;
}
.footer-fl-pill--kwork:hover {
    background: rgba(160, 120, 0, 0.08);
    box-shadow: 0 0 0 3px rgba(160, 120, 0, 0.1);
}

/* =====================================================
   ФРИЛАНС — СТАРТОВЫЙ ЭКРАН
   ===================================================== */
.entry-freelance {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding-bottom: 40px;
    margin-top: 8px;
}

.entry-freelance__label {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.2);
}

.entry-freelance__links {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

/* На стартовом экране переопределяем цвета под тёмный фон */
.entry-freelance .footer-fl-pill--profi {
    color: #ff5f57;
}
.entry-freelance .footer-fl-pill--profi:hover {
    background: rgba(255, 95, 87, 0.08);
    box-shadow: 0 0 0 3px rgba(255, 95, 87, 0.1);
}

.entry-freelance .footer-fl-pill--fl {
    color: #34d475;
}
.entry-freelance .footer-fl-pill--fl:hover {
    background: rgba(52, 212, 117, 0.08);
    box-shadow: 0 0 0 3px rgba(52, 212, 117, 0.1);
}

.entry-freelance .footer-fl-pill--kwork {
    color: #ffd633;
}
.entry-freelance .footer-fl-pill--kwork:hover {
    background: rgba(255, 214, 51, 0.08);
    box-shadow: 0 0 0 3px rgba(255, 214, 51, 0.1);
}

@media (max-width: 600px) {
    .entry-freelance { padding-bottom: 32px; }
}

@media (prefers-color-scheme: dark) {
    .footer-freelance__label { color: rgba(255,255,255,0.25); }

    .footer-fl-pill--profi { color: #ff5f57; }
    .footer-fl-pill--profi:hover { background: rgba(255,95,87,0.08); box-shadow: 0 0 0 3px rgba(255,95,87,0.1); }

    .footer-fl-pill--fl { color: #34d475; }
    .footer-fl-pill--fl:hover { background: rgba(52,212,117,0.08); box-shadow: 0 0 0 3px rgba(52,212,117,0.1); }

    .footer-fl-pill--kwork { color: #ffd633; }
    .footer-fl-pill--kwork:hover { background: rgba(255,214,51,0.08); box-shadow: 0 0 0 3px rgba(255,214,51,0.1); }
}

/* =====================================================
   MODAL
   ===================================================== */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0; top: 0;
    width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.65);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    align-items: center;
    justify-content: center;
}

/* Открытие/закрытие — только через класс, без inline-стилей */
.modal--open { display: flex; }

.modal-content {
    background-color: #fff;
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    animation: slideDown 0.3s ease;
}

.edu-modal-content {
    background: linear-gradient(145deg, #f8f9fc 0%, #ffffff 60%, #f4f6fb 100%);
    border: 1px solid rgba(0,0,0,0.08);
    box-shadow: 0 20px 60px rgba(0,0,0,0.15), 0 0 0 1px rgba(0,0,0,0.04);
}

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

.close-btn {
    position: absolute;
    top: 15px; right: 20px;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    color: #888;
    background: none;
    border: 0;
    padding: 4px 8px;
    border-radius: 8px;
}

.close-btn:focus-visible {
    outline: 2px solid var(--theme-color, #4dd9ff);
    outline-offset: 2px;
}

.edu-modal-content .close-btn { color: rgba(0,0,0,0.35); }
.edu-modal-content .close-btn:hover { color: #111; }
.close-btn:hover { color: #000; }

.edu-modal-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: #111111;
    letter-spacing: -0.01em;
    margin-bottom: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.edu-modal-title i { color: #4dd9ff; margin: 0; font-size: 1.1rem; }

.edu-cards-container { margin-top: 20px; }

/* ─── Карточки образования с анимацией оцветения стекла ─── */
.edu-card {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    background: rgba(0,0,0,0.025);
    padding: 18px;
    border-radius: 14px;
    margin-bottom: 14px;
    border: 1px solid rgba(0,0,0,0.07);
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.edu-card__shine {
    position: absolute;
    inset: 0;
    border-radius: 14px;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

@keyframes glassColorSpo {
    0%   { opacity: 0; background: radial-gradient(ellipse at 20% 50%, rgba(77,217,255,0.0) 0%, transparent 70%); }
    40%  { opacity: 1; background: radial-gradient(ellipse at 20% 50%, rgba(77,217,255,0.18) 0%, transparent 65%); }
    100% { opacity: 1; background: radial-gradient(ellipse at 20% 50%, rgba(77,217,255,0.10) 0%, transparent 65%); }
}

@keyframes glassColorBachelor {
    0%   { opacity: 0; background: radial-gradient(ellipse at 20% 50%, rgba(147,112,255,0.0) 0%, transparent 70%); }
    40%  { opacity: 1; background: radial-gradient(ellipse at 20% 50%, rgba(147,112,255,0.18) 0%, transparent 65%); }
    100% { opacity: 1; background: radial-gradient(ellipse at 20% 50%, rgba(147,112,255,0.10) 0%, transparent 65%); }
}

.edu-modal-content .edu-cards-container .edu-card--spo .edu-card__shine {
    animation: glassColorSpo 0.8s ease 0.15s forwards;
}

.edu-modal-content .edu-cards-container .edu-card--bachelor .edu-card__shine {
    animation: glassColorBachelor 0.8s ease 0.35s forwards;
}

.edu-card--spo:hover {
    border-color: rgba(77,217,255,0.3);
    box-shadow: 0 0 20px rgba(77,217,255,0.08), inset 0 0 20px rgba(77,217,255,0.04);
    transform: translateY(-2px);
}

.edu-card--bachelor:hover {
    border-color: rgba(147,112,255,0.3);
    box-shadow: 0 0 20px rgba(147,112,255,0.08), inset 0 0 20px rgba(147,112,255,0.04);
    transform: translateY(-2px);
}

.edu-card--spo:hover .edu-card__shine {
    opacity: 1;
    background: radial-gradient(ellipse at 20% 50%, rgba(77,217,255,0.22) 0%, transparent 65%);
}

.edu-card--bachelor:hover .edu-card__shine {
    opacity: 1;
    background: radial-gradient(ellipse at 20% 50%, rgba(147,112,255,0.22) 0%, transparent 65%);
}

.edu-card--spo    .edu-icon { color: #4dd9ff; }
.edu-card--bachelor .edu-icon { color: #9370ff; }

.edu-icon { font-size: 1.5rem; padding-top: 3px; position: relative; z-index: 1; }
.edu-info { position: relative; z-index: 1; }

.edu-institution {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: rgba(0,0,0,0.38);
    margin-bottom: 5px;
}

.edu-info h3 { margin-bottom: 4px; color: #111111; font-size: 1rem; font-weight: 700; }

.edu-info h5 {
    color: rgba(0,0,0,0.45);
    font-weight: 600;
    margin-bottom: 5px;
    font-size: 0.82rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.edu-info h5 i { margin: 0; font-size: 0.75rem; opacity: 0.7; }
.edu-card--spo    .edu-info h5 i { color: #4dd9ff; }
.edu-card--bachelor .edu-info h5 i { color: #9370ff; }

.edu-info p { font-size: 0.88rem; color: rgba(0,0,0,0.38); margin: 0; }

#eduModal:not([style*="flex"]) .edu-card__shine { animation: none; opacity: 0; }

/* =====================================================
   Анимированная схема связей стека технологий
   ===================================================== */
.chart-wrap {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 57%;
    pointer-events: none;
    z-index: 2;
    display: flex;
    align-items: center;
}

.the-chart { width: 100%; height: 100%; overflow: visible; }

.chart-edge {
    stroke-dasharray: 450;
    stroke-dashoffset: 450;
    opacity: 0;
    transition: stroke-dashoffset 0.6s cubic-bezier(0.4, 0, 0.2, 1) calc(var(--di) * 0.09s),
                opacity           0.15s ease                          calc(var(--di) * 0.09s);
}

.split-card:hover .chart-edge { stroke-dashoffset: 0; opacity: 1; }

.chart-edge--glow {
    opacity: 0;
    transition: stroke-dashoffset 0.6s cubic-bezier(0.4, 0, 0.2, 1) calc(var(--di) * 0.09s),
                opacity           0.2s ease                          calc(var(--di) * 0.09s);
}

.split-card:hover .chart-edge--glow { opacity: 0.7; }

.chart-hub { opacity: 0; transition: opacity 0.3s ease 0.06s; }
.split-card:hover .chart-hub { opacity: 1; }

.chart-node {
    opacity: 0;
    transform-box:    fill-box;
    transform-origin: center;
    transform: scale(0.35);
    transition: opacity   0.35s ease                              calc(0.2s + var(--ni) * 0.1s),
                transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) calc(0.2s + var(--ni) * 0.1s);
}

.split-card:hover .chart-node { opacity: 1; transform: scale(1); }

@media (max-width: 600px) {
    .chart-wrap         { display: none; }
    .split-card__inner  { width: 100%; min-width: 0; }
}

/* ── Контейнер для нескольких бейджей на одной карточке ── */
.video-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* ── Тематические бейджи кейсов ── */
.video-source-badge--instagram {
    background: rgba(225, 48, 108, 0.08);
    color: #c1275a;
    border: 1px solid rgba(225, 48, 108, 0.25);
}

.video-source-badge--tiktok {
    background: rgba(0, 0, 0, 0.06);
    color: #222;
    border: 1px solid rgba(0, 0, 0, 0.2);
}

.video-source-badge--telegram {
    background: rgba(34, 158, 217, 0.08);
    color: #1786bd;
    border: 1px solid rgba(34, 158, 217, 0.28);
}

.video-source-badge--review {
    background: rgba(46, 184, 92, 0.08);
    color: #1f8a48;
    border: 1px solid rgba(46, 184, 92, 0.28);
}

.video-source-badge--dynamic {
    background: rgba(255, 122, 0, 0.08);
    color: #c46000;
    border: 1px solid rgba(255, 122, 0, 0.28);
}

@media (prefers-color-scheme: dark) {
    .video-source-badge--instagram { color: #ff6b9d; background: rgba(225, 48, 108, 0.12); }
    .video-source-badge--tiktok    { color: #eee; background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.25); }
    .video-source-badge--telegram  { color: #4db8e8; background: rgba(34, 158, 217, 0.12); }
    .video-source-badge--review    { color: #4dd985; background: rgba(46, 184, 92, 0.12); }
    .video-source-badge--dynamic   { color: #ffab5e; background: rgba(255, 122, 0, 0.12); }
}

/* =====================================================
   КАРТОЧКА «ЗОЛОТОЕ СЕЧЕНИЕ»
   (метка автоматически снимается скриптом 31.08.2026)
   ===================================================== */

/* Вертикальный embed для Shorts (соотношение 9:16) */
.video-embed--vertical { padding-bottom: 177.78%; }

/* ── Заголовки групп внутри вкладки «Портфолио» ── */
.video-group-title {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 24px;
    font-size: 1.35rem;
    font-weight: 800;
    color: #111;
}

.video-group-title i { margin: 0; color: #c97dff; font-size: 1.15rem; }

.video-group-title__hint {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #8a5fc0;
    background: rgba(201, 125, 255, 0.12);
    border: 1px solid rgba(201, 125, 255, 0.3);
    padding: 3px 10px;
    border-radius: 20px;
}

.video-group-title--gap { margin-top: 52px; }

@media (prefers-color-scheme: dark) {
    .video-group-title { color: #e0e0e0; }
    .video-group-title__hint { color: #d0a8ff; background: rgba(201, 125, 255, 0.1); }
}

/* Сетка коротких (вертикальных) видео: три узкие колонки по центру */
.video-cases-grid--shorts {
    grid-template-columns: repeat(auto-fit, minmax(240px, 340px));
    justify-content: center;
}

@media (max-width: 600px) {
    .video-cases-grid--shorts { grid-template-columns: 1fr; }
    .video-group-title { font-size: 1.15rem; }
    .video-group-title--gap { margin-top: 40px; }
}

/* Карточка с вертикальным (коротким) видео:
   уже обычной и центрируется в своей ячейке сетки,
   чтобы не раздувать высоту ряда */
.video-case-card--vertical {
    width: 100%;
    max-width: 340px;
    justify-self: center;
}

@media (max-width: 600px) {
    .video-case-card--vertical { max-width: 320px; margin: 0 auto; }
}

.video-case-card--golden {
    position: relative;
    border: 1px solid rgba(212, 175, 55, 0.55);
    box-shadow:
        0 0 0 1px rgba(212, 175, 55, 0.25),
        0 6px 26px rgba(212, 175, 55, 0.22),
        0 4px 20px rgba(0, 0, 0, 0.08);
}

.video-case-card--golden:hover {
    transform: translateY(-6px);
    box-shadow:
        0 0 0 1px rgba(212, 175, 55, 0.4),
        0 14px 40px rgba(212, 175, 55, 0.3),
        0 4px 16px rgba(0, 0, 0, 0.1);
}

/* Лента-метка */
.golden-ribbon {
    position: absolute;
    top: 14px;
    left: -8px;
    z-index: 5;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 14px 6px 12px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #4a3600;
    background: linear-gradient(120deg, #f6d98a 0%, #e8b923 45%, #f9e7ad 70%, #d4a017 100%);
    background-size: 200% 100%;
    border-radius: 0 20px 20px 0;
    box-shadow: 0 3px 12px rgba(180, 140, 20, 0.45);
    animation: golden-shimmer 3.2s linear infinite;
}

/* «хвостик» ленты слева */
.golden-ribbon::before {
    content: "";
    position: absolute;
    left: 0;
    bottom: -7px;
    border: 4px solid transparent;
    border-top-color: #a67c00;
    border-right-color: #a67c00;
}

.golden-ribbon__phi {
    font-family: 'Space Mono', monospace;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1;
}

@keyframes golden-shimmer {
    0%   { background-position: 0% 0; }
    100% { background-position: 200% 0; }
}

@media (prefers-color-scheme: dark) {
    .video-case-card--golden {
        border-color: rgba(230, 190, 80, 0.45);
        box-shadow:
            0 0 0 1px rgba(230, 190, 80, 0.2),
            0 6px 28px rgba(212, 175, 55, 0.18),
            0 4px 20px rgba(0, 0, 0, 0.4);
    }
    .video-case-card--golden:hover {
        box-shadow:
            0 0 0 1px rgba(230, 190, 80, 0.35),
            0 14px 44px rgba(212, 175, 55, 0.28),
            0 4px 16px rgba(0, 0, 0, 0.5);
    }
}

@media (max-width: 600px) {
    .golden-ribbon { top: 10px; font-size: 0.66rem; padding: 5px 12px 5px 10px; }
}

/* =====================================================
   ТЁМНАЯ ТЕМА (основной сайт)
   ===================================================== */
@media (prefers-color-scheme: dark) {
    .main-site { background-color: #121212; color: #e0e0e0; }

    h1 { color: #fff; }
    h2 { color: #bbb; }

    .portfolio h3 { color: #e0e0e0; }

    .project-card, .modal-content {
        background-color: #1e1e1e;
        box-shadow: 0 4px 6px rgba(0,0,0,0.3);
    }

    .project-card h4 { color: #e0e0e0; }
    .project-card p  { color: #aaa; }

    .close-btn { color: #bbb; }
    .close-btn:hover { color: #fff; }

    footer { border-top-color: #333; color: #666; }
    .bio { color: #888; }

    /* ── Тёмная тема: модалка образования ── */
    .edu-modal-content {
        background: linear-gradient(145deg, #0d1117 0%, #111827 60%, #0d1117 100%);
        border: 1px solid rgba(255,255,255,0.08);
        box-shadow: 0 20px 60px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.04);
    }

    .edu-modal-title { color: #ffffff; }

    .edu-modal-content .close-btn { color: rgba(255,255,255,0.4); }
    .edu-modal-content .close-btn:hover { color: #fff; }

    .edu-card { background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.07); }

    .edu-institution { color: rgba(255,255,255,0.35); }
    .edu-info h3 { color: #f0f0f0; }
    .edu-info h5 { color: rgba(255,255,255,0.45); }
    .edu-info p { color: rgba(255,255,255,0.35); }
}
/* =====================================================
   ОКНО «ВИДЕО С РАЗНЫХ ПЛОЩАДОК»
   Открывается один раз за сессию при входе на страницу
   видеомонтажа (собирается в js/ui.js)
   ===================================================== */
.notice-modal {
    max-width: 430px;
    padding: 34px 30px 28px;
    text-align: center;
    background: linear-gradient(145deg, #f8f9fc 0%, #ffffff 60%, #f4f6fb 100%);
    border: 1px solid rgba(0,0,0,0.08);
    box-shadow: 0 20px 60px rgba(0,0,0,0.18), 0 0 0 1px rgba(0,0,0,0.04);
}

/* Иконка в кружке над заголовком */
.notice-modal__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    margin: 0 auto 16px;
    font-size: 1.3rem;
    color: #8a30cc;
    background: rgba(138, 48, 204, 0.1);
    border: 1px solid rgba(138, 48, 204, 0.22);
    border-radius: 50%;
}

.notice-modal__icon i { margin: 0; }

.notice-modal__title {
    margin: 0 0 10px;
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    color: #111;
}

.notice-modal__text {
    margin: 0 0 18px;
    font-size: 0.92rem;
    line-height: 1.6;
    color: #5a5a68;
}

.notice-modal__platforms {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-bottom: 20px;
}

/* Предупреждение про VPN — отдельной плашкой */
.notice-modal__warn {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0 0 22px;
    padding: 13px 15px;
    text-align: left;
    font-size: 0.86rem;
    line-height: 1.55;
    color: #8a5514;
    background: rgba(255, 176, 60, 0.13);
    border: 1px solid rgba(255, 176, 60, 0.35);
    border-radius: 12px;
}

.notice-modal__warn i {
    flex-shrink: 0;
    margin: 2px 0 0;
    font-size: 0.95rem;
    color: #e08a2b;
}

.notice-modal__ok {
    width: 100%;
    max-width: 220px;
    padding: 12px 26px;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 700;
    color: #ffffff;
    background: linear-gradient(135deg, #8a30cc 0%, #b45cff 100%);
    border: 0;
    border-radius: 10px;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(138, 48, 204, 0.3);
    transition: transform 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;
}

.notice-modal__ok:hover {
    transform: translateY(-2px);
    filter: brightness(1.07);
    box-shadow: 0 10px 24px rgba(138, 48, 204, 0.38);
}

.notice-modal__ok:focus-visible {
    outline: 2px solid #8a30cc;
    outline-offset: 3px;
}

/* Крестик — ровный кружок в углу */
.notice-modal .close-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    top: 12px;
    right: 14px;
    width: 34px;
    height: 34px;
    padding: 0;
    font-size: 24px;
    color: rgba(0,0,0,0.35);
    border-radius: 50%;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.notice-modal .close-btn:hover {
    color: #111;
    background: rgba(0,0,0,0.06);
}

@media (prefers-color-scheme: dark) {
    .notice-modal {
        background: linear-gradient(145deg, #0d1117 0%, #111827 60%, #0d1117 100%);
        border-color: rgba(255,255,255,0.08);
        box-shadow: 0 20px 60px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.04);
    }

    .notice-modal__icon {
        color: #c97dff;
        background: rgba(201, 125, 255, 0.12);
        border-color: rgba(201, 125, 255, 0.25);
    }

    .notice-modal__title { color: #ffffff; }
    .notice-modal__text  { color: #9a9aa8; }

    .notice-modal__warn {
        color: #f0c088;
        background: rgba(255, 176, 60, 0.1);
        border-color: rgba(255, 176, 60, 0.28);
    }

    .notice-modal__ok {
        background: linear-gradient(135deg, #8a30cc 0%, #c97dff 100%);
        box-shadow: 0 6px 20px rgba(155, 80, 255, 0.35);
    }

    .notice-modal .close-btn { color: rgba(255,255,255,0.4); }
    .notice-modal .close-btn:hover { color: #fff; background: rgba(255,255,255,0.08); }
}

@media (max-width: 600px) {
    .notice-modal { padding: 28px 20px 24px; }
    .notice-modal__icon  { width: 48px; height: 48px; font-size: 1.15rem; }
    .notice-modal__title { font-size: 1.05rem; }
    .notice-modal__text  { font-size: 0.88rem; }
    .notice-modal__warn  { font-size: 0.82rem; }
    .notice-modal__ok    { max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
    .notice-modal { animation: none; }
    .notice-modal__ok:hover { transform: none; }
}
/* =====================================================
   АКТИВНОСТЬ НА GITHUB (лента точек: 1 точка = 1 неделя)
   ===================================================== */
.gh-contrib {
    max-width: 600px;
    margin: 0 auto 28px;
    padding: 14px 16px 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(150, 150, 165, 0.18);
    text-align: left;
}

.gh-contrib__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.gh-contrib__title {
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgba(150, 150, 165, 0.95);
}
.gh-contrib__title i { margin-right: 7px; }

.gh-contrib__last {
    font-size: 0.78rem;
    color: rgba(150, 150, 165, 0.75);
}
.gh-contrib__last b { color: var(--theme-color); font-weight: 700; }
.gh-contrib__last-sub { color: rgba(150, 150, 165, 0.5); }

.gh-contrib__pulse {
    font-size: 0.42rem;
    margin-right: 6px;
    vertical-align: middle;
    color: var(--theme-color);
    animation: ghPulse 2.4s ease-in-out infinite;
}
@keyframes ghPulse {
    0%, 100% { opacity: 0.35; }
    50%      { opacity: 1; }
}

/* ── Лента ── */
.gh-contrib__scroll {
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 2px;
    scrollbar-width: thin;
    scrollbar-color: rgba(150,150,165,0.3) transparent;
}
.gh-contrib__scroll::-webkit-scrollbar { height: 4px; }
.gh-contrib__scroll::-webkit-scrollbar-thumb {
    background: rgba(150, 150, 165, 0.25);
    border-radius: 4px;
}

.gh-contrib__track {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    min-height: 40px;
    width: max-content;
    min-width: 100%;
}

/* Группа = месяц */
.gh-contrib__month {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    position: relative;
}
.gh-contrib__month + .gh-contrib__month::before {
    content: "";
    position: absolute;
    left: -6px;
    top: 1px;
    height: 12px;
    width: 1px;
    background: rgba(150, 150, 165, 0.18);
}

.gh-contrib__dots { display: flex; gap: 5px; }

.gh-contrib__month-label {
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: rgba(150, 150, 165, 0.5);
    white-space: nowrap;
}

/* ── Точка недели ── */
.gh-contrib__dot {
    width: 13px;
    height: 13px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    background: rgba(150, 150, 165, 0.16);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    animation: ghDotIn 0.4s ease backwards;
    animation-delay: calc(var(--i, 0) * 12ms);
}
.gh-contrib__dot[data-level="1"] { background: rgba(var(--theme-color-rgb), 0.3); }
.gh-contrib__dot[data-level="2"] { background: rgba(var(--theme-color-rgb), 0.5); }
.gh-contrib__dot[data-level="3"] { background: rgba(var(--theme-color-rgb), 0.75); }
.gh-contrib__dot[data-level="4"] {
    background: rgba(var(--theme-color-rgb), 1);
    box-shadow: 0 0 8px rgba(var(--theme-color-rgb), 0.45);
}

.gh-contrib__dot:hover,
.gh-contrib__dot:focus-visible {
    transform: scale(1.45);
    outline: none;
    box-shadow: 0 0 0 3px rgba(var(--theme-color-rgb), 0.18);
}

@keyframes ghDotIn {
    from { opacity: 0; transform: scale(0.4); }
    to   { opacity: 1; transform: scale(1); }
}

/* ── Легенда ── */
.gh-contrib__legend {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
    font-size: 0.68rem;
    color: rgba(150, 150, 165, 0.45);
}
.gh-contrib__scale { display: inline-flex; align-items: center; gap: 4px; }
.gh-contrib__scale i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    background: rgba(150, 150, 165, 0.16);
}
.gh-contrib__scale i[data-level="1"] { background: rgba(var(--theme-color-rgb), 0.3); }
.gh-contrib__scale i[data-level="2"] { background: rgba(var(--theme-color-rgb), 0.5); }
.gh-contrib__scale i[data-level="3"] { background: rgba(var(--theme-color-rgb), 0.75); }
.gh-contrib__scale i[data-level="4"] { background: rgba(var(--theme-color-rgb), 1); }
.gh-contrib__scale i:first-of-type { margin-left: 4px; }
.gh-contrib__scale i:last-of-type  { margin-right: 4px; }

/* ── Загрузка / ошибка ── */
.gh-contrib--loading .gh-contrib__track {
    border-radius: 8px;
    background: linear-gradient(90deg,
        rgba(150,150,165,0.06) 25%,
        rgba(150,150,165,0.14) 37%,
        rgba(150,150,165,0.06) 63%);
    background-size: 400% 100%;
    animation: ghSkeleton 1.4s ease infinite;
}
@keyframes ghSkeleton {
    0%   { background-position: 100% 50%; }
    100% { background-position: 0 50%; }
}

.gh-contrib__fallback {
    font-size: 0.78rem;
    color: rgba(150, 150, 165, 0.7);
    text-decoration: none;
    border-bottom: 1px dashed rgba(150, 150, 165, 0.4);
}
.gh-contrib__fallback:hover { color: var(--theme-color); }

/* ── Подсказка при наведении ── */
.gh-tip {
    position: fixed;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 8px 11px;
    border-radius: 10px;
    background: rgba(22, 22, 30, 0.97);
    border: 1px solid rgba(var(--theme-color-rgb, 150, 150, 165), 0.3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    pointer-events: none;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.16s ease, transform 0.16s ease;
    white-space: nowrap;
}
.gh-tip--visible { opacity: 1; transform: translateY(0); }
.gh-tip--below   { transform: translateY(-4px); }
.gh-tip--below.gh-tip--visible { transform: translateY(0); }
.gh-tip b    { font-size: 0.78rem; color: #fff; font-weight: 700; }
.gh-tip span { font-size: 0.7rem; color: rgba(255, 255, 255, 0.45); }

@media (prefers-color-scheme: light) {
    .gh-contrib__title { color: #555; }
    .gh-contrib__last  { color: #777; }
    .gh-contrib { background: rgba(0, 0, 0, 0.02); }
}

@media (max-width: 600px) {
    .gh-contrib { margin-bottom: 24px; padding: 12px; }
    .gh-contrib__head { justify-content: center; text-align: center; }
    .gh-contrib__dot { width: 11px; height: 11px; }
    .gh-contrib__track { gap: 10px; }
    .gh-contrib__legend { justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
    .gh-contrib__dot { animation: none; }
    .gh-contrib__pulse { animation: none; opacity: 1; }
}

/* ── Репозитории внутри подсказки ── */
.gh-tip__repos {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 7px;
    padding-top: 7px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.gh-tip__repo {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
}
.gh-tip__repo i {
    font-size: 0.66rem;
    color: rgba(var(--theme-color-rgb), 0.9);
    width: 11px;
    text-align: center;
}

.gh-tip__repo--private {
    font-size: 0.64rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    color: #ffc861;
}
.gh-tip__repo--private i { color: #ffc861; }

.gh-tip__more {
    font-size: 0.66rem;
    color: rgba(255, 255, 255, 0.35);
    padding-left: 17px;
}

/* =====================================================
   ШАПКА РАЗДЕЛА: «На главную» + аватар
   (имя, ник, подзаголовок и bio убраны)
   ===================================================== */
.page-head {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 28px;
    text-align: left;
}

.page-head .back-btn { margin-bottom: 0; }

/* Компактный аватар рядом с кнопкой */
.profile-img--compact {
    width: 54px;
    height: 54px;
    margin: 0;
    flex-shrink: 0;
    border: 2px solid rgba(var(--theme-color-rgb), 0.35);
    box-shadow: 0 4px 14px rgba(var(--theme-color-rgb), 0.18);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.profile-img--compact:hover {
    transform: translateY(-2px) scale(1.04);
    border-color: rgba(var(--theme-color-rgb), 0.7);
    box-shadow: 0 6px 20px rgba(var(--theme-color-rgb), 0.3);
}

/* В мобильной версии — аватар в правом углу */
@media (max-width: 600px) {
    .page-head {
        justify-content: space-between;
        gap: 10px;
        margin-bottom: 22px;
    }
    .profile-img--compact { width: 44px; height: 44px; }
    .page-head .back-btn { padding: 8px 16px; font-size: 0.82rem; }
}

/* =====================================================
   КОНТАКТЫ В ПОДВАЛЕ (перенесены из шапки)
   ===================================================== */
.footer-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-bottom: 30px;
}

.footer-links .btn {
    padding: 9px 20px;
    font-size: 0.92rem;
}

@media (max-width: 600px) {
    .footer-links { gap: 10px; margin-bottom: 24px; }
    .footer-links .btn { padding: 8px 16px; font-size: 0.86rem; }
}

/* =====================================================
   ФОН РАЗДЕЛА «ВИДЕОМОНТАЖ» — медленная лента превью
   ===================================================== */

/* Фон переезжает на <body>, чтобы фиксированный слой
   не зависел от transform-анимации .main-site */
body[data-mode="video"] { background-color: #f4f4f9; }
body[data-mode="video"] .main-site { background-color: transparent; }

@media (prefers-color-scheme: dark) {
    body[data-mode="video"] { background-color: #121212; }
}

.video-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 20px;
    padding: 0 20px;
    overflow: hidden;
    pointer-events: none;
    user-select: none;
    opacity: 0;
    transition: opacity 1.4s ease;
    /* мягко гасим края, чтобы фон не спорил с контентом */
    -webkit-mask-image: radial-gradient(ellipse 90% 80% at 50% 45%, #000 20%, transparent 82%);
            mask-image: radial-gradient(ellipse 90% 80% at 50% 45%, #000 20%, transparent 82%);
}

.video-bg--ready { opacity: 0.07; }

@media (prefers-color-scheme: dark) {
    .video-bg--ready { opacity: 0.11; }
}

.video-bg__col {
    flex: 1 1 0;
    min-width: 0;
    animation-name: vbgScrollUp;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
    will-change: transform;
}

.video-bg__col--down { animation-name: vbgScrollDown; }

/* margin вместо gap — иначе сдвиг на -50% не будет бесшовным */
.video-bg__thumb {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    margin-bottom: 20px;
    object-fit: cover;
    border-radius: 12px;
    filter: grayscale(0.4) blur(1px) contrast(1.05);
}

@keyframes vbgScrollUp {
    from { transform: translate3d(0, 0, 0); }
    to   { transform: translate3d(0, -50%, 0); }
}

@keyframes vbgScrollDown {
    from { transform: translate3d(0, -50%, 0); }
    to   { transform: translate3d(0, 0, 0); }
}

/* Контент всегда поверх фона */
body[data-mode="video"] .main-site {
    position: relative;
    z-index: 1;
}

@media (max-width: 900px) {
    .video-bg { gap: 14px; padding: 0 14px; }
    .video-bg__thumb { margin-bottom: 14px; }
    .video-bg__col:nth-child(n + 4) { display: none; }
}

@media (max-width: 600px) {
    .video-bg__col:nth-child(n + 3) { display: none; }
    .video-bg--ready { opacity: 0.06; }
}

@media (prefers-reduced-motion: reduce) {
    .video-bg { display: none; }
}


/* =====================================================
   17. ПАПКИ ТИПОВ РОЛИКОВ
   -----------------------------------------------------
   Каждый тип видео — жёлтая папка. Наведение приоткрывает
   переднюю створку, нажатие раскрывает её сильнее и
   показывает ролики по два в ряд.

   Створка — обычный блок с transform-origin у нижнего
   края; наклон делает rotateX, объём даёт perspective
   на родителе .folder. Никаких картинок.
   ===================================================== */
.folders__lead {
    text-align: center;
    font-size: 0.88rem;
    color: #777;
    margin: -6px 0 22px;
}

.folders {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
    margin-bottom: 34px;
}

.folder-card {
    position: relative;
    /* четыре папки должны умещаться в ряд внутри контейнера 800px */
    width: 172px;
    padding: 14px 10px 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: none;
    border: 0;
    border-radius: 18px;
    cursor: pointer;
    text-align: center;
    transition: transform 0.25s ease, background 0.25s ease;
}

.folder-card:hover { transform: translateY(-4px); background: rgba(138, 48, 204, 0.07); }

.folder-card[aria-expanded="true"] {
    background: rgba(138, 48, 204, 0.1);
    box-shadow: inset 0 0 0 1px rgba(138, 48, 204, 0.28);
}

.folder-card:focus-visible {
    outline: 2px solid #8a30cc;
    outline-offset: 3px;
}

/* ── Сама папка ── */
.folder {
    position: relative;
    width: 118px;
    height: 92px;
    margin-bottom: 13px;
    perspective: 640px;
}

.folder__tab {
    position: absolute;
    left: 0; top: 0;
    width: 46%; height: 22%;
    background: #f7b309;
    border-radius: 7px 0 0 0;
    /* скошенный правый край язычка, как у настоящей папки */
    clip-path: polygon(0 0, 72% 0, 100% 100%, 0 100%);
}

.folder__back {
    position: absolute;
    left: 0; right: 0; top: 15%; bottom: 0;
    background: linear-gradient(180deg, #f9bd11 0%, #e9a106 100%);
    border-radius: 4px 9px 11px 11px;
    box-shadow: 0 10px 20px rgba(150, 100, 0, 0.28);
}

/* ── Листы внутри ── */
.folder__paper {
    position: absolute;
    background: #fff;
    border-radius: 4px 4px 2px 2px;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.14);
    transition: transform 0.42s cubic-bezier(0.2, 0.8, 0.3, 1);
}

.folder__paper--far  { left: 13%; right: 13%; top: 17%; height: 60%; background: #eaeef6; }
.folder__paper--near { left: 8%;  right: 8%;  top: 21%; height: 58%; }

/* ── Передняя створка ── */
.folder__front {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 76%;
    background: linear-gradient(168deg, #ffe9ab 0%, #ffd45f 45%, #fbc02d 100%);
    border: 1px solid rgba(205, 145, 0, 0.45);
    border-radius: 9px 9px 11px 11px;
    transform-origin: bottom center;
    transform: rotateX(0deg);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
    transition: transform 0.42s cubic-bezier(0.2, 0.8, 0.3, 1), box-shadow 0.3s ease;
}

/* Наведение — папка приоткрывается */
.folder-card:hover .folder__front,
.folder-card:focus-visible .folder__front { transform: rotateX(-24deg); }

.folder-card:hover .folder__paper--near,
.folder-card:focus-visible .folder__paper--near { transform: translateY(-6px); }

.folder-card:hover .folder__paper--far,
.folder-card:focus-visible .folder__paper--far { transform: translateY(-11px); }

/* Нажатие — папка открыта */
.folder-card[aria-expanded="true"] .folder__front {
    transform: rotateX(-52deg);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7),
                0 12px 20px -8px rgba(0, 0, 0, 0.4);
}

.folder-card[aria-expanded="true"] .folder__paper--near { transform: translateY(-13px); }
.folder-card[aria-expanded="true"] .folder__paper--far  { transform: translateY(-20px); }

/* ── Подписи ── */
.folder-card__name {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    font-size: 0.9rem;
    font-weight: 700;
    color: #111;
    line-height: 1.3;
}

.folder-card__name i { color: #8a30cc; font-size: 0.9rem; }

.folder-card__hint {
    margin-top: 6px;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    white-space: nowrap;
    text-transform: uppercase;
    color: #8a30cc;
    background: rgba(138, 48, 204, 0.1);
    padding: 2px 9px;
    border-radius: 20px;
}

.folder-card__count {
    position: absolute;
    top: 8px; right: 10px;
    min-width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    font-size: 0.72rem;
    font-weight: 800;
    color: #fff;
    background: #8a30cc;
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(138, 48, 204, 0.4);
}

/* ── Раскрытый список роликов ── */
.folder-panel { animation: fadeInSlideUp 0.35s ease-out both; }
.folder-panel[hidden] { display: none; }

/* Два ролика в ряд */
.video-cases-grid--pair {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: center;
}

/* Если в папке всего один ролик — не прижимаем его к левому краю */
.video-cases-grid--pair > :only-child {
    grid-column: 1 / -1;
    width: 100%;
    max-width: 640px;
    justify-self: center;
}

@media (prefers-color-scheme: dark) {
    .folders__lead       { color: #8b8b9a; }
    .folder-card:hover   { background: rgba(201, 125, 255, 0.08); }
    .folder-card[aria-expanded="true"] {
        background: rgba(201, 125, 255, 0.12);
        box-shadow: inset 0 0 0 1px rgba(201, 125, 255, 0.3);
    }
    .folder-card__name   { color: #e8e8f0; }
    .folder-card__name i { color: #c97dff; }
    .folder-card__hint   { color: #d0a8ff; background: rgba(201, 125, 255, 0.12); }
    .folder-card__count  { background: #9b50ff; box-shadow: 0 2px 10px rgba(155, 80, 255, 0.45); }
    .folder-card:focus-visible { outline-color: #c97dff; }
}

@media (max-width: 700px) {
    .folder-card { width: 150px; padding: 12px 8px 14px; }
    .folder      { width: 102px; height: 80px; }
    .folder-card__name { font-size: 0.84rem; }
}

@media (max-width: 640px) {
    .video-cases-grid--pair { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    .folder-card,
    .folder__front,
    .folder__paper { transition: none; }
    .folder-panel  { animation: none; }
}


/* =====================================================
   КАРТОЧКА С НЕДОСТУПНЫМ ВИДЕО
   Ставится из vk-check.js / yt-check.js, когда плеер
   не подал признаков жизни (гео-ограничение, блокировка)
   ===================================================== */
.video-case-card--unavailable { border-color: rgba(230, 150, 60, 0.45); }

.media-note {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    margin: 12px 0 0;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 0.76rem !important;
    line-height: 1.45;
    color: #a06a10 !important;
    background: rgba(230, 150, 60, 0.1);
    border: 1px solid rgba(230, 150, 60, 0.25);
}

.media-note i { margin: 0; flex-shrink: 0; margin-top: 2px; }

.media-note a {
    color: inherit;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 2px;
}

@media (prefers-color-scheme: dark) {
    .media-note {
        color: #f0b45a !important;
        background: rgba(230, 150, 60, 0.12);
        border-color: rgba(230, 150, 60, 0.3);
    }
}


/* =====================================================
   БЛОК КЛИЕНТА (например, Face Clinic)
   Идёт под двумя половинами, во всю ширину вкладки
   ===================================================== */
.video-client { margin-top: 56px; }

.video-client__lead {
    max-width: 620px;
    margin: -6px auto 26px;
    text-align: center;
    font-size: 0.92rem;
    line-height: 1.6;
    color: #666;
}

.video-client__lead a {
    color: #8a30cc;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 2px;
}

@media (prefers-color-scheme: dark) {
    .video-client__lead   { color: #999; }
    .video-client__lead a { color: #c97dff; }
}

@media (max-width: 700px) {
    .video-client { margin-top: 40px; }
    .video-client__lead { font-size: 0.86rem; margin-bottom: 20px; }
}

/* =====================================================
   КАРТОЧКА-ССЫЛКА (пост во ВКонтакте вместо плеера)
   ===================================================== */
.video-case-card--link {
    display: block;
    text-decoration: none;
    color: inherit;
}

/* Обложка вместо iframe — те же пропорции 16:9 */
.video-case-cover {
    position: relative;
    padding-bottom: 56.25%;
    background:
        radial-gradient(circle at 50% 42%, rgba(255, 255, 255, 0.14) 0%, transparent 60%),
        linear-gradient(145deg, #0b64c2 0%, #2787f5 55%, #5aa9ff 100%);
    overflow: hidden;
}

.video-case-cover i,
.video-case-cover__label {
    position: absolute;
    left: 0;
    right: 0;
    text-align: center;
    color: #fff;
}

.video-case-cover i {
    top: 34%;
    transform: translateY(-50%);
    margin: 0;
    font-size: 2.4rem;
    opacity: 0.95;
}

.video-case-cover__label {
    bottom: 22%;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    opacity: 0.85;
    transition: opacity 0.25s ease;
}

.video-case-card--link:hover .video-case-cover__label { opacity: 1; }
.video-case-card--link:hover .video-case-cover i { transform: translateY(-50%) scale(1.08); }
.video-case-cover i { transition: transform 0.25s ease; }

/* В плотном ряду обложка мельче */
@media (max-width: 600px) {
    .video-case-cover i { font-size: 1.7rem; }
    .video-case-cover__label { font-size: 0.6rem; bottom: 18%; }
}

/* =====================================================
   БЕЙДЖ ИСТОЧНИКА: VK
   ===================================================== */
.video-source-badge--vk {
    background: rgba(39, 135, 245, 0.12);
    color: #1b6fd0;
    border: 1px solid rgba(39, 135, 245, 0.28);
}

@media (prefers-color-scheme: dark) {
    .video-source-badge--vk { color: #6cb4ff; background: rgba(39, 135, 245, 0.14); }
}
/* =====================================================
   18. СТРАНИЦА 404
   Раньше эти стили лежали прямо в 404.html атрибутом style
   ===================================================== */
.error-page {
    text-align: center;
    padding-top: 18vh;
    padding-bottom: 60px;
}

.error-page__code {
    font-family: var(--font-mono);
    font-size: clamp(4rem, 18vw, 7rem);
    font-weight: 700;
    line-height: 1;
    color: #4dd9ff;
    letter-spacing: 0.04em;
}

.error-page__title {
    margin: 18px 0 12px;
    font-size: 1.3rem;
    font-weight: 700;
    color: #e8e8f0;
}

.error-page__text {
    max-width: 460px;
    margin: 0 auto 32px;
    color: #9a9aac;
}