:root {
  --paper: #fbfaf6;
  --white: #ffffff;
  --ink: #17232a;
  --muted: #607077;
  --line: #d7dfdc;
  --mint: #eaf4e8;
  --green: #176f3a;
  --green-dark: #0f4f2a;
  --blue: #176690;
  --blue-soft: #e8f2f7;
  --coral: #df5b2c;
  --coral-soft: #faece5;
  --night: #17282d;
  --night-soft: #223a40;
  --shadow: 0 18px 50px rgb(24 45 49 / 9%);
  --radius: 22px;
  --shell: 960px;
  --shell-wide: 960px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

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

a {
  color: var(--blue);
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--green-dark);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--coral);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  color: var(--white);
  background: var(--night);
  border-radius: 8px;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.shell {
  width: min(calc(100% - 40px), var(--shell));
  margin-inline: auto;
}

.shell--wide {
  width: min(calc(100% - 40px), var(--shell-wide));
}

.site-nav {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 58px;
  padding: 8px max(20px, calc((100vw - var(--shell-wide)) / 2));
  border-bottom: 1px solid rgb(215 223 220 / 85%);
  background: rgb(251 250 246 / 94%);
  backdrop-filter: blur(12px);
}

.site-nav a {
  color: var(--ink);
  text-decoration: none;
}

.site-nav__brand {
  font-weight: 760;
  letter-spacing: -0.02em;
}

.site-nav__links {
  display: flex;
  min-width: 0;
  gap: 18px;
  overflow-x: auto;
  font-size: 0.84rem;
  font-weight: 650;
  scrollbar-width: none;
  white-space: nowrap;
}

.site-nav__links::-webkit-scrollbar {
  display: none;
}

.site-nav__links a:hover {
  color: var(--green);
}

.hero {
  padding-top: clamp(76px, 10vw, 132px);
  padding-bottom: 52px;
  text-align: center;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  text-wrap: pretty;
}

h1,
h2,
h3 {
  margin-top: 0;
  line-height: 1.12;
}

h1 {
  width: fit-content;
  max-width: 1040px;
  margin-right: auto;
  margin-bottom: 30px;
  margin-left: auto;
  font-family: ui-rounded, "Arial Rounded MT Bold", system-ui, sans-serif;
  font-size: clamp(2.3rem, 4.5vw, 3.6rem);
  font-weight: 780;
  letter-spacing: -0.052em;
}

.hero-title__line {
  display: block;
  width: 100%;
  text-align: justify;
  text-align-last: justify;
  white-space: nowrap;
}

h2 {
  margin-bottom: 18px;
  font-family: ui-rounded, "Arial Rounded MT Bold", system-ui, sans-serif;
  font-size: clamp(1.7rem, 3.2vw, 2.35rem);
  font-weight: 770;
  letter-spacing: -0.04em;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.14rem;
  letter-spacing: -0.02em;
}

.authors {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 5px 20px;
  margin: 0 auto 8px;
  color: var(--blue);
  font-size: 1.06rem;
  font-weight: 700;
}

.authors span:not(:last-child)::after {
  margin-left: 20px;
  color: var(--line);
  content: "·";
}

.authors sup,
.affiliations sup,
.equal-contribution sup {
  margin-left: 0.12em;
  font-size: 0.66em;
  line-height: 0;
  vertical-align: super;
}

.affiliations {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 24px;
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 650;
}

.equal-contribution {
  margin: 5px 0 24px;
  color: var(--muted);
  font-size: 0.82rem;
}

.venue {
  margin: 10px 0 24px;
  color: var(--muted);
  font-weight: 650;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.action {
  display: inline-flex;
  align-items: baseline;
  gap: 9px;
  min-width: 148px;
  padding: 10px 17px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
}

.action--disabled {
  color: var(--muted);
  cursor: not-allowed;
}

.action__label {
  color: var(--ink);
  font-weight: 760;
}

.action__note {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.teaser {
  padding-bottom: 32px;
}

.paper-figure {
  margin: 0;
}

.paper-figure img {
  width: 100%;
  height: auto;
  border-radius: 16px;
}

.paper-figure figcaption {
  margin-top: 13px;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.5;
  text-align: center;
}

.paper-figure--hero {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
}

.paper-figure--hero img {
  border-radius: 10px;
}

.tldr {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 24px;
  align-items: start;
  max-width: 1020px;
  margin: 45px auto 0;
  padding: 25px 29px;
  border: 1px solid #cadfcd;
  border-radius: var(--radius);
  background: var(--mint);
}

.tldr__label {
  padding-top: 2px;
  color: var(--green-dark);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.tldr p {
  margin: 0;
  font-size: clamp(1.05rem, 2vw, 1.33rem);
  font-weight: 610;
  line-height: 1.5;
}

.tldr p,
.abstract__body p,
.mnist-block__copy p,
.section-heading:not(.section-heading--centered) > p:last-child {
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
}

.section {
  padding-top: clamp(36px, 4vw, 52px);
  padding-bottom: clamp(36px, 4vw, 52px);
  scroll-margin-top: 58px;
}

.section-heading {
  width: 100%;
  max-width: none;
  margin-bottom: 48px;
}

.section-heading--centered {
  margin-right: auto;
  margin-left: auto;
  text-align: center;
}

.section-heading > p:last-child {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1.08rem;
}

.gallery-section__heading {
  margin-bottom: 42px;
}

.concept-galleries {
  display: grid;
  gap: 48px;
}

.concept-gallery {
  min-width: 0;
}

.concept-gallery__header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 15px;
}

.concept-gallery__header h3 {
  margin: 0 0 3px;
  font-family: ui-rounded, "Arial Rounded MT Bold", system-ui, sans-serif;
  font-size: 1.32rem;
  font-weight: 770;
}

.concept-gallery__controls {
  display: flex;
  gap: 8px;
  flex: none;
}

.gallery-button {
  display: inline-grid;
  width: 39px;
  height: 39px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  place-items: center;
  color: var(--ink);
  background: var(--white);
  box-shadow: 0 5px 16px rgb(27 48 51 / 6%);
  cursor: pointer;
  font: inherit;
  font-size: 1.08rem;
  line-height: 1;
}

.gallery-button:hover:not(:disabled) {
  color: var(--white);
  border-color: var(--green);
  background: var(--green);
}

.gallery-button:disabled {
  opacity: 0.35;
  cursor: default;
}

.concept-gallery__viewport {
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-snap-type: inline mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.concept-gallery__viewport::-webkit-scrollbar {
  display: none;
}

.concept-gallery__track {
  display: flex;
  gap: 12px;
  min-width: 100%;
  padding: 0;
  margin: 0;
  list-style: none;
}

.concept-gallery__track li {
  flex: 0 0 calc((100% - 36px) / 4);
  overflow: hidden;
  aspect-ratio: 1;
  border: 1px solid #dce3e0;
  border-radius: 16px;
  background: var(--blue-soft);
  scroll-snap-align: start;
}

.concept-gallery__track img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.slider-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 22px;
}

.slider-card {
  grid-column: span 2;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: 0 10px 34px rgb(27 48 51 / 6%);
}

.slider-card__heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 14px;
}

.slider-card__heading h3 {
  margin: 0;
}

.slider-media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1;
  margin-bottom: 20px;
  border: 1px solid #e1e6e4;
  border-radius: 16px;
  background: var(--blue-soft);
}

.slider-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.creativity-slider {
  --slider-progress: 0%;
  width: 100%;
  height: 34px;
  margin: 0;
  appearance: none;
  background: transparent;
  cursor: ew-resize;
  touch-action: pan-y;
}

.creativity-slider::-webkit-slider-runnable-track {
  height: 7px;
  border: 1px solid #b9c8c3;
  border-radius: 999px;
  background: linear-gradient(
    to right,
    var(--green) 0,
    var(--green) var(--slider-progress),
    #dfe8e4 var(--slider-progress),
    #dfe8e4 100%
  );
}

.creativity-slider::-webkit-slider-thumb {
  width: 24px;
  height: 24px;
  margin-top: -9px;
  border: 3px solid var(--white);
  border-radius: 50%;
  appearance: none;
  background: var(--coral);
  box-shadow: 0 0 0 1px var(--coral), 0 3px 9px rgb(34 55 55 / 24%);
}

.creativity-slider::-moz-range-track {
  height: 7px;
  border: 1px solid #b9c8c3;
  border-radius: 999px;
  background: #dfe8e4;
}

.creativity-slider::-moz-range-progress {
  height: 7px;
  border-radius: 999px;
  background: var(--green);
}

.creativity-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border: 3px solid var(--white);
  border-radius: 50%;
  background: var(--coral);
  box-shadow: 0 0 0 1px var(--coral), 0 3px 9px rgb(34 55 55 / 24%);
}

.slider-labels {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: -2px;
  color: var(--muted);
  font-size: 0.73rem;
  font-weight: 700;
}

.fallback-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 15px;
}

.fallback-pair img {
  border-radius: 10px;
}

.paper-figure--method {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
}

.paper-figure--method img {
  border-radius: 8px;
}

.method-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  overflow: hidden;
  margin-top: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
}

.method-steps article {
  padding: 30px;
  background: var(--white);
}

.method-steps p {
  margin: 0;
  color: var(--muted);
  font-size: 0.93rem;
}

.step-number {
  display: block;
  margin-bottom: 18px;
  color: var(--coral);
  font-size: 0.8rem;
  font-weight: 850;
  letter-spacing: 0.13em;
}

.mnist-block__copy {
  width: 100%;
  max-width: none;
  margin-bottom: 30px;
}

.mnist-block__copy h2 {
  margin-bottom: 12px;
}

.mnist-block__copy p {
  margin: 0;
  color: var(--muted);
}

.figure-kicker {
  display: block;
  margin-bottom: 9px;
  color: var(--green);
  font-size: 0.75rem;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.paper-figure--result {
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
}

.figure-scroller {
  overflow-x: auto;
  border-radius: 12px;
  background: var(--white);
  scrollbar-color: #80979a #dbe4e2;
  scrollbar-width: thin;
}

.wide-figure {
  max-width: none;
  min-width: 100%;
}

.abstract {
  display: grid;
  grid-template-columns: minmax(180px, 0.34fr) minmax(0, 1fr);
  gap: 64px;
}

.abstract--early {
  padding-top: 0;
}

.abstract .section-heading {
  width: auto;
  margin: 0;
}

.abstract__body {
  width: 100%;
  color: #34454b;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.08rem;
  line-height: 1.78;
  text-align: justify;
  text-justify: inter-word;
}

.abstract__body p {
  width: 100%;
  text-align: justify;
  text-align-last: left;
  text-wrap: wrap;
  hyphens: auto;
}

.abstract__body p:first-child {
  margin-top: 0;
}

.abstract__body p:last-child {
  margin-bottom: 0;
}

.site-footer {
  padding: 42px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  background: var(--white);
  font-size: 0.82rem;
}

.site-footer .shell {
  display: flex;
  justify-content: space-between;
  gap: 30px;
}

.site-footer p {
  margin: 0;
}

@media (max-width: 980px) {
  .concept-gallery__track li {
    flex-basis: calc((100% - 24px) / 3);
  }

  .slider-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .slider-card,
  .slider-card:nth-child(4) {
    grid-column: auto;
  }

  .method-steps {
    grid-template-columns: 1fr;
  }

  .abstract {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

@media (max-width: 720px) {
  body {
    font-size: 16px;
  }

  .shell,
  .shell--wide {
    width: min(calc(100% - 28px), var(--shell));
  }

  .site-nav {
    min-height: 54px;
    padding: 8px 14px;
  }

  .site-nav__brand {
    max-width: 150px;
    font-size: 0.78rem;
    line-height: 1.15;
  }

  .site-nav__links {
    gap: 12px;
    font-size: 0.72rem;
  }

  .hero {
    padding-top: 66px;
    padding-bottom: 40px;
  }

  .hero-title__line {
    text-align: center;
    text-align-last: center;
    white-space: normal;
  }

  .authors {
    display: block;
  }

  .authors span {
    display: inline-block;
    margin: 2px 5px;
  }

  .authors span:not(:last-child)::after {
    display: none;
  }

  .tldr {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 21px;
  }

  .concept-galleries {
    gap: 38px;
  }

  .concept-gallery__header {
    gap: 14px;
  }

  .concept-gallery__track li {
    flex-basis: min(74vw, 280px);
  }

  .slider-grid {
    grid-template-columns: 1fr;
  }

  .slider-card {
    grid-column: auto;
    width: 100%;
  }

  .paper-figure--method,
  .paper-figure--result {
    padding: 10px;
  }

  .method-steps article {
    padding: 24px;
  }

  .wide-figure {
    width: auto;
    min-width: 800px;
  }

  .site-footer .shell {
    display: block;
  }

  .site-footer p + p {
    margin-top: 6px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
