/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
    transition: background-color 0.3s, color 0.3s;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 头部样式 */
.header {
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    color: white;
    border-radius: 15px;
    padding: 40px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.profile-section {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 30px;
}

.avatar-container {
    flex-shrink: 0;
}

.avatar {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 5px solid rgba(255, 255, 255, 0.3);
    object-fit: cover;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.profile-info {
    flex: 1;
}

.name {
    font-size: 2.8rem;
    margin-bottom: 5px;
    font-weight: 700;
}

.title {
    font-size: 1.3rem;
    opacity: 0.9;
    margin-bottom: 20px;
}

.social-links {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.social-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    padding: 10px 20px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.social-link:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* 主要内容区域 */
.main-content {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

section {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

h2 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 10px;
}

h2 i {
    color: #6a11cb;
}

/* 关于我部分 */
.about-section p {
    margin-bottom: 15px;
    font-size: 1.1rem;
    color: #555;
}

/* 内容网格 */
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

/* 技能部分 */
.skills-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.skill-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.skill-name {
    font-weight: 600;
    color: #444;
}

.skill-bar {
    height: 10px;
    background: #e9ecef;
    border-radius: 5px;
    overflow: hidden;
}

.skill-level {
    height: 100%;
    background: linear-gradient(90deg, #6a11cb, #2575fc);
    border-radius: 5px;
    transition: width 1s ease;
}

/* 项目部分 */
.project-card {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    border-left: 4px solid #6a11cb;
}

.project-card h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: #2c3e50;
}

.project-card p {
    color: #666;
    margin-bottom: 15px;
}

.project-tags {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.tag {
    background: #e9ecef;
    color: #495057;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

/* 兴趣部分 */
.interests-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 25px;
}

.interest-item {
    text-align: center;
    padding: 25px 15px;
    background: #f8f9fa;
    border-radius: 10px;
    transition: transform 0.3s ease;
}

.interest-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

.interest-item i {
    font-size: 2.5rem;
    color: #6a11cb;
    margin-bottom: 15px;
}

.interest-item h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: #2c3e50;
}

.interest-item p {
    color: #666;
    font-size: 0.95rem;
}

/* 页脚 */
.footer {
    text-align: center;
    padding: 30px;
    margin-top: 40px;
    color: #666;
    border-top: 1px solid #e9ecef;
}

.footer-links {
    margin: 15px 0;
}

.footer-links a {
    color: #6a11cb;
    text-decoration: none;
    margin: 0 10px;
    font-weight: 500;
}

.footer-links a:hover {
    text-decoration: underline;
}

.theme-toggle {
    background: #6a11cb;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 50px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 15px;
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    background: #5a0db5;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(106, 17, 203, 0.3);
}

/* 暗色主题 */
body.dark-theme {
    background-color: #121212;
    color: #e0e0e0;
}

body.dark-theme section {
    background-color: #1e1e1e;
    color: #e0e0e0;
}

body.dark-theme h2 {
    color: #bb86fc;
}

body.dark-theme .project-card {
    background-color: #252525;
}

body.dark-theme .interest-item {
    background-color: #252525;
}

body.dark-theme .tag {
    background-color: #333;
    color: #ccc;
}

body.dark-theme .skill-bar {
    background-color: #333;
}

body.dark-theme .footer {
    border-top-color: #333;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .profile-section {
        flex-direction: column;
        text-align: center;
    }
    
    .social-links {
        justify-content: center;
    }
    
    .name {
        font-size: 2.2rem;
    }
    
    .content-grid {
        grid-template-columns: 1fr;
    }
    
    .interests-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .header {
        padding: 25px;
    }
    
    .avatar {
        width: 120px;
        height: 120px;
    }
    
    .interests-grid {
        grid-template-columns: 1fr;
    }
    
    section {
        padding: 20px;
    }
}