/* Global Styles */
:root {
    --bg-color: #ffffff;
    --text-color: #333333;
    --accent-color: #0066cc;
    /* Academic Blue */
    --link-color: #0056b3;
    --secondary-text: #666666;
    --border-color: #eeeeee;
    --sidebar-width: 300px;
    --max-width: 1100px;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

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

a:hover {
    color: #003d82;
    text-decoration: underline;
}

h1,
h2,
h3,
h4 {
    font-family: 'Playfair Display', serif;
    color: #000;
    margin-top: 1.5em;
    margin-bottom: 0.5em;
}

h1 {
    font-size: 2rem;
    margin-top: 0;
}

h2 {
    font-size: 1.75rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px;
}

h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #444;
}

/* Layout */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    padding: 40px 20px;
    gap: 60px;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    flex-shrink: 0;
    text-align: left;
    position: sticky;
    top: 40px;
    height: fit-content;
}

.profile-photo {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.profile-section h1 {
    font-size: 1.8rem;
    margin-bottom: 5px;
}

.title,
.affiliation,
.scholars {
    margin: 5px 0;
    color: var(--secondary-text);
    font-size: 0.95rem;
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 20px;
}

.cv-links {
    margin-top: 20px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-cv {
    display: inline-block;
    padding: 6px 12px;
    border: 1px solid var(--text-color);
    color: var(--text-color);
    border-radius: 4px;
    font-size: 0.9rem;
    text-decoration: none;
}

.btn-cv:hover {
    background-color: var(--text-color);
    color: #fff;
    text-decoration: none;
}

.xiaohongshu {
    margin-top: 30px;
    font-size: 0.85rem;
    color: var(--secondary-text);
    border-top: 1px solid var(--border-color);
    padding-top: 10px;
}

/* Main Content */
.content {
    flex-grow: 1;
    min-width: 0;
    /* Prevents overflow */
}

section {
    margin-bottom: 60px;
}

/* Specific Section Styles */
.news-list {
    list-style: none;
    padding: 0;
}

.news-list li {
    margin-bottom: 12px;
    position: relative;
    padding-left: 15px;
}

.news-list li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--accent-color);
}

/* Publications */
.publication-item {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    align-items: flex-start;
}

.pub-image img {
    width: 160px;
    height: auto;
    border-radius: 4px;
    border: 1px solid #eee;
}

.pub-content {
    flex: 1;
}

.pub-content h4 {
    margin: 0 0 5px 0;
    font-size: 1.1rem;
}

.pub-content .venue {
    font-style: italic;
    color: var(--secondary-text);
    font-weight: 500;
}

.pub-content .highlights {
    font-size: 0.9rem;
    color: #555;
    margin-top: 8px;
    background: #f9f9f9;
    padding: 10px;
    border-left: 3px solid var(--accent-color);
}

/* Simple Lists */
.simple-list li {
    margin-bottom: 8px;
}

/* Education & Jobs */
.edu-item,
.job-item {
    margin-bottom: 25px;
}

.edu-header,
.job-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.header-title,
.job-header {
    display: flex;
    align-items: center;
}

.edu-header h3,
.job-item h3 {
    margin: 0;
    font-size: 1.15rem;
    color: var(--primary-color);
}

.date {
    font-size: 0.9rem;
    color: var(--secondary-text);
    font-weight: 500;
}

.role {
    font-weight: 600;
    color: #444;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
        padding: 20px;
    }

    .sidebar {
        width: 100%;
        position: relative;
        text-align: center;
        top: 0;
        border-bottom: 1px solid var(--border-color);
        padding-bottom: 20px;
        margin-bottom: 20px;
    }

    .contact-links {
        align-items: center;
    }

    .cv-links {
        justify-content: center;
    }

    .publication-item {
        flex-direction: column;
    }

    .pub-image img {
        width: 100%;
        max-width: 300px;
    }
}

/* Logo Styling */
.inst-logo {
    height: 28px;
    /* Balanced with 1.15rem text */
    width: auto;
    margin-right: 12px;
    vertical-align: middle;
    border-radius: 3px;
}

.sidebar-logo {
    height: 48px;
    /* Larger for sidebar */
    display: block;
    margin: 8px 0;
}

/* Apple logo visual adjustment */
.apple-logo {
    height: 26px;
    margin-bottom: 2px;
}

/* Logo Styling with Tables */
.invisible-table {
    width: 100%;
    border-collapse: collapse;
    border: none;
    margin-bottom: 8px;
}

.invisible-table td {
    padding: 0;
    border: none;
    vertical-align: middle;
}

.logo-cell {
    width: 45px;
    /* Fixed width for consistent alignment */
    padding-right: 15px !important;
    /* Force padding */
    text-align: center;
}

.content-cell {
    text-align: left;
}

/* Override previous logo sizing for table cells if needed */
.inst-logo {
    max-height: 40px;
    /* Limit height within cell */
    max-width: 100%;
    /* Limit width within cell */
    width: auto;
    height: auto;
    display: block;
    margin: 0 auto;
    border-radius: 4px;
}

/* Social Icon Styles */
.social-table td {
    padding-bottom: 8px;
    /* Spacing between links */
}

.social-logo-cell {
    width: 30px;
    padding-right: 8px !important;
    vertical-align: middle;
    text-align: center;
}

.social-logo {
    max-height: 18px !important;
    /* Smaller for social icons */
    height: 18px !important;
    width: auto;
    display: block;
    margin: 0 auto;
    object-fit: contain;
}

.sidebar-table {
    width: 100%;
    margin-top: 10px;
}

.sidebar-logo-cell {
    width: 60px;
    padding-right: 10px !important;
    vertical-align: top;
}

.sidebar-logo {
    width: 100%;
    height: auto;
    border-radius: 4px;
}