/* NEXUS PORTAL V6 - FINAL VOID TECH */
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@300;400;700&family=Rajdhani:wght@400;500;600;700;800&display=swap');

:root {
    --bg-void: #020408;
    --bg-depth: #090c14;
    --border: #1e293b;
    --accent: #3b82f6;      /* Nexus Blue */
    --accent-glow: rgba(59, 130, 246, 0.4);
    --text-main: #e2e8f0;
    --text-muted: #64748b;
}

* { box-sizing: border-box; scroll-behavior: smooth; }

body {
    margin: 0; background-color: var(--bg-void); color: var(--text-main);
    font-family: 'Rajdhani', sans-serif; font-size: 18px; line-height: 1.6;
    background-image: linear-gradient(rgba(30,41,59,0.1) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(30,41,59,0.1) 1px, transparent 1px);
    background-size: 50px 50px;
}

/* NOISE & SCANLINES */
body::after {
    content: ""; position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: repeating-linear-gradient(0deg, rgba(0,0,0,0.15), rgba(0,0,0,0.15) 1px, transparent 1px, transparent 2px);
    pointer-events: none; z-index: 999;
}

/* LAYOUT */
.layout-wrapper {
    display: grid; grid-template-columns: 260px 1fr;
    max-width: 1600px; margin: 0 auto; min-height: 100vh;
    border-left: 1px solid var(--border); border-right: 1px solid var(--border);
}

/* SIDEBAR */
.sidebar {
    background: var(--bg-depth); border-right: 1px solid var(--border);
    padding: 30px 20px; position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.brand {
    font-family: 'JetBrains Mono', monospace; font-size: 1.6rem; font-weight: 800;
    color: #fff; margin-bottom: 40px; text-shadow: 0 0 15px var(--accent-glow);
}
.nav-link {
    display: block; padding: 12px 15px; color: var(--text-muted); text-decoration: none;
    font-weight: 600; transition: 0.3s; border-left: 2px solid transparent;
}
.nav-link:hover, .nav-link.active {
    color: #fff; border-left-color: var(--accent); background: linear-gradient(90deg, rgba(59,130,246,0.1), transparent);
}

/* HEADER & TICKER */
.top-header { border-bottom: 1px solid var(--border); background: var(--bg-depth); }
.ticker-wrap { width: 100%; overflow: hidden; background: #000; padding: 5px 0; border-bottom: 1px solid #1f2937; }
.ticker {
    display: inline-block; white-space: nowrap; animation: ticker 30s linear infinite;
    font-family: 'JetBrains Mono'; font-size: 0.75rem; color: var(--accent);
}
@keyframes ticker { 0% { transform: translateX(100%); } 100% { transform: translateX(-100%); } }

/* HERO & CONTENT */
.main-content { padding: 0; }
.hero-section {
    padding: 80px 50px; border-bottom: 1px solid var(--border);
    background: radial-gradient(circle at top right, rgba(59,130,246,0.1), transparent 60%);
}
h1 { font-size: 3.5rem; text-transform: uppercase; margin: 0 0 20px 0; letter-spacing: -1px; }
h2 { font-size: 2rem; color: #fff; margin-top: 50px; border-bottom: 1px solid var(--border); padding-bottom: 10px; }
h3 { color: var(--accent); margin-top: 30px; }

/* IMAGES */
.cyber-img {
    width: 100%; height: auto; display: block;
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 30px), calc(100% - 30px) 100%, 0 100%);
    filter: grayscale(80%) contrast(1.2); transition: 0.5s; margin: 30px 0;
    border: 1px solid var(--border);
}
.cyber-img:hover { filter: grayscale(0%) contrast(1); box-shadow: 0 0 30px var(--accent-glow); }

/* BUTTONS */
.link-block {
    background: rgba(59,130,246,0.05); border: 1px solid var(--accent);
    padding: 30px; margin: 30px 0; text-align: center;
    clip-path: polygon(20px 0, 100% 0, 100% calc(100% - 20px), calc(100% - 20px) 100%, 0 100%, 0 20px);
}
.btn-glitch {
    display: inline-block; padding: 15px 50px; background: var(--accent); color: #000;
    font-weight: 800; text-decoration: none; text-transform: uppercase;
    font-family: 'JetBrains Mono'; clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
    transition: 0.2s;
}
.btn-glitch:hover { background: #fff; box-shadow: 0 0 20px var(--accent); transform: scale(1.02); }

/* TOC */
.toc {
    background: rgba(255,255,255,0.03); padding: 20px; border: 1px solid var(--border);
    margin-bottom: 40px; display: inline-block; min-width: 300px;
}
.toc ul { list-style: none; padding: 0; }
.toc a { color: var(--accent); text-decoration: none; display: block; padding: 5px 0; }

/* FOOTER */
.tech-footer {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; padding: 60px 50px;
    background: #000; border-top: 1px solid var(--border); font-size: 0.9rem;
}
.tech-footer a { color: var(--text-muted); text-decoration: none; }

@media (max-width: 900px) {
    .layout-wrapper { grid-template-columns: 1fr; }
    .sidebar { display: none; }
    h1 { font-size: 2.5rem; }
    .tech-footer { grid-template-columns: 1fr; }
}
