/* 导航栏优化 */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
.masthead {
    background-color: var(--sidebar-bg);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}
.menu {
    display: none !important;
    visibility: hidden !important; /* 双重保险，防止JS动态显示 */
    opacity: 0 !important;
    pointer-events: none !important; /* 禁止点击交互 */
}

.form-option--checkbox:has(.hide-controls) {
    display: none !important;
}

.masthead__menu {
    display: flex;
    justify-content: center; /* 水平居中 */
}
.masthead__menu ul.visible-links {
    display: flex;
    justify-content: center; /* 水平居中列表项 */
    padding: 0;
    margin: 0;
    list-style: none;
}
.masthead__menu-item a {
    color: #cf6a51;
    transition: var(--transition);
    padding: 0.8rem 1rem;
    text-align: center;
    display: block;
}
.masthead__menu li {
    margin: 0 1rem;
}
.masthead__menu-item a:hover,
.masthead__menu-item a.active {
    color: var(--primary-color);
}

.masthead__inner-wrap {
    background-color: #fff;
}

body {
    margin-top: 12px !important;
    padding-top: 25px !important;
    margin: 0 auto;
    width: auto;
    min-width: auto;
    overflow-x: auto;
    overflow-y: auto;
}

.pub-page-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
}

@media (min-width: 768px) and (max-width: 1024px) {
    .pub-page-container {
        margin-left: 30px !important;
        padding-right: 1.5rem;
        padding-top: 20px !important;
        margin-top: 20px !important;
    }
    .sidebar {
        width: 240px; /* 适当缩小侧边栏宽度 */
        max-height: calc(100vh - 100px);
        margin-left: -20px;
    }
    .form-option--checkbox:has(.hide-controls) {
        display: none !important;
    }
}
@media (min-width: 768px) and (max-width: 850px) {
    .sidebar {
        width: 220px; /* 进一步缩小侧边栏 */
        margin-left: 20px;
    }
    .form-option--checkbox:has(.hide-controls) {
        display: none !important;
    }
}
@media (min-width: 1025px) {
    .pub-page-container {
        margin-left: auto !important;
        margin-right: auto !important;
        /*padding-top: 20px !important;*/
        margin-top: 20px !important;
    }
    .form-option--checkbox:has(.hide-controls) {
        display: none !important;
    }
}
@media (max-width: 768px) {
    .pub-page-container {
        padding: 20px 5%;
        padding-top: 20px !important;
        margin-top: 20px !important;
    }
    .form-option--checkbox:has(.hide-controls) {
        display: none !important;
    }
    .cv-header h1 {
        font-size: 1.8rem;
    }
}

.cv-header {
    text-align: center;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 2px solid #cf6a51;
}

.cv-header h1 {
    color: #cf6a51;
    margin-bottom: 10px;
    font-size: 2.2rem;
}

.pub-links {
    margin: 10px 0 20px;
    color: #000;
}
html[data-theme="dark"] .pub-links {
    color: #b5b5b5 !important; 
}
.orcid-link {
    color: #cf6a51;
    text-decoration: none;
    font-weight: 600;
    border-bottom: 1px dotted #cf6a51;
}

.orcid-link:hover {
    color: #cf583a;
    border-bottom: 1px solid #cf6a51;
}

.authorship-note {
    margin-bottom: 10px;
    font-size: 0.7rem;
    color: #000;
}
html[data-theme="dark"] .authorship-note {
    color: #b5b5b5 !important; 
}
html[data-theme="dark"] .total-citations {
    color: #b5b5b5 !important; 
}
.pub-container {
    display: flex !important;
    flex-direction: column !important;
    gap: 0px !important;
    visibility: visible !important;
    height: auto !important;
}

.pub-card {
    display: block !important;
    visibility: visible !important;
    border: 10px solid transparent;
    border-radius: 20px;
    padding: 5px;
    font-size: 0.6rem;
    background: transparent;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
    transition: all 0.3s ease;
    position: relative;
    margin-top: 1px;
}

.pub-card:hover {
    box-shadow: 10px 15px 10px rgba(0, 0, 0, 0.08);
    border-color: transparent;
}

.pub-header-info {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 5px;
    position: relative;
}

.total-citations {
    color: #000;
    font-size: 0.7rem;
    font-weight: normal;
}

.pub-number {
    font-weight: bold;
    font-size: 1.0rem;
    color: #cf6a51;
    min-width: 50px;
    text-align: right;
    padding-top: 5px;
}

.pub-card h3 {
    margin: 10px;
    font-size: 0.9rem;
    flex: 1;
}

.pub-card h3 a {
    color: #cf6a51;
    text-decoration: none;
    transition: color 0.2s;
}

.pub-card h3 a:hover {
    color: #cf6a51;
    text-decoration: underline;
}

.oa-badge {
    background-color: #4CAF50;
    color: white;
    padding: 1px 6px;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-left: 10px;
    align-self: center;
}

.if-badge {
    background-color: #cf8776;
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-left: 10px;
}

.pub-authors {
    color: #000;
    margin-bottom: 8px;
    font-size: 0.8rem;
    font-family: 'Times New Roman', Tahoma, Geneva, Verdana, sans-serif;
}

sup {
    font-size: 0.5rem;
    vertical-align: super;
    margin-left: 1px;
    font-weight: 600;
    color: #1F51FF;
}

.pub-journal {
    color: #000;
    margin-bottom: 12px;
    font-size: 0.7rem;
    font-style: italic;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.pub-status {
    padding: 1px 2px;
    border-radius: 2px;
    font-weight: 400;
    font-size: 0.7rem;
}

.status-online {
    color: #155724 !important;
    background-color: #d4edda !important;
    border: 0.5px solid #c3e6cb !important;
}

.status-accepted {
    color: #856404 !important;
    background-color: #fff3cd !important;
    border: 0.5px solid #ffeeba !important;
}

.status-under-review {
    color: #0c5460 !important;
    background-color: #d1ecf1 !important;
    border: 0.5px solid #bee5eb !important;
}

.pub-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    color: #000;
    font-size: 0.7rem;
    margin-bottom: -20px;
    padding-bottom: 5px;
    align-items: center; 
}
.pub-meta > span {
    display: flex;
    align-items: center;
}

.pub-doi a {
    color: #0066cc;
    text-decoration: none;
    font-size: 0.7rem;
}

.pub-doi a:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .pub-header-info {
        flex-direction: column;
    }

    .pub-number {
        align-self: flex-start;
        padding-bottom: 5px;
    }

    .pub-journal {
        flex-direction: column;
        align-items: flex-start;
    }

    .if-badge {
        margin-left: 0;
        margin-top: 5px;
    }

    .pub-meta {
        flex-direction: column;
        gap: 0px;
    }
}

@keyframes heartbeat {
    0% {
        transform: scale(1);
    }

    14% {
        transform: scale(1.1);
    }

    28% {
        transform: scale(1);
    }

    42% {
        transform: scale(1.1);
    }

    70% {
        transform: scale(1);
    }
}

.pulse {
    animation: heartbeat 1.5s infinite;
    display: inline-block;
}
html[data-theme='dark'] .pub-authors,
html[data-theme='dark'] .pub-journal,
html[data-theme='dark'] .pub-date {
  color: #b5b5b5 !important;
}

html[data-theme="dark"] .pub-card .cited-label {
    color: #b5b5b5 !important; 
}

html[data-theme="dark"] .pub-card .pub-doi {
    color: #b5b5b5 !important; 
}
.primary-author {
    color: #1F51FF;
    font-weight: 600;
    font-family: 'Times New Roman', Times, serif;
}
html[data-theme="dark"] .primary-author {
    color: #0085de !important; /* 深色模式改亮色或暖色 */
}

html[data-theme="dark"] .pub-authors sup,
html[data-theme="dark"] .pub-authors .supref {
  color: #0085de !important;
}

@media (prefers-color-scheme: dark) {
    .pub-page-container .pub-authors .primary-author {
        color: #cf6a51 !important;
    }
}

/* 侧边栏优化 */
.sidebar {
    margin-bottom: 2rem;
    transition: var(--transition);
    padding-top: 2rem !important;
    margin-left: 60px; 
    overflow: hidden;
}

.sidebar-inner:hover {
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}
@media (min-width: 768px) {
    .sidebar {
        position: fixed;
        top: 63px;
        margin-left: -58.58px;
        width: 280px;
        max-height: calc(100vh - 120px);
        /*overflow-y: auto;*/
        z-index: 1000;
        overflow: hidden;
    }
    .main-content {
        margin-left: 320px;
        padding-right: 20px;
    }
}

.sidebar-inner {
    background: var(--sidebar-bg, #ffffff);
    border-radius: 12px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
    padding: 1.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: background-color;
    overflow: hidden;
}

.sidebar-inner:hover {
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
    transform: translateY(-3px) scale(1.03);
}

.sidebar .section {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--sidebar-border, #e2e8f0);
}

[data-theme="dark"] .sidebar .section {
    border-bottom: 1px solid transparent !important;
}

.sidebar .section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.sidebar-title {
    font-size: 1.1rem;
    margin-top: 0;
    margin-bottom: 1rem;
    color: var(--sidebar-title, #2d3748);
    font-weight: 600;
    position: relative;
    padding-bottom: 0.5rem;
}

[data-theme="dark"] .sidebar-title {
    color: transparent !important;
}

.sidebar-title:after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 35px;
    height: 2px;
    background: #3182ce;
}

.sidebar-image {
    margin-bottom: 1rem;
    border-radius: 10px;
    overflow: hidden;
}

.sidebar-img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 10px;
    transition: transform 0.3s ease;
}

.sidebar-img:hover {
    transform: scale(1.04);
}

.sidebar-text {
    color: var(--sidebar-text, #4a5568);
    line-height: 1.65;
    font-size: 0.95rem;
}

[data-theme="dark"] .sidebar-text {
    color: #cbd5e0;
}

.sidebar-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-nav li {
    margin-bottom: 0.5rem;
}

.sidebar-nav a {
    color: var(--sidebar-link, #4a5568);
    text-decoration: none;
    transition: all 0.25s ease;
    display: block;
    padding: 0.35rem 0;
}

#theme-toggle a:hover i {
    transform: rotate(15deg);
    color: black;
}

.author-profile {
    text-align: center;
}
[data-theme="dark"] .pub-doi a {
    color: var(--secondary-color-light, #ffd700);
}
.author-profile .author__avatar {
    border-radius: 50%;
    margin: 0 auto 1rem;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
    width: 120px;
    height: 150px;
    object-fit: cover;
}

[data-theme="dark"] .author-profile .author__avatar {
    border-color: transparent;
}

.author-profile .author__avatar:hover {
    transform: scale(1.05);
}

.author-profile .author__name {
    font-size: 1.5rem;
    margin-bottom: 0.4rem;
    font-weight: normal;
    color: var(--sidebar-title, #225aa3);
    font-family: "KaiTi", "STKaiti", "SimKai", "楷体", serif;
}

[data-theme="dark"] .author-profile .author__name {
    color: #cf6a51;
}

.author-profile .author__bio {
    color: var(--sidebar-text, #4a5568);
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

[data-theme="dark"] .author-profile .author__bio {
    color: #cf6a51;
}

html[data-theme="dark"] .masthead {
    background-color: transparent !important;
    box-shadow: none !important;
}

html[data-theme="dark"] .visible-links {
    background-color: transparent !important;
}
html[data-theme="dark"] .persist {
    background-color: transparent !important;
}
html[data-theme="dark"] .masthead__inner-wrap {
    background-color: transparent !important;
}
html[data-theme="dark"] .masthead__menu-item {
    background-color: transparent !important;
}
html[data-theme="dark"] .sidebar-inner {
    background-color: transparent !important;
}

.page__footer-copyright {
    font-size: 0.95rem;
    color: #4a5568;
}
.page__footer {
    margin-top: 3rem;
    padding: 0 0;
    background-color: var(--sidebar-bg);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
    text-align: center;
}
html[data-theme="dark"] .page__footer {
    background-color: transparent !important;
}

html[data-theme="dark"],
html[data-theme="dark"] body {
    background-color: transparent !important;
}
html[data-theme="dark"] .page__footer-copyright {
    color: #cbd5e0 !important;
}
html[data-theme="dark"] {
    --bg-color: transparent !important;
    --text-color: #e0e0e0;
}

[data-theme="dark"] .visitor-stats {
    background-color: rgba(255, 176, 138, 0.08);
}

[data-theme="dark"] .about-section,
[data-theme="dark"] .about-container {
    background-color: var(--sidebar-bg-dark, #545353);
    color: var(--text-light, #e0e0e0);
}

[data-theme="dark"] .cv-header h1,
[data-theme="dark"] .about-section h2 {
    color: var(--primary-light, #ffb08a);
}

[data-theme="dark"] .about-section a {
    color: var(--secondary-color-light, #ffd700);
}

[data-theme="dark"] .visible-links a {
    color: var(--secondary-color-light, #ffb08a);
}

.author__urls.social-icons a:hover {
    background-color: transparent !important;
    color: #3182ce;
    padding-left: 0.8rem;
    transform: translateY(-2px);
}

[data-theme="dark"] .author__urls.social-icons a:hover {
    color: #ffb08a !important;
}

[data-theme="dark"] .author__urls.social-icons a {
    background-color: transparent !important;
}


:root[data-theme="dark"] {
    --bg-color: transparent !important;
    --text-color: #fff;
}

html[data-theme="light"] .masthead {
    background-color: #fff !important;
}