/* styles.css */

body {
    margin: 0;
    font-family: 'Segoe UI', 'Roboto', 'Helvetica Neue', sans-serif;
    background-color: #f5f5f5;
    color: #333;
}

a {
    color: #0066cc;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.site-title {
    display: flex;
    flex-direction: column;
    padding-top: 0.9%;
    padding-bottom: 0.6%;
}

.site-title-main {
    font-size: 1.6rem;
    font-weight: bold;
    line-height: 1.2;
}

.site-title-sub {
    font-size: 0.8rem;
    line-height: 1.2;
    opacity: 0.8;
}

/* 新增字母颜色样式 */
.letter-e {
    color: #164db4; /* 橙色 */
}

.letter-m {
    color: #1b5181; /* 蓝色 */
}

.letter-c {
    color: #547185; /* 绿色 */
}

.navbar {
    position: sticky;
    top: 0;
    background-color: white;
    border-bottom: 0px solid #ddd;
    padding: 0.5rem 0;
    z-index: 1000;
}

.navbar .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-links a {
    margin-left: 1.5rem;
    font-weight: 500;
    color: #888;
    transition: color 0.3s ease;
}

.nav-links a.active {
    color: #000;
    font-weight: bold;
}

.main-layout {
    display: flex;
    gap: 2rem;
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
}

.sidebar {
    width: 280px;
    flex-shrink: 0;
    position: sticky;
    top: 100px;
    align-self: flex-start;
}

.profile-card {
    background-color: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    text-align: center;
}

.avatar-wrapper {
    display: flex;
    justify-content: center; /* 水平居中 */
    margin-top: -16px;
    margin-bottom: 30px; /* 可选：添加底部间距 */
}

.avatar {
    width: 120px; /* 放大图片宽度，原尺寸可能是120px左右 */
    height: 120px; /* 保持宽高一致 */
    object-fit: cover; /* 保持图片比例 */
    border-radius: 50%; /* 圆形头像 */
    border: 3px solid #fff; /* 可选：添加白色边框 */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* 可选：添加阴影效果 */
    transform: scale(1.3) translate(-10px, 10px);
    transform: translateY(20px); /* 额外向下移动20px */
}

/* .avatar {
    width: 120px;
    height: 120px;
    border-radius: 50% 50%;
    margin-bottom: -1rem;
    /* 更紧凑视觉更亲和 

    object-fit: cover;
    object-position: 0% 0%;

    
} */

.featured-posts {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
}

.featured-posts li {
    margin-bottom: 0.5rem;
}

.social-icons a {
    margin: 0 0.4rem;
    font-size: 1.2rem;
}

.content-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.post-card {
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s, box-shadow 0.2s;
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.post-card img {
    width: 100%;
    height: auto;
    display: block;
}

.post-content {
    padding: 1.2rem 1.5rem;
}

.post-content h2 {
    margin-top: 0;
    color: #004aad;
}

.name-h4 {
    margin-top: -15px;
    /* 你可以调成 -2px、-6px、-8px 根据视觉效果来 */
}

.profile-info {
    text-align: left;
    max-width: 280px;
    margin: 0 auto 1.5rem auto;
    font-size: 0.95rem;
    line-height: 1.6;
}

.research-list {
    padding-left: 1.2rem;
    margin-top: 0.2rem;
    list-style-type: disc;
}

.profile-line {
    margin: 0.25rem 0;
    /* 默认 p 标签上下 margin 比较大，改小一点 */
    line-height: 1.4;
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
}

.social-icons a img.icon {
    width: 24px;
    height: 24px;
    opacity: 0.85;
    transition: transform 0.3s, opacity 0.3s;
}

.social-icons a:hover img.icon {
    transform: scale(1.2);
    opacity: 1;
}


.meta {
    color: #999;
    font-size: 0.9rem;
}

.excerpt {
    margin: 0.8rem 0;
}

.read-more {
    font-weight: bold;
}

.member-section,
.projects-section,
.publication-section {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

@media screen and (max-width: 768px) {
    .main-layout {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        position: relative;
        top: auto;
    }

    .content-area {
        width: 100%;
    }

    .navbar .container {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-links {
        display: flex;
        gap: 1rem;
    }
}

/* 渐隐渐显切换动画 */
#content-area {
    opacity: 1;
    transition: opacity 0.4s ease;
}

#content-area.fade-out {
    opacity: 0;
}



/* 添加home的css样式 */
.news-container {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    padding-left: 1rem;
  }
  
  .news-item {
    display: flex;
    align-items: flex-start;
    position: relative;
    padding-right: 7rem; /* 预留右侧空间给日期 */
  }
  
  .news-icon {
    margin-right: 0.6rem;
    flex-shrink: 0;
  }
  
  .news-text {
    flex-grow: 1;
  }
  
  .news-date {
    position: absolute;
    right: 0;
    top: 0;
    color: #888;
    font-size: 0.85rem;
    white-space: nowrap;
  }
  