:root {
  --text: #172436;
  --heading: #10243a;
  --muted: #596b7c;
  --subtle: #8495a5;
  --surface: #ffffff;
  --soft: #f4f8fb;
  --soft-blue: #edf5f8;
  --line: #dce7ef;
  --line-strong: #c8d8e2;
  --accent: #2d7f8e;
  --accent-dark: #1f6472;
  --accent-soft: #e2f1f3;
  --button: #17324d;
  --button-muted: #edf2f5;
  --max-content: 850px;
  --max-wide: 1120px;
  --radius: 8px;
  --pill: 999px;
  --figure-height: 580px;
  --shadow: 0 16px 38px rgba(20, 51, 71, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--surface);
  color: var(--text);
  font-family: "Source Sans 3", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
}

a {
  color: var(--accent);
  text-decoration: none;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--accent-dark);
  text-decoration: underline;
}

.container {
  max-width: 1180px !important;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

.hero-section {
  padding: clamp(3.4rem, 7vw, 5.9rem) 1rem 3.1rem;
  background:
    linear-gradient(180deg, #f7fbfd 0%, var(--soft) 100%);
  border-bottom: 1px solid var(--line);
}

.project-name {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 0 1.25rem;
  padding: 0.32rem 0.68rem;
  border: 1px solid rgba(45, 127, 142, 0.25);
  border-radius: var(--pill);
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1;
  text-transform: uppercase;
  box-shadow: 0 5px 18px rgba(45, 127, 142, 0.08);
}

.publication-title {
  max-width: 1010px;
  margin: 0 auto 1.4rem;
  color: var(--heading);
  font-family: "Inter", "Source Sans 3", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: clamp(2rem, 4.2vw, 3.15rem);
  font-weight: 700;
  line-height: 1.14;
  letter-spacing: -0.015em;
}

.publication-authors {
  max-width: 960px;
  margin: 0 auto 0.9rem;
  color: #26384a;
  font-size: 1.22rem;
  font-weight: 500;
  line-height: 1.6;
}

.author-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: baseline;
  justify-content: center;
}

.author-row + .author-row {
  margin-top: 0.12rem;
}

.author-block {
  display: inline-block;
  white-space: nowrap;
}

.author-block:not(:last-child)::after {
  content: ",";
  color: var(--subtle);
  margin-right: 0.38rem;
}

.publication-authors a {
  color: var(--accent-dark);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: transparent;
}

.publication-authors a:hover {
  color: #174f5b;
  text-decoration-color: rgba(45, 127, 142, 0.5);
}

.author-markers {
  margin-left: 0.12rem;
  color: var(--muted);
  font-size: 0.72em;
  font-weight: 600;
  line-height: 0;
}

.publication-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem 1.55rem;
  margin: 0.75rem auto 0.25rem;
  color: var(--muted);
  font-size: 1.08rem;
  font-weight: 500;
}

.affiliation-marker {
  color: var(--muted);
  font-size: 0.78em;
  font-weight: 700;
}

.contribution-note {
  margin: 0 auto 1.75rem;
  color: var(--subtle);
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.5;
  text-align: center;
}

.publication-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.62rem;
}

.project-button {
  height: auto;
  min-height: 2.35rem;
  padding: 0.55rem 0.95rem !important;
  border: 1px solid transparent !important;
  border-radius: var(--pill) !important;
  background: var(--button) !important;
  color: #ffffff !important;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.2;
  box-shadow: 0 8px 20px rgba(23, 50, 77, 0.14);
  transition: background-color 160ms ease, border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
}

.project-button .icon {
  width: 1rem;
  height: 1rem;
  margin-right: 0.38rem !important;
}

.project-button:hover {
  background: var(--accent-dark) !important;
  color: #ffffff !important;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(31, 100, 114, 0.18);
}

.project-button.is-coming-soon,
.project-button.is-coming-soon[disabled] {
  border-color: var(--line-strong) !important;
  background: var(--button-muted) !important;
  color: #768797 !important;
  cursor: not-allowed;
  opacity: 1;
  box-shadow: none;
  transform: none;
}

.section {
  padding: 3.1rem 1rem;
}

.abstract-section {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.section-title {
  position: relative;
  margin: 0 auto 1.55rem;
  padding-bottom: 0.45rem;
  color: var(--heading);
  font-family: "Inter", "Source Sans 3", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1.58rem;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  letter-spacing: -0.01em;
}

.section-title::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  width: 2.4rem;
  height: 2px;
  margin: 0 auto;
  border-radius: var(--pill);
  background: var(--accent);
  content: "";
}

.paper-text {
  max-width: var(--max-content);
  margin: 0 auto;
  color: #263648;
  font-size: 1.06rem;
  line-height: 1.86;
  text-align: left;
}

.paper-text p {
  margin: 0;
}

.paper-text strong {
  color: var(--heading);
  font-weight: 700;
}

.figure-section {
  background: var(--soft-blue);
  border-bottom: 1px solid var(--line);
}

.section-heading {
  max-width: var(--max-wide);
  margin: 0 auto 1.25rem;
}

.carousel-heading {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 2.6rem;
}

.carousel-heading .section-title {
  margin: 0;
}

.carousel-actions {
  position: absolute;
  right: 0;
  display: flex;
  gap: 0.5rem;
}

.carousel-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--pill);
  background: var(--surface);
  color: var(--accent-dark);
  cursor: pointer;
  box-shadow: 0 7px 16px rgba(20, 51, 71, 0.08);
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease, opacity 160ms ease;
}

.carousel-arrow:hover {
  border-color: rgba(45, 127, 142, 0.38);
  background: var(--accent-soft);
  color: var(--accent-dark);
  transform: translateY(-1px);
}

.carousel-arrow:disabled {
  cursor: default;
  opacity: 0.42;
  transform: none;
  box-shadow: none;
}

.carousel-arrow .icon {
  width: 0.86rem;
  height: 0.86rem;
  margin: 0 !important;
}

.figure-carousel {
  display: flex;
  gap: 1rem;
  max-width: var(--max-wide);
  margin: 0 auto;
  padding: 0.25rem 0.25rem 1.1rem;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-behavior: smooth;
  scroll-padding-left: 0.25rem;
  scroll-snap-type: x mandatory;
  scrollbar-color: #9ebec8 transparent;
  scrollbar-width: thin;
}

.figure-carousel:focus {
  outline: 2px solid rgba(45, 127, 142, 0.5);
  outline-offset: 4px;
}

.figure-carousel::-webkit-scrollbar {
  height: 0.6rem;
}

.figure-carousel::-webkit-scrollbar-track {
  background: transparent;
}

.figure-carousel::-webkit-scrollbar-thumb {
  border: 0.16rem solid transparent;
  border-radius: var(--pill);
  background: #9ebec8;
  background-clip: padding-box;
}

.figure-card {
  display: flex;
  flex-direction: column;
  flex: 0 0 min(88%, 1000px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.figure-card h3 {
  display: flex;
  align-items: center;
  min-height: 3.55rem;
  margin: 0;
  padding: 1rem 1.1rem 0.85rem;
  border-bottom: 1px solid var(--line);
  color: var(--heading);
  font-family: "Inter", "Source Sans 3", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.3;
}

.project-figure {
  display: flex;
  align-items: center;
  justify-content: center;
  height: var(--figure-height);
  margin: 0;
  padding: 1rem;
  background: #fbfdfe;
  text-align: center;
}

.project-figure img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 100%;
  margin: 0 auto;
  border: 1px solid #e8f0f4;
  border-radius: 6px;
  background: #ffffff;
  object-fit: contain;
}

.bibtex-section {
  background: var(--surface);
}

pre {
  max-width: var(--max-content);
  margin: 0 auto;
  padding: 1.2rem !important;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfdfe !important;
  color: var(--text);
  font-size: 0.88rem;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: normal;
}

code {
  display: block;
  background: transparent !important;
  color: inherit !important;
  font-family: "SF Mono", "Monaco", "Cascadia Code", "Roboto Mono", monospace;
}

.footer {
  padding: 2rem 1rem;
  background: var(--soft);
  border-top: 1px solid var(--line);
}

.footer .content {
  color: var(--muted);
  font-size: 0.92rem;
}

.button:focus,
a:focus,
.carousel-arrow:focus {
  outline: 2px solid rgba(45, 127, 142, 0.68);
  outline-offset: 3px;
}

@media screen and (max-width: 768px) {
  :root {
    --figure-height: 420px;
  }

  .hero-section {
    padding: 3.1rem 0.75rem 2.35rem;
  }

  .publication-title {
    font-size: 2.08rem;
  }

  .publication-authors {
    font-size: 1.1rem;
    line-height: 1.65;
  }

  .author-row {
    flex-wrap: wrap;
    row-gap: 0.04rem;
  }

  .publication-meta {
    font-size: 1rem;
  }

  .section {
    padding: 2.45rem 0.75rem;
  }

  .section-title {
    font-size: 1.42rem;
  }

  .paper-text {
    font-size: 1rem;
    line-height: 1.82;
  }

  .carousel-heading {
    flex-direction: column;
    gap: 0.85rem;
  }

  .carousel-actions {
    position: static;
  }

  .figure-card {
    flex-basis: calc(100% - 0.25rem);
  }
}

@media screen and (max-width: 520px) {
  :root {
    --figure-height: 330px;
  }

  .publication-title {
    font-size: 1.74rem;
  }

  .publication-links {
    align-items: stretch;
    flex-direction: column;
    max-width: 320px;
    margin: 0 auto;
  }

  .project-button {
    width: 100%;
    justify-content: center;
  }

  .figure-carousel {
    gap: 0.8rem;
    padding-bottom: 0.95rem;
  }

  .figure-card h3 {
    padding: 0.85rem 0.9rem 0.75rem;
    font-size: 0.98rem;
  }

  .project-figure {
    padding: 0.75rem;
  }

  pre {
    padding: 1rem !important;
    font-size: 0.8rem;
  }
}
