:root {
    --bg: #050607;
    --white: #f5f6f8;
}

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

html {
    background: var(--bg);
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    background: radial-gradient(
        circle at 50% -10%,
        #182028 0,
        #050607 34%,
        #030405 100%
    );
    color: var(--white);
    font-family: Arial, Helvetica, sans-serif;
    overflow-x: hidden;
}

/* HEADER */

header {
    height: 104px;
    padding: 0 45px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(3, 4, 5, 0.94);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(16px);
}

.logo {
    display: block;
    width: 490px;
    max-width: 56vw;
    height: auto;
    flex-shrink: 0;
    object-fit: contain;
    object-position: left center;
}

nav {
    display: flex;
    gap: 37px;
    align-items: center;
    flex-shrink: 0;
}

nav a {
    color: #f1f1f1;
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

nav a:hover {
    opacity: 0.7;
}

/* GALLERY FEED */

.feed {
    width: 100%;
    max-width: 1040px;
    margin: 0 auto;
    padding: 10px 18px 40px;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.gallery {
    position: relative;
    overflow: hidden;
    border: none;
    border-radius: 0;
    background: #101416;
    isolation: isolate;
}

/* BANNER PREVIEW (TOP EDGE ONLY) */

.gallery-banner {
    height: 125px;
    position: relative;
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    display: flex;
    align-items: flex-start;
    padding: 8px 20px;
    overflow: hidden;
}

.banner-logo-button {
    position: relative;
    z-index: 2;
    display: block;
    width: 340px;
    height: 72px;
    border: 0;
    padding: 0;
    margin: 0;
    background: transparent;
    cursor: pointer;
    text-align: left;
}

.banner-logo {
    display: block;
    width: 340px;
    height: auto;
    max-height: 72px;
    object-fit: contain;
    object-position: left top;
    pointer-events: none;
    user-select: none;
}

/* THUMBNAILS */

.thumbs-wrap {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 7px 10px 8px;
    background: linear-gradient(
        to bottom,
        transparent,
        rgba(0, 0, 0, 0.45)
    );
    overflow: hidden;
    z-index: 3;
}

.thumbs {
    display: flex;
    flex-wrap: nowrap;
    gap: 7px;
    overflow: hidden;
}

.thumbs .thumb {
    flex: 0 0 64px;
}

.thumb {
    position: relative;
    aspect-ratio: 3 / 4;
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 3px;
    overflow: hidden;
    cursor: pointer;
    background: #222;
    box-shadow: 0 2px 7px rgba(0, 0, 0, 0.5);
}

.thumb img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.thumb-index {
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    padding-top: 11px;
    text-align: center;
    font-size: 9px;
    font-weight: 700;
    text-shadow: 0 1px 3px #000;
    color: #fff;
    background: linear-gradient(
        transparent,
        rgba(0, 0, 0, 0.72)
    );
}

/* FULLSCREEN OVERLAY WITH FULL-HEIGHT BACKGROUND */

.overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(2, 4, 5, 0.97);
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    z-index: 300;
    display: none;
    overflow: auto;
}

.overlay.active {
    display: block;
}

.overlay-banner {
    height: 120px;
    position: relative;
    display: flex;
    align-items: flex-start;
    padding: 16px 28px;
    z-index: 1;
}

.overlay-banner .banner-logo-button {
    width: 430px;
    height: 90px;
}

.overlay-banner .banner-logo {
    width: 430px;
    height: auto;
    max-height: 90px;
}

.full-grid {
    padding: 24px 28px 40px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 14px;
    position: relative;
    z-index: 2;
}

.full-grid .thumb {
    width: 100%;
    aspect-ratio: 3 / 4;
}

/* LIGHTBOX */

.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.96);
    z-index: 500;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 35px;
}

.lightbox.active {
    display: flex;
}

.lightbox img {
    max-width: 94vw;
    max-height: 90vh;
    object-fit: contain;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 80px rgba(0, 0, 0, 0.8);
}

.lb-close {
    position: absolute;
    right: 24px;
    top: 15px;
    font-size: 40px;
    cursor: pointer;
}

/* RESPONSIVE MEDIA QUERIES */

@media (max-width: 800px) {
    header {
        height: 78px;
        padding: 0 18px;
    }

    .logo {
        width: 300px;
        max-width: 58vw;
    }

    nav {
        gap: 17px;
    }

    nav a {
        font-size: 10px;
    }

    .feed {
        padding: 7px 9px 28px;
    }

    .gallery-banner {
        height: 105px;
        padding: 7px 14px;
    }

    .thumbs {
        gap: 6px;
    }

    .thumbs .thumb {
        flex-basis: 56px;
    }

    .overlay-banner {
        height: 100px;
        padding: 10px 18px;
    }

    .full-grid {
        padding: 18px;
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .banner-logo-button {
        width: 300px;
        height: 64px;
    }

    .banner-logo {
        width: 300px;
        max-height: 64px;
    }

    .overlay-banner .banner-logo-button {
        width: 360px;
        height: 78px;
    }

    .overlay-banner .banner-logo {
        width: 360px;
        max-height: 78px;
    }
}

@media (max-width: 430px) {
    header {
        height: 70px;
        padding: 0 12px;
    }

    .logo {
        width: 240px;
        max-width: 58vw;
    }

    nav {
        gap: 8px;
    }

    nav a {
        font-size: 7px;
    }

    .gallery-banner {
        height: 90px;
        padding: 5px 11px;
    }

    .banner-logo-button {
        width: 250px;
        height: 56px;
    }

    .banner-logo {
        width: 250px;
        max-height: 56px;
    }

    .overlay-banner .banner-logo-button {
        width: 300px;
        height: 68px;
    }

    .overlay-banner .banner-logo {
        width: 300px;
        max-height: 68px;
    }

    .thumbs-wrap {
        padding: 5px 6px 6px;
    }

    .thumbs {
        gap: 5px;
    }

    .thumbs .thumb {
        flex-basis: 50px;
    }

    .overlay-banner {
        height: 80px;
        padding: 8px 16px;
    }

    .full-grid {
        padding: 14px;
        gap: 8px;
    }
}
