/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #ffffff;
}

/* Chinese font support */
body[lang="zh-CN"] {
    font-family: 'Noto Sans SC', 'Inter', sans-serif;
}

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

/* Header and Navigation */
header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

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

.logo h2 {
    color: #2563eb;
    font-weight: 600;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-menu a:hover {
    color: #2563eb;
}

/* Language Switcher */
.language-switcher {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: 1rem;
    padding-left: 1rem;
    border-left: 1px solid #e5e7eb;
}

.lang-btn {
    text-decoration: none;
    color: #6b7280;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.lang-btn:hover {
    color: #2563eb;
    background-color: #f3f4f6;
}

.lang-btn.active {
    color: #2563eb;
    background-color: #e0e7ff;
    font-weight: 600;
}

.lang-separator {
    color: #d1d5db;
    font-size: 0.8rem;
}

/* Hero Section */
#hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    min-height: 100vh;
    display: flex;
    align-items: center;
    text-align: center;
    padding: 0 20px;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    opacity: 0;
    animation: fadeInUp 1s ease forwards;
}

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

.hero-description {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0;
    animation: fadeInUp 1s ease 0.4s forwards;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    opacity: 0;
    animation: fadeInUp 1s ease 0.6s forwards;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.btn-primary {
    background: #2563eb;
    color: white;
    border-color: #2563eb;
}

.btn-primary:hover {
    background: #1d4ed8;
    border-color: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.3);
}

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

.btn-secondary:hover {
    background: white;
    color: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(255, 255, 255, 0.3);
}

.btn-small {
    padding: 8px 20px;
    font-size: 0.9rem;
}

.btn-outline {
    background: transparent;
    color: #2563eb;
    border-color: #2563eb;
}

.btn-outline:hover {
    background: #2563eb;
    color: white;
}

/* Sections */
section {
    padding: 80px 0;
}

section h2 {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 3rem;
    color: #1f2937;
}

/* About Section */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.about-left {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.profile-photo {
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
}

.profile-img {
    max-width: 260px;
    max-height: 325px;
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: block;
    margin: 0 auto;
}

.profile-img:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

.about-text p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    line-height: 1.8;
    color: #4b5563;
}

.skills h3 {
    margin-bottom: 1.5rem;
    color: #1f2937;
}

.skills-section {
    margin-bottom: 1.5rem;
}

.skills-section h4 {
    margin-bottom: 0.8rem;
    color: #374151;
    font-size: 1rem;
    font-weight: 600;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    background: #e0e7ff;
    color: #3730a3;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Timeline */
.timeline {
    max-width: 800px;
    margin: 0 auto;
}

/* Honors Grid */
.honors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.honor-item {
    background: #f9fafb;
    border-radius: 10px;
    padding: 1.5rem;
    border-left: 4px solid #2563eb;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.honor-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.honor-item h3 {
    color: #2563eb;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.honor-item p {
    color: #4b5563;
    line-height: 1.6;
    margin: 0;
}

.timeline-item {
    background: #f9fafb;
    border-radius: 10px;
    padding: 2rem;
    margin-bottom: 2rem;
    border-left: 4px solid #2563eb;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.timeline-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.timeline-content h3 {
    color: #1f2937;
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}

.timeline-subtitle {
    color: #2563eb;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.timeline-date {
    color: #6b7280;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

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

.project-card {
    background: #f9fafb;
    border-radius: 15px;
    padding: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #e5e7eb;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.project-card h3 {
    color: #1f2937;
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}

.project-subtitle {
    color: #2563eb;
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.project-date {
    color: #6b7280;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    font-style: italic;
}

.project-card p {
    color: #4b5563;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.project-links {
    display: flex;
    gap: 1rem;
}

/* Contact Section */
#contact {
    background: #f9fafb;
}

.contact-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.contact-content p {
    font-size: 1.2rem;
    color: #4b5563;
    margin-bottom: 2rem;
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: #2563eb;
    font-weight: 500;
    padding: 1rem 2rem;
    border: 2px solid #2563eb;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.contact-link:hover {
    background: #2563eb;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.3);
}

/* Footer */
footer {
    background: #1f2937;
    color: white;
    text-align: center;
    padding: 2rem 0;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-container {
        position: relative;
    }
    
    .nav-menu {
        display: none;
    }
    
    .language-switcher {
        display: flex !important;
        position: absolute;
        top: 50%;
        right: 0;
        transform: translateY(-50%);
        margin-left: 0;
        padding-left: 0;
        border-left: none;
        background: rgba(255, 255, 255, 0.9);
        padding: 0.5rem;
        border-radius: 8px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .about-left {
        text-align: center;
    }
    
    .profile-photo {
        justify-content: center;
        margin-bottom: 1.5rem;
    }
    
    .profile-img {
        max-width: 140px;
        max-height: 175px;
    }

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

    .contact-links {
        flex-direction: column;
        align-items: center;
    }

    section {
        padding: 60px 0;
    }

    section h2 {
        font-size: 2rem;
    }
}

/* 平板设备优化 */
@media (max-width: 768px) {
    .profile-img {
        max-width: 190px;
        max-height: 240px;
    }
}

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

    .hero-content h1 {
        font-size: 2rem;
    }
    
    .profile-img {
        max-width: 170px;
        max-height: 215px;
    }

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