a {
    color: #1772d0;
    text-decoration: none;
}

a:focus,
a:hover {
    color: #f09228;
    text-decoration: none;
}

body,
td,
th,
tr,
p,
a,
li {
    font-family: 'Lato', 'PingFang SC', 'Microsoft YaHei', Verdana, Helvetica, sans-serif;
    font-size: 15px;
}

body {
    background-color: #ffffff;
    margin: 0;
    overflow-x: hidden;
    padding: 0;
}

.language-switch {
    box-sizing: border-box;
    margin: 14px auto 0;
    max-width: 800px;
    padding: 0 20px;
    text-align: right;
}

html,
body {
    max-width: 100%;
}

strong {
    font-family: 'Lato', 'PingFang SC', 'Microsoft YaHei', Verdana, Helvetica, sans-serif;
    font-size: 15px;
    font-weight: 700;
}

table,
section {
    border-collapse: separate;
    box-sizing: border-box;
    margin-left: auto;
    margin-right: auto;
    max-width: 800px;
}

td {
    vertical-align: middle;
}

h1 {
    font-family: 'Lato', 'PingFang SC', 'Microsoft YaHei', Verdana, Helvetica, sans-serif;
    font-size: 34px;
    font-weight: normal;
    margin: 0;
    padding: 0;
}

h3 {
    font-family: 'Lato', 'PingFang SC', 'Microsoft YaHei', Verdana, Helvetica, sans-serif;
    font-size: 15px;
    font-weight: 700;
    margin: 16px 0 6px;
    padding: 0;
}

.section-heading {
    display: inline;
    font-family: 'Lato', 'PingFang SC', 'Microsoft YaHei', Verdana, Helvetica, sans-serif;
    font-size: 24px;
    font-weight: normal;
    margin: 0;
    padding: 0;
}

.paper-title {
    color: #1772d0;
    font-family: 'Lato', 'PingFang SC', 'Microsoft YaHei', Verdana, Helvetica, sans-serif;
    font-size: 15px;
    font-weight: 700;
}

.recruitment-callout {
    background: #fff8e8;
    border-left: 4px solid #f09228;
    box-sizing: border-box;
    color: #333333;
    line-height: 1.55;
    margin: 14px 0 18px;
    padding: 11px 14px;
}

.recruitment-title {
    color: #b75c00;
    display: block;
    font-size: 16px;
    margin-bottom: 2px;
}

.explore-button {
    background: none;
    border: 0;
    color: #1772d0;
    cursor: pointer;
    float: right;
    font-family: 'Lato', 'PingFang SC', 'Microsoft YaHei', Verdana, Helvetica, sans-serif;
    font-size: 15px;
    font-weight: 700;
    padding: 3px 0;
}

.explore-button:focus,
.explore-button:hover {
    color: #f09228;
}

[data-collapsible] {
    display: none;
}

body.show-selected-publications [data-collapsible="selected-publications"] {
    display: table-row;
}

body.show-publications [data-collapsible="publications"] {
    display: block;
}

body.show-news [data-collapsible="news"] {
    display: block;
}

.floating-card,
.paper-card-content {
    align-items: center;
    display: flex;
}

.video-container,
.image-container {
    box-sizing: border-box;
    flex: 0 0 25%;
    min-width: 120px;
    padding: 20px;
    vertical-align: middle;
}

.paper-info {
    box-sizing: border-box;
    flex: 1;
    min-width: 0;
    padding: 20px;
    vertical-align: middle;
}

.paper-info > a:first-child {
    display: block;
    margin-bottom: 2px;
}

.paper-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    list-style: none;
    margin: 8px 0 0;
    padding: 0;
}

.paper-tags li {
    background-color: #f3f6fa;
    border: 1px solid #d8e1ec;
    border-radius: 999px;
    color: #4d5f73;
    font-size: 12px;
    line-height: 1.4;
    padding: 2px 8px;
}

video,
img {
    max-width: 100%;
}

.profile-photo-frame {
    border: 1px solid #dddddd;
    box-sizing: border-box;
    display: block;
    height: 210px;
    overflow: hidden;
    position: relative;
    width: 210px;
}

.profile-photo {
    display: block;
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.profile-photo-hover {
    left: 0;
    opacity: 0;
    position: absolute;
    top: 0;
    transition: opacity 0.3s ease;
}

.profile-photo-frame:hover .profile-photo-hover,
.profile-photo-frame:focus .profile-photo-hover {
    opacity: 1;
}

.pill-container {
    box-sizing: border-box;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin: 0 auto 20px;
    max-width: 800px;
    padding: 0 20px;
    width: 100%;
}

.pill {
    border: 1px solid #dddddd;
    box-sizing: border-box;
    cursor: pointer;
    margin: 0;
    padding: 10px;
    min-width: 0;
    border-radius: 8px;
    text-align: center;
    transition: background-color 0.3s;
    width: 100%;
}

.pill:hover {
    background-color: #f1f1f1;
}

.thumbnail {
    display: block;
    height: auto;
    aspect-ratio: 16 / 9;
    margin-bottom: 12px;
    object-fit: cover;
    width: 100%;
}

.thumbnail[poster="images/highlight-supratex.jpg"] {
    object-fit: contain;
}

.hover-video {
    background-color: #ffffff;
}

.pill p {
    margin: 4px 0 0;
    line-height: 1.35;
    text-wrap: balance;
}

.news-date {
    display: inline-block;
    text-align: right;
    width: 80px;
}

.news-emoji {
    display: inline-block;
    font-size: 15px;
    margin: 0 6px 0 4px;
    text-align: center;
    width: 18px;
}

span.highlight {
    background-color: #ffffd0;
}

.misc-carousel {
    margin-top: 16px;
    padding: 0 44px 24px;
    position: relative;
}

.misc-intro {
    margin: 12px 0 0;
}

.misc-carousel-viewport {
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}

.misc-carousel-viewport::-webkit-scrollbar {
    display: none;
}

.misc-carousel-track {
    display: flex;
    gap: 20px;
}

.misc-model {
    border: 1px solid #dddddd;
    box-sizing: border-box;
    flex: 0 0 100%;
    padding: 10px;
    scroll-snap-align: center;
}

.misc-photo-link {
    background-color: #f5f5f5;
    display: block;
    height: 360px;
    overflow: hidden;
}

.misc-photo {
    display: block;
    height: 100%;
    object-fit: contain;
    width: 100%;
}

.misc-photo-cover {
    object-fit: cover;
}

.misc-carousel-button {
    align-items: center;
    background: #ffffff;
    border: 1px solid #cccccc;
    border-radius: 50%;
    color: #1772d0;
    cursor: pointer;
    display: flex;
    font-family: Arial, sans-serif;
    font-size: 34px;
    height: 36px;
    justify-content: center;
    line-height: 1;
    padding: 0 0 4px;
    position: absolute;
    top: 162px;
    width: 36px;
    z-index: 2;
}

.misc-carousel-button:hover,
.misc-carousel-button:focus {
    border-color: #f09228;
    color: #f09228;
}

.misc-carousel-prev {
    left: 0;
}

.misc-carousel-next {
    right: 0;
}

.misc-carousel-status {
    bottom: 0;
    color: #666666;
    font-size: 13px;
    left: 0;
    margin: 0;
    position: absolute;
    right: 0;
    text-align: center;
}

.misc-model model-viewer {
    background-color: #f5f5f5;
    cursor: grab;
    display: block;
    height: 360px;
    touch-action: none;
    user-select: none;
    width: 100%;
}

.misc-model model-viewer:active {
    cursor: grabbing;
}

.model-error,
.model-progress {
    align-items: center;
    color: #666666;
    display: flex;
    height: 100%;
    justify-content: center;
    text-align: center;
    width: 100%;
}

.model-error {
    display: none;
    pointer-events: auto;
}

.model-progress {
    pointer-events: none;
}

.model-ready .model-progress,
.model-failed .model-progress {
    display: none;
}

.model-failed .model-error {
    display: flex;
}

.misc-caption {
    margin: 8px 0 0;
    text-align: center;
}

.site-footer {
    box-sizing: border-box;
    margin: 20px auto 36px;
    max-width: 800px;
    padding: 0 20px;
    text-align: center;
}

.last-updated {
    color: #666666;
    font-size: 13px;
    margin: 0 0 10px;
}

.visit-counter {
    border-top: 1px solid #dddddd;
    color: #666666;
    display: inline-block;
    font-size: 13px;
    padding-top: 12px;
}

.visit-counter img {
    box-shadow: none;
    display: inline-block;
    margin-bottom: 4px;
}

/* Standalone paper pages: text-first layouts for readers and scholarly crawlers. */
.paper-page {
    color: #26313d;
    line-height: 1.65;
}

.paper-page-shell {
    box-sizing: border-box;
    margin: 0 auto;
    max-width: 800px;
    padding: 0 20px 48px;
}

.paper-page-nav {
    align-items: center;
    border-bottom: 1px solid #e3e8ee;
    display: flex;
    justify-content: space-between;
    margin-bottom: 42px;
    padding: 18px 0 14px;
}

.paper-page-header {
    margin-bottom: 28px;
}

.paper-kicker {
    color: #66778a;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    margin: 0 0 8px;
    text-transform: uppercase;
}

.paper-page h1 {
    font-size: 38px;
    font-weight: 700;
    line-height: 1.18;
    margin-bottom: 18px;
}

.paper-authors,
.paper-venue {
    margin: 5px 0;
}

.paper-venue {
    color: #536274;
}

.paper-resource-links {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin: 22px 0 14px;
}

.paper-resource-links a {
    border: 1px solid #b7c9dc;
    border-radius: 999px;
    font-weight: 700;
    padding: 5px 13px;
}

.paper-resource-links a:hover,
.paper-resource-links a:focus {
    background: #fff7ec;
    border-color: #f09228;
}

.paper-hero {
    background: #f5f7fa;
    border: 1px solid #e0e6ed;
    box-sizing: border-box;
    margin: 28px 0;
    padding: 10px;
    text-align: center;
}

.paper-hero img,
.paper-hero video {
    display: block;
    margin: 0 auto;
    max-height: 430px;
    object-fit: contain;
    width: 100%;
}

.paper-section {
    border-top: 1px solid #e3e8ee;
    padding: 24px 0 4px;
}

.paper-section h2 {
    font-size: 23px;
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 10px;
}

.paper-summary {
    background: #f3f7fb;
    border-left: 4px solid #1772d0;
    margin: 0;
    padding: 13px 16px;
}

.paper-contributions {
    margin: 10px 0 12px;
    padding-left: 22px;
}

.paper-contributions li {
    margin: 7px 0;
}

.paper-citation {
    background: #f6f7f9;
    border: 1px solid #dfe4ea;
    box-sizing: border-box;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 12px;
    line-height: 1.55;
    overflow-x: auto;
    padding: 14px;
    white-space: pre;
}

.paper-page-footer {
    border-top: 1px solid #e3e8ee;
    color: #66778a;
    margin-top: 30px;
    padding-top: 18px;
}

.research-map-intro {
    font-size: 17px;
    line-height: 1.7;
    margin: 0 0 30px;
}

.research-track-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 18px 0 34px;
}

.research-track {
    border: 1px solid #dfe6ed;
    border-radius: 8px;
    box-sizing: border-box;
    padding: 20px;
}

.research-track h2 {
    font-size: 21px;
    margin: 0 0 9px;
}

.research-track p {
    margin: 0 0 12px;
}

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

.research-work-list li {
    border-top: 1px solid #edf0f3;
    margin: 0;
    padding: 8px 0;
}

.research-work-list li:first-child {
    border-top: 0;
}

.research-timeline {
    border-left: 3px solid #d8e3ee;
    list-style: none;
    margin: 14px 0 30px 7px;
    padding: 0 0 0 22px;
}

.research-timeline li {
    margin: 0 0 18px;
    position: relative;
}

.research-timeline li::before {
    background: #1772d0;
    border: 3px solid #ffffff;
    border-radius: 50%;
    content: "";
    height: 10px;
    left: -30px;
    position: absolute;
    top: 6px;
    width: 10px;
}

.research-period {
    color: #526579;
    display: block;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.research-questions {
    background: #f6f8fa;
    border: 1px solid #e1e6eb;
    padding: 16px 20px;
}

@media (max-width: 900px) {
    body {
        width: 100vw;
    }

    table,
    tbody,
    tr,
    td {
        box-sizing: border-box;
        display: block;
        max-width: 100%;
        width: 100% !important;
    }

    table {
        max-width: 100vw !important;
    }

    h1 {
        font-size: 32px;
    }

    p,
    td,
    a,
    li,
    .section-heading {
        overflow-wrap: anywhere;
        white-space: normal;
        word-wrap: break-word;
    }

    .floating-card,
    .paper-card-content {
        align-items: flex-start;
        display: block;
    }

    .video-container,
    .image-container,
    .paper-info {
        min-width: 0;
        padding: 8px 2.5%;
        width: 100%;
    }

    video {
        max-width: 260px;
    }

    .profile-photo-frame {
        height: 210px;
        width: 210px;
    }

    .pill-container {
        box-sizing: border-box;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
        margin: 0 auto 16px;
        max-width: 100vw;
        padding: 0 2.5%;
    }


    .news-date {
        text-align: left;
        width: auto;
    }

    .news-emoji {
        margin-left: 0;
    }

    .explore-button {
        display: block;
        float: none;
        margin-top: 10px;
    }

    .misc-model model-viewer {
        height: 300px;
    }

    .misc-carousel {
        padding-left: 34px;
        padding-right: 34px;
    }

    .misc-carousel-track {
        gap: 12px;
    }

    .misc-carousel-button {
        height: 30px;
        top: 137px;
        width: 30px;
    }

    .misc-photo-link {
        height: 300px;
    }

    .site-footer {
        max-width: 100vw;
        padding: 0 2.5%;
    }

    .language-switch {
        max-width: 100vw;
        padding: 0 2.5%;
    }

    .paper-page-shell {
        max-width: 100vw;
        padding-left: 5%;
        padding-right: 5%;
    }

    .paper-page-nav {
        align-items: flex-start;
        gap: 12px;
    }

    .paper-page h1 {
        font-size: 30px;
    }

    .paper-hero video {
        max-width: 100%;
    }

    .research-track-grid {
        grid-template-columns: 1fr;
    }
}
