/* Modern Personal Homepage Styles */
/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&family=Noto+Sans+SC:wght@300;400;500;600;700&display=swap');

/* CSS Custom Properties */
:root {
    /* Color Palette */
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --text-primary: #1a202c;
    --text-secondary: #4a5568;
    --text-muted: #718096;
    --accent-blue: #3182ce;
    --accent-purple: #805ad5;
    --accent-pink: #d53f8c;
    --success-green: #38a169;
    --warning-orange: #dd6b20;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.2);
    --shadow-glow: 0 0 20px rgba(102, 126, 234, 0.3);

    /* Transitions */
    --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 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.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Dark Mode Variables */
.dark {
    --glass-bg: rgba(0, 0, 0, 0.2);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-primary: #f7fafc;
    --text-secondary: #e2e8f0;
    --text-muted: #a0aec0;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.4);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 20px rgba(102, 126, 234, 0.4);
}

/* Performance Optimizations */
* {
    box-sizing: border-box;
}

*,
*::before,
*::after {
    backface-visibility: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Mobile Safari fixes */
html {
    height: 100%;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}

body {
    margin: 0;
    padding: 0;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    -webkit-overflow-scrolling: touch;
    position: relative;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    *:not(.avatar-wrapper),
    *:not(.avatar-wrapper)::before,
    *:not(.avatar-wrapper)::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Keyframe Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate3d(0, 30px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* 头像扭动弹跳动画 - 物理弹性阻尼效果 */
@keyframes avatarWiggleBounce {
    0% {
        -webkit-transform: scale(1) rotate(0deg);
        -moz-transform: scale(1) rotate(0deg);
        -ms-transform: scale(1) rotate(0deg);
        transform: scale(1) rotate(0deg);
    }
    15% {
        -webkit-transform: scale(1.05) rotate(2deg);
        -moz-transform: scale(1.05) rotate(2deg);
        -ms-transform: scale(1.05) rotate(2deg);
        transform: scale(1.05) rotate(2deg);
    }
    25% {
        -webkit-transform: scale(1.08) rotate(-1.5deg);
        -moz-transform: scale(1.08) rotate(-1.5deg);
        -ms-transform: scale(1.08) rotate(-1.5deg);
        transform: scale(1.08) rotate(-1.5deg);
    }
    35% {
        -webkit-transform: scale(1.1) rotate(3deg);
        -moz-transform: scale(1.1) rotate(3deg);
        -ms-transform: scale(1.1) rotate(3deg);
        transform: scale(1.1) rotate(3deg);
    }
    45% {
        -webkit-transform: scale(1.09) rotate(-2deg);
        -moz-transform: scale(1.09) rotate(-2deg);
        -ms-transform: scale(1.09) rotate(-2deg);
        transform: scale(1.09) rotate(-2deg);
    }
    55% {
        -webkit-transform: scale(1.1) rotate(1deg);
        -moz-transform: scale(1.1) rotate(1deg);
        -ms-transform: scale(1.1) rotate(1deg);
        transform: scale(1.1) rotate(1deg);
    }
    65% {
        -webkit-transform: scale(1.08) rotate(-0.5deg);
        -moz-transform: scale(1.08) rotate(-0.5deg);
        -ms-transform: scale(1.08) rotate(-0.5deg);
        transform: scale(1.08) rotate(-0.5deg);
    }
    75% {
        -webkit-transform: scale(1.06) rotate(0.5deg);
        -moz-transform: scale(1.06) rotate(0.5deg);
        -ms-transform: scale(1.06) rotate(0.5deg);
        transform: scale(1.06) rotate(0.5deg);
    }
    85% {
        -webkit-transform: scale(1.03) rotate(-0.2deg);
        -moz-transform: scale(1.03) rotate(-0.2deg);
        -ms-transform: scale(1.03) rotate(-0.2deg);
        transform: scale(1.03) rotate(-0.2deg);
    }
    95% {
        -webkit-transform: scale(1.01) rotate(0.1deg);
        -moz-transform: scale(1.01) rotate(0.1deg);
        -ms-transform: scale(1.01) rotate(0.1deg);
        transform: scale(1.01) rotate(0.1deg);
    }
    100% {
        -webkit-transform: scale(1) rotate(0deg);
        -moz-transform: scale(1) rotate(0deg);
        -ms-transform: scale(1) rotate(0deg);
        transform: scale(1) rotate(0deg);
    }
}

/* WebKit 浏览器兼容 */
@-webkit-keyframes avatarWiggleBounce {
    0% { -webkit-transform: scale(1) rotate(0deg); }
    15% { -webkit-transform: scale(1.05) rotate(2deg); }
    25% { -webkit-transform: scale(1.08) rotate(-1.5deg); }
    35% { -webkit-transform: scale(1.1) rotate(3deg); }
    45% { -webkit-transform: scale(1.09) rotate(-2deg); }
    55% { -webkit-transform: scale(1.1) rotate(1deg); }
    65% { -webkit-transform: scale(1.08) rotate(-0.5deg); }
    75% { -webkit-transform: scale(1.06) rotate(0.5deg); }
    85% { -webkit-transform: scale(1.03) rotate(-0.2deg); }
    95% { -webkit-transform: scale(1.01) rotate(0.1deg); }
    100% { -webkit-transform: scale(1) rotate(0deg); }
}

@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(102, 126, 234, 0.3);
    }
    50% {
        box-shadow: 0 0 30px rgba(102, 126, 234, 0.6);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes bounceGentle {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

/* 粒子碰撞动画 */
@keyframes particleCollisionGlow {
    0% {
        opacity: 1;
        transform: scale(0.5);
        box-shadow: 0 0 10px rgba(102, 126, 234, 0.8);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.2);
        box-shadow: 0 0 20px rgba(102, 126, 234, 0.6);
    }
    100% {
        opacity: 0;
        transform: scale(2);
        box-shadow: 0 0 30px rgba(102, 126, 234, 0.2);
    }
}

@keyframes cardShake {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-1px) translateY(0.5px);
    }
    75% {
        transform: translateX(1px) translateY(-0.5px);
    }
}

/* 粒子碰撞发光点 */
.particle-collision-glow {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.8) 0%, rgba(102, 126, 234, 0.4) 50%, transparent 100%);
    animation: particleCollisionGlow 0.6s ease-out forwards;
    pointer-events: none;
    z-index: 10;
}

.dark .particle-collision-glow {
    background: radial-gradient(circle, rgba(102, 126, 234, 1) 0%, rgba(102, 126, 234, 0.6) 50%, transparent 100%);
}



@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Particle Canvas - enhancement layer */
#particles-canvas {
    will-change: transform;
    opacity: 0.6;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 2;
    mix-blend-mode: normal;
}

/* Dark mode particle adjustments */
.dark #particles-canvas {
    opacity: 0.8;
    mix-blend-mode: screen;
}

/* 主题切换按钮粒子碰撞效果 */
#theme-toggle.particle-collision-active {
    box-shadow:
        0 10px 25px rgba(0, 0, 0, 0.15),
        0 0 20px rgba(102, 126, 234, 0.4);
    transform: scale(1.05);
}

.dark #theme-toggle.particle-collision-active {
    box-shadow:
        0 10px 25px rgba(0, 0, 0, 0.3),
        0 0 25px rgba(102, 126, 234, 0.6);
}

/* Primary animated background - always visible */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 80%, rgba(102, 126, 234, 0.12) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(118, 75, 162, 0.12) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(52, 152, 219, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 60% 70%, rgba(139, 69, 19, 0.04) 0%, transparent 40%);
    animation: backgroundFloat 12s ease-in-out infinite;
    pointer-events: none;
    z-index: 1;
    opacity: 1;
    will-change: transform;
}

/* Secondary floating elements */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 70% 30%, rgba(102, 126, 234, 0.06) 0%, transparent 30%),
        radial-gradient(circle at 30% 70%, rgba(118, 75, 162, 0.06) 0%, transparent 30%);
    animation: backgroundFloat 16s ease-in-out infinite reverse;
    pointer-events: none;
    z-index: 1;
    opacity: 0.8;
    will-change: transform;
}

@keyframes backgroundFloat {
    0%, 100% {
        transform: translate(0, 0) scale(1) rotate(0deg);
    }
    25% {
        transform: translate(20px, -15px) scale(1.05) rotate(1deg);
    }
    50% {
        transform: translate(-10px, 10px) scale(0.95) rotate(-1deg);
    }
    75% {
        transform: translate(15px, 5px) scale(1.02) rotate(0.5deg);
    }
}

/* Profile Card */
.profile-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: var(--shadow-xl);
    animation: fadeInUp 0.8s var(--transition-normal);
    position: relative;
    overflow: hidden;
    will-change: transform;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 粒子碰撞效果 */
.profile-card.particle-collision-active {
    box-shadow:
        var(--shadow-xl),
        0 0 30px rgba(102, 126, 234, 0.4),
        inset 0 0 20px rgba(102, 126, 234, 0.1);
    border-color: rgba(102, 126, 234, 0.6);
}

.dark .profile-card.particle-collision-active {
    box-shadow:
        var(--shadow-xl),
        0 0 40px rgba(102, 126, 234, 0.6),
        inset 0 0 25px rgba(102, 126, 234, 0.15);
    border-color: rgba(102, 126, 234, 0.8);
}

.profile-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shimmer 3s ease-in-out infinite;
}

/* Avatar Styles */
.avatar-container {
    position: relative;
    width: 160px;
    height: 160px;
    margin: 0 auto 2rem;
    cursor: pointer;
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.avatar-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    transition: var(--transition-normal);
    will-change: transform;
}

.avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-normal);
    will-change: transform;
}

.avatar-glow {
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: var(--primary-gradient);
    opacity: 0;
    transition: var(--transition-normal);
    z-index: -1;
    filter: blur(8px);
}

/* 头像悬停动画 - 扭动弹跳效果 */
.avatar-container:hover .avatar-wrapper {
    -webkit-animation: avatarWiggleBounce 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards !important;
    -moz-animation: avatarWiggleBounce 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards !important;
    -ms-animation: avatarWiggleBounce 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards !important;
    animation: avatarWiggleBounce 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards !important;

    -webkit-animation-iteration-count: 1 !important;
    -moz-animation-iteration-count: 1 !important;
    -ms-animation-iteration-count: 1 !important;
    animation-iteration-count: 1 !important;

    -webkit-animation-duration: 1.2s !important;
    -moz-animation-duration: 1.2s !important;
    -ms-animation-duration: 1.2s !important;
    animation-duration: 1.2s !important;

    -webkit-animation-fill-mode: forwards !important;
    -moz-animation-fill-mode: forwards !important;
    -ms-animation-fill-mode: forwards !important;
    animation-fill-mode: forwards !important;

    -webkit-animation-timing-function: cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
    -moz-animation-timing-function: cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
    -ms-animation-timing-function: cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
    animation-timing-function: cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
}

/* 确保覆盖 Tailwind CSS 的动画 */
.avatar-container:hover .avatar-wrapper.animate-float,
.avatar-container:hover .avatar-wrapper[class*="animate-"],
.avatar-container.animate-float:hover .avatar-wrapper {
    animation: avatarWiggleBounce 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards !important;
}

/* 移除可能冲突的 float 动画 */
.avatar-container.animate-float {
    animation: none !important;
}

/* 确保头像容器本身不受 Tailwind 动画影响 */
.avatar-container {
    animation: none !important;
}

.avatar-container:hover .avatar-glow {
    opacity: 0.8;
    animation: pulseGlow 2s ease-in-out infinite;
}

/* 移除头像本身的额外缩放，避免双重效果 */
.avatar-container:hover .avatar {
    /* 保持原始状态，让 wrapper 处理所有变换 */
}

/* Typography */
.name {
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    animation: fadeInUp 0.8s var(--transition-normal) 0.2s both;
}

.bio {
    color: var(--text-secondary);
    font-size: 1.1rem;
    font-weight: 400;
    margin-bottom: 1rem;
    animation: fadeInUp 0.8s var(--transition-normal) 0.4s both;
}



/* Social Links */
.social-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    animation: fadeInUp 0.8s var(--transition-normal) 0.8s both;
}

/* 社交链接容器 - 协调自然动画系统 */
.social-links {
    --transition-instant: 0.08s;
    --transition-quick: 0.15s;
    --transition-smooth: 0.25s;
    --transition-gentle: 0.35s;

    /* 协调的缓动函数 */
    --ease-natural: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-gentle: cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --ease-smooth-out: cubic-bezier(0.33, 1, 0.68, 1);
    --ease-smooth-in: cubic-bezier(0.32, 0, 0.67, 0);

    /* 动画状态管理 */
    position: relative;
    isolation: isolate;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 1.5rem;
    border-radius: 16px;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    text-decoration: none;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    min-height: 56px;

    /* 统一协调的过渡 */
    transition: all var(--transition-smooth) var(--ease-natural);

    /* 高性能渲染 */
    will-change: transform;
    backface-visibility: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;

    /* 确保圆角一致性 */
    border-radius: 16px;
}

/* 原始内容容器 - 协调淡出 */
.social-link-content {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    position: relative;
    z-index: 1;

    /* 同步协调的过渡 */
    transition: all var(--transition-quick) var(--ease-natural);

    transform: translateY(0);
    opacity: 1;
}

/* 提示文字伪元素 - 协调淡入 */
.social-link::after {
    content: attr(data-tooltip);
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-primary);
    background: transparent;
    border-radius: 16px;
    z-index: 2;

    /* 协调的延迟动画 */
    opacity: 0;
    transform: translateY(6px);
    transition: all var(--transition-smooth) var(--ease-gentle) 0.1s;

    /* 平滑边缘 */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;

    pointer-events: none;
}

/* 光泽扫过效果 - 简化协调 */
.social-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
        transparent,
        rgba(255, 255, 255, 0.1),
        transparent);
    z-index: 0;

    transition: left var(--transition-gentle) var(--ease-smooth-out) 0.15s;
}

/* 悬停状态 - 协调自然动画 */
.social-link:hover {
    transform: translateY(-2px);
    box-shadow:
        0 6px 20px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.25);
}

/* 内容淡出 - 同步协调 */
.social-link:hover .social-link-content {
    opacity: 0;
    transform: translateY(-2px);
}

/* 提示文字淡入 - 自然延迟 */
.social-link:hover::after {
    opacity: 1;
    transform: translateY(0);
}

/* 光泽效果 - 协调触发 */
.social-link:hover::before {
    left: 100%;
}

/* 激活状态 - 即时反馈 */
.social-link:active {
    transform: translateY(-1px);
    transition-duration: 0.1s;
}

/* 焦点状态 - 无障碍访问 */
.social-link:focus-visible {
    outline: 2px solid var(--accent-blue);
    outline-offset: 2px;
    transition: outline-offset 0.2s ease;
}

.social-link i {
    font-size: 1.25rem;
    margin-right: 0.75rem;
    transition: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    width: 1.25rem;
    height: 1.25rem;
    vertical-align: middle;
    flex-shrink: 0;
}

.social-link span {
    font-weight: 500;
    transition: inherit;
    display: flex;
    align-items: center;
    line-height: 1;
}



/* 进入动画 - 页面加载时的渐进显示 */
.social-link {
    animation: slideInUp 0.6s var(--ease-out-quart) both;
}

.social-link:nth-child(1) { animation-delay: 0.1s; }
.social-link:nth-child(2) { animation-delay: 0.2s; }
.social-link:nth-child(3) { animation-delay: 0.3s; }

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* 高级性能优化 */
.social-link,
.social-link::before,
.social-link::after,
.social-link-content {
    will-change: transform, opacity;
    backface-visibility: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transform-style: preserve-3d;
}

/* 硬件加速优化 */
.social-links {
    transform: translateZ(0);
    perspective: 1000px;
}

/* 流程化状态指示器 */
.social-link::after {
    /* 添加微妙的阴影增强层次感 */
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* 高级悬停序列 */
.social-link:hover {
    /* 多层阴影创造深度 */
    box-shadow:
        0 16px 40px rgba(0, 0, 0, 0.12),
        0 8px 20px rgba(0, 0, 0, 0.08),
        0 4px 8px rgba(0, 0, 0, 0.04),
        0 0 0 1px rgba(255, 255, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

/* 统一简约按钮悬停主题 */
.social-link {
    /* 统一的悬停颜色变量 */
    --hover-bg: rgba(59, 130, 246, 0.08);
    --hover-border: rgba(59, 130, 246, 0.2);
    --hover-shadow: rgba(59, 130, 246, 0.1);
    --tooltip-bg: rgba(59, 130, 246, 0.95);
    --tooltip-text: rgba(255, 255, 255, 1);
}

/* 统一的悬停效果 */
.social-link:hover {
    background: var(--hover-bg);
    border-color: var(--hover-border);
    box-shadow:
        0 4px 12px var(--hover-shadow),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 统一的提示文字样式 */
.social-link:hover::after {
    background: var(--tooltip-bg);
    color: var(--tooltip-text);
    border-radius: 16px;
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* 深色模式统一简约样式 */
.dark .social-link {
    /* 深色模式下的统一悬停颜色 */
    --hover-bg: rgba(99, 102, 241, 0.12);
    --hover-border: rgba(99, 102, 241, 0.25);
    --hover-shadow: rgba(99, 102, 241, 0.15);
    --tooltip-bg: rgba(99, 102, 241, 0.95);
    --tooltip-text: rgba(255, 255, 255, 1);
}

/* 移除群组效果，避免鼠标在按钮间时的模糊 */
/* 群组效果现在通过JavaScript控制，CSS不再自动应用 */

/* 移动端触摸优化 - 流程化体验 */
@media (hover: none) and (pointer: coarse) {
    .social-links {
        --transition-fast: 0.15s;
        --transition-normal: 0.25s;
        --transition-slow: 0.35s;
    }

    .social-link {
        /* 移动端快速响应 */
        transition:
            transform var(--transition-fast) var(--ease-out-quart),
            box-shadow var(--transition-fast) var(--ease-out-quart),
            background-color var(--transition-normal) var(--ease-in-out-quart);
    }

    /* 触摸激活状态 - 统一蓝色调反馈 */
    .social-link:active {
        transform: translateY(-1px);
        background: var(--hover-bg);
        border-color: var(--hover-border);
        box-shadow:
            0 4px 12px var(--hover-shadow),
            inset 0 1px 0 rgba(255, 255, 255, 0.1);
        transition-duration: 0.1s;
    }

    .social-link:active .social-link-content {
        opacity: 0.3;
        transform: translateY(-2px);
        transition:
            opacity 0.1s ease-out,
            transform 0.1s ease-out;
    }

    .social-link:active::after {
        opacity: 1;
        transform: translateY(0);
        background: var(--tooltip-bg);
        color: var(--tooltip-text);
        transition:
            opacity 0.15s ease-out,
            transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .social-link:active::before {
        left: 100%;
        transition: left 0.2s ease-out;
    }

    /* 移动端群组效果禁用 */
    .social-links:active .social-link:not(:active) {
        transform: none;
        opacity: 1;
        filter: none;
    }

    /* 触摸反馈增强 */
    .social-link:active {
        -webkit-tap-highlight-color: transparent;
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        user-select: none;
    }
}

/* JavaScript 增强状态类 - 协调过渡 */
.social-link.link-entering {
    z-index: 10;
}

.social-link.link-inactive {
    opacity: 0.7;
    transform: translateY(1px);
    filter: brightness(0.95);
}

.social-link.touch-active {
    transform: translateY(0);
    background: var(--hover-bg);
    border-color: var(--hover-border);
    box-shadow:
        0 3px 10px var(--hover-shadow),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.social-link.touch-active .social-link-content {
    opacity: 0.4;
    transform: translateY(-2px);
}

.social-link.touch-active::after {
    opacity: 1;
    transform: translateY(0);
    background: var(--tooltip-bg);
    color: var(--tooltip-text);
}

/* 高级状态组合 */
.social-links:hover .social-link.link-inactive::after {
    opacity: 0;
    transform: translateY(8px) scale(0.9);
}

.social-links:hover .social-link.link-entering::after {
    opacity: 1;
    transform: translateY(0) scale(1);
    transition-delay: 0.1s;
}

/* 流程化序列动画 */
@keyframes linkSequenceIn {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(0.9);
    }
    50% {
        opacity: 0.7;
        transform: translateY(-2px) scale(1.02);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes linkSequenceOut {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    100% {
        opacity: 0.6;
        transform: translateY(2px) scale(0.96);
    }
}

/* 减少动画偏好支持 */
@media (prefers-reduced-motion: reduce) {
    .social-link,
    .social-link::before,
    .social-link::after,
    .social-link-content {
        transition-duration: 0.1s !important;
        animation: none !important;
    }

    .social-link:hover::before {
        display: none;
    }

    .social-link.link-inactive {
        filter: none;
        transform: none !important;
    }
}

/* Modal Styles - 移动端性能优化 */
.modal-overlay {
    position: fixed;
    inset: 0;
    /* 移动端优化：减少模糊效果 */
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease-out, visibility 0.2s ease-out;
    z-index: 1000;
    padding: 1rem;
    /* 移动端性能优化 */
    will-change: opacity;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

/* 深色模式下的模态框遮罩 */
.dark .modal-overlay {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(6px);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    cursor: pointer;
}

.modal-content {
    /* 移动端性能优化：减少模糊和阴影 */
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(59, 130, 246, 0.15);
    border-radius: 20px;
    padding: 0;
    box-shadow:
        0 8px 24px rgba(59, 130, 246, 0.1),
        0 4px 12px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    transform: scale(0.9) translateY(20px);
    transition: transform 0.2s ease-out, opacity 0.2s ease-out;
    position: relative;
    max-width: 400px;
    width: 100%;
    overflow: hidden;
    /* 移动端性能优化 */
    will-change: transform, opacity;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

/* 深色模式下的模态框内容 */
.dark .modal-content {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(99, 102, 241, 0.2);
    box-shadow:
        0 8px 24px rgba(99, 102, 241, 0.12),
        0 4px 12px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.modal-overlay.active .modal-content {
    transform: scale(1) translateY(0);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 2rem;
    /* 移动端优化：移除额外模糊 */
    border-bottom: 1px solid rgba(59, 130, 246, 0.15);
    background: rgba(59, 130, 246, 0.05);
}

/* 深色模式下的模态框头部 */
.dark .modal-header {
    border-bottom: 1px solid rgba(99, 102, 241, 0.2);
    background: rgba(99, 102, 241, 0.08);
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    display: flex;
    align-items: center;
    /* 浅色模式下增强文字对比度 */
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.modal-close {
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.04);
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
}

.modal-close:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.2);
    color: rgba(59, 130, 246, 1);
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.15);
}

/* 深色模式下的关闭按钮 */
.dark .modal-close {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.dark .modal-close:hover {
    background: rgba(99, 102, 241, 0.15);
    border-color: rgba(99, 102, 241, 0.25);
    color: rgba(99, 102, 241, 1);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.2);
}

.modal-body {
    padding: 2rem;
    /* 移动端优化：简化背景，移除模糊 */
    background: rgba(59, 130, 246, 0.02);
}

/* 深色模式下的模态框主体 */
.dark .modal-body {
    background: rgba(99, 102, 241, 0.04);
}

/* Contact Info */
.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    /* 移动端优化：减少模糊效果 */
    background: rgba(59, 130, 246, 0.08);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(59, 130, 246, 0.12);
    border-radius: 12px;
    transition: all 0.2s ease-out;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.08);
    /* 移动端性能优化 */
    will-change: transform;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.contact-item:hover {
    background: rgba(59, 130, 246, 0.12);
    backdrop-filter: blur(6px);
    border-color: rgba(59, 130, 246, 0.2);
    transform: translateX(2px) translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.12);
}

/* 深色模式下的联系项目样式 */
.dark .contact-item {
    background: rgba(99, 102, 241, 0.1);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(99, 102, 241, 0.15);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.1);
}

.dark .contact-item:hover {
    background: rgba(99, 102, 241, 0.15);
    backdrop-filter: blur(6px);
    border-color: rgba(99, 102, 241, 0.25);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15);
}

.contact-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    /* 移动端优化：移除模糊效果 */
    background: linear-gradient(135deg,
        rgba(59, 130, 246, 0.95) 0%,
        rgba(99, 102, 241, 0.95) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.1rem;
    box-shadow: 0 3px 8px rgba(59, 130, 246, 0.2);
    transition: all 0.2s ease-out;
    /* 移动端性能优化 */
    will-change: transform;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

/* 联系图标悬停效果 */
.contact-item:hover .contact-icon {
    background: linear-gradient(135deg,
        rgba(59, 130, 246, 1) 0%,
        rgba(99, 102, 241, 1) 100%);
    transform: scale(1.03);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
}

.contact-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.contact-label {
    font-size: 0.875rem;
    color: rgba(59, 130, 246, 0.7);
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.contact-value {
    color: var(--text-primary);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.contact-value:hover {
    color: rgba(59, 130, 246, 1);
    text-shadow: 0 2px 4px rgba(59, 130, 246, 0.2);
}

/* 深色模式下的联系文字样式 */
.dark .contact-label {
    color: rgba(99, 102, 241, 0.8);
}

.dark .contact-value:hover {
    color: rgba(99, 102, 241, 1);
    text-shadow: 0 2px 4px rgba(99, 102, 241, 0.3);
}

.copy-btn {
    background: rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.04);
    border-radius: 8px;
    padding: 0.5rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.copy-btn:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.2);
    color: rgba(59, 130, 246, 1);
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.15);
}

/* 深色模式下的复制按钮样式 */
.dark .copy-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.dark .copy-btn:hover {
    background: rgba(99, 102, 241, 0.15);
    border-color: rgba(99, 102, 241, 0.25);
    color: rgba(99, 102, 241, 1);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.2);
}

.copy-btn.copied {
    background: var(--success-green);
    color: white;
    animation: bounceGentle 0.6s var(--transition-bounce);
}

/* 统一主题切换按钮样式 */
#theme-toggle:hover {
    background: rgba(59, 130, 246, 0.1) !important;
    border-color: rgba(59, 130, 246, 0.2) !important;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15) !important;
    transform: scale(1.05) !important;
}

.dark #theme-toggle:hover {
    background: rgba(99, 102, 241, 0.15) !important;
    border-color: rgba(99, 102, 241, 0.25) !important;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2) !important;
}

/* 统一主题切换按钮图标颜色 */
#theme-toggle:hover .fa-sun {
    color: rgba(59, 130, 246, 1) !important;
}

#theme-toggle:hover .fa-moon {
    color: rgba(99, 102, 241, 1) !important;
}



/* Footer */
.site-footer {
    position: fixed;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 0.75rem 1.5rem;
    color: var(--text-muted);
    font-size: 0.875rem;
    box-shadow: var(--shadow-md);
    z-index: 100;
    animation: fadeInUp 1s var(--transition-normal) 1s both;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 页脚粒子碰撞效果 */
.site-footer.particle-collision-active {
    box-shadow:
        var(--shadow-md),
        0 0 20px rgba(102, 126, 234, 0.4),
        inset 0 0 15px rgba(102, 126, 234, 0.1);
    border-color: rgba(102, 126, 234, 0.6);
    /* 保持原有的居中transform，只添加发光效果，不改变位置 */
}

.dark .site-footer.particle-collision-active {
    box-shadow:
        var(--shadow-md),
        0 0 25px rgba(102, 126, 234, 0.6),
        inset 0 0 20px rgba(102, 126, 234, 0.15);
    border-color: rgba(102, 126, 234, 0.8);
}



.site-footer p {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 0;
        height: 100vh;
        height: 100dvh;
        overflow: hidden;
    }

    main {
        padding: 1rem;
        height: 100%;
        overflow-y: auto;
    }

    .profile-card {
        padding: 2rem 1.5rem;
        margin: 0;
        border-radius: 20px;
        width: 100%;
        max-width: 100%;
    }

    .avatar-container {
        width: 120px;
        height: 120px;
        margin-bottom: 1.5rem;
    }

    .name {
        font-size: 2rem;
    }

    .bio {
        font-size: 1rem;
    }

    .social-links {
        gap: 0.75rem;
    }

    .social-link {
        padding: 0.875rem 1.25rem;
        font-size: 0.95rem;
        min-height: 52px;
    }

    .social-link::after {
        font-size: 0.9rem;
    }

    .modal-content {
        margin: 1rem;
        max-width: calc(100vw - 2rem);
        max-height: calc(100vh - 2rem);
        overflow-y: auto;
    }

    .modal-header,
    .modal-body {
        padding: 1.5rem;
    }

    .site-footer {
        bottom: 0.5rem;
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
        left: 50%;
        transform: translateX(-50%);
        width: auto;
        max-width: calc(100vw - 2rem);
    }

    #theme-toggle {
        top: 1rem;
        right: 1rem;
        padding: 0.75rem;
    }
}

@media (max-width: 480px) {
    body {
        padding: 0;
        height: 100vh;
        height: 100dvh;
        overflow: hidden;
    }

    main {
        padding: 0.5rem;
        height: 100%;
        overflow-y: auto;
    }

    .profile-card {
        padding: 1.5rem 1rem;
        margin: 0;
        border-radius: 16px;
        width: 100%;
        max-width: 100%;
        min-height: auto;
    }

    .avatar-container {
        width: 100px;
        height: 100px;
        margin-bottom: 1rem;
    }

    .name {
        font-size: 1.75rem;
        margin-bottom: 0.5rem;
    }

    .bio {
        font-size: 0.9rem;
        margin-bottom: 0.75rem;
    }



    .social-links {
        gap: 0.5rem;
    }

    .social-link {
        padding: 1rem 1.25rem;
        font-size: 0.95rem;
        border-radius: 14px;
        min-height: 52px; /* 增加触摸目标大小 */
        min-width: 200px; /* 确保按钮宽度一致 */
    }

    .social-link::after {
        font-size: 0.9rem;
        padding: 0.75rem 1rem;
        border-radius: 12px;
    }

    /* 移动端按钮激活状态优化 */
    .social-link:active {
        transform: translateY(0) scale(0.96) !important;
        background: var(--hover-bg) !important;
        border-color: var(--hover-border) !important;
        box-shadow:
            0 2px 8px var(--hover-shadow) !important,
            inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
    }

    .social-link:active .social-link-content {
        opacity: 0.4 !important;
        transform: translateY(-2px) scale(0.98) !important;
    }

    .social-link:active::after {
        opacity: 1 !important;
        transform: translateY(0) scale(1) !important;
    }

    .social-link-content {
        justify-content: center;
    }

    .social-link i {
        font-size: 1.1rem;
        margin-right: 0.5rem;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        line-height: 1;
        width: 1.1rem;
        height: 1.1rem;
        vertical-align: middle;
        flex-shrink: 0;
    }

    .modal-overlay {
        padding: 0.5rem;
    }

    .modal-content {
        margin: 0;
        max-width: 100%;
        max-height: calc(100vh - 1rem);
        border-radius: 16px;
    }

    .modal-header,
    .modal-body {
        padding: 1rem;
    }

    .modal-title {
        font-size: 1.1rem;
    }

    .contact-item {
        padding: 0.75rem;
        gap: 0.75rem;
        border-radius: 8px;
    }

    .contact-icon {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }

    /* 移动端模态框按钮触摸优化 */
    .modal-close:active {
        background: rgba(59, 130, 246, 0.1) !important;
        border-color: rgba(59, 130, 246, 0.2) !important;
        color: rgba(59, 130, 246, 1) !important;
        transform: scale(0.95) !important;
        box-shadow: 0 2px 6px rgba(59, 130, 246, 0.15) !important;
    }

    .copy-btn:active {
        background: rgba(59, 130, 246, 0.1) !important;
        border-color: rgba(59, 130, 246, 0.2) !important;
        color: rgba(59, 130, 246, 1) !important;
        transform: scale(0.95) !important;
        box-shadow: 0 2px 6px rgba(59, 130, 246, 0.15) !important;
    }

    /* 深色模式下的移动端模态框按钮 */
    .dark .modal-close:active {
        background: rgba(99, 102, 241, 0.15) !important;
        border-color: rgba(99, 102, 241, 0.25) !important;
        color: rgba(99, 102, 241, 1) !important;
        box-shadow: 0 2px 6px rgba(99, 102, 241, 0.2) !important;
    }

    .dark .copy-btn:active {
        background: rgba(99, 102, 241, 0.15) !important;
        border-color: rgba(99, 102, 241, 0.25) !important;
        color: rgba(99, 102, 241, 1) !important;
        box-shadow: 0 2px 6px rgba(99, 102, 241, 0.2) !important;
    }

    /* 联系项目移动端触摸优化 */
    .contact-item:active {
        background: rgba(59, 130, 246, 0.12) !important;
        border-color: rgba(59, 130, 246, 0.25) !important;
        transform: translateX(2px) translateY(0) scale(0.98) !important;
        box-shadow:
            0 4px 12px rgba(59, 130, 246, 0.18) !important,
            inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
    }

    .dark .contact-item:active {
        background: rgba(99, 102, 241, 0.15) !important;
        border-color: rgba(99, 102, 241, 0.3) !important;
        box-shadow:
            0 4px 12px rgba(99, 102, 241, 0.25) !important,
            0 1px 3px rgba(0, 0, 0, 0.3) !important,
            inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
    }

    .site-footer {
        bottom: 0.25rem;
        left: 50%;
        transform: translateX(-50%);
        padding: 0.375rem 0.75rem;
        font-size: 0.75rem;
        width: auto;
        max-width: calc(100vw - 1rem);
    }

    #theme-toggle {
        top: 0.75rem;
        right: 0.75rem;
        padding: 0.625rem;
        width: 44px;
        height: 44px;
    }

    #theme-toggle i {
        font-size: 1rem;
    }

    /* 主题切换按钮移动端触摸优化 */
    #theme-toggle:active {
        background: rgba(59, 130, 246, 0.1) !important;
        border-color: rgba(59, 130, 246, 0.2) !important;
        box-shadow: 0 2px 8px rgba(59, 130, 246, 0.15) !important;
        transform: scale(0.95) !important;
    }

    .dark #theme-toggle:active {
        background: rgba(99, 102, 241, 0.15) !important;
        border-color: rgba(99, 102, 241, 0.25) !important;
        box-shadow: 0 2px 8px rgba(99, 102, 241, 0.2) !important;
    }

    #theme-toggle:active .fa-sun {
        color: rgba(59, 130, 246, 1) !important;
    }

    #theme-toggle:active .fa-moon {
        color: rgba(99, 102, 241, 1) !important;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .avatar {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Landscape Mobile */
@media (max-height: 600px) and (orientation: landscape) {
    .profile-card {
        padding: 1rem;
        max-height: 90vh;
        overflow-y: auto;
    }

    .avatar-container {
        width: 80px;
        height: 80px;
        margin-bottom: 0.75rem;
    }

    .name {
        font-size: 1.5rem;
        margin-bottom: 0.25rem;
    }

    .bio {
        font-size: 0.875rem;
        margin-bottom: 0.5rem;
    }



    .social-links {
        gap: 0.5rem;
    }

    .site-footer {
        display: none;
    }
}

/* Print Styles */
@media print {
    .modal-overlay,
    #theme-toggle,
    #particles-canvas {
        display: none !important;
    }

    .profile-card {
        box-shadow: none;
        border: 1px solid #ccc;
        background: white;
    }

    .name,
    .bio,
    .social-link {
        color: black !important;
        background: transparent !important;
    }
}

/* Focus Styles for Accessibility */
button:focus-visible,
a:focus-visible {
    outline: 2px solid var(--accent-blue);
    outline-offset: 2px;
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.loading::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shimmer 1.5s ease-in-out infinite;
}

/* Success States */
.success {
    background: var(--success-green) !important;
    color: white !important;
    animation: bounceGentle 0.6s var(--transition-bounce);
}

/* Error States */
.error {
    background: #e53e3e !important;
    color: white !important;
    animation: bounceGentle 0.6s var(--transition-bounce);
}

/* 移动端头像动画 - 减少强度的版本 */
@keyframes avatarWiggleBounceMobile {
    0% {
        transform: scale(1) rotate(0deg);
    }
    20% {
        transform: scale(1.03) rotate(1deg);
    }
    40% {
        transform: scale(1.05) rotate(-0.5deg);
    }
    60% {
        transform: scale(1.04) rotate(0.5deg);
    }
    80% {
        transform: scale(1.02) rotate(-0.2deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
    }
}

/* 移动端性能优化 - 减少模糊效果 */
@media (max-width: 768px) {
    /* 移动端模态框性能优化 */
    .modal-overlay {
        backdrop-filter: blur(2px) !important;
        background: rgba(0, 0, 0, 0.75) !important;
    }

    .dark .modal-overlay {
        backdrop-filter: blur(3px) !important;
        background: rgba(0, 0, 0, 0.85) !important;
    }

    .modal-content {
        backdrop-filter: blur(4px) !important;
        box-shadow: 0 4px 16px rgba(59, 130, 246, 0.08) !important;
    }

    .dark .modal-content {
        backdrop-filter: blur(5px) !important;
        box-shadow: 0 4px 16px rgba(99, 102, 241, 0.1) !important;
    }

    /* 联系项目性能优化 */
    .contact-item {
        backdrop-filter: blur(2px) !important;
        transition: all 0.15s ease-out !important;
    }

    .contact-item:hover {
        backdrop-filter: blur(3px) !important;
        transform: translateX(1px) !important;
    }

    .dark .contact-item {
        backdrop-filter: blur(2px) !important;
    }

    .dark .contact-item:hover {
        backdrop-filter: blur(3px) !important;
    }

    /* 联系图标性能优化 */
    .contact-icon {
        box-shadow: 0 2px 6px rgba(59, 130, 246, 0.15) !important;
    }

    .contact-item:hover .contact-icon {
        transform: scale(1.02) !important;
        box-shadow: 0 3px 8px rgba(59, 130, 246, 0.2) !important;
    }
}

/* 移动端触摸设备专用优化 */
@media (hover: none) and (pointer: coarse) {
    /* 移动端触摸优化 - 头像 */
    .avatar-container:active .avatar-wrapper {
        animation: avatarWiggleBounceMobile 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
        animation-iteration-count: 1;
    }

    /* 移动端触摸优化 - 社交链接按钮 */
    .social-link:active {
        transform: translateY(0) scale(0.96) !important;
        background: var(--hover-bg) !important;
        border-color: var(--hover-border) !important;
        box-shadow:
            0 2px 8px var(--hover-shadow) !important,
            inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
        transition-duration: 0.1s !important;
    }

    .social-link:active .social-link-content {
        opacity: 0.4 !important;
        transform: translateY(-2px) scale(0.98) !important;
    }

    .social-link:active::after {
        opacity: 1 !important;
        transform: translateY(0) scale(1) !important;
        background: var(--tooltip-bg) !important;
        color: var(--tooltip-text) !important;
    }

    /* 移动端触摸优化 - 模态框按钮 */
    .modal-close:active,
    .copy-btn:active {
        background: var(--hover-bg) !important;
        border-color: var(--hover-border) !important;
        color: rgba(59, 130, 246, 1) !important;
        transform: scale(0.95) !important;
        box-shadow: 0 2px 6px var(--hover-shadow) !important;
        transition-duration: 0.1s !important;
    }

    /* 深色模式下的移动端触摸优化 */
    .dark .modal-close:active,
    .dark .copy-btn:active {
        background: rgba(99, 102, 241, 0.15) !important;
        border-color: rgba(99, 102, 241, 0.25) !important;
        color: rgba(99, 102, 241, 1) !important;
        box-shadow: 0 2px 6px rgba(99, 102, 241, 0.2) !important;
    }

    /* 移动端触摸优化 - 主题切换按钮 */
    #theme-toggle:active {
        background: var(--hover-bg) !important;
        border-color: var(--hover-border) !important;
        box-shadow: 0 2px 8px var(--hover-shadow) !important;
        transform: scale(0.95) !important;
        transition-duration: 0.1s !important;
    }

    .dark #theme-toggle:active {
        background: rgba(99, 102, 241, 0.15) !important;
        border-color: rgba(99, 102, 241, 0.25) !important;
        box-shadow: 0 2px 8px rgba(99, 102, 241, 0.2) !important;
    }

    #theme-toggle:active .fa-sun {
        color: rgba(59, 130, 246, 1) !important;
    }

    #theme-toggle:active .fa-moon {
        color: rgba(99, 102, 241, 1) !important;
    }

    /* 移动端触摸优化 - 联系项目 */
    .contact-item:active {
        background: rgba(59, 130, 246, 0.12) !important;
        border-color: rgba(59, 130, 246, 0.25) !important;
        transform: translateX(2px) translateY(0) scale(0.98) !important;
        box-shadow:
            0 4px 12px rgba(59, 130, 246, 0.18) !important,
            inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
        transition-duration: 0.1s !important;
    }

    .dark .contact-item:active {
        background: rgba(99, 102, 241, 0.15) !important;
        border-color: rgba(99, 102, 241, 0.3) !important;
        box-shadow:
            0 4px 12px rgba(99, 102, 241, 0.25) !important,
            0 1px 3px rgba(0, 0, 0, 0.3) !important,
            inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
    }
}

/* 减少动画偏好设置 - 无障碍访问 */
@media (prefers-reduced-motion: reduce) {
    .avatar-container:hover .avatar-wrapper,
    .avatar-container:active .avatar-wrapper {
        animation: none !important;
        transform: scale(1.05);
        transition: transform 0.2s ease-in-out;
    }
}

/* 深色模式优化 */
@media (prefers-color-scheme: dark) {
    .avatar-container {
        /* 深色模式下增强对比度 */
        filter: brightness(1.05) contrast(1.02);
    }

    .avatar-container:hover .avatar-wrapper {
        /* 深色模式下的动画保持一致 */
        animation: avatarWiggleBounce 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    }
}
