/* 
 * 精选项目板块样式 (Projects Section Wrapper) - v6.50
 * -----------------------------------------------
 * 用途：负责首页“精选项目”板块的展示，包括分类过滤、横向卡片滚动、自动放大效果。
 * 设计原则：Plan C 混合设计（分类过滤 + 横向画廊）。
 * 
 * 主要内容：
 * 1. 板块容器及标题布局 (#projects-section)
 * 2. 瑞士风格分类过滤栏 (.projects-filter)
 * 3. 响应式横向滚动轨道 (.projects-track)
 * 4. 16:9 比例项目卡片交互样式 (.project-card, .featured, .large)
 * 5. 动态放大及视口中心检测逻辑 (.center, :hover)
 * 6. 项目媒体展示及文字遮罩 (.proj-media, .proj-content)
 * 7. 响应式适配 (1024px/900px 等分界点)
 * 8. 亮色模式 (Light Mode) 覆盖样式 (待迁移至 warm-theme.css)
 */

#projects-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 60px;
    will-change: transform, opacity;
    background: transparent;
}



/* Projects 标题优化 */

/* Projects 标题优化 - ARCHITECTURAL STYLE V6.44 */

#projects-section .section-title {

    font-size: 2.2rem;

    /* More balanced scale */

    font-weight: 600;

    letter-spacing: 4px;

    /* Tightened for solidity */

    text-transform: uppercase;

    margin: 0 0 15px 0;

    color: var(--pj-text-dark);

    text-align: center;

}



/* Category Filter Bar */

/* Category Filter Bar */

/* Category Filter Bar - SWISS STYLE V6.44 */

.projects-filter {
    display: flex;
    justify-content: center;
    /* Centered for desktop alignment */
    gap: 12px;
    margin: 0 auto 25px auto;
    /* Center container and maintain spacing */
    max-width: 1400px;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 10px 20px;
    width: 100%;
    scrollbar-width: none;
    -ms-overflow-style: none;
    z-index: 10;
}



.projects-filter::-webkit-scrollbar {

    display: none;

    /* Hide scrollbar Chrome/Safari */

}



.filter-btn {

    padding: 12px 28px;

    background: var(--pj-bg-light);
    color: var(--pj-text-muted);
    border: 1px solid var(--pj-border);
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 500;

    letter-spacing: 0.5px;

    cursor: pointer;

    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    backdrop-filter: blur(10px);

    -webkit-backdrop-filter: blur(10px);

}



.filter-btn:hover {

    background: var(--pj-bg-hover);

    border-color: var(--pj-accent);

    color: var(--pj-text-dark);

    transform: translateY(-2px);

    box-shadow: 0 5px 15px var(--pj-glow-cyan);

}



.filter-btn.active {
    background: #00e5ff !important;
    /* Hardcoded Cyan for safety */
    border-color: #00e5ff !important;
    color: #000000 !important;
    /* Black text for contrast */
    font-weight: 700;
    box-shadow: 0 0 20px rgba(0, 229, 255, 0.6) !important;
    text-shadow: none !important;
}



/* Projects Gallery Wrapper - 横屏优化 */

.projects-gallery-wrapper {

    position: relative;

    width: 90%;

    max-width: 1600px;

    height: 750px;

    /* 大幅增加高度到750px,给放大效果留足空间 */

    overflow: hidden;

    border-radius: 20px;

    margin: 0 auto 20px;

}



/* Projects Track - Horizontal Scroll */

/* Projects Track - Horizontal Scroll */

.projects-track {

    display: flex;

    gap: 40px;

    height: 100%;

    /* 改为顶部对齐，消除顶部多余空白 */

    align-items: flex-start;

    /* 顶部预留40px给放大效果(scale 1.0)，底部预留充裕空间给阴影 */

    padding: 40px 6% 40px 6%;

    overflow-x: auto;

    overflow-y: hidden;

    scroll-behavior: auto;

    scroll-snap-type: x mandatory;



    scrollbar-width: none;

    -ms-overflow-style: none;

}



.projects-track::-webkit-scrollbar {

    display: none;

}



/* Project Card Base Styles - 横屏16:9布局 */

.project-card {

    position: relative;

    min-width: 950px;

    /* 大幅扩大到950px以填满红色边框 */

    width: 950px;

    height: 534px;

    /* 16:9比例：950/16*9=534.375 */

    border-radius: 16px;

    /* overflow: hidden; REVERTED V67: Fix for button clickability near edges */

    /* V59: Clean clip for corners */

    cursor: pointer;

    scroll-snap-align: center;

    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1),

        opacity 0.6s ease,

        box-shadow 0.6s ease,

        border-color 0.6s ease;

    will-change: transform, opacity, box-shadow;

    background: transparent;

    border: 1px solid var(--pj-border-normal);

    box-shadow: 0 10px 40px var(--pj-shadow-medium);



    /* 默认略微缩小，让右侧能看到下一张 */

    transform: scale(0.8);

    /* 从0.88减小到0.8，增强放大效果 */

    opacity: 1;

    /* 完全不透明，防止烟花穿透 */

    z-index: 1;

    border: 1px solid var(--pj-border-normal);

    /* 增强边框可见性 */

    transition: all 0.6s cubic-bezier(0.25, 1, 0.5, 1);

}



.project-card:hover {
    transform: scale(1.0);
    z-index: 100;
    box-shadow: 0 20px 60px var(--pj-shadow-dark);
    border-color: var(--pj-border-hover);
}



/* Featured Project - 横屏 */

.project-card.featured {

    min-width: 1000px;

    /* Featured更大，1000px */

    width: 1000px;

    height: 563px;

    /* 16:9比例 */

    border: 1px solid var(--pj-border-light);

    box-shadow: 0 10px 40px var(--pj-shadow-medium);

}



/* Featured卡片悬停时的青色边框 */

.project-card.featured:hover {

    border: 2px solid var(--pj-accent);

    box-shadow:

        0 20px 60px var(--pj-shadow-darker),

        0 0 40px var(--pj-glow-cyan);

}



/* Large Project Card - 横屏 */

.project-card.large {

    min-width: 970px;

    /* Large卡片970px */

    width: 970px;

    height: 546px;

    /* 16:9比例 */

}



/* Hover Effects - 居中放大 */

.project-card:hover {

    transform: scale(1.2);

    /* 从1.0增大到1.2，更强烈的放大效果 */

    opacity: 1;

    border-color: var(--pj-accent);

    box-shadow:

        0 20px 60px var(--pj-shadow-darker),

        0 0 40px var(--pj-glow-cyan);

    z-index: 2147483647 !important;

    /* FIX: Must beat Control Dock (2147483640) to escape Stacking Context Trap */

}



/* 滚动过渡中禁用hover效果，避免冲突 */

.projects-track.transitioning .project-card:hover {

    transform: scale(0.8);

    /* 保持默认大小，不放大 */

    border-color: rgba(255, 255, 255, 0.2);

    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);

    z-index: 1;

}







.projects-track.transitioning {

    pointer-events: auto;

    /* track本身保持可交互 */

}



/* 卡片处于视口中心时自动放大 */
.project-card.center {
    transform: none;
    /* Base state for center is 1.0 */
    perspective: none;
    opacity: 1;
    z-index: 2147483645;
}

/* 优先级加固：确保中心卡片悬停时也能触发 1.2 倍缩放 */
.project-card.center:hover {
    transform: scale(1.2);
    z-index: 2147483647;
}



/* Project Media */

.proj-media {

    position: absolute;

    inset: 0;

    width: 100%;

    height: 100%;

    /* overflow: hidden; Removed to let parent clip */

    /* border-radius: 16px; Removed redundant radius */

    /* 保持圆角，即使父元素overflow:visible */

    background-color: #000;

    /* 添加黑色背景，防止烟花穿透 */

}



.proj-media img,
.proj-media video,
.p-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.8s ease;
    opacity: 1;
    filter: none;
}



.project-card:hover .proj-media img,

.project-card:hover .proj-media video {

    transform: scale(1.1);

}



/* Project Overlay - Enhanced for Dark Mode */

.proj-overlay,

.p-overlay,

.video-overlay {

    display: none !important;

}



/* Project Content - Enhanced Glass Effect */

.proj-content {

    position: absolute;

    bottom: 0;

    left: 0;

    right: 0;

    padding: 25px 30px;

    z-index: 2;

    display: flex;

    flex-direction: column;

    gap: 8px;



    /* Glass Effect Background - COMPLETELY REMOVED V6.34 */

    background: transparent !important;

    backdrop-filter: none !important;

    -webkit-backdrop-filter: none !important;



    border-top: 1px solid rgba(255, 255, 255, 0.1);

    /* border-radius: 0 0 16px 16px; Removed redundant */

    /* V57: Fix bottom edge glitch */

    transition: padding 0.5s cubic-bezier(0.23, 1, 0.32, 1),

        background 0.5s ease,

        backdrop-filter 0.5s ease;

    will-change: padding;

}



.project-card:hover .proj-content {

    /* V58: Increase padding instead of moving up to keep bottom attached */

    padding-bottom: 40px;

}



/* Project Category Badge - Enhanced */

.proj-category {
    display: inline-block;
    padding: 8px 18px;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid var(--pj-accent);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
    text-shadow: 0 0 10px var(--pj-glow-cyan);
}



/* Project Title - Enhanced Readability (横屏优化) */

.proj-title {
    font-size: 2.2rem;
    font-weight: 800;
    color: #ffffff;
    margin: 0;
    line-height: 1.2;
    text-shadow:
        1px 1px 2px rgba(0, 0, 0, 0.9),
        0 4px 15px rgba(0, 0, 0, 0.8),
        0 0 30px rgba(0, 0, 0, 0.4);
    letter-spacing: -0.5px;
}



.project-card.featured .proj-title {

    font-size: 2.5rem;

    /* 从2rem增大 */

    text-shadow:

        0 3px 6px var(--pj-shadow-deep),

        0 6px 16px var(--pj-shadow-darker),

        0 0 40px var(--pj-glow-cyan);

}



/* Project Description - Enhanced (横屏优化) */

.proj-desc {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.98);
    line-height: 1.5;
    margin: 0;
    max-width: 95%;
    text-shadow:
        1px 1px 2px rgba(0, 0, 0, 0.9),
        0 2px 8px rgba(0, 0, 0, 0.8);
    font-weight: 500;
}



/* Project Meta Info - Enhanced */

.proj-meta {

    display: none;

    /* 默认隐藏 */

    gap: 20px;

    margin-top: 10px;

    opacity: 0;

    transform: translateY(10px);

    transition: all 0.4s ease 0.1s;

}



.project-card:hover .proj-meta {

    display: flex;

    /* 悬停时显示 */

    opacity: 1;

    transform: translateY(0);

}



.proj-meta span {

    display: flex;

    align-items: center;

    gap: 8px;

    font-size: 0.95rem;

    color: rgba(255, 255, 255, 0.9);

    font-weight: 500;

    padding: 6px 12px;

    background: rgba(0, 0, 0, 0.4);

    border-radius: 12px;

    backdrop-filter: blur(10px);

    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);

}



.proj-meta i {

    color: var(--pj-accent);

    font-size: 0.9rem;

    filter: drop-shadow(0 0 6px var(--pj-glow-cyan));

}



/* Project Awards - Enhanced */

.proj-awards {

    display: none;

    /* 默认隐藏 */

    gap: 10px;

    margin-top: 12px;

    opacity: 0;

    transform: translateY(10px);

    transition: all 0.4s ease 0.2s;

}



.project-card:hover .proj-awards {

    display: flex;

    /* 悬停时显示 */

    opacity: 1;

    transform: translateY(0);

}



.award-badge {

    padding: 8px 16px;

    background: linear-gradient(135deg,

            rgba(255, 215, 0, 0.25) 0%,

            rgba(255, 215, 0, 0.15) 100%);

    border: 1px solid rgba(255, 215, 0, 0.5);

    border-radius: 16px;

    color: #FFD700;

    font-size: 0.8rem;

    font-weight: 700;

    backdrop-filter: blur(10px);

    box-shadow:

        0 2px 8px rgba(255, 215, 0, 0.2),

        inset 0 1px 2px rgba(255, 255, 255, 0.2);

    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);

}



.proj-btn i {

    transition: transform 0.3s ease;

}



.proj-btn:hover i {

    transform: translateX(5px);

}



/* Navigation Arrows */

.proj-nav-btn {

    position: absolute;

    top: 50%;

    transform: translateY(-50%);

    width: 50px;

    height: 50px;

    background: rgba(0, 0, 0, 0.7);

    border: 1px solid rgba(255, 255, 255, 0.2);

    border-radius: 50%;

    color: #fff;

    font-size: 1.2rem;

    cursor: pointer;

    z-index: 100;

    transition: all 0.3s ease;

    backdrop-filter: blur(10px);

    display: flex;

    align-items: center;

    justify-content: center;

}



.proj-nav-prev {

    left: 20px;

}



.proj-nav-next {

    right: 20px;

}



.proj-nav-btn:hover {

    background: var(--pj-accent);

    border-color: var(--pj-accent);

    color: #000;

}



.proj-nav-btn:active {

    transform: translateY(-50%) scale(0.95);

}



/* Navigation Dots */

.projects-nav-dots {

    display: flex;

    justify-content: center;

    gap: 12px;

    margin-top: 20px;

    z-index: 10;

}



/* Navigation Dots - V6.29 Swiss Refinement */

.nav-dot {

    width: 7px;

    /* Shrunk from 10px */

    height: 7px;

    background: rgba(255, 255, 255, 0.25);

    border-radius: 50%;

    cursor: pointer;

    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);

    border: 1px solid rgba(255, 255, 255, 0.15);

}



.nav-dot.active {

    width: 22px;

    /* Shortened from 30px */

    border-radius: 4px;

    background: var(--pj-accent);

    border-color: var(--pj-accent);

    box-shadow: 0 0 12px var(--pj-glow-cyan);

}



/* Hidden State (For Filtering) */

.project-card.hidden {

    display: none;

}



/* Responsive Design */

@media (max-width: 1200px) {

    #projects-section {

        padding-top: 45px;

        /* 从70px调整，保持比例 */

    }



    #projects-section .section-title {

        font-size: 3rem;

        margin-bottom: 25px;

    }



    .projects-gallery-wrapper {

        width: 95%;

        height: 650px;

    }



    /* V56: Smoother Scaling */

    .project-card {

        min-width: 700px;

        /* Was 380px - Too small! */

        width: 700px;

    }



    .project-card.featured {

        min-width: 750px;

        width: 750px;

    }



    .project-card.large {

        min-width: 720px;

        width: 720px;

    }

}




/* Tablet and below - UNIFIED MOBILE EXPERIENCE LAYER V7.0 */

@media (max-width: 1024px) {

    #projects-section {
        padding-top: 65px;
        height: auto;
        /* Allow content to define height */
        min-height: 100vh;
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

    #projects-section .section-title {
        font-size: 1.5rem;
        margin-bottom: 10px;
        letter-spacing: 1px;
        font-weight: 500;
        text-transform: none;
        opacity: 0.9;
    }



    .projects-filter {
        display: flex;
        justify-content: flex-start;
        /* Keep left-align for swipeability on mobile */
        overflow-x: auto;
        gap: 6px;
        margin-bottom: 2px;
        padding: 0 10px 5px;
        flex-shrink: 0;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
        mask-image: linear-gradient(to right, black 85%, transparent 100%);
        -webkit-mask-image: linear-gradient(to right, black 85%, transparent 100%);
    }

    .filter-btn {
        padding: 6px 16px;
        font-size: 0.75rem;
        border-radius: 12px;
        flex-shrink: 0;
        white-space: nowrap;
    }



    .projects-gallery-wrapper {
        width: 100%;
        height: 520px !important;
        /* FIXED BASE HEIGHT FOR MOBILE */
        min-height: 520px !important;
        border-radius: 0;
        margin: 5px 0 0;
        position: relative;
        display: block;
        /* Simpler than flex for height inheritance */
    }



    .projects-track {
        gap: 0;
        padding: 0;
        display: flex;
        align-items: stretch;
        height: 100% !important;
        /* Inherit 520px */
        scroll-snap-type: x mandatory;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
    }



    .project-card,
    .project-card.large,
    .project-card.featured {
        position: relative !important;
        min-width: 100vw;
        width: 100vw;
        height: 520px !important;
        /* MATCH GALLERY WRAPPER BASIS */
        min-height: 520px !important;
        transform: none;
        opacity: 1;
        margin-top: 5px;
        display: flex;
        flex-direction: column;
        border-radius: 0;
        overflow: hidden;
        background: #000 !important;
        scroll-snap-align: center;
        transition: none;
    }

    .proj-media {
        position: absolute !important;
        inset: 0 !important;
        height: 100% !important;
        width: 100% !important;
        background: #000 !important;
        overflow: hidden !important;
        z-index: 1 !important;
    }



    .proj-media img,
    .proj-media video {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
        z-index: 2 !important;
    }



    .project-card:hover,
    .project-card.center {
        transform: scale(1.0) !important;
        z-index: 100 !important;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4) !important;
    }



    .proj-content {
        position: absolute !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        padding: 15px 15px 30px 15px !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: flex-end !important;
        z-index: 5 !important;
        background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, transparent 100%) !important;
    }



    .proj-title {
        font-size: 1.65rem !important;
        font-weight: 800 !important;
        color: #fff !important;
        letter-spacing: -0.8px !important;
        margin-bottom: 2px !important;
        line-height: 1.1 !important;
        text-shadow: 2px 2px 3px var(--pj-shadow-deep), 0 4px 15px var(--pj-shadow-deep) !important;
    }

    .proj-desc {
        font-size: 0.82rem !important;
        line-height: 1.4 !important;
        color: rgba(255, 255, 255, 0.9) !important;
        margin-bottom: 12px !important;
        font-weight: 500 !important;
        text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8) !important;
    }



    .proj-category {

        display: inline-block !important;

        align-self: flex-start !important;

        padding: 6px 14px !important;

        font-size: 0.7rem !important;

        font-weight: 800 !important;

        /* Bold punch */

        letter-spacing: 1px !important;

        text-transform: uppercase !important;

        /* HIGH VISIBILITY CYAN V6.44 */

        /* HIGH VISIBILITY - Glass Style */
        background: rgba(0, 0, 0, 0.6) !important;
        backdrop-filter: blur(4px) !important;
        border: 1px solid var(--pj-accent) !important;
        border-radius: 4px !important;
        margin-bottom: 8px !important;
        color: #fff !important;
        /* White text for legibility */
        box-shadow: 0 0 10px rgba(0, 229, 255, 0.3) !important;
    }



    .proj-nav-btn {
        display: flex !important;
        justify-content: center;
        align-items: center;
        position: absolute !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        width: 44px !important;
        height: 44px !important;
        background: rgba(255, 255, 255, 0.1) !important;
        border: 1px solid rgba(255, 255, 255, 0.1) !important;
        backdrop-filter: blur(10px) !important;
        color: #fff !important;
        border-radius: 50% !important;
        z-index: 1001 !important;
    }

    .proj-nav-prev {
        left: 15px !important;
    }

    .proj-nav-next {
        right: 15px !important;
    }



    /* V6.20: Handle Dynamic Hidden state via JS class */

    .proj-nav-btn.hidden {

        opacity: 0 !important;

        pointer-events: none !important;

        transform: translateY(-50%) scale(0.8) !important;

    }



    .projects-nav-dots {
        position: absolute !important;
        bottom: 40px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        z-index: 1000 !important;
    }



    /* V6.4: PULL NEXT SECTION UP */
    #values-section {
        padding-top: 40px !important;
        /* V6.4: Drastic reduction from 120px to pull Core Values up */
    }

    /* --- MOBILE PATCH: Force Dark Mode Look on Light Mode --- */
    /* Because mobile cards are ALWAYS images, text must ALWAYS be white */

    body.light-mode .project-card {
        background: #000 !important;
        border: none !important;
    }

    body.light-mode .proj-content {
        background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, transparent 100%) !important;
        border-top: none !important;
        /* Increase padding to prevent overlap */
        padding-bottom: 30px !important;
    }

    body.light-mode .proj-title {
        color: #fff !important;
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8) !important;
    }

    body.light-mode .proj-desc {
        color: rgba(255, 255, 255, 0.9) !important;
    }

    body.light-mode .proj-category {
        /* Force same high-contrast look in Light Mode on Mobile */
        background: rgba(255, 152, 0, 0.8) !important;
        /* Orange Tint */
        border: 1px solid #ff9800 !important;
        color: #fff !important;
        box-shadow: 0 0 10px rgba(255, 152, 0, 0.4) !important;
    }
}



/* ====================================

   LIGHT MODE OPTIMIZATIONS

   ==================================== */



/* Light Mode: Section Title - Deep Color */

body.light-mode #projects-section .section-title {

    color: #2C2C2C !important;

    /* Deep gray for better visibility */

    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.08) !important;

    font-weight: 600 !important;

}



/* Light Mode: Filter Buttons - Enhanced Contrast */

body.light-mode .filter-btn {
    background: rgba(93, 64, 55, 0.08);
    border: 1.5px solid var(--pj-border-light);
    color: var(--pj-text-light);
}

body.light-mode .filter-btn:hover {
    background: rgba(214, 126, 46, 0.15) !important;
    border-color: var(--pj-accent-warm) !important;
    color: var(--pj-accent-warm) !important;
    box-shadow: 0 4px 12px rgba(214, 126, 46, 0.2) !important;
}

body.light-mode .filter-btn.active {
    background: linear-gradient(135deg, var(--pj-accent-warm), #ff9800);
    border-color: var(--pj-accent-warm);
    color: #fff;
    box-shadow: 0 4px 16px rgba(214, 126, 46, 0.4),
        inset 0 1px 2px rgba(255, 255, 255, 0.3);
}

/* --- CARD INTERNALS: RESTRICT TO DESKTOP --- */
/* Mobile cards are always image-based, so they need Dark Mode styles (White Text) */
@media (min-width: 1025px) {
    body.light-mode .proj-media {
        background-color: var(--pj-bg-card-light) !important;
    }

    body.light-mode .proj-overlay {
        display: none !important;
    }

    body.light-mode .proj-content {
        background: transparent !important;
        border-top: none !important;
    }

    body.light-mode .proj-category {
        display: inline-block !important;
        align-self: flex-start !important;
        width: fit-content !important;
        /* Glass Orange for Light Mode */
        background: rgba(255, 152, 0, 0.85) !important;
        border: 1px solid #ff9800 !important;
        color: #fff !important;
        font-weight: 800 !important;
        padding: 6px 14px !important;
        border-radius: 4px !important;
        box-shadow: 0 4px 10px rgba(255, 152, 0, 0.2) !important;
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2) !important;
    }

    body.light-mode .proj-title {
        color: #FFFFFF !important;
        text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8) !important;
    }

    body.light-mode .proj-desc {
        color: rgba(255, 255, 255, 0.95) !important;
        text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8) !important;
    }

    body.light-mode .proj-nav-btn {
        background: rgba(255, 255, 255, 0.25) !important;
        border: 1px solid rgba(255, 255, 255, 0.45) !important;
        color: #fff !important;
        backdrop-filter: blur(12px) !important;
        text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3) !important;
    }

    /* FIX: Active Filter Button in Light Mode must differ from Dark Mode */
    body.light-mode .filter-btn.active {
        color: #000 !important;
        /* User requested non-white */
        text-shadow: none !important;
        font-weight: 800 !important;
    }
}

/* =====================================================
   SECTION 5: DARK MODE REVISIONS (Fireworks Support)
   Restrict these to DESKTOP (min-width: 1025px) to avoid corrupting mobile layouts
   ===================================================== */
@media (min-width: 1025px) {

    body:not(.light-mode) #projects-section,
    body:not(.light-mode) .proj-content {
        background: transparent !important;
        border-top: none !important;
        box-shadow: none !important;
        backdrop-filter: none !important;
    }

    body:not(.light-mode) .proj-title {
        color: #FFFFFF !important;
    }

    body:not(.light-mode) .proj-desc {
        color: rgba(255, 255, 255, 0.95) !important;
    }

    /* Desktop Dark Mode: Match Mobile Glass Style */
    body:not(.light-mode) .proj-category {
        display: inline-block !important;
        align-self: flex-start !important;
        width: fit-content !important;
        /* Glass Black + Cyan Border */
        background: rgba(0, 0, 0, 0.6) !important;
        backdrop-filter: blur(4px) !important;
        border: 1px solid var(--pj-accent) !important;
        color: #fff !important;
        font-weight: 800 !important;
        padding: 6px 14px !important;
        border-radius: 4px !important;
        box-shadow: 0 0 15px var(--pj-glow-cyan) !important;
    }
}

body:not(.light-mode) .proj-nav-btn {
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: #FFF !important;
}

/* Clean Pseudo-residues */
.project-card::after,
.project-card:hover::after,
.project-card::before,
.project-card:hover::before {
    border: none !important;
    box-shadow: none !important;
    display: none !important;
}