/* =============================================================================
   ARO Website - Animation Styles
   ============================================================================= */

/* Custom properties for animations */
:root {
    --animation-fast: 0.2s;
    --animation-medium: 0.4s;
    --animation-slow: 0.8s;
    --easing-smooth: cubic-bezier(0.16, 1, 0.3, 1);
    --easing-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* =============================================================================
   Progress Bar
   ============================================================================= */
.progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
    z-index: 1000;
    transition: width 0.1s ease-out;
}

/* =============================================================================
   Scroll-Triggered Animations
   ============================================================================= */

/* Base state for animated elements */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s var(--easing-smooth);
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Fade in from left */
.animate-slide-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: all 0.6s var(--easing-smooth);
}

.animate-slide-left.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Fade in from right */
.animate-slide-right {
    opacity: 0;
    transform: translateX(30px);
    transition: all 0.6s var(--easing-smooth);
}

.animate-slide-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Scale in */
.animate-scale {
    opacity: 0;
    transform: scale(0.95);
    transition: all 0.6s var(--easing-smooth);
}

.animate-scale.visible {
    opacity: 1;
    transform: scale(1);
}

/* =============================================================================
   Keyframe Animations
   ============================================================================= */

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

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes floatRotate {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(5deg); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(0.98); }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-8px); }
    60% { transform: translateY(-4px); }
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* =============================================================================
   Animated Gradient Text
   ============================================================================= */
.gradient-animate {
    background-size: 200% 200%;
    animation: gradientShift 5s ease infinite;
}

/* =============================================================================
   Hover Animations
   ============================================================================= */

/* Card hover lift */
.hover-lift {
    transition: transform 0.3s var(--easing-smooth), box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

/* Icon hover scale */
.hover-scale {
    transition: transform 0.3s var(--easing-bounce);
}

.hover-scale:hover {
    transform: scale(1.1);
}

/* Button hover glow */
.hover-glow {
    transition: all 0.3s ease;
}

.hover-glow:hover {
    box-shadow: 0 0 30px rgba(124, 58, 237, 0.4);
}

/* =============================================================================
   Stagger Animation Delays
   ============================================================================= */
.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }
.stagger-5 { transition-delay: 0.5s; }
.stagger-6 { transition-delay: 0.6s; }

/* =============================================================================
   Background Gradients
   ============================================================================= */
.bg-gradient-animated {
    position: relative;
    overflow: hidden;
}

.bg-gradient-animated::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse at 20% 20%, rgba(124, 58, 237, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(6, 182, 212, 0.1) 0%, transparent 50%);
    z-index: -1;
    opacity: 0.5;
}

/* =============================================================================
   Glass Morphism
   ============================================================================= */
.glass {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.glass-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    transition: all 0.3s var(--easing-smooth);
}

.glass-card:hover {
    border-color: var(--color-primary);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 60px rgba(124, 58, 237, 0.1);
}

/* =============================================================================
   Animated Underline
   ============================================================================= */
.animated-underline {
    position: relative;
    display: inline-block;
}

.animated-underline::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
    border-radius: 2px;
    transition: width 0.6s var(--easing-smooth);
}

.animated-underline.visible::after,
.animated-underline:hover::after {
    width: 100%;
}

/* =============================================================================
   Loading States
   ============================================================================= */
.skeleton {
    background: linear-gradient(90deg, rgba(255,255,255,0.05) 25%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.05) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

/* =============================================================================
   GitHub Link with Stars
   ============================================================================= */
.nav-github {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    transition: all 0.3s var(--easing-smooth);
}

.nav-github:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.nav-github svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.github-stars {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-warning);
}

.github-stars svg {
    width: 14px;
    height: 14px;
    fill: var(--color-warning);
}

.github-stars-count {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.github-stars-count.loaded {
    opacity: 1;
}

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

/* =============================================================================
   Light Mode Overrides
   ============================================================================= */
@media (prefers-color-scheme: light) {
    .glass {
        background: rgba(0, 0, 0, 0.02);
        border: 1px solid rgba(0, 0, 0, 0.08);
    }

    .glass-card {
        background: rgba(0, 0, 0, 0.02);
        border: 1px solid rgba(0, 0, 0, 0.08);
    }

    .nav-github {
        background: rgba(0, 0, 0, 0.05);
        border: 1px solid rgba(0, 0, 0, 0.1);
    }

    .nav-github:hover {
        background: rgba(0, 0, 0, 0.08);
        border-color: rgba(0, 0, 0, 0.15);
    }
}
