/* ==========================================================================
   自定义主页样式升级 v7 (优化：浅绿到浅蓝绿科技渐变底色)
   ========================================================================== */

/* 1. 主页面渐变底色：从浅薄荷绿 (#ebf5f2) 平滑过渡到现有的极浅灰蓝 (#f0f4f5) */
/* 1. 主页面渐变底色：从上往下，顶部一点点绿，快速过渡回纯白底色 */
body {
    min-height: 100vh;
    margin: 0;
    /* to bottom: 从上往下直下 */
    /* 0% 处是极浅的薄荷绿，在往下 300px 的位置（大概就在你头像和简介图片的上方）就彻底变为纯白 */
    background: linear-gradient(to bottom, #e7f1f5 0%, #ffffff 300px) !important;
    background-repeat: no-repeat; /* 防止背景重复 */
    background-attachment: fixed !important; 
}

/* 1. 导航栏容器：强制固定在顶部，并添加高级半透明模糊效果 */
.navigation-wrapper {
    position: fixed !important; /* 放弃 sticky，换用绝对固定定位 */
    top: 0 !important;
    left: 0 !important;
    width: 100% !important; /* 保证宽度占满全屏 */
    z-index: 9999 !important; /* 保证永远在最上层 */
    
    /* 核心魔法：半透明底色 + 背景模糊（毛玻璃效果） */
    background-color: rgba(255, 255, 255, 0.8) !important; /* 80% 不透明度的纯白 */
    backdrop-filter: blur(12px) !important; /* 让透过去的内容产生模糊效果 */
    -webkit-backdrop-filter: blur(16px) !important; /* 兼容 Safari 浏览器 */
    
    /* 保留之前的边距和底线阴影 */
    padding: 1.2em 0 0em 0 !important; 
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);

    /* 画出截图里那种干净、锐利的浅灰蓝细线 */
    border-bottom: 1px solid #e2e8f0 !important;
}

/* 2. 防止 Fixed 定位导致下方内容“跳”上去被遮挡，给主区域加一点顶部内边距 */
#main {
    padding-top: 80px !important; /* 如果你发现最上面的内容依然被导航栏遮住了一点，可以把 80px 调大 */
}

/* 关键修复：清除浮动。这能完美解决底线穿透文字的问题，同时绝不破坏原版的左右对齐 */
.navigation-wrapper::after {
    content: "";
    display: table;
    clear: both;
}

/* 3. 导航菜单项：恢复默认字体，去除杂乱下划线 */
.top-navigation li a {
    text-decoration: none !important;
    border-bottom: none !important; 
    color: #666666 !important; /* 未选中时为低调的灰色 */
    transition: color 0.2s ease;
}

/* 4. 鼠标悬浮 (Hover) 时的动效：变成主页标志性的蓝绿色 */
.top-navigation li a:hover {
    color: #439399 !important;
}

/* 5. 当前选中页面 (Current Page)：使用主题蓝绿色高亮，一眼看清 */
.top-navigation-current {
    color: #439399 !important; 
    border-bottom: none !important; /* 确保原先老气的顶部线条不再出现 */
}


/* ==========================================================================
   自定义主页样式升级：左侧个人信息栏 (极简安全版，不破坏原布局)
   ========================================================================== */

/* 1. 统一更换现代字体，并去除所有老旧的斜体 */
.article-author-top h4, 
.article-author-top p,
.article-author-top a {
    font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, sans-serif !important;
    font-style: normal !important; /* 彻底干掉以前的 italic 斜体 */
}

/* 2. 姓名 (h4) 样式优化 */
.article-author-top h4 {
    font-size: 1.15rem !important; /* 名字稍微放大加粗，更有重点 */
    font-weight: 600 !important;
    color: #202124 !important;
    margin-top: 1em !important;
    margin-bottom: 0.3em !important;
}

/* 3. 头衔与联系方式 (原版主页里它们都受 p 标签控制，被强制压缩成了 80% 大小) */
.article-author-top p {
    font-size: 0.95rem !important; /* 放大字号，恢复正常大小 */
    color: #5f6368 !important; /* 更有科技感的深灰色 */
    line-height: 1.8 !important; /* 拉大行距，让上下行的图标和文字不那么拥挤 */
}

/* 4. 链接文字专属交互 */
.article-author-top a {
    color: #5f6368 !important; 
    text-decoration: none !important;
    transition: color 0.2s ease;
}

/* 鼠标放上去显示你喜欢的蓝绿色 */
.article-author-top a:hover {
    color: #439399 !important; 
}

/* ==========================================================================
   自定义主页样式升级：响应式对齐与防挤压 (极简终极版)
   ========================================================================== */

/* 1. 针对大屏幕 (4K/外接显示器)：严格上下对齐，消除大白边 */
@media only screen and (min-width: 86.375em) {
    .site-name, 
    .article-author-top {
        width: 10% !important; 
        margin-right: 20px !important; 
        padding-right: 0 !important;
    }

    .top-navigation, 
    #main article {
        width: 65% !important; 
        margin-left: 0 !important; 
    }

    /* [修改] 完美对齐版：仅在大屏幕下生效，整体向内收缩 8% */
    .about-top-row .achievement-card:nth-child(2) {
        padding-left: 10% !important;
        padding-right: 10% !important;
    }
    
    .about-top-row .achievement-card:nth-child(2) p {
        line-height: 1.8 !important; 
    }

}

/* 2. 针对普通/小屏幕 (拉窄窗口时)：强行加宽内容区，防止文字被挤换行 */
@media only screen and (max-width: 86.375em) {
    .top-navigation, 
    #main article {
        width: 75% !important; /* 屏幕不够大时，让右边内容区占多一点，防止挤压 */
    }
}

/* ================== 手机端导航折叠 ================== */
.nav-toggle {
    display: none !important;
}

@media only screen and (max-width: 1100px) {
    .navigation-wrapper {
        padding: 0.4em 0 !important;
        position: fixed !important;
        display: flex !important;
        align-items: center !important;
        min-height: 58px !important;
        overflow: visible !important;
    }

    .site-name {
        width: calc(100% - 96px) !important;
        margin-left: 16px !important;
        margin-right: 0 !important;
        margin-bottom: 0 !important;
        display: flex !important;
        align-items: center !important;
    }

    .site-name a {
        font-size: clamp(1.05rem, 1.55vw, 1.2rem) !important;
        line-height: 1.08 !important;
    }

    .nav-toggle {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        position: absolute !important;
        right: 16px !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        z-index: 10001 !important;
        width: 40px !important;
        height: 40px !important;
        padding: 0 !important;
        border-radius: 9px !important;
        border: 1.5px solid #bfd0db !important;
        background: rgba(255, 255, 255, 0.95) !important;
        color: #2a3550 !important;
        font-family: inherit !important;
        font-weight: 700 !important;
        font-size: 0 !important;
        line-height: 1 !important;
        cursor: pointer !important;
        box-shadow: none !important;
    }

    .nav-toggle-icon {
        display: block !important;
        position: relative !important;
        width: 18px !important;
        height: 2.5px !important;
        border-radius: 2px !important;
        background: #1f2a44 !important;
    }

    .nav-toggle-icon::before,
    .nav-toggle-icon::after {
        content: "" !important;
        position: absolute !important;
        left: 0 !important;
        width: 18px !important;
        height: 2.5px !important;
        border-radius: 2px !important;
        background: #1f2a44 !important;
    }

    .nav-toggle-icon::before {
        top: -6px !important;
    }

    .nav-toggle-icon::after {
        top: 6px !important;
    }

    .sr-only {
        position: absolute !important;
        width: 1px !important;
        height: 1px !important;
        padding: 0 !important;
        margin: -1px !important;
        overflow: hidden !important;
        clip: rect(0, 0, 0, 0) !important;
        white-space: nowrap !important;
        border: 0 !important;
    }

    .top-navigation {
        width: 100% !important;
        margin: 0 !important;
    }

    #site-top-nav {
        display: none !important;
        position: absolute !important;
        top: 100% !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        padding: 8px 16px 10px !important;
        box-sizing: border-box !important;
        background: rgba(255, 255, 255, 0.98) !important;
        border-top: 1px solid #e6edf2 !important;
        box-shadow: 0 10px 24px rgba(27, 41, 64, 0.08) !important;
        z-index: 9998 !important;
        overflow-x: hidden !important;
    }

    #site-top-nav.is-open {
        display: block !important;
    }

    .top-navigation ul {
        display: flex !important;
        flex-direction: column !important;
        gap: 8px !important;
        margin: 0 !important;
        padding: 8px 0 4px !important;
    }

    .top-navigation li {
        display: block !important;
        margin-right: 0 !important;
    }

    .top-navigation li a {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        padding: 8px 10px !important;
        border-radius: 6px !important;
        background-color: rgba(67, 147, 153, 0.08) !important;
    }

    #main {
        padding-top: 76px !important;
    }

    #main article {
        width: min(94%, 860px) !important;
        margin-left: auto !important;
        margin-right: auto !important;
        float: none !important;
        display: block !important;
    }

    .article-author-top {
        display: none !important;
    }
}

@media only screen and (max-width: 860px) {
    .navigation-wrapper {
        min-height: 56px !important;
        padding: 0.36em 0 !important;
    }

    .site-name a {
        font-size: clamp(1rem, 1.45vw, 1.12rem) !important;
        line-height: 1.1 !important;
    }

    .nav-toggle {
        width: 38px !important;
        height: 38px !important;
    }

    .nav-toggle-icon,
    .nav-toggle-icon::before,
    .nav-toggle-icon::after {
        width: 16px !important;
        height: 2.4px !important;
    }

    .nav-toggle-icon::before {
        top: -5px !important;
    }

    .nav-toggle-icon::after {
        top: 5px !important;
    }

    #main {
        padding-top: 72px !important;
    }
}
