:root {
    --bg-dark: #050B14;
    --bg-card: #0F172A;
    --accent: #38BDF8;
    --accent-glow: rgba(56, 189, 248, 0.2);
    --action: #F43F5E;
    --action-glow: rgba(244, 63, 94, 0.3);
    --text-main: #F8FAFC;
    --text-muted: #94A3B8;
    --border: #1E293B;
    
    --font-display: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Subtle background grid */
.grid-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-image: 
        linear-gradient(to right, rgba(30, 41, 59, 0.3) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(30, 41, 59, 0.3) 1px, transparent 1px);
    background-size: 40px 40px;
    z-index: -1;
    pointer-events: none;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border);
    background: rgba(5, 11, 20, 0.8);
    backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tag {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    background: rgba(56, 189, 248, 0.1);
    color: var(--accent);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    border: 1px solid var(--accent);
}

nav a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    margin-left: 1.5rem;
    transition: color 0.2s;
}

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

main {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}

h1, h2, h3, h4 {
    font-family: var(--font-display);
    line-height: 1.1;
}

/* Hero Section */
.hero {
    padding: 4rem 0 6rem;
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.badge {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--accent);
    border: 1px solid var(--border);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    margin-bottom: 1.5rem;
}

.alert-badge {
    color: var(--action);
    border-color: rgba(244, 63, 94, 0.4);
    background: rgba(244, 63, 94, 0.05);
}

h1 {
    font-size: 3.5rem;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 1.5rem;
    background: linear-gradient(to right, #fff, #94A3B8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 500px;
    margin-bottom: 2rem;
}

.metrics {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.metric {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.metric .label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.metric .value {
    font-family: var(--font-mono);
    font-size: 1.2rem;
    font-weight: 700;
}

.highlight-rose {
    color: var(--action);
}

.highlight-blue {
    color: var(--accent);
}

/* Signature Hero Visual */
.hero-visual {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}

canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.scanline {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent 50%, rgba(0,0,0,0.2) 51%);
    background-size: 100% 4px;
    pointer-events: none;
    z-index: 2;
}

.terminal-overlay {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--accent);
    z-index: 3;
    text-shadow: 0 0 5px var(--accent);
}

/* Sections */
section {
    padding: 4rem 0;
    border-top: 1px solid rgba(30, 41, 59, 0.5);
}

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

.step-num {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

h2 {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.content-block p {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 1.5rem;
    border-radius: 8px;
}

.data-card pre {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--text-main);
    overflow-x: auto;
}

/* Problems & Solutions List Cards */
.condition-list {
    display: grid;
    gap: 1.5rem;
}

.condition {
    border-left: 3px solid var(--border);
    padding: 1.5rem;
    background: var(--bg-card);
    border-radius: 0 8px 8px 0;
}

.condition h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    font-family: var(--font-display);
}

.condition p {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 0;
}

.condition strong {
    color: var(--text-main);
}

.warning-border {
    border-left-color: var(--action);
    box-shadow: inset 3px 0 0 rgba(244, 63, 94, 0.05);
}

.active-border {
    border-left-color: var(--accent);
    box-shadow: inset 3px 0 0 rgba(56, 189, 248, 0.05);
}

/* Implementation Plan Pipeline */
.pipeline-diagram {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
}

.node {
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 1.2rem 2rem;
    border-radius: 6px;
    text-align: center;
    font-family: var(--font-display);
    font-weight: 600;
    width: 100%;
}

.node span {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 400;
    margin-top: 0.4rem;
}

.node.action {
    border-color: var(--accent);
    color: var(--accent);
    box-shadow: 0 0 20px var(--accent-glow);
}

.node.action span {
    color: rgba(56, 189, 248, 0.7);
}

.arrow {
    color: var(--text-muted);
    font-size: 1.2rem;
}

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

footer p {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-muted);
}

.muted {
    opacity: 0.5;
    font-size: 0.75rem;
}

/* Animations */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Tablet / Desktop Responsiveness */
@media (min-width: 768px) {
    .hero {
        padding: 6rem 0;
    }
    h1 {
        font-size: 4.5rem;
    }
}
