/* 全局样式重置和基础设置 */
* {
    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: #f5f5f5;
    transition: all 0.3s ease;
}

/* 容器样式 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 头部样式 */
header {
    background: linear-gradient(135deg, #111 0%, #222 100%);
    color: white;
    padding: 60px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    z-index: 0;
}

header .container {
    position: relative;
    z-index: 1;
}

h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
    animation: fadeInUp 1s ease-out;
}

header p {
    font-size: 1.2rem;
    margin-bottom: 0;
    opacity: 0.9;
    animation: fadeInUp 1s ease-out 0.3s both;
}

/* 导航栏样式 */
nav {
    background: #222;
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 30px;
}

nav a {
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    padding: 8px 15px;
    border-radius: 4px;
    transition: all 0.3s ease;
    position: relative;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: white;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

nav a:hover {
    background: rgba(255, 255, 255, 0.1);
}

nav a:hover::after {
    width: 80%;
}

/* 主要内容区域 */
main {
    padding: 60px 0;
    background: white;
}

section {
    margin-bottom: 80px;
    animation: fadeIn 1s ease-out;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 30px;
    text-align: center;
    color: #111;
    position: relative;
    padding-bottom: 15px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #111, #444);
    border-radius: 2px;
}

/* 卡片样式 */
.card {
    background: #f9f9f9;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    border: 1px solid #eee;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    background: white;
}

.card h3 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: #111;
}

.card p {
    color: #555;
    margin-bottom: 20px;
    line-height: 1.8;
}

/* 项目卡片 */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.project-card {
    background: #f9f9f9;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    border: 1px solid #eee;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

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

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

.project-card-content {
    padding: 25px;
}

.project-card h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #111;
}

.project-card p {
    color: #666;
    margin-bottom: 20px;
    line-height: 1.7;
}

.project-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.project-links a {
    display: inline-block;
    padding: 8px 16px;
    background: #222;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.project-links a:hover {
    background: #111;
    transform: translateY(-2px);
}

/* 关于我部分 */
.about-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.about-content p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #555;
    margin-bottom: 30px;
    max-width: 600px;
}

.about-content h3 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: #111;
    position: relative;
    padding-bottom: 10px;
}

.about-content h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #111, #444);
    border-radius: 2px;
}

.skills-list,
.education-list {
    list-style: none;
    text-align: left;
    max-width: 600px;
    margin: 0 auto 30px;
    padding: 0;
}

.skills-list li,
.education-list li {
    padding: 12px 20px;
    margin-bottom: 10px;
    background: #f9f9f9;
    border-radius: 8px;
    border-left: 4px solid #222;
    transition: all 0.3s ease;
}

.skills-list li:hover,
.education-list li:hover {
    background: #f0f0f0;
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.skills-list li strong {
    color: #111;
    margin-right: 10px;
}

.profile-image {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 30px;
    border: 5px solid #f0f0f0;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.profile-image:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.2);
}

/* 社交媒体链接 */
.social-links {
    display: flex;
    gap: 20px;
    margin-top: 30px;
    justify-content: center;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: #222;
    color: white;
    text-decoration: none;
    border-radius: 50%;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: #111;
    transform: translateY(-3px) scale(1.1);
}

/* 联系部分样式 */
.contact-section {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
    padding: 30px;
    background: #f9f9f9;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.btn-large {
    font-size: 1.1rem;
    padding: 15px 30px;
    background: linear-gradient(135deg, #222, #444);
    color: white;
    border: none;
    border-radius: 8px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-large:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.email-info {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid #eee;
}

.email-info h4 {
    color: #111;
    font-size: 1.3rem;
    margin-bottom: 20px;
}

.email-info ul {
    list-style: none;
    padding: 0;
}

.email-info li {
    padding: 12px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 1.1rem;
}

.email-info li strong {
    color: #111;
}

.email-info li a {
    color: #222;
    text-decoration: none;
    transition: color 0.3s ease;
}

.email-info li a:hover {
    color: #555;
    text-decoration: underline;
}

.email-info li i {
    color: #666;
    font-size: 1.2rem;
}

/* 代码块样式 */
pre {
    background: #2d2d2d !important;
    border-radius: 8px !important;
    padding: 20px !important;
    margin: 20px 0 !important;
    overflow-x: auto;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1) !important;
    border: none !important;
}

code {
    font-family: 'Courier New', Courier, monospace !important;
    font-size: 0.9rem !important;
    background: #f0f0f0 !important;
    padding: 2px 6px !important;
    border-radius: 4px !important;
    color: #d63384 !important;
}

pre code {
    background: transparent !important;
    padding: 0 !important;
    color: #f8f8f2 !important;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 12px 25px;
    background: #222;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn:hover {
    background: #111;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* 页脚样式 */
footer {
    background: #111;
    color: white;
    padding: 40px 0 20px;
    text-align: center;
}

footer p {
    margin-bottom: 10px;
    opacity: 0.8;
}

/* 回到顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: #222;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: #111;
    transform: translateY(-3px);
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    nav ul {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    nav a {
        display: block;
    }
    
    header {
        padding: 40px 0;
    }
    
    main {
        padding: 40px 0;
    }
    
    .card {
        padding: 20px;
    }
}

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

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

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* 选择文本样式 */
::selection {
    background: #222;
    color: white;
}

::-moz-selection {
    background: #222;
    color: white;
}
