*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    background-color: #0c0c0c;
    color: #d4d4d4;
    font-family: 'Georgia', serif;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ── Top navigation ── */
.top-nav {
    display: flex;
    justify-content: center;
    gap: 3rem;
    padding: 2rem 0 1.5rem;
}

.top-nav a {
    font-size: 0.7rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: #555;
    text-decoration: none;
    transition: color 0.2s ease;
}

.top-nav a:hover,
.top-nav a.active {
    color: #d4d4d4;
}

/* ── Contact page ── */
.contact-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 6rem);
    gap: 2rem;
}

.contact-photo {
    width: 260px;
    height: 260px;
    object-fit: cover;
    border-radius: 50%;
    filter: brightness(0.85) saturate(0.9);
}

.contact-instagram {
    font-size: 0.7rem;
    letter-spacing: 0.3em;
    text-transform: lowercase;
    color: #555;
    text-decoration: none;
    transition: color 0.2s ease;
}

.contact-instagram:hover {
    color: #d4d4d4;
}

/* ── Gallery header ── */
.gallery-header {
    padding: 3rem 2rem 1.5rem;
    text-align: center;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    font-size: 0.75rem;
    color: #555;
}

/* ── Masonry grid ── */
.gallery {
    columns: 3 280px;
    column-gap: 6px;
    padding: 6px;
    max-width: 1800px;
    margin: 0 auto;
}

.photo-item {
    break-inside: avoid;
    position: relative;
    display: block;
    margin-bottom: 6px;
    overflow: hidden;
    cursor: pointer;
    background: #111;
}

.photo-item img {
    display: block;
    width: 100%;
    height: auto;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                filter 0.6s ease;
    filter: brightness(0.85) saturate(0.9);
}

.photo-item:hover img {
    transform: scale(1.03);
    filter: brightness(1) saturate(1.1);
}

/* ── Overlay title ── */
.photo-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem 1rem 0.9rem;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.65));
    opacity: 0;
    transition: opacity 0.4s ease;
    display: flex;
    align-items: flex-end;
}

.photo-item:hover .photo-overlay {
    opacity: 1;
}

.photo-title {
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.7);
}

/* ── Lightbox ── */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    cursor: pointer;
    animation: fadeIn 0.25s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    cursor: default;
    animation: scaleIn 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@keyframes scaleIn {
    from { transform: scale(0.94); opacity: 0; }
    to   { transform: scale(1);    opacity: 1; }
}

.lightbox-content img {
    display: block;
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.8);
}

.lightbox-title {
    margin-top: 1rem;
    text-align: center;
    font-size: 0.7rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.35);
}

.lightbox-close {
    position: absolute;
    top: -2.5rem;
    right: 0;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    font-size: 1.1rem;
    cursor: pointer;
    line-height: 1;
    padding: 0.25rem;
    transition: color 0.2s ease;
}

.lightbox-close:hover {
    color: rgba(255, 255, 255, 0.9);
}

/* ── Responsive ── */
@media (max-width: 600px) {
    .gallery {
        columns: 2 140px;
        column-gap: 4px;
        padding: 4px;
    }

    .photo-item {
        margin-bottom: 4px;
    }
}
