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

:root {
    --bg: #0a0a0a;
    --surface: #141414;
    --border: #222;
    --text: #e0e0e0;
    --text-muted: #888;
    --accent: #7eb8da;
    --accent-hover: #a3d0ea;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    justify-content: center;
}

main {
    max-width: 640px;
    width: 100%;
    padding: 2rem 2rem 4rem;
}

/* ── Navigation ──────────────────────────────────────────── */
.blog-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

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

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

.nav-blog {
    font-weight: 600;
    color: var(--accent) !important;
}

/* ── Hero (list page) ────────────────────────────────────── */
.hero {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border);
}

.hero h1 {
    font-size: 2rem;
    font-weight: 300;
    letter-spacing: 0.04em;
    margin-bottom: 0.5rem;
}

.tagline {
    font-size: 0.95rem;
    color: var(--text-muted);
    font-weight: 300;
}

/* ── Post cards (list page) ──────────────────────────────── */
.post-card {
    margin-bottom: 1rem;
}

.post-card a {
    display: block;
    padding: 1.2rem 1.4rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    text-decoration: none;
    color: var(--text);
    transition: border-color 0.2s, background 0.2s;
}

.post-card a:hover {
    border-color: var(--accent);
    background: #1a1a1a;
}

.post-date {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.post-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0.3rem 0;
    line-height: 1.3;
}

.post-excerpt {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
}

.post-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.tag {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--accent);
    background: rgba(126, 184, 218, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
    text-decoration: none;
}

.tag:hover {
    background: rgba(126, 184, 218, 0.2);
}

.empty-state {
    text-align: center;
    color: var(--text-muted);
    font-style: italic;
    padding: 3rem 0;
}

/* ── Single post ─────────────────────────────────────────── */
.post-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.post-header .post-date {
    display: block;
    margin-bottom: 0.5rem;
}

.post-header h1 {
    font-size: 1.8rem;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 0.3rem;
}

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

/* ── Post content ────────────────────────────────────────── */
.post-content {
    font-size: 1rem;
    line-height: 1.75;
}

.post-content p {
    margin-bottom: 1.2rem;
}

.post-content h2 {
    font-size: 1.3rem;
    font-weight: 600;
    margin: 2rem 0 0.8rem;
    color: var(--accent);
}

.post-content h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 1.5rem 0 0.6rem;
}

.post-content a {
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s;
}

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

.post-content blockquote {
    border-left: 3px solid var(--accent);
    padding-left: 1rem;
    margin: 1.5rem 0;
    color: var(--text-muted);
    font-style: italic;
}

.post-content code {
    font-size: 0.9em;
    background: var(--surface);
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid var(--border);
}

.post-content pre {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem;
    overflow-x: auto;
    margin: 1.5rem 0;
}

.post-content pre code {
    background: none;
    border: none;
    padding: 0;
}

.post-content ul, .post-content ol {
    padding-left: 1.5rem;
    margin-bottom: 1.2rem;
}

.post-content li {
    margin-bottom: 0.3rem;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    border: 1px solid var(--border);
    margin: 1.5rem 0;
}

.post-content hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 2rem 0;
}

/* ── Post navigation ─────────────────────────────────────── */
.post-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

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

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

/* ── Footer ──────────────────────────────────────────────── */
footer {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.footer-content a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

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

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 480px) {
    main {
        padding: 1.5rem 1.2rem 3rem;
    }

    .hero h1 {
        font-size: 1.6rem;
    }

    .post-header h1 {
        font-size: 1.4rem;
    }

    .post-card a {
        padding: 1rem;
    }
}
