/* Reset and base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --bg: #0a0a0f;
    --bg-surface: #12121a;
    --text: #e8e8ed;
    --text-muted: #9898a8;
    --accent: #3b82f6;
    --accent-hover: #5b9bf7;
    --max-width: 720px;
}

html { font-size: 18px; scroll-behavior: smooth; }

body {
    font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

/* Hero */
.hero {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 4rem 2rem 3rem;
}

.hero h1 {
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 1.5rem;
}

.hero .tagline {
    color: var(--accent);
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    max-width: 640px;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.hero .author {
    color: var(--text-muted);
    font-size: 1rem;
    margin-bottom: 2.5rem;
}

.cta {
    display: inline-block;
    padding: 0.85rem 2.25rem;
    background: var(--accent);
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    border-radius: 4px;
    transition: background 0.2s;
}

.cta:hover { background: var(--accent-hover); }
.content a.cta { color: #fff; text-decoration: none; }

/* Article / Content */
.content {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 4rem 2rem 6rem;
}

.content h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 3rem 0 1rem;
    letter-spacing: -0.01em;
}

.content h3 {
    font-size: 1.35rem;
    font-weight: 600;
    margin: 2.5rem 0 0.75rem;
}

.content p {
    margin-bottom: 1.25rem;
    color: var(--text);
}

.content p em { color: var(--text-muted); }

.content a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 2px;
}

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

.content blockquote {
    border-left: 3px solid var(--accent);
    padding: 0.75rem 1.5rem;
    margin: 1.5rem 0;
    background: var(--bg-surface);
    border-radius: 0 4px 4px 0;
}

.content blockquote p { color: var(--text-muted); margin-bottom: 0; }

.content ul, .content ol {
    margin: 1rem 0 1.25rem 1.5rem;
}

.content li {
    margin-bottom: 0.5rem;
}

.content hr {
    border: none;
    border-top: 1px solid #2a2a3a;
    margin: 3rem 0;
}

/* Tables */
.content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.9rem;
}

.content th {
    text-align: left;
    padding: 0.75rem;
    border-bottom: 2px solid var(--accent);
    color: var(--accent);
    font-weight: 600;
}

.content td {
    padding: 0.75rem;
    border-bottom: 1px solid #2a2a3a;
}

.content tr:hover { background: var(--bg-surface); }

/* Code blocks (for whitepaper architecture diagrams) */
.content pre {
    background: var(--bg-surface);
    padding: 1.25rem;
    border-radius: 4px;
    overflow-x: auto;
    margin: 1.5rem 0;
    font-size: 0.85rem;
    line-height: 1.5;
}

.content code {
    font-family: 'SF Mono', 'Fira Code', monospace;
}

.content strong { color: #fff; font-weight: 600; }

/* Page header (whitepaper + 404) */
.page-header {
    padding: 2rem;
    text-align: center;
    border-bottom: 1px solid #1a1a2a;
}

.page-header a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.page-header a:hover { color: var(--accent); }

.page-header h1 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 800;
    margin-top: 1.5rem;
    letter-spacing: -0.02em;
}

.page-header .subtitle {
    color: var(--text-muted);
    margin-top: 0.5rem;
    font-size: 1rem;
}

/* Footer */
.footer {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 3rem 2rem;
    border-top: 1px solid #1a1a2a;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.footer a { color: var(--accent); text-decoration: none; }
.footer a:hover { text-decoration: underline; }

/* 404 */
.not-found {
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2rem;
}

.not-found h2 { font-size: 3rem; margin-bottom: 1rem; }
.not-found p { color: var(--text-muted); margin-bottom: 2rem; }

/* Responsive */
@media (max-width: 600px) {
    html { font-size: 16px; }
    .content { padding: 2rem 1.25rem 4rem; }
    .content table { font-size: 0.8rem; }
    .content th, .content td { padding: 0.5rem; }
}
