:root {
    --bg-primary: #0b0f1a;
    --bg-secondary: #111827;
    --bg-card: rgba(17, 24, 39, 0.68);
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --accent: #ff6b4a;
    --accent-hover: #ff865f;
    --accent-secondary: #2dd4bf;
    --accent-tertiary: #f5b942;
    --accent-glow: rgba(255, 107, 74, 0.45);
    --gradient: linear-gradient(135deg, #ff6b4a 0%, #2dd4bf 100%);
    --gradient-text: linear-gradient(135deg, #ffd2c7 0%, #7ff0e3 100%);
    --gradient-green: linear-gradient(135deg, #2dd4bf 0%, #f5b942 100%);
    --border: rgba(226, 232, 240, 0.12);
    --border-hover: rgba(255, 107, 74, 0.6);
    --glass: rgba(15, 23, 42, 0.68);
    --glass-border: rgba(226, 232, 240, 0.12);
    --font-body: 'Space Grotesk', sans-serif;
    --font-display: 'Fraunces', 'Space Grotesk', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

[data-theme="light"] {
    --bg-primary: #f8f5f0;
    --bg-secondary: #ffffff;
    --bg-card: rgba(255, 255, 255, 0.9);
    --text-primary: #1f2937;
    --text-secondary: #4b5563;
    --text-muted: #9ca3af;
    --border: rgba(17, 24, 39, 0.08);
    --glass: rgba(255, 255, 255, 0.88);
    --glass-border: rgba(17, 24, 39, 0.08);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
}

h1, h2, h3, .section-title, .nav-brand, .hero-badge {
    font-family: var(--font-display);
}

::selection { background: var(--accent); color: white; }

/* Loader */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transition: opacity 0.5s, visibility 0.5s;
}

.loader.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.no-js .loader { display: none; }

.loader-content { text-align: center; }
.loader-icon { font-size: 4rem; animation: bounce-loader 1s infinite; }
.loader-text { margin-top: 1rem; color: var(--text-secondary); font-family: var(--font-mono); }
.loader-bar { width: 200px; height: 4px; background: var(--border); border-radius: 2px; margin-top: 1rem; overflow: hidden; }
.loader-progress { height: 100%; width: 0%; background: var(--gradient); animation: load-progress 1.5s ease-out forwards; }

@keyframes bounce-loader { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-20px); } }
@keyframes load-progress { 0% { width: 0%; } 100% { width: 100%; } }

/* Cursor Effects */
#cursor-glow {
    position: fixed;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255, 107, 74, 0.12) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
    transition: opacity 0.3s;
    opacity: 0;
}

#cursor-dot {
    position: fixed;
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: transform 0.1s, width 0.2s, height 0.2s;
    box-shadow: 0 0 20px var(--accent-glow);
}

body:hover #cursor-glow { opacity: 1; }

/* Gradient Background */
.gradient-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse at 20% 20%, rgba(255, 107, 74, 0.12) 0%, transparent 55%),
        radial-gradient(ellipse at 80% 75%, rgba(45, 212, 191, 0.12) 0%, transparent 55%),
        radial-gradient(ellipse at 60% 40%, rgba(245, 185, 66, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 10% 90%, rgba(245, 185, 66, 0.06) 0%, transparent 45%);
    pointer-events: none;
    z-index: 0;
}

#particles { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; }

/* Glass Card */
.glass-card {
    background: var(--glass);
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

.glass-card:hover { 
    border-color: var(--accent); 
    box-shadow: 0 0 40px rgba(255, 107, 74, 0.25);
    background: rgba(15, 23, 42, 0.8);
    transform: translateY(-8px) scale(1.01);
}

[data-theme="light"] .glass-card {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    backdrop-filter: blur(20px);
    background: rgba(10, 14, 24, 0.88);
    border-bottom: 1px solid var(--border);
    transition: all 0.3s;
}

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

.nav-brand { font-size: 1.5rem; font-weight: 800; display: flex; align-items: center; gap: 0.5rem; }
.brand-icon { font-size: 1.8rem; }
.brand-text { background: var(--gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }

.nav-links { display: flex; gap: 2.5rem; }
.nav-links a { color: var(--text-secondary); text-decoration: none; font-weight: 500; position: relative; padding: 0.5rem 0; transition: color 0.3s; }
.nav-links a::before { content: ''; position: absolute; bottom: 0; left: 50%; width: 0; height: 2px; background: var(--gradient); transition: all 0.3s; transform: translateX(-50%); }
.nav-links a:hover { color: var(--text-primary); }
.nav-links a:hover::before { width: 100%; }

.nav-controls { display: flex; gap: 0.75rem; }
.control-btn { background: var(--bg-card); border: 1px solid var(--border); color: var(--text-primary); width: 44px; height: 44px; border-radius: 12px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.3s; }
.control-btn:hover { background: var(--accent); border-color: var(--accent); transform: translateY(-2px) scale(1.05); box-shadow: 0 10px 30px var(--accent-glow); }

/* Hero */
.hero { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 6rem 2rem 2rem; position: relative; z-index: 2; overflow: hidden; }

.hero-bg-text { position: absolute; font-size: clamp(8rem, 18vw, 18rem); font-weight: 900; color: rgba(255, 107, 74, 0.035); white-space: nowrap; user-select: none; z-index: 0; animation: float-text 20s linear infinite; }
@keyframes float-text { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

.floating-shapes { position: absolute; width: 100%; height: 100%; overflow: hidden; z-index: 0; }
.shape { position: absolute; border-radius: 50%; filter: blur(60px); opacity: 0.5; animation: float-shape 15s infinite; }
.shape-1 { width: 400px; height: 400px; background: rgba(255, 107, 74, 0.18); top: 10%; left: 10%; animation-delay: 0s; }
.shape-2 { width: 300px; height: 300px; background: rgba(45, 212, 191, 0.18); top: 60%; right: 10%; animation-delay: -5s; }
.shape-3 { width: 250px; height: 250px; background: rgba(245, 185, 66, 0.16); bottom: 20%; left: 30%; animation-delay: -10s; }
@keyframes float-shape { 0%, 100% { transform: translate(0, 0) scale(1); } 33% { transform: translate(30px, -30px) scale(1.1); } 66% { transform: translate(-20px, 20px) scale(0.9); } }

.hero-content { max-width: 1000px; position: relative; z-index: 2; }

/* Header */
.header-top {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.hero-avatar { 
    width: 160px; 
    height: 160px; 
    margin: 0 auto 1.5rem; 
    position: relative; 
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.hero-avatar:hover {
    transform: scale(1.05) rotate(2deg);
}
.hero-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; position: relative; z-index: 2; border: 4px solid transparent; background: linear-gradient(var(--bg-primary), var(--bg-primary)) padding-box, var(--gradient) border-box; }
.avatar-status { position: absolute; bottom: 10px; right: 10px; z-index: 3; }
.status-dot { display: block; width: 20px; height: 20px; background: #2dd4bf; border-radius: 50%; border: 3px solid var(--bg-primary); animation: pulse-status 2s infinite; }
@keyframes pulse-status { 0%, 100% { box-shadow: 0 0 0 0 rgba(45, 212, 191, 0.7); } 50% { box-shadow: 0 0 0 10px rgba(45, 212, 191, 0); } }

.avatar-ring { position: absolute; top: -15px; left: -15px; right: -15px; bottom: -15px; border: 2px solid var(--accent); border-radius: 50%; opacity: 0.3; animation: pulse-ring 3s ease-out infinite; }
.avatar-ring-2 { animation-delay: 1s; }
.avatar-ring-3 { animation-delay: 2s; top: -25px; left: -25px; right: -25px; bottom: -25px; }
@keyframes pulse-ring { 0% { transform: scale(1); opacity: 0.3; } 100% { transform: scale(1.4); opacity: 0; } }

.hero-badge { display: inline-flex; align-items: center; gap: 0.5rem; background: rgba(45, 212, 191, 0.18); border: 1px solid rgba(45, 212, 191, 0.35); color: #2dd4bf; padding: 0.6rem 1.2rem; border-radius: 50px; font-size: 0.9rem; font-weight: 600; margin-bottom: 1.5rem; animation: fadeInUp 1s ease; }
.hero-badge .pulse { font-size: 0.5rem; animation: pulse 2s infinite; }
.animate-float { animation: float 3s ease-in-out infinite; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

.hero h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); font-weight: 900; margin-bottom: 1rem; animation: fadeInUp 1s ease 0.1s both; letter-spacing: -0.02em; }
.highlight { background: var(--gradient-text); -webkit-background-clip: text; -webkit-text-fill-color: transparent; position: relative; }

.glitch-text { position: relative; }
.glitch-text::before, .glitch-text::after { content: attr(data-text); position: absolute; left: 0; top: 0; width: 100%; height: 100%; opacity: 0; }
.glitch-text:hover::before { animation: glitch-1 0.3s linear infinite; color: var(--accent); opacity: 0.8; }
.glitch-text:hover::after { animation: glitch-2 0.3s linear infinite; color: var(--accent-secondary); opacity: 0.8; }
@keyframes glitch-1 { 0%, 100% { transform: translate(0); } 20% { transform: translate(-2px, 2px); } 40% { transform: translate(-2px, -2px); } 60% { transform: translate(2px, 2px); } 80% { transform: translate(2px, -2px); } }
@keyframes glitch-2 { 0%, 100% { transform: translate(0); } 20% { transform: translate(2px, -2px); } 40% { transform: translate(2px, 2px); } 60% { transform: translate(-2px, -2px); } 80% { transform: translate(-2px, 2px); } }

.typewriter { font-size: clamp(1.1rem, 2.5vw, 1.4rem); color: var(--text-secondary); margin-bottom: 1rem; min-height: 2.5rem; animation: fadeInUp 1s ease 0.2s both; font-family: var(--font-mono); display: flex; align-items: center; justify-content: center; gap: 0.5rem; }
.typewriter-prefix { color: var(--accent-tertiary); }
.cursor { animation: blink 1s step-end infinite; color: var(--accent); }
@keyframes blink { 0%, 50% { opacity: 1; } 51%, 100% { opacity: 0; } }

.hero-subtitle { color: var(--text-muted); font-size: 1rem; margin-bottom: 2rem; animation: fadeInUp 1s ease 0.3s both; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 0.75rem; }
.subtitle-item { display: flex; align-items: center; gap: 0.4rem; }
.subtitle-item i { color: var(--accent); font-size: 0.9rem; }
.subtitle-divider { color: var(--text-muted); opacity: 0.3; }

.badges { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem; margin-bottom: 2rem; animation: fadeInUp 1s ease 0.4s both; }
.badge { background: var(--bg-card); border: 1px solid var(--border); padding: 0.6rem 1.2rem; border-radius: 50px; font-size: 0.9rem; color: var(--text-secondary); transition: all 0.3s; display: flex; align-items: center; gap: 0.5rem; }
.badge i { color: var(--accent); }
.badge:hover { border-color: var(--accent); color: var(--text-primary); transform: translateY(-3px) scale(1.02); box-shadow: 0 15px 40px rgba(255, 107, 74, 0.2); }

.hero-buttons { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; animation: fadeInUp 1s ease 0.5s both; margin-bottom: 2.5rem; }

.btn { padding: 1rem 1.75rem; border-radius: 12px; font-size: 0.95rem; font-weight: 600; text-decoration: none; transition: all 0.3s; cursor: pointer; border: none; display: inline-flex; align-items: center; gap: 0.5rem; position: relative; overflow: hidden; }
.btn-shine { position: absolute; top: 0; left: -100%; width: 100%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent); transition: left 0.5s; }
.btn:hover .btn-shine { left: 100%; }
.btn-primary { background: var(--gradient); color: white; box-shadow: 0 8px 30px var(--accent-glow); }
.btn-primary:hover { transform: translateY(-3px) scale(1.02); box-shadow: 0 15px 50px var(--accent-glow); }
.btn-outline { background: transparent; border: 2px solid var(--border); color: var(--text-primary); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); background: rgba(255, 107, 74, 0.12); }
.btn-glow { background: var(--gradient-green); color: white; box-shadow: 0 8px 30px rgba(45, 212, 191, 0.35); }
.btn-glow:hover { transform: translateY(-3px) scale(1.02); box-shadow: 0 15px 50px rgba(45, 212, 191, 0.45); }
.btn-block { width: 100%; justify-content: center; }

/* GitHub Stats */
.github-stats { display: flex; justify-content: center; gap: 2rem; animation: fadeInUp 1s ease 0.6s both; flex-wrap: wrap; }
.github-stat { display: flex; flex-direction: column; align-items: center; gap: 0.25rem; padding: 1rem 1.5rem; background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px; transition: all 0.3s; min-width: 100px; }
.github-stat:hover { border-color: var(--accent); transform: translateY(-5px); box-shadow: 0 10px 30px rgba(255, 107, 74, 0.2); }
.github-stat i { color: var(--accent); font-size: 1.25rem; }
.github-stat .stat-value { font-size: 1.5rem; font-weight: 800; background: var(--gradient-text); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.github-stat .stat-name { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }

/* Scroll Indicator */
.scroll-indicator { position: absolute; bottom: 2rem; display: flex; flex-direction: column; align-items: center; gap: 0.75rem; color: var(--text-muted); font-size: 0.85rem; animation: fadeIn 1s ease 1s both; }
.mouse { width: 26px; height: 40px; border: 2px solid var(--text-muted); border-radius: 15px; position: relative; }
.wheel { width: 4px; height: 8px; background: var(--accent); border-radius: 2px; position: absolute; top: 8px; left: 50%; transform: translateX(-50%); animation: scroll 2s infinite; }
@keyframes scroll { 0% { transform: translateX(-50%) translateY(0); opacity: 1; } 100% { transform: translateX(-50%) translateY(12px); opacity: 0; } }
.bounce { animation: bounce 2s infinite; }
@keyframes bounce { 0%, 20%, 50%, 80%, 100% { transform: translateY(0); } 40% { transform: translateY(-5px); } 60% { transform: translateY(-3px); } }

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

/* Sections */
.section { padding: 8rem 2rem; position: relative; z-index: 2; }
.section-alt { background: var(--bg-secondary); }
.container { max-width: 1200px; margin: 0 auto; }

.section-title { display: flex; align-items: center; gap: 1rem; margin-bottom: 4rem; font-size: 1.75rem; font-weight: 700; }
.title-number { font-family: var(--font-mono); color: var(--accent); font-size: 1.25rem; }
.title-line { flex: 1; height: 1px; background: linear-gradient(90deg, var(--border), transparent); max-width: 300px; }

/* Custom Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-secondary); }

/* 3D Magnetic Effect - Removed old hover to avoid conflict */
.terminal-container {
    max-width: 800px;
    margin: 1.5rem auto;
    z-index: 20;
    position: relative;
}

.section-title .title-text {
    position: relative;
    display: inline-block;
}

.section-title .title-text::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--gradient);
    transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.section-title.active .title-text::after {
    width: 100%;
}

/* Reveal Animations */
.reveal-left, .reveal-right, .reveal-up { 
    opacity: 1; 
    transform: none;
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1); 
    will-change: transform, opacity;
}

/* 兜底：如果 JS 加载失败或未触发，至少让内容可见（或通过 class 强制显示） */
.reveal-left.active, .reveal-right.active, .reveal-up.active { 
    opacity: 1 !important; 
    transform: translate(0, 0) !important; 
    visibility: visible !important;
}

/* 确保没有动画类时也显示，或者由 JS 控制 */
/* 如果你发现刷新后文字消失，可能是因为 GSAP 还没来得及运行 */
.no-js .reveal-left, 
.no-js .reveal-right, 
.no-js .reveal-up {
    opacity: 1 !important;
    transform: none !important;
}

/* 即使没有 active 类，在不支持动画的环境下也显示 */
@media (prefers-reduced-motion: reduce) {
    .reveal-left, .reveal-right, .reveal-up { opacity: 1; transform: none; }
}

/* About */
.about-content { display: grid; grid-template-columns: 2fr 1fr; gap: 3rem; align-items: start; }
.about-card { padding: 2rem; margin-bottom: 1.5rem; position: relative; overflow: hidden; }
.card-glow { position: absolute; top: -50%; left: -50%; width: 200%; height: 200%; background: radial-gradient(circle, rgba(255, 107, 74, 0.12) 0%, transparent 50%); opacity: 0; transition: opacity 0.5s; pointer-events: none; }
.about-card:hover .card-glow { opacity: 1; }
.card-icon { width: 50px; height: 50px; background: var(--gradient); border-radius: 14px; display: flex; align-items: center; justify-content: center; margin-bottom: 1.25rem; }
.card-icon i { font-size: 1.25rem; color: white; }
.about-card h3 { font-size: 1.25rem; margin-bottom: 1rem; }
.about-text p { color: var(--text-secondary); margin-bottom: 1rem; line-height: 1.8; }
.tech-highlight { background: var(--gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; font-weight: 600; }
.inline-link { color: var(--accent); text-decoration: none; border-bottom: 1px dashed var(--accent); transition: all 0.3s; }
.inline-link:hover { border-bottom-style: solid; }

.fancy-quote { background: linear-gradient(135deg, rgba(255, 107, 74, 0.1), rgba(45, 212, 191, 0.08)); border: 1px solid var(--border); border-left: 4px solid var(--accent); border-radius: 0 20px 20px 0; padding: 2rem; margin: 2rem 0; position: relative; }
.quote-icon { position: absolute; top: -15px; left: 20px; width: 40px; height: 40px; background: var(--gradient); border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.quote-icon i { color: white; font-size: 1rem; }
.fancy-quote p { color: var(--text-primary); font-style: italic; font-size: 1.15rem; margin-bottom: 0.75rem; padding-top: 0.5rem; }
.quote-author { color: var(--text-muted); font-size: 0.9rem; text-align: right; }

.feature-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin-top: 1rem; }
.feature-item { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 1rem; background: rgba(255, 107, 74, 0.06); border-radius: 10px; font-size: 0.9rem; color: var(--text-secondary); transition: all 0.3s; }
.feature-item:hover { background: rgba(255, 107, 74, 0.16); color: var(--text-primary); transform: translateX(5px); }
.feature-item i { color: var(--accent); font-size: 1.1rem; width: 24px; }

.about-stats { display: flex; flex-direction: column; gap: 1.5rem; }
.stat-card { padding: 2rem; text-align: center; position: relative; overflow: hidden; }
.stat-bg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: var(--gradient); opacity: 0; transition: opacity 0.3s; }
.stat-card:hover .stat-bg { opacity: 0.05; }
.stat-icon-wrapper { position: relative; width: 70px; height: 70px; margin: 0 auto 1.25rem; }
.stat-icon { width: 100%; height: 100%; background: var(--gradient); border-radius: 20px; display: flex; align-items: center; justify-content: center; }
.stat-icon i { font-size: 1.5rem; color: white; }
.stat-number { font-size: 3rem; font-weight: 800; background: var(--gradient-text); -webkit-background-clip: text; -webkit-text-fill-color: transparent; display: block; }
.stat-number::after { content: '+'; font-size: 2rem; }
.stat-label { display: block; color: var(--text-muted); margin: 0.5rem 0 1rem; font-size: 0.9rem; }
.stat-bar { height: 4px; background: var(--border); border-radius: 2px; overflow: hidden; }
.stat-bar-fill { height: 100%; width: 0; background: var(--gradient); border-radius: 2px; transition: width 1.5s ease; }

/* Skills */
.skills-container { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1.5rem; }
.skill-category { padding: 2rem; position: relative; overflow: hidden; }
.category-glow { position: absolute; top: -100px; right: -100px; width: 200px; height: 200px; background: radial-gradient(circle, rgba(255, 107, 74, 0.22) 0%, transparent 70%); pointer-events: none; }
.skill-category.featured { grid-column: 1 / -1; background: linear-gradient(135deg, rgba(255, 107, 74, 0.12), rgba(45, 212, 191, 0.08)); border-color: var(--accent); }
.category-header { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1rem; flex-wrap: wrap; }
.category-icon { width: 45px; height: 45px; background: var(--gradient); border-radius: 12px; display: flex; align-items: center; justify-content: center; }
.category-icon i { font-size: 1.25rem; color: white; }
.category-header h3 { font-size: 1.2rem; flex: 1; }
.category-badge, .pulse-badge { background: var(--gradient); color: white; padding: 0.35rem 0.9rem; border-radius: 50px; font-size: 0.8rem; font-weight: 600; }
.category-desc { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 1.25rem; }
.skill-tags { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.skill-tag { background: var(--bg-card); padding: 0.5rem 1rem; border-radius: 8px; font-size: 0.9rem; color: var(--text-secondary); border: 1px solid var(--border); transition: all 0.3s; display: flex; align-items: center; gap: 0.4rem; cursor: default; }
.skill-tag:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-3px); box-shadow: 0 8px 25px rgba(255, 107, 74, 0.2); }
.skill-tag.hot { background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(249, 115, 22, 0.15)); border-color: #f97316; color: #fb923c; }
.skill-tag.hot i { color: #f97316; }

/* Projects */
.projects-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem; flex-wrap: wrap; gap: 1rem; }
.projects-desc { color: var(--text-secondary); display: flex; align-items: center; gap: 0.5rem; }
.projects-desc .spin { animation: spin 2s linear infinite; }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.view-all-btn { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--accent); text-decoration: none; font-weight: 500; transition: all 0.3s; }
.view-all-btn:hover { color: var(--accent-hover); transform: translateX(5px); }

/* Featured Project */
.featured-project { padding: 2rem; margin-bottom: 2rem; position: relative; overflow: hidden; }
.featured-project .project-badge { position: absolute; top: 1.5rem; right: 1.5rem; background: var(--gradient-green); color: white; padding: 0.4rem 1rem; border-radius: 50px; font-size: 0.85rem; font-weight: 600; }
.featured-content { display: grid; grid-template-columns: auto 1fr auto; gap: 2rem; align-items: center; }
.featured-icon { width: 80px; height: 80px; background: var(--gradient-green); border-radius: 20px; display: flex; align-items: center; justify-content: center; }
.featured-icon i { font-size: 2rem; color: white; }
.featured-info h3 { font-size: 1.5rem; margin-bottom: 0.5rem; }
.featured-info p { color: var(--text-secondary); margin-bottom: 1rem; }
.featured-tags { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.featured-tags span { background: rgba(45, 212, 191, 0.12); color: #2dd4bf; padding: 0.3rem 0.75rem; border-radius: 6px; font-size: 0.85rem; }
.featured-btn { display: inline-flex; align-items: center; gap: 0.5rem; background: var(--gradient-green); color: white; padding: 1rem 2rem; border-radius: 12px; text-decoration: none; font-weight: 600; white-space: nowrap; transition: all 0.3s; }
.featured-btn:hover { transform: translateY(-3px); box-shadow: 0 15px 40px rgba(45, 212, 191, 0.45); }

/* Project Grid */
.projects-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(350px, 1fr)); gap: 1.5rem; }

/* Project Skeleton */
.project-skeleton { padding: 2rem; }
.skeleton-header, .skeleton-title, .skeleton-desc, .skeleton-tags { background: linear-gradient(90deg, var(--border) 25%, rgba(148,163,184,0.2) 50%, var(--border) 75%); background-size: 200% 100%; animation: shimmer 1.5s infinite; border-radius: 8px; }
.skeleton-header { width: 60px; height: 60px; border-radius: 16px; margin-bottom: 1.5rem; }
.skeleton-title { width: 70%; height: 24px; margin-bottom: 1rem; }
.skeleton-desc { width: 100%; height: 60px; margin-bottom: 1rem; }
.skeleton-tags { width: 80%; height: 32px; }
@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }

/* Dynamic Project Card */
.project-card { padding: 2rem; position: relative; overflow: hidden; }
.project-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: var(--gradient); transform: scaleX(0); transition: transform 0.4s; transform-origin: left; }
.project-card:hover::before { transform: scaleX(1); }
.project-card:hover { transform: translateY(-10px); }
.project-badge.fork { background: var(--bg-card); border: 1px solid var(--border); color: var(--text-muted); }
.project-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 1.25rem; }
.project-icon { width: 55px; height: 55px; background: var(--gradient); border-radius: 14px; display: flex; align-items: center; justify-content: center; }
.project-icon i { font-size: 1.35rem; color: white; }
.project-meta { display: flex; gap: 1rem; }
.project-meta span { font-size: 0.85rem; color: var(--text-muted); display: flex; align-items: center; gap: 0.3rem; }
.project-meta i { color: var(--accent); }
.project-card h3 { font-size: 1.3rem; margin-bottom: 0.5rem; }
.project-card h3 a { color: var(--text-primary); text-decoration: none; transition: color 0.3s; }
.project-card h3 a:hover { color: var(--accent); }
.project-lang { color: var(--accent); font-size: 0.9rem; margin-bottom: 0.75rem; display: flex; align-items: center; gap: 0.5rem; }
.project-lang::before { content: ''; width: 10px; height: 10px; border-radius: 50%; background: currentColor; }
.project-desc { color: var(--text-secondary); margin-bottom: 1rem; font-size: 0.95rem; line-height: 1.7; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.project-footer { display: flex; justify-content: space-between; align-items: center; margin-top: auto; }
.project-tags { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.project-tags span { background: var(--bg-secondary); padding: 0.25rem 0.6rem; border-radius: 4px; font-size: 0.75rem; color: var(--accent); font-family: var(--font-mono); }
.project-link { color: var(--text-muted); font-size: 1.1rem; transition: all 0.3s; }
.project-link:hover { color: var(--accent); transform: translateX(3px); }

/* Timeline */
.timeline { position: relative; max-width: 800px; margin: 0 auto; }
.timeline::before { content: ''; position: absolute; left: 25px; top: 0; bottom: 0; width: 3px; background: var(--gradient); border-radius: 3px; }
.timeline-item { position: relative; padding-left: 70px; padding-bottom: 2rem; }
.timeline-marker { position: absolute; left: 0; top: 0; width: 52px; height: 52px; background: var(--gradient); border-radius: 50%; display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 8px var(--bg-primary); }
[data-theme="light"] .timeline-marker { box-shadow: 0 0 0 8px var(--bg-secondary); }
.timeline-marker i { color: white; font-size: 1.25rem; }
.timeline-content { padding: 2rem; }
.timeline-content:hover { transform: translateX(10px); }
.timeline-header { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1rem; }
.timeline-header h3 { font-size: 1.35rem; }
.company { color: var(--accent); font-size: 0.95rem; display: flex; align-items: center; gap: 0.5rem; }
.timeline-date { display: inline-block; background: var(--gradient); color: white; padding: 0.4rem 1.25rem; border-radius: 50px; font-size: 0.85rem; font-weight: 500; margin-bottom: 1rem; }
.timeline-content > p { color: var(--text-secondary); margin-bottom: 1.25rem; line-height: 1.8; }
.timeline-highlights { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.timeline-highlights span { background: rgba(255, 107, 74, 0.12); padding: 0.4rem 0.9rem; border-radius: 8px; font-size: 0.85rem; color: var(--text-secondary); display: flex; align-items: center; gap: 0.4rem; }
.timeline-highlights i { color: var(--accent); font-size: 0.8rem; }
.timeline-highlight-text { color: var(--accent); font-style: italic; margin-top: 0.5rem; font-size: 0.95rem; }
.card-desc { color: var(--text-secondary); margin-bottom: 1rem; }

/* Contact */
.contact-content { display: grid; grid-template-columns: 1.2fr 1fr; gap: 3rem; align-items: start; }
.contact-intro { padding: 2rem; margin-bottom: 1.5rem; }
.contact-intro h3 { font-size: 1.5rem; margin-bottom: 1rem; }
.contact-intro p { color: var(--text-secondary); font-size: 1.05rem; line-height: 1.8; }
.contact-cta { color: var(--accent); font-weight: 500; margin-top: 1rem; font-style: italic; }
.contact-links { display: flex; flex-direction: column; gap: 1rem; }
.contact-link { display: flex; align-items: center; gap: 1.25rem; padding: 1.25rem 1.5rem; color: var(--text-primary); text-decoration: none; }
.contact-link:hover { transform: translateX(10px); }
.contact-link.special { border-color: rgba(45, 212, 191, 0.35); }
.contact-link.special:hover { border-color: var(--accent-secondary); box-shadow: 0 0 30px rgba(45, 212, 191, 0.25); }
.contact-icon { width: 52px; height: 52px; background: var(--gradient); border-radius: 14px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.contact-icon.green { background: var(--gradient-green); }
.contact-icon i { font-size: 1.25rem; color: white; }
.contact-detail { flex: 1; display: flex; flex-direction: column; }
.contact-label { font-size: 0.85rem; color: var(--text-muted); }
.contact-value { font-weight: 600; }
.contact-link > i:last-child { color: var(--text-muted); transition: all 0.3s; }
.contact-link:hover > i:last-child { color: var(--accent); transform: translateX(5px); }
.contact-card { padding: 3rem 2rem; text-align: center; position: relative; overflow: hidden; }
.card-decoration { position: absolute; top: 0; left: 0; right: 0; height: 120px; background: var(--gradient); opacity: 0.1; }
.contact-avatar { width: 110px; height: 110px; margin: 0 auto 1.5rem; position: relative; }
.contact-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 4px solid var(--accent); box-shadow: 0 10px 40px var(--accent-glow); }
.contact-card h3 { font-size: 1.5rem; margin-bottom: 0.5rem; }
.contact-title { color: var(--accent); font-size: 1rem; margin-bottom: 0.5rem; }
.contact-motto { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 1.5rem; }
.contact-social { display: flex; justify-content: center; gap: 1rem; margin-bottom: 2rem; }
.contact-social a { width: 48px; height: 48px; background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 14px; display: flex; align-items: center; justify-content: center; color: var(--text-primary); font-size: 1.25rem; transition: all 0.3s; }
.contact-social a:hover { background: var(--accent); border-color: var(--accent); color: white; transform: translateY(-5px); box-shadow: 0 10px 30px var(--accent-glow); }

/* Footer */
.footer { padding: 4rem 2rem; text-align: center; border-top: 1px solid var(--border); position: relative; z-index: 2; background: var(--bg-secondary); }
.footer-quote { color: var(--text-secondary); font-style: italic; font-size: 1.1rem; margin-bottom: 1.5rem; }
.footer-links { display: flex; justify-content: center; gap: 1rem; margin-bottom: 1.5rem; }
.footer-links a { width: 44px; height: 44px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; display: flex; align-items: center; justify-content: center; color: var(--text-secondary); transition: all 0.3s; }
.footer-links a:hover { background: var(--accent); border-color: var(--accent); color: white; transform: translateY(-3px); }
.copyright { color: var(--text-muted); font-size: 0.9rem; }
.copyright i { color: #ef4444; animation: heartbeat 1.5s infinite; }
@keyframes heartbeat { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.2); } }

/* Back to Top */
.back-to-top { position: fixed; bottom: 2rem; right: 2rem; width: 50px; height: 50px; background: var(--gradient); border: none; border-radius: 50%; color: white; font-size: 1.25rem; cursor: pointer; opacity: 0; visibility: hidden; transition: all 0.3s; z-index: 999; box-shadow: 0 5px 20px var(--accent-glow); }
.back-to-top.visible { opacity: 1; visibility: visible; }
.back-to-top:hover { transform: translateY(-5px) scale(1.1); }

/* Responsive */
@media (max-width: 1024px) {
    .featured-content { grid-template-columns: 1fr; text-align: center; }
    .featured-icon { margin: 0 auto; }
    .featured-btn { margin-top: 1rem; }
}

/* Scroll Progress */
#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 4px;
    background: var(--gradient);
    z-index: 10001;
    transition: width 0.1s;
    box-shadow: 0 0 10px var(--accent-glow);
}

/* Navbar Enhancement */
.navbar.scrolled {
    padding: 0.5rem 2rem;
    background: rgba(9, 12, 20, 0.95);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

/* Skill Icon 3D Effect */
.skill-tag {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-style: preserve-3d;
    perspective: 500px;
}

.skill-tag:hover {
    transform: translateY(-5px) rotateX(10deg) rotateY(10deg);
    border-color: var(--accent);
    box-shadow: 10px 10px 20px rgba(0,0,0,0.2);
}

/* Message Board Styles */
.message-board {
    margin-top: 3rem;
}

.message-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.message-input {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1rem;
    color: var(--text-primary);
    font-family: inherit;
    resize: vertical;
    min-height: 100px;
    transition: all 0.3s;
}

.message-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 15px var(--accent-glow);
}

.message-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.message-item {
    padding: 1rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    animation: fadeInUp 0.5s ease both;
}

.message-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
}

.message-user {
    color: var(--accent);
    font-weight: 600;
}

.message-time {
    color: var(--text-muted);
}

.message-text {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
}

@media (max-width: 768px) {
    .navbar.scrolled { padding: 0.5rem 1rem; }
}
