/* ============================================
   Academic Homepage - Modern Light Theme
   Clean, Cool & Professional
   ============================================ */

/* CSS Variables - Classic Academic Theme */
:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --accent-color: #0891b2;
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-card: #ffffff;
    --border-color: #e2e8f0;
    --font-main: 'IBM Plex Sans', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
    --sidebar-width: 260px;
    --max-content-width: 800px;
}

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

strong {
    color: #0f172a; /* Dark bold (Heitiish) */
    font-weight: 600;
}

html {
    scroll-behavior: smooth;
}

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

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

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

strong {
    font-weight: 600;
}

img {
    max-width: 100%;
    height: auto;
}

/* ============================================
   Page Layout
   ============================================ */
.page-container {
    display: flex;
    min-height: 100vh;
}

/* ============================================
   Sidebar - Modern Light with Gradient Accent
   ============================================ */
.sidebar {
    width: var(--sidebar-width);
    min-height: 100vh;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    padding: 24px 20px;
    padding-top: 64px;
    position: fixed;
    top: 0;
    left: 0;
    overflow-y: auto;
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.sidebar .bottom-links {
    margin-top: auto;
    padding-top: 24px;
}

.sidebar > * {
    position: relative;
    z-index: 1;
}

/* Profile */
.profile {
    text-align: center;
    margin-bottom: 24px;
}

/* Page Navigation - Top of main content */
.page-nav {
    display: flex;
    flex-direction: row;
    gap: 24px;
    justify-content: flex-end;
    margin-bottom: 24px;
    padding-bottom: 16px;
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg-secondary);
    padding-top: 10px; /* Add padding for visual breathing room when stuck */
}

.page-nav a {
    color: var(--text-secondary);
    font-size: 16px;
    transition: all 0.2s ease;
}

.page-nav a:hover {
    color: var(--primary-color);
    text-decoration: none;
}

.avatar {
    width: 150px;
    height: 150px;
    margin: 0 auto 20px;
    border-radius: 50%;
    overflow: hidden;
    background: linear-gradient(135deg, #2563eb 0%, #0ea5e9 50%, #0891b2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.avatar:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    background: white;
}

.avatar.no-image .avatar-fallback {
    display: block;
}

.avatar-fallback {
    display: none;
    font-size: 48px;
    font-weight: 700;
    color: white;
    letter-spacing: 2px;
}

.name {
    font-size: 24px;
    font-weight: 700;
    color: #0f172a; /* Darker black/blue */
    margin-bottom: 4px;
}

.name-cn {
    font-size: 16px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

/* Research Interest Tags */
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-top: 4px;
    margin-bottom: 12px;
}

.tag {
    display: inline-block;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 600;
    color: #2563eb;
    background: rgba(37, 99, 235, 0.12);
    border-radius: 20px;
    border: 1.5px solid rgba(37, 99, 235, 0.3);
    transition: all 0.3s ease;
    cursor: default;
}

.tag:hover {
    background: rgba(37, 99, 235, 0.2);
    border-color: rgba(37, 99, 235, 0.5);
    transform: scale(1.08);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.title {
    font-size: 14px;
    background: linear-gradient(90deg, #2563eb, #0ea5e9);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 600;
    margin-bottom: 4px;
}

.affiliation {
    font-size: 14px;
    color: var(--text-secondary);
}

/* Navigation Links - Gradient background on hover */
.nav-links {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 32px;
}

.nav-links a {
    display: block;
    padding: 10px 14px;
    color: var(--primary-color);
    font-size: 14px;
    border-radius: 10px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
    position: relative;
    overflow: hidden;
}

.nav-links a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(37, 99, 235, 0.1), transparent);
    transition: left 0.5s ease;
}

.nav-links a:hover {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.08) 0%, rgba(14, 165, 233, 0.08) 100%);
    color: var(--primary-color);
    text-decoration: none;
    border-color: rgba(37, 99, 235, 0.2);
    padding-left: 18px;
}

.nav-links a:hover::before {
    left: 100%;
}

/* Sidebar Section */
.sidebar-section {
    margin-top: 32px;
    margin-bottom: 24px;
}

.sidebar-section h3 {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 14px;
}

/* Interests - Simple Text List */
.interests {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
    padding-left: 4px;
}

.interests li {
    font-size: 14px;
    color: #be123c;
    font-weight: 600;
    padding: 0;
    background: none;
    border: none;
    transition: color 0.2s ease;
    cursor: default;
}

.interests li::before {
    content: '- ';
    margin-right: 4px;
    color: var(--text-muted);
}

.interests li:hover {
    color: var(--primary-color);
    background: none;
    border: none;
}

/* ============================================
   Main Content - Light Theme
   ============================================ */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 32px 50px;
    max-width: 950px;
    background: var(--bg-secondary);
    min-height: 100vh;
    position: relative;
}



/* Section */
.section {
    margin-bottom: 32px;
    padding-bottom: 0;
}

.section:last-of-type {
    border-bottom: none;
}

.section h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 24px;
    display: inline-block;
}

.section > p {
    color: var(--text-secondary);
    max-width: 800px;
    font-size: 15px;
    line-height: 1.6;
}

/* ============================================
   Publications - Lift + Glow effect on hover
   ============================================ */
.paper {
    display: flex;
    gap: 16px;
    padding: 16px;
    margin-bottom: 12px;
    background: var(--bg-card);
    border-radius: 10px;
    border: 1px solid var(--border-color);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    position: relative;
}

.paper::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 11px;
    padding: 1px;
    background: linear-gradient(135deg, #2563eb, #0ea5e9, #0891b2);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.paper:hover {
    transform: translateY(-6px);
    box-shadow: 
        0 20px 40px rgba(37, 99, 235, 0.15),
        0 8px 16px rgba(0, 0, 0, 0.08);
}

.paper:hover::before {
    opacity: 1;
}

.paper:last-child {
    margin-bottom: 0;
}

.paper-thumbnail {
    flex-shrink: 0;
    width: 140px;
    height: 90px;
    background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
    border-radius: 6px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.4s ease;
}

.paper:hover .paper-thumbnail {
    transform: scale(1.05);
}

.paper-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.paper-info {
    flex: 1;
    min-width: 0;
}

.paper-title {
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.4;
    margin-bottom: 6px;
}

.paper-authors {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.paper-authors strong {
    color: var(--primary-color);
}

.paper-venue {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: var(--text-muted);
    font-style: italic;
    margin-bottom: 10px;
}

/* Paper Links - Simple hover */
.paper-links {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.paper-links a {
    font-size: 12px;
    color: var(--primary-color);
    font-weight: 500;
    padding: 4px 10px;
    background: rgba(37, 99, 235, 0.08);
    border-radius: 4px;
    transition: all 0.2s ease;
}

.paper-links a:hover {
    background: var(--primary-color);
    color: white;
    text-decoration: none;
}

/* ============================================
   Experience - Scale + border glow on hover
   ============================================ */
.experience-item {
    margin-bottom: 24px;
    padding-left: 24px;
    border-left: 2px solid var(--border-color); /* Optional: add a timeline line? Or just indent. User said "decrease indentation to the right" which implies moving right. */
}

.experience-item:last-child {
    margin-bottom: 0;
}

.exp-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 4px;
}

.exp-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.exp-date {
    font-size: 14px;
    color: var(--text-muted);
    font-family: 'Inter', sans-serif;
}

.exp-org {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.exp-desc {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-left: 24px; /* Indent description */
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 900px) {
    .page-container {
        flex-direction: column;
    }

    .sidebar {
        position: relative;
        width: 100%;
        min-height: auto;
        padding: 32px 24px;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }

    .profile {
        margin-bottom: 24px;
    }

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

    .nav-links {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 4px;
    }

    .nav-links a {
        padding: 6px 12px;
    }

    .sidebar-section {
        text-align: center;
    }

    .interests {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px 16px;
    }

    .interests li {
        padding-left: 0;
    }

    .interests li::before {
        display: none;
    }

    .main-content {
        margin-left: 0;
        padding: 32px 24px;
    }
}

@media (max-width: 600px) {
    .paper {
        flex-direction: column;
    }

    .paper-thumbnail {
        width: 100%;
        height: 140px;
    }

    .exp-header {
        flex-direction: column;
        gap: 2px;
    }

    .news-list .date {
        display: block;
        width: auto;
        margin-bottom: 2px;
    }
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
    .sidebar {
        position: relative;
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #ccc;
    }

    .main-content {
        margin-left: 0;
    }

    .page-container {
        flex-direction: column;
    }
}
