/* CSS变量定义 */
:root {
    --primary-color: #1a5276; /* 深蓝色作为主色调，代表学术和专业 */
    --primary-light: #3498db; /* 亮蓝色作为辅助色 */
    --accent-color: #f4d03f; /* 明黄色作为强调色 */
    --background-color: #faf9f7; /* 浅米色背景，提高可读性 */
    --card-background: #ffffff; /* 卡片背景色 */
    --text-color: #000000; /* 主要文本颜色 */
    --text-secondary: #555555; /* 次要文本颜色 */
    --border-color: #e0e0e0; /* 边框颜色 */
    --header-bg: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.1); /* 统一阴影效果 */
    --transition: all 0.3s ease; /* 统一过渡效果 */
    --border-radius: 8px; /* 统一圆角 */
}

/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
}

/* 容器样式 */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 头部样式 */
header {
    background: var(--header-bg);
    color: white;
    padding: 40px 0;
    text-align: center;
    position: relative;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 30px;
    justify-content: center;
}

.profile-img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 5px solid rgba(255, 255, 255, 0.3);
    object-fit: cover;
}

.header-text {
    text-align: left;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.position {
    font-size: 1.2rem;
    margin-bottom: 20px;
    font-weight: 500;
}

.contact-info {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 10px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
}

.contact-item i {
    color: var(--accent-color);
    font-size: 1.2rem;
}

/* 导航栏样式 */
nav {
    background-color: white;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.nav-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 0;
}

.nav-link {
    color: var(--primary-color);
    text-decoration: none;
    padding: 15px 20px;
    display: block;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-light);
    background-color: rgba(26, 82, 118, 0.05);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 3px;
    background-color: var(--accent-color);
}

/* 主内容区域样式 */
main {
    padding: 40px 0;
}

/* 内容区块通用样式 */
.content-section {
    background-color: var(--card-background);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 30px;
    margin-bottom: 40px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.content-section.visible {
    opacity: 1;
    transform: translateY(0);
}

.content-section h2 {
    color: var(--primary-color);
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--primary-light);
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    gap: 15px;
}

.content-section h2 i {
    font-size: 1.5rem;
    color: var(--primary-light);
}

.content-section h3 {
    color: var(--primary-color);
    margin: 25px 0 15px;
    font-size: 1.4rem;
}

.content-section p {
    margin-bottom: 15px;
    color: var(--text-secondary);
    text-align: justify;
}

/* 研究方向样式 */
.research-areas {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.research-area {
    background-color: rgba(26, 82, 118, 0.05);
    padding: 20px;
    border-radius: var(--border-radius);
    transition: var(--transition);
    border-left: 4px solid var(--primary-light);
}

.research-area:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.research-area h4 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 1.2rem;
}

/* 时间线样式 */
.timeline {
    position: relative;
    padding-left: 30px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: var(--primary-light);
}

.timeline-item {
    position: relative;
    margin-bottom: 30px;
    padding-left: 20px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -10px;
    top: 5px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: var(--primary-color);
    border: 4px solid white;
    box-shadow: 0 0 0 2px var(--primary-light);
}

.timeline-date {
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 5px;
    font-size: 1.1rem;
}

.timeline-title {
    font-weight: bold;
    margin-bottom: 3px;
}

.timeline-organization {
    color: var(--primary-light);
    margin-bottom: 10px;
    font-style: italic;
}

/* 学术论文样式 */
.publications {
    margin-bottom: 10px;
}

.publication {
    background-color: rgba(26, 82, 118, 0.05);
    padding: 15px;
    border-radius: var(--border-radius);
    margin-bottom: 12px;
    transition: var(--transition);
}

.publication:hover {
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.publication-title {
    color: var(--primary-color);
    font-weight: bold;
    margin-bottom: 5px;
    font-size: 1.1rem;
}

.publication-authors {
    color: var(--text-secondary);
    margin-bottom: 5px;
}

.publication-venue {
    font-style: italic;
    color: var(--text-secondary);
    margin-bottom: 5px;
}

.publication-time {
    color: var(--primary-color);
    font-weight: 500;
    margin-bottom: 3px;
}

.publication-pages {
    color: var(--text-secondary);
    margin-bottom: 3px;
}

.publication-location {
    color: var(--text-secondary);
    font-style: italic;
    margin-bottom: 5px;
}

.publication-abstract {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* 研究项目样式 */
.projects {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.project {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: var(--transition);
}

.project:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    transform: translateY(-5px);
}

.project-header {
    background-color: var(--primary-color);
    padding: 15px 20px;
    color: white;
}

.project-title {
    font-weight: bold;
    margin-bottom: 5px;
    font-size: 1.2rem;
}

.project-funding {
    font-size: 0.9rem;
    opacity: 0.9;
    display: inline-block;
    padding: 3px 10px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 30px;
    margin-top: 5px;
}

.project-content {
    padding: 20px;
    background-color: white;
}

.project-period {
    display: inline-block;
    padding: 3px 10px;
    background-color: rgba(52, 152, 219, 0.1);
    color: var(--primary-light);
    border-radius: 30px;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.project-role {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
    font-weight: 500;
    color: var(--primary-color);
    font-size: 0.95rem;
}

/* 教学工作样式 */
.courses {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.course {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: var(--transition);
}

.course:hover {
    box-shadow: var(--shadow);
    transform: translateY(-3px);
}

.course-header {
    background-color: var(--primary-light);
    padding: 15px 20px;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.course-title {
    font-weight: bold;
    font-size: 1.1rem;
}

.course-code {
    background-color: rgba(255, 255, 255, 0.2);
    padding: 3px 10px;
    border-radius: 30px;
    font-size: 0.9rem;
}

.course-content {
    padding: 15px 20px;
    background-color: white;
}

.course-level {
    margin-top: 10px;
    color: var(--primary-color);
    font-weight: 500;
    font-size: 0.9rem;
}

.teaching-awards {
    margin-top: 30px;
}

.teaching-awards ul {
    list-style-type: none;
    padding-left: 20px;
}

.teaching-awards li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 10px;
    color: var(--text-secondary);
}

.teaching-awards li::before {
    content: '✓';
    color: var(--accent-color);
    position: absolute;
    left: 0;
    font-weight: bold;
}

/* 荣誉奖励样式 */
.awards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.award {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: var(--transition);
}

.award:hover {
    box-shadow: var(--shadow);
    transform: translateY(-3px);
}

.award-header {
    background-color: var(--accent-color);
    padding: 15px 20px;
    color: var(--primary-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.award-title {
    font-weight: bold;
    font-size: 1.1rem;
}

.award-date {
    background-color: rgba(255, 255, 255, 0.3);
    padding: 3px 10px;
    border-radius: 30px;
    font-size: 0.9rem;
}

.award-content {
    padding: 15px 20px;
    background-color: white;
}

/* 页脚样式 */
footer {
    background-color: var(--primary-color);
    color: white;
    padding: 30px 0;
    text-align: center;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-bottom: 10px;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    text-decoration: none;
    transition: var(--transition);
    font-size: 1.2rem;
}

.social-link:hover {
    background-color: var(--primary-light);
    transform: translateY(-3px);
}

footer p {
    margin: 5px 0;
    font-size: 0.9rem;
    opacity: 0.9;
}

footer .copyright {
    font-size: 0.8rem;
    opacity: 0.7;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .header-content {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    
    .header-text {
        text-align: center;
    }
    
    .profile-img {
        margin-bottom: 10px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .contact-info {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    
    .nav-container {
        flex-direction: column;
        align-items: center;
    }
    
    .nav-link {
        padding: 12px 20px;
        width: 100%;
        text-align: center;
    }
    
    .content-section {
        padding: 20px;
    }
    
    .content-section h2 {
        font-size: 1.5rem;
    }
    
    .research-areas,
    .courses,
    .awards {
        grid-template-columns: 1fr;
    }
    
    .projects {
        gap: 20px;
    }
}

@media (max-width: 480px) {
    header {
        padding: 30px 0;
    }
    
    .profile-img {
        width: 120px;
        height: 120px;
    }
    
    header h1 {
        font-size: 1.8rem;
    }
    
    .position {
        font-size: 1rem;
    }
    
    .content-section {
        padding: 15px;
        margin-bottom: 30px;
    }
    
    .content-section h2 {
        font-size: 1.3rem;
    }
    
    .content-section h3 {
        font-size: 1.2rem;
    }
    
    .timeline {
        padding-left: 25px;
    }
    
    .timeline-item {
        padding-left: 15px;
    }
    
    .publication-title,
    .project-title,
    .course-title,
    .award-title {
        font-size: 1rem;
    }
}

/* 打印样式 */
@media print {
    body {
        background-color: white;
        color: black;
    }
    
    header,
    nav,
    footer {
        display: none;
    }
    
    .content-section {
        box-shadow: none;
        opacity: 1;
        transform: none;
        margin-bottom: 20px;
        page-break-inside: avoid;
    }
    
    .content-section h2 {
        border-bottom: 1px solid black;
    }
    
    main {
        padding: 0;
    }
}

/* 动画定义 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 确保所有内容区块在加载时有动画效果 */
.content-section {
    animation: fadeIn 0.6s ease forwards;
}