/* ==================== 基础 ==================== */
:root {
    --bg: #f8fafc;
    --card: #ffffff;
    --ink: #0f172a;
    --muted: #64748b;
    --border: #e2e8f0;
    --blue: #3b82f6;
    --violet: #7c3aed;
    --cyan: #06b6d4;
    --blue-soft: #eff6ff;
    --violet-soft: #f5f3ff;
    --cyan-soft: #ecfeff;
    --grad: linear-gradient(135deg, #3b82f6 0%, #7c3aed 55%, #06b6d4 100%);
    --radius: 16px;
    --shadow: 0 1px 3px rgba(15, 23, 42, .06), 0 10px 30px -12px rgba(15, 23, 42, .12);
    --shadow-lg: 0 20px 45px -20px rgba(15, 23, 42, .22);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, "system-ui", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    background: var(--bg);
    color: var(--ink);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

::selection {
    background: rgba(124, 58, 237, .18);
}

.container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 24px;
}

.grad-text {
    background: var(--grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .18em;
    color: var(--violet);
    text-transform: uppercase;
    margin-bottom: 12px;
}

.eyebrow::before {
    content: "";
    width: 22px;
    height: 2px;
    background: var(--grad);
    border-radius: 2px;
}

.section {
    padding: 90px 0;
}

.section-head {
    margin-bottom: 42px;
}

.section-head h2 {
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 800;
    letter-spacing: .02em;
    line-height: 1.2;
}

.section-head p {
    color: var(--muted);
    max-width: 560px;
    margin-top: 10px;
    font-size: 15px;
}

/* ==================== 导航 ==================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(248, 250, 252, .82);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid transparent;
    transition: border-color .25s, box-shadow .25s;
}

.navbar.scrolled {
    border-bottom-color: var(--border);
    box-shadow: 0 8px 24px -18px rgba(15, 23, 42, .25);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 66px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 17px;
    color: var(--ink);
    text-decoration: none;
    letter-spacing: .04em;
}

.brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: var(--grad);
    color: #fff;
    display: grid;
    place-items: center;
    font-weight: 800;
    font-size: 15px;
    box-shadow: 0 6px 16px -6px rgba(124, 58, 237, .5);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 28px;
    list-style: none;
}

.nav-links a {
    color: var(--muted);
    text-decoration: none;
    font-size: 14.5px;
    font-weight: 500;
    transition: color .2s;
    position: relative;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--ink);
}

.nav-links a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -5px;
    width: 0;
    height: 2px;
    background: var(--grad);
    border-radius: 2px;
    transition: width .25s;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: transform .2s, box-shadow .2s, background .2s;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--grad);
    color: #fff;
    box-shadow: 0 8px 20px -8px rgba(124, 58, 237, .55);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 28px -10px rgba(124, 58, 237, .6);
}

.btn-ghost {
    background: transparent;
    color: var(--ink);
    border: 1.5px solid var(--border);
}

.btn-ghost:hover {
    border-color: var(--violet);
    color: var(--violet);
    transform: translateY(-2px);
}

.btn-sm {
    padding: 7px 16px;
    font-size: 13px;
}

.menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 20px;
    color: var(--ink);
    cursor: pointer;
    padding: 6px;
}

/* ==================== Hero ==================== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    padding: 120px 0 80px;
}

#particle-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-inner {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 860px;
    margin: 0 auto;
}

.hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 16px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--border);
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
    box-shadow: var(--shadow);
    margin-bottom: 26px;
}

.hero-tag .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--grad);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.5); opacity: .6; }
}

.hero h1 {
    font-size: clamp(56px, 10vw, 88px);
    font-weight: 900;
    letter-spacing: .06em;
    line-height: 1.05;
    margin-bottom: 14px;
}

.hero h2 {
    font-size: clamp(20px, 3vw, 28px);
    font-weight: 700;
    margin-bottom: 20px;
}

.hero p.lead {
    color: var(--muted);
    font-size: 16.5px;
    max-width: 640px;
    margin: 0 auto 34px;
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 56px;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    max-width: 760px;
    margin: 0 auto;
}

.stat-card {
    background: rgba(255, 255, 255, .92);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 20px 12px;
    box-shadow: var(--shadow);
    transition: transform .25s, box-shadow .25s;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.stat-num {
    font-size: 30px;
    font-weight: 800;
    line-height: 1.1;
}

.stat-label {
    color: var(--muted);
    font-size: 13px;
    margin-top: 4px;
}

.scroll-hint {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--muted);
    font-size: 12.5px;
    letter-spacing: .14em;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    z-index: 1;
}

.scroll-hint i {
    animation: bob 1.6s infinite;
}

@keyframes bob {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(6px); }
}

/* ==================== 关于 / 核心竞争力 ==================== */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 18px;
    margin-bottom: 18px;
}

.core-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 26px;
    box-shadow: var(--shadow);
    transition: transform .25s, box-shadow .25s;
}

.core-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.core-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 18px;
    margin-bottom: 16px;
}

.core-icon.blue { background: linear-gradient(135deg, #60a5fa, #3b82f6); }
.core-icon.violet { background: linear-gradient(135deg, #a78bfa, #7c3aed); }
.core-icon.cyan { background: linear-gradient(135deg, #22d3ee, #06b6d4); }
.core-icon.indigo { background: linear-gradient(135deg, #818cf8, #6366f1); }
.core-icon.rose { background: linear-gradient(135deg, #fb7185, #f43f5e); }

.core-card h3 {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 8px;
}

.core-card p {
    color: var(--muted);
    font-size: 14px;
}

.edu-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    background: var(--card);
    border: 1px solid var(--border);
    border-left: 4px solid;
    border-image: var(--grad) 1;
    border-radius: var(--radius);
    padding: 24px 28px;
    box-shadow: var(--shadow);
    flex-wrap: wrap;
}

.edu-card .edu-name {
    font-size: 17px;
    font-weight: 700;
}

.edu-card .edu-meta {
    color: var(--muted);
    font-size: 14px;
    margin-top: 4px;
}

.edu-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 600;
}

.badge-blue { background: var(--blue-soft); color: #2563eb; }
.badge-violet { background: var(--violet-soft); color: #7c3aed; }
.badge-cyan { background: var(--cyan-soft); color: #0891b2; }

/* ==================== 技能栈 ==================== */
.skill-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 16px;
}

.skill-group {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px 24px;
    box-shadow: var(--shadow);
}

.skill-group h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 14px;
}

.skill-group h3 i {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    display: grid;
    place-items: center;
    font-size: 13px;
    color: #fff;
    background: var(--grad);
}

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chip {
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 500;
    background: var(--bg);
    border: 1px solid var(--border);
    color: #334155;
}

.chip.ai {
    background: var(--cyan-soft);
    border-color: #a5f3fc;
    color: #0e7490;
}

/* ==================== 经历时间线 ==================== */
.timeline {
    position: relative;
    padding-left: 34px;
}

.timeline::before {
    content: "";
    position: absolute;
    left: 10px;
    top: 6px;
    bottom: 6px;
    width: 2px;
    background: linear-gradient(to bottom, #3b82f6, #7c3aed, #06b6d4);
    border-radius: 2px;
    opacity: .45;
}

.tl-item {
    position: relative;
    margin-bottom: 26px;
}

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

.tl-dot {
    position: absolute;
    left: -34px;
    top: 8px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #fff;
    border: 4px solid #7c3aed;
    box-shadow: 0 0 0 5px rgba(124, 58, 237, .12);
}

.tl-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 26px 28px;
    box-shadow: var(--shadow);
}

.tl-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}

.tl-head h3 {
    font-size: 19px;
    font-weight: 800;
}

.tl-head .role {
    color: var(--violet);
    font-weight: 600;
    font-size: 14.5px;
    margin-top: 2px;
}

.tl-date {
    padding: 6px 14px;
    border-radius: 999px;
    background: var(--violet-soft);
    color: #7c3aed;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.tl-summary {
    color: var(--muted);
    font-size: 14.5px;
    margin-bottom: 12px;
}

.tl-list {
    list-style: none;
    display: grid;
    gap: 8px;
}

.tl-list li {
    position: relative;
    padding-left: 20px;
    font-size: 14.5px;
    color: #334155;
}

.tl-list li::before {
    content: "\f105";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    left: 2px;
    top: 1px;
    color: var(--violet);
    font-size: 12px;
}

.tl-list strong {
    color: var(--ink);
}

.mini-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

/* ==================== 项目精选 ==================== */
.proj-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 18px;
}

.proj-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform .25s, box-shadow .25s;
    display: flex;
    flex-direction: column;
}

.proj-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.proj-cover {
    height: 8px;
    background: var(--grad);
}

.proj-body {
    padding: 22px 24px 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.proj-badge {
    align-self: flex-start;
    margin-bottom: 10px;
}

.proj-body h3 {
    font-size: 17.5px;
    font-weight: 800;
    margin-bottom: 8px;
}

.proj-body p {
    color: var(--muted);
    font-size: 14px;
    flex: 1;
}

.proj-stats {
    display: flex;
    gap: 12px;
    margin-top: 14px;
    flex-wrap: wrap;
}

.proj-stat {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--violet);
}

/* ==================== 联系 ==================== */
.contact-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 24px;
    box-shadow: var(--shadow-lg);
    padding: 44px 40px;
    text-align: center;
    max-width: 720px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
}

.contact-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: var(--grad);
}

.contact-card h2 {
    font-size: 30px;
    font-weight: 800;
    margin-bottom: 8px;
}

.contact-card > p {
    color: var(--muted);
    margin-bottom: 28px;
}

.contact-list {
    list-style: none;
    display: grid;
    gap: 14px;
    margin-bottom: 30px;
}

.contact-list li {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 15px;
}

.contact-list i {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    color: #fff;
    background: var(--grad);
    font-size: 13px;
}

.contact-list a {
    color: var(--ink);
    text-decoration: none;
}

.contact-list a:hover {
    color: var(--violet);
}

/* ==================== 页脚 ==================== */
.footer {
    border-top: 1px solid var(--border);
    padding: 30px 0;
    text-align: center;
    color: var(--muted);
    font-size: 13.5px;
    background: #fff;
}

.footer a {
    color: var(--violet);
    text-decoration: none;
}

/* ==================== 入场动画 ==================== */
.reveal {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity .6s ease, transform .6s ease;
}

.reveal.visible {
    opacity: 1;
    transform: none;
}

/* ==================== 响应式 ==================== */
@media (max-width: 860px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 66px;
        left: 0;
        right: 0;
        background: #fff;
        border-bottom: 1px solid var(--border);
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 10px 24px 18px;
        box-shadow: 0 20px 30px -20px rgba(15, 23, 42, .25);
    }

    .nav-links.open {
        display: flex;
    }

    .nav-links li {
        padding: 10px 0;
        border-bottom: 1px dashed var(--border);
    }

    .nav-links li:last-child {
        border-bottom: none;
    }

    .nav-cta {
        margin-top: 12px;
    }

    .menu-btn {
        display: block;
    }

    .hero-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .section {
        padding: 64px 0;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 18px;
    }

    .hero-stats {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .stat-num {
        font-size: 24px;
    }

    .tl-card,
    .contact-card {
        padding: 20px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}
