* {
    box-sizing: border-box;
}

html {
  scrollbar-gutter: stable;
}

body {
    margin: 0;
    display: grid;
    grid-template-columns: 1fr min(1300px, 100%) 1fr;
    font-family: 'Courier New', Courier, monospace;
    background-color: #FFFAFA;
}

body > * {
    grid-column: 2;
    padding: 16px;
}

.email {
    color: inherit;
    font-weight: bold;
}

/* Header */
.site-header {
    grid-column: 1 / -1;
    margin: 0 0 32px;
    background: rgba(255,250,250, 0.75);
    border-bottom: 1px solid rgba(0, 0, 0, 0.18);

    position: sticky;
    top: 0;
    backdrop-filter: blur(6px);
}

.inner-header {
    max-width: 1300px;
    padding: 0 16px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.site-title {
    white-space: nowrap;
    font-family: inherit;
    text-decoration: none;
    color: #111;
    font-size: clamp(1rem, 3vw, 2.2rem);
    font-weight: 525;
    line-height: 2;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 32px;
}

.site-nav a,
.text {
    font-family: inherit;
    text-decoration: none;
    color: #111;
    font-size: 1.1em;
    font-weight: 500;
    margin: 6px 0;
}

.site-nav a {
    border-bottom: 1px solid transparent;
}

.site-nav a:hover {
    border-bottom-color: rgba(0, 0, 0, 0.45);
}

.site-nav a[aria-current="page"] {
    border-bottom-color: rgba(0, 0, 0, 0.9);
}

.instagram svg {
    width: 22px;
    height: 22px;
}

/* Media */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

figure {
    margin: 0;
}

figcaption:empty {
    display: none;
}

/* Works */
.works {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 28px;
    margin: 0 0 32px;
}

.works img {
    cursor: zoom-in;
}

.same-line {
    display: flex;
    justify-content: center;
    gap: 28px;
    width: 100%;
}

.grouped-up {
    width: 100%;
    max-width: 100%;
    column-width: 320px;
    column-gap: 28px;
    margin: 0 auto;
}

.grouped-up figure {
    break-inside: avoid;
    margin: 0 0 28px;
}

.grouped-up figure:last-child {
    margin: 0;
}

.row-gap {
    margin-bottom: 64px;
}

/* Lightbox */
.lightbox[open] {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100vh;
    border: none;
    background: transparent;
    overflow: hidden;
}

.lightbox:focus,
.lightbox:focus-visible {
    outline: none;
    box-shadow: none;
}

.lightbox::backdrop {
    background: rgba(255,250,250, 0.9);
}

.lightbox-img {
    display: block;
    width: auto;
    height: auto;
    padding: 48px;
    max-width: min(1500px, calc(100vw - 48px));
    max-height: calc(100vh - 96px);
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: fixed;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 14px;
    border-radius: 999px;
    color: #000;
}

.lightbox-close {
    top: 16px;
    right: 16px;
}

.lightbox-prev,
.lightbox-next {
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-prev {
    left: 16px;
}

.lightbox-next {
    right: 16px;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
    opacity: 0.50;
}

.lightbox-close svg,
.lightbox-prev svg,
.lightbox-next svg {
    display: block;
    width: 32px;
    height: 32px;
}

body.no-scroll {
    overflow: hidden;
}

.works img,
.lightbox-img {
    -webkit-user-select: none;
    user-select: none;
    -webkit-user-drag: none;
}

@media (max-width: 720px) {
    .inner-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .same-line {
        flex-direction: column;
        align-items: center;
    }

    .grouped-up {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .lightbox-img {
        padding: 0px;
    }

    .lightbox-prev,
    .lightbox-next {
        top: auto;
        bottom: 16px;
        transform: none;
    }
}
