.card {
    color: var(--text-color-light);
    border: 1px solid var(--border-color-light);
    height: 100px;
    text-align: right;
    position: relative;
    transition: 0.1s;
    padding-right: 5px;
    padding-left: 5px;

    display: grid;
    /* Make the first row take up all of the available space. */
    grid-template-rows: 1fr min-content;
    grid-template-areas:
        "title title"
        " tags  date";
}

.pointer {
    cursor: pointer;
}

.card-background {
    background-color: var(--background-color-light);
    height: 100%;
    width: 100%;
    left: 0;
    position: absolute;
    top: 0;
    z-index: -2;
}

.card:hover {
    box-shadow: 0px 0px 5px 1px var(--border-color-light);
}

@media (prefers-color-scheme: dark) {
    .card {
        border: 1px solid var(--border-color-dark);
    }

    .card:hover {
        box-shadow: 0px 0px 5px 1px var(--border-color-dark);
    }

    .card-background {
        background-color: black;
    }
}

#img-container {
    left: 0;
    top: 0;
    position: absolute;
    z-index: -1;
}

#img-container::after {
    position: absolute;
    content:"";
    height:100px;
    width:100px;
    top:0;
    left:0;
    background: linear-gradient(to right, transparent 96%, var(--background-color-light));
}

#img-container::before {
    position: absolute;
    content:"";
    height:100px;
    width:100px;
    top:0;
    left:0;
    background: linear-gradient(
        to bottom,
        white 0%,
        rgba(255, 255, 255, 0.9) 20%,
        transparent 60%
    );
}

#img-filter::before {
    /* The point of this image filter element is just to make the images
     * in each card a little less contrasty when they're not being
     * hovered. */
    position: absolute;
    content: "";
    width: 100px;
    height: 100px;
    left: 0;
    top: 0;
    background: rgba(255, 255, 255, 0.5);
    transition: 0.1s;
}

.card:hover #img-filter::before {
    background: transparent;
}

.anim #img-filter::before {
    background: transparent;
}

@media (prefers-color-scheme: dark) {
    #img-container::after {
        background: linear-gradient(to right, transparent 96%, black);
    }

    #img-container::before {
        background: linear-gradient(
            to bottom, black 0%,
            rgba(0, 0, 0, 0.9) 20%,
            transparent 60%
        );
    }

    #img-filter::before {
        background: rgba(0, 0, 0, 0.3);
    }
}

#title {
    grid-area: title;
    font-family: "Besley", serif;
    display: inline;
    font-size: 14pt;
    background-clip: text;
}

#date {
    margin: 0;
    grid-area: date;
    display: inline;
    font-size: 10pt;
}

@media (prefers-color-scheme: dark) {
    #title {
        color: var(--text-color-dark);
    }

    #date {
        color: var(--text-color-dark);
    }
}

#img {
    border: none;
    width: 100px;
    height: 100px;
}

/* Dropdown menu */

#dropdown-content {
    padding-left: 2px;
    display: none;
    position: absolute;
    left: -1px;
    z-index: 1;
    width: calc(100% - 2px);
    font-size: 10pt;
    background-color: var(--background-color-light);
    border: 1px solid var(--border-color-light);
    text-align: left;
}

@media (prefers-color-scheme: dark) {
    #dropdown-content {
        background-color: black;
        border: 1px solid var(--border-color-dark);
    }
}

.card:hover #dropdown-content {
    display: block;
}
