:root {
    --bg-dark: #080b11;
    --bg-card: rgba(16, 22, 36, 0.75);
    --bg-card-hover: rgba(24, 32, 52, 0.85);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-accent: rgba(0, 240, 255, 0.3);
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --accent-cyan: #00f0ff;
    --accent-emerald: #10b981;
    --accent-blue: #3b82f6;
    --accent-purple: #8b5cf6;
    --accent-rose: #f43f5e;
    --accent-amber: #f59e0b;
    
    --font-main: 'Outfit', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

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

html {
    scroll-behavior: smooth;
}

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

/* Background Ambient Glows */
.glow-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(140px);
    pointer-events: none;
    z-index: 0;
    opacity: 0.25;
}
.orb-1 { width: 500px; height: 500px; background: var(--accent-cyan); top: -100px; left: -100px; }
.orb-2 { width: 600px; height: 600px; background: var(--accent-emerald); bottom: 10%; right: -150px; }
.orb-3 { width: 400px; height: 400px; background: var(--accent-purple); top: 40%; left: 30%; opacity: 0.15; }

/* NAVBAR */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(20px);
    background: rgba(8, 11, 17, 0.85);
    border-bottom: 1px solid var(--border-color);
}
.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}
.brand-logo {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-emerald));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.4);
}
.brand-text {
    display: flex;
    flex-direction: column;
}
.brand-name {
    font-weight: 800;
    font-size: 18px;
    letter-spacing: 1px;
}
.brand-sub {
    font-size: 10px;
    color: var(--accent-cyan);
    letter-spacing: 1.5px;
    font-weight: 600;
}
.nav-links {
    display: flex;
    gap: 28px;
}
.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s ease;
}
.nav-links a:hover {
    color: var(--accent-cyan);
}
.nav-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}
.status-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    padding: 6px 14px;
    border-radius: 50px;
}
.status-dot {
    width: 8px;
    height: 8px;
    background: var(--accent-emerald);
    border-radius: 50%;
}
.pulsing {
    box-shadow: 0 0 10px var(--accent-emerald);
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0% { transform: scale(0.95); opacity: 0.7; }
    50% { transform: scale(1.2); opacity: 1; box-shadow: 0 0 15px var(--accent-emerald); }
    100% { transform: scale(0.95); opacity: 0.7; }
}
.status-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--accent-emerald);
    letter-spacing: 0.5px;
}

/* BUTTONS */
.btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    font-family: var(--font-main);
}
.btn-primary {
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-emerald));
    color: #041014;
    box-shadow: 0 4px 20px rgba(0, 240, 255, 0.25);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 240, 255, 0.4);
}
.btn-accent {
    background: rgba(0, 240, 255, 0.15);
    border: 1px solid var(--accent-cyan);
    color: var(--accent-cyan);
}
.btn-accent:hover {
    background: var(--accent-cyan);
    color: #041014;
}

/* HERO */
.hero {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 60px auto 40px auto;
    padding: 0 24px;
    text-align: center;
}
.badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}
.badge-tag {
    background: var(--accent-emerald);
    color: #022c22;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 800;
}
.hero-title {
    font-size: 48px;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 20px;
    letter-spacing: -1px;
}
.gradient-text {
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-emerald));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero-desc {
    max-width: 780px;
    margin: 0 auto 40px auto;
    font-size: 18px;
    color: var(--text-secondary);
    line-height: 1.6;
}
.hero-metrics {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 40px;
}
.hero-metric-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 20px;
    border-radius: 12px;
    backdrop-filter: blur(12px);
}
.metric-num {
    display: block;
    font-size: 32px;
    font-weight: 800;
    color: var(--accent-cyan);
    margin-bottom: 4px;
}
.metric-label {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

/* SECTIONS */
.section {
    position: relative;
    z-index: 1;
    max-width: 1280px;
    margin: 80px auto;
    padding: 0 24px;
}
.section-header {
    text-align: center;
    margin-bottom: 40px;
}
.section-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 10px;
}
.section-subtitle {
    color: var(--text-secondary);
    font-size: 16px;
    max-width: 680px;
    margin: 0 auto;
}

/* ENGINE HUD */
.engine-container {
    background: var(--bg-card);
    border: 1px solid var(--border-accent);
    border-radius: 16px;
    padding: 28px;
    backdrop-filter: blur(16px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}
.engine-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 20px;
    margin-bottom: 28px;
    flex-wrap: wrap;
    gap: 16px;
}
.mode-selector {
    display: flex;
    align-items: center;
    gap: 12px;
}
.mode-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
}
.toggle-group {
    display: flex;
    background: rgba(0, 0, 0, 0.4);
    padding: 4px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}
.toggle-btn {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    background: transparent;
    color: var(--text-secondary);
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}
.toggle-btn.active {
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.2), rgba(16, 185, 129, 0.2));
    border: 1px solid var(--accent-cyan);
    color: var(--accent-cyan);
    box-shadow: 0 0 12px rgba(0, 240, 255, 0.2);
}
.stress-control {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: var(--text-secondary);
}
.stress-control input[type="range"] {
    accent-color: var(--accent-cyan);
    cursor: pointer;
}

/* GAUGES GRID */
.gauges-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 28px;
}
.gauge-card {
    background: rgba(8, 11, 17, 0.6);
    border: 1px solid var(--border-color);
    padding: 20px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.gauge-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.gauge-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
}
.gauge-badge {
    background: rgba(16, 185, 129, 0.15);
    color: var(--accent-emerald);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
}
.gauge-value {
    font-size: 30px;
    font-weight: 800;
    color: var(--text-primary);
    font-family: var(--font-mono);
    margin-bottom: 12px;
}
.gauge-value .unit {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 500;
}
.gauge-bar-bg {
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 8px;
}
.gauge-bar-fill {
    height: 100%;
    border-radius: 10px;
    transition: width 0.4s ease;
}
.fill-power { background: var(--accent-emerald); }
.fill-co2 { background: var(--accent-cyan); }
.fill-latency { background: var(--accent-purple); }
.fill-nodes { background: var(--accent-blue); }
.gauge-baseline {
    font-size: 11px;
    color: var(--text-muted);
}

/* TELEMETRY DUAL VIEW */
.telemetry-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
.chart-card, .terminal-card {
    background: rgba(8, 11, 17, 0.7);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
}
.chart-header, .terminal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    font-size: 13px;
    font-weight: 600;
}
.live-tag {
    background: rgba(0, 240, 255, 0.1);
    color: var(--accent-cyan);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
}
.chart-wrapper {
    height: 220px;
    position: relative;
}
.term-dots {
    display: flex;
    gap: 6px;
}
.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot.red { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #27c93f; }
.term-title {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-muted);
}
.term-status {
    font-size: 10px;
    font-weight: 700;
    color: var(--accent-emerald);
}
.terminal-body {
    font-family: var(--font-mono);
    font-size: 12px;
    height: 220px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-right: 6px;
}
.log-line.info { color: #38bdf8; }
.log-line.success { color: #4ade80; }
.log-line.accent { color: #c084fc; }
.log-line.warn { color: #fbbf24; }

/* BENCHMARK TABLE */
.table-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    backdrop-filter: blur(16px);
}
.benchmark-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.benchmark-table th, .benchmark-table td {
    padding: 16px 20px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}
.benchmark-table th {
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
}
.highlight-green {
    color: var(--accent-emerald);
    font-weight: 700;
}
.pill {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
}
.pill.green {
    background: rgba(16, 185, 129, 0.15);
    color: var(--accent-emerald);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

/* ESG CALCULATOR */
.calc-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 32px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 36px;
}
.calc-inputs {
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.input-group label {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}
.input-group input {
    background: rgba(8, 11, 17, 0.8);
    border: 1px solid var(--border-color);
    padding: 12px 16px;
    border-radius: 8px;
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s ease;
}
.input-group input:focus {
    border-color: var(--accent-cyan);
}
.calc-results {
    background: rgba(8, 11, 17, 0.6);
    border: 1px solid var(--border-accent);
    border-radius: 12px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 16px;
}
.res-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 12px;
}
.res-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
.res-label {
    font-size: 13px;
    color: var(--text-secondary);
}
.res-val {
    font-size: 18px;
    font-weight: 800;
    font-family: var(--font-mono);
}
.highlight-accent {
    color: var(--accent-cyan);
}

/* ARCHITECTURE */
.arch-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.arch-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 28px;
    transition: transform 0.2s ease;
}
.arch-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-accent);
}
.arch-icon {
    font-size: 32px;
    margin-bottom: 16px;
}
.arch-card h3 {
    font-size: 18px;
    margin-bottom: 10px;
}
.arch-card p {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
}

/* FOOTER */
.footer {
    border-top: 1px solid var(--border-color);
    background: rgba(8, 11, 17, 0.95);
    padding: 40px 24px;
    margin-top: 100px;
}
.footer-container {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}
.footer-tagline {
    color: var(--text-muted);
    font-size: 13px;
    margin-top: 4px;
}
.footer-meta {
    display: flex;
    flex-direction: column;
    text-align: right;
    font-size: 12px;
    color: var(--text-muted);
    gap: 4px;
}

/* RESPONSIVE */
@media (max-width: 1024px) {
    .gauges-grid, .hero-metrics, .arch-grid { grid-template-columns: repeat(2, 1fr); }
    .telemetry-grid, .calc-container { grid-template-columns: 1fr; }
    .nav-links { display: none; }
    .hero-title { font-size: 36px; }
}
@media (max-width: 640px) {
    .gauges-grid, .hero-metrics, .arch-grid { grid-template-columns: 1fr; }
}
