:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-glow: rgba(99, 102, 241, 0.3);
    --secondary: #10b981;
    --secondary-dark: #059669;
    --accent: #f59e0b;
    --accent-glow: rgba(245, 158, 11, 0.3);
    --dark: #0f0f1a;
    --darker: #07070f;
    --card-bg: #161625;
    --card-border: rgba(99, 102, 241, 0.15);
    --text-primary: #e8e8f0;
    --text-secondary: #8888a8;
    --text-muted: #55556a;
    --danger: #ef4444;
    --surface: #1a1a2e;
}

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

body {
    background: var(--darker);
    color: var(--text-primary);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Animated gradient background */
.bg-gradient {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(ellipse at 20% 50%, var(--primary-glow) 0%, transparent 50%),
                radial-gradient(ellipse at 80% 20%, var(--accent-glow) 0%, transparent 50%),
                radial-gradient(ellipse at 50% 80%, rgba(16, 185, 129, 0.15) 0%, transparent 50%);
    z-index: -1;
    animation: gradientShift 20s ease infinite;
}

@keyframes gradientShift {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* Grid background */
.grid-bg {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: linear-gradient(rgba(99, 102, 241, 0.03) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(99, 102, 241, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    z-index: -1;
}

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

.nav-brand {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
    letter-spacing: -0.02em;
}

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

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

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

/* Hero */
.hero {
    padding: 160px 2rem 80px;
    text-align: center;
    position: relative;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid var(--card-border);
    border-radius: 100px;
    padding: 0.4rem 1.2rem;
    font-size: 0.85rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.hero-badge .dot {
    width: 8px; height: 8px;
    background: var(--secondary);
    border-radius: 50%;
    animation: pulse 2s ease infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.hero h1 {
    font-size: clamp(3rem, 8vw, 5.5rem);
    font-weight: 900;
    line-height: 1.05;
    letter-spacing: -0.03em;
    margin-bottom: 1.5rem;
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary), var(--secondary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% 200%;
    animation: textGradient 6s ease infinite;
}

@keyframes textGradient {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.hero .subtitle {
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    color: var(--text-secondary);
    max-width: 640px;
    margin: 0 auto 2.5rem;
    font-weight: 400;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 2rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.25s;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: 0 4px 24px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px var(--primary-glow);
}

.btn-secondary {
    background: var(--card-bg);
    color: var(--text-primary);
    border: 1px solid var(--card-border);
}

.btn-secondary:hover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
}

.btn-accent {
    background: linear-gradient(135deg, var(--accent), #d97706);
    color: #000;
}

.btn-accent:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px var(--accent-glow);
}

.btn-group {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

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

/* Sections */
.section {
    padding: 100px 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin-bottom: 3rem;
}

/* Feature cards */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
}

.feature-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 2rem;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    opacity: 0;
    transition: opacity 0.3s;
}

.feature-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

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

.feature-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px; height: 56px;
    border-radius: 14px;
    background: rgba(99, 102, 241, 0.1);
}

.feature-card h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

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

/* Pipeline diagram */
.pipeline {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    padding: 2rem 0;
}

.pipeline-step {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    text-align: center;
    min-width: 120px;
    transition: all 0.3s;
}

.pipeline-step:hover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
}

.pipeline-step .step-icon {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.pipeline-step .step-name {
    font-weight: 600;
    font-size: 0.9rem;
}

.pipeline-arrow {
    color: var(--primary);
    font-size: 1.5rem;
    font-weight: bold;
}

/* Code blocks */
.code-block {
    background: var(--darker);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    overflow: hidden;
    margin: 1.5rem 0;
}

.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1.25rem;
    background: var(--card-bg);
    border-bottom: 1px solid var(--card-border);
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.code-dots {
    display: flex;
    gap: 6px;
}

.code-dots span {
    width: 12px; height: 12px;
    border-radius: 50%;
}

.code-dots span:nth-child(1) { background: #ef4444; }
.code-dots span:nth-child(2) { background: #f59e0b; }
.code-dots span:nth-child(3) { background: #10b981; }

.code-body {
    padding: 1.25rem;
    font-family: 'JetBrains Mono', 'Fira Code', 'SF Mono', monospace;
    font-size: 0.85rem;
    line-height: 1.7;
    color: #c9d1d9;
    overflow-x: auto;
}

.code-body .kw { color: #ff7b72; }
.code-body .str { color: #a5d6ff; }
.code-body .cm { color: #8b949e; }
.code-body .fn { color: #d2a8ff; }
.code-body .num { color: #79c0ff; }
.code-body .var { color: #ffa657; }
.code-body .op { color: #c9d1d9; }

/* Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 3rem 0;
}

.stat-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

/* Download cards */
.download-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

.download-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.2s;
    text-decoration: none;
    color: inherit;
}

.download-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.download-icon {
    font-size: 2rem;
    width: 48px;
    text-align: center;
    flex-shrink: 0;
}

.download-info h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.download-info p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.download-badge {
    font-size: 0.7rem;
    padding: 0.2rem 0.6rem;
    border-radius: 100px;
    color: white;
    font-weight: 600;
}

/* Footer */
.footer {
    border-top: 1px solid var(--card-border);
    padding: 3rem 0;
    margin-top: 4rem;
}

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

.footer h4 {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.footer a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    display: block;
    padding: 0.25rem 0;
    transition: color 0.2s;
}

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

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    margin-top: 2rem;
    border-top: 1px solid var(--card-border);
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Tag pills */
.tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
    margin: 0.25rem;
}

.tag-primary {
    background: rgba(99, 102, 241, 0.15);
    color: var(--primary);
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.tag-secondary {
    background: rgba(16, 185, 129, 0.15);
    color: var(--secondary);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.tag-accent {
    background: rgba(245, 158, 11, 0.15);
    color: var(--accent);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

/* Responsive */
@media (max-width: 768px) {
    .nav { padding: 0.75rem 1rem; }
    .nav-links { gap: 1rem; font-size: 0.85rem; }
    .hero { padding: 120px 1rem 60px; }
    .section { padding: 60px 0; }
    .features-grid { grid-template-columns: 1fr; }
    .pipeline { flex-direction: column; }
    .pipeline-arrow { transform: rotate(90deg); }
    .download-grid { grid-template-columns: 1fr; }
}