/* 全局变量定义 - 便于整体风格调整 */
:root {
    --primary: #3498db;
    --primary-dark: #2980b9;
    --secondary: #f1f5f9;
    --text-dark: #2c3e50;
    --text-light: #64748b;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --radius: 8px;
    --transition: all 0.3s ease;
}

/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Inter", system-ui, -apple-system, sans-serif;
}

body {
    background-color: #f8fafc;
    color: var(--text-dark);
    line-height: 1.6;
    font-size: 16px;
    padding-top: 70px; /* 避免内容被固定导航遮挡 */
}

/* 容器样式 - 统一页面宽度 */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* 图片基础样式 */
img {
    max-width: 100%;
    display: block;
    height: auto;
}

/* 链接样式 */
a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

a:hover {
    color: var(--primary);
}

/* 标题样式 */
h1, h2, h3, h4 {
    color: var(--text-dark);
    margin-bottom: 1rem;
    line-height: 1.3;
}

h2.section-title {
    font-size: 28px;
    margin: 60px 0 40px;
    text-align: center;
    position: relative;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

h2.section-title.visible {
    opacity: 1;
    transform: translateY(0);
}

h2.section-title::after {
    content: "";
    display: block;
    width: 60px;
    height: 3px;
    background-color: var(--primary);
    margin: 10px auto 0;
    border-radius: 3px;
}

/* 导航栏样式 - 固定在顶部 */
header {
    background: #fff;
    box-shadow: var(--shadow);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.nav-logo {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-dark);
}

.nav-menu {
    display: flex;
    gap: 30px;
}

.nav-menu a {
    font-weight: 500;
    color: var(--text-light);
    position: relative;
    padding: 5px 0;
}

.nav-menu a::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary);
    transition: width 0.3s;
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
    width: 100%;
}

.nav-menu a.active {
    color: var(--primary);
    font-weight: 600;
}

.mobile-menu-btn {
    display: none;
    font-size: 24px;
    cursor: pointer;
    background: none;
    border: none;
    color: var(--text-dark);
}

/* 首页Banner样式 */
.banner {
    padding: 80px 0;
    background-color: var(--secondary);
    margin-bottom: 60px;
    border-radius: 0 0 15px 15px;
}

.banner-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.banner-text h1 {
    font-size: 32px;
    margin-bottom: 20px;
}

.banner-text p {
    color: var(--text-light);
    margin-bottom: 15px;
    font-size: 17px;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0;
}

.skill-tag {
    background: #fff;
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 14px;
    box-shadow: var(--shadow);
}

.banner-img {
    border-radius: 50%;
    margin: 0 auto;
    border: 8px solid #fff;
    box-shadow: var(--shadow);
    width: 280px;
    height: 280px;
    object-fit: cover;
}

/* 快速导航样式 */
.quick-nav-section {
    margin-bottom: 80px;
}

.quick-nav {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
}

.quick-nav-item {
    background: #fff;
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-align: center;
    transition: var(--transition);
}

.quick-nav-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.quick-nav-icon {
    font-size: 32px;
    margin-bottom: 15px;
    color: var(--primary);
}

.quick-nav-item a {
    font-weight: 500;
    font-size: 18px;
}

/* 技能标签云样式 */
.skills-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    padding: 40px;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 60px;
}

.skill-cloud-tag {
    padding: 10px 20px;
    background: var(--secondary);
    border-radius: 30px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0;
    transform: scale(0.8);
    animation: fadeIn 0.5s forwards;
}

/* 标签云动画延迟 */
.skill-cloud-tag:nth-child(1) { animation-delay: 0.1s; }
.skill-cloud-tag:nth-child(2) { animation-delay: 0.2s; }
.skill-cloud-tag:nth-child(3) { animation-delay: 0.3s; }
.skill-cloud-tag:nth-child(4) { animation-delay: 0.4s; }
.skill-cloud-tag:nth-child(5) { animation-delay: 0.5s; }
.skill-cloud-tag:nth-child(6) { animation-delay: 0.6s; }
.skill-cloud-tag:nth-child(7) { animation-delay: 0.7s; }
.skill-cloud-tag:nth-child(8) { animation-delay: 0.8s; }
.skill-cloud-tag:nth-child(9) { animation-delay: 0.9s; }
.skill-cloud-tag:nth-child(10) { animation-delay: 1s; }

.skill-cloud-tag:hover {
    background: var(--primary);
    color: white;
    transform: scale(1.1) rotate(3deg);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
}

/* 技能卡片样式 */
.skills-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 60px;
}

.skill-card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 30px;
    transition: all 0.4s ease;
}

.skill-card.visible {
    animation: fadeInUp 0.6s ease forwards;
}

.skill-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.skill-card h3 {
    font-size: 20px;
    margin-bottom: 20px;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.skill-card ul {
    list-style: none;
}

.skill-card li {
    margin-bottom: 12px;
    padding-left: 25px;
    position: relative;
}

.skill-card li::before {
    content: "•";
    color: var(--primary);
    font-size: 20px;
    position: absolute;
    left: 0;
    top: -5px;
}

/* 项目卡片样式 */
.projects-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    padding: 20px 0;
}

.project-card {
    background: #fff;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.4s ease;
}

.project-card.visible {
    animation: fadeInUp 0.6s ease forwards;
}

.project-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.project-img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.project-content {
    padding: 25px;
}

.project-title {
    font-size: 19px;
    margin-bottom: 12px;
    color: var(--text-dark);
}

.project-role {
    color: var(--text-light);
    margin-bottom: 15px;
    font-size: 14px;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.tech-tag {
    background: var(--secondary);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 13px;
}

.project-desc {
    color: var(--text-light);
    margin-bottom: 15px;
    line-height: 1.6;
}

.detail-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}

.detail-btn:hover {
    background: var(--primary-dark);
}

.project-details {
    display: none;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--secondary);
    color: var(--text-light);
    line-height: 1.6;
}

/* 时间轴样式 */
.timeline {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 0;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 6px;
    background-color: var(--secondary);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -3px;
    border-radius: 3px;
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    width: 50%;
    box-sizing: border-box;
    margin-bottom: 30px;
}

.timeline-item.visible {
    animation: fadeInUp 0.6s ease forwards;
}

.timeline-item.left {
    left: 0;
}

.timeline-item.right {
    left: 50%;
}

.timeline-item::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background-color: white;
    border: 4px solid var(--primary);
    border-radius: 50%;
    top: 20px;
    z-index: 1;
}

.left::after {
    right: -13px;
}

.right::after {
    left: -13px;
}

.timeline-content {
    padding: 20px;
    background-color: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.timeline-date {
    color: var(--primary);
    font-weight: 500;
    margin-bottom: 8px;
    font-size: 14px;
}

.timeline-title {
    margin-bottom: 12px;
    color: var(--text-dark);
    font-size: 18px;
}

.timeline-desc p {
    color: var(--text-light);
    margin-bottom: 10px;
    line-height: 1.6;
}

/* 教育背景样式 */
.about-section .container {
    margin-bottom: 60px;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 40px;
    align-items: start;
}

.profile-card {
    padding: 25px;
    background: var(--secondary);
    border-radius: var(--radius);
    text-align: center;
}

.profile-img {
    margin: 0 auto 25px;
    border-radius: 50%;
    border: 6px solid #fff;
    width: 200px;
    height: 200px;
    object-fit: cover;
}

.profile-info h3 {
    font-size: 22px;
    margin-bottom: 15px;
    color: var(--text-dark);
}

.profile-info p {
    margin-bottom: 10px;
    font-size: 15px;
}

.profile-info p:nth-child(4) {
    color: var(--primary);
    font-weight: 500;
}

.skills-container {
    padding: 10px;
}

.skill-category {
    margin-bottom: 40px;
}

.skill-category h3 {
    font-size: 20px;
    margin-bottom: 20px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--secondary);
}

.skill-category ul {
    list-style: none;
    color: var(--text-light);
}

.skill-category li {
    margin-bottom: 15px;
    padding: 8px;
    background: rgba(241, 245, 249, 0.5);
    border-radius: 4px;
}

.skill-category li span {
    font-weight: 500;
    color: var(--text-dark);
}

.skill-category > div {
    background: rgba(241, 245, 249, 0.5);
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 15px;
}

.skill-category strong {
    color: var(--text-dark);
}

/* 奖项页面样式 */
.awards-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 60px;
}

.award-item {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 30px;
    transition: transform 0.3s ease;
}

.award-icon {
    font-size: 40px;
    margin-bottom: 20px;
    color: var(--primary);
}

.award-name {
    font-size: 18px;
    margin-bottom: 10px;
}

.award-date {
    color: var(--primary);
    margin-bottom: 15px;
    font-size: 14px;
}

/* 页脚样式 */
footer {
    background: var(--text-dark);
    color: white;
    padding: 40px 0;
    margin-top: 60px;
    border-radius: 15px 15px 0 0;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
}

.footer-col h3 {
    margin-bottom: 15px;
    font-size: 18px;
    color: white;
}

.footer-col p {
    margin-bottom: 8px;
    font-size: 14px;
    color: #ddd;
}

.footer-col a {
    color: #ddd;
}

.footer-col a:hover {
    color: var(--primary);
}

.copyright {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #445566;
    text-align: center;
    font-size: 13px;
    color: #aaa;
}

/* 动画定义 */
@keyframes fadeIn {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

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

/* 响应式设计 - 适配不同屏幕尺寸 */
@media (max-width: 992px) {
    .banner-content {
        grid-template-columns: 1fr;
    }
    
    .about-content {
        grid-template-columns: 1fr;
    }
    
    .profile-card {
        max-width: 300px;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        background: #fff;
        padding: 20px;
        box-shadow: var(--shadow);
        gap: 15px;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .timeline::after {
        left: 31px;
    }
    
    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
    }
    
    .timeline-item.right {
        left: 0;
    }
    
    .left::after, .right::after {
        left: 18px;
    }
    
    .projects-container {
        grid-template-columns: 1fr;
    }
    
    .banner {
        padding: 60px 0;
    }
    
    .banner-img {
        width: 220px;
        height: 220px;
    }
}

@media (max-width: 576px) {
    h2.section-title {
        font-size: 24px;
    }
    
    .quick-nav {
        grid-template-columns: 1fr 1fr;
    }
    
    .skill-cloud-tag {
        padding: 8px 15px;
        font-size: 14px;
    }

    body {
        padding-top: 60px;
    }

    .nav-logo {
        font-size: 18px;
    }
}