/* ========================================
   LaMI Project Page — Clean Academic Style
   ======================================== */

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Noto Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 16px;
    line-height: 1.7;
    color: #2c2c2c;
    background: #fff;
}

/* --- Layout --- */
.container {
    max-width: 980px;
    margin: 0 auto;
    padding: 0 24px;
}

.container-narrow {
    max-width: 780px;
}

.section {
    padding: 56px 0;
}

.section-gray {
    background: #f8f9fa;
}

/* --- Typography --- */
h1, h2, h3, h4 {
    font-family: 'Noto Serif', 'Georgia', serif;
    color: #1a1a1a;
}

h2 {
    font-size: 1.65rem;
    font-weight: 600;
    margin-bottom: 20px;
    text-align: center;
}

h3 {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 8px;
}

a {
    color: #1a5276;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* --- Hero --- */
.hero {
    text-align: center;
    padding: 72px 24px 40px;
    background: #fff;
}

.venue-text {
    font-size: 1.05rem;
    color: #333;
    margin-bottom: 22px;
}

.title {
    font-size: 2.25rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 24px;
    color: #1a1a1a;
}

.authors {
    font-size: 1.1rem;
    margin-bottom: 8px;
    line-height: 1.8;
}

.author {
    white-space: nowrap;
}

.author:not(:last-child)::after {
    content: ", ";
}

.author a {
    color: #1a5276;
    font-weight: 500;
}

.affiliations {
    font-size: 0.92rem;
    color: #555;
    margin-bottom: 4px;
}

.affiliations span:not(:last-child)::after {
    content: "   ";
    white-space: pre;
}

.equal-contribution {
    font-size: 0.82rem;
    color: #888;
    font-style: italic;
    margin-bottom: 24px;
}

/* --- Buttons --- */
.links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 8px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 20px;
    font-size: 0.9rem;
    font-weight: 500;
    color: #1a5276;
    background: #fff;
    border: 1.5px solid #1a5276;
    border-radius: 4px;
    transition: background 0.15s, color 0.15s;
    text-decoration: none;
}

.btn:hover {
    background: #1a5276;
    color: #fff;
    text-decoration: none;
}

/* --- Teaser --- */
.teaser {
    text-align: center;
}

.teaser img {
    max-width: 620px;
    width: 100%;
    height: auto;
    border-radius: 4px;
}

.caption {
    font-size: 0.88rem;
    color: #555;
    margin-top: 14px;
    line-height: 1.6;
    text-align: left;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* --- TL;DR --- */
.tldr-text {
    font-size: 1.02rem;
    line-height: 1.75;
    text-align: left;
    color: #333;
}

/* --- Abstract --- */
.abstract-text {
    font-size: 1.0rem;
    line-height: 1.8;
    text-align: left;
    color: #333;
    margin-bottom: 14px;
}

/* --- Section descriptions --- */
.section-description {
    font-size: 0.97rem;
    color: #444;
    text-align: left;
    max-width: 760px;
    margin: 0 auto 28px;
    line-height: 1.7;
}

/* --- Method --- */
.method-figure {
    text-align: center;
    margin-bottom: 40px;
}

.method-figure img {
    max-width: 100%;
    width: 100%;
    height: auto;
    border-radius: 4px;
}

.color-frozen {
    color: #2e86c1;
    font-weight: 500;
}

.color-trainable {
    color: #d68910;
    font-weight: 500;
}

.method-text {
    font-size: 0.97rem;
    color: #444;
    line-height: 1.7;
    margin-bottom: 14px;
}

.method-points {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    margin-top: 8px;
}

.method-point {
    background: #fff;
    padding: 24px;
    border-radius: 6px;
    border: 1px solid #e8e8e8;
}

.method-point h3 {
    font-family: 'Noto Sans', sans-serif;
    font-size: 1.02rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: #1a1a1a;
}

.method-point p {
    font-size: 0.92rem;
    color: #444;
    line-height: 1.65;
}

/* --- Tables --- */
.table-title {
    text-align: center;
    font-size: 1.12rem;
    margin-top: 40px;
    margin-bottom: 8px;
}

.table-title:first-of-type {
    margin-top: 0;
}

.table-wrapper {
    overflow-x: auto;
    margin-bottom: 8px;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    margin: 0 auto;
}

thead th {
    background: #f0f2f4;
    font-weight: 600;
    padding: 10px 16px;
    text-align: left;
    border-bottom: 2px solid #ccc;
    font-size: 0.88rem;
    white-space: nowrap;
}

tbody td {
    padding: 8px 16px;
    text-align: left;
    border-bottom: 1px solid #eaeaea;
    white-space: nowrap;
}

tr.group-header td {
    font-weight: 600;
    font-size: 0.84rem;
    color: #666;
    padding-top: 16px;
    padding-bottom: 6px;
    border-bottom: 1px solid #ddd;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    background: transparent;
}

td.group-center {
    text-align: left;
}

tr.backbone-sep td {
    padding: 0;
    height: 1px;
    border-bottom: 1.5px solid #ccc;
}

tr.highlight {
    background: #eef5fb;
}

tr.highlight td {
    border-bottom: 1px solid #d4e4ef;
}

.table-note {
    font-size: 0.82rem;
    color: #777;
    text-align: left;
    margin-top: 8px;
    margin-bottom: 16px;
}

/* --- Qualitative Examples --- */
.qualitative-examples {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 8px;
}

.example {
    padding: 22px 26px;
    border-radius: 6px;
    border-left: 4px solid #ccc;
    background: #fff;
}

.example.success {
    border-left-color: #27ae60;
    background: #f6fdf8;
}

.example.robustness {
    border-left-color: #2e86c1;
    background: #f5fafd;
}

.example.failure {
    border-left-color: #c0392b;
    background: #fdf6f5;
}

.example h4 {
    font-family: 'Noto Sans', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: #1a1a1a;
}

.example-question {
    font-style: italic;
    color: #555;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.example p {
    font-size: 0.92rem;
    color: #444;
    line-height: 1.65;
}

/* --- BibTeX --- */
.bibtex-container {
    position: relative;
    background: #f5f6f8;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 20px 24px;
}

.bibtex-container pre {
    margin: 0;
    overflow-x: auto;
}

.bibtex-container code {
    font-family: 'SFMono-Regular', 'Menlo', 'Monaco', 'Consolas', monospace;
    font-size: 0.84rem;
    line-height: 1.6;
    color: #333;
}

.copy-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 5px 10px;
    cursor: pointer;
    color: #666;
    font-size: 0.88rem;
    transition: color 0.15s, border-color 0.15s;
}

.copy-btn:hover {
    color: #1a5276;
    border-color: #1a5276;
}

/* --- Footer --- */
footer {
    text-align: center;
    padding: 36px 24px;
    border-top: 1px solid #eaeaea;
    font-size: 0.85rem;
    color: #888;
}

footer a {
    color: #1a5276;
}

.template-credit {
    margin-top: 6px;
    font-size: 0.8rem;
    color: #aaa;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .title {
        font-size: 1.55rem;
    }

    .hero {
        padding: 48px 16px 32px;
    }

    .section {
        padding: 40px 0;
    }

    .method-points {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .authors {
        font-size: 1.0rem;
    }

    thead th, tbody td {
        padding: 8px 10px;
        font-size: 0.82rem;
    }
}

@media (max-width: 480px) {
    .title {
        font-size: 1.3rem;
    }

    .links {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 220px;
        justify-content: center;
    }
}
