/* asgon.ru — Современный дизайн */
:root {
    --bg-dark: #0a0e17;
    --bg-card: #111827;
    --bg-alt: #0f172a;
    --bg-input: #1e293b;
    --bg-hover: #1e293b;
    --text: #f1f5f9;
    --text-muted: #94a3b8;
    --text-secondary: #94a3b8;
    --accent: #06b6d4;
    --accent-hover: #22d3ee;
    --accent-muted: rgba(6, 182, 212, 0.15);
    --border: #1e293b;
    --gradient: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
    --font: 'Manrope', system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --radius: 12px;
    --radius-lg: 20px;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
    --transition: 0.25s ease;
    --header-bg: rgba(10, 14, 23, 0.9);
    --on-accent: #0a0e17;
}

/* Светлая тема */
[data-theme="light"] {
    --on-accent: #ffffff;
    --bg-dark: #f8fafc;
    --bg-card: #ffffff;
    --bg-alt: #f1f5f9;
    --bg-input: #f1f5f9;
    --bg-hover: #e2e8f0;
    --text: #0f172a;
    --text-muted: #64748b;
    --text-secondary: #475569;
    --accent: #7c3aed;
    --accent-hover: #6d28d9;
    --accent-muted: rgba(124, 58, 237, 0.12);
    --gradient: linear-gradient(135deg, #7c3aed 0%, #4f46e5 100%);
    --border: #e2e8f0;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    --header-bg: rgba(248, 250, 252, 0.95);
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 200px; /* header + волна */
}
section[id] {
    scroll-margin-top: 200px;
}

body {
    font-family: var(--font);
    background: var(--bg-dark);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 1.25rem 0;
    background: var(--header-bg);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid transparent;
    transition: var(--transition);
}

.header.scrolled {
    border-color: var(--border);
}

.header.scrolled .nav-wave {
    opacity: 0.8;
}

.nav-wave {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: -12px;
    /* 100vmax на portrait = 100vh (шире экрана) — волна не обрезается при зуме */
    width: max(100vw, 100vmax);
    min-width: 100%;
    height: 40px;
    overflow: hidden;
    pointer-events: none;
}

.nav-wave-bg {
    position: absolute;
    inset: 0;
    width: 300%;
    background: linear-gradient(
        90deg,
        #06b6d4,
        #3b82f6,
        #8b5cf6,
        #06b6d4,
        #3b82f6,
        #8b5cf6,
        #06b6d4
    );
    background-size: 200% 100%;
    animation: wave-shimmer 8s linear infinite;
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 40' preserveAspectRatio='none'%3E%3Cpath d='M0,30 C200,0 400,60 600,30 C800,0 1000,60 1200,30 L1200,40 L0,40 Z' fill='white'/%3E%3C/svg%3E");
    mask-size: 100% 100%;
    mask-repeat: no-repeat;
    mask-position: center;
}

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

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    width: 100%;
}

.nav-brand {
    flex-shrink: 0;
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: 0.02em;
    color: var(--text);
    text-decoration: none;
    transition: color var(--transition);
}
.nav-brand:hover {
    color: var(--accent);
}

.logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: transform var(--transition), box-shadow var(--transition);
    background: transparent !important;
    background-color: transparent !important;
}

.logo:hover {
    transform: translateY(-1px);
}

.logo-img {
    display: inline-block;
    vertical-align: middle;
    transition: transform var(--transition), filter var(--transition);
    filter: drop-shadow(0 2px 8px rgba(6, 182, 212, 0.3));
    object-fit: contain;
    background: transparent !important;
    mix-blend-mode: normal;
    background-color: transparent !important;
}
.logo:hover .logo-img {
    transform: scale(1.08);
    filter: drop-shadow(0 4px 12px rgba(6, 182, 212, 0.5));
}
[data-theme="light"] .logo-img {
    filter: drop-shadow(0 2px 8px rgba(124, 58, 237, 0.2));
}
[data-theme="light"] .logo:hover .logo-img {
    filter: drop-shadow(0 4px 12px rgba(124, 58, 237, 0.4));
}

.logo:hover .logo-monogram {
    box-shadow: 0 0 20px var(--accent-muted), 0 0 40px rgba(6, 182, 212, 0.15);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    list-style: none;
    flex: 1;
    justify-content: flex-end;
}

.nav-links > li {
    position: relative;
}

.nav-links a,
.nav-group-label {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color var(--transition);
}

.nav-group-label {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    cursor: pointer;
    background: none;
    border: none;
    font-family: inherit;
}

.nav-group-label:hover,
.nav-links a:hover,
.nav-links a.nav-active {
    color: var(--accent);
}

.nav-yalo-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    min-width: auto;
    height: 42px;
    padding: 0 0.75rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-muted);
    transition: color var(--transition), border-color var(--transition), background var(--transition);
}

/* Кнопка Яло в шапке для мобильной версии */
.nav-yalo-link-mobile {
    display: none;
}

@media (max-width: 768px) {
    .nav-yalo-link-mobile {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        padding: 0;
        margin-left: auto;
        margin-right: 0.75rem;
        background: var(--bg-card);
        border: 1px solid var(--border);
        border-radius: 50%;
        transition: all var(--transition);
        flex-shrink: 0;
    }
    
    .nav-yalo-link-mobile:hover {
        border-color: var(--accent);
        background: var(--accent-muted);
        transform: scale(1.05);
    }
    
    .nav-yalo-link-mobile:active {
        transform: scale(0.95);
    }
    
    .nav-yalo-link-mobile .nav-yalo-avatar {
        width: 32px;
        height: 32px;
        border-radius: 50%;
        object-fit: cover;
    }
}
.nav-yalo-link:hover {
    color: var(--accent);
    border-color: var(--accent);
}
.nav-yalo-link.nav-active {
    color: var(--accent);
    border-color: var(--accent);
}
.nav-yalo-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    animation: yalo-pulse 2.5s ease-in-out infinite;
}
@keyframes yalo-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}
.nav-yalo-label {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.2;
    color: inherit;
    white-space: nowrap;
}
.nav-yalo-ai {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}
.nav-yalo-name {
    font-size: 0.6rem;
    font-weight: 500;
    opacity: 0.85;
}

.nav-theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-muted);
    cursor: pointer;
    transition: color var(--transition), border-color var(--transition), background var(--transition);
}
.nav-theme-toggle:hover {
    color: var(--accent);
    border-color: var(--accent);
}
.nav-theme-toggle .theme-icon-light { display: none; }
.nav-theme-toggle .theme-icon-dark { display: inline; }
[data-theme="light"] .nav-theme-toggle .theme-icon-light { display: inline; }
[data-theme="light"] .nav-theme-toggle .theme-icon-dark { display: none; }

.nav-chevron {
    font-size: 0.7em;
    opacity: 0.8;
    transition: transform 0.2s;
}

/* Блок иконок: Тема, Яло, FAQ */
.nav-icons-row {
    display: flex;
    align-items: center;
}
.nav-icons-inner {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.nav-faq-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}
.nav-faq-icon {
    display: inline-flex;
    width: 20px;
    height: 20px;
    color: inherit;
}
.nav-faq-icon svg {
    width: 100%;
    height: 100%;
}
.nav-faq-text {
    font-size: 0.95rem;
    font-weight: 500;
}
/* Блок авторизации — справа от меню */
.nav-user-block {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 50px;
    margin-left: 0.5rem;
}
.nav-user-block .nav-user-link {
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    transition: color var(--transition);
}
.nav-user-block .nav-user-login {
    color: var(--accent);
}
.nav-user-block .nav-user-login:hover {
    color: var(--accent-hover);
}
.nav-user-block .nav-user-name {
    color: var(--text);
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
}
.nav-user-block .nav-user-name:hover {
    color: var(--accent);
}
.nav-user-block .nav-user-logout {
    color: var(--text-muted);
    font-weight: 500;
}
.nav-user-block .nav-user-logout:hover {
    color: var(--text);
}
.nav-user-sep {
    color: var(--border);
    font-weight: 300;
    user-select: none;
}

.nav-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 180px;
    margin: 0.5rem 0 0;
    padding: 0.5rem 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 0.2s, visibility 0.2s, transform 0.2s;
    z-index: 50;
}

.nav-group:hover .nav-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-dropdown li {
    margin: 0;
}

.nav-dropdown a {
    display: block;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.nav-dropdown a:hover {
    background: rgba(6, 182, 212, 0.1);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: var(--transition);
}

/* Hero — padding-top под header+волну, flex-start чтобы фото не заходило под меню */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    padding: 200px 0 4rem; /* 200px — запас под header + волну на всех устройствах */
}

.hero-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.grid-pattern {
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(rgba(6, 182, 212, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(6, 182, 212, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
}

.gradient-orb {
    position: absolute;
    width: 600px;
    height: 600px;
    top: -200px;
    right: -200px;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.15) 0%, transparent 70%);
    border-radius: 50%;
}

.hero-inner {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 3rem;
}

.hero-content {
    flex: 1;
    max-width: 600px;
}

.hero-photo {
    flex-shrink: 0;
    position: relative;
    width: 360px;
    max-width: 100%;
    aspect-ratio: 1;
    background: transparent;
}

.hero-photo-border {
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    background: conic-gradient(
        from 0deg,
        #06b6d4,
        #3b82f6,
        #8b5cf6,
        #06b6d4
    );
    animation: gradient-rotate 12s linear infinite;
    z-index: 0;
}

.hero-photo-inner {
    position: absolute;
    inset: 0;
    z-index: 1;
    border-radius: 50%;
    background: var(--bg-dark);
}

.hero-photo img {
    position: relative;
    z-index: 2;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
    background: transparent;
}
[data-theme="light"] .hero-photo img {
    filter: none !important;
}
[data-theme="light"] .resume-photo-wrap .photo {
    filter: none !important;
}

@keyframes gradient-rotate {
    to {
        transform: rotate(360deg);
    }
}

.hero-badge {
    display: inline-block;
    font-size: 0.8rem;
    color: var(--accent);
    background: var(--accent-muted);
    padding: 0.35rem 0.75rem;
    border-radius: 100px;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.hero-title {
    font-size: clamp(3rem, 8vw, 5rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 1rem;
}

.hero-title .accent {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.hero-desc {
    max-width: 540px;
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-size: 1.05rem;
}

.hero-actions {
    display: flex;
    gap: 1rem;
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.75rem;
}

.scroll-arrow {
    width: 20px;
    height: 20px;
    border-right: 2px solid var(--accent);
    border-bottom: 2px solid var(--accent);
    transform: rotate(45deg);
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: rotate(45deg) translateY(0); }
    50% { transform: rotate(45deg) translateY(6px); }
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-family: var(--font);
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: var(--radius);
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    border: 2px solid transparent;
}

.btn-primary {
    background: var(--gradient);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(6, 182, 212, 0.3);
}

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

.btn-outline:hover {
    background: var(--accent-muted);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

/* Sections */
.section {
    padding: 5rem 0;
}

.section-alt {
    background: var(--bg-alt);
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 3rem;
    letter-spacing: -0.02em;
}

/* About */
.about-grid {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 3rem;
    align-items: start;
}

.about-text p {
    margin-bottom: 1rem;
    color: var(--text-muted);
}

.about-subtitle {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--accent);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.about-expertise-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.about-expertise-list {
    list-style: none;
    margin-bottom: 0;
}

.about-expertise-list li {
    position: relative;
    padding-left: 1rem;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
}

.about-expertise-list li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: 600;
}

.stats-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    min-width: 200px;
}

.stat-value {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent);
    font-family: var(--font-mono);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Principles — Принципы работы */
.principles-section {
    margin-top: 3rem;
    padding-top: 3rem;
    border-top: 1px solid var(--border);
}

.principles-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 2rem;
}

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

.principle-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    transition: var(--transition);
    border-left: 3px solid var(--accent);
}

.principle-card:hover {
    border-color: rgba(6, 182, 212, 0.4);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

.principle-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.75rem;
}

.principle-text {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0;
}

/* CJM Journey — Опыт работы */
.cjm-journey {
    position: relative;
    padding: 1rem 0;
}

.cjm-path {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 3px;
    margin-left: -1.5px;
    background: linear-gradient(180deg, #06b6d4, #3b82f6, #8b5cf6);
    border-radius: 2px;
    opacity: 0.7;
    box-shadow: 0 0 12px var(--accent-muted);
}

.cjm-stage {
    position: relative;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: start;
    gap: 1.5rem;
    transition: opacity 0.2s ease, transform 0.2s ease;
    margin-bottom: 3rem;
    opacity: 0;
    transform: translateY(20px);
}

.cjm-stage.visible {
    opacity: 1;
    transform: translateY(0);
}

.cjm-stage:last-child {
    margin-bottom: 0;
}

.cjm-stage-card {
    grid-column: 1;
    grid-row: 1;
    justify-self: end;
}

.cjm-stage-node {
    grid-column: 2;
}

.cjm-achievements-wrap {
    grid-column: 3;
    grid-row: 1;
    justify-self: start;
}

.cjm-stage-node {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: var(--bg-alt);
    border: 2px solid var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 20px var(--accent-muted);
    flex-shrink: 0;
}

.cjm-stage-num {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 1rem;
    color: var(--accent);
}

.cjm-stage-card {
    max-width: 420px;
    padding: 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    border-left: 3px solid var(--accent);
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cjm-stage-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.cjm-stage-header {
    margin-bottom: 0.75rem;
}

.cjm-stage-date {
    display: inline-block;
    font-size: 0.8rem;
    color: var(--accent);
    font-weight: 500;
    margin-bottom: 0.35rem;
}

.cjm-stage-job {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--text);
}

.cjm-stage-company {
    font-size: 0.95rem;
    color: var(--accent);
    font-weight: 500;
}

.cjm-stage-desc {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    line-height: 1.5;
}

/* Achievements infographic */
.cjm-achievements-wrap {
    max-width: 380px;
}

.cjm-achievements {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
}

.cjm-achievement {
    position: relative;
    padding: 0.85rem;
    background: rgba(6, 182, 212, 0.06);
    border: 1px solid rgba(6, 182, 212, 0.2);
    border-radius: var(--radius);
    padding-left: 2.5rem;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    opacity: 0;
    transform: translateY(8px);
    animation: cjm-achievement-in 0.2s ease forwards;
}

.cjm-stage.visible .cjm-achievement:nth-child(1) { animation-delay: 0.03s; }
.cjm-stage.visible .cjm-achievement:nth-child(2) { animation-delay: 0.06s; }
.cjm-stage.visible .cjm-achievement:nth-child(3) { animation-delay: 0.09s; }
.cjm-stage.visible .cjm-achievement:nth-child(4) { animation-delay: 0.12s; }
.cjm-stage.visible .cjm-achievement:nth-child(5) { animation-delay: 0.15s; }
.cjm-stage.visible .cjm-achievement:nth-child(6) { animation-delay: 0.18s; }

@keyframes cjm-achievement-in {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cjm-achievement:hover {
    transform: translateY(-2px);
    border-color: rgba(6, 182, 212, 0.4);
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.1);
}

.cjm-achievement::before {
    content: '';
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.8;
}

.cjm-achievement[data-icon="team"]::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2306b6d4' stroke-width='2'%3E%3Cpath d='M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='9' cy='7' r='4'/%3E%3Cpath d='M23 21v-2a4 4 0 0 0-3-3.87'/%3E%3Cpath d='M16 3.13a4 4 0 0 1 0 7.75'/%3E%3C/svg%3E"); }
.cjm-achievement[data-icon="system"]::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2306b6d4' stroke-width='2'%3E%3Crect x='2' y='3' width='20' height='14' rx='2'/%3E%3Cpath d='M8 21h8'/%3E%3Cpath d='M12 17v4'/%3E%3C/svg%3E"); }
.cjm-achievement[data-icon="uptime"]::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2306b6d4' stroke-width='2'%3E%3Cpath d='M22 11.08V12a10 10 0 1 1-5.93-9.14'/%3E%3Cpolyline points='22 4 12 14.01 9 11.01'/%3E%3C/svg%3E"); }
.cjm-achievement[data-icon="scale"]::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2306b6d4' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 6v6l4 2'/%3E%3C/svg%3E"); }
.cjm-achievement[data-icon="monitor"]::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2306b6d4' stroke-width='2'%3E%3Crect x='2' y='3' width='20' height='14' rx='2'/%3E%3Cline x1='8' y1='21' x2='16' y2='21'/%3E%3Cline x1='12' y1='17' x2='12' y2='21'/%3E%3C/svg%3E"); }
.cjm-achievement[data-icon="success"]::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2306b6d4' stroke-width='2'%3E%3Cpath d='M22 11.08V12a10 10 0 1 1-5.93-9.14'/%3E%3Cpolyline points='22 4 12 14.01 9 11.01'/%3E%3C/svg%3E"); }
.cjm-achievement[data-icon="chart"]::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2306b6d4' stroke-width='2'%3E%3Cline x1='18' y1='20' x2='18' y2='10'/%3E%3Cline x1='12' y1='20' x2='12' y2='4'/%3E%3Cline x1='6' y1='20' x2='6' y2='14'/%3E%3C/svg%3E"); }
.cjm-achievement[data-icon="trophy"]::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2306b6d4' stroke-width='2'%3E%3Cpath d='M6 9H4.5a2.5 2.5 0 0 1 0-5H6'/%3E%3Cpath d='M18 9h1.5a2.5 2.5 0 0 0 0-5H18'/%3E%3Cpath d='M4 22h16'/%3E%3Cpath d='M10 14.66V17c0 .55-.47.98-.97 1.21C7.85 18.75 7 20.24 7 22'/%3E%3Cpath d='M14 14.66V17c0 .55.47.98.97 1.21C16.15 18.75 17 20.24 17 22'/%3E%3Cpath d='M18 2H6v7a6 6 0 0 0 12 0V2Z'/%3E%3C/svg%3E"); }
.cjm-achievement[data-icon="budget"]::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2306b6d4' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 4v16'/%3E%3Cpath d='M7 4h9c2.5 0 4.5 2 4.5 4.5S18.5 13 16 13H7'/%3E%3Cpath d='M7 10.5h11'/%3E%3C/svg%3E"); }
.cjm-achievement[data-icon="target"]::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2306b6d4' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Ccircle cx='12' cy='12' r='6'/%3E%3Ccircle cx='12' cy='12' r='2'/%3E%3C/svg%3E"); }
.cjm-achievement[data-icon="location"]::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2306b6d4' stroke-width='2'%3E%3Cpath d='M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z'/%3E%3Ccircle cx='12' cy='10' r='3'/%3E%3C/svg%3E"); }
.cjm-achievement[data-icon="merge"]::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2306b6d4' stroke-width='2'%3E%3Ccircle cx='18' cy='18' r='3'/%3E%3Ccircle cx='6' cy='6' r='3'/%3E%3Cpath d='M6 21V9a9 9 0 0 0 9 9'/%3E%3C/svg%3E"); }

.cjm-achievement-value {
    display: block;
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--accent);
    margin-bottom: 0.2rem;
}

.cjm-achievement-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.3;
}

.cjm-stage-bullets {
    list-style: none;
}

.cjm-stage-bullets li {
    position: relative;
    padding-left: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.cjm-stage-bullets li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.5em;
    width: 6px;
    height: 6px;
    background: var(--gradient);
    border-radius: 50%;
}

/* Skills */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.skill-category h3 {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: var(--accent);
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.skill-tags span {
    display: inline-block;
    padding: 0.4rem 0.85rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 100px;
    font-size: 0.9rem;
    color: var(--text-muted);
    transition: var(--transition);
}

.skill-tags span:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* Education */
.education-grid {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 3rem;
}

.education-card.main {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
}

.education-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.edu-school {
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.edu-spec {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.edu-year {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--text-muted);
}

.education-courses h4 {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: var(--text-muted);
}

.education-courses ul {
    list-style: none;
}

.education-courses li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.95rem;
}

.education-courses li:last-child {
    border-bottom: none;
}

/* Projects */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    transition: var(--transition);
}

.project-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.project-card.featured {
    grid-column: 1 / -1;
    border-color: rgba(6, 182, 212, 0.3);
}

.project-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
}

.project-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.project-highlights {
    list-style: none;
    margin-bottom: 1rem;
}

.project-highlights li {
    position: relative;
    padding-left: 1rem;
    margin-bottom: 0.4rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.project-highlights li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--accent);
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.project-tags span {
    padding: 0.25rem 0.6rem;
    background: var(--accent-muted);
    color: var(--accent);
    border-radius: 6px;
    font-size: 0.75rem;
    font-family: var(--font-mono);
}

/* Blog block (homepage) */
.blog-block-badge {
    display: inline-block;
    font-size: 0.85rem;
    color: var(--accent);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    font-weight: 500;
}
.blog-block-desc {
    color: var(--text-muted);
    margin-bottom: 2rem;
    max-width: 560px;
}
.blog-block-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}
.blog-block-draggable .blog-block-card {
    position: relative;
    padding-left: 2rem;
}
.blog-block-drag-handle {
    position: absolute;
    left: 0;
    top: 1rem;
    cursor: grab;
    color: var(--text-muted);
    font-size: 1rem;
    letter-spacing: -0.2em;
    padding: 0.35rem 0.5rem;
    border-radius: 6px;
    user-select: none;
}
.blog-block-drag-handle:hover {
    color: var(--accent);
    background: var(--accent-muted);
}
.blog-block-drag-handle:active {
    cursor: grabbing;
}
.blog-block-ghost {
    opacity: 0.4;
    background: rgba(6, 182, 212, 0.08);
}
.blog-block-drag {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}
.blog-block-card {
    transition: transform 0.2s, opacity 0.2s;
}
.blog-block-link {
    display: block;
    height: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.25s, box-shadow 0.25s;
}
.blog-block-link:hover {
    border-color: rgba(6, 182, 212, 0.4);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}
.blog-block-image {
    aspect-ratio: 16/10;
    overflow: hidden;
}
.blog-block-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.blog-block-link:hover .blog-block-image img {
    transform: scale(1.05);
}
.blog-block-placeholder {
    aspect-ratio: 16/10;
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.08) 0%, rgba(59, 130, 246, 0.05) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    opacity: 0.5;
}
.blog-block-placeholder svg {
    width: 40px;
    height: 40px;
}
.blog-block-body {
    padding: 1.25rem;
}
.blog-block-body time {
    font-size: 0.8rem;
    color: var(--accent);
    font-weight: 500;
    display: block;
    margin-bottom: 0.5rem;
}
.blog-block-body h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    transition: color 0.2s;
}
.blog-block-link:hover .blog-block-body h3 {
    color: var(--accent);
}
.blog-block-body p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    line-height: 1.5;
}
.blog-block-cta {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--accent);
}
.blog-block-more {
    margin-top: 1rem;
}
.blog-block-empty {
    color: var(--text-muted);
    margin-bottom: 2rem;
}
.blog-block-empty a {
    color: var(--accent);
    text-decoration: none;
}
.blog-block-empty a:hover {
    text-decoration: underline;
}

/* Contact */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: color var(--transition);
}

.contact-item:hover {
    color: var(--accent);
}

.contact-item.telegram {
    color: var(--accent);
}

.contact-icon {
    font-size: 1.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-icon svg {
    width: 1.25rem;
    height: 1.25rem;
}

.contact-icon-email {
    color: var(--accent);
}

.contact-icon-email svg {
    filter: drop-shadow(0 0 6px var(--accent-muted));
}

.contact-icon-phone {
    color: var(--accent);
}

.contact-icon-phone svg {
    filter: drop-shadow(0 0 6px var(--accent-muted));
}

.contact-icon-location {
    color: var(--accent);
}

.contact-icon-location svg {
    filter: drop-shadow(0 0 6px var(--accent-muted));
}

.contact-icon-telegram {
    color: var(--accent);
}

.contact-icon-telegram svg {
    filter: drop-shadow(0 0 6px var(--accent-muted));
}

.contact-item.telegram:hover .contact-icon-telegram {
    color: var(--accent-hover);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-family: var(--font);
    font-size: 1rem;
    transition: border-color var(--transition);
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.contact-form textarea {
    resize: vertical;
    min-height: 100px;
}

.contact-form-consent {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.06) 0%, rgba(59, 130, 246, 0.04) 100%);
    border: 1px solid var(--border);
    border-radius: 12px;
    font-size: 1.05rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}
.contact-form-consent:hover {
    border-color: rgba(6, 182, 212, 0.4);
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.1) 0%, rgba(59, 130, 246, 0.06) 100%);
}
.contact-form-consent:has(.consent-checkbox:focus-visible) {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}
.contact-form-consent:has(.consent-checkbox:checked) {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px var(--accent), 0 4px 20px rgba(6, 182, 212, 0.2);
}

.consent-checkbox {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.consent-box {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    min-width: 28px;
    min-height: 28px;
    border: 2px solid var(--border);
    border-radius: 8px;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.consent-box .consent-check {
    opacity: 0;
    transform: scale(0.5);
    transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.consent-box .consent-check svg {
    width: 16px;
    height: 16px;
    color: var(--accent);
}

.consent-checkbox:checked + .consent-box {
    border-color: var(--accent);
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.2) 0%, rgba(59, 130, 246, 0.15) 100%);
}
.consent-checkbox:checked + .consent-box .consent-check {
    opacity: 1;
    transform: scale(1);
}

.consent-text {
    line-height: 1.5;
}
.contact-form-consent a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}
.contact-form-consent a:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

.contact-form-placeholder {
    background: var(--bg-card);
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    color: var(--text-muted);
}

.contact-form-placeholder a {
    color: var(--accent);
}

.form-status {
    font-size: 0.9rem;
    min-height: 1.5em;
}

/* Формы авторизации */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.auth-form label {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-size: 0.95rem;
    font-weight: 500;
}
.auth-form label span {
    color: var(--text-muted);
}
.auth-form input {
    width: 100%;
    padding: 0.875rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-family: var(--font);
    font-size: 1rem;
}
.auth-form input:focus {
    outline: none;
    border-color: var(--accent);
}
.auth-form .btn {
    margin-top: 0.5rem;
}
.form-error {
    font-size: 0.85rem;
    color: var(--danger, #ef4444);
}
.auth-form-wrap {
    max-width: 420px;
    margin: 0 auto;
    font-family: var(--font);
    color: var(--text);
}
.auth-form-wrap .alert {
    font-family: var(--font);
    line-height: 1.5;
}
.auth-form-wrap .back-link {
    font-family: var(--font);
}
.auth-form-back {
    margin-top: 1rem;
}
.auth-form-desc {
    margin-bottom: 1rem;
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}
.auth-form-wrap-wide {
    max-width: 520px;
}

/* Личный кабинет */
.account-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
    font-family: var(--font);
}
.account-tabs a {
    padding: 0.75rem 1rem;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: var(--radius);
    transition: var(--transition);
}
.account-tabs a:hover {
    color: var(--text);
    background: var(--bg-hover);
}
.account-tabs a.active {
    color: var(--accent);
    font-weight: 600;
    border-bottom: 2px solid var(--accent);
    margin-bottom: -1px;
}
.account-quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}
.account-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}
.account-card {
    padding: 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-family: var(--font);
    color: var(--text);
    line-height: 1.6;
}
.account-card h2,
.account-card h3 {
    font-family: var(--font);
    font-weight: 600;
    color: var(--text);
}
.account-card h2 {
    font-size: 1.15rem;
    margin-bottom: 1rem;
}
.account-card h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}
.account-card dt {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
    font-weight: 500;
}
.account-card dd {
    margin: 0 0 0.75rem 0;
    font-weight: 500;
    color: var(--text);
}
.account-card dd:last-of-type {
    margin-bottom: 0;
}
.account-card a {
    color: var(--accent);
    text-decoration: none;
}
.account-card a:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}
.account-card p {
    color: var(--text);
    font-size: 0.95rem;
    margin-bottom: 1rem;
}
.account-card .account-empty-text {
    color: var(--text-muted);
    margin-bottom: 1rem;
}
.account-inquiry {
    cursor: pointer;
}
.account-inquiry-preview {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
}
.account-inquiry-full {
    display: none;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border);
    white-space: pre-wrap;
    color: var(--text);
    font-size: 0.95rem;
    line-height: 1.5;
}
.account-inquiry.expanded .account-inquiry-full {
    display: block;
}
.account-inquiry.expanded .account-inquiry-preview {
    display: none;
}
.account-inquiry-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}
.account-inquiry-meta time {
    color: var(--text-muted);
    font-size: 0.9rem;
}
.account-inquiry-hint {
    font-size: 0.85rem;
    color: var(--text-muted);
}
.account-show-more {
    margin-top: 1rem;
    font-family: var(--font);
}
.account-show-more span {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-left: 0.5rem;
}
/* Данные профиля — читаемое разделение полей */
.account-profile-data {
    display: grid;
    gap: 0;
    margin-bottom: 0;
}
.account-profile-row {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 1rem;
    align-items: baseline;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
}
.account-profile-row:last-of-type {
    border-bottom: none;
}
.account-profile-row dt {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0;
    font-weight: 500;
}
.account-profile-row dd {
    margin: 0;
    font-size: 1rem;
    font-weight: 500;
}
.account-profile-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}
.account-profile-actions .btn-danger {
    color: var(--text-muted);
}
.account-profile-actions .btn-danger:hover {
    color: var(--danger, #ef4444);
}
.account-tab-pane {
    display: none;
}
.account-tab-pane.active {
    display: block;
}
/* Общий контейнер контента вкладок — одинаковая ширина для Профиля, Записей, Обращений, Диалогов */
.account-tab-content {
    width: 100%;
}
.account-login-history {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
    line-height: 1.5;
}
.account-login-history li {
    padding: 0.25rem 0;
}
.account-card details {
    margin-top: 1rem;
}
.account-card details summary {
    cursor: pointer;
    color: var(--text-muted);
    font-size: 0.9rem;
}
.account-meta {
    color: var(--text-muted);
    font-size: 0.9rem;
}
.account-status-badge {
    font-size: 0.8rem;
    padding: 0.2rem 0.5rem;
    background: var(--bg-input);
    border-radius: var(--radius);
    color: var(--text);
}
.account-more-link {
    margin-top: 1rem;
    font-size: 0.95rem;
}
.account-more-link a {
    color: var(--accent);
    text-decoration: none;
}
.account-more-link a:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}
.account-grid-full {
    grid-template-columns: 1fr;
}
.account-card-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}
.account-card-link {
    flex: 1;
    text-decoration: none;
    color: inherit;
}
.account-card-link:hover {
    text-decoration: none;
    color: inherit;
}
.account-card-link .account-meta {
    display: block;
}
.account-card-preview {
    margin-top: 0.25rem;
    margin-bottom: 0;
    font-size: 0.95rem;
}
.account-share-badge {
    font-size: 0.75rem;
    color: var(--accent);
}
.account-card-cta {
    margin-top: 0.75rem;
    margin-bottom: 0;
}
.account-footer-wrap {
    padding-bottom: 2rem;
}
.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    font-size: 0.95rem;
}
.alert-error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: var(--danger, #ef4444);
}
.alert-danger {
    padding: 1.5rem;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    font-family: var(--font);
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text);
}
[data-theme="light"] .alert-danger {
    background: rgba(239, 68, 68, 0.08);
}
.btn-delete {
    background: #c33;
    color: white;
}
.btn-delete:hover {
    background: #a22;
    color: white;
}

/* Footer */
.footer {
    padding: 2rem 0;
    border-top: 1px solid var(--border);
    text-align: center;
}

.footer p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.75rem;
}
.footer-link-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--bg-input);
    color: var(--text-muted);
    transition: all 0.2s;
    text-decoration: none;
}
.footer-link-icon svg {
    width: 20px;
    height: 20px;
}
.footer-link-icon:hover {
    background: var(--accent);
    color: #fff;
    transform: translateY(-2px);
}
.footer-link-icon:focus {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.footer-legal {
    margin-top: 1rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}
.footer-legal a {
    color: var(--accent);
    text-decoration: none;
}
.footer-legal a:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

/* Privacy / legal pages */
.privacy-hero {
    padding: 8rem 0 3rem;
    text-align: center;
}
.privacy-hero h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}
.privacy-hero .privacy-subtitle {
    color: var(--text-muted);
    font-size: 1rem;
}
.privacy-content {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 1.5rem 4rem;
}
/* Pet-projects page */
.pet-hero {
    padding: 8rem 0 3rem;
    text-align: center;
}
.pet-hero-badge {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--accent);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
    opacity: 0.9;
}
.pet-hero h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}
.pet-hero-subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 560px;
    margin: 0 auto;
    line-height: 1.6;
}
.pet-projects-section {
    padding: 0 0 2rem;
}
.pet-projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}
.pet-project-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    transition: var(--transition);
}
.pet-project-card:hover {
    border-color: rgba(6, 182, 212, 0.4);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}
.pet-project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 0.75rem;
}
.pet-project-card h3 {
    font-size: 1.15rem;
    font-weight: 600;
    margin: 0;
}
.pet-project-status {
    flex-shrink: 0;
    font-size: 0.75rem;
    padding: 0.2rem 0.6rem;
    background: rgba(6, 182, 212, 0.15);
    color: var(--accent);
    border-radius: 6px;
}
.pet-project-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0 0 1rem;
}
.pet-project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 1rem;
}
.pet-project-tags span {
    padding: 0.2rem 0.5rem;
    background: var(--accent-muted);
    color: var(--accent);
    border-radius: 6px;
    font-size: 0.8rem;
    font-family: var(--font-mono);
}
.pet-project-link {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s;
}
.pet-project-link:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}
.pet-empty {
    text-align: center;
    color: var(--text-muted);
    padding: 3rem;
}
.pet-empty a {
    color: var(--accent);
}

/* Conferences page */
.conf-hero {
    padding: 8rem 0 3rem;
    text-align: center;
}
.conf-hero-badge {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--accent);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
    opacity: 0.9;
}
.conf-hero h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}
.conf-hero-subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 560px;
    margin: 0 auto;
    line-height: 1.6;
}
.conf-section {
    padding: 0 0 2rem;
}
.conf-timeline {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
.conf-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    transition: var(--transition);
    border-left: 3px solid var(--accent);
}
.conf-card:hover {
    border-color: rgba(6, 182, 212, 0.4);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}
.conf-card-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}
.conf-date {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent);
}
.conf-role {
    font-size: 0.8rem;
    padding: 0.2rem 0.6rem;
    background: rgba(6, 182, 212, 0.15);
    color: var(--accent);
    border-radius: 6px;
}
.conf-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0 0 0.25rem;
}
.conf-location {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0 0 0.75rem;
}
.conf-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0 0 1rem;
}
.conf-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 1rem;
}
.conf-tags span {
    padding: 0.2rem 0.5rem;
    background: var(--accent-muted);
    color: var(--accent);
    border-radius: 6px;
    font-size: 0.8rem;
}
.conf-link {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s;
}
.conf-link:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}
.conf-empty {
    text-align: center;
    color: var(--text-muted);
    padding: 3rem;
}
.conf-empty a {
    color: var(--accent);
}

/* Training page */
.train-hero {
    padding: 8rem 0 3rem;
    text-align: center;
}
.train-hero-calendar {
    padding-bottom: 2rem;
}
.train-hero-calendar .container.train-calendar-container {
    max-width: 1200px;
}
.train-calendar-wrap {
    width: 100%;
    margin: 2rem auto 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow);
}
.train-calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}
.train-cal-nav {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 1.25rem;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius);
    transition: color 0.2s;
}
.train-cal-nav.train-cal-nav-ajax {
    background: none;
    border: none;
    cursor: pointer;
    font: inherit;
}
.train-cal-nav:hover {
    color: var(--accent);
}
.train-cal-today-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--accent);
    font: inherit;
}
.train-cal-today-btn:hover {
    text-decoration: underline;
}
.train-cal-month {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
}
.train-cal-today {
    margin: -0.5rem 0 0.75rem;
    font-size: 0.85rem;
}
.train-cal-today a {
    color: var(--accent);
    text-decoration: none;
}
.train-cal-today a:hover {
    text-decoration: underline;
}
.train-calendar-row {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 1rem;
    flex-wrap: nowrap;
}
.train-cal-block {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
    flex: 1 1 0;
    min-width: 0;
}
.train-cal-block:hover {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px var(--accent);
}
.train-cal-block-prev,
.train-cal-block-next {
    flex: 0.85 1 0;
    min-width: 140px;
    padding: 1.25rem;
    opacity: 0.85;
}
.train-cal-block-prev:hover,
.train-cal-block-next:hover {
    opacity: 1;
}
.train-cal-block.train-cal-nav-ajax {
    cursor: pointer;
    display: block;
    width: 100%;
}
.train-cal-block-main {
    flex: 1.2 1 0;
    min-width: 200px;
    background: var(--bg-card);
    border-color: rgba(6, 182, 212, 0.3);
}
.train-cal-block-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 0.5rem;
}
.train-cal-block-main .train-cal-block-title {
    display: none;
}
.train-cal-weekdays-sm {
    grid-template-columns: repeat(7, 1fr);
}
.train-cal-weekdays-sm span {
    font-size: clamp(0.55rem, 1.2vw, 0.72rem);
}
.train-cal-days-sm {
    grid-template-columns: repeat(7, 1fr);
}
.train-cal-days-sm .train-cal-day {
    min-height: clamp(18px, 2.5vw, 30px);
    aspect-ratio: 1;
    max-width: clamp(18px, 2.5vw, 30px);
    padding: 2px;
}
.train-cal-days-sm .train-cal-day-empty {
    min-height: 0;
}
.train-cal-days-sm .train-cal-day-num {
    font-size: clamp(0.6rem, 1.2vw, 0.8rem);
}
.train-cal-day-adj .train-cal-day-num {
    color: var(--text-muted);
}
.train-cal-day-adj.train-cal-day-has-events .train-cal-day-num {
    color: var(--accent);
}
.train-calendar {
    display: flex;
    flex-direction: column;
}
.train-cal-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    margin-bottom: 0.5rem;
}
.train-cal-weekdays span {
    text-align: center;
    font-size: clamp(0.6rem, 1.3vw, 0.75rem);
    color: var(--text-muted);
    font-weight: 500;
}
.train-cal-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: clamp(2px, 0.5vw, 4px);
}
.train-cal-day {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: clamp(28px, 3.5vw, 44px);
    padding: clamp(2px, 0.4vw, 4px);
    border-radius: 8px;
    background: var(--bg-input);
    position: relative;
}
.train-cal-day-empty {
    background: transparent;
    min-height: 0;
    aspect-ratio: auto;
}
.train-cal-day-num {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
}
.train-cal-day-today {
    background: var(--accent-muted) !important;
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}
.train-cal-day-today .train-cal-day-num {
    color: var(--accent);
    font-weight: 700;
}
.train-cal-day-has-events {
    background: var(--accent-muted);
}
.train-cal-day-has-events .train-cal-day-num {
    color: var(--accent);
}
.train-cal-day-events {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    justify-content: center;
    margin-top: 2px;
}
.train-cal-event-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    display: block;
    text-decoration: none;
}
.train-cal-event-dot-registered {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--accent-muted);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
}
.train-cal-event-dot-registered svg {
    width: 10px;
    height: 10px;
    flex-shrink: 0;
}
.train-cal-legend {
    margin-top: 1rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}
.train-cal-legend-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    vertical-align: middle;
    margin-right: 4px;
}
.train-cal-legend-registered {
    margin-left: 1rem;
}
.train-cal-legend-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--accent-muted);
    color: var(--accent);
    font-size: 10px;
    font-weight: bold;
    vertical-align: middle;
    margin-right: 4px;
}

@media (max-width: 520px) {
    .train-calendar-row {
        flex-wrap: wrap;
        flex-direction: column;
        align-items: center;
    }
    .train-cal-block-main {
        order: 1;
        min-width: 100%;
    }
    .train-cal-block-prev,
    .train-cal-block-next {
        order: 2;
        min-width: 100%;
        flex: 1 1 auto;
    }
}
/* Поиск по курсам */
.train-search-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-end;
    margin-bottom: 1.5rem;
}
.train-search-bar {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 240px;
    max-width: 400px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.train-search-bar:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent-muted);
}
.train-search-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    color: var(--text-muted);
    margin-right: 0.75rem;
}
.train-search-icon svg {
    width: 100%;
    height: 100%;
}
.train-search-bar:focus-within .train-search-icon {
    color: var(--accent);
}
.train-search-input {
    flex: 1;
    min-width: 0;
    height: 44px;
    padding: 0;
    background: none;
    border: none;
    color: var(--text);
    font-size: 0.95rem;
    font-family: inherit;
}
.train-search-input::placeholder {
    color: var(--text-muted);
}
.train-search-input:focus {
    outline: none;
}
.train-search-clear {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    padding: 0;
    background: var(--bg-hover);
    border: none;
    border-radius: 50%;
    color: var(--text-muted);
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
    transition: color 0.2s, background 0.2s;
}
.train-search-clear:hover {
    color: var(--text);
    background: var(--border);
}
.train-search-dates {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
}
.train-date-field {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.train-date-field label {
    font-size: 0.85rem;
    color: var(--text-muted);
}
.train-date-wrap {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: visible;
}
.train-date-wrap:focus-within {
    border-color: var(--accent);
}
.train-date-input {
    height: 44px;
    width: 130px;
    padding: 0 0.75rem 0 0.75rem;
    background: transparent;
    border: none;
    color: var(--text);
    font-size: 0.9rem;
    font-family: inherit;
}
.train-date-input:focus {
    outline: none;
}
.train-date-trigger {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    padding: 0;
    background: none;
    border: none;
    border-left: 1px solid var(--border);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s, background 0.2s;
}
.train-date-trigger:hover {
    color: var(--accent);
    background: var(--accent-muted);
}
.train-date-trigger svg {
    width: 20px;
    height: 20px;
}

/* Календарь выбора даты */
.train-cal-picker {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    z-index: 200;
    min-width: 260px;
    padding: 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.train-cal-picker.open {
    display: block;
}
.train-cal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}
.train-cal-nav {
    width: 32px;
    height: 32px;
    padding: 0;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s, border-color 0.2s;
}
.train-cal-nav:hover {
    color: var(--accent);
    border-color: var(--accent);
}
.train-cal-nav svg {
    width: 16px;
    height: 16px;
}
.train-cal-month {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text);
}
.train-cal-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    margin-bottom: 0.5rem;
}
.train-cal-weekdays span {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-align: center;
}
.train-cal-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}
.train-cal-day {
    width: 32px;
    height: 32px;
    padding: 0;
    background: none;
    border: none;
    border-radius: 8px;
    color: var(--text);
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s;
}
.train-cal-day:hover:not(.empty) {
    background: var(--accent-muted);
    color: var(--accent);
}
.train-cal-day.empty {
    color: transparent;
    cursor: default;
}
.train-cal-day.today {
    background: var(--border);
    font-weight: 600;
}
.train-cal-day.selected {
    background: var(--accent);
    color: var(--on-accent);
}
.train-filter-reset {
    height: 44px;
    padding: 0 1rem;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-muted);
    font-size: 0.9rem;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
}
.train-filter-reset:hover {
    color: var(--accent);
    border-color: var(--accent);
}
.train-count {
    font-weight: 400;
    color: var(--text-muted);
}

@media (max-width: 600px) {
    .train-search-wrap {
        flex-direction: column;
        align-items: stretch;
    }
    .train-search-bar {
        max-width: none;
    }
}

.train-section-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text);
}
.train-date {
    font-size: 0.8rem;
    color: var(--accent);
    font-weight: 500;
}
.train-hero-badge {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--accent);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
    opacity: 0.9;
}
.train-hero h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}
.train-hero-subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 640px;
    margin: 0 auto;
    line-height: 1.6;
}
.train-section {
    padding: 0 0 2rem;
}
.train-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1.5rem;
}
.train-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    transition: var(--transition);
    border-left: 3px solid var(--accent);
    display: flex;
    flex-direction: column;
}
.train-card:hover {
    border-color: rgba(6, 182, 212, 0.4);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}
.train-card-image {
    margin: -1.5rem -1.5rem 1rem -1.5rem;
    border-radius: var(--radius) var(--radius) 0 0;
    overflow: hidden;
}
.train-card-image img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    display: block;
}
.train-card-header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}
.train-type {
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.2rem 0.6rem;
    background: var(--accent-muted);
    color: var(--accent);
    border-radius: 6px;
}
.train-status {
    font-size: 0.75rem;
    padding: 0.15rem 0.5rem;
    border-radius: 6px;
}
.train-status-upcoming {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}
.train-status-open {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
}
.train-status-archive {
    background: rgba(113, 113, 122, 0.2);
    color: var(--text-muted);
}
.train-title {
    font-size: 1.15rem;
    font-weight: 600;
    margin: 0 0 0.5rem;
    line-height: 1.35;
}
.train-format {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0 0 0.75rem;
}
.train-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0 0 1rem;
    flex: 1;
}
.train-result {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--accent);
    margin: 0 0 1rem;
}
.train-card-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    margin-top: auto;
}
.train-btn-register {
    padding: 0.5rem 1rem;
    background: var(--gradient);
    border: none;
    border-radius: var(--radius);
    color: var(--on-accent);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.2s;
}
.train-btn-register:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}
.train-link {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s;
}
.train-link:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}
.train-empty {
    text-align: center;
    color: var(--text-muted);
    padding: 3rem;
}
.train-empty a {
    color: var(--accent);
}

/* Мои записи — вкладки и карточки */
.train-my-section {
    padding: 0 0 2rem;
}
.train-my-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}
.train-my-tab {
    padding: 0.5rem 1rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-muted);
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
}
.train-my-tab:hover {
    color: var(--text);
    border-color: var(--accent);
}
.train-my-tab.active {
    background: var(--accent-muted);
    color: var(--accent);
    border-color: var(--accent);
}
.train-my-content {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1rem;
}
.train-my-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    transition: var(--transition);
}
.train-my-card:hover {
    border-color: rgba(6, 182, 212, 0.3);
}
.train-my-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}
.train-my-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
    flex: 1 1 100%;
}
.train-my-date {
    font-size: 0.85rem;
    color: var(--text-muted);
}
.train-my-status {
    font-size: 0.75rem;
    padding: 0.15rem 0.5rem;
    border-radius: 6px;
}
.train-my-status-new,
.train-my-status-confirmed {
    background: rgba(6, 182, 212, 0.2);
    color: var(--accent);
}
.train-my-status-attended {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
}
.train-my-status-cancelled,
.train-my-status-archived {
    background: rgba(113, 113, 122, 0.2);
    color: var(--text-muted);
}
.train-my-format { font-size: 0.9rem; color: var(--text-muted); margin: 0 0 0.5rem; }
.train-my-desc { font-size: 0.9rem; color: var(--text-secondary); margin: 0 0 0.75rem; line-height: 1.5; }
.train-my-actions { margin-top: 0.5rem; display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.train-my-enter-class { flex-shrink: 0; }
.train-my-empty,
.train-my-loading {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--text-muted);
    padding: 2rem;
}
.train-cal-loading { opacity: 0.7; pointer-events: none; }

/* Модальное окно записи на обучение */
.train-register-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.train-register-modal.open {
    display: flex;
}
.train-register-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}
.train-register-dialog {
    position: relative;
    width: 100%;
    max-width: 420px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow);
}
.train-register-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 36px;
    height: 36px;
    padding: 0;
    background: var(--bg-input);
    border: none;
    border-radius: 50%;
    color: var(--text-muted);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    transition: color 0.2s, background 0.2s;
}
.train-register-close:hover {
    color: var(--text);
    background: var(--border);
}
.train-register-dialog h3 {
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}
.train-register-program {
    font-size: 0.95rem;
    color: var(--accent);
    margin-bottom: 1.5rem;
}
.train-register-form input,
.train-register-form textarea {
    width: 100%;
    margin-bottom: 0.75rem;
    padding: 0.65rem 0.85rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-family: inherit;
    font-size: 0.95rem;
}
.train-register-form input:focus,
.train-register-form textarea:focus {
    outline: none;
    border-color: var(--accent);
}
.train-register-form .contact-form-consent {
    margin: 1rem 0;
}
.train-register-form button[type="submit"] {
    width: 100%;
    margin-top: 0.5rem;
}
.train-register-status {
    margin-top: 1rem;
    font-size: 0.9rem;
}
.train-registered-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.6rem;
    background: var(--accent-muted);
    color: var(--accent);
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 600;
}
.train-registered-icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}
.train-register-hint {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}
.train-register-hint a {
    color: var(--accent);
    text-decoration: none;
}
.train-register-hint a:hover {
    text-decoration: underline;
}
.train-register-status.success {
    color: var(--success, #22c55e);
}
.train-register-status.error {
    color: var(--danger, #ef4444);
}

/* Страница программы обучения */
.train-detail-hero {
    padding: 4rem 0 2rem;
}
.train-detail-back {
    display: inline-block;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    transition: color 0.2s;
}
.train-detail-back:hover {
    color: var(--accent);
}
.train-detail-image {
    margin-bottom: 1.5rem;
    border-radius: var(--radius);
    overflow: hidden;
}
.train-detail-image img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    display: block;
}
.train-detail-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}
.train-detail-date {
    font-size: 0.95rem;
    color: var(--accent);
    font-weight: 500;
}
.train-detail-type {
    font-size: 0.85rem;
    padding: 0.2rem 0.6rem;
    background: var(--accent-muted);
    color: var(--accent);
    border-radius: 6px;
}
.train-detail-title {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 0.5rem;
}
.train-detail-format {
    font-size: 1rem;
    color: var(--text-muted);
}
.train-detail-content {
    padding: 0 0 3rem;
}
.train-detail-desc {
    font-size: 1.05rem;
    line-height: 1.75;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}
.train-detail-desc p {
    margin-bottom: 1rem;
}
.train-detail-agenda {
    margin-bottom: 2rem;
}
.train-detail-agenda h2,
.train-detail-result h2 {
    font-size: 1.15rem;
    color: var(--accent);
    margin-bottom: 1rem;
}
.train-agenda-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.train-agenda-list li {
    display: flex;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
}
.train-agenda-list li:last-child {
    border-bottom: none;
}
.train-agenda-time {
    flex-shrink: 0;
    font-weight: 600;
    color: var(--accent);
    min-width: 4rem;
}
.train-agenda-title {
    color: var(--text-secondary);
}
.train-detail-result {
    margin-bottom: 2rem;
}
.train-detail-result p {
    font-size: 1.05rem;
    color: var(--text-secondary);
}
.train-detail-cta {
    padding-top: 1.5rem;
}
.train-detail-cta .btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
}

/* Виртуальный класс (LMS) */
.train-classroom-hero {
    padding: 6rem 0 2rem;
}
.train-classroom-back {
    display: inline-block;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    margin-bottom: 1rem;
    transition: color 0.2s;
}
.train-classroom-back:hover {
    color: var(--accent);
}
.train-classroom-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}
.train-classroom-datetime {
    color: var(--text-muted);
    font-size: 1rem;
}
.train-classroom-content {
    padding-bottom: 3rem;
}
.train-classroom-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    max-width: 900px;
}
@media (max-width: 768px) {
    .train-classroom-grid { grid-template-columns: 1fr; }
}
.train-classroom-join,
.train-classroom-materials {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}
.train-classroom-join h2,
.train-classroom-materials h2 {
    font-size: 1.15rem;
    margin-bottom: 0.75rem;
    color: var(--text);
}
.train-classroom-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
}
.train-classroom-hint {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.75rem;
}
.train-classroom-no-meeting {
    color: var(--text-muted);
}
.train-classroom-materials-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.train-classroom-materials-list li {
    margin-bottom: 0.5rem;
}
.train-classroom-material-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s;
}
.train-classroom-material-link:hover {
    color: var(--accent-hover);
}
.train-classroom-denied {
    color: var(--text-muted);
    margin-bottom: 1rem;
}
.train-classroom-denied a {
    color: var(--accent);
}
.train-detail-classroom {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* P2P встроенный видеокласс */
.train-classroom-p2p {
    grid-column: 1 / -1;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}
.train-classroom-p2p-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1rem;
}
.train-p2p-videos {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
    min-height: 240px;
}
.train-p2p-local-wrap {
    position: relative;
    width: 240px;
    height: 180px;
    flex-shrink: 0;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg-input);
}
.train-p2p-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.train-p2p-local {
    transform: scaleX(-1);
}
.train-p2p-label {
    position: absolute;
    bottom: 4px;
    left: 8px;
    font-size: 0.75rem;
    color: #fff;
    background: rgba(0,0,0,0.6);
    padding: 2px 6px;
    border-radius: 4px;
}
.train-p2p-remotes {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    flex: 1;
    min-width: 200px;
}
.train-p2p-remotes video {
    width: 240px;
    height: 180px;
    object-fit: cover;
    border-radius: var(--radius);
    background: var(--bg-input);
}
.train-p2p-controls {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}
.train-p2p-ctrl { padding: 0.5rem 1rem; }
.train-p2p-leave { margin-left: auto; }

.train-classroom-whiteboard { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--border); }
.train-classroom-whiteboard h3 { font-size: 1rem; margin-bottom: 0.75rem; }
.train-wb-toolbar { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.75rem; flex-wrap: wrap; }
.train-wb-btn { padding: 0.4rem 0.75rem; background: var(--bg-input); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); cursor: pointer; font-size: 1rem; }
.train-wb-btn:hover, .train-wb-btn.active { border-color: var(--accent); background: var(--accent-muted); }
.train-wb-color { width: 36px; height: 28px; padding: 2px; border: 1px solid var(--border); border-radius: var(--radius); cursor: pointer; background: var(--bg-input); }
.train-wb-size { width: 80px; }
.train-wb-canvas { display: block; width: 100%; max-width: 800px; height: auto; aspect-ratio: 16/9; background: var(--bg-input); border: 1px solid var(--border); border-radius: var(--radius); cursor: crosshair; touch-action: none; }

.back-link {
    display: inline-block;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    margin-top: 1rem;
    transition: color 0.2s;
}
.back-link:hover {
    color: var(--accent);
}

.privacy-content h2 {
    font-size: 1.25rem;
    margin: 2rem 0 1rem;
    color: var(--accent);
}
.privacy-content p {
    margin-bottom: 1rem;
    line-height: 1.7;
}
.privacy-content ul {
    margin: 1rem 0;
    padding-left: 1.5rem;
}
.privacy-content li {
    margin-bottom: 0.5rem;
}
.privacy-content a {
    color: var(--accent);
    text-decoration: none;
}
.privacy-content a:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}
.privacy-content .back-link {
    display: inline-block;
    margin-top: 2rem;
    color: var(--accent);
    font-weight: 500;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-content > *,
.hero-photo {
    animation: fadeInUp 0.6s ease backwards;
}

.hero-badge { animation-delay: 0.1s; }
.hero-title { animation-delay: 0.2s; }
.hero-subtitle { animation-delay: 0.3s; }
.hero-desc { animation-delay: 0.4s; }
.hero-actions { animation-delay: 0.5s; }
.hero-photo { animation-delay: 0.4s; }

/* Mobile — современное боковое меню */
@media (max-width: 768px) {
    /* Overlay с blur — современный glassmorphism */
    .nav-overlay {
        position: fixed;
        inset: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(10, 14, 23, 0.5);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.35s;
        z-index: 9998;
        pointer-events: none;
    }
    
    .nav-overlay.active {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }
    
    .nav-overlay:not(.active) {
        opacity: 0 !important;
        visibility: hidden !important;
        pointer-events: none !important;
    }
    
    /* Панель меню — скруглённые углы, тень, плавная анимация */
    .nav-links {
        position: fixed;
        top: 0;
        right: 0;
        width: min(340px, 90vw);
        max-width: 340px;
        height: 100vh;
        height: 100dvh;
        background: linear-gradient(180deg, var(--bg-card) 0%, var(--bg-alt) 100%);
        flex-direction: column;
        align-items: stretch;
        padding: 0.5rem 1rem 1.5rem;
        padding-top: max(0.5rem, env(safe-area-inset-top));
        gap: 0.25rem;
        transform: translateX(100%);
        transition: transform 0.4s cubic-bezier(0.32, 0.72, 0, 1), box-shadow 0.4s;
        border-left: 1px solid var(--border);
        z-index: 10000;
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        scrollbar-color: var(--border) transparent;
        box-shadow: -8px 0 32px rgba(0, 0, 0, 0.2);
        border-radius: 20px 0 0 20px;
    }
    
    
    .nav-links::before {
        content: 'Меню';
        display: block;
        font-size: 0.75rem;
        font-weight: 600;
        color: var(--text-muted);
        text-transform: uppercase;
        letter-spacing: 0.1em;
        padding: 0 0.25rem 0.5rem;
        margin-bottom: 0.375rem;
        border-bottom: 1px solid var(--border);
    }
    
    .nav-links::-webkit-scrollbar {
        width: 6px;
    }
    
    .nav-links::-webkit-scrollbar-track {
        background: transparent;
    }
    
    .nav-links::-webkit-scrollbar-thumb {
        background: var(--border);
        border-radius: 3px;
    }
    
    .nav-links::-webkit-scrollbar-thumb:hover {
        background: var(--accent);
    }

    .nav-links.open {
        transform: translateX(0);
        box-shadow: -16px 0 48px rgba(0, 0, 0, 0.3);
    }

    /* Мобильное меню поверх overlay */
    .header:has(.nav-links.open) {
        z-index: 9999;
    }
    
    .header:has(.nav-links.open) .nav {
        z-index: 9999;
    }
    
    /* Убеждаемся, что все элементы меню кликабельны */
    .nav-links > li,
    .nav-links a,
    .nav-links button {
        position: relative;
        z-index: 1;
    }

    .nav-links > li {
        width: 100%;
    }
    
    .nav-links a,
    .nav-group-label {
        display: flex;
        align-items: center;
        width: 100%;
        min-height: 48px;
        padding: 0.85rem 1.25rem;
        font-size: 1.05rem;
        font-weight: 500;
        border-radius: 12px;
        transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
    }
    
    .nav-links a:active,
    .nav-group-label:active {
        transform: scale(0.98);
    }
    
    .nav-links a:hover,
    .nav-links a.nav-active,
    .nav-group-label:hover {
        background: var(--accent-muted);
        color: var(--accent);
    }
    
    .nav-links a.nav-active {
        background: linear-gradient(90deg, var(--accent-muted) 0%, transparent 100%);
        border-left: 3px solid var(--accent);
        padding-left: calc(1.25rem - 3px);
    }
    
    .nav-group {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        margin: 0.25rem 0;
    }
    
    .nav-group-label {
        padding: 0.85rem 1.25rem;
        width: 100%;
        text-align: left;
        cursor: pointer;
        user-select: none;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }
    
    .nav-chevron {
        transition: transform 0.25s ease;
        opacity: 0.7;
    }
    
    .nav-dropdown {
        position: static;
        max-height: 0;
        overflow: hidden;
        opacity: 1;
        visibility: visible;
        transform: none;
        margin: 0;
        padding: 0;
        border: none;
        box-shadow: none;
        background: rgba(0, 0, 0, 0.03);
        border-left: 3px solid var(--accent);
        border-radius: 0 0 0 8px;
        transition: max-height 0.35s cubic-bezier(0.32, 0.72, 0, 1);
        width: 100%;
        list-style: none;
    }
    
    .nav-group-open .nav-dropdown {
        max-height: 500px;
        margin: 0.25rem 0 0.5rem 0.25rem;
        padding-left: 1rem;
        padding-top: 0.25rem;
        padding-bottom: 0.25rem;
    }
    
    .nav-group-open .nav-chevron {
        transform: rotate(180deg);
    }
    
    .nav-dropdown li {
        width: 100%;
    }
    
    .nav-dropdown a {
        padding: 0.7rem 1rem;
        font-size: 0.95rem;
        font-weight: 500;
        display: block;
        width: 100%;
        border-radius: 8px;
        margin: 0.15rem 0;
    }
    
    .nav-dropdown a:hover {
        background: var(--accent-muted);
    }
    
    /* Блок иконок: Тема, Яло, FAQ — карточка */
    .nav-icons-row {
        width: 100%;
        margin-top: 1rem;
        padding: 1rem 0;
        border-top: 1px solid var(--border);
    }
    
    .nav-icons-inner {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 0.6rem;
        flex-wrap: wrap;
        padding: 0.5rem 0;
    }
    
    /* Скрыть Яло из бокового меню на мобильных */
    .nav-icons-inner .nav-yalo-link {
        display: none !important;
    }
    
    /* Отмена растягивания для иконок (переопределяет .nav-links a) */
    .nav-icons-inner .nav-theme-toggle,
    .nav-icons-inner .nav-faq-link {
        display: inline-flex;
        width: auto;
    }
    
    /* Кнопка темы — круглая иконка */
    .nav-theme-toggle {
        width: 44px;
        min-width: 44px;
        height: 44px;
        padding: 0;
        justify-content: center;
        border-radius: 50%;
        flex-shrink: 0;
    }
    
    .nav-theme-toggle .theme-icon-dark,
    .nav-theme-toggle .theme-icon-light {
        font-size: 1.25rem;
    }
    
    /* Яло — компактная кнопка с аватаром */
    .nav-yalo-link {
        display: inline-flex;
        align-items: center;
        gap: 0.35rem;
        padding: 0.5rem 0.75rem;
        border-radius: 50px;
        width: auto;
        flex-shrink: 0;
        border: 1px solid var(--border);
        background: var(--bg-card);
    }
    
    .nav-yalo-avatar {
        width: 28px;
        height: 28px;
    }
    
    .nav-yalo-label {
        flex-direction: row;
        gap: 0.2rem;
    }
    
    .nav-yalo-ai {
        font-size: 0.7rem;
    }
    
    .nav-yalo-name {
        font-size: 0.85rem;
    }
    
    /* FAQ — компактная кнопка */
    .nav-faq-link {
        display: inline-flex;
        align-items: center;
        gap: 0.35rem;
        padding: 0.5rem 0.75rem;
        border-radius: 50px;
        width: auto;
        flex-shrink: 0;
        border: 1px solid var(--border);
        background: var(--bg-card);
    }
    
    .nav-faq-icon {
        width: 20px;
        height: 20px;
    }
    
    .nav-faq-text {
        font-size: 0.9rem;
    }
    
    .nav-faq-link:hover,
    .nav-yalo-link:hover,
    .nav-theme-toggle:hover {
        background: var(--accent-muted);
        border-color: var(--accent);
    }

    .nav-user-block {
        padding: 0.4rem 0.75rem;
        margin-left: 0;
    }
    .nav-user-block .nav-user-name {
        max-width: 100px;
    }
    
    /* Кнопка Яло в шапке на мобильных */
    .nav-yalo-link-mobile {
        order: 2;
        margin-left: auto;
        margin-right: 0.75rem;
    }

    .nav-toggle {
        display: flex;
        z-index: 10001;
        position: relative;
        width: 44px;
        height: 44px;
        align-items: center;
        justify-content: center;
        border-radius: 12px;
        transition: background 0.2s ease;
        margin-right: 0;
        order: 3;
    }
    .nav-toggle:hover {
        background: var(--accent-muted);
    }
    .nav-toggle:active {
        transform: scale(0.95);
    }
    
    /* Убеждаемся, что контент сайта виден когда меню закрыто */
    main,
    .section,
    .hero {
        position: relative;
        z-index: 1;
    }

    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    .hero-inner {
        flex-direction: column;
        gap: 2rem;
    }

    .hero-photo {
        order: -1;
        max-width: 240px;
    }

    /* Hero под фиксированное меню */
    .hero {
        padding-top: 200px;
        padding-bottom: 2rem;
    }

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

    .stats-grid {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .stat-card {
        flex: 1;
        min-width: 120px;
    }

    .cjm-journey {
        padding-left: 0;
    }

    .cjm-path {
        left: 22px;
    }

    .cjm-stage {
        grid-template-columns: 44px 1fr;
        gap: 1.25rem;
        padding-left: 0;
    }

    .cjm-stage-card {
        grid-column: 2;
        grid-row: 1;
        justify-self: stretch;
        max-width: none;
        border-left: 3px solid var(--accent);
    }

    .cjm-stage-node {
        grid-column: 1;
    }

    .cjm-achievements-wrap {
        grid-column: 2;
        grid-row: 2;
        justify-self: stretch;
        max-width: none;
    }

    .cjm-stage-node {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }

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

    .cjm-achievement {
        padding: 0.65rem;
        padding-left: 2.25rem;
    }

    .cjm-achievement-value {
        font-size: 1rem;
    }

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

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

    .project-card.featured {
        grid-column: 1;
    }
    
    /* Улучшенное форматирование для мобильных */
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .section {
        padding: 3rem 0;
    }
    
    .section-title {
        font-size: 1.75rem;
        margin-bottom: 1.5rem;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    h3 {
        font-size: 1.25rem;
    }
    
    /* Улучшенные отступы для карточек */
    .project-card,
    .stat-card,
    .education-card {
        padding: 1.25rem;
    }
    
    /* Улучшенная типографика */
    p {
        line-height: 1.7;
        margin-bottom: 1rem;
    }
    
    /* Кнопки на всю ширину на мобильных */
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .hero-actions {
        flex-direction: column;
        gap: 0.75rem;
        margin-bottom: 4rem; /* место под «Листайте», чтобы не наезжало на кнопки */
    }
    
    .hero-actions .btn {
        width: 100%;
    }

    .scroll-indicator {
        bottom: 1rem;
    }
    
    /* Улучшенные формы */
    .contact-form input,
    .contact-form textarea {
        font-size: 16px; /* Предотвращает зум на iOS */
    }
    
    /* Улучшенная навигация */
    .nav {
        padding: 1rem 0;
    }
    
    .nav-brand {
        font-size: 1.25rem;
    }
    
    /* Улучшенные списки */
    ul, ol {
        padding-left: 1.25rem;
    }
    
    /* Улучшенные таблицы */
    table {
        font-size: 0.9rem;
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Улучшенные изображения */
    img {
        max-width: 100%;
        height: auto;
    }
    
    /* Улучшенные блоки кода */
    pre, code {
        font-size: 0.85rem;
        overflow-x: auto;
    }
    
    /* Улучшенные отступы для секций */
    .about-grid,
    .education-grid,
    .projects-grid {
        gap: 1.25rem;
    }
    
    /* Улучшенная читаемость */
    .about-text,
    .about-expertise-list {
        font-size: 0.95rem;
        line-height: 1.7;
    }
    
    .principles-grid {
        flex-direction: column;
        gap: 1.25rem;
    }
    
    .principle-card {
        padding: 1.5rem 1.25rem;
        min-height: auto;
    }
    
    .principle-card[data-index="2"] {
        border-radius: 20px !important;
    }
    
    .principle-card[data-index="2"]::before {
        border-radius: 20px !important;
    }
    
    .principle-card[data-index="2"] .principle-shape-bg {
        border-radius: 20px !important;
    }
    
    .principle-icon {
        width: 40px;
        height: 40px;
        margin-bottom: 0.75rem;
    }
    
    .principle-title {
        font-size: 1rem;
    }
    
    .principle-text {
        font-size: 0.85rem;
    }
    
    /* Улучшенные карточки навыков */
    .skills-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    /* Улучшенные карточки проектов */
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    /* Улучшенные отступы для hero */
    .hero {
        padding: 200px 0 3rem;
    }
    
    .hero-title {
        font-size: 2rem;
        line-height: 1.2;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
        line-height: 1.6;
    }
    
    /* Улучшенные отступы для footer */
    footer {
        padding: 2rem 0;
        font-size: 0.9rem;
    }
}

/* LMS — курс, уроки, сайдбар */
.lms-main { padding: 2rem 0; min-height: 60vh; }
.lms-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}
.lms-sidebar {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    height: fit-content;
    position: sticky;
    top: 180px;
}
.lms-sidebar h2 { font-size: 1rem; margin-bottom: 1rem; }
.lms-module { margin-bottom: 1rem; }
.lms-module h3 { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 0.5rem; }
.lms-sidebar ul { list-style: none; padding: 0; margin: 0; }
.lms-sidebar li { margin-bottom: 0.35rem; }
.lms-sidebar li a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    display: block;
    padding: 0.35rem 0;
    border-radius: 6px;
}
.lms-sidebar li a:hover { color: var(--accent); }
.lms-sidebar li.active a { color: var(--accent); font-weight: 600; }
.lms-sidebar li.done a { color: var(--text-muted); }
.lms-done { color: #22c55e; margin-left: 0.25rem; }
.lms-content { min-width: 0; }
.lms-lesson { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 2rem; }
.lms-lesson h1 { font-size: 1.5rem; margin-bottom: 1rem; }
.lms-lesson-body { line-height: 1.7; margin-bottom: 1.5rem; }
.lms-lesson-body img { max-width: 100%; height: auto; }
.lms-video-wrap { margin-bottom: 1.5rem; }
.lms-video-wrap video { width: 100%; max-height: 400px; border-radius: var(--radius); }
.lms-embed { margin-bottom: 1.5rem; }
.lms-live-wrap {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.lms-live-local video, .lms-live-remote video { width: 100%; border-radius: var(--radius); background: #000; }
.lms-live-hint { font-size: 0.85rem; color: var(--text-muted); }
.lms-lesson-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }
@media (max-width: 900px) {
    .lms-layout { grid-template-columns: 1fr; }
    .lms-sidebar { position: static; }
}

/* LMS — хлебные крошки */
.lms-breadcrumb { 
    font-size: 0.85rem; 
    color: var(--text-muted); 
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.lms-breadcrumb a { 
    color: var(--accent); 
    text-decoration: none;
    transition: color 0.2s ease;
    font-weight: 500;
}
.lms-breadcrumb a:hover { 
    color: var(--accent-hover);
    text-decoration: underline;
}
.lms-breadcrumb span { 
    color: var(--text-muted);
    opacity: 0.6;
}

/* LMS — каталог, фильтры, поиск */
.lms-catalog-actions { margin-top: 1rem; }
.lms-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; margin-bottom: 1.5rem; }
.lms-search-form { display: flex; gap: 0.5rem; }
.lms-search-input { padding: 0.5rem 0.75rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-input); color: var(--text); font-size: 0.9rem; min-width: 200px; }
.lms-format-tabs { display: flex; gap: 0.5rem; }
.lms-format-tab { padding: 0.4rem 0.8rem; font-size: 0.9rem; color: var(--text-muted); text-decoration: none; border-radius: var(--radius); border: 1px solid transparent; }
.lms-format-tab:hover { color: var(--accent); }
.lms-format-tab.active { background: var(--accent-muted); color: var(--accent); border-color: var(--accent); }
.lms-course-card-meta { font-size: 0.85rem; color: var(--text-muted); margin: 0.5rem 0; }
.lms-empty-state { text-align: center; padding: 3rem 2rem; }
.lms-empty-state p { margin-bottom: 1rem; }

/* LMS — лендинг курса */
.lms-landing { padding-bottom: 2rem; }
.lms-landing-hero { padding: 2rem 0; background: linear-gradient(180deg, var(--bg-alt) 0%, var(--bg-dark) 100%); }
.lms-landing-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; margin-bottom: 0.75rem; }
.lms-landing-badge { padding: 0.25rem 0.6rem; background: var(--accent-muted); color: var(--accent); border-radius: 6px; font-size: 0.85rem; font-weight: 500; }
.lms-landing-meta-item { font-size: 0.9rem; color: var(--text-muted); }
.lms-landing-title { font-size: 1.75rem; font-weight: 700; margin-bottom: 0.5rem; line-height: 1.3; }
.lms-landing-subtitle { font-size: 1.1rem; color: var(--text-secondary); max-width: 640px; margin-bottom: 1.5rem; line-height: 1.6; }
.lms-landing-cta { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.lms-landing-cta .btn-lg { padding: 0.75rem 1.5rem; font-size: 1rem; }
.lms-landing-hint { font-size: 0.85rem; color: var(--text-muted); }
.lms-landing-image { max-width: 400px; margin-bottom: 1rem; border-radius: var(--radius); overflow: hidden; }
.lms-landing-image img { width: 100%; height: auto; display: block; }
.lms-landing-body { padding: 2rem 0; }
.lms-landing-grid { display: grid; grid-template-columns: 1fr 320px; gap: 2rem; max-width: 1100px; margin: 0 auto; }
.lms-landing-main { min-width: 0; }
.lms-landing-section { margin-bottom: 2rem; }
.lms-landing-section h2 { font-size: 1.25rem; margin-bottom: 1rem; }
.lms-landing-desc { line-height: 1.7; color: var(--text-secondary); }
.lms-curriculum { display: flex; flex-direction: column; gap: 1rem; }
.lms-curriculum-module { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.25rem; }
.lms-curriculum-module-title { font-size: 1rem; font-weight: 600; margin-bottom: 0.5rem; display: flex; align-items: center; gap: 0.5rem; }
.lms-curriculum-num { width: 24px; height: 24px; background: var(--accent); color: var(--on-accent); border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 0.8rem; }
.lms-curriculum-lessons { list-style: none; padding: 0; margin: 0; }
.lms-curriculum-lessons li { padding: 0.4rem 0; font-size: 0.95rem; color: var(--text-secondary); display: flex; align-items: center; gap: 0.5rem; }
.lms-curriculum-lesson-type { font-size: 0.75rem; color: var(--text-muted); min-width: 60px; }
.lms-landing-sidebar { min-width: 0; }
.lms-landing-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; position: sticky; top: 180px; }
.lms-landing-price { font-size: 1.5rem; font-weight: 700; margin-bottom: 1rem; }
.lms-landing-price-free { color: var(--accent); }
.lms-landing-features { list-style: none; padding: 0; margin: 0 0 1rem; }
.lms-landing-features li { padding: 0.35rem 0; font-size: 0.95rem; color: var(--text-secondary); }
.btn-block { width: 100%; justify-content: center; }
@media (max-width: 900px) { .lms-landing-grid { grid-template-columns: 1fr; } .lms-landing-card { position: static; } }

/* LMS — мои курсы */
.lms-my-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.5rem; }
.lms-my-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: var(--transition); display: flex; flex-direction: column; }
.lms-my-card:hover { border-color: rgba(6, 182, 212, 0.4); }
.lms-my-card-image { aspect-ratio: 16/9; overflow: hidden; }
.lms-my-card-image img { width: 100%; height: 100%; object-fit: cover; }
.lms-my-card-body { padding: 1.25rem; display: flex; flex-direction: column; flex: 1; }
.lms-my-badge { font-size: 0.75rem; color: var(--accent); margin-bottom: 0.5rem; }
.lms-my-card-title { font-size: 1.1rem; font-weight: 600; margin-bottom: 0.75rem; }
.lms-my-progress-bar { height: 6px; background: var(--bg-input); border-radius: 3px; overflow: hidden; margin-bottom: 0.5rem; }
.lms-my-progress-fill { height: 100%; background: var(--accent); border-radius: 3px; transition: width 0.3s; }
.lms-my-progress-text { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 0.75rem; }
.lms-my-card-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.lms-my-more { margin-top: 1.5rem; }
.lms-my-more a { color: var(--accent); text-decoration: none; font-weight: 500; }

/* LMS — пререквизиты */
.lms-prereqs { margin-bottom: 1rem; padding: 0.75rem 1rem; background: var(--bg-input); border-radius: var(--radius); font-size: 0.9rem; }
.lms-prereqs.blocked { border-left: 3px solid #f59e0b; }
.lms-prereqs.met { border-left: 3px solid #22c55e; }
.lms-prereq-item { display: inline-block; margin-right: 1rem; margin-bottom: 0.25rem; }
.lms-prereq-item a { color: var(--accent); text-decoration: none; }
.lms-prereq-item.done { color: #22c55e; }
.lms-prereqs-warn { margin: 0.5rem 0 0; font-size: 0.85rem; color: #f59e0b; }

/* LMS — заметки */
.lms-notes-block { margin: 1rem 0; padding: 1rem; background: var(--bg-input); border-radius: var(--radius); }
.lms-notes-block summary { cursor: pointer; font-weight: 600; }
.lms-notes-content { margin-top: 0.75rem; }
.lms-notes-input { width: 100%; min-height: 100px; padding: 0.75rem; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); font-family: inherit; resize: vertical; }
.lms-notes-save { margin-top: 0.5rem; }

/* LMS — сертификат */
.lms-cert-section { padding: 2rem 0; }
.lms-cert-card { max-width: 560px; margin: 0 auto; padding: 2rem; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); text-align: center; }
.lms-cert-header { margin-bottom: 1.5rem; }
.lms-cert-code { font-size: 0.9rem; color: var(--text-muted); margin-top: 0.25rem; }
.lms-cert-recipient { margin-bottom: 0.75rem; }
.lms-cert-course { font-size: 1.5rem; color: var(--accent); margin: 0.5rem 0 1rem; }
.lms-cert-date { font-size: 0.95rem; color: var(--text-muted); margin-bottom: 1rem; }
.lms-cert-verify { font-size: 0.8rem; color: var(--text-muted); }
.lms-cert-alert { margin-top: 1rem; padding: 1rem; background: rgba(34, 197, 94, 0.15); border-radius: var(--radius); color: #22c55e; }
.lms-cert-alert a { color: var(--accent); font-weight: 600; }

/* LMS — образовательные пути */
.lms-path-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; margin-bottom: 1.5rem; display: flex; gap: 1.5rem; }
.lms-path-image { width: 120px; flex-shrink: 0; border-radius: var(--radius); overflow: hidden; }
.lms-path-image img { width: 100%; height: 100%; object-fit: cover; }
.lms-path-body { flex: 1; min-width: 0; }
.lms-path-body h2 { font-size: 1.2rem; margin-bottom: 0.5rem; }
.lms-path-desc { font-size: 0.95rem; color: var(--text-secondary); margin-bottom: 1rem; }
.lms-path-steps { list-style: none; padding: 0; margin: 0; }
.lms-path-steps li { padding: 0.5rem 0; display: flex; align-items: center; gap: 0.5rem; }
.lms-path-steps li a { color: var(--accent); text-decoration: none; }
.lms-path-steps li.done a { color: var(--text-muted); }
.lms-path-num { width: 28px; height: 28px; background: var(--bg-input); border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 0.85rem; font-weight: 600; flex-shrink: 0; }
.lms-path-steps li.done .lms-path-num { background: rgba(34, 197, 94, 0.2); color: #22c55e; }

/* LMS — тест в уроке */
.lms-quiz-block { margin: 1.5rem 0; padding: 1.5rem; background: var(--bg-input); border-radius: var(--radius); border: 1px solid var(--border); }
.lms-quiz-block h2 { font-size: 1.1rem; margin-bottom: 0.75rem; }
.lms-quiz-desc { font-size: 0.95rem; color: var(--text-secondary); margin-bottom: 1rem; }
.lms-quiz-passed { color: #22c55e; font-weight: 600; }
.lms-quiz-question { margin-bottom: 1.25rem; }
.lms-quiz-q-text { font-weight: 500; margin-bottom: 0.5rem; }
.lms-quiz-option { display: block; margin: 0.35rem 0; cursor: pointer; }
.lms-quiz-option input { margin-right: 0.5rem; }
.lms-quiz-text-input { width: 100%; padding: 0.5rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-card); color: var(--text); margin-top: 0.25rem; }
.lms-quiz-submit { margin-top: 0.5rem; }
.lms-quiz-result { margin-top: 1rem; padding: 0.75rem; border-radius: var(--radius); }
.lms-quiz-result.lms-quiz-passed { background: rgba(34, 197, 94, 0.15); color: #22c55e; }
.lms-quiz-result.lms-quiz-failed { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }
.lms-quiz-result.lms-quiz-error { background: rgba(239, 68, 68, 0.15); color: #ef4444; }

/* LMS — Dashboard / геймификация */
.lms-dashboard-page .lms-dashboard-main { padding-bottom: 3rem; }
.lms-dashboard-hero { 
    padding: 3rem 0 2.5rem; 
    background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-alt) 100%); 
    border-bottom: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}
.lms-dashboard-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 80% 50% at 50% -20%, rgba(6, 182, 212, 0.08), transparent);
    pointer-events: none;
}
.lms-dashboard-hero .container {
    position: relative;
    z-index: 1;
}
.lms-dashboard-hero h1 { 
    font-size: 2rem; 
    margin-bottom: 0.5rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.02em;
}
.lms-dashboard-subtitle { 
    color: var(--text-muted); 
    margin-bottom: 1.5rem;
    font-size: 1rem;
}
.lms-stats-row { display: flex; flex-wrap: wrap; gap: 1rem; }
.lms-stat-card { 
    padding: 1.25rem 1.5rem; 
    background: var(--bg-card); 
    border: 1px solid var(--border); 
    border-radius: var(--radius-lg); 
    min-width: 140px; 
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}
.lms-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    border-color: var(--accent);
}
.lms-stat-card.lms-stat-points { 
    border-color: rgba(6, 182, 212, 0.3); 
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.1) 0%, rgba(6, 182, 212, 0.02) 100%);
}
.lms-stat-card.lms-stat-streak { 
    border-color: rgba(249, 115, 22, 0.3); 
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.1) 0%, rgba(249, 115, 22, 0.02) 100%);
}
.lms-stat-card.lms-stat-badges { 
    border-color: rgba(168, 85, 247, 0.3); 
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.1) 0%, rgba(168, 85, 247, 0.02) 100%);
}
.lms-stat-card.lms-stat-rank { 
    border-color: rgba(34, 197, 94, 0.3); 
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.1) 0%, rgba(34, 197, 94, 0.02) 100%);
}
.lms-stat-value { 
    display: block; 
    font-size: 1.75rem; 
    font-weight: 700; 
    color: var(--accent);
    letter-spacing: -0.02em;
    line-height: 1;
}
.lms-stat-icon { 
    width: 1.5rem;
    height: 1.5rem;
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.25rem;
}
.lms-stat-icon svg {
    width: 100%;
    height: 100%;
}
.lms-stat-label { 
    font-size: 0.85rem; 
    color: var(--text-muted);
    font-weight: 500;
}
.lms-dashboard-grid { display: grid; grid-template-columns: 1fr 320px; gap: 2rem; margin-top: 2rem; }
@media (max-width: 900px) { .lms-dashboard-grid { grid-template-columns: 1fr; } }
.lms-dashboard-section { 
    margin-bottom: 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}
.lms-dashboard-section:last-child {
    margin-bottom: 0;
}
.lms-dashboard-section h2 { 
    font-size: 1.1rem; 
    margin-bottom: 1rem; 
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text);
    font-weight: 600;
}
.lms-section-icon {
    width: 1.25rem;
    height: 1.25rem;
    color: var(--accent);
    flex-shrink: 0;
}
.lms-dashboard-courses { display: flex; flex-direction: column; gap: 1rem; }
.lms-dash-course-card { 
    display: block; 
    padding: 1.5rem; 
    background: var(--bg-card); 
    border: 1px solid var(--border); 
    border-radius: var(--radius-lg); 
    text-decoration: none; 
    color: inherit; 
    position: relative; 
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.lms-dash-course-card:hover { 
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}
.lms-dash-course-progress { 
    position: absolute; 
    left: 0; 
    top: 0; 
    bottom: 0; 
    width: var(--pct, 0); 
    background: linear-gradient(90deg, rgba(6, 182, 212, 0.15) 0%, rgba(6, 182, 212, 0.08) 100%);
    transition: width 0.3s ease;
}
.lms-dash-course-card h3 { 
    font-size: 1.1rem; 
    margin-bottom: 0.5rem; 
    position: relative; 
    z-index: 1;
    font-weight: 600;
    color: var(--text);
    line-height: 1.4;
}
.lms-dash-course-pct { 
    position: absolute; 
    right: 1.5rem; 
    top: 1.5rem; 
    font-weight: 700; 
    color: var(--accent);
    font-size: 1rem;
    z-index: 1;
    background: var(--bg-card);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}
.lms-leaderboard-list { 
    list-style: none; 
    padding: 0; 
    margin: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}
.lms-leaderboard-list li { 
    display: flex; 
    align-items: center; 
    gap: 0.75rem; 
    padding: 0.75rem 1rem; 
    border-bottom: 1px solid var(--border);
    transition: background 0.2s ease;
}
.lms-leaderboard-list li:last-child {
    border-bottom: none;
}
.lms-leaderboard-list li:hover {
    background: var(--bg-alt);
}
.lms-leaderboard-list li.me { 
    background: var(--accent-muted);
    border-color: var(--accent);
    margin: 0;
    border-radius: 0;
}
.lms-lb-rank { 
    font-weight: 700; 
    color: var(--text-muted); 
    min-width: 28px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
.lms-leaderboard-list li.me .lms-lb-rank {
    color: var(--accent);
}
.lms-lb-name { 
    flex: 1; 
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text);
}
.lms-leaderboard-list li.me .lms-lb-name {
    font-weight: 600;
}
.lms-lb-points { 
    font-weight: 600; 
    color: var(--accent);
    font-size: 0.9rem;
}
.lms-badges-grid { 
    display: flex; 
    flex-wrap: wrap; 
    gap: 0.75rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1rem;
}
.lms-badge-item { 
    display: flex; 
    align-items: center; 
    gap: 0.5rem; 
    padding: 0.75rem 1rem; 
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.85rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    cursor: default;
}
.lms-badge-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    border-color: var(--accent);
}
.lms-badge-icon { 
    font-size: 1.25rem;
    line-height: 1;
}
.lms-recommended-list { 
    list-style: none; 
    padding: 0; 
    margin: 0;
}
.lms-recommended-list li { 
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
}
.lms-recommended-list li:last-child {
    border-bottom: none;
}
.lms-recommended-list a { 
    color: var(--accent); 
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
    display: block;
}
.lms-recommended-list a:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

.lms-empty-hint { 
    color: var(--text-muted); 
    font-size: 0.9rem;
    padding: 1rem;
    background: var(--bg-alt);
    border-radius: var(--radius);
    border: 1px dashed var(--border);
}
.lms-empty-hint a { 
    color: var(--accent); 
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}
.lms-empty-hint a:hover { 
    color: var(--accent-hover);
    text-decoration: underline;
}
.lms-muted {
    color: var(--text-muted);
    font-size: 0.9rem;
    padding: 0.5rem 0;
}

/* LMS — видео главы и скорость */
.lms-video-chapters { margin-top: 0.75rem; }
.lms-chapters-toggle { background: var(--bg-input); border: 1px solid var(--border); border-radius: var(--radius); padding: 0.35rem 0.75rem; cursor: pointer; font-size: 0.9rem; }
.lms-chapters-list { list-style: none; padding: 0.5rem 0 0; margin: 0; }
.lms-chapters-list li { margin: 0.25rem 0; }
.lms-chapter-link { background: none; border: none; color: var(--accent); cursor: pointer; font-size: 0.9rem; text-align: left; padding: 0.25rem 0; }
.lms-chapter-link:hover { text-decoration: underline; }

/* LMS — комментарии */
.lms-comments-block { margin: 2rem 0; padding: 1.5rem; background: var(--bg-input); border-radius: var(--radius); }
.lms-comments-block h2 { font-size: 1.1rem; margin-bottom: 1rem; }
.lms-comments-list { margin-bottom: 1rem; }
.lms-comment { padding: 0.75rem 0; border-bottom: 1px solid var(--border); }
.lms-comment:last-child { border-bottom: none; }
.lms-comment strong { margin-right: 0.5rem; }
.lms-comment-date { font-size: 0.8rem; color: var(--text-muted); }
.lms-comment p { margin: 0.25rem 0 0; font-size: 0.95rem; }
.lms-comment-form textarea { width: 100%; padding: 0.75rem; border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 0.5rem; background: var(--bg-card); color: var(--text); resize: vertical; }
.lms-my-more a:hover { text-decoration: underline; }

/* LMS — плеер курса, хедер, прогресс, сайдбар */
.lms-player-page { padding-top: 0; }
.lms-player-header { background: var(--bg-card); border-bottom: 1px solid var(--border); padding: 0.75rem 0; }
.lms-player-header-inner { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.lms-progress-bar-wrap { display: flex; align-items: center; gap: 0.75rem; flex: 1; min-width: 200px; }
.lms-progress-bar { flex: 1; height: 8px; background: var(--bg-input); border-radius: 4px; overflow: hidden; }
.lms-progress-fill { height: 100%; background: var(--accent); border-radius: 4px; transition: width 0.3s; }
.lms-progress-text { font-size: 0.85rem; color: var(--text-muted); white-space: nowrap; }
.lms-sidebar-toggle { display: none; padding: 0.5rem; background: none; border: none; color: var(--text); cursor: pointer; }
.lms-sidebar-toggle svg { width: 24px; height: 24px; }
.lms-sidebar-header { display: none; }
.lms-module-summary { cursor: pointer; font-weight: 600; font-size: 0.9rem; padding: 0.35rem 0; list-style: none; }
.lms-module-summary::-webkit-details-marker { display: none; }
.lms-lesson-icon { opacity: 0.7; margin-right: 0.35rem; }
.lms-lesson-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.lms-lesson-nav { display: flex; gap: 0.5rem; margin-left: auto; }
.lms-empty-lesson { padding: 3rem 2rem; text-align: center; }
@media (max-width: 900px) {
    .lms-sidebar-toggle { display: flex; }
    .lms-sidebar { position: fixed; top: 0; left: 0; bottom: 0; width: 280px; max-width: 90vw; z-index: 200; transform: translateX(-100%); transition: transform 0.25s; overflow-y: auto; box-shadow: 4px 0 20px rgba(0,0,0,0.3); }
    .lms-sidebar.open { transform: translateX(0); }
    .lms-sidebar-header { display: flex; justify-content: space-between; align-items: center; padding-bottom: 1rem; border-bottom: 1px solid var(--border); margin-bottom: 1rem; }
    .lms-sidebar-close { background: none; border: none; font-size: 1.5rem; color: var(--text-muted); cursor: pointer; padding: 0.25rem; }
    body.lms-sidebar-open::before { content: ''; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 199; }
}

/* Яло — полноэкранное модальное окно (всегда на весь viewport) */
.yalo-fullscreen-modal {
    display: none;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    max-width: none !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    z-index: 2147483647;
    align-items: stretch;
    justify-content: stretch;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    box-sizing: border-box;
}
.yalo-fullscreen-modal.open {
    display: flex !important;
    opacity: 1;
    visibility: visible;
}
body.yalo-fullscreen-active {
    overflow: hidden !important;
    height: 100% !important;
}
body.yalo-fullscreen-active .header,
body.yalo-fullscreen-active header {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    transform: translateY(-100%) !important;
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease !important;
}
.yalo-fullscreen-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.yalo-fullscreen-content {
    position: relative;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    z-index: 1;
}
.yalo-fullscreen-iframe-wrap {
    flex: 1;
    min-height: 0;
    min-width: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: stretch;
    justify-content: stretch;
    overflow: hidden;
}
.yalo-fullscreen-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 10001;
    width: 44px;
    height: 44px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(10, 14, 23, 0.9);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    color: #e2e8f0;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}
.yalo-fullscreen-close:hover {
    background: rgba(10, 14, 23, 1);
    border-color: rgba(6, 182, 212, 0.6);
    color: #22d3ee;
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 6px 20px rgba(6, 182, 212, 0.4);
}
.yalo-fullscreen-iframe {
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    border: none;
    flex: 1;
    background: var(--bg);
    flex-shrink: 0;
    display: block;
}
@media (max-width: 768px) {
    .yalo-fullscreen-close {
        top: 0.75rem;
        right: 0.75rem;
        width: 40px;
        height: 40px;
    }
}

/* Кнопка "Наверх" */
.scroll-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 52px;
    height: 52px;
    background: var(--gradient);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(6, 182, 212, 0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.9);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999;
    padding: 0;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.scroll-to-top:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 8px 24px rgba(6, 182, 212, 0.6);
}

.scroll-to-top:active {
    transform: translateY(-2px) scale(1);
}

.scroll-to-top svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    transition: transform 0.3s ease;
}

.scroll-to-top:hover svg {
    transform: translateY(-2px);
}

[data-theme="light"] .scroll-to-top {
    box-shadow: 0 4px 16px rgba(124, 58, 237, 0.3);
}

[data-theme="light"] .scroll-to-top:hover {
    box-shadow: 0 8px 24px rgba(124, 58, 237, 0.5);
}

body.yalo-page .scroll-to-top,
body.yalo-fullscreen-active .scroll-to-top {
    display: none !important;
}

@media (max-width: 768px) {
    .scroll-to-top {
        bottom: 1.5rem;
        right: 1.5rem;
        width: 48px;
        height: 48px;
    }
    
    .scroll-to-top svg {
        width: 18px;
        height: 18px;
    }
}
