:root {
    --bg: #fafafa;
    --text: #333;
    --text-muted: #777;
    --link: #2563eb;
    --link-hover: #1d4ed8;
    --border: #e5e5e5;
    --code-bg: #f0f0f0;
    --max-width: 720px;
    --font-mono: 'SF Mono', 'Cascadia Code', 'Consolas', monospace;
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
}

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

body {
    font-family: var(--font-sans);
    background: var(--bg);
    color: var(--text);
    line-height: 1.8;
    font-size: 16px;
}

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

/* Header */
.site-header {
    border-bottom: 1px solid var(--border);
    padding: 24px 0;
    margin-bottom: 60px;
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.site-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
    letter-spacing: -0.5px;
}

.site-header nav { display: flex; gap: 22px; }

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

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

/* Intro */
.intro {
    margin-bottom: 50px;
    padding-bottom: 40px;
    border-bottom: 1px solid var(--border);
}

.intro h1 { font-size: 2rem; margin-bottom: 10px; letter-spacing: -1px; }

.intro p { color: var(--text-muted); font-size: 1.05rem; }

/* Post list */
.post-list { margin-bottom: 50px; }

.post-item {
    margin-bottom: 40px;
    padding-bottom: 35px;
    border-bottom: 1px dashed var(--border);
}

.post-item:last-child { border-bottom: none; }

.post-item time {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-muted);
}

.post-item h2 { font-size: 1.2rem; margin: 6px 0 8px; line-height: 1.5; }

.post-item h2 a {
    color: var(--text);
    text-decoration: none;
    transition: color 0.2s;
}

.post-item h2 a:hover { color: var(--link); }

.post-item .summary {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 10px;
}

.tags { display: flex; gap: 8px; flex-wrap: wrap; }

.tags span {
    font-size: 0.78rem;
    color: var(--link);
    background: #eef2ff;
    padding: 2px 10px;
    border-radius: 10px;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 60px;
}

.pagination a, .pagination .current {
    padding: 8px 18px;
    border: 1px solid var(--border);
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.9rem;
}

.pagination .current { background: var(--link); color: #fff; border-color: var(--link); }
.pagination a { color: var(--text); }
.pagination a:hover { border-color: var(--link); color: var(--link); }

/* Post content (single) */
.post-header { margin-bottom: 50px; }

.post-header h1 {
    font-size: 1.8rem;
    line-height: 1.4;
    letter-spacing: -0.5px;
}

.post-header .meta {
    margin-top: 10px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.post-content { margin-bottom: 60px; }

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

.post-content h2 {
    font-size: 1.3rem;
    margin: 2em 0 0.8em;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border);
}

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

.post-content ul, .post-content ol { margin: 0 0 1.2em 1.5em; }

.post-content li { margin-bottom: 0.4em; }

.post-content code {
    font-family: var(--font-mono);
    font-size: 0.88em;
    background: var(--code-bg);
    padding: 2px 6px;
    border-radius: 4px;
}

.post-content pre {
    background: #2d2d2d;
    color: #f8f8f2;
    padding: 20px 24px;
    border-radius: 8px;
    overflow-x: auto;
    margin-bottom: 1.5em;
    line-height: 1.6;
    font-size: 0.88rem;
}

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

.post-content blockquote {
    border-left: 3px solid var(--link);
    padding-left: 20px;
    color: var(--text-muted);
    margin-bottom: 1.2em;
}

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

/* About page */
.about-section { margin-bottom: 50px; }

.about-section h2 {
    font-size: 1.15rem;
    margin-bottom: 12px;
}

/* Footer */
.site-footer {
    border-top: 1px solid var(--border);
    padding: 30px 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 60px;
}

/* Responsive */
@media (max-width: 600px) {
    .site-header .container { flex-direction: column; align-items: flex-start; }
    .intro h1 { font-size: 1.5rem; }
    .post-item h2 { font-size: 1.05rem; }
    .post-content pre { padding: 14px 16px; font-size: 0.82rem; }
}
