.body {
    align-items: center;
    display: flex;
    justify-content: center;
}

#cards {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    max-width: 916px;
    width: calc(100% - 20px);
}

#cards:hover > .card::after {
    opacity: 1;
}

.card {
    background-color: var(--color-card-border);
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    height: 260px;
    flex-direction: column;
    position: relative;
    width: 300px;
}

.card:hover::before {
    opacity: 1;
}

.card::before,
.card::after {
    border-radius: inherit;
    content: "";
    height: 100%;
    left: 0px;
    opacity: 0;
    position: absolute;
    top: 0px;
    transition: opacity 500ms;
    width: 100%;
}

.card::before {
    background: radial-gradient(
        800px circle at var(--mouse-x) var(--mouse-y),
        var(--color-card-bg-hover),
        transparent 40%
    );
    z-index: 3;
}

.card::after {
    background: radial-gradient(
        600px circle at var(--mouse-x) var(--mouse-y),
        var(--color-card-accent),
        transparent 40%
    );
    z-index: 1;
}

.card > .card-content {
    background-color: var(--color-card-default);
    border-radius: inherit;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    inset: 1px;
    padding: 10px;
    position: absolute;
    z-index: 2;
}

.card-content > * {
    color: var(--color-fg-default);
    margin: 1rem;
}

.card-info-title > h2 {
    font-weight: 700;
    font-size: 1.5rem;
    line-height: 2rem;
}

.card-info-text {
    margin-top: 1rem;
}

@media (max-width: 1000px) {
    body {
        align-items: flex-start;
        overflow: auto;
    }

    #cards {
        max-width: 1000px;
        padding: 10px 0px;
    }

    .card {
        flex-shrink: 1;
        width: calc(50% - 4px);
    }
}

@media (max-width: 500px) {
    .card {
        height: 180px;
    }

    .card-info-wrapper {
        padding: 0px 10px;
    }
}

@media (max-width: 35em) {
    .card {
        width: 100%;
    }
}
