.projects{
    flex-wrap: wrap;
    justify-content: center;
    align-content: flex-start;
}

.projects-title{
    width: 100%;
    font-family: "Pixelify Sans", "Elms Sans", sans-serif;
    font-size: clamp(2rem, 4vw, 3rem);
    color: #fff;
    text-align: center;
    margin: 0 0 1.5rem;
}

.project-card{
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    cursor: pointer;

    max-width: 500px;
    width: 100%;
}

.project-card img{
    display: block;
    width: 100%;
    transition: .4s;
}

.project-card > img{
    aspect-ratio: 16 / 10;
    object-fit: cover;
}
.project-overlay p, 
.project-overlay h3 
{
    font-family: "Elms Sans";  
    color: #ffff;  
}

.project-overlay{
    position: absolute;
    inset: 0;

    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1rem;

    padding: 2rem;

    opacity: 0;
    transition: .35s;
    background: rgba(17, 25, 40, .75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.project-overlay h3,
.project-overlay p,
.project-overlay .techs,
.project-overlay .buttons{
    transform: translateY(20px);
    transition: .35s;
}

@media (hover: hover) and (pointer: fine) and (min-width: 769px) {
    .project-card:hover img{
        transform: scale(1.08);
    }

    .project-card:hover .project-overlay{
        opacity: 1;
    }

    .project-card:hover h3,
    .project-card:hover p,
    .project-card:hover .techs,
    .project-card:hover .buttons{
        transform: translateY(0);
    }
}

.techs
{
    display: flex;
    align-items: center;
    justify-content: start;
    gap: 3px;
}

.techs img {
    width: 40px;
    height: 40px;
    object-fit: contain;

    padding: 8px;
    border-radius: 10px;

    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.08);

    transition: .25s;
}

.techs img:hover {
    transform: translateY(-3px);
    background: rgba(255,255,255,.15);
}

.project-overlay .buttons
{
    display: flex;
    align-items: center;
    justify-content: start;
    padding: 10px;
    gap: 10px;
}

.project-overlay .buttons a
{
    display: flex;
    align-items: center; 
    gap: 5px;
    background-color: blueviolet;
    border-radius: 8px;
    padding: 10px;
    color: #fff;
    text-decoration: none;
}

.project-overlay .buttons svg
{
    width: 15px;
    height: 15px;
}

.project-overlay .buttons img
{
    width: 15px;
    height: 15px;
    object-fit: contain;

    border-radius: 10px;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.08);
    transition: .25s;
}

/* mobile / touch: stacked card with always-visible info */
@media (max-width: 768px), (hover: none) {
    .projects {
        gap: 1.5rem;
    }

    .project-card {
        display: flex;
        flex-direction: column;
        cursor: default;
        background: #111928;
    }

    .project-card > img {
        aspect-ratio: 16 / 10;
    }

    .project-overlay {
        position: static;
        inset: auto;
        opacity: 1;
        padding: 1.25rem;
        gap: 0.85rem;
        background: transparent;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    .project-overlay h3,
    .project-overlay p,
    .project-overlay .techs,
    .project-overlay .buttons {
        transform: none;
    }

    .project-overlay h3 {
        font-size: 1.3rem;
    }

    .project-overlay p {
        font-size: 0.95rem;
        line-height: 1.6;
    }

    .techs {
        flex-wrap: wrap;
        gap: 6px;
    }

    .techs img {
        width: 36px;
        height: 36px;
    }

    .project-overlay .buttons {
        flex-wrap: wrap;
        padding: 4px 0 0;
        gap: 12px;
    }

    .project-overlay .buttons a {
        min-height: 44px;
        padding: 10px 16px;
    }
}