:root {
    --primary-blue: #0066cc;
    --primary-blue-dark: #004d99;
    --secondary-blue: #0080ff;
    --accent-cyan: #00d4ff;
    --dark-bg: #0a1628;
    --darker-bg: #050d18;
    --card-bg: #0f1c2e;
    --border-color: rgba(0, 212, 255, 0.15);
    --text-primary: #e8f0f7;
    --text-secondary: #9fb3c8;
    --text-muted: #6b8099;
    --success-green: #10b981;
    --gradient-1: linear-gradient(135deg, #0066cc 0%, #00d4ff 100%);
    --gradient-2: linear-gradient(135deg, rgba(0, 102, 204, 0.1) 0%, rgba(0, 212, 255, 0.1) 100%);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --glow-blue: 0 0 20px rgba(0, 212, 255, 0.3);
    
    /* Noise Preview Size - Easy to adjust */
    --noise-preview-width: 400px;
    --noise-preview-max-width: 100%;
    --noise-preview-padding: 1.5rem;
    
    /* Social Icon Size - Easy to adjust */
    --social-icon-size: 36px;
    --social-icon-img-size: 20px;
    --social-icon-gap: 1rem;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--dark-bg);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    opacity: 0;
    animation: fadeIn 0.5s ease-in-out forwards;
    padding-top: 0;
}

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

/* Smooth loading for images - only for non-lazy images */
img:not([loading="lazy"]) {
    opacity: 0;
    animation: imageFadeIn 0.6s ease-in-out forwards;
}

img[loading="lazy"] {
    transition: opacity 0.3s ease-in-out;
}

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

/* Prevent layout shift during loading */
/* Removed .nav from this rule so position:fixed remains fixed */
.hero, .section {
    will-change: transform;
    transform: translateZ(0);
}

/* Navigation */
.nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(10, 22, 40, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    padding: 1rem 0;
    transition: background 0.3s ease, box-shadow 0.3s ease;
    will-change: background, box-shadow;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.3s;
}

.nav-logo:hover {
    opacity: 0.8;
}

.nav-logo-text {
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

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

.nav-links a:hover {
    color: var(--accent-cyan);
}

.nav-social {
    display: flex;
    gap: var(--social-icon-gap);
}

.social-icon {
    width: var(--social-icon-size);
    height: var(--social-icon-size);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 212, 255, 0.1);
    color: var(--accent-cyan);
    text-decoration: none;
    transition: all 0.3s;
    padding: 0;
    border: none;
}

.social-icon-img {
    width: var(--social-icon-img-size);
    height: var(--social-icon-img-size);
    object-fit: contain;
    display: block;
    transition: all 0.3s;
    opacity: 0.9;
}

.social-icon:hover {
    background: rgba(0, 212, 255, 0.2);
    transform: translateY(-2px);
}

.social-icon:hover .social-icon-img {
    transform: scale(1.1);
    opacity: 1;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 6rem 2rem 4rem;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(0, 212, 255, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 0;
}

.hero-container {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-content h1 {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.hero-title-main {
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-weight: 300;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    padding: 0.875rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: var(--gradient-1);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), var(--glow-blue);
}

.btn-secondary {
    background: transparent;
    color: var(--accent-cyan);
    border: 2px solid var(--accent-cyan);
}

.btn-secondary:hover {
    background: rgba(0, 212, 255, 0.1);
    transform: translateY(-2px);
}

.hero-visual {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.noise-preview {
    background: var(--card-bg);
    border-radius: 16px;
    padding: var(--noise-preview-padding);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    width: var(--noise-preview-width);
    max-width: var(--noise-preview-max-width);
    margin: 0 auto;
}

.noise-preview img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
    object-fit: contain;
}

.version-badge {
    display: inline-block;
    background: rgba(16, 185, 129, 0.15);
    color: var(--success-green);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

/* Features Section */
.section {
    padding: 6rem 2rem;
    position: relative;
}

.section-container {
    max-width: 1400px;
    margin: 0 auto;
}

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

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.section-description {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    transition: all 0.3s;
}

.feature-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent-cyan);
    box-shadow: var(--shadow-md);
}

.feature-icon {
    width: 48px;
    height: 48px;
    background: var(--gradient-2);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--accent-cyan);
}

.feature-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.feature-description {
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Noise Types Section */
.noise-types {
    background: var(--darker-bg);
}

.noise-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.noise-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s;
}

.noise-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.noise-card-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.noise-card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.noise-card-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.noise-card-body {
    padding: 1.5rem;
}

.noise-param {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    font-size: 0.9rem;
}

.noise-param-name {
    color: var(--text-secondary);
}

.noise-param-value {
    color: var(--accent-cyan);
    font-family: 'JetBrains Mono', monospace;
}

/* Code Example Section */
.code-example {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    margin-top: 2rem;
}

.code-header {
    background: rgba(0, 212, 255, 0.05);
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.code-title {
    font-weight: 600;
    color: var(--text-primary);
}

.code-lang {
    color: var(--text-muted);
    font-size: 0.875rem;
    font-family: 'JetBrains Mono', monospace;
}

.code-body {
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.3);
    overflow-x: auto;
    position: relative;
}

.code-copy-btn {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    color: var(--accent-cyan);
    cursor: pointer;
    font-size: 0.75rem;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    z-index: 10;
}

.code-copy-btn:hover {
    background: rgba(0, 212, 255, 0.2);
    border-color: var(--accent-cyan);
    transform: translateY(-1px);
}

.code-copy-btn:active {
    transform: translateY(0);
}

.code-copy-btn.copied {
    background: rgba(16, 185, 129, 0.2);
    border-color: var(--success-green);
    color: var(--success-green);
}

.code-body pre {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-primary);
}

.code-keyword { color: #ff79c6; }
.code-function { color: #50fa7b; }
.code-string { color: #f1fa8c; }
.code-number { color: #bd93f9; }
.code-comment { color: var(--text-muted); }

/* Stats Section */
.stats {
    background: var(--gradient-2);
    border-radius: 16px;
    padding: 3rem;
    margin: 4rem 0;
    border: 1px solid var(--border-color);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    text-align: center;
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* Footer */
.footer {
    background: var(--darker-bg);
    border-top: 1px solid var(--border-color);
    padding: 3rem 2rem 2rem;
    text-align: center;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
}

.footer-text {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.footer-link {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-link:hover {
    color: var(--accent-cyan);
}

/* Roadmap Flowchart Styles */
.roadmap-container {
    margin-top: 3rem;
    padding: 2rem;
    background: var(--gradient-2);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.roadmap-title {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    text-align: center;
    color: var(--text-primary);
}

.roadmap-flowchart {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    max-width: 600px;
    margin: 0 auto;
}

.roadmap-node {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    width: 100%;
    max-width: 400px;
    transition: all 0.3s ease;
    position: relative;
}

.roadmap-node:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.roadmap-node-current {
    border-color: var(--success-green);
    background: rgba(16, 185, 129, 0.1);
}

.roadmap-node-upcoming {
    border-color: var(--accent-cyan);
    background: rgba(0, 212, 255, 0.1);
}

.roadmap-node-future {
    border-color: var(--secondary-blue);
    background: rgba(0, 128, 255, 0.1);
}

.roadmap-node-features {
    border-color: var(--primary-blue);
    background: rgba(0, 102, 204, 0.1);
}

.roadmap-node-content {
    text-align: center;
}

.roadmap-node-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    display: block;
}

.roadmap-node-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.roadmap-node-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 0;
}

.roadmap-connector {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.roadmap-line {
    width: 2px;
    height: 30px;
    background: linear-gradient(to bottom, var(--accent-cyan), var(--primary-blue));
    margin-bottom: 0.25rem;
}

.roadmap-arrow {
    color: var(--accent-cyan);
    font-size: 1.5rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(5px);
    }
}

/* Responsive */
@media (max-width: 1024px) {
    .hero-container {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .hero-content h1 {
        font-size: 3rem;
    }

    .nav-links {
        display: none;
    }
    
    /* Adjust noise preview for tablet */
    :root {
        --noise-preview-width: 350px;
    }
}

@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }

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

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

    .features-grid,
    .noise-grid {
        grid-template-columns: 1fr;
    }

    .nav-social {
        gap: 0.5rem;
    }

    .social-icon {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }
    
    /* Adjust noise preview for mobile */
    :root {
        --noise-preview-width: 100%;
        --noise-preview-padding: 1rem;
    }
    
    /* Fix footer for mobile */
    .footer {
        padding: 2rem 1rem 1.5rem;
    }
    
    .footer-links {
        gap: 1rem;
        flex-direction: column;
        align-items: center;
    }
    
    .footer-text {
        font-size: 0.875rem;
        line-height: 1.5;
    }
    
    /* Fix nav for mobile - always fixed at top, no movement */
    .nav {
        position: fixed !important;
        top: 0 !important;
        transform: translateZ(0);
        -webkit-transform: translateZ(0);
        will-change: auto;
    }
    
    /* Ensure nav stays visible on mobile */
    body {
        padding-top: 70px;
    }
    
    /* Roadmap responsive for mobile */
    .roadmap-flowchart {
        gap: 1rem;
    }
    
    .roadmap-node {
        padding: 1.25rem;
        max-width: 100%;
    }
    
    .roadmap-node-icon {
        font-size: 2rem;
    }
    
    .roadmap-node-title {
        font-size: 1.1rem;
    }
    
    .roadmap-node-desc {
        font-size: 0.85rem;
    }
    
    .roadmap-line {
        height: 20px;
    }
    
    /* Adjust social icons for mobile */
    :root {
        --social-icon-size: 32px;
        --social-icon-img-size: 18px;
        --social-icon-gap: 0.5rem;
    }
}

/* Smooth scroll */
html {
    scroll-behavior: smooth;
}

