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

/* Scroll reveal base state */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 700ms cubic-bezier(0.16, 1, 0.3, 1), transform 700ms cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger children within a revealed group (projects grid, skills grid) */
.projects-grid .project-card.reveal:nth-child(1) { transition-delay: 0ms; }
.projects-grid .project-card.reveal:nth-child(2) { transition-delay: 90ms; }
.projects-grid .project-card.reveal:nth-child(3) { transition-delay: 180ms; }
.projects-grid .project-card.reveal:nth-child(4) { transition-delay: 270ms; }

.skills-grid .skill-card { opacity: 1; transform: none; } /* individual skill cards fade with parent block only */

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

@keyframes scrollBounce {
    0%, 100% { transform: translateY(0); opacity: 0.6; }
    50% { transform: translateY(8px); opacity: 1; }
}

@keyframes fadeScaleIn {
    from { opacity: 0; transform: scale(0.96); }
    to { opacity: 1; transform: scale(1); }
}

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

.btn-submitting .btn-arrow { animation: spin 800ms linear infinite; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
    .reveal { opacity: 1; transform: none; }
    .code-card { animation: none; }
    .scroll-arrow { animation: none; }
    .cursor-dot, .cursor-ring { display: none; }
}
