.boxProject {
    display: grid;
    place-items: center;
    padding-top: 40px;
    padding-bottom: 95px;
}

.boxProject .sectiontitle {
    font-weight: bold;
    text-align: center;
    letter-spacing: 0.1em;
    padding-bottom: 40px;
    font-size: 35px;
}

.boxCard {
    display: grid;
    column-gap: 40px;
    grid-template-columns: repeat(3, 1fr);
}

.artCard {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
}

.imgCard {
    position: relative;
    width: 300px;
    height: 300px;
    object-fit: cover;
    border-radius: 23px;
}

.badgeProject {
    display: inline-block;
    padding: 1px 9px;
    font-size: 10px;
    white-space: nowrap;
    background-color: #f3e8ff;
    color: #7e22ce;
    border-radius: 9999px;
    border: 1px solid #7e22ce;
}

.artCard:nth-child(1) .imgCard {
    object-fit: contain;
}

.dataCard {
    width: 270px;
    padding: 20px 25px;
    border-radius: 16px;
    position: absolute;
    left: 0;
    right: 0;
    margin-inline: auto;
    opacity: 0;
    transition: opacity 1s 1s;
}

.bioCard {
    display: block;
    font-size: 12px;
    padding-top: 5px;
}

.titleCard {
    font-size: 1em;
    font-weight: 500;
}

.buttonCard {
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    color: #7e22ce;
}

.buttonCard:hover {
    text-decoration: underline;
}

/* Naming animations in hover */
.artCard:hover .dataCard {
    animation: show-data 1s forwards;
    opacity: 1;
    transition: opacity 0.3s;
}

.artCard:hover {
    animation: remove-overflow 2s forwards;
}

.artCard:not(:hover) {
    animation: show-overflow 2s forwards;
}

.artCard:not(:hover) .dataCard {
    animation: remove-data 1s forwards;
}

/* Card animation */
@keyframes show-data {
    50% {
        transform: translateY(-160px);
    }
    100% {
        transform: translateY(-100px);
    }
}

@keyframes remove-overflow {
    to {
        overflow: initial;
    }
}

@keyframes remove-data {
    0% {
        transform: translateY(-100px);
    }
    50% {
        transform: translateY(-160px);
    }
    100% {
        transform: translateY(8px);
    }
}

@keyframes show-overflow {
    0% {
        overflow: initial;
        pointer-events: none;
    }
    50% {
        overflow: hidden;
    }
}

/*=============== BREAKPOINTS ===============*/
@media screen and (max-width: 1070px) {
    .boxCard {
        column-gap: 25px;
    }

    .imgCard {
        width: 270px;
        height: 270px;
    }

    .dataCard {
        width: 240px;
    }

    .bioCard {
        font-size: 10px;
    }

    .buttonCard {
        font-size: 10px;
    }
}

@media screen and (max-width: 920px) {
    .boxCard {
        column-gap: 18px;
    }

    .imgCard {
        width: 240px;
        height: 240px;
    }

    .titleCard {
        font-size: 0.95em;
    }

    .dataCard {
        width: 215px;
        padding: 18px 15px;
    }

    .artCard:hover .dataCard {
        animation: show-data-small 1s forwards;
    }

    .artCard:not(:hover) .dataCard {
        animation: remove-data-small 1s forwards;
    }
}

@keyframes show-data-small {
    50% {
        transform: translateY(-160px);
    }
    100% {
        transform: translateY(-85px);
    }
}

@keyframes remove-data-small {
    0% {
        transform: translateY(-85px);
    }
    50% {
        transform: translateY(-160px);
    }
    100% {
        transform: translateY(8px);
    }
}

@media screen and (max-width: 800px) {
    .boxCard {
        grid-template-columns: none;
        row-gap: 85px;
    }

    .imgCard {
        width: 270px;
        height: 270px;
    }

    .dataCard {
        width: 240px;
    }

    .bioCard {
        font-size: 10px;
    }

    .buttonCard {
        font-size: 10px;
    }
}

@media screen and (max-width: 640px) {
    .boxProject {
        padding-top: 30px;
        padding-bottom: 95px;
    }

    .boxProject .sectiontitle {
        padding-bottom: 30px;
    }
}

@media screen and (max-width: 600px) {
    .boxProject .sectiontitle {
        font-size: 20px;
    }
}
