@keyframes flash {
    0% {
        filter: brightness(1);
    }

    20% {
        filter: brightness(2);
    }

    100% {
        filter: brightness(1);
    }
}

:root {
    --background: rgb(43, 42, 30);
    --color: silver;
    --accent: rgb(221, 202, 28);
    --link: var(--accent);
    --padding: 1rem;
}

body {
    background: var(--background);
    color: var(--color);
    width: 100%;
    height: 100%;
    padding: var(--padding);
}

.focus {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--accent);
    z-index: 80;
    user-select: none;
    visibility: hidden;
    cursor: zoom-out;
}

.focus.show {
    visibility: visible;
}

button {
    background: transparent;
    border-radius: 0;
}

a {
    color: var(--link);
}

h1,
h2 {
    font-size: 4rem;
    line-height: 0.8;
    font-weight: normal;
    font-family: var(--font-secondary);
    text-align: center;
    color: var(--accent);
    text-transform: uppercase;
    margin-bottom: 3rem;
}

/* Header */
header {
    position: fixed;
    z-index: 99;
    left: 0;
    bottom: 1rem;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    width: 100%;
    gap: 2rem 3rem;
    font-size: 2rem;
    color: var(--accent);
    text-transform: uppercase;
    align-items: center;
    text-shadow: 1px 1px 0 var(--background);
    padding: 0 1rem;
}

header h1 {
    margin: 0;
    text-align: center;
}

header a {
    border: 1px dashed var(--link);
    padding: 0.5rem 1rem;
}

header a.current {
    border-style: solid;
    text-decoration: none;
}

/* Content */
article {
    margin: 0 auto 10rem;
    max-width: 600px;
}

table {
    text-align: left;
    border: 0;
    border-collapse: collapse;
}

table th {
    padding: 0.5rem;
    font-weight: normal;
    color: var(--accent);
}

table td {
    padding: 0.5rem;
    border: 0;
    border-bottom: 1px dotted var(--color);
}

table td.artist {
    font-family: var(--font-secondary);
    font-style: italic;
    width: 30%;
}

/* Film roll */
.roll {
    position: relative;
    left: 20%;
    display: flex;
    align-items: center;
    column-gap: 3rem;
    flex-wrap: nowrap;
    height: calc(100% - var(--padding) * 2);
}

.roll .spacer {
    padding: 20%;
}

figure.image {
    transition: 0.1s transform linear;
    border: 0;
    color: var(--color);
    cursor: crosshair;
    min-width: 30%;
    max-width: 1000px;
    position: relative;
    text-align: center;
}

figure.image.focused {
    transform: rotate(0deg) !important;
    z-index: 90;
    color: var(--background);
}

figure.image img {
    width: 100%;
    max-height: 60vh;
    object-fit: contain;
}

figure.image img.lozad {
    filter: brightness(0.3);
}

figure.image img.lozad[data-loaded=true] {
    filter: brightness(1);
    height: auto;
    transition: filter 1s ease 0.25s;
}

figure.image.focused img.lozad {
    animation: flash 1s linear;
    filter: brightness(1);
    transition: none;
}

figcaption {
    font-size: 0.8rem;
}

figcaption p.caption {
    background: var(--background);
    color: var(--color);
    display: inline;
    visibility: hidden;
    opacity: 0;
    transition: 0.2s all ease;
}

figcaption p.caption.show {
    opacity: 1;
    visibility: visible;
}

figcaption .filename {
    font-family: monospace;
}

/* Video */
.video-container {
    max-width: 90%;
    margin: 0 auto 3rem;
}

/* Breakpoints */
@media screen and (max-width: 1024px) {
    header {
        font-size: 1.5rem;
    }

    .roll {
        left: 5%;
        column-gap: 1rem; 
    }
}

@media screen and (orientation: portrait) {
    header {
        grid-template-columns: 1fr 1fr;
    }

    h1,
    h2 {
        font-size: 3rem;
    }

    header h1 {
        grid-column: 1 / span 2;
        grid-row-start: 1;
    }

    figure.image {
        min-width: 80%;
        max-width: 1000px;
    }

    img {
        max-height: 50vh;
    }

    .video-container {
        max-width: none;
        margin: 0 auto 1rem;
    }
}

@media screen and (orientation: portrait) and (max-width: 500px) {
    header {
        font-size: 0.8rem;
    }
}