/* =========================================
   GALLERY STYLES — BRIAN LOH
   ========================================= */

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

:root {
    --bg-dark: #07090e;
    --bg-card: #0c0f17;
    --bg-card-hover: #121622;
    --border: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.16);

    --accent-blue: #3b82f6;
    --accent-pink: #e1306c;
    --accent-purple: #833ab4;
    --accent-cyan: #06b6d4;

    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    --font: 'Outfit', system-ui, -apple-system, sans-serif;
    --radius-sm: 8px;
    --radius: 16px;
    --radius-lg: 24px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: var(--font);
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* =========================================
   HERO
   ========================================= */
.gallery-hero {
    position: relative;
    padding: 140px 0 60px;
    text-align: center;
    overflow: hidden;
    background: linear-gradient(180deg, #090e18 0%, #07090e 100%);
}

.hero-bg-orbs {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.18;
}

.orb-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, #3b82f6, transparent);
    top: -150px;
    right: 10%;
}

.orb-2 {
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, #e1306c, transparent);
    top: -50px;
    left: 5%;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.25);
    border-radius: 50px;
    padding: 6px 18px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #93c5fd;
    margin-bottom: 20px;
}

.hero-title {
    font-size: clamp(2.4rem, 6vw, 4.2rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.15;
    margin-bottom: 16px;
    color: #fff;
}

.highlight {
    background: linear-gradient(135deg, #60a5fa 0%, #a78bfa 50%, #f472b6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: clamp(1.05rem, 2.5vw, 1.35rem);
    color: var(--text-secondary);
    font-weight: 400;
    margin-bottom: 12px;
}

.hero-meta {
    font-size: 0.88rem;
    color: var(--text-muted);
}

.hero-ig-link {
    color: #f472b6;
    text-decoration: none;
    font-weight: 600;
    border-bottom: 1px solid rgba(244, 114, 182, 0.3);
    transition: var(--transition);
}

.hero-ig-link:hover {
    color: #fff;
    border-color: #fff;
}

/* =========================================
   GALLERY FILTER & GRID
   ========================================= */
.gallery-section {
    padding: 30px 0 100px;
}

.filter-bar {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 48px;
    flex-wrap: wrap;
}

.filter-btn {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: 50px;
    padding: 10px 22px;
    font-family: var(--font);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.filter-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    border-color: var(--border-hover);
    transform: translateY(-1px);
}

.filter-btn.active {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.25), rgba(131, 58, 180, 0.25));
    border-color: rgba(59, 130, 246, 0.5);
    color: #fff;
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.15);
}

.filter-count {
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 0.75rem;
    color: inherit;
}

/* Dynamic Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 24px;
}

/* Category Headers inside Grid */
.category-header {
    grid-column: 1 / -1;
    padding: 16px 0 12px;
    margin-top: 12px;
    border-bottom: 1px solid var(--border);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.category-header-products,
.category-header-portraits {
    margin-top: 48px;
}

.category-pill {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #f472b6;
    background: rgba(225, 48, 108, 0.15);
    border: 1px solid rgba(225, 48, 108, 0.3);
    padding: 2px 10px;
    border-radius: 50px;
    margin-bottom: 8px;
}

.category-pill.pill-cyan {
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.15);
    border-color: rgba(56, 189, 248, 0.3);
}

.category-pill.pill-purple {
    color: #c084fc;
    background: rgba(192, 132, 252, 0.15);
    border-color: rgba(192, 132, 252, 0.35);
}

.category-title {
    font-size: clamp(1.6rem, 3.5vw, 2.2rem);
    font-weight: 800;
    color: #fff;
    line-height: 1.2;
    margin-bottom: 4px;
}

.category-subtitle {
    font-size: 0.92rem;
    color: var(--text-secondary);
}

.item-tag.tag-cyan {
    background: rgba(56, 189, 248, 0.15);
    border-color: rgba(56, 189, 248, 0.35);
    color: #38bdf8;
}

.item-tag.tag-purple {
    background: rgba(192, 132, 252, 0.18);
    border-color: rgba(192, 132, 252, 0.4);
    color: #e9d5ff;
}

/* Layout Variety */
.gallery-item {
    grid-column: span 6;
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    background: var(--bg-card);
    border: 1px solid var(--border);
    transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.gallery-item.item-tall {
    grid-column: span 6;
    aspect-ratio: 4 / 5;
}

.gallery-item.item-wide {
    grid-column: span 12;
    aspect-ratio: 16 / 9;
}

.gallery-item.item-square {
    grid-column: span 4;
    aspect-ratio: 1 / 1;
}

@media (min-width: 900px) {
    .gallery-item[data-index="0"] {
        /* Times Square tall */
        grid-column: span 5;
        aspect-ratio: 3 / 4;
    }
    .gallery-item[data-index="1"] {
        /* Kite wide */
        grid-column: span 7;
        aspect-ratio: 16 / 10;
    }
    .gallery-item[data-index="2"] {
        /* Kite vertical */
        grid-column: span 4;
        aspect-ratio: 3 / 4;
    }
    .gallery-item[data-index="3"] {
        /* Rooftop flash */
        grid-column: span 4;
        aspect-ratio: 3 / 4;
    }
    .gallery-item[data-index="4"] {
        /* Cocktail lounge */
        grid-column: span 4;
        aspect-ratio: 3 / 4;
    }
    .gallery-item[data-index="5"],
    .gallery-item[data-index="6"],
    .gallery-item[data-index="7"] {
        /* Product photos square */
        grid-column: span 4;
        aspect-ratio: 1 / 1;
    }
    .gallery-item[data-index="8"] {
        /* Medical school headshot */
        grid-column: span 4;
        aspect-ratio: 3 / 4;
    }
    .gallery-item[data-index="9"] {
        /* City lights evening portrait */
        grid-column: span 4;
        aspect-ratio: 4 / 3;
    }
    .gallery-item[data-index="10"] {
        /* Velvet lounge editorial */
        grid-column: span 4;
        aspect-ratio: 3 / 4;
    }
}

.image-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.gallery-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.gallery-item:hover {
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
}

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

/* Hover Overlay */
.item-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0.4) 40%, rgba(7, 9, 14, 0.95) 100%);
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    opacity: 0;
    transition: opacity var(--transition);
}

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

.item-meta-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    transform: translateY(-8px);
    transition: transform var(--transition);
}

.gallery-item:hover .item-meta-top {
    transform: translateY(0);
}

.item-tag {
    background: rgba(225, 48, 108, 0.2);
    border: 1px solid rgba(225, 48, 108, 0.4);
    color: #f472b6;
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    backdrop-filter: blur(8px);
}

.item-zoom-icon {
    font-size: 0.8rem;
    font-weight: 600;
    color: #fff;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    padding: 4px 12px;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.item-meta-bottom {
    transform: translateY(8px);
    transition: transform var(--transition);
}

.gallery-item:hover .item-meta-bottom {
    transform: translateY(0);
}

.item-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 4px;
    line-height: 1.3;
}

.item-sub {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* =========================================
   LIGHTBOX MODAL
   ========================================= */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.lightbox.active {
    opacity: 1;
    pointer-events: auto;
}

.lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(5, 7, 11, 0.94);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.lightbox-container {
    position: relative;
    z-index: 10;
    max-width: 1100px;
    width: 92%;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: zoomIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.lightbox-close {
    position: absolute;
    top: -48px;
    right: 0;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: #fff;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: rotate(90deg);
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(20, 24, 34, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 1.8rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    z-index: 20;
    backdrop-filter: blur(8px);
}

.lightbox-prev {
    left: -24px;
}

.lightbox-next {
    right: -24px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(59, 130, 246, 0.8);
    border-color: transparent;
    transform: translateY(-50%) scale(1.1);
}

.lightbox-content {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    width: 100%;
    display: flex;
    flex-direction: column;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.8);
}

.lightbox-image-wrap {
    width: 100%;
    max-height: 64vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    overflow: hidden;
}

.lightbox-img {
    max-width: 100%;
    max-height: 64vh;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

.lightbox-details {
    padding: 24px 30px;
    background: #0c0f17;
    border-top: 1px solid var(--border);
}

.lightbox-tags {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.lightbox-category {
    font-size: 0.75rem;
    font-weight: 700;
    color: #f472b6;
    background: rgba(225, 48, 108, 0.15);
    border: 1px solid rgba(225, 48, 108, 0.3);
    padding: 3px 10px;
    border-radius: 50px;
    text-transform: uppercase;
}

.lightbox-location {
    font-size: 0.82rem;
    color: var(--text-muted);
}

.lightbox-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 6px;
}

.lightbox-caption {
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 16px;
    max-width: 800px;
}

.lightbox-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.lightbox-counter {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-family: monospace;
}

.lightbox-ig-btn {
    font-size: 0.85rem;
    font-weight: 600;
    color: #f472b6;
    text-decoration: none;
    transition: color var(--transition);
}

.lightbox-ig-btn:hover {
    color: #fff;
    text-decoration: underline;
}

/* =========================================
   CTA SECTION
   ========================================= */
.gallery-cta {
    padding: 60px 0 100px;
}

.cta-card {
    background: linear-gradient(135deg, #0d121e 0%, #07090e 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 56px 36px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-badge {
    display: inline-block;
    background: rgba(225, 48, 108, 0.12);
    border: 1px solid rgba(225, 48, 108, 0.3);
    color: #f472b6;
    border-radius: 50px;
    padding: 6px 18px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.cta-title {
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    font-weight: 800;
    color: #fff;
    margin-bottom: 14px;
}

.cta-desc {
    font-size: 1.05rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 36px;
    line-height: 1.7;
}

.cta-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 50px;
    font-family: var(--font);
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary {
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    color: #fff;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.25);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(59, 130, 246, 0.4);
}

.btn-ghost {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.14);
    transform: translateY(-2px);
    border-color: var(--border-hover);
}

/* =========================================
   FOOTER
   ========================================= */
.footer {
    background: #040609;
    padding: 36px 0;
    border-top: 1px solid var(--border);
    text-align: center;
}

.footer p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.footer p a {
    color: #3b82f6;
    text-decoration: none;
}

.footer p a:hover {
    text-decoration: underline;
}

.footer-sub {
    font-size: 0.82rem;
    margin-top: 6px;
    color: #475569;
}

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 900px) {
    .gallery-grid {
        grid-template-columns: repeat(6, 1fr);
        gap: 16px;
    }

    .gallery-item,
    .gallery-item.item-tall,
    .gallery-item.item-wide {
        grid-column: span 6;
        aspect-ratio: 4 / 3;
    }

    .lightbox-prev {
        left: 8px;
    }

    .lightbox-next {
        right: 8px;
    }

    .lightbox-details {
        padding: 18px 20px;
    }

    .lightbox-title {
        font-size: 1.15rem;
    }

    .lightbox-caption {
        font-size: 0.85rem;
    }
}

@media (max-width: 640px) {
    .gallery-hero {
        padding: 110px 0 40px;
    }

    .hero-title {
        font-size: 2.2rem;
    }

    .gallery-item,
    .gallery-item.item-tall,
    .gallery-item.item-wide {
        aspect-ratio: 4 / 3;
    }

    .item-overlay {
        opacity: 1;
        background: linear-gradient(180deg, transparent 40%, rgba(7, 9, 14, 0.9) 100%);
        padding: 16px;
    }

    .item-meta-top {
        display: none;
    }

    .item-title {
        font-size: 1rem;
    }

    .cta-card {
        padding: 36px 20px;
    }

    .cta-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .cta-actions .btn {
        width: 100%;
    }

    .lightbox-close {
        top: -42px;
        right: 8px;
    }
}
