/* Blog CSS — Bear Blog inspired, dark theme, clean and minimal */

:root {
    --bg: #1a1a2e;
    --bg-secondary: #16213e;
    --text: #e0e0e0;
    --text-muted: #8a8a9a;
    --accent: #7eb8da;
    --accent-hover: #a3d5f0;
    --border: #2a2a4a;
    --code-bg: #0f0f23;
    --max-width: 640px;
}

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

html {
    font-size: 18px;
    line-height: 1.6;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 2rem 1rem;
    min-height: 100vh;
}

/* ── Header / Nav ────────────────────────────── */

.site-header {
    margin-bottom: 2.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.site-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
}

.site-title a {
    color: var(--text);
    text-decoration: none;
}

.site-nav {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
}

.site-nav a {
    color: var(--accent);
    text-decoration: none;
}

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

/* ── Post List (Index) ───────────────────────── */

.post-list {
    list-style: none;
}

.post-list li {
    margin-bottom: 1.5rem;
}

.post-list .post-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.15rem;
}

.post-list .post-title a {
    color: var(--text);
    text-decoration: none;
}

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

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

.post-summary {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 0.3rem;
}

/* ── Single Post ─────────────────────────────── */

.post-header {
    margin-bottom: 2rem;
}

.post-header h1 {
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 0.4rem;
}

.post-content {
    line-height: 1.7;
}

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

.post-content h2 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-top: 2rem;
    margin-bottom: 0.8rem;
}

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

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

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

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

.post-content code {
    font-family: "SF Mono", "Fira Code", "Fira Mono", Menlo, monospace;
    font-size: 0.85em;
    background: var(--code-bg);
    padding: 0.15em 0.35em;
    border-radius: 3px;
}

.post-content pre {
    background: var(--code-bg);
    padding: 1rem;
    border-radius: 4px;
    overflow-x: auto;
    margin: 1.2rem 0;
    line-height: 1.5;
}

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

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

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

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 1rem 0;
}

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

.post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.2rem 0;
    font-size: 0.9rem;
}

.post-content th,
.post-content td {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border);
    text-align: left;
}

.post-content th {
    background: var(--bg-secondary);
    font-weight: 600;
}

/* ── Tags ────────────────────────────────────── */

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

.tag {
    font-size: 0.75rem;
    color: var(--accent);
    background: var(--bg-secondary);
    padding: 0.15em 0.5em;
    border-radius: 3px;
    text-decoration: none;
}

.tag:hover {
    background: var(--border);
}

.tag-count {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ── Tag Index ───────────────────────────────── */

.tag-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.tag-list li a {
    font-size: 0.9rem;
    color: var(--accent);
    text-decoration: none;
    background: var(--bg-secondary);
    padding: 0.3em 0.7em;
    border-radius: 4px;
    display: inline-block;
}

.tag-list li a:hover {
    background: var(--border);
}

/* ── Footer ──────────────────────────────────── */

.site-footer {
    margin-top: 3rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    font-size: 0.8rem;
    color: var(--text-muted);
}

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

/* ── About Page ──────────────────────────────── */

.about-content {
    line-height: 1.7;
}

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

.about-content h2 {
    font-size: 1.3rem;
    margin-top: 2rem;
    margin-bottom: 0.8rem;
}
