
html, body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
body {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.1rem;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}
footer {
    /* no position: fixed — normal flow */
    padding: 1rem;
    text-align: center;
    background: #f8f8f8;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 2rem;
    background: rgba(255, 255, 255, 0.8);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-sizing: border-box;
    backdrop-filter: blur(5px);
}

.site-title a {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    font-size: 1.25rem;
    margin: 0;
    line-height: 1.2;
    letter-spacing: 4px;
    text-decoration: none;
}

nav a {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    text-transform: uppercase;
    font-size: .8rem;
    letter-spacing: 1px;
    margin-left: 1.5rem;
    text-decoration: none;
    color: #333;
}

main {
    padding-top: 100px;
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 1rem;
    padding-right: 1rem;
    flex: 1;
}

main h1 {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    font-size: clamp(2rem, 5vw, 4rem);
    margin-bottom: 1rem;
    letter-spacing: 0.5px;
    line-height: 1.2;
    text-align: center;
}

.slideshow {
    position: relative;
    height: 100vh;
    overflow: hidden;
    width: 100%;
}

.slide {
    position: absolute;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    animation: kenburns 20s infinite;
    opacity: 0;
}

.slide:nth-child(1) { animation-delay: 0s; }
.slide:nth-child(2) { animation-delay: 10s; }
.slide:nth-child(3) { animation-delay: 20s; }

@keyframes kenburns {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 1; }
    100% { transform: scale(1); opacity: 0; }
}

.gallery-item {
    display: inline-block;
    position: relative;
    text-align: center;
}

.gallery-item img {
    height: 300px;
    width: auto;
    /*width: 100%;
    height: auto;*/
    display: block;
    transition: transform 0.3s ease;
    border: none;
    margin: 5px;

}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-item .caption {
    position: absolute;
    bottom: 0px;
    left: 50%;
    width: 100%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 5px 5px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.gallery-item:hover .caption {
    opacity: 1;
}




@media (max-width: 768px) {
    header {
        flex-direction: column;
        text-align: center;
    }
    nav a {
        display: block;
        margin: 0.5rem 0;
    }
    .gallery {
        grid-template-columns: 1fr;
        /*display: flex;*/
        flex-wrap: wrap;
        gap: 20px;
    }
    .slideshow {
        height: 60vh;
    }
}

.image-with-back {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: nowrap; /* desktop: inline */
}

.image-with-back img {
    max-width: 100%;
    height: auto;
}

.back-to-portfolio a {
    display: inline-block;
    padding: 8px;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.back-to-portfolio a:hover {
    transform: translateX(-3px);
    opacity: 0.7;
}


.image-with-back img {
    max-height: 80vh; /* 80% of viewport height */
    max-width: 90vw;  /* optional: don't go super wide */
    width: auto;
    height: auto;
    display: block;
    margin: 0 auto; /* center horizontally */
}


/* Responsive: on small screens, stack */
@media (max-width: 600px) {
    .image-with-back {
        flex-direction: column; /* now stack vertically */
        align-items: flex-start;
    }
}

button, .filters button {
    font-family: 'Montserrat', sans-serif;
    font-weight: 400;
    text-transform: uppercase;
    font-size: .85rem;
    letter-spacing: 1.25px;
    padding: 0.25rem 1.5rem;
    margin: 0.25rem, .5rem;
    border: 1.5px solid #7b737a;
    background-color: transparent;
    color: #7b737a;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 0; /* sharp edges */
}

button:hover, .filters button:hover {
    background-color: #7b737a;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.filters {
    text-align: center;
}



.gallery-item {
    flex: 1 1 auto;
    /*display: inline-block;          /* or block */
    flex-direction: row; /* optional, if you have caption below image */
    align-items: center;    /* keep image centered */
    text-align: center;
    overflow: hidden;       /* critical for collapse */
    transition:
        opacity 0.3s ease,
        transform 0.3s ease,
        max-height 0.4s ease,
        margin 0.4s ease;
    max-height: 300px;      /* same as image height */
}




.gallery-item.hide {
    opacity: 0;
    transform: scale(0.8);
    max-height: 0;
    margin: 0;
    display: absolute;
    max-width: 0;

}




.gallery-item {
    transform-origin: top center;
}







