/* ===== 基础重置 & 全局变量 ===== */
:root {
    --bg: #F7F6FA;
    --brand: #A78BFA;
    --brand-light: #C4B5FD;
    --brand-dark: #8B6FDC;
    --text: #2D2B32;
    --text-secondary: #6B6776;
    --card-bg: rgba(255, 255, 255, 0.72);
    --card-border: rgba(255, 255, 255, 0.6);
    --glass-shadow: 0 8px 32px rgba(167, 139, 250, 0.10);
    --glass-blur: 16px;
    --radius: 20px;
    --font: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", sans-serif;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    color: var(--text);
    background: var(--bg);
    line-height: 1.8;
    min-height: 100vh;
}

/* 背景装饰 */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(ellipse at 20% 20%, rgba(167, 139, 250, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 60%, rgba(167, 139, 250, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 90%, rgba(196, 181, 253, 0.10) 0%, transparent 50%);
    pointer-events: none;
}

/* ===== 导航栏 ===== */
.navbar {
    position: fixed;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    width: calc(100% - 32px);
    max-width: 640px;
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 28px;
    background: var(--card-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--card-border);
    border-radius: 40px;
    box-shadow: var(--glass-shadow);
}

.nav-logo {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--brand);
    letter-spacing: 2px;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 6px;
}

.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.88rem;
    padding: 6px 14px;
    border-radius: 20px;
    transition: var(--transition);
    white-space: nowrap;
}

.nav-link:hover { color: var(--brand); background: rgba(167, 139, 250, 0.08); }

.nav-link.active {
    color: #fff;
    background: var(--brand);
}

/* ===== 版块 ===== */
.section {
    padding: 40px 20px;
}

.section:first-of-type { padding-top: 120px; }

.container {
    max-width: 800px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 24px;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 40px;
    height: 3px;
    background: var(--brand);
    border-radius: 2px;
    margin: 10px auto 0;
}

/* ===== 毛玻璃卡片 ===== */
.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    box-shadow: var(--glass-shadow);
    padding: 36px 40px;
    transition: var(--transition);
}

.glass-card:hover {
    box-shadow: 0 12px 40px rgba(167, 139, 250, 0.14);
}

/* ===== 基本信息版块 ===== */
.profile-card { text-align: center; }

.profile-card h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--text);
}

.profile-card h1 + p {
    color: var(--brand);
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 20px;
}

.profile-photo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--brand-light);
    box-shadow: 0 4px 16px rgba(167, 139, 250, 0.2);
    margin: 0 auto 20px;
}

.profile-info-table {
    margin: 0 auto 24px;
    border-collapse: collapse;
}

.profile-info-table td {
    padding: 6px 12px;
    font-size: 0.95rem;
}

.profile-info-table td:first-child {
    color: var(--text-secondary);
    text-align: right;
    font-weight: 500;
    width: 80px;
}

.profile-info-table td:last-child {
    text-align: left;
    color: var(--text);
}

/* 教育背景样式 */
.profile-card h2 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text);
    margin: 28px 0 14px;
    padding-top: 20px;
    border-top: 1px solid rgba(167, 139, 250, 0.2);
}

.profile-card ul {
    list-style: none;
    text-align: left;
    max-width: 520px;
    margin: 0 auto;
}

.profile-card ul li {
    padding: 8px 0;
    color: var(--text-secondary);
    font-size: 0.93rem;
    line-height: 1.7;
}

.profile-card ul li strong {
    color: var(--text);
}

/* ===== 技能版块 ===== */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.skill-category {
    background: rgba(167, 139, 250, 0.06);
    border-radius: 14px;
    padding: 24px;
}

.skill-category h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--brand-dark);
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--brand-light);
}

.skill-item {
    margin-bottom: 14px;
}

.skill-item:last-child { margin-bottom: 0; }

.skill-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: var(--text);
    margin-bottom: 5px;
}

.skill-pct {
    color: var(--brand);
    font-weight: 600;
    font-size: 0.85rem;
}

.skill-bar {
    height: 6px;
    background: rgba(167, 139, 250, 0.15);
    border-radius: 3px;
    overflow: hidden;
}

.skill-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--brand-light), var(--brand));
    border-radius: 3px;
    width: 0;
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== 经历 & 项目版块 ===== */
.entry {
    padding: 24px 0;
    border-bottom: 1px solid rgba(167, 139, 250, 0.12);
}

.entry:first-child { padding-top: 0; }
.entry:last-child { border-bottom: none; padding-bottom: 0; }

.entry h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 6px;
}

.entry-meta {
    font-size: 0.88rem;
    color: var(--brand);
    font-weight: 500;
    margin-bottom: 12px;
}

.entry blockquote {
    background: rgba(167, 139, 250, 0.05);
    border-left: 3px solid var(--brand-light);
    margin: 0 0 12px 0;
    padding: 10px 16px;
    border-radius: 0 8px 8px 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.7;
}

.entry ul {
    list-style: none;
    padding: 0;
}

.entry ul li {
    padding: 4px 0;
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.entry ul li::before {
    content: '▸';
    color: var(--brand-light);
    margin-right: 8px;
    font-size: 0.75rem;
}

/* ===== 加载动画 ===== */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 60px;
    transition: opacity 0.3s;
}

.loading.hidden { opacity: 0; pointer-events: none; }

.spinner {
    width: 36px;
    height: 36px;
    border: 3px solid rgba(167, 139, 250, 0.15);
    border-top-color: var(--brand);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ===== 页脚 ===== */
.footer {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
    .nav-inner {
        padding: 10px 16px;
        border-radius: 30px;
    }

    .nav-link {
        font-size: 0.78rem;
        padding: 5px 10px;
    }

    .section { padding: 30px 12px; }
    .section:first-of-type { padding-top: 100px; }

    .glass-card { padding: 24px 20px; }
    .section-title { font-size: 1.35rem; }

    .skills-grid {
        grid-template-columns: 1fr;
    }

    .profile-card h1 { font-size: 1.6rem; }
    .profile-photo { width: 96px; height: 96px; }
}

@media (max-width: 480px) {
    .nav-links { gap: 2px; }
    .nav-link { font-size: 0.72rem; padding: 4px 8px; border-radius: 16px; }
    .nav-logo { font-size: 1rem; }
}
