
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    background: #f6f6f6;
    color: #111;
}

.layout {
    display: flex;
    min-height: 100vh;
}

nav {
    width: 230px;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    padding: 32px 24px;
    background: #eeeeee;
    border-right: 1px solid #ccc;
    overflow-y: auto;
}

nav h1 {
    font-size: 20px;
    font-weight: bold;
    margin: 0 0 5px 0;
    line-height: 1.1;
    text-align: center;
}

nav h2 {
    font-size: 18px;
    font-weight: normal;
    margin: 0 0 32px 0;
    line-height: 1.1;
    text-align: center;
}

nav a {
    display: block;
    color: #111;
    text-decoration: none;
    font-size: 14px;
    margin-bottom: 14px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

nav a:hover {
    text-decoration: underline;
}

main {
    margin-left: 230px;
    width: calc(100% - 230px);
    padding: 48px 3vw 80px 3vw;
}

.category-section {
    margin-bottom: 90px;
    scroll-margin-top: 40px;
}

.category-section h2 {
    font-size: 28px;
    font-weight: normal;
    margin: 0 0 36px 0;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.items {
    display: flex;
    flex-direction: column;
    gap: 34px;
}

.portfolio-item {
    width: 100%;
    margin-bottom: 50px;
    display: flex;
    justify-content: center;
}

.media-frame {
    max-width: 90%;
}

.media-frame p {
    width: 100%;
    margin: 12px 0 0 0;
    font-size: 18px;
    line-height: 1.45;
    text-align: justify;
    color: #666;
}

.media-frame-single {
    display: inline-block;
}

.single-image {
    max-width: 100%;
    max-height: 78vh;
    width: auto;
    height: auto;
    display: block;
    margin: 0 auto;
    object-fit: contain;
}

video.single-image {
    width: 100%;
}

.media-frame-layout {
    width: min(90%, calc(var(--layout-ratio) * 72vh));
}

.image-layout {
    position: relative;
    width: 100%;
    aspect-ratio: var(--layout-ratio);
    max-height: 72vh;
}

.image-slot {
    position: absolute;
    overflow: hidden;
    background: #ddd;
}

.image-slot img,
.image-slot video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center;
}

.image-slot-anchor img,
.image-slot-anchor video {
    object-fit: contain;
}

@media (max-width: 800px) {
    .layout {
        display: block;
    }

    nav {
        position: static;
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #ccc;
    }

    main {
        margin-left: 0;
        width: 100%;
        padding: 32px 20px 60px 20px;
    }

    .media-frame-layout {
        width: 90%;
    }
}
