/* 重置和基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* 高级感配色方案 */
    --primary-color: #1a1a1a;
    --secondary-color: #2d2d2d;
    --accent-color: #6366f1;
    --accent-light: #8b5cf6;
    --text-primary: #ffffff;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;
    --border-color: #27272a;
    --bg-primary: #0a0a0a;
    --bg-secondary: #111111;
    --bg-card: rgba(17, 17, 17, 0.8);
    --bg-glass: rgba(255, 255, 255, 0.05);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-accent: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);
    --gradient-bg: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 50%, #16213e 100%);
    --gradient-card: linear-gradient(145deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    line-height: 1.7;
    color: var(--text-primary);
    background: var(--gradient-bg);
    min-height: 100vh;
    font-weight: 400;
    letter-spacing: -0.01em;
    overflow-x: hidden;
}

/* 添加动态背景效果 */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(120, 200, 255, 0.1) 0%, transparent 50%);
    z-index: -1;
    animation: backgroundShift 20s ease-in-out infinite;
}

@keyframes backgroundShift {
    0%, 100% { transform: translateX(0) translateY(0) scale(1); }
    33% { transform: translateX(-20px) translateY(-10px) scale(1.05); }
    66% { transform: translateX(20px) translateY(10px) scale(0.95); }
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px;
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 40px;
    min-height: 100vh;
    position: relative;
}

/* 侧边栏样式 */
.sidebar {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(255, 255, 255, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    height: fit-content;
    position: sticky;
    top: 24px;
    border: 1px solid var(--border-color);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 32px 64px -12px rgba(0, 0, 0, 0.35),
        0 0 0 1px rgba(255, 255, 255, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.profile {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid var(--border-color);
    position: relative;
}

.profile::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 2px;
    background: var(--gradient-accent);
    border-radius: 1px;
}

.profile-img {
    width: 140px;
    height: 140px;
    margin: 0 auto 24px;
    border-radius: 50%;
    overflow: hidden;
    position: relative;
    border: 3px solid transparent;
    background: var(--gradient-accent);
    padding: 3px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.profile-img::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: var(--gradient-accent);
    border-radius: 50%;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.profile-img:hover {
    transform: scale(1.05);
    box-shadow: 
        0 20px 40px rgba(99, 102, 241, 0.4),
        0 0 0 8px rgba(99, 102, 241, 0.1);
}

.profile-img:hover::before {
    opacity: 1;
}

.profile-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.profile h1 {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
    letter-spacing: -0.02em;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.title {
    color: var(--text-secondary);
    font-size: 18px;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* 联系信息 */
.contact-info {
    margin-bottom: 40px;
}

.contact-info h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    letter-spacing: -0.01em;
}

.contact-info h3::before {
    content: '';
    width: 4px;
    height: 24px;
    background: var(--gradient-accent);
    margin-right: 12px;
    border-radius: 2px;
    box-shadow: 0 0 8px rgba(99, 102, 241, 0.3);
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
    color: var(--text-secondary);
    font-size: 15px;
    padding: 8px 0;
    transition: all 0.2s ease;
    border-radius: 8px;
    position: relative;
}

.contact-item:hover {
    color: var(--text-primary);
    background: var(--bg-glass);
    padding-left: 8px;
    transform: translateX(4px);
}

.contact-item i {
    width: 24px;
    color: var(--accent-color);
    margin-right: 16px;
    font-size: 16px;
    transition: all 0.2s ease;
}

.contact-item:hover i {
    color: var(--accent-light);
    transform: scale(1.1);
}

/* 技能样式 */
.skills {
    margin-bottom: 40px;
}

.skills h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    letter-spacing: -0.01em;
}

.skills h3::before {
    content: '';
    width: 4px;
    height: 24px;
    background: var(--gradient-accent);
    margin-right: 12px;
    border-radius: 2px;
    box-shadow: 0 0 8px rgba(99, 102, 241, 0.3);
}

.skill-category {
    margin-bottom: 24px;
}

.skill-category h4 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.skill-tag {
    background: var(--gradient-accent);
    color: white;
    padding: 8px 16px;
    border-radius: 24px;
    font-size: 13px;
    font-weight: 500;
    box-shadow: 
        0 4px 12px rgba(99, 102, 241, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.skill-tag::before {
    content: '';
    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 ease;
}

.skill-tag:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 
        0 8px 20px rgba(99, 102, 241, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.2);
}

.skill-tag:hover::before {
    left: 100%;
}

/* 语言能力 */
.languages {
    margin-bottom: 30px;
}

.languages h3 {
    font-size: 18px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
}

.languages h3::before {
    content: '';
    width: 4px;
    height: 20px;
    background: #667eea;
    margin-right: 10px;
    border-radius: 2px;
}

.language-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.language-item span {
    font-size: 14px;
    font-weight: 500;
    color: #4a5568;
    min-width: 60px;
}

.language-level {
    flex: 1;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    margin-left: 15px;
    overflow: hidden;
}

.level-bar {
    height: 100%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 4px;
    transition: width 1s ease;
}

/* 主内容区样式 */
.main-content {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 48px;
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(255, 255, 255, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border-color);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.main-content:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 32px 64px -12px rgba(0, 0, 0, 0.35),
        0 0 0 1px rgba(255, 255, 255, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.section {
    margin-bottom: 48px;
    position: relative;
}

.section h2 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 32px;
    display: flex;
    align-items: center;
    position: relative;
    letter-spacing: -0.02em;
}

.section h2::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--gradient-accent);
    border-radius: 2px;
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.4);
}

.section h2 i {
    margin-right: 16px;
    color: var(--accent-color);
    font-size: 24px;
    transition: all 0.3s ease;
}

.section h2:hover i {
    color: var(--accent-light);
    transform: scale(1.1);
}

.section p {
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 16px;
    letter-spacing: -0.01em;
}

/* 时间线样式 */
.timeline {
    position: relative;
    padding-left: 40px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--gradient-accent);
    border-radius: 2px;
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.3);
}

.timeline-item {
    position: relative;
    margin-bottom: 48px;
    transition: all 0.3s ease;
}

.timeline-item:hover {
    transform: translateX(8px);
}

.timeline-marker {
    position: absolute;
    left: -28px;
    top: 12px;
    width: 16px;
    height: 16px;
    background: var(--gradient-accent);
    border-radius: 50%;
    border: 4px solid var(--bg-card);
    box-shadow: 
        0 0 0 2px var(--accent-color),
        0 4px 12px rgba(99, 102, 241, 0.4);
    transition: all 0.3s ease;
}

.timeline-item:hover .timeline-marker {
    transform: scale(1.2);
    box-shadow: 
        0 0 0 2px var(--accent-light),
        0 6px 16px rgba(99, 102, 241, 0.5);
}

.timeline-content h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    letter-spacing: -0.01em;
}

.timeline-content h4 {
    font-size: 18px;
    color: var(--accent-color);
    font-weight: 500;
    margin-bottom: 12px;
    letter-spacing: -0.01em;
}

.timeline-content .date {
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
    background: var(--bg-glass);
    padding: 6px 16px;
    border-radius: 20px;
    display: inline-block;
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.timeline-content .date:hover {
    background: var(--accent-color);
    color: white;
    transform: translateY(-2px);
}

.timeline-content ul {
    list-style: none;
    padding-left: 0;
}

.timeline-content li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 8px;
    color: #4a5568;
    line-height: 1.6;
}

.timeline-content li::before {
    content: '▶';
    position: absolute;
    left: 0;
    color: #667eea;
    font-size: 12px;
}

/* 教育背景 */
.education-item {
    background: #f8fafc;
    padding: 25px;
    border-radius: 15px;
    border-left: 4px solid #667eea;
}

.education-item h3 {
    font-size: 18px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 5px;
}

.education-item h4 {
    font-size: 16px;
    color: #667eea;
    font-weight: 500;
    margin-bottom: 8px;
}

.education-item .date {
    color: #718096;
    font-size: 14px;
    font-weight: 500;
    background: white;
    padding: 4px 12px;
    border-radius: 15px;
    display: inline-block;
    margin-bottom: 15px;
}

/* 项目经验 */
.project-item {
    background: #f8fafc;
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 25px;
    border-left: 4px solid #667eea;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.project-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.project-item h3 {
    font-size: 18px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 5px;
}

.project-date {
    color: #718096;
    font-size: 14px;
    font-weight: 500;
    background: white;
    padding: 4px 12px;
    border-radius: 15px;
    display: inline-block;
    margin-bottom: 15px;
}

.project-desc {
    color: #4a5568;
    margin-bottom: 15px;
    font-style: italic;
}

.project-tech {
    margin-bottom: 15px;
}

.tech-tag {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 500;
    margin-right: 8px;
    margin-bottom: 8px;
    display: inline-block;
}

.project-achievements {
    list-style: none;
    padding-left: 0;
}

.project-achievements li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 8px;
    color: #4a5568;
    line-height: 1.6;
}

.project-achievements li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #48bb78;
    font-weight: bold;
}

/* 证书样式 */
.certificates {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.cert-item {
    background: #f8fafc;
    padding: 20px;
    border-radius: 15px;
    border-left: 4px solid #667eea;
    transition: transform 0.2s ease;
}

.cert-item:hover {
    transform: translateY(-2px);
}

.cert-item h4 {
    font-size: 16px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 8px;
}

.cert-date {
    color: #718096;
    font-size: 14px;
    font-weight: 500;
}

/* 浮动操作按钮 */
.floating-actions {
    position: fixed;
    bottom: 32px;
    right: 32px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 1000;
}

.action-btn {
    width: 56px;
    height: 56px;
    border: none;
    border-radius: 50%;
    background: var(--gradient-accent);
    color: white;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 
        0 8px 24px rgba(99, 102, 241, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.action-btn::before {
    content: '';
    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 ease;
}

.action-btn:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 
        0 12px 32px rgba(99, 102, 241, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.2);
}

.action-btn:hover::before {
    left: 100%;
}

.action-btn:active {
    transform: translateY(-2px) scale(1.02);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 15px;
    }
    
    .sidebar {
        position: static;
        order: 2;
    }
    
    .main-content {
        order: 1;
        padding: 25px;
    }
    
    .profile-img {
        width: 100px;
        height: 100px;
    }
    
    .profile h1 {
        font-size: 24px;
    }
    
    .section h2 {
        font-size: 20px;
    }
    
    .timeline {
        padding-left: 20px;
    }
    
    .timeline::before {
        left: 10px;
    }
    
    .timeline-marker {
        left: -17px;
    }
    
    .certificates {
        grid-template-columns: 1fr;
    }
    
    .floating-actions {
        bottom: 20px;
        right: 20px;
    }
    
    .action-btn {
        width: 45px;
        height: 45px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    
    .sidebar, .main-content {
        padding: 20px;
    }
    
    .profile h1 {
        font-size: 22px;
    }
    
    .section h2 {
        font-size: 18px;
    }
    
    .skill-tags {
        gap: 6px;
    }
    
    .skill-tag {
        padding: 4px 8px;
        font-size: 11px;
    }
}

/* 打印样式 */
@media print {
    body {
        background: white;
    }
    
    .container {
        grid-template-columns: 1fr;
        gap: 0;
        padding: 0;
    }
    
    .sidebar, .main-content {
        background: white;
        box-shadow: none;
        border-radius: 0;
        padding: 20px;
    }
    
    .floating-actions {
        display: none;
    }
    
    .section {
        page-break-inside: avoid;
    }
}

/* 暗色主题 */
[data-theme="dark"] {
    --bg-primary: #0a0a0a;
    --bg-secondary: #111111;
    --text-primary: #ffffff;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;
    --border-color: #27272a;
    --bg-card: rgba(17, 17, 17, 0.8);
    --bg-glass: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] body {
    background: var(--gradient-bg);
}

[data-theme="dark"] .sidebar,
[data-theme="dark"] .main-content {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

[data-theme="dark"] .profile h1,
[data-theme="dark"] .section h2,
[data-theme="dark"] .timeline-content h3 {
    color: var(--text-primary);
}

[data-theme="dark"] .contact-item,
[data-theme="dark"] .section p,
[data-theme="dark"] .timeline-content li {
    color: var(--text-secondary);
}

[data-theme="dark"] .education-item,
[data-theme="dark"] .project-item,
[data-theme="dark"] .cert-item {
    background: var(--bg-glass);
    border-color: var(--accent-color);
}

/* 浅色主题 */
[data-theme="light"] {
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --text-primary: #1a202c;
    --text-secondary: #4a5568;
    --text-muted: #718096;
    --border-color: #e2e8f0;
    --bg-card: rgba(255, 255, 255, 0.9);
    --bg-glass: rgba(0, 0, 0, 0.05);
}

[data-theme="light"] body {
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
}

[data-theme="light"] .sidebar,
[data-theme="light"] .main-content {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .contact-item:hover,
[data-theme="light"] .skill-tag:hover,
[data-theme="light"] .timeline-item:hover {
    background: var(--bg-glass);
}

/* 高级动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(99, 102, 241, 0.3);
    }
    50% {
        box-shadow: 0 0 30px rgba(99, 102, 241, 0.5);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.section {
    animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.timeline-item {
    animation: slideInLeft 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-item {
    animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar {
    animation: slideInLeft 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.main-content {
    animation: slideInRight 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.profile-img {
    animation: scaleIn 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.skill-tag {
    animation: scaleIn 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.action-btn {
    animation: float 3s ease-in-out infinite;
}

.action-btn:nth-child(2) {
    animation-delay: 0.5s;
}

.action-btn:nth-child(3) {
    animation-delay: 1s;
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #5a67d8, #6b46c1);
}
