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

:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #141414;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --accent: #6366f1;
    --accent-light: #818cf8;
    --border: rgba(255, 255, 255, 0.1);
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    overflow-x: hidden;
    height: 100%;
    overscroll-behavior: none;
}
.video-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: -2;
    overflow: visible;
    background: none;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 8% 0 0 0; /* Push down 5% from top */
    pointer-events: none;
}

.video-background video {
    width: auto;
    height: 100vh;
    max-width: 50%;
    object-fit: contain;
    opacity: 0.5;
}

.webgl {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: -3 !important;
    transition: opacity 0.5s ease-in-out !important;
}

/* Pure black background */
body {
    background: #000000 !important;
}

.webgl {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: -3 !important;
    background: #000000 !important; /* Pure black */
    transition: opacity 0.5s ease-in-out !important;
}

.video-background::after {
    display: none;
}


    /* Keep stars behind video */
    .stars {
        z-index: -3 !important;
    }

/* Darken video for better text readability */
.video-background::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    pointer-events: none;
}

/* Hero Video Background - Only shows in hero section */
.hero-video-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1; /* Behind hero content, in front of 3D canvas */
    overflow: visible;
    background: none;
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    padding: 2% 0 0 0;
    pointer-events: none;
}

.hero-video-background video {
    width: auto;
    height: 100vh;
    max-width: 50%;
    object-fit: contain;
    opacity: 0.5;
}

.hero-video-background::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    pointer-events: none;
}
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    margin: 0;
    padding: 0;
    position: relative;
    min-height: 100%;
    overscroll-behavior: none;
}

/* Start Mechanical Css */
/* =========================================
   MIND-BLOWING INFINITE GALLERY
   ========================================= */
.infinite-gallery-wrapper {
    position: relative;
    width: 100%;
    height: 450px;
    overflow: hidden;
    background: #050505;
    border-top: 1px solid rgba(255,255,255,0.1);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    margin-bottom: 2rem;
}

.infinite-gallery-track {
    display: flex;
    width: max-content;
    animation: scrollGallery 40s linear infinite;
    /* Pause animation when user hovers over the track */
}

.infinite-gallery-wrapper:hover .infinite-gallery-track {
    animation-play-state: paused;
}

@keyframes scrollGallery {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); } /* Moves exactly half way (one set of images) */
}

/* Individual Card Styles */
.gallery-card {
    position: relative;
    width: 300px; /* Base width */
    height: 380px;
    margin: 0 15px;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.gallery-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
    filter: grayscale(60%) brightness(0.7); /* Cinematic dim look */
}

/* HOVER EFFECTS - The Mind Blowing Part */
.gallery-card:hover {
    width: 450px; /* Expands width on hover */
    border-color: var(--accent);
    box-shadow: 0 20px 50px rgba(99, 102, 241, 0.3);
    z-index: 10;
}

.gallery-card:hover img {
    transform: scale(1.1); /* Zoom in slightly */
    filter: grayscale(0%) brightness(1.1); /* Full color and bright */
}

/* The Mini Header Overlay */
.card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 2rem 1.5rem;
    background: linear-gradient(to top, rgba(0,0,0,0.95), transparent);
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.3s ease 0.1s; /* Slight delay for smoothness */
}

.gallery-card:hover .card-overlay {
    transform: translateY(0);
    opacity: 1;
}

.card-label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent);
    margin-bottom: 0.25rem;
    font-weight: 700;
}

.card-overlay h4 {
    color: white;
    font-size: 1.4rem;
    margin: 0;
    line-height: 1;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

/* Fade Edges */
.gallery-fade-left, .gallery-fade-right {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 150px;
    z-index: 2;
    pointer-events: none;
}
.gallery-fade-left {
    left: 0;
    background: linear-gradient(to right, var(--bg-primary), transparent);
}
.gallery-fade-right {
    right: 0;
    background: linear-gradient(to left, var(--bg-primary), transparent);
}

/* Button Container */
.gallery-action {
    text-align: center;
    margin-bottom: 6rem;
}

/* =========================================
   DETAILED SUB-SECTIONS (Arm, Base, etc)
   ========================================= */
.design-features {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.feature-card-detailed {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: 20px;
    overflow: hidden;
    align-items: center;
    transition: transform 0.3s ease;
}

.feature-card-detailed:hover {
    border-color: rgba(139, 92, 246, 0.3);
    transform: translateY(-5px);
}

.feature-card-detailed.reverse {
    direction: rtl; /* Quickly flips the layout */
}
.feature-card-detailed.reverse .feature-content {
    direction: ltr; /* Reset text direction */
}

.feature-content {
    padding: 3rem;
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.feature-visual {
    height: 100%;
    min-height: 300px;
    position: relative;
}

.feature-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    /* Subtle border between image and text */
    border-left: 1px solid var(--border);
}
.feature-card-detailed.reverse .feature-visual img {
    border-left: none;
    border-right: 1px solid var(--border);
}

.mech-list {
    margin-top: 1.5rem;
    padding: 0;
    list-style: none;
}

.mech-list li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.mech-list li::before {
    content: "⚡";
    position: absolute;
    left: 0;
    font-size: 0.8rem;
    opacity: 0.7;
}

/* Mobile Responsive */
@media (max-width: 900px) {
    .feature-card-detailed {
        grid-template-columns: 1fr;
    }
    .feature-card-detailed.reverse {
        direction: ltr;
    }
    .feature-visual {
        height: 250px;
        min-height: auto;
    }
    .feature-visual img {
        border: none !important;
        border-top: 1px solid var(--border) !important;
    }
    .gallery-card:hover {
        width: 300px; /* Don't expand on mobile */
    }
}


.caption {
    display: block;
    margin-top: 8px;
    font-size: 0.9em;
    color: #666;
    font-style: italic;
}

.mech-divider {
    border: 0;
    height: 1px;
    background: #ddd;
    margin: 40px 0;
}

.mech-list {
    margin-top: 10px;
    padding-left: 20px;
}

.mech-list li {
    margin-bottom: 5px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .feature-row, .feature-row.reverse {
        flex-direction: column;
        text-align: left;
    }
    .mech-slides img {
        height: 250px; /* Smaller height for phones */
    }
}

/* Three.js Canvas */
.webgl {
    position: fixed;
    top: 0;
    left: 0;
    outline: none;
    z-index: 1;
    opacity: 0.4;
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 4rem;
}

@media (max-width: 768px) {
    .container {
        padding: 0 2rem;
    }
}

/* Navigation */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 4rem;
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(20px);
    z-index: 1000;
    border-bottom: 1px solid var(--border);
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

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

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.3s ease;
    letter-spacing: -0.01em;
}

.nav-links a:hover {
    color: var(--text-primary);
}

.nav-cta {
    padding: 0.75rem 1.5rem;
    background: var(--text-primary);
    color: var(--bg-primary);
    text-decoration: none;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.nav-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(255, 255, 255, 0.2);
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 10rem 4rem 4rem 4rem;
    z-index: 10;
}

.hero-badge {
    position: relative;
    z-index: 1;
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--accent-light);
    margin-bottom: 3rem;
    width: fit-content;
}

.hero-title {
    position: relative;
    z-index: 1;
    font-size: clamp(2.4rem, 7vw, 6rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 4rem;
    max-width: 1200px;
    overflow: visible;
    padding: 0 0 15px 0; /* Padding ONLY at bottom of entire title block */
}

.hero-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline;
    line-height: inherit;
}

.hero {
    overflow: visible !important;
}

.hero-stats {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 3rem;
    max-width: 1000px;
    margin-top: 2rem;
}

.stat {
    border-top: 2px solid var(--border);
    padding-top: 1.5rem;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    letter-spacing: -0.01em;
}

/* Section Styles */
section {
    position: relative;
    padding: 3rem 0;
    z-index: 10;
}

.section-header {
    margin-bottom: 4rem;
}

.section-label {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent-light);
    margin-bottom: 1rem;
}

.section-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    max-width: 900px;
}

.section-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-top: 1.5rem;
    max-width: 700px;
}

.section-title.single-line {
    white-space: nowrap;
}

/* Overview Section */
.section-overview {
    background: var(--bg-secondary);
}

.overview-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6rem;
    margin-top: 3rem;
}

.overview-text {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.large-text {
    font-size: 1.5rem;
    line-height: 1.6;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.overview-text p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.overview-features {
    display: grid;
    gap: 2rem;
}

.feature-card {
    padding: 2rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: 16px;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
}

.feature-card h3 {
    font-size: 1rem;
    color: var(--accent);
    margin-bottom: 1rem;
    font-weight: 600;
}

.feature-card h4 {
    font-size: 1.3rem;
    margin-bottom: 0.8rem;
    font-weight: 600;
}

.feature-card p {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Demo Section */

.media-placeholder,
.diagram-placeholder {
    background: rgba(255, 255, 255, 0.02);
    border: 2px dashed var(--border);
    border-radius: 20px;
    padding: 4rem;
    text-align: center;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.placeholder-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    color: var(--text-secondary);
}

.placeholder-content svg {
    opacity: 0.3;
}

.demo-specs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 3rem;
    margin-top: 4rem;
}

.spec-item h4 {
    font-size: 1.1rem;
    margin-bottom: 0.8rem;
    font-weight: 600;
}

.spec-item p {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Process Section */
.section-process {
    background: var(--bg-secondary);
}

.process-intro {
    max-width: 900px;
    margin: 3rem 0;
}

.decisions-grid {
    display: grid;
    gap: 3rem;
    margin-top: 4rem;
}

.decision-card {
    padding: 3rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: 20px;
    transition: transform 0.3s ease;
}

.decision-card:hover {
    transform: translateX(10px);
}

.decision-number {
    font-size: 3rem;
    font-weight: 700;
    color: rgba(99, 102, 241, 0.2);
    margin-bottom: 1rem;
}

.decision-card h3 {
    font-size: 2rem;
    margin-bottom: 2rem;
    font-weight: 600;
}

.decision-details {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.detail-item strong {
    display: block;
    font-size: 0.9rem;
    color: var(--accent-light);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.detail-item p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.diagram-section {
    margin-top: 6rem;
}

.diagram-section h3 {
    font-size: 2rem;
    margin-bottom: 2rem;
    font-weight: 600;
}

.diagram-note {
    display: block;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 1rem;
    font-style: italic;
}

/* Technical Section */
.tech-block {
    margin-bottom: 6rem;
}

.tech-block h3 {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    font-weight: 600;
}

.flow-description {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    margin-top: 3rem;
}

.flow-column h4 {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.flow-list {
    list-style: none;
    counter-reset: flow-counter;
}

.flow-list li {
    counter-increment: flow-counter;
    padding-left: 2.5rem;
    position: relative;
    margin-bottom: 1rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.flow-list li::before {
    content: counter(flow-counter);
    position: absolute;
    left: 0;
    top: 0;
    width: 1.5rem;
    height: 1.5rem;
    background: var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
}

.components-grid,
.specs-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin: 3rem 0;
}

.component-item,
.spec-card {
    padding: 2rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.component-item strong,
.spec-card strong {
    display: block;
    font-size: 1.1rem;
    margin-bottom: 0.8rem;
    color: var(--text-primary);
}

.component-item p,
.spec-card p {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.analysis-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
    margin-top: 3rem;
}

.analysis-item h4 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.analysis-item p {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Software Section */
.software-modules {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin: 3rem 0;
}

.module-card {
    padding: 2rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.module-card h4 {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.module-card p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 0.8rem;
}

.dependencies {
    margin: 4rem 0;
}

.dependencies h4 {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.deps-list {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.dep-tag {
    padding: 0.6rem 1.2rem;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 50px;
    font-size: 0.9rem;
    color: var(--accent-light);
}

.code-link {
    text-align: center;
    margin-top: 4rem;
    padding: 3rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: 20px;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1.2rem 2.5rem;
    background: var(--accent);
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(99, 102, 241, 0.4);
}

.code-note {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-top: 1.5rem;
    line-height: 1.6;
}

/* Budget Section */
.section-budget {
    background: var(--bg-secondary);
}

.bom-table-wrapper {
    overflow-x: auto;
    margin: 3rem 0;
}

.bom-table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}

.bom-table thead {
    background: rgba(99, 102, 241, 0.1);
}

.bom-table th {
    padding: 1.5rem 2rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--accent-light);
}

.bom-table td {
    padding: 1.2rem 2rem;
    border-top: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 1rem;
}

.category-row td {
    background: rgba(255, 255, 255, 0.03);
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1.1rem;
}

.total-row td {
    background: rgba(99, 102, 241, 0.1);
    font-weight: 700;
    color: var(--text-primary);
    font-size: 1.2rem;
    padding: 1.5rem 2rem;
}

.budget-note {
    font-size: 0.95rem;
    color: var(--text-secondary);
    font-style: italic;
    margin-top: 2rem;
}

/* Team Section */
.team-content {
    margin-top: 3rem;
}

.team-members {
    margin-bottom: 4rem;
}

.acknowledgments {
    margin: 4rem 0;
    padding: 3rem;
    background: rgba(255, 255, 255, 1);
    border: 1px solid var(--border);
    border-radius: 20px;
}

.acknowledgments h3 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.acknowledgments p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.future-work h3 {
    font-size: 2rem;
    margin-bottom: 2rem;
    font-weight: 600;
}

.improvements-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.improvement-card {
    padding: 2rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.improvement-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
    min-width: 2rem;
}

.improvement-card p {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

/* Footer */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 4rem 0 2rem 0;
    position: relative;
    z-index: 10;
    margin: 0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
}

.footer-logo {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.footer-brand p {
    color: var(--text-secondary);
    font-size: 1rem;
}

.footer-links {
    display: flex;
    gap: 3rem;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--text-primary);
}

.footer-bottom {
    padding-top: 2rem;
    padding-bottom: 0;
    border-top: 1px solid var(--border);
    text-align: center;
    margin-bottom: 0;
}

.footer-bottom p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0;
    padding-bottom: 0;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .hero-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .overview-grid,
    .flow-description {
        grid-template-columns: 1fr;
    }
    
    .demo-specs,
    .components-grid,
    .specs-grid,
    .analysis-grid,
    .software-modules {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav {
        padding: 1.5rem 2rem;
    }
    
    .nav-links {
        display: none;
    }
    
    .hero {
        padding: 8rem 2rem 4rem 2rem;
    }
    
    .hero-stats,
    .demo-specs,
    .components-grid,
    .specs-grid,
    .analysis-grid,
    .software-modules,
    .improvements-grid {
        grid-template-columns: 1fr;
    }
    
    .decisions-grid {
        gap: 2rem;
    }
    
    .decision-card {
        padding: 2rem;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 2rem;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

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

section {
    animation: fadeInUp 0.8s ease-out;
}

/* Three.js Canvas */
.webgl {
    position: fixed;
    top: 0;
    left: 0;
    outline: none;
    z-index: 1;
}

/* Navigation */

.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 3rem;
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #fff;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: #e0e0e0;
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.3s ease;
    position: relative;
}

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

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}
/* Dropdown Styles */
.nav-dropdown {
    position: relative !important;
}

.dropdown-trigger {
    display: flex !important;
    align-items: center !important;
    cursor: pointer !important;
}

.dropdown-menu {
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    background: rgba(10, 10, 15, 0.98) !important;
    border: 1px solid rgba(139, 92, 246, 0.3) !important;
    border-radius: 8px !important;
    padding: 0.5rem 0 !important;
    min-width: 200px !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translateY(-10px) !important;
    transition: all 0.3s ease !important;
    margin-top: 0.5rem !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5) !important;
    z-index: 1000 !important;
    display: block !important;
}

/* HOVER STATE - THIS WAS MISSING! */
.nav-dropdown:hover .dropdown-menu {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
}

/* Rotate arrow on hover */
.nav-dropdown:hover .dropdown-trigger svg {
    transform: rotate(180deg) !important;
}

.dropdown-menu a {
    display: block !important;
    padding: 0.75rem 1.5rem !important;
    color: rgba(255, 255, 255, 0.8) !important;
    text-decoration: none !important;
    font-size: 0.95rem !important;
    transition: all 0.2s ease !important;
    border-left: 3px solid transparent !important;
}

.dropdown-menu a:hover {
    background: rgba(139, 92, 246, 0.1) !important;
    color: rgba(139, 92, 246, 1) !important;
    border-left-color: rgba(139, 92, 246, 1) !important;
    padding-left: 1.75rem !important;
}

/* Sections */
.section {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 100vh;
    padding: 8rem 3rem 4rem 3rem;
    z-index: 10;
}

.content {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    background: rgba(20, 20, 20, 0.85);
    backdrop-filter: blur(20px);
    padding: 3rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

/* Typography */
h1 {
    font-size: 4rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    line-height: 1.2;
}

h2 {
    font-size: 2.5rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 1.5rem;
    position: relative;
    display: inline-block;
}

h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #fff;
    margin: 2rem 0 1rem 0;
}

h4 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #b8b8b8;
    margin-bottom: 0.5rem;
}

p {
    font-size: 1.1rem;
    color: #c0c0c0;
    margin-bottom: 1rem;
    line-height: 1.7;
}

.subtitle {
    font-size: 1.5rem;
    color: #9ca3af;
    margin-bottom: 2rem;
}

.intro {
    font-size: 1.3rem;
    color: #d1d5db;
    max-width: 800px;
}

/* Highlight Boxes */
.highlight-box {
    background: rgba(102, 126, 234, 0.1);
    border-left: 4px solid #667eea;
    padding: 1.5rem;
    border-radius: 8px;
    margin: 2rem 0;
}

.highlight-box h3 {
    margin-top: 0;
    color: #667eea;
}

.highlight-box ul {
    list-style: none;
    padding-left: 0;
}

.highlight-box li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: #c0c0c0;
}

.highlight-box li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: #667eea;
    font-weight: bold;
}

/* Decision Cards */
.decision-card {
    background: rgba(40, 40, 40, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.decision-card h4 {
    color: #667eea;
    margin-bottom: 1rem;
}

.decision-card p {
    margin-bottom: 0.8rem;
}

/* Media Containers */
.media-container {
    margin: 2rem 0;
}

.video-placeholder,
.diagram-placeholder {
    background: rgba(30, 30, 30, 0.8);
    border: 2px dashed rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 3rem;
    text-align: center;
    margin: 2rem 0;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.video-placeholder p,
.diagram-placeholder p {
    color: #808080;
    font-style: italic;
}

.caption {
    font-size: 0.9rem;
    color: #707070;
    margin-top: 1rem;
}

/* Lists */
ul {
    list-style: none;
    padding-left: 0;
}

.content > ul > li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: #c0c0c0;
}

.content > ul > li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: #667eea;
    font-weight: bold;
    font-size: 1.5rem;
    line-height: 1.2;
}

/* Table (Bill of Materials) */
.bom-table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    font-size: 0.95rem;
    background: rgba(20, 20, 20, 0.6);
    border-radius: 8px;
    overflow: hidden;
}

.bom-table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.bom-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: #fff;
}

.bom-table td {
    padding: 0.8rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: #c0c0c0;
}

.bom-table tbody tr:hover {
    background: rgba(102, 126, 234, 0.05);
}

.category-header td {
    background: rgba(102, 126, 234, 0.15);
    font-weight: 600;
    color: #fff;
    padding: 0.8rem 1rem;
}

.total-row td {
    border-top: 2px solid #667eea;
    padding-top: 1rem;
    font-size: 1.1rem;
    background: rgba(102, 126, 234, 0.1);
}

/* Buttons */
.button {
    display: inline-block;
    padding: 0.8rem 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin: 1rem 0;
}

.button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

/* Footer */
footer {
    position: relative;
    z-index: 10;
    text-align: center;
    padding: 3rem 3rem 0 3rem;
    background: rgba(20, 20, 20, 0.9);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin: 0;
}

footer p {
    color: #808080;
    margin: 0.5rem 0 0 0;
}

footer a {
    color: #667eea;
    text-decoration: none;
    transition: color 0.3s ease;
}

footer a:hover {
    color: #764ba2;
}

/* Notes */
.note {
    font-size: 0.9rem;
    color: #808080;
    font-style: italic;
    margin-top: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav {
        flex-direction: column;
        padding: 1rem;
        gap: 1rem;
    }
    
    .nav-links {
        gap: 1rem;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .section {
        padding: 6rem 1.5rem 3rem 1.5rem;
    }
    
    .content {
        padding: 2rem 1.5rem;
    }
    
    h1 {
        font-size: 2.5rem;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    .bom-table {
        font-size: 0.8rem;
    }
    
    .bom-table th,
    .bom-table td {
        padding: 0.5rem;
    }
}

/* Smooth Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.content {
    animation: fadeIn 0.8s ease-out;
}


/* Software Section */
.software-modules {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin: 3rem 0;
}

.module-card {
    padding: 2rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.module-card h4 {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.module-card p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 0.8rem;
}

.dependencies {
    margin: 4rem 0;
}

.dependencies h4 {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.deps-list {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.dep-tag {
    padding: 0.6rem 1.2rem;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 50px;
    font-size: 0.9rem;
    color: var(--accent-light);
}

.code-link {
    text-align: center;
    margin-top: 4rem;
    padding: 3rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: 20px;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1.2rem 2.5rem;
    background: var(--accent);
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(99, 102, 241, 0.4);
}

.code-note {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-top: 1.5rem;
    line-height: 1.6;
}

/* Make all technical cards solid dark */
.component-item,
.analysis-item,
.spec-card,
.improvement-card,
.feature-card {
    /* Use the same dark background as the demo specs */
    background: #0a0a0a !important; 
    backdrop-filter: blur(10px); /* Ensures text stays readable */
    transition: all 0.3s ease;
}

/* Optional: Make them slightly lighter when you hover over them */
.component-item:hover,
.analysis-item:hover,
.spec-card:hover,
.improvement-card:hover,
.feature-card:hover {
    background: #141414 !important;
    border-color: rgba(139, 92, 246, 0.4);
    transform: translateY(-5px);
}