* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --text-color: #333;
    --bg-color: #f5f5f5;
    --card-bg: #ffffff;
    --gradient: linear-gradient(135deg, #6366f1 0%, #3b82f6 100%);
    transition: all 0.3s ease;
}

body {
    font-family: 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem;
}

/* Header Styles */
.header-section {
    text-align: center;
    padding: 3rem 0;
    background: var(--gradient);
    border-radius: 15px;
    margin-bottom: 2rem;
    color: white;
}

.profile-container {
    position: relative;
    width: 150px;
    height: 150px;
    margin: 0 auto 1.5rem;
}

.profile-image-wrapper {
    position: relative;
    width: 150px;
    height: 150px;
    margin: 0 auto;
    border-radius: 50%;
    overflow: hidden;
}

.profile-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: 4px solid white;
    transition: all 0.3s ease;
}

.profile-image.default-avatar {
    background-color: var(--secondary-color);
    padding: 1rem;
}

.profile-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-container:hover .profile-overlay {
    opacity: 1;
}

.profile-container:hover .profile-image {
    transform: scale(1.05);
}

.animate-text {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(to right, #fff, #e0e0e0);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shimmer 2s infinite linear;
}

@keyframes shimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

.title {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

/* Section Styles */
section {
    background-color: var(--card-bg);
    padding: 2rem;
    margin: 1.5rem 0;
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

section:hover {
    transform: translateY(-5px);
}

h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #eee;
    padding-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Skills Grid */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.skill-item {
    background: white;
    padding: 1rem;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.skill-icon {
    font-size: 2rem;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

.skill-level {
    height: 6px;
    background: #eee;
    border-radius: 3px;
    margin-top: 0.5rem;
}

.skill-progress {
    height: 100%;
    background: var(--gradient);
    border-radius: 3px;
    transition: width 1s ease-in-out;
}

/* Contact Grid */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    text-align: center;
}

.contact-item {
    padding: 1rem;
    border-radius: 10px;
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
}

.contact-item:hover {
    transform: translateY(-3px);
}

.contact-item i {
    font-size: 1.5rem;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

/* Social Links */
.header-social-links {
    margin-top: 1.5rem;
}

.social-icon {
    display: inline-block;
    width: 40px;
    height: 40px;
    line-height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    margin: 0 0.5rem;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.social-icon:hover {
    background: white;
    color: var(--secondary-color);
    transform: translateY(-3px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .header-section {
        padding: 2rem 1rem;
    }
    
    .animate-text {
        font-size: 2rem;
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

section {
    animation: fadeIn 0.5s ease-out forwards;
}

/* 添加滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--secondary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* Tab Styles */
.tab-container {
    margin-top: 2rem;
}

.tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 0.8rem 1.5rem;
    border: none;
    background: white;
    color: var(--primary-color);
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.tab-btn:hover {
    background: var(--gradient);
    color: white;
    transform: translateY(-2px);
}

.tab-btn.active {
    background: var(--gradient);
    color: white;
}

.tab-content {
    display: none;
    animation: fadeIn 0.5s ease-out forwards;
}

.tab-content.active {
    display: block;
}

/* Timeline Styles */
.timeline {
    position: relative;
    padding: 2rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 2px;
    background: var(--gradient);
}

.timeline-item {
    position: relative;
    padding-left: 3rem;
    margin-bottom: 2rem;
}

.timeline-date {
    position: absolute;
    left: -80px;
    top: 0;
    background: var(--gradient);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
}

.timeline-content {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.timeline-content h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.timeline-content ul {
    list-style-type: none;
    padding-left: 0;
}

.timeline-content ul li {
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
}

.timeline-content ul li::before {
    content: '•';
    color: var(--secondary-color);
    position: absolute;
    left: 0;
}

/* Project Styles */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.project-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.project-card:hover {
    transform: translateY(-5px);
}

.project-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.project-info {
    padding: 1.5rem;
}

.project-info h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

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

.project-tags span {
    background: var(--gradient);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
}

/* About Details Styles */
.about-details {
    margin-top: 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.detail-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 1.5rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.detail-item i {
    font-size: 2rem;
    color: var(--secondary-color);
}

.detail-item h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .timeline::before {
        left: 20px;
    }
    
    .timeline-date {
        position: relative;
        left: 0;
        margin-bottom: 1rem;
        display: inline-block;
    }
    
    .timeline-item {
        padding-left: 2rem;
    }
    
    .tabs {
        flex-direction: column;
        align-items: stretch;
    }
    
    .tab-btn {
        width: 100%;
        text-align: center;
    }
}

/* 添加主题切换按钮样式 */
.theme-switcher {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 1000;
}

.theme-btn {
    padding: 0.8rem 1.2rem;
    border: none;
    border-radius: 25px;
    background: var(--card-bg);
    color: var(--primary-color);
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.theme-btn:hover {
    transform: translateX(-5px);
    background: var(--gradient);
    color: white;
}

.theme-btn.active {
    background: var(--gradient);
    color: white;
}

/* 优化头像样式 */
.profile-upload {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    padding: 0.5rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.profile-image-wrapper:hover .profile-upload {
    opacity: 1;
}

.profile-upload input[type="file"] {
    display: none;
}

.profile-upload label {
    color: white;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.8rem;
}

.profile-upload i {
    font-size: 1.2rem;
}

/* 暗黑主题特定样式 */
[data-theme="dark"] {
    .card {
        background: rgba(255, 255, 255, 0.05);
    }
    
    .skill-item {
        background: rgba(255, 255, 255, 0.1);
    }
}

/* 渐变主题特定样式 */
[data-theme="gradient"] {
    .section {
        background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.7));
        backdrop-filter: blur(10px);
    }
}

/* 简约主题特定样式 */
[data-theme="minimal"] {
    .section {
        border: 1px solid #eee;
        box-shadow: none;
    }
    
    .skill-item {
        border: 1px solid #eee;
        box-shadow: none;
    }
}

/* 响应式调整 */
@media (max-width: 768px) {
    .theme-switcher {
        top: auto;
        bottom: 20px;
        right: 20px;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: flex-end;
        max-width: calc(100% - 40px);
    }

    .theme-btn {
        padding: 0.6rem 1rem;
        font-size: 0.8rem;
    }
} 