/* ==========================================================================
   SECTIONS — Per-Section Styles
   ========================================================================== */

/* ── NAVIGATION ───────────────────────────────────────────────────────────── */

.site-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: var(--z-nav);
    padding: var(--space-md) 0;
    transition: transform 0.4s ease, opacity 0.4s ease, background 0.3s ease, padding 0.3s ease,
        backdrop-filter 0.3s ease;
}

@media (min-width: 768px) {
    .site-nav {
        /* Start hidden on desktop */
        transform: translateY(-100%);
        opacity: 0;
        pointer-events: none;
    }
}

@media (max-width: 767px) {
    .site-nav {
        /* Start hidden on mobile (match desktop behavior) */
        transform: translateY(-100%);
        opacity: 0;
        pointer-events: none;
        background: transparent !important;
        /* Force transparency */
    }

    /* Hide text logo on mobile */
    .nav-logo {
        display: none !important;
    }

    /* Force button to right and transparent background */
    .site-nav .container {
        justify-content: flex-end !important;
        width: 100%;
    }

    /* Transparent even when scrolled on mobile */
    body .site-nav--scrolled {
        background: transparent !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        border-bottom: none !important;
        padding: var(--space-md) 0 !important;
        /* Matches right padding */
        pointer-events: none !important;
        /* Don't block clicks on transparent area */
    }

    /* Ensure button is clickable even if parent is not */
    .nav-toggle,
    .nav-menu {
        pointer-events: auto;
    }

    .nav-toggle {
        width: 32px;
        /* ~15% wider than 28px */
        gap: 6px;
        /* Taller */
    }

    body.nav-open .nav-toggle__line:nth-child(1) {
        transform: rotate(45deg) translate(6px, 6px);
    }

    body.nav-open .nav-toggle__line:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -6px);
    }
}


.site-nav--scrolled {
    background: rgba(13, 13, 13, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 0.5rem 0 !important;
    /* Compact by default */
    border-bottom: 1px solid var(--border);
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
    /* Re-enable clicks */
}






.site-nav .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}


.nav-logo {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: var(--ls-tight);
    transition: color var(--transition-fast);
}

.nav-logo:hover {
    color: var(--accent-gold);
}

.nav-logo span {
    color: var(--accent-gold);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
}

.nav-link {
    font-family: var(--font-body);
    font-size: var(--fs-label);
    font-weight: 500;
    text-transform: uppercase;
    text-transform: uppercase;
    letter-spacing: var(--ls-wider);
    color: #ffffff;
    text-decoration: none;
    position: relative;
    transition: color var(--transition-fast);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent-gold);
    transition: width var(--transition-base);
}

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

.nav-link:hover::after,
.nav-link--active::after {
    width: 100%;
}

/* Hamburger */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    width: 28px;
    cursor: pointer;
    z-index: calc(var(--z-nav) + 1);
    background: none;
    border: none;
    padding: 4px 0;
    margin-left: auto;
    /* Push to right on mobile */
}

.nav-toggle__line {
    width: 100%;
    height: 2px;
    background: var(--text-primary);
    transition: all var(--transition-base);
    transform-origin: center;
}

body.nav-open .nav-toggle__line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

body.nav-open .nav-toggle__line:nth-child(2) {
    opacity: 0;
}

body.nav-open .nav-toggle__line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ── 01. HERO ─────────────────────────────────────────────────────────────── */

.hero {
    position: relative;
    min-height: 100vh;
    min-height: 100svh;
    /* Stable height on mobile (avoids zoom when address bar hides) */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    isolation: isolate;
    /* Create stacking context for z-index: -1 background */
}

.hero__bg {
    position: absolute;
    top: -20%;
    left: 0;
    width: 100%;
    height: 140%;
    z-index: var(--z-behind);
    will-change: transform;
}

.hero__bg img,
.hero__bg video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 20%;
}

.hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom,
            rgba(13, 13, 13, 0.4) 0%,
            rgba(13, 13, 13, 0.2) 40%,
            rgba(13, 13, 13, 0.6) 70%,
            rgba(13, 13, 13, 0.95) 100%);
    z-index: var(--z-base);
}

.hero__content {
    position: relative;
    z-index: calc(var(--z-base) + 1);
    text-align: center;
    padding: var(--space-lg);
}

.hero__name {
    font-family: var(--font-display);
    font-size: var(--fs-hero);
    font-weight: 700;
    color: var(--text-primary);
    line-height: var(--lh-tight);
    margin-bottom: var(--space-sm);
    text-shadow: 0 2px 40px rgba(0, 0, 0, 0.5);
}

.hero__title {
    font-family: var(--font-body);
    font-size: var(--fs-hero-sub);
    font-weight: 300;
    text-transform: uppercase;
    letter-spacing: var(--ls-wider);
    color: var(--accent-gold);
    margin-bottom: var(--space-lg);
}

/* Relocated Socials & IMDb (New Structure) */

/* Hero Actions Container */
.hero__actions {
    display: flex;
    gap: var(--space-sm);
    justify-content: center;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: var(--space-lg);
    position: relative;
    z-index: 20;
}

/* Social Icons Container */
.hero__socials {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    justify-content: center;
    z-index: 20;
}

/* Mobile-First: Static Layout (Stacked) */
@media (max-width: 767px) {
    .hero__actions {
        flex-direction: column;
        width: 100%;
        max-width: 280px;
        margin: 0 auto;
    }

    .hero__actions .btn {
        width: 100%;
    }

    /* Socials: Row below icons */
    .hero__socials {
        margin-top: var(--space-md);
        flex-wrap: nowrap;
    }

    /* Simplified Social Link for Mobile Performance */
    .hero__socials .social-link {
        width: 44px;
        height: 44px;
        background: rgba(13, 13, 13, 0.6);
        border: 1px solid rgba(255, 255, 255, 0.2);
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        color: var(--text-primary);
        border-radius: 50%;
        flex-shrink: 0;
    }
}

/* Desktop: Center Separated Socials */
@media (min-width: 768px) {
    .hero__socials {
        position: static;
        flex-direction: row;
        margin-top: var(--space-lg);
        width: 100%;
        max-width: 480px;
        margin: var(--space-lg) auto 0;
        justify-content: space-between;
    }

    .hero__socials .social-link {
        background: rgba(13, 13, 13, 0.4);
        border-color: rgba(255, 255, 255, 0.2);
        color: var(--text-primary);
        backdrop-filter: blur(5px);
        width: 48px;
        height: 48px;
        transition: all var(--transition-base);
        border-radius: 50%;
        /* Ensure round */
        display: flex;
        /* Ensure centering */
        align-items: center;
        justify-content: center;
        border: 1px solid transparent;
        /* Prepare for hover border */
    }

    .hero__socials .social-link:hover {
        background: var(--accent-gold);
        border-color: var(--accent-gold);
        color: var(--bg-primary);
        transform: translateY(-3px);
        box-shadow: var(--shadow-gold);
    }
}

/* ── Scroll Cue Arrow ─────────────────────────────────────────────────────── */

@keyframes scrollBounce {

    0%,
    100% {
        transform: translateY(0);
        opacity: 0.8;
    }

    50% {
        transform: translateY(10px);
        opacity: 1;
    }
}

@keyframes scrollCueFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 0.8;
    }
}

.hero__scroll-cue {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    margin-left: -22px;
    z-index: calc(var(--z-base) + 2);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    animation: scrollCueFadeIn 1s ease 1.2s both,
        scrollBounce 1.8s ease-in-out 2.2s infinite;
    cursor: pointer;
    transition: opacity 0.4s ease;
}

.hero__scroll-cue svg {
    width: 32px;
    height: 32px;
    stroke: rgba(255, 255, 255, 0.75);
    stroke-width: 2;
    fill: none;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.5));
}

.hero__scroll-cue--hidden {
    opacity: 0 !important;
    pointer-events: none;
    animation: none;
}

/* ── 02. ABOUT ────────────────────────────────────────────────────────────── */

.about__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-xl);
    align-items: center;
}

.about__image-wrapper {
    position: relative;
    width: fit-content;
    max-width: 420px;
    margin-inline: auto;
    /* Keep it centered when it's the only column */
}

.about__image {
    width: 100%;
    max-width: 420px;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}

.about__image-wrapper::after {
    content: '';
    position: absolute;
    top: -12px;
    right: -12px;
    width: 100%;
    max-width: 420px;
    height: 100%;
    border: 1px solid var(--accent-gold);
    border-radius: var(--radius-lg);
    opacity: 0.3;
    z-index: var(--z-behind);
}

.about__text h2 {
    margin-bottom: var(--space-md);
}

.about__text p {
    margin-bottom: var(--space-sm);
}

.about__stats {
    display: flex;
    gap: var(--space-lg);
    margin-top: var(--space-lg);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--border);
}

.about__stat-number {
    font-family: var(--font-display);
    font-size: var(--fs-h2);
    font-weight: 700;
    color: var(--accent-gold);
    line-height: 1;
}

.about__stat-label {
    font-size: var(--fs-small);
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: var(--ls-wide);
    margin-top: 0.25rem;
}

/* ── 03. DEMO REEL ────────────────────────────────────────────────────────── */

.showreel__intro {
    margin-bottom: var(--space-xl);
}

.showreel__intro p {
    text-align: center;
    max-width: var(--content-narrow);
    margin: 0 auto;
    font-size: 1.1rem;
}

.showreel__video-wrapper {
    max-width: 960px;
    margin: 0 auto;
}

/* ── 04. PORTFOLIO ────────────────────────────────────────────────────────── */

.portfolio__header {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.portfolio__carousel-wrapper {
    position: relative;
}

.portfolio__grid {
    display: grid;
    grid-template-rows: repeat(2, 1fr);
    grid-auto-flow: column;
    grid-auto-columns: 200px;
    /* Base size for mobile - ~15% smaller than original 280px */
    gap: var(--space-md);
    overflow-x: auto;
    overflow-y: hidden;
    /* Prevent vertical scrollbar */
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding: var(--space-sm) 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    /* Firefox - hide scrollbar */
    -ms-overflow-style: none;
    /* IE/Edge - hide scrollbar */
    overscroll-behavior-x: contain;
    /* Prevent swipe navigation */
}

/* Hide scrollbar for Chrome/Safari/Opera */
.portfolio__grid::-webkit-scrollbar {
    display: none;
}

/* Project cards in horizontal scroll */
.portfolio__grid .project-card {
    scroll-snap-align: start;
}

/* Navigation arrows */
.portfolio__nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-md);
    -webkit-tap-highlight-color: transparent;
    /* Remove mobile touch highlight */
    outline: none;
}

.portfolio__nav-arrow:active {
    background: var(--accent-gold);
    border-color: var(--accent-gold);
    transform: translateY(-50%) scale(0.95);
}

.portfolio__nav-arrow:active svg {
    stroke: var(--bg-primary);
}

@media (hover: hover) {
    .portfolio__nav-arrow:hover {
        background: var(--accent-gold);
        border-color: var(--accent-gold);
        transform: translateY(-50%) scale(1.1);
    }

    .portfolio__nav-arrow:hover svg {
        stroke: var(--bg-primary);
    }
}

.portfolio__nav-arrow svg {
    width: 24px;
    height: 24px;
    stroke: var(--accent-gold);
    stroke-width: 2;
    transition: stroke var(--transition-base);
}

.portfolio__nav-arrow--left {
    left: -24px;
}

.portfolio__nav-arrow--right {
    right: -24px;
}

.portfolio__nav-arrow:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}


.portfolio__more {
    text-align: center;
    margin-top: var(--space-xl);
}

/* ── 05. PORTAFOLIO — GALLERY ─────────────────────────────────────────────── */

.gallery__header {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.gallery__download {
    align-self: flex-start;
}

/* Gallery Nav Arrows */
.gallery__nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-md);
    -webkit-tap-highlight-color: transparent;
    /* Remove mobile touch highlight */
    outline: none;
}

.gallery__nav-arrow:active {
    background: var(--accent-gold);
    border-color: var(--accent-gold);
    transform: translateY(-50%) scale(0.95);
}

.gallery__nav-arrow:active svg {
    stroke: var(--bg-primary);
}

@media (hover: hover) {
    .gallery__nav-arrow:hover {
        background: var(--accent-gold);
        border-color: var(--accent-gold);
        transform: translateY(-50%) scale(1.1);
    }

    .gallery__nav-arrow:hover svg {
        stroke: var(--bg-primary);
    }
}

.gallery__nav-arrow svg {
    width: 24px;
    height: 24px;
    stroke: var(--accent-gold);
    stroke-width: 2;
    transition: stroke var(--transition-base);
}

.gallery__nav-arrow--left {
    left: -24px;
}

.gallery__nav-arrow--right {
    right: -24px;
}

/* Filter Buttons */
.gallery__filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: var(--space-lg);
}

.gallery__filter-btn {
    font-family: var(--font-body);
    font-size: var(--fs-small);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: var(--ls-wide);
    padding: 0.5rem 1.25rem;
    border-radius: 100px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-base);
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
    outline: none;
}

@media (hover: hover) {
    .gallery__filter-btn:hover {
        border-color: var(--accent-gold);
        color: var(--accent-gold);
    }
}


.gallery__filter-btn--active {
    background: var(--accent-glow);
    border-color: var(--accent-gold);
    color: var(--accent-gold);
    font-weight: 600;
}

/* Sub-filters */
/* Sub-filters Container (Wrapper for grid and arrows) */
.gallery__subfilters-container {
    margin-top: -10px;
    margin-bottom: var(--space-md);
    position: relative;
    /* Wrapper handles positioning */
}

.gallery__filters--secondary {
    width: 100%;
    animation: fadeIn 0.4s ease forwards;
    gap: 0.5rem;

    /* 2-Row Grid Layout with Horizontal Scroll */
    display: grid;
    grid-template-rows: repeat(2, min-content);
    /* Exactly 2 rows */
    grid-auto-flow: column;
    /* Fill columns first, creating horizontal overflow */
    grid-auto-columns: max-content;
    /* Columns fit content width */

    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    /* Prevent browser navigation at scroll edges */

    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE/Edge */

    padding-bottom: 4px;
    align-items: center;
    /* Vertically center buttons in their grid cells */
}

/* Hide scrollbar for Chrome/Safari/Opera */
.gallery__filters--secondary::-webkit-scrollbar {
    display: none;
}

.subfilter-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 20;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-md);
    -webkit-tap-highlight-color: transparent;
    /* Remove mobile touch highlight */
    outline: none;
}

.subfilter-nav:active {
    background: var(--accent-gold);
    border-color: var(--accent-gold);
    transform: translateY(-50%) scale(0.95);
}

.subfilter-nav:active svg {
    stroke: var(--bg-primary);
}

@media (hover: hover) {
    .subfilter-nav:hover {
        background: var(--accent-gold);
        border-color: var(--accent-gold);
        transform: translateY(-50%) scale(1.1);
    }

    .subfilter-nav:hover svg {
        stroke: var(--bg-primary);
    }
}

.subfilter-nav svg {
    width: 20px;
    height: 20px;
    stroke: var(--accent-gold);
    stroke-width: 2;
    transition: stroke var(--transition-base);
}

.subfilter-nav--left {
    left: -18px;
}

.subfilter-nav--right {
    right: -18px;
}

.subfilter-nav[hidden] {
    display: none;
    opacity: 0;
    pointer-events: none;
}


.gallery__subfilter-btn {
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: var(--ls-wide);
    padding: 0.35rem 0.9rem;
    border-radius: 100px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition-base);
    -webkit-tap-highlight-color: transparent;
    /* Remove mobile touch highlight */
    outline: none;
}

@media (hover: hover) {
    .gallery__subfilter-btn:hover {
        border-color: var(--text-secondary);
        color: var(--text-primary);
    }
}

.gallery__subfilter-btn--active {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--text-secondary);
    color: var(--text-primary);
    font-weight: 600;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Ensure hidden sub-filters are truly hidden */
.gallery__filters--secondary[hidden] {
    display: none;
}


/* Gallery Carousel (formerly Grid) */
.gallery__carousel-wrapper {
    position: relative;
}

.gallery__grid {
    display: flex;
    /* Changed from grid to flex for carousel */
    gap: var(--space-sm);
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding: var(--space-sm) 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    overscroll-behavior-x: contain;
    /* Prevent swipe navigation */
}

.gallery__grid::-webkit-scrollbar {
    display: none;
}

.gallery__item {
    flex: 0 0 280px;
    /* Fixed width for carousel items */
    scroll-snap-align: start;
    cursor: pointer;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.gallery__item--hidden {
    display: none;
    /* Completely hide filtered items so they don't take space in carousel */
}

.gallery__item-inner {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    aspect-ratio: 3 / 4;
}

.gallery__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s var(--ease-out);
}

@media (hover: hover) {
    .gallery__item:hover .gallery__image {
        transform: scale(1.08);
    }
}

.gallery__item-overlay {
    position: absolute;
    inset: 0;
    background: rgba(13, 13, 13, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-base);
}

.gallery__item-overlay svg {
    stroke: var(--accent-gold);
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.5));
}

/* Only show on hover for devices that support hover */
@media (hover: hover) {
    .gallery__item:hover .gallery__item-overlay {
        opacity: 1;
    }
}

/* ── LIGHTBOX ─────────────────────────────────────────────────────────────── */

.lightbox {
    position: fixed;
    inset: 0;
    z-index: var(--z-modal);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lightbox[hidden] {
    display: none;
}

.lightbox--active {
    opacity: 1;
    visibility: visible;
}

.lightbox__backdrop {
    position: fixed;
    inset: 0;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(10px);
    /* Reduced from 20px for better performance */
    -webkit-backdrop-filter: blur(10px);
    z-index: 1;
    cursor: pointer;
    transform: translateZ(0);
    /* Force GPU acceleration */
}

/* Disable backdrop blur on mobile for better performance */
@media (max-width: 768px) {
    .lightbox__backdrop {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        background: rgba(10, 10, 10, 0.98);
        /* Slightly more opaque without blur */
    }
}

/* Close Button */
.lightbox__close {
    position: fixed;
    top: 5rem;
    right: 1.5rem;
    z-index: 450;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-base);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.lightbox__close svg {
    stroke: rgba(255, 255, 255, 0.9);
}

@media (hover: hover) {
    .lightbox__close:hover {
        background: var(--accent-gold);
        border-color: var(--accent-gold);
        transform: scale(1.05);
    }

    .lightbox__close:hover svg {
        stroke: var(--bg-primary);
    }
}

/* Main Image Area */
.lightbox__main {
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    flex: 1;
    padding: 4rem 1rem 1rem;
    min-height: 0;
    pointer-events: none;
}

.lightbox__image-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 90vw;
    max-height: calc(100vh - 200px);
    pointer-events: auto;
}

.lightbox__image {
    max-width: 90vw;
    max-height: 80vh;
    object-fit: contain;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-xl);
    user-select: none;
    touch-action: none;
    /* Disable browser handling of gestures */
    transform-origin: center center;
    will-change: transform;
    /* Optimize performance */
    transition: opacity 0.25s ease;
    will-change: opacity;
    /* Performance hint for transitions */
    transform: translateZ(0);
    /* Force GPU acceleration */
    image-rendering: -webkit-optimize-contrast;
    /* Optimize image rendering */
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .lightbox__image {
        max-height: calc(100vh - 180px);
        box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
        /* Lighter shadow on mobile */
    }
}

/* Desktop: reduce image height to prevent overlap with filmstrip */
@media (min-width: 1024px) {
    .lightbox__image {
        max-height: 70vh;
        /* Reduced from 80vh to clear the thumbnail filmstrip */
        object-fit: contain;
    }

    .lightbox__image-container {
        padding-bottom: 1.5rem;
        /* Extra gap between image and filmstrip */
    }
}

.lightbox__loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 48px;
    height: 48px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--accent-gold);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 5;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.lightbox__loader--active {
    opacity: 1;
}

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

.lightbox__image--loading {
    opacity: 0.3;
    transition: opacity 0.3s ease;
}

.lightbox__caption {
    color: var(--text-secondary);
    font-size: var(--fs-small);
    margin-top: 0.75rem;
    text-align: center;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

/* Navigation Arrows */
.lightbox__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-base);
    pointer-events: auto;
    -webkit-tap-highlight-color: transparent;
    outline: none;
}

.lightbox__nav svg {
    stroke: var(--text-primary);
}

@media (hover: hover) {
    .subfilter-nav:hover {
        background: var(--bg-surface);
        color: var(--accent-gold);
        border-color: var(--accent-gold);
    }

    .subfilter-nav:hover svg {
        stroke: var(--accent-gold);
    }

    .lightbox__nav:hover {
        background: var(--accent-gold);
        border-color: var(--accent-gold);
    }

    .lightbox__nav:hover svg {
        stroke: var(--bg-primary);
    }
}

.lightbox__nav--prev {
    left: 1rem;
}

.lightbox__nav--next {
    right: 1rem;
}

/* Filmstrip */
.lightbox__filmstrip {
    position: relative;
    z-index: 2;
    display: flex;
    gap: 0.5rem;
    padding: 1rem;
    overflow-x: auto;
    max-width: 100%;
    scrollbar-width: none;
    -ms-overflow-style: none;
    flex-wrap: nowrap;
    pointer-events: auto;
    -webkit-overflow-scrolling: touch;
    /* Smooth scrolling on iOS */
    touch-action: pan-x;
    /* Only allow horizontal scrolling */
    transform: translateZ(0);
    /* GPU acceleration */
}

.lightbox__filmstrip::-webkit-scrollbar {
    display: none;
}

.lightbox__thumb {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    border: 2px solid transparent;
    opacity: 0.45;
    cursor: pointer;
    transition: opacity 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    /* Optimized transitions */
    will-change: opacity;
    /* Performance hint */
    transform: translateZ(0);
    /* GPU acceleration */
}

/* Mobile: Larger touch targets */
@media (max-width: 768px) {
    .lightbox__thumb {
        width: 64px;
        height: 64px;
    }
}

.lightbox__thumb:hover {
    opacity: 0.8;
}

.lightbox__thumb--active {
    opacity: 1;
    border-color: var(--accent-gold);
    box-shadow: 0 0 12px rgba(201, 168, 76, 0.4);
}

/* Counter */
.lightbox__counter {
    position: absolute;
    top: 1.25rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    font-family: var(--font-body);
    font-size: var(--fs-small);
    color: var(--text-muted);
    letter-spacing: var(--ls-wide);
    pointer-events: auto;
}

/* ── 06. BOOK ─────────────────────────────────────────────────────────────── */

.book__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-xl);
    align-items: start;
}

.book__cover {
    width: 100%;
    max-width: 300px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    transition: transform var(--transition-base);
    margin: 0 auto;
}

.book__cover:hover {
    transform: rotate(-2deg) scale(1.03);
}

.book__text h2 {
    margin-bottom: var(--space-md);
}

.book__quote {
    font-family: var(--font-heading);
    font-size: var(--fs-h3);
    font-style: italic;
    color: var(--accent-gold);
    border-left: 3px solid var(--accent-gold);
    padding-left: var(--space-md);
    margin: var(--space-lg) 0;
}

.book__actions {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
    margin-top: var(--space-lg);
    margin-bottom: var(--space-lg);
    /* Added space below buttons */
}

/* ── 07. NEWS ─────────────────────────────────────────────────────────────── */

.news__list-container {
    position: relative;
    overflow-x: hidden;
    padding-right: 0.5rem;
    /* Custom scrollbar */
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

/* On mobile, let it expand naturally to avoid scroll jumps and hidden scrollbars */
.news__list-container--expanded {
    /* No max-height or internal scroll on mobile, just let page expand natively */
    height: auto;
}

@media (min-width: 768px) {
    .news__list-container--expanded {
        max-height: 600px;
        overflow-y: auto;
    }
}

/* Force the scrollbar to always show on WebKit browsers (mobile included) */
.news__list-container::-webkit-scrollbar {
    width: 6px;
}

.news__list-container::-webkit-scrollbar-track {
    background: transparent;
}

.news__list-container::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
}

.news__list-container::-webkit-scrollbar-thumb:hover {
    background-color: var(--accent-gold);
}

.news__list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.news__more {
    text-align: center;
    margin-top: var(--space-xl);
}

/* ── 08. CONTACT ──────────────────────────────────────────────────────────── */

.contact__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-xl);
}

.contact__info-block {
    margin-bottom: var(--space-lg);
}

.contact__info-label {
    font-size: var(--fs-label);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: var(--ls-wider);
    color: var(--accent-gold);
    margin-bottom: var(--space-xs);
}

.contact__info-value {
    font-size: var(--fs-body);
    color: var(--text-primary);
}

.contact__info-value a {
    color: var(--text-primary);
    border-bottom: 1px solid var(--border);
    transition: border-color var(--transition-fast), color var(--transition-fast);
}

.contact__info-value a:hover {
    color: var(--accent-gold);
    border-color: var(--accent-gold);
}

/* ── CONTACT TOAST ────────────────────────────────────────────────────────── */
/* Fixed-position toast — sits above the page, never shifts the layout */

.contact-toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 8500;
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    padding: 1rem 1.25rem;
    background: var(--bg-secondary, #141414);
    border: 1px solid rgba(70, 180, 80, 0.35);
    border-radius: var(--radius-lg, 16px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.04);
    max-width: 340px;
    width: calc(100vw - 2rem);

    /* Entrance: spring scale-up from bottom-right, same curve as IMDb modal */
    animation: contact-toast-in 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;

    /* Exit transition (JS adds .contact-toast--hiding) */
    transition: opacity 0.4s ease, transform 0.4s ease;
}

@keyframes contact-toast-in {
    from {
        opacity: 0;
        transform: scale(0.88) translateY(16px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.contact-toast--hiding {
    opacity: 0 !important;
    transform: scale(0.92) translateY(12px) !important;
    pointer-events: none;
}

.contact-toast__icon {
    flex-shrink: 0;
    font-size: 1.25rem;
    line-height: 1.4;
}

.contact-toast__body {
    flex: 1;
}

.contact-toast__title {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 600;
    color: #46b450;
    margin: 0 0 0.2rem;
}

.contact-toast__text {
    font-size: 0.82rem;
    color: var(--text-secondary, #8a8a8a);
    margin: 0;
    line-height: 1.4;
}

.contact-toast__progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: rgba(70, 180, 80, 0.5);
    border-radius: 0 0 var(--radius-lg, 16px) var(--radius-lg, 16px);
    width: 100%;
    transform-origin: left center;
    animation: contact-toast-progress 8s linear forwards;
}

@keyframes contact-toast-progress {
    from {
        transform: scaleX(1);
    }

    to {
        transform: scaleX(0);
    }
}

.contact-toast__close {
    flex-shrink: 0;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted, #5a5a5a);
    padding: 0;
    line-height: 1;
    font-size: 1.1rem;
    transition: color var(--transition-base);
    -webkit-tap-highlight-color: transparent;
    align-self: flex-start;
}

@media (hover: hover) {
    .contact-toast__close:hover {
        color: var(--text-primary, #f0ede8);
    }
}

@media (max-width: 480px) {
    .contact-toast {
        bottom: 1rem;
        right: 1rem;
        left: 1rem;
        width: auto;
        max-width: none;
    }
}

.contact__form {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.contact__form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.contact__form-label {
    font-size: var(--fs-small);
    font-weight: 500;
    color: var(--text-secondary);
}

.contact__form-input,
.contact__form-textarea {
    width: 100%;
    padding: 0.85rem 1rem;
    font-family: var(--font-body);
    font-size: var(--fs-body);
    color: var(--text-primary);
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    outline: none;
}

.contact__form-input:focus,
.contact__form-textarea:focus {
    border-color: var(--accent-gold);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.contact__form-textarea {
    resize: vertical;
    min-height: 140px;
}

/* ── FOOTER ───────────────────────────────────────────────────────────────── */

.site-footer {
    background: var(--bg-primary);
    border-top: 1px solid var(--border);
    padding: var(--space-md) 0;
    /* Reduced from --space-xl/lg */
}

.footer__top {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-md);
    /* Reduced from --space-lg */
    margin-bottom: var(--space-md);
    /* Reduced from --space-lg */
    padding-bottom: var(--space-md);
    /* Reduced from --space-lg */
    border-bottom: 1px solid var(--border);
}

.footer__logo {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.footer__logo span {
    color: var(--accent-gold);
}

.footer__bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    /* Reduced from --space-sm */
    text-align: center;
}

.footer__copyright {
    font-size: var(--fs-small);
    color: var(--text-muted);
}

.footer__imdb {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: var(--fs-small);
    color: var(--accent-gold);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: var(--ls-wide);
}

/* ── IMDb REDIRECT MODAL ──────────────────────────────────────────────────── */

.imdb-modal {
    position: fixed;
    inset: 0;
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    pointer-events: none;
}

.imdb-modal--active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.imdb-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(8, 8, 8, 0.82);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    cursor: pointer;
}

.imdb-modal__box {
    position: relative;
    z-index: 1;
    background: var(--bg-secondary, #141414);
    border: 1px solid rgba(201, 168, 76, 0.25);
    border-radius: var(--radius-lg, 16px);
    padding: 2.25rem 2rem 1.75rem;
    max-width: 360px;
    width: calc(100% - 2rem);
    text-align: center;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.04);
    transform: scale(0.92) translateY(12px);
    transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.25s ease;
    opacity: 0;
}

.imdb-modal--active .imdb-modal__box {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.imdb-modal__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    background: var(--accent-glow, rgba(201, 168, 76, 0.12));
    border: 1px solid rgba(201, 168, 76, 0.3);
    border-radius: 50%;
    margin: 0 auto 1.25rem;
    color: var(--accent-gold, #c9a84c);
}

.imdb-modal__icon svg {
    stroke: var(--accent-gold, #c9a84c);
}

.imdb-modal__title {
    font-family: var(--font-heading);
    font-size: var(--fs-h4, 1.15rem);
    font-weight: 600;
    color: var(--text-primary, #f0ede8);
    margin: 0 0 0.5rem;
    letter-spacing: 0.01em;
}

.imdb-modal__subtitle {
    font-size: var(--fs-small, 0.875rem);
    color: var(--text-secondary, #8a8a8a);
    margin: 0 0 1.5rem;
    line-height: 1.5;
}

.imdb-modal__countdown {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1.75rem;
    padding: 0.6rem 1.25rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border, rgba(255, 255, 255, 0.08));
    border-radius: 100px;
    font-size: var(--fs-small, 0.875rem);
    color: var(--text-muted, #5a5a5a);
}

.imdb-modal__countdown-num {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent-gold, #c9a84c);
    min-width: 1.2ch;
    display: inline-block;
    transition: transform 0.2s ease;
}

.imdb-modal__countdown-num.pulse {
    transform: scale(1.3);
}

.imdb-modal__actions {
    display: flex;
    gap: 0.75rem;
}

.imdb-modal__btn {
    flex: 1;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm, 8px);
    font-family: var(--font-body);
    font-size: var(--fs-small, 0.875rem);
    font-weight: 600;
    letter-spacing: 0.03em;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all var(--transition-base, 0.2s ease);
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

.imdb-modal__btn--cancel {
    background: transparent;
    border-color: var(--border, rgba(255, 255, 255, 0.1));
    color: var(--text-secondary, #8a8a8a);
}

@media (hover: hover) {
    .imdb-modal__btn--cancel:hover {
        border-color: var(--text-secondary, #8a8a8a);
        color: var(--text-primary, #f0ede8);
    }
}

.imdb-modal__btn--continue {
    background: var(--accent-gold, #c9a84c);
    border-color: var(--accent-gold, #c9a84c);
    color: #0d0d0d;
}

@media (hover: hover) {
    .imdb-modal__btn--continue:hover {
        background: #d4b45a;
        border-color: #d4b45a;
        box-shadow: 0 4px 16px rgba(201, 168, 76, 0.35);
        transform: translateY(-1px);
    }
}

.imdb-modal__btn--continue:active {
    transform: translateY(0);
    box-shadow: none;
}

@media (max-width: 480px) {
    .imdb-modal__box {
        padding: 1.75rem 1.25rem 1.5rem;
    }

    .imdb-modal__actions {
        flex-direction: column-reverse;
    }
}