:root {
    color-scheme: light;
    --page: #eceef0;
    --ink: #16191c;
    --ink-70: rgba(22, 25, 28, 0.7);
    --ink-55: rgba(22, 25, 28, 0.55);
    --hairline: rgba(22, 25, 28, 0.16);
    --accent: oklch(0.47 0.12 25);
}

* {
    box-sizing: border-box;
}

html {
    min-width: 320px;
    background: var(--page);
    color: var(--ink);
    font-family: "IBM Plex Sans", system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body {
    min-height: 100vh;
    margin: 0;
    background: var(--page);
}

a {
    color: inherit;
}

a:focus-visible {
    border-radius: 2px;
    outline: 2px solid var(--accent);
    outline-offset: 4px;
}

.home-page,
.home-inner {
    min-height: 100svh;
}

.home-mobile-portrait {
    display: none;
}

.home-inner {
    display: flex;
    width: 100%;
    max-width: 1360px;
    flex-direction: column;
    margin: 0 auto;
    padding: 88px 96px 40px;
}

.site-header {
    display: flex;
    align-items: baseline;
    gap: 24px;
}

.site-header-home {
    justify-content: flex-end;
}

.site-nav {
    display: flex;
    gap: 20px;
    color: var(--ink-70);
    font: 400 12px/1 "IBM Plex Mono", monospace;
}

.site-nav a,
.back-link {
    text-decoration: none;
    text-underline-offset: 0.32em;
}

.site-nav a:hover,
.site-nav a:focus-visible,
.back-link:hover,
.back-link:focus-visible {
    color: var(--ink);
}

.site-nav .current {
    color: var(--accent);
}

.home-main {
    display: grid;
    flex: 1;
    grid-template-columns: 5fr 3fr;
    align-items: center;
    gap: 72px;
}

.home-intro {
    max-width: 520px;
}

.home-intro h1,
.photos-title {
    font-family: "Newsreader", Georgia, serif;
    font-weight: 300;
    letter-spacing: -0.02em;
}

.home-intro h1 {
    margin: 0 0 24px;
    font-size: 58px;
    line-height: 1.02;
}

.home-intro p {
    max-width: 520px;
    margin: 0 0 16px;
    color: var(--ink-70);
    font-size: 18px;
    line-height: 1.6;
    text-wrap: pretty;
}

.home-intro p:last-child {
    margin-bottom: 0;
}

.accent-link {
    border-bottom: 1px solid oklch(0.47 0.12 25 / 0.35);
    color: var(--accent);
    text-decoration: none;
}

.accent-link:hover {
    border-bottom-color: var(--accent);
}

.home-desktop-portrait {
    display: block;
    width: min(100%, 384px);
    height: 448px;
    border-radius: 16px;
    justify-self: end;
    object-fit: cover;
    object-position: 50% 18%;
}

.footer-rule {
    height: 1px;
    margin-bottom: 20px;
    background: var(--hairline);
}

.footer-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 24px;
    color: var(--ink-55);
    font: 400 11px/1 "IBM Plex Mono", monospace;
    letter-spacing: 0.06em;
}

.photos-page {
    width: 100%;
    max-width: 1360px;
    min-height: 100svh;
    margin: 0 auto;
    padding: 88px 96px 40px;
}

.photos-header {
    justify-content: space-between;
}

.back-link {
    color: var(--ink-70);
    font: 400 11px/1 "IBM Plex Mono", monospace;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.photos-title {
    margin: 64px 0 40px;
    font-size: 48px;
    line-height: 1;
}

.photo-status {
    min-height: 240px;
    padding-top: 80px;
    color: var(--ink-55);
    font: 400 12px/1.6 "IBM Plex Mono", monospace;
    text-align: center;
}

.photo-status[hidden] {
    display: none;
}

.photo-status a {
    color: var(--accent);
    text-underline-offset: 0.25em;
}

.photo-gallery {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-rows: 1px;
    grid-auto-flow: row;
    column-gap: 16px;
    row-gap: 0;
}

.photo-frame {
    display: block;
    width: 100%;
    align-self: start;
    line-height: 0;
    overflow: hidden;
}

.photo-frame img {
    display: block;
    width: 100%;
    height: auto;
    background: rgba(22, 25, 28, 0.06);
    transition: opacity 180ms ease, transform 240ms ease;
}

.photo-frame:hover img {
    transform: scale(1.012);
}

.photo-frame img:not(.loaded) {
    opacity: 0;
}

.photos-footer {
    margin-top: 64px;
}

.pswp {
    --pswp-bg: #101113;
}

@media (prefers-reduced-motion: reduce) {
    .photo-frame img {
        transition: none;
    }

    .photo-frame:hover img {
        transform: none;
    }
}

@media (max-width: 899px) {
    .home-page {
        display: flex;
        flex-direction: column;
    }

    .home-mobile-portrait {
        display: block;
        width: 100%;
        height: clamp(460px, 125vw, 620px);
        flex: none;
        object-fit: cover;
        object-position: 50% 18%;
    }

    .home-inner {
        flex: 1;
        min-height: 432px;
        padding: 24px 28px 30px;
    }

    .site-nav {
        gap: 22px;
        font-size: 13px;
    }

    .home-main {
        display: block;
        flex: 1;
    }

    .home-intro {
        margin-top: 40px;
    }

    .home-intro h1 {
        margin-bottom: 16px;
        font-size: 40px;
    }

    .home-intro p {
        font-size: 17px;
    }

    .home-desktop-portrait {
        display: none;
    }

    .footer-domain {
        display: none;
    }

    .photos-page {
        padding: 36px 0 32px;
    }

    .photos-heading-wrap {
        padding: 0 28px;
    }

    .back-link {
        font-size: 12px;
    }

    .photos-title {
        margin: 48px 0 28px;
        font-size: 40px;
    }

    .photo-gallery {
        padding: 0 10px;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 10px;
    }

    .photos-footer {
        margin: 48px 28px 0;
    }
}

@media (max-width: 390px) {
    .home-inner,
    .photos-heading-wrap {
        padding-right: 22px;
        padding-left: 22px;
    }

    .site-nav {
        gap: 16px;
    }

    .photos-header {
        gap: 16px;
    }
}
