/* ============================================
   主站样式 - 现代简约风格
   ============================================ */

:root {
    --primary: #667eea;
    --primary-dark: #5a67d8;
    --secondary: #764ba2;
    --accent: #f093fb;
    --bg-primary: #0f0f23;
    --bg-secondary: #1a1a2e;
    --bg-card: #16213e;
    --text-primary: #ffffff;
    --text-secondary: #a0aec0;
    --border-color: rgba(255, 255, 255, 0.08);
    --shadow: 0 25px 50px -12px rgba(102, 126, 234, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
}

/* 背景装饰 */
body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 20% 50%, rgba(102, 126, 234, 0.08) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(118, 75, 162, 0.06) 0%, transparent 50%);
    z-index: -1;
    animation: bgFloat 20s ease-in-out infinite;
}

@keyframes bgFloat {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-30px, 30px); }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ========== 导航栏 ========== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(15, 15, 35, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.navbar.scrolled {
    background: rgba(15, 15, 35, 0.95);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.5px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

.logo-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(102, 126, 234, 0.5);
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.15);
}

.logo:hover .logo-icon {
    border-color: var(--primary);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.35);
}

/* 头像在关于区域 */
.about-avatar-img {
    width: 200px;
    height: 200px;
    border-radius: 24px;
    object-fit: cover;
    border: 4px solid transparent;
    background: linear-gradient(var(--bg-primary), var(--bg-primary)) padding-box,
                linear-gradient(135deg, var(--primary), var(--accent)) border-box;
    box-shadow: 0 20px 45px rgba(102, 126, 234, 0.25);
}

/* 页脚品牌头像 */
.footer-logo-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    object-fit: cover;
    margin-bottom: 16px;
    border: 2px solid rgba(102, 126, 234, 0.3);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 8px;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 8px 18px;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary);
    background: rgba(102, 126, 234, 0.1);
}

/* 移动端菜单按钮 */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
}

/* ========== Hero 区域 ========== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 80px;
    padding: 120px 40px 80px;
    max-width: 1300px;
    margin: 0 auto;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.12) 0%, transparent 70%);
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    pointer-events: none;
}

.hero-content {
    max-width: 620px;
    z-index: 1;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(102, 126, 234, 0.12);
    border: 1px solid rgba(102, 126, 234, 0.25);
    padding: 8px 18px;
    border-radius: 30px;
    font-size: 13px;
    color: var(--primary);
    margin-bottom: 28px;
    animation: fadeInUp 0.8s ease;
}

.hero-badge::before {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}

.hero h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 24px;
    letter-spacing: -1px;
    animation: fadeInUp 0.8s ease 0.1s both;
}

.highlight {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
}

.subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 36px;
    line-height: 1.7;
    animation: fadeInUp 0.8s ease 0.2s both;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    animation: fadeInUp 0.8s ease 0.3s both;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 45px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.06);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(102, 126, 234, 0.5);
    transform: translateY(-3px);
}

/* Hero 右侧动画区 */
.hero-visual {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
    animation: fadeInRight 1s ease 0.5s both;
}

/* 数据统计卡片 */
.hero-stats {
    display: flex;
    gap: 20px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    padding: 28px 24px;
    text-align: center;
    min-width: 120px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.stat-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 45px rgba(102, 126, 234, 0.15);
    border-color: rgba(102, 126, 234, 0.3);
}

.stat-card:hover::before {
    transform: scaleX(1);
}

.stat-card.stat-1 { animation: fadeInUp 0.8s ease 0.8s both; }
.stat-card.stat-2 { animation: fadeInUp 0.8s ease 1s both; }
.stat-card.stat-3 { animation: fadeInUp 0.8s ease 1.2s both; }

.stat-number {
    font-size: 32px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 6px;
}

.stat-label {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* 装饰元素 */
.hero-decoration {
    position: relative;
    width: 320px;
    height: 280px;
}

.deco-circle {
    position: absolute;
    border-radius: 50%;
    border: 2px solid;
    opacity: 0.15;
}

.deco-circle.deco-1 {
    width: 200px;
    height: 200px;
    top: 20px;
    left: 60px;
    border-color: var(--primary);
    animation: spinSlow 25s linear infinite;
}

.deco-circle.deco-2 {
    width: 160px;
    height: 160px;
    top: 50px;
    left: 80px;
    border-color: var(--secondary);
    animation: spinSlow 20s linear infinite reverse;
}

.deco-circle.deco-3 {
    width: 120px;
    height: 120px;
    top: 80px;
    left: 100px;
    border-color: var(--accent);
    animation: spinSlow 15s linear infinite;
}

@keyframes spinSlow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.floating-icon {
    position: absolute;
    font-size: 36px;
    filter: drop-shadow(0 4px 10px rgba(0,0,0,0.3));
    animation: floatIcon 4s ease-in-out infinite;
}

.floating-icon.float-1 {
    top: 10px;
    right: 30px;
    animation-delay: 0s;
}

.floating-icon.float-2 {
    bottom: 40px;
    left: 20px;
    animation-delay: 1.3s;
}

.floating-icon.float-3 {
    top: 120px;
    left: 130px;
    animation-delay: 2.6s;
}

@keyframes floatIcon {
    0%, 100% { 
        transform: translateY(0) rotate(-5deg); 
        opacity: 0.9; 
    }
    50% { 
        transform: translateY(-20px) rotate(5deg); 
        opacity: 1; 
    }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInRight {
    from { opacity: 0; transform: translateX(50px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes typeIn {
    from { opacity: 0; transform: translateX(-10px); }
    to { opacity: 1; transform: translateX(0); }
}

/* ========== Section 通用样式 ========== */
.section {
    padding: 120px 0;
    position: relative;
}

.section-title {
    text-align: center;
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 700;
    margin-bottom: 20px;
    letter-spacing: -0.5px;
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto 64px;
}

.section-title-wrapper {
    position: relative;
    margin-bottom: 64px;
}

.section-title-wrapper::after {
    content: '';
    position: absolute;
    bottom: -16px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 2px;
}

/* ========== 关于我 ========== */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-image {
    position: relative;
}

.about-avatar {
    width: 280px;
    height: 280px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 100px;
    position: relative;
    z-index: 1;
    box-shadow: 0 25px 50px rgba(102, 126, 234, 0.25);
}

.about-image::before {
    content: '';
    position: absolute;
    inset: -4px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 28px;
    z-index: -1;
    opacity: 0.5;
    filter: blur(20px);
}

.about-text p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    margin-bottom: 20px;
}

.tech-stack {
    margin-top: 32px;
}

.tech-stack h3 {
    font-size: 1.1rem;
    color: var(--primary);
    margin-bottom: 16px;
    font-weight: 600;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag {
    background: rgba(102, 126, 234, 0.1);
    color: var(--secondary);
    padding: 8px 18px;
    border-radius: 10px;
    font-size: 14px;
    border: 1px solid rgba(102, 126, 234, 0.2);
    transition: all 0.3s ease;
    cursor: default;
}

.tag:hover {
    background: rgba(102, 126, 234, 0.2);
    border-color: var(--primary);
    transform: translateY(-2px);
}

/* ========== 项目展示 ========== */
.projects {
    background: var(--bg-secondary);
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 28px;
}

.project-card {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 36px;
    border: 1px solid var(--border-color);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.project-card:hover {
    transform: translateY(-8px);
    border-color: rgba(102, 126, 234, 0.3);
    box-shadow: 0 30px 70px rgba(102, 126, 234, 0.15);
}

.project-card:hover::before {
    transform: scaleX(1);
}

.project-icon {
    width: 65px;
    height: 65px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15), rgba(118, 75, 162, 0.15));
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin-bottom: 22px;
}

.project-card h3 {
    font-size: 1.25rem;
    font-weight: 650;
    margin-bottom: 10px;
}

.project-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 20px;
    line-height: 1.6;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
}

.project-link:hover {
    color: var(--accent);
    gap: 10px;
}

/* ========== 博客占位 ========== */
.blog-placeholder {
    text-align: center;
    padding: 80px 20px;
    background: var(--bg-card);
    border-radius: 24px;
    border: 1px solid var(--border-color);
    max-width: 600px;
    margin: 0 auto;
}

.blog-icon {
    font-size: 64px;
    margin-bottom: 24px;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.blog-placeholder h3 {
    font-size: 1.5rem;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.blog-placeholder p {
    color: var(--text-secondary);
}

/* ========== 资源导航 ========== */
.resource-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.resource-card {
    background: var(--bg-card);
    border-radius: 18px;
    padding: 32px 24px;
    text-decoration: none;
    color: inherit;
    border: 1px solid var(--border-color);
    transition: all 0.4s ease;
    text-align: center;
    display: block;
}

.resource-card:hover {
    transform: translateY(-6px) scale(1.02);
    border-color: rgba(102, 126, 234, 0.4);
    background: linear-gradient(180deg, var(--bg-card), rgba(102, 126, 234, 0.08));
    box-shadow: 0 20px 50px rgba(102, 126, 234, 0.12);
}

.resource-icon {
    font-size: 38px;
    display: block;
    margin-bottom: 16px;
}

.resource-card span:last-child {
    font-size: 15px;
    font-weight: 550;
}

/* ========== 联系我 ========== */
.contact-content {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

.contact-content > p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 48px;
}

.contact-info {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--bg-card);
    padding: 18px 28px;
    border-radius: 14px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.contact-item:hover {
    border-color: var(--primary);
    transform: translateY(-3px);
}

.contact-icon {
    font-size: 24px;
}

.contact-item span:last-child {
    font-size: 14px;
    color: var(--text-secondary);
}

/* ========== 页脚 ========== */
.footer {
    position: relative;
    overflow: hidden;
    padding: 80px 0 40px;
    background: linear-gradient(180deg, var(--bg-primary) 0%, #080815 100%);
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.5), transparent);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* 页脚主体布局 */
.footer-main {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 56px;
    padding-bottom: 48px;
    border-bottom: 1px solid var(--border-color);
}

.footer-brand-section h3 {
    font-size: 22px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 16px;
}

.footer-desc {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.7;
    max-width: 280px;
}

.footer-links-section h4,
.footer-social-section h4 {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.footer-nav-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-nav-list a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.footer-nav-list a::before {
    content: '→';
    opacity: 0;
    transform: translateX(-8px);
    transition: all 0.3s ease;
}

.footer-nav-list a:hover {
    color: var(--primary);
    transform: translateX(6px);
}

.footer-nav-list a:hover::before {
    opacity: 1;
}

/* 社交链接 */
.social-icons {
    display: flex;
    gap: 14px;
}

.social-link {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    font-size: 18px;
    text-decoration: none;
    transition: all 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.social-link:hover {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-color: transparent;
    transform: translateY(-4px) scale(1.08);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.25);
}

/* 页脚底部 */
.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-copyright {
    color: rgba(160, 174, 192, 0.6);
    font-size: 13px;
}

.footer-copyright span {
    color: var(--primary);
}

.footer-legal {
    display: flex;
    align-items: center;
    gap: 20px;
}

.icp-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: rgba(102, 126, 234, 0.08);
    border: 1px solid rgba(102, 126, 234, 0.15);
    border-radius: 8px;
    font-size: 12px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
}

.icp-badge:hover {
    background: rgba(102, 126, 234, 0.15);
    border-color: rgba(102, 126, 234, 0.3);
    color: var(--primary);
}

.icp-badge::before {
    content: '🛡️';
}

/* ========== 响应式设计 ========== */
@media (max-width: 1024px) {
    .hero {
        flex-direction: column-reverse;
        text-align: center;
        padding: 120px 24px 80px;
        gap: 50px;
    }
    
    .hero-buttons {
        justify-content: center;
    }

    .code-window {
        width: 380px;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .about-image {
        display: flex;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    html { font-size: 15px; }
    
    .menu-toggle {
        display: block;
    }

    .nav-links {
        position: fixed;
        top: 68px;
        left: 0;
        right: 0;
        background: rgba(15, 15, 35, 0.98);
        flex-direction: column;
        padding: 20px;
        gap: 8px;
        transform: translateY(-110%);
        opacity: 0;
        transition: all 0.3s ease;
        border-bottom: 1px solid var(--border-color);
    }

    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
    }

    .nav-links a {
        padding: 14px;
        text-align: center;
    }

    .hero {
        min-height: auto;
        padding: 140px 20px 60px;
    }

    .code-window {
        width: 100%;
        max-width: 320px;
    }

    .section { padding: 80px 0; }
    
    .project-grid {
        grid-template-columns: 1fr;
    }

    .resource-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }

    .contact-info {
        flex-direction: column;
        align-items: center;
    }

    .footer-links {
        flex-wrap: wrap;
        gap: 16px;
    }
}

@media (max-width: 480px) {
    .resource-grid {
        grid-template-columns: 1fr;
    }

    .btn {
        padding: 12px 24px;
        font-size: 14px;
    }
}
