/* =========================
   RESET
   ========================= */

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

img {
    width: 100%;
    height: auto;
    display: block;
}

body {
    background: #000;
    color: #fff;
    font-family: 'Inter', sans-serif;
    -webkit-font-smoothing: antialiased;
    line-height: 1.6;
    overflow-x: hidden;
}


/* =========================
   HEADER (Mobile First)
   ========================= */

header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: clamp(15px, 4vw, 30px);
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid #1a1a1a;
}

.logo img {
    height: clamp(32px, 5vw, 48px);
}

nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: clamp(10px, 3vw, 30px);
}

nav a {
    color: #777;
    text-decoration: none;
    font-size: clamp(0.65rem, 1.2vw, 0.85rem);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s ease;
}

nav a:hover {
    color: #fff;
}


/* Desktop Header */
@media (min-width: 768px) {
    header {
        flex-direction: row;
        justify-content: space-between;
    }
}


/* =========================
   PAGE HEADER
   ========================= */

.gallery-header {
    text-align: center;
    padding: clamp(60px, 8vw, 120px) clamp(20px, 6vw, 120px) 40px;
}

.gallery-header h1 {
    font-size: clamp(1.8rem, 6vw, 4rem);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -2px;
}

.gallery-header p {
    margin-top: 10px;
    color: #777;
}

.back-btn {
    display: inline-block;
    margin-top: 20px;
    color: #fff;
    text-decoration: none;
    font-size: clamp(0.8rem, 1.1vw, 0.95rem);
    padding: 8px 16px;
    border: 1px solid #1a1a1a;
    transition: 0.3s ease;
}

.back-btn:hover {
    border-color: #fff;
    background: rgba(255, 255, 255, 0.05);
}


/* =========================
   GALLERY SECTION
   ========================= */

.gallery-section {
    padding: clamp(60px, 8vw, 120px) clamp(20px, 6vw, 120px) 40px;
}

.gallery-section h2 {
    font-size: clamp(1.8rem, 6vw, 3rem);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -2px;
    text-align: center;
    margin-bottom: clamp(30px, 5vw, 80px);
}


/* =========================
   BENTO GRID (Ultra Responsive)
   ========================= */

.bento-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(clamp(180px, 25vw, 320px), 1fr));
    grid-auto-rows: clamp(180px, 25vw, 320px);
    grid-auto-flow: dense;
    gap: clamp(10px, 2vw, 20px);
    padding: 0 clamp(20px, 6vw, 120px) clamp(80px, 12vw, 140px);
    max-width: 1800px;
    margin: 0 auto;
}

.grid-item {
    position: relative;
    overflow: hidden;
    border: 1px solid #1a1a1a;
    background: #111;
}

.grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%);
    transition: transform 0.7s cubic-bezier(0.25, 1, 0.5, 1),
                filter 0.5s ease;
}

.grid-item:hover img {
    filter: grayscale(0%);
    transform: scale(1.08);
}

/* Special Sizes */
.grid-item.big {
    grid-column: span 2;
    grid-row: span 2;
}

.grid-item.tall {
    grid-row: span 2;
}

.grid-item.wide {
    grid-column: span 2;
}

/* Smart Mobile Control */
@media (max-width: 600px) {

    .bento-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        grid-auto-rows: 180px;
    }

    .grid-item.big,
    .grid-item.wide,
    .grid-item.tall {
        grid-column: span 1;
        grid-row: span 1;
    }
}

@media (max-width: 400px) {
    .bento-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: 240px;
    }
}


/* =========================
   LIGHTBOX
   ========================= */

#lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.95);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    padding: 20px;
}

#lightbox img {
    max-width: 95%;
    max-height: 90%;
    border-radius: 12px;
    box-shadow: 0 0 40px rgba(255,255,255,0.08);
    animation: fadeIn 0.4s ease;
}

.close-lightbox {
    position: absolute;
    top: clamp(20px, 4vw, 40px);
    right: clamp(20px, 4vw, 40px);
    font-size: clamp(30px, 5vw, 50px);
    color: #fff;
    cursor: pointer;
    transition: 0.3s ease;
}

.close-lightbox:hover {
    color: #ffcc00;
}

/* Make close button a clean X with no background or default button styles */
.close-lightbox {
    background: transparent;
    border: none;
    padding: 0;
    line-height: 1;
    width: auto;
    height: auto;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.close-lightbox:focus {
    outline: none;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

/* Lightbox download button */
#lightbox .download-btn {
    position: absolute;
    top: clamp(20px, 4vw, 40px);
    left: clamp(20px, 4vw, 40px);
    background: #fff;
    color: #000;
    padding: 10px 14px;
    border-radius: 8px;
    font-weight: 700;
    text-decoration: none;
    display: inline-block;
    z-index: 10000;
}

/* Thumbnail small download overlay */
.thumb-download {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(255,255,255,0.9);
    color: #000;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 900;
    box-shadow: 0 6px 18px rgba(0,0,0,0.6);
    z-index: 10;
}

.grid-item { position: relative; }


/* =========================
   FOOTER
   ========================= */

footer {
    border-top: 1px solid #1a1a1a;
    text-align: center;
    padding: clamp(60px, 8vw, 120px) clamp(20px, 6vw, 120px);
    font-size: clamp(0.65rem, 1vw, 0.8rem);
    color: #444;
    text-transform: uppercase;
    letter-spacing: 1px;
}