/* NEO-BRUTALIST DESIGN SYSTEM */
:root {
    /* DEFAULT (DARK) STARK PITCH BLACK */
    --bg: #0a0a0a;
    --text: #ffffff;
    --border: #ffffff;
    --accent: #e2f952; /* Electric Volt */
    --accent-alt: #ff5e00; /* Neon Orange */
    --shadow: #e2f952;
    --surface: #141414;
    --font-sans: system-ui, -apple-system, sans-serif;
    --font-mono: "Courier New", Consolas, monospace;
}

[data-theme="light"] {
    --bg: #f4f4f0;
    --text: #0a0a0a;
    --border: #0a0a0a;
    --accent: #e2f952;
    --accent-alt: #ff5e00;
    --shadow: #0a0a0a;
    --surface: #ffffff;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; scroll-padding-top: 100px; }
body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-sans);
    overflow-x: hidden;
    min-height: 100vh;
    border: 4px solid var(--border);
    transition: background 0.3s, color 0.3s, border-color 0.3s;
}

/* MARQUEE */
.marquee-container {
    width: 100%; overflow: hidden; background: var(--accent); color: #0a0a0a;
    border-bottom: 2px solid var(--border); padding: 8px 0;
    font-family: var(--font-mono); font-weight: 900; font-size: 1rem;
    white-space: nowrap; display: flex;
}
.marquee-content {
    display: flex; animation: marquee 12s linear infinite;
}
.marquee-content span { padding-right: 20px; }
@keyframes marquee { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* NAVBAR */
.navbar {
    position: sticky; top: 0; z-index: 100;
    background: var(--bg); border-bottom: 2px solid var(--border);
    padding: 0 20px;
}
.nav-content { display: flex; align-items: center; justify-content: space-between; height: 70px; max-width: 1200px; margin: 0 auto; }
.logo { font-family: var(--font-mono); font-weight: 900; font-size: 1.5rem; text-decoration: none; color: var(--text); }
.nav-links { display: flex; gap: 1.5rem; }
.nav-links a { text-decoration: none; color: var(--text); font-weight: 700; font-family: var(--font-mono); border: 2px solid transparent; padding: 4px 8px; transition: 0.2s; }
.nav-links a:hover { border-color: var(--accent); background: var(--text); color: var(--bg); }

/* THEME TOGGLE */
.theme-toggle {
    background: var(--bg); border: 2px solid var(--border); color: var(--text);
    width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
    cursor: pointer; box-shadow: 2px 2px 0px var(--shadow);
    transition: transform 0.05s linear, box-shadow 0.05s linear;
}
.theme-toggle:active { transform: translate(2px, 2px); box-shadow: 0px 0px 0px var(--shadow); }
.theme-toggle svg { position: absolute; transition: opacity 0.4s ease, transform 0.4s ease; }
[data-theme="light"] #sun-icon { opacity: 0 !important; transform: rotate(-90deg) scale(0.5) !important; }
[data-theme="light"] #moon-icon { opacity: 1 !important; transform: rotate(0) scale(1) !important; }
#sun-icon { opacity: 1; transform: rotate(0) scale(1); }
#moon-icon { opacity: 0; transform: rotate(90deg) scale(0.5); }

/* BUTTONS */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 14px 28px; font-weight: 900; font-family: var(--font-mono);
    text-transform: uppercase; text-decoration: none; cursor: pointer;
    background: var(--surface); color: var(--text);
    border: 2px solid var(--border);
    box-shadow: 3px 3px 0px var(--shadow);
    transition: transform 0.05s linear, box-shadow 0.05s linear;
}
.btn-primary { background: var(--accent); color: #0a0a0a; border-color: var(--border); box-shadow: 3px 3px 0px var(--border); }
[data-theme="dark"] .btn-primary { border-color: var(--accent); box-shadow: 3px 3px 0px var(--accent); }
.btn:active { transform: translate(3px, 3px); box-shadow: 0px 0px 0px var(--shadow) !important; }
.btn-block { width: 100%; }

/* BRUTAL BOX */
.brutal-box {
    background: var(--surface); border: 2px solid var(--border);
    box-shadow: 6px 6px 0px var(--shadow);
    padding: 2rem; transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

/* TYPOGRAPHY & TAGS */
.kinetic-title { font-size: clamp(2.5rem, 5vw, 4.5rem); font-weight: 900; line-height: 1.1; margin-bottom: 1.5rem; border-bottom: 4px solid var(--accent); display: inline-block; padding-bottom: 10px; }
.subtitle { font-family: var(--font-mono); font-size: 1.2rem; margin-bottom: 2rem; line-height: 1.6; }
.tag { font-family: var(--font-mono); background: var(--text); color: var(--bg); padding: 4px 10px; font-weight: bold; font-size: 0.9rem; display: inline-block; margin-bottom: 1rem; }
.mono-text { font-family: var(--font-mono); color: var(--text); opacity: 0.9; }

/* SECTIONS */
.section { padding: 6rem 20px; max-width: 1200px; margin: 0 auto; border-bottom: 2px dashed var(--border); }
.section-header { margin-bottom: 3rem; }
.section-header h2 { font-size: 3rem; font-weight: 900; text-transform: uppercase; }

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

/* NODE CARDS */
.node-card { transition: border-color 0.1s, box-shadow 0.1s; }
.node-card:hover { border-color: var(--accent); box-shadow: 4px 4px 0px var(--accent); }
.node-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; border-bottom: 2px solid var(--border); padding-bottom: 10px; }
.data-row { display: flex; justify-content: space-between; font-family: var(--font-mono); margin-bottom: 0.5rem; align-items: center; }
.data-label { font-weight: bold; }
.data-value.highlight { color: var(--accent-alt); font-weight: 900; font-size: 1.2rem; }
.load-meter { width: 50%; height: 12px; border: 2px solid var(--border); background: var(--bg); }
.load-meter .fill { height: 100%; background: var(--accent); transition: width 0.3s; }

/* PROTOCOL PILLS */
.pill-group { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 1.5rem; }
.protocol-pill { border: 2px solid var(--border); padding: 4px 12px; font-family: var(--font-mono); font-weight: bold; font-size: 0.85rem; border-radius: 50px; background: var(--bg); }

/* WIDGET SLIDER */
.slider-container { margin: 2rem 0; font-family: var(--font-mono); font-weight: bold; }
.slider-container label { display: block; margin-bottom: 1rem; }
input[type=range] { -webkit-appearance: none; width: 100%; background: transparent; }
input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none; height: 28px; width: 28px;
    background: var(--accent); border: 2px solid var(--border);
    cursor: pointer; margin-top: -12px; box-shadow: 2px 2px 0px var(--border);
}
[data-theme="dark"] input[type=range]::-webkit-slider-thumb { box-shadow: 2px 2px 0px var(--text); border-color: var(--text); }
input[type=range]::-webkit-slider-runnable-track { width: 100%; height: 6px; cursor: pointer; background: var(--border); }
.widget-result { background: var(--bg); padding: 1rem; border: 2px solid var(--border); display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.progress-bar-brutal { width: 100%; height: 20px; border: 2px solid var(--border); background: var(--bg); }
.progress-fill { height: 100%; background: var(--accent-alt); width: 5%; transition: width 0.2s cubic-bezier(0.4, 0, 0.2, 1); }

/* PRICING */
.pricing-card { display: flex; flex-direction: column; }
.tier-tag { display: inline-block; background: var(--accent-alt); color: #0a0a0a; font-family: var(--font-mono); font-weight: 900; padding: 4px 12px; border: 2px solid #0a0a0a; margin-bottom: 1rem; align-self: flex-start; }
.price { font-size: 3.5rem; font-weight: 900; margin: 1rem 0; border-bottom: 2px solid var(--border); padding-bottom: 1rem; }
.price span { font-size: 1.2rem; }
.mono-list { list-style: none; margin-bottom: 2rem; flex-grow: 1; }
.mono-list li { font-family: var(--font-mono); font-weight: bold; margin-bottom: 0.8rem; }
.pricing-card.active { border-color: var(--accent); box-shadow: 8px 8px 0px var(--accent); transform: scale(1.02); }

/* FAQ */
details { border: 2px solid var(--border); margin-bottom: 1rem; padding: 1.5rem; background: var(--surface); box-shadow: 4px 4px 0px var(--shadow); }
summary { font-weight: 900; cursor: pointer; display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 1.1rem; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "[+]"; color: var(--accent-alt); }
details[open] summary::after { content: "[-]"; }
details p { margin-top: 1rem; font-family: var(--font-sans); line-height: 1.6; }

/* FOOTER */
.footer { border-top: 4px solid var(--border); padding: 4rem 20px; text-align: center; background: var(--surface); }
.footer-links { display: flex; justify-content: center; gap: 2rem; margin: 2rem 0; flex-wrap: wrap; }
.footer-links a { font-family: var(--font-mono); font-weight: bold; color: var(--text); text-decoration: none; border-bottom: 2px solid transparent; }
.footer-links a:hover { border-bottom-color: var(--accent); }

/* PAGE HEADERS (Subpages) */
.page-header { background: var(--accent); color: #0a0a0a; padding: 4rem 20px; text-align: center; border-bottom: 4px solid var(--border); }
.page-header h1 { font-weight: 900; text-transform: uppercase; font-family: var(--font-mono); font-size: 3rem; }
.page-content { max-width: 900px; margin: 4rem auto; padding: 0 20px; }
.page-content h2 { margin: 2.5rem 0 1rem; font-size: 2rem; border-bottom: 2px solid var(--border); padding-bottom: 10px; }
.page-content p { margin-bottom: 1.5rem; line-height: 1.8; }
.page-content ul { margin-bottom: 1.5rem; padding-left: 1.5rem; }
.page-content li { margin-bottom: 0.5rem; }

/* MOBILE */
@media (max-width: 768px) {
    .nav-links { display: none; } /* Mobile nav simplified */
    .grid-3, .grid-2 { grid-template-columns: 1fr; }
    .kinetic-title { font-size: 2.5rem; }
    .hero-actions { display: flex; flex-direction: column; gap: 1rem; }
    .pricing-card.active { transform: none; }
}
/* BLOG / ARTICLE LAYOUT */
.article-layout { display: flex; flex-wrap: wrap; gap: 3rem; align-items: flex-start; }
.article-main { flex: 1; min-width: 60%; }
.article-sidebar { width: 320px; position: sticky; top: 100px; }
.prose h2 { margin: 3rem 0 1.5rem; border-bottom: 4px solid var(--border); padding-bottom: 10px; font-family: var(--font-mono); font-size: 2rem; color: var(--accent); }
.prose h3 { margin: 2rem 0 1rem; color: var(--accent-alt); font-size: 1.5rem; }
.prose p { margin-bottom: 1.5rem; line-height: 1.8; font-size: 1.1rem; }
.prose a { color: var(--accent-alt); font-weight: bold; text-decoration: underline; text-decoration-style: dashed; }
.prose a:hover { color: var(--bg); background: var(--accent-alt); }
.prose ul, .prose ol { margin-bottom: 1.5rem; padding-left: 2rem; }
.prose li { margin-bottom: 0.8rem; line-height: 1.6; }
.prose strong { color: var(--accent); }
[data-theme="light"] .prose h2 { color: var(--text); }
[data-theme="light"] .prose strong { color: var(--text); background: var(--accent); }

.toc-box { background: var(--surface); border: 2px solid var(--border); padding: 1.5rem; box-shadow: 6px 6px 0px var(--shadow); }
.toc-box h3 { margin-bottom: 1rem; font-family: var(--font-mono); border-bottom: 2px solid var(--border); padding-bottom: 0.5rem; }
.toc-list { list-style: none; padding: 0; }
.toc-list li { margin-bottom: 1rem; }
.toc-list a { text-decoration: none; color: var(--text); font-weight: bold; font-size: 1rem; display: block; border-left: 3px solid transparent; padding-left: 10px; transition: 0.2s; }
.toc-list a:hover { border-left-color: var(--accent); color: var(--accent); }
[data-theme="light"] .toc-list a:hover { color: var(--accent-alt); border-left-color: var(--accent-alt); }

.related-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.5rem; margin-top: 1.5rem; }
.related-card { border: 2px solid var(--border); padding: 1.5rem; background: var(--surface); transition: 0.2s; box-shadow: 4px 4px 0px var(--shadow); }
.related-card:hover { border-color: var(--accent); box-shadow: 2px 2px 0px var(--accent); transform: translate(2px, 2px); }
.related-card h4 { font-size: 1.1rem; margin-bottom: 0.5rem; font-family: var(--font-sans); }
.related-card a { text-decoration: none; color: var(--text); display: block; }

@media (max-width: 900px) {
    .article-sidebar { position: static; width: 100%; margin-bottom: 2rem; }
}
