.timeline {
  position: relative;
  max-width: 1000px;
  margin: 0 auto;
  padding: 20px 0;
}
.timeline::after {
  content: '';
  position: absolute;
  width: 6px;
  background-color: var(--timeline-bg);
  top: 0;
  bottom: 0;
  left: 50%; /* or 46% if you want to match your ruler */
  transform: translateX(-50%);
  z-index: 1;
}
.container {
  position: relative;
  width: 50%;
  padding: 10px 40px;
}
.left { left: 0; text-align: right; }
.right { left: 50%; text-align: left; }
.timeline-circle {
  position: absolute;
  top: 50%;
  left: 50%; /* or 46% to match the ruler */
  transform: translate(-50%, -50%);
  width: 25px;
  height: 25px;
  border-radius: 50%;
  z-index: 2;
}

/* Position circles at the edge closest to the ruler */
.container.left .timeline-circle {
  left: 100%;
  transform: translate(-50%, -50%);
}
.container.right .timeline-circle {
  left: 0;
  transform: translate(-50%, -50%);
}

/* Optional: add margin to content so it doesn't overlap the ruler/circle */
.container.left .content {
  margin-right: 40px;
}
.container.right .content {
  margin-left: 40px;
}

@media screen and (max-width: 600px) {
  .timeline::after {
    left: 31px;
    transform: none;
  }
  .container {
    width: 100%;
    padding-left: 70px;
    padding-right: 25px;
    left: 0 !important;
  }
  .timeline-circle {
    left: 31px !important;
    transform: none !important;
  }
}