:root {
    --color-text: #1a1a1a;
    --color-text-secondary: #666;
    --color-text-muted: #999;
    --color-link: #2563eb;
    --color-link-hover: #1d4ed8;
    --color-bg: #ffffff;
    --color-bg-subtle: #f8f9fa;
    --color-border: #e5e7eb;
    --color-code-bg: #f3f4f6;
    --color-tag-bg: #eff6ff;
    --color-tag-text: #2563eb;
    --max-width: 720px;
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        "Helvetica Neue", Arial, "Noto Sans SC", "PingFang SC",
        "Microsoft YaHei", sans-serif;
    --font-mono: "SF Mono", "Fira Code", "Fira Mono", "Roboto Mono",
        "Cascadia Code", Consolas, "Liberation Mono", "Courier New", monospace;
}

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

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.7;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

a {
    color: var(--color-link);
    text-decoration: none;
    transition: color 0.15s ease;
}

a:hover {
    color: var(--color-link-hover);
    text-decoration: underline;
}

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

.site-header {
    border-bottom: 1px solid var(--color-border);
    padding: 20px 0;
}

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

.site-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-text);
}

.site-title:hover {
    text-decoration: none;
}

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

.site-nav a {
    color: var(--color-text-secondary);
    font-size: 0.9rem;
}

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

.content {
    flex: 1;
    padding: 40px 0;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 32px;
    color: var(--color-text);
}

.post-list-item {
    margin-bottom: 32px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--color-border);
}

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

.post-list-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.post-list-title a {
    color: var(--color-text);
}

.post-list-title a:hover {
    color: var(--color-link);
    text-decoration: none;
}

.post-list-date {
    display: block;
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin-bottom: 8px;
}

.post-list-summary {
    font-size: 0.95rem;
    color: var(--color-text-secondary);
    margin-bottom: 8px;
}

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

.tag {
    display: inline-block;
    font-size: 0.8rem;
    color: var(--color-tag-text);
    background: var(--color-tag-bg);
    padding: 2px 8px;
    border-radius: 4px;
}

.more-link {
    text-align: center;
    margin-top: 20px;
    font-size: 0.95rem;
}

.post-header {
    margin-bottom: 32px;
}

.post-title {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 8px;
}

.post-meta {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.post-tags {
    display: flex;
    gap: 6px;
}

.post-content {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--color-text);
}

.post-content h2 {
    font-size: 1.35rem;
    font-weight: 600;
    margin: 32px 0 12px;
}

.post-content h3 {
    font-size: 1.15rem;
    font-weight: 600;
    margin: 28px 0 10px;
}

.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(--color-border);
    padding-left: 16px;
    margin: 16px 0;
    color: var(--color-text-secondary);
    font-style: italic;
}

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

.post-content pre {
    background: var(--color-code-bg);
    padding: 16px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 16px 0;
    border: 1px solid var(--color-border);
}

.post-content pre code {
    background: none;
    padding: 0;
    font-size: 0.875rem;
    line-height: 1.6;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 16px 0;
}

.post-content hr {
    border: none;
    border-top: 1px solid var(--color-border);
    margin: 32px 0;
}

.post-content a {
    text-decoration: underline;
    text-underline-offset: 2px;
}

.post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    font-size: 0.9rem;
}

.post-content th,
.post-content td {
    border: 1px solid var(--color-border);
    padding: 8px 12px;
    text-align: left;
}

.post-content th {
    background: var(--color-bg-subtle);
    font-weight: 600;
}

.post-footer {
    margin-top: 48px;
    padding-top: 20px;
    border-top: 1px solid var(--color-border);
    font-size: 0.9rem;
}

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

.highlight {
    margin: 16px 0;
}

.highlight pre {
    margin: 0;
}

@media (max-width: 640px) {
    .site-header .container {
        flex-direction: column;
        gap: 8px;
    }

    .post-title {
        font-size: 1.4rem;
    }

    .post-content {
        font-size: 0.95rem;
    }
}

.site-nav a.rss-link {
    color: #2563eb;
    font-weight: 500;
}
.site-nav a.rss-link:hover {
    text-decoration: underline;
}

/* === 动效 === */
.site-header { animation: fadeInDown 0.4s ease; }
.content { animation: fadeInUp 0.5s ease; }
.site-footer { animation: fadeInUp 0.6s ease; }
@keyframes fadeInDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(15px); } to { opacity: 1; transform: translateY(0); } }
.site-nav a { position: relative; transition: color 0.2s ease; }
.site-nav a::after { content: ''; position: absolute; left: 0; bottom: -4px; width: 0; height: 2px; background: var(--color-link); border-radius: 1px; transition: width 0.25s ease; }
.site-nav a:hover::after { width: 100%; }
.post-list-item { transition: transform 0.2s ease, box-shadow 0.2s ease; border-radius: 8px; padding-left: 12px; padding-right: 12px; margin-left: -12px; margin-right: -12px; }
.post-list-item:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.06); }
.post-list-title a { transition: color 0.2s ease, padding-left 0.2s ease; display: inline-block; }
.post-list-title a:hover { padding-left: 6px; }
.tag { transition: background 0.2s ease, color 0.2s ease; }
.tag:hover { background: var(--color-link); color: #fff; }
.post-content pre { transition: border-color 0.25s ease; }
.post-content pre:hover { border-color: var(--color-link); }
.post-content blockquote { transition: border-color 0.25s ease; }
.post-content blockquote:hover { border-color: var(--color-link); }
.post-content img { transition: transform 0.3s ease; }
.post-content img:hover { transform: scale(1.01); }
.post-footer a { transition: color 0.2s ease, padding-left 0.2s ease; display: inline-block; }
.post-footer a:hover { padding-left: 4px; text-decoration: none; }
.post-content tr { transition: background 0.15s ease; }
.post-content tbody tr:hover { background: var(--color-bg-subtle); }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; } }
