/* Skeleton Loader Component */

.md-skeleton {
    background: linear-gradient(90deg,
        var(--neutral-100) 25%,
        var(--neutral-50) 50%,
        var(--neutral-100) 75%
    );
    background-size: 200% 100%;
    animation: md-shimmer 1.5s ease-in-out infinite;
    border-radius: var(--radius-md);
}

.md-skeleton--text {
    height: 1em;
    margin-bottom: var(--space-2);
    width: 80%;
}

.md-skeleton--text:last-child {
    width: 60%;
}

.md-skeleton--heading {
    height: 1.5em;
    width: 50%;
    margin-bottom: var(--space-4);
}

.md-skeleton--card {
    height: 120px;
    margin-bottom: var(--space-4);
}

.md-skeleton--circle {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
}

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

/* Stagger Animation for Card Grids */

.md-stagger > * {
    opacity: 0;
    transform: translateY(12px);
    animation: md-fade-up var(--duration-normal) var(--ease-default) forwards;
}

.md-stagger > *:nth-child(1) { animation-delay: 0ms; }
.md-stagger > *:nth-child(2) { animation-delay: 80ms; }
.md-stagger > *:nth-child(3) { animation-delay: 160ms; }
.md-stagger > *:nth-child(4) { animation-delay: 240ms; }
.md-stagger > *:nth-child(5) { animation-delay: 320ms; }
.md-stagger > *:nth-child(6) { animation-delay: 400ms; }
.md-stagger > *:nth-child(7) { animation-delay: 480ms; }
.md-stagger > *:nth-child(8) { animation-delay: 560ms; }

@keyframes md-fade-up {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll-triggered reveal animation */
.md-animate-reveal {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity var(--duration-slow) var(--ease-default),
                transform var(--duration-slow) var(--ease-default);
}

.md-animate-reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}
