/* 全局设置：引入更适合中文的字体 */
body {
    margin: 0;
    display: flex;
    font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
    color: #333;
    background-color: #f9f9f9;
}

a {
    text-decoration: none;
    transition: 0.3s;
}

/* === 左侧侧边栏设计 === */
.sidebar {
    width: 280px;
    /*稍微宽一点*/
    height: 100vh;
    background: #1a1a1a;
    /* 深灰偏黑 */
    color: #ccc;
    padding: 50px 30px;
    box-sizing: border-box;
    position: fixed;
    display: flex;
    flex-direction: column;
    text-align: center;
    /* 内容居中 */
    border-right: 1px solid #333;
}

/* 头像区域 */
.avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    /* 圆形 */
    border: 4px solid #333;
    /* 头像边框 */
    object-fit: cover;
    margin-bottom: 20px;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}


/* 名字和副标题 */
.name {
    color: #fff;
    font-size: 24px;
    margin: 10px 0 5px 0;
    letter-spacing: 1px;
}

.subtitle {
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
    font-weight: 300;
}

/* 社交链接 */
.social-links {
    font-size: 13px;
    margin-bottom: 40px;
}

.social-links a {
    color: #888;
    border-bottom: 1px dotted #666;
}

.social-links a:hover {
    color: #fff;
    border-bottom-color: #fff;
}

.social-links span {
    margin: 0 5px;
    color: #444;
}

/* 导航菜单 */
.main-nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    /* 1. 确保子元素靠左对齐 */
    padding-left: 60px;
    /* 2. 整体向右缩进一点，和头像对齐 */
    margin-top: 40px;
}

.main-nav a {
    color: #999;
    font-size: 16px;
    margin: 8px 0;
    padding: 10px 0;
    /* 3. 去掉左右 padding，只留上下，保证左侧绝对对齐 */
    width: 100%;
    text-align: left;
    /* 4. 强制文字左对齐 */
    display: block;
    border-bottom: 1px solid transparent;
    /* 预留一个下划线位置，增加精致感 */
}

.main-nav a:hover {
    color: #fff;
    background: transparent;
    /* 5. 建议去掉背景色，改用文字变亮，这样更高级 */
    padding-left: 10px;
}

/* 导航里的英文小字 */
.main-nav a span {
    font-size: 11px;
    color: #444;
    margin-left: 8px;
    text-transform: uppercase;
    /* 英文变成全大写，更有设计感 */
    letter-spacing: 1px;
}

/* 底部版权 */
.footer {
    font-size: 12px;
    color: #444;
}

/* === 右侧内容区微调 === */
.content {
    margin-left: 280px;
    padding: 60px 100px;
    flex: 1;
    background: #fff;
    min-height: 100vh;
}

/* === 首页卡片流设计 === */

.home-intro h2 {
    font-weight: 300;
    color: #999;
    margin-bottom: 40px;
    font-size: 14px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* 网格容器：自动适应宽度 */
.post-grid {
    display: grid;
    /* 魔法代码：让卡片自动填满空间，每张卡片至少 300px 宽 */
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    /* 卡片之间的间距 */
}

/* 卡片本体 */
.post-card {
    background: #fff;
    border-radius: 12px;
    /* 圆角 */
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    /* 淡淡的阴影 */
    transition: all 0.3s ease;
    /* 动画过渡 */
    display: block;
    /* 让a标签变成块级元素 */
    border: 1px solid transparent;
}

/* 鼠标悬停时的特效：上浮 + 阴影加深 */
.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-color: #eee;
}

/* 卡片内部排版 */
.card-date {
    font-size: 12px;
    color: #aaa;
    font-family: monospace;
    display: block;
    margin-bottom: 10px;
}

.card-title {
    margin: 0 0 15px 0;
    font-size: 20px;
    color: #222;
    line-height: 1.4;
}

.card-excerpt {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin-top: 10px;
    /* 和标题拉开点距离 */
}

/* Read More 按钮样式 */
.read-more-btn {
    display: inline-block;
    margin-top: 15px;
    /* 和上面的摘要文字拉开距离 */
    font-size: 12px;
    font-weight: 600;
    /* 加粗一点 */
    color: #1a1a1a;
    /* 深黑色，突出显示 */
    border-bottom: 2px solid #ddd;
    /* 加个下划线装饰 */
    padding-bottom: 2px;
    transition: all 0.3s;
}

/* 鼠标移到整张卡片上时，让按钮变色 */
.post-card:hover .read-more-btn {
    border-bottom-color: #000;
    /* 下划线变黑 */
    color: #000;
}


/* 针对手机屏幕的微调 */
.menu-toggle {
    display: none;
    /* 默认不显示 */
}

/* === 手机端适配 (Mobile) === */
@media (max-width: 768px) {


    /* 显示按钮 */
    .menu-toggle {
        display: block;
        /* 手机上显示 */
        position: fixed;
        /* 固定在屏幕上，不随滚动条跑 */
        top: 20px;
        right: 20px;
        background: rgba(255, 255, 255, 0.95);
        border: 1px solid #e0e0e0;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        backdrop-filter: blur(5px);
        color: #333;
        /* 白色图标 */
        width: 45px;
        height: 45px;
        line-height: 40px;
        text-align: center;
        border-radius: 12px;
        /* 圆角 */
        cursor: pointer;
        z-index: 1001;
        /* 比侧边栏还要高 */
        font-size: 24px;
        transition: all 0.2s ease;
    }


    /* 侧边栏逻辑*/
    .sidebar {
        display: flex;
        flex-direction: column;
        /* 必须垂直排列 */
        justify-content: flex-start;
        align-items: flex-start;
        /* 保持左对齐 */

        position: fixed;
        top: 0;
        left: 0;
        width: 50%;
        /* 你之前改成的 50% */
        height: 100vh;
        /* 强制占据 100% 的屏幕高度 */
        background: #1a1a1a;
        z-index: 1000;
        transform: translateX(-100%) !important;
        transition: transform 0.3s ease;
        padding-top: 60px;
        /* 给顶部的按钮留点空间 */
    }

    .sidebar.active {
        transform: translateX(0) !important;
        /* 显示 */
    }

    .main-nav {
        padding-left: 40px;
        /* 手机屏幕窄，缩进可以稍微减小一点点，比如 40px */
        width: 100%;
        margin-top: 20px;
    }

    .footer {
        padding: 0 20px 40px 20px;
        /* 去掉大缩进，改为左右平均分配 */
        margin-top: auto;
        width: 100%;
        text-align: center;
        /* 1. 核心：强制文字居中 */
        display: flex;
        flex-direction: column;
        align-items: center;
        /* 2. 核心：强制子元素（如分割线）居中 */
    }

    .footer .site-motto {
        font-size: 11px;
        padding-right: 0;
    }

    .sidebar.active {
        transform: translateX(0);
        /* 回到原位 */
    }

    .content {
        margin-left: 0;
        padding: 80px 20px 20px 20px;
        /* 顶部留出空间给按钮 */
    }

    .post-detail {
        padding: 20px 15px;
    }

    .post-title {
        font-size: 24px;
        /* 手机端标题小一点 */
    }

    .post-content {
        font-size: 15px;
        /* 手机端字号微调 */
    }

    .back-to-home {
        margin-bottom: 20px;
        padding: 5px 0;
        /* 增加点击热区 */
    }

    pagination {
        margin: 50px 0 30px;
        /* 缩减间距，更紧凑 */
        gap: 8px;
        /* 手机上间距稍微收窄，防止数字溢出屏幕 */
    }

    .pagination a,
    .pagination span {
        padding: 8px 12px;
        /* 增加点击热区，方便手指操作 */
        font-size: 13px;
    }
}


/* === 文章内页布局 === */
.post-detail {
    max-width: 800px;
    /* 限制宽度，防止长行阅读疲劳 */
    margin: 0 auto;
    padding: 40px 20px;
}

/* 标题区域 */
.post-header {
    margin-bottom: 50px;
    text-align: left;
}

.post-title {
    font-size: 32px;
    color: #1a1a1a;
    margin-bottom: 15px;
    line-height: 1.3;
}

.post-meta {
    font-size: 13px;
    color: #999;
    letter-spacing: 1px;
}

/* 文章正文 - 核心优化 */
.post-content {
    line-height: 1.8;
    /* 增加行高，阅读更轻松 */
    color: #333;
    font-size: 16px;
    word-wrap: break-word;
}

/* 针对正文中的元素进行微调 */
.post-content p {
    margin-bottom: 25px;
    /* 段落间距 */
}

.post-content h2,
.post-content h3 {
    margin: 40px 0 20px 0;
    color: #000;
}

.post-content img {
    max-width: 100%;
    /* 防止图片溢出 */
    height: auto;
    display: block;
    margin: 30px auto;
    border-radius: 4px;
    /* 图片微圆角 */
}

/* 底部标签 */
.post-footer {
    margin-top: 60px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.post-tags a {
    color: #888;
    font-size: 13px;
    margin-right: 15px;
    text-decoration: none;
}

.post-tags a:hover {
    color: #000;
}

.post-end-nav {
    margin-top: 50px;
    margin-bottom: 30px;
    padding-top: 30px;
    border-top: 1px dashed #e0e0e0;
    text-align: center;
    font-family: sans-serif;
}


/* 返回首页按钮 */
.back-to-home-bottom {
    text-decoration: none;
    color: #333;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 2px;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    transition: all 0.3s ease;
}

.back-to-home-bottom .arrow {
    font-size: 15px;
    margin-bottom: 10px;
    transition: transform 0.3s ease;
}

.back-to-home-bottom .motto-small {
    font-size: 12px;
    color: #000000;
    font-weight: 400;
    margin-top: 5px;
    letter-spacing: 1px;
}

/* 悬停效果：向上微跳 */
.back-to-home-bottom:hover {
    color: #000;
    transform: translateY(-5px);
}

.back-to-home-bottom:hover .arrow {
    transform: scale(1.2);
    /* 箭头微变大 */
}


/* 3. 底部那一排 (Flex布局) */
.nav-bottom-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    /* 两个按钮之间的间距 */
    margin-bottom: 40px;
}

/* 两个大链接块 */
.nav-item {
    text-decoration: none;
    color: #333;
    text-align: center;
    transition: transform 0.2s, opacity 0.2s;
}

/* 鼠标放上去，稍微浮起来一点点，增加互动感 */
.nav-item:hover {
    transform: translateY(-3px);
    opacity: 0.8;
}

/* 标题字 (关于我/时间轴) */
.nav-title {
    font-size: 13px;
    color: #000000;
    font-weight: 400;
    margin-top: 5px;
    letter-spacing: 1px;
}

/* 中间分割线 */
.nav-divider {
    color: #eee;
    font-size: 20px;
}






/* 关于我页面 */
/* 独立页面基础布局 */
.page-detail {
    max-width: 800px;
    margin: 0 auto;
    padding: 60px 20px;
    animation: fadeIn 0.8s ease;
    /* 页面加载时有个微弱的淡入效果 */
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.page-header {
    margin-bottom: 60px;
    text-align: center;
    /* 标题居中，更有正式感 */
}

.page-title {
    font-size: 36px;
    font-weight: 700;
    letter-spacing: 2px;
    color: #1a1a1a;
    position: relative;
    display: inline-block;
}

/* 标题下方的精致小横线 */
.page-title::after {
    content: "";
    display: block;
    width: 30px;
    height: 2px;
    background: #000;
    margin: 15px auto 0;
}

/* 关于页正文排版 */
.page-content {
    line-height: 2;
    color: #444;
    font-size: 16px;
}

/* 针对“关于我”页面可能出现的列表样式（比如技能、经历） */
.page-content ul {
    list-style: none;
    padding-left: 0;
}

.page-content ul li {
    margin-bottom: 15px;
    padding-left: 20px;
    position: relative;
}

.page-content ul li::before {
    content: "—";
    position: absolute;
    left: 0;
    color: #ccc;
}

/* 归档页面容器 */
.archive-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 60px 20px;
}

.archive-header {
    margin-bottom: 50px;
    border-bottom: 1px solid #eee;
    padding-bottom: 20px;
}

.archive-page-title {
    font-size: 28px;
    color: #1a1a1a;
    margin-bottom: 10px;
}

.archive-page-title span {
    font-size: 12px;
    color: #ccc;
    text-transform: uppercase;
    margin-left: 10px;
    letter-spacing: 2px;
}

.archive-subtitle {
    font-size: 13px;
    color: #999;
}

/* 年份标签 */
.archive-year {
    font-size: 22px;
    color: #333;
    margin: 40px 0 20px;
    font-weight: 700;
}

/* 列表条目 */
.archive-article {
    padding: 15px 0;
    position: relative;
    border-bottom: 1px dashed #eee;
    /* 用虚线更有说明书索引的感觉 */
}

.archive-article-inner {
    display: flex;
    align-items: center;
}

.archive-article-date {
    font-size: 14px;
    color: #bbb;
    width: 60px;
    flex-shrink: 0;
    font-family: monospace;
    /* 日期用等宽字体更有序 */
}

.archive-article-title a {
    text-decoration: none;
    color: #444;
    font-size: 16px;
    transition: all 0.3s ease;
}

.archive-article-title a:hover {
    color: #000;
    padding-left: 5px;
    /* 悬停时微微右移 */
}

/* 分页器容器居中 */
.pagination {
    margin: 80px 0 40px;
    display: flex;
    justify-content: center;
    /* 水平居中 */
    align-items: center;
    gap: 15px;
    /* 数字之间的间距 */
}

/* 分页链接与数字的基础样式 */
.pagination a,
.pagination span {
    text-decoration: none;
    color: #999;
    font-size: 14px;
    padding: 5px 10px;
    transition: all 0.3s ease;
}

/* 当前选中的页码 */
.pagination .current {
    color: #000;
    font-weight: 700;
    border-bottom: 2px solid #000;
    /* 给当前页加一个小底线 */
}

/* 悬停效果 */
.pagination a:hover {
    color: #000;
}

/* 针对箭头按钮（上一页/下一页）的特殊样式 */
.pagination .prev,
.pagination .next {
    font-size: 18px;
    font-weight: bold;
    color: #333;
}