@charset "utf-8";

/* ===== CSS Custom Properties ===== */
:root {
    --color-bg: #f8f9fc;
    --color-bg-alt: #f0f2f7;
    --color-surface: #ffffff;
    --color-text: #16192c;
    --color-text-secondary: #525a6a;
    --color-text-muted: #8b93a1;
    --color-accent: #2554d0;
    --color-accent-light: rgba(37, 84, 208, 0.08);
    --color-accent-hover: #1a3fa8;
    --color-venue: #e65100;
    --color-highlight: #dc2626;
    --color-border: #e4e7ed;
    --color-divider: linear-gradient(135deg, #2554d0, #6d28d9, #e65100);
    --color-divider-soft: linear-gradient(
        135deg,
        rgba(37, 84, 208, 0.55),
        rgba(109, 40, 217, 0.5),
        rgba(230, 81, 0, 0.5)
    );

    --shadow-xs: 0 1px 2px rgba(22, 25, 44, 0.04);
    --shadow-sm: 0 1px 4px rgba(22, 25, 44, 0.05), 0 4px 12px rgba(22, 25, 44, 0.03);
    --shadow-md: 0 2px 8px rgba(22, 25, 44, 0.06), 0 8px 24px rgba(22, 25, 44, 0.04);
    --shadow-lg: 0 4px 12px rgba(22, 25, 44, 0.06), 0 16px 48px rgba(22, 25, 44, 0.06);
    --shadow-accent: 0 4px 16px rgba(37, 84, 208, 0.12);

    --radius-xs: 6px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;

    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== Base ===== */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: var(--font-body);
    background: linear-gradient(180deg, var(--color-bg) 0%, var(--color-bg-alt) 100%);
    background-attachment: fixed;
    color: var(--color-text);
    line-height: 1.7;
    padding-top: 72px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
}

a {
    color: var(--color-accent);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--color-accent-hover);
}

::selection {
    background: rgba(37, 84, 208, 0.15);
    color: var(--color-text);
}

/* ===== Top Accent Bar ===== */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 0;
    background: transparent;
    z-index: 1100;
}

/* ===== Navbar ===== */
.navbar {
    background: rgba(248, 249, 252, 0.8);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 0.55rem 0;
    transition: box-shadow var(--transition), background var(--transition);
    margin-top: 0;
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow-sm);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.3rem;
    color: var(--color-text) !important;
    letter-spacing: -0.02em;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.brand-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: block;
    box-shadow: var(--shadow-xs);
    background: var(--color-surface);
}

.navbar .nav-link {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-text-secondary) !important;
    padding: 0.45rem 0.9rem !important;
    border-radius: var(--radius-xs);
    transition: all var(--transition);
    position: relative;
}

.navbar .nav-link:hover,
.navbar .nav-link.active {
    color: var(--color-accent) !important;
    background: var(--color-accent-light);
}

.navbar-toggler {
    border: none;
    padding: 0.4rem 0.6rem;
}

.navbar-toggler:focus {
    box-shadow: none;
}

/* ===== Sections ===== */
section {
    padding: 0.9rem 0;
}

.section-hero {
    padding-top: 1.5rem;
    padding-bottom: 0.5rem;
}

/* ===== Cards ===== */
.card {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xs);
    transition: box-shadow var(--transition-slow), transform var(--transition-slow);
    overflow: hidden;
    background: var(--color-surface);
}

.card:hover {
    box-shadow: var(--shadow-sm);
}

.hero-card {
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border);
}

.hero-card:hover {
    box-shadow: var(--shadow-md);
}

.content-card {
    margin-bottom: 0;
    position: relative;
}

.card-header-custom {
    padding: 1.1rem 1.5rem;
    border-bottom: 1px solid var(--color-border);
    background: transparent;
    position: relative;
}

.card-header-custom::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: rgba(37, 84, 208, 0.22);
    border-radius: 0 2px 2px 0;
}

.card-header-custom h4 {
    margin: 0;
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--color-text);
    display: flex;
    align-items: center;
    letter-spacing: -0.01em;
}

.card-header-custom h4 i {
    color: var(--color-text-muted);
    font-size: 0.95rem;
}

/* ===== Hero Section ===== */
.display-name {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.2;
    color: var(--color-text);
}

.name-cn {
    font-weight: 400;
    color: var(--color-text-muted);
    font-size: 1.5rem;
}

.divider {
    height: 3px;
    width: 50px;
    background: rgba(37, 84, 208, 0.28);
    border-radius: 2px;
    margin: 0.9rem 0 1.1rem;
}

.section-subtitle {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 0.4rem;
    margin-top: 0.9rem;
    letter-spacing: 0.01em;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.section-subtitle::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--color-border);
    margin-left: 0.5rem;
}

.hero-avatar-wrapper {
    width: 210px;
    height: 210px;
    border-radius: 50%;
    padding: 0;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition), box-shadow var(--transition);
}

.hero-avatar-wrapper:hover {
    transform: scale(1.03);
    box-shadow: var(--shadow-md);
}

.hero-seeking {
    font-size: 0.88rem;
    color: var(--color-text-secondary);
    line-height: 1.5;
}

.hero-seeking strong {
    color: var(--color-accent);
    font-weight: 600;
}

.hero-avatar-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    background: var(--color-surface);
}

.hero-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 15%;
    transform: scale(0.85);
    display: block;
}

.hero-identity {
    text-align: center;
    margin-top: 0.9rem;
}

.hero-identity-tag {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    background: rgba(82, 90, 106, 0.06);
    padding: 0.25rem 0.85rem;
    border-radius: 20px;
    letter-spacing: 0.01em;
}

.hiring-notice {
    display: inline-block;
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #92400e;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-top: 0.25rem;
}

.social-links {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--color-bg);
    color: var(--color-text-secondary);
    font-size: 1.05rem;
    border: 1px solid var(--color-border);
    transition: all var(--transition);
}

.social-links a:hover {
    background: var(--color-accent);
    color: #fff;
    border-color: var(--color-accent);
    transform: translateY(-3px);
    box-shadow: var(--shadow-accent);
}

.social-links a.social-cv {
    width: auto;
    padding: 0 0.8rem;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

/* ===== Education ===== */
.edu-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 0.9rem 0.5rem;
    position: relative;
    border-radius: var(--radius-sm);
    transition: background var(--transition);
}

.edu-item:hover {
    background: var(--color-accent-light);
}

.edu-item:not(:last-child) {
    border-bottom: 1px solid var(--color-border);
}

.edu-dot {
    width: 10px;
    height: 10px;
    min-width: 10px;
    border-radius: 50%;
    background: var(--color-accent);
    margin-top: 0.5rem;
    box-shadow: 0 0 0 4px rgba(37, 84, 208, 0.1);
}

/* ===== Research Tags ===== */
.research-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.research-tag {
    display: inline-block;
    padding: 0.4rem 0.9rem;
    background: transparent;
    color: var(--color-text-secondary);
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 500;
    border: 1px solid var(--color-border);
    transition: all var(--transition);
    cursor: default;
}

.research-tag:hover {
    background: rgba(82, 90, 106, 0.05);
    color: var(--color-text);
    border-color: rgba(82, 90, 106, 0.18);
    transform: none;
    box-shadow: none;
}

/* ===== Academic Services ===== */
.services-row {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.services-label {
    flex-shrink: 0;
}

.services-tags {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
}

.services-tags::-webkit-scrollbar {
    display: none;
}

.services-tags .research-tag {
    padding: 0.32rem 0.75rem;
    font-size: 0.78rem;
}

/* ===== News ===== */
.news-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.news-list li {
    padding: 0.55rem 0.6rem;
    font-size: 0.88rem;
    color: var(--color-text-secondary);
    border-bottom: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    gap: 0.85rem;
    border-radius: var(--radius-sm);
    transition: background var(--transition);
}

.news-list li:last-child {
    border-bottom: none;
}

.news-list li:hover {
    background: rgba(37, 84, 208, 0.025);
}

.news-list li.news-hidden {
    display: none;
}

.news-list.expanded li.news-hidden {
    display: flex;
}

.news-date {
    display: inline-block;
    min-width: 76px;
    font-weight: 600;
    font-size: 0.73rem;
    color: var(--color-accent);
    background: var(--color-accent-light);
    padding: 0.2rem 0.55rem;
    border-radius: 6px;
    text-align: center;
    white-space: nowrap;
    letter-spacing: 0.02em;
    flex-shrink: 0;
}

.news-body {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    line-height: 1.5;
}

.news-icon {
    font-size: 0.72rem;
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.news-icon-paper {
    color: var(--color-accent);
    background: var(--color-accent-light);
}

.news-icon-work {
    color: #059669;
    background: rgba(5, 150, 105, 0.08);
}

.news-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    margin-top: 0.6rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    cursor: pointer;
    text-decoration: none;
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    transition: all var(--transition);
}

.news-toggle:hover {
    color: var(--color-accent);
    background: var(--color-accent-light);
}

.news-toggle i {
    font-size: 0.7rem;
    transition: transform 0.3s ease;
}

.news-toggle.expanded i {
    transform: rotate(180deg);
}

/* ===== Publications ===== */
.pub-item {
    display: flex;
    gap: 1.25rem;
    padding: 1rem 0.75rem;
    border-bottom: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    transition: background var(--transition);
}

.pub-item:last-child {
    border-bottom: none;
}

.pub-item:hover {
    background: transparent;
}

.pub-thumb {
    flex-shrink: 0;
    width: 180px;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-border);
    background: var(--color-bg);
    align-self: center;
    box-shadow: var(--shadow-xs);
    transition: box-shadow var(--transition);
}

.pub-item:hover .pub-thumb {
    box-shadow: var(--shadow-sm);
}

.pub-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform var(--transition-slow);
}

.pub-item:hover .pub-thumb img {
    transform: scale(1.02);
}

.pub-info {
    flex: 1;
    min-width: 0;
}

.pub-title-line {
    margin-bottom: 0.25rem;
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.35rem;
    line-height: 1.35;
}

.pub-title {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--color-text);
    transition: color var(--transition);
    line-height: 1.35;
}

.pub-item:hover .pub-title {
    color: var(--color-text);
}

.pub-inline-links {
    font-size: 0.78rem;
    white-space: nowrap;
    margin-left: 0;
    display: inline-flex;
    align-items: baseline;
}

.pub-inline-links a {
    display: inline;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    background: transparent;
    padding: 0;
    border-radius: 0;
    margin-left: 0;
    transition: all var(--transition);
    vertical-align: baseline;
    line-height: 1.35;
}

.pub-inline-links a + a::before {
    content: '·';
    color: var(--color-text-muted);
    margin: 0 0.5rem 0 0.5rem;
}

.pub-inline-links a:hover {
    color: var(--color-accent);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.pub-authors {
    font-size: 0.8rem;
    color: var(--color-text-secondary);
    margin-bottom: 0.15rem;
    line-height: 1.55;
}

.pub-authors strong {
    color: var(--color-text);
    font-weight: 600;
}

.pub-venue {
    font-size: 0.8rem;
    color: var(--color-text-secondary);
    margin-bottom: 0;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.pub-venue strong {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    padding: 0;
    border-radius: 0;
    color: var(--color-text-muted);
    background: transparent;
    border: none;
}

.pub-venue strong.venue-cvpr {
    color: var(--color-text-muted);
}
.pub-venue strong.venue-iclr {
    color: var(--color-text-muted);
}
.pub-venue strong.venue-neurips {
    color: var(--color-text-muted);
}
.pub-venue strong.venue-icra {
    color: var(--color-text-muted);
}
.pub-venue strong.venue-ijcv {
    color: var(--color-text-muted);
}
.pub-venue strong.venue-neurocomputing {
    color: var(--color-text-muted);
}

.pub-venue strong.venue-preprint {
    color: var(--color-text-muted);
    font-weight: 500;
}

.pub-scholar-link {
    margin-top: 1rem;
    margin-bottom: 0;
    padding-top: 0.75rem;
    border-top: 1px solid var(--color-border);
    font-size: 0.82rem;
}

.pub-scholar-link a {
    color: var(--color-text-secondary);
    font-weight: 500;
    transition: color var(--transition);
}

.pub-scholar-link a:hover {
    color: var(--color-accent);
}

/* ===== Footer ===== */
.site-footer {
    padding: 2.5rem 0 2rem;
    margin-top: 1.5rem;
    border-top: 1px solid var(--color-border);
}

.footer-inner {
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 0.6rem;
    margin-bottom: 0.75rem;
}

.footer-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    color: var(--color-text-muted);
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    font-size: 0.9rem;
    transition: all var(--transition);
}

.footer-links a:hover {
    color: var(--color-accent);
    border-color: var(--color-accent);
    background: var(--color-accent-light);
    transform: translateY(-2px);
}

.footer-meta {
    color: var(--color-text-muted);
    font-size: 0.8rem;
}

/* ===== Back to Top ===== */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--color-surface);
    color: var(--color-text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all var(--transition);
    z-index: 999;
    border: 1px solid var(--color-border);
    font-size: 0.85rem;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--color-accent);
    color: #fff;
    border-color: var(--color-accent);
    transform: translateY(-3px);
    box-shadow: var(--shadow-accent);
}

/* ===== Fade-in Animation ===== */
.fade-in {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-in:nth-child(1) { transition-delay: 0s; }
.fade-in:nth-child(2) { transition-delay: 0.08s; }
.fade-in:nth-child(3) { transition-delay: 0.16s; }
.fade-in:nth-child(4) { transition-delay: 0.24s; }
.fade-in:nth-child(5) { transition-delay: 0.32s; }

/* ===== Responsive ===== */
@media (max-width: 991.98px) {
    .display-name {
        font-size: 1.6rem;
    }

    .name-cn {
        font-size: 1.2rem;
    }

    .hero-avatar-wrapper {
        width: 160px;
        height: 160px;
    }

    .pub-thumb {
        width: 150px;
    }

    .section-subtitle::after {
        display: none;
    }
}

@media (max-width: 767.98px) {
    body {
        padding-top: 64px;
    }

    .display-name {
        font-size: 1.4rem;
    }

    .hero-avatar-wrapper {
        width: 140px;
        height: 140px;
    }

    .pub-item {
        flex-direction: column;
        gap: 0.5rem;
        padding: 0.75rem 0.5rem;
    }

    .pub-thumb {
        width: 100%;
        max-width: 220px;
    }

    .pub-inline-links {
        display: block;
        margin-top: 0.3rem;
        margin-left: 0;
    }

    .pub-title-line {
        display: block;
    }

    .news-list li {
        flex-direction: column;
        gap: 0.25rem;
    }

    .news-date {
        align-self: flex-start;
    }

    .back-to-top {
        bottom: 1.5rem;
        right: 1.5rem;
        width: 36px;
        height: 36px;
    }

    .card-header-custom {
        padding: 0.9rem 1.25rem;
    }

    .section-subtitle::after {
        display: none;
    }
}
