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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: #2c3e50;
    overflow-x: hidden;
}

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

/* 导航栏 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(52, 152, 219, 0.1);
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo-text {
    font-size: 24px;
    font-weight: 700;
    color: #2c3e50;
    background: linear-gradient(135deg, #3498db, #9b59b6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.nav-link {
    text-decoration: none;
    color: #2c3e50;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: #3498db;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(135deg, #3498db, #9b59b6);
    transition: width 0.3s ease;
}

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

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background: #2c3e50;
    margin: 3px 0;
    transition: 0.3s;
}

/* 主页区域 */
.hero {
    height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.geometric-shape {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    animation: float 6s ease-in-out infinite;
}

.shape-1 {
    width: 200px;
    height: 200px;
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.shape-2 {
    width: 150px;
    height: 150px;
    top: 60%;
    right: 15%;
    animation-delay: 2s;
}

.shape-3 {
    width: 100px;
    height: 100px;
    bottom: 20%;
    left: 20%;
    animation-delay: 4s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

.hero-content {
    text-align: center;
    color: white;
    z-index: 2;
    position: relative;
    max-width: 800px;
    padding: 0 20px;
}

.hero-title {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 20px;
    opacity: 0;
    animation: fadeInUp 1s ease 0.5s forwards;
}

.typewriter {
    border-right: 3px solid white;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { border-color: white; }
    51%, 100% { border-color: transparent; }
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 20px;
    opacity: 0;
    animation: fadeInUp 1s ease 1s forwards;
}

.hero-description {
    font-size: 1.1rem;
    margin-bottom: 30px;
    opacity: 0;
    animation: fadeInUp 1s ease 1.5s forwards;
    line-height: 1.8;
}

.hero-contact {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 40px;
    opacity: 0;
    animation: fadeInUp 1s ease 2s forwards;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
}

.contact-item i {
    font-size: 1.2rem;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    opacity: 0;
    animation: fadeInUp 1s ease 2.5s forwards;
}

.btn {
    padding: 15px 30px;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    display: inline-block;
}

.btn-primary {
    background: linear-gradient(135deg, #e67e22, #f39c12);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(230, 126, 34, 0.3);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover {
    background: white;
    color: #2c3e50;
    transform: translateY(-3px);
}

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

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}

.scroll-arrow {
    width: 30px;
    height: 30px;
    border: 2px solid white;
    border-top: none;
    border-right: none;
    transform: rotate(-45deg);
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0) rotate(-45deg); }
    40% { transform: translateY(-10px) rotate(-45deg); }
    60% { transform: translateY(-5px) rotate(-45deg); }
}

/* 通用部分样式 */
section {
    padding: 100px 0;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 60px;
    color: #2c3e50;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(135deg, #3498db, #9b59b6);
    border-radius: 2px;
}

/* 教育背景 */
.education {
    background: #f8f9fa;
}

.timeline {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 100%;
    background: linear-gradient(135deg, #3498db, #9b59b6);
    border-radius: 2px;
}

.timeline-item {
    display: flex;
    justify-content: flex-end;
    padding-right: 30px;
    position: relative;
    margin: 50px 0;
    width: 50%;
}

.timeline-item:nth-child(odd) {
    align-self: flex-end;
    justify-content: flex-start;
    padding-left: 30px;
    padding-right: 0;
}

.timeline-marker {
    position: absolute;
    top: 0;
    right: -12px;
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, #3498db, #9b59b6);
    border-radius: 50%;
    border: 4px solid white;
    box-shadow: 0 0 0 4px rgba(52, 152, 219, 0.2);
}

.timeline-item:nth-child(odd) .timeline-marker {
    left: -12px;
    right: auto;
}

.timeline-content {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.timeline-content:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.timeline-period {
    color: #3498db;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.timeline-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 5px;
}

.timeline-subtitle {
    color: #7f8c8d;
    font-size: 0.95rem;
    margin-bottom: 10px;
}

.timeline-degree {
    color: #2c3e50;
    font-weight: 600;
}

/* 项目经历 */
.projects {
    background: white;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.project-card {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid rgba(52, 152, 219, 0.1);
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.project-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #2c3e50;
    flex: 1;
    margin-right: 20px;
}

.project-period {
    color: #3498db;
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
}

.project-description {
    color: #7f8c8d;
    margin-bottom: 20px;
    line-height: 1.7;
}

.project-highlights {
    list-style: none;
    margin-bottom: 25px;
}

.project-highlights li {
    position: relative;
    padding-left: 25px;
    margin-bottom: 10px;
    color: #2c3e50;
    line-height: 1.6;
}

.project-highlights li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: #3498db;
    font-weight: bold;
}

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

.tag {
    background: linear-gradient(135deg, #3498db, #9b59b6);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.project-link a {
    color: #3498db;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.project-link a:hover {
    color: #2980b9;
    transform: translateX(5px);
}

/* 技能部分 */
.skills {
    background: #f8f9fa;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    margin-top: 40px;
}

.skill-category {
    background: white;
    padding: 40px 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.skill-category:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.skill-category-title {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 1.3rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 30px;
}

.skill-category-title i {
    font-size: 1.5rem;
    color: #3498db;
}

.skill-item {
    margin-bottom: 25px;
}

.skill-name {
    display: block;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 10px;
}

.skill-bar {
    height: 8px;
    background: #ecf0f1;
    border-radius: 4px;
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    background: linear-gradient(135deg, #3498db, #9b59b6);
    border-radius: 4px;
    width: 0;
    transition: width 2s ease;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.skill-tag {
    background: #ecf0f1;
    color: #2c3e50;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.skill-tag:hover {
    background: linear-gradient(135deg, #3498db, #9b59b6);
    color: white;
    transform: translateY(-2px);
}

/* 联系方式 */
.contact {
    background: white;
}

.contact-content-simple {
    display: flex;
    justify-content: center;
    align-items: center;
}

.contact-info-centered {
    text-align: center;
    max-width: 600px;
}

.contact-info-centered h3 {
    font-size: 2rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 20px;
}

.contact-info-centered p {
    color: #7f8c8d;
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 40px;
}

.contact-details {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.contact-detail {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    min-width: 150px;
}

.contact-detail i {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #3498db, #9b59b6);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.contact-detail h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 5px;
}

.contact-detail p {
    color: #7f8c8d;
    margin: 0;
    font-size: 1rem;
}

/* 页脚 */
.footer {
    background: #2c3e50;
    color: white;
    padding: 40px 0;
    text-align: center;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.social-link {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: linear-gradient(135deg, #3498db, #9b59b6);
    transform: translateY(-3px);
}

/* AOS 动画 */
[data-aos] {
    opacity: 0;
    transition: all 0.6s ease;
}

[data-aos].aos-animate {
    opacity: 1;
}

[data-aos="fade-up"] {
    transform: translateY(30px);
}

[data-aos="fade-up"].aos-animate {
    transform: translateY(0);
}

[data-aos="fade-right"] {
    transform: translateX(-30px);
}

[data-aos="fade-right"].aos-animate {
    transform: translateX(0);
}

[data-aos="fade-left"] {
    transform: translateX(30px);
}

[data-aos="fade-left"].aos-animate {
    transform: translateX(0);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: white;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 20px 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-contact {
        flex-direction: column;
        gap: 15px;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .timeline::before {
        left: 20px;
    }

    .timeline-item {
        width: 100%;
        padding-left: 50px;
        padding-right: 0;
        justify-content: flex-start;
    }

    .timeline-item .timeline-marker {
        left: 8px;
        right: auto;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .project-header {
        flex-direction: column;
        gap: 10px;
    }

    .contact-details {
        flex-direction: column;
        gap: 30px;
        align-items: center;
    }

    .contact-detail {
        flex-direction: row;
        gap: 20px;
        min-width: auto;
    }

    .footer-content {
        flex-direction: column;
        gap: 20px;
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .hero-title {
        font-size: 2rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .project-card,
    .skill-category {
        padding: 20px;
    }
}

