/* ============================================
   Fullpage Scroll System
   ============================================ */

/* Scroll Lock State */
body.scroll-locked {
    overflow: hidden;
}

/* Smooth Scroll Container */
.fullpage-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

/* Section Transitions */
.section {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: var(--space-8);
    opacity: 0;
    visibility: hidden;
    transform: translateY(60px) scale(0.98);
    transition: opacity 400ms cubic-bezier(0.4, 0, 0.2, 1),
                transform 400ms cubic-bezier(0.4, 0, 0.2, 1),
                visibility 400ms cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform, opacity, visibility;
}

.section.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    z-index: 1;
}

.section.prev {
    opacity: 0;
    visibility: hidden;
    transform: translateY(-60px) scale(0.98);
}

.section.next {
    opacity: 0;
    visibility: hidden;
    transform: translateY(60px) scale(0.98);
}

/* Content Animation on Section Enter */
.section.active .section-content > * {
    animation: fadeInUp 600ms cubic-bezier(0.4, 0, 0.2, 1) forwards;
    opacity: 0;
}

.section.active .section-content > *:nth-child(1) { animation-delay: 100ms; }
.section.active .section-content > *:nth-child(2) { animation-delay: 200ms; }
.section.active .section-content > *:nth-child(3) { animation-delay: 300ms; }
.section.active .section-content > *:nth-child(4) { animation-delay: 400ms; }
.section.active .section-content > *:nth-child(5) { animation-delay: 500ms; }
.section.active .section-content > *:nth-child(6) { animation-delay: 600ms; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   Scroll Progress Indicator
   ============================================ */

.scroll-indicator {
    position: fixed;
    right: var(--space-8);
    top: 50%;
    transform: translateY(-50%);
    z-index: var(--z-fixed);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-6);
}

.indicator-track {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border-medium);
    transform: translateX(-50%);
    border-radius: var(--radius-full);
}

.indicator-progress {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 0%;
    background: var(--accent-primary);
    border-radius: var(--radius-full);
    transition: height 400ms cubic-bezier(0.4, 0, 0.2, 1);
}

.indicator-dots {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
    list-style: none;
}

.indicator-dots .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--border-strong);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.indicator-dots .dot::before {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 1px solid transparent;
    transition: all 300ms ease;
}

.indicator-dots .dot:hover {
    background: var(--text-secondary);
    transform: scale(1.2);
}

.indicator-dots .dot.active {
    background: var(--accent-primary);
    transform: scale(1.3);
}

.indicator-dots .dot.active::before {
    border-color: var(--accent-primary);
    opacity: 0.3;
}

/* ============================================
   Main Header
   ============================================ */

.main-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: var(--z-fixed);
    padding: var(--space-4) var(--space-8);
    transition: all 300ms ease;
}

.main-header.scrolled {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1400px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    font-weight: 700;
    font-size: var(--text-xl);
    color: var(--text-primary);
    transition: opacity 200ms ease;
}

.logo:hover {
    opacity: 0.7;
}

.logo svg {
    width: 40px;
    height: 40px;
    color: var(--accent-primary);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: var(--space-2);
    border-radius: var(--radius-full);
    border: 1px solid var(--glass-border);
}

.nav-link {
    padding: var(--space-2) var(--space-4);
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--text-secondary);
    border-radius: var(--radius-full);
    transition: all 200ms ease;
    position: relative;
}

.nav-link:hover {
    color: var(--text-primary);
    background: var(--bg-tertiary);
}

.nav-link.active {
    color: var(--text-inverse);
    background: var(--accent-primary);
}

.theme-toggle {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    transition: all 200ms ease;
}

.theme-toggle:hover {
    background: var(--bg-tertiary);
    transform: scale(1.05);
}

.theme-toggle svg {
    width: 20px;
    height: 20px;
    position: absolute;
    transition: all 300ms ease;
}

.theme-toggle .sun-icon {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

.theme-toggle .moon-icon {
    opacity: 0;
    transform: rotate(90deg) scale(0);
}

[data-theme="dark"] .theme-toggle .sun-icon {
    opacity: 0;
    transform: rotate(-90deg) scale(0);
}

[data-theme="dark"] .theme-toggle .moon-icon {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

/* ============================================
   Scroll Hint
   ============================================ */

.scroll-hint {
    position: absolute;
    bottom: var(--space-8);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-2);
    color: var(--text-tertiary);
    font-size: var(--text-sm);
    animation: bounce 2s ease-in-out infinite;
    opacity: 0.7;
}

.scroll-arrow {
    width: 24px;
    height: 24px;
}

@keyframes bounce {
    0%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    50% {
        transform: translateX(-50%) translateY(8px);
    }
}
