/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --primary-dark: #1e40af;
    --secondary-color: #7c3aed;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f9fafb;
    --bg-white: #ffffff;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

body {
    font-family: 'Inter', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    background-color: var(--bg-white);
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    padding: 1rem 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: -0.5px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-menu a:hover {
    color: var(--primary-color);
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
}

.nav-menu a:hover::after {
    width: 100%;
}

.nav-menu a.active {
    color: var(--primary-color);
}

.nav-menu a.active::after {
    width: 100%;
}

.lang-toggle {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
}

.lang-toggle:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

/* Language Toggle */
/* Default: English */
.lang-zh {
    display: none;
}

.lang-en {
    display: block;
}

/* When body has lang-en class (English mode) */
body.lang-en .lang-zh {
    display: none;
}

body.lang-en .lang-en {
    display: block;
}

/* When body does NOT have lang-en class (Chinese mode) */
body:not(.lang-en) .lang-zh {
    display: block;
}

body:not(.lang-en) .lang-en {
    display: none;
}

/* Hero Section */
.hero {
    margin-top: 80px;
    padding: 6rem 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="100" height="100" patternUnits="userSpaceOnUse"><path d="M 100 0 L 0 0 0 100" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero-image {
    margin-bottom: 2rem;
}

.profile-photo {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.profile-photo:hover {
    transform: scale(1.05);
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
    letter-spacing: -1px;
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.hero-intro {
    font-size: 1.125rem;
    margin-bottom: 2rem;
    line-height: 1.8;
    opacity: 0.9;
}

.hero-audience {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    padding: 1.5rem;
    border-radius: 12px;
    margin-top: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-audience strong {
    font-weight: 600;
}

/* Section Styles */
section {
    padding: 5rem 0;
}

section:not(.hero) {
    margin-top: 80px;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-dark);
    position: relative;
    padding-bottom: 1rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

/* About Section */
.about {
    background: var(--bg-light);
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.about-card {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.about-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.about-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.about-card.full-width {
    grid-column: 1 / -1;
}

.education-item h4 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.education-item p {
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1rem;
}

.skill-item {
    background: var(--bg-light);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
    color: var(--text-dark);
    transition: var(--transition);
}

.skill-item:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.05);
}

.language-item {
    padding: 0.75rem 0;
    font-size: 1.125rem;
    color: var(--text-dark);
    border-bottom: 1px solid var(--border-color);
}

.language-item:last-child {
    border-bottom: none;
}

/* Experience Section */
.campus,
.internship {
    background: var(--bg-white);
}

.experience-list {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.experience-card {
    background: var(--bg-white);
    border: 2px solid var(--border-color);
    border-radius: 16px;
    padding: 2.5rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.experience-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--primary-color), var(--secondary-color));
    transition: var(--transition);
}

.experience-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-lg);
    transform: translateX(5px);
}

.experience-card:hover::before {
    width: 6px;
}

.experience-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.experience-header h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-dark);
    flex: 1;
    min-width: 200px;
}

.experience-date {
    background: var(--bg-light);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 500;
    color: var(--primary-color);
    white-space: nowrap;
}

.experience-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.experience-content > div {
    padding: 1.5rem;
    background: var(--bg-light);
    border-radius: 10px;
    border-left: 3px solid var(--primary-color);
}

.experience-content h4 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--primary-color);
}

.experience-content p {
    color: var(--text-light);
    line-height: 1.7;
}

.visual {
    margin-top: 1rem;
}

.chart-placeholder {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    min-height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chart-placeholder p {
    color: white;
    font-weight: 500;
}

.experience-image {
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    object-fit: cover;
}

.experience-image:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.experience-images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.experience-images-grid .experience-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

/* Footer */
.footer {
    background: var(--text-dark);
    color: white;
    padding: 3rem 0;
    text-align: center;
}

.footer p {
    margin-bottom: 1rem;
    opacity: 0.9;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.copyright {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0.7;
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.25rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .about-grid {
        grid-template-columns: 1fr;
    }

    .experience-header {
        flex-direction: column;
    }

    .experience-date {
        align-self: flex-start;
    }

    .skills-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }

    .profile-photo {
        width: 150px;
        height: 150px;
    }

    .experience-images-grid {
        grid-template-columns: 1fr;
    }

    .experience-images-grid .experience-image {
        height: 250px;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 4rem 0;
    }

    .hero-title {
        font-size: 2rem;
    }

    .container {
        padding: 0 15px;
    }

    .experience-card {
        padding: 1.5rem;
    }

    .profile-photo {
        width: 120px;
        height: 120px;
    }

    .experience-images-grid .experience-image {
        height: 200px;
    }
}

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
}

/* Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.experience-card,
.about-card {
    animation: fadeInUp 0.6s ease-out;
}

