/* ===== 子非鱼的博客 - Hugo Theme ===== */
:root {
    --bg: #fafafa;
    --text: #333;
    --text-light: #666;
    --accent: #2563eb;
    --accent-hover: #1d4ed8;
    --border: #e5e7eb;
    --card-bg: #fff;
    --radius: 8px;
    --max-width: 720px;
}

* { 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;
}

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

/* Header */
.site-header {
    background: var(--card-bg);
    border-bottom: 1px solid var(--border);
    padding: 16px 0;
    position: sticky; top: 0; z-index: 100;
}
.site-header .container {
    display: flex; justify-content: space-between; align-items: center;
}
.site-title {
    font-size: 22px; font-weight: 700; color: var(--text); text-decoration: none;
}
.site-header nav a {
    color: var(--text-light); text-decoration: none; margin-left: 24px; font-size: 15px;
}
.site-header nav a:hover { color: var(--accent); }

/* Main */
main.container { padding-top: 40px; padding-bottom: 60px; }

/* Home hero */
.home-hero {
    text-align: center; padding: 60px 0 40px;
}
.home-hero h1 { font-size: 36px; font-weight: 800; }
.home-hero p { color: var(--text-light); font-size: 18px; margin-top: 8px; }

/* Post list */
.post-list { margin-top: 20px; }
.post-item {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 16px;
}
.post-item h2 { font-size: 20px; margin-bottom: 4px; }
.post-item h2 a { color: var(--text); text-decoration: none; }
.post-item h2 a:hover { color: var(--accent); }
.post-item p { color: var(--text-light); font-size: 14px; margin-top: 8px; }

/* Single post */
.post h1 { font-size: 30px; margin-bottom: 12px; }
.post-meta { color: var(--text-light); font-size: 14px; margin-bottom: 24px; }
.post-meta .tags { margin-left: 12px; }
.post-meta .tags a { color: var(--accent); text-decoration: none; margin-right: 6px; }
.post-content { 
    font-size: 17px; line-height: 2;
}
.post-content h2 { font-size: 24px; margin: 32px 0 12px; }
.post-content h3 { font-size: 20px; margin: 24px 0 8px; }
.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 code {
    background: #f1f5f9; padding: 2px 6px; border-radius: 4px;
    font-family: "JetBrains Mono", "Fira Code", monospace; font-size: 14px;
}
.post-content pre {
    background: #1e293b; color: #e2e8f0; padding: 16px 20px;
    border-radius: var(--radius); overflow-x: auto; margin-bottom: 16px;
}
.post-content pre code { background: none; padding: 0; }
.post-content a { color: var(--accent); }
.post-content blockquote {
    border-left: 4px solid var(--accent); padding: 8px 16px;
    margin: 16px 0; background: #f8fafc; color: var(--text-light);
}

/* Footer */
.site-footer {
    border-top: 1px solid var(--border); padding: 24px 0;
    text-align: center; color: var(--text-light); font-size: 14px;
}
.site-footer .icp { margin-top: 4px; }
.site-footer .icp a { color: var(--text-light); text-decoration: none; }
.site-footer .icp a:hover { color: var(--text); }

/* Responsive */
@media (max-width: 600px) {
    .home-hero { padding: 40px 0 20px; }
    .home-hero h1 { font-size: 28px; }
    .post h1 { font-size: 24px; }
}
