/* ===== 全局重置 & 基础 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    background: #f4f7fb;
    color: #1e293b;
    display: flex;
    min-height: 100vh;
}

a {
    color: inherit;
    text-decoration: none;
}

/* ===== 左侧菜单栏 – 毛玻璃（更通透） ===== */
.sidebar {
    width: 280px;
    background: rgba(243, 232, 255, 0.25);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-right: 1px solid rgba(255, 255, 255, 0.40);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
    color: #2d1b69;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    overflow-y: auto;
    z-index: 100;
    transition: transform 0.3s ease;
}

.sidebar-brand {
    padding: 28px 24px 18px 24px;
    border-bottom: 1px solid rgba(45, 27, 105, 0.08);
}

.sidebar-brand .name {
    font-size: 22px;
    font-weight: 700;
    color: #2d1b69;
    letter-spacing: 0.5px;
}

.sidebar-brand .name small {
    font-weight: 400;
    font-size: 16px;
    color: #5b3a8c;
    display: block;
    margin-top: 4px;
}

.sidebar-brand .badge {
    display: inline-block;
    margin-top: 10px;
    background: rgba(109, 40, 217, 0.12);
    color: #4c1d95;
    font-size: 12px;
    padding: 4px 14px;
    border-radius: 20px;
    border: 1px solid rgba(109, 40, 217, 0.10);
}

/* ===== 菜单列表 ===== */
.menu {
    flex: 1;
    padding: 16px 12px 20px 12px;
    list-style: none;
}

.menu-item {
    margin-bottom: 2px;
}

.menu-item .menu-link {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    color: #3b2a6b;
    transition: all 0.15s ease;
    cursor: pointer;
    gap: 10px;
}

.menu-item .menu-link:hover {
    background: rgba(109, 40, 217, 0.12);
    color: #1e0f4a;
}

.menu-item .menu-link.active {
    background: rgba(109, 40, 217, 0.18);
    color: #3b1d8a;
    font-weight: 600;
}

.menu-item .menu-link .arrow {
    margin-left: auto;
    font-size: 12px;
    transition: transform 0.25s ease;
    color: #6b4c9a;
}

.menu-item .menu-link .arrow.open {
    transform: rotate(90deg);
}

/* ===== 二级菜单 ===== */
.submenu {
    list-style: none;
    padding-left: 20px;
    margin: 2px 0 6px 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, opacity 0.25s ease;
    opacity: 0;
}

.submenu.open {
    max-height: 1200px;
    opacity: 1;
}

.submenu .sub-link {
    display: block;
    padding: 7px 16px 7px 32px;
    font-size: 13px;
    font-weight: 400;
    color: #4b3a72;
    border-radius: 8px;
    transition: all 0.12s ease;
    cursor: pointer;
    border-left: 2px solid transparent;
}

.submenu .sub-link:hover {
    background: rgba(109, 40, 217, 0.08);
    color: #1e0f4a;
    border-left-color: #7c3aed;
}

.submenu .sub-link.active {
    color: #3b1d8a;
    background: rgba(109, 40, 217, 0.12);
    border-left-color: #7c3aed;
    font-weight: 500;
}

/* ===== 右侧内容区 ===== */
.main {
    margin-left: 280px;
    flex: 1;
    padding: 48px 56px 80px 56px;
    min-height: 100vh;
    background: #f4f7fb;
}

.page-section {
    display: none;
    animation: fadeUp 0.35s ease forwards;
}

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

@keyframes fadeUp {
    0% {
        opacity: 0;
        transform: translateY(18px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== 内容样式 ===== */
.section-title {
    font-size: 26px;
    font-weight: 700;
    color: #0f1a2f;
    margin-bottom: 6px;
    letter-spacing: -0.3px;
}

.section-sub {
    color: #64748b;
    font-size: 15px;
    margin-bottom: 28px;
    border-bottom: 2px solid #e9edf4;
    padding-bottom: 16px;
}

.card {
    background: #ffffff;
    border-radius: 16px;
    padding: 24px 28px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    border: 1px solid #eaedf2;
    transition: box-shadow 0.2s ease;
}

.card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    color: #0f1a2f;
    margin-bottom: 8px;
}

.card-meta {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 18px;
}

.card-meta .tag {
    background: #f1f5f9;
    padding: 2px 12px;
    border-radius: 20px;
    font-size: 12px;
    color: #475569;
}

.card-body {
    font-size: 15px;
    line-height: 1.75;
    color: #1e293b;
}

.card-body ul {
    padding-left: 22px;
    margin: 8px 0 4px 0;
}

.card-body ul li {
    margin-bottom: 4px;
}

.card-body ul li::marker {
    color: #7c3aed;
}

.tag-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 6px;
}

.tag-group .skill-tag {
    background: #eef2ff;
    color: #1e40af;
    padding: 4px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid #dbeafe;
}

.tag-group .skill-tag.light {
    background: #f1f5f9;
    color: #334155;
    border-color: #e2e8f0;
}

.badge-blue {
    display: inline-block;
    background: #dbeafe;
    color: #1e40af;
    font-size: 12px;
    font-weight: 600;
    padding: 2px 12px;
    border-radius: 20px;
    margin-right: 6px;
}

.paper-link {
    color: #2563eb;
    font-weight: 500;
    word-break: break-all;
}

.paper-link:hover {
    text-decoration: underline;
}

.timeline-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #38bdf8;
    border-radius: 50%;
    margin-right: 8px;
}

/* ===== Home 特殊样式 ===== */
.hero-name {
    font-size: 36px;
    font-weight: 700;
    color: #0f1a2f;
    letter-spacing: -0.5px;
}

.hero-name small {
    font-size: 20px;
    font-weight: 400;
    color: #475569;
    margin-left: 10px;
}

.hero-title {
    font-size: 18px;
    color: #334155;
    margin-top: 4px;
    margin-bottom: 12px;
}

.hero-title .highlight {
    color: #7c3aed;
    font-weight: 600;
}

.hero-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 20px 40px;
    margin: 18px 0 10px 0;
}

.hero-stats .stat-item {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.hero-stats .stat-num {
    font-size: 28px;
    font-weight: 700;
    color: #0f1a2f;
}

.hero-stats .stat-label {
    color: #64748b;
    font-size: 14px;
}

/* ===== 移动端响应式 ===== */
@media (max-width: 820px) {
    .sidebar {
        transform: translateX(-100%);
        width: 280px;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main {
        margin-left: 0;
        /* 增加顶部内边距，为固定菜单按钮留出空间，避免遮挡标题 */
        padding: 70px 20px 60px 20px;
    }

    .menu-toggle {
        display: flex !important;
    }

    .hero-name {
        font-size: 28px;
    }

    .hero-name small {
        font-size: 16px;
        display: block;
        margin-left: 0;
    }
}

/* ===== 移动端汉堡按钮（毛玻璃） ===== */
.menu-toggle {
    display: none;
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 200;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #2d1b69;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 22px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.menu-toggle:hover {
    background: rgba(255, 255, 255, 0.8);
}

/* ===== 遮罩层 – 模糊玻璃，不再变黑 ===== */
.overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 50;
}

.overlay.show {
    display: block;
}

/* ===== 滚动条 (毛玻璃配套) ===== */
.sidebar::-webkit-scrollbar {
    width: 4px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(109, 40, 217, 0.2);
    border-radius: 10px;
}