* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    cursor: none;
}

/* The full-screen centered text container */
#centered-display {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%); /* Perfectly centers the element */
    font-family: 'Inter', sans-serif;
    background-color: rgb(255 255 255 / 0);
    color: #ffffff;
    mix-blend-mode: difference;
    font-size: 4rem;
    font-weight: 100;
    text-align: center;

    /* Hidden by default */
    opacity: 0;
    pointer-events: none; /* Prevents the text from blocking your mouse */
    transition: opacity 0.3s ease-in-out;
    z-index: 9998;
}

/* Class added via JS to make it appear */
#centered-display.show {
    opacity: 1;
}

/*----------- END -------------*/

body {
    font-family: 'Inter', sans-serif;
    text-transform: lowercase;
    background-color: #ffffff;
    color: #000000;
}

/* Top Bar Container */
.top-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 20px 30px;
    z-index: 2;
    pointer-events: auto;
    color: #ffffff;
    mix-blend-mode: difference;
}


/* Header / Logo Styling */
header {
    font-weight: 200;
    font-size: 16px;
    text-align: left;
    letter-spacing: 1px;
    line-height: 1;
    justify-self: start;
    transition: filter 0.5s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.5s ease;
}

/* Gallery Container */
.gallery {
    padding-top: 70px;
    padding-bottom: 70px;
    display: flex;
    flex-direction: column;
    width: 100%;
    margin: 0 auto;
    gap: 0; /* Height distance is 0 */
}

/* Image Container */
.item {
    width: 100%;
    max-width: 500px; /* Max dimension on desktop */
    margin-top: 0;
    margin-bottom: -10px; /* Ensures 0 height distance */
    transition: filter 0.5s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.5s ease;
}


.item img {
    width: 100%;
    height: auto;
    display: block;
}

/* Alternating Sides */
.right {
    align-self: flex-end;
}

.left {
    align-self: flex-start;
}

/* Random Width Spacing (Offsets) */
.w-1 { margin-right: 2%; }
.w-2 { margin-left: 4%; }
.w-3 { margin-right: 6%; }
.w-4 { margin-left: 8%; }
.w-5 { margin-right: 10%; }
.w-6 { margin-left: 12%; }
.w-7 { margin-right: 14%; }
.w-8 { margin-left: 15%; }
.w-9 { margin-right: 16%; }
.w-10 { margin-left: 8%; }
.w-11 { margin-right: 10%; }
.w-12 { margin-left: 12%; }




/*----------- GALLERY PAGE -------------*/

/* Back link, styled consistently with the header */
.back-link {
    font-weight: 200;
    font-size: 16px;
    text-decoration: none;
    letter-spacing: 1px;
    justify-self: end;
    line-height: 1;
    transition: opacity 0.3s ease;
    color: #ffffff;
}

.back-link:hover {
    opacity: 0.2;
}

/* Category title shown at the top of the gallery page */
.category-title {
    font-weight: 200;
    font-size: 16px;
    letter-spacing: 1px;
    text-align: center;
    justify-self: center;
    line-height: 1;
}

/* Clickable gallery items */
.gallery .item {
    cursor: none;
}

/*----------- LIGHTBOX MODAL -------------*/

.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.92);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-in-out;
    z-index: 3;
}

.lightbox.show {
    opacity: 1;
    visibility: visible;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

.lightbox-close {
    position: fixed;
    top: 20px;
    right: 30px;
    font-family: 'Inter', sans-serif;
    font-size: 2.5rem;
    font-weight: 200;
    color: #ffffff;
    line-height: 1;
}

body.lightbox-open {
    overflow: hidden;
}


/* HOVER IMAGE EFFECT */

.hover-item {
    overflow: hidden;
}

.hover-item img {
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.4s ease, filter 0.4s ease;
}

.hover-item:hover img {
    transform: scale(1.03);
}

/*--- END ---*/


.page-transition {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #ffffff; /* Match this to your site's background */
    z-index: 998; /* Just below the cursor */
    pointer-events: none; /* So you can click through it */
}


@media (max-width: 1400px){
    .item{
        margin-bottom: 40px;
    }
}


/* Responsiveness for smaller screens */
@media (max-width: 768px) {
    .top-bar {
        padding: 15px 20px;
    }

    header{
        font-size: 16px;
    }
    .category-title,
    .back-link {
        font-size: 16px;
    }

    .gallery {
        padding-top: 50px;
        padding-bottom: 50px;
    }

    .item {
        max-width: 85%; /* Scales down slightly to maintain offset visibility */
        margin-bottom: 20px;
        margin-left: 10%;
        margin-right: 10%;
    }

    #centered-display {
        font-size: 3rem;
    }
}