:root{
    --background-overlay: #090808c4;
    --timeline-title: #fff;
    --timeline-description: #fff;
    --timeline-connecting-line: #f70;
    --timeline-event-title: #f70;
    --timeline-event-bg: #000;
    --timeline-event-content: #fff;
    --timeline-event-date: #f70;
    --timeline-event-date-bg: #222;
    --timeline-event-icon: #f70;
}

* {
  box-sizing: border-box;
}
html {
  font-size: 14px;
}

body {
  
  background-image:
    linear-gradient(var(--background-overlay), var(--background-overlay)),
    url('https://www.svgheart.com/wp-content/uploads/2021/11/tiger-skin-pattern-animal-print-free-svg-file-SvgHeart.Com.png');
  background-size: cover; 
  background-attachment: fixed; 
  background-position: center; 
  background-repeat: no-repeat; 
  font-family: quicksand;

  margin: 0; 
  padding: 0; 
}

h2 {
  margin: 5% auto 0; 
  text-align: center;
  font-size: 4rem;
  font-weight: 100;
  color: var(--timeline-title); 
  width: fit-content; 
}
h1 {
  margin: 1% auto 4%; 
  text-align: center;
  font-size: 2rem;
  font-weight: 10;
  color: var(--timeline-description); 
  width: fit-content; 
}
.timeline {
  display: flex;
  flex-direction: column;
  margin: 20px auto;
  position: relative;
  padding-bottom: 50px; 
}
.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__date {
  border-radius: 0 6px 6px 0;
}
.timeline__event:nth-child(2n + 1) .timeline__event__content {
  border-radius: 6px 0 0 6px;
}
.timeline__event:nth-child(2n + 1) .timeline__event__icon:before {
  content: "";
  width: 2px;
  height: 100%;
  background: var(--timeline-connecting-line); 
  position: absolute;
  top: 0%;
  left: 50%;
  right: auto;
  z-index: -1;
  transform: translateX(-50%);
  animation: fillTop 1s forwards 0s ease-in-out;
}
.timeline__event:nth-child(2n + 1) .timeline__event__icon:after {
  content: "";
  width: 100%;
  height: 2px;
  background: var(--timeline-connecting-line); 
  position: absolute;
  right: 0;
  z-index: -1;
  top: 50%;
  left: auto;
  transform: translateY(-50%);
  animation: fillLeft 1s forwards 0s ease-in-out;
}
.timeline__event__title {
  font-size: 1.2rem;
  line-height: 1.4;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--timeline-event-title); 
  letter-spacing: 1.5px;
}
.timeline__event__content {
  padding: 20px;
  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(--timeline-event-bg); 
  color: var(--timeline-event-content); 
  width: calc(40vw - 84px);
  border-radius: 0 6px 6px 0;
}
.timeline__event__date {
  color: var(--timeline-event-date); 
  font-size: 1.5rem;
  font-weight: 600;
  background: #222; 
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  padding: 0 20px;
  border-radius: 6px 0 0 6px;
}
.timeline__event__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  align-self: center;
  margin: 0 20px;
  background: var(--timeline-event-icon); 
  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);
  height: 40px;
  position: relative;
}
.timeline__event__icon i {
  font-size: 32px;
}
.timeline__event__icon:before {
  content: "";
  width: 2px;
  height: 100%;
  background: var(--timeline-connecting-line); 
  position: absolute;
  top: 0%;
  z-index: -1;
  left: 50%;
  transform: translateX(-50%);
  animation: fillTop 1s forwards 0s ease-in-out;
}
.timeline__event__icon:after {
  content: "";
  width: 100%;
  height: 2px;
  background: var(--timeline-connecting-line); 
  position: absolute;
  left: 0%;
  z-index: -1;
  top: 50%;
  transform: translateY(-50%);
  animation: fillLeftOdd 1s forwards 0s ease-in-out;
}
.timeline__event__description {
  flex-basis: 100%;
}

.timeline__event--type2 .timeline__event__date {
  color: var(--timeline-event-date); 
  background: var(--timeline-event-date-bg); 
}
.timeline__event--type2:nth-child(2n + 1) .timeline__event__icon:before,
.timeline__event--type2:nth-child(2n + 1) .timeline__event__icon:after {
  background: var(--timeline-connecting-line);
}
.timeline__event--type2 .timeline__event__icon {
  background: var(--timeline-event-icon); 
}
.timeline__event--type2 .timeline__event__icon:before,
.timeline__event--type2 .timeline__event__icon:after {
  background: var(--timeline-connecting-line);
}
.timeline__event--type2 .timeline__event__title {
  color: var(--timeline-event-title); 
}
.timeline__event--type3 .timeline__event__date {
  color: var(--timeline-event-date); 
  background-color: var(--timeline-event-date-bg); 
}
.timeline__event--type3:nth-child(2n + 1) .timeline__event__icon:before,
.timeline__event--type3:nth-child(2n + 1) .timeline__event__icon:after {
  background: var(--timeline-connecting-line);
}
.timeline__event--type3 .timeline__event__icon {
  background: var(--timeline-event-icon); 
}
.timeline__event--type3 .timeline__event__icon:before,
.timeline__event--type3 .timeline__event__icon:after {
  background: var(--timeline-connecting-line);
}
.timeline__event--type3 .timeline__event__title {
  color: var(--timeline-event-title); 
}
.timeline__event:last-child .timeline__event__icon:before {
  content: none;
}
@media (max-width: 786px) {
  .timeline__event {
    flex-direction: column;
    align-self: center;
    width: 90vw; 
  }
  .timeline__event__content {
    width: 100%;
  }
  .timeline__event__icon {
    border-radius: 6px 6px 0 0;
    width: 100%;
    margin: 0;
    box-shadow: none;
  }
  .timeline__event__icon:before,
  .timeline__event__icon:after {
    display: none;
  }
  .timeline__event__date {
    border-radius: 0;
    padding: 20px;
  }
  .timeline__event:nth-child(2n + 1) {
    flex-direction: column;
    align-self: center;
  }
  .timeline__event:nth-child(2n + 1) .timeline__event__date {
    border-radius: 0;
    padding: 20px;
  }
  .timeline__event:nth-child(2n + 1) .timeline__event__icon {
    border-radius: 6px 6px 0 0;
    margin: 0;
  }
}
@keyframes fillLeft {
  100% {
    right: 100%;
  }
}
@keyframes fillTop {
  100% {
    top: 100%;
  }
}
@keyframes fillLeftOdd {
  100% {
    left: 100%;
  }
}