* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: #faf9f7;
    color: #222;
    font-family: Arial, Helvetica, sans-serif;
}

a {
    color: inherit;
    text-decoration: none;
}

.header {
    min-height: 76px;
    padding: 20px 5%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    border-bottom: 1px solid #e8e6e2;
    background: #fff;
}

.logo {
    font-size: 19px;
    font-weight: 700;
    letter-spacing: 2px;
}

.subtitle, .back-link {
    color: #777;
    font-size: 14px;
}

.container {
    width: min(1200px, 90%);
    margin: 0 auto;
}

.intro {
    padding: 48px 0 28px;
}

.intro h1, .photo-page h1 {
    margin: 0 0 10px;
    font-size: clamp(27px, 4vw, 38px);
}

.intro p {
    color: #777;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.gallery-item {
    min-width: 0;
}

.gallery-item img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    background: #eee;
    transition: opacity .2s;
}

.gallery-item:hover img {
    opacity: .85;
}

.gallery-item span {
    display: block;
    padding: 12px 0;
    overflow-wrap: anywhere;
    font-size: 14px;
}

footer {
    padding: 36px 5%;
    color: #888;
    text-align: center;
    font-size: 13px;
}

.photo-page {
    width: min(1100px, 92%);
    margin: 36px auto 60px;
}

.photo-page h1 {
    margin-bottom: 24px;
    overflow-wrap: anywhere;
    font-size: 24px;
}

.photo-frame {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
    padding: 20px;
    background: #171717;
}

.photo-frame img {
    display: block;
    max-width: 100%;
    max-height: 75vh;
    width: auto;
    height: auto;
    object-fit: contain;
}

.photo-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding-top: 22px;
    color: #666;
    font-size: 14px;
}

.photo-nav a:hover, .back-link:hover {
    color: #000;
}

@media (max-width: 700px) {
    .gallery {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }

    .header {
        padding: 18px 5%;
    }

    .logo {
        font-size: 16px;
    }

    .subtitle {
        display: none;
    }

    .intro {
        padding-top: 32px;
    }

    .photo-frame {
        padding: 8px;
    }

    .photo-frame img {
        max-height: 70vh;
    }
}
