:root {
  --ink: #111111;
  --muted: #666666;
  --line: #dedede;
  --soft: #f1f6f2;
  --paper: #ffffff;
  --accent: #4f7f5d;
  --accent-display: #5f8f6c;
  --accent-on-dark: #8bc59b;
  --accent-soft: #e8f2ea;
  --dark: #101010;
}

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

body {
  background: var(--paper);
  color: var(--ink);
  font-family: "Inter", "Noto Sans", sans-serif;
  font-size: 16px;
  line-height: 1.65;
}

.page-container {
  margin-left: auto;
  margin-right: auto;
  max-width: 1180px !important;
  width: 100%;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--accent);
}

button,
input {
  font: inherit;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 3px solid #2e6f45;
  outline-offset: 3px;
}

.site-nav {
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 30;
}

.site-nav .navbar-item {
  color: #333333;
  font-size: 0.9rem;
  font-weight: 500;
}

.site-nav .navbar-item:hover {
  background: transparent;
  color: var(--accent);
}

.wordmark {
  color: var(--ink) !important;
  font-family: "Source Serif 4", serif;
  font-size: 1.15rem !important;
  font-weight: 600 !important;
  letter-spacing: -0.02em;
}

.publication-hero .hero-body {
  padding: 6.5rem 1.5rem 4.5rem;
}

.publication-title {
  color: var(--ink);
  font-family: "Source Serif 4", serif;
  font-size: clamp(2.2rem, 5.5vw, 4.6rem) !important;
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 1.02;
  margin: 0 auto 2.6rem !important;
  max-width: 1050px;
}

.publication-title span {
  display: block;
}

.publication-title .brand-name {
  color: var(--accent-display);
  font-family: inherit;
  font-size: 1em;
  font-weight: 700;
  letter-spacing: -0.045em;
  margin-bottom: 1rem;
}

.publication-title .paper-title {
  font-size: 0.5em;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.12;
}

.publication-authors {
  display: flex;
  flex-wrap: wrap;
  font-size: 1rem;
  gap: 0.35rem 1rem;
  justify-content: center;
  margin: 0 auto 1rem;
  max-width: 1000px;
}

.publication-authors span {
  white-space: nowrap;
}

.publication-authors sup,
.affiliations sup,
.contributions sup {
  font-size: 0.68em;
  top: -0.42em;
}

.affiliations {
  color: #555555;
  display: flex;
  flex-wrap: wrap;
  font-size: 0.82rem;
  gap: 0.25rem 1rem;
  justify-content: center;
  margin: 0 auto 0.55rem;
  max-width: 950px;
}

.contributions {
  color: #777777;
  font-size: 0.75rem;
  margin-bottom: 1.7rem;
}

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

.publication-links .button {
  border: 1px solid #d9d9d9;
  font-size: 0.88rem;
  font-weight: 600;
  min-height: 2.65rem;
}

.publication-links .button.is-dark {
  border-color: var(--ink);
}

.coming-soon {
  color: #777777 !important;
  cursor: default;
}

.paper-video-section {
  padding-bottom: 2rem;
  padding-top: 0;
}

.paper-video-placeholder {
  align-items: center;
  aspect-ratio: 16 / 9;
  background: var(--dark);
  border: 1px solid #2c2c2c;
  color: white;
  display: flex;
  gap: 1.2rem;
  justify-content: center;
  min-height: 260px;
  overflow: hidden;
  position: relative;
}

.paper-video-placeholder::before,
.paper-video-placeholder::after {
  border: 1px solid #2c2c2c;
  content: "";
  height: 72%;
  position: absolute;
  transform: rotate(45deg);
  width: 40%;
}

.paper-video-placeholder::before {
  left: -15%;
  top: -38%;
}

.paper-video-placeholder::after {
  bottom: -38%;
  right: -15%;
}

.paper-video-placeholder > * {
  position: relative;
  z-index: 1;
}

.video-playmark {
  align-items: center;
  border: 1px solid #777777;
  border-radius: 50%;
  display: flex;
  height: 4rem;
  justify-content: center;
  padding-left: 0.2rem;
  width: 4rem;
}

.paper-video-placeholder p {
  font-family: "Source Serif 4", serif;
  font-size: clamp(1.7rem, 4vw, 3rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin: 0;
}

.paper-video-placeholder div span {
  color: #a8a8a8;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.teaser-section {
  padding-bottom: 6rem;
  padding-top: 2rem;
}

.paper-figure {
  margin: 0;
}

.paper-figure img {
  display: block;
  height: auto;
  width: 100%;
}

.teaser-figure {
  background: var(--soft);
  border: 1px solid var(--line);
  padding: 0.7rem;
}

.teaser-figure figcaption {
  color: var(--muted);
  font-size: 0.84rem;
  margin: 0.9rem auto 0.25rem;
  max-width: 850px;
  text-align: center;
}

.section {
  padding: 7rem 1.5rem;
}

.section-rule {
  border-top: 1px solid var(--line);
}

.section-soft {
  background: var(--soft);
}

.section-heading {
  margin-bottom: 3.5rem;
  max-width: 810px;
}

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

.section-heading .title {
  color: var(--ink);
  font-family: "Source Serif 4", serif;
  font-size: clamp(2rem, 4vw, 3.25rem) !important;
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.08;
}

.section-intro {
  color: var(--muted);
  font-size: 1.05rem;
  margin: 1.2rem auto 0;
  max-width: 720px;
}

.overview-copy {
  margin-bottom: 4rem !important;
}

.overview-copy .content p {
  color: #333333;
}

.key-claim {
  border-left: 3px solid var(--accent);
  display: flex;
  flex-direction: column;
  padding: 0.35rem 0 0.35rem 1.7rem;
}

.key-value {
  color: var(--accent);
  font-family: "Source Serif 4", serif;
  font-size: 4rem;
  font-weight: 600;
  letter-spacing: -0.05em;
  line-height: 1;
}

.key-label {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.35;
  margin-top: 0.7rem;
}

.key-note {
  color: var(--muted);
  font-size: 0.82rem;
  margin-top: 0.6rem;
}

.stat-grid {
  border-bottom: 1px solid var(--line);
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.stat {
  display: flex;
  flex-direction: column;
  min-height: 150px;
  padding: 2rem;
}

.stat + .stat {
  border-left: 1px solid var(--line);
}

.stat strong {
  font-family: "Source Serif 4", serif;
  font-size: 2.4rem;
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1;
}

.stat span {
  color: var(--muted);
  font-size: 0.82rem;
  margin-top: 0.8rem;
}

.taxonomy-figure {
  background: #0b0b0b;
  border: 1px solid #222222;
  margin-bottom: 3rem;
  padding: 0.5rem;
}

.family-grid {
  display: grid;
  gap: 1px;
  grid-template-columns: repeat(4, 1fr);
}

.family-card {
  background: white;
  border-top: 3px solid #bbbbbb;
  display: flex;
  flex-direction: column;
  min-height: 330px;
  padding: 1.6rem;
}

.family-card.daily { border-top-color: #69b5bc; }
.family-card.dynamic { border-top-color: #a4b98f; }
.family-card.interaction { border-top-color: #78a99b; }
.family-card.ground { border-top-color: #c7ac70; }

.family-card h3 {
  font-family: "Source Serif 4", serif;
  font-size: 1.6rem;
  font-weight: 600;
  letter-spacing: -0.025em;
  margin: 0.5rem 0 0.8rem;
}

.family-card > p {
  color: var(--muted);
  font-size: 0.88rem;
}

.family-card dl {
  border-top: 1px solid var(--line);
  display: flex;
  gap: 2rem;
  margin-top: auto;
  padding-top: 1rem;
}

.family-card dl div {
  display: flex;
  flex-direction: column;
}

.family-card dt {
  color: #707070;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.family-card dd {
  font-size: 1rem;
  font-weight: 600;
}

.method-block {
  margin-bottom: 5rem !important;
}

.method-figure {
  border: 1px solid var(--line);
  margin: 0;
  padding: 1rem;
}

.method-figure img {
  display: block;
  height: auto;
  width: 100%;
}

.method-copy p {
  border-top: 1px solid var(--line);
  color: #444444;
  margin: 0 !important;
  padding: 1.2rem 0;
}

.method-copy p:last-child {
  border-bottom: 1px solid var(--line);
}

.evidence-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: 0.8fr 1.2fr;
}

.alignment-card,
.ablation-card {
  border: 1px solid var(--line);
  padding: 2rem;
}

.alignment-card h3,
.ablation-card h3 {
  font-family: "Source Serif 4", serif;
  font-size: 1.45rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.metric-row {
  align-items: center;
  display: grid;
  font-size: 0.72rem;
  gap: 0.7rem;
  grid-template-columns: 8.5rem 1fr 2.5rem;
  margin-bottom: 1rem;
}

.metric-row .bar {
  background: #eeeeee;
  height: 0.55rem;
  overflow: hidden;
}

.metric-row .bar i {
  background: #999999;
  display: block;
  height: 100%;
}

.metric-row:first-of-type .bar i {
  background: var(--accent);
}

.metric-row strong {
  font-size: 0.72rem;
  text-align: right;
}

.alignment-card > p {
  color: #707070;
  font-size: 0.68rem;
  margin-top: 1.5rem;
}

.ablation-images {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(2, 1fr);
}

.ablation-images img {
  border: 1px solid #eeeeee;
  display: block;
  width: 100%;
}

.ablation-images figcaption {
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.45;
  margin-top: 0.55rem;
}

.comparison-section {
  background: var(--dark);
  color: #f5f5f5;
}

.light-heading .title {
  color: white;
}

.light-heading .section-intro {
  color: #aaaaaa;
}

.motion-tabs {
  border-bottom: 1px solid #353535;
  display: flex;
  gap: 0;
  margin: 0 auto 2.5rem;
  overflow-x: auto;
  width: fit-content;
}

.motion-tab {
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  color: #8f8f8f;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.8rem 1.3rem;
  white-space: nowrap;
}

.motion-tab:hover {
  color: white;
}

.motion-tab.is-active {
  border-bottom-color: var(--accent-on-dark);
  color: white;
}

.motion-pagination {
  display: flex;
  gap: 0.45rem;
  justify-content: center;
  margin-top: 1.5rem;
}

.motion-page-button {
  background: transparent;
  border: 1px solid #555555;
  border-radius: 50%;
  color: #999999;
  cursor: pointer;
  font-size: 0.76rem;
  font-weight: 700;
  height: 2rem;
  width: 2rem;
}

.motion-page-button:hover,
.motion-page-button.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.comparison-panel {
  margin: 0 auto;
  max-width: none;
}

.motion-page:not(.is-active) {
  display: none;
}

.motion-meta {
  align-items: end;
  display: flex;
  justify-content: space-between;
  margin-bottom: 1.2rem;
}

.motion-family {
  color: var(--accent-on-dark);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.motion-meta h3 {
  color: white;
  font-family: "Source Serif 4", serif;
  font-size: 1.55rem;
  font-weight: 600;
  line-height: 1.2;
  margin-top: 0.2rem;
}

.motion-id {
  color: #888888;
  font-size: 0.72rem;
}

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

.tracker-card {
  background: #181818;
  border: 1px solid #303030;
  min-width: 0;
}

.video-shell {
  aspect-ratio: 16 / 9;
  background: #222222;
  overflow: hidden;
  position: relative;
}

.video-shell video {
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.rank {
  background: rgba(16, 16, 16, 0.85);
  border: 1px solid #555555;
  bottom: 0.65rem;
  font-size: 0.68rem;
  font-weight: 700;
  left: 0.65rem;
  padding: 0.25rem 0.45rem;
  position: absolute;
}

.rank.best {
  background: var(--accent);
  border-color: var(--accent);
}

.tracker-meta {
  align-items: center;
  display: flex;
  justify-content: space-between;
  padding: 0.85rem 1rem;
}

.tracker-meta h4 {
  color: white;
  font-size: 0.86rem;
  font-weight: 600;
}

.tracker-meta p {
  color: #999999;
  font-size: 0.7rem;
}

.tracker-meta strong {
  color: white;
  font-size: 0.86rem;
  margin-left: 0.25rem;
}

.sync-controls {
  align-items: center;
  border-top: 1px solid #333333;
  display: grid;
  gap: 0.85rem;
  grid-template-columns: auto auto 1fr;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
}

.control-button {
  align-items: center;
  background: transparent;
  border: 1px solid #555555;
  color: white;
  cursor: pointer;
  display: inline-flex;
  font-size: 0.72rem;
  font-weight: 600;
  gap: 0.3rem;
  min-height: 2.4rem;
  padding: 0 0.8rem;
}

.control-button:hover {
  border-color: #aaaaaa;
}

.time-display {
  color: #cccccc;
  font-size: 0.7rem;
  font-variant-numeric: tabular-nums;
  min-width: 5.5rem;
  text-align: right;
}

.load-status {
  color: #aaaaaa;
  font-size: 0.68rem;
  grid-column: 1 / -1;
}

.guidance-grid h3 {
  font-family: "Source Serif 4", serif;
  font-size: 1.3rem;
  font-weight: 600;
  line-height: 1.25;
  margin-bottom: 0.8rem;
}

.guidance-grid p {
  color: var(--muted);
  font-size: 0.88rem;
}

.citation-section {
  background: var(--soft);
}

.citation-box {
  background: #181818;
  color: #ededed;
  overflow: hidden;
  padding: 1.4rem;
  position: relative;
}

.citation-box pre {
  background: transparent;
  color: inherit;
  font-size: 0.75rem;
  line-height: 1.7;
  margin: 0;
  overflow-x: auto;
  padding: 2.7rem 0.5rem 0.5rem;
  white-space: pre;
}

.copy-button {
  align-items: center;
  background: transparent;
  border: 1px solid #555555;
  color: #dddddd;
  cursor: pointer;
  display: inline-flex;
  font-size: 0.68rem;
  gap: 0.25rem;
  padding: 0.35rem 0.6rem;
  position: absolute;
  right: 1.4rem;
  top: 1.4rem;
}

.copy-button:hover {
  border-color: white;
  color: white;
}

.site-footer {
  background: white;
  border-top: 1px solid var(--line);
  padding: 3.5rem 1.5rem;
}

.footer-grid {
  align-items: end;
  display: flex;
  font-size: 0.78rem;
  justify-content: space-between;
}

.footer-credit {
  color: var(--muted);
  text-align: right;
}

.footer-credit a {
  text-decoration: underline;
}

@media (max-width: 1023px) {
  .columns.is-variable.is-7 {
    margin-left: 0;
    margin-right: 0;
  }

  .site-nav .navbar-menu {
    border-top: 1px solid var(--line);
    box-shadow: none;
  }

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

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

@media (max-width: 768px) {
  .publication-hero .hero-body {
    padding: 4.2rem 1rem 3.2rem;
  }

  .publication-title {
    font-size: clamp(2rem, 10vw, 3.2rem) !important;
  }

  .publication-authors {
    font-size: 0.87rem;
    gap: 0.25rem 0.7rem;
  }

  .affiliations {
    font-size: 0.72rem;
  }

  .paper-video-section {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .paper-video-placeholder {
    min-height: 0;
  }

  .video-playmark {
    height: 3rem;
    width: 3rem;
  }

  .teaser-section {
    padding: 1rem 0.75rem 4rem;
  }

  .section {
    padding: 4.5rem 1rem;
  }

  .section-heading {
    margin-bottom: 2.5rem;
  }

  .section-heading .title {
    font-size: clamp(1.85rem, 8vw, 2.7rem) !important;
  }

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

  .stat {
    min-height: 125px;
    padding: 1.4rem;
  }

  .stat + .stat {
    border-left: 0;
  }

  .stat:nth-child(even) {
    border-left: 1px solid var(--line);
  }

  .stat:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }

  .stat strong {
    font-size: 2rem;
  }

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

  .family-card {
    min-height: 270px;
  }

  .evidence-grid,
  .ablation-images {
    grid-template-columns: 1fr;
  }

  .alignment-card,
  .ablation-card {
    padding: 1.25rem;
  }

  .metric-row {
    grid-template-columns: 7.5rem 1fr 2.3rem;
  }

  .motion-tabs {
    justify-content: flex-start;
    width: 100%;
  }

  .motion-tab {
    padding: 0.75rem 1rem;
  }

  .motion-meta {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.45rem;
  }

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

  .sync-controls {
    grid-template-columns: 1fr 1fr;
  }

  .time-display {
    grid-column: 1 / -1;
  }

  .control-button {
    justify-content: center;
  }

  .footer-grid {
    align-items: flex-start;
    flex-direction: column;
    gap: 1.5rem;
  }

  .footer-credit {
    text-align: left;
  }
}

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