:root {
    /* Brand Colors */
    --color-main: #01939A;
    --color-sec-a: #FFAB00;
    --color-sec-b: #FF0700;

    /* Light Theme Strict Colors */
    --bg-grad-1: #ffffff;
    --bg-grad-2: #ffffff;
    --bg-grad-3: #ffffff;
    --text-color: #0f172a;
    --text-muted: #334155;
    --card-bg: rgba(255, 255, 255, 0.02);
    /* Максимально возможная прозрачность */
    --card-border: rgba(1, 147, 154, 0.3);
    --primary-color: #0f172a;
    --primary-hover: var(--color-main);
    --accent-color: var(--color-main);
    /* Задаем фирменный темный бирюзовый фон (#01939A) для шапки и подвала в светлой теме */
    --nav-bg: rgba(1, 147, 154, 0.95);
    --shadow: 0 4px 10px rgba(0, 0, 0, 0.05);

    /* Light theme text & hover */
    --nav-text: #ffffff;
    /* Белый текст меню и подвала на бирюзовом фоне */
    --nav-hover-text: var(--color-sec-a);
    /* Золотой/Оранжевый при наведении */
    --nav-hover-shadow: rgba(0, 0, 0, 0.2);

    --phantom-color: transparent;
    /* Убрано для светлой темы по просьбе пользователя */
    /* Убираем грязное свечение текста в светлой теме */
    --logo-glow-1: transparent;
    --logo-glow-2: transparent;
}

[data-theme="dark"] {
    /* Brand Colors */
    --color-main: #01939A;
    --color-sec-a: #FFAB00;
    --color-sec-b: #FF0700;

    /* Dark Theme Strict/Tech Colors */
    --bg-grad-1: #000000;
    --bg-grad-2: #01040a;
    --bg-grad-3: #030816;
    --text-color: #f1f5f9;
    --text-muted: #94a3b8;
    --card-bg: rgba(15, 23, 42, 0.02);
    /* Максимально возможная прозрачность */
    --card-border: rgba(1, 147, 154, 0.3);
    --primary-color: #f8fafc;
    --primary-hover: var(--color-main);
    --accent-color: var(--color-main);
    --nav-bg: rgba(2, 6, 23, 0.95);
    --shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    /* Dark theme text & hover */
    --nav-text: var(--color-main);
    --nav-hover-text: #ffffff;
    --nav-hover-shadow: rgba(255, 255, 255, 0.7);
    --phantom-color: rgba(1, 147, 154, 0.15);
    /* Cyan for dark theme */
    --logo-glow-1: var(--color-sec-a);
    --logo-glow-2: var(--color-sec-b);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background:
        linear-gradient(90deg, rgba(1, 147, 154, 0.03) 1px, transparent 1px),
        linear-gradient(rgba(1, 147, 154, 0.03) 1px, transparent 1px),
        linear-gradient(-45deg, var(--bg-grad-1), var(--bg-grad-2), var(--bg-grad-3), var(--bg-grad-1));
    background-size: 40px 40px, 40px 40px, 400% 400%;
    animation: gradientBG 15s ease infinite;
    color: var(--text-color);
    line-height: 1.6;
    transition: color 0.3s ease;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    cursor: url('../img/cursor-gradient.svg'), auto;
    /* Применяем градиентный курсор */
}

a,
button,
.btn,
.badge,
.theme-toggle,
.menu-btn,
.toggle,
.toggle-button,
.star,
.crater {
    cursor: url('../img/cursor-gradient.svg'), pointer !important;
    /* Совпадающий курсор для кликабельных зон */
}

/* Динамичное поочередное свечение трех цветов (блуждающая фигура) */
body::before {
    content: '';
    position: fixed;
    top: 50%;
    left: 50%;
    /* Делаем квадрат, внутри которого нарисуем радиальный градиент (размер увеличен в 1.5 раза) */
    width: 120vw;
    height: 120vw;
    margin-top: -60vw;
    margin-left: -60vw;
    border-radius: 50%;
    /* УДАЛЕН filter: blur() который уничтожал FPS. Вместо него используем radial-gradient */
    pointer-events: none;
    z-index: -2;
    animation: driftingGlow 72s linear infinite;
}

@keyframes driftingGlow {

    /* Этап 1: Появление слева */
    0% {
        transform: translate(-100vw, 20vh) scale(1.0);
        background: radial-gradient(closest-side, var(--phantom-color) 0%, transparent 100%);
        opacity: 0;
    }

    12% {
        opacity: 1;
    }

    16% {
        transform: translate(0vw, 10vh) scale(1.2);
        opacity: 1;
    }

    21% {
        opacity: 1;
    }

    33% {
        transform: translate(100vw, -20vh) scale(1.0);
        background: radial-gradient(closest-side, var(--phantom-color) 0%, transparent 100%);
        opacity: 0;
    }

    /* Этап 2: Появление сверху */
    33.1% {
        transform: translate(30vw, -100vh) scale(1.0);
        background: radial-gradient(closest-side, var(--phantom-color) 0%, transparent 100%);
        opacity: 0;
    }

    45% {
        opacity: 1;
    }

    50% {
        transform: translate(-10vw, 0vh) scale(1.4);
        opacity: 1;
    }

    54% {
        opacity: 1;
    }

    66% {
        transform: translate(-40vw, 100vh) scale(1.0);
        background: radial-gradient(closest-side, var(--phantom-color) 0%, transparent 100%);
        opacity: 0;
    }

    /* Этап 3: Появление снизу */
    66.1% {
        transform: translate(-100vw, 100vh) scale(1.0);
        background: radial-gradient(closest-side, var(--phantom-color) 0%, transparent 100%);
        opacity: 0;
    }

    78% {
        opacity: 1;
    }

    83% {
        transform: translate(15vw, -15vh) scale(1.2);
        opacity: 1;
    }

    88% {
        opacity: 1;
    }

    100% {
        transform: translate(100vw, -100vh) scale(1.0);
        background: radial-gradient(closest-side, var(--phantom-color) 0%, transparent 100%);
        opacity: 0;
    }
}

@keyframes gradientBG {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* Typography */
h1,
h2,
h3,
h4 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--text-color);
    letter-spacing: -0.5px;
}

h1 {
    font-size: 2.2rem;
}

h2 {
    font-size: 1.8rem;
    color: var(--primary-color);
    position: relative;
    display: inline-block;
}

h2::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 60px;
    height: 2px;
    background: var(--accent-color);
    border-radius: 0;
}

p {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: 0.3s;
}

a:hover {
    color: var(--accent-color);
}

/* Interactive Canvas Background - 4 Layers Parallax */
#particles-deep,
#particles-bg,
#particles-js,
#particles-front {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

#particles-deep {
    z-index: -4;
    opacity: 0.5;
    filter: blur(5px);
    pointer-events: none;
}

#particles-bg {
    z-index: -3;
    opacity: 0.7;
    filter: blur(2px);
    pointer-events: none;
}

#particles-js {
    z-index: -2;
}

/* Интерактивный слой */
#particles-front {
    z-index: -1;
    pointer-events: none;
}



/* Layout & Elements */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

main {
    flex: 1;
    padding-top: 100px;
    padding-bottom: 3rem;
}

.section {
    padding: 4rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.glass {
    background: var(--card-bg);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid var(--card-border);
    border-radius: 2px;
    /* Строгие углы */
    box-shadow: var(--shadow);
    border-left: 3px solid var(--accent-color);
    /* Технологичный акцент слева */
}

/* Header */
.site-header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    transition: all 0.3s ease;
    border-radius: 0;
    border: none;
    border-bottom: 1px solid var(--card-border);
    background: var(--nav-bg);
    padding-top: 3px;
    /* Буквально 3 пикселя для "воздуха" сверху */
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
    /* Уменьшено с 85px */
}

.logo {
    width: 320px;
    flex-shrink: 0;
}

.logo a {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-color);
    letter-spacing: 1px;
    text-transform: uppercase;
    flex-shrink: 0;
    margin-left: -32px;
}

.site-title {
    font-size: 1.4rem;
    font-weight: 700;
    text-transform: uppercase;
    background: linear-gradient(to right, var(--color-sec-a), var(--color-sec-b));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: text-shadow 0.3s ease;
    white-space: nowrap;
    text-shadow: 0 0 10px rgba(255, 171, 0, 0.4);
}

[data-theme="light"] .site-title {
    text-shadow: none;
    /* Убираем черную тень на белом фоне */
}

.logo-text {
    background: linear-gradient(to bottom, var(--color-sec-a), var(--color-sec-b));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(5px 15px 35px rgba(0, 0, 0, 0.6)) drop-shadow(0 0 20px rgba(255, 171, 0, 0.25));
    transition: opacity 0.3s ease, filter 0.3s ease, font-weight 0.3s ease;
    white-space: pre-wrap;
    text-align: left;
    line-height: 1.1;
    display: inline-block;
}

[data-theme="dark"] .logo-text {
    /* Мощное равномерное неоновое свечение, соответствующее моменту завершения смены слова */
    filter: drop-shadow(0 0 12px var(--logo-glow-1)) drop-shadow(0 0 15px var(--logo-glow-2)) brightness(1.3);
}

[data-theme="light"] .logo-text {
    font-weight: 900;
    /* Делаем текст жирным только в светлой теме */
    background: none;
    -webkit-text-fill-color: initial;
    color: var(--nav-text);
}

.neon-char {
    display: inline-block;
    transition: opacity 0.1s;
}

.flicker-char {
    animation: textFlickerChar 0.15s infinite alternate;
}

@keyframes textFlickerChar {
    0% {
        opacity: 1;
        filter: brightness(1.5) drop-shadow(0 0 15px #fff);
    }

    25% {
        opacity: 0.2;
        filter: brightness(0.3) drop-shadow(0 0 0 transparent);
    }

    50% {
        opacity: 0.8;
        filter: brightness(1.2);
    }

    75% {
        opacity: 0.1;
        filter: brightness(0.1);
    }

    100% {
        opacity: 1;
        filter: brightness(1.5) drop-shadow(0 0 10px #fff);
    }
}

.logo-text.neon-off {
    opacity: 0 !important;
    filter: none !important;
    transition: opacity 0.1s ease;
}

.logo-text.neon-flicker-on {
    animation: turnOnNeonText 0.6s ease-in-out;
}

@keyframes turnOnNeonText {
    0% {
        opacity: 0;
        filter: none;
    }

    10% {
        opacity: 1;
        filter: drop-shadow(0 -5px 12px var(--logo-glow-1)) drop-shadow(0 5px 12px var(--logo-glow-2)) brightness(1.5);
    }

    20% {
        opacity: 0;
        filter: none;
    }

    40% {
        opacity: 0.5;
        filter: none;
    }

    50% {
        opacity: 1;
        filter: drop-shadow(0 -7px 15px var(--logo-glow-1)) drop-shadow(0 7px 15px var(--logo-glow-2)) brightness(1.8);
    }

    70% {
        opacity: 0.2;
        filter: none;
    }

    100% {
        opacity: 1;
        filter: drop-shadow(0 -5px 12px var(--logo-glow-1)) drop-shadow(0 5px 12px var(--logo-glow-2)) brightness(1.3);
    }
}

.site-logo-img {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    /* Срезаем черный фон, оставляя круглый бейдж */
    object-fit: cover;
    transition: filter 0.3s ease, transform 0.8s ease-in-out;
}

.rotate-once {
    animation: spinOnce 0.8s ease-in-out;
}

@keyframes spinOnce {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    list-style: none;
    padding: 0;
    margin: 0;
    margin-bottom: 14px;
    /* Увеличено до 14 пикселей по просьбе пользователя */
    padding-top: 50px;
    /* Сдвигаем только пункты меню вниз, чтобы иконки не упирались в верх */
    padding-bottom: 35px;
}

.nav-links a {
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--color-main);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0px;
    text-decoration: none;
}

.menu-icon {
    width: 36px;
    height: 36px;
    object-fit: contain;
    transition: transform 0.4s ease, filter 0.4s ease;
}

/* Светлая тема: иконки белые по умолчанию, при наведении JS меняет src на -light.png и сбрасывает filter */
[data-theme="light"] .menu-icon {
    filter: brightness(0) invert(1);
}

.nav-links a[href="#process"] .menu-icon {
    transform: scale(1.3);
}

.nav-links a[href="#contacts"] .menu-icon {
    transform: scale(1.15);
}

.nav-links a span {
    transition: color 0.4s ease, text-shadow 0.4s ease;
    color: var(--nav-text);
    white-space: nowrap;
}

.nav-links a:hover span,
.nav-links a:active span,
.nav-links a:focus-visible span,
.nav-links a.is-tapped span,
.nav-links .current-menu-item a span {
    color: var(--nav-hover-text);
    text-shadow: 0 0 8px var(--nav-hover-shadow);
}

.nav-links a:hover .menu-icon,
.nav-links a:active .menu-icon,
.nav-links a:focus-visible .menu-icon,
.nav-links a.is-tapped .menu-icon,
.nav-links .current-menu-item a .menu-icon {
    transform: scale(1.1) translateY(-3px);
    animation: neonHoverBlink 4s infinite;
}

[data-theme="light"] .nav-links a:hover .menu-icon,
[data-theme="light"] .nav-links a:active .menu-icon,
[data-theme="light"] .nav-links a:focus-visible .menu-icon,
[data-theme="light"] .nav-links a.is-tapped .menu-icon,
[data-theme="light"] .nav-links .current-menu-item a .menu-icon {
    filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.22));
    animation: none !important;
    /* Показываем цвет -light.png (убираем белый фильтр) + лёгкая тень */
}

.nav-links a[href="#process"]:hover .menu-icon,
.nav-links a[href="#process"]:active .menu-icon,
.nav-links a[href="#process"]:focus-visible .menu-icon,
.nav-links a[href="#process"].is-tapped .menu-icon,
.nav-links .current-menu-item a[href="#process"] .menu-icon {
    transform: scale(1.4) translateY(-3px);
    animation: neonHoverBlink 4s infinite;
}

.nav-links a[href="#contacts"]:hover .menu-icon,
.nav-links a[href="#contacts"]:active .menu-icon,
.nav-links a[href="#contacts"]:focus-visible .menu-icon,
.nav-links a[href="#contacts"].is-tapped .menu-icon,
.nav-links .current-menu-item a[href="#contacts"] .menu-icon {
    transform: scale(1.25) translateY(-3px);
    animation: neonHoverBlink 4s infinite;
}


@keyframes neonHoverBlink {
    0% {
        filter: drop-shadow(0 0 2px var(--color-sec-a)) brightness(0.6);
    }

    2% {
        filter: drop-shadow(0 -6px 12px var(--color-sec-a)) drop-shadow(0 6px 12px var(--color-sec-b)) brightness(1.4);
    }

    4% {
        filter: drop-shadow(0 0 2px var(--color-sec-a)) brightness(0.7);
    }

    6% {
        filter: drop-shadow(0 -4px 10px var(--color-sec-a)) drop-shadow(0 4px 10px var(--color-sec-b)) brightness(1.2);
    }

    38% {
        filter: drop-shadow(0 -4px 10px var(--color-sec-a)) drop-shadow(0 4px 10px var(--color-sec-b)) brightness(1.2);
    }

    39% {
        filter: drop-shadow(0 0 2px var(--color-sec-a)) brightness(0.5);
    }

    41% {
        filter: drop-shadow(0 -4px 10px var(--color-sec-a)) drop-shadow(0 4px 10px var(--color-sec-b)) brightness(1.2);
    }

    75% {
        filter: drop-shadow(0 -4px 10px var(--color-sec-a)) drop-shadow(0 4px 10px var(--color-sec-b)) brightness(1.2);
    }

    76% {
        filter: drop-shadow(0 0 2px var(--color-sec-a)) brightness(0.5);
    }

    77% {
        filter: drop-shadow(0 -4px 10px var(--color-sec-a)) drop-shadow(0 4px 10px var(--color-sec-b)) brightness(1.2);
    }

    79% {
        filter: drop-shadow(0 0 2px var(--color-sec-a)) brightness(0.5);
    }

    81% {
        filter: drop-shadow(0 -4px 10px var(--color-sec-a)) drop-shadow(0 4px 10px var(--color-sec-b)) brightness(1.2);
    }

    100% {
        filter: drop-shadow(0 -4px 10px var(--color-sec-a)) drop-shadow(0 4px 10px var(--color-sec-b)) brightness(1.2);
    }
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-right: -32px;
}

.theme-toggle,
.menu-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text-color);
    display: flex;
    padding: 0.5rem;
    border-radius: 50%;
    transition: 0.3s;
}

.theme-toggle:hover {
    background: var(--card-border);
}

.menu-btn {
    display: none;
}

.menu-btn-icon {
    width: 28px;
    height: 28px;
    background: linear-gradient(to bottom, var(--color-sec-a), var(--color-sec-b));
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='3' y1='12' x2='21' y2='12'%3E%3C/line%3E%3Cline x1='3' y1='6' x2='21' y2='6'%3E%3C/line%3E%3Cline x1='3' y1='18' x2='21' y2='18'%3E%3C/line%3E%3C/svg%3E") no-repeat center;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='3' y1='12' x2='21' y2='12'%3E%3C/line%3E%3Cline x1='3' y1='6' x2='21' y2='6'%3E%3C/line%3E%3Cline x1='3' y1='18' x2='21' y2='18'%3E%3C/line%3E%3C/svg%3E") no-repeat center;
    -webkit-mask-size: contain;
    mask-size: contain;
}

[data-theme="light"] .menu-btn-icon {
    background: var(--nav-text);
}

/* Grid Cards */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.card {
    padding: 1.5rem 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover,
.card:active,
.card:focus-visible,
.card.is-tapped {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

ul.styled-list {
    list-style: none;
}

ul.styled-list li {
    position: relative;
    padding-left: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    font-size: 0.95rem;
}

ul.styled-list li::before {
    content: '>';
    position: absolute;
    left: 0;
    color: var(--accent-color);
    font-weight: bold;
    font-family: monospace;
}

/* Tags/Skills */
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.tag {
    background: rgba(1, 147, 154, 0.05);
    color: var(--accent-color);
    padding: 0.25rem 0.75rem;
    border-radius: 2px;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid var(--card-border);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: 'Consolas', 'Monaco', monospace;
    transition: 0.3s;
}

.tag:hover,
.tag:active,
.tag:focus-visible,
.tag.is-tapped {
    background: var(--color-sec-a);
    border-color: var(--color-sec-a);
    color: #000;
}

/* Hero Section */
.hero-content {
    display: flex;
    align-items: center;
    gap: 3rem;
    flex-wrap: wrap;
}

.hero-text {
    flex: 1;
    min-width: 300px;
}

.hero-desc {
    padding: 1.5rem;
    margin-top: 2rem;
    border-left: 2px solid var(--accent-color);
    background: rgba(0, 0, 0, 0.2);
}

.hero-image {
    flex: 0.8;
    min-width: 300px;
    display: flex;
    justify-content: center;
}

.photo-placeholder {
    width: 100%;
    max-width: 350px;
    aspect-ratio: 4/5;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--card-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-family: monospace;
}

/* Footer */
.site-footer {
    position: relative;
    z-index: 10;
    background: var(--nav-bg);
    padding: 0.1rem 0;
    /* padding-top устанавливается через JS под гирлянду */
    margin-top: 0;
    border-top: 1px solid var(--card-border);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 0.5rem;
    margin-bottom: 0;
}

.footer-section h3,
.footer-section h4 {
    color: var(--text-color);
    margin-bottom: 1rem;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-section p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

/* Quote Section */
.it-quote {
    font-style: italic;
    color: #ffffff;
    padding: 0.1rem 0;
    margin: 0.1rem 0;
    line-height: 1.5;
    font-size: 0.95rem;
    text-align: center;
    border-left: none;
}

[data-theme="dark"] .it-quote {
    background: linear-gradient(to right, var(--color-sec-a), var(--color-sec-b));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    border-left: none;
}

/* Navigation Section */
.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--color-sec-a);
}

.footer-copyright {
    text-align: center;
    padding-top: 0;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-main);
}

/* copyright — белый в светлой теме, бирюзовый в тёмной */
.copyright {
    text-align: center;
    font-size: 0.85rem;
    font-weight: 500;
    color: #ffffff;
    /* светлая тема — белый */
    margin: 0;
    padding-bottom: 0;
}

[data-theme="dark"] .copyright {
    color: var(--color-main);
    /* тёмная тема — бирюзовый */
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid var(--card-border);
    padding-top: 0.2rem;
    font-size: 0.875rem;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.neon-heart {
    color: #FF0700;
    animation: heartbeat 1.5s infinite;
    display: inline-block;
}

@keyframes heartbeat {

    0%,
    100% {
        transform: scale(1);
        text-shadow: 0 0 5px #FF0700;
    }

    50% {
        transform: scale(1.2);
        text-shadow: 0 0 10px #FF0700;
    }
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 991px) {
    .site-header {
        padding-top: 2px;
        padding-bottom: 0;
        min-height: 0;
    }

    .nav-container {
        height: 48px;
        /* Максимально компактно */
        padding: 0 15px;
        margin: 0;
        min-height: 0;
    }

    .container {
        padding: 0 1rem !important;
    }

    .menu-btn {
        display: flex;
        align-self: center;
        /* Центрирование кнопки меню */
        margin-top: 0;
    }

    .logo {
        width: auto;
        flex-shrink: 1;
        max-width: 60% !important;
    }

    .logo a {
        font-size: 0.75rem;
        /* Уменьшено для мобильных устройств */
        flex-shrink: 1;
        margin-left: 0;
        padding: 0;
        display: flex;
        align-items: center;
    }

    .site-logo-img {
        width: 38px;
        height: 38px;
    }

    .header-controls {
        margin-right: 10px;
        /* Отодвигаем от правого края */
        display: flex;
        align-items: center;
        gap: 15px;
    }

    .nav-links {
        position: absolute;
        top: 50px;
        /* Высота компактной шапки (48+2) */
        left: 0;
        width: 100%;
        background: var(--nav-bg);
        flex-direction: column;
        text-align: center;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        backdrop-filter: blur(10px);
    }

    .nav-links.active {
        max-height: 80vh;
        opacity: 1;
        visibility: visible;
        overflow-y: auto;
        padding-top: 10px;
        /* Отступ внутри меню сверху */
        padding-bottom: 1rem;
        margin-bottom: 10px;
        /* Отступ снаружи меню снизу */
        box-shadow: var(--shadow);
    }

    .nav-links li {
        padding: 0.6rem 1rem;
        /* Уменьшено с 1rem для компактности */
        border-top: 1px solid var(--card-border);
    }
}

/* ------------------------------------------------------------- 
   Кастомный переключатель темы: Солнце/Луна 
   ------------------------------------------------------------- */
#hide-checkbox {
    opacity: 0;
    height: 0;
    width: 0;
    position: absolute;
    visibility: hidden;
}

.toggle {
    position: relative;
    cursor: pointer;
    display: block;
    width: 200px;
    height: 100px;
    background: #181b3d;
    /* Цвет ночного неба (тёмный индиго, смещение к фиолетовому) */
    border-radius: 50px;
    transition: 500ms;
    overflow: hidden;
    margin: 0;
    transform: scale(0.35);
    transform-origin: left top;
}

.toggle-button {
    position: absolute;
    display: inline-block;
    top: 7px;
    left: 6px;
    width: 86px;
    height: 86px;
    border-radius: 50%;
    background: #FAEAF1;
    overflow: hidden;
    box-shadow: 0 0 35px 4px rgba(255, 255, 255);
    transition: all 500ms ease-out;
}

.crater {
    position: absolute;
    display: inline-block;
    background: #FAEAF1;
    border-radius: 50%;
    transition: 500ms;
}

.crater-1 {
    background: #FFFFF9;
    width: 86px;
    height: 86px;
    left: 10px;
    bottom: 10px;
}

.crater-2 {
    width: 20px;
    height: 20px;
    top: -7px;
    left: 44px;
}

.crater-3 {
    width: 16px;
    height: 16px;
    top: 20px;
    right: -4px;
}

.crater-4 {
    width: 10px;
    height: 10px;
    top: 24px;
    left: 30px;
}

.crater-5 {
    width: 15px;
    height: 15px;
    top: 40px;
    left: 48px;
}

.crater-6 {
    width: 10px;
    height: 10px;
    top: 48px;
    left: 20px;
}

.crater-7 {
    width: 12px;
    height: 12px;
    bottom: 5px;
    left: 35px;
}

.star {
    position: absolute;
    display: inline-block;
    border-radius: 50%;
    background: #FFF;
    box-shadow: 1px 0 2px 2px rgba(255, 255, 255);
}

.star-1 {
    width: 6px;
    height: 6px;
    right: 90px;
    bottom: 40px;
}

.star-2 {
    width: 8px;
    height: 8px;
    right: 70px;
    top: 10px;
}

.star-3 {
    width: 5px;
    height: 5px;
    right: 60px;
    bottom: 15px;
}

.star-4 {
    width: 3px;
    height: 3px;
    right: 40px;
    bottom: 50px;
}

.star-5 {
    width: 4px;
    height: 4px;
    right: 10px;
    bottom: 35px;
}

.star-6,
.star-7,
.star-8 {
    width: 10px;
    height: 2px;
    border-radius: 2px;
    transform: rotate(-45deg);
    box-shadow: 5px 0px 4px 1px #FFF;
    animation-name: toggle-travel;
    animation-duration: 1.5s;
    animation-timing-function: ease-out;
    animation-iteration-count: infinite;
}

.star-6 {
    right: 30px;
    bottom: 30px;
    animation-delay: -2s;
}

.star-7 {
    right: 50px;
    bottom: 60px;
}

.star-8 {
    right: 90px;
    top: 10px;
    animation-delay: -4s;
}

@keyframes toggle-travel {
    0% {
        transform: rotate(-45deg) translateX(70px);
    }

    50% {
        transform: rotate(-45deg) translateX(-20px);
        box-shadow: 5px 0px 6px 1px #FFF;
    }

    100% {
        transform: rotate(-45deg) translateX(-30px);
        width: 2px;
        height: 2px;
        opacity: 0;
        box-shadow: none;
    }
}

#hide-checkbox:checked+.toggle {
    background: #24D7F7;
}

#hide-checkbox:checked+.toggle .toggle-button {
    background: #F7FFFF;
    transform: translateX(102px);
    box-shadow: 0 0 35px 5px rgba(255, 255, 255);
}

#hide-checkbox:checked+.toggle .toggle-button .crater {
    transform: rotate(-45deg) translateX(70px);
}

#hide-checkbox:checked+.toggle .star {
    animation: toggle-move 2s infinite;
    transform: none;
    box-shadow: none;
}

#hide-checkbox:checked+.toggle .star-1 {
    width: 40px;
    height: 10px;
    border-radius: 10px;
    background: #FFF;
    left: 20px;
    top: 25px;
    box-shadow: none;
}

#hide-checkbox:checked+.toggle .star-2 {
    width: 12px;
    height: 12px;
    background: #FFF;
    left: 26px;
    top: 23px;
    box-shadow: -1px 0 2px 0 rgba(0, 0, 0, 0.1);
}

#hide-checkbox:checked+.toggle .star-3 {
    width: 16px;
    height: 16px;
    background: #FFF;
    left: 35px;
    top: 19px;
    box-shadow: -1px 0 2px 0 rgba(0, 0, 0, 0.1);
}

#hide-checkbox:checked+.toggle .star-4 {
    width: 14px;
    height: 14px;
    background: #FFF;
    left: 46px;
    top: 21px;
    box-shadow: -1px 0 2px 0 rgba(0, 0, 0, 0.1);
}

#hide-checkbox:checked+.toggle .star-5 {
    width: 60px;
    height: 15px;
    border-radius: 15px;
    background: #FFF;
    left: 30px;
    bottom: 20px;
    box-shadow: none;
}

#hide-checkbox:checked+.toggle .star-6 {
    width: 18px;
    height: 18px;
    background: #FFF;
    border-radius: 50%;
    left: 38px;
    bottom: 20px;
    box-shadow: -1px 0 2px 0 rgba(0, 0, 0, 0.1);
}

#hide-checkbox:checked+.toggle .star-7 {
    width: 24px;
    height: 24px;
    background: #FFF;
    border-radius: 50%;
    left: 52px;
    bottom: 20px;
    box-shadow: -1px 0 2px 0 rgba(0, 0, 0, 0.1);
}

#hide-checkbox:checked+.toggle .star-8 {
    width: 21px;
    height: 21px;
    background: #FFF;
    border-radius: 50%;
    left: 70px;
    top: 59px;
    box-shadow: -1px 0 2px 0 rgba(0, 0, 0, 0.1);
}

@keyframes toggle-move {
    0% {
        transform: none;
    }

    25% {
        transform: translateX(2px);
    }

    100% {
        transform: translateX(-2px);
    }
}

/* Student Day Banner */
.student-day-banner {
    width: 100%;
    height: 55px;
    /* Увеличено с 45px */
    overflow: hidden;
    position: relative;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    white-space: nowrap;
    background: var(--background-color);
    padding: 0;
    align-items: center;
}

[data-theme="light"] .student-day-banner {
    background: #fff;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    border-bottom: none;
}

.marquee-group {
    display: flex;
    align-items: center;
    height: 100%;
    animation: scroll-marquee 20s linear infinite;
}

.sd-text {
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    padding: 0 15px;
    background: linear-gradient(90deg, var(--color-sec-a), var(--color-sec-b));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

[data-theme="light"] .sd-text {
    background: none;
    -webkit-text-fill-color: initial;
    color: #01939A;
    /* фирменный голубой/бирюзовый цвет */
}

.sd-banner-img {
    height: 100%;
    width: auto;
    display: block;
    margin: 0 10px;
}

/* Valentine's Day Logo Heartbeat */
@keyframes heartbeat {
    0% {
        transform: scale(1);
    }

    10% {
        transform: scale(1.15);
    }

    20% {
        transform: scale(1);
    }

    30% {
        transform: scale(1.15);
    }

    40% {
        transform: scale(1);
    }

    100% {
        transform: scale(1);
    }
}

.heartbeat-active {
    animation: heartbeat 2s ease-in-out infinite;
}

@keyframes scroll-marquee {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-100%);
    }
}

/* --- Main Container Offset --- */
/* ВАЖНО: .site-main имеет также класс .container который сбрасывает padding: 0 2rem
   Поэтому используем повышенную специфичность через тег + класс */
main.site-main {
    padding-top: 135px !important;
    /* ПК: Уплотнено для исключения прокрутки */
    padding-bottom: 0px !important;
    /* ПК: Убрано полностью */
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

@media (max-width: 991px) {
    main.site-main {
        padding-top: 120px !important;
        /* Мобайл: Добавлено 20px (100px -> 120px) */
        padding-bottom: 50px !important;
        /* Уменьшено в 2 раза (100px -> 50px) */
    }
}

/* 1024px диапазон: хедер 73px + гирлянда (top:72 + height:115 = 187px нижний край) */
@media (min-width: 992px) and (max-width: 1280px) {
    main.site-main {
        padding-top: 170px !important;
        /* 1024/768: Добавлено 20px (150px -> 170px) */
        padding-bottom: 75px !important;
        /* Уменьшено в 2 раза (150px -> 75px) */
    }
}

/* --- Hero Section --- */
.hero-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    margin-top: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    text-align: center;
    box-shadow: var(--shadow);
    position: relative;
    z-index: 10;
    overflow: hidden;
}

@media (max-width: 991px) {
    .hero-content {
        order: 2;
        /* Контент под логотипом */
        width: 100%;
        max-width: 600px;
        margin: 0 auto !important;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .hero-3d-container {
        order: 1;
        /* Логотип сверху */
        margin-bottom: 20px;
        width: 100%;
        display: flex;
        justify-content: center;
    }

    .hero-title {
        font-size: 2.2rem !important;
        /* Увеличено для планшетов */
        margin-bottom: 8px;
        text-align: center;
        width: 100%;
        overflow-wrap: break-word;
        hyphens: auto;
    }

    .hero-subtitle {
        font-size: 1.2rem !important;
        /* Увеличено для планшетов */
        text-align: center !important;
        width: 100%;
        margin-left: auto;
        margin-right: auto;
        line-height: 1.6;
    }

    .hero-badges {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 10px;
        margin-top: 20px;
        width: 100%;
    }

    .badge {
        display: inline-flex !important;
        width: auto !important;
        min-width: 0;
        max-width: 320px;
        /* Немного расширили для крупного шрифта */
        margin: 0 auto !important;
        white-space: normal;
        text-align: center;
        font-size: 1.05rem !important;
        /* Крупнее теги */
        flex-shrink: 1;
    }
}

@media (min-width: 992px) {
    .hero-section {
        flex-direction: row;
        text-align: left;
        justify-content: space-between;
        padding: 30px;
        /* Увеличено до 30px со всех сторон */
    }
}

.hero-content {
    flex: 1;
    max-width: 600px;
}

.hero-title {
    font-size: 3.2rem;
    /* Увеличено для большей значимости */
    margin-top: 8px;
    /* Уменьшено в 2 раза */
    margin-bottom: 0px !important;
    background: linear-gradient(90deg,
            var(--color-sec-a),
            var(--color-sec-b),
            var(--color-sec-b),
            var(--color-main),
            var(--color-main),
            var(--color-sec-b),
            var(--color-sec-b),
            var(--color-sec-a));
    background-size: 400% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    animation: hero-gradient-flow 8s ease-in-out infinite;
    /* Синхронизировано с логотипом */
    text-shadow: 0 0 20px rgba(255, 171, 0, 0.2);
}

@keyframes hero-gradient-flow {

    0%,
    100% {
        background-position: 0% 50%;
        /* Оранжево-красный в покое */
        filter: brightness(1) drop-shadow(0 0 5px rgba(255, 7, 0, 0.2));
    }

    50% {
        background-position: 50% 50%;
        /* Прокат голубой волны в момент взлета объекта */
        filter: brightness(1.5) drop-shadow(0 0 15px var(--color-main));
        text-shadow: 0 0 40px rgba(0, 242, 255, 0.5);
        /* Голубое свечение */
    }
}

[data-theme="light"] .hero-title {
    background: none;
    -webkit-text-fill-color: initial;
    color: var(--color-main);
    /* Возвращаем фирменный бирюзово-синий */
    animation: none;
    /* Оставляем статичным по просьбе пользователя */
}

.hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    margin-bottom: 2px;
    /* Уменьшено в 2 раза */
}

@media (min-width: 992px) {
    .hero-badges {
        justify-content: flex-start;
    }
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(1, 147, 154, 0.07);
    /* Сделал ближе к основному фону (был 0.15) */
    border: 1px solid rgba(1, 147, 154, 0.15);
    /* Сделал контур тоньше и прозрачнее */
    color: var(--color-main);
    /* Основной голубой по умолчанию в темной теме */
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.95rem;
    font-weight: 500;
    white-space: normal;
    text-align: center;
    line-height: 1.3;
    max-width: 100%;
    width: fit-content;
    /* Прижимаем рамку к тексту */
    margin: 0 auto;
    /* Центрируем сам блок, если он во флексе */
    box-sizing: border-box;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow-wrap: break-word;
}

.badge:hover,
.badge:active,
.badge:focus-visible,
.badge.is-tapped {
    transform: scale(1.1);
    border-color: transparent;
    color: #ffffff !important;
    /* Форсируем белый текст на ярком фоне */
    background: linear-gradient(90deg,
            var(--color-sec-a),
            var(--color-sec-b),
            var(--color-sec-a));
    background-size: 200% auto;
    animation: badge-gradient-flow 3s linear infinite;
    box-shadow:
        0 0 25px rgba(255, 171, 0, 0.7),
        0 0 50px rgba(255, 7, 0, 0.4),
        inset 0 0 10px rgba(255, 255, 255, 0.3);
    z-index: 10;
    /* Чтобы свечение было поверх соседей */
}

[data-theme="light"] .badge:hover {
    color: #ffffff !important;
    /* Белый текст для контраста с градиентом */
    background: linear-gradient(90deg,
            var(--color-sec-a),
            var(--color-sec-b),
            var(--color-sec-a));
    background-size: 200% auto;
    border-color: transparent;
    /* В светлой теме делаем свечение чуть мягче, но заметным */
    box-shadow:
        0 10px 20px rgba(255, 171, 0, 0.4),
        0 0 15px rgba(255, 7, 0, 0.2);
}

@keyframes badge-gradient-flow {
    0% {
        background-position: 0% 50%;
    }

    100% {
        background-position: 200% 50%;
    }
}

.badge-icon {
    width: 28px;
    /* Увеличено до 28px по просьбе пользователя */
    height: 28px;
    object-fit: contain;
    transition: filter 0.3s ease;
    /* Плавная смена цвета */
}

/* Специфичная логика только для светлой темы */
[data-theme="light"] .badge-icon {
    /* По умолчанию в светлой теме иконки синие */
    filter: brightness(0) saturate(100%) invert(43%) sepia(98%) saturate(1633%) hue-rotate(147deg) brightness(97%) contrast(101%);
}

[data-theme="light"] .badge:hover .badge-icon {
    /* При наведении в светлой теме иконка становится белой для контраста с градиентом */
    filter: brightness(0) invert(1);
}

.badge:hover .badge-icon {
    /* По умолчанию (в темной теме) при наведении иконка белеет для контраста с оранжево-красным фоном */
    filter: brightness(0) invert(1);
}

[data-theme="light"] .badge:hover .badge-icon {
    filter: brightness(0) invert(1);
    /* В светлой теме иконка белеет при наведении на градиентный фон */
}

.badge-icon.light-icon {
    display: none;
}

[data-theme="light"] .badge-icon.dark-icon {
    display: none;
}

[data-theme="light"] .badge-icon.light-icon {
    display: inline-block;
}

[data-theme="light"] .badge {
    background: rgba(1, 147, 154, 0.1);
    color: var(--text-muted);
    /* Серый по умолчанию */
    border-color: rgba(1, 147, 154, 0.2);
}

.hero-subtitle {
    font-size: 1.05rem;
    color: var(--color-main);
    /* Изменено с белого на основной бирюзово-синий */
    margin-bottom: 4px;
    /* Уменьшено в 2 раза */
    line-height: 1.5;
    font-weight: 400;
}

[data-theme="light"] .hero-subtitle {
    color: var(--text-muted);
    /* Изменяем на серый для светлой темы */
}

.hero-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 5px;
    margin-bottom: 8px;
    flex-wrap: wrap;
    /* Разрешаем перенос для безопасности */
}

@media (max-width: 480px) {
    .hero-buttons {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        max-width: 280px;
        margin-left: auto;
        margin-right: auto;
        gap: 10px;
    }

    .hero-title {
        font-size: 2.2rem !important;
        /* Уменьшаем заголовок на узких экранах */
    }
}

@media (min-width: 992px) {
    .hero-buttons {
        justify-content: flex-start;
    }
}

.btn {
    padding: 10px 22px;
    /* Уменьшено, чтобы сохранить размер кнопки при увеличенном шрифте */
    border-radius: 8px;
    font-weight: 700;
    font-size: 1.05rem;
    /* Слегка увеличен (был 0.95-1.0) */
    text-decoration: none;
    transition: all 0.4s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: linear-gradient(to bottom, var(--color-sec-a), var(--color-sec-b));
    color: #ffffff;
    border: none;
    position: relative;
    overflow: hidden;
}

.btn-primary:hover,
.btn-primary:active,
.btn-primary:focus-visible,
.btn-primary.is-tapped {
    background: #ffffff;
    box-shadow: 0 0 25px rgba(255, 255, 255, 0.4);
}

.btn-primary span {
    transition: all 0.4s ease;
}

.btn-primary:hover span,
.btn-primary:active span,
.btn-primary:focus-visible span,
.btn-primary.is-tapped span {
    background: linear-gradient(to bottom, var(--color-sec-a), var(--color-sec-b));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.btn-secondary {
    background: transparent;
    border: none;
    position: relative;
    border-radius: 8px;
    color: transparent;
    /* Текст будет градиентным через span */
    z-index: 1;
}

.btn-secondary::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 8px;
    padding: 2px;
    /* Толщина рамки */
    background: linear-gradient(to bottom, var(--color-sec-a), var(--color-sec-b));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    transition: all 0.4s ease;
}

.btn-secondary span {
    background: linear-gradient(to bottom, var(--color-sec-a), var(--color-sec-b));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    transition: all 0.4s ease;
}

.btn-secondary:hover::before,
.btn-secondary:active::before,
.btn-secondary:focus-visible::before,
.btn-secondary.is-tapped::before {
    background: #ffffff;
    /* Рамка становится белой */
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.4);
}

.btn-secondary:hover span,
.btn-secondary:active span,
.btn-secondary:focus-visible span,
.btn-secondary.is-tapped span {
    -webkit-text-fill-color: #ffffff;
    /* Текст становится белым */
    color: #ffffff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

/* --- Специфичные стили для кнопок в светлой теме --- */

[data-theme="light"] .btn-primary {
    background: var(--color-main);
    color: #ffffff;
}

[data-theme="light"] .btn-primary:hover,
[data-theme="light"] .btn-primary:active,
[data-theme="light"] .btn-primary:focus-visible,
[data-theme="light"] .btn-primary.is-tapped {
    background: linear-gradient(to bottom, var(--color-sec-a), var(--color-sec-b));
}

.code-symbol-3d {
    width: 660px;
    /* Увеличено в 1.5 раза (было 440px) */
    height: 660px;
    position: relative;
    transform-style: preserve-3d;
    animation: weightlessFloat 8s ease-in-out infinite;
    transition: transform 0.1s ease-out;
    will-change: transform;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-logo-img-3d {
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* Усиленный объем за счет многослойных теней и синего свечения */
    filter:
        drop-shadow(5px 15px 35px rgba(0, 0, 0, 0.6)) drop-shadow(0 0 20px rgba(0, 242, 255, 0.3));
    /* Заменил оранжевое свечение на синее */
    pointer-events: none;
    transition: filter 0.5s ease;
}

@keyframes weightlessFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-40px);
    }
}


[data-theme="light"] .btn-primary:hover span,
[data-theme="light"] .btn-primary:active span,
[data-theme="light"] .btn-primary:focus-visible span,
[data-theme="light"] .btn-primary.is-tapped span {
    background: none;
    -webkit-text-fill-color: #ffffff;
    color: #ffffff;
}

[data-theme="light"] .btn-secondary::before {
    background: var(--color-main);
}

[data-theme="light"] .btn-secondary span {
    background: none;
    -webkit-text-fill-color: var(--color-main);
    color: var(--color-main);
}

[data-theme="light"] .btn-secondary:hover::before,
[data-theme="light"] .btn-secondary:active::before,
[data-theme="light"] .btn-secondary:focus-visible::before,
[data-theme="light"] .btn-secondary.is-tapped::before {
    background: linear-gradient(to bottom, var(--color-sec-a), var(--color-sec-b));
    box-shadow: 0 0 15px rgba(255, 171, 0, 0.4);
}

[data-theme="light"] .btn-secondary:hover span,
[data-theme="light"] .btn-secondary:active span,
[data-theme="light"] .btn-secondary:focus-visible span,
[data-theme="light"] .btn-secondary.is-tapped span {
    background: linear-gradient(to bottom, var(--color-sec-a), var(--color-sec-b));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.hero-3d-container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 300px;
    /* Еще уменьшено для компактности всей страницы */
    width: 100%;
    margin-top: 20px;
    perspective: 1000px;
    z-index: 5;
}

@media (min-width: 992px) {
    .hero-3d-container {
        margin-top: 0;
        margin-left: 50px;
    }

    .site-footer {
        margin-top: 25px;
        /* Уменьшаем внешний отступ для предотвращения скролла */
        padding: 5px 0 !important;
        /* Минимизируем внутренние паддинги */
    }

    .it-quote {
        margin-bottom: 10px !important;
        /* Убираем отступ цитаты */
        line-height: 1.2 !important;
        /* Чуть плотнее текст */
    }

    .copyright {
        margin: 0 !important;
        line-height: 1.1 !important;
    }
}

/* --- Laptop & Zoom Optimization (1024px - 1240px) --- */
@media (min-width: 992px) and (max-width: 1240px) {

    /* Правильный селектор — тег main, не .site-main */
    main {
        padding-top: 220px !important;
        /* Шапка(70) + гирлянда(115) + запас(35) */
    }

    .logo a {
        margin-left: 0 !important;
    }

    .header-controls {
        margin-right: 0 !important;
    }

    .nav-links {
        gap: 0.8rem !important;
    }

    .nav-links a span {
        font-size: 0.9rem !important;
    }

    .menu-icon {
        width: 30px !important;
        height: 30px !important;
    }

    .logo-text {
        font-size: 1.1rem !important;
    }

    .hero-title {
        font-size: 2.6rem !important;
        margin-top: 0 !important;
        margin-bottom: 4px !important;
        /* Минимальный разрыв до бейджей */
    }

    /* Агрессивное уплотнение — убираем «раздутые» внешние отступы у блоков */
    .badge {
        padding: 3px 10px !important;
        margin: 1px auto !important;
        /* Минимальный внешний отступ — блоки не выталкивают соседей */
        font-size: 0.85rem !important;
    }

    .hero-subtitle {
        margin-top: 0 !important;
        margin-bottom: 0 !important;
    }

    .hero-badges {
        gap: 3px !important;
        /* Плотно */
        margin-top: 4px !important;
        margin-bottom: 6px !important;
    }

    .btn {
        font-size: 0.9rem !important;
        padding: 10px 18px !important;
    }

    .hero-buttons {
        margin-top: 6px !important;
        margin-bottom: 0 !important;
        gap: 8px !important;
    }

    .code-symbol-3d {
        width: 340px !important;
        height: 340px !important;
    }

    .hero-3d-container {
        margin-left: 10px !important;
        /* Уменьшили — 3D не выталкивает текст */
    }

    .container {
        padding: 0 1.5rem !important;
    }
}

.code-symbol-3d {
    width: 420px;
    height: 420px;
    position: relative;
    transform-style: preserve-3d;
    animation: weightlessFloat 8s ease-in-out infinite;
    transition: transform 0.1s ease-out;
    will-change: transform;
}

/* Сильное градиентное свечение за объектом */
.code-symbol-3d::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    /* Уменьшено со 120% для более аккуратного вида */
    height: 100%;
    /* Уменьшено со 120% для более аккуратного вида */
    background: radial-gradient(circle,
            rgba(0, 242, 255, 0.9) 0%,
            /* Яркий электрический синий в центре */
            var(--color-main) 45%,
            /* Переход в ваш основной бирюзовый */
            transparent 85%);
    filter: blur(80px);
    /* Немного уменьшено размытие для четкости */
    opacity: 0.6;
    /* Базовая яркость */
    z-index: -1;
    animation: glowPulse 8s ease-in-out infinite;
    /* Синхронизируем с 8 секундами полета */
}

/* Отключаем градиентное свечение и лишние тени в светлой теме */
[data-theme="light"] .code-symbol-3d::before {
    display: none;
}

[data-theme="light"] .hero-logo-img-3d,
[data-theme="light"] .symbol-svg,
[data-theme="light"] .symbol-circuits {
    filter: none !important;
}

@keyframes glowPulse {

    0%,
    100% {
        opacity: 0.4;
        transform: translate(-50%, -50%) scale(0.9);
        /* Меньше свечения внизу */
    }

    50% {
        opacity: 0.9;
        transform: translate(-50%, -50%) scale(1.3);
        /* Максимум яркости в верхней точке полета */
    }
}

.symbol-svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 0 20px rgba(1, 147, 154, 0.3));
}

.symbol-base {
    stroke-width: 14;
    filter: drop-shadow(2px 4px 6px rgba(0, 0, 0, 0.5));
}

.symbol-circuits {
    stroke-dasharray: 200;
    stroke-dashoffset: 400;
    animation: circuitFlow 3s linear infinite;
    filter: drop-shadow(0 0 10px rgba(0, 242, 255, 0.8));
    /* Заменил оранжевый на синий для линий */
    opacity: 0.9;
}

@keyframes weightlessFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-40px);
    }
}

@keyframes circuitFlow {
    from {
        stroke-dashoffset: 400;
    }

    to {
        stroke-dashoffset: 0;
    }
}

.site-footer {
    padding: 15px 0;
    background: var(--nav-bg);
    border-top: 1px solid var(--card-border);
    font-size: 0.85rem;
    text-align: center;
    position: relative;
    z-index: 20;
}

.it-quote {
    font-style: italic;
    color: var(--text-muted);
    margin-bottom: 5px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.3;
}

.copyright {
    margin: 0;
    opacity: 0.8;
}