/* ==================== 搜索页标签區域样式 ====================*/
.search-tags-section {
    margin-top: 40px;
}

.search-tags-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--primary);
    border-bottom: none;
}

.search-tags-list {
    margin-top: 0;
}

/* ==================== 字体配置：霞鹜文楷 ==================== */
/* 声明自定义字体 */
@font-face {
    font-family: 'LXGWBright';
    src: url('/fonts/LXGWBright-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

/* 全局应用字体 */
body {
    font-family: 'LXGWBright', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
}

/* 代码块使用等宽字体，确保特殊字符正确显示 */
.post-content pre,
.post-content code {
    font-family: 'JetBrains Mono', 'Fira Code', 'Source Code Pro', 'Consolas', 'Monaco', 'Courier New', monospace !important;
}

/* 文章正文中的链接颜色 */
.post-content a {
    color: #1a73e8;
}

.post-content a:hover {
    color: #1558b0;
}

/* ==================== 首页个人资料区域样式 ==================== */
.home-profile {
    margin: 40px 0 50px;
    padding: 0 var(--gap);
}

.home-profile-inner {
    display: flex;
    align-items: center;
    gap: 24px;
    max-width: 800px;
}

.home-profile-avatar img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
}

.home-profile-content h1 {
    font-size: 2.2rem;
    font-weight: 700;
    margin: 0 0 8px 0;
    color: var(--primary);
}

.home-profile-subtitle {
    font-size: 1.1rem;
    color: var(--secondary);
    margin: 0 0 16px 0;
    line-height: 1.5;
}

.home-profile-social {
    display: flex;
    gap: 16px;
}

.home-profile-social a {
    color: var(--secondary);
    transition: color 0.2s ease;
}

.home-profile-social a:hover {
    color: var(--primary);
}

.home-profile-social svg {
    width: 24px;
    height: 24px;
}

/* ==================== 首页文章列表样式 ==================== */
/* 文章卡片纵向布局 - 标题在上、描述在中、日期在下 */
.post-entry {
    position: relative;
    margin-bottom: 20px;
    padding: 24px;
    background: var(--entry);
    border-radius: 12px;
    border: 1px solid var(--border);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.post-entry:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.post-entry .entry-cover {
    flex-shrink: 0;
    width: 100%;
    margin: 0 0 12px 0;
    order: 0;
}

.post-entry .entry-cover img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.post-entry .entry-content-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.post-entry .entry-header h2 {
    font-size: 1.35rem;
    margin: 0 0 10px 0;
    line-height: 1.4;
    font-weight: 600;
}

.post-entry .entry-header h2 a {
    color: var(--primary);
    text-decoration: none;
}

.post-entry .entry-content {
    margin: 0 0 12px 0;
    color: var(--secondary);
    font-size: 0.9rem;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-entry .entry-footer {
    font-size: 0.8rem;
    color: var(--secondary);
    opacity: 0.8;
}

/* 查看更多按钮 */
.home-view-more {
    display: flex;
    justify-content: flex-end;
    margin: 30px 0 50px;
    padding: 0 var(--gap);
}

.home-view-more .button {
    display: inline-flex;
    align-items: center;
    padding: 10px 20px;
    background: var(--primary);
    color: var(--theme);
    border-radius: var(--radius);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: opacity 0.2s ease;
}

.home-view-more .button:hover {
    opacity: 0.85;
}

/* ==================== 响应式适配 ==================== */
@media screen and (max-width: 768px) {
    .home-profile-inner {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }

    .home-profile-avatar img {
        width: 100px;
        height: 100px;
    }

    .home-profile-content h1 {
        font-size: 1.8rem;
    }

    .home-profile-subtitle {
        font-size: 1rem;
    }

    .home-profile-social {
        justify-content: center;
    }

    /* 移动端文章卡片保持垂直布局 */
    .post-entry {
        flex-direction: column;
        gap: 12px;
        padding: 20px;
    }

    .post-entry .entry-cover {
        width: 100%;
        margin-bottom: 8px;
    }

    .post-entry .entry-cover img {
        height: 160px;
    }

    .post-entry .entry-header h2 {
        font-size: 1.2rem;
    }

    .home-view-more {
        justify-content: center;
    }
}

/* ==================== 代码块浅色主题 (GitHub Light) ==================== */
/* 覆盖代码块背景变量 - 浅色主题 */
:root {
    --code-block-bg: #F7F8FA !important;
    --code-bg: #F7F8FA !important;
}

/* 代码块容器样式 - 覆盖 Hugo Chroma 内联样式 */
.post-content pre,
.post-content .highlight pre,
.post-content .chroma,
.highlight pre.chroma,
pre.chroma,
.chroma,
.highlight pre,
.highlight pre code {
    background-color: #F7F8FA !important;
    border: none !important;
    border-radius: 0 !important;
}

/* 覆盖 chroma-mod.css 的 unset */
.chroma,
.highlight pre {
    background-color: #F7F8FA !important;
}

/* 覆盖 Hugo Chroma 内联样式 - 文字颜色和背景色 */
.highlight pre,
.highlight pre code,
.highlight pre span,
.post-content .highlight pre,
.post-content .highlight pre code,
.post-content .highlight pre span {
    color: #333333 !important;
    background-color: #F7F8FA !important;
}

/* Chroma 语法高亮 - 自定义浅色配色 */
.chroma,
.post-content .chroma,
.highlight .chroma {
    color: #333333 !important;
    background-color: #F7F8FA !important;
}

/* 关键字 (if/for/let/const) - 蓝色 */
.chroma .k,
.chroma .kc,
.chroma .kd,
.chroma .kn,
.chroma .kp,
.chroma .kr,
.chroma .kt {
    color: #0066CC !important;
}

/* 字符串 / 文本 - 绿色 */
.chroma .s,
.chroma .sa,
.chroma .sb,
.chroma .sc,
.chroma .dl,
.chroma .sd,
.chroma .s2,
.chroma .se,
.chroma .sh,
.chroma .si,
.chroma .sx,
.chroma .sr,
.chroma .s1,
.chroma .ss {
    color: #008800 !important;
}

/* 数字 - 橙色 */
.chroma .m,
.chroma .mb,
.chroma .mf,
.chroma .mh,
.chroma .mi,
.chroma .il,
.chroma .mo {
    color: #FF6600 !important;
}

/* 注释 - 灰色 */
.chroma .c,
.chroma .ch,
.chroma .cm,
.chroma .c1,
.chroma .cs,
.chroma .cp,
.chroma .cpf {
    color: #888888 !important;
}

/* 函数名 - 紫色 */
.chroma .nf,
.chroma .fm {
    color: #6644BB !important;
}

/* 类名 */
.chroma .nc {
    color: #6644BB !important;
}

/* 普通代码文字 - 深灰 */
.chroma .n,
.chroma .na,
.chroma .nb,
.chroma .bp,
.chroma .nx,
.chroma .nt {
    color: #333333 !important;
}

/* 操作符 */
.chroma .o,
.chroma .ow {
    color: #333333 !important;
}

/* 属性 */
.chroma .py,
.chroma .nd {
    color: #333333 !important;
}

/* 高亮行 */
.chroma .hl {
    background-color: #e8e8e8 !important;
}

/* 行号 */
.chroma .lnt,
.chroma .ln {
    color: #888888 !important;
}

/* 错误 */
.chroma .err {
    color: #FF6600 !important;
    background-color: transparent !important;
}

/* 代码块内文字颜色 - 普通代码文字 */
.chroma .cl {
    color: #333333 !important;
}

/* 复制按钮适配浅色背景 */
.copy-code {
    color: #57606a !important;
    background-color: #F7F8FA !important;
    border: 1px solid #d0d7de !important;
}

.copy-code:hover {
    color: #24292f !important;
    background-color: #eaeef2 !important;
}