/* ===== 全局变量 & 重置 ===== */
:root {
    --primary: #00d4ff;
    --primary-dark: #0099cc;
    --accent: #7b2ff7;
    --bg-dark: #0a0e17;
    --bg-section: #0f1420;
    --bg-card: #161b2e;
    --text: #e4e8f1;
    --text-muted: #8892a8;
    --border: rgba(255,255,255,0.06);
    --gradient: linear-gradient(135deg, var(--primary), var(--accent));
    --shadow: 0 8px 32px rgba(0,0,0,0.3);
    --radius: 16px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: var(--bg-dark);
    color: var(--text);
    line-height: 1.7;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ===== 容器 ===== */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ===== 导航栏 ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(10, 14, 23, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    transition: var(--transition);
}

.navbar.scrolled {
    background: rgba(10, 14, 23, 0.95);
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.nav-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -1px;
}

.nav-logo .dot {
    color: var(--primary);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 8px;
}

.nav-link {
    padding: 8px 18px;
    border-radius: 8px;
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: var(--transition);
}

.nav-link:hover, .nav-link.active {
    color: var(--text);
    background: rgba(255,255,255,0.06);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: var(--transition);
}

/* ===== Hero ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    padding: 120px 24px 80px;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(ellipse 80% 60% at 50% 0%, rgba(0,212,255,0.12) 0%, transparent 60%),
        radial-gradient(ellipse 60% 50% at 80% 80%, rgba(123,47,247,0.08) 0%, transparent 60%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-greeting {
    font-size: 1.1rem;
    color: var(--primary);
    font-weight: 500;
    letter-spacing: 2px;
    margin-bottom: 12px;
}

.hero-name {
    font-size: clamp(3rem, 8vw, 5.5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 16px;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-title {
    font-size: 1.4rem;
    color: var(--text);
    font-weight: 500;
    margin-bottom: 8px;
}

.hero-subtitle {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 40px;
}

.hero-cta {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 14px 32px;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: var(--gradient);
    color: #fff;
    box-shadow: 0 4px 20px rgba(0,212,255,0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0,212,255,0.4);
}

.btn-outline {
    background: transparent;
    color: var(--text);
    border: 1.5px solid rgba(255,255,255,0.2);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
    color: var(--text-muted);
    font-size: 1.2rem;
}

@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(10px); }
}

/* ===== 通用 Section ===== */
.section {
    padding: 100px 0;
    position: relative;
}

.section-dark {
    background: var(--bg-section);
}

.section-title {
    font-size: 2.2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 16px;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background: var(--gradient);
    margin: 16px auto 0;
    border-radius: 2px;
}

.section-desc {
    text-align: center;
    color: var(--text-muted);
    font-size: 1.05rem;
    margin-bottom: 50px;
}

/* ===== About 卡片 ===== */
.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-top: 50px;
}

.about-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 36px 28px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.about-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient);
    opacity: 0;
    transition: var(--transition);
}

.about-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
    border-color: rgba(0,212,255,0.15);
}

.about-card:hover::before {
    opacity: 1;
}

.card-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    background: rgba(0,212,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: var(--primary);
    margin-bottom: 20px;
}

.about-card h3 {
    font-size: 1.2rem;
    margin-bottom: 12px;
    font-weight: 600;
}

.about-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.8;
}

/* ===== Skills ===== */
.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
    margin-top: 50px;
}

.skill-category h3 {
    font-size: 1.1rem;
    margin-bottom: 24px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.skill-category h3 i {
    color: var(--primary);
}

.skill-bars {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.skill-item {
    width: 100%;
}

.skill-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.skill-bar {
    height: 8px;
    background: rgba(255,255,255,0.06);
    border-radius: 4px;
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    background: var(--gradient);
    border-radius: 4px;
    width: 0;
    transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag {
    padding: 8px 18px;
    background: rgba(0,212,255,0.08);
    border: 1px solid rgba(0,212,255,0.15);
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--primary);
    font-weight: 500;
    transition: var(--transition);
}

.tag:hover {
    background: rgba(0,212,255,0.15);
    transform: translateY(-2px);
}

/* ===== Hobbies ===== */
.hobbies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.hobby-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 40px 28px;
    text-align: center;
    transition: var(--transition);
}

.hobby-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow);
    border-color: rgba(0,212,255,0.15);
}

.hobby-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: #fff;
    margin: 0 auto 24px;
    box-shadow: 0 8px 24px rgba(0,212,255,0.25);
}

.hobby-card h3 {
    font-size: 1.2rem;
    margin-bottom: 12px;
    font-weight: 600;
}

.hobby-card p {
    color: var(--text-muted);
    font-size: 0.93rem;
    line-height: 1.8;
}

/* ===== Contact ===== */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 50px;
}

.contact-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px 24px;
    text-align: center;
    transition: var(--transition);
    display: block;
}

.contact-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
    border-color: rgba(0,212,255,0.2);
}

.contact-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(0,212,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: var(--primary);
    margin: 0 auto 16px;
}

.contact-card h3 {
    font-size: 1rem;
    margin-bottom: 8px;
    font-weight: 600;
}

.contact-card p {
    color: var(--text-muted);
    font-size: 0.88rem;
    word-break: break-all;
}

/* ===== Footer ===== */
.footer {
    padding: 32px 0;
    text-align: center;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ===== 动画 ===== */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeIn 0.8s forwards;
}

.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }
.delay-3 { animation-delay: 0.6s; }
.delay-4 { animation-delay: 0.8s; }

@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s, transform 0.7s;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        background: rgba(10,14,23,0.98);
        flex-direction: column;
        padding: 20px;
        gap: 4px;
        border-bottom: 1px solid var(--border);
    }

    .nav-links.open {
        display: flex;
    }

    .nav-toggle {
        display: flex;
    }

    .hero-name {
        font-size: 3rem;
    }

    .about-grid, .skills-container, .hobbies-grid, .contact-grid {
        grid-template-columns: 1fr;
    }

    .section {
        padding: 70px 0;
    }
}
