/* --- 1. CORE & ROOT --- */ :root {
    --dark: #0a0a0a;
    --light: #fdfdfd;
    /* Muted Cinematic Palette */
    --fill-1: #7ca8a8; /* Pale Teal (Bio/About) */
    --fill-2: #a67d6a; /* Muted Clay (Contact) */
    --fill-3: #4e5a5f; /* Deep Slate (Secondary/Neutral) */
    --highlight: #c9b091; /* Dusty Gold (CTAs / Labels) */
}
a {
    color: var(--fill-3); /*text-decoration: none;
    border-bottom: 1px solid rgba(78, 90, 95, 0.3);
    padding-bottom: 2px; 
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);*/
}
a:hover {
    color: var(--highlight);
    border-bottom-color: var(--highlight); /* padding-bottom: 4px;*/ /* Subtle cinematic "dip" on hover */
    /* Optional: Small tracking expansion often used in high-end sites */
    /*    letter-spacing: 0.2px; */
}
* {
    box-sizing: border-box;
}
body {
    margin: 0;
    font-family: -apple-system, system-ui, sans-serif;
    background: var(--light);
    color: #222;
    overflow-x: hidden;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
/* --- HEADER & SHRINK LOGIC --- */
.header {
    width: 100%;
    height: 100vh;
    position: sticky;
    top: calc(-100vh + 70px);
    left: 0;
    background: #000;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    flex-direction: column;
    overflow: hidden;
    transition: background 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
#header-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
    opacity: 0.5;
    transition: opacity 0.8s ease;
}
/* On screens where height is greater than width (9:16 / Portrait) */
@media (max-aspect-ratio: 1/1) {
    #header-video {
        /* This forces the browser to prioritize the portrait framing */
        object-position: center center;
    }
}
/* Container Logic */
.hero-title {
    width: 65%; /* Increased slightly to account for the detailed paths */
    max-width: 850px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    margin: 0;
    z-index: 2;
    /* letter-spacing must be 0 for SVG */
    letter-spacing: 0 !important; 
}

.nav-logo {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    opacity: 0;
    z-index: 10;
    cursor: pointer;
    transition: opacity 0.4s ease;
    letter-spacing: 0 !important;
	font-size: 1rem;
}

/* SVG Logic */
.logo-svg {
    fill: currentColor;
    height: auto;
    display: block;
}

.hero-title .logo-svg {
    width: 100%;
}

.nav-logo .logo-svg {
    height: 24px; /* Matches your old 1.1rem visual height */
    width: auto;
}
/* SHRUNK STATE */
.header.shrunk {
    background: rgba(10, 10, 10, 0.98);
    backdrop-filter: blur(10px);
}
/* Cross-Fade Logic */
.header.shrunk .hero-title {
    opacity: 0;
    transform: translateY(-20px); /* Subtle drift up as it fades */
    pointer-events: none;
}
.header.shrunk .nav-logo {
    opacity: 1;
}
#header-meta {
    text-align: center;
    z-index: 2;
    transition: opacity 0.4s ease, transform 0.4s ease;
}
.header.shrunk #header-meta, .header.shrunk #header-video, .header.shrunk .scroll-down {
    opacity: 0;
    visibility: hidden;
}
.header-cv-btn {
    display: inline-block;
    margin-top: 30px;
    padding: 12px 25px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    text-decoration: none;
    font-size: 10px;
    letter-spacing: 3px;
    text-transform: uppercase;
    transition: 0.3s;
}
.header-cv-btn:hover {
    background: white;
    color: black;
    border-color: white;
}
/* SHRUNK STATE (NAV BAR) */
.header.shrunk {
    background: rgba(10, 10, 10, 0.98);
    backdrop-filter: blur(10px);
}
.header.shrunk h1 {
    font-size: 1rem;
    letter-spacing: 5px;
    font-weight: 700;
}
.header.shrunk #header-video, .header.shrunk #header-meta, .header.shrunk .scroll-down {
    opacity: 0;
    pointer-events: none;
}
.scroll-down {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    cursor: pointer;
    z-index: 10;
    text-align: center;
    padding: 20px; /* Expands the 'hit zone' without moving the icon */
    transition: transform 0.3s ease;
}
.scroll-down:hover {
    transform: translateX(-50%) translateY(5px); /* Subtle bounce on hover */
}
.scroll-down span, .scroll-down svg {
    pointer-events: none; /* This ensures the click always registers on the parent div */
}
/* --- 3. LAYOUT & SIDEBAR (Updated for Sticky Interaction) --- */
.body-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0;
    transition: opacity 0.8s ease;
    background: var(--light);
    z-index: 10;
}
.body-container.loaded {
    opacity: 1;
}
.content-width {
    width: 85%;
    max-width: 1440px;
    padding: 40px 0;
}
.grid-wrapper {
    display: flex;
    flex-direction: row;
    gap: 60px;
    align-items: flex-start;
    width: 100%;
}
.filter-controls {
    position: sticky;
    top: 140px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 1000;
    width: 130px;
    flex-shrink: 0;
    transition: all 0.5s ease;
}
.filter-btn-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}
.filter-btn {
    background: white;
    border: 1px solid #eee;
    padding: 14px 8px;
    cursor: pointer;
    font-size: 10px;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--dark);
    text-align: center;
    transition: all 0.3s ease;
    letter-spacing: 2px;
    position: relative;
}
/* --- FILTER INTERACTION LOGIC --- */
.filter-btn.active {
    background: var(--dark);
    color: white;
    border-color: var(--dark);
    animation: active-pulse-subtle 2s infinite ease-in-out;
}
.filter-btn.active::after {
    content: '';
    position: absolute;
    right: -10px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    border-left: 10px solid var(--dark);
    z-index: 10;
}
@media (hover: hover) {
    .filter-btn:hover:not(.active) {
        background: var(--highlight);
        color: white;
        border-color: var(--highlight);
    }
}
.filter-tooltip {
    margin-top: 15px;
    padding: 6px 10px;
    border: 1px solid #eee;
    font-size: 10px;
    font-weight: 200;
    letter-spacing: 2px;
    line-height: 20px;
    color: var(--dark);
    text-align: left;
    width: 100%;
    transition: all 0.2s ease;
}
.filter-btn:hover ~ .filter-tooltip {
    background: #f0f0f0;
}
/* --- 4. THE PROJECT GRID & SECTIONS --- */
.grid-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 60px 30px;
    width: 100%;
}
/* Instagram specific grid */
.instagram-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 4 Columns */
    gap: 20px;
}
/* Ensure images fill the wrapper properly */
.instagram-grid .image-wrap img {
    width: 100%;
    height: 100%;
}
.post-link {
    text-decoration: none !important; /* Kills underlines for good */
    color: inherit;
    display: block;
    transition: 0.4s;
}
.post-link:hover {
    text-decoration: none !important;
}
/* --- 4. THE PROJECT GRID & SECTIONS --- */
.section-divider {
    border: none;
    height: 8px; /* Slightly shorter for a sleeker look */
    width: 100%;
    margin: 60px 0;
    /* stroke-width="0.5" for a hairline effect */
    /* stroke-opacity="0.4" makes it feel lighter without losing the 90-degree sharpness */
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="8" viewBox="0 0 16 8"><path d="M0 0 L8 8 L16 0" fill="none" stroke="black" stroke-width="0.2" stroke-opacity="0.5" vector-effect="non-scaling-stroke"/></svg>');
    background-repeat: repeat-x;
    background-position: center;
}
section {
    scroll-margin-top: 150px;
    margin-bottom: 60px;
    width: 100%;
}
.hidden-item {
    display: none !important;
}
/* 5.1 THE BASE CONTAINER */
.image-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #000;
    border: 2px solid #000;
    transition: all 0.3s ease;
    /* Center graphics for Static Cards */
    display: flex;
    align-items: center;
    justify-content: center;
}
/* 5.2 FILM GRAIN OVERLAY */
.image-wrap::before {
    content: "";
    position: absolute;
    top: -100%;
    left: -100%;
    width: 300%;
    height: 300%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 256px 256px;
    opacity: 0;
    z-index: 10;
    pointer-events: none;
    transition: opacity 0.4s ease;
    animation: grain-jitter 0.2s steps(2) infinite;
}
.post-link:hover .image-wrap::before {
    opacity: 0.25;
}
/* 5.3 ASSET STYLING (Images & Graphics) */
.image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    filter: blur(0px) brightness(1);
    transition: filter 0.6s ease, transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.card-main-icon {
    z-index: 3;
    position: relative;
    transition: all 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}
.card-main-icon.bio-photo {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    border: 4px solid var(--light);
    background-size: cover;
    background-position: center;
}
/* 5.4 VIDEO & HOVER INTERACTIONS */
.hover-video, .vimeo-hover-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    z-index: 1;
    pointer-events: none;
    transition: opacity 0.5s ease 0.1s, transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.hover-video {
    transform: scale(1.36);
    transform-origin: center center;
}
.post-link:hover .image-wrap img {
    filter: blur(10px) brightness(0.5);
}
.post-link:hover .hover-video {
    opacity: 1;
    transform: scale(1.42);
}
.post-link:hover .vimeo-hover-container {
    opacity: 1;
}
.post-link:hover .card-main-icon {
    transform: scale(1.05) translateY(-5px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6);
}
/* 5.5 HOVER OVERLAY (Tags) */
.post-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    opacity: 0;
    z-index: 11;
    transition: opacity 0.4s ease;
    text-align: center;
    color: white;
    pointer-events: none;
}
.post-link:hover .post-overlay {
    opacity: 1;
}
.overlay-caption {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
    line-height: 1.6;
}
/* 5.6 STATIC CARD FILLS & PATTERNS */
.static-card-inner {
    background-repeat: repeat !important;
    background-size: 140px 140px !important;
}
.showreel-card-inner {
    background-color: var(--fill-3) !important;
}
.bio-card-inner {
    background-color: var(--fill-1) !important;
}
.contact-card-inner {
    background-color: var(--fill-2) !important;
}
.showreel-card-inner, .bio-card-inner {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200' viewBox='0 0 200 200'%3E%3Cg fill='none' stroke='white' stroke-width='0.8' stroke-opacity='0.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cg transform='translate(20,15) rotate(15) scale(1.6)'%3E%3Cpath d='m12.296 3.464 3.02 3.956'/%3E%3Cpath d='M20.2 6 3 11l-.9-2.4c-.3-1.1.3-2.2 1.3-2.5l13.5-4c1.1-.3 2.2.3 2.5 1.3z'/%3E%3Cpath d='M3 11h18v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z'/%3E%3Cpath d='m6.18 5.276 3.1 3.899'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") !important;
}
.contact-card-inner {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200' viewBox='0 0 200 200'%3E%3Cg fill='none' stroke='white' stroke-width='0.8' stroke-opacity='0.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cg transform='translate(30,50) rotate(-20) scale(1.6)'%3E%3Ccircle cx='6' cy='6' r='3'/%3E%3Ccircle cx='6' cy='18' r='3'/%3E%3Cline x1='20' y1='4' x2='8.12' y2='15.88'/%3E%3Cline x1='14.47' y1='14.48'/%3E%3Cline x1='8.12' y1='8.12' x2='12' y2='12'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") !important;
}
/* 5.7 UNIFIED ACTIVE LOGIC (MATCHED BRIGHTNESS) */
.post-link.is-active .image-wrap img {
    filter: grayscale(0.5) brightness(0.3) blur(3px) !important;
}
.post-link.is-active .card-main-icon {
    filter: grayscale(1) blur(5px) brightness(0.4) !important;
    opacity: 0.5;
}
/* The Label Fix */
.post-link.is-active .image-wrap::after {
    content: 'JUST VIEWED';
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 5px 8px;
    border-top: 2px solid #fff;
    border-right: 2px solid #fff;
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    opacity: 0.9;
    z-index: 12;
    pointer-events: none;
}
/* 5.8 META INVERT */
.post-link:hover .post-meta-under, .post-link.is-active .post-meta-under {
    background: #000 !important;
}
.post-link:hover .meta-title, .post-link.is-active .meta-title, .post-link:hover .meta-category, .post-link.is-active .meta-category, .post-link:hover .meta-sep, .post-link.is-active .meta-sep {
    color: #fff !important;
}
/* --- 6. THE META FOOTER (CLEAN NO-UNDERLINE LOOK) --- */
.post-meta-under {
    padding: 18px 15px;
    background: #fff;
    border: 2px solid #000;
    border-top: none;
    text-align: left;
    transition: all 0.3s ease;
    text-decoration: none !important; /* Ensures meta section stays clean */
}
.meta-title {
    font-size: 14px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2.5px;
    color: #000;
    margin-bottom: 6px;
    line-height: 1.1;
    transition: color 0.3s ease;
}
.meta-category {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #000;
    transition: color 0.3s ease;
}
.meta-sep {
    margin: 0 6px;
    font-weight: 900;
    color: #000;
    transition: color 0.3s ease;
}
/* --- LOAD MORE BUTTON (Matches .project-btn) --- */
.section-load-more {
    display: inline-block;
    padding: 15px 30px;
    border: 1px solid #000;
    background: transparent; /* Ensures no default button shading */
    color: #000;
    text-decoration: none;
    font-weight: 800;
    font-size: 10px;
    letter-spacing: 2px;
    text-transform: uppercase;
    transition: all 0.3s ease;
    text-align: center;
    cursor: pointer;
    outline: none;
}
/* Hover State */
.section-load-more:hover {
    background: #000;
    color: #fff;
}
/* Centering Container (Optional but recommended) */
.load-more-container {
    padding: 60px 0;
    text-align: center;
    width: 100%;
}
/* --- 8. FOOTER & HEADLINE SLIDE --- */
.main-footer {
    width: 100%;
    background: #fafafa;
    border-top: 1px solid #eee;
    padding: 100px 0;
    text-align: center;
    color: #ccc;
    font-size: 10px;
    letter-spacing: 2px;
    clear: both;
}
.footer-social-row {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin-bottom: 30px;
    align-items: center;
}
.footer-social-icon {
    color: #999;
    transition: all 0.3s ease;
    text-decoration: none;
}
.footer-social-icon:hover {
    color: var(--highlight, #d4af37);
    transform: translateY(-2px);
}
.imdb-icon-text {
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0px;
    border: 1.5px solid currentColor;
    padding: 1px 4px;
    border-radius: 3px;
    line-height: 1;
}
/* Ensure the main title is properly spaced below icons */
.footer-copyright {
    margin-top: 20px;
    letter-spacing: 4px;
    font-weight: 800;
}
.headline-slide {
    text-align: center;
    font-size: 11px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: #ddd;
    margin-top: 25px;
    line-height: 1.5;
}
.word-wrapper {
    height: 30px;
    overflow: hidden;
    margin-top: 5px;
    position: relative;
    z-index: 2;
}
.headline-container {
    display: inline-block;
    padding-bottom: 5px; /* Extra room for the stroke */
}
/* --- HAND-DRAWN ACCENT --- */
.hand-drawn-line {
    position: absolute;
    bottom: -20px; /* Adjusted to sit closer for 0.5 stroke */
    left: 30%; /* Centering the 60% width */
    width: 40%;
    height: 10px;
    z-index: 1;
    pointer-events: none;
    overflow: visible;
}
.hand-drawn-line path {
    fill: none;
    stroke: var(--highlight, );
    stroke-width: 0.8;
    stroke-linecap: round;
    vector-effect: non-scaling-stroke;
    /* Animation: 1s Delay, 0.6s Duration, Snappy Finish */
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: drawInQuick 1.6s cubic-bezier(0.25, 1, 0.5, 1) forwards 0.5s;
}
@keyframes drawInQuick {
    from {
        stroke-dashoffset: 1000;
    }
    to {
        stroke-dashoffset: 0;
    }
}
.word-list {
    display: flex;
    flex-direction: column;
    animation: slide-up-nine-long 36s cubic-bezier(0.85, 0, 0.15, 1) infinite;
}
.word-list b {
    height: 30px;
    line-height: 30px;
    display: block;
    font-weight: 200;
    color: #fff;
    white-space: nowrap;
}
/* --- 9. ANIMATIONS --- */
@keyframes grain-jitter {
    0% {
        transform: translate(0, 0);
    }
    25% {
        transform: translate(-1%, -1%);
    }
    50% {
        transform: translate(1%, 1%);
    }
    75% {
        transform: translate(-1%, 1%);
    }
    100% {
        transform: translate(1%, -1%);
    }
}
@keyframes slide-up-nine-long {
    0%, 9% {
        transform: translateY(0);
    }
    11%, 20% {
        transform: translateY(-30px);
    }
    22%, 31% {
        transform: translateY(-60px);
    }
    33%, 42% {
        transform: translateY(-90px);
    }
    44%, 53% {
        transform: translateY(-120px);
    }
    55%, 64% {
        transform: translateY(-150px);
    }
    66%, 75% {
        transform: translateY(-180px);
    }
    77%, 86% {
        transform: translateY(-210px);
    }
    88%, 97% {
        transform: translateY(-240px);
    }
    100% {
        transform: translateY(-270px);
    }
}
/* Pulse Animation - Adjusted to be subtle background pulse only, no box-shadow */
@keyframes active-pulse-subtle {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.85;
    }
    100% {
        opacity: 1;
    }
}
.filter-btn.active {
    animation: active-pulse-subtle 2s infinite ease-in-out;
}
/* --- 10. RESPONSIVE --- */
@media (max-width: 1200px) {
    .grid-wrapper {
        flex-direction: column;
        gap: 40px;
    }
    .filter-controls {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 100vw;
        position: sticky;
        top: 70px;
        background: var(--light);
        padding: 20px 0;
        margin-left: calc(-50vw + 50%);
        margin-right: calc(-50vw + 50%);
        border-bottom: 1px solid #eee;
        z-index: 100;
        gap: 5px;
    }
    .filter-btn-group {
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;
        gap: 10px;
    }
    .filter-tooltip {
        order: -1;
        margin-top: 0;
        width: auto;
        min-width: 180px;
        text-align: center;
    }
    .filter-btn.active::after {
        right: auto;
        left: 50%;
        bottom: -10px;
        top: auto;
        transform: translateX(-50%);
        border-left: 10px solid transparent;
        border-right: 10px solid transparent;
        border-top: 10px solid var(--dark);
        border-bottom: none;
    }
}
/* Responsive adjustment: drop to 2 columns on mobile */
@media (max-width: 1024px) {
    .instagram-grid {
        grid-template-columns: repeat(3, 1fr); /* 2 Columns on Tablet */
    }
}
@media (max-width: 768px) {
    .grid-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    .content-width {
        width: 92%;
    }
}
@media (max-width: 600px) {
    .headline-slide {
        font-size: 9px;
        letter-spacing: 2px;
    }
    .word-list b {
        white-space: normal;
        line-height: 1.2;
        padding-top: 5px;
    }
    .instagram-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 Columns on Tablet */
    }
}
@media (max-width: 600px) {
    .headline-slide {
        font-size: 9px;
        letter-spacing: 2px;
    }
    .word-list b {
        white-space: normal;
        line-height: 1.2;
        padding-top: 5px;
    }
}
@media (max-width: 480px) {
    .grid-container {
        grid-template-columns: 1fr;
    }
    .scroll-down {
        bottom: 120px;
    }
}
@media (max-width: 480px) {
    /* If the item is 'is-active' (open in lightbox), 
       force the grid video to stay hidden even if JS fails to remove the class */
    .post-link.is-active .hover-video,
    .post-link.is-active .image-wrap::before {
        opacity: 0 !important;
        visibility: hidden;
    }
}

@media (max-width: 480px) {
	
	 /* 1. Ensure the container creates a stacking context */
    .image-wrap {
        position: relative;
        overflow: hidden;
        z-index: 1;
    }

    /* 2. Base Video State: Hidden by default */
    .post-link .hover-video {
        display: block !important;
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        opacity: 0;
        z-index: 2; /* Sits above the <img> (z:1) */
        transition: opacity 0.5s ease;
        pointer-events: none;
    }

    /* 3. The Grain (Overlay) */
    .image-wrap::before {
        /* Keep your existing grain SVG background & animation here */
        z-index: 5; /* Highest layer: sits on top of video */
        pointer-events: none;
    }

    /* --- THE REVEAL (Triggered by JS) --- */

    /* Fade in the Video */
    .post-link.video-playing .hover-video {
        opacity: 1 !important;
    }

    /* Fade in the Grain at your subtle intensity */
    .post-link.video-playing .image-wrap::before {
        opacity: 0.12 !important; 
    }
}
/* --- LIGHTBOX CONTAINER --- */
.project-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    /* 1. Remove display: none */
    display: block;
    /* 2. Set initial hidden state */
    opacity: 0;
    visibility: hidden;
    /* 3. Smooth transition for opacity and the blur effect */
    transition: opacity 0.4s ease, visibility 0.4s ease, backdrop-filter 0.4s ease;
    overflow-y: auto;
    backdrop-filter: blur(0px); /* Start at 0 for the transition */
    -webkit-backdrop-filter: blur(0px);
    -webkit-overflow-scrolling: touch;
}
/* 4. Active State */
.project-lightbox.is-open {
    opacity: 1;
    visibility: visible;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
}
/* --- THE LIGHT CONTENT CARD --- */
.lightbox-content {
    width: 90%;
    max-width: 1000px;
    margin: 60px auto; /* Centered with a gap at top/bottom */
    background: #fdfdfd; /* Off-white for better eye comfort than pure white */
    color: #111; /* Dark text for legibility */
    padding: 0px;
    border-radius: 10px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}
/* --- LIGHT THEME TYPOGRAPHY --- */
.lightbox-title {
    color: #000;
    font-size: 2rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 10px;
}
.lightbox-meta {
    color: #666; /* Grey for metadata */
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid #eee;
    padding-bottom: 20px;
    margin-bottom: 30px;
}
.lightbox-description {
    color: #333;
    font-size: 16px;
    line-height: 1.6;
}
/* Black Circle Close Button */
.close-lightbox-circle {
    width: 70px;
    height: 70px;
    background-color: #000;
    border-radius: 50%;
    /* Perfect Centering */
    display: flex;
    align-items: center;
    justify-content: center;
    /* Kill the &nbsp; ghost spaces */
    font-size: 0;
    line-height: 0;
    text-indent: 0;
    margin: 20px auto 40px auto;
    cursor: pointer;
    transition: transform 0.2s ease;
    /*box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);*/
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.close-lightbox-circle svg {
    width: 20px;
    height: 20px;
    display: block;
    margin: 0;
    padding: 0;
    pointer-events: none; /* Clicks pass through to the circle */
}
.close-lightbox-circle:hover {
    transform: scale(1.1);
    background-color: #333;
}
/* Hide your old close-lightbox class if it still exists in CSS */
.close-lightbox {
    display: none;
}
/* --- THE FREEZE LOGIC --- */
body.lightbox-open {
    overflow: hidden !important;
    height: 100vh;
}
/* MOBILE ADJUSTMENTS */
@media (max-width: 768px) {
    .lightbox-content {
        width: 100%;
        margin: 0; /* Remove the "floating" gap */
        min-height: 100vh;
        border-radius: 0;
    }
    .close-lightbox {
        top: 15px;
        right: 15px;
        color: #000; /* Switch X to black if it sits on the light card now */
        background: none;
    }
}
/* Only apply hover styles (scaling, overlays, etc.) to mouse users */
@media (hover: none) {
    .post-link .hover-video {
        display: none;
    }
    .post-link .post-overlay{
        display: none;
    }	
	.filter-btn:active {
        background: #eee;
        transition: 0s;
    }
}