:root {
    --nav-w: 260px;
    --item-h: 150px;       /* height of each nav slot */
    --visible: 4;         /* how many slots show at once */
  }

  .timeline-section {
    /* min-height: 100vh; */
        height: calc(var(--total-items, 6) * 100vh);   /* set via JS */
    min-height: unset;                              /* remove old min-height */
    position: relative;
    display: flex;
    gap: 25px;
    background-image: url('../img/who-we-are/timeline-bg.webp');
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-position: center;
  }
  .timeline-section:before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    background-color: #000;
    opacity: 0.6;
}
.timeline-section .journey--heading {
    color: var(--white);
    z-index: 2;
    font-family: HaasGrotDispMedium;
    font-size: 36px;
    position: absolute;
    left: 85px;
    top: 50px;
}
  .timeline-nav {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
    width: 30%;
    align-self: flex-start;   /* add this line */
  }

  .nav-window {
    position: relative;
    height: calc(var(--item-h) * var(--visible));
    width: 100%;
  }

  .timeline-nav__list {
    list-style: none;
    display: flex;
    flex-direction: column;
    width: 100%;
    position: absolute;
    top: 0;
    right: 0;
    transition: transform 0.55s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .timeline-nav__item {
    height: var(--item-h);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: end;
    flex-shrink: 0;
    padding-right: 25px;
  }

  .timeline-nav::before {
    content: "";
    position: absolute;
    right: 0%;
    top: 0;
    width: 2px;
    height: 100%;
    background:var(--white);
    transform: translateX(-50%);
    pointer-events: none;
    z-index: 0;
  }

  .timeline-nav__link {
    z-index: 2;
    text-decoration: none;
    color: rgba(255,255,255,0.28);
    transition: color 0.3s;
  }

  /* Dot */
  .timeline-nav__link::before {
    content: "";
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: white;
    z-index: 2;
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.5;
  }

  .timeline-nav__link span {
    font-weight: 500;
    font-size: 32px;
    transition: font-size 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    font-weight 0.4s,
    color 0.3s,
    opacity 0.3s;
    font-family: HaasGrotDispMedium;
    white-space: nowrap;
  }

  .timeline-nav__link.is-active {
    color: #fff;
    opacity: 1 !important;
  }
  .timeline-nav__link.is-active::before {
    /* transform: scale(1.55); */
    opacity: 1;
  }
  .timeline-nav__link.is-active span {
    font-weight: 700;
    font-size: 48px;
  }

  .timeline-nav__item:first-child  .timeline-nav__link { opacity: 0.4; }
  .timeline-nav__item:last-child   .timeline-nav__link { opacity: 0.4; }

  /* ─── RIGHT CONTENT ─── */
   .timeline-content {
      position: sticky;
      top: 0;
      height: 100vh;
      width: 70%;
      align-self: flex-start;   /* required for sticky inside flex */
      overflow: hidden;
      z-index: 2;
  }

   /* Stack every item on top of each other */
.timeline-item {
    position: absolute;
    inset: 0;
    height: 100%;
    min-height: unset;          /* override old 80vh */
    display: flex;
    align-items: center;
    /* hidden by default */
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.45s ease, visibility 0.45s ease;
}

/* Only the active item is visible */
.timeline-item.is-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

  .timeline-item__bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    z-index: 0;
  }

  .timeline-item__bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
      90deg,
      rgba(10,10,10,0.78) 0%,
      rgba(10,10,10,0.55) 40%,
      rgba(10,10,10,0.22) 100%
    );
  }

  .timeline-item__visual {
    position: relative;
    z-index: 1;
    height: 100%;
  }

  .timeline-item__body {
    position: relative;
    z-index: 2;
    padding-left: 120px;
    padding-right: 100px;
  }

  .item-eyebrow {
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.5);
    margin-bottom: 1.2rem;
  }

  .item-year {
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.12em;
    color: rgba(255,255,255,0.55);
    margin-bottom: 0.8rem;
  }

  .item-title {
    font-weight: 700;
    font-size: clamp(2.4rem, 4vw, 3.6rem);
    line-height: 1.05;
    letter-spacing: -0.01em;
    margin-bottom: 1.8rem;
    color: #fff;
    max-width: 88%;
    width: 100%;
  }

  .item-desc {
		color: var(--white);
    font-size: 18px;
    font-weight: 400;
  }
