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

:root {
    --bg: #f7f3ff;
    --text: #10091f;
    --muted: #666177;
    --card: rgba(255, 255, 255, 0.72);
    --border: rgba(91, 30, 201, 0.18);
    --purple: #6d25f5;
    --orange: #ff7a00;
    --shadow: rgba(91, 30, 201, 0.18);
}

html {
    width: 100%;
    min-height: 100%;
    background: #05030d;
    overscroll-behavior: none;
}

body.dark,
html.dark-start body {
    --bg: #05030d;
    --text: #f6f1ff;
    --muted: #b9aecb;
    --card: rgba(13, 9, 29, 0.72);
    --border: rgba(255, 122, 0, 0.22);
    --shadow: rgba(0, 0, 0, 0.45);
}

body {
    font-family: Arial, sans-serif;
    width: 100%;
    min-height: 100vh;
    color: var(--text);
    overflow-x: hidden;
    overscroll-behavior: none;
    background:
        radial-gradient(circle at top left, rgba(125, 0, 255, 0.08), transparent 28%),
        radial-gradient(circle at bottom right, rgba(255, 122, 0, 0.08), transparent 28%),
        linear-gradient(180deg, #f6f3ff 0%, #ffffff 100%);
    transition:
        background 0.6s ease,
        color 0.6s ease;
}

body.dark {
    background:
        radial-gradient(circle at top left, rgba(140, 0, 255, 0.18), transparent 28%),
        radial-gradient(circle at bottom right, rgba(255, 98, 0, 0.16), transparent 28%),
        linear-gradient(180deg, #05030d 0%, #070412 45%, #090414 100%);
}

.site-scale {
    min-height: 100vh;
    background: transparent;
}

body::after {
    content: "";
    position: fixed;
    left: 0;
    right: 0;
    bottom: -120px;
    height: 320px;
    pointer-events: none;
    opacity: 0.55;
    background:
        radial-gradient(circle at 20% 50%, rgba(138, 43, 226, 0.35), transparent 32%),
        radial-gradient(circle at 80% 50%, rgba(255, 122, 0, 0.28), transparent 32%);
    filter: blur(70px);
    z-index: -1;
}

body,
.header,
.brand,
.brand-mark,
.brand-text,
.nav,
.nav a,
.theme-btn,
.hero-card,
.teacher-card,
.contact-box,
.premium-contact,
.btn,
.badge {
    transition:
        background 0.6s ease,
        color 0.6s ease,
        border-color 0.6s ease,
        box-shadow 0.6s ease,
        transform 0.3s ease;
}


.header {
    padding: 24px 7%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    color: var(--text);
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--purple), var(--orange));
    color: #ffffff;
    font-weight: 900;
    letter-spacing: -1px;
    box-shadow: 0 14px 34px rgba(109, 37, 245, 0.28);
}

.brand-text {
    font-size: 20px;
    font-weight: 900;
    letter-spacing: -0.8px;
}

.nav {
    display: flex;
    align-items: center;
    gap: 34px;
}

.nav a {
    position: relative;
    text-decoration: none;
    color: var(--text);
    font-weight: 800;
    font-size: 18px;
}

.nav .telegram-nav-btn {
    padding: 11px 18px;

    border: 2px solid #229ed9;
    border-radius: 999px;

    background: rgba(34, 158, 217, 0.08);

    color: #229ed9;

    font-weight: 900;
    text-decoration: none;

    box-shadow:
        0 0 18px rgba(34, 158, 217, 0.18);

    transition:
        background 0.3s ease,
        color 0.3s ease,
        box-shadow 0.3s ease,
        transform 0.3s ease;
}

.nav .telegram-nav-btn::after {
    display: none;
}

.nav .telegram-nav-btn:hover {
    color: #ffffff;

    background: #229ed9;

    box-shadow:
        0 0 22px rgba(34, 158, 217, 0.38),
        0 0 34px rgba(34, 158, 217, 0.20);

    transform: translateY(-2px);
}

.nav a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -10px;
    width: 0;
    height: 3px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--purple), var(--orange));
    transition: 0.3s;
}

.nav a:hover {
    color: var(--purple);
}

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

.nav a.active {
    color: var(--purple);
}

body.dark .nav a.active {
    color: #c89bff;
}

.theme-btn {
    position: relative;
    width: 112px;
    height: 54px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    background:
        linear-gradient(135deg, rgba(138, 43, 226, 0.22), rgba(255, 122, 0, 0.22)),
        rgba(10, 7, 25, 0.95);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    cursor: pointer;
    overflow: hidden;
    box-shadow:
        0 0 18px rgba(138, 43, 226, 0.35),
        0 0 40px rgba(255, 122, 0, 0.22);
}

.theme-btn::before {
    content: "";
    position: absolute;
    top: 5px;
    left: 6px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, #7b2cff, #ff7a00);
    transition: 0.35s ease;
}

body.dark .theme-btn::before {
    transform: translateX(56px);
}

.theme-btn span {
    position: relative;
    z-index: 2;
    font-size: 18px;
    user-select: none;
}

.theme-btn:hover {
    transform: translateY(-2px) scale(1.02);
}

.burger-btn {
    display: none;
    width: 52px;
    height: 52px;
    border: none;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--purple), var(--orange));
    cursor: pointer;
    box-shadow: 0 14px 34px rgba(109, 37, 245, 0.32);
}

.burger-btn span {
    display: block;
    width: 24px;
    height: 3px;
    margin: 4px auto;
    border-radius: 999px;
    background: #ffffff;
    transition: 0.3s;
}

.burger-btn.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.burger-btn.active span:nth-child(2) {
    opacity: 0;
}

.burger-btn.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.hero {
    position: relative;
    overflow: hidden;
    min-height: calc(100vh - 130px);
    padding: 55px 7% 80px;
    display: grid;
    grid-template-columns: 1.25fr 0.75fr;
    align-items: center;
    gap: 70px;
}

.hero-bg-lines,
.hero-bg-lines::before,
.hero-bg-lines::after,
.hero-glow {
    display: none !important;
    background: none !important;
    animation: none !important;
    opacity: 0 !important;
}

.hero-content,
.hero-card {
    position: relative;
    z-index: 2;
}

.hero-content {
    max-width: 850px;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 34px;
    padding: 12px 22px;
    border-radius: 999px;
    background: rgba(109, 37, 245, 0.10);
    color: var(--purple);
    font-weight: 800;
}

.badge::before {
    content: "";
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--purple);
    box-shadow: 0 0 18px var(--purple);
}

.hero h1 {
    font-size: 68px;
    line-height: 1.05;
    letter-spacing: -2.5px;
    font-weight: 900;
}

.title-line {
    display: block;
}

.glitch {
    position: relative;
    display: inline-block;
    margin-top: 10px;
    color: transparent;
    background: linear-gradient(90deg, #5b24ff 0%, #c029ff 48%, #ff7a00 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow:
        0 0 18px rgba(109, 37, 245, 0.55),
        0 0 30px rgba(215, 44, 255, 0.35),
        0 0 42px rgba(255, 122, 0, 0.28);
    filter:
        drop-shadow(0 0 14px rgba(109, 37, 245, 0.35))
        drop-shadow(0 0 22px rgba(255, 122, 0, 0.22));
    animation: glitchTextJump 4.2s infinite steps(1);
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    color: transparent;
    background: linear-gradient(90deg, #5d22ff 0%, #d72cff 48%, #ff7a00 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.glitch::before {
    text-shadow:
        -8px 0 rgba(109, 37, 245, 0.9),
        8px 0 rgba(215, 44, 255, 0.45);
    animation: glitchScanTop 4.2s infinite steps(1);
}

.glitch::after {
    text-shadow:
        8px 0 rgba(255, 122, 0, 0.9),
        -8px 0 rgba(215, 44, 255, 0.45);
    animation: glitchScanBottom 4.2s infinite steps(1);
}

.glitch-lines {
    position: absolute;
    left: -4%;
    right: -4%;
    top: 0;
    bottom: 0;
    pointer-events: none;
    background:
        linear-gradient(90deg, transparent 0%, rgba(109, 37, 245, 0.9) 8%, transparent 16%) 0 18% / 100% 3px no-repeat,
        linear-gradient(90deg, transparent 6%, rgba(180, 44, 255, 0.9) 24%, transparent 36%) 0 34% / 100% 4px no-repeat,
        linear-gradient(90deg, transparent 18%, rgba(215, 44, 255, 0.85) 42%, transparent 54%) 0 50% / 100% 3px no-repeat,
        linear-gradient(90deg, transparent 42%, rgba(255, 122, 0, 0.9) 66%, transparent 78%) 0 66% / 100% 4px no-repeat,
        linear-gradient(90deg, transparent 58%, rgba(255, 122, 0, 0.8) 82%, transparent 94%) 0 82% / 100% 3px no-repeat;
    opacity: 0;
    filter: drop-shadow(0 0 10px rgba(215, 44, 255, 0.7));
    animation: glitchLines 4.2s infinite steps(1);
}

.hero-description,
.subtitle {
    margin-top: 28px;
    max-width: 720px;
    color: var(--muted);
    font-size: 23px;
    line-height: 1.65;
}

.hero-buttons {
    display: flex;
    gap: 22px;
    margin-top: 42px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 190px;
    padding: 18px 32px;
    border-radius: 18px;
    text-decoration: none;
    font-weight: 900;
    font-size: 18px;
}

.btn.primary {
    color: white;
    background: linear-gradient(135deg, var(--purple), var(--orange));
    box-shadow:
        0 18px 42px rgba(109, 37, 245, 0.30),
        0 0 26px rgba(255, 122, 0, 0.18);
}

.btn.secondary {
    color: var(--purple);
    border: 2px solid var(--purple);
    background: rgba(255, 255, 255, 0.04);
}

.btn:hover {
    transform: translateY(-3px);
}

.hero-card {
    background:
        linear-gradient(var(--card), var(--card)) padding-box,
        linear-gradient(135deg, var(--purple), rgba(215, 44, 255, 0.6), var(--orange)) border-box;
    border: 1px solid transparent;
    border-radius: 32px;
    padding: 40px;
    box-shadow:
        0 24px 70px var(--shadow),
        0 0 40px rgba(109, 37, 245, 0.12);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.hero-card-improved {
    animation: none;
}

.hero-card-improved::before {
    content: "";
    position: absolute;
    inset: -2px;
    z-index: -1;
    border-radius: 34px;
    background: linear-gradient(135deg, var(--purple), transparent, var(--orange));
    opacity: 0.35;
    filter: blur(20px);
}

body.dark .hero-card {
    background:
        linear-gradient(#141021, #141021) padding-box,
        linear-gradient(135deg, var(--purple), rgba(215, 44, 255, 0.6), var(--orange)) border-box;
}

.hero-card h3 {
    font-size: 32px;
    margin-bottom: 30px;
}

.reason {
    margin-bottom: 20px;
    border-radius: 22px;
}

.reason:last-child {
    margin-bottom: 0;
}

.reason-toggle {
    width: 100%;
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 18px;
    align-items: center;
    padding: 14px;
    border: none;
    border-radius: 22px;
    background: transparent;
    color: inherit;
    text-align: left;
    cursor: pointer;
    transition: 0.3s;
}

.reason-toggle:hover {
    background: rgba(109, 37, 245, 0.07);
    transform: translateX(6px);
}

.reason-toggle:hover .reason-icon {
    transform: scale(1.08) rotate(-4deg);
    box-shadow: 0 0 26px rgba(109, 37, 245, 0.22);
}

.reason-icon {
    width: 64px;
    height: 64px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    font-size: 28px;
    background: rgba(109, 37, 245, 0.08);
    border: 1px solid rgba(109, 37, 245, 0.18);
    box-shadow: 0 0 22px rgba(109, 37, 245, 0.14);
    transition: 0.3s;
}

.reason h4 {
    margin-bottom: 6px;
    font-size: 19px;
}

.reason p {
    color: var(--muted);
    line-height: 1.45;
}

.reason-info {
    max-height: 0;
    overflow: hidden;
    margin-left: 86px;
    padding: 0 14px;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.5;
    border-left: 2px solid rgba(109, 37, 245, 0.25);
    opacity: 0;
    transition: 0.35s ease;
}

.reason.open .reason-info {
    max-height: 130px;
    margin-top: 4px;
    padding: 10px 14px 14px;
    opacity: 1;
}

.page {
    padding: 80px 7%;
    min-height: 75vh;
}

.page h1 {
    font-size: 58px;
    line-height: 1.08;
}

.teacher-grid {
    margin-top: 44px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.teacher-card,
.contact-box {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 30px;
    padding: 34px;
    box-shadow: 0 18px 45px var(--shadow);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.teacher-photo {
    width: 90px;
    height: 90px;
    border-radius: 24px;
    display: grid;
    place-items: center;
    font-size: 42px;
    background: linear-gradient(135deg, rgba(91, 30, 201, 0.16), rgba(255, 122, 0, 0.18));
    margin-bottom: 22px;
}

.teacher-card h3 {
    margin-bottom: 12px;
    font-size: 24px;
    color: var(--purple);
}

.teacher-card p,
.contact-box p {
    color: var(--muted);
    line-height: 1.6;
}

.contact-box p {
    margin-bottom: 16px;
    font-size: 19px;
}

.footer {
    text-align: center;
    padding: 30px;
    color: var(--muted);
}

.fade-in {
    animation: fadeIn 0.8s ease forwards;
}

.teachers-page {
    position: relative;
    overflow: hidden;
}

.page-heading {
    position: relative;
    z-index: 2;
    max-width: 850px;
}

.premium-teacher {
    position: relative;
    z-index: 2;
    overflow: hidden;
    transition: 0.35s ease;
}

.premium-teacher::before {
    content: "";
    position: absolute;
    inset: -2px;
    z-index: -1;
    border-radius: 32px;
    background: linear-gradient(135deg, var(--purple), transparent, var(--orange));
    opacity: 0;
    filter: blur(22px);
    transition: 0.35s ease;
}

.premium-teacher:hover {
    transform: translateY(-10px);
}

.premium-teacher:hover::before {
    opacity: 0.35;
}

.teacher-tag {
    display: inline-block;
    margin-bottom: 18px;
    padding: 9px 14px;
    border-radius: 999px;
    background: rgba(109, 37, 245, 0.10);
    color: var(--purple);
    font-size: 14px;
    font-weight: 800;
}

.teacher-meta {
    display: grid;
    gap: 10px;
    margin-top: 22px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.teacher-meta span {
    color: var(--muted);
    font-size: 15px;
}

.contacts {
    position: relative;
    overflow: hidden;
}

.contacts-grid {
    position: relative;
    z-index: 2;
    margin-top: 48px;
    display: grid;
    grid-template-columns: repeat(3, minmax(240px, 1fr));
    gap: 24px;
    align-items: start;
}

.premium-contact {
    position: relative;
    min-height: 420px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 18px;
    border: 1px solid rgba(109, 37, 245, 0.22);
    background:
        linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.04),
            rgba(109, 37, 245, 0.08)
        ),
        var(--card);
    transition: 0.35s ease;
}

.premium-contact::before {
    content: "";
    position: absolute;
    inset: -2px;
    z-index: -1;
    border-radius: 32px;
    background: linear-gradient(135deg, var(--purple), transparent, var(--orange));
    opacity: 0;
    filter: blur(22px);
    transition: 0.35s ease;
}

.premium-contact:hover {
    transform: translateY(-10px);
}

.premium-contact:hover::before {
    opacity: 0.35;
}

.contact-icon {
    width: 68px;
    height: 68px;
    margin-bottom: 22px;
    display: grid;
    place-items: center;
    border-radius: 22px;
    font-size: 30px;
    background: linear-gradient(
        135deg,
        rgba(109, 37, 245, 0.18),
        rgba(255, 122, 0, 0.16)
    );
    box-shadow: 0 0 24px rgba(109, 37, 245, 0.16);
}

.premium-contact h3 {
    margin-bottom: 10px;
    font-size: 24px;
    color: var(--text);
}

.premium-contact p {
    word-break: break-word;
    font-size: 17px;
}

.contact-link,
.contact-status {
    width: fit-content;
    margin-top: auto;
    padding: 12px 18px;
    border-radius: 999px;
    background:
        linear-gradient(
            135deg,
            var(--purple),
            var(--orange)
        );
    color: #ffffff;
    text-decoration: none;
    font-weight: 800;
    box-shadow:
        0 12px 28px rgba(109, 37, 245, 0.25);
    transition: 0.3s;
}

.contact-link:hover {
    transform: translateY(-2px);
}

.contact-dropdown {
    justify-content: flex-start;
}

.contact-dropdown .contact-status {
    border: none;
    outline: none;
    cursor: pointer;
    font: inherit;
}

.contact-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.contact-toggle:hover {
    transform: translateY(-2px);
}

.contact-details {
    width: 100%;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    color: var(--muted);
    line-height: 1.7;
    transition:
        max-height 0.4s ease,
        opacity 0.3s ease,
        margin-top 0.3s ease,
        padding-top 0.3s ease;
}

.contact-details p {
    margin-top: 14px;
    margin-bottom: 0;
    font-size: 16px;
}

.contact-dropdown.open .contact-details {
    max-height: 430px;
    opacity: 1;
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
}

.contact-dropdown.open .contact-status {
    background: linear-gradient(135deg, var(--orange), var(--purple));
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(24px);
    }

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

@keyframes glitchTextJump {
    0%, 66%, 100% {
        transform: translate(0, 0) skew(0deg);
        letter-spacing: normal;
    }

    68% {
        transform: translate(-3px, 1px) skew(-1deg);
        letter-spacing: 1px;
    }

    70% {
        transform: translate(4px, -1px) skew(1deg);
        letter-spacing: -1px;
    }

    72% {
        transform: translate(-5px, 0) skew(-2deg);
        letter-spacing: 2px;
    }

    74% {
        transform: translate(3px, 1px) skew(1deg);
        letter-spacing: normal;
    }

    76% {
        transform: translate(0, 0) skew(0deg);
    }
}

@keyframes glitchScanTop {
    0%, 66%, 100% {
        clip-path: inset(0 0 100% 0);
        transform: translateX(0) scaleX(1);
        opacity: 0;
    }

    68% {
        clip-path: inset(0 0 72% 0);
        transform: translateX(-28px) scaleX(1.06);
        opacity: 1;
    }

    70% {
        clip-path: inset(18% 0 58% 0);
        transform: translateX(22px) scaleX(0.98);
        opacity: 0.85;
    }

    72% {
        clip-path: inset(34% 0 46% 0);
        transform: translateX(-34px) scaleX(1.08);
        opacity: 1;
    }

    74% {
        clip-path: inset(8% 0 78% 0);
        transform: translateX(18px) scaleX(1.03);
        opacity: 0.8;
    }

    76% {
        clip-path: inset(0 0 100% 0);
        transform: translateX(0) scaleX(1);
        opacity: 0;
    }
}

@keyframes glitchScanBottom {
    0%, 66%, 100% {
        clip-path: inset(100% 0 0 0);
        transform: translateX(0) scaleX(1);
        opacity: 0;
    }

    68% {
        clip-path: inset(70% 0 0 0);
        transform: translateX(30px) scaleX(1.07);
        opacity: 1;
    }

    70% {
        clip-path: inset(48% 0 28% 0);
        transform: translateX(-24px) scaleX(0.98);
        opacity: 0.85;
    }

    72% {
        clip-path: inset(58% 0 16% 0);
        transform: translateX(36px) scaleX(1.08);
        opacity: 1;
    }

    74% {
        clip-path: inset(82% 0 0 0);
        transform: translateX(-18px) scaleX(1.03);
        opacity: 0.8;
    }

    76% {
        clip-path: inset(100% 0 0 0);
        transform: translateX(0) scaleX(1);
        opacity: 0;
    }
}

@keyframes glitchLines {
    0%, 66%, 100% {
        opacity: 0;
        transform: translateX(0);
    }

    68% {
        opacity: 1;
        transform: translateX(-20px);
    }

    70% {
        opacity: 0.8;
        transform: translateX(18px);
    }

    72% {
        opacity: 1;
        transform: translateX(-28px);
    }

    74% {
        opacity: 0.75;
        transform: translateX(14px);
    }

    76% {
        opacity: 0;
        transform: translateX(0);
    }
}

@keyframes codeSoftPulse {
    0%, 100% {
        opacity: 0.48;
        transform: translateX(0);
    }

    50% {
        opacity: 1;
        transform: translateX(4px);
    }
}

@media (min-width: 901px) {
    .site-scale {
        zoom: 0,9;
    }
}

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

    .hero-card {
        max-width: 720px;
    }

    .contacts-grid {
        grid-template-columns: 1fr;
        max-width: 720px;
    }
}

@media (max-width: 900px) {
    .header {
        gap: 24px;
    }

    .hero {
        padding-top: 25px;
    }

    .hero-card-improved {
        animation: none;
    }

    .hero h1,
    .page h1 {
        font-size: 42px;
        letter-spacing: -1px;
    }

    .hero-description,
    .subtitle {
        font-size: 19px;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

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

    .reason-toggle {
        grid-template-columns: 56px 1fr;
    }

    .reason-info {
        margin-left: 70px;
    }

    .reason-icon {
        width: 52px;
        height: 52px;
        font-size: 22px;
    }
}

@media (max-width: 600px) {

    body.menu-open {
        overflow: hidden;
    }

    .header {
        position: sticky;
        top: 0;
        z-index: 100;
        min-height: 76px;
        padding: 14px 5%;
        background: linear-gradient(180deg, rgba(247, 243, 255, 0.97), rgba(247, 243, 255, 0.88));
        border-bottom: 1px solid rgba(109, 37, 245, 0.12);
        backdrop-filter: blur(18px);
        -webkit-backdrop-filter: blur(18px);
    }

    body.dark .header {
        background: linear-gradient(180deg, rgba(5, 3, 13, 0.97), rgba(5, 3, 13, 0.88));
        border-bottom-color: rgba(255, 122, 0, 0.12);
    }

    .brand {
        gap: 10px;
    }

    .brand-mark {
        width: 46px;
        height: 46px;
        border-radius: 16px;
        font-size: 14px;
    }

    .brand-text {
        display: block;
        max-width: 132px;
        font-size: 15px;
        line-height: 1.05;
        letter-spacing: -0.4px;
    }

    .burger-btn {
        display: grid;
        place-items: center;
        position: relative;
        z-index: 120;
        width: 52px;
        height: 52px;
        border-radius: 50%;
        background: linear-gradient(145deg, rgba(255,255,255,0.94), rgba(244,240,255,0.90));
        box-shadow:
            0 8px 22px rgba(109,37,245,0.08),
            inset 0 0 0 2px rgba(109,37,245,0.05);
    }

    .burger-btn span {
        width: 22px;
        height: 2.5px;
        margin: 0;
        border-radius: 999px;
        background: linear-gradient(90deg, var(--purple), #8d4bff);
    }

    .burger-btn span + span {
        margin-top: 4px;
    }

    .burger-btn.active span:nth-child(1) {
        transform: translateY(6px) rotate(45deg);
    }

    .burger-btn.active span:nth-child(2) {
        opacity: 0;
    }

    .burger-btn.active span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    .nav {
        position: fixed;
        top: 92px;
        left: 16px;
        right: 16px;
        z-index: 110;
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 14px;
        border-radius: 24px;
        background: linear-gradient(145deg, rgba(255,255,255,0.985), rgba(248,244,255,0.985));
        border: 1px solid rgba(109,37,245,0.08);
        box-shadow: 0 18px 54px rgba(45,16,96,0.10);
        backdrop-filter: blur(24px);
        -webkit-backdrop-filter: blur(24px);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px) scale(0.98);
        pointer-events: none;
        transition:
            opacity 0.24s ease,
            visibility 0.24s ease,
            transform 0.24s ease;
    }

    body.dark .nav {
        background: linear-gradient(145deg, rgba(18,11,38,0.985), rgba(10,6,25,0.985));
        border-color: rgba(255,122,0,0.10);
        box-shadow: 0 18px 54px rgba(0,0,0,0.42);
    }

    .nav.open {
        opacity: 1;
        visibility: visible;
        transform: translateY(0) scale(1);
        pointer-events: auto;
    }

    .nav a {
        width: 100%;
        min-height: 54px;
        padding: 14px 16px;
        border-radius: 16px;
        font-size: 16px;
        font-weight: 800;
        display: flex;
        align-items: center;
        color: var(--text);
        background: rgba(109,37,245,0.045);
    }

    body.dark .nav a {
        background: rgba(255,255,255,0.05);
    }

    .nav a::after {
        display: none;
    }

    .nav a.active {
        color: #ffffff;
        background: linear-gradient(135deg, var(--purple), var(--orange));
        box-shadow: 0 10px 22px rgba(109,37,245,0.16);
    }

    .theme-btn {
        position: relative;
        width: 100%;
        height: 52px;
        margin-top: 2px;
        padding: 0 18px;
        border: none;
        border-radius: 999px;
        background: linear-gradient(145deg, rgba(255,255,255,0.95), rgba(245,240,255,0.92));
        display: flex;
        align-items: center;
        justify-content: space-between;
        overflow: hidden;
        box-shadow: inset 0 0 0 2px rgba(109,37,245,0.04);
    }

    .theme-btn::before {
        content: "";
        position: absolute;
        top: 50%;
        left: 14px;
        width: 74px;
        height: 34px;
        transform: translateY(-50%);
        border-radius: 999px;
        background: linear-gradient(145deg, rgba(218,214,226,1), rgba(236,233,242,1));
        transition: 0.3s ease;
    }

    .theme-btn::after {
        content: "";
        position: absolute;
        top: 50%;
        left: 20px;
        width: 22px;
        height: 22px;
        transform: translateY(-50%);
        border-radius: 50%;
        background: linear-gradient(135deg, var(--purple), var(--orange));
        box-shadow: 0 4px 12px rgba(109,37,245,0.16);
        transition: 0.3s ease;
    }

    body.dark .theme-btn::before {
        left: calc(100% - 88px);
    }

    body.dark .theme-btn::after {
        left: calc(100% - 36px);
    }

    .theme-btn span {
        position: relative;
        z-index: 2;
        font-size: 22px;
        line-height: 1;
    }

    .theme-btn:hover {
        transform: none;
    }

    .hero {
        min-height: auto;
        padding: 32px 5% 56px;
        gap: 34px;
        align-items: start;
    }

    .badge {
        max-width: 100%;
        font-size: 13px;
        line-height: 1.2;
        padding: 9px 14px;
        margin-bottom: 22px;
    }

    .badge::before {
        width: 11px;
        height: 11px;
        flex: 0 0 auto;
    }

    .hero h1 {
        font-size: clamp(40px, 11.8vw, 52px);
        line-height: 1.03;
        letter-spacing: -1.5px;
    }

    .glitch {
        margin-top: 4px;
    }

    .glitch::before,
    .glitch::after,
    .glitch-lines {
        opacity: 0.55;
    }

    .hero-description,
    .subtitle {
        font-size: 18px;
        line-height: 1.55;
        margin-top: 22px;
    }

    .hero-buttons {
        margin-top: 30px;
        gap: 14px;
        flex-direction: column;
    }

    .btn {
        min-width: unset;
        width: 100%;
        padding: 16px 20px;
        font-size: 17px;
        border-radius: 17px;
    }

    .hero-card {
        width: 100%;
        padding: 28px 22px;
        border-radius: 26px;
    }

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

    .reason-toggle {
        grid-template-columns: 50px 1fr;
        gap: 14px;
        padding: 10px;
    }

    .reason-toggle:hover {
        transform: none;
    }

    .reason-icon {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }

    .reason h4 {
        font-size: 17px;
    }

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

    .reason-info {
        margin-left: 64px;
    }

    .page {
        padding: 44px 5% 56px;
    }

    .page h1 {
        font-size: 42px;
        line-height: 1.02;
    }

    .contacts-grid,
    .teacher-grid {
        gap: 18px;
    }

    .premium-contact,
    .teacher-card {
        min-height: unset;
        padding: 24px;
    }

}

.teacher-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.teacher-detail-page {
    position: relative;
}

.back-link {
    display: inline-flex;
    margin-bottom: 28px;
    color: var(--purple);
    text-decoration: none;
    font-weight: 900;
}

.teacher-detail-page {
    position: relative;
}

.back-link {
    display: inline-flex;
    margin-bottom: 28px;
    color: var(--purple);
    text-decoration: none;
    font-weight: 900;
}

.teacher-profile {
    position: relative;
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 46px;
    align-items: center;
    padding: 46px;
    border-radius: 38px;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(109, 37, 245, 0.08)),
        var(--card);
    border: 1px solid var(--border);
    box-shadow: 0 26px 80px var(--shadow);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    overflow: hidden;
}

.teacher-profile::before {
    content: "";
    position: absolute;
    inset: -2px;
    z-index: -1;
    border-radius: 40px;
    background: linear-gradient(135deg, var(--purple), transparent, var(--orange));
    opacity: 0.35;
    filter: blur(24px);
}

.teacher-profile-photo {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 34px;
    overflow: hidden;

    display: grid;
    place-items: center;

    font-size: 120px;

    background:
        linear-gradient(
            135deg,
            rgba(109, 37, 245, 0.18),
            rgba(255, 122, 0, 0.18)
        );

    box-shadow:
        0 20px 54px rgba(109, 37, 245, 0.18);
}

.teacher-profile-photo img {
    width: 100%;
    height: 100%;
    display: block;

    object-fit: cover;
    object-position: center;
}

.teacher-profile-content h1 {
    margin-top: 18px;
    font-size: 58px;
    line-height: 1;
    letter-spacing: -2px;
}

.teacher-profile-text {
    margin-top: 24px;
    max-width: 760px;
    color: var(--muted);
    font-size: 21px;
    line-height: 1.7;
}

.teacher-profile-stats {
    margin-top: 34px;
    display: grid;
    grid-template-columns: repeat(2, minmax(180px, 1fr));
    gap: 18px;
}

.teacher-stat-card {
    padding: 22px;
    border-radius: 24px;
    background: rgba(109, 37, 245, 0.07);
    border: 1px solid var(--border);
}

.teacher-stat-card span {
    display: block;
    margin-bottom: 12px;
    color: var(--purple);
    font-weight: 900;
    font-size: 14px;
}

.teacher-stat-card p {
    color: var(--text);
    font-weight: 800;
    line-height: 1.4;
}

@media (max-width: 800px) {
    .teacher-profile {
        grid-template-columns: 1fr;
        padding: 24px;
        gap: 28px;
        border-radius: 30px;
    }

    .teacher-profile-photo {
        border-radius: 26px;
        font-size: 90px;
    }

    .teacher-profile-content h1 {
        font-size: 40px;
        letter-spacing: -1px;
    }

    .teacher-profile-text {
        font-size: 17px;
        line-height: 1.6;
    }

    .teacher-profile-stats {
        grid-template-columns: 1fr;
    }
}
.faq-section {
    padding: 40px 7% 90px;
}

.faq-heading {
    max-width: 820px;
    margin-bottom: 34px;
}

.faq-heading h2 {
    font-size: 52px;
    line-height: 1.05;
    letter-spacing: -1.8px;
}

.faq-heading p:not(.badge) {
    margin-top: 18px;
    color: var(--muted);
    font-size: 21px;
    line-height: 1.6;
}

.faq-list {
    display: grid;
    gap: 16px;
    max-width: 920px;
}

.faq-item {
    border-radius: 24px;
    background: var(--card);
    border: 1px solid var(--border);
    box-shadow: 0 16px 42px var(--shadow);
    overflow: hidden;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.faq-toggle {
    width: 100%;
    padding: 22px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    border: none;
    background: transparent;
    color: var(--text);
    text-align: left;
    cursor: pointer;
    font: inherit;
}

.faq-toggle span {
    font-size: 19px;
    font-weight: 900;
}

.faq-toggle strong {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #ffffff;
    background: linear-gradient(135deg, var(--purple), var(--orange));
    transition: 0.3s;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    padding: 0 24px;
    color: var(--muted);
    font-size: 17px;
    line-height: 1.65;
    opacity: 0;
    transition: 0.35s ease;
}

.faq-item.open .faq-answer {
    max-height: 260px;
    padding: 0 24px 24px;
    opacity: 1;
}

.faq-item.open .faq-toggle strong {
    transform: rotate(45deg);
}

@media (max-width: 600px) {
    .faq-section {
        padding: 20px 5% 64px;
    }

    .faq-heading h2 {
        font-size: 38px;
    }

    .faq-heading p:not(.badge) {
        font-size: 17px;
    }

    .faq-toggle {
        padding: 18px;
    }

    .faq-toggle span {
        font-size: 17px;
    }

    .faq-answer {
        font-size: 16px;
        padding: 0 18px;
    }

    .faq-item.open .faq-answer {
        padding: 0 18px 20px;
    }
}
/* =========================================
404 PAGE
========================================= */

.error-page {
    position: relative;
    min-height: 78vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.error-card {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 880px;
    padding: 60px;
    border-radius: 40px;
    text-align: center;

    background:
        linear-gradient(
            145deg,
            rgba(255,255,255,0.08),
            rgba(109,37,245,0.08)
        ),
        var(--card);

    border: 1px solid var(--border);

    box-shadow:
        0 30px 90px var(--shadow),
        0 0 50px rgba(109,37,245,0.12);

    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);

    overflow: hidden;
}

.error-card::before {
    content: "";
    position: absolute;
    inset: -2px;
    z-index: -1;

    border-radius: 42px;

    background:
        linear-gradient(
            135deg,
            var(--purple),
            transparent,
            var(--orange)
        );

    opacity: 0.35;
    filter: blur(24px);
}

.error-code {
    display: inline-block;
    margin-bottom: 24px;

    font-size: 180px;
    font-weight: 900;
    line-height: 1;

    letter-spacing: -10px;
}

.error-page h1 {
    margin-top: 10px;
    font-size: 58px;
    line-height: 1.05;
    letter-spacing: -2px;
}

.error-accent {
    display: block;

    margin-top: 10px;

    color: transparent;

    background:
        linear-gradient(
            90deg,
            var(--purple),
            var(--orange)
        );

    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.error-text {
    max-width: 620px;

    margin:
        28px auto 0;

    color: var(--muted);

    font-size: 22px;
    line-height: 1.7;
}

.error-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;

    margin-top: 42px;
}

@media (max-width: 800px) {

    .error-card {
        padding: 34px 24px;
        border-radius: 30px;
    }

    .error-code {
        font-size: 110px;
        letter-spacing: -5px;
    }

    .error-page h1 {
        font-size: 38px;
        letter-spacing: -1px;
    }

    .error-text {
        font-size: 17px;
        line-height: 1.6;
    }

    .error-buttons {
        flex-direction: column;
    }
}
.teacher-photo-fallback {
    display: none;
    font-size: 110px;
    line-height: 1;
}

.teacher-photo-fallback.visible,
.teacher-profile-photo.photo-error .teacher-photo-fallback {
    display: block;
}

.teacher-profile-photo img + .teacher-photo-fallback {
    display: none;
}

.teacher-profile-photo.photo-error img {
    display: none;
}

.telegram-nav-btn {
    padding: 12px 18px;

    border-radius: 14px;

    border: 1px solid rgba(0, 170, 255, 0.45);

    background:
        linear-gradient(
            135deg,
            rgba(0, 170, 255, 0.12),
            rgba(0, 120, 255, 0.08)
        );

    color: #58b7ff !important;

    box-shadow:
        0 0 18px rgba(0, 170, 255, 0.16);

    transition:
        0.3s ease;
}

.telegram-nav-btn:hover {
    transform: translateY(-2px);

    border-color: rgba(0, 170, 255, 0.8);

    box-shadow:
        0 0 26px rgba(0, 170, 255, 0.32);
}