/* 全局样式 */
body {
    font-family: 'Times New Roman', serif;
    margin: 0;
    padding: 0;
    color: #333;
    line-height: 1.5;
}

html {
    scroll-behavior: smooth;
}

/* 头部导航栏 */
header {
    background-color: #1a2a44;
    padding: 1rem;
    position: sticky;
    top: 0;
    text-align: center;
    z-index: 1000; /* 提升堆叠顺序，确保导航栏在其他部分之上 */
}

nav a {
    color: white;
    text-decoration: none;
    margin: 0 1.5rem;
    font-size: 1.1rem;
    font-weight: bold;
}

nav a:hover {
    color: #a3bffa;
}

/* 内容区域 */
section {
    padding: 10px 30px;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    scroll-margin-top: 90px;
}

/* 主页布局 */
#home .home-container {
    display: flex;
    align-items: center;
    gap: 2rem;
    width: 75%;
    justify-content: center;
}

.profile-img {
    max-width: 280px;
    border-radius: 70%;
}

.bio {
    flex: 1;
}

h1, h2, h3 {
    color: #1a2a44;
    font-family: 'Times New Roman', serif;
}

h1 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

h2 {
    font-size: 2.2rem;
    border-bottom: 2px solid #1a2a44;
    padding-bottom: 0.2rem;
    text-align: center;
    display: inline-block;
    /* width: 10%; */
}

h3 {
    font-size: 1.3rem;
    margin: 0.5rem 0;
}

/* 研究部分 - 横向滑动 */
#research {
    width: 100%;
    padding: 2rem 0;
    position: relative;
}

#research .research-container {
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 2rem 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin; /* 修复无效值 */
    scroll-behavior: smooth;
    display: flex;
    justify-content: center;
    align-items: stretch;
}

.research-container::-webkit-scrollbar {
    height: 8px;
}

.research-container::-webkit-scrollbar-track {
    background: #e0e0e0;
    border-radius: 4px;
}

.research-container::-webkit-scrollbar-thumb {
    background: #1a2a44;
    border-radius: 4px;
}

.research-container::-webkit-scrollbar-thumb:hover {
    background: #2c3e5a;
}

#research .research-scroll {
    display: flex;
    flex-wrap: nowrap;
    gap: 2rem;
    padding: 0 2rem;
    min-width: max-content;
    margin: 0 auto;
    justify-content: center;
}

#research .research-item {
    scroll-snap-align: start;
    flex: 0 0 auto;
    width: 400px;
    max-width: 500px;
    min-width: 200px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
    text-align: center; /* Center align text */
}

#research .research-item:hover {
    transform: scale(1.02);
}

.media {
    width: 100%;
    height: auto;
    aspect-ratio: 16/9;
    object-fit: contain;
    border-radius: 10px 10px 0 0;
    cursor: pointer; /* 提示可点击 */
    background-color: #f0f0f0; /* 视频加载前的背景色 */
}

.media[poster] {
    object-fit: cover; /* poster 图片填充方式 */
}

/* 视频模态框样式 */
.video-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
}

.video-modal.show {
    display: flex;
    animation: fadeIn 0.3s ease-in-out; /* 添加 ease-in-out 让淡入更自然 */
}

.modal-content {
    position: relative;
    max-width: 75%; /* 限制最大宽度为屏幕的 70% */
    max-height: 75vh; /* 限制最大高度为视口的 70% */
    animation: zoom 0.4s ease-out; /* 增加动画时长并使用 ease-out */
}

#modalVideo {
    width: 100%; /* 宽度自适应容器 */
    max-width: 800px; /* 设置一个固定的最大宽度，避免过大 */
    max-height: 60vh; /* 限制最大高度 */
    border-radius: 8px;
    background: #000;
}

.close {
    position: absolute;
    top: 10px;
    right: 10px;
    color: white;
    font-size: 30px;
    cursor: pointer;
    transition: color 0.3s;
    z-index: 1001;
}

.close:hover {
    color: #a3bffa;
}
/* 响应式调整 */
@media (max-width: 768px) {
    /* 导航栏 */
    header {
        padding: 0.8rem;
    }
    
    nav a {
        margin: 0 0.4rem;
        font-size: 0.85rem;
    }
    
    /* 主页部分 */
    #home .home-container {
        flex-direction: column;
        width: 95%;
        gap: 1rem;
    }
    
    .profile-img {
        max-width: 180px;
    }
    
    h1 {
        font-size: 1.8rem;
        text-align: center;
    }
    
    h2 {
        font-size: 1.6rem;
        width: 80%;
    }
    
    h3 {
        font-size: 1rem;
    }
    
    /* 教育背景 */
    .education-item {
        flex-direction: column;
        gap: 5px;
    }
    
    .edu-time {
        width: auto;
        font-size: 0.85em;
    }
    
    .edu-details strong {
        font-size: 0.95em;
    }
    
    .edu-details p {
        font-size: 0.85em;
    }
    
    /* 内容区域 */
    section {
        padding: 15px 12px;
    }
    
    #publications,
    #patents,
    #honors,
    #teaching,
    #contact {
        padding: 15px 12px;
    }
    
    /* 文字大小 */
    p, ul {
        font-size: 0.9rem;
    }
    
    .pub-content,
    .patent-content,
    .honor-content,
    .teaching-content {
        font-size: 0.85rem;
        line-height: 1.4;
    }
    
    /* 联系方式 */
    .contact-simple {
        display: flex;
        flex-direction: column;
        gap: 12px;
        font-size: 0.9rem;
    }
    
    .contact-simple strong {
        display: block;
        margin-left: 0 !important;
        margin-bottom: 3px;
    }
    
    .contact-simple a {
        display: block;
        margin-right: 0;
    }
    
    /* 视频模态框 */
    #modalVideo {
        width: 95vw;
        max-height: 60vh;
    }
    
    .close {
        top: 5px;
        right: 5px;
        font-size: 24px;
    }
    
    /* 页脚 */
    footer {
        padding: 12px;
    }
    
    footer p {
        font-size: 0.8rem;
    }
}

@media (max-width: 768px) {
    #research .research-container {
        width: 100%;
        max-width: none;
        padding: 1.5rem 0;
    }
    
    #research .research-scroll {
        padding: 0 1rem;
        gap: 1.5rem;
    }
}

@media (max-width: 480px) {
    nav a {
        margin: 0 0.25rem;
        font-size: 0.75rem;
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    h2 {
        font-size: 1.4rem;
        width: 90%;
    }
    
    .profile-img {
        max-width: 140px;
    }
    
    p, ul {
        font-size: 0.85rem;
    }
    
    .pub-content,
    .patent-content,
    .honor-content,
    .teaching-content {
        font-size: 0.8rem;
    }
    
    #research .research-scroll {
        padding: 0 0.75rem;
        gap: 1rem;
    }
}

/* 出版物部分 - 按年份分组 */
#publications {
    max-width: 900px;
    margin: 0 auto;
    padding: 30px 20px;
    text-align: left;
}

#publications h2 {
    margin-bottom: 5px;
}

.publication-year {
    text-align: left;
    margin-bottom: -15px;
    width: 100%;
}

.publication-year h3 {
    text-align: left;
    border-bottom: 1px solid #1a2a44;
    padding-bottom: 0.5rem;
    margin-bottom: 1px;
}

.pub-title-author {
    display: block;
    margin-bottom: 4px;
    text-align: left;
}

.pub-title-author strong {
    display: inline;
    margin-right: 5px;
}

.pub-title-author em {
    font-style: normal;
    font-weight: bold;
    color: #555;
    display: inline;
    text-decoration: underline;
}

.pub-details {
    display: block;
    line-height: 1.4;
    text-align: left;
}

.publication-year ul {
    list-style: none;
    padding: 0;
    margin-left: 0;
    text-align: left;
}

.publication-year li {
    margin-bottom: 10px;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
    text-align: left;
}

.publication-year li:last-child {
    margin-bottom: 0;
}

.pub-content {
    line-height: 1.2;
}

.journal {
    font-style: italic;
    color: #2b6cb0;
}

.doi {
    color: #e53e3e;
    text-decoration: none;
    margin-left: 5px;
}

/* 通用样式 */
p, ul {
    font-size: 1.1rem;
    text-align: left;
    width: 100%;
}

a {
    color: #1a2a44;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* 联系方式部分样式 - 简化版本 */
#contact {
    max-width: 900px;
    margin: 0 auto;
    padding: 30px 20px;
    text-align: left;
}

#contact h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 25px;
    color: #1a2a44;
    border-bottom: 2px solid #1a2a44;
    padding-bottom: 0.5rem;
}

.contact-simple {
    text-align: left;
}

.contact-simple strong {
    display: inline-block;
    color: #1a2a44;
    margin-right: 5px;
}

.contact-simple strong:not(:first-child) {
    margin-left: 30px;
}

.contact-simple a {
    color: #1a2a44;
    text-decoration: none;
    transition: color 0.3s ease;
    margin-right: 10px;
}

.contact-simple a:hover {
    color: #1a2a44;
    text-decoration: underline;
}

/* 页脚样式 */
footer {
    background-color: #1a2a44;
    color: white;
    text-align: center;
    padding: 20px;
    margin-top: 40px;
}

footer p {
    margin: 0;
    font-size: 0.95rem;
    text-align: center;
}

/* 移除旧的contact样式 */
.contact-container,
.contact-item,
.contact-icon,
.contact-info {
    display: none;
}

/* 教育背景部分样式 */
.education {
    margin-top: 20px;
}

.education h2 {
    font-size: 1.8em;
    margin-bottom: 20px;
    color: #333;
}

.education-item {
    display: flex;
    gap: 10px;
    margin-bottom: 5px;
}

.education-item:last-child {
    margin-bottom: 0;
}

.edu-time {
    flex-shrink: 0;
    width: 140px;
    color: #000000;
    font-weight: 600;
    font-size: 0.95em;
}

.edu-details strong {
    display: block;
    font-size: 1.1em;
    margin-bottom: 5px;
    color: #333;
}

.edu-details p {
    margin: 0;
    color: #666;
    font-size: 0.95em;
    line-height: 1.5;
}

@media (max-width: 768px) {
    .education-item {
        flex-direction: column;
        gap: 10px;
    }
    
    .edu-time {
        width: auto;
    }
}

/* 专利部分样式 */
#patents {
    max-width: 900px;
    margin: 0 auto;
    padding: 30px 20px;
    text-align: left;
}

#patents h2 {
    margin-bottom: 5px;
    text-align: center;
}

#patents ul {
    list-style: none;
    padding: 0;
    margin-left: 0;
}

#patents li {
    margin-bottom: 15px;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

#patents li:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.patent-content {
    line-height: 1.6;
}

.patent-content strong {
    display: inline;
    font-size: 1.1em;
    color: #333;
    margin-right: 8px;
}

.patent-status {
    display: inline;
    color: #666;
    font-size: 1em;
    font-style: italic;
}

/* 荣誉奖励部分样式 */
#honors {
    max-width: 900px;
    margin: 0 auto;
    padding: 30px 20px;
    text-align: left;
}

#honors h2 {
    margin-bottom: 5px;
    text-align: center;
}

#honors ul {
    list-style: none;
    padding: 0;
    margin-left: 0;
}

#honors li {
    margin-bottom: 15px;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid #eee;
}

#honors li:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.honor-content {
    line-height: 1.6;
}

.honor-content strong {
    color: #1a2a44;
    font-weight: 600;
}

.honor-detail {
    color: #666;
    font-style: italic;
    margin-left: 5px;
}

/* 教学部分样式 */
#teaching {
    max-width: 900px;
    margin: 0 auto;
    padding: 30px 20px;
    text-align: left;
}

#teaching h2 {
    margin-bottom: 5px;
    text-align: center;
}

#teaching ul {
    list-style: none;
    padding: 0;
    margin-left: 0;
}

#teaching li {
    margin-bottom: 15px;
}

.teaching-content {
    line-height: 1.6;
}

.teaching-content strong {
    color: #1a2a44;
    font-weight: 600;
    font-size: 1.1em;
}

.teaching-content p {
    margin: 5px 0 0 0;
    color: #666;
    font-size: 1em;
}

#research .research-content {
    font-size: 1rem;
    text-align: center;
}

#research .research-content h3,
#research .research-content p {
    text-align: inherit;
    margin-left: auto;
    margin-right: auto;
    font-size: 1rem ;
}
