:root {
    --primary: #2563eb;
    --text: #1f2937;
    --text-muted: #6b7280;
    --bg: #f9fafb;
    --card-bg: #ffffff;
    --border: #e5e7eb;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.7;
}

.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.site-header {
    background: #fff;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 10;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
}

.logo {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
}

.nav a {
    color: var(--text-muted);
    text-decoration: none;
    margin-left: 20px;
    font-size: 0.95rem;
    transition: color 0.2s;
}

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

/* Hero */
.hero {
    text-align: center;
    padding: 60px 0 40px;
}

.hero h1 {
    font-size: 2.2rem;
    margin-bottom: 12px;
}

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

/* Post list */
.latest h2, .page-title {
    font-size: 1.5rem;
    margin-bottom: 24px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary);
    display: inline-block;
}

.post-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.post-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    transition: box-shadow 0.2s, transform 0.2s;
}

.post-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}

.post-card a {
    display: block;
    padding: 20px 24px;
    text-decoration: none;
    color: inherit;
}

.post-card h3 {
    font-size: 1.15rem;
    color: var(--text);
    margin-bottom: 6px;
}

.post-card p {
    color: var(--text-muted);
    font-size: 0.92rem;
}

/* Post content */
.post-content {
    padding: 40px 20px;
}

.post-header {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.post-header h1 {
    font-size: 1.8rem;
    margin-bottom: 8px;
}

.post-header time {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.post-body {
    font-size: 1rem;
}

.post-body h2 {
    font-size: 1.3rem;
    margin: 28px 0 14px;
}

.post-body h3 {
    font-size: 1.1rem;
    margin: 20px 0 10px;
}

.post-body p {
    margin-bottom: 14px;
}

.post-body ul, .post-body ol {
    margin: 14px 0 14px 24px;
}

.post-body li {
    margin-bottom: 6px;
}

.post-body code {
    background: #f3f4f6;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
    font-family: "Cascadia Code", "Fira Code", Consolas, monospace;
}

.post-body pre {
    background: #1e293b;
    color: #e2e8f0;
    padding: 16px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 14px 0;
}

.post-body pre code {
    background: transparent;
    padding: 0;
    color: inherit;
}

.back-link {
    display: inline-block;
    margin-top: 32px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.back-link:hover {
    text-decoration: underline;
}

/* Footer */
.site-footer {
    background: #fff;
    border-top: 1px solid var(--border);
    margin-top: 60px;
    padding: 24px 0;
    text-align: center;
}

.site-footer p {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.site-footer .icp {
    margin-top: 6px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

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

.site-footer .icp a:hover {
    color: var(--primary);
    text-decoration: underline;
}

/* Mobile */
@media (max-width: 640px) {
    .hero h1 { font-size: 1.6rem; }
    .header-inner { height: 52px; }
    .nav a { margin-left: 12px; font-size: 0.9rem; }
    .post-header h1 { font-size: 1.4rem; }
}
