:root {
    --bg-color: #0a0f1a;
    --surface: #121c2d;
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --env-color: #10b981;
    --data-color: #0ea5e9;
    --danger-color: #f87171;
    --font-sans: 'Inter', system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --max-width: 1100px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
::selection { background: var(--data-color); color: #fff; }

body {
    font-family: var(--font-sans);
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: -1;
    background-image: url("data:image/svg+xml,%3Csvg width='400' height='400' viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M50 400 C 100 300 200 350 300 200 C 350 125 400 100 400 50 M 0 350 C 50 250 150 300 250 150 C 300 75 350 50 400 0 M 100 400 C 150 350 250 400 350 250 C 400 175 400 150 400 100 M 0 250 C 50 200 150 250 250 100 C 300 25 400 0 400 0' stroke='rgba(14, 165, 233, 0.1)' stroke-width='2' fill='none'/%3E%3C/svg%3E");
    background-size: 400px 400px;
}

:focus-visible { outline: 2px solid var(--data-color); outline-offset: 4px; }
.skip-link { position: absolute; top: -40px; left: 0; background: var(--data-color); color: #fff; padding: 8px; z-index: 100; transition: top 0.2s; }
.skip-link:focus { top: 0; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
    .project-card:hover { transform: none !important; box-shadow: none !important; }
    .btn-primary:hover, .btn-outline:hover { transform: none !important; }
}

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 2rem; }
section { padding: 5rem 0; border-bottom: 1px solid rgba(255,255,255,0.05); }
section:last-child { border-bottom: none; }
h2 { font-size: 2rem; font-weight: 800; margin-bottom: 2rem; letter-spacing: -0.02em; }

/* Hero Grid */
.hero { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; min-height: 90vh; padding-top: 4rem; }
.hero-text h1 { font-size: clamp(2.5rem, 4vw, 4rem); font-weight: 800; line-height: 1.1; letter-spacing: -0.04em; margin-bottom: 1rem; color: #fff; }
.hero-title { font-family: var(--font-mono); font-size: 1.1rem; margin-bottom: 1.5rem; }
.hero-title .env { color: var(--env-color); }
.hero-title .data { color: var(--data-color); }
.hero-desc { font-size: 1.1rem; color: var(--text-muted); margin-bottom: 1.5rem; }
.hero-desc strong { color: var(--text-main); font-weight: 600; }
.status-line { font-family: var(--font-mono); font-size: 0.85rem; color: var(--text-muted); margin-bottom: 2rem; background: rgba(16, 185, 129, 0.1); padding: 0.5rem 1rem; border-radius: 4px; display: inline-block; border-left: 3px solid var(--env-color); }
.status-line strong { color: var(--text-main); }
.hero-links { display: flex; gap: 1rem; flex-wrap: wrap; }

/* Buttons */
.btn { padding: 0.8rem 1.5rem; border-radius: 6px; font-weight: 600; transition: all 0.2s ease; display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; text-decoration: none; }
.btn-primary { background: linear-gradient(135deg, var(--env-color), var(--data-color)); color: #06121f; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 20px rgba(14, 165, 233, 0.2); }
.btn-outline { border: 1px solid rgba(255,255,255,0.2); color: var(--text-main); }
.btn-outline:hover { border-color: var(--data-color); color: var(--data-color); }

/* Chart */
.chart-scroll { overflow-x: auto; background: var(--surface); border: 1px solid rgba(255,255,255,0.1); border-radius: 12px; padding: 1.5rem; box-shadow: 0 20px 40px rgba(0,0,0,0.3); }
.chart-svg { min-width: 500px; width: 100%; height: auto; display: block; }
.chart-legend { display: flex; gap: 1.5rem; margin-top: 1rem; font-family: var(--font-mono); font-size: 0.8rem; color: var(--text-muted); flex-wrap: wrap; }
.legend-item { display: flex; align-items: center; gap: 0.4rem; }
.legend-color { width: 12px; height: 12px; border-radius: 2px; }
.chart-caption { font-family: var(--font-mono); font-size: 0.75rem; color: var(--text-muted); margin-top: 0.5rem; }
.badge { display: inline-block; padding: 0.1rem 0.4rem; border-radius: 4px; font-size: 0.7rem; font-weight: 700; margin-right: 0.5rem; }
.badge-synthetic { background: rgba(100, 116, 139, 0.2); color: #cbd5e1; border: 1px solid #64748b; }

/* How I Work */
.how-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 2rem; }
.how-card { background: var(--surface); padding: 1.5rem; border-radius: 8px; border-top: 3px solid var(--data-color); }
.how-card h3 { font-size: 1.1rem; color: #fff; margin-bottom: 0.5rem; }
.how-card p { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 0.5rem; }
.how-card strong { color: var(--text-main); }
.how-link { font-family: var(--font-mono); font-size: 0.75rem; color: var(--data-color); }

/* Project Cards */
.project-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1.5rem; margin-bottom: 2rem; }
.project-card { background: var(--surface); border-radius: 12px; border: 1px solid rgba(255,255,255,0.05); transition: transform 0.3s ease, box-shadow 0.3s ease; position: relative; display: flex; flex-direction: column; overflow: hidden; }
.project-card:hover { transform: translateY(-4px); box-shadow: 0 10px 30px rgba(0,0,0,0.3); }
.card-thumb { height: 140px; background: #0a0f1a; border-bottom: 1px solid rgba(255,255,255,0.05); display: flex; align-items: center; justify-content: center; }
.card-thumb svg { width: 100%; height: 100%; object-fit: cover; }
.card-content { padding: 1.5rem; display: flex; flex-direction: column; flex-grow: 1; }
.tag-row { display: flex; gap: 0.5rem; margin-bottom: 1rem; flex-wrap: wrap; }
.tag { font-family: var(--font-mono); font-size: 0.7rem; padding: 0.2rem 0.5rem; border-radius: 4px; font-weight: 600; }
.tag-env { background: rgba(16, 185, 129, 0.1); color: var(--env-color); border: 1px solid rgba(16, 185, 129, 0.3); }
.tag-data { background: rgba(14, 165, 233, 0.1); color: var(--data-color); border: 1px solid rgba(14, 165, 233, 0.3); }
.tag-status { background: rgba(245, 158, 11, 0.1); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.3); }
.project-card h3 { font-size: 1.15rem; color: #fff; margin-bottom: 0.5rem; }
.project-card p { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 1rem; flex-grow: 1; }
.provenance { font-family: var(--font-mono); font-size: 0.75rem; color: #94a3b8; margin-bottom: 1rem; display: block; }
.project-link { font-family: var(--font-mono); font-size: 0.85rem; color: var(--data-color); font-weight: 600; display: inline-flex; align-items: center; gap: 0.3rem; margin-top: auto; text-decoration: none; }
.project-link::after { content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; }

/* Core Stack */
.stack-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 2rem; }
.stack-category h4 { font-size: 1rem; color: var(--text-main); margin-bottom: 1rem; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 0.5rem; }
.tools-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip { font-family: var(--font-mono); font-size: 0.8rem; background: rgba(255,255,255,0.05); padding: 0.3rem 0.8rem; border-radius: 20px; border: 1px solid rgba(255,255,255,0.1); color: var(--text-muted); }

/* Project Roadmap */
.roadmap-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    background: var(--surface);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.05);
}
.roadmap-col h3 {
    font-size: 1.2rem;
    color: var(--text-main);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.roadmap-list { list-style: none; padding: 0; }
.roadmap-list li {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.roadmap-list li em {
    color: var(--env-color);
    font-style: normal;
    font-size: 0.75rem;
    margin-left: auto;
}
.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #334155;
    flex-shrink: 0;
}
.status-dot.active {
    background: var(--env-color);
    box-shadow: 0 0 8px var(--env-color);
}
.domain-tag {
    font-weight: bold;
    color: var(--data-color);
    background: rgba(14, 165, 233, 0.1);
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
}

/* CTA & Footer */
.cta-section { text-align: center; padding: 6rem 2rem; }
.cta-section h2 { margin-bottom: 1rem; }
.cta-section p { color: var(--text-muted); margin-bottom: 2rem; font-size: 1.1rem; }
footer { padding: 3rem 0; text-align: center; color: var(--text-muted); font-size: 0.85rem; font-family: var(--font-mono); border-top: 1px solid rgba(255,255,255,0.05); }
.disclaimer { max-width: 800px; margin: 0 auto; line-height: 1.5; margin-bottom: 1.5rem; }
.tagline { font-weight: 700; color: var(--text-main); }

/* Responsive */
@media (max-width: 900px) {
    .hero { grid-template-columns: 1fr; min-height: auto; padding-top: 6rem; gap: 2rem; }
    .hero-links { flex-direction: column; }
    .btn { width: 100%; }
}

@media (max-width: 768px) {
    .roadmap-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* Print Stylesheet */
@media print {
    body { background: #fff; color: #000; }
    body::before { display: none; }
    .container { max-width: 100%; }
    .hero { min-height: auto; display: block; }
    .btn, .chart-scroll { display: none; }
    .project-card { border: 1px solid #ccc; break-inside: avoid; }
    h2, h3 { color: #000; }
    p, .tag, .stat-label { color: #333; }
}
