/* Scroll Animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* Project card hover effects */
.project-card {
    transform: translateY(0);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Text animation */
.hero-title {
    opacity: 0;
    animation: fadeUp 1s ease 0.5s forwards;
}

.hero-description {
    opacity: 0;
    animation: fadeUp 1s ease 0.8s forwards;
}

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

/* Loading animation */
.loading-text {
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* Navbar scroll effect */
.navbar {
    transition: background-color 0.3s ease, padding 0.3s ease;
}

.navbar.scrolled {
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    padding: 1rem 2rem;
}

/* Section transitions */
section {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

section.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Enhanced hover effects for light theme */
.project-card:hover .project-info {
    background: linear-gradient(transparent, rgba(255, 255, 255, 0.98));
}

/* Smooth transitions for all interactive elements */
a, button, .project-card {
    transition: all 0.3s ease;
}

/* Respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
    .fade-in,
    .hero-title,
    .hero-description,
    .loading-text,
    section,
    .project-card,
    .navbar,
    .project-overlay,
    .project-info {
        transition: none !important;
        animation: none !important;
        transform: none !important;
        opacity: 1 !important;
    }

    /* Disable keyframe animations globally as a fallback */
    * {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
    }

    html, body {
        scroll-behavior: auto !important;
    }
}