/* ========================================
   ANIMATIONS
   ======================================== */

/* Navigation slide down */
@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

nav {
    animation: slideDown 0.6s ease;
}

/* Logo blinking cursor */
.logo::after {
    content: '_';
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* Fade in up animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-content {
    animation: fadeInUp 0.8s ease 0.2s backwards;
}

.section-header {
    animation: fadeInUp 0.8s ease;
}

.skill-card {
    animation: fadeInUp 0.8s ease backwards;
}

.skill-card:nth-child(1) { animation-delay: 0.1s; }
.skill-card:nth-child(2) { animation-delay: 0.2s; }
.skill-card:nth-child(3) { animation-delay: 0.3s; }

/* Float animation for hero visual */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

.hero-visual {
    position: relative;
    animation: float 6s ease-in-out infinite;
}

/* Rotating gradient on profile card */
@keyframes rotate {
    100% { transform: rotate(360deg); }
}

.profile-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(
        from 0deg,
        transparent 0deg,
        var(--accent) 60deg,
        transparent 120deg
    );
    animation: rotate 8s linear infinite;
    opacity: 0.1;
}

/* Shine effect on project images */
.project-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 136, 0.3), transparent);
    transition: left 0.5s ease;
}

.project-card:hover .project-image::before {
    left: 100%;
}

/* Scroll indicator animation */
.scroll-indicator::before {
    content: '';
    width: 4px;
    height: 8px;
    background: var(--accent);
    border-radius: 2px;
    animation: scrollDown 2s ease infinite;
}

@keyframes scrollDown {
    0% { transform: translateY(0); opacity: 1; }
    100% { transform: translateY(20px); opacity: 0; }
}

.scroll-indicator {
    animation: fadeInUp 1s ease 1s backwards;
}

/* Pulse animation for loading */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.loading {
    animation: pulse 2s ease infinite;
}

/* Stagger animation for cards */
.project-card,
.video-card {
    animation: fadeInUp 0.6s ease backwards;
}

/* Scale on hover */
.skill-card,
.project-card,
.video-card,
.contact-card {
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Button hover effect with slide */
.btn {
    position: relative;
    overflow: hidden;
}

.btn::before {
    transition: left 0.3s ease;
}

/* Mobile menu animation */
.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Fade in animation for dynamically loaded content */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fade-in {
    animation: fadeIn 0.5s ease;
}

/* Shimmer effect for loading cards */
@keyframes shimmer {
    0% { background-position: -1000px 0; }
    100% { background-position: 1000px 0; }
}

.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: 1000px 100%;
    animation: shimmer 2s infinite;
}
