/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 根变量定义 */
:root {
    --primary-color: #6366f1;
    --secondary-color: #8b5cf6;
    --accent-color: #06b6d4;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-light: #9ca3af;
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-glass: rgba(255, 255, 255, 0.1);
    --border-color: rgba(255, 255, 255, 0.2);
    --shadow-light: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-heavy: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-accent: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

/* 深色模式变量 */
@media (prefers-color-scheme: dark) {
    :root {
        --text-primary: #f9fafb;
        --text-secondary: #d1d5db;
        --text-light: #9ca3af;
        --bg-primary: #111827;
        --bg-secondary: #1f2937;
        --bg-glass: rgba(31, 41, 55, 0.1);
        --border-color: rgba(255, 255, 255, 0.1);
    }
}

/* 基础样式 */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-primary);
    overflow-x: hidden;
    scroll-behavior: smooth;
}

/* 背景渐变和粒子效果 */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    z-index: -2;
    opacity: 0.1;
}

.particles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--primary-color);
    border-radius: 50%;
    opacity: 0;
    animation: float 20s infinite linear;
    top: 100vh;
}

.particle:nth-child(1) {
    left: 10%;
    animation-delay: 0s;
    animation-duration: 15s;
}

.particle:nth-child(2) {
    left: 20%;
    animation-delay: 2s;
    animation-duration: 18s;
}

.particle:nth-child(3) {
    left: 30%;
    animation-delay: 4s;
    animation-duration: 12s;
}

.particle:nth-child(4) {
    left: 40%;
    animation-delay: 6s;
    animation-duration: 16s;
}

.particle:nth-child(5) {
    left: 50%;
    animation-delay: 8s;
    animation-duration: 14s;
}

@keyframes float {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 0;
    }
    5% {
        opacity: 0.3;
    }
    95% {
        opacity: 0.3;
    }
    100% {
        transform: translateY(-100vh) rotate(360deg);
        opacity: 0;
    }
}

/* 主容器 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 头部区域 */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 80px 0;
    overflow: hidden;
}

.hero-content {
    text-align: center;
    z-index: 10;
    position: relative;
    animation: fadeInUp 1s ease-out;
}

.hero-content h1.name {
    font-size: 4rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 16px;
}

.hero-content .title {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
    font-weight: 500;
}

.hero-content .education {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 500;
}

.hero-content .education i {
    color: var(--accent-color);
    width: 20px;
}

.hero-content .location,
.hero-content .birth-date {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.hero-content .location i,
.hero-content .birth-date i {
    color: var(--accent-color);
    width: 20px;
}

/* 技能气泡容器 */
.skill-bubbles-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.skill-bubble {
    position: absolute;
    width: 100px;
    height: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 50%;
    backdrop-filter: blur(12px);
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--text-primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    pointer-events: auto;
    text-align: center;
    line-height: 1.2;
    padding: 8px;
    z-index: 5;
}

.skill-bubble i {
    font-size: 1.2rem;
    margin-bottom: 4px;
    color: var(--primary-color);
}

.skill-bubble span {
    font-size: 0.6rem;
    line-height: 1.1;
    word-break: break-word;
    max-width: 100%;
}

.skill-bubble:hover {
    transform: scale(1.05);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    border-color: rgba(99, 102, 241, 0.3);
}

.skill-bubble.visible {
    opacity: 0.9;
    transform: scale(1);
}

.skill-bubble.fade-in {
    opacity: 0.9;
    transform: scale(1);
}

.skill-bubble.fade-out {
    opacity: 0;
    transform: scale(0.8);
}

/* 联系方式区域 */
.contact-section {
    padding: 80px 0;
    margin-top: 80px;
}

/* 下载简历区域 */
.download-section {
    padding: 40px 0;
    margin-top: 40px;
    text-align: center;
}

.download-container {
    max-width: 800px;
    margin: 0 auto;
}

.download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px 32px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 16px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    text-decoration: none;
    min-width: 160px;
    height: 56px;
}

.download-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.3s ease;
}

.download-btn:hover::before {
    left: 100%;
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.download-btn:active {
    transform: translateY(0);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.download-btn i {
    font-size: 1.1rem;
}

/* 右键菜单样式 */
.context-menu {
    position: fixed;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    z-index: 10000;
    min-width: 150px;
    padding: 8px 0;
    font-family: 'Inter', sans-serif;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-size: 14px;
    color: #374151;
}

.menu-item:hover {
    background-color: #f3f4f6;
}

.menu-item i {
    width: 16px;
    color: #6b7280;
}

/* 设计署名样式 */
.design-signature {
    padding: 20px 0;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 40px;
}

.design-signature p {
    color: var(--text-light);
    font-size: 0.9rem;
    font-weight: 300;
    letter-spacing: 1px;
    opacity: 0.7;
    margin: 0;
}

.contact-card {
    max-width: 1000px;
    margin: 0 auto;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 30px;
    backdrop-filter: blur(20px);
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.contact-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.contact-item:hover::before {
    left: 100%;
}

.contact-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-heavy);
    background: rgba(255, 255, 255, 0.15);
}


.contact-item i {
    font-size: 2rem;
    color: var(--primary-color);
    width: 50px;
    text-align: center;
}

.contact-details h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.contact-details p,
.contact-details a,
.contact-details span {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-details a:hover {
    color: var(--primary-color);
}

/* 章节标题 */
.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin: 80px 0 60px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--gradient-accent);
    border-radius: 2px;
}

/* 技能区域 */
.skills-section {
    padding: 80px 0;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.skill-category {
    backdrop-filter: blur(20px);
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 30px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.skill-category::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.skill-category:hover::before {
    left: 100%;
}

.skill-category:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-heavy);
    background: rgba(255, 255, 255, 0.15);
}

.skill-category h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.skill-tag {
    padding: 8px 16px;
    background: var(--gradient-primary);
    color: white;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    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.3s ease;
}

.skill-tag:hover::before {
    left: 100%;
}

.skill-tag:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-medium);
}

/* 获奖经历 */
.awards-section {
    padding: 80px 0;
}

.awards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.award-card {
    backdrop-filter: blur(20px);
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 30px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.award-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.award-card:hover::before {
    opacity: 0.1;
}

.award-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-heavy);
}

.award-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient-accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.award-icon i {
    font-size: 1.5rem;
    color: white;
}

.award-content h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.award-content p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* 项目经历 */
.projects-section {
    padding: 80px 0;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.project-card {
    backdrop-filter: blur(20px);
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 30px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-secondary);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.project-card:hover::before {
    opacity: 0.1;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-heavy);
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
    gap: 16px;
}

.project-header h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    flex: 1;
}

.project-role {
    background: var(--gradient-primary);
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
}

.project-description {
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.6;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.tech-tag {
    padding: 4px 12px;
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.tech-tag:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.05);
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.project-link:hover {
    color: var(--accent-color);
    transform: translateX(5px);
}

/* 实习经历 */
.experience-section {
    padding: 80px 0;
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 40px auto 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--gradient-primary);
    transform: translateX(-50%);
    z-index: 0;
    pointer-events: none;
    display: none; /* 改为分段线，隐藏原始整条竖线 */
}

.timeline-item {
    position: relative;
    z-index: 1;
    margin-bottom: 40px;
    display: flex;
    align-items: center;
    gap: 30px;
}

/* 分段竖线：在每个时间项与下一项之间绘制一小段连线 */
.timeline-item:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 40px; /* 缩短为原来的一半，仅保留下半段的上半长度 */
    background: var(--gradient-primary);
    pointer-events: none;
    z-index: 0; /* 始终在卡片下方 */
}

/* 左右微偏移，避免视觉重叠 */
.timeline-item:nth-child(odd):not(:last-child)::after {
    left: calc(50% - 48px);
}

.timeline-item:nth-child(even):not(:last-child)::after {
    left: calc(50% + 48px);
}

.timeline-item:nth-child(odd) {
    flex-direction: row;
}

.timeline-item:nth-child(even) {
    flex-direction: row-reverse;
}

.timeline-date {
    flex: 0 0 120px;
    text-align: center;
    font-weight: 600;
    color: var(--primary-color);
    background: var(--bg-glass);
    padding: 8px 16px;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    position: relative;
    z-index: 2;
}

.timeline-content {
    flex: 1;
    backdrop-filter: blur(20px);
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
}

.timeline-content:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-medium);
}

.timeline-content h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.timeline-content .position {
    color: var(--primary-color);
    font-weight: 500;
    margin-bottom: 12px;
}

.timeline-content .description {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* 教育背景 */
.education-section {
    padding: 80px 0;
}

.education-card {
    backdrop-filter: blur(20px);
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 40px;
    max-width: 800px;
    margin: 40px auto 0;
    transition: all 0.3s ease;
}

.education-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-heavy);
}

.education-info {
    text-align: center;
    margin-bottom: 30px;
}

.education-info h3 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.education-info .degree {
    font-size: 1.2rem;
    color: var(--primary-color);
    font-weight: 500;
    margin-bottom: 8px;
}

.education-info .period {
    color: var(--text-secondary);
    font-size: 1rem;
}

.courses h4 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-primary);
    text-align: center;
}

.course-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.course-tag {
    padding: 8px 16px;
    background: var(--gradient-accent);
    color: white;
    border-radius: 16px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.course-tag:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-medium);
}

/* 自我评价 */
.about-section {
    padding: 80px 0;
}

.about-content {
    backdrop-filter: blur(20px);
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 40px;
    max-width: 800px;
    margin: 40px auto 0;
    text-align: center;
    transition: all 0.3s ease;
}

.about-content:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-heavy);
}

.about-content p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

/* AI聊天助手 */
.ai-chatbot {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
}

.chatbot-toggle {
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-heavy);
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
}

.chatbot-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 20px 40px rgba(99, 102, 241, 0.4);
}

.chatbot-toggle i {
    font-size: 1.5rem;
    color: white;
}

.chatbot-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 350px;
    height: 500px;
    backdrop-filter: blur(20px);
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    box-shadow: var(--shadow-heavy);
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.3s ease-out;
}

.chatbot-window.active {
    display: flex;
}

.chatbot-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-glass);
}

.chatbot-header h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
}

.close-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: var(--bg-glass);
    color: var(--text-primary);
}

.chatbot-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.message {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 0.9rem;
    line-height: 1.4;
}

.ai-message {
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    align-self: flex-start;
}

.user-message {
    background: var(--gradient-primary);
    color: white;
    align-self: flex-end;
}

.chatbot-input {
    padding: 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 12px;
    background: var(--bg-glass);
}

.chatbot-input input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-glass);
    color: var(--text-primary);
    font-size: 0.9rem;
    outline: none;
    transition: all 0.3s ease;
}

.chatbot-input input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.chatbot-input button {
    padding: 12px;
    background: var(--gradient-primary);
    border: none;
    border-radius: 12px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.chatbot-input button:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-medium);
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes glow {
    from {
        text-shadow: 0 0 20px rgba(99, 102, 241, 0.5);
    }
    to {
        text-shadow: 0 0 30px rgba(99, 102, 241, 0.8);
    }
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(99, 102, 241, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(99, 102, 241, 0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }
    
    .hero-content h1.name {
        font-size: 3rem;
    }
    
    .hero-content .title {
        font-size: 1.3rem;
    }
    
    .hero-content .education {
        font-size: 1.1rem;
        gap: 6px;
    }
    
    .hero-content .location,
    .hero-content .birth-date {
        font-size: 1.1rem;
        gap: 6px;
    }
    
    .skill-bubble {
        width: 90px;
        height: 90px;
        font-size: 0.7rem;
        border-radius: 50%;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
        line-height: 1.2;
        padding: 8px;
    }
    
    .skill-bubble i {
        font-size: 1.2rem;
        margin-bottom: 3px;
    }
    
    .skill-bubble span {
        font-size: 0.6rem;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .contact-item {
        padding: 20px;
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .contact-item i {
        font-size: 1.5rem;
    }
    
    .section-title {
        font-size: 2rem;
        margin: 60px 0 40px;
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .awards-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .project-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .timeline::before {
        left: 40px;
    }
    
    .timeline-item {
        flex-direction: row !important;
        padding-left: 70px;
    }
    
    .timeline-date {
        position: absolute;
        left: -50px;
        top: 0;
        width: 80px;
        font-size: 0.8rem;
        text-align: center;
    }
    
    .chatbot-window {
        width: calc(100vw - 60px);
        right: -15px;
        height: 400px;
    }
    
    .ai-chatbot {
        bottom: 20px;
        right: 20px;
    }
    
    .download-btn {
        padding: 14px 28px;
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .hero-content h1.name {
        font-size: 2.5rem;
    }
    
    .hero-content .title {
        font-size: 1.3rem;
    }
    
    .hero-content .education {
        font-size: 1rem;
    }
    
    .hero-content .location,
    .hero-content .birth-date {
        font-size: 1rem;
    }
    
    .skill-bubble {
        width: 80px;
        height: 80px;
        font-size: 0.6rem;
        border-radius: 50%;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
        line-height: 1.2;
        padding: 6px;
    }
    
    .skill-bubble i {
        font-size: 1.1rem;
        margin-bottom: 3px;
    }
    
    .skill-bubble span {
        font-size: 0.5rem;
    }
    
    .skill-category,
    .award-card,
    .project-card,
    .timeline-content,
    .education-card,
    .about-content {
        padding: 20px;
    }
    
    .chatbot-window {
        width: calc(100vw - 40px);
        right: -10px;
        height: 350px;
    }
    
    .download-btn {
        padding: 12px 24px;
        font-size: 0.9rem;
    }
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--gradient-primary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* 移除点击时的蓝色高亮和焦点轮廓 */
* {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* 移除焦点轮廓 */
*:focus {
    outline: none !important;
    box-shadow: none !important;
}

/* 移除按钮和链接的焦点样式 */
button:focus,
a:focus,
input:focus,
textarea:focus,
select:focus {
    outline: none !important;
    box-shadow: none !important;
}

/* 允许文本选择的元素 */
p, span, div, h1, h2, h3, h4, h5, h6 {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

/* 选择文本样式 */
::selection {
    background: var(--primary-color);
    color: white;
}

::-moz-selection {
    background: var(--primary-color);
    color: white;
}
