/* Improving MLLMs with Continual Learning — project page styles. */

:root {
  --ink: #141b2d;
  --ink-2: #2c3548;
  --muted: #5b6577;
  --faint: #8a93a3;
  --line: #e3e7ee;
  --soft: #f6f7f9;
  --bg: #ffffff;

  --accent: #1d5fa8;
  --accent-soft: #eef4fb;
  --problem: #b42318;
  --problem-soft: #fdf3f2;
  --approach: #17775a;
  --approach-soft: #f0f7f3;

  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --measure: 760px;
  --radius: 14px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink-2);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; height: auto; }

/* Inline Font Awesome icons (sized like the FA script's svg-inline--fa). */
svg.fa { display: inline-block; overflow: visible; vertical-align: -0.125em; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

strong { color: var(--ink); font-weight: 600; }

h1, h2, h3, h4 { margin: 0; color: var(--ink); }

.wrap {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 20px;
}

.wrap--wide { max-width: 1000px; }

/* — header — */

.masthead {
  padding: clamp(48px, 8vw, 88px) 0 clamp(28px, 4vw, 40px);
  text-align: center;
}

.publication-title {
  max-width: 900px;
  margin: 0 auto;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2.05rem, 4.4vw, 3.1rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.authors {
  margin-top: 26px;
  font-size: 1.12rem;
  line-height: 1.6;
}

.author-block { display: inline-block; }

.authors a {
  color: var(--ink);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: #c9d6ea;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.authors a:hover { text-decoration-color: var(--accent); }

.authors sup, .affiliations sup, .correspondence sup {
  color: var(--muted);
  font-size: 0.68em;
  margin-left: 1px;
}

.affiliations {
  margin-top: 4px;
  color: var(--muted);
  font-size: 1rem;
}

.affiliations .author-block + .author-block { margin-left: 14px; }

.correspondence {
  margin-top: 6px;
  color: var(--faint);
  font-size: 0.875rem;
}

.venues {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 26px;
}

.venue {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  font-size: 0.9rem;
  line-height: 1.3;
}

.venue-name {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ink);
  font-weight: 600;
}

.venue-name svg, .venue-name i { color: var(--accent); font-size: 0.85em; }

.venue-kind {
  padding-left: 10px;
  border-left: 1px solid var(--line);
  color: var(--muted);
}

.links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 18px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px 10px 17px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.2;
  transition: background-color 150ms ease;
}

.btn:hover { background: var(--ink-2); color: #fff; text-decoration: none; }
.btn .icon { display: inline-flex; font-size: 0.95em; }

/* — teaser — */

.teaser {
  margin: 8px auto 0;
}

.teaser img {
  margin: 0 auto;
  width: 100%;
}

/* — sections — */

.section { padding: clamp(40px, 6vw, 64px) 0 0; }

.section-title {
  margin: 0 auto 28px;
  max-width: 720px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.7rem, 3.2vw, 2.3rem);
  line-height: 1.15;
  letter-spacing: -0.015em;
  text-align: center;
  text-wrap: balance;
}

.section-num { color: var(--accent); }

.emoji {
  font-size: 0.78em;
  vertical-align: 0.06em;
}

.subsection-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 40px 0 10px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.5rem;
  line-height: 1.2;
}

.subsection-title .icon { display: inline-flex; color: var(--accent); font-size: 0.8em; }

.lede { margin: 0 0 8px; }

/* — callouts — */

.callouts { display: grid; gap: 12px; }

.callout {
  padding: 16px 20px 17px;
  border-radius: var(--radius);
  background: var(--soft);
  border: 1px solid var(--line);
}

.callout p, .callout ul { margin: 0; }

.callout ul { padding-left: 1.15rem; }
.callout li + li { margin-top: 2px; }

.callout-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 6px;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.4;
}

.callout-label .icon { display: inline-flex; font-size: 0.95em; }

.callout--problem { background: var(--problem-soft); border-color: #f6d5d1; }
.callout--problem .callout-label { color: var(--problem); }

.callout--approach { background: var(--approach-soft); border-color: #cfe7db; }
.callout--approach .callout-label { color: var(--approach); }

/* — figures — */

.figure { margin: 28px 0 0; text-align: center; }

.figure img {
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.figure--narrow img { max-width: 80%; }

.figure figcaption {
  max-width: 620px;
  margin: 12px auto 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
  text-wrap: pretty;
}

/* — carousels — */

.custom-carousel { margin: 28px 0 0; }

.carousel-container { display: grid; }

.carousel-slide {
  grid-area: 1 / 1;
  align-self: start;
  opacity: 0;
  visibility: hidden;
  transition: opacity 350ms ease, visibility 0s linear 350ms;
}

.carousel-slide.active {
  opacity: 1;
  visibility: visible;
  transition: opacity 350ms ease;
}

.carousel-slide .figure { margin: 0; }

.carousel-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  margin-top: 16px;
}

.carousel-indicators { display: flex; align-items: center; }

/* The button is a comfortable click target; the visible dot is drawn inside it. */
.carousel-indicator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  min-width: 24px;
  padding: 0 4px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
}

.carousel-indicator::before {
  content: "";
  display: block;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #cfd5df;
  transition: width 200ms ease, background-color 200ms ease;
}

.carousel-indicator:hover::before { background: #a9b2c1; }
.carousel-indicator.active::before { width: 22px; background: var(--ink); }

.carousel-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  color: var(--ink-2);
  cursor: pointer;
  transition: border-color 150ms ease, background-color 150ms ease;
}

.carousel-arrow:hover { border-color: #c3cad6; background: var(--soft); }
.carousel-arrow svg { width: 16px; height: 16px; }

/* — takeaways — */

.takeaway {
  margin-top: 32px;
  padding: 20px 24px 22px;
  border-radius: var(--radius);
  background: var(--accent-soft);
  border: 1px solid #d6e3f3;
  border-left: 4px solid var(--accent);
}

.takeaway .callout-label { color: var(--accent); margin-bottom: 8px; }

.takeaway p {
  margin: 0;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 500;
  line-height: 1.4;
  text-wrap: pretty;
}

/* — footer — */

.site-footer {
  margin-top: clamp(56px, 8vw, 88px);
  padding: 40px 0 48px;
  border-top: 1px solid var(--line);
  background: var(--soft);
  text-align: center;
}

.site-footer h4 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.25rem;
  margin-bottom: 6px;
}

.site-footer p { margin: 0; }

.site-footer .credit {
  max-width: 640px;
  margin: 22px auto 0;
  color: var(--faint);
  font-size: 0.8rem;
  line-height: 1.55;
}

.site-footer .credit a { color: var(--muted); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 2px; }

@media (max-width: 640px) {
  body { font-size: 16px; }
  .authors { font-size: 1.02rem; }
  .affiliations .author-block { display: block; }
  .affiliations .author-block + .author-block { margin-left: 0; }
  .callout { padding: 14px 16px 15px; }
  .takeaway { padding: 16px 18px 18px; }
  .takeaway p { font-size: 1.15rem; }
  .figure--narrow img { max-width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .carousel-slide, .carousel-slide.active, .carousel-indicator::before { transition: none; }
}
