/* --- БАЗОВЫЕ НАСТРОЙКИ --- */
:root {
    --bg-main: #0a0a0f;
    --bg-secondary: #14141a;
    --text-light: #ffffff;
    --text-muted: #a0a0b0;
    --neon-blue: #00f7ff;
    --neon-purple: #bc13fe;
    --main-font: 'Montserrat', sans-serif;
}

html { scroll-behavior: smooth; }

body {
    margin: 0; padding: 0;
    font-family: var(--main-font);
    background-color: var(--bg-main);
    color: var(--text-light);
    line-height: 1.6;
    overflow-x: hidden;
}

.container { width: 90%; max-width: 1200px; margin: 0 auto; }
a { text-decoration: none; transition: 0.3s; color: inherit; }

/* --- НАВИГАЦИЯ --- */
.top-nav {
    position: fixed; top: 0; left: 0; right: 0;
    background: rgba(10, 10, 15, 0.9);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    padding: 5px 0;
}

.nav-container {
    display: flex; justify-content: space-between; align-items: center;
    width: 90%; max-width: 1200px; margin: 0 auto;
}

.logo { font-weight: 800; font-size: clamp(1.5rem, 3.5vw, 1.5rem); letter-spacing: 1px; }
.logo a { display: flex; align-items: center; }
.logo-icon { 
    height: 40px;     
    vertical-align: middle; 
    padding-top: 0px;  
    padding-bottom: 0px; 
    margin-top: 0px;  
    margin-bottom: 0px; 
    margin-right: 10px; 
    opacity: 0.4; 
}

.nav-links { display: flex; gap: 25px; align-items: center; }
.nav-links a { font-size: 0.9rem; font-weight: 600; text-transform: uppercase; color: var(--text-muted); }
.nav-links a:hover { color: var(--neon-blue); }

/* Гамбургер-кнопка (скрыта на десктопе) */
.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    z-index: 1001;
}
.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-light);
    margin: 5px 0;
    transition: transform 0.3s, opacity 0.3s;
}
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* Мобильная адаптация навбара */
@media (max-width: 768px) {
    .hamburger { display: block; }
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(10, 10, 15, 0.95);
        backdrop-filter: blur(10px);
        padding: 20px;
        gap: 15px;
        border-bottom: 1px solid rgba(255,255,255,0.05);
    }
    .nav-links.open { display: flex; }
    .nav-links a { font-size: 1rem; }
    .hero h1 { font-size: 1.2rem; line-height: 1.2; }
    .subtitle { font-size: 0.65rem; }
    .check-list li { padding-left: 20px; margin-bottom: 6px; }
    .hero { height: auto; min-height: 70vh; padding-top: 80px; padding-bottom: 40px; }
}

/* --- HERO SECTION --- */
.hero {
    position: relative;
    background-image: url('header-bg.jpg'); /* Проверь, что файл так называется */
    background-size: cover; background-position: center;
    height: auto; display: flex; align-items: flex-start;
    padding-top: 200px; 
    padding-bottom: 40px;
}

.hero-overlay {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to bottom, rgba(10,10,15,0.5), var(--bg-main));
    z-index: 1;
}

.hero-content { position: relative; z-index: 2; }
.hero h1 { font-size: clamp(2rem, 8vw, 3.5rem); font-weight: 800; margin: 0 0 20px 0; line-height: 1.1; text-transform: uppercase; }
.text-neon { color: var(--text-light); text-shadow: 0 0 10px var(--neon-blue), 0 0 20px var(--neon-blue); }
.subtitle { font-size: clamp(0.95rem, 3vw, 1.3rem); color: var(--text-muted); margin-bottom: 40px; max-width: 600px; }

.hero-buttons { display: flex; gap: 20px; }
.btn { padding: 12px 30px; border-radius: 4px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; display: inline-block; }
.btn-neon { color: var(--neon-blue); border: 2px solid var(--neon-blue); box-shadow: 0 0 15px rgba(0, 247, 255, 0.1); }
.btn-neon:hover { background-color: var(--neon-blue); color: var(--bg-main); box-shadow: 0 0 30px rgba(0, 247, 255, 0.5); }
.btn-outline { border: 2px solid rgba(255,255,255,0.3); color: var(--text-light); }
.btn-outline:hover { background: rgba(255,255,255,0.1); border-color: #fff; }

/* --- СЕКЦИИ (СЖАТЫЕ ОТСТУПЫ) --- */
.section-dark {
    padding: 0 0 30px 0;
    /* Это заставит браузер останавливать прокрутку чуть выше, 
       чтобы заголовок не залезал под меню */
    scroll-margin-top: 80px; 
}
.section-title { font-size: 2.2rem; margin-bottom: 30px; border-left: 5px solid var(--neon-blue); padding-left: 20px; }
.section-desc { color: var(--text-muted); margin-bottom: 20px; margin-left: 25px; }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 30px; }

/* Управление количеством колонок для разных секций */
.grid-assets { grid-template-columns: repeat(2, 1fr); } /* Unity Assets: 3 колонки */
.grid-games { grid-template-columns: repeat(3, 1fr); }  /* Games: 2 колонки */

/* Адаптив: на мобильных всегда 1 колонка */
@media (max-width: 768px) {
    .grid-assets,
    .grid-games {
        grid-template-columns: 1fr;
    }
    .hero {
        height: auto;
        min-height: auto;
        align-items: flex-start;
        background-position: top;
        padding-top: 200px;
        padding-bottom: 40px;
    }
}

/* --- КАРТОЧКИ (НОВЫЕ ПРОПОРЦИИ) --- */
.card {
    background-color: var(--bg-secondary);
    border-radius: 12px; overflow: hidden; position: relative;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid rgba(255,255,255,0.05);
    display: flex; flex-direction: column;
}

.card:hover { transform: translateY(-7px); }
.card-neon:hover { box-shadow: 0 0 20px rgba(0, 247, 255, 0.15); border-color: var(--neon-blue); }

/* Высота картинки 280px */
.card-image-wrapper { height: 280px; background-size: cover; background-position: center; position: relative; }
.card-image-placeholder { height: 280px; display: flex; align-items: center; justify-content: center; }
.card-play-overlay {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    display: flex; align-items: center; justify-content: center;
    background: rgba(0,0,0,0.3);
    opacity: 0;
    transition: opacity 0.3s;
}
.card-image-wrapper:hover .card-play-overlay { opacity: 1; }
.card-play-overlay .play-btn { font-size: 3rem; color: white; text-shadow: 0 0 15px rgba(0,0,0,0.8); }

/* Контент компактнее */
.card-content { padding: 10px; flex-grow: 1; display: flex; flex-direction: column; }
.card h3 { margin: 0 0 8px 0; font-size: 1.4rem; }
.card p { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 12px; line-height: 1.4; }

.card-badge { position: absolute; top: 15px; right: 15px; background-color: var(--neon-blue); color: #000; padding: 4px 10px; border-radius: 4px; font-weight: 800; font-size: 0.75rem; z-index: 2; }
.badge-soon { background-color: #ff9900; color: #000; }

.tags { display: flex; gap: 4px; flex-wrap: wrap; margin-top: auto; }
.tag { font-size: 0.7rem; text-transform: uppercase; color: var(--text-muted); border: 1px solid rgba(255,255,255,0.1); padding: 3px 8px; border-radius: 15px; }
.card-link { position: absolute; top: 0; left: 0; right: 0; bottom: 0; opacity: 0; }

/* --- CONTACT CARDS --- */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}
@media (max-width: 768px) {
    .contact-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
    .contact-grid { grid-template-columns: 1fr; }
}
.contact-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 10px;
    cursor: pointer;
}
.contact-icon {
    font-size: 2.5rem;
    flex: 0 0 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.contact-text {
    flex: 1;
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* --- FOOTER --- */
.footer-dark { background: #050508; padding: 5px 0; margin-top: 0px; border-top: 1px solid rgba(255,255,255,0.05); }
.footer-content { text-align: center; }
.copyright { margin-top: 0; font-size: 0.8rem; color: #555; }
.copyright a { color: var(--text-muted); }
.copyright a:hover { color: var(--neon-blue); text-shadow: 0 0 10px var(--neon-blue); }

/* --- ПЕРЕКЛЮЧАТЕЛЬ ЯЗЫКОВ (НОВЫЙ) --- */
/* Контейнер для двух кнопок, чтобы они стояли рядом */
.lang-switcher {
    display: flex;
    gap: 10px; /* Расстояние между кнопками */
    margin-left: 10px; /* Отступ от остальных ссылок меню */
    align-items: center;
}
/* Общий стиль для кнопок языка */
.lang-btn {
    border: 1px solid rgba(255, 255, 255, 0.3); /* Тонкая рамка */
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
    cursor: pointer;
    transition: 0.3s;
    text-decoration: none; /* Убираем подчеркивание */
    display: inline-block;
}

/* Стиль при наведении на НЕактивную кнопку */
a.lang-btn:hover {
    border-color: var(--text-light);
    color: var(--text-light);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}

/* Стиль для АКТИВНОЙ кнопки (текущий язык) */
.lang-btn.active {
    background-color: var(--neon-blue); /* Заливка неоновым цветом */
    color: #000; /* Черный текст для контраста */
    border-color: var(--neon-blue);
    box-shadow: 0 0 10px rgba(0, 247, 255, 0.4); /* Свечение */
    cursor: default; /* Курсор не меняется, так как это не ссылка */
}

/* --- СТИЛИ ДЛЯ СТРАНИЦЫ ПРОДУКТА (vmemoji.html) --- */

/* Продуктовая шапка (две колонки: текст и картинка) */
.product-hero {
    padding-top: 80px; /* Отступ под меню */
    padding-bottom: 40px;
    background: radial-gradient(circle at top right, #1a1a2e, var(--bg-main));
}

.product-hero-content {
    display: grid;
    grid-template-columns: 4fr 3fr;
    grid-template-areas:
        "title media"
        "info media";
    gap: 0 50px;
    align-items: start;
}
.product-title { grid-area: title; }
.product-info { grid-area: info; }
.product-media-column { grid-area: media; }

@media (max-width: 768px) {
    .product-hero-content {
        grid-template-columns: 1fr;
        grid-template-areas:
            "title"
            "media"
            "info";
        gap: 20px;
    }
    .product-media-column { min-width: 0; }
}

.product-buttons { text-align: center; margin-top: 45px; }

.product-info { 
    flex: 4;
    min-width: 300px; 
    padding: 0px;
}
.product-desc {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.text-block h3 { margin: 0px 0 10px 0; }

/* Список с галочками */
.check-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.check-list li {
    margin-bottom: 10px;
    position: relative;
    padding-left: 30px;
    color: var(--text-light);
}

.subtitle.check-list li {
    color: var(--text-muted);
}
.check-list li::before {
    content: '✔'; /* Галочка */
    position: absolute;
    left: 0;
    color: var(--neon-blue);
    font-weight: bold;
}

.center-text { text-align: center; }
.center-text.section-title { border-left: none; /* Убираем линию слева для центрированного заголовка */ }

/* --- СТИЛИ ДЛЯ КАТЕГОРИЙ (VM_Emoji) --- */

.category-grid {
    display: grid;
    /* Автоматическая сетка: карточки не меньше 180px */
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.cat-card {
    background: rgba(255, 255, 255, 0.03); /* Очень легкий фон */
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 25px 15px;
    text-align: center;
    transition: 0.3s ease;
}

.cat-card:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: var(--neon-blue); /* Неоновая рамка при наведении */
    transform: translateY(-5px); /* Всплытие */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.cat-card img {
    width: 64px; /* Размер иконки */
    height: auto;
    margin-bottom: 15px;
    transition: 0.3s;
    filter: drop-shadow(0 0 5px rgba(0,0,0,0.5));
}

.cat-card:hover img {
    transform: scale(1.1); /* Иконка чуть увеличивается */
}

.cat-card h4 {
    color: var(--text-light);
    font-size: 1.1rem;
    margin: 0 0 10px 0;
    font-weight: 700;
}

.cat-card p {
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.4;
    margin: 0;
}

/* --- ГАЛЕРЕЯ И МОДАЛЬНОЕ ОКНО --- */

/* Обёртка для правой колонки */
.product-media-column {
    flex: 3;
    min-width: 300px;
    text-align: center;
    margin-top: 100px; /* Сдвиг вниз, чтобы картинка начиналась на уровне описания */
}
@media (max-width: 768px) {
    .product-media-column { margin-top: 0; }
    .product-title { margin-bottom: 0; }
    .product-hero {
        background: radial-gradient(circle at top center, #1a1a2e, #12121f);
    }
}

.main-hero-img {
    width: 100%;
    height: 300px;          /* Высота картинки */
    /*object-fit: contain;    /* Логотип впишется в новую высоту БЕЗ искажений и обрезки */    
	object-fit: cover;
    background-color: rgba(255,255,255,0.02); /* Опционально: легкий фон для проверки границ */
    border-radius: 20px;
    transition: 0.5s ease;
}

/* Контейнер для миниатюр */
.media-thumbs {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    justify-content: center; /* Центрируем миниатюры */
}

/* Стиль одной миниатюры */
.thumb-item {
    width: 140px; /* Фиксированная ширина */
    min-width: 140px; /* Не сжиматься в карусели */
    height: 85px; /* Фиксированная высота */
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    border: 2px solid rgba(255,255,255,0.1);
    transition: 0.3s all;
}
.thumb-item.audio-thumb {
    width: 85px;
    min-width: 85px;
}

.thumb-item img,
.thumb-item video {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Заполняет блок, обрезаясь если нужно */
    transition: 0.3s;
}

/* Эффект при наведении на миниатюру */
.thumb-item:hover {
    border-color: var(--neon-blue);
    box-shadow: 0 0 15px rgba(0, 247, 255, 0.3);
}
.thumb-item:hover img,
.thumb-item:hover video { transform: scale(1.05); }

/* Затемнение с иконкой поверх миниатюры */
.thumb-overlay {
    position: absolute; top:0; left:0; right:0; bottom:0;
    background: rgba(0,0,0,0.4); /* Полупрозрачный черный */
    display: flex; align-items: center; justify-content: center;
    opacity: 0; transition: 0.3s;
}

.thumb-item:hover .thumb-overlay { opacity: 1; }

.thumb-overlay .icon,
.thumb-overlay .play-btn {
    font-size: 2rem;
    color: var(--text-light);
    text-shadow: 0 0 10px var(--neon-blue);
}


/* --- СТИЛИ МОДАЛЬНОГО ОКНА (LIGHTBOX) --- */
.modal {
    display: none; /* Скрыто по умолчанию */
    position: fixed;
    z-index: 9999; /* Поверх всего */
    left: 0; top: 0;
    width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.92); /* Очень темный фон */
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px); /* Размытие фона */
}

/* Сама большая картинка внутри окна */
.modal-content {
    max-width: 90%; /* Не больше 90% экрана */
    max-height: 90vh;
    border-radius: 12px;
    box-shadow: 0 0 50px rgba(0, 247, 255, 0.2);
    animation: zoomIn 0.3s ease; /* Анимация появления */
}

@keyframes zoomIn {
    from {transform: scale(0.9); opacity: 0;}
    to {transform: scale(1); opacity: 1;}
}

/* Кнопка закрыть (крестик) */
.close-modal {
    position: absolute;
    top: 20px; right: 40px;
    color: #f1f1f1;
    font-size: 50px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
    z-index: 10000;
}

.close-modal:hover { color: var(--neon-blue); }

/* --- НАВИГАЦИЯ В МОДАЛКЕ (Prev / Next) --- */
.modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10000;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #f1f1f1;
    font-size: 2.5rem;
    padding: 15px 12px;
    cursor: pointer;
    transition: 0.3s ease;
    border-radius: 4px;
    line-height: 1;
    user-select: none;
}
.modal-nav:hover {
    background: rgba(0, 247, 255, 0.15);
    border-color: var(--neon-blue);
    color: var(--neon-blue);
    box-shadow: 0 0 20px rgba(0, 247, 255, 0.3);
}
.modal-nav--prev { left: 20px; }
.modal-nav--next { right: 20px; }
.modal-nav.hidden { display: none; }

/* Подпись под медиа в модалке */
.modal-caption {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--text-muted);
    font-size: 0.75rem;
    text-align: center;
    line-height: 1.4;
    user-select: none;
    transition: opacity 1s ease;
    background: rgba(0, 0, 0, 0.6);
    padding: 5px 15px;
    border-radius: 4px;
}
.modal-caption .caption-index {
    color: var(--neon-blue);
}

/* --- ДОПОЛНЕНИЕ ДЛЯ ВИДЕО В МОДАЛКЕ --- */

/* Контейнер видео внутри модалки */
.modal-video-container {
    width: 100%;       /* Ширина окна видео */
    max-width: 1000px;
    aspect-ratio: 16 / 9; /* Сохраняем пропорции YouTube */
    box-shadow: 0 0 50px rgba(0, 247, 255, 0.2);
    animation: zoomIn 0.3s ease;
    background: #000;
}
/* Сброс стилей для video в модалке */
.modal-video-container video {
    object-fit: contain !important; /* Сохраняет пропорции без обрезки */
    transform: none !important; /* Сброс любых поворотов */
}
/* В fullscreen тоже сбрасываем */
.modal-video-container video:fullscreen {
    transform: none !important;
}

/* Аудио-режим стилизуется через JS inline styles в showItem() */

/* На мобильных видео делаем пошире */
@media (max-width: 768px) {
    .modal-video-container {
        width: 95%;
    }
}

/* Горизонтальный просмотр модалки на мобильных в портретном режиме */
@media (max-width: 768px) and (orientation: portrait) {
    .modal {
        transform: rotate(90deg);
        transform-origin: top left;
        top: 0;
        left: 100vw;
        width: 100vh;
        height: 100vw;
    }
    .modal-content {
        max-height: 80vw;
        max-width: 85vh;
    }
    .modal-video-container {
        width: 85vh;
    }
    .modal-nav { font-size: 2rem; }
    .close-modal { font-size: 2rem; }
}

/* --- СТИЛИ ДЛЯ ABOUT PAGE (Timeline) --- */

.about-hero {
    padding-top: 90px;
    padding-bottom: 30px;
    background: radial-gradient(circle at center, #1a1a2e 0%, var(--bg-main) 70%);
}

/* Фон карточек навыков — как у about-hero */
.skills-section .card {
    background: rgba(255, 255, 255, 0.03); /* Очень легкий фон */
    border: 1px solid rgba(255, 255, 255, 0.05);
}
.skills-section .card:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: var(--neon-blue); /* Неоновая рамка при наведении */
}

.skills-section .card-content {
    padding: 5px 5px;
}

/* Линия времени */
.timeline {
    position: relative;
    max-width: 100%;
    margin: 0 auto;
}

/* Вертикальная палка */
.timeline::after {
    content: '';
    position: absolute;
    width: 4px;
    background-color: rgba(255, 255, 255, 0.1);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -2px;
}

.timeline-item {
    padding: 5px 30px;
    position: relative;
    background-color: inherit;
    width: 50%;
    box-sizing: border-box;
}
.timeline-item:first-child { padding-top: 30px; }
.timeline-item:last-child { padding-bottom: 30px; }

/* Левые и правые блоки */
.left { left: 0; }
.right { left: 50%; }

/* Точка на линии */
.timeline-item::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    right: -13px;
    background-color: var(--bg-main);
    border: 3px solid var(--neon-blue);
    top: 50%;
    transform: translateY(-50%);
    border-radius: 50%;
    z-index: 1;
}

.right::after { left: -13px; right: auto; } /* Точка для правых блоков */

/* Год на противоположной стороне линии */
.timeline-year {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--neon-blue);
    text-shadow: 0 0 10px rgba(0, 247, 255, 0.3);
    white-space: nowrap;
}
.left .timeline-year { left: calc(100% + 25px); }   /* текст растёт вправо, от точки */
.right .timeline-year { right: calc(100% + 25px); }  /* текст растёт влево, от точки */


/* Контент внутри таймлайна */
.timeline-content {
    padding: 10px 15px;
    position: relative;
    border-radius: 6px;
}

/* Адаптивность для мобильных */
@media screen and (max-width: 768px) {
    .timeline::after { left: 31px; }
    .timeline-item { width: 100%; padding-left: 70px; padding-right: 25px; }
    .timeline-item::after { left: 17px; }
    .left::after, .right::after { left: 17px; }
    .right { left: 0%; }
    .timeline-year {
        left: -5px !important;
        right: auto !important;
        top: 50%;
        transform: rotate(-90deg) translateX(-50%);
        transform-origin: 0 0;
        font-size: 0.8rem;
    }
}

.active-link { color: var(--neon-blue) !important; }

/* --- ОБНОВЛЕННЫЙ ABOUT HERO --- */
.about-hero-flex {
    display: grid;
    grid-template-columns: 3fr 1fr;
    grid-template-areas:
        "title photo"
        "text  photo"
        "cards photo";
    gap: 15px 40px;
    align-items: center;
}
.about-hero-title { grid-area: title; }
.hero-cards {
    grid-area: cards;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    padding-left: 20px;
    padding-right: 10px;
}
.hero-cards .card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
}
.hero-cards .card:hover {
    transform: translateY(-5%);
    background: rgba(255, 255, 255, 0.07);
    border-color: var(--neon-blue); /* Неоновая рамка при наведении */
}

.hero-cards .card-content {
    padding: 5px;
}
.hero-cards .card p {
    margin: 0;
}
.hero-cards .card h4 {
    margin: 0;
}

.about-text-content { grid-area: text; }

.about-image-frame {
    grid-area: photo;
    display: flex;
    justify-content: center;
    position: relative;
}

.profile-photo {
    max-width: 300px;
    width: 100%;
    aspect-ratio: 1/1; /* Соотношение сторон 1 к 1 обязательно для круга */
    border-radius: 50%; /* <--- Вот это изменение делает фото круглым */
    object-fit: cover; /* <--- Добавь это, чтобы фото не искажалось */
    
    /* Твои стили оформления */
    border: 2px solid var(--neon-blue);
    box-shadow: 
        0 0 20px rgba(0, 247, 255, 0.2),
        0 0 40px rgba(188, 19, 254, 0.1);
    transition: 0.5s ease;
}

.profile-photo:hover {
    transform: scale(1.02);
    box-shadow: 0 0 30px var(--neon-blue);
}

/* Адаптивность для мобильных */
@media (max-width: 768px) {
    .about-hero-flex {
        grid-template-columns: 1fr;
        grid-template-areas:
            "title"
            "photo"
            "text"
            "cards";
        text-align: left;
        padding-top: 0px;
        gap: 20px;
    }
    .hero-cards {
        grid-template-columns: 1fr;
    }
    .profile-photo { max-width: 200px; }
}

/* ЭФФЕКТ ПОДСВЕТКИ ДЛЯ ТАЙМЛАЙНА (Исправление) */

/* 1. Подсветка карточки при наведении (и слева, и справа) */
.timeline-item:hover .timeline-content {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--neon-blue);
    box-shadow: 0 0 20px rgba(0, 247, 255, 0.2);
    transform: scale(1.01);
    transition: 0.3s ease;
}

/* 2. Подсветка точки на центральной линии */
.timeline-item:hover::after {
    background-color: var(--neon-blue);
    box-shadow: 0 0 10px var(--neon-blue);
    transform: translateY(-50%) scale(1.15);
    transition: 0.3s ease;
}

/* 3. Гарантируем плавный переход для контента (чтобы не дергалось) */
.timeline-content {
    transition: 0.3s ease;
    border: 1px solid transparent; /* Заготовка под рамку */
}

/* Отступы внутри карточек таймлайна */
.timeline-content h3 { margin: 0 0 5px 0; }        /* КРАСНЫЙ: отступ под заголовком */
.timeline-content p { margin: 0 0 15px 0; }             /* отступ под текстом */
.timeline-content .media-thumbs {                     /* ЗЕЛЁНЫЙ: отступ миниатюр */
    justify-content: flex-start;
    margin-top: 0;
    margin-bottom: 20px;                              /* СИНИЙ: отступ до тегов */
}
.timeline-content .tags { margin: 0; }               /* отступ тегов */

/* --- КАРУСЕЛЬ МИНИАТЮР --- */
.carousel-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
}
.timeline-content .carousel-wrapper {
    margin-top: 0;
    margin-bottom: 20px;
}
.carousel-track {
    overflow: hidden;
    flex: 1;
}
.carousel-track .media-thumbs {
    flex-wrap: nowrap;
    transition: transform 0.35s ease;
    margin: 0;
    justify-content: flex-start;
}
.carousel-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    min-width: 28px;
    height: 87px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #f1f1f1;
    font-size: 1.2rem;
    cursor: pointer;
    transition: 0.3s ease;
    border-radius: 4px;
    line-height: 1;
    user-select: none;
    padding: 0;
}
.carousel-arrow:hover {
    background: rgba(0, 247, 255, 0.15);
    border-color: var(--neon-blue);
    color: var(--neon-blue);
    box-shadow: 0 0 15px rgba(0, 247, 255, 0.3);
}
.carousel-arrow.disabled {
    opacity: 0.2;
    cursor: default;
    pointer-events: none;
}