.career-section {
  position: relative;
  padding-top: clamp(72px, 8vw, 120px);
  padding-bottom: clamp(80px, 10vw, 144px);
  overflow: hidden;
  background:
    radial-gradient(circle at 8% 14%, rgba(130, 162, 17, 0.12), transparent 25%),
    linear-gradient(180deg, #ffffff 0%, #f7f8f3 100%);
}

.timeline-container {
  width: min(100%, 1120px);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.career-section .section-heading {
  max-width: 680px;
  margin-bottom: clamp(48px, 7vw, 88px);
  text-align: center;
}

.career-section .section-heading h2 {
  margin-top: 10px;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.12;
  color: var(--color-text);
}

.career-section .section-heading p {
  max-width: 60ch;
  margin: 18px auto 0;
  color: #5d6259;
  line-height: 1.7;
}

.timeline {
  position: relative;
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 30px;
  bottom: 30px;
  left: 50%;
  width: 2px;
  background: linear-gradient(
    to bottom,
    rgba(130, 162, 17, 0),
    var(--color-primary) 8%,
    var(--color-primary) 92%,
    rgba(130, 162, 17, 0)
  );
  transform: translateX(-50%);
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 96px 1fr;
  min-height: 190px;
}

.timeline-marker {
  z-index: 2;
  grid-column: 2;
  align-self: start;
  justify-self: center;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border: 7px solid #f7f8f3;
  border-radius: 50%;
  background-color: var(--color-primary);
  box-shadow: 0 0 0 1px rgba(130, 162, 17, 0.24);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.timeline-card {
  position: relative;
  width: min(100%, 430px);
  padding: 28px 30px;
  border: 1px solid rgba(56, 93, 56, 0.14);
  border-radius: 16px;
  background-color: rgba(255, 255, 255, 0.92);
  box-shadow: 0 14px 38px rgba(35, 52, 30, 0.08);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease,
    border-color 0.3s ease;
}

.timeline-card::after {
  content: "";
  position: absolute;
  top: 22px;
  width: 14px;
  height: 14px;
  border-top: 1px solid rgba(56, 93, 56, 0.14);
  border-right: 1px solid rgba(56, 93, 56, 0.14);
  background-color: #fff;
}

.timeline-item:nth-child(odd) .timeline-card {
  grid-column: 1;
  justify-self: end;
}

.timeline-item:nth-child(odd) .timeline-card::after {
  right: -8px;
  transform: rotate(45deg);
}

.timeline-item:nth-child(even) .timeline-card {
  grid-column: 3;
  justify-self: start;
}

.timeline-item:nth-child(even) .timeline-card::after {
  left: -8px;
  transform: rotate(225deg);
}

.timeline-card:hover {
  border-color: rgba(130, 162, 17, 0.45);
  box-shadow: 0 18px 45px rgba(35, 52, 30, 0.13);
  transform: translateY(-4px);
}

.timeline-kicker {
  display: block;
  margin-bottom: 7px;
  color: #5f790b;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.timeline-card h3 {
  margin-bottom: 10px;
  color: #263826;
  font-size: clamp(1.25rem, 2vw, 1.55rem);
}

.timeline-card p {
  color: #5d6259;
  line-height: 1.65;
}

@media (max-width: 767px) {
  .timeline::before {
    left: 28px;
  }

  .timeline-item {
    grid-template-columns: 58px 1fr;
    min-height: auto;
    padding-bottom: 32px;
  }

  .timeline-item:last-child {
    padding-bottom: 0;
  }

  .timeline-marker {
    grid-column: 1;
    width: 48px;
    height: 48px;
    border-width: 6px;
    font-size: 0.7rem;
  }

  .timeline-item:nth-child(odd) .timeline-card,
  .timeline-item:nth-child(even) .timeline-card {
    grid-column: 2;
    justify-self: stretch;
    width: 100%;
  }

  .timeline-item:nth-child(odd) .timeline-card::after,
  .timeline-item:nth-child(even) .timeline-card::after {
    top: 17px;
    right: auto;
    left: -8px;
    transform: rotate(225deg);
  }
}

@media (max-width: 575px) {
  .career-section .section-heading {
    margin-bottom: 42px;
  }

  .timeline::before {
    left: 20px;
  }

  .timeline-item {
    grid-template-columns: 44px 1fr;
    padding-bottom: 24px;
  }

  .timeline-marker {
    width: 40px;
    height: 40px;
    border-width: 5px;
    font-size: 0.62rem;
  }

  .timeline-card {
    padding: 22px 20px;
    border-radius: 13px;
  }

  .timeline-item:nth-child(odd) .timeline-card::after,
  .timeline-item:nth-child(even) .timeline-card::after {
    top: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .timeline-card {
    transition: none;
  }
}
