:root {
    --bg: #f4f6fb;
    --bg-alt: #e9edf6;
    --surface: rgba(255, 255, 255, 0.86);
    --surface-strong: #ffffff;
    --surface-tint: #f8faff;
    --ink: #111a2c;
    --muted: #4d5a74;
    --muted-soft: #6d7890;
    --rule: rgba(17, 26, 44, 0.11);
    --card-border: rgba(17, 26, 44, 0.1);
    --accent: #2f6b4f;
    --accent-soft: #43a175;
    --accent-rgb: 47, 107, 79;
    --accent-warm: #c4561d;
    --shadow-sm: 0 10px 24px rgba(14, 26, 50, 0.08);
    --shadow-md: 0 22px 48px rgba(14, 26, 50, 0.12);
    --radius-md: 22px;
    --radius-lg: 30px;
    --max-width: 1280px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
    background: linear-gradient(165deg, var(--bg) 0%, var(--bg-alt) 100%);
    color: var(--ink);
    font-family: "Manrope", "Segoe UI", sans-serif;
    line-height: 1.65;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
.site { min-height: 100vh; position: relative; }
.content, .footer { width: min(calc(100% - 44px), var(--max-width)); margin: 0 auto; }

.masthead { padding: clamp(20px, 3vw, 32px) 0 12px; position: relative; }
.masthead__inner {
    width: min(calc(100% - 28px), calc(var(--max-width) + 88px));
    margin: 0 auto;
    padding: clamp(52px, 8vw, 88px) clamp(22px, 3.8vw, 44px) clamp(42px, 6vw, 62px);
    background: linear-gradient(135deg, rgba(255,255,255,0.94) 0%, rgba(246,250,255,0.92) 100%);
    border: 1px solid rgba(255, 255, 255, 0.66);
    border-radius: clamp(26px, 4vw, 38px);
    box-shadow: var(--shadow-md);
    text-align: center;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(8px);
}

.title {
    margin: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: "Fraunces", Georgia, serif;
    font-weight: 700;
    font-size: clamp(3.5rem, 9vw, 7.1rem);
    line-height: 0.95;
    letter-spacing: 0;
    color: var(--accent);
}

.subtitle {
    margin: clamp(10px, 1.8vw, 16px) auto 0;
    max-width: 1180px;
    font-size: clamp(1.24rem, 2.15vw, 1.86rem);
    white-space: nowrap;
    line-height: 1.42;
    color: var(--muted);
    font-weight: 650;
}
.subtitle--small {
    max-width: 980px;
    font-size: clamp(1.02rem, 1.45vw, 1.18rem);
    font-weight: 500;
    color: var(--muted-soft);
}

.venue { margin: 0 0 18px; font-size: 0.84rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); font-weight: 700; }

.venue--above-authors {
    margin: 20px 0 -8px;
}
.venue span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(120deg, var(--accent), var(--accent-soft));
    box-shadow: 0 8px 16px rgba(var(--accent-rgb), 0.22);
}
.title-rule { width: clamp(84px, 11vw, 130px); height: 1px; margin: 24px auto 0; background: linear-gradient(90deg, transparent, rgba(var(--accent-rgb), 0.52), transparent); }

.authors { margin-top: 34px; display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-start; gap: 14px 10px; }
.author-pill {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    flex: 1 1 150px;
    max-width: 190px;
    min-width: 136px;
    color: var(--ink);
    text-align: center;
    padding: 8px;
    border-radius: 16px;
    transition: transform 220ms ease, background-color 220ms ease;
}
.author-pill:hover { text-decoration: none; transform: translateY(-4px); background: rgba(255,255,255,0.56); }
.author-pill__photo-frame {
    width: clamp(76px, 9vw, 96px);
    height: clamp(76px, 9vw, 96px);
    border-radius: 50%;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(255, 255, 255, 0.88);
    background: linear-gradient(145deg, var(--accent), var(--accent-soft));
    box-shadow: 0 10px 22px rgba(14, 26, 50, 0.12);
}

.author-pill__photo {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center;
}

.affiliation {
    margin: 18px 0 0;
    color: var(--muted-soft);
    font-size: clamp(1.02rem, 1.9vw, 1.28rem);
    font-weight: 500;
    padding: 0 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: clamp(42px, 8vw, 110px);
    flex-wrap: wrap;
}

.links { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-width: 188px;
    padding: 12px 16px;
    border-radius: 15px;
    color: #152a49;
    font-size: 0.94rem;
    font-weight: 800;
    transition: transform 180ms ease, background-color 180ms ease;
}
.links a:hover { text-decoration: none; transform: translateY(-3px); background: rgba(255,255,255,0.48); }
.link-icon {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: linear-gradient(150deg, rgba(var(--accent-rgb),0.12), rgba(var(--accent-rgb),0.2));
    color: var(--accent);
    border: 1px solid rgba(var(--accent-rgb),0.22);
    font-size: 1.02rem;
    font-weight: 800;
    line-height: 1;
    flex-shrink: 0;
}

.content { padding: clamp(20px, 3.8vw, 34px) 0 clamp(44px, 7vw, 64px); }
.section { margin-bottom: clamp(20px, 2.8vw, 32px); position: relative; }
.section:last-child { margin-bottom: 0; }
.section__header { margin-bottom: 14px; }
.section__header h2 {
    margin: 0;
    font-family: "Fraunces", Georgia, serif;
    font-size: clamp(1.5rem, 2.75vw, 2.08rem);
    font-weight: 600;
    letter-spacing: 0;
    color: #192e4e;
}
.body-text { margin: 0; color: #2a3650; text-align: justify; font-size: clamp(1rem, 1.38vw, 1.1rem); }
.motivation-shell { display: grid; gap: 18px; }
.motivation-copy { padding: clamp(22px, 3.2vw, 32px); border-radius: var(--radius-lg); }
.motivation-question { margin: 0 0 16px; font-family: "Fraunces", Georgia, serif; font-size: clamp(1.2rem, 2.05vw, 1.58rem); line-height: 1.32; color: #1d3559; text-align: justify; }
.motivation-copy .body-text + .body-text { margin-top: 12px; }
.motivation-figure { margin: 0; border-radius: 22px; overflow: hidden; }
.motivation-image { display: block; width: 100%; height: auto; padding: 16px; background: #ffffff; }
.motivation-figure figcaption { border-top: 1px solid rgba(17,26,44,0.08); padding: 12px 18px 15px; font-size: 0.91rem; line-height: 1.55; font-weight: 650; color: var(--muted); }
.motivation-copy, .motivation-figure, .info-panel, .info-card, .contribution-card, .download-card, .media-frame {
    border: 1px solid var(--card-border);
    background: var(--surface);
    backdrop-filter: blur(8px);
    box-shadow: var(--shadow-sm);
}
.motivation-copy { background: linear-gradient(138deg, rgba(255,255,255,0.92) 0%, rgba(244,250,247,0.9) 100%); }
.motivation-figure { background: #fdfefe; }
.section-kicker, .card-kicker, .contribution-card__index {
    margin: 0 0 10px;
    text-transform: uppercase;
    letter-spacing: 0.17em;
    font-size: 0.74rem;
    font-weight: 800;
    color: var(--accent-soft);
}
.content-stack { display: grid; gap: 20px; }
.info-panel { padding: clamp(20px, 3vw, 30px); border-radius: 26px; }
.panel-text, .card-body, .contribution-card__text { margin: 12px 0 0; color: #40506a; font-size: clamp(0.99rem, 1.35vw, 1.08rem); text-align: justify; }
.card-grid, .contribution-grid, .download-grid, .curve-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.download-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.info-card, .contribution-card, .download-card { border-radius: 22px; padding: clamp(18px, 2.8vw, 26px); }
.info-card--accent { background: linear-gradient(155deg, rgba(255,255,255,0.92), rgba(245,249,255,0.88)); }
.card-title { margin: 0 0 12px; font-family: "Fraunces", Georgia, serif; font-size: clamp(1.16rem, 1.76vw, 1.34rem); line-height: 1.25; color: #1d3559; }
.media-frame { margin: 18px 0 0; border-radius: 18px; overflow: hidden; background: #fdfefe; }
.media-frame--pipeline { width: 80%; margin-left: auto; margin-right: auto; }
.media-frame--diagnostic { margin-top: 0; padding: 18px 18px 0; background: #ffffff; }
.media-frame--diagnostic .media-frame__image { border-radius: 10px; }
.media-frame__image { display: block; width: 100%; height: auto; }
figcaption { padding: 10px 12px 14px; color: var(--muted); font-weight: 700; text-align: center; }

.results-shell { display: grid; gap: 16px; }
.results-intro { margin-top: 0; }
.download-card p { margin-bottom: 0; color: #40506a; }
.download-card a { font-weight: 800; }

.footer { padding: 0 0 30px; color: #60718d; font-size: 0.92rem; text-align: center; }

.animate-in { opacity: 0; transform: translateY(24px); animation: fadeUp 840ms cubic-bezier(0.22,1,0.36,1) forwards; }
.animate-in--1 { animation-delay: 90ms; } .animate-in--2 { animation-delay: 180ms; } .animate-in--3 { animation-delay: 280ms; } .animate-in--4 { animation-delay: 380ms; } .animate-in--5 { animation-delay: 500ms; } .animate-in--6 { animation-delay: 620ms; } .animate-in--7 { animation-delay: 740ms; }
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 760ms cubic-bezier(0.22,1,0.36,1), transform 760ms cubic-bezier(0.22,1,0.36,1); }
.reveal.is-visible { opacity: 1; transform: translateY(0); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 1080px) {
    .content, .footer { width: min(calc(100% - 34px), var(--max-width)); }
    .masthead__inner { width: min(calc(100% - 34px), calc(var(--max-width) + 36px)); }
    .download-grid, .motivation-panels { grid-template-columns: 1fr; }
}
@media (max-width: 980px) {
    .subtitle { white-space: normal; }
}

@media (max-width: 840px) {
    .card-grid, .contribution-grid, .curve-grid { grid-template-columns: 1fr; }
    .author-pill { flex: 1 1 calc(50% - 14px); max-width: 260px; }
    .links a { min-width: 0; flex: 1 1 calc(50% - 10px); }
    .affiliation { gap: 18px; }
}
@media (max-width: 700px) {
    .media-frame--pipeline { width: 100%; }
    .content, .footer, .masthead__inner { width: min(calc(100% - 24px), var(--max-width)); }
    .masthead { padding-top: 12px; }
    .masthead__inner { padding: 42px 16px 34px; border-radius: 24px; }
    .title { width: 100%; font-size: clamp(3rem, 18vw, 5rem); }
    .subtitle { font-size: clamp(1rem, 4.9vw, 1.3rem); }
    .affiliation { font-size: 0.98rem; }
    .author-pill { flex-basis: calc(50% - 8px); min-width: 128px; }
    .section__header h2 { font-size: clamp(1.36rem, 6vw, 1.8rem); }
    .motivation-copy, .motivation-figure, .info-panel, .info-card, .contribution-card, .download-card, .media-frame { border-radius: 18px; }
}
@media (max-width: 520px) {
    .author-pill, .links a { flex-basis: 100%; max-width: none; }
    .motivation-question, .body-text, .panel-text, .card-body, .contribution-card__text { text-align: left; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
    .animate-in, .reveal { opacity: 1 !important; transform: none !important; }
}
