* {
  box-sizing: border-box;
}

:root {
  --primary-grey: #e5e7eb;
  --primary-orange: #f97316;
  --primary-purple: #7c3aed;
  --secondary-amber: #fbbf24;
  --dark-bg: #1a0b2e;
  --darker-bg: #0f051a;
  --card-bg: rgba(229, 231, 235, 0.03);
  --card-head-bg: rgba(229, 231, 235, 0.06);
  --border-color: rgba(229, 231, 235, 0.2);
  --text-primary: #ffffff;
  --text-secondary: #a1a1aa;
  --primary-cyan: #00ffff;
  --primary-pink: #ff00ff;
}

.timeline {
  display: flex;
  flex-direction: column;
  margin: 20px auto;
  position: relative;
}

.timeline__event {
  margin-bottom: 20px;
  position: relative;
  display: flex;
  margin: 20px 0;
  border-radius: 6px;
  align-self: center;
  width: 50vw;
}

.timeline__event:nth-child(2n+1) {
  flex-direction: row-reverse;
}

.timeline__event:nth-child(2n+1) .timeline__event__icon:before {
  content: "";
  width: 2px;
  height: 0;
  background: #f6a4ec;
  position: absolute;
  top: 0%;
  left: 50%;
  right: auto;
  z-index: -1;
  transform: translateX(-50%);
  animation: fillTop 2s forwards 4s ease-in-out;
}

.timeline__event:nth-child(2n+1) .timeline__event__icon:after {
  content: "";
  width: 100%;
  height: 2px;
  background: #f6a4ec;
  position: absolute;
  right: 0;
  z-index: -1;
  top: 50%;
  left: auto;
  transform: translateY(-50%);
  animation: fillLeft 2s forwards 4s ease-in-out;
}

.timeline__event__title {
  font-size: 1.2rem;
  line-height: 1.4;
  text-transform: uppercase;
  font-weight: 600;
  color: #9251ac;
  letter-spacing: 1.5px;
}

.timeline__event__content {
  padding: 1rem;
  box-shadow: 0 30px 60px -12px rgba(50, 50, 93, 0.25), 0 18px 36px -18px rgba(0, 0, 0, 0.3), 0 -12px 36px -8px rgba(0, 0, 0, 0.025);
  background: var(--card-bg);
  width: calc(40vw - 84px);
  border: 1px solid var(--border-color);
  backdrop-filter: blur(10px);
}

.timeline__event__date {
  color: #f6a4ec;
  font-size: 1.5rem;
  font-weight: 600;
  background: #9251ac;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  padding: 0 20px;
  border: 1px solid var(--border-color);
  width: 13rem;
  text-align: center;
}

.timeline__event__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9251ac;
  padding: 20px;
  align-self: center;
  margin: 0 20px;
  background: #f6a4ec;
  border-radius: 100%;
  width: 40px;
  box-shadow: 0 30px 60px -12px rgba(50, 50, 93, 0.25), 0 18px 36px -18px rgba(0, 0, 0, 0.3), 0 -12px 36px -8px rgba(0, 0, 0, 0.025);
  padding: 40px;
  height: 40px;
  position: relative;
}

.timeline__event__icon i {
  font-size: 32px;
}

.timeline__event__icon:before {
  content: "";
  width: 2px;
  height: 0;
  background: #f6a4ec;
  position: absolute;
  top: 0%;
  z-index: -1;
  left: 50%;
  transform: translateX(-50%);
  animation: fillTop 2s forwards 4s ease-in-out;
}

.timeline__event__icon:after {
  content: "";
  width: 100%;
  height: 2px;
  background: #f6a4ec;
  position: absolute;
  left: 0%;
  z-index: -1;
  top: 50%;
  transform: translateY(-50%);
  animation: fillLeftOdd 2s forwards 4s ease-in-out;
}

.timeline__event__description {
  flex-basis: 100%;
}

.timeline__event__description ul {
  list-style: none;
  padding-left: 0;
}

.timeline__event__description ul li {
  position: relative;
  padding-left: 30px;
  margin: 10px 0;
  line-height: 1.5;
}

.timeline__event__description ul li::before {
  content: '>';
  position: absolute;
  left: 0;
  top: 0;
  color: var(--primary-cyan);
  animation: blink 1.2s infinite;
}

@keyframes blink {

  0%,
  50%,
  100% {
    opacity: 1;
  }

  25%,
  75% {
    opacity: 0.3;
  }
}

.timeline__event__description ul li:hover::before {
  color: var(--primary-cyan);
  text-shadow: 0 0 10px var(--primary-cyan);
}

.timeline__event__description ul li:hover {
  color: #fff;
  text-shadow: 0 0 8px var(--primary-cyan);
}

.timeline__event--type2:after {
  background: #555ac0;
}

.timeline__event--type2 .timeline__event__date {
  color: #87bbfe;
  background: #555ac0;
}

.timeline__event--type2:nth-child(2n+1) .timeline__event__icon:before,
.timeline__event--type2:nth-child(2n+1) .timeline__event__icon:after {
  background: #87bbfe;
}

.timeline__event--type2 .timeline__event__icon {
  background: #87bbfe;
  color: #555ac0;
}

.timeline__event--type2 .timeline__event__icon:before,
.timeline__event--type2 .timeline__event__icon:after {
  background: #87bbfe;
}

.timeline__event--type2 .timeline__event__title {
  color: #555ac0;
}

.timeline__event--type3:after {
  background: #24b47e;
}

.timeline__event--type3 .timeline__event__date {
  color: #aff1b6;
  background-color: #24b47e;
}

.timeline__event--type3:nth-child(2n+1) .timeline__event__icon:before,
.timeline__event--type3:nth-child(2n+1) .timeline__event__icon:after {
  background: #aff1b6;
}

.timeline__event--type3 .timeline__event__icon {
  background: #aff1b6;
  color: #24b47e;
}

.timeline__event--type3 .timeline__event__icon:before,
.timeline__event--type3 .timeline__event__icon:after {
  background: #aff1b6;
}

.timeline__event--type3 .timeline__event__title {
  color: #24b47e;
}

.timeline__event:last-child .timeline__event__icon:before {
  content: none;
}

@media (max-width: 992px) {
  .timeline__event {
    width: 80vw;
  }
  .timeline__event__content {
    width: calc(100% - 164px);
  }
}

@media (max-width: 768px) {
  .timeline__event__icon {
    display: none;
  }

  .timeline__event,
  .timeline__event:nth-child(2n+1) {
    flex-direction: column;
    width: 100%;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
  }

  .timeline__event__date {
    width: 100%;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0% 100%);
  }

  .timeline__event:nth-child(2n+1) {
    flex-direction: column;
    align-self: center;
  }

  .timeline__event__content {
    width: 100%;
  }
}

@keyframes fillLeft {
  100% {
    right: 100%;
  }
}

@keyframes fillTop {

  /* 100% {
    top: 100%;
  } */
  to {
    height: calc(100vh - 28vh);
    /* grow to full height */
  }
}

@keyframes fillLeftOdd {
  100% {
    left: 100%;
  }
}