:root {
    --color-bg: #fafaf8;
    --color-bg-alt: #f5f4f0;
    --color-surface: #ffffff;
    --color-primary: #1a2332;
    --color-primary-light: #2d3a4f;
    --color-accent: #b8860b;
    --color-accent-light: #d4a843;
    --color-text: #2c2c2c;
    --color-text-secondary: #5a5a5a;
    --color-text-muted: #888888;
    --color-border: #e5e5e0;
    --color-border-light: #f0f0eb;
    --font-display: 'Crimson Pro', Georgia, serif;
    --font-body: 'Source Sans 3', -apple-system, BlinkMacSystemFont, sans-serif;
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2.5rem;
    --spacing-xl: 4rem;
    --max-width: 1100px;
    --radius: 4px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.1);
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.7;
    color: var(--color-text);
    background: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

::selection {
    background: var(--color-accent);
    color: white;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

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

/* Navigation */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(250, 250, 248, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--color-border-light);
    transition: all 0.3s ease;
}

.nav-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 64px;
}

.nav-brand {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-primary);
    letter-spacing: -0.02em;
}

.nav-brand span {
    color: var(--color-text-muted);
    font-weight: 400;
}

.nav-links {
    display: flex;
    gap: var(--spacing-md);
    list-style: none;
}

.nav-links a {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    padding: 0.5rem 0;
    position: relative;
}

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

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

.nav-links a:hover,
.nav-links a.active {
    color: var(--color-primary);
}

/* Main Content */
main {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

/* Hero Section */
.hero {
    padding-top: calc(64px + var(--spacing-xl));
    padding-bottom: var(--spacing-xl);
    display: grid;
    grid-template-columns: auto 1fr;
    gap: var(--spacing-lg);
    align-items: start;
}

.hero-image {
    width: 180px;
    height: 220px;
    object-fit: cover;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    border: 3px solid var(--color-surface);
    background: var(--color-bg-alt);
}

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

.hero-name {
    font-family: var(--font-display);
    font-size: 2.8rem;
    font-weight: 600;
    color: var(--color-primary);
    line-height: 1.2;
    margin-bottom: 0.25rem;
    letter-spacing: -0.02em;
}

.hero-name-zh {
    font-size: 1.8rem;
    font-weight: 400;
    color: var(--color-text-secondary);
    margin-bottom: var(--spacing-sm);
}

.hero-title {
    font-size: 1.1rem;
    color: var(--color-accent);
    font-weight: 500;
    margin-bottom: var(--spacing-sm);
}

.hero-info {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-bottom: var(--spacing-md);
}

.hero-info-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    color: var(--color-text-secondary);
}

.hero-info-item svg {
    width: 16px;
    height: 16px;
    opacity: 0.6;
}

/* Section Styling */
section {
    padding: var(--spacing-lg) 0;
    border-top: 1px solid var(--color-border);
}

.section-header {
    display: flex;
    align-items: baseline;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
}

.section-title {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--color-primary);
    letter-spacing: -0.02em;
}

.section-number {
    font-family: var(--font-display);
    font-size: 0.85rem;
    color: var(--color-accent);
    font-weight: 500;
}

/* About Section */
.about-text {
    display: grid;
    gap: var(--spacing-md);
}

.about-text p {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--color-text);
}

.about-text .highlight {
    background: linear-gradient(120deg, rgba(184, 134, 11, 0.1) 0%, rgba(184, 134, 11, 0.05) 100%);
    padding: var(--spacing-sm) var(--spacing-md);
    border-left: 3px solid var(--color-accent);
    border-radius: 0 var(--radius) var(--radius) 0;
}

/* News Section */
.news-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.news-item {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: var(--spacing-md);
    padding: var(--spacing-sm) 0;
    border-bottom: 1px solid var(--color-border-light);
    align-items: start;
}

.news-item:last-child {
    border-bottom: none;
}

.news-date {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    font-weight: 500;
    padding-top: 0.15rem;
}

.news-content {
    font-size: 0.95rem;
    color: var(--color-text);
}

.news-content .emoji {
    margin-right: 0.25rem;
}

.news-content .badge {
    display: inline-block;
    background: var(--color-primary);
    color: white;
    font-size: 0.7rem;
    padding: 0.15rem 0.5rem;
    border-radius: 3px;
    margin-left: 0.5rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

/* Research Cards */
.research-grid {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.research-card {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: var(--spacing-lg);
    padding: var(--spacing-md);
    background: var(--color-surface);
    border-radius: 8px;
    border: 1px solid var(--color-border-light);
    transition: all 0.3s ease;
}

.research-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--color-border);
}

.research-image {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: var(--radius);
    background: var(--color-bg-alt);
}

.research-content h4 {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: var(--spacing-sm);
    line-height: 1.4;
}

.research-content p {
    font-size: 0.95rem;
    color: var(--color-text-secondary);
    margin-bottom: var(--spacing-sm);
    line-height: 1.7;
}

.research-content p:last-of-type {
    margin-bottom: var(--spacing-sm);
}

.research-links {
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

.research-links a {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-accent);
    padding: 0.35rem 0.75rem;
    background: rgba(184, 134, 11, 0.08);
    border-radius: var(--radius);
    transition: all 0.2s ease;
}

.research-links a:hover {
    background: rgba(184, 134, 11, 0.15);
    color: var(--color-accent);
}

.research-links a svg {
    width: 14px;
    height: 14px;
}

/* Publications */
.pub-year {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-primary);
    margin: var(--spacing-md) 0 var(--spacing-sm) 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--color-accent);
    display: inline-block;
}

.pub-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.pub-item {
    padding: var(--spacing-sm) 0;
    border-bottom: 1px solid var(--color-border-light);
    display: grid;
    grid-template-columns: 1fr auto;
    gap: var(--spacing-sm);
    align-items: start;
}

.pub-item:last-child {
    border-bottom: none;
}

.pub-authors {
    font-size: 0.95rem;
    color: var(--color-text);
    margin-bottom: 0.25rem;
}

.pub-authors strong {
    font-weight: 600;
}

.pub-title {
    font-size: 0.95rem;
    color: var(--color-text);
    margin-bottom: 0.25rem;
    line-height: 1.5;
}

.pub-venue {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    font-style: italic;
}

.pub-venue .venue-name {
    font-weight: 600;
    color: var(--color-accent);
    font-style: normal;
}

.pub-badge {
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    background: var(--color-primary);
    color: white;
    border-radius: 3px;
    font-weight: 600;
    white-space: nowrap;
}

.pub-badge.ccf-a {
    background: #c41e3a;
}

.pub-badge.jcr-q1 {
    background: #2d5a27;
}

/* Awards */
.awards-list {
    display: grid;
    gap: 0;
}

.award-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) 0;
    border-bottom: 1px solid var(--color-border-light);
    font-size: 0.95rem;
}

.award-item:last-child {
    border-bottom: none;
}

.award-item::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--color-accent);
    border-radius: 50%;
    flex-shrink: 0;
}

/* Services */
.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-md);
}

.service-block h4 {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: var(--spacing-sm);
}

.service-block ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.service-block li {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    padding-left: 1rem;
    position: relative;
}

.service-block li::before {
    content: '—';
    position: absolute;
    left: 0;
    color: var(--color-accent);
    opacity: 0.5;
}

.service-block li.grant-item {
    padding-left: 0;
}

.service-block li.grant-item::before {
    display: none;
}

/* Grants */
.grant-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 0.25rem;
}

.grant-meta {
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.grant-meta span {
    display: inline-block;
    margin-right: var(--spacing-sm);
}

.grant-source {
    color: var(--color-accent);
    font-weight: 500;
}

/* Footer */
footer {
    margin-top: var(--spacing-xl);
    padding: var(--spacing-lg) 0;
    border-top: 1px solid var(--color-border);
    text-align: center;
}

footer p {
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

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

.animate-in {
    animation: fadeInUp 0.6s ease forwards;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }

/* Responsive */
@media (max-width: 768px) {
    .nav-container {
        padding: 0 var(--spacing-md);
    }

    .nav-links {
        gap: var(--spacing-sm);
    }

    .nav-links a {
        font-size: 0.8rem;
    }

    main {
        padding: 0 var(--spacing-md);
    }

    .hero {
        grid-template-columns: 1fr;
        padding-top: calc(64px + var(--spacing-lg));
        padding-bottom: var(--spacing-lg);
    }

    .hero-image {
        width: 140px;
        height: 170px;
    }

    .hero-name {
        font-size: 2rem;
    }

    .hero-name-zh {
        font-size: 1.4rem;
    }

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

    .news-item {
        grid-template-columns: 1fr;
        gap: 0.25rem;
    }

    .pub-item {
        grid-template-columns: 1fr;
    }

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

/* Scroll to top button */
.scroll-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 44px;
    height: 44px;
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    z-index: 999;
}

.scroll-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-top:hover {
    background: var(--color-accent);
    transform: translateY(-3px);
}

.scroll-top svg {
    width: 20px;
    height: 20px;
}
