/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600&display=swap');

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

body {
    font-family: 'Inter', sans-serif;
    background-color: #FFFFFF;
    color: #888888;
    line-height: 1.5;
}

a {
    color: #888888;
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: #555555;
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
}

header nav a {
    margin-left: 30px;
    font-weight: 600;
}

/* Footer */
footer {
    text-align: center;
    padding: 20px;
    font-size: 0.9rem;
    color: #888888;
}

/* Gallery Grid */
.gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 4 columns desktop */
    gap: 20px;
    padding: 40px;
    padding-top: 80px; /* extra space above gallery */
}

@media (max-width: 900px) {
    .gallery {
        grid-template-columns: repeat(2, 1fr); /* 2 columns for tablets */
        padding-top: 60px; /* slightly less space above gallery */
    }
}

@media (max-width: 600px) {
    .gallery {
        grid-template-columns: 1fr; /* 1 column for mobile */
        padding-top: 40px; /* reduce top space on small screens */
        padding-left: 20px;
        padding-right: 20px;
        padding-bottom: 20px;
    }
}

.artwork img {
    width: 100%;
    height: auto;
    cursor: pointer;
    display: block;
}

/* Lightbox */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.85);
    display: none;
    flex-direction: column; /* stack image and caption */
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 20px;
}

.lightbox img {
    max-width: 90%;
    max-height: 80%;
}

.lightbox .caption {
    margin-top: 15px;
    color: #FFFFFF;
    text-align: center;
    font-size: 0.9rem; /* smaller caption */
    color: #ccc; /* light grey tone */
}

/* Close button */
.lightbox .close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 2rem;
    color: #FFFFFF;
    cursor: pointer;
}

/* Arrows */
.lightbox .prev,
.lightbox .next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2rem;
    color: #FFFFFF;
    cursor: pointer;
    user-select: none;
    padding: 10px;
}

.lightbox .prev {
    left: 30px;
}

.lightbox .next {
    right: 30px;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    header {
        flex-direction: column;
        align-items: flex-start;
    }

    header nav {
        margin-top: 10px;
    }

    .gallery {
        padding: 20px;
        gap: 15px;
    }
}

header .artist-name {
    font-size: 2rem;       /* desktop default */
    font-weight: 600;
}

@media (max-width: 900px) {
    header .artist-name {
        font-size: 1.7rem; /* slightly smaller on tablets */
    }
}

@media (max-width: 600px) {
    header .artist-name {
        font-size: 1.5rem; /* smaller on mobile */
    }
}


html, body {
    height: 100%;
    margin: 0;
}

/* Make body a flex container */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Main content grows to fill space */
main {
    flex: 1;
}

/* Footer stays at the bottom */
footer {
    text-align: center;
    padding: 20px;
    font-size: 0.9rem;
    color: #555555;
}

/* ----------------------------------------- */
/* INDEX PAGE STYLES */
/* ----------------------------------------- */

.index-main {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: flex-start; /* image starts near the top */
    overflow: auto; /* allow scrolling if image is taller */
    padding: 0 40px; /* same horizontal margin as gallery */
	padding-top: 20px;
}

.index-image {
    width: 100%;
    height: auto;
    max-width: none;
    object-fit: cover;
    display: block;
    margin: 0 auto;
    cursor: pointer;
}
.index-image:hover {
    opacity: 0.95;
}

/* Responsive adjustments */
@media (max-width: 900px) {
    .index-image {
        height: 80vh;
        max-width: 100vw;
    }
}

@media (max-width: 600px) {
    .index-image {
        height: 75vh;
        max-width: 100vw;
    }
}

/* Larger screen adjustment (for wide desktops) */
@media (min-width: 1800px) {
    .index-main {
        display: flex;
        justify-content: center; /* keeps it centered horizontally */
        align-items: flex-start;
    }

    .index-image {
        max-width: 1600px; /* limit image width */
        width: 100%;
        height: auto;
        margin: 0 auto; /* ensures true centering */
    }
}
    .index-main {
        justify-content: center; /* keep it nicely centered */
    }
}

/* ----------------------------------------- */
/* GALLERY SECTIONS WITH YEAR LABELS — FIXED ALIGNMENT */
/* ----------------------------------------- */

.gallery-section {
    display: flex;
    align-items: flex-start;
    gap: 30px;
    margin-top: 180px; /* more space between sections */
    padding: 0;
}
.gallery-year {
    font-size: 1.1rem;
    color: #666;
    font-weight: 500;
    line-height: 1.5;
    padding-left: 40px;
    margin-top: -10px;  /* lifts year label slightly closer to header */
    margin-bottom: 15px; /* adds small gap below year before gallery */
}


.gallery-section .gallery {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    padding: 0 40px 0 40px; /* restored left + right padding */
    box-sizing: border-box;
}

/* Responsive layout */
@media (max-width: 900px) {
    .gallery-section {
        flex-direction: column;
        gap: 10px;
        margin-top: 80px;
        padding: 0 30px;
    }

    .gallery-year {
        padding-left: 0;
        font-size: 1rem;
        min-width: auto;
    }

    .gallery-section .gallery {
        grid-template-columns: repeat(2, 1fr);
        padding: 0;
    }
}

@media (max-width: 600px) {
    .gallery-section {
        margin-top: 60px;
        padding: 0 20px;
    }

    .gallery-section .gallery {
        grid-template-columns: 1fr;
    }

    .gallery-year {
        font-size: 0.95rem;
    }
}
/* Extra space between header and first gallery */
.gallery-section:first-of-type {
    margin-top: 80px; /* adjust this value as you like */
}

@media (max-width: 900px) {
    .gallery-section {
        margin-top: 90px;
    }
    .gallery-year {
        margin-top: 0;
        margin-bottom: 10px;
    }
}

.gallery-section + .gallery-section {
    margin-top: 180px; /* applies only when a gallery follows another gallery */
}
.lightbox img[src*="poliisi.jpg"] {
    max-width: 100%;
    max-height: 95%;
}
