/* 基础样式重置和全局设置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Computer Modern', 'Times New Roman', serif;
    line-height: 1.6;
    color: #333;
    background-color: #f9f7f2;
    font-size: 1.2rem; /* 进一步增加基础字体大小 */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 标题样式 */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Computer Modern', 'Times New Roman', serif;
    color: #4a3c31;
    margin-bottom: 1rem;
    font-weight: bold;
}

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

h2 {
    font-size: 2rem;
    border-bottom: 2px solid #8b4513;
    padding-bottom: 0.5rem;
    margin-top: 2rem;
}

h3 {
    font-size: 1.6rem;
    margin-top: 1.5rem;
}

/* 响应式标题大小 */
@media (max-width: 768px) {
    h1 {
        font-size: 2.3rem;
    }
    h2 {
        font-size: 1.7rem;
    }
    h3 {
        font-size: 1.4rem;
    }
}

/* 段落样式 */
p {
    margin-bottom: 1rem;
    text-align: justify;
    text-indent: 2em;
    font-size: 1.2rem; /* 进一步增加段落字体大小 */
}

/* 页面头部 */
header {
    background-color: #f0ebe5;
    padding: 3rem 0;
    text-align: center;
    border-bottom: 1px solid #d7ccc8;
}

.profile-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.profile-text {
    flex: 1;
    padding-right: 30px;
}

.profile-text p {
    text-align: left;
    margin: 0;
    line-height: 1.6;
}

.profile-name {
    font-size: 2em;
    display: block;
    margin-bottom: 10px;
    color: #333;
}

.profile-title {
    display: block;
    font-size: 1.2em;
    margin-bottom: 8px;
    color: #444;
}

.profile-email, .profile-education, .profile-interest {
    display: block;
    margin-bottom: 8px;
    color: #555;
}

.profile-photo {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
}

/* 深色模式下的个人信息样式 */
.dark-mode .profile-info {
    background-color: #2a2a2a;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.dark-mode .profile-name {
    color: #ffffff !important;
}

.dark-mode .profile-title, .dark-mode .profile-email, .dark-mode .profile-education, .dark-mode .profile-interest {
    color: #f0f0f0 !important;
}

.dark-mode .profile-text p {
    color: #f0f0f0 !important;
}

.dark-mode .profile-photo {
    border-color: #333;
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

/* 导航栏 */
nav {
    background-color: #4a3c31;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.nav-links {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

.nav-links li {
    margin: 0;
}

.nav-links a {
    display: block;
    color: #f5f3f0;
    text-decoration: none;
    padding: 1rem 1.5rem;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.nav-links a:hover {
    background-color: #5d4b3f;
}

/* 响应式导航栏 */
@media (max-width: 768px) {
    .nav-links {
        flex-direction: column;
        align-items: center;
    }
    
    .nav-links a {
        padding: 0.8rem 1rem;
        width: 100%;
        text-align: center;
    }
}

/* 主要内容区域 */
main {
    padding: 2rem 0;
}

.content-box {
    background-color: #fff;
    padding: 2rem;
    margin-bottom: 2rem;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    border-left: 4px solid #8b4513;
}

/* 时间线样式 */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 6px;
    background-color: #d7ccc8;
    top: 0;
    bottom: 0;
    left: 0;
    margin-left: 10px;
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    background-color: inherit;
    width: 100%;
}

.timeline-item::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    left: 0;
    background-color: white;
    border: 4px solid #8b4513;
    top: 15px;
    border-radius: 50%;
    z-index: 1;
}

.timeline-date {
    font-weight: bold;
    color: #8b4513;
    margin-bottom: 0.5rem;
}

.timeline-content {
    padding: 1rem;
    background-color: white;
    position: relative;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
}

.timeline-content p {
    text-indent: 0;
    text-align: left;
}

/* 响应式时间线 */
@media (max-width: 600px) {
    .timeline::after {
        margin-left: 5px;
        width: 4px;
    }
    
    .timeline-item::after {
        width: 15px;
        height: 15px;
        left: -3px;
    }
    
    .timeline-item {
        padding: 10px 25px;
    }
}

/* 论文列表样式 */
.publications-list {
    list-style: none;
}

.publication-item {
    padding: 1rem 0;
    border-bottom: 1px solid #e0e0e0;
}

.publication-item:last-child {
    border-bottom: none;
}

.publication-authors {
    font-style: italic;
    color: #555;
}

.publication-title {
    margin: 0.5rem 0;
}

.publication-venue {
    color: #666;
    font-size: 1.1rem;
}

.publication-link {
    display: inline-block;
    margin-top: 0.5rem;
    color: #8b4513;
    text-decoration: none;
    font-weight: bold;
}

.publication-link:hover {
    text-decoration: underline;
}

/* 项目网格样式 */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.project-card {
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.project-image {
    height: 200px;
    background-color: #f0ebe5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
}

.project-info {
    padding: 1.5rem;
}

/* 响应式项目网格 */
@media (max-width: 768px) {
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .project-image {
        height: 180px;
    }
}

/* 响应式内容区域 */
@media (max-width: 600px) {
    .content-box {
        padding: 1.5rem;
    }
    
    p {
        font-size: 1.1rem;
    }
}

/* 响应式页面头部 */
@media (max-width: 768px) {
    header {
        padding: 2rem 0;
    }
    
    .profile-info .title {
        font-size: 1.3rem;
    }
    
    .profile-info .contact-info {
        font-size: 1.1rem;
    }
}

/* 响应式页脚 */
@media (max-width: 600px) {
    footer {
        padding: 1.5rem 0;
    }
    
    footer p {
        font-size: 1.1rem;
    }
}

/* 响应式回到顶部按钮 */
@media (max-width: 600px) {
    #back-to-top {
        width: 40px;
        height: 40px;
        font-size: 16px;
        bottom: 20px;
        right: 20px;
    }
}

.project-info h3 {
    margin-top: 0;
}

.project-link {
    display: inline-block;
    margin-top: 1rem;
    color: #8b4513;
    text-decoration: none;
    font-weight: bold;
}

.project-link:hover {
    text-decoration: underline;
}

/* 页脚 */
footer {
    background-color: #4a3c31;
    color: #f5f3f0;
    text-align: center;
    padding: 2rem 0;
}

footer p {
    margin: 0;
    text-align: center;
    text-indent: 0;
}