#projects .projects-grid {
    max-width: 1100px;
    margin: 0 auto;
    grid-template-columns: repeat(auto-fit, minmax(260px, 320px));
    justify-content: center;
    gap: 24px;
    align-items: start;
}

.project-card {
    aspect-ratio: 1 / 1;
    max-width: 320px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    border-radius: 10px;
    overflow: hidden;
}

.project-img-link {
    display: block;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.project-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.4s ease-out, filter 0.4s ease-in-out;
    animation: pulse 3s infinite ease-in-out;
}

@media (max-width: 768px) {
    #projects .projects-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 20px;
    }

    .project-card {
        aspect-ratio: 1 / 1;
    }

    .project-img {
        object-fit: contain;
    }
}

@media (max-width: 480px) {
    #projects .projects-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .project-card {
        aspect-ratio: 1 / 1;
    }

    .project-img {
        object-fit: contain;
    }
}
