:root {
    --bg: #fafafa;
    --bg-card: #ffffff;
    --text: #1a1a1a;
    --text-muted: #666;
    --text-light: #999;
    --border: #e8e8e8;
    --accent: #534ab7;
    --accent-light: #eeedfe;
    --max-width: 720px;
    --radius: 8px;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0f0f0f;
        --bg-card: #1a1a1a;
        --text: #e0e0e0;
        --text-muted: #999;
        --text-light: #666;
        --border: #2a2a2a;
        --accent: #a3a0ec;
        --accent-light: #1c1a2e;
    }
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
                 "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.8;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; transition: opacity .2s; }
a:hover { opacity: .7; }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 20px; }

.site-header {
    border-bottom: 1px solid var(--border);
    padding: 16px 0;
    position: sticky;
    top: 0;
    background: var(--bg);
    z-index: 100;
}
.header-inner { display: flex; justify-content: space-between; align-items: center; }
.site-logo { font-size: 18px; font-weight: 600; color: var(--text); }
.site-nav { display: flex; gap: 20px; }
.site-nav a { color: var(--text-muted); font-size: 14px; }

main { padding: 40px 0 80px; }

.home-intro { text-align: center; margin-bottom: 48px; }
.home-intro h1 { font-size: 28px; margin-bottom: 8px; }
.home-intro p { color: var(--text-muted); }

.section-title { font-size: 14px; color: var(--text-light); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 20px; }

.post-card {
    padding: 24px 0;
    border-bottom: 1px solid var(--border);
}
.post-card-title { font-size: 20px; margin-bottom: 8px; }
.post-card-title a { color: var(--text); }
.post-card-meta { font-size: 13px; color: var(--text-light); margin-bottom: 8px; display: flex; gap: 12px; align-items: center; }
.post-card-summary { color: var(--text-muted); font-size: 15px; }
.read-more { font-size: 14px; }

.post { }
.post-header { margin-bottom: 32px; }
.post-title { font-size: 28px; line-height: 1.4; margin-bottom: 12px; }
.post-meta { font-size: 13px; color: var(--text-light); display: flex; gap: 12px; align-items: center; }
.post-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag { font-size: 12px; color: var(--accent); background: var(--accent-light); padding: 2px 8px; border-radius: 4px; }

.post-content { font-size: 16px; }
.post-content h2 { font-size: 22px; margin: 32px 0 16px; }
.post-content h3 { font-size: 18px; margin: 28px 0 12px; }
.post-content p { margin-bottom: 16px; }
.post-content ul, .post-content ol { margin-bottom: 16px; padding-left: 24px; }
.post-content li { margin-bottom: 6px; }
.post-content blockquote {
    border-left: 3px solid var(--accent);
    padding: 8px 16px;
    color: var(--text-muted);
    margin: 16px 0;
    background: var(--accent-light);
    border-radius: 0 var(--radius) var(--radius) 0;
}
.post-content img { max-width: 100%; border-radius: var(--radius); margin: 16px 0; }
.post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    font-size: 14px;
}
.post-content th, .post-content td {
    border: 1px solid var(--border);
    padding: 8px 12px;
    text-align: left;
}
.post-content th { background: var(--bg-card); font-weight: 600; }
.post-content code {
    font-family: "JetBrains Mono", "Fira Code", monospace;
    font-size: 14px;
    background: var(--accent-light);
    padding: 2px 6px;
    border-radius: 4px;
}
.post-content pre {
    background: #0d1117 !important;
    border-radius: var(--radius);
    overflow-x: auto;
    margin: 16px 0;
    padding: 16px;
}
.post-content pre code { background: none; padding: 0; }

.post-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    font-size: 14px;
}
.post-nav .prev, .post-nav .next { max-width: 48%; }
.post-nav .next { text-align: right; }

.site-footer {
    border-top: 1px solid var(--border);
    padding: 24px 0;
    text-align: center;
    font-size: 13px;
    color: var(--text-light);
}

.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 32px; }
.pagination a, .pagination span {
    padding: 6px 12px;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 14px;
}
.pagination .active { background: var(--accent); color: #fff; border-color: var(--accent); }
