/* 基础重置与变量 */
:root {
    --primary: #E52521;
    --primary-light: #FF6B6B;
    --primary-dark: #C41E1A;
    --accent: #FFD700;
    --accent-light: #FFF176;
    --success: #4CAF50;
    --info: #2196F3;
    --bg-primary: #F5F5F5;
    --bg-secondary: #FFFFFF;
    --bg-tertiary: #EEEEEE;
    --text-primary: #333333;
    --text-secondary: #666666;
    --text-heading: #1A1A1A;
    --border-color: #E0E0E0;
    --border-hover: #BDBDBD;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.12);
    --radius-sm: 12px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    --transition: all 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: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

/* 导航栏 */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 0 48px;
    height: 72px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.navbar.scrolled {
    box-shadow: var(--shadow-sm);
}

.nav-brand {
    font-family: 'Press Start 2P', cursive;
    font-size: 13px;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: -0.5px;
}

.pixel-icon {
    font-size: 20px;
}

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

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
    padding: 8px 16px;
    border-radius: var(--radius-sm);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary);
    background: rgba(108, 92, 231, 0.06);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.hamburger span {
    width: 22px;
    height: 2px;
    background-color: var(--text-primary);
    transition: var(--transition);
    border-radius: 2px;
}

/* 英雄区域 */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.hero-bg-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    filter: blur(3px) brightness(0.85);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.25);
}

.particles {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

.particle {
    position: absolute;
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 50%;
    opacity: 0.4;
    animation: float 20s infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) translateX(0);
        opacity: 0.4;
    }
    50% {
        transform: translateY(-30px) translateX(15px);
        opacity: 0.6;
    }
}

.hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 120px 48px 80px;
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 40px;
    align-items: center;
}

.hero-text {
    animation: fadeInUp 0.8s ease;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* 欢迎语 */
.hero-welcome {
    display: flex;
    align-items: center;
    gap: 10px;
}

.welcome-icon {
    font-size: 24px;
}

.welcome-text {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-heading);
    text-shadow: 0 1px 3px rgba(255, 255, 255, 0.8);
}

/* 个人信息 */
.hero-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.info-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.info-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.info-desc {
    font-size: 15px;
    color: var(--text-secondary);
    text-shadow: 0 1px 3px rgba(255, 255, 255, 0.8);
    font-style: italic;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 首页代码窗口 */
.hero-code-window {
    width: 100%;
    max-width: 450px;
    margin-left: -40px;
}

.hero-code-window .code-window {
    background: #1e1e2e;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.05);
    border: 1px solid #313244;
}

.hero-code-window .window-header {
    display: flex;
    align-items: center;
    padding: 14px 18px;
    background: #181825;
    border-bottom: 1px solid #313244;
}

.hero-code-window .window-dots {
    display: flex;
    gap: 8px;
    margin-right: 14px;
}

.hero-code-window .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.hero-code-window .dot.red { background-color: #f38ba8; }
.hero-code-window .dot.yellow { background-color: #f9e2af; }
.hero-code-window .dot.green { background-color: #a6e3a1; }

.hero-code-window .filename {
    color: #cdd6f4;
    font-family: 'Fira Code', monospace;
    font-size: 13px;
}

.hero-code-window .code-content {
    padding: 22px;
    font-family: 'Fira Code', monospace;
    font-size: 13px;
    line-height: 1.8;
    overflow-x: auto;
}

.hero-code-window .code-content code {
    color: #cdd6f4;
}

.hero-code-window .keyword { color: #cba6f7; }
.hero-code-window .variable { color: #89b4fa; }
.hero-code-window .property { color: #f38ba8; }
.hero-code-window .string { color: #a6e3a1; }
.hero-code-window .method { color: #89dceb; }
.hero-code-window .comment { color: #6c7086; font-style: italic; }

/* 代码下方按钮 */
.code-buttons {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.code-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    border-radius: 12px;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: all 0.3s ease;
}

.code-btn:hover {
    background: rgba(0, 0, 0, 0.95);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* 浮动卡片 */
.hero-floating-cards {
    position: relative;
    width: 100%;
    height: 450px;
}

.floating-card {
    position: absolute;
    background: rgba(0, 0, 0, 0.88);
    backdrop-filter: blur(12px);
    padding: 18px 24px;
    border-radius: var(--radius-lg);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.25),
        0 2px 8px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.15);
    cursor: default;
    transition: all 0.2s ease;
    z-index: 10;
    letter-spacing: 0.5px;
}

.floating-card:hover {
    transform: scale(1.08) !important;
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.35),
        0 4px 12px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    border-color: var(--accent);
    background: rgba(0, 0, 0, 0.92);
}

.keyword { color: #6C5CE7; }
.variable { color: #00CEC9; }
.property { color: #E17055; }
.string { color: #00B894; }
.method { color: #6C5CE7; }

/* 英雄区域图片 */
.hero-image {
    margin-top: 24px;
    text-align: center;
}

.floating-image {
    width: 280px;
    height: auto;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    animation: floatImage 6s ease-in-out infinite;
}

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

/* 滚动指示器 */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: #000000;
    font-size: 14px;
    font-weight: 700;
    z-index: 3;
    animation: bounce 2s ease-in-out infinite;
}

.mouse {
    width: 28px;
    height: 42px;
    border: 3px solid #D4C5A9;
    border-radius: 14px;
    position: relative;
    background: rgba(212, 197, 169, 0.2);
}

.wheel {
    width: 4px;
    height: 8px;
    background-color: #D4C5A9;
    border-radius: 2px;
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll 2s infinite;
}

@keyframes scroll {
    0% { opacity: 1; transform: translateX(-50%) translateY(0); }
    100% { opacity: 0; transform: translateX(-50%) translateY(12px); }
}

@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-10px); }
}

/* 通用部分样式 */
section {
    padding: 100px 0;
}

.section-title {
    display: flex;
    align-items: center;
    font-size: 28px;
    font-weight: 700;
    color: var(--text-heading);
    margin-bottom: 48px;
}

.title-number {
    color: var(--primary);
    font-family: 'Fira Code', monospace;
    font-size: 18px;
    margin-right: 12px;
    opacity: 0.7;
}

.section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--border-color), transparent);
    margin-left: 20px;
}

/* 技能栈 - 立体堆叠 */
.skills {
    background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-tertiary) 100%);
    padding: 100px 0;
    overflow: hidden;
}

.skills .section-title {
    color: var(--text-heading);
}

.skills .section-title::after {
    background: linear-gradient(90deg, var(--border-color), transparent);
}

.skills .title-number {
    color: var(--primary);
}

.skills-carousel {
    position: relative;
    margin-top: 40px;
    min-height: 450px;
}

.carousel-container {
    position: relative;
    perspective: 800px;
    height: 420px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-track {
    position: relative;
    width: 320px;
    height: 420px;
    transform-style: preserve-3d;
}

.skill-card {
    position: absolute;
    width: 320px;
    background: linear-gradient(145deg, #ffffff 0%, #f8f9ff 100%);
    border-radius: var(--radius-xl);
    padding: 32px;
    border: 2px solid rgba(102, 126, 234, 0.15);
    box-shadow: 
        0 4px 8px rgba(0, 0, 0, 0.05),
        0 12px 24px rgba(102, 126, 234, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    backface-visibility: hidden;
    left: 50%;
    top: 0;
    transform: translateX(-50%) translateZ(0);
    overflow: hidden;
}

.skill-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2, #E52521, #FFD700);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.skill-card.active::before {
    opacity: 1;
}

.skill-card.active {
    z-index: 10;
    background: linear-gradient(145deg, #ffffff 0%, #f0f2ff 100%);
    box-shadow: 
        0 20px 40px rgba(102, 126, 234, 0.2),
        0 40px 80px rgba(0, 0, 0, 0.1);
    transform: translateX(-50%) scale(1.08) translateZ(80px);
    border-color: #ddd;
}

.skill-card-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-heading);
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
}

.skill-card-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 16px;
    min-height: 42px;
    position: relative;
    z-index: 1;
}

.skill-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #E52521, #FFD700, #4CAF50, #2196F3);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.skill-card.active::before {
    opacity: 1;
}

.skill-card.active {
    z-index: 10;
    background: linear-gradient(145deg, #ffffff 0%, #f0f2ff 100%);
    box-shadow: 
        0 20px 40px rgba(108, 92, 231, 0.2),
        0 40px 80px rgba(0, 0, 0, 0.1);
    transform: translateX(-50%) scale(1.08) translateZ(80px);
    border-color: #ddd;
}

.skill-card .skill-card-icon {
    width: 72px;
    height: 72px;
    background: #000000 !important;
    backdrop-filter: blur(12px);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    transition: var(--transition);
    border: 2px solid rgba(255, 255, 255, 0.15);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.25),
        0 2px 8px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 1;
}

.skill-card.active .skill-card-icon {
    transform: scale(1.1);
    background: #000000 !important;
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.35),
        0 4px 12px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.skill-card-icon::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, #667eea, #764ba2, #E52521, #FFD700);
    border-radius: 22px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.skill-card.active .skill-card-icon {
    transform: scale(1.1);
    background: rgba(0, 0, 0, 0.92);
    border-color: var(--accent);
    box-shadow: 
        0 12px 28px rgba(0, 0, 0, 0.4),
        0 0 20px rgba(255, 215, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.skill-card.active .skill-card-icon::after {
    opacity: 0;
}

.skill-card-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-heading);
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
}

.skill-card-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 16px;
    min-height: 42px;
    position: relative;
    z-index: 1;
}

.skill-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.skill-card-tags span {
    font-size: 11px;
    padding: 5px 12px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    color: #667eea;
    border-radius: var(--radius-xl);
    font-weight: 600;
    transition: var(--transition);
    border: 1px solid rgba(102, 126, 234, 0.2);
}

.skill-card.active .skill-card-tags span {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15), rgba(118, 75, 162, 0.15));
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.15);
    border-color: rgba(102, 126, 234, 0.3);
}

.skill-card-progress {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    z-index: 1;
}

.progress-bar {
    flex: 1;
    height: 10px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(102, 126, 234, 0.15);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2, #E52521);
    background-size: 200% 100%;
    border-radius: 10px;
    transition: width 0.8s ease;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
    animation: progressShine 2s ease-in-out infinite;
}

@keyframes progressShine {
    0% { background-position: 0% 0%; }
    50% { background-position: 100% 0%; }
    100% { background-position: 0% 0%; }
}

.progress-text {
    font-size: 15px;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    min-width: 42px;
    text-align: right;
}

.skill-card.active {
    z-index: 10;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.15),
        0 40px 80px rgba(0, 0, 0, 0.1);
    transform: translateX(-50%) scale(1.08) translateZ(80px);
}

.skill-card.prev {
    z-index: 5;
    opacity: 0.7;
    transform: translateX(-140%) scale(0.88) rotateY(25deg) translateZ(-50px);
    box-shadow: 
        0 8px 16px rgba(0, 0, 0, 0.1),
        0 16px 32px rgba(0, 0, 0, 0.08);
}

.skill-card.next {
    z-index: 5;
    opacity: 0.7;
    transform: translateX(40%) scale(0.88) rotateY(-25deg) translateZ(-50px);
    box-shadow: 
        0 8px 16px rgba(0, 0, 0, 0.1),
        0 16px 32px rgba(0, 0, 0, 0.08);
}

.skill-card.far-prev {
    z-index: 2;
    opacity: 0.4;
    transform: translateX(-220%) scale(0.75) rotateY(35deg) translateZ(-120px);
    box-shadow: 
        0 4px 8px rgba(0, 0, 0, 0.1),
        0 8px 16px rgba(0, 0, 0, 0.06);
}

.skill-card.far-next {
    z-index: 2;
    opacity: 0.4;
    transform: translateX(120%) scale(0.75) rotateY(-35deg) translateZ(-120px);
    box-shadow: 
        0 4px 8px rgba(0, 0, 0, 0.1),
        0 8px 16px rgba(0, 0, 0, 0.06);
}

.skill-card.hidden {
    z-index: 0;
    opacity: 0;
    transform: translateX(-50%) scale(0.6) translateZ(-200px);
    pointer-events: none;
}

.skills-carousel {
    position: relative;
    margin-top: 40px;
    min-height: 400px;
}

.carousel-container {
    position: relative;
    perspective: 1200px;
    height: 380px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-track {
    position: relative;
    width: 320px;
    height: 380px;
    transform-style: preserve-3d;
}

.skill-card {
    position: absolute;
    width: 320px;
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    padding: 32px;
    border: 2px solid rgba(0, 0, 0, 0.06);
    box-shadow: var(--shadow-lg);
    cursor: pointer;
    transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    backface-visibility: hidden;
    left: 50%;
    top: 0;
    transform: translateX(-50%);
}

.skill-card.active {
    z-index: 10;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.15);
    transform: translateX(-50%) scale(1.05);
}

.skill-card-icon {
    width: 72px;
    height: 72px;
    background: linear-gradient(135deg, #FFF9C4, #FFE0B2);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    transition: var(--transition);
    border: 3px solid var(--accent);
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
}

.skill-card.active .skill-card-icon {
    transform: scale(1.1);
    background: rgba(0, 0, 0, 0.95);
    border-color: var(--accent);
    box-shadow: 
        0 12px 28px rgba(0, 0, 0, 0.35),
        0 0 20px rgba(255, 215, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.skill-card-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-heading);
    margin-bottom: 10px;
}

.skill-card-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 16px;
    min-height: 42px;
}

.skill-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.skill-card-tags span {
    font-size: 11px;
    padding: 5px 12px;
    background: linear-gradient(135deg, #E3F2FD, #BBDEFB);
    color: #1976D2;
    border-radius: var(--radius-xl);
    font-weight: 600;
    transition: var(--transition);
    border: 1px solid #90CAF9;
}

.skill-card.active .skill-card-tags span {
    background: linear-gradient(135deg, #BBDEFB, #90CAF9);
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.2);
}

.skill-card-progress {
    display: flex;
    align-items: center;
    gap: 12px;
}

.progress-bar {
    flex: 1;
    height: 10px;
    background: var(--bg-tertiary);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--success), #81C784);
    border-radius: 10px;
    transition: width 0.8s ease;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

.progress-text {
    font-size: 15px;
    font-weight: 700;
    color: var(--success);
    min-width: 42px;
    text-align: right;
}

.skill-card.active {
    z-index: 10;
    box-shadow: var(--shadow-xl);
    transform: translateX(-50%) scale(1.05);
}

.skill-card.prev {
    z-index: 5;
    opacity: 0.7;
    transform: translateX(-130%) scale(0.9) rotateY(20deg);
}

.skill-card.next {
    z-index: 5;
    opacity: 0.7;
    transform: translateX(30%) scale(0.9) rotateY(-20deg);
}

.skill-card.far-prev {
    z-index: 2;
    opacity: 0.3;
    transform: translateX(-200%) scale(0.8) rotateY(30deg);
}

.skill-card.far-next {
    z-index: 2;
    opacity: 0.3;
    transform: translateX(100%) scale(0.8) rotateY(-30deg);
}

.skill-card.hidden {
    z-index: 0;
    opacity: 0;
    transform: translateX(-50%) scale(0.7);
    pointer-events: none;
}

.skill-card-icon {
    width: 72px;
    height: 72px;
    background: linear-gradient(135deg, #FFF9C4, #FFE0B2);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    transition: var(--transition);
    border: 3px solid #FFD700;
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
}

.skill-card.active .skill-card-icon {
    transform: scale(1.1);
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    box-shadow: 
        0 8px 16px rgba(255, 215, 0, 0.4),
        0 0 20px rgba(255, 215, 0, 0.2);
}

@keyframes bounce {
    0%, 100% { transform: scale(1.1); }
    50% { transform: scale(1.2); }
}

.skill-card-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-heading);
    margin-bottom: 12px;
}

.skill-card-desc {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 20px;
    min-height: 48px;
}

.skill-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}

.skill-card-tags span {
    font-size: 12px;
    padding: 6px 14px;
    background: linear-gradient(135deg, #E3F2FD, #BBDEFB);
    color: var(--info);
    border-radius: var(--radius-xl);
    font-weight: 600;
    transition: var(--transition);
    border: 2px solid #90CAF9;
}

.skill-card.active .skill-card-tags span {
    background: linear-gradient(135deg, #BBDEFB, #90CAF9);
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.2);
}

.skill-card-progress {
    display: flex;
    align-items: center;
    gap: 12px;
}

.progress-bar {
    flex: 1;
    height: 10px;
    background: var(--bg-tertiary);
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--success), #81C784);
    border-radius: 10px;
    transition: width 0.8s ease;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

.progress-text {
    font-size: 15px;
    font-weight: 700;
    color: var(--primary);
    min-width: 42px;
    text-align: right;
}

/* 轮播控制 */
.carousel-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    margin-top: 32px;
}

.carousel-btn {
    width: 56px;
    height: 56px;
    background: var(--bg-secondary);
    border: 3px solid var(--accent);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 
        0 4px 12px rgba(255, 215, 0, 0.2),
        inset 0 -3px 0 rgba(0, 0, 0, 0.1);
    color: var(--primary);
    font-size: 18px;
    font-weight: bold;
}

.carousel-btn:hover:not(:disabled) {
    background: var(--accent);
    color: var(--text-heading);
    transform: translateY(-2px);
    box-shadow: 
        0 8px 20px rgba(255, 215, 0, 0.3),
        inset 0 -3px 0 rgba(0, 0, 0, 0.1);
}

.carousel-btn:active:not(:disabled) {
    transform: translateY(1px);
    box-shadow: 
        0 2px 8px rgba(255, 215, 0, 0.2),
        inset 0 2px 0 rgba(0, 0, 0, 0.1);
}

.carousel-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.carousel-dots {
    display: flex;
    gap: 10px;
}

.carousel-dot {
    width: 12px;
    height: 12px;
    background: var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
}

.carousel-dot.active {
    background: var(--accent);
    width: 32px;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.4);
}

.carousel-dot:hover:not(.active) {
    background: var(--accent-light);
}

.carousel-counter {
    text-align: center;
    margin-top: 16px;
    font-size: 13px;
    color: var(--text-secondary);
    font-family: 'Fira Code', monospace;
}

.carousel-counter .current {
    color: var(--primary);
    font-weight: 700;
    font-size: 16px;
}

/* 项目展示 */
.projects {
    background: var(--bg-primary);
}

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

.project-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.04);
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

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

.project-card.featured {
    grid-column: span 2;
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.project-image {
    position: relative;
    overflow: hidden;
}

.project-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

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

.project-content {
    padding: 32px;
    display: flex;
    flex-direction: column;
}

.project-label {
    color: var(--primary);
    font-family: 'Fira Code', monospace;
    font-size: 12px;
    margin-bottom: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.project-title {
    color: var(--text-heading);
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 16px;
}

.project-description {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.7;
    margin-bottom: 20px;
    flex: 1;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    list-style: none;
}

.project-tech li {
    color: var(--text-heading);
    font-size: 12px;
    padding: 5px 12px;
    background: linear-gradient(135deg, #FFF9C4, #FFE0B2);
    border-radius: var(--radius-xl);
    font-weight: 600;
    border: 2px solid var(--accent);
}

.project-links {
    display: flex;
    gap: 12px;
}

.project-link {
    color: var(--text-secondary);
    font-size: 18px;
    transition: var(--transition);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    background: var(--bg-tertiary);
}

.project-link:hover {
    color: var(--primary);
    background: rgba(108, 92, 231, 0.1);
}

/* 博客 */
.blog {
    background: var(--bg-tertiary);
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    justify-items: center;
}

.blog-card {
    width: 100%;
    max-width: 400px;
}

@media (min-width: 768px) {
    .blog-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.blog-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.04);
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

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

.blog-image {
    position: relative;
    overflow: hidden;
}

.blog-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.4s ease;
}

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

.blog-date {
    position: absolute;
    bottom: 12px;
    left: 12px;
    color: var(--primary);
    font-family: 'Fira Code', monospace;
    font-size: 11px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-weight: 600;
}

.blog-content {
    padding: 24px;
}

.blog-tags {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.tag {
    color: var(--primary);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.blog-title {
    color: var(--text-heading);
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.5;
}

.blog-excerpt {
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.7;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-link {
    color: var(--primary);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
}

.blog-link:hover {
    gap: 10px;
}

/* 关于我 */
.about {
    background: var(--bg-primary);
}

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

.about-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 40px;
    justify-content: center;
}

.about-motto {
    margin-top: 90px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.6;
}

.about-image {
    display: flex;
    flex-direction: column;
}

.about-image .about-tags {
    margin-top: auto;
    padding-top: 20px;
}

.image-wrapper {
    position: relative;
    max-width: 320px;
    padding-bottom: 20px;
}

.profile-img {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    position: relative;
    z-index: 2;
    border: 4px solid var(--accent);
}

.image-border {
    position: absolute;
    top: 16px;
    left: 16px;
    width: 100%;
    height: 100%;
    border: 2px solid var(--primary-light);
    border-radius: var(--radius-xl);
    z-index: 1;
    transition: var(--transition);
    opacity: 0.5;
}

.image-wrapper:hover .image-border {
    top: 12px;
    left: 12px;
    opacity: 1;
}

.about-text p {
    color: var(--text-secondary);
    font-size: 15px;
    margin-bottom: 16px;
    line-height: 1.7;
}

.about-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.about-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.about-tag:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 32px;
    padding-top: 32px;
    border-top: 1px solid var(--border-color);
}

.stat {
    text-align: center;
    padding: 20px 16px;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0, 0, 0, 0.04);
    transition: var(--transition);
}

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

.stat-number {
    display: block;
    font-size: 36px;
    font-weight: 800;
    color: var(--primary);
    font-family: 'Fira Code', monospace;
}

.stat-plus {
    color: var(--primary-light);
    font-size: 24px;
    font-weight: 700;
}

.stat-label {
    display: block;
    color: var(--text-secondary);
    font-size: 13px;
    margin-top: 4px;
    font-weight: 500;
}

/* 联系方式 */
.contact {
    background: var(--bg-tertiary);
}

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

.contact-text h3 {
    color: var(--text-heading);
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 16px;
}

.contact-text p {
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 28px;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 28px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--text-secondary);
    font-size: 15px;
}

.contact-item .pixel-emoji {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #FFF9C4, #FFE0B2);
    border-radius: 14px;
    border: 2px solid var(--accent);
    box-shadow: 0 3px 10px rgba(255, 215, 0, 0.2);
}

.social-links {
    display: flex;
    gap: 12px;
}

.social-link {
    width: 52px;
    height: 52px;
    background: var(--bg-secondary);
    border: 3px solid var(--accent);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    font-size: 20px;
    transition: var(--transition);
    box-shadow: 
        0 4px 12px rgba(255, 215, 0, 0.15),
        inset 0 -3px 0 rgba(0, 0, 0, 0.05);
}

.social-link:hover {
    background: var(--accent);
    border-color: var(--accent);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 
        0 8px 20px rgba(255, 215, 0, 0.25),
        inset 0 -3px 0 rgba(0, 0, 0, 0.1);
}

/* 联系表单 */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    position: relative;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 16px 20px;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    font-size: 15px;
    font-family: 'Inter', sans-serif;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(108, 92, 231, 0.1), var(--shadow-md);
}

.form-group input:hover,
.form-group textarea:hover {
    border-color: var(--border-hover);
}

.form-group label {
    position: absolute;
    left: 20px;
    top: 16px;
    color: var(--text-secondary);
    font-size: 15px;
    transition: var(--transition);
    pointer-events: none;
}

.form-group input:focus + label,
.form-group input:not(:placeholder-shown) + label,
.form-group textarea:focus + label,
.form-group textarea:not(:placeholder-shown) + label {
    top: -10px;
    left: 16px;
    font-size: 12px;
    color: var(--primary);
    background: var(--bg-secondary);
    padding: 0 8px;
    font-weight: 600;
}

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

/* 页脚 */
.footer {
    background: var(--bg-secondary);
    padding: 48px 0 40px;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    text-align: center;
}

.footer-brand {
    font-family: 'Press Start 2P', cursive;
    font-size: 14px;
    color: var(--primary);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.footer-text {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 8px;
}

.heart {
    color: var(--primary);
    animation: heartbeat 1.5s infinite;
    display: inline-block;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

.footer-credit {
    color: var(--text-secondary);
    font-size: 12px;
    opacity: 0.7;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 40px;
        padding: 100px 32px 60px;
    }

    .hero-visual {
        display: block;
    }

    .description {
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
    }

    .cta-buttons {
        justify-content: center;
    }

    .about-content {
        grid-template-columns: 1fr;
    }

    .image-wrapper {
        max-width: 280px;
        margin: 0 auto;
    }

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

    .project-card.featured {
        grid-column: span 1;
        grid-template-columns: 1fr;
    }

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

    .contact-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 0 20px;
    }

    .nav-links {
        display: none;
        position: fixed;
        top: 72px;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 12px;
    }

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

    .nav-links a {
        font-size: 16px;
        padding: 12px 24px;
    }

    .hamburger {
        display: flex;
    }

    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -6px);
    }

    .hero-content {
        padding: 90px 20px 50px;
    }

    .name {
        font-size: 22px;
    }

    .hero-floating-cards {
        height: 350px;
    }

    .floating-card {
        font-size: 14px;
        padding: 14px 18px;
    }

    section {
        padding: 70px 0;
    }

    .section-title {
        font-size: 20px;
    }

    .about-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }

    .stat-number {
        font-size: 28px;
    }

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

@media (max-width: 480px) {
    .name {
        font-size: 18px;
    }

    .cta-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

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

    .hero-floating-cards {
        height: 300px;
    }
}

/* 滚动动画 */
.fade-in {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* 选中文本样式 */
::selection {
    background-color: rgba(108, 92, 231, 0.15);
    color: var(--text-heading);
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

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

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

::-webkit-scrollbar-thumb:hover {
    background-color: var(--text-secondary);
}

/* 技能模态框 */
.skill-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.skill-modal.active {
    opacity: 1;
    visibility: visible;
}

.skill-modal-content {
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    padding: 40px;
    max-width: 500px;
    width: 90%;
    box-shadow: var(--shadow-xl);
    transform: scale(0.9) translateY(20px);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
}

.skill-modal.active .skill-modal-content {
    transform: scale(1) translateY(0);
}

.skill-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    background: var(--bg-tertiary);
    border: none;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-secondary);
    font-size: 16px;
}

.skill-modal-close:hover {
    background: #FF6B6B;
    color: #fff;
    transform: rotate(90deg);
}

.skill-modal-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.skill-modal-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: #fff;
    box-shadow: 0 8px 24px rgba(108, 92, 231, 0.3);
}

.skill-modal-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-heading);
}

.skill-modal-desc {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.skill-detail-section {
    margin-bottom: 20px;
}

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

.skill-detail-section h4 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-heading);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.skill-detail-section h4 i {
    color: var(--primary);
}

.skill-detail-section ul {
    list-style: none;
    padding: 0;
}

.skill-detail-section li {
    font-size: 13px;
    color: var(--text-secondary);
    padding: 8px 0;
    padding-left: 20px;
    position: relative;
    border-bottom: 1px solid var(--bg-tertiary);
    transition: var(--transition);
}

.skill-detail-section li:last-child {
    border-bottom: none;
}

.skill-detail-section li:hover {
    color: var(--text-primary);
    padding-left: 24px;
}

.skill-detail-section li::before {
    content: '›';
    position: absolute;
    left: 4px;
    color: var(--primary);
    font-weight: bold;
    font-size: 16px;
}

.skill-detail-section li:hover::before {
    left: 8px;
}


