/* ===== CSS 变量 - 现代渐变色彩系统 ===== */
:root {
    /* ===== 主色调 - 深空蓝紫 ===== */
    --primary-dark: #0f172a;
    --primary-dusk: #1e293b;
    --primary-midnight: #1a1a2e;

    /* ===== 渐变主色系 ===== */
    --gradient-primary-start: #667eea;
    --gradient-primary-mid: #764ba2;
    --gradient-primary-end: #f093fb;

    /* ===== 强调色 - 多彩渐变 ===== */
    --accent-blue: #667eea;
    --accent-purple: #764ba2;
    --accent-pink: #f093fb;
    --accent-coral: #ff6b6b;
    --accent-sunset: #f5af19;
    --accent-teal: #00d9a7;
    --accent-cyan: #00f2fe;

    /* ===== 渐变色定义 ===== */
    --gradient-sunset: linear-gradient(135deg, #f5af19 0%, #ff6b6b 100%);
    --gradient-ocean: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-cosmic: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    --gradient-aurora: linear-gradient(135deg, #00d9a7 0%, #667eea 100%);
    --gradient-flame: linear-gradient(135deg, #ff6b6b 0%, #f5af19 100%);
    --gradient-mint: linear-gradient(135deg, #00d9a7 0%, #00f2fe 100%);
    --gradient-royal: linear-gradient(135deg, #764ba2 0%, #f093fb 100%);

    /* ===== 中性色 - 冷色调 ===== */
    --bg-light: #f8fafc;
    --bg-slate: #f1f5f9;
    --bg-white: #ffffff;
    --bg-dark: #0f172a;
    --text-dark: #1e293b;
    --text-medium: #475569;
    --text-light: #64748b;
    --text-muted: #94a3b8;
    --border-color: #e2e8f0;
    --border-light: #f1f5f9;

    /* ===== 现代柔和阴影 ===== */
    --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.04);
    --shadow-md: 0 4px 16px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 10px 40px rgba(15, 23, 42, 0.12);
    --shadow-xl: 0 20px 60px rgba(15, 23, 42, 0.16);
    --shadow-2xl: 0 30px 80px rgba(15, 23, 42, 0.20);

    /* ===== 彩色光晕阴影 ===== */
    --glow-blue: 0 0 40px rgba(102, 126, 234, 0.3);
    --glow-purple: 0 0 40px rgba(118, 75, 162, 0.3);
    --glow-pink: 0 0 40px rgba(240, 147, 251, 0.3);
    --glow-teal: 0 0 40px rgba(0, 217, 167, 0.3);
    --glow-coral: 0 0 40px rgba(255, 107, 107, 0.3);

    /* ===== 过渡 ===== */
    --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);

    /* ===== 字体大小 - 响应式 ===== */
    --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
    --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
    --text-base: clamp(1rem, 0.9rem + 0.5vw, 1.125rem);
    --text-lg: clamp(1.125rem, 1rem + 0.6vw, 1.25rem);
    --text-xl: clamp(1.25rem, 1.1rem + 0.75vw, 1.5rem);
    --text-2xl: clamp(1.5rem, 1.2rem + 1.5vw, 2rem);
    --text-3xl: clamp(2rem, 1.5rem + 2.5vw, 3rem);
    --text-4xl: clamp(2.5rem, 2rem + 3vw, 3.5rem);
    --text-5xl: clamp(3rem, 2.5rem + 4vw, 4.5rem);

    /* ===== 圆角 ===== */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-2xl: 32px;
    --radius-full: 9999px;

    /* ===== 背景图案 ===== */
    --pattern-dots: radial-gradient(rgba(102, 126, 234, 0.1) 1px, transparent 1px);
    --pattern-gradient: linear-gradient(180deg, rgba(255,255,255,0) 0%, rgba(248,250,252,1) 100%);
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    color: var(--text-medium);
    background-color: var(--bg-light);
    overflow-x: hidden;
}

/* 字体加载优化 */
@font-face {
    font-display: swap;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 clamp(16px, 4vw, 24px);
}

.section {
    padding: clamp(60px, 10vw, 100px) 0;
}

.section-title {
    font-size: var(--text-3xl);
    font-weight: 700;
    text-align: center;
    margin-bottom: clamp(40px, 6vw, 60px);
    color: #1e3a5f;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, #2563eb, #3b82f6);
    margin: 15px auto;
    border-radius: var(--radius-full);
}

/* ===== 无障碍跳过链接 ===== */
.skip-link {
    position: absolute;
    top: -100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-dark);
    color: white;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    text-decoration: none;
    font-weight: 600;
    z-index: 9999;
    transition: top var(--transition-fast);
}

.skip-link:focus {
    top: 10px;
    outline: 3px solid var(--accent-coral);
    outline-offset: 2px;
}

/* ===== Navigation ===== */
.navbar {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    transition: all var(--transition-base);
}

.navbar.scrolled {
    background-color: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow-md);
}

.navbar.scrolled .logo {
    font-size: 1.5rem;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: clamp(12px, 2vw, 20px) clamp(16px, 4vw, 24px);
    transition: padding var(--transition-base);
}

.navbar.scrolled .container {
    padding: clamp(8px, 1.5vw, 14px) clamp(16px, 4vw, 24px);
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1e40af;
    text-decoration: none;
    font-family: 'Roboto Mono', 'SF Mono', 'Consolas', 'Monaco', 'Microsoft YaHei Mono', monospace;
    transition: all var(--transition-base);
}

.logo:hover {
    color: #2563eb;
}

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

.nav-links li {
    margin: 0;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-medium);
    font-weight: 500;
    font-size: var(--text-sm);
    padding: 8px 16px;
    border-radius: var(--radius-full);
    transition: all var(--transition-base);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: #2563eb;
    border-radius: var(--radius-full);
    transition: width var(--transition-base);
}

.nav-links a:hover,
.nav-links a.active {
    color: #2563eb;
    background: rgba(37, 99, 235, 0.08);
}

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

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--primary-dark);
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.menu-toggle:hover {
    background: rgba(37, 99, 235, 0.1);
}

.menu-toggle:focus {
    outline: 2px solid var(--accent-blue);
    outline-offset: 2px;
}

/* ===== Hero Section ===== */
.hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 60%, #1a2332 100%);
    color: white;
    padding: clamp(120px, 18vw, 180px) 0 clamp(80px, 12vw, 120px);
    margin-top: 72px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.12) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    animation: float 20s ease-in-out infinite;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -40%;
    left: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(96, 165, 250, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    animation: float 25s ease-in-out infinite reverse;
}

.hero-bg-animation {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(59, 130, 246, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(34, 197, 94, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(96, 165, 250, 0.06) 0%, transparent 40%);
    pointer-events: none;
}

.hero .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 40px;
    position: relative;
    z-index: 1;
}

.hero-content {
    flex: 1;
    min-width: 300px;
}

.hero-title {
    font-size: var(--text-4xl);
    font-weight: 700;
    margin-bottom: 8px;
    color: #ffffff;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 0.8s ease forwards;
    letter-spacing: 2px;
}

.hero-subtitle {
    font-size: var(--text-2xl);
    font-weight: 600;
    margin-bottom: 20px;
    color: #60a5fa;
    animation: fadeInUp 0.8s ease 0.1s forwards;
    opacity: 0;
    letter-spacing: 4px;
}

.hero-description {
    font-size: var(--text-lg);
    margin-bottom: 30px;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.8;
    animation: fadeInUp 0.8s ease 0.2s forwards;
    opacity: 0;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease 0.3s forwards;
    opacity: 0;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: var(--radius-full);
    text-decoration: none;
    font-weight: 600;
    font-size: var(--text-sm);
    transition: all var(--transition-base);
    text-align: center;
    cursor: pointer;
    border: none;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    box-shadow: 0 4px 20px rgba(37, 99, 235, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
    transition: left var(--transition-base);
    z-index: -1;
}

.btn-primary:hover::before {
    left: 0;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(37, 99, 235, 0.5);
}

.btn-primary i {
    transition: transform var(--transition-fast);
}

.btn-primary:hover i {
    transform: translateX(4px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: white;
    border: 1.5px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.6);
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(255, 255, 255, 0.1);
}

.hero-image {
    flex: 1;
    min-width: 280px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.tech-icons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    animation: fadeIn 1s ease 0.4s forwards;
    opacity: 0;
}

.tech-icons i {
    font-size: clamp(3rem, 5vw, 4.5rem);
    color: #60a5fa;
    transition: all var(--transition-base);
    cursor: default;
}

.tech-icons i:hover {
    color: #93c5fd;
    transform: scale(1.15) rotate(5deg);
}

/* ===== About Section ===== */
.about {
    background: var(--bg-white);
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 32px;
}

.about-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: clamp(24px, 4vw, 36px);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
    text-align: center;
}

.about-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: #2563eb;
    transform: scaleX(0);
    transition: transform var(--transition-base);
}

.about-card:hover::before {
    transform: scaleX(1);
}

.about-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: rgba(37, 99, 235, 0.3);
}

.about-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(37, 99, 235, 0.1);
    border-radius: var(--radius-full);
}

.about-icon i {
    font-size: 2.5rem;
    color: #2563eb;
}

.about-card h3 {
    font-size: var(--text-xl);
    margin-bottom: 12px;
    color: #1e3a5f;
}

.about-card p {
    color: var(--text-medium);
    line-height: 1.8;
}

/* ===== Skills Section ===== */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
}

.skill-category {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: clamp(24px, 4vw, 36px);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
    border: 1px solid var(--border-color);
    border-top: 4px solid transparent;
}

.skill-category:nth-child(1) {
    border-top-color: #2563eb;
    background: rgba(37, 99, 235, 0.02);
}

.skill-category:nth-child(2) {
    border-top-color: #10b981;
    background: rgba(16, 185, 129, 0.02);
}

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

.skill-category h3 {
    font-size: var(--text-xl);
    color: #1e3a5f;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.skill-category h3 i {
    color: #2563eb;
}

.skill-category ul {
    list-style: none;
}

.skill-category li {
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-medium);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: var(--text-base);
}

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

.skill-dot {
    width: 8px;
    height: 8px;
    background: #2563eb;
    border-radius: var(--radius-full);
    flex-shrink: 0;
}

/* ===== Projects Section ===== */
.projects {
    background: var(--bg-white);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 28px;
}

.project-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: clamp(24px, 4vw, 32px);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: #2563eb;
    transform: scaleX(0);
    transition: transform var(--transition-base);
}

.project-card:hover::before {
    transform: scaleX(1);
}

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

.project-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(37, 99, 235, 0.1);
    border-radius: var(--radius-md);
    margin-bottom: 20px;
}

.project-icon i {
    font-size: 1.5rem;
    color: #2563eb;
}

.project-card h3 {
    font-size: var(--text-lg);
    color: #1e3a5f;
    margin-bottom: 12px;
    line-height: 1.4;
}

.project-card p {
    color: var(--text-medium);
    margin-bottom: 20px;
    line-height: 1.7;
}

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

.project-tags span {
    background: rgba(37, 99, 235, 0.1);
    color: #1e3a5f;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: 500;
    border: 1px solid rgba(37, 99, 235, 0.2);
    transition: all var(--transition-fast);
}

.project-tags span:hover {
    background: rgba(37, 99, 235, 0.2);
    border-color: rgba(37, 99, 235, 0.4);
}

/* ===== Contributions Section ===== */
.contributions-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 28px;
}

.contribution-item {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: clamp(24px, 4vw, 32px);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.contribution-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: #dc2626;
    transform: scaleX(0);
    transition: transform var(--transition-base);
}

.contribution-item:hover::before {
    transform: scaleX(1);
}

.contribution-item:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl);
    border-color: rgba(74, 144, 226, 0.2);
}

.contribution-icon {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(220, 38, 38, 0.1);
    border-radius: var(--radius-md);
    margin-bottom: 16px;
}

.contribution-icon i {
    font-size: 1.3rem;
    color: #dc2626;
}

.contribution-item h3 {
    font-size: var(--text-lg);
    color: #1e3a5f;
    margin-bottom: 12px;
}

.contribution-item p {
    color: var(--text-medium);
    line-height: 1.7;
}

/* ===== Honors Section ===== */
.honors {
    background: var(--bg-white);
}

.honors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 28px;
}

.honor-card {
    background: var(--bg-light);
    border-radius: var(--radius-lg);
    padding: clamp(32px, 5vw, 48px) clamp(24px, 4vw, 32px);
    box-shadow: var(--shadow-sm);
    text-align: center;
    transition: all var(--transition-base);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.honor-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: #2563eb;
    transform: scaleX(0);
    transition: transform var(--transition-base);
}

.honor-card:hover::before {
    transform: scaleX(1);
}

.honor-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-xl);
    background: var(--bg-white);
    border-color: rgba(74, 144, 226, 0.2);
}

.honor-card i {
    font-size: 3.5rem;
    color: #2563eb;
    margin-bottom: 20px;
    display: inline-block;
}

.honor-card h3 {
    font-size: var(--text-lg);
    color: #1e3a5f;
    margin-bottom: 12px;
}

.honor-card p {
    color: var(--text-medium);
    font-size: var(--text-sm);
}

/* ===== Contact Section ===== */
.contact-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 48px;
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: clamp(32px, 5vw, 56px);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

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

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.contact-item i {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(37, 99, 235, 0.1);
    border-radius: var(--radius-full);
    color: #2563eb;
    font-size: 1.1rem;
    flex-shrink: 0;
    transition: all var(--transition-base);
}

.contact-item:hover i {
    background: rgba(37, 99, 235, 0.2);
    transform: rotate(10deg) scale(1.1);
}

.contact-item div {
    flex: 1;
}

.contact-item strong {
    display: block;
    color: #1e3a5f;
    font-size: var(--text-sm);
    margin-bottom: 4px;
}

.contact-item p {
    color: var(--text-medium);
    font-size: var(--text-base);
    margin: 0;
}

.contact-note {
    background: rgba(37, 99, 235, 0.05);
    border-radius: var(--radius-md);
    padding: 28px;
    display: flex;
    align-items: center;
    border: 1px solid rgba(37, 99, 235, 0.1);
}

.contact-note p {
    color: var(--text-medium);
    line-height: 1.8;
    font-size: var(--text-base);
    margin: 0;
}

/* ===== Footer ===== */
.footer {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #1a1a2e 100%);
    color: white;
    padding: 40px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.5), transparent);
}

.footer p {
    margin-bottom: 8px;
    opacity: 0.85;
    font-size: var(--text-sm);
}

.footer p:last-child {
    margin-bottom: 0;
}

.footer a {
    color: #a5b4fc;
    text-decoration: none;
    transition: color var(--transition-fast);
}

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

/* ===== 回到顶部按钮 ===== */
.back-to-top {
    position: fixed;
    bottom: -80px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4);
    transition: all var(--transition-base);
    z-index: 999;
    opacity: 0;
}

.back-to-top.visible {
    bottom: 30px;
    opacity: 1;
}

.back-to-top:hover {
    background: #1d4ed8;
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.5);
}

.back-to-top:focus {
    outline: 2px solid white;
    outline-offset: 2px;
}

.back-to-top i {
    font-size: 1.1rem;
}

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

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

/* ===== 关键帧动画 ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    33% {
        transform: translate(30px, -30px) rotate(120deg);
    }
    66% {
        transform: translate(-20px, 20px) rotate(240deg);
    }
}

/* ===== 移动端菜单遮罩 ===== */
@media (max-width: 768px) {
    body.menu-open {
        overflow: hidden;
    }

    body.menu-open::after {
        content: '';
        position: fixed;
        top: 72px;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 998;
        backdrop-filter: blur(2px);
    }
}

/* ===== Responsive Design ===== */
@media (max-width: 992px) {
    .hero .container {
        flex-direction: column;
        text-align: center;
    }

    .hero-content {
        margin-bottom: 40px;
    }

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

    .tech-icons {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }

    .tech-icons i {
        font-size: 3rem;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
        padding: 20px;
        gap: 8px;
        max-height: calc(100vh - 72px);
        overflow-y: auto;
    }

    .nav-links.show {
        display: flex;
        animation: slideDown 0.3s ease forwards;
    }

    .nav-links li {
        margin: 0;
    }

    .nav-links a {
        display: block;
        padding: 14px 16px;
    }

    .menu-toggle {
        display: block;
    }

    .section-title {
        font-size: var(--text-2xl);
    }

    .hero {
        padding: 120px 0 80px;
    }

    .contact-content {
        padding: 28px;
    }

    .back-to-top {
        right: 20px;
        width: 44px;
        height: 44px;
    }

    .back-to-top.visible {
        bottom: 20px;
    }
}

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

    .hero {
        padding: 100px 0 60px;
    }

    .hero-title {
        font-size: var(--text-2xl);
    }

    .hero-subtitle {
        font-size: var(--text-xl);
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }

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

    .tech-icons {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .tech-icons i {
        font-size: 2.5rem;
    }

    .about-grid,
    .skills-grid,
    .projects-grid,
    .contributions-content,
    .honors-grid {
        grid-template-columns: 1fr;
    }

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

    .contact-item {
        gap: 12px;
    }

    .contact-item i {
        width: 40px;
        height: 40px;
    }
}

/* ===== 动画关键帧 ===== */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== 焦点样式 - 无障碍优化 ===== */
a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--accent-blue);
    outline-offset: 2px;
}

/* ===== 打印样式 ===== */
@media print {
    .navbar,
    .back-to-top,
    .hero-buttons,
    .skip-link {
        display: none !important;
    }

    .hero {
        margin-top: 0;
        padding: 40px 0;
    }

    .section {
        padding: 30px 0;
    }
}
