/* Modern GitHub-Style CSS with Bright Colors */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500&display=swap');

/* CSS Variables */
:root {
    /* Light Mode - Bright & Vibrant */
    --bg-primary: #ffffff;
    --bg-secondary: #f6f8fa;
    --bg-tertiary: #ffffff;
    --bg-hover: #f3f4f6;

    --text-primary: #1f2937;
    --text-secondary: #4b5563;
    --text-muted: #6b7280;

    /* Bright Accent Colors */
    --color-blue: #3b82f6;
    --color-blue-light: #60a5fa;
    --color-blue-bg: #eff6ff;

    --color-green: #10b981;
    --color-green-light: #34d399;
    --color-green-bg: #ecfdf5;

    --color-pink: #ec4899;
    --color-pink-light: #f472b6;
    --color-pink-bg: #fdf2f8;

    --color-yellow: #f59e0b;
    --color-yellow-light: #fbbf24;
    --color-yellow-bg: #fffbeb;

    --color-purple: #8b5cf6;
    --color-purple-light: #a78bfa;
    --color-purple-bg: #f5f3ff;

    --color-orange: #f97316;
    --color-orange-light: #fb923c;
    --color-orange-bg: #fff7ed;

    --education-bg: #eff6ff;
    --education-border: #bfdbfe;
    --project-bg: #fff7ed;

    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.15);

    /* Status Colors */
    --status-online: #10b981;
    --badge-ongoing: #3b82f6;
    --badge-completed: #10b981;
}

/* Dark Mode */
@media (prefers-color-scheme: dark) {
    :root:not(.light-theme) {
        --bg-primary: #0d1117;
        --bg-secondary: #161b22;
        --bg-tertiary: #21262d;
        --bg-hover: #30363d;

        --text-primary: #e6edf3;
        --text-secondary: #8b949e;
        --text-muted: #6e7681;

        --education-bg: #111d2e;
        --education-border: #24466f;
        --project-bg: #2b1a0f;

        --border-color: #30363d;
        --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
        --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
        --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.5);
        --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.6);
    }
}

:root.dark-theme {
    --bg-primary: #0d1117;
    --bg-secondary: #161b22;
    --bg-tertiary: #21262d;
    --bg-hover: #30363d;

    --text-primary: #e6edf3;
    --text-secondary: #8b949e;
    --text-muted: #6e7681;

    --education-bg: #111d2e;
    --education-border: #24466f;
    --project-bg: #2b1a0f;

    --border-color: #30363d;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.6);
}

/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

a {
    text-decoration: none;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-secondary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
}

:root.modal-open body {
    overflow: hidden;
}

/* Page Container - Two Column Layout */
.page-container {
    display: grid;
    grid-template-columns: 360px minmax(0, 900px);
    gap: 24px;
    justify-content: center;
    max-width: 1260px;
    margin: 0 auto;
    padding: 24px;
    min-height: 100vh;
}

/* ========== LEFT SIDEBAR - PROFILE ========== */
.sidebar-left {
    position: sticky;
    top: 24px;
    height: fit-content;
}

.profile-card {
    background: var(--bg-primary);
    border-radius: 16px;
    padding: 24px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 48px);
}

.profile-avatar {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 20px;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--color-blue);
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.profile-avatar:hover img {
    transform: scale(1.05);
    box-shadow: var(--shadow-lg);
}

.status-indicator {
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 20px;
    height: 20px;
    background: var(--status-online);
    border-radius: 50%;
    border: 3px solid var(--bg-primary);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.profile-name {
    font-size: 1.5rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.profile-username {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 8px;
}

.profile-role {
    text-align: center;
    color: var(--color-blue);
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 16px;
}

.profile-role i {
    margin-right: 6px;
}

.profile-bio {
    background: var(--color-blue-bg);
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 3px solid var(--color-blue);
}

.bio-text {
    font-size: 0.85rem;
    font-style: italic;
    color: var(--text-secondary);
    line-height: 1.5;
}

.bio-text i {
    color: var(--color-blue);
    font-size: 0.7rem;
}

.profile-details {
    margin-bottom: 20px;
}

.detail-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

.detail-item:last-child {
    border-bottom: none;
}

.detail-item i {
    color: var(--color-green);
    margin-top: 2px;
    font-size: 1.1rem;
}

.detail-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.detail-content strong {
    color: var(--text-primary);
    font-weight: 700;
    font-size: 0.95rem;
}

.detail-content span {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.detail-link,
.detail-sublink {
    width: fit-content;
    color: inherit;
    text-decoration: none;
}

.detail-link:hover strong,
.detail-sublink:hover {
    color: var(--color-blue);
}

.detail-sublink {
    color: var(--text-muted);
    font-size: 0.85rem;
    transition: color 0.2s ease;
}

.detail-sublink i {
    margin: 0 0 0 3px;
    color: currentColor;
    font-size: 0.65rem;
}

.location-detail strong {
    display: flex;
    align-items: center;
}

.profile-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.link-button {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.link-button:hover {
    background: var(--color-blue);
    color: white;
    transform: translateX(5px);
    box-shadow: var(--shadow-md);
}

.link-button i {
    font-size: 1.1rem;
}

.profile-footer {
    margin-top: auto;
    padding-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.profile-visitor {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: hidden;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-secondary);
}

.profile-visitor-item {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr);
    gap: 8px;
    align-items: center;
    min-height: 56px;
    padding: 10px 12px;
}

.profile-visitor-item + .profile-visitor-item {
    border-left: 1px solid var(--border-color);
}

.profile-visitor-item i {
    color: var(--color-blue);
    font-size: 0.95rem;
}

.profile-visitor-item span {
    display: block;
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.2;
}

.profile-visitor-item strong {
    display: block;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
}

.profile-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.control-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    cursor: pointer;
    font: inherit;
    font-size: 0.88rem;
    font-weight: 700;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.control-button:hover {
    background: var(--color-blue);
    border-color: var(--color-blue);
    color: white;
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.control-button i {
    font-size: 1rem;
}

.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(59, 130, 246, 0.18);
    pointer-events: none;
    transform: scale(0);
    animation: ripple 0.6s ease-out;
}

@keyframes ripple {
    to {
        opacity: 0;
        transform: scale(2.4);
    }
}

/* ========== MAIN CONTENT - FEED ========== */
.content-main {
    overflow-y: auto;
    max-height: calc(100vh - 48px);
    padding-right: 8px;
    min-width: 0;
}

.content-main::-webkit-scrollbar {
    width: 8px;
}

.content-main::-webkit-scrollbar-track {
    background: transparent;
}

.content-main::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

.content-main::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

.feed-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
    min-width: 0;
}

/* Feed Card */
.feed-card {
    background: var(--bg-primary);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: all 0.3s ease;
    min-width: 0;
    scroll-margin-top: 92px;
}

.feed-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 24px 24px 20px;
    border-bottom: 2px solid var(--border-color);
    position: relative;
}

.card-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: white;
    box-shadow: var(--shadow-sm);
}

.card-icon.blue { background: linear-gradient(135deg, var(--color-blue), var(--color-blue-light)); }
.card-icon.green { background: linear-gradient(135deg, var(--color-green), var(--color-green-light)); }
.card-icon.pink { background: linear-gradient(135deg, var(--color-pink), var(--color-pink-light)); }
.card-icon.yellow { background: linear-gradient(135deg, var(--color-yellow), var(--color-yellow-light)); }
.card-icon.purple { background: linear-gradient(135deg, var(--color-purple), var(--color-purple-light)); }
.card-icon.orange { background: linear-gradient(135deg, var(--color-orange), var(--color-orange-light)); }

.card-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    flex: 1;
}

.card-badge {
    display: inline-flex;
    align-items: center;
    background: var(--color-blue-bg);
    color: var(--color-blue);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
}

.card-badge:hover {
    background: var(--color-blue);
    color: white;
}

.card-content {
    padding: 24px;
    min-width: 0;
}

/* About Section */
.intro-text {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 16px;
    font-size: 1rem;
}

.intro-text strong {
    color: var(--text-primary);
    font-weight: 700;
}

.affiliation-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 20px;
}

.affiliation-card {
    padding: 18px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: linear-gradient(145deg, var(--bg-primary), var(--bg-secondary));
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.affiliation-card.current {
    border-color: rgba(59, 130, 246, 0.34);
    background: linear-gradient(145deg, rgba(59, 130, 246, 0.11), rgba(16, 185, 129, 0.06));
}

.affiliation-card:hover {
    transform: translateY(-3px);
    border-color: var(--color-blue-light);
    box-shadow: var(--shadow-md);
}

.affiliation-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.affiliation-topline img {
    width: 34px;
    height: 34px;
    object-fit: contain;
}

.affiliation-status {
    color: var(--color-blue);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.affiliation-card h3 {
    margin-bottom: 7px;
    color: var(--text-primary);
    font-size: 1rem;
    line-height: 1.35;
}

.affiliation-card p {
    color: var(--text-secondary);
    font-size: 0.88rem;
    line-height: 1.6;
}

.inline-link {
    color: var(--color-blue);
    font-weight: 700;
    transition: color 0.2s ease;
}

.inline-link:hover {
    color: var(--color-purple);
}

.interests-section {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.subsection-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.subsection-title i {
    color: var(--color-yellow);
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.interest-tag {
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    border: 2px solid;
    transition: all 0.3s ease;
    cursor: default;
}

.interest-tag.blue {
    background: var(--color-blue-bg);
    color: var(--color-blue);
    border-color: var(--color-blue);
}

.interest-tag.green {
    background: var(--color-green-bg);
    color: var(--color-green);
    border-color: var(--color-green);
}

.interest-tag.pink {
    background: var(--color-pink-bg);
    color: var(--color-pink);
    border-color: var(--color-pink);
}

.interest-tag.yellow {
    background: var(--color-yellow-bg);
    color: var(--color-yellow);
    border-color: var(--color-yellow);
}

.interest-tag.purple {
    background: var(--color-purple-bg);
    color: var(--color-purple);
    border-color: var(--color-purple);
}

.interest-tag.orange {
    background: var(--color-orange-bg);
    color: var(--color-orange);
    border-color: var(--color-orange);
}

.interest-tag:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

/* Education Timeline */
.timeline {
    position: relative;
    padding-left: 40px;
    min-width: 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 16px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, var(--color-blue), var(--color-green));
    border-radius: 2px;
}

.timeline-item {
    position: relative;
    margin-bottom: 32px;
    min-width: 0;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-marker {
    position: absolute;
    left: -32px;
    top: 4px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 3px solid var(--bg-primary);
    box-shadow: var(--shadow-sm);
}

.timeline-marker.phd {
    background: var(--color-blue);
}

.timeline-marker.exchange {
    background: var(--color-purple);
}

.timeline-marker.bachelor {
    background: var(--color-green);
}

.timeline-marker.highschool {
    background: var(--color-yellow);
}

.timeline-content {
    background: var(--education-bg);
    padding: 16px;
    border-radius: 12px;
    border: 1px solid var(--education-border);
    transition: all 0.3s ease;
    min-width: 0;
}

.timeline-content:hover {
    box-shadow: var(--shadow-md);
    transform: translateX(5px);
}

.timeline-entry-layout {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 14px;
    align-items: start;
    min-width: 0;
}

.timeline-entry-layout.no-logo {
    grid-template-columns: minmax(0, 1fr);
}

.timeline-entry-body {
    min-width: 0;
}

.institution-logo {
    width: 54px;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
    border-radius: 8px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
}

.institution-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.institution-logo.seal {
    padding: 4px;
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 8px;
}

.timeline-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    overflow-wrap: anywhere;
}

.badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge.ongoing {
    background: var(--color-blue);
    color: white;
}

.badge.completed {
    background: var(--color-green);
    color: white;
}

.timeline-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 12px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.timeline-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.timeline-meta i {
    color: var(--color-blue);
}

.timeline-desc {
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 0.95rem;
}

.timeline-desc strong {
    color: var(--text-primary);
    font-weight: 700;
}

.education-projects {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 16px;
    margin-left: 68px;
    scroll-margin-top: 92px;
    min-width: 0;
    max-width: 100%;
}

.education-project {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 12px;
    padding: 13px 14px;
    border-radius: 8px;
    background: var(--project-bg);
    border-left: 3px solid var(--color-orange);
    min-width: 0;
    max-width: 100%;
}

.project-logo {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
    border-radius: 6px;
    background: var(--bg-primary);
}

.project-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.project-logo.initial {
    border: 1px solid currentColor;
    font-size: 1.1rem;
    font-weight: 800;
    line-height: 1;
}

.project-logo.initial.glint {
    background: var(--color-purple-bg);
    color: var(--color-purple);
}

.project-logo.initial.mvig {
    background: var(--color-green-bg);
    color: var(--color-green);
}

.project-content {
    min-width: 0;
}

.project-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 2px;
}

.project-header h4 {
    color: var(--text-primary);
    font-size: 0.96rem;
    font-weight: 700;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.project-date {
    color: var(--text-muted);
    font-size: 0.8rem;
    white-space: nowrap;
}

.project-org {
    color: var(--color-orange);
    font-size: 0.86rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.project-org-link {
    color: inherit;
}

.project-org-link:hover {
    color: var(--color-blue);
}

.project-desc {
    color: var(--text-secondary);
    font-size: 0.84rem;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

/* Publications */
.publication-groups {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.pub-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    --pub-accent: var(--color-pink);
    --pub-accent-rgb: 236, 72, 153;
}

.pub-group.category-gui-agent {
    --pub-accent: var(--color-blue);
    --pub-accent-rgb: 59, 130, 246;
}

.pub-group.category-llm-reliability {
    --pub-accent: var(--color-green);
    --pub-accent-rgb: 16, 185, 129;
}

.pub-group.category-ai4science {
    --pub-accent: var(--color-yellow);
    --pub-accent-rgb: 245, 158, 11;
}

.pub-group.category-mental-health {
    --pub-accent: var(--color-pink);
    --pub-accent-rgb: 236, 72, 153;
}

.pub-group.category-other {
    --pub-accent: var(--color-purple);
    --pub-accent-rgb: 139, 92, 246;
}

.pub-group-header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}

.pub-group-header h3 {
    display: flex;
    align-items: center;
    gap: 9px;
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 800;
    line-height: 1.3;
}

.pub-group-header h3::before {
    content: '';
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--pub-accent);
    box-shadow: 0 0 0 4px rgba(var(--pub-accent-rgb), 0.12);
}

.pub-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.pub-item {
    padding: 18px;
    background: var(--bg-secondary);
    border-radius: 12px;
    border-left: 4px solid var(--pub-accent);
    transition: background 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

.pub-item:hover {
    background: var(--bg-hover);
    box-shadow: var(--shadow-md);
    transform: translateX(5px);
}

.pub-main {
    min-width: 0;
}

.pub-main.has-thumbnail {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 20%;
    gap: 16px;
    align-items: start;
}

.pub-copy {
    min-width: 0;
}

.pub-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.4;
    overflow-wrap: anywhere;
    margin-bottom: 8px;
}

.pub-title-accent {
    color: var(--pub-accent);
    font-weight: 850;
}

.pub-authors {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.55;
    overflow-wrap: anywhere;
    margin-bottom: 10px;
}

.pub-authors strong {
    color: var(--text-primary);
    font-weight: 700;
}

.pub-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.pub-status,
.pub-time {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.76rem;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
}

.pub-status {
    background: var(--pub-accent);
    color: white;
}

.pub-status.icml { background: #ff6b6b; }
.pub-status.naacl { background: #14b8a6; }
.pub-status.colm { background: #45b7d1; }
.pub-status.scis { background: #f7b731; }
.pub-status.ncmmsc { background: #5f27cd; }
.pub-status.wsdm { background: #00a6a6; }
.pub-status.emnlp { background: #db2777; }
.pub-status.cvpr { background: #2563eb; }
.pub-status.preprint { background: #6b7280; }
.pub-status.cell { background: #059669; }
.pub-status.imvip { background: #7c3aed; }

.pub-time {
    background: var(--pub-accent);
    color: white;
}

.pub-image-button {
    width: 100%;
    min-width: 0;
    padding: 0;
    border: 0;
    cursor: zoom-in;
    overflow: hidden;
    background: transparent;
    font: inherit;
}

.pub-image-button img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
}

.pub-figure-gallery,
.pub-poster {
    margin-bottom: 14px;
}

.pub-figure-gallery {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.pub-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
}

.pub-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pub-link,
.pub-detail-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 36px;
    padding: 8px 10px;
    border-radius: 8px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    text-align: center;
    transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.pub-link i,
.pub-link .ai,
.pub-link-icon-img {
    flex: 0 0 auto;
    width: 1.05em;
    height: 1.05em;
    font-size: 1.02em;
    line-height: 1;
    text-align: center;
}

.pub-link-icon-img {
    display: block;
    object-fit: contain;
}

.pub-detail-toggle {
    cursor: pointer;
    font-family: inherit;
}

.pub-link:hover,
.pub-detail-toggle:hover,
.pub-detail-toggle[aria-expanded="true"] {
    background: var(--pub-accent);
    border-color: var(--pub-accent);
    color: white;
    box-shadow: var(--shadow-sm);
}

.pub-link-coming-soon {
    position: relative;
    cursor: default;
    background: var(--bg-primary);
    border-color: var(--border-color);
    color: var(--text-muted);
}

.pub-link-coming-soon:hover,
.pub-link-coming-soon:focus-visible {
    background: var(--bg-primary);
    border-color: var(--border-color);
    color: var(--text-muted);
    box-shadow: var(--shadow-sm);
}

.pub-link-coming-soon::before {
    content: attr(data-tooltip);
    position: absolute;
    left: 50%;
    bottom: calc(100% + 8px);
    transform: translateX(-50%) translateY(4px);
    width: max-content;
    max-width: 220px;
    padding: 7px 10px;
    border-radius: 6px;
    background: var(--pub-accent);
    color: white;
    font-size: 0.75rem;
    font-weight: 800;
    line-height: 1.2;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease, transform 0.15s ease;
    z-index: 20;
}

.pub-link-coming-soon::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: calc(100% + 3px);
    transform: translateX(-50%) translateY(4px);
    border: 5px solid transparent;
    border-top-color: var(--pub-accent);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease, transform 0.15s ease;
    z-index: 20;
}

.pub-link-coming-soon:hover::before,
.pub-link-coming-soon:hover::after,
.pub-link-coming-soon:focus-visible::before,
.pub-link-coming-soon:focus-visible::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.image-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
    background: rgba(0, 0, 0, 0.88);
}

.image-modal[hidden] {
    display: none;
}

.image-modal-content {
    display: block;
    max-width: 96vw;
    max-height: 92vh;
    object-fit: contain;
    background: white;
}

.image-modal-close {
    position: fixed;
    top: 18px;
    right: 18px;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    color: white;
    cursor: pointer;
    font: inherit;
    font-size: 1.1rem;
}

.pub-more {
    margin-top: 2px;
}

.pub-more summary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    color: var(--pub-accent);
    font-size: 0.86rem;
    font-weight: 800;
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.pub-more summary::-webkit-details-marker {
    display: none;
}

.pub-more summary i {
    font-size: 0.72rem;
    transition: transform 0.2s ease;
}

.pub-more[open] summary i {
    transform: rotate(90deg);
}

.pub-list-hidden {
    margin-top: 10px;
}

.pub-detail-body {
    margin-top: 12px;
    padding: 12px 14px 14px;
    background: var(--bg-primary);
    border-radius: 10px;
}

.pub-detail-body[hidden] {
    display: none;
}

.pub-detail-body h5 {
    color: var(--text-primary);
    font-size: 0.82rem;
    font-weight: 800;
    margin-bottom: 6px;
}

.pub-detail-body h5:not(:first-child) {
    margin-top: 14px;
}

.pub-detail-body p {
    color: var(--text-secondary);
    font-size: 0.88rem;
    line-height: 1.6;
}

.bibtex-block {
    max-width: 100%;
    max-height: 280px;
    overflow: auto;
    padding: 12px;
    background: var(--bg-secondary);
    border-radius: 8px;
    color: var(--text-secondary);
    font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace;
    font-size: 0.78rem;
    line-height: 1.45;
    white-space: pre;
}

.bibtex-block code {
    font-family: inherit;
}

/* Honors */
.honors-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.honor-card {
    background: var(--bg-secondary);
    min-height: 88px;
    padding: 18px 20px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.honor-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-purple);
}

.honor-card h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.35;
}

.honor-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.summary-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 76px;
    padding: 12px;
    border-radius: 10px;
    background: var(--bg-secondary);
}

.summary-number {
    color: var(--color-purple);
    font-size: 1.6rem;
    font-weight: 800;
    line-height: 1.1;
}

.summary-label {
    color: var(--text-muted);
    font-size: 0.84rem;
    font-weight: 600;
    text-align: center;
}

/* ========== TOP NAVIGATION ========== */
.nav-card {
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
}

.top-nav-card {
    position: sticky;
    top: 0;
    z-index: 20;
    padding-bottom: 12px;
    background: var(--bg-secondary);
}

.quick-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
}

.quick-nav::-webkit-scrollbar {
    display: none;
}

.nav-item {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1 1 0;
    gap: 8px;
    min-width: max-content;
    height: 36px;
    padding: 8px 12px;
    border: none;
    border-radius: 8px;
    background: var(--bg-primary);
    box-shadow: var(--shadow-sm);
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.84rem;
    white-space: nowrap;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.nav-item::before {
    content: '';
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 0;
    height: 2px;
    background: var(--color-blue);
    border-radius: 2px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.nav-item:hover,
.nav-item.active {
    background: var(--bg-primary);
    box-shadow: var(--shadow-md);
    color: var(--color-blue);
}

.nav-item.active::before {
    opacity: 1;
}

.nav-item i {
    font-size: 0.95rem;
}

/* Responsive Design */
@media (max-width: 1400px) {
    .page-container {
        grid-template-columns: 336px minmax(0, 860px);
    }
}

@media (max-width: 1200px) {
    .page-container {
        grid-template-columns: 312px minmax(0, 1fr);
    }

}

@media (max-width: 900px) {
    .page-container {
        grid-template-columns: minmax(0, 1fr);
        padding: 16px;
    }

    .sidebar-left {
        position: relative;
        top: 0;
        min-width: 0;
    }

    .profile-card {
        margin-bottom: 16px;
        min-height: 0;
        min-width: 0;
    }

    .content-main {
        max-height: none;
        overflow: visible;
        padding-right: 0;
    }

    .honor-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .page-container {
        padding: 12px;
    }

    .feed-card {
        border-radius: 12px;
    }

    .card-header {
        padding: 16px;
        flex-wrap: wrap;
    }

    .card-content {
        padding: 16px;
    }

    .card-title {
        font-size: 1.25rem;
    }

    .affiliation-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .timeline {
        padding-left: 28px;
    }

    .timeline::before {
        left: 10px;
    }

    .timeline-marker {
        left: -25px;
    }

    .nav-item {
        flex: 0 0 auto;
        font-size: 0.82rem;
    }

    .pub-links {
        width: 100%;
    }

    .timeline-entry-layout {
        grid-template-columns: 44px minmax(0, 1fr);
        gap: 10px;
    }

    .institution-logo {
        width: 44px;
        height: 44px;
    }

    .education-projects {
        margin-left: 24px;
    }

    .education-project {
        grid-template-columns: 36px minmax(0, 1fr);
        gap: 10px;
        padding: 12px;
    }

    .project-logo {
        width: 36px;
        height: 36px;
    }

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

    .project-date {
        white-space: normal;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.feed-card {
    animation: fadeIn 0.5s ease-out;
}

.feed-card:nth-child(1) { animation-delay: 0.1s; }
.feed-card:nth-child(2) { animation-delay: 0.2s; }
.feed-card:nth-child(3) { animation-delay: 0.3s; }
.feed-card:nth-child(4) { animation-delay: 0.4s; }
.feed-card:nth-child(5) { animation-delay: 0.5s; }
.feed-card:nth-child(6) { animation-delay: 0.6s; }

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Selection */
::selection {
    background: var(--color-blue);
    color: white;
}

