/* ===== CSS Variables ===== */
:root {
    --primary: #1a1f2e;
    --secondary: #f8f6f3;
    --accent: #c9a227;
    --accent-light: #e8d5a3;
    --text: #2d3748;
    --text-light: #718096;
    --border: #e2e8f0;
    --white: #ffffff;
    --shadow: rgba(0, 0, 0, 0.05);
    --max-width: 1400px;
    --transition: all 0.3s ease;
}

/* ===== Reset & Base ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', 'Noto Serif SC', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--secondary);
    color: var(--text);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

/* ===== Top Bar ===== */
.top-bar {
    height: 4px;
    background: linear-gradient(90deg, var(--accent) 0%, #d4a574 50%, var(--accent) 100%);
}

/* ===== Navigation ===== */
nav {
    padding: 1.5rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: var(--max-width);
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
}

.logo-mark {
    width: 50px;
    height: 50px;
    background: var(--primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    font-size: 1.5rem;
    font-weight: 700;
    font-family: 'Crimson Text', serif;
    flex-shrink: 0;
}

.logo-text {
    font-family: 'Noto Serif SC', serif;
}

.logo-text .main {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 0.05em;
}

.logo-text .sub {
    font-size: 0.75rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.2em;
}

/* Desktop Navigation */
.nav-links {
    display: flex;
    gap: 2.5rem;
    list-style: none;
}

.nav-links a {
    color: var(--text);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    transition: var(--transition);
    position: relative;
    padding: 0.5rem 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--accent);
}

.nav-links a:hover::after {
    width: 100%;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 5px;
    background: none;
    border: none;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    background: var(--primary);
    transition: var(--transition);
}

/* Mobile Navigation */
.mobile-nav {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--secondary);
    z-index: 999;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
}

.mobile-nav.active {
    display: flex;
}

.mobile-nav a {
    font-size: 1.5rem;
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.mobile-nav a:hover {
    color: var(--accent);
}

.close-menu {
    position: absolute;
    top: 2rem;
    right: 5%;
    font-size: 2rem;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text);
}

/* ===== Hero Section ===== */
.hero {
    padding: 3rem 5% 5rem;
    max-width: var(--max-width);
    margin: 0 auto;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 4rem;
    align-items: start;
}

.hero-content {
    padding-top: 1rem;
}

.breadcrumb {
    font-size: 0.8rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 1.5rem;
}

.hero h1 {
    font-family: 'Crimson Text', 'Noto Serif SC', serif;
    font-size: 3.5rem;
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--primary);
}

.hero h1 .chinese {
    display: block;
    font-size: 2rem;
    font-weight: 400;
    color: var(--text-light);
    margin-top: 0.5rem;
}

.hero-subtitle {
    font-family: 'Crimson Text', serif;
    font-size: 1.3rem;
    font-style: italic;
    color: var(--text-light);
    margin-bottom: 2rem;
    padding-left: 1.5rem;
    border-left: 3px solid var(--accent);
}

.hero-description {
    font-size: 1.05rem;
    color: var(--text);
    margin-bottom: 2.5rem;
    line-height: 1.8;
}

.hero-stats {
    display: flex;
    gap: 3rem;
    padding: 1.5rem 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-family: 'Crimson Text', serif;
    font-size: 2rem;
    font-weight: 600;
    color: var(--accent);
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.cta-group {
    margin-top: 2.5rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    padding: 1rem 2.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition);
    letter-spacing: 0.02em;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

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

.btn-outline {
    border: 1px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: var(--white);
}

/* ===== Hero Cards ===== */
.hero-cards {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.profile-card {
    background: var(--white);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 20px var(--shadow);
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e2e8f0, #cbd5e0);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    flex-shrink: 0;
    overflow: hidden;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-info h3 {
    font-family: 'Crimson Text', serif;
    font-size: 1.4rem;
    margin-bottom: 0.25rem;
    color: var(--primary);
}

.profile-info p {
    font-size: 0.85rem;
    color: var(--text-light);
}

.profile-bio {
    font-size: 0.95rem;
    color: var(--text);
    line-height: 1.7;
}

.profile-bio .highlight {
    color: var(--accent);
    font-weight: 600;
}

/* Research Areas Card */
.research-areas {
    background: var(--white);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 20px var(--shadow);
}

.research-areas h4 {
    font-family: 'Crimson Text', serif;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.area-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.area-tag {
    padding: 0.5rem 1rem;
    background: var(--secondary);
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--text);
    border: 1px solid var(--border);
    transition: var(--transition);
    cursor: pointer;
}

.area-tag:hover {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

/* Featured Publication Card */
.featured-pub {
    background: var(--primary);
    border-radius: 16px;
    padding: 2rem;
    color: var(--white);
}

.featured-pub .label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--accent-light);
    margin-bottom: 1rem;
}

.featured-pub h4 {
    font-family: 'Crimson Text', serif;
    font-size: 1.2rem;
    font-weight: 400;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.featured-pub .journal {
    font-size: 0.9rem;
    color: var(--accent-light);
    font-style: italic;
}

.featured-pub .pub-link {
    display: inline-block;
    margin-top: 1rem;
    color: var(--accent);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
}

.featured-pub .pub-link:hover {
    text-decoration: underline;
}

/* ===== Research Highlights Section ===== */
.research-section {
    padding: 4rem 5%;
    background: var(--white);
}

.section-header {
    max-width: var(--max-width);
    margin: 0 auto 3rem;
    text-align: center;
}

.section-title {
    font-family: 'Crimson Text', 'Noto Serif SC', serif;
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.section-subtitle {
    color: var(--text-light);
    font-size: 1.1rem;
}

.research-grid {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.research-card {
    background: var(--secondary);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    transition: var(--transition);
    border: 1px solid transparent;
}

.research-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
    box-shadow: 0 10px 30px var(--shadow);
}

.research-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--accent), #d4a574);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.5rem;
}

.research-card h3 {
    font-family: 'Crimson Text', serif;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--primary);
}

.research-card p {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.6;
}

/* ===== Footer ===== */
footer {
    background: var(--primary);
    color: var(--white);
    padding: 4rem 5% 2rem;
}

.footer-content {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
}

.footer-brand .logo-text .main {
    color: var(--white);
}

.footer-brand p {
    color: #a0aec0;
    font-size: 0.9rem;
    line-height: 1.7;
    margin-top: 1rem;
}

.footer-links h4 {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
    color: var(--accent);
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: #a0aec0;
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--white);
}

.footer-bottom {
    max-width: var(--max-width);
    margin: 3rem auto 0;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-bottom p {
    color: #718096;
    font-size: 0.85rem;
}

.footer-social {
    display: flex;
    gap: 1rem;
}

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

.footer-social a:hover {
    background: var(--accent);
    color: var(--primary);
}

/* ===== Page Header (for sub-pages) ===== */
.page-header {
    padding: 4rem 5% 3rem;
    max-width: var(--max-width);
    margin: 0 auto;
    text-align: center;
}

.page-header h1 {
    font-family: 'Crimson Text', 'Noto Serif SC', serif;
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.page-header .subtitle {
    color: var(--text-light);
    font-size: 1.1rem;
}

/* ===== Content Section (for sub-pages) ===== */
.content-section {
    padding: 3rem 5%;
    max-width: var(--max-width);
    margin: 0 auto;
}

.content-section.white-bg {
    background: var(--white);
}

.content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
}

/* ===== Publication List ===== */
.pub-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.pub-item {
    background: var(--white);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px var(--shadow);
    border-left: 4px solid var(--accent);
}

.pub-item h3 {
    font-family: 'Crimson Text', serif;
    font-size: 1.1rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.pub-item .authors {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.pub-item .journal {
    font-size: 0.85rem;
    color: var(--accent);
    font-weight: 500;
}

/* ===== Software Cards ===== */
.software-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.software-card {
    background: var(--white);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 20px var(--shadow);
    transition: var(--transition);
}

.software-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px var(--shadow);
}

.software-card h3 {
    font-family: 'Crimson Text', serif;
    font-size: 1.3rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.software-card .platform {
    font-size: 0.8rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
}

.software-card p {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 1rem;
}

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

.software-card .links a {
    font-size: 0.85rem;
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.software-card .links a:hover {
    color: var(--accent);
}

/* ===== People Grid ===== */
.people-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.person-card {
    text-align: center;
}

.person-avatar {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e2e8f0, #cbd5e0);
    margin: 0 auto 1rem;
    overflow: hidden;
}

.person-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.person-card h3 {
    font-family: 'Crimson Text', serif;
    font-size: 1.2rem;
    color: var(--primary);
    margin-bottom: 0.25rem;
}

.person-card .role {
    font-size: 0.85rem;
    color: var(--accent);
    margin-bottom: 0.5rem;
}

.person-card .email {
    font-size: 0.8rem;
    color: var(--text-light);
}

/* ===== Contact Section ===== */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-info h2 {
    font-family: 'Crimson Text', serif;
    font-size: 1.8rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.contact-item {
    margin-bottom: 1.5rem;
}

.contact-item h4 {
    font-size: 0.9rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
}

.contact-item p {
    font-size: 1rem;
    color: var(--text);
}

.contact-item a {
    color: var(--accent);
    text-decoration: none;
}

.contact-item a:hover {
    text-decoration: underline;
}

/* ===== Responsive Design ===== */
@media (max-width: 1024px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .research-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-content {
        grid-template-columns: 1fr 1fr;
    }

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

    .software-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .people-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    /* Navigation */
    .nav-links {
        display: none;
    }

    .menu-toggle {
        display: flex;
    }

    /* Hero */
    .hero {
        padding: 2rem 5% 3rem;
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    .hero h1 .chinese {
        font-size: 1.4rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
        padding-left: 1rem;
    }

    .hero-stats {
        gap: 1.5rem;
        justify-content: center;
    }

    .stat-item {
        flex: 1;
        min-width: 100px;
    }

    .cta-group {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    /* Profile Card */
    .profile-header {
        flex-direction: column;
        text-align: center;
    }

    /* Research Section */
    .section-title {
        font-size: 1.8rem;
    }

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

    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }

    .footer-brand {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    /* Page Header */
    .page-header h1 {
        font-size: 2rem;
    }

    /* Software Grid */
    .software-grid {
        grid-template-columns: 1fr;
    }

    /* People Grid */
    .people-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .logo-text .main {
        font-size: 1.1rem;
    }

    .logo-text .sub {
        font-size: 0.65rem;
    }

    .logo-mark {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    .hero h1 .chinese {
        font-size: 1.2rem;
    }

    .stat-number {
        font-size: 1.5rem;
    }

    .page-header h1 {
        font-size: 1.6rem;
    }
}
