/* --- НАСТРОЙКИ --- */
:root {
    --bg-color: #05070a;
    --text-white: #ffffff;
    --accent: #a5b4fc;
    --accent-glow: #6366f1;
    --primary: #a5b4fc;
    --primary-glow: #6366f1;
    --danger: #ef4444;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-white);
    font-family: 'Manrope', sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

ul {
    list-style: none;
}

/* --- ФОН --- */
.ambient-light {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: radial-gradient(circle at 30% 40%, #111625 0%, #05070a 70%);
}

/* --- ХЕДЕР --- */
header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 30px 60px;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0) 100%);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 1px;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    z-index: 1001;
    /* Чтобы лого было поверх мобильного меню */
}

.logo span {
    color: var(--accent);
}

/* МЕНЮ (ДЕСКТОП) */
.nav-links {
    display: flex;
    gap: 40px;
}

.nav-item {
    font-size: 15px;
    color: #ffffff;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    padding: 5px 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    opacity: 0.85;
    transition: 0.3s;
}

.nav-item:hover {
    opacity: 1;
    color: var(--accent);
    text-shadow: 0 0 15px var(--accent-glow);
}

.nav-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: 0.3s ease;
    box-shadow: 0 0 10px var(--accent);
}

.nav-item:hover::after {
    width: 100%;
}

.btn-login {
    font-size: 14px;
    font-weight: 700;
    color: var(--bg-color);
    background: #fff;
    padding: 10px 28px;
    border-radius: 4px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s;
    z-index: 1001;
    /* Поверх меню */
}

.btn-login:hover {
    background: var(--accent);
    box-shadow: 0 0 20px var(--accent-glow);
    transform: translateY(-2px);
}

/* ГАМБУРГЕР (Скрыт на ПК) */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    z-index: 1001;
}

.bar {
    width: 30px;
    height: 3px;
    background: #fff;
    border-radius: 3px;
    transition: 0.3s;
}

/* --- СЛАЙДЕР --- */
.hero {
    min-height: 100vh;
    position: relative;
    overflow: hidden;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    padding: 0 60px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 1.5s ease-in-out, visibility 1.5s;
}

.hero-slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 1;
}

.hero-text {
    width: 60%;
    position: relative;
    z-index: 10;
    padding-top: 40px;
}

.label {
    display: inline-block;
    margin-bottom: 20px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--accent);
    font-weight: 700;
    text-shadow: 0 0 10px rgba(165, 180, 252, 0.3);
}

blockquote {
    font-family: 'Cormorant Garamond', serif;
    font-size: 5.5vw;
    line-height: 1.1;
    font-weight: 400;
    font-style: italic;
    margin-bottom: 40px;
    color: #e2e8f0;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.8);
}

blockquote span {
    color: #94a3b8;
}

.author {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 18px;
    color: #ccc;
    font-weight: 400;
}

.dash {
    width: 50px;
    height: 1px;
    background: rgba(255, 255, 255, 0.4);
}

/* ФОТО */
.hero-visual {
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.scientist-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    filter: grayscale(100%) brightness(0.8) contrast(1.1);
    opacity: 0.8;
    mask-image: linear-gradient(to right, transparent 0%, black 60%);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 60%);
    transform: scale(1);
    transition: transform 8s ease;
}

.hero-slide.active .scientist-img {
    transform: scale(1.05);
}

.hero-visual::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 20%;
    background: linear-gradient(to top, var(--bg-color), transparent);
}

.slider-dots {
    position: absolute;
    bottom: 40px;
    left: 60px;
    z-index: 20;
    display: flex;
    gap: 15px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: 0.3s;
}

.dot.active {
    background: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 0 10px var(--accent);
}

/* --- МОБИЛЬНАЯ АДАПТАЦИЯ (@MEDIA) --- */
@media (max-width: 900px) {

    /* Хедер */
    header {
        padding: 20px;
    }

    .hamburger {
        display: flex;
    }

    /* Показываем гамбургер */

    /* Мобильное меню (Выезжающая шторка) */
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        /* Скрыто справа */
        width: 100%;
        height: 100vh;
        background: rgba(5, 7, 10, 0.95);
        /* Темный фон */
        backdrop-filter: blur(10px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 30px;
        transition: 0.4s ease-in-out;
        z-index: 1000;
    }

    .nav-links.mobile-active {
        right: 0;
    }

    /* Класс для открытия */

    .nav-item {
        font-size: 24px;
    }

    /* Крупные ссылки */

    /* Скрываем кнопку "Войти" в шапке, если она дублируется в меню, или оставляем маленькой */
    .btn-login {
        padding: 8px 15px;
        font-size: 12px;
        margin-right: 40px;
    }

    /* Главный экран */
    .hero-slide {
        padding: 0 25px;
    }

    .hero-text {
        width: 100%;
        padding-top: 0;
        margin-top: -50px;
        text-align: left;
    }

    .label {
        font-size: 11px;
    }

    /* Текст цитаты делаем меньше, но читаемым */
    blockquote {
        font-size: 32px;
        text-shadow: 0 2px 10px rgba(0, 0, 0, 1);
    }

    .author {
        font-size: 16px;
    }

    .slider-dots {
        bottom: 30px;
        left: 25px;
    }

    /* Фото на мобильном: занимает весь экран, но темнее */
    .hero-visual {
        width: 100%;
        height: 100%;
        opacity: 1;
    }

    .scientist-img {
        mask-image: none;
        -webkit-mask-image: none;
        /* Убираем боковую маску */
        opacity: 0.3;
        /* Делаем тусклее, чтобы текст читался */
        object-position: center top;
    }

    /* Добавляем затемнение снизу для фото на весь экран */
    .hero-visual::after {
        height: 50%;
        background: linear-gradient(to top, var(--bg-color), transparent);
    }
}


/* Контейнер меню пользователя */
.user-menu {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 5px 5px 15px;
    /* Отступы для капсулы */
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.05);
    /* Легкое стекло */
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: 0.3s;
}

.user-menu:hover {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
}

/* Ссылка на профиль (Имя + Аватар) */
.user-profile-link {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    cursor: pointer;
    transition: 0.3s;
}

.user-profile-link:hover .user-name {
    color: var(--primary);
    text-shadow: 0 0 10px rgba(165, 180, 252, 0.5);
}

/* Аватар (Круг) */
.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    /* Градиент Индиго */
    background: linear-gradient(135deg, #a5b4fc, #6366f1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Manrope', sans-serif;
    font-weight: 700;
    color: #fff;
    font-size: 14px;
    text-transform: uppercase;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.4);
    /* Свечение */
}

/* Картинка внутри аватара */
.user-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

/* Имя пользователя */
.user-name {
    font-family: 'Manrope', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    max-width: 120px;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    transition: 0.3s;
}

/* Разделитель */
.separator {
    width: 1px;
    height: 16px;
    background: rgba(255, 255, 255, 0.2);
    margin: 0 5px;
}

/* Кнопка выхода (Круглая иконка) */
.user-logout {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    /* Серый цвет */
    transition: 0.3s;
    background: transparent;
}

.user-logout:hover {
    color: #ef4444;
    /* Красный текст */
    background: rgba(239, 68, 68, 0.15);
    /* Красный фон */
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.2);
}

/* Кнопка Войти (для состояния else) */
.btn-login {
    font-family: 'Manrope', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: #05070a;
    background: #fff;
    padding: 8px 24px;
    border-radius: 4px;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: 0.3s;
}

.btn-login:hover {
    background: #a5b4fc;
    /* var(--primary) */
    box-shadow: 0 0 20px #6366f1;
    /* var(--primary-glow) */
    transform: translateY(-2px);
}