/* ========================================
   Zander Portfolio - Apple Glass Design
   Modern Frosted Glass Aesthetic
   ======================================== */

/* ========== 主题变量 ========== */
:root {
    --bg-primary: #000000;
    --bg-secondary: #0a0a0a;
    --bg-tertiary: #1a1a1a;
    --bg-elevated: rgba(255, 255, 255, 0.06);

    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-bg-hover: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-border-hover: rgba(255, 255, 255, 0.18);
    --glass-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
    --glass-blur: 25px;

    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.65);
    --text-tertiary: rgba(255, 255, 255, 0.35);

    --accent-primary: #846afd;
    --accent-secondary: #5856D6;
    --accent-tertiary: #AF52DE;
    --accent-gradient: linear-gradient(135deg, #007AFF 0%, #5856D6 50%, #AF52DE 100%);

    --surface-elevated: rgba(255, 255, 255, 0.04);
    --border-subtle: rgba(255, 255, 255, 0.06);

    --gradient-glow: radial-gradient(ellipse at 50% 0%, rgba(0, 122, 255, 0.2) 0%, transparent 50%);
    --gradient-secondary: radial-gradient(ellipse at 80% 50%, rgba(88, 86, 214, 0.12) 0%, transparent 50%);

    --shadow-sm: 0 2px 12px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 12px 48px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 20px 80px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 80px rgba(0, 122, 255, 0.35);

    --transition-fast: 0.2s ease;
    --transition-normal: 0.35s ease;
    --transition-slow: 0.5s ease;
    --transition-spring: 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);

    --font-system: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Helvetica Neue', sans-serif;
    --font-mono: 'SF Mono', 'Fira Code', 'JetBrains Mono', monospace;
}

[data-theme="light"] {
    --bg-primary: #F5F5F7;
    --bg-secondary: #FFFFFF;
    --bg-tertiary: #E8E8ED;
    --bg-elevated: rgba(0, 0, 0, 0.02);

    --glass-bg: rgba(255, 255, 255, 0.65);
    --glass-bg-hover: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(0, 0, 0, 0.08);
    --glass-border-hover: rgba(0, 0, 0, 0.15);
    --glass-shadow: 0 8px 40px rgba(0, 0, 0, 0.08);
    --glass-blur: 25px;

    --text-primary: #1d1d1f;
    --text-secondary: rgba(29, 29, 31, 0.6);
    --text-tertiary: rgba(29, 29, 31, 0.4);

    --accent-primary: #846afd;
    --accent-secondary: #AF52DE;
    --accent-tertiary: #5856D6;

    --surface-elevated: rgba(255, 255, 255, 0.9);
    --border-subtle: rgba(0, 0, 0, 0.06);

    --gradient-glow: radial-gradient(ellipse at 50% 0%, rgba(132, 106, 253, 0.08) 0%, transparent 50%);
    --gradient-secondary: radial-gradient(ellipse at 80% 50%, rgba(88, 86, 214, 0.05) 0%, transparent 50%);

    --shadow-sm: 0 2px 12px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 12px 48px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 20px 80px rgba(0, 0, 0, 0.12);
    --shadow-glow: 0 0 80px rgba(132, 106, 253, 0.2);
}

/* ========== 基础重置 ========== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    background: var(--bg-primary);
    background-image:
        var(--gradient-glow),
        var(--gradient-secondary);
    background-attachment: fixed;
    color: var(--text-primary);
    font-family: var(--font-system);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
    transition: background-color var(--transition-normal), color var(--transition-normal);
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image:
        radial-gradient(circle at 20% 20%, rgba(0, 122, 255, 0.04) 0%, transparent 40%),
        radial-gradient(circle at 80% 80%, rgba(88, 86, 214, 0.04) 0%, transparent 40%);
    pointer-events: none;
    z-index: -2;
}

body::after {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    opacity: 0.025;
    pointer-events: none;
    z-index: -1;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: clamp(1.5rem, 4vw, 3rem);
    position: relative;
    z-index: 1;
}

/* ========== Apple 磨砂玻璃 ========== */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur)) saturate(200%);
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(200%);
    border: 1px solid var(--glass-border);
    border-radius: 22px;
    box-shadow: var(--glass-shadow);
    transition: all var(--transition-normal);
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur)) saturate(200%);
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(200%);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow: var(--glass-shadow);
    transition: all var(--transition-spring);
    position: relative;
    overflow: hidden;
}

/* 顶部光泽条 */
.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
}

.glass-card:hover {
    background: var(--glass-bg-hover);
    border-color: var(--glass-border-hover);
    box-shadow: var(--shadow-lg);
    transform: translateY(-5px);
}

.glass-card:active {
    transform: translateY(-2px) scale(0.99);
}

/* 玻璃卡片内部光效 */
.glass-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.06) 0%, transparent 60%);
    pointer-events: none;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.glass-card:hover::after {
    opacity: 1;
}

/* ========== 头部区域 ========== */
header {
    padding: clamp(2rem, 5vw, 4rem) 0;
    margin-bottom: clamp(3rem, 6vw, 5rem);
    position: relative;
}

body {
    padding-top: 0;
}

.header-glow {
    position: absolute;
    top: -30%;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    max-width: 700px;
    height: 350px;
    background: radial-gradient(
        ellipse at center,
        rgba(0, 122, 255, 0.25) 0%,
        rgba(88, 86, 214, 0.12) 40%,
        transparent 70%
    );
    filter: blur(100px);
    pointer-events: none;
    z-index: 0;
    animation: pulse-glow 8s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { opacity: 0.7; transform: translateX(-50%) scale(1); }
    50% { opacity: 1; transform: translateX(-50%) scale(1.08); }
}

.header-content {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
}

.header-main {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.logo-wrapper {
    padding: 0.8rem 1.2rem;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.logo-wrapper::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.12) 0%, transparent 50%);
}

.brand-logo {
    height: 48px;
    width: auto;
    filter: drop-shadow(0 4px 16px rgba(0, 122, 255, 0.35));
    transition: transform var(--transition-spring);
}

.logo-wrapper:hover .brand-logo {
    transform: scale(1.08) rotate(-3deg);
}

.profile-section {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    padding-left: 1.5rem;
    border-left: 1px solid var(--border-subtle);
}

.avatar {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    object-fit: cover;
    position: relative;
    cursor: pointer;
    transition: all var(--transition-spring);
}

/* 头像外圈光晕 */
.avatar::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: linear-gradient(135deg, #007AFF, #5856D6, #AF52DE);
    z-index: -1;
    opacity: 0.6;
    animation: avatar-glow 3s ease-in-out infinite;
}

@keyframes avatar-glow {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.05); }
}

/* 头像内部图片 */
.avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--bg-secondary);
    display: block;
}

.avatar:hover {
    transform: scale(1.08);
}

.avatar:hover::before {
    opacity: 1;
    animation: none;
    box-shadow: 0 0 30px var(--accent-primary);
}

.intro-text {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.intro-text h1 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.intro-text p {
    font-family: var(--font-mono);
    color: var(--accent-primary);
    font-size: 0.8rem;
}

.intro-text .subtitle {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    letter-spacing: 1px;
}

.contact-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* ========== 按钮 ========== */
.btn,
.btn-secondary {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    color: var(--text-primary);
    padding: 0.65rem 1.3rem;
    font-family: var(--font-system);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-spring);
    border-radius: 14px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
    outline: none;
}

/* 按钮呼吸边框 */
.btn::before,
.btn-secondary::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 14px;
    padding: 2px;
    background: linear-gradient(135deg, #007AFF, #5856D6, #AF52DE);
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0.5;
    animation: btn-breathe 3s ease-in-out infinite;
}

@keyframes btn-breathe {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.9; }
}

.btn:hover,
.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(132, 106, 253, 0.4);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.btn:focus-visible,
.btn-secondary:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 3px;
}
/* ========== 内容区域 ========== */
section {
    margin-bottom: clamp(3rem, 6vw, 5rem);
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

section.visible {
    opacity: 1;
    transform: translateY(0);
}

.section-title {
    font-size: clamp(1.4rem, 3vw, 1.8rem);
    font-weight: 700;
    margin-bottom: 2rem;
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 1rem;
}

.section-title::before {
    content: '';
    width: 5px;
    height: 28px;
    background: var(--accent-gradient);
    border-radius: 3px;
}

.section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--border-subtle), transparent);
    min-width: 80px;
}

/* ========== 技术卡片 - 2行3列 ========== */
.tech-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

.tech-card {
    padding: clamp(1.2rem, 2.5vw, 1.8rem);
    position: relative;
}

/* 技术卡片悬浮 - 顶部流光效果 */
.tech-card {
    padding: clamp(1.2rem, 2.5vw, 1.8rem);
    position: relative;
}

/* 悬浮时顶部光泽流动 */
.tech-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg,
        transparent 0%,
        var(--accent-primary) 30%,
        var(--accent-secondary) 60%,
        transparent 100%
    );
    opacity: 0;
    transform: scaleX(0);
    transform-origin: center;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.tech-card:hover::after {
    opacity: 0.8;
    transform: scaleX(1);
}

/* 悬浮时整体微上移 + 发光边框 */
.tech-card:hover {
    transform: translateY(-6px);
    border-color: rgba(0, 122, 255, 0.25);
    box-shadow:
        var(--shadow-md),
        0 0 50px rgba(0, 122, 255, 0.12);
}

.tech-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.6rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

/* 卡通圆点图标 */
.tech-card h3::before {
    content: '';
    width: 10px;
    height: 10px;
    background: var(--accent-primary);
    border-radius: 50%;
    box-shadow: 0 0 16px var(--accent-primary);
    animation: bounce-dot 2s ease-in-out infinite;
}

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

.tech-card:nth-child(2) h3::before {
    background: var(--accent-secondary);
    box-shadow: 0 0 16px var(--accent-secondary);
    animation-delay: 0.3s;
}
.tech-card:nth-child(3) h3::before {
    background: var(--accent-tertiary);
    box-shadow: 0 0 16px var(--accent-tertiary);
    animation-delay: 0.6s;
}
.tech-card:nth-child(4) h3::before {
    background: #34C759;
    box-shadow: 0 0 16px #34C759;
    animation-delay: 0.9s;
}
.tech-card:nth-child(5) h3::before {
    background: #FF9500;
    box-shadow: 0 0 16px #FF9500;
    animation-delay: 1.2s;
}
.tech-card:nth-child(6) h3::before {
    background: #FF2D55;
    box-shadow: 0 0 16px #FF2D55;
    animation-delay: 1.5s;
}

.tech-card p {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ========== 项目展示 ========== */
.project-highlight {
    padding: clamp(1.5rem, 3vw, 2.5rem);
    position: relative;
    overflow: hidden;
    transition: all var(--transition-spring);
}

.project-highlight:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg), 0 0 60px rgba(132, 106, 253, 0.15);
}

.project-highlight::before {
    content: 'SERVICE';
    position: absolute;
    top: 12px;
    right: 20px;
    font-family: var(--font-mono);
    font-size: clamp(3rem, 8vw, 5rem);
    font-weight: 800;
    color: var(--border-subtle);
    letter-spacing: 4px;
    pointer-events: none;
}

.project-highlight::after {
    content: '';
    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-primary), transparent);
    opacity: 0;
    transform: scaleX(0);
    transition: all 0.5s ease;
}

.project-highlight:hover::after {
    opacity: 0.6;
    transform: scaleX(1);
}

.project-content {
    display: flex;
    flex-wrap: wrap;
    gap: 2.5rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.project-image {
    flex: 1;
    min-width: 300px;
    position: relative;
}

.project-image img {
    width: 100%;
    height: auto;
    border-radius: 18px;
    transition: all var(--transition-spring);
    box-shadow: var(--shadow-lg);
    position: relative;
    z-index: 1;
}

.project-image::before {
    content: '';
    position: absolute;
    inset: -4px;
    background: linear-gradient(135deg, #007AFF, #5856D6, #AF52DE);
    border-radius: 22px;
    z-index: 0;
    opacity: 0.3;
    filter: blur(20px);
    transition: all var(--transition-normal);
}

.project-image:hover img {
    transform: scale(1.03);
}

.project-image:hover::before {
    opacity: 0.6;
    filter: blur(25px);
}

.project-info {
    flex: 1.1;
    min-width: 300px;
}

.project-tags {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.tag {
    background: rgba(0, 122, 255, 0.1);
    color: var(--accent-primary);
    padding: 0.35rem 0.8rem;
    font-size: 0.72rem;
    font-family: var(--font-mono);
    font-weight: 600;
    border-radius: 20px;
    border: 1px solid rgba(0, 122, 255, 0.2);
    transition: all var(--transition-fast);
}

.tag:hover {
    background: rgba(0, 122, 255, 0.18);
    transform: translateY(-2px) scale(1.05);
    border-color: var(--accent-primary);
}

.project-info h3 {
    font-size: clamp(1.3rem, 2.5vw, 1.6rem);
    font-weight: 700;
    margin-bottom: 0.7rem;
}

.project-info p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-size: 0.92rem;
    line-height: 1.8;
}

.project-list {
    list-style: none;
    margin-top: 1.2rem;
    padding: 1.2rem;
    background: var(--surface-elevated);
    border-radius: 14px;
    border-left: 3px solid var(--accent-primary);
}

.project-list li {
    margin-bottom: 0.6rem;
    padding-left: 1.3rem;
    position: relative;
    color: var(--text-secondary);
    font-size: 0.88rem;
}

.project-list li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--accent-primary);
}

.project-list li strong {
    color: var(--accent-primary);
}

/* ========== 关于区域 ========== */
.about-content {
    padding: clamp(1.5rem, 3vw, 2rem);
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 2rem;
    align-items: center;
}

.about-text p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 1.2rem;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.9rem;
}

.stat-item {
    padding: 1rem;
    text-align: center;
    background: var(--surface-elevated);
    border-radius: 14px;
    border: 1px solid var(--border-subtle);
    transition: all var(--transition-spring);
}

.stat-item:hover {
    transform: translateY(-4px);
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-md);
}

.stat-number {
    font-size: 1.6rem;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-label {
    font-size: 0.68rem;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 0.2rem;
}

.about-terminal {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    background: rgba(132, 106, 253, 0.08);
    padding: 1.4rem 1.6rem;
    border-radius: 14px;
    border: 1px solid rgba(132, 106, 253, 0.2);
    line-height: 1.9;
    margin-top: 1.2rem;
    position: relative;
    overflow: hidden;
}

/* 顶部装饰线 */
.about-terminal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 1.6rem;
    right: 1.6rem;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(132, 106, 253, 0.5), transparent);
}

.terminal-line {
    color: #846afd;
    font-weight: 600;
    margin-bottom: 0.5rem;
    white-space: nowrap;
    overflow: hidden;
}

.terminal-line:last-child {
    margin-bottom: 0;
}

.terminal-line::before {
    content: '> ';
    opacity: 0.7;
}

/* ========== 模态框 ========== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(25px) brightness(0.7);
    -webkit-backdrop-filter: blur(25px) brightness(0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
    padding: 1.5rem;
}

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

.modal-content {
    background: var(--bg-secondary);
    backdrop-filter: blur(50px) saturate(200%);
    -webkit-backdrop-filter: blur(50px) saturate(200%);
    padding: 3rem;
    border: 1px solid var(--glass-border);
    text-align: center;
    position: relative;
    max-width: 95%;
    width: 480px;
    box-shadow: var(--shadow-lg);
    transform: scale(0.9) translateY(30px);
    transition: all var(--transition-spring);
    border-radius: 30px;
}

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

.modal-content img {
    width: 280px;
    height: 280px;
    object-fit: contain;
    border-radius: 18px;
    margin-top: 1.2rem;
    border: 1px solid var(--border-subtle);
}

.qq-info-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-top: 1.2rem;
}

.modal-content .qq-number {
    font-family: var(--font-mono);
    font-size: 1.4rem;
    color: var(--accent-primary);
    padding: 0.9rem 1.8rem;
    background: rgba(0, 122, 255, 0.08);
    border-radius: 14px;
    border: 1px dashed rgba(0, 122, 255, 0.3);
    letter-spacing: 3px;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.modal-content .qq-number:hover {
    background: rgba(0, 122, 255, 0.12);
    box-shadow: 0 0 35px rgba(0, 122, 255, 0.25);
}

.close-modal {
    position: absolute;
    top: 14px;
    right: 14px;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-tertiary);
    background: var(--surface-elevated);
    border: 1px solid var(--border-subtle);
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border-radius: 50%;
    transition: all var(--transition-fast);
}

.close-modal:hover {
    color: var(--text-primary);
    transform: rotate(90deg) scale(1.1);
    background: var(--glass-bg);
}

.modal-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
}

.modal-subtitle {
    font-size: 0.88rem;
    color: var(--text-secondary);
    margin-top: 0.4rem;
}

/* ========== Toast ========== */
.toast {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%) translateY(120px);
    background: var(--bg-secondary);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    padding: 0.9rem 1.6rem;
    border-radius: 14px;
    opacity: 0;
    transition: all var(--transition-spring);
    z-index: 1001;
    font-family: var(--font-mono);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
}

.toast::before {
    content: '✓';
    color: #34C759;
    font-weight: bold;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* ========== Footer ========== */
footer {
    text-align: center;
    padding: 3rem 0;
    border-top: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    background: var(--bg-secondary);
}

footer p {
    margin-bottom: 0.3rem;
    font-weight: 500;
}

footer p + p {
    font-family: var(--font-mono);
    letter-spacing: 4px;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--accent-primary);
}

footer a {
    color: var(--text-secondary);
    font-weight: 600;
    text-decoration: none;
    transition: color var(--transition-fast);
}

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

footer p:last-child a {
    color: var(--text-secondary);
    font-weight: 600;
}

footer p:last-child a:hover {
    color: var(--accent-primary);
}

/* ========== 流动背景 ========== */
.floating-shapes {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -2;
    overflow: hidden;
}

.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.35;
    animation: float 25s ease-in-out infinite;
}

.shape-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--accent-primary) 0%, transparent 70%);
    top: -150px;
    left: -150px;
}

.shape-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--accent-secondary) 0%, transparent 70%);
    bottom: -100px;
    right: -100px;
    animation-delay: -7s;
}

.shape-3 {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, var(--accent-tertiary) 0%, transparent 70%);
    top: 50%;
    left: 55%;
    transform: translate(-50%, -50%);
    animation-delay: -14s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    20% { transform: translate(40px, -50px) rotate(5deg); }
    40% { transform: translate(-30px, 40px) rotate(-5deg); }
    60% { transform: translate(50px, 30px) rotate(3deg); }
    80% { transform: translate(-20px, -40px) rotate(-3deg); }
}

/* ========== 控制按钮 ========== */
.lang-switch,
.theme-switch {
    position: fixed;
    top: 18px;
    z-index: 101;
    background: var(--glass-bg);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid var(--glass-border);
    border-radius: 30px;
    padding: 0.6rem 1.2rem;
    cursor: pointer;
    transition: all var(--transition-spring);
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-family: var(--font-system);
    font-size: 0.82rem;
    color: var(--text-primary);
    box-shadow: var(--shadow-md);
}

.lang-switch {
    right: 140px;
}

.theme-switch {
    right: 18px;
    padding: 0.6rem;
    width: 44px;
    height: 44px;
    justify-content: center;
}

.theme-icon {
    font-size: 1.1rem;
}

.lang-switch:hover,
.theme-switch:hover {
    background: var(--glass-bg-hover);
    border-color: var(--accent-primary);
    transform: scale(1.05);
}

.lang-current {
    font-weight: 500;
}

.lang-divider {
    color: var(--text-tertiary);
}

.lang-alt {
    color: var(--accent-primary);
    font-weight: 500;
}

/* ========== 响应式 ========== */
@media (max-width: 1024px) {
    .tech-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .container {
        padding: 1.2rem;
    }

    header {
        padding: 2rem 0 1.5rem;
        margin-bottom: 3rem;
    }

    .header-content {
        flex-direction: column;
        align-items: center;
    }

    .header-main {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }

    .profile-section {
        border-left: none;
        padding-left: 0;
        padding-top: 1rem;
        border-top: 1px solid var(--border-subtle);
        width: 100%;
        justify-content: center;
    }

    .contact-buttons {
        width: 100%;
        justify-content: center;
        margin-top: 1rem;
    }

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

    .modal-content {
        padding: 2.5rem 1.5rem;
    }

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

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

@media (max-width: 480px) {
    html {
        font-size: 14px;
    }

    .container {
        padding: 1rem;
    }

    .header-main {
        flex-direction: column;
        gap: 1rem;
    }

    .brand-logo {
        height: 42px;
    }

    .profile-section {
        flex-direction: column;
        gap: 0.8rem;
    }

    .avatar {
        width: 60px;
        height: 60px;
    }

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

    .btn {
        width: 100%;
    }

    .project-content {
        flex-direction: column;
    }

    .modal-content {
        width: 92%;
        padding: 2rem 1.2rem;
    }

    .modal-content img {
        width: 220px;
        height: 220px;
    }

    .lang-switch {
        right: 110px;
        top: 14px;
    }

    .theme-switch {
        top: 14px;
    }
}

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

@keyframes shine {
    0% { left: -100%; }
    100% { left: 200%; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

@media (hover: none) {
    .glass-card:hover,
    .btn:hover {
        transform: none;
    }
    .glass-card:active,
    .btn:active {
        transform: scale(0.97);
    }
}