/* Wilson 的技术笔记 —— 全站共用样式。无构建步骤、无依赖，直接由 Caddy
   file_server 托管。 */

:root {
    --text: #24292f;
    --muted: #6a737d;
    --link: #0f5fa8;
    --border: #e1e4e8;
    --bg-code: #f6f8fa;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0 1.25rem;
    color: var(--text);
    background: #fff;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
        "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
    line-height: 1.75;
}

.site-header,
.site-main,
.site-footer {
    max-width: 720px;
    margin: 0 auto;
}

.site-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    padding: 1.75rem 0 1rem;
    border-bottom: 1px solid var(--border);
}

.site-title {
    font-size: 1.35rem;
    font-weight: 700;
}

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

.site-nav a {
    color: var(--link);
    text-decoration: none;
    margin-left: 1rem;
    font-size: 0.95rem;
}

.site-nav a:hover {
    text-decoration: underline;
}

.site-main {
    padding: 1.5rem 0 2.5rem;
    min-height: 55vh;
}

.site-footer {
    padding: 1.25rem 0 2rem;
    border-top: 1px solid var(--border);
    text-align: center;
    font-size: 0.85rem;
    color: var(--muted);
}

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

.site-footer a:hover {
    text-decoration: underline;
}

a {
    color: var(--link);
}

/* 首页文章列表 */
.post-list {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0 0;
}

.post-list li {
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
}

.post-list .post-title {
    font-size: 1.15rem;
    font-weight: 600;
    text-decoration: none;
}

.post-list .post-title:hover {
    text-decoration: underline;
}

.post-meta {
    color: var(--muted);
    font-size: 0.85rem;
    margin: 0.15rem 0 0.35rem;
}

.post-excerpt {
    margin: 0;
    color: var(--text);
    font-size: 0.95rem;
}

/* 文章页 */
.post-body h1 {
    font-size: 1.6rem;
    line-height: 1.4;
    margin: 0.5rem 0 0.25rem;
}

.post-body h2 {
    font-size: 1.2rem;
    margin: 2rem 0 0.5rem;
    padding-bottom: 0.25rem;
    border-bottom: 1px solid var(--border);
}

.post-body p {
    margin: 0.75rem 0;
}

.post-body ul {
    padding-left: 1.5rem;
}

.post-body code {
    background: var(--bg-code);
    border-radius: 4px;
    padding: 0.1em 0.35em;
    font-size: 0.9em;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.post-body pre {
    background: var(--bg-code);
    border-radius: 6px;
    padding: 0.9rem 1rem;
    overflow-x: auto;
    line-height: 1.5;
}

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

.post-body blockquote {
    margin: 1rem 0;
    padding: 0.1rem 1rem;
    border-left: 3px solid var(--border);
    color: var(--muted);
}
