
/* START COMPONENT: grid */
div.grid-wrapper {
    display: grid;
    grid-gap: 1rem;
    grid-template-columns: repeat(auto-fill, minmax(25rem,2fr));
    column-count: 3;
}
div.grid-card {
    position: relative;

    background-clip: border-box; /* Fix for small gap in border corners */

    padding: 0; /* Override .box */
    height: 23.75rem;

    a {
        position: absolute;
        width: 100%;
        height: 100%;
        top: 0;
        left: 0;

        border-radius: inherit;
        background-clip: border-box; /* Fix for small gap in border corners */
        color: var(--primary-text-color);
        text-decoration: none;

        transition: all 0.5s ease-out;

        overflow: hidden;

        h3, span {
            opacity: 0;
            transition: inherit;
        }
        h3 {
            margin-top: 40%;
            margin-bottom: 0.375rem;
        }
        h3, span:not(.grid-card-year) {
            margin-left: 1.5rem;
            margin-right: 1.5rem;
        }
        span {
            color: var(--primary-text-color--alt);
        }
        span.grid-card-year {
            margin: 0 1.5rem 0 1.5rem;
            font-weight: 300;
        }

        div.card-corner {
            display: flex;
            align-items: center;
            justify-content: center;
            position: absolute;
            width: 3rem;
            height: 3rem;
            overflow: hidden;
            top: 0;
            right: 0;
            margin-right: -3rem;
            background-color: var(--secondary-background-color);
            border-radius: 0 8px 0 32px;
            opacity: 0.0;

            transition: inherit;
        }
    }

    img {
        width: 100%;
        height: 100%;
        object-fit: cover; 

        border-radius: 7px; /* Fixes the rought edges on the border */
    }
}

div.grid-card a:hover {
    background-color: rgb(from var(--primary-background-color) r g b / 0.75);

    h3, span {
        opacity: 1.0;
    }

    div.card-corner {
        margin-right: 0;
        opacity: 0.8;
    }
}

/* Smaller than 600px */
@media only screen and (max-width: 37.5em) {
    div.grid-wrapper {
        grid-template-columns: none;
        column-count: 1;
    }
    div.grid-card {
        height: 25rem;
    }
}

/* Below 480px */
@media only screen and (max-width: 29.95em) {
    div.grid-card {
        height: 15.75rem;
    }
}
/* END COMPONENT: grid */

/* START PAGE STYLE */
ul.project-filter {
    padding: 1rem 1rem 1rem 0;

    li {
        cursor:pointer;
        display: inline-block;
        margin-left: 1rem;
        padding: 0.25rem 0.5rem 0.25rem 0.5rem;
        font-size: 1.2rem;
    }
    li.project-filter-active {
        background-color: var(--accent-color-select);
        color: var(--secondary-text-color);
    }
    li:hover:not(.project-filter-active) {
        background-color: var(--hover-color);
        color: var(--secondary-text-color-alt);
    }
}

@media only screen and (max-width: 37.5em) {
    ul.project-filter {
        li {
            display: block;
            margin-top: 0.5rem;
        }
    }
}
/* END PAGE STYLE */
