:root {
  --primary: #4f46e5;
  --primary-dark: #3730a3;
  --violet: #7c3aed;
  --ink: #182033;
  --muted: #657087;
  --surface: #ffffff;
  --surface-soft: #f6f7fc;
  --surface-tint: #eef2ff;
  --border: #e3e7f1;
  --shadow-sm: 0 8px 24px rgba(38, 46, 84, 0.07);
  --shadow-md: 0 18px 50px rgba(55, 48, 163, 0.11);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --content-width: 960px;
  --reading-width: 760px;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--surface);
  font-family: "Noto Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.72;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--primary);
}

.site-nav {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid rgba(227, 231, 241, 0.82);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.site-nav-inner {
  min-height: 4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 0 1.5rem;
}

.site-mark {
  display: block;
  flex: 0 0 auto;
  color: var(--ink);
  font-family: "Google Sans", "Noto Sans", sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.site-mark:hover {
  color: var(--primary);
}

.site-nav-links {
  display: flex;
  align-items: center;
  gap: 1.65rem;
}

.site-nav-links a {
  position: relative;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
  transition: color 180ms ease;
}

.site-nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -0.35rem;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), var(--violet));
  transition: right 180ms ease;
}

.site-nav-links a:hover,
.site-nav-links a:focus-visible,
.site-nav-links a.is-active {
  color: var(--primary-dark);
}

.site-nav-links a:hover::after,
.site-nav-links a:focus-visible::after,
.site-nav-links a.is-active::after {
  right: 0;
}

.publication-header {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(circle at 18% 0%, rgba(79, 70, 229, 0.15), transparent 32%),
    radial-gradient(circle at 82% 8%, rgba(124, 58, 237, 0.12), transparent 30%),
    linear-gradient(180deg, #fafaff 0%, #f7f8fe 100%) !important;
}

.publication-header::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.34;
  background-image: linear-gradient(rgba(79, 70, 229, 0.055) 1px, transparent 1px), linear-gradient(90deg, rgba(79, 70, 229, 0.055) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, black, transparent 76%);
  pointer-events: none;
}

.publication-header .hero-body {
  position: relative;
  padding: 4.4rem 1.5rem 3.8rem;
}

.publication-kicker {
  display: inline-flex;
  align-items: center;
  margin: 0 0 1.15rem;
  padding: 0.38rem 0.78rem;
  border: 1px solid rgba(79, 70, 229, 0.18);
  border-radius: 999px;
  color: var(--primary-dark);
  background: rgba(238, 242, 255, 0.8);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.publication-title {
  max-width: 1040px;
  margin: 0 auto 1.65rem !important;
  color: var(--ink) !important;
  font-family: "Google Sans", "Noto Sans", sans-serif;
  font-size: clamp(2.35rem, 4vw, 3.55rem) !important;
  line-height: 1.12 !important;
  letter-spacing: -0.04em;
}

.brand-name,
.acronym-letter {
  color: var(--primary) !important;
}

.acronym-letter {
  text-decoration: none;
}

.publication-authors {
  max-width: 1040px;
  margin: 0 auto;
  color: #343c50;
  font-family: "Google Sans", "Noto Sans", sans-serif;
  line-height: 1.7;
}

.author-block {
  display: inline-block;
  font-size: 1.02rem;
}

.author-block strong {
  font-weight: 600;
}

.team-name {
  display: block;
  max-width: 900px;
  margin: 0.75rem auto 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.65;
}

.author-note {
  display: block;
  margin: 0.55rem auto 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
}

.hero-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.8rem;
  margin-top: 1.75rem;
}

.publication-button {
  min-width: 8.25rem;
  height: 2.8rem;
  padding: 0 1.25rem;
  border-width: 1px;
  font-weight: 700;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.publication-button-primary {
  border-color: transparent;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--violet));
  box-shadow: 0 10px 24px rgba(79, 70, 229, 0.24);
}

.publication-button-primary:hover,
.publication-button-primary:focus-visible {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(79, 70, 229, 0.3);
}

.publication-button-secondary {
  border-color: #cfd5e6;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow-sm);
}

.publication-button-secondary:hover,
.publication-button-secondary:focus-visible {
  border-color: rgba(79, 70, 229, 0.4);
  color: var(--primary-dark);
  background: #fff;
  transform: translateY(-2px);
}

.page-section {
  padding: 5.5rem 1.5rem;
}

#abstract,
#experiments {
  background: var(--surface-soft);
}

#method,
#conclusion {
  background: var(--surface);
}

.section-heading {
  width: fit-content;
  max-width: 100%;
  margin: 0 auto 2rem !important;
  color: var(--ink) !important;
  font-family: "Google Sans", "Noto Sans", sans-serif;
  font-size: clamp(1.85rem, 3vw, 2.35rem) !important;
  letter-spacing: -0.035em;
}

.section-heading::after {
  content: "";
  display: block;
  width: 2.8rem;
  height: 3px;
  margin: 0.75rem auto 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), var(--violet));
}

.content-block {
  max-width: var(--reading-width);
  margin: 0 auto;
}

.content-block p,
#experiments > .container > p {
  color: #3f485d;
  line-height: 1.82;
}

.content-block.has-text-justified,
.content.has-text-justified {
  text-align: left !important;
}

.result-highlights {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  max-width: var(--reading-width);
  margin: 2rem auto 0;
}

.result-highlight {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.15rem 1.25rem;
  border: 1px solid #dfe3f3;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.85);
  box-shadow: var(--shadow-sm);
}

.result-highlight strong {
  color: var(--primary);
  font-family: "Google Sans", "Noto Sans", sans-serif;
  font-size: 1.65rem;
  line-height: 1;
  white-space: nowrap;
}

.result-highlight span {
  color: var(--muted);
  font-size: 0.83rem;
  line-height: 1.4;
}

.figure-card {
  width: 100%;
  margin: 0 auto 1.75rem;
  padding: 1rem;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-md);
}

.figure-card img,
.img-responsive {
  display: block;
  width: 100%;
  height: auto;
  border-radius: calc(var(--radius-lg) - 8px);
}

.figure-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

#experiments > .container {
  max-width: var(--content-width) !important;
}

.experiment-subheading {
  position: relative;
  margin: 4.5rem 0 1rem !important;
  padding-left: 1.05rem;
  color: var(--ink) !important;
  font-family: "Google Sans", "Noto Sans", sans-serif;
  font-size: clamp(1.35rem, 2.4vw, 1.7rem) !important;
  line-height: 1.35;
  letter-spacing: -0.02em;
}

.experiment-subheading:first-of-type {
  margin-top: 2rem !important;
}

.experiment-subheading::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.13em;
  bottom: 0.13em;
  width: 4px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--primary), var(--violet));
}

.experiment-tasks,
.experiment-video-tasks {
  margin-top: 1.75rem;
}

.experiment-tasks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

.experiment-task-group,
.experiment-video-pair {
  min-width: 0;
}

.experiment-task-videos,
.experiment-video-pair-videos {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 0.85rem;
}

.video-card {
  min-width: 0;
  margin: 0;
  padding: 0.65rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.video-card:hover {
  border-color: rgba(79, 70, 229, 0.24);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.page-video,
.intervention-image {
  display: block;
  width: 100%;
  max-width: none !important;
  height: auto;
  border-radius: var(--radius-sm);
  background: #11131b;
}

.page-video {
  aspect-ratio: 1 / 1;
  object-fit: contain;
}

.video-card p,
.experiment-video-caption {
  margin: 0.7rem 0 0;
  color: #323b50;
  font-size: 0.88rem;
  line-height: 1.45;
}

.intervention-media {
  display: block;
}

.intervention-media .experiment-task-videos {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.intervention-media .intervention-image {
  height: auto;
  aspect-ratio: 2570 / 1024;
  object-fit: contain;
  background: #f8f9fd;
}

.experiment-video-tasks {
  display: grid;
  gap: 1.25rem;
}

.experiment-video-tasks:not(.experiment-video-tasks-row) {
  width: 100%;
  max-width: 680px;
  margin-right: auto;
  margin-left: auto;
}

.experiment-video-pair {
  padding: 0;
}

.experiment-video-pair .video-card-media {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
}

.experiment-video-tasks:not(.experiment-video-tasks-row) .video-card-media {
  width: auto;
}

.experiment-video-tasks:not(.experiment-video-tasks-row) .experiment-video-pair-videos {
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.experiment-video-tasks:not(.experiment-video-tasks-row) .video-card {
  flex: 0 1 auto;
}

.experiment-video-tasks:not(.experiment-video-tasks-row) .page-video {
  width: auto;
  max-width: 100% !important;
  height: 220px;
  aspect-ratio: auto;
  border-radius: var(--radius-sm);
}

.experiment-video-caption {
  margin-top: 0.8rem;
  text-align: center;
  font-size: 1rem;
}

.experiment-video-tasks-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.experiment-video-tasks-row .experiment-video-pair-videos {
  display: block;
}

.experiment-video-tasks-row .page-video {
  aspect-ratio: 16 / 9 !important;
}

.site-footer {
  padding: 2rem 1.5rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  background: #f9faff;
  font-size: 0.84rem;
}

.site-footer strong {
  color: var(--primary-dark);
}

:focus-visible {
  outline: 3px solid rgba(79, 70, 229, 0.3);
  outline-offset: 3px;
}

@media screen and (max-width: 1023px) {
  .publication-header .hero-body {
    padding-top: 3.6rem;
    padding-bottom: 3.2rem;
  }

  .page-section {
    padding: 4.5rem 1.5rem;
  }

  .experiment-tasks {
    grid-template-columns: 1fr;
  }
}

@media screen and (max-width: 768px) {
  html {
    scroll-padding-top: 4.4rem;
  }

  .site-nav-inner {
    min-height: 3.65rem;
    padding: 0 1rem;
  }

  .site-nav-links {
    max-width: calc(100vw - 7rem);
    gap: 1.15rem;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .site-nav-links::-webkit-scrollbar {
    display: none;
  }

  .site-nav-links a {
    flex: 0 0 auto;
    font-size: 0.78rem;
  }

  .publication-header .hero-body {
    padding: 2.8rem 1rem 2.6rem;
  }

  .publication-kicker {
    font-size: 0.68rem;
    letter-spacing: 0.065em;
  }

  .publication-title {
    font-size: clamp(2rem, 9vw, 2.65rem) !important;
    line-height: 1.12 !important;
  }

  .author-block {
    font-size: 0.94rem;
  }

  .team-name {
    font-size: 0.8rem;
  }

  .page-section {
    padding: 3.75rem 1rem;
  }

  .section-heading {
    margin-bottom: 1.55rem !important;
  }

  .result-highlights,
  .experiment-video-tasks-row {
    grid-template-columns: 1fr;
  }

  .figure-card {
    padding: 0.5rem;
    border-radius: var(--radius-md);
  }

  .experiment-subheading {
    margin-top: 3.5rem !important;
  }

  .intervention-media .experiment-task-videos {
    grid-template-columns: 1fr;
  }

  .intervention-media .intervention-image {
    aspect-ratio: auto;
  }
}

@media screen and (max-width: 520px) {
  body {
    font-size: 15px;
  }

  .site-mark {
    font-size: 0.94rem;
  }

  .site-nav-links {
    max-width: calc(100vw - 5.4rem);
    gap: 0.7rem;
  }

  .site-nav-inner {
    gap: 0.7rem;
  }

  .site-nav-links a {
    font-size: 0.7rem;
  }

  .publication-title {
    font-size: clamp(1.85rem, 8.7vw, 2.2rem) !important;
    letter-spacing: -0.045em;
  }

  .hero-links {
    gap: 0.6rem;
  }

  .publication-button {
    min-width: 7.7rem;
  }

  .experiment-video-tasks:not(.experiment-video-tasks-row) .page-video {
    height: 128px;
  }

}

@media screen and (max-width: 360px) {
  .experiment-task-videos,
  .experiment-video-pair-videos {
    grid-template-columns: 1fr;
  }

  .experiment-video-tasks:not(.experiment-video-tasks-row) .page-video {
    height: 110px;
  }
}

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

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