/* ==================================================================
   style.css —— 个人学术主页样式表（完整版）
   头部：姓名 + 职位 + 联系方式（邮箱、地址）
   页脚：两行（版权+社交 / 更新日期）
   ================================================================== */

/* -------------------- 全局重置与变量 -------------------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: #f8fafc;
    color: #1e293b;
    line-height: 1.7;
    padding: 2rem 1.5rem;
}

/* 主容器：宽度 960px，白色卡片 */
.container {
    max-width: 960px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 2px;
    padding: 2.5rem 2.5rem 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

/* -------------------- 两端对齐 -------------------- */
p,
.news-text,
.pub-ref,
.teaching-desc {
    text-align: justify;
    text-justify: inter-ideograph;
    word-break: break-word;
}

/* 标题、标签、链接等保持左对齐 */
h1, h2, h3, .tag-list, .pub-links, .teaching-name, .teaching-links {
    text-align: left;
}

/* -------------------- 排版样式 -------------------- */
h1, h2, h3 {
    font-weight: 600;
    letter-spacing: -0.02em;
}

h1 {
    font-size: 2.6rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: #0f172a;
    /*font-style: italic;*/
}

h2 {
    font-size: 1.6rem;
    margin-top: 2.2rem;
    margin-bottom: 1rem;
    padding-bottom: 0.4rem;
    border-bottom: 3px solid #e9edf2;
    color: #0f172a;
}

h3 {
    font-size: 1.2rem;
    margin-top: 1.8rem;
    margin-bottom: 0.8rem;
    color: #0f172a;
}

a {
    color: #2563eb;
    text-decoration: none;
    transition: color 0.2s;
}
a:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

/* -------------------- 头部（Hero）区域 -------------------- */
.hero {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.8rem;
}

.hero-left {
    flex: 1;
}

.hero-title {
    font-size: 1.1rem;
    font-weight: 400;
    color: #475569;
    margin: 0.1rem 0 0.3rem;
}

.hero-contact {
    font-size: 0.95rem;
    color: #475569;
    margin-top: 0.3rem;
    font-style: italic;
}
.hero-contact i {
    margin-right: 6px;
    width: 1.2em;
    color: #64748b;
}
.hero-contact a {
    color: #1e293b;
    text-decoration: none;
}
.hero-contact a:hover {
    color: #2563eb;
}

/* 圆形头像（背景图模式） */
.hero-avatar {
    flex-shrink: 0;
    width: 110px;
    height: 110px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    background-color: #e2e8f0;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: 50% 35%;
}

/* -------------------- 研究兴趣标签 -------------------- */
.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem 0.8rem;
    margin: 0.5rem 0 0.2rem;
    list-style: none;
}
.tag-list li {
    background: #eef2f6;
    padding: 0.2rem 1rem;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 500;
    color: #1e293b;
    letter-spacing: 0.01em;
}

/* -------------------- 新闻列表 -------------------- */
.news-item {
    display: flex;
    gap: 1rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid #f1f5f9;
}
.news-item:last-child {
    border-bottom: none;
}
.news-date {
    font-weight: 600;
    /*color: #475569;*/
    color: rgb(217,83,79);
    white-space: nowrap;
    min-width: 80px;
}

/* -------------------- 出版物列表（编号 [1][2]...，紧凑排版） -------------------- */
#publications {
    counter-reset: pub-counter;
}

.pub-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.pub-list li {
    counter-increment: pub-counter;
    margin-bottom: 0.7rem;
    padding-left: 2.8rem;
    position: relative;
    line-height: 1.5;
}

.pub-list li::before {
    content: "[" counter(pub-counter) "] ";
    position: absolute;
    left: 0;
    font-weight: 700;
    color: #0f172a;
}

.pub-ref {
    margin-bottom: 0.1rem;
}

.pub-ref strong {
    font-weight: 700;
    color: #0f172a;
}

.pub-ref em {
    font-style: italic;
    color: #1e293b;
}

.pub-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 1.2rem;
    font-size: 0.9rem;
    margin-top: 0;
    text-align: left;
}

.pub-links a {
    color: #2563eb;
    font-weight: 500;
}
.pub-links a i {
    margin-right: 4px;
}

.pub-links .no-link {
    color: #94a3b8;
    cursor: default;
    font-weight: 400;
}
.pub-links .no-link i {
    color: #94a3b8;
}

/* -------------------- 折叠区块（期刊/会议论文） -------------------- */
.pub-section {
    margin-bottom: 0.5rem;
    border: none;
}

.pub-section summary {
    display: flex;
    align-items: center;
    cursor: pointer;
    list-style: none;
    user-select: none;
    padding: 0.4rem 0;
}

.pub-section summary::-webkit-details-marker {
    display: none;
}
.pub-section summary::marker {
    display: none;
}

.pub-section summary .arrow {
    display: inline-block;
    margin-right: 0.6rem;
    font-size: 0.9rem;
    line-height: 1;
    transition: transform 0.25s ease, color 0.2s;
    color: #94a3b8;
}

.pub-section summary:hover .arrow {
    color: #64748b;
}

.pub-section[open] summary .arrow {
    transform: rotate(90deg);
}

.pub-section h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
    color: #0f172a;
    flex: 1;
}

.pub-section .pub-list {
    margin-top: 0.5rem;
    padding-left: 0;
}

/* -------------------- 教学经历 -------------------- */
.teaching-item {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f1f5f9;
    align-items: baseline;
}
.teaching-item:last-child {
    border-bottom: none;
}
.teaching-name {
    font-weight: 600;
    min-width: 140px;
    text-align: left;
}
.teaching-links a {
    margin-left: 0.8rem;
    font-size: 0.9rem;
}

/* ================================================================
   页脚：两行显示
   第1行：左版权 + 右社交
   第2行：左更新日期
   ================================================================ */
footer {
    margin-top: 2.8rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e9edf2;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

/* 第一行：左右分布 */
.footer-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.8rem 1.5rem;
}

.footer-copy {
    font-size: 0.9rem;
    color: #64748b;
    font-style: italic;
}

.footer-social {
    display: flex;
    gap: 1.2rem;
}
.footer-social a {
    color: #475569;
    font-size: 1.2rem;
    transition: color 0.2s;
}
.footer-social a:hover {
    color: #2563eb;
}

/* 第二行：更新日期（左对齐） */
.footer-update {
    font-size: 0.85rem;
    color: #94a3b8;
    text-align: left;
    font-style: italic;
}

/* ================================================================
   移动端适配（宽度 ≤ 640px）
   ================================================================ */
@media (max-width: 640px) {
    body {
        padding: 1rem 0.8rem;
    }
    .container {
        padding: 1.8rem 1.2rem;
        border-radius: 16px;
    }
    h1 {
        font-size: 2rem;
    }
    .hero {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .hero-avatar {
        width: 80px;
        height: 80px;
        order: -1;
    }
    .hero-left {
        text-align: center;
    }
    .hero-contact {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.2rem;
    }
    .tag-list {
        justify-content: center;
    }
    .news-item {
        flex-direction: column;
        gap: 0.1rem;
    }
    .news-date {
        min-width: auto;
    }
    .teaching-item {
        flex-direction: column;
        gap: 0.2rem;
    }
    .teaching-name {
        min-width: auto;
    }
    .pub-list li {
        padding-left: 2.2rem;
    }
    .pub-section summary {
        flex-wrap: wrap;
    }

    /* 移动端：页脚居中 */
    footer {
        align-items: center;
        text-align: center;
    }
    .footer-row {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .footer-social {
        justify-content: center;
    }
    .footer-update {
        text-align: center;
    }
}