/* 极简学术主页样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    max-width: 1100px;  /* 增加最大宽度，减少边距 */
    margin: 0 auto;
    padding: 30px 20px;  /* 减小边距 */
    font-size: 16px;
    background-color: #fff;
}

/* 容器 */
.container {
    min-height: calc(100vh - 60px);
    display: flex;
    flex-direction: column;
}

/* 导航栏 */
.nav {
    border-bottom: 1px solid #eaeaea;
    padding-bottom: 15px;
    margin-bottom: 30px;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.nav a {
    text-decoration: none;
    color: #666;
    font-size: 1rem;
    padding: 5px 0;
    position: relative;
    transition: color 0.2s ease;
}

.nav a:hover {
    color: #000;
}

.nav a:not(:last-child)::after {
    content: "|";
    color: #ddd;
    margin-left: 20px;
}

/* 头部容器 - 使用Flexbox布局 */
.header-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 40px;
    margin-bottom: 30px;
}

/* 文字内容区域 */
.text-content {
    flex: 1;
    min-width: 0;
}

/* 照片侧边栏 */
.photo-sidebar {
    width: 200px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* 照片样式 - 精确尺寸150×193 */
.portrait {
    width: 150px;
    height: 193px;
    object-fit: cover;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border: 1px solid #f0f0f0;
    margin-bottom: 20px;
}

/* 照片侧边栏 - 增加宽度确保一行显示 */
.photo-sidebar {
    width: 250px; /* 从200px增加到250px */
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* 联系信息侧边栏 */
.contact-sidebar {
    text-align: left; /* 改为左对齐 */
    font-size: 0.9rem;
    line-height: 1.5;
    width: 100%;
    word-break: keep-all; /* 防止换行 */
    white-space: nowrap; /* 确保不换行 */
}

.contact-sidebar h3 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: #333;
    border-bottom: 1px solid #eee;
    padding-bottom: 8px;
    text-align: center; /* 标题居中 */
}

.contact-sidebar p {
    margin-bottom: 12px;
    overflow: hidden; /* 防止溢出 */
    text-overflow: ellipsis; /* 如果内容太长，显示省略号 */
}

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

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

/* 响应式设计调整 */
@media (max-width: 768px) {
    .photo-sidebar {
        width: 100%;
        order: -1;
        margin-bottom: 20px;
    }
    
    .contact-sidebar {
        text-align: center; /* 移动端居中 */
        white-space: normal; /* 移动端允许换行 */
    }
}

/* 主要内容区域样式 */
h1 {
    font-size: 2.2rem;
    font-weight: normal;
    margin-bottom: 0.5rem;
    color: #000;
}

h2 {
    font-size: 1.4rem;
    font-weight: bold;
    margin: 1.5rem 0 1rem 0;
    color: #333;
    padding-bottom: 8px;
    border-bottom: 1px solid #f0f0f0;
}

p, li {
    margin-bottom: 10px;
    color: #444;
    line-height: 1.7;
}

ul {
    list-style-position: inside;
    margin-left: 0;
}

li {
    margin-bottom: 8px;
}

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

a:hover {
    text-decoration: underline;
}

/* 页脚 */
footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #eaeaea;
    font-size: 0.9rem;
    color: #888;
    text-align: center;
}

/* 响应式设计 */
@media (max-width: 768px) {
    body {
        padding: 20px 15px;
        max-width: 100%;
    }
    
    .header-container {
        flex-direction: column;
    }
    
    .portrait {
        width: 150px;
        height: 193px;
    }
    
    .nav {
        gap: 10px;
    }
    
    .nav a:not(:last-child)::after {
        margin-left: 10px;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    h2 {
        font-size: 1.2rem;
    }

    .photo-sidebar {
        width: 100%;
        order: -1;
        margin-bottom: 20px;
    }
    
    .contact-sidebar {
        text-align: center; /* 移动端居中 */
        white-space: normal; /* 移动端允许换行 */
    }
}