/* ========================================
   CSS Variables & Theme
   ======================================== */
:root {
    /* Light Theme (Default) - 纯白背景 + 卡片阴影区分 */
    --bg-primary: #ffffff;
    --bg-secondary: #f5f5f5;
    --bg-tertiary: #eeeeee;
    --bg-card: #ffffff;
    --bg-card-hover: #fafafa;
    
    --text-primary: #111111;
    --text-secondary: #555555;
    --text-muted: #888888;
    
    --accent: #7C3AED;
    --accent-hover: #6D28D9;
    --accent-light: rgba(124, 58, 237, 0.1);
    --accent-gradient: linear-gradient(135deg, #7C3AED 0%, #a855f7 50%, #ec4899 100%);
    
    --border-color: rgba(0, 0, 0, 0.08);
    --border-color-light: rgba(0, 0, 0, 0.12);
    
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.1);
    --shadow-accent: 0 4px 20px rgba(124, 58, 237, 0.2);
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    
    --transition-fast: 0.2s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    --container-width: 1400px;
    --header-height: 70px;
}

/* Dark Theme */
[data-theme="dark"] {
    --bg-primary: #0a0a0a;
    --bg-secondary: #111111;
    --bg-tertiary: #1a1a1a;
    --bg-card: #151515;
    --bg-card-hover: #1f1f1f;
    
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --text-muted: #666666;
    
    --accent: #8D6FF6;
    --accent-hover: #a78bfa;
    --accent-light: rgba(141, 111, 246, 0.15);
    --accent-gradient: linear-gradient(135deg, #8D6FF6 0%, #c084fc 50%, #f472b6 100%);
    
    --border-color: rgba(255, 255, 255, 0.08);
    --border-color-light: rgba(255, 255, 255, 0.12);
    
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
    --shadow-accent: 0 4px 20px rgba(141, 111, 246, 0.3);
}

/* ========================================
   Reset & Base
   ======================================== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    transition: background 0.3s ease;
}

body {
    font-family: 'Noto Sans SC', 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color var(--transition-base), color var(--transition-base), background var(--transition-base);
    overflow-x: hidden;
}

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

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

ul, ol {
    list-style: none;
}

/* ========================================
   Typography
   ======================================== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
}

h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }
h4 { font-size: 1.25rem; }

p {
    color: var(--text-secondary);
}

/* ========================================
   Layout
   ======================================== */
.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-subtitle {
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 12px;
}

.section-title {
    font-size: clamp(2rem, 4vw, 2.5rem);
    color: var(--text-primary);
}

/* ========================================
   Navigation
   ======================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    z-index: 1000;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    transition: all var(--transition-base), background 0.3s ease;
}

[data-theme="dark"] .navbar {
    background: rgba(10, 10, 10, 0.9);
}

.nav-container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-family: 'Playfair Display', serif;
    font-size: 28px;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 40px;
}

.nav-link {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-secondary);
    position: relative;
    transition: color var(--transition-fast);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-gradient);
    transition: width var(--transition-base);
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
}

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

.nav-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.theme-toggle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.theme-toggle:hover {
    background: var(--accent-light);
    color: var(--accent);
}

.theme-toggle .sun-icon {
    display: none;
}

.theme-toggle .moon-icon {
    display: block;
}

[data-theme="light"] .theme-toggle .sun-icon {
    display: block;
}

[data-theme="light"] .theme-toggle .moon-icon {
    display: none;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    gap: 6px;
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: all var(--transition-fast);
}

@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--bg-primary);
        flex-direction: column;
        justify-content: center;
        gap: 32px;
        opacity: 0;
        visibility: hidden;
        transition: all var(--transition-base);
    }
    
    .nav-menu.active {
        opacity: 1;
        visibility: visible;
    }
    
    .nav-link {
        font-size: 24px;
    }
}

/* ========================================
   Buttons
   ======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 32px;
    font-size: 15px;
    font-weight: 500;
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
}

.btn-primary {
    background: var(--accent-gradient);
    color: white;
    box-shadow: var(--shadow-accent);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(141, 111, 246, 0.4);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--border-color-light);
    color: var(--text-primary);
}

.btn-outline:hover {
    border-color: var(--accent);
    background: var(--accent-light);
}

.btn-link {
    padding: 8px 0;
    color: var(--accent);
    gap: 8px;
}

.btn-link:hover {
    gap: 12px;
}

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

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top left, rgba(139, 92, 246, 0.1) 0%, rgba(139, 92, 246, 0.04) 50%, transparent 80%);
    z-index: 0;
    pointer-events: none;
}

.hero-content {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-text {
    position: relative;
    z-index: 2;
}

.hero-greeting {
    font-size: 18px;
    color: var(--accent);
    margin-bottom: 8px;
    letter-spacing: 1px;
}

.hero-name {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 16px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-title {
    font-size: 20px;
    font-weight: 400;
    color: var(--text-secondary);
    margin-bottom: 24px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.title-item {
    color: var(--text-primary);
}

.title-separator {
    color: var(--accent);
    opacity: 0.6;
}

.hero-tagline {
    font-size: 16px;
    color: var(--text-muted);
    margin-bottom: 40px;
}

.hero-cta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.hero-visual {
    position: relative;
    height: 500px;
    overflow: visible;
}

/* 背景光晕 */
.hero-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.4;
    pointer-events: none;
}

.glow-1 {
    width: 300px;
    height: 300px;
    background: var(--accent);
    top: 10%;
    left: 20%;
    opacity: 0.15;
    animation: glowPulse 6s ease-in-out infinite;
}

.glow-2 {
    width: 250px;
    height: 250px;
    background: linear-gradient(135deg, #f472b6, #8D6FF6);
    bottom: 15%;
    right: 10%;
    opacity: 0.12;
    animation: glowPulse 8s ease-in-out infinite 2s;
}

@keyframes glowPulse {
    0%, 100% { 
        transform: scale(1); 
        opacity: 0.15;
    }
    50% { 
        transform: scale(1.2); 
        opacity: 0.25;
    }
}

.hero-shape {
    position: absolute;
    border-radius: var(--radius-lg);
}



/* 空心方形 */
.shape-2 {
    width: 160px;
    height: 160px;
    background: transparent;
    border: 4px solid rgba(139, 92, 246, 0.5);
    opacity: 1;
    top: 30%;
    right: 20%;
    transform: rotate(45deg);
    filter: blur(1px);
    animation: rotate 30s linear infinite;
}

/* 带渐变的紫球 */
.shape-3 {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #8b5cf6 0%, #c084fc 50%, #f0abfc 100%);
    opacity: 1;
    bottom: 18%;
    left: 22%;
    border-radius: 50%;
    filter: blur(1px);
    animation: pulse 6s ease-in-out infinite;
}



.hero-cards {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
}

.hero-card {
    position: absolute;
    background: var(--bg-card);
    border: 2px solid rgba(139, 92, 246, 0.3);
    border-radius: var(--radius-md);
    padding: 16px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: transform var(--transition-base);
}

.hero-card:hover {
    transform: scale(1.05);
}

.card-1 {
    top: 10%;
    right: 5%;
    animation: float 6s ease-in-out infinite;
}

.card-2 {
    top: 45%;
    left: 0;
    animation: float 7s ease-in-out infinite 1s;
}

.card-3 {
    bottom: 10%;
    right: 10%;
    animation: float 8s ease-in-out infinite 0.5s;
}

.card-number {
    font-size: 24px;
    font-weight: 700;
    color: var(--accent);
    font-family: 'DM Sans', sans-serif;
    letter-spacing: -1px;
    position: relative;
}

.card-number::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent-gradient);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition-base);
}

.hero-card:hover .card-number::after {
    transform: scaleX(1);
}

.card-text {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 12px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.scroll-line {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, var(--accent), transparent);
    animation: scrollDown 2s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

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

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.4; }
    50% { transform: scale(1.15); opacity: 0.5; }
}

/* 装饰元素：圆点 */
.hero-decor {
    position: absolute;
    pointer-events: none;
}

.dot {
    border-radius: 50%;
    background: var(--accent);
}

.dot-1 {
    width: 8px;
    height: 8px;
    top: 15%;
    right: 25%;
    opacity: 0.4;
    animation: dotFloat 4s ease-in-out infinite;
}

.dot-2 {
    width: 6px;
    height: 6px;
    top: 35%;
    left: 15%;
    opacity: 0.3;
    animation: dotFloat 5s ease-in-out infinite 1s;
    background: #f472b6;
}

.dot-3 {
    width: 10px;
    height: 10px;
    bottom: 30%;
    right: 20%;
    opacity: 0.5;
    animation: dotFloat 6s ease-in-out infinite 0.5s;
    background: #a855f7;
}

@keyframes dotFloat {
    0%, 100% { 
        transform: translateY(0) scale(1); 
        opacity: 0.4;
    }
    50% { 
        transform: translateY(-15px) scale(1.2); 
        opacity: 0.7;
    }
}

/* 装饰元素：线条 */
.line {
    position: absolute;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: 0.2;
}

.line-1 {
    width: 60px;
    height: 1px;
    top: 25%;
    right: 15%;
    transform: rotate(-30deg);
    animation: lineDash 3s ease-in-out infinite;
}

.line-2 {
    width: 40px;
    height: 1px;
    bottom: 40%;
    left: 10%;
    transform: rotate(45deg);
    animation: lineDash 4s ease-in-out infinite 1.5s;
    background: linear-gradient(90deg, transparent, #f472b6, transparent);
}

@keyframes lineDash {
    0%, 100% { 
        opacity: 0.2; 
        transform: rotate(-30deg) scaleX(1);
    }
    50% { 
    opacity: 1;
        transform: rotate(-30deg) scaleX(1.3);
    }
}

/* 装饰元素：圆环 */
.ring {
    border: 1px solid;
    border-radius: 50%;
    opacity: 0.15;
}

.ring-1 {
    width: 80px;
    height: 80px;
    top: 20%;
    left: 25%;
    border-color: var(--accent);
    animation: ringRotate 15s linear infinite, ringPulse 4s ease-in-out infinite;
}

.ring-2 {
    width: 50px;
    height: 50px;
    bottom: 25%;
    right: 25%;
    border-color: #f472b6;
    animation: ringRotate 12s linear infinite reverse, ringPulse 5s ease-in-out infinite 1s;
}

@keyframes ringRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes ringPulse {
    0%, 100% { 
        opacity: 0.15; 
        transform: rotate(0deg) scale(1);
    }
    50% { 
        opacity: 0.3; 
        transform: rotate(180deg) scale(1.1);
    }
}

/* 粒子 */
.hero-particle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    background: var(--accent-gradient);
    opacity: 0.6;
}

.particle-1 {
    width: 4px;
    height: 4px;
    top: 20%;
    right: 30%;
    animation: particleFloat 7s ease-in-out infinite;
}

.particle-2 {
    width: 3px;
    height: 3px;
    top: 40%;
    left: 20%;
    animation: particleFloat 9s ease-in-out infinite 1s;
    background: #f472b6;
}

.particle-3 {
    width: 5px;
    height: 5px;
    bottom: 35%;
    right: 15%;
    animation: particleFloat 8s ease-in-out infinite 2s;
    background: #a855f7;
}

.particle-4 {
    width: 2px;
    height: 2px;
    top: 60%;
    right: 35%;
    animation: particleFloat 10s ease-in-out infinite 0.5s;
    opacity: 0.4;
}

.particle-5 {
    width: 3px;
    height: 3px;
    bottom: 20%;
    left: 30%;
    animation: particleFloat 6s ease-in-out infinite 1.5s;
    background: #ec4899;
    opacity: 0.5;
}

@keyframes particleFloat {
    0% { 
        transform: translate(0, 0) scale(1); 
        opacity: 0.6;
    }
    25% { 
        transform: translate(10px, -15px) scale(1.2); 
        opacity: 0.8;
    }
    50% { 
        transform: translate(-5px, -25px) scale(0.8); 
        opacity: 0.4;
    }
    75% { 
        transform: translate(-15px, -10px) scale(1.1); 
        opacity: 0.7;
    }
    100% { 
        transform: translate(0, 0) scale(1); 
        opacity: 0.6;
    }
}

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

@media (max-width: 968px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-cta {
        justify-content: center;
    }
    
    .hero-visual {
        display: none;
    }
}

/* ========================================
   Featured Works Section
   ======================================== */
.featured-works {
    padding: 120px 0;
    background: var(--bg-secondary);
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 60px;
}

.featured-item {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    display: block;
    text-decoration: none;
    color: inherit;
}

a.featured-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
}

/* 心色调 - 第1行，占2列 */
.featured-item:nth-child(1) {
    grid-column: span 2;
}

/* 智考 - 第1行，占2列 */
.featured-item:nth-child(2) {
    grid-column: span 2;
}

/* 求知 - 第2行左边，占2列 */
.featured-item:nth-child(3) {
    grid-column: span 2;
}

/* 电商1、电商2 - 第2行右边，并排各占1列 */
.featured-item:nth-child(4),
.featured-item:nth-child(5) {
    grid-column: span 1;
}

/* Responsive */
@media (max-width: 768px) {
    .featured-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .featured-item:nth-child(1),
    .featured-item:nth-child(2),
    .featured-item:nth-child(3) {
        grid-column: span 2;
    }
    
    .featured-item:nth-child(4),
    .featured-item:nth-child(5) {
        grid-column: span 1;
    }
}

.category-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 24px;
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    height: 100%;
    box-sizing: border-box;
}

.category-name {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.category-desc {
    font-size: 14px;
    opacity: 0.9;
    text-shadow: 0 1px 6px rgba(0,0,0,0.3);
}

/* Responsive */
@media (max-width: 768px) {
    .featured-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
}

.featured-image {
    position: relative;
    aspect-ratio: auto;
    overflow: hidden;
    background: #ffffff;
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

[data-theme="dark"] .featured-image {
    background: #1a1a1a;
}

.featured-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform var(--transition-slow);
}

.featured-item:hover .featured-image img {
    transform: scale(1.08);
}

.featured-overlay {
    position: absolute;
    top: 16px;
    left: 16px;
    opacity: 0;
    transition: opacity var(--transition-base);
}

.featured-item:hover .featured-overlay {
    opacity: 1;
}

.featured-category {
    background: var(--accent);
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.featured-info {
    padding: 20px 0;
}

.featured-info h3 {
    font-size: 20px;
    margin-bottom: 6px;
    color: var(--text-primary);
}

.featured-info p {
    font-size: 14px;
    color: var(--text-muted);
}

.featured-more {
    text-align: center;
    margin-top: 60px;
}

@media (max-width: 768px) {
    .featured-grid {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   Skills Section
   ======================================== */
.skills-section {
    padding: 120px 0;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.skill-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 40px 30px;
    text-align: center;
    transition: all var(--transition-base);
}

.skill-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent);
    box-shadow: var(--shadow-accent);
}

.skill-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-light);
    border-radius: 50%;
    color: var(--accent);
}

.skill-card h3 {
    font-size: 20px;
    margin-bottom: 8px;
    color: var(--text-primary);
}

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

@media (max-width: 968px) {
    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 580px) {
    .skills-grid {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   Stats Section
   ======================================== */
.stats-section {
    padding: 80px 0;
    background: var(--bg-secondary);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    text-align: center;
}

.stat-item {
    padding: 20px;
}

.stat-number {
    display: block;
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 16px;
    color: var(--text-secondary);
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ========================================
   Footer
   ======================================== */
.footer {
    padding: 60px 0 30px;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand .logo {
    display: inline-block;
    margin-bottom: 12px;
}

.footer-brand p {
    font-size: 14px;
    color: var(--text-muted);
}

.footer-links {
    display: flex;
    gap: 32px;
}

.footer-links a {
    font-size: 15px;
    color: var(--text-secondary);
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: var(--accent);
}

.footer-social {
    display: flex;
    gap: 16px;
}

.footer-social a {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.footer-social a:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
}

.footer-bottom p {
    font-size: 14px;
    color: var(--text-muted);
}

@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* ========================================
   Page Header (通用页面头部)
   ======================================== */
.page-header {
    padding: 160px 0 80px;
    text-align: center;
    position: relative;
    background: 
        radial-gradient(ellipse 60% 50% at 50% 0%, rgba(141, 111, 246, 0.12), transparent);
}

.page-header h1 {
    font-family: 'Playfair Display', serif;
    margin-bottom: 16px;
}

.page-header p {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* ========================================
   About Page
   ======================================== */
.about-section {
    padding: 80px 0;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 60px;
    align-items: start;
}

.about-image {
    position: relative;
    aspect-ratio: 3/4;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--bg-card);
}

.about-image::before {
    content: '';
    position: absolute;
    inset: 0;
    border: 2px solid var(--accent);
    border-radius: var(--radius-lg);
    transform: translate(20px, 20px);
    z-index: -1;
}

.about-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    color: var(--text-muted);
    font-size: 14px;
}

.about-content h2 {
    margin-bottom: 24px;
}

.about-content p {
    margin-bottom: 20px;
    line-height: 1.8;
}

.about-quote {
    padding: 24px;
    background: var(--bg-card);
    border-left: 4px solid var(--accent);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    margin: 30px 0;
}

.about-quote p {
    font-size: 18px;
    font-style: italic;
    margin-bottom: 0;
    color: var(--text-primary);
}

.education-item {
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
}

.education-item:last-child {
    border-bottom: none;
}

.education-year {
    font-size: 14px;
    color: var(--accent);
    margin-bottom: 4px;
}

.education-school {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.education-major {
    font-size: 15px;
    color: var(--text-secondary);
}

@media (max-width: 968px) {
    .about-grid {
        grid-template-columns: 1fr;
    }
    
    .about-image {
        max-width: 400px;
        margin: 0 auto;
    }
}

/* ========================================
   Portfolio Page
   ======================================== */
.portfolio-section {
    padding: 80px 0 120px;
}

.portfolio-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 50px;
}

.filter-btn {
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 30px;
    transition: all var(--transition-fast);
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

/* ========================================
   Portfolio Page - JS Horizontal Waterfall
   ======================================== */
.portfolio-section {
    padding: 80px 0 120px;
}

.portfolio-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 50px;
}

.filter-btn {
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 30px;
    transition: all var(--transition-fast);
    cursor: pointer;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.3);
}

/* Grid - 由JS计算定位 */
.portfolio-grid {
    position: relative;
    width: 100%;
    min-height: 500px;
}

.portfolio-item {
    position: absolute;
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    background: #ffffff;
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.portfolio-item:hover {
    box-shadow: 0 12px 40px rgba(0,0,0,0.18);
}

[data-theme="dark"] .portfolio-item {
    background: #1a1a1a;
    box-shadow: none;
}

.portfolio-item:hover {
    transform: scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.portfolio-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform var(--transition-slow);
}

.portfolio-item:hover img {
    transform: scale(1.05);
}

.portfolio-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 50px;
}

.filter-btn {
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 30px;
    transition: all var(--transition-fast);
    cursor: pointer;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(141, 111, 246, 0.4);
}

/* Horizontal Grid - 横向排列 */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.portfolio-item {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    background: var(--bg-tertiary);
    transition: all var(--transition-base);
}

.portfolio-item:hover {
    transform: translateY(-12px) scale(1.03);
    box-shadow: 0 25px 50px rgba(141, 111, 246, 0.25);
}

.portfolio-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform var(--transition-slow);
}

.portfolio-item:hover img {
    transform: scale(1.08);
}

/* 悬停时的渐变遮罩 */
.portfolio-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top, 
        rgba(0, 0, 0, 0.85) 0%, 
        rgba(0, 0, 0, 0.4) 40%, 
        transparent 100%
    );
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 24px;
    opacity: 0;
    transition: opacity var(--transition-base);
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

/* 分类标签 */
.portfolio-category {
    font-size: 11px;
    font-weight: 600;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 8px;
    transform: translateY(20px);
    transition: transform var(--transition-base);
}

.portfolio-item:hover .portfolio-category {
    transform: translateY(0);
}

/* 作品标题 */
.portfolio-title {
    font-size: 16px;
    font-weight: 600;
    color: white;
    transform: translateY(20px);
    transition: transform var(--transition-base) 0.1s;
}

.portfolio-item:hover .portfolio-title {
    transform: translateY(0);
}

/* 作品序号 */
.portfolio-number {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    font-size: 12px;
    font-weight: 600;
    color: white;
    opacity: 0;
    transform: scale(0.5);
    transition: all var(--transition-base);
}

.portfolio-item:hover .portfolio-number {
    opacity: 1;
    transform: scale(1);
}

/* 不同尺寸的卡片样式 */
.portfolio-item.size-large {
    column-span: 2;
}

.portfolio-item.size-tall {
    margin-bottom: 40px;
}

/* 卡片边框发光效果 */
.portfolio-item::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-md);
    padding: 2px;
    background: var(--accent-gradient);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity var(--transition-base);
    z-index: 10;
    pointer-events: none;
}

.portfolio-item:hover::before {
    opacity: 1;
}

/* 加载动画 */
.portfolio-item {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
    animation: portfolioFadeIn 0.6s ease forwards;
}

@keyframes portfolioFadeIn {
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* 交错动画延迟 */
.portfolio-item:nth-child(1) { animation-delay: 0.05s; }
.portfolio-item:nth-child(2) { animation-delay: 0.1s; }
.portfolio-item:nth-child(3) { animation-delay: 0.15s; }
.portfolio-item:nth-child(4) { animation-delay: 0.2s; }
.portfolio-item:nth-child(5) { animation-delay: 0.25s; }
.portfolio-item:nth-child(6) { animation-delay: 0.3s; }
.portfolio-item:nth-child(7) { animation-delay: 0.35s; }
.portfolio-item:nth-child(8) { animation-delay: 0.4s; }
.portfolio-item:nth-child(9) { animation-delay: 0.45s; }
.portfolio-item:nth-child(10) { animation-delay: 0.5s; }
.portfolio-item:nth-child(11) { animation-delay: 0.55s; }
.portfolio-item:nth-child(12) { animation-delay: 0.6s; }
.portfolio-item:nth-child(13) { animation-delay: 0.65s; }
.portfolio-item:nth-child(14) { animation-delay: 0.7s; }
.portfolio-item:nth-child(15) { animation-delay: 0.75s; }
.portfolio-item:nth-child(16) { animation-delay: 0.8s; }

@media (max-width: 580px) {
    .portfolio-filters {
        gap: 8px;
    }
    
    .filter-btn {
        padding: 10px 18px;
        font-size: 13px;
    }
}

/* ========================================
   Lightbox Modal
   ======================================== */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-content {
    max-width: 90vw;
    max-height: 90vh;
    position: relative;
}

.lightbox-image {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: var(--radius-md);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border-radius: 50%;
    color: var(--text-primary);
    font-size: 24px;
    transition: all var(--transition-fast);
    z-index: 10;
}

.lightbox-close:hover {
    background: var(--accent);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border-radius: 50%;
    color: var(--text-primary);
    font-size: 20px;
    transition: all var(--transition-fast);
}

.lightbox-nav:hover {
    background: var(--accent);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox-info {
    text-align: center;
    margin-top: 20px;
}

.lightbox-info h3 {
    color: white;
    margin-bottom: 8px;
}

.lightbox-info p {
    color: var(--text-muted);
}

/* ========================================
   Resume Page
   ======================================== */
.resume-section {
    padding: 80px 0 120px;
}

.resume-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 60px;
    padding-bottom: 40px;
    border-bottom: 1px solid var(--border-color);
}

.resume-header h1 {
    margin-bottom: 8px;
}

.resume-contact {
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: right;
}

.resume-contact a {
    color: var(--text-secondary);
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color var(--transition-fast);
}

.resume-contact a:hover {
    color: var(--accent);
}

.resume-download .btn {
    margin-top: 16px;
}

.resume-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

.resume-column h2 {
    font-size: 24px;
    margin-bottom: 30px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--accent);
    display: inline-block;
}

.timeline-item {
    position: relative;
    padding-left: 30px;
    padding-bottom: 30px;
    border-left: 2px solid var(--border-color);
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -7px;
    top: 0;
    width: 12px;
    height: 12px;
    background: var(--accent);
    border-radius: 50%;
}

.timeline-item:last-child {
    border-left-color: transparent;
}

.timeline-date {
    font-size: 13px;
    color: var(--accent);
    margin-bottom: 6px;
}

.timeline-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.timeline-subtitle {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.timeline-desc {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.7;
}

.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.skill-tag {
    padding: 10px 18px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 30px;
    font-size: 14px;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.skill-tag:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.awards-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.award-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}

.award-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-light);
    border-radius: 50%;
    color: var(--accent);
    font-size: 20px;
}

.award-info h4 {
    font-size: 16px;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.award-info p {
    font-size: 13px;
    color: var(--text-muted);
}

@media (max-width: 968px) {
    .resume-header {
        flex-direction: column;
        gap: 24px;
    }
    
    .resume-contact {
        text-align: left;
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .resume-grid {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   Contact Page
   ======================================== */
.contact-section {
    padding: 80px 0 120px;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 60px;
}

.contact-info h2 {
    margin-bottom: 24px;
}

.contact-info > p {
    margin-bottom: 40px;
    line-height: 1.8;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.contact-item:hover {
    border-color: var(--accent);
}

.contact-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-light);
    border-radius: 50%;
    color: var(--accent);
}

.contact-text h4 {
    font-size: 16px;
    margin-bottom: 4px;
}

.contact-text a,
.contact-text p {
    font-size: 15px;
    color: var(--text-secondary);
    transition: color var(--transition-fast);
}

.contact-item:hover .contact-text a,
.contact-item:hover .contact-text p {
    color: var(--accent);
}

.contact-form {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 40px;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 14px 18px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 15px;
    color: var(--text-primary);
    transition: all var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-light);
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

.contact-form .btn {
    width: 100%;
}

@media (max-width: 968px) {
    .contact-grid {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   Utilities
   ======================================== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mt-5 { margin-top: 48px; }

.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }
.mb-5 { margin-bottom: 48px; }

/* ========================================
   Animations
   ======================================== */
[data-aos="fade-up"] {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-aos="fade-up"].aos-animate {
    opacity: 1;
    transform: translateY(0);
}

[data-aos="fade-down"] {
    opacity: 0;
    transform: translateY(-30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-aos="fade-down"].aos-animate {
    opacity: 1;
    transform: translateY(0);
}

[data-aos="fade-left"] {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-aos="fade-left"].aos-animate {
    opacity: 1;
    transform: translateX(0);
}

[data-aos="fade-right"] {
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-aos="fade-right"].aos-animate {
    opacity: 1;
    transform: translateX(0);
}

/* ========================================
   Scrollbar
   ======================================== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-hover);
}

/* ========================================
   Selection
   ======================================== */
::selection {
    background: var(--accent);
    color: white;
}
