/* Design System - Low Streaming Redesign */
:root {
    /* Brand Colors (Binding) */
    --bg-primary: #0B0F14;
    --bg-secondary: #111827;
    --text-primary: #F3F4F6;
    --text-muted: #9CA3AF;
    --accent-primary: #3B82F6;
    --accent-secondary: #60A5FA;
    --border-color: #1F2937;
    
    /* Layout & Spacing */
    --container-max: 1200px;
    --section-gap: 6rem;
    --card-padding: 2rem;
    --radius-sm: 0.25rem;
    --radius-md: 0.5rem;
    --radius-lg: 1rem;
    
    /* Fonts - Technical, Modern, Clean */
    --font-sans: 'Inter', 'Space Grotesk', 'IBM Plex Sans', system-ui, -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    
    /* Shadows - No neon, professional depth */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

html, body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.6;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
    min-height: 100%;
    position: relative;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Layout */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 1.5rem;
    width: 100%;
}

section {
    padding: var(--section-gap) 0;
    position: relative;
}

/* Hexagon Grid Background for Infrastructure Vibe */
.bg-grid {
    background-image: url("data:image/svg+xml,%3Csvg width='28' height='49' viewBox='0 0 28 49' xmlns='http://www.w3.org/2000/svg'%3E%3Cg stroke='%231F2937' stroke-width='1' fill='none' fill-rule='evenodd'%3E%3Cpath d='M13.99 9.25l13 7.5v15l-13 7.5L1 31.75v-15l12.99-7.5zM0 0l13.99 7.5M0 49l13.99-7.5M28 0l-13.99 7.5M28 49l-13.99-7.5'/%3E%3C/g%3E%3C/svg%3E");
    mask-image: radial-gradient(circle at center, black, transparent 80%);
    -webkit-mask-image: radial-gradient(circle at center, black, transparent 80%);
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: -1;
    opacity: 0.4;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary);
    line-height: 1.2;
    font-weight: 600;
    letter-spacing: -0.025em;
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); margin-bottom: 1.5rem; }
h2 { font-size: clamp(2rem, 3vw, 2.5rem); margin-bottom: 2rem; }
h3 { font-size: 1.5rem; margin-bottom: 1rem; }

p { margin-bottom: 1rem; }
.text-muted { color: var(--text-muted); }
.text-accent { color: var(--accent-primary); }
.text-center { text-align: center; }

/* Links & Buttons */
a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    cursor: pointer;
    border: 1px solid transparent;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.btn-primary {
    background-color: var(--accent-primary);
    color: #ffffff;
}

.btn-primary:hover {
    background-color: var(--accent-secondary);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background-color: transparent;
    border-color: var(--border-color);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background-color: var(--bg-secondary);
    border-color: var(--text-muted);
}

/* Navigation */
#navbar {
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(11, 15, 20, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    transition: all 0.3s ease;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: -0.05em;
    color: var(--text-primary);
}

.logo-svg {
    display: inline-block;
    vertical-align: middle;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-links a {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.9rem;
    white-space: nowrap;
}

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

/* Mobile Toggle */
.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    z-index: 1001;
}

.mobile-toggle span {
    width: 24px;
    height: 2px;
    background-color: var(--text-primary);
    transition: all 0.3s ease;
}

.mobile-toggle.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.mobile-toggle.active span:nth-child(2) {
    opacity: 0;
}
.mobile-toggle.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 1100px) {
    .mobile-toggle { 
        display: flex; 
        z-index: 1100; /* Ensure it is above everything */
    }
    .nav-links {
        position: fixed;
        top: 0; 
        right: 0; 
        width: 85%; 
        left: auto !important; 
        height: 100vh;
        background: rgba(11, 15, 20, 0.8);
        backdrop-filter: blur(25px);
        -webkit-backdrop-filter: blur(25px);
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding: 8rem 2rem 5rem;
        gap: 1.5rem;
        transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.5s, opacity 0.5s;
        border-left: 1px solid var(--border-color);
        box-shadow: -20px 0 60px rgba(0,0,0,0.9);
        transform: translateX(100%);
        visibility: hidden;
        opacity: 0;
        pointer-events: none;
        z-index: 1002;
    }
    .nav-links.active { 
        transform: translateX(0); 
        visibility: visible;
        opacity: 1;
        pointer-events: auto;
    }
    .nav-links a { 
        font-size: 1.8rem; 
        font-weight: 700;
        padding: 0.75rem 0;
        width: 100%;
        text-align: center;
        color: var(--text-primary);
        text-transform: uppercase;
        letter-spacing: 0.1em;
        border-bottom: none;
    }
    .nav-links .btn {
        margin-top: auto;
        margin-left: 0 !important;
        width: 100%;
        padding: 1.25rem;
        font-size: 1.1rem;
    }

    /* Mobile Menu Overlay using pseudo-element */
    body::after {
        content: '';
        position: fixed;
        top: 0; left: 0;
        width: 100%; height: 100%;
        background: rgba(0, 0, 0, 0.6);
        backdrop-filter: blur(4px);
        z-index: 1001;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        pointer-events: none;
    }
    
    body.menu-open::after {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }
    
    body.menu-open, html.menu-open {
        overflow: hidden !important;
    }
}

/* Cards */
.card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--card-padding);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    display: flex;
    flex-direction: column;
}

.card:hover {
    border-color: var(--accent-primary);
    transform: translateY(-2px);
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.2), inset 0 0 20px rgba(59, 130, 246, 0.03);
}

.card-header { margin-bottom: 1.5rem; }
.card-body { flex-grow: 1; }
.card-footer { margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px solid var(--border-color); }

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
}
.badge-blue { background: rgba(59, 130, 246, 0.1); color: var(--accent-secondary); border: 1px solid rgba(59, 130, 246, 0.2); }
.badge-gray { background: var(--bg-primary); color: var(--text-muted); border: 1px solid var(--border-color); }

/* Hero Section */
.hero {
    min-height: 80vh;
    display: flex;
    align-items: center;
    padding-top: 6rem;
}

.hero-content {
    max-width: 800px;
    z-index: 1;
    position: relative;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 600px;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Grid Layouts */
.grid { display: grid; gap: 2rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

/* Code Blocks / Terminal Vibe */
.terminal-block {
    background: #000;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 1.5rem;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--text-primary);
    overflow-x: auto;
    margin: 1.5rem 0;
}
.terminal-header {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}
.terminal-dot {
    width: 10px; height: 10px; border-radius: 50%;
    background: var(--border-color);
}

/* Footer */
footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 4rem 0 2rem;
    margin-top: 4rem;
}

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

.footer-heading {
    font-size: 1rem;
    margin-bottom: 1.25rem;
    color: var(--text-primary);
}

.footer-links { list-style: none; }
.footer-links li { margin-bottom: 0.75rem; }
.footer-links a { color: var(--text-muted); font-size: 0.9rem; }
.footer-links a:hover { color: var(--accent-secondary); }

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    flex-wrap: wrap;
    gap: 1rem;
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
        text-align: center;
    }
    .footer-grid > div {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 2rem; }
.mt-4 { margin-top: 2rem; }
.mono { font-family: var(--font-mono); }
.text-sm { font-size: 0.875rem; }

/* Knowledge Base Specifics */
.kb-header {
    text-align: center;
    padding: 4rem 0 2rem;
}
.search-input-wrapper {
    position: relative;
    max-width: 600px;
    margin: 0 auto 3rem;
}
.search-input {
    width: 100%;
    padding: 1rem 1.5rem 1rem 3rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 1rem;
    font-family: var(--font-sans);
    transition: all 0.2s ease;
}
.search-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 1px var(--accent-primary);
}
.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}
.category-filter {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 3rem;
}
.filter-btn {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}
.filter-btn:hover, .filter-btn.active {
    background: var(--border-color);
    color: var(--text-primary);
}

/* Category Tags */
.category-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}
.tag {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    cursor: pointer;
    display: inline-block;
}
.tag:hover {
    border-color: var(--accent-primary);
    color: var(--text-primary);
}

@media (max-width: 768px) {
    section { padding: 4rem 0; }
    h1 { font-size: 2rem; }
    .hero { padding-top: 6rem; min-height: 60vh; }
    .hero-actions { flex-direction: column; }
    .grid-2, .grid-3, .grid-4 {
        grid-template-columns: 1fr;
    }
}

/* Brand Logo Typography */
.brand-logo { 
    display: flex; 
    align-items: center; 
    gap: 0.75rem; 
    text-decoration: none; 
    flex-shrink: 0;
}
.brand-text-wrapper { 
    display: flex; 
    flex-direction: column; 
    justify-content: center; 
}
.brand-name { 
    font-family: var(--font-sans); 
    font-weight: 700; 
    font-size: 1.4rem; 
    letter-spacing: 0.05em; 
    line-height: 1; 
    display: flex; 
    align-items: baseline; 
}
.brand-name .part-white { 
    color: #ffffff; 
}
.brand-name .part-blue { 
    color: var(--accent-primary); 
}
.brand-name .part-gray { 
    color: var(--text-muted); 
    font-size: 0.95rem; 
    font-weight: 600; 
    margin-left: 0.05rem; 
}
.brand-subtitle { 
    font-family: var(--font-mono); 
    font-size: 0.45rem; 
    letter-spacing: 0.25em; 
    color: var(--text-muted); 
    text-transform: uppercase; 
    margin-top: 0.3rem; 
    white-space: nowrap;
}

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

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

/* Terminal Typing Animation */
.terminal-cursor {
    display: inline-block;
    width: 8px;
    height: 15px;
    background-color: var(--accent-primary);
    vertical-align: middle;
    animation: blink 1s step-end infinite;
}

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

.terminal-line {
    opacity: 0;
    display: none;
}

.terminal-line.visible {
    opacity: 1;
    display: block;
    animation: fadeIn 0.1s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* --- Article Specific Styles --- */
.article-header {
    padding-top: 8rem;
    padding-bottom: 2rem;
    text-align: center;
}
.article-header h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    max-width: 900px;
    margin: 0 auto;
    line-height: 1.1;
}
.article-content {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.1rem;
    line-height: 1.8;
}
.article-content p {
    margin-bottom: 1.5rem;
}
.article-content h2 {
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    font-size: 2rem;
}
.article-content h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}
.article-content ul, .article-content ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}
.article-content li {
    margin-bottom: 0.5rem;
}
.article-featured-img {
    margin: 2rem 0 3rem;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-color);
}
.article-featured-img img {
    width: 100%;
    height: auto;
    display: block;
}
.article-content blockquote,
.sidebar-box, .info-card, .info-box, .mining-card {
    background: var(--bg-secondary);
    border-left: 4px solid var(--accent-primary);
    padding: 1.5rem;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    margin: 2rem 0;
    color: var(--text-muted);
}
.article-content blockquote {
    font-style: italic;
}
.sidebar-box h4, .info-card h4, .info-box h4, .mining-card h4 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-style: normal;
    font-size: 1.25rem;
}
.sidebar-box p, .info-card p, .info-box p, .mining-card p {
    font-style: normal;
    margin-bottom: 0;
}

.top-ticker {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 0.5rem;
    display: flex;
    justify-content: center;
    gap: 2rem;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    text-transform: uppercase;
    position: relative;
    z-index: 1001;
}
.top-ticker .ticker-item {
    color: var(--text-muted);
}
.top-ticker .ticker-item span {
    color: var(--accent-primary);
    font-weight: 600;
}

/* Mobile Adjustments for Articles */
@media (max-width: 768px) {
    .top-ticker {
        display: none; /* Hide on mobile to save vertical space */
    }
    .article-header {
        padding-top: 6rem;
    }
    .article-content {
        font-size: 1rem;
        padding: 0 1rem;
    }
    .article-content h2 {
        font-size: 1.5rem;
    }
    .article-content h3 {
        font-size: 1.25rem;
    }
    .article-header h1 {
        font-size: 2rem; /* Consistent font size on mobile */
    }
}


