/* --- GLOBAL VARIABLES --- */
:root { 
    --bg: #111111; 
    --text: #ffffff; 
    --accent: #D4F238; 
    --secondary: #888888; 
    --font-head: 'Syne', sans-serif; 
    --font-body: 'Montserrat', sans-serif; 
}

/* --- RESET & BASICS --- */
* { margin: 0; padding: 0; box-sizing: border-box; }

body { 
    background-color: var(--bg); 
    color: var(--text); 
    font-family: var(--font-body); 
    overflow-x: hidden; 
    width: 100%; 
    cursor: none; /* Custom cursor everywhere */
}

a, button, .menu-btn, .filter-btn, .back-to-top, .theme-swatch, .btn, .next-project { cursor: none; }
a { text-decoration: none; color: inherit; }
img, video { display: block; max-width: 100%; height: auto; }

/* --- VISUAL FX (FILM GRAIN) --- */
.film-grain {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none; z-index: 1; opacity: 0.12;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'%3E%3Canimate attributeName='seed' values='0;10;20;30;40;0' dur='0.2s' repeatCount='indefinite'/%3E%3C/feTurbulence%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* --- NAVIGATION --- */
nav {
    position: sticky;
    top: 0;
    z-index: 9999;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%; 
    background: rgba(14, 14, 14, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
nav * { pointer-events: auto; }
.logo { font-family: var(--font-head); font-weight: 800; font-size: 1.5rem; text-transform: uppercase; letter-spacing: 1px; }
.menu-btn { font-weight: 700; text-transform: uppercase; letter-spacing: 1px; font-size: 0.9rem; cursor: pointer; }

/* --- MENU OVERLAY --- */
.menu-overlay { 
    position: fixed; top: 0; left: 0; width: 100%; height: 100vh; 
    background: rgba(5, 5, 5, 0.7); 
    backdrop-filter: blur(30px) saturate(120%); 
    -webkit-backdrop-filter: blur(30px) saturate(120%);
    z-index: 9990; 
    transform: translateY(-100%); 
    display: flex; flex-direction: column; justify-content: center; align-items: center; 
}
.menu-link { 
    font-family: var(--font-head); font-size: 5vw; color: #fff; 
    text-transform: uppercase; margin: 1rem 0; 
    transition: color 0.3s; opacity: 0; transform: translateY(20px); 
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}
.menu-link:hover { color: var(--accent); }

.theme-container { margin-top: 3rem; display: flex; gap: 1.5rem; opacity: 0; transform: translateY(20px); }
.theme-label { position: absolute; top: -30px; left: 50%; transform: translateX(-50%); color: #bbb; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 2px; font-family: var(--font-body); white-space: nowrap; }
.theme-swatch { width: 30px; height: 30px; border-radius: 50%; border: 2px solid transparent; transition: transform 0.3s, border-color 0.3s; position: relative; }
.theme-swatch:hover { transform: scale(1.3); }
.theme-swatch.active { border-color: #fff; transform: scale(1.1); }

/* --- HOME PAGE SPECIFIC --- */
.hero { 
    height: 90vh; min-height: 600px;
    display: flex; flex-direction: column; justify-content: center; align-items: center; 
    position: relative; padding: 0 2rem; overflow: hidden; z-index: 2; 
}
#noiseCanvas {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    z-index: 0; opacity: 0.25; mix-blend-mode: hard-light; 
}
.hero-title { 
    font-family: var(--font-head); font-size: clamp(2.5rem, 10vw, 12rem); 
    font-weight: 800; line-height: 0.9; text-align: center; text-transform: uppercase; 
    position: relative; z-index: 2;
}
.hero-sub { 
    margin-top: 2rem; text-transform: uppercase; letter-spacing: 2px; 
    color: var(--accent); font-size: 0.9rem; font-weight: 700; 
    text-align: center; line-height: 1.5; position: relative; z-index: 2;
}
.divider { margin: 0 0.5rem; color: var(--accent); }

/* --- ABOUT SECTION (HOME) --- */
.about-section-home { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    min-height: 60vh; 
    border-top: 1px solid #222; 
    border-bottom: 1px solid #222; /* Added separation */
    background: #111;
}
.about-img { 
    background: url('https://static.wixstatic.com/media/6b3324_1da4837d5ac04f5599ed4bd888bf7f56~mv2.jpg') no-repeat center center/cover; 
    filter: grayscale(100%); 
    transition: 0.5s; 
    position: relative; 
    z-index: 10; 
    min-height: 400px;
}
.about-img:hover { filter: grayscale(0%); }
.about-content { 
    padding: 10%; 
    display: flex; 
    flex-direction: column; 
    justify-content: center; 
    background: #151515; /* Slightly lighter bg for depth */
    position: relative;
}
.about-btn { 
    display: inline-block; 
    margin-top: 3rem; 
    background: transparent; 
    color: var(--accent); 
    border: 1px solid var(--accent);
    padding: 1rem 2rem; 
    font-weight: 800; 
    text-transform: uppercase; 
    font-family: var(--font-head); 
    transition: 0.3s; 
    width: fit-content;
}
.about-btn:hover { background: var(--accent); color: black; }

/* Masonry Grid */
.masonry-container { padding: 4rem 3rem; display: flex; gap: 4rem; }
.masonry-col { display: flex; flex-direction: column; gap: 8rem; width: 50%; }
.masonry-col:nth-child(2) { margin-top: 12rem; }

.project-item { position: relative; display: block; transition: opacity 0.5s ease; }
.project-item.hidden { display: none; opacity: 0; }
.p-img-wrap { border-radius: 4px; margin-bottom: 1.5rem; position: relative; background: #1a1a1a; overflow: hidden; z-index: 10; }
.p-img { transition: transform 0.6s ease; width: 100%; }
.project-item:hover .p-img { transform: scale(1.05); }
.p-meta { display: flex; justify-content: space-between; align-items: flex-start; }
.p-title { font-family: var(--font-head); font-size: 2.5rem; font-weight: 700; text-transform: uppercase; line-height: 1; }
.p-tags { color: var(--secondary); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 1px; text-align: right; }

/* iPhone Frame */
.iphone-frame {
    border: 12px solid #222; border-radius: 30px; 
    background: #000; aspect-ratio: 9/18; 
    width: 60%; margin: 0 auto; position: relative;
    z-index: 10; overflow-y: auto; overflow-x: hidden; 
    pointer-events: auto; scrollbar-width: none; -ms-overflow-style: none;
}
.iphone-frame::-webkit-scrollbar { display: none; }
.scroll-img { width: 100%; height: auto; display: block; pointer-events: none; }
.iphone-notch { position: sticky; top: 0; left: 50%; transform: translateX(-50%); width: 40%; height: 20px; background: #222; border-bottom-left-radius: 10px; border-bottom-right-radius: 10px; z-index: 10; }

/* --- ABOUT PAGE SPECIFIC --- */
.about-hero {
    display: grid; grid-template-columns: 1fr 1fr; min-height: 90vh;
    padding: 0 3rem; align-items: center; gap: 4rem; padding-top: 100px;
    position: relative; z-index: 2;
}
.hero-text h1 { font-family: var(--font-head); font-size: clamp(3rem, 5vw, 5rem); line-height: 0.9; text-transform: uppercase; margin-bottom: 2rem; color: white; }
.hero-text .accent-text { color: transparent; -webkit-text-stroke: 1px var(--accent); }
.hero-text p { font-size: 1.2rem; color: #ccc; max-width: 600px; line-height: 1.6; margin-bottom: 2rem; font-weight: 300; }
.hero-image { position: relative; height: 70vh; width: 100%; overflow: hidden; border-radius: 4px; }
.hero-image img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(100%); transition: filter 0.5s ease; }
.hero-image:hover img { filter: grayscale(0%); }

.toolbelt-section { padding: 6rem 3rem; position: relative; z-index: 2; }
.section-title { font-family: var(--font-head); font-size: 2rem; text-transform: uppercase; margin-bottom: 3rem; border-left: 4px solid var(--accent); padding-left: 1rem; color: white; }
.skills-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem; }
.skill-card { background: #1a1a1a; padding: 2rem; border-radius: 4px; transition: transform 0.3s ease, background 0.3s ease; border: 1px solid #333; height: 100%; display: flex; flex-direction: column; justify-content: center; }
.skill-card:hover { transform: translateY(-5px); background: #222; border-color: var(--accent); }
.skill-header { display: flex; align-items: center; gap: 1rem; margin-bottom: 0.5rem; }
.skill-icon { width: 24px; height: 24px; fill: var(--accent); }
.skill-name { font-weight: 700; font-size: 1.2rem; color: white; font-family: var(--font-head); text-transform: uppercase; }
.skill-detail { font-size: 0.9rem; color: var(--secondary); margin-left: calc(24px + 1rem); }

.timeline-section { padding: 6rem 3rem; position: relative; z-index: 2; }
.timeline-container { max-width: 800px; margin: 0 auto; position: relative; padding-left: 2rem; border-left: 2px solid #333; }
.timeline-item { position: relative; margin-bottom: 4rem; padding-left: 2rem; }
.timeline-item::before { content: ''; position: absolute; left: -2.6rem; top: 5px; width: 16px; height: 16px; background: var(--bg); border: 2px solid var(--accent); border-radius: 50%; transition: background 0.3s; }
.timeline-item:hover::before { background: var(--accent); }
.date { color: var(--accent); font-weight: 700; margin-bottom: 0.5rem; font-family: var(--font-head); letter-spacing: 1px; }
.role { font-size: 1.5rem; font-weight: 700; margin-bottom: 0.5rem; color: white; }
.company { font-size: 1.1rem; color: var(--secondary); margin-bottom: 1rem; font-style: italic; }
.desc { color: #ccc; line-height: 1.6; }

.resume-section { padding: 6rem 3rem; text-align: center; border-top: 1px solid #222; display: flex; justify-content: center; position: relative; z-index: 2; }
.btn { padding: 1rem 3rem; text-transform: uppercase; font-weight: 700; letter-spacing: 1px; text-decoration: none; border-radius: 4px; transition: all 0.3s ease; font-size: 1rem; font-family: var(--font-head); border: 1px solid var(--accent); color: var(--accent); background: transparent; }
.btn:hover { background: var(--accent); color: black; }

/* --- PROJECT PAGE SPECIFIC --- */
.project-hero { height: 90vh; width: 100%; position: relative; display: flex; align-items: center; justify-content: center; overflow: hidden; z-index: 2; }
.hero-video, .hero-img { width: 100%; height: 100%; object-fit: cover; opacity: 0.6; }
.hero-overlay { position: absolute; bottom: 0; left: 0; width: 100%; padding: 4rem 3rem; z-index: 2; }
.project-title { font-family: var(--font-head); font-size: clamp(3rem, 10vw, 10rem); font-weight: 800; text-transform: uppercase; line-height: 0.9; margin-bottom: 1rem; }
.project-cat { color: var(--accent); text-transform: uppercase; letter-spacing: 4px; font-weight: 700; }

.brief-section { display: grid; grid-template-columns: 1fr 2fr; gap: 4rem; padding: 6rem 3rem; border-bottom: 1px solid #222; position: relative; z-index: 2; }
.brief-meta h4 { color: var(--secondary); text-transform: uppercase; font-size: 0.9rem; margin-bottom: 0.5rem; }
.brief-meta p { font-size: 1.1rem; margin-bottom: 2rem; color: white; }
.brief-desc p { font-size: 1.4rem; line-height: 1.6; color: #ddd; margin-bottom: 2rem; }

.gallery-section { padding: 3rem; display: flex; flex-direction: column; gap: 6rem; position: relative; z-index: 2; }
.img-block { width: 100%; position: relative; }
.img-block img { width: 100%; height: auto; border-radius: 4px; }
.img-caption { margin-top: 1rem; color: var(--secondary); font-size: 0.9rem; text-transform: uppercase; letter-spacing: 1px; }
.img-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }

/* --- NEXT PROJECT (UPDATED) --- */
.next-project { 
    height: 50vh; display: flex; flex-direction: column; justify-content: center; align-items: center; 
    background-color: var(--accent); color: black; text-decoration: none; margin-top: 5rem; 
    transition: background 0.3s; position: relative; z-index: 2; 
}
.next-project:hover { background-color: #ffffff; }
.np-label { color: rgba(0,0,0,0.6); letter-spacing: 2px; text-transform: uppercase; margin-bottom: 1rem; }
.np-title { font-family: var(--font-head); font-size: 5vw; color: black; text-transform: uppercase; font-weight: 800; }

/* --- FOOTER --- */
footer { background-color: var(--accent); color: black; padding: 6rem 3rem 3rem 3rem; position: relative; z-index: 10; }
.footer-top { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4rem; margin-bottom: 5rem; }
.footer-email { font-family: var(--font-head); font-size: clamp(3rem, 6vw, 6rem); font-weight: 800; color: black; text-transform: uppercase; line-height: 1; transition: color 0.3s; }
.footer-email:hover { color: white; }
.footer-col h4 { color: black; font-family: var(--font-head); font-weight: 700; text-transform: uppercase; margin-bottom: 0.5rem; letter-spacing: 1px; opacity: 0.6; }
.footer-col a { color: black; font-size: 1rem; font-weight: 600; transition: color 0.3s; display: block; margin-bottom: 0.5rem; }
.footer-col a:hover { color: white; }
.social-link { display: flex; align-items: center; gap: 10px; margin-bottom: 0.5rem; font-weight: 600; flex-wrap: nowrap; }
.social-link:hover { color: white; }
.social-icon { width: 24px; height: 24px; flex-shrink: 0; transition: all 0.3s ease; }
svg.social-icon { fill: none; stroke: black; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.social-link:hover svg.social-icon { stroke: white; }
footer .social-link img.social-icon { width: 24px !important; height: 24px !important; min-width: 24px !important; max-width: 24px !important; object-fit: contain; display: inline-block !important; margin: 0 !important; }
.social-link:hover img.social-icon { filter: invert(1); }
.footer-bottom { border-top: 1px solid rgba(0,0,0,0.1); padding-top: 2rem; display: flex; justify-content: space-between; font-weight: 700; font-size: 0.8rem; text-transform: uppercase; }
.back-to-top { cursor: pointer; transition: color 0.3s; }
.back-to-top:hover { color: white; }

/* --- MOBILE --- */
@media (max-width: 768px) {
    nav { height: 60px; padding: 0 1.5rem; background: rgba(17,17,17,0.85); backdrop-filter: blur(10px); mix-blend-mode: normal; border-bottom: 1px solid rgba(255,255,255,0.1); }
    .logo { font-size: 1.2rem; }
    
    .filter-bar { 
        height: auto !important; 
        /* [FIXED] 59px to overlap the 60px nav border */
        top: 59px !important; 
        overflow-x: auto; justify-content: center; gap: 1rem; 
        padding: 0.4rem 1rem; 
        background: rgba(17,17,17,0.95); scrollbar-width: none; -ms-overflow-style: none; 
    }
    .filter-bar::-webkit-scrollbar { display: none; }
    
    .hero { padding: 0; padding-top: 130px; padding-bottom: 4rem; height: auto; min-height: 80vh; }
    .hero-title { font-size: 11vw; padding: 0 5%; }
    
    .hero-sub { display: flex; flex-direction: column; gap: 0.5rem; font-size: 0.8rem; letter-spacing: 1px; margin-top: 2rem; }
    .hero-sub .divider { display: none; }
    .hero-sub span:not(.divider)::before { content: "// "; color: var(--accent); }
    .hero-sub span:not(.divider)::after { content: " //"; color: var(--accent); }

    .about-section-home { grid-template-columns: 1fr; }
    .about-img { height: 400px; min-height: auto; }
    
    .masonry-container { flex-direction: column; gap: 4rem; padding: 2rem 1.5rem; }
    .masonry-col { width: 100%; margin-top: 0 !important; gap: 4rem; }
    .about-hero { grid-template-columns: 1fr; }
    .iphone-frame { width: 85%; }

    .brief-section { grid-template-columns: 1fr; padding: 4rem 1.5rem; }
    .img-grid-2 { grid-template-columns: 1fr; }
    .gallery-section { padding: 1.5rem; }
    .about-hero { padding-top: 130px; gap: 2rem; }
    .hero-image { height: 50vh; order: -1; }
    
    .about-img { background-position: center top !important; min-height: 500px; }
    //.cursor-dot, .cursor-outline { display: none !important; }
}

/* --- FIX CURSOR LAYERING & VISIBILITY --- */
.cursor-dot, .cursor-outline {
    position: fixed; top: 0; left: 0;
    transform: translate(-50%, -50%); border-radius: 50%;
    z-index: 100000 !important; pointer-events: none;
    mix-blend-mode: difference;
}
.cursor-dot { width: 8px; height: 8px; background-color: var(--accent); }
.cursor-outline {
    width: 40px; height: 40px; border: 1px solid var(--accent);
    transition: width 0.2s, height 0.2s, background-color 0.2s;
}
body.hovering .cursor-outline {
    width: 60px; height: 60px;
    background-color: rgba(255, 255, 255, 0.1);
    border-color: var(--accent);
}

/* --- TOUCH DEVICE CURSOR FIX --- */
/* Only hide custom cursor if the device strictly CANNOT hover (phones/tablets) */
@media (hover: none) and (pointer: coarse) {
    .cursor-dot, .cursor-outline { 
        display: none !important; 
    }
    
    /* Restore system default for touch devices */
    * { 
        cursor: auto !important; 
    }
}

/* --- SECONDARY STICKY MENU (ALL WORK) --- */
.filter-bar { 
    position: sticky;
    
    /* [FIXED] 77px to overlap the 78px Nav border by 1px */
    top: 77px;  
    
    z-index: 800;
    background: rgba(14, 14, 14, 0.6); 
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 0.4rem 5%;
    height: auto;
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: center;
    gap: 2rem;
}
.filter-btn { background: none; border: none; color: #666; font-family: var(--font-head); font-weight: 700; text-transform: uppercase; font-size: 0.9rem; cursor: pointer; transition: color 0.3s; }
.filter-btn:hover, .filter-btn.active { color: var(--accent); }

/* ... existing CSS ... */

/* Project Item Overlay Update */
.p-img-wrap {
    position: relative;
    overflow: hidden;
    /* ensure other styles remain */
}

/* The Overlay Container */
.p-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7); /* Dark tint */
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 20;
}

/* The Logo inside the overlay */
.p-logo {
    width: 60%; /* Adjust size as needed */
    height: auto;
    object-fit: contain;
    transform: translateY(20px);
    transition: transform 0.4s ease;
}

/* Hover Effects */
.project-item:hover .p-overlay {
    opacity: 1;
}

.project-item:hover .p-logo {
    transform: translateY(0);
}

/* Hide the text title on hover if you want the logo to replace it? 
   Optional: keeping both looks good too. 
   If you want to hide the text bottom bar on hover: */
/* .project-item:hover .p-meta { opacity: 0; } */



/* --- SPLIT LAYOUT PROJECT PAGE --- */
.split-layout {
    display: grid;
    grid-template-columns: 35% 65%;
    min-height: 100vh;
    position: relative;
    z-index: 2;
}

/* Left Side - Sticky Information */
.project-info-sticky {
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 6rem 4rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-right: 1px solid rgba(255,255,255,0.05);
    background: var(--bg);
    z-index: 5;
}

.sticky-meta {
    margin-bottom: 3rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.sticky-meta-item h4 {
    color: var(--secondary);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
}

.sticky-meta-item p {
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
}

.sticky-title {
    font-family: var(--font-head);
    font-size: clamp(3rem, 5vw, 5rem);
    line-height: 0.9;
    text-transform: uppercase;
    margin-bottom: 2rem;
    color: white;
}

.sticky-desc {
    font-size: 1rem;
    line-height: 1.6;
    color: #ccc;
    max-width: 90%;
}

/* Right Side - Scrolling Gallery */
.project-gallery-scroll {
    padding: 0;
    display: flex;
    flex-direction: column;
    /* No gap, images touch or have small gap */
    gap: 1rem; 
}

.scroll-media {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.scroll-video-container {
    width: 100%;
    height: 100vh; /* First item takes full height */
    position: relative;
}

.scroll-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Mobile Adjustments for Split Layout */
@media (max-width: 1024px) {
    .split-layout {
        grid-template-columns: 1fr;
        display: flex;
        flex-direction: column;
    }

    .project-info-sticky {
        position: relative;
        height: auto;
        top: auto;
        padding: 6rem 2rem 4rem 2rem;
        border-right: none;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    
    .scroll-video-container {
        height: 60vh;
    }
    
    .sticky-title {
        font-size: 4rem;
    }
}

/* --- PACKAGING LAB MARQUEE --- */
.lab-marquee-section {
    padding: 6rem 0;
    background: var(--bg);
    border-top: 1px solid #222;
    overflow: hidden;
    position: relative;
    z-index: 2;
}

.lab-marquee-section .section-title {
    text-align: center;
    font-family: var(--font-head);
    font-size: 2.5rem;
    color: var(--accent);
    text-transform: uppercase;
    margin-bottom: 4rem;
    font-weight: 800;
}

.marquee-outer {
    width: 100%;
    overflow: hidden; /* Hides the scrollbar */
    cursor: grab;
    padding: 2rem 0;
}

.marquee-outer:active {
    cursor: grabbing;
}

.marquee-inner {
    display: flex;
    width: fit-content; /* Allows div to stretch based on content */
    gap: 4rem;
    will-change: transform; /* Performance optimization for animation */
}

.marquee-item {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    width: 300px; /* Fixed width for consistency */
    transition: opacity 0.3s ease;
}

.marquee-outer:hover .marquee-item {
    opacity: 0.5; /* Dim all items on hover */
}

.marquee-outer .marquee-item:hover {
    opacity: 1; /* Highlight specific hovered item */
}

.marquee-item img {
    width: 100%;
    height: 300px; /* Fixed height to keep alignment */
    object-fit: contain; /* Ensures logos/packaging don't stretch */
    background: #1a1a1a; /* Subtle bg if transparent pngs are used */
    padding: 1rem;
    border-radius: 4px;
    border: 1px solid #333;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.marquee-item:hover img {
    transform: scale(1.05);
    border-color: var(--accent);
}

.marquee-item span {
    font-family: var(--font-head);
    text-transform: uppercase;
    font-size: 0.9rem;
    color: #ccc;
    letter-spacing: 1px;
}

/* --- LAB MODAL / LIGHTBOX --- */
.lab-modal {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.9); /* Very dark background */
    backdrop-filter: blur(10px);
    z-index: 10001; /* Above everything */
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none; /* Click-through when hidden */
    transition: opacity 0.3s ease;
}

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

.lab-modal-content {
    position: relative;
    max-width: 600px;
    width: 90%;
    background: #1a1a1a;
    border: 1px solid #333;
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
    transform: translateY(50px);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.lab-modal.active .lab-modal-content {
    transform: translateY(0);
}

.lab-img {
    width: 100%;
    height: auto;
    max-height: 50vh;
    object-fit: contain;
    margin-bottom: 1.5rem;
    border-radius: 4px;
}

.lab-title {
    font-family: var(--font-head);
    font-size: 1.5rem;
    color: var(--accent);
    margin-bottom: 1rem;
    text-transform: uppercase;
}

.lab-desc {
    font-family: var(--font-body);
    font-size: 1rem;
    color: #ccc;
    line-height: 1.6;
}

.lab-close {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 2rem;
    color: #fff;
    cursor: pointer;
    transition: color 0.3s;
}

.lab-close:hover {
    color: var(--accent);
}

/* --- LAB MODAL UPDATES --- */
.lab-modal-content {
    /* Existing styles... */
    position: relative;
    max-width: 700px; /* Made slightly wider for arrows */
    width: 90%;
    background: #1a1a1a;
    border: 1px solid #333;
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
    transform: translateY(50px);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    
    /* NEW: Prevents text highlighting when clicking arrows fast */
    user-select: none; 
}

/* --- NAVIGATION ARROWS (FLOATING ON SCREEN EDGES) --- */
.lab-prev, .lab-next {
    position: absolute; /* Absolute relative to the fixed modal wrapper */
    top: 50%;
    transform: translateY(-50%);
    
    font-size: 6rem; /* Large size */
    color: rgba(255, 255, 255, 0.4); /* Subtle transparent white */
    
    cursor: pointer;
    padding: 40px; /* Large clickable area */
    
    z-index: 10005; /* Must be higher than modal content */
    transition: all 0.3s ease;
    
    /* Prevent text selection when clicking fast */
    user-select: none;
}

/* Position them far apart */
.lab-prev { 
    left: 2%; 
}

.lab-next { 
    right: 2%; 
}

/* Hover State */
.lab-prev:hover, .lab-next:hover {
    color: var(--accent); 
    transform: translateY(-50%) scale(1.1);
    opacity: 1;
}

/* --- MOBILE ADJUSTMENTS --- */
@media (max-width: 768px) {
    .lab-prev, .lab-next {
        /* On mobile, move them to the bottom so they don't cover the image */
        top: auto; 
        bottom: 5%; 
        transform: none;
        
        font-size: 3rem; 
        color: #fff;
        padding: 20px;
    }
    
    .lab-prev { left: 20px; }
    .lab-next { right: 20px; }
    
    .lab-prev:hover, .lab-next:hover {
        transform: scale(1.0); /* Remove scale effect on touch */
    }
}

/* --- MOBILE PROJECT VIDEO FIX --- */
@media (max-width: 768px) {
    .project-hero {
        /* 1. Stop forcing the container to be 90% of screen height */
        height: auto !important; 
        min-height: auto !important;
        
        /* 2. Remove flex centering so video sits naturally */
        display: block; 
    }

    .hero-video, .hero-img {
        /* 3. Force width to be edge-to-edge */
        width: 100% !important;
        
        /* 4. Allow height to adjust automatically based on aspect ratio */
        height: auto !important;
        
        /* 5. Ensure the whole video is visible (no cropping) */
        object-fit: contain !important; 
        
        /* 6. Reset positioning */
        position: relative; 
    }
    
    /* Optional: Adjust the overlay text position since height changed */
    .hero-overlay {
        position: absolute;
        bottom: 0;
        padding: 2rem 1.5rem;
    }
    
    .project-title {
        font-size: 3rem; /* Resize text for smaller video height */
    }
}

/* --- BRIEF SECTION META LAYOUT --- */
.brief-meta {
    display: grid;
    /* Create a 2-column grid */
    grid-template-columns: 1fr 1fr; 
    /* Spacing between grid items */
    column-gap: 1.5rem;
    row-gap: 2.5rem;
    /* Ensure it aligns to the top of the section */
    align-content: start; 
}

/* 1. The Logo Styling */
.brief-logo {
    /* Span across both columns */
    grid-column: 1 / -1; 
    
    display: block;
    width: 100%;
    /* Larger size as requested */
    max-width: 220px; 
    
    /* Center it visually */
    margin: 0 auto 1rem auto; 
    object-fit: contain;
    
    /* Optional: Invert to white if your logo is black */
    /* filter: invert(1); */
}

/* 2. The Text Items */
.meta-item h4 {
    color: var(--secondary);
    text-transform: uppercase;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
    letter-spacing: 1px;
}

.meta-item p {
    font-size: 1.1rem;
    color: white;
    font-weight: 600;
    line-height: 1.3;
}

/* --- MOBILE ADJUSTMENT --- */
@media (max-width: 768px) {
    .brief-meta {
        /* On mobile, stack them vertical, or keep 2x2? 
           2x2 usually works fine on mobile for short text. */
        column-gap: 1rem;
        row-gap: 2rem;
        margin-bottom: 3rem; /* Space before description */
    }
    
    .brief-logo {
        max-width: 180px; /* Slightly smaller on phone */
    }
}