/* ============================================
   Portfolio v1.1 — Black & Gold Dark Theme
   + 3D Space Gallery + Premium Lightbox
   ============================================ */

/* === CSS Variables === */
:root {
    --bg: #0a0a0a;
    --bg-elevated: #111111;
    --bg-card: #161616;
    --bg-card-hover: #1c1c1c;
    --surface: #1a1a1a;
    --text: #e8e6e1;
    --text-secondary: #999692;
    --text-dim: #5c5953;
    --gold: #c8a45c;
    --gold-light: #d4b76e;
    --gold-dim: #8b7340;
    --gold-glow: rgba(200, 164, 92, 0.15);
    --gold-glow-strong: rgba(200, 164, 92, 0.3);
    --border: rgba(255, 255, 255, 0.06);
    --border-light: rgba(255, 255, 255, 0.1);
    --max-width: 1500px;
    --radius: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;
    --transition: 0.35s cubic-bezier(0.25, 0.1, 0.25, 1);
    --transition-slow: 0.6s cubic-bezier(0.25, 0.1, 0.25, 1);
}

/* === Reset & Base === */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background: var(--bg);
}

/* Section anchor offset for fixed navbar */
section {
    scroll-margin-top: 80px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }
button { border: none; background: none; cursor: pointer; font-family: inherit; color: inherit; }

::selection { background: var(--gold-dim); color: #fff; }

/* === Navigation === */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    background: rgba(10, 10, 10, 0.85);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--border);
    transition: transform var(--transition), background var(--transition);
}
.navbar.scrolled { background: rgba(10, 10, 10, 0.95); }
.navbar.hidden { transform: translateY(-100%); }

.nav-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 40px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 3px;
    color: var(--text);
    cursor: pointer;
}

.logo-icon { font-size: 10px; color: var(--gold); }

.nav-links { display: flex; gap: 40px; }

.nav-link {
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 1px;
    color: var(--text-secondary);
    transition: color var(--transition);
    position: relative;
    padding: 4px 0;
    cursor: pointer;
}

.nav-link:hover,
.nav-link.active { color: var(--gold); }

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 0; height: 1px;
    background: var(--gold);
    transition: width var(--transition);
}
.nav-link.active::after,
.nav-link:hover::after { width: 100%; }

.nav-toggle { display: none; flex-direction: column; gap: 5px; padding: 4px; }
.nav-toggle span { display: block; width: 22px; height: 1.5px; background: var(--text); transition: var(--transition); }

/* === Hero === */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    padding: 100px 40px 80px;
}

.hero::before {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 800px; height: 800px;
    background: radial-gradient(circle, var(--gold-glow) 0%, transparent 70%);
    pointer-events: none;
}

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

.hero-bg-particles .particle {
    position: absolute;
    width: 1px; height: 1px;
    background: var(--gold-dim);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); opacity: 0.3; }
    50% { transform: translateY(-30px); opacity: 0.8; }
}

.hero-content { position: relative; z-index: 1; max-width: 700px; }

.hero-eyebrow {
    font-size: 11px; font-weight: 600;
    letter-spacing: 5px; color: var(--gold);
    margin-bottom: 32px;
}

.hero-title {
    font-size: clamp(48px, 8vw, 88px);
    font-weight: 200; line-height: 1.15;
    letter-spacing: 0.12em; margin-bottom: 36px;
}

.title-line { display: block; }
.title-line-accent {
    font-weight: 600;
    background: linear-gradient(180deg, var(--gold-light) 0%, var(--gold) 50%, var(--gold-dim) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-desc {
    font-size: 15px; color: var(--text-secondary);
    line-height: 2; letter-spacing: 0.05em; margin-bottom: 60px;
}

.hero-scroll-hint {
    display: flex; flex-direction: column; align-items: center; gap: 12px;
    color: var(--text-dim); font-size: 11px; letter-spacing: 2px;
    animation: fadePulse 2s ease-in-out infinite;
}

@keyframes fadePulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

.scroll-line {
    width: 1px; height: 40px;
    background: linear-gradient(to bottom, var(--gold-dim), transparent);
}

/* === Section Header === */
.section-header {
    text-align: center;
    padding: 100px 40px 48px;
}

.section-divider {
    display: flex; align-items: center; justify-content: center;
    gap: 12px; margin-bottom: 24px;
}

.section-divider span { display: block; }
.section-divider span:first-child { width: 40px; height: 1px; background: var(--gold-dim); }
.section-divider span:last-child { width: 4px; height: 4px; background: var(--gold); transform: rotate(45deg); }

.section-header h2 {
    font-size: clamp(28px, 5vw, 42px);
    font-weight: 200; letter-spacing: 0.15em; margin-bottom: 8px;
}

.section-sub { font-size: 11px; letter-spacing: 4px; color: var(--text-dim); }

/* === Filter === */
.filter-bar {
    display: flex; justify-content: center; gap: 2px;
    padding: 0 40px 20px; flex-wrap: wrap;
}

.filter-btn {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 24px; font-size: 13px; font-weight: 500;
    letter-spacing: 1px; color: var(--text-secondary);
    border-bottom: 1px solid transparent;
    transition: all var(--transition);
}

.filter-btn:hover { color: var(--text); }
.filter-btn.active { color: var(--gold); border-bottom-color: var(--gold); }

.filter-count {
    font-size: 10px; color: var(--text-dim);
    background: var(--bg-card); padding: 2px 7px; border-radius: 10px;
}
.filter-btn.active .filter-count { background: var(--gold-glow); color: var(--gold); }

.filter-badge {
    font-size: 9px; font-weight: 700; letter-spacing: 1px;
    color: #000; background: var(--gold);
    padding: 1px 6px; border-radius: 3px;
}

.filter-btn-3d {
    position: relative;
}

.filter-btn-3d::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    background: linear-gradient(135deg, var(--gold), transparent, var(--gold-dim));
    opacity: 0;
    transition: opacity var(--transition);
    z-index: -1;
}
.filter-btn-3d.active::before { opacity: 1; }
.filter-btn-3d.active {
    color: var(--gold);
    border-bottom-color: var(--gold);
}

.sub-filter-bar {
    display: flex; justify-content: center; gap: 6px;
    padding: 0 40px 40px; flex-wrap: wrap;
}

.sub-filter-btn {
    padding: 6px 16px; font-size: 12px; letter-spacing: 0.5px;
    color: var(--text-dim); border: 1px solid var(--border);
    border-radius: 2px; transition: all var(--transition);
}
.sub-filter-btn:hover { color: var(--text); border-color: var(--border-light); }
.sub-filter-btn.active {
    color: var(--gold); border-color: var(--gold-dim);
    background: var(--gold-glow);
}

/* === 2D Gallery === */
.gallery {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
    columns: 3;
    column-gap: 20px;
}

.gallery-item {
    break-inside: avoid;
    margin-bottom: 20px;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--bg-card);
    cursor: pointer;
    position: relative;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    /* Stable placeholder — prevents layout shift on image load */
    aspect-ratio: auto;
    min-height: 200px;
}
.gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 0 1px var(--gold-dim);
}

.gallery-item img {
    width: 100%; height: auto; display: block;
    transition: transform 0.6s ease, filter 0.6s ease;
    filter: brightness(0.95);
}
.gallery-item:hover img { transform: scale(1.04); filter: brightness(1.05); }

.gallery-item-overlay {
    position: absolute; inset: 0;
    display: flex; flex-direction: column; justify-content: flex-end;
    padding: 32px 20px 20px;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.2) 50%, transparent 100%);
    opacity: 0; transition: opacity var(--transition);
}
.gallery-item:hover .gallery-item-overlay { opacity: 1; }

.gallery-item-title { font-size: 13px; font-weight: 500; letter-spacing: 0.5px; color: var(--text); margin-bottom: 4px; }
.gallery-item-cat { font-size: 11px; color: var(--gold); letter-spacing: 1px; }

/* === 3D Space — Multi-Layer Depth Gallery === */
.gallery-3d {
    display: none;
    position: relative;
    width: 100%;
    height: calc(100vh - 60px);
    background: #060606;
    overflow: hidden;
    perspective: 1000px;
    perspective-origin: 50% 50%;
}

/* Soft vignette that deepens edges without hiding content */
.gallery-3d::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 40;
    background:
        radial-gradient(ellipse at 50% 50%, transparent 40%, rgba(6,6,6,0.55) 80%, rgba(6,6,6,0.9) 100%);
}

.gallery-3d.active { display: block; }

.gallery-3d-scene {
    position: absolute;
    inset: 0;
    transform-style: preserve-3d;
    transition: transform 0.12s ease-out;
    will-change: transform;
}

.gallery-3d-item {
    position: absolute;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    box-shadow:
        0 4px 20px rgba(0,0,0,0.5),
        0 0 0 1px rgba(255,255,255,0.04);
    transition: box-shadow 0.35s ease, filter 0.35s ease;
    will-change: transform;
    backface-visibility: hidden;
}

.gallery-3d-item:hover {
    filter: brightness(1.12) contrast(1.04);
    box-shadow:
        0 12px 40px rgba(0,0,0,0.7),
        0 0 0 1px rgba(200,164,92,0.35),
        0 0 20px rgba(200,164,92,0.08);
    z-index: 200 !important;
}

.gallery-3d-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
}

.gallery-3d-item-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px 12px 10px;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-3d-item:hover .gallery-3d-item-info { opacity: 1; }

.gallery-3d-item-title {
    font-size: 12px;
    font-weight: 500;
    color: #fff;
    letter-spacing: 0.5px;
}

.gallery-3d-item-cat {
    font-size: 10px;
    color: var(--gold);
    letter-spacing: 1px;
    margin-top: 2px;
}

.gallery-3d-controls {
    position: absolute;
    top: 20px;
    left: 32px;
    right: 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 50;
    pointer-events: none;
}

.gallery-3d-back {
    padding: 8px 18px;
    font-size: 12px;
    letter-spacing: 1px;
    color: var(--text-secondary);
    border: 1px solid var(--border-light);
    border-radius: 2px;
    transition: all var(--transition);
    pointer-events: auto;
    background: rgba(10,10,10,0.8);
    backdrop-filter: blur(10px);
}
.gallery-3d-back:hover { color: var(--gold); border-color: var(--gold-dim); }

.gallery-3d-hint {
    font-size: 11px;
    letter-spacing: 2px;
    color: var(--text-dim);
    pointer-events: none;
}

/* === 3D Lightbox === */
.lightbox-3d {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: none;
    flex-direction: column;
    background: rgba(5, 5, 5, 0.98);
    backdrop-filter: blur(20px);
}
.lightbox-3d.active { display: flex; }

.lightbox-3d-bg {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.lightbox-3d-top {
    position: relative;
    z-index: 10;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 32px;
    height: 70px;
}

.lightbox-3d-counter {
    font-size: 12px;
    letter-spacing: 2px;
    color: var(--text-dim);
}

.lightbox-3d-close {
    width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.1);
    font-size: 24px;
    color: var(--text-secondary);
    transition: all var(--transition);
    background: rgba(10,10,10,0.5);
    cursor: pointer;
}
.lightbox-3d-close:hover {
    border-color: var(--gold-dim);
    color: var(--gold);
    background: rgba(200,164,92,0.1);
}

.lightbox-3d-main {
    position: relative;
    z-index: 5;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
    padding: 0 90px;
}

.lightbox-3d-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 56px; height: 56px;
    display: flex; align-items: center; justify-content: center;
    font-size: 36px;
    color: var(--text-secondary);
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.08);
    transition: all var(--transition);
    background: rgba(10,10,10,0.3);
    cursor: pointer;
}
.lightbox-3d-nav:hover { color: var(--gold); border-color: var(--gold-dim); }
.lightbox-3d-prev { left: 24px; }
.lightbox-3d-next { right: 24px; }

.lightbox-3d-content {
    position: relative;
    max-width: 100%;
    max-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Gold frame background — same style as 2D lightbox */
.lightbox-3d-content::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--gold-dim) 0%, transparent 40%, transparent 60%, var(--gold-dim) 100%);
    opacity: 0.4;
    z-index: 0;
    pointer-events: none;
}

.lightbox-3d-content img {
    max-width: calc(100vw - 180px);
    max-height: calc(100vh - 130px);
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    box-shadow:
        0 0 80px rgba(0,0,0,0.6),
        0 0 0 1px rgba(255,255,255,0.05);
    position: relative;
    z-index: 1;
    transition: opacity 0.25s ease;
}

.lightbox-3d-info {
    position: relative;
    z-index: 10;
    flex-shrink: 0;
    padding: 16px 32px 32px;
    font-size: 13px;
    letter-spacing: 1px;
    color: var(--text-dim);
    text-align: center;
    min-height: 50px;
}

@media (max-width: 768px) {
    .gallery-3d {
        perspective: 800px;
        height: calc(100vh - 60px);
        touch-action: none; /* prevent native scroll, allow custom gestures */
    }
    .gallery-3d-controls { left: 12px; right: 12px; top: 10px; }
    .gallery-3d-back {
        padding: 7px 12px;
        font-size: 11px;
        border-radius: 18px;
        background: rgba(10,10,10,0.9);
    }
    .gallery-3d-hint {
        display: block;
        font-size: 9px;
        letter-spacing: 1px;
        padding: 5px 10px;
        background: rgba(10,10,10,0.7);
        border-radius: 16px;
        backdrop-filter: blur(10px);
    }
    .gallery-3d-item {
        border-radius: 4px;
        box-shadow: 0 3px 12px rgba(0,0,0,0.5);
    }
    .gallery-3d-item:hover {
        filter: brightness(1.12) drop-shadow(0 0 6px rgba(200,164,92,0.25));
        box-shadow: 0 8px 24px rgba(0,0,0,0.7), 0 0 0 1px rgba(200,164,92,0.3);
    }
    .gallery-3d-item-info {
        padding: 8px 6px 5px;
    }
    .gallery-3d-item-title { font-size: 9px; }
    .gallery-3d-item-cat { font-size: 8px; }

    /* 3D Lightbox mobile */
    .lightbox-3d {
        z-index: 3000;
        flex-direction: column;
    }
    .lightbox-3d-top { padding: 12px 16px; height: 50px; flex-shrink: 0; }
    .lightbox-3d-close {
        width: 36px; height: 36px;
        font-size: 22px;
    }

    /* Nav buttons: positioned relative to the image area (between top bar and info) */
    .lightbox-3d-nav {
        width: 36px; height: 36px; font-size: 24px;
        top: 50%;
        margin-top: -18px;
    }
    .lightbox-3d-prev { left: 6px; }
    .lightbox-3d-next { right: 6px; }

    /* Image area: flex-1 fills space between top bar and info */
    .lightbox-3d-content {
        flex: 1;
        min-height: 0;
        padding: 0 48px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .lightbox-3d-content img {
        max-width: 100%;
        max-height: 100%;
        border-radius: 6px;
    }
    .lightbox-3d-content::before {
        border-radius: 6px;
    }

    .lightbox-3d-info {
        padding: 8px 16px 16px;
        font-size: 10px;
        flex-shrink: 0;
        min-height: auto;
    }
}

/* === Scroll Sentinel === */
.scroll-sentinel { height: 1px; width: 100%; }

/* === About === */
.about {
    min-height: 100vh;
    padding: 60px 40px 100px;
    background: var(--bg);
}

.about .section-header {
    padding-top: 0;
    padding-bottom: 0;
    margin-bottom: 28px;
}
.about-content { max-width: 900px; margin: 0 auto; width: 100%; }
.about-intro { text-align: center; margin-bottom: 60px; }

.about-intro h3 {
    font-size: 24px; font-weight: 300; letter-spacing: 0.08em;
    margin-bottom: 18px; color: var(--gold);
}

.about-bio {
    color: var(--text-secondary); line-height: 2;
    max-width: 600px; margin: 0 auto; font-size: 14px; letter-spacing: 0.03em;
}

/* Contact inline — right below name, prominent */
.about-contact-inline {
    display: flex; justify-content: center; align-items: center; gap: 20px;
    margin-bottom: 28px;
}
.contact-link {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 15px; color: var(--text);
    letter-spacing: 0.5px; transition: color var(--transition);
}
.contact-link:hover { color: var(--gold); }
.contact-link:hover .contact-icon { opacity: 1; }
.contact-divider { color: var(--text-dim); opacity: 0.4; }

/* Clean SVG icons via inline data URI */
.contact-icon {
    display: inline-block; width: 16px; height: 16px;
    flex-shrink: 0; opacity: 0.55;
    background-size: contain; background-repeat: no-repeat;
    background-position: center;
    transition: opacity var(--transition);
}
.contact-icon-phone {
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23c8a45c' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72c.127.96.361 1.903.7 2.81a2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45c.907.339 1.85.573 2.81.7A2 2 0 0 1 22 16.92z'%3E%3C/path%3E%3C/svg%3E");
}
.contact-icon-mail {
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23c8a45c' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='4' width='20' height='16' rx='2'%3E%3C/rect%3E%3Cpath d='m22 4-10 7L2 4'%3E%3C/path%3E%3C/svg%3E");
}

.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }

.about-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-md); padding: 32px;
    transition: border-color var(--transition);
    display: flex; flex-direction: column;
}
.about-card:hover { border-color: var(--border-light); }

/* Card head: icon + title inline */
.about-card-head {
    display: flex; align-items: center; gap: 10px;
    margin-bottom: 20px;
}
.card-icon { font-size: 12px; color: var(--gold); flex-shrink: 0; }
.about-card h4 { font-size: 14px; font-weight: 600; letter-spacing: 2px; color: var(--text); margin: 0; }

/* Card body: unify height and align content */
.about-card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.skill-tags { display: flex; flex-wrap: wrap; gap: 8px; align-content: center; }
.skill-tags span {
    padding: 6px 14px; background: var(--bg);
    border: 1px solid var(--border); font-size: 12px;
    color: var(--text-secondary); letter-spacing: 0.5px;
    transition: all var(--transition);
}
.skill-tags span:hover { border-color: var(--gold-dim); color: var(--gold); }

.service-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1;
}
.service-list li {
    padding: 12px 0; color: var(--text-secondary);
    border-bottom: 1px solid var(--border); font-size: 13px;
    letter-spacing: 0.5px; transition: color var(--transition);
}
.service-list li:first-child { padding-top: 0; }
.service-list li:last-child {
    padding-bottom: 0;
    border-bottom: none;
}
.service-list li:hover { color: var(--text); }
.service-list li::before { content: '— '; color: var(--gold-dim); }

/* === Footer === */
.footer { border-top: 1px solid var(--border); padding: 40px; }
.footer-inner {
    max-width: var(--max-width); margin: 0 auto;
    display: flex; justify-content: space-between; align-items: center;
    font-size: 12px; letter-spacing: 1px; color: var(--text-dim);
}
.footer-logo { color: var(--gold); }

/* ============================================
   LIGHTBOX v2 — Premium Design
   ============================================ */
.lightbox {
    position: fixed; inset: 0; z-index: 2000;
    display: none; flex-direction: column;
    opacity: 0; transition: opacity 0.4s ease;
}
.lightbox.active { display: flex; opacity: 1; }

.lightbox-bg {
    position: absolute; inset: 0;
    background: rgba(5, 5, 5, 0.98);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
}

/* Top Bar */
.lightbox-top-bar {
    position: relative; z-index: 10;
    display: flex; align-items: center; justify-content: space-between;
    padding: 24px 40px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}

.lightbox-meta {
    display: flex; align-items: center; gap: 10px;
}

.lightbox-project {
    font-size: 13px; font-weight: 600;
    letter-spacing: 2px; color: var(--gold);
    text-transform: uppercase;
}

.lightbox-separator {
    font-size: 14px; color: var(--text-dim); font-weight: 200;
}

.lightbox-name {
    font-size: 14px; color: var(--text-secondary);
    letter-spacing: 0.5px;
}

.lightbox-top-right {
    display: flex; align-items: center; gap: 24px;
}

.lightbox-counter {
    font-size: 12px; letter-spacing: 2px; color: var(--text-dim);
}

.lightbox-close {
    position: relative;
    width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.1);
    transition: all var(--transition);
}
.lightbox-close span {
    position: absolute;
    width: 14px; height: 1px; background: var(--text-secondary);
    transition: all var(--transition);
}
.lightbox-close span:first-child { transform: rotate(45deg); }
.lightbox-close span:last-child { transform: rotate(-45deg); }
.lightbox-close:hover {
    border-color: var(--gold-dim);
    background: rgba(200,164,92,0.1);
}
.lightbox-close:hover span { background: var(--gold); }

/* Stage */
.lightbox-stage {
    position: relative; z-index: 5;
    flex: 1; display: flex; align-items: center; justify-content: center;
    padding: 40px 100px 100px;
}

.lightbox-frame {
    position: relative;
    max-width: 85vw; max-height: 70vh;
    display: flex; align-items: center; justify-content: center;
}

.lightbox-frame::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, var(--gold-dim) 0%, transparent 40%, transparent 60%, var(--gold-dim) 100%);
    opacity: 0.4;
    z-index: -1;
}

.lightbox-frame img {
    max-width: 85vw; max-height: 70vh;
    object-fit: contain;
    border-radius: var(--radius-md);
    box-shadow:
        0 0 80px rgba(0,0,0,0.6),
        0 0 0 1px rgba(255,255,255,0.05);
}

/* Nav Buttons */
.lightbox-nav {
    position: absolute; top: 50%; transform: translateY(-50%);
    z-index: 10;
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    padding: 20px 16px;
    color: var(--text-dim);
    transition: all var(--transition);
}
.lightbox-nav:hover { color: var(--gold); }

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

.nav-arrow {
    display: block;
    width: 10px; height: 10px;
    border-top: 1.5px solid currentColor;
    border-right: 1.5px solid currentColor;
    transition: transform var(--transition);
}
.lightbox-prev .nav-arrow { transform: rotate(-135deg); }
.lightbox-next .nav-arrow { transform: rotate(45deg); }
.lightbox-prev:hover .nav-arrow { transform: rotate(-135deg) translateX(-4px); }
.lightbox-next:hover .nav-arrow { transform: rotate(45deg) translateX(4px); }

.nav-label {
    font-size: 10px; letter-spacing: 2px; font-weight: 500;
}

/* Thumbnail Strip */
.lightbox-strip {
    position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%);
    display: flex; gap: 6px;
    max-width: 80vw; overflow-x: auto;
    padding: 8px 16px;
    background: rgba(255,255,255,0.02);
    border-radius: 40px;
    border: 1px solid rgba(255,255,255,0.04);
    scrollbar-width: none;
}
.lightbox-strip::-webkit-scrollbar { display: none; }

.strip-thumb {
    width: 48px; height: 48px;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    opacity: 0.3;
    transition: all var(--transition);
    border: 1px solid transparent;
    flex-shrink: 0;
}
.strip-thumb:hover { opacity: 0.7; }
.strip-thumb.active {
    opacity: 1;
    border-color: var(--gold);
    box-shadow: 0 0 12px var(--gold-glow);
}
.strip-thumb img {
    width: 100%; height: 100%;
    object-fit: cover;
}

/* === Animations === */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}
@media (min-width: 769px) {
    .gallery-item { animation: fadeUp 0.7s ease backwards; }
}

/* === Responsive === */
@media (max-width: 1200px) {
    .gallery { columns: 2; column-gap: 16px; }
    .gallery-item { margin-bottom: 16px; }
}

@media (max-width: 768px) {
    .nav-inner { padding: 0 20px; }
    .nav-links {
        display: none;
        position: absolute; top: 60px; left: 0; right: 0;
        background: rgba(10, 10, 10, 0.95);
        backdrop-filter: blur(20px);
        flex-direction: column; padding: 24px 20px; gap: 20px;
        border-bottom: 1px solid var(--border);
    }
    .nav-links.active { display: flex; }
    .nav-toggle { display: flex; }

    /* Mobile: masonry via CSS Grid with auto-rows — no reflow flicker */
    .gallery {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        padding: 0 8px;
        grid-auto-rows: 6px;
        grid-auto-flow: dense;
    }
    .gallery-item {
        margin-bottom: 0;
        border-radius: 4px;
        aspect-ratio: auto;
        min-height: auto;
        overflow: hidden;
        background: var(--bg-card);
    }
    .gallery-item img {
        position: static;
        width: 100%;
        height: 100%;
        display: block;
        object-fit: cover;
    }

    .hero { padding: 80px 20px 60px; }
    .hero-eyebrow { letter-spacing: 3px; font-size: 10px; }

    .about-grid { grid-template-columns: 1fr; }
    .about {
        min-height: 100vh;
        padding: 60px 20px 60px;
    }
    .about .section-header {
        padding-top: 0;
        padding-bottom: 0;
        margin-bottom: 32px;
    }

    .section-header { padding: 60px 20px 32px; }
    .filter-bar, .sub-filter-bar { padding-left: 20px; padding-right: 20px; }

    /* Lightbox mobile */
    .lightbox-top-bar { padding: 16px 20px; }
    .lightbox-stage {
        padding: 16px 48px 80px;
        position: relative;
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .lightbox-frame {
        max-width: 100%;
        max-height: 100%;
    }
    .lightbox-frame img {
        max-width: calc(100vw - 60px);
        max-height: calc(100vh - 180px);
    }
    .lightbox-nav {
        padding: 12px 8px;
        top: calc(50% - 40px); /* account for bottom strip */
    }
    .lightbox-prev { left: 4px; }
    .lightbox-next { right: 4px; }
    .nav-label { display: none; }
    .lightbox-strip { bottom: 12px; gap: 4px; }
    .strip-thumb { width: 36px; height: 36px; }
    .lightbox-name { display: none; }
    .lightbox-separator { display: none; }
}

@media (max-width: 480px) {
    .gallery {
        gap: 6px;
        padding: 0 6px;
        grid-auto-rows: 5px;
    }
    .gallery-item { min-height: auto; }
    .filter-btn { padding: 8px 16px; font-size: 12px; }
    .sub-filter-btn { padding: 5px 12px; font-size: 11px; }
    .hero-title { font-size: clamp(36px, 10vw, 56px); }
}
