/* =========================================
   1. 基础全局设置
   ========================================= */
*, *::before, *::after {
    box-sizing: border-box; 
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f9f9f9;
    margin: 0;
    padding: 0;
}

/* =========================================
   2. 头部个人名片区域（极简学术风）
   ========================================= */
.profile-header {
    background-color: #ffffff; 
    padding: 4rem 1rem;
    border-bottom: 1px solid #e0e0e0; 
}

.header-container {
    max-width: 900px;
    margin: 0 auto;
    display: flex;          
    align-items: center;    
    gap: 3rem;              
}

.profile-img {
    width: 130px;           
    height: auto;           
    border: 1px solid #e0e0e0; 
    padding: 3px;           
    background-color: #fff;
    object-fit: contain;    
    flex-shrink: 0;         
}

.profile-info {
    text-align: left;       
}

.profile-info h1 {
    margin: 0 0 1rem 0;     
    font-size: 3rem;
    font-family: 'Georgia', 'Times New Roman', Times, serif; 
    font-weight: normal;    
    color: #2c3e50;         
}

.profile-info .details {
    font-size: 1.1rem;
    color: #666;            
    line-height: 1.5;       
    margin: 0;
}

/* 社交/学术链接按钮 */
.social-links {
    display: flex;           
    gap: 1rem;               
    margin-top: 1.2rem;      
    flex-wrap: wrap;         
}

.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;             
    padding: 0.5rem 1.2rem;
    background-color: #2c3e50; 
    color: #ffffff !important; 
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: 4px;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.action-btn:hover {
    background-color: #3498db; 
    transform: translateY(-1px);
}

.btn-icon {
    flex-shrink: 0;
}

/* =========================================
   3. 横向页签样式（全新重构：经典文件夹页签式）
   ========================================= */
.tabs-container {
    display: flex;
    gap: 4px;                /* 页签之间保留极其微小的间距 */
    margin-bottom: 2rem;
    border-bottom: 2px solid #ddd; /* 页签底部的实体灰色基准线 */
    padding-bottom: 0;       /* 必须为 0，让页签底部完全贴紧基准线 */
}

/* 单个页签：上方圆角，下方直角 */
.tab-btn {
    background-color: #f1f3f5; /* 默认未选中时呈灰色，像压在背面 */
    border: 1px solid #ddd;
    border-bottom: none;       /* 底部边框让给容器的基准线 */
    padding: 0.6rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: #7f8c8d;
    cursor: pointer;
    border-radius: 8px 8px 0 0; /* 关键：顶部圆角，底部平直，形成真实页签感 */
    margin-bottom: -2px;        /* 关键魔法：向下偏移 2px，正好压住底部的基准线 */
    transition: background-color 0.2s ease, color 0.2s ease;
    font-family: inherit;
    white-space: nowrap;
    flex-shrink: 0;
}

/* 鼠标悬浮反馈 */
.tab-btn:hover {
    background-color: #e9ecef;
    color: #2c3e50;
}

/* 当前被激活的页签：与下方内容区“物理连接” */
.tab-btn.active {
    background-color: #ffffff; /* 背景变纯白，与下方内容区连成一体 */
    color: #2c3e50;
    border: 1px solid #ddd;
    border-top: 3px solid #3498db;    /* 顶部加上科技蓝强调线，更具设计感 */
    border-bottom: 2px solid #ffffff; /* 关键魔法：用白线盖住容器的灰色底线，打通视觉边界 */
}

/* 页签切换动画 */
.tab-content {
    display: none;             
    animation: tabFadeIn 0.4s ease; 
}

.tab-content.active {
    display: block;          
}

@keyframes tabFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* =========================================
   4. 主体内容布局（个人简介与著作）
   ========================================= */
.container {
    max-width: 900px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.section-block {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.03);
    margin-bottom: 2rem;
}

.section-block h2 {
    border-bottom: 2px solid #3498db; 
    padding-bottom: 0.5rem;
    margin-top: 0;
    color: #2c3e50;                   
}

.section-block p {
    text-align: justify;
    text-indent: 0; 
}

/* =========================================
   5. 著作网格布局（上图下文、尺寸固定、蓝色基调）
   ========================================= */
.pub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;              
    margin-top: 1.5rem;
}

.pub-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;  
    color: inherit;         
    background: transparent;
    transition: transform 0.2s ease; 
}

.pub-card:hover {
    transform: translateY(-3px);
}

.pub-img {
    width: 100%;
    height: 190px;             
    object-fit: contain;       
    background-color: #ffffff; 
    border: 1px solid #eaeaea; 
    padding: 4px;              
    border-radius: 4px;        
    margin-bottom: 0.8rem;     
}

.pub-text {
    padding: 0;
    text-align: left;
}

.pub-text h3 {
    margin: 0 0 0.4rem 0;
    font-size: 1rem;
    color: #2c3e50;            
    line-height: 1.4;
    font-weight: 600;
}

.pub-text .journal {
    margin: 0;
    font-style: italic;        
    color: #7f8c8d;            
    font-size: 0.9rem;
    text-indent: 0;            
}
/* =========================================
  6. Recent News 样式
   ========================================= */
.news-list {
    list-style: none;      /* 去掉默认的无序列表小圆点 */
    padding: 0;
    margin: 1.5rem 0 0 0;
}

.news-list li {
    display: flex;         /* 开启弹性盒，让日期和内容完美并排 */
    align-items: flex-start;
    margin-bottom: 0.9rem; /* 每条动态之间的行距 */
    font-size: 1.05rem;
    line-height: 1.5;
}

/* 日期样式：固定宽度实现完美纵向对齐 */
.news-list .news-date {
    width: 100px;          /* 固定宽度，确保后面的文字全部对齐 */
    font-weight: 600;
    color: #3498db;        /* 使用主页标志性的科技蓝色 */
    flex-shrink: 0;        /* 防止日期被挤压 */
}

/* 动态文字样式：顶格且两端对齐 */
.news-list .news-text {
    color: #333;
    text-align: justify;
}
/* =========================================
   7. 移动端响应式适配与页脚
   ========================================= */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }
    .profile-info {
        text-align: center;
    }
    .social-links {
        justify-content: center; 
    }
    .pub-img {
        height: auto;
        max-height: 250px;
    }
    /* 手机端文件夹页签优化 */
    .tabs-container {
        gap: 2px;
        overflow-x: auto;
        white-space: nowrap;
        /* 隐藏手机端滑动的滚动条，保持底部清爽 */
        scrollbar-width: none; 
    }
    .tabs-container::-webkit-scrollbar {
        display: none; 
    }
    .tab-btn {
        font-size: 0.88rem;
        padding: 0.5rem 1.2rem;
    }
   /* 手机端新闻自动变为上下排版 */
    .news-list li {
        flex-direction: column;
        gap: 0.2rem;
        margin-bottom: 1.2rem;
    }
}

/* 页脚 */
footer {
    text-align: center;
    padding: 3rem 1rem 2rem 1rem;
    color: #95a5a6;
    font-size: 0.9rem;
}
