@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&family=Inter:wght@300;400;600&display=swap');

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

body {
    background-color: #05050f;
    color: #e0e0e0;
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    min-height: 100vh;
}

body::before {
    content: '';
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-image: radial-gradient(white 1px, transparent 1px);
    background-size: 200px 200px;
    opacity: 0.12;
    z-index: 0;
    pointer-events: none;
}

/* ===== HEADER ===== */
header {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 50px 20px 35px;
    min-height: 220px;
    border-bottom: 1px solid #1a2a4a;
    background: transparent;
}

header h1 {
    font-family: 'Orbitron', monospace;
    font-size: clamp(1.8rem, 5vw, 3.5rem);
    font-weight: 900;
    color: #fff;
    letter-spacing: 0.05em;
    -webkit-text-stroke: 5px #000;
    paint-order: stroke fill;
    text-shadow: 0 0 30px #0066ff88;
}

header h1 span { color: #3399ff; }

header p.tagline {
    margin-top: 10px;
    font-size: 1rem;
    color: #e8f4ff;
    font-weight: 300;
    -webkit-text-stroke: 3px #000;
    paint-order: stroke fill;
}

header p.meta {
    margin-top: 8px;
    font-size: 0.8rem;
    color: #446688;
    -webkit-text-stroke: 2px #000;
    paint-order: stroke fill;
}

header p.meta a { color: #3399ff; text-decoration: none; }

/* Keep header text above the canvas background */
header h1,
header p.tagline,
header p.meta {
    position: relative;
    z-index: 2;
}

/* ===== NAV ===== */
nav {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    padding: 16px 20px;
    background: #080820;
    border-bottom: 1px solid #1a2a4a;
}

nav a {
    color: #66aaff;
    text-decoration: none;
    font-size: 0.75rem;
    font-family: 'Orbitron', monospace;
    letter-spacing: 0.08em;
    padding: 5px 12px;
    border: 1px solid #1a3a6a;
    border-radius: 20px;
    transition: all 0.2s;
}

nav a:hover {
    background: #1a3a6a;
    color: #fff;
    border-color: #3399ff;
}

/* ===== MAIN ===== */
main {
    position: relative;
    z-index: 1;
    max-width: 1100px;
    margin: 0 auto;
    padding: 36px 20px;
}

/* ===== SECTION ===== */
.section { margin-bottom: 48px; }

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #1a2a4a;
}

.section-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-icon { font-size: 1.6rem; }

.section-header h2 {
    font-family: 'Orbitron', monospace;
    font-size: 1rem;
    font-weight: 700;
    color: #3399ff;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.why-link {
    font-size: 0.78rem;
    color: #446688;
    text-decoration: none;
    font-style: italic;
    transition: color 0.2s;
    white-space: nowrap;
}

.why-link:hover { color: #3399ff; }

/* ===== INDEX TOPIC GRID ===== */
.topic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
}

a.topic-card {
    display: block;
    background: #0a0a20;
    border: 1px solid #1a2a4a;
    border-radius: 8px;
    padding: 22px;
    text-decoration: none;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
}

a.topic-card:hover {
    border-color: #3399ff;
    box-shadow: 0 0 22px #3399ff22;
    transform: translateY(-2px);
}

a.topic-card .emoji {
    font-size: 2rem;
    display: block;
    margin-bottom: 10px;
}

a.topic-card h3 {
    font-family: 'Orbitron', monospace;
    font-size: 0.85rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 7px;
    letter-spacing: 0.08em;
}

a.topic-card p {
    font-size: 0.82rem;
    color: #6a7d8f;
    line-height: 1.5;
}

/* ===== X CALLOUT ===== */
.x-callout {
    background: linear-gradient(135deg, #0a0a20, #0a1a30);
    border: 1px solid #3399ff33;
    border-radius: 8px;
    padding: 18px 24px;
    text-align: center;
    margin-bottom: 36px;
    font-size: 0.88rem;
    color: #88aacc;
}

.x-callout a { color: #3399ff; text-decoration: none; font-weight: 600; }

.x-callout-meta {
    font-size: 0.78rem;
    color: #446688;
}

/* ===== FOOTER ===== */
footer {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 28px 20px;
    border-top: 1px solid #1a2a4a;
    color: #446688;
    font-size: 0.78rem;
    line-height: 1.9;
}

footer a { color: #3399ff; text-decoration: none; }

/* ===== TOPIC PAGE ===== */

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #3399ff;
    text-decoration: none;
    font-size: 0.8rem;
    font-family: 'Orbitron', monospace;
    letter-spacing: 0.08em;
    margin-bottom: 28px;
    transition: color 0.2s;
}

.back-link:hover { color: #fff; }

.topic-hero { margin-bottom: 32px; }

.topic-hero .emoji-large {
    font-size: 3rem;
    display: block;
    margin-bottom: 14px;
}

.topic-hero h1 {
    font-family: 'Orbitron', monospace;
    font-size: clamp(1.4rem, 3.5vw, 2.2rem);
    font-weight: 900;
    color: #fff;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
    text-shadow: 0 0 20px #0066ff44;
}

.topic-hero .lead {
    font-size: 1rem;
    color: #88aacc;
    max-width: 720px;
    line-height: 1.7;
}

.content-block {
    background: #0a0a20;
    border: 1px solid #1a2a4a;
    border-radius: 8px;
    padding: 26px;
    margin-bottom: 20px;
}

.content-block h2 {
    font-family: 'Orbitron', monospace;
    font-size: 0.88rem;
    font-weight: 700;
    color: #3399ff;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid #1a2a4a;
}

.content-block p {
    font-size: 0.93rem;
    color: #c0ccd8;
    line-height: 1.78;
    margin-bottom: 12px;
}

.content-block p:last-child { margin-bottom: 0; }

/* Glossary */
dl.glossary { }

.glossary-item {
    margin-bottom: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid #1a2a4a;
}

.glossary-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.glossary-item dt {
    font-family: 'Orbitron', monospace;
    font-size: 0.82rem;
    color: #fff;
    font-weight: 700;
    letter-spacing: 0.06em;
    margin-bottom: 3px;
}

.glossary-item dd {
    font-size: 0.88rem;
    color: #99aabb;
    line-height: 1.6;
    margin-left: 0;
}

/* Post links */
ul.post-list { list-style: none; }

ul.post-list li {
    padding: 11px 0;
    border-bottom: 1px solid #1a2a4a;
}

ul.post-list li:last-child { border-bottom: none; }

ul.post-list a {
    color: #3399ff;
    text-decoration: none;
    font-size: 0.88rem;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    transition: color 0.2s;
    line-height: 1.5;
}

ul.post-list a:hover { color: #fff; }

ul.post-list a::before {
    content: '𝕏';
    font-size: 0.82rem;
    color: #446688;
    flex-shrink: 0;
    margin-top: 2px;
}

.placeholder-note {
    font-size: 0.83rem;
    color: #446688;
    font-style: italic;
}

/* ===== Quotes styling ===== */
.quotes-list {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.quotes-list li {
    margin-bottom: 18px;
    padding-left: 24px;
    position: relative;
    line-height: 1.5;
}

.quotes-list li:before {
    content: "“";
    position: absolute;
    left: 0;
    color: #666;
    font-size: 1.5em;
    line-height: 1;
}

.quotes-list a {
    color: #007bff;
    text-decoration: underline;
}

.quotes-list a:hover {
    text-decoration: none;
}