@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@100;200;300;400;500;600&display=swap");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

body {
  background-color: #ffffff;
  color: #002244;
}

.timeline-container {
  position: relative;
  max-width: 1200px;
  margin: 80px auto;
}

.timeline-box {
  position: relative;
  width: 50%;
  padding: 1rem 3rem;
  opacity: 0;
  animation: animateBox 0.3s linear forwards;
}

@keyframes animateBox {
  0% {
    opacity: 0.8;
    transform: translateY(500px) scale(0);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.timeline-box:nth-child(2) { animation-delay: 0s; }
.timeline-box:nth-child(3) { animation-delay: 0.4s; }
.timeline-box:nth-child(4) { animation-delay: 0.6s; }
.timeline-box:nth-child(5) { animation-delay: 0.9s; }

.timeline-box-left { left: 0; }
.timeline-box-right { left: 50%; }

.timeline-icon {
  position: absolute;
  background: linear-gradient(-311deg, #0077cc, #3399ff, #005fa3);
  top: 30px;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 25px;
  border-radius: 50%;
  right: -25px;
  color: #ffffff;
  z-index: 10;
}

.timeline-html,
.timeline-css,
.timeline-js,
.timeline-react {
  color: #0077cc;
  border: 4px solid #0077cc;
}

.timeline-box-right .timeline-icon {
  left: -25px;
}

.timeline-info {
  position: relative;
  padding: 1rem 1.5rem;
  border-radius: 10px;
  background: #f0f8ff;
  color: #002244;
  box-shadow: 0 5px 9px rgba(0, 85, 170, 0.2);
  border-bottom: 2px solid #0077cc;
}

.timeline-info h2 {
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: #005fa3;
}

.timeline-info p {
  font-size: 14px;
  margin-bottom: 10px;
}

.timeline-info a {
  text-decoration: none;
  color: #005fa3;
  font-size: 1rem;
  font-weight: 500;
  display: none;
}

.timeline-info a:hover {
  text-decoration: underline;
}

.timeline-info::after {
  content: "";
  position: absolute;
  top: 25px;
  width: 0;
  height: 0;
  border-top: 14px solid transparent;
  border-bottom: 14px solid transparent;
  border-left: 14px solid #f0f8ff;
  right: -14px;
  z-index: 10;
}

.timeline-box-right .timeline-info::after {
  border-left: 0;
  border-right: 14px solid #f0f8ff;
  left: -14px;
}

.timeline-line {
  position: absolute;
  top: 0;
  left: 50%;
  width: 6px;
  height: 100%;
  transform: translateX(-50%);
  border-radius: 2px;
  background: linear-gradient(45deg, #ffffff, #0077cc);
  animation: animateLine 3s linear forwards;
}

@keyframes animateLine {
  0% {
    height: 0;
  }

  100% {
    height: 100%;
  }
}

@media screen and (max-width: 775px) {
  .timeline-container {
    margin: 40px auto;
  }
  .timeline-line {
    left: 60px;
  }
  .timeline-box {
    width: 100%;
    padding-left: 109px;
  }
  .timeline-box-left,
  .timeline-box-right {
    left: 0;
  }
  .timeline-icon {
    left: 35px;
  }
  .timeline-info::after {
    left: -16px;
  }
  .timeline-box-left .timeline-info::after {
    border-left: 0;
    border-right: 14px solid #ffffff;
    left: -14px;
  }
}

@media screen and (max-width: 500px) {
  .timeline-line {
    left: 40px;
  }
  .timeline-box {
    width: 100%;
    padding-right: 1.5rem;
    padding-left: 85px;
  }
  .timeline-icon {
    left: 15px;
  }
}
