/* Compact publication layout with slightly larger publication body text. */
body[data-page="publications"] #mainContent > .page-heading {
    display: inline-block;
    margin: 12px 0 8px;
}
body[data-page="publications"] .publication-index {
    float: right;
    margin: 12px 0 8px 12px;
    padding: 3px 9px;
    border: 1px solid #dbe4ec;
    border-radius: 4px;
    font-size: .92em;
    background: #f8fafc;
}
body[data-page="publications"] .publication-index[open] {
    float: none;
    clear: both;
    margin: 0 0 10px;
    padding: 6px 10px;
}
body[data-page="publications"] .publication-index-list { margin-top: 6px; }
body[data-page="publications"] .publication-index-list ul { margin: 3px 0 6px; }
body[data-page="publications"] #mainContent > p:has(> a[id]:only-child) {
    clear: both;
    margin: 0;
    line-height: 0;
}
.publications-container { max-width: 1200px; margin: 6px auto 18px; padding: 0; }
.timeline { position: relative; padding: 4px 0 0 24px; }
.timeline::before {
    content: ""; position: absolute; left: 8px; top: 0; bottom: 0;
    width: 2.5px; background: rgba(0, 0, 0, .9);
}
.timeline-item { position: relative; margin-bottom: 12px; }
.timeline-item:last-child { margin-bottom: 0; }
.timeline-marker {
    position: absolute; left: -20.75px; top: 4px; width: 12px; height: 12px;
    background: #fff; border: 2px solid #003d7e; border-radius: 50%; z-index: 1;
}
.tl-date {
    display: block; margin: 0 0 4px; color: #003d7e;
    font-size: 1em; font-weight: 700; line-height: 1.5;
}
.timeline-content {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(190px, 30%);
    grid-template-rows: auto 1fr; column-gap: 16px; row-gap: 6px; align-items: start;
    padding: 12px 14px; background: #fff; border: 1px solid #e0e7ee;
    border-left: 2px solid #003d7e; border-radius: 5px;
    box-shadow: 0 1px 2px rgba(20, 45, 70, .04);
    transition: border-color .15s ease;
}
.timeline-content:hover, .timeline-content:focus-within { border-color: #e6b5b5; border-left-color: #ff0000; }
.timeline-content:not(:has(> .tl-gallery)) { grid-template-columns: minmax(0, 1fr); }
.tl-paper-title, .tl-journal, .tl-abstract { grid-column: 1; min-width: 0; }
.tl-paper-title { margin: 0; color: #111827; font-weight: 400; line-height: 1.5; font-style: normal; }
.tl-citation { font-weight: 400; }
.tl-journal { margin: 0; color: #000; font-weight: 400; font-style: italic; line-height: 1.45; }
.tl-link-btn { padding: 0; border: 0; background: transparent; color: #003d7e; text-decoration: none; cursor: pointer; }
.tl-link-btn:hover { color: #1677c8; text-decoration: underline; }
.tl-gallery {
    grid-column: 2; grid-row: 1 / span 2;
    width: 100%; min-width: 0; margin: 0;
    border: 1px solid #e4eaf0; border-radius: 4px; background: #fafcfe; overflow: hidden;
}
.tl-gallery-item { padding: 3px; }
.tl-figure-trigger { display: block; width: 100%; padding: 0; border: 0; background: transparent; cursor: zoom-in; }
.tl-figure-trigger:focus-visible { outline-offset: -3px; }
.tl-gallery-label { padding: 1px 0 3px; text-align: center; color: #64748b; font-size: .8125em; font-weight: 600; line-height: 1.3; }
.tl-gallery img { display: block; width: 100%; height: 140px; object-fit: contain; background: #fff; cursor: zoom-in; }
.tl-gallery img:hover { opacity: .94; }
.tl-abstract { margin: 0; }
.tl-abstract-trigger {
    display: inline-block; padding: 2px 8px; border: 1px solid #ccd9e4; border-radius: 3px;
    color: #35536f; background: #f8fafc; font-family: inherit; font-size: .875em; font-weight: 500; line-height: 1.5;
    cursor: pointer; user-select: none;
}
.tl-abstract-trigger:hover { color: #003d7e; border-color: #7b9ebd; background: #f0f6fb; }
.tl-abstract-content {
    display: none; margin-top: 6px; padding: 10px 12px; background: #f8fafc;
    border: 1px solid #e0e7ee; border-radius: 4px; line-height: 1.65;
    max-height: 400px; overflow-y: auto; color: #374151;
}
.tl-abstract-content.show { display: block; }
.img-modal { display: none; position: fixed; z-index: 1000; inset: 0; width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(0,0,0,.9); cursor: zoom-out; }
.img-modal[open] { display: block; }
.img-modal::backdrop { background: transparent; }
.img-modal-content { display: block; position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); max-width: 90%; max-height: 90%; }
.img-modal-close { position: absolute; top: 16px; right: 24px; color: #f1f1f1; font-size: 40px; font-weight: bold; cursor: pointer; border: 0; background: transparent; padding: 0 6px; line-height: 1.2; }
.page__content > h2.publication-group-title {
    clear: both; text-align: left; color: #000;
    font-family: "Times New Roman", "Kaiti SC", "STKaiti", "KaiTi", serif;
    font-size: 1.375em; line-height: 1.3;
    max-width: 1200px; padding-left: 24px; margin: 0 auto;
}
.publication-group-title + .publications-container { margin-top: 3px; }
@media (max-width: 1100px) {
    .timeline-content { grid-template-columns: minmax(0, 1fr) minmax(160px, 28%); column-gap: 12px; }
    .tl-gallery img { height: 120px; }
}
@media (max-width: 768px) {
    .timeline { padding-left: 20px; }
    .timeline::before { left: 5px; }
    .timeline-marker { left: -19.75px; }
    .timeline-content { display: block; padding: 10px 12px; }
    .tl-journal, .tl-abstract { margin-top: 6px; }
    .tl-gallery { width: min(100%, 420px); margin: 8px auto 0; }
    .tl-gallery img { height: 200px; }
    .page__content > h2.publication-group-title { padding-left: 20px; }
    .img-modal-content { max-width: 95%; max-height: 95%; }
}

#mainContent .authorship-note { clear: both; margin: 4px 0 8px; font-size: .85em; color: #555; }
.tl-citation sup { font-size: .75em; line-height: 0; }

/* Enlarge paper text while retaining page and group heading sizes. */
#mainContent .tl-paper-title, #mainContent .tl-journal { font-size: 18.5px; }
#mainContent .tl-abstract-content { font-size: 16.5px; }
