/* Customize Slider */
.slider-navigation-next {
    margin-top: -32px !important;
    color: white !important;
    background: #5B93D4 !important;
}

.slider-navigation-previous {
    margin-top: -32px !important;
    color: white !important;
    background: #5B93D4 !important;
}

.slider-page {
    color: white !important;
    background: #5B93D4 !important;
}

* {
    font-family: 'Avenir', 'Avenir Next Cyr', 'Inter', 'Config', 'Microsoft YaHei', sans-serif;
}

a {
    color: #5B93D4;
    text-decoration: none;
}
  
a.link:focus, a.link:hover {
    color: #7BAADE;
    text-decoration: none;
}

body {
    position: relative;
    margin: 0px;
    padding: 0px;
    background: transparent;
    overflow-x: hidden;
}

p {
    position: relative;
    margin: 16px;
    color: black;
    font-size: 16px;
    font-weight: 500;
    text-align: justify;
    line-height: 1.6;
}

p span {
    font-weight: 600;
}

video {
    width: 100%;
    height: auto;
}

/* Pipeline image: match page background */
.pipeline-img {
    width: 100%;
    height: auto;
    display: block;
    background: transparent;
    object-fit: contain;
    mix-blend-mode: multiply;
}

/* Teaser figure: constrain to layout, no overflow */
#teaser {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

#teaser img {
    width: 100%;
    max-width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
    box-sizing: border-box;
}

/* Delta Encoder: side-by-side image + text */
.delta-encoder-row {
    display: flex;
    align-items: center;
    gap: 24px;
    margin: 16px;
}

.delta-encoder-img {
    flex: 0 0 50%;
    max-width: 50%;
}

.delta-encoder-img img {
    width: 100%;
    height: auto;
    display: block;
}

.delta-encoder-text {
    flex: 1;
}

.delta-encoder-text p {
    margin: 0;
    text-align: justify;
}

@media screen and (max-width: 768px) {
    .delta-encoder-row {
        flex-direction: column;
        gap: 12px;
        margin: 12px 16px;
    }

    .delta-encoder-img {
        flex: none;
        max-width: 100%;
        width: 100%;
    }

    .delta-encoder-text p {
        margin: 0;
    }
}

@media screen and (max-width: 480px) {
    .delta-encoder-row {
        gap: 8px;
        margin: 10px 8px;
    }
}

.x-row {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: nowrap;
}

.x-column {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: nowrap;
    flex-direction: column;
}

.x-center-text {
    margin: 16px 32px;
    text-align: center;
}

/* TL;DR: constrain width so text wraps to ~2 lines, no overflow */
.tldr-block {
    max-width: 720px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}

.x-left-align {
    display: flex;
    align-items: center;
    justify-content: left;
    flex-wrap: nowrap;
}

.x-right-align {
    display: flex;
    align-items: center;
    justify-content: right;
    flex-wrap: nowrap;
}

.x-flex-spacer {
    flex: 1;
}

.x-labels {
    position: absolute;
    top: 8px;
    right: 6px;
    display: flex;
    align-items: center;
    justify-content: left;
    flex-direction: row-reverse;
}

.x-label {
    height: 20px;
    padding: 0px 6px;
    margin: 0px 2px;
    color: white;
    font-size: 12px;
    font-weight: 600;
    background: #5B93D4;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.x-button {
    height: 40px;
    padding: 0px 14px;
    background: #5B93D4;
    color: white;
    border-radius: 50px;
    box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.25);
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.x-button.small {
    height: 32px;
    padding: 0px 12px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
}

.x-button:hover {
    transform: scale(1.05);
    box-shadow: 0px 0px 8px rgba(0, 0, 0, 0.5);
}

.x-gradient-font {
    background: #3A7BC8;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.x-gradient-block {
    color: #3f3f3f;
    background: #EEF4FB;
    border-radius: 16px;
}

.x-gradient-border {
    position: relative;
    padding: 1px;
    margin: 3px;
    border: 3px;
    background: white;
    background-clip: padding-box;
    border: solid border transparent;
    border-radius: 16px;
}

.x-gradient-border::before {
    content: '';
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    z-index: -1;
    margin: -3px;
    border-radius: 16px;
    background: #5B93D4;
}

.x-section-title {
    margin: 64px 0px 16px 0px;
    padding-left: 16px;
    color: black;
    font-size: 32px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: left;
}

.x-section-title.small {
    margin: 8px 0px 4px 0px;
    padding-left: 4px;
    font-size: 20px;
    font-weight: 700;
}

.x-subsection-title {
    margin: 32px 0px 12px 0px;
    padding-left: 16px;
    color: black;
    font-size: 24px;
    font-weight: 600;
}

.x-note {
    color: #6B7280;
    font-size: 16px;
    font-weight: 500;
}

.x-card {
    position: relative;
    margin: 8px;
    padding: 16px;
    border-radius: 16px;
    box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.25);
    transition: all 0.2s ease;
}

.x-card.clickable {
    cursor: pointer;
}

.x-card.clickable:hover {
    box-shadow: 0px 0px 8px rgba(0, 0, 0, 0.5);
    transform: scale(1.02);
}

.x-card .caption {
    margin: 8px 0px;
    height: 80px;
    display: flex;
    align-items: start;
    justify-content: center;
}

/* ==================== Layout ==================== */

#main {
    max-width: 1000px;
    margin: 0px auto;
    padding-top: 100px;
    padding-bottom: 200px;
    padding-left: 16px;
    padding-right: 16px;
}

#title {
    margin-bottom: 32px;
    color: black;
    font-size: 54px;
    font-weight: 700;
    text-align: center;
    line-height: 1.2;
}

#authors {
    width: 80%;
    margin: 8px auto;
    color: black;
    font-size: 16px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

#authors div {
    margin: 0px 16px;
}

#institution {
    margin: 8px 32px;
    color: black;
    font-size: 16px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

#institution div {
    margin: 0px 16px;
}

#conference {
    margin: 16px 32px;
    color: gray;
    font-size: 24px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

#abstract {
    position: relative;
    margin: 32px;
    padding: 16px 24px;
    color: #3f3f3f;
    font-size: 16px;
    font-weight: 500;
    text-align: justify;
    line-height: 1.7;
    border-radius: 16px;
}

#abstract::before {
    content: "Abstract:";
    font-weight: 700;
    margin-right: 8px;
}

#links {
    margin: 16px 0px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

#links div {
    margin: 4px 8px;
    width: 140px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#links a {
    width: 100px;
    height: 20px;
    padding: 8px 16px;
    color: white;
    font-size: 16px;
    font-weight: 500;
    background: #5B93D4;
    border-radius: 50px;
    box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

#links a:hover {
    width: 105px;
    height: 21px;
    font-size: 17px;
    box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.75);
}

#links a.disabled {
    background-color: rgb(192, 192, 192);
}

#links a.disabled:hover {
    background-color: rgb(192, 192, 192);
}

.coming-soon-badge {
    position: absolute;
    bottom: -18px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
    font-weight: 600;
    color: #9ca3af;
    white-space: nowrap;
    letter-spacing: 0.02em;
}

#links a::before {
    /* use !important to prevent issues with browser extensions that change fonts */
    font-family: 'icomoon' !important;
    font-style: normal;
    font-weight: normal;
    font-variant: normal;
    text-transform: none;
    line-height: 1;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    margin-right: 8px;
}

#links #paper::before {
    content: "\e000";
    font-size: 18px;
}

#links #code::before {
    content: "\e002";
    font-size: 20px;
}

#links #demo::before {
    content: "▶";
    font-family: inherit;
    font-size: 14px;
    margin-right: 6px;
}

#links #arxiv::before {
    content: "\e001";
    font-size: 20px;
}

#links #poster::before {
    content: "\e004";
    font-size: 20px;
}

#links #video::before {
    content: "\e003";
    font-size: 20px;
}

#links #demo::before {
    content: "\e005";
    font-size: 20px;
}

#teaser {
    margin-top: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

#teaser div {
    height: 100%;
}

/* ==================== BiTeX ==================== */

.bibtex {
    margin: 32px 32px;
    padding: 0px 24px;
    font-family: consolas, monospace;
    white-space: pre;
    word-wrap: normal;
    overflow-wrap: normal;
    font-size: 14px;
    font-weight: 600;
    display: block;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: auto;
}

/* ==================== Bottom Bar ==================== */

#bottombar {
    position: absolute;
    bottom: 0px;
    width: 100%;
    padding: 14px 0;
    background: #5B93D4;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    user-select: none;
    box-sizing: border-box;
}

#bottombar .row {
    width: 90%;
    max-width: 1200px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    user-select: none;
}

#bottombar div {
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    font-weight: 500;
}

#bottombar div a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    font-weight: 500;
}

#bottombar div a:hover {
    color: rgba(255, 255, 255, 1);
    font-size: 12px;
}

#bottombar div span {
    font-weight: 700;
}

/* ==================== Benchmark Charts ==================== */

.benchmark-selector {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    margin: 16px auto;
    max-width: 800px;
}

.benchmark-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.benchmark-category-label {
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}

.benchmark-btn-group {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 6px;
    align-items: center;
}

@media screen and (max-width: 600px) {
    .benchmark-selector {
        align-items: stretch;
        padding: 0 8px;
    }

    .benchmark-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .benchmark-btn-group {
        grid-template-columns: repeat(3, 1fr);
        gap: 4px;
    }

    .benchmark-category-label {
        font-size: 12px;
    }
}

.benchmark-btn {
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 8px 16px;
    border: 1.5px solid rgba(58, 123, 200, 0.2);
    border-radius: 8px;
    background: #EEF4FB;
    color: #5B93D4;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    text-align: center;
    white-space: nowrap;
}

.benchmark-btn.green,
.benchmark-btn.orange,
.benchmark-btn.purple {
    background: #EEF4FB;
    color: #3A7BC8;
    border-color: rgba(58, 123, 200, 0.3);
}

.benchmark-btn:hover,
.benchmark-btn.green:hover,
.benchmark-btn.orange:hover,
.benchmark-btn.purple:hover {
    border-color: #3A7BC8;
    color: #3A7BC8;
}

.benchmark-btn.is-active,
.benchmark-btn.green.is-active,
.benchmark-btn.orange.is-active,
.benchmark-btn.purple.is-active {
    background: #5B93D4;
    color: #fff;
    border-color: #5B93D4;
    font-weight: 600;
}

/* ==================== Mobile Responsive ==================== */

@media screen and (max-width: 768px) {
    #main {
        padding-top: 40px;
        padding-bottom: 120px;
        padding-left: 12px;
        padding-right: 12px;
    }

    #title {
        font-size: 32px;
        margin-bottom: 16px;
    }

    #title span:first-child {
        font-size: 40px !important;
    }

    #title img {
        height: 40px !important;
        margin-right: 12px !important;
    }

    #title span:last-child {
        font-size: 24px !important;
    }

    #authors {
        width: 95%;
        font-size: 14px;
        flex-direction: column;
        gap: 4px;
    }

    #authors div {
        margin: 2px 8px;
    }

    #institution {
        font-size: 14px;
        flex-direction: column;
        gap: 4px;
    }

    #institution div {
        margin: 2px 8px;
    }

    .x-center-text {
        font-size: 16px !important;
        margin: 12px 16px;
    }

    .tldr-block {
        max-width: 100%;
        padding: 0 8px;
    }

    #links {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 6px;
    }

    #links div {
        width: auto;
        margin: 4px;
    }

    #links a {
        width: auto;
        padding: 8px 16px;
        font-size: 14px;
    }

    #abstract {
        margin: 16px;
        padding: 12px 16px;
        font-size: 14px;
        line-height: 1.6;
    }

    p {
        margin: 12px 16px;
        font-size: 14px;
        line-height: 1.5;
    }

    .x-section-title {
        font-size: 24px !important;
        margin: 32px 0px 12px 0px;
        padding-left: 12px;
    }

    .x-section-title.small {
        font-size: 18px !important;
        margin: 8px 0px 4px 0px;
    }

    .x-subsection-title {
        font-size: 20px;
        margin: 24px 0px 8px 0px;
        padding-left: 12px;
    }

    .x-card {
        margin: 4px;
        padding: 12px;
    }

    .x-card .caption {
        height: 60px;
        margin: 6px 0px;
    }

    .bibtex {
        margin: 16px 8px;
        padding: 8px 12px;
        font-size: 9px;
        white-space: pre;
        word-break: normal;
        overflow-x: scroll;
        -webkit-overflow-scrolling: touch;
    }

    ul {
        margin: 12px 16px !important;
        font-size: 14px !important;
        padding-left: 20px;
    }

    #bottombar .row {
        flex-direction: column;
        text-align: center;
    }

    #bottombar div {
        font-size: 10px;
    }

    #bottombar div a {
        font-size: 10px;
    }

    /* Benchmark buttons: 4 per row on tablets */
    .benchmark-btn {
        padding: 6px 10px;
        font-size: 12px;
    }

    .benchmark-btn-group {
        grid-template-columns: repeat(4, 1fr);
    }

    /* Logo scaling */
    #logos {
        gap: 20px !important;
    }

    #logos img {
        height: 36px !important;
    }

    /* Teaser */
    #teaser {
        margin-top: 16px !important;
    }

    /* Chart containers */
    .benchmark-chart-container {
        max-width: 100%;
    }
}

@media screen and (max-width: 480px) {
    #main {
        padding-top: 30px;
        padding-left: 8px;
        padding-right: 8px;
    }

    #title span:first-child {
        font-size: 32px !important;
    }

    #title img {
        height: 32px !important;
        margin-right: 8px !important;
    }

    #title span:last-child {
        font-size: 20px !important;
    }

    #authors {
        font-size: 12px;
    }

    #institution {
        font-size: 12px;
    }

    .x-center-text {
        font-size: 14px !important;
        margin: 10px 8px;
    }

    .tldr-block {
        max-width: 100%;
        padding: 0 4px;
    }

    #abstract {
        font-size: 12px;
        margin: 12px 8px;
        padding: 10px 12px;
    }

    p {
        font-size: 12px;
        margin: 10px 8px;
    }

    .x-section-title {
        font-size: 20px !important;
        padding-left: 8px;
    }

    #links {
        gap: 4px;
    }

    #links div {
        width: auto;
    }

    #links a {
        width: auto;
        font-size: 13px;
        padding: 6px 12px;
    }

    /* Benchmark buttons: 3 per row */
    .benchmark-btn {
        padding: 5px 6px;
        font-size: 11px;
        white-space: nowrap;
    }

    .benchmark-btn-group {
        grid-template-columns: repeat(3, 1fr);
        gap: 4px;
    }

    #logos img {
        height: 28px !important;
    }

    #logos {
        gap: 16px !important;
    }

    /* Chart containers */
    .benchmark-chart-container {
        height: 300px !important;
        margin: 0 4px;
    }

    #efficiencyChartContainer {
        height: 320px !important;
    }

    #runtimeChartContainer {
        height: 280px !important;
    }
}

/* ==================== iPhone SE / small phones (375px) ==================== */
@media screen and (max-width: 375px) {
    #main {
        padding-top: 24px;
        padding-left: 6px;
        padding-right: 6px;
        padding-bottom: 80px;
    }

    #title span:first-child {
        font-size: 26px !important;
    }

    #title span:last-child {
        font-size: 16px !important;
    }

    #authors {
        font-size: 11px;
        gap: 2px;
    }

    #institution {
        font-size: 11px;
        gap: 2px;
    }

    .x-center-text {
        font-size: 13px !important;
        margin: 8px 6px;
    }

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

    #abstract {
        font-size: 11px;
        margin: 10px 6px;
        padding: 8px 10px;
    }

    p {
        font-size: 11px;
        margin: 8px 6px;
        line-height: 1.5;
    }

    .x-section-title {
        font-size: 18px !important;
        margin: 24px 0px 8px 0px;
        padding-left: 6px;
    }

    #links {
        gap: 4px;
    }

    #links a {
        font-size: 12px;
        padding: 5px 10px;
    }

    /* Benchmark buttons: 2 per row on very small screens */
    .benchmark-btn {
        padding: 5px 4px;
        font-size: 10px;
    }

    .benchmark-btn-group {
        grid-template-columns: repeat(2, 1fr);
        gap: 3px;
    }

    .benchmark-selector {
        padding: 0 4px;
    }

    #logos {
        gap: 12px !important;
    }

    #logos img {
        height: 24px !important;
    }

    .bibtex {
        font-size: 7px;
        margin: 10px 4px;
        padding: 6px 8px;
    }

    /* Chart containers */
    .benchmark-chart-container {
        height: 260px !important;
        margin: 0 2px;
    }

    #efficiencyChartContainer {
        height: 280px !important;
    }

    #runtimeChartContainer {
        height: 240px !important;
    }

    #bottombar div {
        font-size: 9px;
    }

    #bottombar div a {
        font-size: 9px;
    }
}

/* ==================== Benchmark Chart Container ==================== */

.benchmark-chart-container {
    position: relative;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    height: 400px;
    box-sizing: border-box;
}

@media screen and (max-width: 600px) {
    .benchmark-chart-container {
        height: 300px;
        margin: 0 8px;
    }
}