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

:root {
    --color-text: #1a1a1a;
    --color-secondary: #555;
    --color-accent: #2563eb;
    --color-accent-hover: #1d4ed8;
    --color-border: #e5e7eb;
    --color-bg: #ffffff;
    --color-venue: #1e40af;
    --color-venue-bg: #eff6ff;
    --max-width: 960px;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

/* === Layout === */
main {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 3rem 2rem;
}

section {
    margin-bottom: 2.5rem;
}

/* === Typography === */
h1 {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.3;
}

h1 .chinese {
    font-weight: 400;
    color: var(--color-secondary);
    font-size: 1.3rem;
    margin-left: 0.3rem;
}

h2 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid var(--color-border);
}

p {
    margin-bottom: 0.6rem;
}

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

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

/* === Profile Header === */
.profile {
    display: flex;
    align-items: flex-start;
    gap: 2rem;
    margin-bottom: 2.5rem;
}

.avatar {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.profile-info {
    padding-top: 0.5rem;
}

.profile-info .title {
    color: var(--color-secondary);
    font-size: 1rem;
    margin-bottom: 0.2rem;
}

.profile-info .affiliation {
    color: var(--color-secondary);
    font-size: 0.95rem;
    margin-bottom: 0.8rem;
}

.links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.2rem;
}

.links a {
    font-size: 0.9rem;
    font-weight: 500;
}

/* === News === */
.news-list {
    list-style: none;
}

.news-list li {
    padding: 0.35rem 0;
    font-size: 0.92rem;
    line-height: 1.6;
}

.news-list .date {
    display: inline-block;
    width: 5.5rem;
    color: var(--color-secondary);
    font-size: 0.85rem;
    font-family: "SF Mono", "Fira Code", monospace;
}

/* === Publications === */
.note {
    font-size: 0.85rem;
    color: var(--color-secondary);
    margin-bottom: 1rem;
}

.pub-list {
    list-style: none;
}

.pub-list li {
    padding: 0.7rem 0;
    border-bottom: 1px solid var(--color-border);
    font-size: 0.92rem;
    line-height: 1.65;
}

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

.venue {
    display: inline-block;
    background: var(--color-venue-bg);
    color: var(--color-venue);
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.15rem 0.5rem;
    border-radius: 3px;
    margin-right: 0.5rem;
    vertical-align: middle;
}

.pub-list a {
    font-size: 0.85rem;
    margin-left: 0.3rem;
}

/* === Research Interests === */
.research-list {
    list-style: none;
    padding-left: 0;
    margin-top: 0.5rem;
}

.research-list li {
    margin-bottom: 0.75rem;
    font-size: 0.92rem;
    line-height: 2.2;
}

.series-name {
    color: var(--color-secondary);
    font-size: 0.85rem;
}

.paper-tag {
    display: inline-block;
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    border-radius: 999px;
    padding: 0.2rem 0.7rem;
    margin: 0.2rem 0.3rem;
    font-weight: 500;
    font-size: 0.85rem;
    text-decoration: none;
    color: var(--color-text);
    transition: background 0.15s, border-color 0.15s;
}

.paper-tag:hover {
    text-decoration: none;
    background: #e5e7eb;
    border-color: #9ca3af;
    color: var(--color-text);
}

.vtag {
    color: var(--color-venue);
    font-size: 0.78rem;
    font-weight: 600;
    margin-left: 0.25rem;
}

/* === ERA Lab === */
.lab-section {
    background: #f8fafc;
    border-left: 3px solid var(--color-accent);
    padding: 1.2rem 1.5rem;
    border-radius: 4px;
}

.lab-section h2 {
    border-bottom: none;
    padding-bottom: 0;
}

.recruiting {
    font-size: 0.9rem;
    color: var(--color-secondary);
    margin-bottom: 0;
}

/* === Footer === */
footer {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--color-border);
    text-align: center;
    font-size: 0.82rem;
    color: var(--color-secondary);
}

/* === Responsive === */
@media (max-width: 640px) {
    main {
        padding: 2rem 1rem;
    }

    .profile {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 1rem;
    }

    .avatar {
        width: 130px;
        height: 130px;
    }

    .links {
        justify-content: center;
    }

    h1 {
        font-size: 1.5rem;
    }

    .news-list .date {
        display: block;
        margin-bottom: 0.1rem;
    }
}
