/* ============================================
   CSS VARIABLES - Space-Tech Theme
   ============================================ */
:root {
    --neon-cyan: #00ffff;
    --electric-blue: #64c8ff;
    --dark-bg: #000000;
    --dark-surface: #0a0a0a;
    --dark-card: rgba(15, 15, 20, 0.8);
    --glow-color: rgba(100, 200, 255, 0.6);
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --text-muted: #666666;
    --border-color: rgba(100, 200, 255, 0.2);
    --success-green: #00ff88;
}

/* ============================================
   RESET & BASE STYLES
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

html, body {
    height: 100%;
    width: 100%;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--dark-bg);
    color: var(--text-primary);
    line-height: 1.6;
    position: relative;
    /* Hide scrollbar on the main projects page but keep scrolling */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

/* Hide scrollbar for Chrome, Safari, and Opera on the main projects page */
body::-webkit-scrollbar {
    display: none;
}

/* ============================================
   NAVIGATION BAR
   ============================================ */
.projects-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100vw;
    z-index: 1000;
    padding: 2rem 4rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    box-sizing: border-box;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    height: 50px;
}

.nav-logo img {
    height: 50px;
    width: auto;
    max-width: 50px;
    min-width: 40px;
    object-fit: contain;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-logo span {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.3em;
    color: var(--electric-blue);
    text-transform: uppercase;
}

.nav-logo:hover img {
    transform: rotate(360deg) scale(1.1);
    filter: drop-shadow(0 0 8px var(--glow-color));
}

.nav-links {
    display: flex;
    gap: 3rem;
    list-style: none;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 400;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    position: relative;
    transition: color 0.3s ease;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--electric-blue);
    transition: width 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--electric-blue);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.nav-resume-btn {
    padding: 0.5rem 1.2rem !important;
    border: 1px solid rgba(100, 200, 255, 0.5) !important;
    border-radius: 4px;
    background: rgba(100, 200, 255, 0.1);
    color: var(--electric-blue) !important;
    font-size: 0.85rem !important;
    transition: all 0.3s ease;
}

.nav-resume-btn::after {
    display: none;
}

.nav-resume-btn:hover {
    background: rgba(100, 200, 255, 0.2) !important;
    border-color: var(--electric-blue) !important;
    box-shadow: 0 0 15px var(--glow-color);
    transform: translateY(-2px);
}

/* Mobile Menu Toggle Button */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
    position: relative;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 2px;
    background: var(--electric-blue);
    transition: all 0.3s ease;
    border-radius: 2px;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* ============================================
   HERO SECTION
   ============================================ */
.projects-hero {
    position: relative;
    height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding-top: 100px;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}

.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
    z-index: 0;
    opacity: 0.4;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.6) 0%,
        rgba(0, 0, 0, 0.4) 50%,
        rgba(0, 0, 0, 0.6) 100%
    );
    z-index: 1;
}

.grid-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(100, 200, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(100, 200, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: gridMove 20s linear infinite;
    z-index: 2;
}

.stars-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(2px 2px at 20% 30%, var(--electric-blue), transparent),
        radial-gradient(2px 2px at 60% 70%, var(--electric-blue), transparent),
        radial-gradient(1px 1px at 50% 50%, var(--electric-blue), transparent),
        radial-gradient(1px 1px at 80% 10%, var(--electric-blue), transparent),
        radial-gradient(2px 2px at 90% 60%, var(--electric-blue), transparent);
    background-size: 200% 200%;
    animation: starField 30s linear infinite;
    opacity: 0.6;
    z-index: 3;
}

.scan-lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(100, 200, 255, 0.03) 2px,
        rgba(100, 200, 255, 0.03) 4px
    );
    animation: scanMove 8s linear infinite;
    pointer-events: none;
    z-index: 4;
}

@keyframes gridMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

@keyframes starField {
    0% { background-position: 0% 0%; }
    100% { background-position: 100% 100%; }
}

@keyframes scanMove {
    0% { transform: translateY(0); }
    100% { transform: translateY(100vh); }
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    animation: fadeInUp 1s ease-out;
}

.hero-hud {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1rem;
}

.hud-line {
    width: 100px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--electric-blue), transparent);
    box-shadow: 0 0 10px var(--glow-color);
}

.hero-title {
    font-size: 5rem;
    font-weight: 900;
    letter-spacing: 0.2em;
    color: var(--text-primary);
    text-transform: uppercase;
    text-shadow: 0 0 30px var(--glow-color);
    margin: 0;
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 300;
    color: var(--text-secondary);
    letter-spacing: 0.1em;
    margin-top: 1rem;
    margin-bottom: 2rem;
}

.hero-telemetry {
    display: flex;
    gap: 3rem;
    justify-content: center;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.telemetry-item {
    padding: 0.5rem 1.5rem;
    border: 1px solid var(--border-color);
    background: rgba(100, 200, 255, 0.05);
    backdrop-filter: blur(10px);
}

.glow-text {
    color: var(--electric-blue);
    text-shadow: 0 0 10px var(--glow-color);
    font-weight: 600;
}

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

/* ============================================
   PROJECTS SHOWCASE SECTION
   ============================================ */
.projects-showcase {
    position: relative;
    padding: 8rem 4rem;
    background: var(--dark-bg);
    min-height: 100vh;
    overflow: hidden;
    perspective: 1000px; /* 3D perspective */
}

.showcase-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}

.showcase-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
    z-index: 0;
    opacity: 0.3;
    filter: blur(3px);
}

.showcase-background .video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.7) 0%,
        rgba(0, 0, 0, 0.5) 50%,
        rgba(0, 0, 0, 0.7) 100%
    );
    z-index: 1;
}

.container {
    position: relative;
    z-index: 2;
    max-width: 1400px;
    margin: 0 auto;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
}

/* ============================================
   PROJECT CARD - Glassmorphism
   ============================================ */
.project-card {
    position: relative;
    background: var(--dark-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.1s ease-out;
    cursor: pointer;
    transform-style: preserve-3d;
    will-change: transform;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, transparent, rgba(100, 200, 255, 0.1), transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 1;
    pointer-events: none;
}

.project-card:hover {
    border-color: var(--electric-blue);
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.5),
        0 0 30px var(--glow-color),
        inset 0 0 30px rgba(100, 200, 255, 0.1);
}

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

.card-image {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
    background: var(--dark-surface);
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
}

.image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    color: var(--text-muted);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    background: linear-gradient(135deg, rgba(100, 200, 255, 0.05), rgba(100, 200, 255, 0.02));
}

.project-report-viewer {
    margin-top: 1rem;
}

#projectReportEmbedContainer {
    width: 100%;
    height: 80vh;
    max-height: 80vh;
    border: 1px solid rgba(100, 200, 255, 0.3);
    border-radius: 8px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.6);
}

#projectReportEmbedContainer iframe,
#projectReportEmbedContainer embed {
    width: 100%;
    height: 100%;
    border: none;
}

.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.7));
    opacity: 0;
    transition: opacity 0.4s ease;
}

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

.card-content {
    padding: 2rem;
    position: relative;
    z-index: 2;
}

.project-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    letter-spacing: 0.05em;
}

.project-mission {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.tech-icon {
    padding: 0.4rem 0.8rem;
    background: rgba(100, 200, 255, 0.1);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--electric-blue);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all 0.3s ease;
}

.tech-icon:hover {
    background: rgba(100, 200, 255, 0.2);
    border-color: var(--electric-blue);
    box-shadow: 0 0 10px var(--glow-color);
    transform: translateY(-2px);
}

.view-mission-btn {
    width: 100%;
    padding: 1rem 2rem;
    background: transparent;
    border: 2px solid var(--electric-blue);
    border-radius: 8px;
    color: var(--electric-blue);
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
}

.view-mission-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(100, 200, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.view-mission-btn:hover {
    background: rgba(100, 200, 255, 0.1);
    box-shadow: 0 0 20px var(--glow-color);
    transform: translateY(-2px);
}

.view-mission-btn:hover::before {
    left: 100%;
}

/* ============================================
   PROJECT DETAIL SECTION
   ============================================ */
.project-detail {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    z-index: 2000;
    overflow-y: auto;
    padding: 6rem 4rem 4rem;
    animation: fadeIn 0.3s ease;
    /* Hide scrollbar but keep scrolling functionality */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

/* Hide scrollbar for Chrome, Safari, and Opera */
.project-detail::-webkit-scrollbar {
    display: none;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.close-detail-btn {
    position: fixed;
    top: 2rem;
    right: 4rem;
    width: 50px;
    height: 50px;
    background: rgba(100, 200, 255, 0.1);
    border: 2px solid var(--electric-blue);
    border-radius: 50%;
    color: var(--electric-blue);
    font-size: 2rem;
    font-weight: 300;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 2001;
}

.close-detail-btn:hover {
    background: rgba(100, 200, 255, 0.2);
    box-shadow: 0 0 20px var(--glow-color);
    transform: rotate(90deg);
}

.detail-content {
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--electric-blue);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
    text-shadow: 0 0 20px var(--glow-color);
}

.mission-brief {
    margin-bottom: 4rem;
}

.brief-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-secondary);
    max-width: 900px;
}

.project-gallery {
    margin-bottom: 4rem;
}

.gallery-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.gallery-main {
    position: relative;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    aspect-ratio: 16/9;
    background: var(--dark-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 0 30px rgba(100, 200, 255, 0.1);
}

.gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    background: var(--dark-surface);
}

.gallery-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid var(--electric-blue);
    border-radius: 50%;
    color: var(--electric-blue);
    font-size: 2rem;
    font-weight: 300;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
    backdrop-filter: blur(10px);
}

.gallery-nav-btn:hover {
    background: rgba(100, 200, 255, 0.2);
    box-shadow: 0 0 20px var(--glow-color);
    transform: translateY(-50%) scale(1.1);
}

.gallery-prev {
    left: 1rem;
}

.gallery-next {
    right: 1rem;
}

.gallery-thumbnails {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding: 1rem 0;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.gallery-thumbnails::-webkit-scrollbar {
    height: 8px;
}

.gallery-thumbnails::-webkit-scrollbar-track {
    background: var(--dark-surface);
    border-radius: 4px;
}

.gallery-thumbnails::-webkit-scrollbar-thumb {
    background: var(--electric-blue);
    border-radius: 4px;
}

.gallery-thumbnail {
    flex-shrink: 0;
    width: 120px;
    height: 80px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--dark-card);
}

.gallery-thumbnail:hover {
    border-color: var(--electric-blue);
    transform: translateY(-4px);
    box-shadow: 0 4px 15px rgba(100, 200, 255, 0.3);
}

.gallery-thumbnail.active {
    border-color: var(--electric-blue);
    box-shadow: 0 0 20px var(--glow-color);
}

.gallery-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.system-architecture {
    margin-bottom: 4rem;
}

.architecture-diagram {
    background: var(--dark-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    font-family: 'JetBrains Mono', monospace;
    color: var(--text-secondary);
    line-height: 2;
    white-space: pre-wrap;
    overflow-x: auto;
}

.engineering-stack {
    margin-bottom: 4rem;
}

.stack-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.stack-tag {
    padding: 0.8rem 1.5rem;
    background: rgba(100, 200, 255, 0.1);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--electric-blue);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: all 0.3s ease;
    box-shadow: 0 0 10px rgba(100, 200, 255, 0.2);
}

.stack-tag:hover {
    background: rgba(100, 200, 255, 0.2);
    border-color: var(--electric-blue);
    box-shadow: 0 0 20px var(--glow-color);
    transform: translateY(-3px);
}

.mission-status {
    margin-bottom: 2rem;
}

.linkedin-link {
    margin-bottom: 2rem;
}

.linkedin-btn {
    display: inline-flex;
    align-items: center;
    padding: 1rem 2rem;
    background: transparent;
    border: 2px solid #0077b5;
    border-radius: 8px;
    color: #0077b5;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-decoration: none;
    text-transform: uppercase;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.linkedin-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 119, 181, 0.2), transparent);
    transition: left 0.5s ease;
}

.linkedin-btn:hover {
    background: rgba(0, 119, 181, 0.1);
    box-shadow: 0 0 20px rgba(0, 119, 181, 0.4);
    transform: translateY(-2px);
    border-color: #00a0dc;
    color: #00a0dc;
}

.linkedin-btn:hover::before {
    left: 100%;
}

.linkedin-btn svg {
    transition: transform 0.3s ease;
}

.linkedin-btn:hover svg {
    transform: scale(1.1);
}

.status-hud {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.hud-bar {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.hud-label {
    display: flex;
    justify-content: space-between;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.hud-value {
    color: var(--electric-blue);
    font-weight: 600;
    text-shadow: 0 0 10px var(--glow-color);
}

.hud-progress {
    width: 100%;
    height: 8px;
    background: rgba(100, 200, 255, 0.1);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.hud-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--electric-blue), var(--neon-cyan));
    box-shadow: 0 0 10px var(--glow-color);
    transition: width 1s ease-out;
    position: relative;
}

.hud-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* ============================================
   FOOTER
   ============================================ */
.projects-footer {
    background: var(--dark-bg);
    border-top: 1px solid var(--border-color);
    padding: 3rem 4rem;
    text-align: center;
}

.footer-content p {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    color: var(--text-secondary);
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

/* ============================================
   CURSOR HOVER GLOW
   ============================================ */
.project-card,
.view-mission-btn,
.close-detail-btn,
.stack-tag {
    cursor: pointer;
}

.project-card:hover,
.view-mission-btn:hover,
.close-detail-btn:hover,
.stack-tag:hover {
    cursor: pointer;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 1024px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }

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

    .hero-telemetry {
        flex-direction: column;
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    .projects-nav {
        padding: 1rem 1.5rem;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .nav-logo img {
        height: 35px;
        max-width: 35px;
    }

    .nav-logo span {
        font-size: 1rem;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: rgba(0, 0, 0, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        padding: 5rem 2rem 2rem;
        gap: 0;
        transition: right 0.3s ease;
        border-left: 1px solid var(--border-color);
        z-index: 1000;
        overflow-y: auto;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links li {
        width: 100%;
        margin-bottom: 0.5rem;
    }

    .nav-links a {
        display: block;
        width: 100%;
        padding: 1rem 0;
        font-size: 0.9rem;
        border-bottom: 1px solid rgba(100, 200, 255, 0.1);
    }

    .nav-links a:hover {
        padding-left: 1rem;
        border-left: 3px solid var(--electric-blue);
    }

    .nav-resume-btn {
        margin-top: 1rem;
        width: 100%;
        text-align: center;
        padding: 1rem !important;
    }

    .projects-showcase {
        padding: 6rem 2rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

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

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .project-detail {
        padding: 4rem 2rem 2rem;
    }

    .close-detail-btn {
        top: 1rem;
        right: 2rem;
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }

    .section-title {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .projects-nav {
        padding: 0.75rem 1rem;
    }

    .nav-logo {
        height: 30px;
    }

    .nav-logo img {
        height: 30px;
        max-width: 30px;
    }

    .nav-logo span {
        font-size: 0.85rem;
    }

    .mobile-menu-toggle span {
        width: 22px;
    }

    .nav-links {
        width: 100%;
        right: -100%;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links a {
        font-size: 0.85rem;
        padding: 0.9rem 0;
    }

    .projects-hero {
        padding-top: 80px;
    }

    .hero-title {
        font-size: 1.8rem;
        letter-spacing: 0.08em;
        line-height: 1.2;
    }

    .hero-subtitle {
        font-size: 0.95rem;
    }

    .projects-showcase {
        padding: 4rem 1rem;
    }

    .projects-grid {
        gap: 1.5rem;
    }

    .project-detail {
        padding: 3rem 1rem 2rem;
    }

    .close-detail-btn {
        top: 0.5rem;
        right: 1rem;
        width: 35px;
        height: 35px;
        font-size: 1.3rem;
    }

    .section-title {
        font-size: 1.3rem;
    }

    .mission-brief p,
    .architecture-display {
        font-size: 0.85rem;
        line-height: 1.6;
    }

    .stack-tags {
        gap: 0.5rem;
    }

    .stack-tag {
        padding: 0.4rem 0.8rem;
        font-size: 0.75rem;
    }

    .projects-footer {
        padding: 2rem 1rem;
    }

    .view-mission-btn {
        min-height: 44px; /* Better touch target */
        padding: 0.8rem 1.5rem;
        font-size: 0.85rem;
    }

    .gallery-main img {
        max-height: 50vh;
        object-fit: contain;
    }

    .gallery-thumbnails {
        gap: 0.5rem;
        padding: 0.5rem;
    }

    .gallery-thumbnail {
        min-width: 60px;
        min-height: 60px;
    }

    .gallery-nav-btn {
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }

    /* Prevent horizontal scroll */
    * {
        max-width: 100%;
    }

    img {
        max-width: 100%;
        height: auto;
    }
}
