.cards {
    display: flex;
    justify-content: space-around;
    align-items: center;
    width: 100%;
    padding: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
    font-size:1em;
}

.card {
    width: 300px;
    flex: 0 1 30%;
    padding: 0.6rem 1.4rem;
    display: block;
    position: relative;
    flex-wrap: wrap;
    overflow: hidden;
    transition: box-shadow 0.3s linear;
    cursor: pointer;
    aspect-ratio: 1/1;
    background: var(--milky-white);
    backdrop-filter: blur(10px);
    border-radius: 25px;
    border: 1px solid var(--light-gray);
    transition: transform 0.1s ease-out;
    transform-style: preserve-3d; 
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 20px var(--milky-white);
}
@media screen and (max-width: 960px) {
    .card {
        flex: 0 1 calc(50% - 1rem);
    }
}

@media screen and (min-width: 561px) and (max-width: 740px) {
    .card {
        flex: 0 1 100%;
        max-width: 80vw;
    }
    .cards {
        justify-content: center;
    }
}

@media screen and (max-width: 560px) {
    .card {
        flex: 0 1 100%;
        min-width: fit-content;
    }
    .cards {
        justify-content: center;
    }
}

.card:hover>.card-img {}

.card-img {
    width: 100%;
    min-width: 100%;
    height: 40%;
    position: relative;
    pointer-events: none;
}

.card:hover>.card-img>img {
    filter: blur(0);
    transform: scale(1.2);
}

.card-img img {
    position: absolute;
    width: 120%;
    top: -10%;
    left: -10%;
    height: 100%;
    filter: blur(20px);
    transform-origin: 50%;
    transform: scale(1.1);
    transition: filter 0.4s ease-in-out, transform 0.2s ease-in-out;
}

.card-header {
    padding: 0.2rem;
    font-weight: 400;
    margin-bottom: 0.5rem;
    position: relative;
    font-size:2em;
    font-family: "Major Mono Display", monospace;

}

.card-header::after {
    transition: width 0.3s linear;
    width: 0;
    content: "";
    display: block;
    background: var(--accent);
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
}

.card-header:hover ::after {
    width: 100%!important;
}

.card-content {
    text-align: justify;
    padding-top: 0.5rem;
    font-size:1.2em;
    pointer-events: none;
    backface-visibility: hidden;
}

.card-button {
    position: absolute;
    border-radius: 20px;
    width: 80%;
    transform: translate(-50%, -50%);
    height: 2.5rem;
    bottom: 0;
    left: 50%;
    background-color: var(--accent-color);
    border: 3px solid transparent;
    color: white;
    font-weight: bold;
    font-size: 1em;
    transition: color, border, background 0.2s linear;
}


.not-yet {
    filter: blur(5px) grayscale(0.9);
    pointer-events: none;
}

.backgrounded {
    z-index: -1;
}
.card::before {
        content: '';
        position: absolute;

        /* Get position from the inline JS --x and --y variables */
        left: var(--x);
        top: var(--y);
        
        /* Center the light on the cursor */
        transform: translate(-50%, -50%);

        /* Light appearance */
        background: radial-gradient(circle, white 0%, transparent 75%);
        width: 70%;
        height: 70%;
        filter: blur(90px);
        /* Initially hidden */
        opacity: 1;
        transition: opacity 0.3s;
        z-index:-10;
    }