/* Scroll-triggered motion layer for the about page. */
body.fukewenj-shared-page {
  overflow-x: clip !important;
  overflow-y: visible !important;
}

#replica-main .scroll-reveal {
  opacity: 0;
  transform: translate3d(0, 40px, 0);
  transition: opacity 700ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 700ms cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}

#replica-main .scroll-reveal.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

#replica-main .scroll-parallax {
  will-change: transform;
}

/* Development history: reproduce the approved reference's desktop sticky rail. */
#replica-main .jxf-history-timeline > .layout-group-inner-wrapper-d86bc {
  overflow: visible !important;
}

#replica-main .jxf-history-card {
  position: relative;
  z-index: 3;
  opacity: 0;
  will-change: opacity, transform;
}

/* The reference draws one line segment per stage. Starting each segment below
   its year marker keeps the rail from running through the year numerals. */
#replica-main .jxf-history-card::after {
  position: absolute;
  z-index: 1;
  top: 52px;
  bottom: 0;
  left: 83px;
  width: 2px;
  background: linear-gradient(180deg, #0054c3 0%, #00a975 100%);
  content: "";
}

#replica-main .jxf-history-card > .page-layout-block-container-c2587 {
  position: relative;
  z-index: 2;
}

#replica-main .jxf-history-card::before {
  position: absolute;
  z-index: 5;
  top: 40px;
  left: 78px;
  width: 13px;
  height: 13px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: linear-gradient(135deg, #0054c3, #00a975);
  box-shadow: 0 0 0 1px rgba(0, 84, 195, 0.28);
  box-sizing: border-box;
  content: "";
}

@media (min-width: 751px) {
  #replica-main .jxf-history-timeline #lGSnyiBI {
    position: sticky !important;
    z-index: 4;
    top: 100px;
    align-self: start;
    height: fit-content;
  }

  #replica-main .jxf-history-timeline #lGSnyiBI > .layout-inner-wrapper-c1718 {
    position: static;
  }
}

@media (max-width: 750px) {
  #replica-main .jxf-history-timeline #lGSnyiBI > .layout-inner-wrapper-c1718 {
    position: static;
  }

  /* Keep each stage image group inside the same horizontal range as its copy. */
  #replica-main .jxf-history-card .grid-layer--inner-ef909:has(.image_item-ff7d7) {
    box-sizing: border-box;
    padding-right: 20px !important;
    padding-left: max(0px, calc(20% - 60px)) !important;
  }

  #replica-main .jxf-history-card::after {
    left: 39px;
  }

  #replica-main .jxf-history-card::before {
    left: 33px;
  }
}

@media (prefers-reduced-motion: reduce) {
  #replica-main .scroll-reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  #replica-main .jxf-history-card {
    opacity: 1;
    transform: none;
  }
}
