@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600&family=Krona+One&display=swap');

:root {
    --bg-color: #1a1a1a; /* Графитово-черный */
    --text-color: #ffffff;
    --glow-color-1: rgba(255, 255, 255, 0.3);
    --glow-color-2: rgba(200, 200, 200, 0.3);
    --glow-color-3: rgba(150, 150, 150, 0.3);
    --glow-color-4: rgba(220, 220, 220, 0.3);
    --accent-blue: #007AFF; /* Premium Blue */
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Inter', sans-serif;
    overflow: hidden; /* Чтобы избежать скроллов от вращающихся элементов */
    height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Эффект зернистости (Noise) */
.noise {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 1; /* Под линиями (z-index: 2) */
    opacity: 0.02;
    background: url('data:image/svg+xml;utf8,<svg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"><filter id="noiseFilter"><feTurbulence type="fractalNoise" baseFrequency="0.65" numOctaves="3" stitchTiles="stitch"/></filter><rect width="100%" height="100%" filter="url(%23noiseFilter)"/></svg>');
}

/* Телевизионный паттерн (Scanlines) */
body::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.15),
        rgba(0, 0, 0, 0.15) 1px,
        transparent 1px,
        transparent 3px
    );
    pointer-events: none;
    z-index: 2; /* Паттерн выше шума (1), но ниже логотипа (3) и орбит (10) */
}

.header {
    padding: 2rem 4rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 20;
    width: 100%;
}

.header-left, .header-right {
    display: flex;
    gap: 2rem;
}

.header a {
    color: var(--accent-blue);
    text-decoration: none;
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 1.5px;
    transition: color 0.3s ease, text-shadow 0.3s ease;
    text-transform: uppercase;
}

.user-name {
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.header a:hover {
    color: #fff;
    text-shadow: 0 0 15px var(--accent-blue);
}

.main-container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.logo-container {
    position: relative;
    /* Убрали z-index чтобы слои свечения и логотипа могли переплетаться с паттерном */
    display: flex;
    justify-content: center;
    align-items: center;
}

.logo {
    max-width: 300px;
    height: auto;
    z-index: 50; /* Логотип теперь над всеми элементами */
    position: relative;
    transform: translateY(-50px); /* Смещаем только само изображение на 50px вверх */
    /* Убедитесь, что ваш логотип с прозрачным фоном (.png) */
}

.glow {
    position: absolute;
    width: 700px;
    height: 700px;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--glow-color-1), var(--glow-color-2), var(--glow-color-3), var(--glow-color-4));
    background-size: 400% 400%;
    filter: blur(100px);
    z-index: 1;
    animation: glowAnimation 12s ease infinite;
    opacity: 0.85;
}

@keyframes glowAnimation {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

#lines-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 4; /* Выше логотипа (3), но ниже орбиты (10) */
}

#orbit-container {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    z-index: 10; /* Контейнер всегда выше логотипа (z-index: 5) */
    pointer-events: none; /* Клики проходят сквозь контейнер, но не сквозь элементы */
}

.orbit-item {
    position: absolute;
    pointer-events: auto; /* Делаем элементы кликабельными */
    transform: translate(-50%, -50%);
    cursor: pointer;
    font-family: 'Krona One', sans-serif;
    font-size: 1.1rem;
    white-space: nowrap;
    transition: all 0.3s ease;
    color: #cccccc;
    
    /* Стеклянная плашка (Glassmorphism) без тени */
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 12px 24px;
    border-radius: 15px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.orbit-item:hover {
    color: #ffffff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Эффект для UX / UI (Open Behance) */
.orbit-item.link-item {
    position: relative;
    overflow: hidden;
}

.orbit-item.link-item:hover {
    background: #000;
    color: #fff;
    border-color: #fff;
    padding-left: 60px;
    padding-right: 60px;
}

.orbit-item.link-item:hover::after {
    content: 'Open Behance';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    white-space: nowrap;
}

/* Подпункты Hobby */
.sub-items-container {
    position: absolute;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    top: -60px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    z-index: 5;
    width: auto;
    white-space: nowrap;
}

.orbit-item.dropdown-item:hover .sub-items-container {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.sub-item {
    font-size: 0.85rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    padding: 8px 16px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ccc;
    transition: all 0.3s ease;
}

.sub-item:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

/* Модальное окно */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(10, 10, 10, 0.85);
    z-index: 100;
    backdrop-filter: blur(15px);
    opacity: 0;
    transition: opacity 0.4s ease;
    overflow: hidden; /* Убрали скролл, теперь это слайдер */
}

.modal.show {
    display: block;
    opacity: 1;
}

.modal-content {
    background-color: transparent;
    padding: 0;
    border-radius: 0;
    position: relative;
    width: 80%; /* Оставляем место по бокам для стрелок */
    max-width: 1200px;
    height: 100%; /* На всю высоту */
    margin: 0 auto;
    box-shadow: none;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn {
    position: fixed;
    top: 30px;
    right: 30px;
    font-size: 3.5rem;
    cursor: pointer;
    color: #fff;
    transition: color 0.3s ease, transform 0.3s ease;
    z-index: 200; /* Максимальный z-index */
    line-height: 1;
    text-shadow: 0 0 10px rgba(0,0,0,0.5);
    padding: 10px;
}

.close-btn:hover {
    color: #ff5555;
    transform: scale(1.1);
}

/* Тонкие большие стрелки */
.nav-arrow {
    position: fixed;
    top: 50%;
    width: 100px;
    height: 100px;
    border-top: 2px solid #fff;
    border-right: 2px solid #fff;
    cursor: pointer;
    z-index: 110;
    transition: border-color 0.3s ease, transform 0.3s ease;
    display: none; /* Скрыто по умолчанию */
}

.prev-arrow {
    left: 4vw;
    transform: translateY(-50%) rotate(-135deg);
}
.prev-arrow:hover {
    border-color: #aaa;
    transform: translateY(-50%) rotate(-135deg) scale(1.05);
}

.next-arrow {
    right: 4vw;
    transform: translateY(-50%) rotate(45deg);
}
.next-arrow:hover {
    border-color: #aaa;
    transform: translateY(-50%) rotate(45deg) scale(1.05);
}

#modal-body {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.slide-item {
    width: 100%;
    display: none; /* Скрываем все слайды, JS покажет нужный */
    flex-direction: column;
    align-items: center;
    justify-content: center;
    max-height: 90vh;
}

.slide-img {
    max-width: 100%;
    max-height: 85vh; /* Ограничиваем высоту, чтобы влезало на экран */
    border-radius: 12px;
    object-fit: contain;
    /* Убрали тень (box-shadow) по просьбе */
}

.slide-title {
    margin-bottom: 2rem;
    font-size: 2.5rem;
    font-weight: 600;
    text-align: center;
    color: #fff;
    letter-spacing: 2px;
}

/* Контейнер для видео */
.video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6);
    background-color: #000;
}

.video-container iframe,
.video-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    z-index: 2; /* Над фоном */
}

.video-overlay-bg {
    /* Путь к вашей PNG картинке */
    background-image: url('images/video editing/Video  1.png'); 
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    background-color: transparent;
    box-shadow: none;
}

.video-overlay-bg iframe {
    width: 70%; /* Размер видео относительно фона */
    height: 70%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 10px 30px rgba(0,0,0,0.8);
    border-radius: 8px;
}

.project-link {
    margin-top: 1.5rem;
    color: var(--accent-blue);
    text-decoration: none;
    font-family: 'Krona One', sans-serif;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.project-link:hover {
    color: #fff;
    text-shadow: 0 0 10px var(--accent-blue);
}

/* --- Mobile Version --- */
@media (max-width: 768px) {
    body {
        height: auto;
        min-height: 100vh;
        overflow-y: auto; /* Allow scrolling on mobile since items are stacked */
    }

    .header {
        padding: 1.5rem 1rem; /* Reduced side margins */
        flex-direction: column;
        gap: 1.5rem;
        align-items: center;
        text-align: center;
    }

    .header-left, .header-right {
        gap: 1.5rem;
        flex-direction: column;
        align-items: center;
    }

    .logo {
        max-width: 240px; /* 300px * 0.8 = 240px (20% smaller) */
    }

    .main-container {
        flex-direction: column;
        justify-content: flex-start;
        padding-top: 4rem;
        min-height: auto;
    }

    #orbit-container {
        position: relative;
        top: 0;
        left: 0;
        transform: none;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
        padding: 4rem 1rem;
        height: auto;
        width: 100%;
    }

    .orbit-item {
        position: relative !important;
        transform: none !important;
        width: 90%;
        max-width: 300px;
        text-align: center;
        margin: 0 auto;
    }

    .glow {
        width: 100%;
        height: 100%;
        max-width: 400px;
        max-height: 400px;
    }

    .modal-content {
        width: 95%;
    }

    .nav-arrow {
        width: 50px;
        height: 50px;
    }

    .close-btn {
        top: 15px;
        right: 15px;
        font-size: 2.5rem;
        z-index: 201;
    }

    /* Мобильный выпадающий список Hobby */
    .orbit-item.dropdown-item .sub-items-container {
        position: static !important;
        transform: none !important;
        flex-direction: column !important;
        width: 100% !important;
        gap: 0.8rem !important;
        margin-top: 1rem !important;
        display: none !important;
        opacity: 1 !important;
        visibility: visible !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 0 !important;
        left: auto !important;
    }

    .orbit-item.dropdown-item.active .sub-items-container {
        display: flex !important;
    }

    .sub-item {
        width: 100% !important;
        max-width: 200px !important; /* Ограничиваем ширину чтобы не было слишком широко */
        text-align: center !important;
        padding: 10px 15px !important;
        margin: 0 auto !important;
    }

    .skills-container img {
        height: 20px;
    }
}

/* --- Footer & Skills --- */
.footer {
    position: fixed;
    bottom: 2rem;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 20;
    pointer-events: none;
}

.skills-container {
    display: flex;
    gap: 1.5rem;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    pointer-events: auto;
    transition: all 0.3s ease;
}

.skills-container:hover {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.skills-container img {
    height: 24px;
    width: auto;
    opacity: 0.6;
    transition: all 0.3s ease;
    filter: grayscale(100%) brightness(1.5);
}

.skills-container img:hover {
    opacity: 1;
    transform: translateY(-5px) scale(1.1);
    filter: grayscale(0%) brightness(1);
}

/* Мобильные переопределения для футера в самом конце */
@media (max-width: 768px) {
    body {
        height: auto !important;
        min-height: 100vh !important;
        overflow-y: auto !important;
    }

    .footer {
        position: relative !important;
        bottom: auto !important;
        left: auto !important;
        width: 100% !important;
        margin-top: 5rem !important;
        padding-bottom: 5rem !important;
        pointer-events: auto !important;
        transform: none !important;
    }

    .skills-container {
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 1rem !important;
        width: 90% !important;
        margin: 0 auto !important;
        background: rgba(255, 255, 255, 0.05) !important;
    }

    .skills-container img {
        height: 20px !important;
    }
}

