/* ===== 双栏布局 - 类似 xi-zi.github.io ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif;
    background-color: #fff;
    color: #1f2d3d;
    line-height: 1.65;
    font-size: 16px;
}

/* 双栏容器 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 24px;
    display: flex;
    gap: 60px;
    flex-wrap: wrap;
}

/* ===== 左侧边栏 (头像+个人信息) ===== */
.sidebar {
    flex: 1;
    min-width: 200px;
    max-width: 280px;
    position: sticky;
    top: 40px;
    height: fit-content;
}

.avatar-container {
    text-align: left;
    margin-bottom: 24px;
}

.avatar-large {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 16px;
}

.site-name {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #1f2d3d;
}

.site-bio {
    color: #6a737d;
    font-size: 14px;
    margin-bottom: 20px;
    line-height: 1.6;
}

/* 侧边栏链接 */
.sidebar-links {
    list-style: none;
    margin-bottom: 20px;
}

.sidebar-links li {
    margin-bottom: 10px;
}

.sidebar-links a {
    color: #586069;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

.sidebar-links a:hover {
    color: #0366d6;
}

/* 社交图标区域 */
.social-links {
    display: flex;
    gap: 16px;
    margin-top: 20px;
}

.social-links a {
    color: #586069;
    text-decoration: none;
    font-size: 14px;
}

.social-links a:hover {
    color: #0366d6;
}

/* 分类标签 */
.categories {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #eaecef;
}

.categories h4 {
    font-size: 14px;
    color: #586069;
    margin-bottom: 12px;
    font-weight: 500;
}

.category-tag {
    display: inline-block;
    background: #f6f8fa;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    color: #586069;
    margin-right: 8px;
    margin-bottom: 8px;
    text-decoration: none;
}

.category-tag:hover {
    background: #e1e4e8;
    color: #0366d6;
}

/* ===== 右侧内容区 ===== */
.main-content {
    flex: 3;
    min-width: 300px;
    max-width: 700px;  /* 添加这一行，限制最大宽度 */
}

/* 文章列表 */
.posts-list {
    margin: 0;
}

.post-item {
    margin-bottom: 48px;
    padding-bottom: 32px;
    border-bottom: 1px solid #f0f0f0;
}

.post-item:last-child {
    border-bottom: none;
}

.post-title {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.3;
}

.post-title a {
    color: #1f2d3d;
    text-decoration: none;
}

.post-title a:hover {
    color: #0366d6;
    text-decoration: underline;
}

.post-meta {
    color: #8a9199;
    font-size: 13px;
    margin-bottom: 12px;
    display: flex;
    gap: 16px;
}

.post-excerpt {
    color: #4a5568;
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 12px;
}

.read-more {
    font-size: 14px;
    color: #0366d6;
    text-decoration: none;
}

.read-more:hover {
    text-decoration: underline;
}

/* 文章详情页样式 */
.article-header {
    margin-bottom: 32px;
}

.article-title {
    font-size: 36px;
    font-weight: 600;
    line-height: 1.25;
    margin-bottom: 16px;
}

.article-meta {
    color: #8a9199;
    font-size: 13px;
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.article-content {
    font-size: 16px;
    line-height: 1.8;
    color: #2c3e50;
}

.article-content p {
    margin-bottom: 1.2em;
}

/* 文章内容中的图片 - 强制自适应 */
.article-content img {
    max-width: 100% !important;
    max-height: 500px !important;
    width: auto !important;
    height: auto !important;
    display: block;
    margin: 16px auto;
    border-radius: 8px;
    object-fit: contain;
}

.article-content h2 {
    font-size: 26px;
    margin: 1.5em 0 0.5em;
    padding-bottom: 8px;
    border-bottom: 1px solid #eaecef;
}

.article-content h3 {
    font-size: 22px;
    margin: 1.2em 0 0.5em;
}

.article-content code {
    background: #f6f8fa;
    padding: 0.2em 0.4em;
    border-radius: 3px;
    font-family: monospace;
}

.article-content pre {
    background: #f6f8fa;
    padding: 16px;
    overflow-x: auto;
    border-radius: 6px;
}

/* 底部 */
.footer {
    margin-top: 48px;
    padding-top: 24px;
    text-align: center;
    color: #8a9199;
    font-size: 13px;
    border-top: 1px solid #eaecef;
}

/* 响应式：手机显示为单栏 */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
        gap: 30px;
    }

    .sidebar {
        max-width: 100%;
        position: static;
        text-align: center;
    }

    .avatar-container {
        text-align: center;
    }

    .sidebar-links {
        display: flex;
        justify-content: center;
        gap: 20px;
        flex-wrap: wrap;
    }

    .sidebar-links li {
        margin-bottom: 0;
    }

    .social-links {
        justify-content: center;
    }

    .post-title {
        font-size: 24px;
    }

    .article-title {
        font-size: 28px;
    }
}
