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

/* 颜色变量 */
:root {
    --primary-color: #5D5454;
    --secondary-color: #6b6262;
    --accent-color: #8A2BE2;
    --text-color: #333333;
    --light-text: #7a7070;
    --border-color: #d4d4d4;
    --bg-color: #E9E9E9;
    --hover-bg: #f9f7f5;
}

/* 基础样式 */
html {
    scroll-behavior: smooth;
}

body {
    font-family: Constantia, FangSong, STFangSong, '仿宋', serif, Georgia, 'Times New Roman', Times, serif;
    font-size: 16px;
    font-weight: 300;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    letter-spacing: 0.02em;
}

/* 容器 */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* 头部 - 名字和职位 */
.header {
    margin-bottom: 40px;
    padding-bottom: 20px;
    text-align: center;
}

/* 名字 */
.name {
    font-family: 'Josefin Sans', sans-serif;
    font-size: 45px;
    font-weight: 400;
    color: var(--primary-color);
    margin-bottom: 8px;
    line-height: 1.2;
    letter-spacing: 0.25em;
}

/* 中文名字使用仿宋 */
.name strong {
    font-family: FangSong, STFangSong, '仿宋', serif;
    font-size: 42px;
    font-weight: 700;
}

/* 职位信息 */
.title {
    font-size: 1.1em;
    color: var(--secondary-color);
    line-height: 1.6;
}

/* 个人信息区域 - 左右布局 */
.profile-layout {
    display: grid;
    grid-template-columns: 1fr 250px;
    gap: 50px;
    margin-bottom: 50px;
    align-items: start;
}

/* 左侧：简介和联系方式 */
.profile-left {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* 简介 */
.bio-section {
    line-height: 1.8;
}

.bio {
    font-size: 1.1em;
    color: var(--text-color);
    margin: 0;
}

.bio a {
    color: var(--accent-color);
    text-decoration: none;
}

.bio a:hover {
    text-decoration: underline;
}

/* 联系信息 */
.contact-info {
    line-height: 1.8;
}

.contact-info p {
    margin-bottom: 12px;
    font-size: 1em;
    color: var(--secondary-color);
}

.contact-info a {
    color: var(--accent-color);
    text-decoration: none;
}

.contact-info a:hover {
    text-decoration: underline;
}

.contact-info strong {
    color: var(--primary-color);
    font-weight: 400;
}

/* 右侧：照片 */
.profile-right {
    display: flex;
    justify-content: center;
}

.profile-photo {
    width: 100%;
    max-width: 250px;
    aspect-ratio: 1;
    position: relative;
}

#photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
    display: none;
}

#photo[src*=".jpg"],
#photo[src*=".png"],
#photo[src*=".jpeg"] {
    display: block;
}

.photo-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
}

#photo[src*=".jpg"] ~ .photo-placeholder,
#photo[src*=".png"] ~ .photo-placeholder,
#photo[src*=".jpeg"] ~ .photo-placeholder {
    display: none;
}

/* CV 链接 */
.cv-link {
    display: inline-block;
    padding: 10px 20px;
    background-color: var(--accent-color);
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-size: 1em;
    font-weight: 400;
    transition: background-color 0.3s ease;
}

.cv-link:hover {
    background-color: #0052a3;
}

/* 研究内容区 */
.content {
    width: 100%;
}

/* 研究部分 */
.research {
    background-color: transparent;
}

.section-title {
    font-size: 2.2em;
    font-weight: 400;
    color: var(--primary-color);
    margin-bottom: 30px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-color);
    letter-spacing: 0.03em;
}

/* 研究主题 */
.topic {
    margin-bottom: 40px;
}

.topic-title {
    font-size: 1.3em;
    font-weight: 400;
    color: var(--primary-color);
    margin-bottom: 12px;
}

.topic-description {
    font-size: 1em;
    line-height: 1.7;
    color: var(--secondary-color);
    margin-bottom: 18px;
    text-align: justify;
}

/* 论文条目 */
.paper {
    margin-bottom: 18px;
    padding-left: 15px;
}

.paper-header {
    line-height: 1.6;
    margin-bottom: 5px;
}

.paper-title-bold {
    font-weight: 400;
    color: var(--primary-color);
    font-size: 1em;
}

.paper-title-bold a {
    color: inherit;
    text-decoration: none;
}

.paper-title-bold a:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

.coauthors {
    color: var(--light-text);
    font-size: 1em;
    margin-left: 5px;
}

.journal-status {
    color: var(--primary-color);
    font-size: 1em;
    margin-left: 5px;
    font-style: italic;
}

.paper-question {
    font-size: 0.98em;
    color: var(--light-text);
    font-style: italic;
    line-height: 1.6;
    margin-left: 0;
}

/* 响应式设计 - 平板 */
@media (max-width: 768px) {
    .container {
        padding: 30px 15px;
    }
    
    .profile-layout {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .profile-right {
        order: -1;
    }
    
    .profile-photo {
        max-width: 200px;
    }
    
    .name {
        font-size: 1.8em;
    }
    
    .name strong {
        font-size: 24px !important;
    }
    
    .section-title {
        font-size: 1.6em;
    }
    
    .topic-title {
        font-size: 1.1em;
    }
}

/* 小屏手机 */
@media (max-width: 480px) {
    body {
        font-size: 14px;
    }
    
    .container {
        padding: 20px 15px;
    }
    
    .name {
        font-size: 1.5em;
    }
    
    .name strong {
        font-size: 18px !important;
    }
    
    .section-title {
        font-size: 1.4em;
    }
    
    .profile-photo {
        display: none;
    }
    
    .profile-layout {
        gap: 25px;
    }
}

/* 页脚 */
.footer {
    margin-top: 60px;
    padding: 25px 0 20px;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.footer p {
    font-size: 0.85em;
    color: var(--light-text);
    margin: 0;
    line-height: 1.6;
}

/* 打印样式 */
@media print {
    .profile-layout {
        display: block;
    }
    
    .profile-photo {
        display: none;
    }
    
    .topic {
        page-break-inside: avoid;
    }
}
