/* ========================================
   CSS Variables & Base Styles
   ======================================== */
:root {
    --primary: #1a1f36;
    --primary-light: #2d3454;
    --accent: #6366f1;
    --accent-light: #818cf8;
    --gold: #d4af37;
    --gold-light: #f0d77a;
    --text: #1a1f36;
    --text-light: #64748b;
    --text-muted: #94a3b8;
    --bg: #ffffff;
    --bg-alt: #f8fafc;
    --bg-dark: #1a1f36;
    --border: #e2e8f0;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.7;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ========================================
   Navigation
   ======================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    transition: var(--transition);
}

.navbar.scrolled {
    box-shadow: var(--shadow);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 72px;
}

.nav-logo {
    font-family: 'Noto Serif SC', serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    letter-spacing: 0.05em;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 32px;
}

.nav-menu a {
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: var(--transition);
}

.nav-menu a:hover {
    color: var(--primary);
}

.nav-menu a:hover::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--primary);
    transition: var(--transition);
}

/* ========================================
   Hero Section
   ======================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 120px 24px 80px;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 50%, #f1f5f9 100%);
    z-index: -2;
}

.hero-bg::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 80%;
    height: 150%;
    background: radial-gradient(ellipse, rgba(99, 102, 241, 0.08) 0%, transparent 70%);
    animation: float 20s ease-in-out infinite;
}

.hero-bg::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 60%;
    height: 100%;
    background: radial-gradient(ellipse, rgba(212, 175, 55, 0.06) 0%, transparent 70%);
    animation: float 15s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(30px, -30px) rotate(2deg); }
    66% { transform: translate(-20px, 20px) rotate(-2deg); }
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 80px;
    align-items: center;
}

.hero-image-wrapper {
    position: relative;
}

.hero-image {
    width: 280px;
    height: 350px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    position: relative;
    z-index: 1;
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.placeholder-avatar {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    letter-spacing: 0.1em;
}

.hero-image-decoration {
    position: absolute;
    top: 20px;
    left: 20px;
    right: -20px;
    bottom: -20px;
    border: 2px solid var(--gold);
    border-radius: 20px;
    z-index: 0;
    opacity: 0.5;
}

.hero-text {
    max-width: 600px;
}

.hero-subtitle {
    color: var(--accent);
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    margin-bottom: 16px;
    text-transform: uppercase;
}

.hero-title {
    font-family: 'Noto Serif SC', serif;
    font-size: 4rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 24px;
    letter-spacing: 0.2em;
    line-height: 1.2;
}

.hero-description {
    color: var(--text-light);
    font-size: 1.1rem;
    line-height: 1.9;
    margin-bottom: 32px;
}

.hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 40px;
}

.tag {
    padding: 8px 16px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 100px;
    font-size: 0.85rem;
    color: var(--text-light);
    transition: var(--transition);
}

.tag:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
}

.hero-cta {
    display: inline-block;
    padding: 16px 40px;
    background: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: 100px;
    font-weight: 500;
    letter-spacing: 0.05em;
    transition: var(--transition);
    box-shadow: 0 4px 14px rgba(26, 31, 54, 0.3);
}

.hero-cta:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(26, 31, 54, 0.4);
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.8rem;
    animation: bounce 2s infinite;
}

.mouse {
    width: 24px;
    height: 40px;
    border: 2px solid var(--text-muted);
    border-radius: 12px;
    position: relative;
}

.wheel {
    width: 4px;
    height: 8px;
    background: var(--text-muted);
    border-radius: 2px;
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(10px); }
}

@keyframes scroll {
    0% { opacity: 1; top: 8px; }
    100% { opacity: 0; top: 20px; }
}

/* ========================================
   Section Common Styles
   ======================================== */
.section {
    padding: 100px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title .title-en {
    display: block;
    font-size: 0.75rem;
    letter-spacing: 0.3em;
    color: var(--accent);
    font-weight: 500;
    margin-bottom: 8px;
}

.section-title .title-zh {
    display: block;
    font-family: 'Noto Serif SC', serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
}

.section-title.light .title-en {
    color: var(--gold-light);
}

.section-title.light .title-zh {
    color: white;
}

/* ========================================
   Education Section
   ======================================== */
.education {
    background: var(--bg-alt);
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto 40px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--accent), var(--gold));
}

.timeline-item {
    position: relative;
    padding-left: 40px;
    padding-bottom: 40px;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-marker {
    position: absolute;
    left: -6px;
    top: 0;
    width: 14px;
    height: 14px;
    background: white;
    border: 3px solid var(--accent);
    border-radius: 50%;
    transition: var(--transition);
}

.timeline-item:hover .timeline-marker {
    transform: scale(1.3);
    background: var(--accent);
}

.timeline-content {
    background: white;
    padding: 24px 32px;
    border-radius: 16px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.timeline-item:hover .timeline-content {
    transform: translateX(10px);
    box-shadow: var(--shadow-lg);
}

.timeline-date {
    font-size: 0.85rem;
    color: var(--accent);
    font-weight: 500;
    margin-bottom: 8px;
}

.timeline-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.timeline-subtitle {
    color: var(--text-light);
    margin-bottom: 8px;
}

.timeline-description {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.courses-card {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    padding: 32px;
    border-radius: 16px;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--gold);
}

.courses-card h4 {
    font-size: 1rem;
    color: var(--gold);
    margin-bottom: 12px;
    font-weight: 600;
}

.courses-card p {
    color: var(--text-light);
    line-height: 1.8;
}

/* ========================================
   Experience Section
   ======================================== */
.experience-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}

.experience-card {
    background: white;
    padding: 32px;
    border-radius: 16px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border-top: 3px solid transparent;
}

.experience-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-top-color: var(--accent);
}

.experience-icon {
    font-size: 2rem;
    margin-bottom: 16px;
}

.experience-date {
    font-size: 0.8rem;
    color: var(--accent);
    font-weight: 500;
    margin-bottom: 12px;
}

.experience-card h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.experience-card p {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* ========================================
   Skills Section
   ======================================== */
.skills {
    background: var(--bg-alt);
}

.skills-section {
    margin-bottom: 60px;
}

.skills-section:last-child {
    margin-bottom: 0;
}

.skills-subtitle {
    font-size: 1.2rem;
    color: var(--primary);
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border);
    display: inline-block;
}

.certificates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.certificate-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.certificate-item:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow-lg);
}

.certificate-icon {
    font-size: 1.5rem;
}

.certificate-item span {
    font-size: 0.95rem;
    color: var(--text);
}

.awards-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.award-item {
    display: flex;
    gap: 24px;
    padding: 24px;
    background: white;
    border-radius: 16px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.award-item:hover {
    transform: translateX(10px);
    box-shadow: var(--shadow-lg);
}

.award-year {
    font-family: 'Noto Serif SC', serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent);
    min-width: 100px;
}

.award-content h4 {
    font-size: 1rem;
    margin-bottom: 4px;
}

.award-content p {
    color: var(--gold);
    font-size: 0.9rem;
    font-weight: 500;
}

.activities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.activity-card {
    background: white;
    padding: 28px;
    border-radius: 16px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.activity-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.activity-card h4 {
    font-size: 1rem;
    color: var(--accent);
    margin-bottom: 16px;
}

.activity-card ul {
    list-style: none;
}

.activity-card li {
    position: relative;
    padding-left: 16px;
    margin-bottom: 12px;
    color: var(--text-light);
    font-size: 0.9rem;
    line-height: 1.6;
}

.activity-card li:last-child {
    margin-bottom: 0;
}

.activity-card li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 6px;
    height: 6px;
    background: var(--gold);
    border-radius: 50%;
}

/* ========================================
   Portfolio Section
   ======================================== */
.portfolio {
    background: white;
}

.portfolio-intro {
    text-align: center;
    color: var(--text-light);
    margin-top: -40px;
    margin-bottom: 48px;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 32px;
}

.portfolio-item {
    background: var(--bg-alt);
    border-radius: 20px;
    overflow: hidden;
    transition: var(--transition);
}

.portfolio-item:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.video-placeholder {
    aspect-ratio: 16/9;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    color: white;
    position: relative;
    overflow: hidden;
}

.video-placeholder::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(255,255,255,0.1) 0%, transparent 70%);
}

.play-button {
    width: 64px;
    height: 64px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    cursor: pointer;
}

.play-button svg {
    width: 24px;
    height: 24px;
    margin-left: 4px;
}

.portfolio-item:hover .play-button {
    background: var(--gold);
    transform: scale(1.1);
}

.video-placeholder span {
    font-size: 0.9rem;
    opacity: 0.8;
}

.portfolio-info {
    padding: 24px;
}

.portfolio-info h4 {
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.portfolio-info p {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Video embed styles */
.video-container {
    aspect-ratio: 16/9;
    position: relative;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* ========================================
   Contact Section
   ======================================== */
.contact {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
}

.contact-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 32px;
    border-radius: 16px;
    text-align: center;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.contact-card:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-5px);
}

.contact-icon {
    font-size: 2rem;
    margin-bottom: 16px;
}

.contact-card h4 {
    font-size: 0.85rem;
    color: var(--gold-light);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.contact-card p {
    font-size: 1rem;
}

/* ========================================
   Footer
   ======================================== */
.footer {
    background: var(--bg-dark);
    color: white;
    text-align: center;
    padding: 40px 24px;
}

.footer p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-quote {
    margin-top: 16px;
    font-style: italic;
    opacity: 0.7;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ========================================
   Animations
   ======================================== */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeIn 0.8s ease forwards;
}

.fade-in:nth-child(1) { animation-delay: 0.1s; }
.fade-in:nth-child(2) { animation-delay: 0.2s; }
.fade-in:nth-child(3) { animation-delay: 0.3s; }
.fade-in:nth-child(4) { animation-delay: 0.4s; }
.fade-in:nth-child(5) { animation-delay: 0.5s; }

@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

[data-aos="fade-up"] {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

[data-aos="fade-up"].aos-animate {
    opacity: 1;
    transform: translateY(0);
}

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 968px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 48px;
    }

    .hero-image-wrapper {
        margin: 0 auto;
    }

    .hero-title {
        font-size: 3rem;
    }

    .hero-tags {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 72px;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 24px;
        gap: 16px;
        border-bottom: 1px solid var(--border);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: var(--transition);
    }

    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    .hero {
        padding-top: 100px;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-image {
        width: 220px;
        height: 280px;
    }

    .section {
        padding: 60px 0;
    }

    .section-title .title-zh {
        font-size: 2rem;
    }

    .timeline::before {
        left: 0;
    }

    .award-item {
        flex-direction: column;
        gap: 12px;
    }

    .award-year {
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .tag {
        padding: 6px 12px;
        font-size: 0.8rem;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
    }
}
