:root {
    --background-color: #f8f9fa;
    --card-background-color: #ffffff;
    --text-color-primary: #2c3e50;
    --text-color-secondary: #444;
    --text-color-tertiary: #666;
    --text-color-muted: #888;
    --text-color-faint: #999;
    --heading-color: #1a1a1a;
    --link-color: #2563eb;
    --link-color-hover: #1d4ed8;
    --border-color: #e9ecef;
    --border-color-light: #e0e0e0;
    --shadow-color: rgba(0, 0, 0, 0.05);
    --shadow-color-hover: rgba(0, 0, 0, 0.1);
    --accent-background: #eff6ff;
    --accent-background-hover: #f0f7ff;
    --button-background: #f0f0f0;
    --button-text-color: #666;
    --button-border-color: #e0e0e0;
    --award-background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    --award-color: #78350f;
}

body.darkmode--activated {
    --background-color: #121212;
    --card-background-color: #1e1e1e;
    --text-color-primary: #e0e0e0;
    --text-color-secondary: #c0c0c0;
    --text-color-tertiary: #a0a0a0;
    --text-color-muted: #888;
    --text-color-faint: #666;
    --heading-color: #ffffff;
    --link-color: #58a6ff;
    --link-color-hover: #80bfff;
    --border-color: #3a3a3a;
    --border-color-light: #4a4a4a;
    --shadow-color: rgba(0, 0, 0, 0.2);
    --shadow-color-hover: rgba(0, 0, 0, 0.3);
    --accent-background: #252525;
    --accent-background-hover: #2d2d2d;
    --button-background: #3a3a3a;
    --button-text-color: #e0e0e0;
    --button-border-color: #4a4a4a;
    --award-background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    --award-color: #78350f;
}


/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.7;
    color: var(--text-color-primary);
    background-color: var(--background-color);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color 0.3s ease, color 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

/* Scroll Progress Bar */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, var(--link-color), var(--link-color-hover));
    z-index: 1000;
    transition: width 0.1s ease-out;
    box-shadow: 0 0 10px rgba(37, 99, 235, 0.5);
}

body.darkmode--activated .scroll-progress {
    background: linear-gradient(90deg, var(--link-color), var(--link-color-hover));
    box-shadow: 0 0 10px rgba(88, 166, 255, 0.5);
}

body.darkmode--activated .profile-photo:hover {
    box-shadow: 0 12px 32px rgba(88, 166, 255, 0.4);
}

/* Table of Contents */
.toc {
    position: fixed;
    left: 20px;
    top: 100px;
    width: 160px;
    z-index: 100;
    transition: transform 0.3s ease;
}

.toc.hidden {
    transform: translateX(-200px);
}

.toc-content {
    background: var(--card-background-color);
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 2px 8px var(--shadow-color);
    border: 1px solid var(--border-color-light);
}

.toc-toggle-btn {
    position: fixed;
    left: 20px;
    top: 40px;
    width: 40px;
    height: 40px;
    background: var(--card-background-color);
    border: 1px solid var(--border-color-light);
    border-radius: 8px;
    box-shadow: 0 2px 8px var(--shadow-color);
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 101;
    transition: all 0.2s ease;
}

.toc-toggle-btn:hover {
    background: var(--button-background);
}

.toc-toggle-btn svg {
    width: 20px;
    height: 20px;
    stroke: var(--text-color-tertiary);
}

#theme-switcher-container {
    position: fixed;
    left: 32px;
    bottom: 32px;
    z-index: 101;
}

.theme-toggle-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--card-background-color);
    color: var(--text-color-tertiary);
    border: 1px solid var(--border-color-light);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1.1rem;
}

.theme-toggle-btn:hover {
    color: var(--link-color);
    border-color: var(--link-color);
}

.auto-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.6rem;
    font-weight: 600;
    color: var(--text-color-tertiary);
    background-color: var(--card-background-color);
    padding: 0 1px;
    border-radius: 3px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.theme-toggle-btn.auto-mode .auto-label {
    opacity: 1;
}

.toc-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--heading-color);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.toc-list li {
    margin-bottom: 8px;
}

.toc-link {
    display: block;
    color: var(--text-color-tertiary);
    text-decoration: none;
    font-size: 0.95rem;
    padding: 6px 12px;
    border-radius: 4px;
    transition: all 0.2s ease;
    position: relative;
}

.toc-link:hover {
    color: var(--link-color);
    background-color: var(--accent-background-hover);
}

.toc-link.active {
    color: var(--link-color);
    background-color: var(--accent-background);
    font-weight: 500;
}

.toc-link.active::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 16px;
    background-color: var(--link-color);
    border-radius: 2px;
}

.back-to-top {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    margin: 16px auto 0;
    padding: 0;
    background: var(--button-background);
    color: var(--button-text-color);
    border: 1px solid var(--button-border-color);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
}

.back-to-top:hover {
    background: var(--link-color);
    color: white;
    border-color: var(--link-color);
    transform: translateY(-2px);
}

.back-to-top:active {
    transform: translateY(0);
}

/* Container */
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 60px 40px;
    width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

/* Header */
.header {
    margin-bottom: 32px;
    padding-bottom: 24px;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 40px;
}

.header-text {
    flex: 1;
}

.header-photo {
    flex-shrink: 0;
}

.profile-photo {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 4px 12px var(--shadow-color-hover);
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.4s ease;
    opacity: 1;
    animation: fadeInScale 0.6s ease-out;
    position: relative;
    cursor: pointer;
    transform: scale(1);
}

.profile-photo:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 32px rgba(37, 99, 235, 0.3);
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.name {
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--heading-color);
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

.title {
    font-size: 1.125rem;
    color: var(--text-color-tertiary);
    font-weight: 400;
    margin-bottom: 8px;
}

.title:last-of-type {
    margin-bottom: 0;
}

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

.links a {
    color: var(--link-color);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    white-space: nowrap;
    position: relative;
    padding: 8px 12px;
    border-radius: 6px;
}

.links a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--accent-background);
    border-radius: 6px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.links a:hover {
    color: var(--link-color-hover);
    transform: translateY(-2px);
}

.links a:hover::before {
    opacity: 1;
}

.links a i {
    margin-right: 8px;
}

/* Poetry Display */
.poetry-container {
    margin: 32px 0 48px 0;
    padding: 24px 32px;
    background: linear-gradient(135deg, var(--accent-background) 0%, transparent 100%);
    border-left: 3px solid var(--link-color);
    border-radius: 8px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    transition: all 0.3s ease;
    opacity: 0;
}

.poetry-container.loaded {
    opacity: 1;
}

.poetry-content {
    flex: 1;
    min-width: 0;
}

.poetry-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-color-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 12px;
    opacity: 0.7;
}

.poetry-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-color-secondary);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    margin-bottom: 8px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    font-style: italic;
    letter-spacing: 0.02em;
}

.poetry-author {
    font-size: 0.9rem;
    color: var(--text-color-muted);
    text-align: right;
    font-style: normal;
}

.poetry-refresh {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    background: transparent;
    border: 1px solid var(--border-color-light);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-color-tertiary);
    transition: all 0.3s ease;
    padding: 0;
}

.poetry-refresh:hover {
    background: var(--accent-background);
    border-color: var(--link-color);
    color: var(--link-color);
    transform: rotate(180deg);
}

.poetry-refresh svg {
    width: 16px;
    height: 16px;
}

.poetry-container.loading .poetry-refresh {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Sections */
.section {
    margin-bottom: 48px;
    padding: 32px;
    background-color: var(--card-background-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 2px 8px var(--shadow-color);
    transition: all 0.3s ease;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
    word-wrap: break-word;
    overflow-wrap: break-word;
    transform-style: preserve-3d;
    perspective: 1000px;
}

.section:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px var(--shadow-color-hover);
}

.section h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--heading-color);
    margin-bottom: 20px;
    letter-spacing: -0.01em;
}

.section p {
    color: var(--text-color-secondary);
    margin-bottom: 16px;
    line-height: 1.8;
}

.section p a {
    color: var(--link-color);
    text-decoration: none;
    transition: all 0.2s ease;
    display: inline;
    background-image: linear-gradient(var(--link-color), var(--link-color));
    background-size: 0% 2px;
    background-repeat: no-repeat;
    background-position: left bottom;
}

.section p a:hover {
    color: var(--link-color-hover);
    background-size: 100% 2px;
}

.research-interests {
    color: var(--text-color-secondary);
}

/* News */
.news-list {
    margin-bottom: 12px;
}

/* News scrollable container */
#news-container {
    max-height: 500px;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 8px;
}

/* Scrollbar styling */
#news-container::-webkit-scrollbar {
    width: 6px;
}

#news-container::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 3px;
}

#news-container::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 3px;
}

#news-container::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.2);
}

body.darkmode--activated #news-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
}

body.darkmode--activated #news-container::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Firefox scrollbar */
#news-container {
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.1) transparent;
}

body.darkmode--activated #news-container {
    scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

.news-item {
    display: flex;
    gap: 16px;
    margin-bottom: 12px;
    line-height: 1.6;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.news-date {
    flex-shrink: 0;
    min-width: 80px;
    color: var(--link-color);
    font-weight: 500;
    font-size: 0.9rem;
}

.news-content {
    color: var(--text-color-secondary);
    font-size: 0.95rem;
    flex: 1;
    min-width: 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.news-content p {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.news-content a {
    overflow-wrap: break-word;
    display: inline;
    color: var(--link-color);
    text-decoration: none;
    transition: all 0.2s ease;
    background-image: linear-gradient(var(--link-color), var(--link-color));
    background-size: 0% 2px;
    background-repeat: no-repeat;
    background-position: left bottom;
}

.news-content a:hover {
    color: var(--link-color-hover);
    background-size: 100% 2px;
}

.news-hidden {
    margin-top: 0;
}

.news-toggle {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 0;
    background: transparent;
    color: var(--link-color);
    border: none;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 4px;
}

.news-toggle:hover {
    color: var(--link-color-hover);
}

.news-toggle:hover .toggle-icon {
    transform: translateY(2px);
}

.toggle-icon {
    transition: all 0.3s ease;
    width: 14px;
    height: 14px;
}

.news-empty,
.news-error {
    color: var(--text-color-muted);
    font-style: italic;
    font-size: 0.95rem;
}

/* Publications */
.publication {
    margin-bottom: 32px;
}

.publication:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.pub-title {
    font-size: 1.125rem;
    font-weight: 500;
    color: var(--heading-color);
    margin-bottom: 8px;
    line-height: 1.5;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.pub-authors {
    color: var(--text-color-tertiary);
    font-size: 0.95rem;
    margin-bottom: 8px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.pub-venues {
    margin-bottom: 8px;
}

.pub-venue-item {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

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

.venue-name {
    color: var(--text-color-muted);
    font-size: 0.95rem;
    font-style: italic;
}

.venue-award {
    display: inline-block;
    padding: 2px 8px;
    background: var(--award-background);
    color: var(--award-color);
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 3px;
    font-style: normal;
}

.pub-links {
    font-size: 0.95rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.pub-links a {
    color: var(--link-color);
    text-decoration: none;
    transition: all 0.2s ease;
    overflow-wrap: break-word;
    display: inline;
    background-image: linear-gradient(var(--link-color), var(--link-color));
    background-size: 0% 2px;
    background-repeat: no-repeat;
    background-position: left bottom;
}

.pub-links a:hover {
    color: var(--link-color-hover);
    background-size: 100% 2px;
}

/* Publications with Media */
.publication.has-media {
    display: flex;
    gap: 20px; /* Space between media and text */
    align-items: stretch; /* Stretch items to match height */
}

.pub-media {
    flex-shrink: 0; /* Prevent media from shrinking */
    width: 180px; /* Fixed width for media container */
    overflow: hidden; /* Hide overflow if media is larger */
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pub-media img,
.pub-media video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain; /* Cover the area without distortion */
    border-radius: 8px;
}

.pub-details {
    flex-grow: 1; /* Allow details to take remaining space */
}

/* Responsive adjustments for publications with media */
@media (max-width: 768px) {
    .publication.has-media {
        flex-direction: column;
        align-items: center;
        gap: 16px;
        width: 100%;
        max-width: 100%;
    }

    .pub-media {
        width: 100%;
        max-width: 100%;
        height: auto;
        box-sizing: border-box;
    }

    .pub-media img,
    .pub-media video {
        max-width: 100%;
        height: auto;
    }
}


/* Experience */
.experience {
    margin-bottom: 24px;
}

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

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

.exp-date {
    color: var(--text-color-muted);
    font-size: 0.95rem;
}

.exp-org {
    color: var(--text-color-tertiary);
    margin-bottom: 8px;
}

.experience p {
    color: var(--text-color-tertiary);
    font-size: 0.95rem;
}

/* Services */
.service-category {
    margin-bottom: 24px;
}

.service-category:last-child {
    margin-bottom: 0;
}

.service-title {
    font-size: 1.125rem;
    font-weight: 500;
    color: var(--heading-color);
    margin-bottom: 12px;
}

.service-list {
    list-style: none;
    padding-left: 0;
}

.service-list li {
    color: var(--text-color-tertiary);
    font-size: 0.95rem;
    margin-bottom: 8px;
    padding-left: 20px;
    position: relative;
}

.service-list li:before {
    content: "•";
    color: var(--link-color);
    font-weight: bold;
    position: absolute;
    left: 0;
}

/* Footer */
.footer {
    margin-top: 80px;
    padding-top: 32px;
    text-align: center;
}

.footer p {
    color: var(--text-color-faint);
    font-size: 0.875rem;
}

/* Fade-in Animation */
.fade-in-section {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-in-section.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Image Lazy Loading Animation */
img:not(.profile-photo) {
    transition: opacity 0.4s ease;
}

img[loading="lazy"]:not(.profile-photo) {
    opacity: 0;
}

img.loaded:not(.profile-photo) {
    opacity: 1;
    animation: fadeInImage 0.5s ease-out;
}

@keyframes fadeInImage {
    from {
        opacity: 0;
        filter: blur(5px);
    }
    to {
        opacity: 1;
        filter: blur(0);
    }
}

/* Smooth Page Load Animation */
body {
    animation: pageFadeIn 0.5s ease-out;
}

@keyframes pageFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Publication Card Enhancements */
.publication {
    transition: all 0.3s ease;
    padding: 8px;
    border-radius: 6px;
    margin-left: -8px;
    margin-right: -8px;
}

.publication:hover {
    background-color: var(--accent-background);
    transform: translateX(4px);
    padding-left: 12px;
}

.pub-title {
    transition: color 0.2s ease;
}

.publication:hover .pub-title {
    color: var(--link-color);
}

/* Enhanced Button Hover Effects */
.toc-toggle-btn,
.theme-toggle-btn,
.back-to-top {
    position: relative;
    overflow: hidden;
}

.toc-toggle-btn::before,
.theme-toggle-btn::before,
.back-to-top::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.toc-toggle-btn:hover::before,
.theme-toggle-btn:hover::before,
.back-to-top:hover::before {
    width: 300px;
    height: 300px;
}

/* News Item Hover Effect */
.news-item {
    transition: all 0.2s ease;
    padding: 4px 8px;
    border-radius: 4px;
    margin-left: -8px;
    margin-right: -8px;
}

.news-item:hover {
    background-color: var(--accent-background);
    transform: translateX(4px);
    padding-left: 12px;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .toc {
        transform: translateX(-200px);
    }

    .toc.visible {
        transform: translateX(0);
    }

    .toc-toggle-btn {
        display: flex;
    }
}

@media (max-width: 768px) {
    /* 防止整体溢出 */
    html, body {
        overflow-x: hidden;
        width: 100%;
        max-width: 100%;
    }

    /* 移动端主题切换按钮 - 移到右上角并缩小 */
    #theme-switcher-container {
        left: auto;
        right: 16px;
        bottom: auto;
        top: 16px;
    }

    .theme-toggle-btn {
        width: 30px;
        height: 30px;
        font-size: 1rem;
    }

    .auto-label {
        font-size: 0.55rem;
    }

    .container {
        padding: 40px 16px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        overflow-x: hidden;
    }

    .section {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        overflow-x: hidden;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    /* Header 区域 */
    .header-content {
        flex-direction: column-reverse;
        align-items: center;
        gap: 24px;
        width: 100%;
        max-width: 100%;
    }

    .header-text {
        text-align: center;
        width: 100%;
        max-width: 100%;
    }

    .profile-photo {
        width: 150px;
        height: 150px;
    }

    .links {
        justify-content: center;
        flex-wrap: wrap;
        width: 100%;
        max-width: 100%;
    }

    .links a {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
    }

    .name {
        font-size: 2rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .title {
        font-size: 1rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    /* Poetry Display - Mobile */
    .poetry-container {
        margin: 0 0 32px 0;
        padding: 20px 16px;
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .poetry-text {
        font-size: 1rem;
        line-height: 1.7;
    }

    .poetry-author {
        text-align: left;
        font-size: 0.85rem;
    }

    .poetry-refresh {
        align-self: flex-end;
    }

    .section h2 {
        font-size: 1.25rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .section p {
        word-wrap: break-word;
        overflow-wrap: break-word;
        max-width: 100%;
    }

    /* 新闻区域 - 防止溢出 */
    #news-container {
        max-height: 400px;
    }

    .news-item {
        flex-direction: column;
        gap: 8px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .news-date {
        min-width: auto;
        width: 100%;
    }

    .news-content {
        width: 100%;
        max-width: 100%;
        word-wrap: break-word;
        overflow-wrap: break-word;
        overflow-x: hidden;
    }

    .news-content p {
        word-wrap: break-word;
        overflow-wrap: break-word;
        max-width: 100%;
    }

    .news-content a {
        overflow-wrap: break-word;
        display: inline;
    }

    .news-content a:hover {
        background-size: 100% 2px;
    }

    .news-toggle {
        width: 100%;
        max-width: 100%;
    }

    /* 出版物区域 - 防止溢出 */
    .publication {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        overflow-x: hidden;
    }

    .pub-title {
        word-wrap: break-word;
        overflow-wrap: break-word;
        max-width: 100%;
        font-size: 1rem;
    }

    .pub-authors {
        word-wrap: break-word;
        overflow-wrap: break-word;
        max-width: 100%;
        font-size: 0.9rem;
    }

    .pub-venues {
        word-wrap: break-word;
        overflow-wrap: break-word;
        max-width: 100%;
    }

    .pub-links {
        word-wrap: break-word;
        overflow-wrap: break-word;
        max-width: 100%;
        font-size: 0.9rem;
    }

    .pub-links a {
        overflow-wrap: break-word;
        display: inline;
        max-width: 100%;
    }

    .pub-links a:hover {
        background-size: 100% 2px;
    }

    .pub-details {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    /* Experience */
    .exp-header {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
        max-width: 100%;
    }

    .exp-date {
        margin-top: 4px;
        word-wrap: break-word;
    }

    .exp-org {
        word-wrap: break-word;
        overflow-wrap: break-word;
        max-width: 100%;
    }

    .experience p {
        word-wrap: break-word;
        overflow-wrap: break-word;
        max-width: 100%;
    }

    /* Services */
    .service-category {
        width: 100%;
        max-width: 100%;
    }

    .service-category p {
        word-wrap: break-word;
        overflow-wrap: break-word;
        max-width: 100%;
    }

    /* Research Interests */
    .research-interests {
        word-wrap: break-word;
        overflow-wrap: break-word;
        max-width: 100%;
    }

    /* 数学公式 - 移动端防止溢出 */
    .news-content .katex,
    .news-content .katex-display {
        max-width: 100%;
        overflow-x: auto;
        overflow-y: hidden;
    }

    .news-content .katex-display {
        margin: 1em 0;
    }
}

/* Print Styles */
@media print {
    body {
        font-size: 12pt;
    }

    .container {
        max-width: 100%;
        padding: 0;
    }

    .links a {
        color: #000;
        text-decoration: underline;
    }

    .section {
        page-break-inside: avoid;
    }
}