/* Gallery: photos as outlined prints with a hard shadow, alternating left and right, slightly tilted */

main {
    width: calc(100% - 2 * var(--gutter));
    padding-bottom: 64px;
}

.gallery {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: clamp(32px, 5vw, 56px);
    padding: clamp(32px, 4vw, 48px) clamp(0px, 8vw, 120px) 0;
    box-sizing: border-box;
}

.photo {
    width: fit-content;
    max-width: 100%;
    margin: 0;
    padding: clamp(10px, 1.5vw, 16px) clamp(10px, 1.5vw, 16px) 0;
    box-sizing: border-box;
    border: var(--line) solid var(--ink);
    border-radius: var(--radius);
    background-color: #FFFFFF;  /* a white print in both themes */
    box-shadow: var(--shadow) var(--shadow) 0 var(--ink);
    transition: rotate 0.15s, translate 0.08s, box-shadow 0.08s;
}

.photo:nth-child(odd) {
    align-self: flex-start;
    rotate: -1.5deg;
}

.photo:nth-child(even) {
    align-self: flex-end;
    rotate: 1.5deg;
}

@media (hover: hover) {
    .photo:hover {
        rotate: 0deg;
        translate: -3px -3px;
        box-shadow: calc(var(--shadow) + 4px) calc(var(--shadow) + 4px) 0 var(--ink);
    }
}

.photo img {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: min(640px, 70vh);
    border: 2px solid #111111;
}

.photo figcaption {
    padding: 10px 0 12px;
    color: #111111;
    font-family: var(--font-display);
    font-size: 26px;
    text-align: center;
}

/* Phones: every photo centred and as wide as the screen allows */
@media screen and (max-width: 600px) {
    .photo,
    .photo:nth-child(odd),
    .photo:nth-child(even) {
        align-self: center;
    }

    main {
        padding-bottom: 32px;
    }
}
