/* --- 1. THEME VARIABLES --- */
        :root {
            /* Brand Identity Colors */
            --brand-navy: #022e47;
            --brand-cream: #FAF8F1;
            --brand-orange: #f68f1d;
            --brand-pink: #ea3b60;
            
            /* Default LIGHT Theme Mapping */
            --bg-body: var(--brand-cream);
            --text-main: var(--brand-navy);
            --text-muted: rgba(2, 46, 71, 0.7);
            --nav-bg-scrolled: rgba(250, 248, 241, 0.95);
            --nav-mobile-bg: #FAF8F1;
            --nav-mobile-shadow: rgba(0,0,0,0.1);
            
            /* Footer is always dark */
            --footer-bg: var(--brand-navy);
            
            --vf-grad: linear-gradient(135deg, var(--brand-orange) 0%, var(--brand-orange) 65%, var(--brand-pink) 100%);
            
            --font-display: 'Bakbak One', cursive;
            --font-body: 'Work Sans', sans-serif;
        }

        /* DARK THEME OVERRIDES */
        [data-theme="dark"] {
            --bg-body: #011a2a; 
            --text-main: #e6e6e6;
            --text-muted: rgba(255, 255, 255, 0.7);
            --nav-bg-scrolled: rgba(1, 26, 42, 0.95);
            --nav-mobile-bg: #022e47;
            --nav-mobile-shadow: rgba(0,0,0,0.4);
        }

        /* --- 2. GLOBAL STYLES --- */
        body {
            background-color: var(--bg-body);
            font-family: var(--font-body);
            color: var(--text-main);
            overflow-x: hidden;
            transition: background-color 0.3s ease, color 0.3s ease;
        }

        h1, h2, h3, h4, h5, h6 {
            font-family: var(--font-display);
            text-transform: uppercase;
            font-weight: 600;
        }

        .text-gradient {
            background: var(--vf-grad);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }
        
        /* --- 3. AMBIENT BACKGROUND --- */
        .ambient-light {
            position: fixed; top: 0; left: 0; width: 100%; height: 100vh;
            z-index: -1; pointer-events: none; overflow: hidden;
            background: var(--bg-body);
            transition: background-color 0.3s ease;
        }

        .orb {
            position: absolute; border-radius: 50%;
            filter: blur(80px); opacity: 0.5;
            animation: floatOrb 20s infinite ease-in-out;
        }

        .orb-1 { width: 100vw; height: 100vw; background: var(--brand-orange); top: -10%; left: -10%; opacity: 0.15;}
        .orb-2 { width: 30vw; height: 30vw; background: var(--brand-pink); bottom: 10%; right: -5%; animation-delay: -5s; opacity: 0.15;}
        .orb-3 { width: 60vw; height: 60vw; background: #ff5500; top: 40%; left: 40%; animation-delay: -10s; opacity: 0.1;}

        @keyframes floatOrb {
            0%, 100% { transform: translate(0, 0) scale(1); }
            50% { transform: translate(30px, -50px) scale(1.1); }
        }

        /* BRAND LOGO THEME ADAPTATION */
        .brand-logo { height: 70px; width: auto; object-fit: contain; }
        .logo-light { display: block; }
        .logo-dark { display: none; }
        html[data-theme="dark"] .logo-light { display: none; }
        html[data-theme="dark"] .logo-dark { display: block; }
        
        /* --- GALLERY SECTION STYLES --- */

/* --- GALLERY STYLING UPGRADES --- */

/* Brand & Typography Adjustments */
h1.display-4, .dump-title {
    font-family: var(--font-display);
    text-transform: uppercase;
    letter-spacing: -0.04em; /* Corresponds to Figma -40 letter-spacing */
}

.low-profile-text {
    font-family: var(--font-body);
    font-weight: 300;
    max-width: 480px;
}

[data-theme="dark"] .gallery-dock-container {
    background: rgba(1, 26, 42, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.dock-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.dock-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* Minimalist Filter Buttons */
.filter-btn {
    background: transparent;
    border: none;
    color: var(--text-main);
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 0.9rem;
    padding: 8px 18px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0.7;
}

.filter-btn:hover {
    opacity: 1;
    background: rgba(246, 143, 29, 0.1);
}

.filter-btn.active {
    opacity: 1;
    background: var(--vf-grad);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(246, 143, 29, 0.3);
}

/* Minimalist Search Box */
.search-box-minimal {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.04);
    border-radius: 20px;
    padding: 6px 16px;
    min-width: 240px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

[data-theme="dark"] .search-box-minimal {
    background: rgba(255, 255, 255, 0.05);
}

.search-box-minimal:focus-within {
    background: transparent;
    border-color: var(--brand-orange);
}

.search-icon {
    color: var(--brand-navy);
    opacity: 0.5;
    margin-right: 10px;
}

[data-theme="dark"] .search-icon {
    color: #ffffff;
}

.search-input {
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 0.9rem;
    width: 100%;
}

/* 2. The Photo Dump Asymmetric Grid */
.aesthetic-photo-grid {
    column-count: 4;
    column-gap: 24px;
    /* This is the magic property: It forces the browser to distribute 
       content evenly across all 4 columns, even if there are only a few items */
    column-fill: balance; 
    width: 100%;
    margin: 0 auto;
}

.grid-item {
    /* Critical strict breaks to prevent images from slicing in half */
    break-inside: avoid;
    -webkit-column-break-inside: avoid; /* Safari fallback */
    page-break-inside: avoid; /* Older browser fallback */
    
    margin-bottom: 24px;
    
    /* Switched from 'inline-block' to 'block'. 
       Inline-block can cause awkward wrapping that leaves columns empty. */
    display: block; 
    width: 100%;
    opacity: 1;
    transform: scale(1);
    transition: opacity 0.4s ease, transform 0.4s ease;
    animation: masonryFadeIn 0.5s ease-in-out;
}

/* --- RESPONSIVE COLUMN SCALING --- */
/* Ensures the columns gracefully step down so they don't get too thin */
@media (max-width: 1200px) {
    .aesthetic-photo-grid {
        column-count: 3;
    }
}

@media (max-width: 992px) {
    .aesthetic-photo-grid {
        column-count: 2;
        column-gap: 16px;
    }
    .grid-item {
        margin-bottom: 16px;
    }
}

@media (max-width: 576px) {
    .aesthetic-photo-grid {
        column-count: 1;
    }
}


/* Fluid image mapping to capture original size metrics safely */
.photo-wrapper {
    position: relative;
    width: 100%;
    height: auto; /* Allows natural asset heights to define metrics */
    border-radius: 16px;
    overflow: hidden;
    background-color: var(--brand-navy);
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
}

.dump-img {
    width: 100%;
    height: auto; /* Ensures aspect ratio remains completely un-cropped */
    display: block;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Complete responsive column scale mappings */
@media (max-width: 1200px) {
    .aesthetic-photo-grid {
        column-count: 3;
    }
}

@media (max-width: 768px) {
    .aesthetic-photo-grid {
        column-count: 2;
        column-gap: 16px;
    }
    .grid-item {
        margin-bottom: 16px;
    }
}

@media (max-width: 480px) {
    .aesthetic-photo-grid {
        column-count: 1;
    }
}

/* Hard filtering element termination */
.grid-item.is-hidden {
    display: none !important;
}

@keyframes masonryFadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}


/* --- EDITORIAL SPLIT HEADER (NO BOX) --- */

/* Pushes the content down safely past the fixed navbar from image_36ed49.jpg */
.archive-header-row {
    padding-top: 140px; 
    margin-bottom: 3.5rem !important;
}

/* Display Typography (Bakbak One) */
.archive-title {
    font-family: var(--font-display);
    text-transform: uppercase;
    letter-spacing: -0.04em; /* Prescribed -40 tracking */
    font-size: clamp(2.8rem, 5.5vw, 4.8rem);
    line-height: 0.95;
    margin-bottom: 0;
}

/* Elegant minimalist accent line next to the description */
.archive-text-edge {
    border-left: 3px solid var(--brand-pink);
    padding-left: 20px;
}

/* Body Typography (Work Sans) */
.archive-subtitle {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: clamp(1rem, 1.8vw, 1.1rem);
    line-height: 1.2;
    margin-bottom: 0;
}

/* Desktop spacing adjustment to balance the alignment */
@media (min-width: 992px) {
    .archive-subtitle {
        max-width: 400px;
    }
}

/* Safe padding to avoid navbar collision */
.archive-header-row {
    padding-top: 140px; 
    margin-bottom: 3.5rem !important;
}

/* Display Typography (Bakbak One) */
.archive-title {
    font-family: var(--font-display);
    text-transform: uppercase;
    letter-spacing: -0.04em; /* Prescribed -40 tracking */
    font-size: clamp(2.8rem, 5.5vw, 4.8rem);
    line-height: 0.95;
    margin-bottom: 0;
    
    /* LIGHT MODE: Explicitly forced to Brand Navy */
    color: var(--brand-navy);
    transition: color 0.3s ease;
}

/* DARK MODE OVERRIDE: Swaps to light color */
[data-theme="dark"] .archive-title {
    color: #e6e6e6; /* Inverted light value matching your theme variables */
}

/* --- 1. DOCK COMPONENT TOKEN INVERSION --- */
:root {
    /* DEFAULT LIGHT MODE: The Island is DARK Navy */
    --island-bg: rgba(2, 46, 71, 0.95);
    --island-border: rgba(2, 46, 71, 0.15);
    --island-text: var(--brand-cream);
    --island-text-muted: rgba(250, 248, 241, 0.6);
    --island-btn-hover: rgba(250, 248, 241, 0.1);
    --island-input-bg: rgba(250, 248, 241, 0.08);
    --island-shadow: 0 24px 48px -12px rgba(2, 46, 71, 0.25);
    --island-divider: rgba(250, 248, 241, 0.15);
}

[data-theme="dark"] {
    /* DARK MODE TOGGLED: The Island becomes LIGHT Cream */
    --island-bg: rgba(250, 248, 241, 0.95);
    --island-border: rgba(250, 248, 241, 0.1);
    --island-text: var(--brand-navy);
    --island-text-muted: rgba(2, 46, 71, 0.6);
    --island-btn-hover: rgba(2, 46, 71, 0.06);
    --island-input-bg: rgba(2, 46, 71, 0.05);
    --island-shadow: 0 24px 48px -12px rgba(0, 0, 0, 0.5);
    --island-divider: rgba(2, 46, 71, 0.15);
}

/* --- 2. LAYOUT & STRUCTURE --- */
.gallery-dock-container {
    width: 100%;
    display: flex;
    justify-content: center; /* Centers the tightly wrapped island */
    padding: 0 1rem;
    box-sizing: border-box;
    background: transparent !important; /* Forces the outer ghost shape to disappear */
    border: none !important;
}

.dock-wrapper {
    display: inline-flex; /* CRITICAL FIX: Forces the container to tightly hug its content */
    width: auto; /* Prevents the pill from stretching horizontally */
    align-items: center;
    background: var(--island-bg, #022E47); /* Replace hex with your exact navy var if needed */
    border: 1px solid rgba(255, 255, 255, 0.1); 
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 6px 12px 6px 6px; 
    border-radius: 100px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    max-width: 100%;
    gap: 1rem;
}
/* --- 3. FILTER BUTTONS --- */
.dock-buttons {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.filter-btn {
    background: transparent;
    border: none;
    outline: none;
    color: var(--island-text-muted);
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    padding: 0.6rem 1.1rem;
    border-radius: 100px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.25s ease;
}

.filter-btn:hover {
    color: var(--island-text);
    background: var(--island-btn-hover);
}

/* Active Gradient State */
.filter-btn.active {
    background: var(--vf-grad);
    color: #FFFFFF !important; /* Forces high legibility on the brand gradient */
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(246, 143, 29, 0.25);
}

.filter-btn:active {
    transform: scale(0.96);
}

/* --- 1. DOCK COMPONENT TOKEN INVERSION --- */
:root {
    /* DEFAULT LIGHT MODE: The Island is DARK Navy */
    --island-bg: rgba(2, 46, 71, 0.95);
    --island-border: rgba(2, 46, 71, 0.15);
    --island-text: var(--brand-cream);
    --island-text-muted: rgba(250, 248, 241, 0.6);
    --island-btn-hover: rgba(250, 248, 241, 0.1);
    --island-input-bg: rgba(250, 248, 241, 0.08);
    --island-shadow: 0 24px 48px -12px rgba(2, 46, 71, 0.25);
    --island-divider: rgba(250, 248, 241, 0.15);
}

[data-theme="dark"] {
    /* DARK MODE TOGGLED: The Island becomes LIGHT Cream */
    --island-bg: rgba(250, 248, 241, 0.95);
    --island-border: rgba(250, 248, 241, 0.1);
    --island-text: var(--brand-navy);
    --island-text-muted: rgba(2, 46, 71, 0.6);
    --island-btn-hover: rgba(2, 46, 71, 0.06);
    --island-input-bg: rgba(2, 46, 71, 0.05);
    --island-shadow: 0 24px 48px -12px rgba(0, 0, 0, 0.5);
    --island-divider: rgba(2, 46, 71, 0.15);
}

/* --- 2. LAYOUT & STRUCTURE --- */
.gallery-dock-container {
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 0 1rem;
    box-sizing: border-box;
}

.dock-wrapper {
    display: flex;
    align-items: center;
    background: var(--island-bg);
    border: 1px solid var(--island-border);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 0.5rem;
    border-radius: 100px;
    box-shadow: var(--island-shadow);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    max-width: 100%;
    gap: 0.75rem;
}

/* --- 3. FILTER BUTTONS --- */
.dock-buttons {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.filter-btn {
    background: transparent;
    border: none;
    outline: none;
    color: var(--island-text-muted);
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    padding: 0.6rem 1.1rem;
    border-radius: 100px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.25s ease;
}

.filter-btn:hover {
    color: var(--island-text);
    background: var(--island-btn-hover);
}

/* Active Gradient State */
.filter-btn.active {
    background: var(--vf-grad);
    color: #FFFFFF !important; /* Forces high legibility on the brand gradient */
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(246, 143, 29, 0.25);
}

.filter-btn:active {
    transform: scale(0.96);
}

/* --- 4. DOCK VISUAL DIVIDER --- */
.dock-divider {
    width: 1px;
    height: 24px;
    background: var(--island-divider);
    flex-shrink: 0;
}

/* --- 5. MINIMAL SEARCH BOX --- */
.search-box-minimal {
    display: flex;
    align-items: center;
    background: var(--island-input-bg);
    border-radius: 100px;
    padding: 0 1rem;
    height: 38px;
    width: 200px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.search-icon {
    color: var(--island-text-muted);
    font-size: 0.85rem;
    margin-right: 0.5rem;
    transition: color 0.3s ease;
}

.search-input {
    background: transparent;
    border: none;
    outline: none;
    width: 100%;
    color: var(--island-text);
    font-family: var(--font-body);
    font-size: 0.85rem;
}

.search-input::placeholder {
    color: var(--island-text-muted);
    opacity: 0.8;
}

/* Focus interactions */
.search-box-minimal:focus-within {
    width: 240px;
    background: transparent;
    border-color: var(--brand-orange);
}

.search-box-minimal:focus-within .search-icon {
    color: var(--brand-orange);
}

/* --- 6. RESPONSIVE DESIGN DEGRADATION (MOBILE) --- */
@media (max-width: 992px) {
    .dock-wrapper {
        border-radius: 24px;
        flex-direction: column;
        align-items: stretch;
        padding: 0.75rem;
        width: 100%;
        gap: 0.75rem;
    }
    
    .dock-buttons {
        overflow-x: auto;
        padding-bottom: 4px;
        /* Hide scrollbars but keep swipe functionality */
        -ms-overflow-style: none;
        scrollbar-width: none;
    }
    
    .dock-buttons::-webkit-scrollbar {
        display: none;
    }
    
    .dock-divider {
        width: 100%;
        height: 1px;
    }
    
    .search-box-minimal {
        width: 100%;
    }
    
    .search-box-minimal:focus-within {
        width: 100%;
    }
}

/* --- HOVER OVERLAY STYLES --- */

/* 1. Position the overlay over the image */
.photo-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    /* Extra top padding ensures a smooth gradient fade above the text */
    padding: 60px 24px 24px; 
    /* Brand Navy gradient for optimal text contrast */
    background: linear-gradient(to top, rgba(2, 46, 71, 0.95) 0%, rgba(2, 46, 71, 0) 100%);
    
    /* Initial Hidden State */
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    pointer-events: none; /* Allows clicks to pass through to the wrapper */
}

/* Reveal Overlay on Wrapper Hover */
.photo-wrapper:hover .photo-overlay {
    opacity: 1;
    transform: translateY(0);
}

/* Subtle Image Zoom on Hover */
.photo-wrapper:hover .dump-img {
    transform: scale(1.05);
}

/* 2. Tag Styling */
.dump-tag {
    display: inline-block;
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--brand-orange); /* Brand accent pop */
    margin-bottom: 8px;
    
    /* Staggered animation */
    transform: translateY(15px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1) 0.05s;
}

.photo-wrapper:hover .dump-tag {
    transform: translateY(0);
    opacity: 1;
}

/* 3. Title Styling */
.dump-title {
    font-family: var(--font-display);
    font-size: 1.4rem;
    color: #ffffff; /* Forced white for high contrast against the navy gradient */
    margin: 0;
    line-height: 1.1;
    letter-spacing: -0.02em;
    
    /* Staggered animation */
    transform: translateY(15px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1) 0.1s;
}

.photo-wrapper:hover .dump-title {
    transform: translateY(0);
    opacity: 1;
}

/* --- MOBILE & TOUCH DEVICE FALLBACK --- */
/* Ensures information isn't permanently hidden on touch screens */
@media (hover: none) {
    .photo-overlay {
        opacity: 1;
        transform: translateY(0);
        /* Slightly softer gradient for permanent visibility */
        background: linear-gradient(to top, rgba(2, 46, 71, 0.85) 0%, rgba(2, 46, 71, 0) 100%);
    }
    .dump-tag, .dump-title {
        opacity: 1;
        transform: translateY(0);
    }
}
