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

body {
    font-family: 'Georgia', serif;
    background-color: #0a0a0a;
    color: #ffffff;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Navigation */
.nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 30px 50px;
    z-index: 1000;
    background: rgba(10, 10, 10, 0.9);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.nav.scrolled {
    padding: 20px 50px;
    background: rgba(10, 10, 10, 0.95);
}

.nav-links {
    display: flex;
    justify-content: center;
    gap: 40px;
}

.nav-links a {
    color: #ffffff;
    text-decoration: none;
    font-size: 16px;
    transition: color 0.3s ease;
    position: relative;
}

.nav-links a:hover {
    color: #ff6b35;
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background: #ff6b35;
}

/* Back Button */
.back-btn {
    position: fixed;
    top: 30px;
    left: 50px;
    z-index: 1001;
    color: #888;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.back-btn:hover {
    color: #ff6b35;
}

.back-btn::before {
    content: '← ';
}

/* Main Content */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 120px 50px 50px;
}

/* Hero Section */
.hero {
    text-align: center;
    margin-bottom: 80px;
}

.hero-title {
    font-size: 4rem;
    font-weight: 400;
    color: #888;
    margin-bottom: 20px;
    letter-spacing: -2px;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: #888;
    max-width: 800px;
    margin: 0 auto;
}

.hero-highlight {
    color: #ff6b35;
}

/* Filter Tabs */
.filter-tabs {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 80px;
    flex-wrap: wrap;
}

.filter-tab {
    background: transparent;
    border: 1px solid #333;
    color: #888;
    padding: 12px 24px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    text-transform: lowercase;
    letter-spacing: 0.5px;
}

.filter-tab.active,
.filter-tab:hover {
    border-color: #ff6b35;
    color: #ff6b35;
    background: rgba(255, 107, 53, 0.1);
}

/* Project Grid - responsive and centers single items */
.projects-grid {
    display: grid;
    /* smaller min column so narrow screens and single-item filters look better */
    /* show two cards per row on wider screens */
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
    margin-bottom: 80px;
    /* center the grid items horizontally so a single card doesn't stick to the left */
    justify-items: center;
}

.project-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid #222;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    opacity: 0;
    transform: translateY(30px);
    /* avoid stretching to full container width when a single item is shown */
    width: 100%;
    max-width: 820px; /* tune this to taste */
}


.project-card.show {
    opacity: 1;
    transform: translateY(0);
}

.project-card:hover {
    transform: translateY(-10px);
    border-color: #ff6b35;
    box-shadow: 0 20px 40px rgba(255, 107, 53, 0.1);
}

.project-image {
    /* Use a consistent aspect ratio so images scale and crop predictably */
    aspect-ratio: 16 / 9;
    width: 100%;
    max-height: 420px;
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    position: relative;
    overflow: hidden;
}

.project-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.project-preview {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    text-align: center;
    color: #fff;
}

.project-preview h4 {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.project-content {
    padding: 30px;
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.project-title {
    font-size: 1.3rem;
    color: #fff;
    margin-bottom: 5px;
}

.project-type {
    background: rgba(255, 107, 53, 0.1);
    color: #ff6b35;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    border: 1px solid rgba(255, 107, 53, 0.3);
    white-space: nowrap;
}

.project-description {
    color: #888;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 20px;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 25px;
}

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

.project-links {
    display: flex;
    gap: 15px;
}

.project-link {
    color: #888;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
    position: relative;
}

.project-link:hover {
    color: #ff6b35;
}

.project-link.primary {
    color: #ff6b35;
    font-weight: bold;
}

/* Category Sections */
.category-section {
    margin-bottom: 100px;
}

.category-header {
    text-align: center;
    margin-bottom: 60px;
}

.category-title {
    font-size: 2.5rem;
    font-weight: 400;
    color: #fff;
    margin-bottom: 15px;
    letter-spacing: -1px;
}

.category-description {
    color: #888;
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

.category-count {
    background: rgba(255, 107, 53, 0.1);
    color: #ff6b35;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    border: 1px solid rgba(255, 107, 53, 0.3);
    display: inline-block;
    margin-top: 10px;
}

/* Statistics */
.stats-section {
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid #222;
    border-radius: 20px;
    padding: 60px 40px;
    margin: 80px 0;
    text-align: center;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    color: #ff6b35;
    font-weight: bold;
    display: block;
    margin-bottom: 8px;
}

.stat-label {
    color: #888;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Footer */
.footer {
    text-align: center;
    padding: 50px 0;
    border-top: 1px solid #222;
    color: #666;
    font-size: 14px;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 120px 20px 50px;
    }

    .nav {
        padding: 20px;
    }

    .nav-links {
        gap: 20px;
        flex-wrap: wrap;
    }

    .back-btn {
        left: 20px;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .filter-tabs {
        gap: 15px;
        margin-bottom: 50px;
    }

    .project-header {
        flex-direction: column;
        gap: 10px;
    }

    .stats-section {
        padding: 40px 20px;
    }
    
    .project-card {
        max-width: 100%;
    }
}