/* Animations CSS - Minimal polishing animations */

/* Utility animation classes */
.fade-in-up {
    opacity: 0;
    transform: translateY(40px);
    transition: all 400ms cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-in-up.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 450ms cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-in-left.is-visible {
    opacity: 1;
    transform: translateX(0);
}

.fade-in-right {
    opacity: 0;
    transform: translateX(50px);
    transition: all 450ms cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-in-right.is-visible {
    opacity: 1;
    transform: translateX(0);
}

.scale-in {
    opacity: 0;
    transform: scale(0.8);
    transition: all 500ms cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Enhanced hover micro-interactions */
.hover-bump {
    transition: transform 250ms cubic-bezier(0.16, 1, 0.3, 1), 
                box-shadow 250ms cubic-bezier(0.16, 1, 0.3, 1),
                filter 250ms cubic-bezier(0.16, 1, 0.3, 1);
}

.hover-bump:hover {
    transform: scale(1.05) translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.25);
    filter: brightness(1.1);
}

/* Special hover effects for different elements */
.hover-glow {
    transition: all 300ms cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

.hover-glow::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #ffffff20, #cccccc20);
    border-radius: inherit;
    opacity: 0;
    transition: opacity 300ms cubic-bezier(0.16, 1, 0.3, 1);
    z-index: -1;
}

.hover-glow:hover::before {
    opacity: 1;
}

.hover-glow:hover {
    transform: scale(1.03);
}

/* Navbar dropdown animations */
.nav-menu {
    transition: all 400ms cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-menu.active {
    animation: slideDown 400ms cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Dropdown menu items stagger animation */
.nav-item {
    transition: opacity 350ms cubic-bezier(0.16, 1, 0.3, 1), 
                transform 350ms cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-menu.active .nav-item {
    animation: fadeInStagger 350ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.nav-menu.active .nav-item:nth-child(1) { animation-delay: 0ms; }
.nav-menu.active .nav-item:nth-child(2) { animation-delay: 80ms; }
.nav-menu.active .nav-item:nth-child(3) { animation-delay: 160ms; }
.nav-menu.active .nav-item:nth-child(4) { animation-delay: 240ms; }
.nav-menu.active .nav-item:nth-child(5) { animation-delay: 320ms; }
.nav-menu.active .nav-item:nth-child(6) { animation-delay: 400ms; }
.nav-menu.active .nav-item:nth-child(7) { animation-delay: 480ms; }
.nav-menu.active .nav-item:nth-child(8) { animation-delay: 560ms; }
.nav-menu.active .nav-item:nth-child(9) { animation-delay: 640ms; }
.nav-menu.active .nav-item:nth-child(10) { animation-delay: 720ms; }

@keyframes fadeInStagger {
    from {
        opacity: 0;
        transform: translateY(25px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

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

/* Focus ring enhancement */
.nav-link:focus,
.btn:focus,
.project-link:focus,
.contact-method:focus {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Enhanced button and link hover effects */
.btn {
    transition: all 300ms cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 600ms ease;
}

.btn:hover::before {
    left: 100%;
}

.btn:hover {
    transform: scale(1.05) translateY(-3px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.3);
    filter: brightness(1.1);
}

/* Enhanced project card animations */
.project-card {
    transition: all 350ms cubic-bezier(0.16, 1, 0.3, 1);
    transform-origin: center bottom;
}

.project-card:hover {
    transform: scale(1.03) translateY(-8px) rotateX(5deg);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
    filter: brightness(1.05);
}

/* Enhanced link hover effects */
.nav-link,
.project-link,
.contact-method {
    transition: all 250ms cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

.nav-link::after,
.project-link::after,
.contact-method::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: currentColor;
    transition: width 300ms cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-link:hover::after,
.project-link:hover::after,
.contact-method:hover::after {
    width: 100%;
}

.nav-link:hover,
.project-link:hover,
.contact-method:hover {
    transform: scale(1.03) translateY(-2px);
    filter: brightness(1.2);
}

/* Enhanced social icons hover */
.social-icons .icon {
    transition: all 350ms cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

.social-icons .icon::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: all 400ms cubic-bezier(0.16, 1, 0.3, 1);
    transform: translate(-50%, -50%);
    z-index: -1;
}

.social-icons .icon:hover::before {
    width: 120%;
    height: 120%;
}

.social-icons .icon:hover {
    transform: scale(1.15) rotate(5deg);
    filter: brightness(1.3);
}

/* Enhanced scroll indicator animation */
.scroll-indicator {
    animation: floatBounce 3s infinite ease-in-out;
}

@keyframes floatBounce {
    0%, 100% {
        transform: translateY(0) scale(1);
        opacity: 0.7;
    }
    25% {
        transform: translateY(-15px) scale(1.1);
        opacity: 1;
    }
    50% {
        transform: translateY(-8px) scale(1.05);
        opacity: 0.9;
    }
    75% {
        transform: translateY(-12px) scale(1.08);
        opacity: 0.95;
    }
}

/* Hero section entrance animations */
.hero-title {
    animation: heroTitleEntrance 1200ms cubic-bezier(0.16, 1, 0.3, 1) 300ms both;
}

@keyframes heroTitleEntrance {
    from {
        opacity: 0;
        transform: translateY(60px) scale(0.9);
        filter: blur(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

.hero-subtitle {
    animation: heroSubtitleEntrance 1000ms cubic-bezier(0.16, 1, 0.3, 1) 600ms both;
}

@keyframes heroSubtitleEntrance {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.hero-description {
    animation: heroDescriptionEntrance 800ms cubic-bezier(0.16, 1, 0.3, 1) 900ms both;
}

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

.hero-buttons {
    animation: heroButtonsEntrance 600ms cubic-bezier(0.16, 1, 0.3, 1) 1200ms both;
}

@keyframes heroButtonsEntrance {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .hover-bump:hover,
    .btn:hover,
    .project-card:hover,
    .nav-link:hover,
    .project-link:hover,
    .contact-method:hover,
    .social-icons .icon:hover {
        transform: none !important;
        box-shadow: none !important;
    }
    
    .scroll-indicator {
        animation: none !important;
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: no-preference) {
    .fade-in-up {
        transition-delay: var(--animation-delay, 0ms);
    }
}

/* Enhanced stagger delay utility classes for scroll-reveal */
.stagger-1 { --animation-delay: 0ms; }
.stagger-2 { --animation-delay: 150ms; }
.stagger-3 { --animation-delay: 300ms; }
.stagger-4 { --animation-delay: 450ms; }
.stagger-5 { --animation-delay: 600ms; }
.stagger-6 { --animation-delay: 750ms; }

/* Add floating animation for cards */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-5px);
    }
}

.project-card,
.cert-card {
    animation: float 6s ease-in-out infinite;
}

.project-card:nth-child(2n) {
    animation-delay: -3s;
}

.cert-card:nth-child(3n) {
    animation-delay: -2s;
}

/* Parallax effect for sections */
.parallax-section {
    transform: translateZ(0);
    transition: transform 100ms linear;
}

/* Image reveal animations */
.collage-item img,
.profile-photo {
    transition: all 400ms cubic-bezier(0.16, 1, 0.3, 1);
}

.collage-item:hover img {
    transform: scale(1.1) rotate(2deg);
    filter: brightness(1.1) saturate(1.1);
}

.profile-photo:hover {
    transform: scale(1.05) rotate(-2deg);
    filter: brightness(1.1);
}