figure {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    column-gap: 1em;
}

figcaption {
    text-align: justify;
    flex-basis: 0;
    flex-grow: 1;
}

img{
    flex-basis: 0;
    flex-grow: 3;
    flex-shrink: 1;
    max-width: 100em;
    min-width: 20em;
    max-height: 90vh;

    /* Allow images to grow and shrink */
    object-fit: contain;
}

figure:nth-child(even) {
    flex-direction: row;
}

figure:nth-child(odd) {
    flex-direction: row-reverse;
}

.image-stack {
    position: relative;
}

.image-stack img {
    display: block;
    width: 100%;
}

.image-stack .hidden {
    position: absolute;
    inset: 0;
    opacity: 0;
    animation: show-scp 300s infinite;
}

@keyframes show-scp {
    0%, 90% {
        opacity: 0;
    }

    90.001%, 99% {
        opacity: 1;
    }

    99.001%, 100% {
        opacity: 0;
    }
}
