/* ============================================
   Apple Liquid Glass Design System
   ============================================ */
:root {
    --bg-warm: #faf6f1;
    --bg-cool: #f0f4f8;
    --bg-lavender: #f3f0f8;
    --bg-peach: #fef5ee;
    --glass-bg: rgba(255, 255, 255, 0.45);
    --glass-bg-thick: rgba(255, 255, 255, 0.65);
    --glass-bg-thin: rgba(255, 255, 255, 0.25);
    --glass-border: rgba(255, 255, 255, 0.6);
    --glass-border-subtle: rgba(255, 255, 255, 0.35);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.06), 0 2px 8px rgba(0, 0, 0, 0.04);
    --glass-shadow-hover: 0 16px 48px rgba(0, 0, 0, 0.1), 0 4px 16px rgba(0, 0, 0, 0.06);
    --glass-blur: 40px;
    --glass-blur-heavy: 60px;
    --specular-top: linear-gradient(180deg, rgba(255,255,255,0.8) 0%, rgba(255,255,255,0) 50%);
    --text-primary: #1d1d1f;
    --text-secondary: #6e6e73;
    --text-tertiary: #aeaeb2;
    --text-on-glass: rgba(0, 0, 0, 0.85);
    --accent-blue: #0071e3;
    --accent-blue-light: #2997ff;
    --accent-teal: #30b0c7;
    --accent-indigo: #5856d6;
    --accent-orange: #ff9500;
    --accent-rose: #ff375f;
    --accent-green: #34c759;
    --font-display: 'SF Pro Display', -apple-system, 'Noto Sans SC', sans-serif;
    --font-body: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
    --radius-sm: 12px;
    --radius-md: 20px;
    --radius-lg: 28px;
    --radius-xl: 40px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; scrollbar-width: none; }
html::-webkit-scrollbar { display: none; }
body {
    font-family: var(--font-body);
    color: var(--text-primary);
    overflow-x: hidden;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Glass Materials */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur)) saturate(180%);
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(180%);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow), inset 0 1px 0 rgba(255,255,255,0.6);
    position: relative; overflow: hidden;
}
.glass::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 50%;
    background: var(--specular-top); pointer-events: none; border-radius: inherit;
}
.glass::after {
    content: ''; position: absolute; inset: 0; border-radius: inherit;
    background: radial-gradient(600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(255,255,255,0.25) 0%, transparent 50%);
    opacity: 0; transition: opacity 0.4s ease; pointer-events: none;
}
.glass:hover::after { opacity: 1; }
.glass-thick {
    background: var(--glass-bg-thick);
    backdrop-filter: blur(var(--glass-blur-heavy)) saturate(200%);
    -webkit-backdrop-filter: blur(var(--glass-blur-heavy)) saturate(200%);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow), inset 0 1px 0 rgba(255,255,255,0.6);
    position: relative; overflow: hidden;
}
.glass-thick::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 50%;
    background: var(--specular-top); pointer-events: none; border-radius: inherit;
}
.glass-thick::after {
    content: ''; position: absolute; inset: 0; border-radius: inherit;
    background: radial-gradient(600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(255,255,255,0.3) 0%, transparent 50%);
    opacity: 0; transition: opacity 0.4s ease; pointer-events: none;
}
.glass-thick:hover::after { opacity: 1; }
.glass-thin {
    background: var(--glass-bg-thin);
    backdrop-filter: blur(20px) saturate(150%);
    -webkit-backdrop-filter: blur(20px) saturate(150%);
    border: 1px solid var(--glass-border-subtle);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03), inset 0 1px 0 rgba(255,255,255,0.4);
    position: relative; overflow: hidden;
}
.glass-thin::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 40%;
    background: linear-gradient(180deg, rgba(255,255,255,0.5) 0%, rgba(255,255,255,0) 100%);
    pointer-events: none; border-radius: inherit;
}

/* Navigation - 方案H 磨砂卡片 */
.nav {
    position: fixed; top: 20px; left: 50%; transform: translateX(-50%);
    z-index: 1000; padding: 12px; border-radius: 100px;
    display: flex; align-items: center; gap: 8px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(50px) saturate(200%);
    -webkit-backdrop-filter: blur(50px) saturate(200%);
    border: 1px solid rgba(255, 255, 255, 0.65);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
}
.nav.scrolled { top: 12px; box-shadow: 0 16px 48px rgba(0, 0, 0, 0.1); }
.nav-logo { padding: 10px 20px; font-family: var(--font-display); font-size: 1.05rem; font-weight: 600; color: var(--text-on-glass); letter-spacing: -0.02em; text-decoration: none; }
.nav-links { display: flex; gap: 8px; list-style: none; position: relative; }
.nav-links a {
    padding: 10px 24px; color: var(--text-secondary); text-decoration: none;
    font-size: 0.875rem; font-weight: 500; border-radius: 100px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative; overflow: hidden;
    border: 1px solid transparent;
}
.nav-links a::before {
    content: ''; position: absolute; inset: 0; border-radius: inherit;
    background: radial-gradient(600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(255,255,255,0.4) 0%, transparent 50%);
    opacity: 0; transition: opacity 0.4s ease;
}
.nav-links a:hover::before { opacity: 1; }
.nav-links a:hover {
    color: var(--text-on-glass);
    background: rgba(255, 255, 255, 0.45);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04), inset 0 1px 0 rgba(255,255,255,0.8);
}
.nav-links a.active {
    color: var(--text-on-glass);
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-color: rgba(255, 255, 255, 0.8);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06), inset 0 1px 0 rgba(255,255,255,0.9), inset 0 -1px 0 rgba(255,255,255,0.3);
    transform: translateY(-1px);
}

/* Page Layout */
.page-section {
    min-height: 100vh; width: 100%; position: relative;
    display: flex; align-items: center; justify-content: center;
    padding: 120px 60px 160px; overflow: hidden;
}

/* Decorative Blobs */
.blob { position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.4; pointer-events: none; animation: blobFloat 20s ease-in-out infinite; }
@keyframes blobFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -20px) scale(1.05); }
    66% { transform: translate(-20px, 15px) scale(0.95); }
}

/* Section Header */
.section-header { text-align: center; margin-bottom: 64px; }
.section-label { display: inline-block; padding: 6px 16px; border-radius: 100px; font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent-indigo); margin-bottom: 16px; }
.section-title { font-family: var(--font-display); font-size: 2.8rem; font-weight: 700; letter-spacing: -0.03em; color: var(--text-primary); margin-bottom: 12px; }
.section-subtitle { font-size: 1.05rem; color: var(--text-secondary); max-width: 500px; margin: 0 auto; }

/* Buttons */
.btn-primary {
    padding: 14px 32px; background: var(--accent-blue); border: none; border-radius: 100px;
    color: white; font-family: var(--font-body); font-size: 0.95rem; font-weight: 500;
    cursor: pointer; transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none; display: inline-flex; align-items: center; gap: 8px;
    box-shadow: 0 4px 16px rgba(0, 113, 227, 0.25), inset 0 1px 0 rgba(255,255,255,0.2);
    position: relative; overflow: hidden;
}
.btn-primary::before {
    content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%;
    background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.15) 50%, transparent 70%);
    transform: translateX(-100%); transition: transform 0.6s ease;
}
.btn-primary:hover::before { transform: translateX(100%); }
.btn-primary:hover { transform: translateY(-2px) scale(1.02); box-shadow: 0 8px 28px rgba(0, 113, 227, 0.35), inset 0 1px 0 rgba(255,255,255,0.2); }
.btn-primary:active { transform: translateY(0) scale(0.98); }
.btn-glass {
    padding: 14px 32px; border: none; border-radius: 100px; color: var(--text-on-glass);
    font-family: var(--font-body); font-size: 0.95rem; font-weight: 500;
    cursor: pointer; transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none; display: inline-flex; align-items: center; gap: 8px;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04), inset 0 1px 0 rgba(255,255,255,0.8);
    position: relative; overflow: hidden;
}
.btn-glass::before {
    content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%;
    background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.3) 50%, transparent 70%);
    transform: translateX(-100%); transition: transform 0.6s ease;
}
.btn-glass:hover::before { transform: translateX(100%); }
.btn-glass:hover { transform: translateY(-2px); box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255,255,255,0.8); border-color: rgba(255,255,255,0.8); }

/* Timeline */
.timeline { position: relative; display: flex; flex-direction: column; gap: 24px; }
.timeline-item { opacity: 0; transform: translateY(24px); transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1); }
.timeline-item.visible { opacity: 1; transform: translateY(0); }
.timeline-content { border-radius: var(--radius-lg); padding: 36px; transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1); }
.timeline-content:hover { transform: translateY(-4px); box-shadow: var(--glass-shadow-hover); border-color: rgba(255,255,255,0.8); }
.timeline-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 12px; flex-wrap: wrap; gap: 12px; }
.timeline-company { font-family: var(--font-display); font-size: 1.25rem; font-weight: 600; color: var(--text-on-glass); position: relative; z-index: 1; }
.timeline-role { font-size: 0.95rem; color: var(--accent-blue); font-weight: 500; position: relative; z-index: 1; }
.timeline-date { padding: 6px 14px; border-radius: 100px; font-size: 0.8rem; font-weight: 500; color: var(--text-secondary); position: relative; z-index: 1; }
.timeline-desc { color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 18px; line-height: 1.7; position: relative; z-index: 1; }
.timeline-highlights { list-style: none; position: relative; z-index: 1; }
.timeline-highlights li { position: relative; padding-left: 22px; margin-bottom: 8px; color: var(--text-secondary); font-size: 0.88rem; }
.timeline-highlights li::before { content: ''; position: absolute; left: 0; top: 9px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent-blue); }

/* Project Cards */
.projects-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.project-card { border-radius: var(--radius-xl); overflow: hidden; transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1); opacity: 0; transform: translateY(24px); border: 1px solid rgba(255,255,255,0.5); }
.project-card.visible { opacity: 1; transform: translateY(0); }
.project-card:hover { transform: translateY(-8px) scale(1.01); box-shadow: 0 24px 64px rgba(0, 0, 0, 0.1), 0 8px 24px rgba(0, 0, 0, 0.06); border-color: rgba(255,255,255,0.8); }
.project-image-wrap { position: relative; height: 180px; overflow: hidden; }
.project-image { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1); }
.project-card:hover .project-image { transform: scale(1.05); }
.project-image-overlay { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,0.15) 100%); }
.project-content { padding: 28px; position: relative; z-index: 1; }
.project-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 12px; flex-wrap: wrap; gap: 8px; }
.project-name { font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; color: var(--text-on-glass); position: relative; z-index: 1; }
.project-date { font-size: 0.75rem; color: var(--text-tertiary); padding: 4px 12px; border-radius: 100px; position: relative; z-index: 1; }
.project-role { display: inline-block; padding: 5px 14px; border-radius: 100px; font-size: 0.78rem; font-weight: 600; margin-bottom: 14px; color: var(--accent-indigo); background: rgba(88, 86, 214, 0.1); position: relative; z-index: 1; }
.project-desc { color: var(--text-secondary); font-size: 0.85rem; line-height: 1.65; margin-bottom: 18px; position: relative; z-index: 1; }
.project-achievements { list-style: none; position: relative; z-index: 1; }
.project-achievements li { position: relative; padding-left: 20px; margin-bottom: 6px; color: var(--text-secondary); font-size: 0.82rem; }
.project-achievements li::before { content: ''; position: absolute; left: 0; top: 8px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent-green); }
.project-stats { display: flex; gap: 24px; margin-top: 18px; padding-top: 18px; border-top: 1px solid rgba(0, 0, 0, 0.06); position: relative; z-index: 1; }
.project-stat { text-align: center; }
.project-stat-value { font-family: var(--font-display); font-size: 1.4rem; font-weight: 700; color: var(--accent-blue); }
.project-stat-label { font-size: 0.72rem; color: var(--text-tertiary); margin-top: 2px; }

/* Education */
.education-card { border-radius: var(--radius-xl); padding: 36px; margin-bottom: 24px; transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1); }
.education-card:hover { transform: translateY(-4px); box-shadow: var(--glass-shadow-hover); border-color: rgba(255,255,255,0.8); }
.education-school { font-family: var(--font-display); font-size: 1.4rem; font-weight: 700; letter-spacing: -0.02em; color: var(--text-on-glass); margin-bottom: 8px; position: relative; z-index: 1; }
.education-degree { font-size: 1rem; color: var(--text-secondary); margin-bottom: 14px; position: relative; z-index: 1; }
.education-date { display: inline-block; padding: 5px 14px; border-radius: 100px; font-size: 0.8rem; font-weight: 500; color: var(--accent-blue); margin-bottom: 18px; position: relative; z-index: 1; }
.education-highlights { list-style: none; position: relative; z-index: 1; }
.education-highlights li { position: relative; padding-left: 20px; margin-bottom: 10px; color: var(--text-secondary); font-size: 0.88rem; }
.education-highlights li::before { content: ''; position: absolute; left: 0; top: 9px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent-orange); }

/* Skills */
.skill-category { margin-bottom: 24px; }
.skill-category-title { font-size: 0.88rem; font-weight: 600; color: var(--text-secondary); margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.skill-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.skill-tag {
    padding: 8px 18px; border-radius: 100px; font-size: 0.82rem; font-weight: 500;
    color: var(--text-secondary); transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: default; position: relative; overflow: hidden;
}
.skill-tag::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 50%; background: linear-gradient(180deg, rgba(255,255,255,0.4) 0%, rgba(255,255,255,0) 100%); pointer-events: none; border-radius: inherit; }
.skill-tag:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08); color: var(--text-on-glass); border-color: rgba(255,255,255,0.7); background: rgba(255,255,255,0.6); }

/* Footer */
.footer { background: var(--bg-cool); padding: 80px 60px; text-align: center; position: relative; overflow: hidden; }
.footer::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(0,0,0,0.08), transparent); }
.footer-content { max-width: 500px; margin: 0 auto; position: relative; z-index: 1; }
.footer-title { font-family: var(--font-display); font-size: 2rem; font-weight: 700; letter-spacing: -0.03em; margin-bottom: 24px; color: var(--text-primary); }
.footer-contact { display: flex; justify-content: center; gap: 32px; margin-bottom: 32px; flex-wrap: wrap; }
.footer-contact-item { display: flex; align-items: center; gap: 8px; color: var(--text-secondary); font-size: 0.9rem; }
.footer-contact-item svg { width: 18px; height: 18px; fill: var(--text-tertiary); }
.footer-copy { color: var(--text-tertiary); font-size: 0.8rem; }

/* Animations */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.6; transform: scale(1.3); } }

/* AI Assistant */
.ai-assistant-btn {
    position: fixed; bottom: 28px; right: 28px; width: 60px; height: 60px;
    border-radius: 50%; border: none; cursor: pointer; z-index: 999;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 32px rgba(0, 113, 227, 0.25);
}
.ai-assistant-btn:hover { transform: scale(1.08); box-shadow: 0 12px 40px rgba(0, 113, 227, 0.35); }
.ai-assistant-btn svg { width: 28px; height: 28px; fill: var(--accent-blue); }
.ai-assistant-btn.active { transform: rotate(180deg); }
.ai-assistant-panel {
    position: fixed; bottom: 100px; right: 28px; width: 380px; max-width: calc(100vw - 56px);
    height: 520px; max-height: calc(100vh - 140px); border-radius: var(--radius-xl);
    z-index: 998; display: flex; flex-direction: column; overflow: hidden;
    opacity: 0; transform: translateY(20px) scale(0.95); pointer-events: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.ai-assistant-panel.open { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.ai-header { padding: 20px 24px; border-bottom: 1px solid rgba(0, 0, 0, 0.06); display: flex; align-items: center; gap: 12px; position: relative; z-index: 1; }
.ai-header-icon { width: 40px; height: 40px; border-radius: 12px; background: linear-gradient(135deg, var(--accent-blue) 0%, var(--accent-indigo) 100%); display: flex; align-items: center; justify-content: center; }
.ai-header-icon svg { width: 22px; height: 22px; fill: white; }
.ai-header-text h4 { font-family: var(--font-display); font-size: 1rem; font-weight: 600; color: var(--text-on-glass); margin-bottom: 2px; }
.ai-header-text span { font-size: 0.75rem; color: var(--text-tertiary); }
.ai-status-dot { width: 8px; height: 8px; background: var(--accent-green); border-radius: 50%; margin-right: 4px; animation: pulse 2s ease-in-out infinite; }
.ai-messages { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 16px; position: relative; z-index: 1; }
.ai-messages::-webkit-scrollbar { width: 4px; }
.ai-messages::-webkit-scrollbar-thumb { background: rgba(0, 0, 0, 0.1); border-radius: 4px; }
.ai-message { display: flex; gap: 10px; animation: messageIn 0.3s ease; }
@keyframes messageIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.ai-message.user { flex-direction: row-reverse; }
.ai-avatar { width: 32px; height: 32px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ai-message.assistant .ai-avatar { background: linear-gradient(135deg, var(--accent-blue) 0%, var(--accent-indigo) 100%); }
.ai-message.assistant .ai-avatar svg { width: 18px; height: 18px; fill: white; }
.ai-message.user .ai-avatar { background: var(--accent-teal); color: white; font-size: 0.8rem; font-weight: 600; }
.ai-bubble { max-width: 85%; padding: 12px 16px; border-radius: 18px; font-size: 0.88rem; line-height: 1.55; position: relative; }
.ai-message.assistant .ai-bubble { background: rgba(0, 0, 0, 0.04); color: var(--text-on-glass); border-bottom-left-radius: 6px; overflow-wrap: break-word; word-break: break-word; }
.ai-message.assistant .ai-bubble p { margin-bottom: 8px; }
.ai-message.assistant .ai-bubble p:last-child { margin-bottom: 0; }
.ai-message.assistant .ai-bubble strong { font-weight: 600; color: var(--text-primary); }
.ai-message.user .ai-bubble { background: var(--accent-blue); color: white; border-bottom-right-radius: 6px; }
.ai-typing { display: flex; gap: 4px; padding: 12px 16px; background: rgba(0, 0, 0, 0.04); border-radius: 18px; border-bottom-left-radius: 6px; width: fit-content; }
.ai-typing span { width: 8px; height: 8px; background: var(--text-tertiary); border-radius: 50%; animation: typing 1.4s ease-in-out infinite; }
.ai-typing span:nth-child(2) { animation-delay: 0.2s; }
.ai-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typing { 0%, 60%, 100% { transform: translateY(0); opacity: 0.4; } 30% { transform: translateY(-6px); opacity: 1; } }
.ai-input-area { padding: 16px 20px; border-top: 1px solid rgba(0, 0, 0, 0.06); position: relative; z-index: 1; }
.ai-quick-questions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.ai-quick-btn { padding: 6px 14px; border-radius: 100px; border: 1px solid rgba(0, 0, 0, 0.08); background: transparent; font-size: 0.78rem; color: var(--text-secondary); cursor: pointer; transition: all 0.3s ease; font-family: var(--font-body); }
.ai-quick-btn:hover { background: var(--accent-blue); color: white; border-color: var(--accent-blue); }
.ai-input-wrap { display: flex; gap: 10px; align-items: center; }
.ai-input { flex: 1; min-width: 0; padding: 12px 18px; border-radius: 100px; border: 1px solid rgba(0, 0, 0, 0.08); background: rgba(0, 0, 0, 0.02); font-size: 0.9rem; font-family: var(--font-body); color: var(--text-on-glass); outline: none; transition: all 0.3s ease; }
.ai-input:focus { border-color: var(--accent-blue); background: white; }
.ai-input::placeholder { color: var(--text-tertiary); }
.ai-send-btn { width: 44px; height: 44px; border-radius: 50%; border: none; background: var(--accent-blue); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.3s ease; flex-shrink: 0; }
.ai-send-btn:hover { background: var(--accent-blue-light); transform: scale(1.05); }
.ai-send-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.ai-send-btn svg { width: 20px; height: 20px; fill: white; }

/* Skill Match Button */
.ai-match-btn {
    width: 100%; padding: 10px 16px; margin-bottom: 10px;
    border-radius: 100px; border: 1px dashed rgba(0, 113, 227, 0.3);
    background: rgba(0, 113, 227, 0.04); color: var(--accent-blue);
    font-family: var(--font-body); font-size: 0.82rem; font-weight: 500;
    cursor: pointer; transition: all 0.3s ease;
    display: flex; align-items: center; justify-content: center; gap: 6px;
}
.ai-match-btn svg { width: 16px; height: 16px; fill: var(--accent-blue); }
.ai-match-btn:hover { background: rgba(0, 113, 227, 0.08); border-color: rgba(0, 113, 227, 0.5); }

/* Skill Match Overlay & Modal */
.ai-match-overlay {
    position: fixed; inset: 0; z-index: 2000;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; pointer-events: none;
    transition: opacity 0.3s ease;
}
.ai-match-overlay.open { opacity: 1; pointer-events: auto; }
.ai-match-modal {
    width: 480px; max-width: calc(100vw - 40px); max-height: calc(100vh - 80px);
    border-radius: 24px; overflow: hidden;
    display: flex; flex-direction: column;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(60px) saturate(200%);
    -webkit-backdrop-filter: blur(60px) saturate(200%);
    border: 1px solid rgba(255, 255, 255, 0.7);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.12);
    transform: translateY(20px) scale(0.95);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.ai-match-overlay.open .ai-match-modal { transform: translateY(0) scale(1); }
.ai-match-header {
    padding: 20px 24px; display: flex; align-items: center; justify-content: space-between;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.ai-match-header h4 { font-size: 1rem; font-weight: 600; color: var(--text-on-glass); }
.ai-match-close {
    width: 32px; height: 32px; border-radius: 50%; border: none;
    background: rgba(0, 0, 0, 0.04); color: var(--text-secondary);
    font-size: 1.2rem; cursor: pointer; transition: all 0.2s ease;
    display: flex; align-items: center; justify-content: center;
}
.ai-match-close:hover { background: rgba(0, 0, 0, 0.08); color: var(--text-on-glass); }
.ai-match-body { flex: 1; overflow-y: auto; padding: 24px; }
.ai-match-body::-webkit-scrollbar { width: 4px; }
.ai-match-body::-webkit-scrollbar-thumb { background: rgba(0, 0, 0, 0.1); border-radius: 4px; }

/* Match Input Phase */
.ai-match-desc { font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 16px; line-height: 1.6; }

/* Image Upload */
.ai-match-upload {
    border: 2px dashed rgba(0, 0, 0, 0.1); border-radius: 16px;
    padding: 24px 16px; text-align: center; cursor: pointer;
    transition: all 0.3s ease; margin-bottom: 16px;
    background: rgba(0, 0, 0, 0.01);
}
.ai-match-upload:hover, .ai-match-upload.drag-over {
    border-color: var(--accent-blue); background: rgba(0, 113, 227, 0.04);
}
.ai-match-upload-icon { font-size: 1.8rem; margin-bottom: 8px; }
.ai-match-upload p { font-size: 0.85rem; color: var(--text-on-glass); font-weight: 500; margin-bottom: 4px; }
.ai-match-upload span { font-size: 0.72rem; color: var(--text-tertiary); }

.ai-match-upload-preview {
    display: flex; align-items: center; gap: 12px;
    padding: 12px; border-radius: 14px; margin-bottom: 16px;
    background: rgba(0, 0, 0, 0.02); border: 1px solid rgba(0, 0, 0, 0.06);
}
.ai-match-upload-preview img {
    width: 56px; height: 56px; border-radius: 10px;
    object-fit: cover; flex-shrink: 0;
}
.ai-match-upload-info {
    flex: 1; display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.ai-match-upload-name { font-size: 0.8rem; color: var(--text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ai-match-upload-remove {
    padding: 4px 10px; border-radius: 100px; border: none;
    background: rgba(255, 59, 48, 0.08); color: #ff3b30;
    font-size: 0.72rem; cursor: pointer; flex-shrink: 0;
    transition: background 0.2s ease;
}
.ai-match-upload-remove:hover { background: rgba(255, 59, 48, 0.15); }
.ai-match-textarea {
    width: 100%; padding: 14px 18px; border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.08); background: rgba(0, 0, 0, 0.02);
    font-family: var(--font-body); font-size: 0.85rem; color: var(--text-on-glass);
    resize: vertical; outline: none; transition: border-color 0.3s ease;
    line-height: 1.6; min-height: 160px;
}
.ai-match-textarea:focus { border-color: var(--accent-blue); background: white; }
.ai-match-textarea::placeholder { color: var(--text-tertiary); }
.ai-match-submit {
    width: 100%; padding: 14px; margin-top: 16px;
    border-radius: 100px; border: none;
    background: var(--accent-blue); color: white;
    font-family: var(--font-body); font-size: 0.9rem; font-weight: 500;
    cursor: pointer; transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(0, 113, 227, 0.25);
}
.ai-match-submit:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(0, 113, 227, 0.35); }
.ai-match-submit:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* Match Loading */
.ai-match-loading { text-align: center; padding: 40px 0; }
.ai-match-loading p { font-size: 0.9rem; color: var(--text-secondary); margin-top: 16px; }
.ai-match-loading-sub { font-size: 0.78rem; color: var(--text-tertiary); margin-top: 4px; }
.ai-match-spinner {
    width: 40px; height: 40px; margin: 0 auto;
    border: 3px solid rgba(0, 113, 227, 0.1); border-top-color: var(--accent-blue);
    border-radius: 50%; animation: matchSpin 0.8s linear infinite;
}
@keyframes matchSpin { to { transform: rotate(360deg); } }

/* Match Error */
.ai-match-error { text-align: center; padding: 40px 0; }
.ai-match-error p { font-size: 0.9rem; color: var(--text-secondary); margin-bottom: 16px; }
.ai-match-error-sub { font-size: 0.78rem !important; color: var(--text-tertiary) !important; margin-bottom: 16px !important; }

/* Match Result */
.match-result { animation: matchFadeIn 0.5s ease; }
@keyframes matchFadeIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
.match-overall { text-align: center; margin-bottom: 24px; }
.match-overall-ring {
    width: 100px; height: 100px; margin: 0 auto 8px;
    border-radius: 50%; position: relative;
    background: conic-gradient(var(--color) calc(var(--pct) * 1%), rgba(0,0,0,0.06) 0);
    display: flex; align-items: center; justify-content: center;
    animation: matchRingIn 1s ease 0.2s both;
}
@keyframes matchRingIn { from { transform: scale(0.5); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.match-overall-ring::before {
    content: ''; position: absolute; inset: 8px;
    border-radius: 50%; background: rgba(255,255,255,0.9);
}
.match-overall-num, .match-overall-unit { position: relative; z-index: 1; font-weight: 700; }
.match-overall-num { font-size: 1.8rem; color: var(--color); }
.match-overall-unit { font-size: 0.8rem; color: var(--color); margin-left: 1px; }
.match-overall-label { font-size: 0.82rem; color: var(--text-secondary); }

/* Match Dimensions */
.match-dimensions { display: flex; flex-direction: column; gap: 14px; margin-bottom: 24px; }
.match-dim { animation: matchFadeIn 0.5s ease both; }
.match-dim:nth-child(1) { animation-delay: 0.1s; }
.match-dim:nth-child(2) { animation-delay: 0.2s; }
.match-dim:nth-child(3) { animation-delay: 0.3s; }
.match-dim:nth-child(4) { animation-delay: 0.4s; }
.match-dim-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.match-dim-name { font-size: 0.82rem; font-weight: 500; color: var(--text-on-glass); }
.match-dim-score { font-size: 0.82rem; font-weight: 700; }
.match-dim-bar { height: 6px; border-radius: 3px; background: rgba(0, 0, 0, 0.06); overflow: hidden; margin-bottom: 8px; }
.match-dim-fill { height: 100%; border-radius: 3px; transition: width 1s cubic-bezier(0.4, 0, 0.2, 1); }
.match-dim-detail { display: flex; flex-direction: column; gap: 4px; }
.match-dim-match, .match-dim-gap { font-size: 0.75rem; color: var(--text-secondary); line-height: 1.5; }

/* Match Sections */
.match-section { margin-bottom: 20px; }
.match-section-title { font-size: 0.88rem; font-weight: 600; color: var(--text-on-glass); margin-bottom: 10px; }
.match-list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.match-list li {
    font-size: 0.8rem; color: var(--text-secondary); line-height: 1.6;
    padding: 8px 14px; border-radius: 12px;
    background: rgba(0, 0, 0, 0.02);
}
.match-highlights li { border-left: 3px solid #34c759; }
.match-suggestions li { border-left: 3px solid #ff9500; }

@media (max-width: 768px) {
    .ai-match-modal { width: calc(100vw - 32px); max-height: calc(100vh - 60px); border-radius: 20px; }
    .ai-match-body { padding: 20px; }
    .match-overall-ring { width: 80px; height: 80px; }
    .match-overall-num { font-size: 1.5rem; }
}

/* Visitor Popup */
.visitor-popup-overlay {
    position: fixed; inset: 0; z-index: 2000;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; pointer-events: none;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.visitor-popup-overlay.show { opacity: 1; pointer-events: auto; }
.visitor-popup-overlay.hide { opacity: 0; pointer-events: none; }

.visitor-popup {
    width: 420px; max-width: calc(100vw - 48px);
    border-radius: var(--radius-xl); padding: 36px;
    position: relative; z-index: 1;
    transform: translateY(20px) scale(0.95);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.visitor-popup-overlay.show .visitor-popup { transform: translateY(0) scale(1); }

.visitor-popup-close {
    position: absolute; top: 16px; right: 16px;
    width: 32px; height: 32px; border-radius: 50%; border: none;
    background: rgba(0, 0, 0, 0.05); cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s ease; z-index: 2;
}
.visitor-popup-close:hover { background: rgba(0, 0, 0, 0.1); }
.visitor-popup-close svg { width: 16px; height: 16px; fill: var(--text-tertiary); }

.visitor-popup-icon {
    width: 56px; height: 56px; border-radius: 16px;
    background: linear-gradient(135deg, var(--accent-blue) 0%, var(--accent-indigo) 100%);
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 20px; position: relative; z-index: 1;
}
.visitor-popup-icon svg { width: 28px; height: 28px; fill: white; }

.visitor-popup h3 {
    font-family: var(--font-display); font-size: 1.3rem; font-weight: 700;
    color: var(--text-on-glass); margin-bottom: 8px; position: relative; z-index: 1;
}
.visitor-popup p {
    font-size: 0.88rem; color: var(--text-secondary); margin-bottom: 24px;
    line-height: 1.6; position: relative; z-index: 1;
}

.visitor-form-group { margin-bottom: 16px; position: relative; z-index: 1; }
.visitor-form-label {
    display: block; font-size: 0.82rem; font-weight: 600;
    color: var(--text-secondary); margin-bottom: 8px;
}
.visitor-form-select, .visitor-form-input {
    width: 100%; padding: 12px 16px; border-radius: var(--radius-sm);
    border: 1px solid rgba(0, 0, 0, 0.08); background: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem; font-family: var(--font-body); color: var(--text-on-glass);
    outline: none; transition: all 0.3s ease;
    -webkit-appearance: none; appearance: none;
}
.visitor-form-select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='%236e6e73'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 40px; }
.visitor-form-select:focus, .visitor-form-input:focus { border-color: var(--accent-blue); background: white; box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.1); }
.visitor-form-select option { background: white; color: var(--text-primary); }

.visitor-popup-actions {
    display: flex; gap: 12px; margin-top: 24px; position: relative; z-index: 1;
}
.visitor-popup-actions .btn-primary { flex: 1; justify-content: center; padding: 12px 24px; }
.visitor-popup-actions .btn-skip {
    padding: 12px 24px; border-radius: 100px; border: none;
    background: transparent; color: var(--text-tertiary);
    font-size: 0.88rem; font-family: var(--font-body); cursor: pointer;
    transition: color 0.2s ease;
}
.visitor-popup-actions .btn-skip:hover { color: var(--text-secondary); }

/* Responsive */
@media (max-width: 1024px) {
    .projects-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    .nav { padding: 6px; left: 16px; right: 16px; transform: none; width: auto; border-radius: 100px; justify-content: center; }
    .nav-links { display: flex; flex-direction: row; gap: 4px; width: 100%; justify-content: space-around; }
    .nav-links a { padding: 10px 24px; font-size: 0.82rem; border-radius: 100px; flex: 1; text-align: center; display: flex; align-items: center; justify-content: center; }
    .page-section { padding: 100px 24px 140px; }
    .section-title { font-size: 2rem; }
    .footer { padding: 60px 24px; }
}
