/* Enhanced Base styles with vibrant academic color palette */
:root {
    /* Vibrant Academic Colors */
    --primary-color: #2C5F2D;      /* Deep forest green */
    --secondary-color: #1E2761;    /* Rich navy blue */
    --accent-color: #735DA5;       /* Royal purple */
    --vibrant-burgundy: #962E2A;   /* Warm burgundy */
    --deep-crimson: #330000;       /* Deep crimson */
    --sage-green: #31473A;         /* Sage green */
    
    /* Text Colors */
    --text-color: #2C3E50;         /* Deep charcoal */
    --text-color-light: #34495E;   /* Lighter charcoal */
    --text-muted: #7F8C8D;          /* Soft gray */
    --text-bright: #1A1A1A;        /* Near black for emphasis */
    
    /* Heading Colors */
    --heading-color: #1E2761;      /* Rich navy blue */
    --heading-secondary: #2C5F2D;  /* Forest green */
    --heading-accent: #735DA5;     /* Royal purple */
    
    /* Link Colors */
    --link-color: #2C5F2D;         /* Forest green */
    --link-hover: #1E2761;         /* Navy blue on hover */
    --link-accent: #735DA5;        /* Purple for special links */
    
    /* Background Colors */
    --background-color: #ffffff;
    --light-bg: #f8f9fa;
    --background-subtle: #f0f4f8;
    --background-accent: rgba(44, 95, 45, 0.05);
    
    /* Border & Shadow Colors */
    --border-color: #e1e8ed;
    --border-color-light: #f1f3f4;
    --shadow-light: 0 2px 12px rgba(30, 39, 97, 0.08);
    --shadow-medium: 0 4px 24px rgba(30, 39, 97, 0.12);
    --shadow-vibrant: 0 6px 20px rgba(44, 95, 45, 0.15);
    
    /* Gradient Colors */
    --gradient-primary: linear-gradient(135deg, #2C5F2D 0%, #31473A 100%);
    --gradient-secondary: linear-gradient(135deg, #1E2761 0%, #735DA5 100%);
    --gradient-accent: linear-gradient(135deg, #962E2A 0%, #330000 100%);
    --gradient-sage: linear-gradient(135deg, #31473A 0%, #2C5F2D 100%);
    --gradient-footer: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.7;
    color: var(--text-color);
    background-color: var(--background-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--heading-color);
    line-height: 1.3;
    margin: 2rem 0 1rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    text-align: center;
}

h1 {
    color: var(--heading-color);
    background: var(--gradient-secondary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

h2 {
    color: var(--heading-secondary);
}

h3 {
    color: var(--heading-accent);
    font-size: 2.5rem;
}

h4 {
    color: var(--vibrant-burgundy);
}

h5 {
    color: var(--sage-green);
}

h6 {
    color: var(--secondary-color);
}

a {
    color: var(--link-color);
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
    position: relative;
}

a:hover {
    color: var(--link-hover);
    text-decoration: none;
}

/* Enhanced link hover effects */
a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: width 0.3s ease;
}

a:hover::after {
    width: 100%;
}

/* Special link styles */
.link-accent {
    color: var(--link-accent);
}

.link-accent:hover {
    color: var(--primary-color);
}

/* Header styles */
.site-header {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: var(--shadow-light);
    transition: all 0.3s ease;
}

.site-header.scrolled {
    box-shadow: var(--shadow-medium);
    background: rgba(255, 255, 255, 0.95);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 3rem;
    position: relative;
}

.site-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--heading-color);
    text-decoration: none;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.main-nav {
    display: flex;
    gap: 2rem;
    align-items: center;
    justify-content: center;
}

.main-nav a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 700;
    font-size: 1.05rem;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    transition: all 0.3s ease;
    position: relative;
}

.main-nav a::after {
    display: none;
}

.main-nav a:hover {
    background: var(--background-accent);
    color: var(--primary-color);
    transform: translateY(-2px);
}

.main-nav a.active {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-light);
}

.main-nav a.active:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

/* Emphasize Chinese navigation text */
html[lang="zh"] .main-nav a {
    font-weight: 800;
}

/* Global language toggle */
.lang-toggle {
    margin-left: 0;
    position: absolute;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
}

.lang-btn {
    padding: 0.5rem 1rem;
    border: 2px solid var(--border-color);
    background: #ffffff;
    color: var(--text-color);
    text-decoration: none;
    border-radius: 9999px;
    font-size: 0.9rem;
    font-weight: 700;
    transition: all 0.3s ease;
}

.lang-btn:hover {
    background: var(--gradient-secondary);
    color: #ffffff;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: var(--shadow-light);
}

.lang-btn::after {
    display: none;
}

/* Content styles */
.content {
    flex: 1;
    padding: 2rem 0;
}

.content-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Footer styles */
.site-footer {
    background: var(--gradient-footer);
    border-top: 1px solid var(--border-color);
    padding: 3rem 0 2rem;
    margin-top: auto;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    text-align: center;
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.social-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--sage-green) 100%);
    color: white;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1.2rem;
    box-shadow: var(--shadow-light);
}

.social-icons a:hover {
    transform: translateY(-3px) scale(1.1);
    box-shadow: var(--shadow-vibrant);
}

.social-icons a::after {
    display: none;
}

.copyright {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

.copyright a {
    color: var(--primary-color);
    text-decoration: none;
}

.copyright a:hover {
    color: var(--secondary-color);
}

/* Enhanced button styles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 9999px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    position: relative;
    overflow: hidden;
}

.btn::after {
    display: none;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-light);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
    color: white;
}

.btn-secondary {
    background: var(--gradient-secondary);
    color: white;
    box-shadow: var(--shadow-light);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
    color: white;
}

.btn-accent {
    background: var(--gradient-accent);
    color: white;
    box-shadow: var(--shadow-light);
}

.btn-accent:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
    color: white;
}

/* Card styles */
.card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 16px;
    padding: 2rem;
    border: 2px solid transparent;
    box-shadow: var(--shadow-light);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
}

.card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-vibrant);
    border-color: rgba(44, 95, 45, 0.2);
}

/* Responsive design */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 1rem;
        padding: 0 1rem;
        justify-content: center;
    }
    
    .main-nav {
        gap: 1rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    .lang-toggle {
        position: static;
        transform: none;
        margin-left: 0;
    }
    
    .main-nav a {
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
    }
    
    .content-wrapper {
        padding: 0 1rem;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    .social-icons {
        gap: 1rem;
    }
    
    .social-icons a {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .site-title {
        font-size: 1.4rem;
    }
    
    .main-nav {
        gap: 0.5rem;
    }
    
    .main-nav a {
        padding: 0.3rem 0.6rem;
        font-size: 0.85rem;
    }
    
    .content {
        padding: 1rem 0;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    h2 {
        font-size: 1.3rem;
    }
    
    .btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
    
    .card {
        padding: 1.5rem;
    }
}

/* Animation utilities */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Loading animation */
@keyframes shimmer {
    0% { background-position: -200px 0; }
    100% { background-position: calc(200px + 100%) 0; }
}

.loading-shimmer {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200px 100%;
    animation: shimmer 1.5s infinite;
}

/* Print styles */
@media print {
    .site-header,
    .site-footer,
    .social-icons {
        display: none;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
    }
    
    h1, h2, h3 {
        page-break-after: avoid;
    }
}
