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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: #f9fafb;
    color: #111827;
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* 暗黑模式 */
body.dark-mode {
    background-color: #1a1a1a;
    color: #e5e7eb;
}

body.dark-mode .sidebar h1,
body.dark-mode section h2,
body.dark-mode .exp-header h3 {
    color: #f3f4f6;
}

body.dark-mode .role,
body.dark-mode .bio-text,
body.dark-mode .exp-sub,
body.dark-mode .exp-date,
body.dark-mode .pub-venue,
body.dark-mode .contact-sub,
body.dark-mode .address-item {
    color: #9ca3af;
}

body.dark-mode .intro-section {
    background: #2d2d2d;
}

body.dark-mode .intro-text {
    color: #e5e7eb;
}

body.dark-mode .contact-links a,
body.dark-mode footer {
    color: #9ca3af;
}

body.dark-mode .contact-links a:hover {
    color: #fff;
}

body.dark-mode .exp-desc,
body.dark-mode .news-content,
body.dark-mode .workshop-dot-item {
    color: #d1d5db;
}

body.dark-mode .news-date {
    color: #9ca3af;
}

body.dark-mode .theme-toggle {
    background: #2d2d2d;
    border-color: #404040;
    color: #e5e7eb;
}

/* 右上角按钮容器 (主题切换) */
.top-right-buttons {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    gap: 10px;
}

.theme-toggle {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 40px;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: all 0.2s ease;
    font-size: 0.95rem;
}

.theme-toggle:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.theme-toggle i {
    font-size: 1.1rem;
    color: #fbbf24;
}

body.dark-mode .theme-toggle i {
    color: #a78bfa;
}

/* 两栏布局 */
.main {
    display: flex;
    min-height: 100vh;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    gap: 4rem;
}

/* 左侧栏 */
.sidebar {
    flex: 0 0 280px;
    position: sticky;
    top: 2rem;
    align-self: flex-start;
    padding-right: 1rem;
}

.avatar {
    margin-bottom: 1.8rem;
}

.avatar img {
    width: 180px;
    height: 130px;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 10px 25px -8px rgba(0,0,0,0.1);
}

.sidebar h1 {
    font-size: 2rem;
    font-weight: 550;
    letter-spacing: -0.02em;
    margin-bottom: 0.3rem;
    color: #111;
}

.sidebar .role {
    font-size: 1.1rem;
    color: #4b5563;
    margin-bottom: 1.2rem;
}

.sidebar .bio-text {
    color: #374151;
    margin-bottom: 1.8rem;
    font-size: 0.95rem;
}

/* 左侧栏导航链接（页面切换） */
.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-bottom: 2rem;
    border-top: 1px solid #e5e7eb;
    padding-top: 1.5rem;
}

body.dark-mode .sidebar-nav {
    border-top-color: #404040;
}

.nav-link {
    color: #4b5563;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    padding: 0.3rem 0;
    transition: color 0.15s;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.nav-link i {
    width: 20px;
    font-size: 0.95rem;
    color: #6b7280;
}

.nav-link:hover,
.nav-link.active {
    color: #111;
}

.nav-link.active i {
    color: #3b82f6;
}

body.dark-mode .nav-link {
    color: #9ca3af;
}

body.dark-mode .nav-link:hover,
body.dark-mode .nav-link.active {
    color: #fff;
}

body.dark-mode .nav-link.active i {
    color: #60a5fa;
}

/* 联系方式 */
.contact-links {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-top: 1rem;
    border-top: 1px solid #e5e7eb;
    padding-top: 1.5rem;
}

body.dark-mode .contact-links {
    border-top-color: #404040;
}

.contact-links a {
    color: #374151;
    text-decoration: none;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    width: fit-content;
    transition: color 0.15s;
}

.contact-links a i {
    width: 20px;
    margin-right: 8px;
    text-align: center;
    color: #6b7280;
    font-size: 1rem;
}

.contact-links a i.ai {
    font-size: 1.3rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

body.dark-mode .contact-links a i.ai {
    color: #9ca3af;
}
body.dark-mode .contact-links a:hover i.ai {
    color: #fff;
}

.contact-links a:hover {
    color: #000;
}

.contact-links a:hover i {
    color: #111;
}

/* 右侧内容栏 */
.content {
    flex: 1;
    max-width: 760px;
}

/* 页面切换容器 */
.page {
    display: none;
}

.page.active-page {
    display: block;
}

/* 自我介绍区域 */
.intro-section {
    background: #f2f4f8;
    padding: 1.8rem;
    border-radius: 20px;
    margin-bottom: 3rem;
    transition: background-color 0.3s ease;
}

.intro-text {
    color: #1f2937;
    font-size: 1.05rem;
    line-height: 1.7;
}

.intro-text a {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.15s;
}

.intro-text a:hover {
    color: #1e4f9e;
}

section {
    margin-bottom: 3.5rem;
}

section h2 {
    font-size: 1.5rem;
    font-weight: 560;
    letter-spacing: -0.01em;
    margin-bottom: 1.8rem;
    color: #111;
    display: flex;
    align-items: center;
}

section h2 i {
    margin-right: 12px;
    color: #6b7280;
    font-size: 1.3rem;
    width: 28px;
}

/* 2. News 区域 */
.news-item {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    padding: 0.6rem 0;
}

.news-date {
    min-width: 120px;
    color: #6b7280;
    font-size: 0.9rem;
    font-weight: 500;
}

.news-content {
    color: #374151;
    font-size: 0.95rem;
}

.workshop-list {
    list-style: none;
    padding-left: 0;
}

.workshop-dot-item {
    display: flex;
    align-items: baseline;
    gap: 0.8rem;
    padding: 0.4rem 0;
    font-size: 0.95rem;
    color: #374151;
}

.workshop-dot-item::before {
    content: "•";
    color: #000000; /* 纯黑色 */
    font-weight: bold;
    font-size: 1.2rem;
    line-height: 1;
    margin-right: 0.2rem;
}

body.dark-mode .workshop-dot-item::before {
    color: #ffffff;
}

/* Publications 列表 */
.pub-item {
    display: flex;
    gap: 24px;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1.8rem;
    border-bottom: 1px solid #e5e7eb;
}

body.dark-mode .pub-item {
    border-bottom-color: #404040;
}

.pub-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

.pub-thumb {
    flex: 0 0 300px;
    max-width: 300px;
}

.pub-thumb img {
    width: 100%;
    height: auto;
    border-radius: 0;
    display: block;
    object-fit: cover;
    box-shadow: none;
}

body.dark-mode .pub-thumb img {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.pub-info {
    flex: 1;
    min-width: 0;
}

.pub-title {
    font-weight: 480;
    font-size: 1.05rem;
    line-height: 1.45;
    color: #111;
    margin-bottom: 6px;
}

.pub-note {
    font-size: 0.8rem;
    color: #6b7280;
    margin-bottom: 8px;
}

body.dark-mode .pub-title {
    color: #f3f4f6;
}

.pub-authors {
    font-size: 0.92rem;
    color: #4b5563;
    margin-bottom: 4px;
}

body.dark-mode .pub-authors {
    color: #9ca3af;
}

.pub-venue {
    font-size: 0.92rem;
    color: #6b7280;
    margin-bottom: 8px;
}

body.dark-mode .pub-venue {
    color: #9ca3af;
}

.pub-links {
    display: flex;
    gap: 2px;
}

.pub-links a {
    font-size: 0.9rem;
    text-decoration: none;
    color: #3b82f6;
    font-weight: 500;
    transition: color 0.15s;
}

.pub-links a:hover {
    color: #1e4f9e;
    text-decoration: underline;
}

body.dark-mode .pub-links a {
    color: #60a5fa;
}

body.dark-mode .pub-links a:hover {
    color: #93c5fd;
}

.pub-empty {
    color: #6b7280;
    font-style: italic;
    padding: 2rem 1rem;
    text-align: center;
    border: 1px dashed #e5e7eb;
    border-radius: 16px;
    background: #fafafa;
}

body.dark-mode .pub-empty {
    border-color: #404040;
    background: #262626;
    color: #9ca3af;
}

/* 经历条目 */
.exp-item {
    margin-bottom: 2rem;
}

.exp-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.2rem;
}

.exp-header h3 {
    font-size: 1.2rem;
    font-weight: 540;
}

.exp-date {
    color: #6b7280;
    font-size: 0.9rem;
}

.exp-sub {
    color: #4b5563;
    font-size: 0.9rem;
    margin-bottom: 0.4rem;
}

.exp-desc {
    color: #374151;
    font-size: 0.95rem;
}

/* 链接样式 */
.exp-sub a,
a.inline-link,
a.inline-link:link,
a.inline-link:visited {
    color: #3b82f6 !important;
    text-decoration: none !important;
    font-weight: 500;
    transition: color 0.15s;
}

.exp-sub a:hover,
a.inline-link:hover,
a.inline-link:active {
    color: #1e4f9e !important;
    text-decoration: underline !important;
}

/* Contact 页面样式 */
.contact-section {
    margin-bottom: 3rem;
}

.contact-section h2 {
    font-size: 1.5rem;
    font-weight: 560;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 12px;
}

.contact-section h2 i {
    color: #6b7280;
    font-size: 1.3rem;
    width: 28px;
}

.contact-block {
    background: #ffffff;
    border-radius: 16px;
    padding: 1.5rem 2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.03);
    border: 1px solid #e5e7eb;
}

body.dark-mode .contact-block {
    background: #2d2d2d;
    border-color: #404040;
}

.contact-block-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.contact-block-title i {
    color: #3b82f6;
    width: 22px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0.6rem 0;
    font-size: 0.98rem;
    border-bottom: 1px solid #f0f0f0;
}

body.dark-mode .contact-item {
    border-bottom-color: #404040;
}

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

.contact-item i {
    width: 20px;
    color: #6b7280;
    font-size: 0.95rem;
}

.contact-item a {
    color: #3b82f6;
    text-decoration: none;
    transition: color 0.15s;
}

.contact-item a:hover {
    color: #1e4f9e;
    text-decoration: underline;
}

.contact-item .label {
    font-weight: 500;
    color: #374151;
    min-width: 80px;
}

body.dark-mode .contact-item .label {
    color: #d1d5db;
}

.address-text {
    color: #374151;
    font-size: 0.98rem;
    line-height: 1.7;
    padding-left: 32px;
}

body.dark-mode .address-text {
    color: #d1d5db;
}

hr {
    border: 0;
    height: 1px;
    background: #e5e7eb;
    margin: 2rem 0;
}

footer {
    color: #9ca3af;
    font-size: 0.85rem;
    margin-top: 3rem;
    padding-top: 1rem;
}

/* 响应式 */
@media (max-width: 800px) {
    .main {
        flex-direction: column;
        gap: 2rem;
        padding: 1.5rem;
    }
    .sidebar {
        position: static;
        width: 100%;
    }
    .sidebar-nav {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 1rem;
        border-top: none;
        padding-top: 0;
    }
    .pub-item {
        flex-direction: column;
        gap: 14px;
    }
    .pub-thumb {
        flex: none;
        max-width: 100%;
    }
}
