:root {
    --bg: #ffffff;
    --text: #0f172a;
    --muted: #475569;
    --brand: #1d4ed8;
    --surface: #ffffff;
    --line: #e2e8f0;
}

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
    color-scheme: light;
}

html {
    scroll-behavior: smooth;
}

.site-wrap {
    max-width: 1040px;
    margin: 0 auto;
    padding: 28px 18px 44px;
}

.top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 26px;
    position: relative;
}

.lab-tag {
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--muted);
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.menu-toggle {
    display: none;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--text);
    border-radius: 8px;
    padding: 6px 10px;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
}

.quick-links {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.quick-links a {
    color: var(--muted);
    margin-left: 14px;
    font-weight: 600;
    font-size: 0.95rem;
}

.quick-links a:hover {
    color: var(--brand);
}

@media (max-width: 900px) {
    .lab-tag {
    max-width: calc(100vw - 88px);
    }

    .menu-toggle {
    display: inline-flex;
    }

    .quick-links {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: min(220px, 80vw);
    flex-direction: column;
    align-items: stretch;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 8px;
    z-index: 50;
    }

    .quick-links.is-open {
    display: flex;
    }

    .quick-links a {
    margin-left: 0;
    padding: 6px 8px;
    }
}

.hero-card {
    background: linear-gradient(160deg, #ffffff 0%, #f1f5f9 100%);
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 34px 30px;
    margin-bottom: 24px;
    text-align: center;
}

.project-title {
    font-size: clamp(1.55rem, 3.2vw, 2.35rem);
    font-weight: 800;
    line-height: 1.15;
    margin: 0;
}

.subtitle-line {
    color: var(--muted);
    font-size: 1.05rem;
    max-width: 800px;
    margin: 14px auto 0;
    margin-bottom: 0;
}

.authors {
    margin-top: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.authors-note {
    margin-top: 8px;
    font-size: 0.88rem;
    color: var(--muted);
    text-align: center;
}

.author-chip {
    border: 1px solid var(--line);
    background: var(--surface);
    border-radius: 10px;
    padding: 8px 12px;
    font-weight: 600;
    color: var(--text);
    text-decoration: none;
}

.author-chip:hover {
    border-color: #bfdbfe;
    color: var(--brand);
}

.action-row {
    margin-top: 22px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.button.is-research {
    border-radius: 10px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--text);
    font-weight: 600;
}

.button.is-research:hover {
    border-color: #bfdbfe;
    color: var(--brand);
}

.section-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 18px;
}

.section-title {
    margin: 0 0 12px;
    font-size: 1.35rem;
    font-weight: 700;
}

.section-text {
    margin: 0;
    color: var(--muted);
    line-height: 1.75;
}

.section-text,
.highlight-box p,
.arch-text p,
.eval-intro,
.eval-box p,
.results-grid .highlight-box p {
    text-align: justify;
    text-justify: inter-word;
}

.highlights-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.highlight-box {
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 14px;
    background: #fff;
}

.highlight-box h3 {
    margin: 0 0 8px;
    font-size: 1rem;
}

.highlight-box p {
    margin: 0;
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

.architecture-stack {
    display: grid;
    gap: 14px;
}

.arch-card {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    padding: 14px;
    align-items: center;
}

.arch-image {
    order: 1;
    border: 1px solid var(--line);
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
}

.arch-image img {
    width: 100%;
    height: auto;
    display: block;
    cursor: zoom-in;
}

.arch-text {
    order: 2;
}

.arch-text h3 {
    margin: 0 0 8px;
    font-size: 1rem;
}

.arch-text p {
    margin: 0;
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

@media (min-width: 900px) {
    .arch-card {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    }

    .arch-card.text-left .arch-text {
    order: 1;
    }

    .arch-card.text-left .arch-image {
    order: 2;
    }

    .arch-card.text-right .arch-image {
    order: 1;
    }

    .arch-card.text-right .arch-text {
    order: 2;
    }
}

img {
    background: #ffffff;
}

pre {
    margin: 0;
    background: #ffffff;
    color: var(--text);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 14px;
    overflow: auto;
    font-size: 0.9rem;
    line-height: 1.55;
}

#citation pre {
    background: #0b1220;
    color: #dbeafe;
    white-space: pre-wrap;
    word-break: break-word;
    padding: 20px;
    text-indent: 0;
}

.citation-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}

.citation-header .section-title {
    margin: 0;
}

.copy-citation-btn {
    border: 1px solid var(--line);
    background: #fff;
    color: var(--text);
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
}

.copy-citation-btn:hover {
    border-color: #bfdbfe;
    color: var(--brand);
}

.page-foot {
    margin-top: 18px;
    text-align: center;
    color: var(--muted);
    font-size: 0.92rem;
}

.visitor-counter {
    margin-top: 6px;
    margin-bottom: 14px;
    display: flex;
    justify-content: center;
}

.visitor-counter-inner {
    border: 1px solid var(--line);
    background: var(--surface);
    border-radius: 12px;
    padding: 10px 14px;
    text-align: center;
    display: flex;
    align-items: center;
    gap: 12px;
}

.visitor-counter-title {
    margin: 0;
    color: var(--text);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    line-height: 1.15;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
}

.visitor-counter .statcounter {
    display: flex;
    justify-content: center;
    align-items: center;
}

.visitor-counter .statcounter img {
    width: 17px;
    max-width: 100%;
    height: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    padding: 2px;
}

.image-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.98);
    z-index: 1200;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.image-lightbox.is-open {
    display: flex;
}

.lightbox-panel {
    width: auto;
    max-width: calc(100vw - 48px);
    max-height: calc(100vh - 48px);
    background: #ffffff;
    border: 1px solid #cfcfcf;
    border-radius: 14px;
    overflow: hidden;
    display: grid;
    grid-template-rows: auto 1fr;
}

.lightbox-toolbar {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 10px;
    border-bottom: 1px solid #e2e8f0;
    background: #ffffff;
}

.lightbox-btn {
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #334155;
    border-radius: 8px;
    padding: 6px 10px;
    cursor: pointer;
    font-weight: 600;
    line-height: 1;
}

.lightbox-btn:hover {
    border-color: #94a3b8;
    color: #0f172a;
}

.lightbox-viewport {
    position: relative;
    overflow: auto;
    background: #ffffff;
    padding: 75px;
    cursor: grab;
    touch-action: none;
    max-width: calc(100vw - 48px);
    max-height: calc(100vh - 120px);
}

.lightbox-viewport:active {
    cursor: grabbing;
}

.lightbox-image {
    transform-origin: top left;
    display: block;
    max-width: none;
    user-select: none;
    -webkit-user-drag: none;
}

.eval-intro {
    margin: 0 0 14px;
    color: var(--muted);
    line-height: 1.75;
    text-align: justify;
}

.eval-box-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

@media (min-width: 900px) {
    .eval-box-grid {
    grid-template-columns: 1fr 1fr;
    }
}

.eval-box {
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    padding: 14px;
}

.eval-box h3 {
    margin: 0 0 8px;
    font-size: 1rem;
}

.eval-box p {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
    text-align: justify;
}

.results-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

@media (min-width: 900px) {
    .results-grid {
    grid-template-columns: 1fr 1fr;
    }
}

.samples-subtitle {
    margin: 0 0 10px;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text);
}

.samples-training-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

@media (min-width: 900px) {
    .samples-training-row {
    grid-template-columns: repeat(3, 1fr);
    }
}

.sample-box {
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    padding: 12px;
}

.sample-box h4 {
    margin: 0 0 8px;
    font-size: 0.95rem;
    font-weight: 700;
}

.sample-box p {
    margin: 0 0 8px;
    font-size: 0.9rem;
    color: var(--muted);
    text-align: left;
}

.sample-box audio {
    width: 100%;
}

.samples-model-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

@media (min-width: 900px) {
    .samples-model-grid {
    grid-template-columns: repeat(3, 1fr);
    }
}