/* ========================================= */
/* 1. GLOBAL VARIABLES & RESET               */
/* ========================================= */

:root {
    --bg-color: #050505;
    --text-color: #ffffff;
    --accent-color: #e50914; 
    --glass-bg: rgba(255, 255, 255, 0.05);
    --border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="light"] {
    --bg-color: #e0e0e0;
    --text-color: #1a1a1a;
    --accent-color: #ff3333;
    --glass-bg: rgba(0, 0, 0, 0.05);
    --border-color: rgba(0, 0, 0, 0.1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body, html { 
    width: 100%;
    margin: 0;
}

body {
    background-color: var(--bg-color); 
    font-family: 'Montserrat', sans-serif; 
    transition: background-color 0.5s ease;
    
    /* CRITICAL: Makes the footer stick to bottom */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Enable scrolling on PC if content is tall */
@media (min-width: 769px) {
    body, html { 
        overflow-y: auto; 
        overflow-x: hidden; 
    }
}

/* Background Canvas */
#tsparticles {
    position: fixed; 
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* ========================================= */
/* 2. NAVIGATION                             */
/* ========================================= */
nav {
    width: 100%;
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    position: relative;
}

.logo {
    color: var(--text-color);
    font-family: 'Oswald', sans-serif;
    font-size: 24px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: color 0.5s;
}
.logo span { color: var(--accent-color); }

.nav-links {
    display: flex;
    gap: 30px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.nav-links a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 500;
    opacity: 0.7;
    transition: 0.3s;
    font-family: 'Oswald', sans-serif;
}
.nav-links a:hover, .nav-links a.active {
    opacity: 1;
    color: var(--accent-color);
    text-shadow: 0 0 10px rgba(229, 9, 20, 0.5);
}

/* Theme Switch */
.theme-switch-wrapper { display: flex; align-items: center; }
.system-switch {
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Oswald', sans-serif;
    font-size: 12px;
    color: var(--text-color);
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}
.system-switch:hover { border-color: var(--accent-color); }
.status-light { width: 8px; height: 8px; background-color: #00ff00; border-radius: 50%; box-shadow: 0 0 5px #00ff00; }
[data-theme="light"] .status-light { background-color: var(--accent-color); box-shadow: 0 0 5px var(--accent-color); }

/* ========================================= */
/* 3. HERO SECTION (HOME)                    */
/* ========================================= */
.hero-container {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 10;
    width: 90%;
    max-width: 1000px;
}

.radar-circle {
    position: absolute;
    top: 50%; left: 50%;
    width: 500px; height: 500px;
    border: 1px dashed rgba(229, 9, 20, 0.6);
    box-shadow: 0 0 40px rgba(229, 9, 20, 0.15);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: rotateRing 60s linear infinite;
    z-index: 2;
    pointer-events: none;
}

.sub-heading {
    color: var(--accent-color);
    font-size: 14px;
    letter-spacing: 4px;
    margin-bottom: 15px;
    text-transform: uppercase;
    font-weight: 700;
}

.glitch {
    position: relative;
    color: var(--text-color);
    font-size: 70px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-family: 'Oswald', sans-serif;
    line-height: 1.1;
    margin-bottom: 40px;
}

@media (min-width: 769px) {
    .glitch::before, .glitch::after {
        content: attr(data-text);
        position: absolute;
        top: 0; left: 0; width: 100%; height: 100%;
        background: var(--bg-color);
    }
    .glitch::before {
        left: 2px; text-shadow: -1px 0 #ff00c1;
        clip: rect(44px, 450px, 56px, 0);
        animation: glitch-anim 5s infinite linear alternate-reverse;
    }
    .glitch::after {
        left: -2px; text-shadow: -1px 0 #00fff9;
        clip: rect(44px, 450px, 56px, 0);
        animation: glitch-anim 2s infinite linear alternate-reverse;
    }
}


.cta-btn {
    display: inline-block;
    text-decoration: none;
    color: var(--text-color);
    border: 1px solid var(--accent-color);
    padding: 15px 40px;
    font-family: 'Oswald', sans-serif;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-size: 14px;
    transition: all 0.3s ease;
    background: rgba(229, 9, 20, 0.1);
}
.cta-btn:hover { background: var(--accent-color); color: #fff; }




/* ========================================= */
/* 4. WORK PAGE (GRID)                       */
/* ========================================= */
/* ========================================= */
/* WORK PAGE STYLES (UPGRADED)               */
/* ========================================= */

.page-header {
    margin-top: 60px;
    text-align: center;
    margin-bottom: 60px;
    padding: 0 20px;
    z-index: 10;
}

.section-title { 
    font-family: 'Oswald', sans-serif; 
    font-size: 50px; 
    text-transform: uppercase; 
    color: var(--text-color); 
}

.section-subtitle { 
    font-size: 14px; 
    color: var(--accent-color); 
    letter-spacing: 2px; 
    text-transform: uppercase; 
    font-weight: 700; 
}

/* 1. CONTAINER: Fixes layout so cards don't stretch too wide */
.work-container {
    max-width: 1400px; /* Increased slightly for 3D space */
    margin: 0 auto;
    padding: 0 20px 100px 20px;
    display: grid;
    /* Grid that centers items if they are few */
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); 
    gap: 40px;
    z-index: 10;
    width: 100%;
}

/* 2. PROJECT CARD: The 3D Hologram Base */
.project-card {
    background: rgba(20, 20, 20, 0.8); /* Darker base for neon contrast */
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px; /* Smoother corners */
    overflow: hidden;
    position: relative;
    
    /* 3D TILT ENGINE */
    transition: transform 0.1s ease, box-shadow 0.3s ease; 
    transform-style: preserve-3d;
    perspective: 1000px;
    
    /* LAYOUT FIX: Prevents "Giant Card" when filtering */
    max-width: 400px; 
    width: 100%;
    margin: 0 auto; 
}

/* Hover State: 3D Lift */
.project-card:hover {
    /* Transform is handled by JS, but we add shadow here */
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    border-color: rgba(255, 255, 255, 0.2);
}

/* 3. NEON SCANNER: The Moving Light Beam */
.project-card::after {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: 16px;
    padding: 1px; /* Border thickness */
    background: linear-gradient(
        45deg, 
        transparent 40%, 
        var(--accent-color) 50%, 
        transparent 60%
    );
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    
    /* Hidden by default, shows on hover */
    opacity: 0;
    transition: opacity 0.3s ease;
    background-size: 200% 200%;
    animation: borderScan 3s linear infinite;
    pointer-events: none; /* Let mouse pass through */
}

.project-card:hover::after {
    opacity: 1;
}

/* 4. IMAGE BOX: 3D Parallax Depth */
.card-image-box { 
    height: 220px; 
    background: #050505; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    border-bottom: 1px solid var(--border-color);
    
    /* Pushes image 'back' slightly so content pops */
    transform-style: preserve-3d; 
}

.card-image-box i { 
    color: #333; 
    transition: 0.4s; 
    /* The Icon Floats Above the Card */
    transform: translateZ(30px); 
}

.project-card:hover .card-image-box i { 
    color: var(--text-color); 
    transform: translateZ(50px) scale(1.1); 
    text-shadow: 0 0 20px var(--accent-color); /* Neon Glow */
}

/* 5. CONTENT: Floating Text */
.card-details { 
    padding: 30px; 
    transform: translateZ(20px); /* Text floats in mid-air */
    background: transparent;
}

.project-cat { 
    font-size: 10px; 
    color: var(--accent-color); 
    text-transform: uppercase; 
    font-weight: 700; 
    margin-bottom: 10px; 
}

.project-title { 
    font-family: 'Oswald', sans-serif; 
    font-size: 28px; 
    margin-bottom: 15px; 
    color: var(--text-color); 
}

.project-desc { 
    font-size: 13px; 
    color: #aaa; 
    line-height: 1.6; 
    margin-bottom: 25px; 
}

.tech-tags { 
    display: flex; 
    gap: 10px; 
    flex-wrap: wrap; 
}

.tag { 
    font-size: 10px; 
    background: rgba(255, 255, 255, 0.05); 
    padding: 5px 10px; 
    border-radius: 4px; 
    color: #ccc; 
    border: 1px solid rgba(255,255,255,0.05);
}

/* ANIMATION KEYFRAMES */
@keyframes borderScan {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ========================================= */
/* FIX: FILTER BUTTON STYLES                 */
/* ========================================= */

.filter-menu {
    text-align: center;
    margin-bottom: 50px;
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    width: 100%;
    z-index: 20; /* Ensure clickable */
    position: relative;
}

.filter-btn {
    background: rgba(255, 255, 255, 0.05); /* Slight glass BG */
    border: 1px solid var(--border-color);
    color: #888;
    padding: 10px 30px;
    font-family: 'Oswald', sans-serif;
    font-size: 12px;
    letter-spacing: 2px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 4px;
    outline: none;
}

/* Hover State */
.filter-btn:hover {
    border-color: var(--accent-color);
    color: #fff;
    background: rgba(229, 9, 20, 0.1); /* Subtle red tint */
    box-shadow: 0 0 15px rgba(229, 9, 20, 0.2);
    transform: translateY(-2px);
}

/* Active State (When clicked) */
.filter-btn.active {
    background: var(--accent-color);
    color: #fff;
    border-color: var(--accent-color);
    box-shadow: 0 0 20px rgba(229, 9, 20, 0.4);
}



/* ========================================= */
/* PROJECT LINK BUTTON (Animated)            */
/* ========================================= */
.project-link {
    display: inline-flex;
    align-items: center;
    margin-top: 25px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-color);
    text-decoration: none;
    border-bottom: 2px solid rgba(229, 9, 20, 0.3); /* Subtle red line */
    padding-bottom: 5px;
    transition: all 0.3s ease;
}

.project-link i {
    margin-left: 8px;
    font-size: 10px;
    transition: transform 0.3s ease;
}

/* Hover Effects */
.project-link:hover {
    color: var(--accent-color);
    border-bottom-color: var(--accent-color); /* Line becomes bright red */
}

.project-link:hover i {
    transform: translateX(5px); /* Arrow moves to the right */
}

/* ========================================= */
/* FIX: HEADER ROW (Title Left, Button Right)*/
/* ========================================= */

.card-header-row {
    display: flex;
    justify-content: space-between; /* Pushes items apart */
    align-items: center; /* Aligns them vertically */
    width: 100%;
    margin-bottom: 15px; /* Space below the header */
}

/* 1. Reset Title Margin so it fits */
.card-header-row .project-title {
    margin-bottom: 0;
}

/* 2. Style the Button to sit nicely on the right */
.card-header-row .project-link {
    margin-top: 0; /* Remove old margin */
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-color);
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 2px;
    transition: all 0.3s ease;
}

/* Button Hover Animation */
.card-header-row .project-link:hover {
    color: var(--accent-color);
    border-bottom-color: var(--accent-color);
}

.card-header-row .project-link i {
    margin-left: 6px;
    font-size: 10px;
    transition: transform 0.3s ease;
}

.card-header-row .project-link:hover i {
    transform: translateX(5px);
}





/* ========================================= */
/* 5. TEAM PAGE                              */
/* ========================================= */
.team-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    transition: all 0.4s ease;
}
.team-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent-color);
    box-shadow: 0 10px 30px rgba(229, 9, 20, 0.15);
}
.team-avatar {
    width: 120px;
    height: 120px;
    background: #111;
    border-radius: 50%;
    border: 2px solid var(--accent-color);
    margin: 0 auto 20px auto;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    color: #555;
    overflow: hidden;
}
.team-role {
    color: var(--accent-color);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 10px;
    font-weight: 700;
}

/* ========================================= */
/* 6. VISION PAGE (ANIMATED TIMELINE)        */
/* ========================================= */
.timeline-container {
    max-width: 800px;
    margin: 0 auto;
    padding-bottom: 100px;
    position: relative;
    z-index: 10;
}

.timeline-item {
    border-left: 2px solid var(--border-color);
    padding-left: 40px;
    margin-bottom: 50px;
    position: relative;
    
    /* ANIMATION: SLIDE IN FROM LEFT */
    opacity: 0; /* Start hidden */
    transform: translateX(-30px); /* Start slightly left */
    animation: slideInLeft 0.8s forwards; /* Play animation */
}

/* Stagger animations for a cool effect */
.timeline-item:nth-child(1) { animation-delay: 0.2s; }
.timeline-item:nth-child(2) { animation-delay: 0.4s; }
.timeline-item:nth-child(3) { animation-delay: 0.6s; }
.timeline-item:nth-child(4) { animation-delay: 0.8s; }

.timeline-item::before {
    content: '';
    position: absolute; left: -6px; top: 5px;
    width: 10px; height: 10px;
    background: var(--accent-color);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent-color);
}
.timeline-year {
    font-family: 'Oswald', sans-serif;
    font-size: 24px;
    color: var(--text-color);
    margin-bottom: 10px;
}
.timeline-content p { color: #aaa; line-height: 1.6; font-size: 14px; }
.timeline-item:hover { border-left-color: var(--accent-color); }

/* ========================================= */
/* 7. FOOTER                                 */
/* ========================================= */
footer {
    width: 100%;
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    background: linear-gradient(to top, var(--bg-color) 10%, transparent);
    font-size: 12px;
    color: var(--text-color);
    opacity: 0.9;
    font-family: 'Montserrat', sans-serif;
    
    /* AUTO PUSH TO BOTTOM */
    margin-top: auto; 
    position: relative;
}
.social-links a {
    color: var(--text-color);
    margin-left: 20px;
    font-size: 16px;
    transition: 0.3s;
    opacity: 0.8;
    text-decoration: none; 
}
.social-links a:hover { opacity: 1; color: var(--accent-color); }

/* ========================================= */
/* 8. ANIMATIONS                             */
/* ========================================= */
@keyframes rotateRing { from { transform: translate(-50%, -50%) rotate(0deg); } to { transform: translate(-50%, -50%) rotate(360deg); } }
@keyframes glitch-anim {
    0% { clip: rect(10px, 9999px, 30px, 0); transform: skew(0.5deg); }
    20% { clip: rect(80px, 9999px, 10px, 0); transform: skew(-0.5deg); }
    100% { clip: rect(60px, 9999px, 80px, 0); transform: skew(0); }
}
@keyframes slideInLeft {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ========================================= */
/* 9. MOBILE OPTIMIZATION (CLEAN)            */
/* ========================================= */
@media (max-width: 768px) {
    /* 1. LAYOUT */
    body { 
        overflow-y: auto; 
        display: flex; 
        flex-direction: column;
    }

    nav { 
        padding: 20px;
        flex-wrap: wrap; 
        position: relative; 
    }

    .logo { font-size: 20px; order: 1; }
    .theme-switch-wrapper { order: 2; }
    
    .nav-links { 
        display: flex; 
        order: 3;      
        width: 100%;   
        margin-top: 20px; 
        position: relative;
        left: auto; top: auto;
        transform: none;
        justify-content: center;
        background: var(--glass-bg); 
        border: 1px solid var(--border-color);
        padding: 12px;
        border-radius: 8px;
        gap: 20px;
    }
    .nav-links a { font-size: 11px; color: var(--text-color); }
    .system-switch span { display: none; } 

    /* 2. HERO & RADAR ALIGNMENT */
    /* Locks Text & Circle to optical center */
    .hero-container {
        position: absolute;  
        top: 55%;           
        left: 50%;           
        transform: translate(-50%, -50%); 
        width: 100%;
        padding: 0 20px;
    }

    .radar-circle {
        position: absolute;
        top: 55%;           
        left: 50%;          
        transform: translate(-50%, -50%);
        width: 280px;
        height: 280px;
        opacity: 0.4;
    }

    /* 3. WORK & PAGE FIXES */
    .page-header { margin-top: 40px; margin-bottom: 30px; }
    .section-title { font-size: 36px; }
    
    .work-container { 
        /* MOBILE OVERRIDE: 1 column only */
        grid-template-columns: 1fr !important; 
        gap: 30px; 
        padding-bottom: 40px; 
        flex-grow: 1;
    }

    .timeline-container { padding-left: 20px; padding-right: 20px; }

    /* 4. FOOTER FIXES */
    footer { 
        flex-direction: column; 
        gap: 15px; 
        padding: 40px 20px; 
        text-align: center;
        margin-top: auto; 
    }
    .social-links { margin-top: 10px; }
    .social-links a { margin: 0 15px; }
    
    /* Disable Glitch on Mobile */
    .glitch { font-size: 36px; letter-spacing: 0px; margin-bottom: 15px; }
    .glitch::before, .glitch::after { display: none !important; }
}



/* ========================================= */
/* CONTENT UPGRADES (Vision, Team, Work)     */
/* ========================================= */

/* 1. VISION PAGE: THE ARSENAL */
.arsenal-container {
    max-width: 800px;
    margin: 60px auto;
    padding: 0 20px;
}
.arsenal-title {
    font-family: 'Oswald', sans-serif;
    color: var(--text-color);
    margin-bottom: 30px;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-left: 3px solid var(--accent-color);
    padding-left: 15px;
}
.skill-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.skill-info {
    display: flex;
    justify-content: space-between;
    color: #aaa;
    font-size: 12px;
    text-transform: uppercase;
    margin-bottom: 5px;
    font-family: 'Oswald', sans-serif;
    letter-spacing: 1px;
}
.skill-percent { color: var(--accent-color); }

.progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255,255,255,0.05);
    border-radius: 3px;
    overflow: hidden;
}
.progress-fill {
    height: 100%;
    background: var(--accent-color);
    box-shadow: 0 0 10px var(--accent-color);
    position: relative;
}
/* Shimmer effect on bar */
.progress-fill::after {
    content: ''; position: absolute; top: 0; left: 0; bottom: 0; right: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transform: translateX(-100%);
    animation: shimmer 2s infinite;
}

/* 2. TEAM PAGE: LIVE LOGS */
.live-log {
    background: rgba(0,0,0,0.3);
    border: 1px dashed rgba(255,255,255,0.1);
    padding: 10px;
    margin: 15px 0;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 11px;
    text-align: left;
}
.log-label { display: block; color: #666; font-size: 9px; margin-bottom: 3px; }
.log-text { color: #00ff00; text-shadow: 0 0 5px rgba(0,255,0,0.5); }

/* 3. WORK PAGE: MISSION GRID */
.mission-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 15px;
    border-top: 1px solid rgba(255,255,255,0.05);
    border-bottom: 1px solid rgba(255,255,255,0.05);
    padding: 10px 0;
}
.mission-item { display: flex; flex-direction: column; }
.mission-label { font-size: 9px; color: #666; letter-spacing: 1px; margin-bottom: 2px; }
.mission-val { font-size: 11px; color: var(--text-color); font-weight: 700; font-family: 'Oswald', sans-serif; }

/* Shimmer Animation Keyframe */
@keyframes shimmer {
    100% { transform: translateX(100%); }
}







/* ========================================= */
/* TEAM PAGE UPGRADES (Photos & Mottos)      */
/* ========================================= */

/* 1. Profile Picture Container */
.team-avatar-box {
    width: 120px;
    height: 120px;
    margin: 0 auto 20px;
    position: relative;
    border-radius: 50%; /* Makes it a perfect circle */
    border: 2px solid var(--accent-color);
    box-shadow: 0 0 20px rgba(229, 9, 20, 0.3); /* Red Glow */
    overflow: hidden; /* Crops image to circle */
    background: #000;
    transition: all 0.3s ease;
    transform: translateZ(30px); /* 3D Depth */
}

/* Hover Effect for Image */
.team-avatar-box:hover {
    transform: translateZ(50px) scale(1.05);
    box-shadow: 0 0 30px var(--accent-color);
    border-color: #fff;
}

/* 2. The Actual Image Tag */
.team-img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* IMPORTANT: Prevents image stretching */
    display: block;
}

/* 3. The Motto/Quote */
.team-quote {
    font-family: 'Montserrat', sans-serif;
    font-style: italic;
    font-size: 11px;
    color: #aaa; /* Silver text */
    margin: 5px 0 15px;
    padding: 0 10px;
    line-height: 1.4;
    min-height: 35px; /* Keeps cards aligned even with short quotes */
    display: flex;
    align-items: center;
    justify-content: center;
}

.team-quote span {
    position: relative;
}

.team-quote span::before {
    content: '"';
    color: var(--accent-color);
    font-weight: 700;
    margin-right: 3px;
}
.team-quote span::after {
    content: '"';
    color: var(--accent-color);
    font-weight: 700;
    margin-left: 3px;
}

