.contributors-gallery {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1rem;
    text-align: center;
    margin: 6rem 0 4rem 0;
}

.contributor-card {
    cursor: pointer;
    margin: 0;
    padding: 0;
}

.contributor-card img {
    display: block;
    width: 100%;
}

.contributor-card figcaption{
    padding-bottom: 0.25rem;
    transition: background 0.3s ease-in-out;
}

.contributor-card:hover figcaption {
    background: var(--color-gr);
    outline: black 1px solid;
    outline-offset: -1px;
}

.contributor-popup {
    position: fixed;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999;
    background: #ffffffae;
}

.contributor-popup.hidden {
    display: none;
}

.popup-content {
    padding: 2rem;
    max-width: 900px;
    height: calc(100% - 2rem);
    aspect-ratio: 1 / 1;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.3);
    border: 1px solid #9cc62a;
    overflow-y: scroll;
}


.bio a:hover {
    background: #fff;
}

.author-photo {
    margin: 2rem;
    margin-top: 3rem;
}

.author-photo img {
    width: 100%;
    margin: 0;
    padding: 0;
    display: block;
}

.author-photo figcaption {
    font-size: 0.8rem;
}

.appear {
    margin: 2rem 0;
}

.no-scroll {
    overflow: hidden;
}

.credit {
    width: 100%;
    max-width: 700px;
}

.credit h4 {
    margin: 0 0 -1rem 0;
}

.credit p i {
    font-style: normal;
    color: brown;
}

.credit img {
    margin-top: 0.5rem;
    padding-right: 1rem;
}


/* ------------------- mobile layout ------------------- */

@media (max-width: 768px) {
    .contributors-gallery {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    text-align: center;
    margin: 4rem 0 4rem 0;
    }

    .popup-content {
    padding: 1rem 0.5rem;
    margin: 0.5rem;
    width: 100%;
    height: 80%;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.3);
    overflow-y: scroll;
}

.author-photo {
    margin: 0;
}

}
