.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 10px;
}

.grid-item {
    position: relative;
    width: 100%;
    padding-top: 100%; /* This makes the item square */
    overflow: hidden; /* Crops the content */
}

.grid-item img {
    position: absolute;
    top: 50%;
    left: 50%;
    width: auto;
    height: 100%;
    min-width: 100%;
    min-height: 100%;
    transform: translate(-50%, -50%); /* Centers the image */
    object-fit: cover;
}

#image-modal {
    display: none;
    position: absolute;
    top: 10%;
    left: 10%;
    width: 80%;
    height: 80%;
    background-color: #00000080;
    align-items: center;
    justify-content: center;
    flex-direction: row;
}

#image-modal.show {
    display: flex;
}

#image-modal img {
    /* width: auto;
    max-width: 80%; */
    width: 100%;
    height: 100%;
    object-fit: scale-down;
    pointer-events: none;
}

#image-modal h1 {
    font-size: 5em;
    font-weight: 900;
    margin: 1.75em .5em;
    padding: .25em;
    width: .5em;
    height: .5em;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
    transition: .1s background-color, .1s box-shadow;
}

#image-modal h1:hover {
    /* border: .05em solid #000; */
    background-color: #0007;
    box-shadow: 0 0 .25em .25em #0007;
}
