body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    margin: 0;
    padding: 2rem;
    text-align: left;
    background-color: #fff;
    color: #1a1a1a;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 350;
    letter-spacing: 0.02rem;
    margin-bottom: 0.5rem;
    text-transform: lowercase;
}

nav {
    margin-bottom: 4rem;
}

nav a {
    margin-right: 25px;
    text-decoration: none;
    color: #666;
    font-size: 1rem;
    font-weight: 500;
}

/* Photo Gallery */
.gallery {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 5px;
    width: 100%;
    margin: 4rem auto;
}

.gallery img {
    display: block;
    width: 100%;
    object-fit: cover;
    object-position: center;
    cursor: pointer;
    opacity: 0;
    animation: fadeIn 1.5s ease forwards;
    transition: transform 0.3s ease;
}

.gallery img.portrait {
    aspect-ratio: 2/3;
    grid-row: span 2;
    align-self: start;
}

/* height: 100% resolves to the grid row track height without contributing to
   its sizing, so rows are driven purely by the portrait's aspect-ratio.
   Result: landscape_height = (portrait_height - 5px) / 2, satisfying
   2 × landscape_height + 5px gap = portrait_height. */
.gallery img.landscape {
    height: 100%;
    min-height: 0;
}

.gallery img:hover {
    transform: scale(1.02);
}

@keyframes fadeIn {
    to { opacity: 1; }
}

@media (max-width: 1024px) {
    .gallery {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .gallery {
        grid-template-columns: 1fr;
    }

    .gallery img.portrait {
        grid-row: span 1;
    }

    .gallery img.landscape {
        aspect-ratio: 3/2;
    }
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    align-items: center;
    justify-content: center;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 40px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: 300;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-btn:hover {
    color: #999;
}
