@import url("https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,200;0,300;0,400;0,500;0,600;0,700;1,300;1,400&display=swap");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

html,
body {
  display: grid;
  place-items: center;
  height: 100%;
  background: #6665ee;
}

.skills-bar {
  width: 600px;
  padding: 25px 30px;
  background: #fff;
  box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.2);
}

.skills-bar .bar {
  margin: 20px 0;
}

.skills-bar .bar:first-child {
  margin-top: 0px;
}

.skills-bar .bar .info {
  margin-bottom: 5px;
}

.skills-bar .bar .info span {
  font-size: 17px;
  font-weight: 500;
  opacity: 0;
  animation: showText 0.5s 1s linear forwards;
}

@keyframes showText {
  100% {
    opacity: 1;
  }
}

.skills-bar .bar .progress-line {
  position: relative;
  width: 100%;
  height: 10px;
  background: #f0f0f0;
  box-shadow: inset 0px 1px 1px rgba(0, 0, 0, 0.05),
    0px 1px 1px rgba(255, 255, 255, 0.8);
  transform: scaleX(0);
  transform-origin: left;
  animation: animate 1s cubic-bezier(1, 0, 0.5, 1) forwards;
}

.bar .progress-line span {
  position: absolute;
  width: 80%;
  height: 100%;
  background: #6665ee;
  border-radius: 10px;
  transform: scaleX(0);
  transform-origin: left;
  animation: animate 1s 1s cubic-bezier(1, 0, 0.5, 1) forwards;
}

@keyframes animate {
  100% {
    transform: scaleX(1);
  }
}

/* Adjust progress-line width to reflect pourcentage skill */
.progress-line.html span {
  width: 90%;
}
.progress-line.css span {
  width: 60%;
}
.progress-line.javascript span {
  width: 85%;
}
.progress-line.ruby span {
  width: 50%;
}
.progress-line.mysql span {
  width: 75%;
}

/* Create small bottom right part of pourcentage indicator box */
.bar .progress-line span::before {
  position: absolute;
  content: "";
  right: 0;
  top: -10px;
  width: 0;
  height: 0;
  border: 7px solid transparent;
  border-bottom-width: 0px;
  border-right-width: 0px;
  border-top-color: #000;
  opacity: 0;
  animation: showText2 0.5s 1.5s linear forwards;
}

/* Create box for pourcentage indicator */
.bar .progress-line span::after {
  position: absolute;
  right: 0;
  top: -28px;
  padding: 1px 8px;
  font-size: 12px;
  font-weight: 500;
  color: #fff;
  background: #000;
  border-radius: 3px;
}

@keyframes showText2 {
  100% {
    opacity: 1;
  }
}

/* Add span pourcentage content for each progress-line */
.progress-line.html span::after {
  content: "90%";
}
.progress-line.css span::after {
  content: "60%";
}
.progress-line.javascript span::after {
  content: "85%";
}
.progress-line.ruby span::after {
  content: "50%";
}
.progress-line.mysql span::after {
  content: "75%";
}
