/* ============================================================
   Escaping the Blur Trap — Academic Project Page
   Anthropic/Claude brand palette: Poppins + Lora
   ============================================================ */

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 1.5rem; }
body {
    font-family: 'Lora', Georgia, 'Times New Roman', serif;
    color: #141413;
    background: #faf9f5;
    line-height: 1.7;
    font-size: 16px;
}

/* ── Typography ── */
h1, h2, h3, h4 { font-family: 'Poppins', Arial, sans-serif; font-weight: 600; line-height: 1.3; }
h1 { font-size: 2.2rem; }
h2 { font-size: 1.6rem; margin-bottom: 1.25rem; padding-bottom: 0.5rem; border-bottom: 2px solid #e8e6dc; }
h3 { font-size: 1.15rem; margin: 1rem 0 0.5rem; }
p { margin-bottom: 1rem; text-align: justify; }
a { color: #6a9bcc; text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Layout ── */
.container { max-width: 960px; margin: 0 auto; padding: 0 1.5rem; }

/* ── Nav ── */
.nav { position: sticky; top: 0; z-index: 100; background: rgba(250,249,245,0.92); backdrop-filter: blur(8px); border-bottom: 1px solid #e8e6dc; }
.nav .container { display: flex; gap: 1.5rem; padding-top: 0.75rem; padding-bottom: 0.75rem; overflow-x: auto; font-size: 0.9rem; font-weight: 500; font-family: 'Poppins', Arial, sans-serif; }
.nav a {
    position: relative;
    color: #b0aea5; white-space: nowrap; text-decoration: none;
    transition: color 0.25s;
}
.nav a::after {
    content: ''; position: absolute; bottom: -4px; left: 0; width: 0; height: 2px;
    background: #d97757; border-radius: 1px;
    transition: width 0.25s ease;
}
.nav a:hover { color: #141413; }
.nav a:hover::after { width: 100%; }

/* ── Hero ── */
.hero { text-align: center; padding: 3rem 1.5rem 2rem; }
.hero h1 { font-size: 2.4rem; font-weight: 700; margin-bottom: 0.75rem; letter-spacing: -0.02em; }
.hero .subtitle { font-size: 1.05rem; color: #b0aea5; margin-bottom: 1.25rem; }
.authors { font-size: 1.1rem; color: #141413; font-family: 'Poppins', Arial, sans-serif; text-align: center; }
.authors sup { font-size: 0.7rem; color: #b0aea5; }
.affiliations { font-size: 0.85rem; color: #b0aea5; margin-top: 0.3rem; text-align: center; }
.venue { display: inline-block; margin-top: 0.8rem; padding: 0.25rem 0.9rem; background: #faf9f5; color: #6a9bcc; border: 1px solid #e8e6dc; border-radius: 99px; font-size: 0.85rem; font-weight: 600; font-family: 'Poppins', Arial, sans-serif; }

/* ── Link Buttons ── */
.link-bar { display: flex; justify-content: center; gap: 0.6rem; flex-wrap: wrap; margin-top: 1.5rem; }
.link-btn { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.55rem 1.15rem; border-radius: 8px; font-weight: 600; font-size: 0.9rem; font-family: 'Poppins', Arial, sans-serif; transition: all 0.15s; border: 1.5px solid #e8e6dc; background: #fff; color: #141413; }
.link-btn:hover { border-color: #d97757; color: #d97757; text-decoration: none; transform: translateY(-1px); box-shadow: 0 2px 8px rgba(217,119,87,0.12); }
.link-btn.primary { background: #d97757; color: #fff; border-color: #d97757; }
.link-btn.primary:hover { background: #c5694a; border-color: #c5694a; }

/* ── Teaser ── */
.teaser { text-align: center; padding: 1.5rem 0; }
.teaser img { max-width: 100%; box-shadow: 0 4px 24px rgba(0,0,0,0.06); }
.teaser .caption { margin-top: 0.75rem; font-size: 0.9rem; color: #3d3c38; text-align: justify; }
.teaser .caption .accent { color: #d97757; }

/* ── Sections ── */
section { padding: 2.5rem 0; }
section.alt { background: #fff; border-top: 1px solid #e8e6dc; border-bottom: 1px solid #e8e6dc; }

/* ── Diagnosis Steps ── */
.step { display: flex; gap: 1.25rem; margin-bottom: 1.75rem; }
.step-num {
    flex-shrink: 0;
    width: 2.25rem; height: 2.25rem;
    display: flex; align-items: center; justify-content: center;
    background: #d97757; color: #fff;
    font-family: 'Poppins', Arial, sans-serif; font-weight: 700; font-size: 1rem;
    border-radius: 50%;
}
.step h3 { margin: 0 0 0.35rem; font-size: 1.05rem; }
.step p { margin-bottom: 0; }

/* ── Premise (centered root cause) ── */
.premise {
    position: relative;
    background: #fdf6f0;
    border: 1.5px solid #f0d5c8;
    border-left: 4px solid #d97757;
    border-radius: 0 12px 12px 0;
    padding: 1.75rem 2rem;
    box-shadow: 0 2px 16px rgba(20,20,19,0.05);
}
.insight-tag {
    font-family: 'Poppins', Arial, sans-serif; font-size: 0.8rem; font-weight: 600;
    color: #d97757;
    text-transform: uppercase; letter-spacing: 0.04em;
    margin-right: 0.35rem;
}
.premise h3 {
    margin: 0 0 0.6rem; font-size: 1.2rem;
    font-family: 'Poppins', Arial, sans-serif; font-weight: 600;
    color: #141413;
}
.premise p { margin-bottom: 0; color: #3d3c38; }

/* ── Two-column ── */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
@media (max-width: 700px) { .two-col { grid-template-columns: 1fr; } }

/* ── Card ── */
.card { background: #faf9f5; border: 1px solid #e8e6dc; border-radius: 12px; padding: 0.5rem; }
.card-head { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.1rem; }
.card-head h3 { margin: 0; color: #141413; font-family: 'Poppins', Arial, sans-serif; }
.card-head .icon { font-size: 1.5rem; line-height: 1; }
.card .icon { font-size: 2rem; margin-bottom: 0.5rem; }

/* ── Figure placeholder ── */
.fig-placeholder { background: linear-gradient(135deg, #faf9f5 0%, #f0ede4 100%); border: 2px dashed #e8e6dc; border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 220px; color: #b0aea5; font-size: 0.9rem; margin: 1rem 0; }
.fig-placeholder .fig-icon { font-size: 3rem; margin-bottom: 0.5rem; }

/* ── Table ── */
.bench-table { width: 100%; border-collapse: collapse; margin: 1rem 0; font-size: 0.88rem; }
.bench-table th, .bench-table td { padding: 0.6rem 0.9rem; text-align: center; border-bottom: 1px solid #e8e6dc; }
.bench-table th { background: #faf9f5; font-weight: 600; color: #141413; font-family: 'Poppins', Arial, sans-serif; }
.bench-table .best { font-weight: 700; color: #d97757; }
.bench-table .second { font-weight: 600; color: #6a9bcc; }
.bench-table .us { background: #fdf5f1; }

/* ── BibTeX ── */
.bibtex-wrap { position: relative; }
.copy-btn {
    position: absolute; top: 0.5rem; right: 0.75rem;
    padding: 0.35rem 0.75rem;
    font-family: 'Poppins', Arial, sans-serif; font-size: 0.78rem; font-weight: 500;
    color: #b0aea5; background: transparent; border: 1px solid #555;
    border-radius: 6px; cursor: pointer;
    transition: all 0.15s;
}
.copy-btn:hover { color: #faf9f5; background: #555; border-color: #555; }
.copy-btn.copied { color: #788c5d; border-color: #788c5d; }
pre.bibtex { background: #141413; color: #e8e6dc; padding: 1.5rem; border-radius: 10px; overflow-x: auto; font-size: 0.82rem; line-height: 1.6; white-space: pre-wrap; word-break: break-all; }

/* ── Footer ── */
footer { text-align: center; padding: 2rem 1.5rem; font-size: 0.8rem; color: #b0aea5; }

/* ── Highlight box ── */
.highlight-box { background: #fdf5f1; border-left: 4px solid #d97757; padding: 1rem 1.25rem; border-radius: 0 8px 8px 0; margin: 1rem 0; font-weight: 500; }

/* ── Subsections ── */
.blur-type { margin-top: 1.5rem; }
.blur-type h4 { color: #d97757; font-size: 1rem; margin-bottom: 0.3rem; }
.blur-type p { font-size: 0.95rem; }

/* ── Utility: spacing ── */
.mt-2 { margin-top: 2rem; }

/* ── Utility: text ── */
.text-center { text-align: center; }

/* ── Figure placeholder size variants ── */
.fig-placeholder.lg { min-height: 300px; }
.fig-placeholder.md { min-height: 200px; }
.fig-placeholder.sm { min-height: 140px; }
.fig-hint { font-size: 0.8rem; margin-top: 0.25rem; }

/* ── Card target label ── */
.card .target { color: #d97757; font-weight: 600; }

/* ── Contributions list ── */
.contrib-list { padding-left: 1.25rem; margin-top: 1rem; }
.contrib-list li { margin-bottom: 0.8rem; }

/* ── Table wrapper ── */
.table-wrap { overflow-x: auto; }

/* ── Comparison Slider ── */
.comp-container { width: 100%; margin: 1rem 0 0.25rem; }
.comp-container canvas { display: block; width: 100%; cursor: ew-resize; border-radius: 0; }
.comp-controls { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.comp-btns { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.comp-btn {
    padding: 0.3rem 1rem;
    font-family: 'Poppins', Arial, sans-serif; font-size: 0.8rem; font-weight: 500;
    border-radius: 6px; cursor: pointer; transition: all 0.15s;
}
.comp-btns[data-side="left"] .comp-btn {
    color: #daa0aa; background: #fff; border: 1px solid #daa0aa;
}
.comp-btns[data-side="left"] .comp-btn:hover { background: #fef8f9; }
.comp-btns[data-side="left"] .comp-btn.active { background: #daa0aa; color: #fff; }
.comp-btns[data-side="right"] .comp-btn {
    color: #8eb8d5; background: #fff; border: 1px solid #8eb8d5;
}
.comp-btns[data-side="right"] .comp-btn:hover { background: #f4f8fb; }
.comp-btns[data-side="right"] .comp-btn.active { background: #8eb8d5; color: #fff; }
.comp-scenes { display: flex; justify-content: center; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 0.5rem; }
.comp-scene-btn {
    padding: 0.3rem 1rem;
    font-family: 'Poppins', Arial, sans-serif; font-size: 0.8rem; font-weight: 500;
    color: #b0aea5; background: transparent; border: 1px solid transparent;
    border-radius: 6px; cursor: pointer;
    transition: color 0.25s, background-color 0.25s;
}
.comp-scene-btn:hover {
    color: #fff;
    background: #d97757;
}
.comp-scene-btn.active {
    color: #d97757; border-color: #d97757; background: transparent;
}

/* ── Footer ── */
footer p + p { margin-top: 0.25rem; }
