*,
*:before,
*:after {
    box-sizing: border-box;
    font-family: inherit;
    max-width: 100%;
}

main {
    width: 100%;
    max-width: 50rem;
    margin: 6rem auto;
    padding: 1rem;
}

.layout {
    display: grid;
    grid-template-columns: 100%;
    grid-template-rows: auto 1fr auto;
    min-height: 100vh;
}

img {
    width: 100%;
    max-width: 100%;
    height: auto;
}

.post {
    h1 {
        margin-bottom: 1rem;
    }

    .meta {
        font-size: 0.8rem;
        margin-bottom: 4rem;
    }

    img + h1 {
        margin-top: 1rem;
    }
}

li {
    margin-bottom: 0.25rem;
}

.posts-list {
    list-style-type: none;
    padding: 0;

    li {
        margin-bottom: 6rem;
    }

    img + h2 {
        margin-top: 1rem;
    }

    a {
        display: block;
    }
}

.post-cover {
    box-shadow: 5px 5px 1px rgba(0, 0, 0, 0.25);
}

.posts-list .publish-date {
    font-size: 0.8rem;
}

.post-title {
    margin-top: 1rem;
}

.excerpt {
    margin: 0;
}

.categories {
    flex-direction: column;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.categories a {
    background-color: var(--lightAccent);
    padding: .5rem 0.75rem;
    text-transform: uppercase;
    font-family: var(--primaryFont);
    font-weight: bold;
}

.post-footer__categories {
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.post-footer li {
    display: inline-block;
    font-size: 0.8rem;
}

.post-footer a {
    background-color: var(--lightAccent);
    padding: .5rem 0.75rem;
    text-transform: uppercase;
    font-family: var(--primaryFont);
    font-weight: bold;
}

a.icon-link {
    position: relative;
}

img.icon-link {
    white-space: nowrap;
    fill: currentColor;
    position: relative;
    min-height: 100%;
    height: 0.8rem;
    width: 0.8rem;
    aspect-ratio: 1;
    margin: 0.1rem 0 0.1rem 0.1rem;
    opacity: 0.25;
    transition: opacity .2s;
}

@media (min-width: 48rem) {
    img.icon-link {
        margin-left: 0.2rem;
    }
}

a.icon-link:hover img.icon-link {
    opacity: 1;
}

.photobook-thumbnail {
    position: absolute;
    width: 15vmin;
    border: white 5px solid;
    filter: drop-shadow(0.5vmin 0.5vmin 0.25vmin black) sepia(50%);
}

.photobook-container {
    height: 20vmin;
    position: relative;
}

.photobook-button {
    position: relative;
    left: calc(100% - 20vmin);
    top: calc(50% - 4vmin);
    width: 20vmin;
    height: 8vmin;
    border: 3px solid var(--darkerAccent);
    background: linear-gradient(to bottom, var(--darkAccent), var(--lightAccent));
    color: var(--darker);
    font-size: 4vmin;
    white-space: nowrap;
    padding: 0;
    z-index: 2;
}

.photobook-image-count {
    position: absolute;
    font-size: 2rem;
    top: calc(50% - 1.5rem);
    width: 100%;
    height: 3rem;
    margin: 0;
    text-align: center;
    left: 0;
}

.photobook-button:active {
    background: linear-gradient(to bottom, var(--lightAccent), var(--darkAccent));
}

.photobook-viewer-container {
    position: fixed;
    width: 100%;
    height: 100%;
    z-index: 6;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    overflow: auto;
    background: var(--darker);
}

.photobook-viewer-button {
    position: absolute;
    color: var(--accent);
    background: none;
    height: calc(100%);
    width: 4rem;
    padding: 0;
    font-size: 2rem;
    margin: 0;
    z-index: 2;
    top: 0;
    border: none;

    @media screen and (max-height: 36rem), screen and (max-width: 36rem) {
        width: 2rem;
    }
}

.photobook-viewer-back {
    left: 0;
}

.photobook-viewer-forward {
    right: 0;
}

.photobook-viewer-exit {
    right: 1rem;
    top: 1rem;
    width: 3rem;
    height: 3rem;
    text-shadow: 1px 1px 2px var(--slate);
}

.photobook-viewer-slide-container {
    position: relative;
    max-width: 100vw;
    max-height: 100vh;
    color: initial;
    opacity: initial;
    margin: 1rem 0;
    flex: 0 0 100vw;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.photobook-viewer-image {
    max-width: calc(100vw - 2rem);
    max-height: calc(100vh - 5rem);
    display: block;
    width: auto;
    height: auto;
}

.photobook-viewer-caption {
    color: var(--accent);
    margin-top: 0.5rem;
    margin-bottom: 0;
    max-height: 10rem;
    min-width: 100%;
    width: 0;
    font-size: 1rem;
    flex: 0 1 auto;

    @media screen and (max-height: 36rem), screen and (max-width: 36rem) {
        font-size: 0.6rem;
    }
}

.photobook-viewer-button-svg {
    display: block;
    box-sizing: content-box;
    transform: translateY(2px);
}

.embla {
    position: absolute;
    width: 100vw;
    height: 100vh;
    overflow: clip;
}

.embla-container {
    position: absolute;
    height: 100vh;
    width: 100vw;
    display: flex;
    flex-direction: row;
}

.photobook-viewer-image-container-inset {
    display: inline-block;
    position: relative;
    flex: 1 1 auto;
}

.photobook-viewer-image-container {
    max-height: calc(100vh - 2rem);
    display: flex;
    flex-direction: column;
}

.post-excerpt {
    margin: 0;
    transform: translateY(-1rem);
}

.gallery-item {
    border: white 5px solid;
    filter: drop-shadow(0.5vmin 0.5vmin 0.25vmin black) sepia(50%);
}

.gallery-link {
    background: transparent;
    border: none;
}