/* ===== SCROLL ANIMATIONS CSS ===== */

/* Scroll Progress Indicator */
.scroll-indicator {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #6366F1, #8B5CF6);
    z-index: 10000;
    transition: width 0.2s ease-out;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.4);
}

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #6366F1 0%, #8B5CF6 100%);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

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

.scroll-to-top:hover {
    background: linear-gradient(135deg, #7C3AED 0%, #A855F7 100%);
    transform: translateY(-5px);
    box-shadow: 0 8px 32px rgba(99, 102, 241, 0.4);
}

/* Floating Particles */
.floating-particle {
    position: absolute;
    width: 10px;
    height: 10px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.3), rgba(139, 92, 246, 0.3));
    border-radius: 50%;
    pointer-events: none;
    animation: float 15s infinite ease-in-out;
    z-index: 1;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.3;
    }
    25% {
        transform: translate(30px, -30px) scale(1.2);
        opacity: 0.5;
    }
    50% {
        transform: translate(-20px, -60px) scale(0.8);
        opacity: 0.3;
    }
    75% {
        transform: translate(-40px, -30px) scale(1.1);
        opacity: 0.4;
    }
}

/* Section Headers Animation */
.section-header {
    position: relative;
    display: inline-block;
    overflow: hidden;
}

.section-header h2 {
    transform: translateY(100%);
    opacity: 0;
    transition: transform 0.8s cubic-bezier(0.19, 1, 0.22, 1), opacity 0.8s ease;
}

.section-header.revealed h2 {
    transform: translateY(0);
    opacity: 1;
}

/* Reveal Section Animation */
.reveal-section {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-section.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Timeline Items Animation */
.timeline-item {
    opacity: 0;
    transform: translateX(-50px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.timeline-item.revealed {
    opacity: 1;
    transform: translateX(0);
}

.timeline-item:nth-child(even) {
    transform: translateX(50px);
}

.timeline-item:nth-child(even).revealed {
    transform: translateX(0);
}

/* Skills Wave Animation */
.skill-tag.revealed {
    animation: skillWave 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.skill-tag.wave-1 { animation-delay: 0.05s; }
.skill-tag.wave-2 { animation-delay: 0.1s; }
.skill-tag.wave-3 { animation-delay: 0.15s; }
.skill-tag.wave-4 { animation-delay: 0.2s; }
.skill-tag.wave-5 { animation-delay: 0.25s; }
.skill-tag.wave-6 { animation-delay: 0.3s; }
.skill-tag.wave-7 { animation-delay: 0.35s; }
.skill-tag.wave-8 { animation-delay: 0.4s; }
.skill-tag.wave-9 { animation-delay: 0.45s; }

@keyframes skillWave {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.8);
    }
    50% {
        transform: translateY(-10px) scale(1.05);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Magnetic Effect on Cards */
.project-card.magnetic-active {
    transform: scale(1.05);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Projects Carousel Styles */
.projects-carousel-container {
    position: relative;
    width: 100%;
    padding: 40px 0;
}

.projects-carousel-wrapper {
    position: relative;
    width: 100%;
    height: 500px;
    perspective: 1500px;
    overflow: visible;
}

.projects-carousel-track {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
}

.projects-carousel-track .project-card {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 400px;
    transform-style: preserve-3d;
    transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    opacity: 0;
    pointer-events: none;
}

.projects-carousel-track .project-card.center {
    transform: translate(-50%, -50%) translateZ(0) rotateY(0deg) scale(1);
    opacity: 1;
    z-index: 3;
    pointer-events: auto;
}

.projects-carousel-track .project-card.left {
    transform: translate(-150%, -50%) translateZ(-200px) rotateY(25deg) scale(0.8);
    opacity: 0.5;
    z-index: 2;
    pointer-events: auto;
}

.projects-carousel-track .project-card.right {
    transform: translate(50%, -50%) translateZ(-200px) rotateY(-25deg) scale(0.8);
    opacity: 0.5;
    z-index: 2;
    pointer-events: auto;
}

.projects-carousel-track .project-card.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Carousel Controls */
.carousel-controls {
    position: absolute;
    width: 100%;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 10;
    pointer-events: none;
}

.carousel-btn {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    pointer-events: auto;
    color: #333;
}

.carousel-btn:hover {
    background: white;
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.carousel-btn:active {
    transform: scale(0.95);
}

/* Carousel Info & Dots */
.carousel-info {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: var(--text-color, #333);
    font-weight: 500;
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-dot.active {
    background: linear-gradient(135deg, #6366F1, #8B5CF6);
    transform: scale(1.3);
}

.carousel-dot:hover {
    background: linear-gradient(135deg, #6366F1, #8B5CF6);
    transform: scale(1.2);
}

/* Hero Content Transition Effects */
.hero-content {
    transition: opacity 0.3s ease, transform 0.3s ease, filter 0.3s ease;
    will-change: opacity, transform, filter;
}

/* Dark Mode Adjustments */
[data-theme="dark"] .scroll-to-top {
    background: linear-gradient(135deg, #6366F1 0%, #8B5CF6 100%);
}

[data-theme="dark"] .carousel-btn {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

[data-theme="dark"] .carousel-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .carousel-dot {
    background: rgba(255, 255, 255, 0.3);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .scroll-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 20px;
    }

    .floating-particle {
        width: 6px;
        height: 6px;
    }

    .carousel-btn {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }

    .projects-carousel-wrapper {
        height: 400px;
    }

    .projects-carousel-track .project-card {
        width: 300px;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .floating-particle {
        display: none;
    }
}

/* Print Styles */
@media print {
    .scroll-indicator,
    .scroll-to-top,
    .floating-particle,
    .carousel-controls,
    .carousel-dots,
    .carousel-info {
        display: none !important;
    }
}
