/* ============================================
   博客样式表 - 温暖大地色风格
   以后想改颜色/字体/间距，改这个文件就行
   ============================================ */

/* ---------- 1. 全局设置 ---------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;  /* 平滑滚动 */
}

body {
    /* 背景色：温暖的米白色 */
    background-color: #FAF7F2;
    /* 主文字颜色：深棕色 */
    color: #4A3728;
    /* 字体：优先系统字体，简洁好读 */
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI",
                 "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
                 "Helvetica Neue", Helvetica, Arial, sans-serif;
    /* 行高：舒适的阅读间距 */
    line-height: 1.8;
    /* 基础字号 */
    font-size: 16px;
}

/* ---------- 2. 链接样式 ---------- */
a {
    color: #8B6F5F;           /* 暖棕色链接 */
    text-decoration: none;     /* 去掉下划线 */
    transition: color 0.2s;   /* 鼠标悬停时平滑变色 */
}
a:hover {
    color: #5C4033;           /* 悬停时变深棕 */
    text-decoration: underline;
}

/* ---------- 3. 布局容器 ---------- */
.container {
    /* 最大宽度，居中显示 */
    max-width: 720px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ---------- 4. 顶部导航 ---------- */
header {
    text-align: center;
    padding: 60px 0 40px;
    border-bottom: 1px solid #E5DCD1;  /* 淡棕色分割线 */
}

header h1 {
    font-size: 32px;
    color: #4A3728;
    margin-bottom: 8px;
    letter-spacing: 2px;      /* 字间距稍宽，显文艺 */
}

header h1 a {
    color: #4A3728;
}

header h1 a:hover {
    text-decoration: none;
}

header p {
    color: #9B8F84;           /* 副标题：柔和灰棕 */
    font-size: 14px;
    letter-spacing: 1px;
}

/* ---------- 5. 主体内容区 ---------- */
main {
    padding: 40px 0;
    min-height: 60vh;
}

/* ---------- 6. 文章列表 ---------- */
.article-list {
    list-style: none;
}

.article-list li {
    padding: 24px 0;
    border-bottom: 1px solid #EDE5DA;
}

.article-list li:last-child {
    border-bottom: none;
}

.article-list .date {
    display: block;
    color: #B5A89A;           /* 日期：淡棕色 */
    font-size: 13px;
    margin-bottom: 6px;
}

.article-list .title {
    font-size: 20px;
    color: #4A3728;
    font-weight: 600;
}

.article-list .title:hover {
    color: #8B6F5F;
}

.article-list .excerpt {
    color: #7A6A5F;
    font-size: 14px;
    margin-top: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;     /* 只显示 2 行摘要 */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ---------- 7. 单篇文章页 ---------- */
.article-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 24px;
    border-bottom: 1px solid #E5DCD1;
}

.article-header h1 {
    font-size: 26px;
    color: #4A3728;
    margin-bottom: 10px;
    line-height: 1.4;
}

.article-header .meta {
    color: #B5A89A;
    font-size: 13px;
}

.article-content {
    font-size: 16px;
    line-height: 1.9;
    color: #4A3728;
}

.article-content h2 {
    font-size: 22px;
    color: #5C4033;
    margin: 36px 0 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid #E5DCD1;
}

.article-content h3 {
    font-size: 18px;
    color: #5C4033;
    margin: 28px 0 12px;
}

.article-content p {
    margin-bottom: 18px;
}

.article-content img {
    max-width: 100%;           /* 图片自适应宽度 */
    height: auto;
    border-radius: 6px;        /* 圆角 */
    margin: 16px 0;
    box-shadow: 0 2px 8px rgba(92, 64, 51, 0.1);  /* 轻微阴影 */
}

.article-content blockquote {
    border-left: 3px solid #B5A89A;
    padding-left: 16px;
    margin: 20px 0;
    color: #7A6A5F;
    font-style: italic;
}

.article-content code {
    background: #F0E8DC;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 14px;
}

.article-content ul, .article-content ol {
    margin: 12px 0 12px 24px;
}

.article-content li {
    margin-bottom: 6px;
}

/* 返回首页按钮 */
.back-link {
    display: inline-block;
    margin-top: 40px;
    padding: 10px 20px;
    background: #F5EFE6;
    border-radius: 6px;
    color: #5C4033;
    font-size: 14px;
    transition: background 0.2s;
}
.back-link:hover {
    background: #EDE5DA;
    text-decoration: none;
}

/* ---------- 8. 页脚 ---------- */
footer {
    text-align: center;
    padding: 30px 0;
    border-top: 1px solid #E5DCD1;
    color: #B5A89A;
    font-size: 13px;
}

footer a {
    color: #9B8F84;
}

/* ---------- 9. 响应式（手机适配） ---------- */
@media (max-width: 600px) {
    header {
        padding: 40px 0 30px;
    }
    header h1 {
        font-size: 26px;
    }
    .article-header h1 {
        font-size: 22px;
    }
    .article-list .title {
        font-size: 18px;
    }
    body {
        font-size: 15px;
    }
}
