:root {
    --bg: #0a0a0b;
    --surface: #141416;
    --surface-hover: #1c1c1f;
    --border: #2a2a2e;
    --text: #ededef;
    --text-muted: #8b8b8e;
    --accent: #6d5dfc;
    --accent-light: #8b7ffd;
    --accent-bg: rgba(109, 93, 252, 0.08);
    --green: #34d399;
    --red: #f87171;
    --yellow: #fbbf24;
    --code-bg: #1a1a1e;
}

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

a, button, [role="button"], .post-card {
    cursor: pointer;
}

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

/* Top bar & progress */
.top-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), #a78bfa, var(--accent));
    z-index: 100;
}

.progress-bar {
    position: fixed;
    top: 3px;
    left: 0;
    height: 2px;
    background: var(--accent);
    z-index: 100;
    transition: width 0.1s linear;
    opacity: 0.6;
}

/* Nav */
nav {
    position: fixed;
    top: 3px;
    left: 0;
    right: 0;
    background: rgba(10, 10, 11, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    z-index: 50;
    padding: 0 2rem;
}

nav .inner {
    max-width: 860px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
}

nav .logo {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text);
    letter-spacing: -0.02em;
    text-decoration: none;
}

nav .logo span {
    color: var(--accent-light);
}

nav .meta {
    font-size: 0.8rem;
    color: var(--text-muted);
}

nav a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.2s;
}

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

/* Hero */
.hero {
    padding: 10rem 2rem 4rem;
    max-width: 860px;
    margin: 0 auto;
}

.hero h1 {
    font-size: clamp(2.2rem, 5vw, 3.2rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.03em;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--text) 0%, var(--text-muted) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero .tagline {
    font-size: 1.15rem;
    color: var(--text-muted);
    line-height: 1.6;
    max-width: 520px;
}

/* Badge */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: var(--accent-bg);
    border: 1px solid rgba(109, 93, 252, 0.2);
    color: var(--accent-light);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1.5rem;
}

.badge::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--accent-light);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

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

/* Article hero h1 (standalone, not inside .hero) */
h1 {
    font-size: clamp(2.2rem, 5vw, 3.2rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.03em;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--text) 0%, var(--text-muted) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    font-size: 1.15rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 2.5rem;
    max-width: 580px;
}

/* Author card */
.author-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0;
    border-top: 1px solid var(--border);
}

.author-card img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid var(--border);
}

.author-info {
    display: flex;
    flex-direction: column;
}

.author-name {
    font-weight: 600;
    font-size: 0.95rem;
}

.author-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Article */
article {
    max-width: 860px;
    margin: 0 auto;
    padding: 0 2rem 6rem;
}

article h2 {
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 3.5rem 0 1rem;
    color: var(--text);
}

article h3 {
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    margin: 2.5rem 0 0.8rem;
    color: var(--text);
}

article p {
    margin-bottom: 1.3rem;
    color: #c4c4c7;
    font-size: 1.02rem;
}

article strong {
    color: var(--text);
    font-weight: 600;
}

article a {
    color: var(--accent-light);
    text-decoration: none;
    border-bottom: 1px solid rgba(139, 127, 253, 0.3);
    transition: border-color 0.2s;
}

article a:hover {
    border-color: var(--accent-light);
}

/* Callouts */
.callout {
    background: var(--surface);
    border-left: 3px solid var(--accent);
    padding: 1.2rem 1.5rem;
    border-radius: 0 8px 8px 0;
    margin: 2rem 0;
    font-size: 0.95rem;
}

.callout.warning {
    border-left-color: var(--yellow);
}

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

.callout .callout-title {
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--accent-light);
    margin-bottom: 0.5rem;
}

.callout.warning .callout-title {
    color: var(--yellow);
}

/* Code */
pre {
    background: var(--code-bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.5rem;
    overflow-x: auto;
    margin: 1.5rem 0;
    position: relative;
}

pre .lang-tag {
    position: absolute;
    top: 0.6rem;
    right: 0.8rem;
    font-size: 0.7rem;
    color: var(--text-muted);
    font-family: 'Inter', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

code {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.88rem;
    line-height: 1.6;
}

p code, li code {
    background: var(--code-bg);
    border: 1px solid var(--border);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-size: 0.85rem;
    color: var(--accent-light);
}

/* Syntax highlighting */
.keyword { color: #c792ea; }
.function { color: #82aaff; }
.string { color: #c3e88d; }
.comment { color: #546e7a; font-style: italic; }
.hook { color: #ffcb6b; }
.tag { color: #f07178; }
.attr { color: #ffcb6b; }
.number { color: #f78c6c; }
.operator { color: #89ddff; }
.variable { color: #eeffff; }
.bracket { color: #89ddff; }

/* Lists */
ul, ol {
    margin: 1rem 0 1.5rem 1.5rem;
    color: #c4c4c7;
}

li {
    margin-bottom: 0.5rem;
    font-size: 1.02rem;
}

/* Stats grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin: 2rem 0;
}

.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.5rem;
    text-align: center;
}

.stat-card .number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--accent-light);
    letter-spacing: -0.02em;
}

.stat-card .label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.3rem;
}

/* Comparison table */
.comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    font-size: 0.95rem;
}

.comparison-table th {
    text-align: left;
    padding: 0.8rem 1rem;
    border-bottom: 2px solid var(--border);
    font-weight: 600;
    color: var(--text);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.comparison-table td {
    padding: 0.8rem 1rem;
    border-bottom: 1px solid var(--border);
    color: #c4c4c7;
}

.comparison-table tr:last-child td {
    border-bottom: none;
}

.check { color: var(--green); }
.cross { color: var(--red); }

/* Dividers */
hr {
    border: none;
    height: 1px;
    background: var(--border);
    margin: 3rem 0;
}

/* April Fools reveal */
.reveal-note {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    font-size: 0.88rem;
    color: var(--text-muted);
    font-style: italic;
    line-height: 1.6;
}

/* Index post cards */
.posts {
    max-width: 860px;
    margin: 0 auto;
    padding: 2rem 2rem 6rem;
}

.post-card {
    display: block;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 1.25rem;
    text-decoration: none;
    transition: border-color 0.2s, background 0.2s;
}

.post-card:hover {
    border-color: rgba(109, 93, 252, 0.4);
    background: var(--surface-hover);
}

.post-card .badge {
    font-size: 0.7rem;
    padding: 0.2rem 0.6rem;
    margin-bottom: 0.75rem;
}

.post-card h2 {
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text);
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.post-card .excerpt {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 0.75rem;
}

.post-card .post-meta {
    font-size: 0.8rem;
    color: #666;
}

/* Footer */
footer {
    text-align: center;
    padding: 3rem 2rem;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.85rem;
}

footer a {
    color: var(--accent-light);
    text-decoration: none;
}

/* Responsive */
@media (max-width: 640px) {
    .hero { padding: 8rem 1.5rem 3rem; }
    article { padding: 0 1.5rem 4rem; }
    .posts { padding: 2rem 1.5rem 4rem; }
    .post-card { padding: 1.5rem; }
    .stats-grid { grid-template-columns: 1fr; }
}
