/* v3.3.1: portfolio grid reveal and "View more projects" button.
   Only adds the hidden/reveal states and the button style. Card design
   and heights live in site.css. */

/* Extra cards start hidden on the homepage until revealed. The explicit
   rule is needed because card styles elsewhere set display. */
.wmd-work-grid .wmd-work-extra[hidden] {
    display: none;
}

/* Revealed cards fade and slide in, staggered by position. */
.wmd-work-grid .wmd-work-extra.wmd-work-visible {
    animation: wmd-work-fade-in 0.45s ease both;
}

.wmd-work-grid .wmd-work-extra:nth-child(8).wmd-work-visible {
    animation-delay: 0.06s;
}

.wmd-work-grid .wmd-work-extra:nth-child(9).wmd-work-visible {
    animation-delay: 0.12s;
}

.wmd-work-grid .wmd-work-extra:nth-child(10).wmd-work-visible {
    animation-delay: 0.18s;
}

.wmd-work-grid .wmd-work-extra:nth-child(11).wmd-work-visible {
    animation-delay: 0.24s;
}

.wmd-work-grid .wmd-work-extra:nth-child(12).wmd-work-visible {
    animation-delay: 0.3s;
}

@keyframes wmd-work-fade-in {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* "View more projects" button. Transparent with currentColor so it
   works in both dark and light mode. */
.wmd-work-more-wrap {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
}

.wmd-work-more {
    appearance: none;
    cursor: pointer;
    font: inherit;
    font-weight: 600;
    padding: 0.8rem 1.75rem;
    border-radius: 999px;
    border: 1px solid currentColor;
    background: transparent;
    color: inherit;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.wmd-work-more:hover {
    opacity: 0.75;
}

.wmd-work-more:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 3px;
}

.wmd-work-more:active {
    transform: scale(0.98);
}

@media (prefers-reduced-motion: reduce) {
    .wmd-work-grid .wmd-work-extra.wmd-work-visible {
        animation: none;
    }

    .wmd-work-more {
        transition: none;
    }
}
