:root {
    --navy-dark: #0a1a2d;
    --navy-med: #152342;
    --blue-dark: #325786;
    --blue-light: #5f86bf;
    --cream: #e4e8d3;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #1a1a1a;
    color: #e0e0e0;
    line-height: 1.6;
    min-height: 100vh;
}

/* Optimized floating particles with hardware acceleration */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-image:
        radial-gradient(2px 2px at 20px 30px, rgba(95, 134, 191, 0.3), transparent),
        radial-gradient(2px 2px at 40px 70px, rgba(255, 255, 255, 0.1), transparent),
        radial-gradient(1px 1px at 90px 40px, rgba(95, 134, 191, 0.2), transparent),
        radial-gradient(1px 1px at 130px 80px, rgba(255, 255, 255, 0.05), transparent);
    background-repeat: repeat;
    background-size: 150px 150px;
    animation: float 20s infinite linear;
    pointer-events: none;
    z-index: -1;
    will-change: transform;
}

@keyframes float {
    0% {
        transform: translate3d(0, 0, 0);
    }
    100% {
        transform: translate3d(-150px, -150px, 0);
    }
}

/* Navigation */
nav {
    background: rgba(42, 42, 42, 0.5);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid #333;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

.logo a {
    color: var(--blue-light);
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: bold; 
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: #e0e0e0;
    text-decoration: none;
    transition: color 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 8px;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--blue-light);
    background: rgba(95, 134, 191, 0.15);
}

/* Main Content */
main {
    margin-top: 72.8px;
    min-height: calc(100vh - 80px);
    padding: 4rem 2rem;
}

.projects-container {
    max-width: 1400px;
    margin: 0 auto;
}

/* Hero Section */
.projects-hero {
    text-align: center;
    margin-bottom: 4rem;
}

.projects-hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, var(--blue-light), #ffffff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.projects-hero p {
    font-size: 1.3rem;
    color: #b0b0b0;
    max-width: 80%;
    margin: 0 auto;
}

/* Filter Tabs */
.project-filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.filter-btn {
    background: #2a2a2a;
    color: #e0e0e0;
    border: 1px solid #404040;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 500;
}

.filter-btn:hover, .filter-btn.active {
    background: var(--blue-light);
    color: white;
    border-color: var(--blue-light);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(95, 134, 191, 0.3);
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2.5rem;
}

.project-card {
    background: linear-gradient(145deg, #2a2a2a, #1f1f1f);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid #404040;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    position: relative;
    height: fit-content;
}

.project-card:hover {
    transform: translateY(-10px) rotateX(2deg);
    border-color: var(--blue-light);
    box-shadow: 
        0 25px 50px rgba(95, 134, 191, 0.2),
        0 10px 30px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(95, 134, 191, 0.1), transparent);
    transition: left 0.6s ease;
    z-index: 1;
}

.project-card:hover::before {
    left: 100%;
}

.project-image {
    height: 200px;
    background: linear-gradient(135deg, var(--blue-dark), var(--blue-light));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: white;
    position: relative;
    overflow: hidden;
}

.project-image::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(to top, rgba(26, 26, 26, 0.8), transparent);
}

.project-image-screenshot {
    height: 200px;
    display: flex;
    justify-content: center;
}

.project-content {
    padding: 2rem;
    position: relative;
    z-index: 2;
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.project-title {
    font-size: 1.5rem;
    color: var(--blue-light);
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.project-status {
    background: #00ff88;
    color: #000;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.project-status.in-development {
    background: #ffa500;
}

.project-status.completed {
    background: #00ff88;
}

.project-status.planning {
    background: #888;
}

.project-description {
    color: #c0c0c0;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.project-tag {
    background: var(--blue-dark);
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.project-links {
    display: flex;
    gap: 1rem;
}

.project-link {
    background: transparent;
    color: var(--blue-light);
    border: 1px solid var(--blue-light);
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.project-link:hover {
    background: var(--blue-light);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(95, 134, 191, 0.3);
}

.project-link.primary {
    background: var(--blue-light);
    color: white;
}

.project-link.primary:hover {
    background: var(--blue-dark);
}

/* Featured Project */
.featured-project {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    height: 400px;
    margin-bottom: 2rem;
}

.featured-project .project-image {
    height: 100%;
    border-radius: 20px 0 0 20px;
}

.featured-project .project-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: linear-gradient(135deg, #2d2d2d, #1a1a1a);
    border-radius: 0 20px 20px 0;
}

.featured-badge {
    background: linear-gradient(45deg, #ff6b6b, #ffa500);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    align-self: flex-start;
    margin-bottom: 1rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .projects-grid {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    }
    
    .featured-project {
        grid-template-columns: 1fr;
        height: auto;
    }
    
    .featured-project .project-image {
        border-radius: 20px 20px 0 0;
        height: 250px;
    }
    
    .featured-project .project-content {
        border-radius: 0 0 20px 20px;
    }
}

@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-links {
        gap: 1rem;
    }

    .projects-hero h1 {
        font-size: 2.5rem;
        margin-bottom: 0;
    }

    .projects-hero {
        margin-bottom: 2rem;
    }

    .projects-hero p {
        font-size: 1rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .featured-project .project-content {
        padding: 2rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .project-links {
        flex-direction: column;
    }
}