/* Container */
.profile-container {
  position: relative;
  animation: profile-slide-in 0.9s cubic-bezier(0.425, 1.14, 0.47, 1.125) forwards;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem;
}

/* Main card */
.profile-card {
  max-width: 500px;
  width: 100%;
  min-height: 120px;
  padding: 20px;
  border-radius: 8px;
  background-color: var(--card-bg);
  box-shadow: 0px 10px 20px rgba(0, 0, 0, 0.2);
  position: relative;
  overflow: hidden;
  border: 1px solid var(--card-border)
}

.profile-card:after {
  content: "";
  display: block;
  width: 190px;
  height: 300px;
  background: var(--button-bg);
  position: absolute;
  animation: profile-rotate-bg 0.75s cubic-bezier(0.425, 1.04, 0.47, 1.105) 1s both;
}

/* Badges */
.profile-badges {
  padding: 5px 20px;
  border-radius: 6px;
  background-color: var(--card-bg);
  max-width: 480px;
  width: 90%;
  box-shadow: 0px 10px 20px rgba(0, 0, 0, 0.2);
  position: absolute;
  z-index: -1;
  left: 50%;
  transform: translateX(-50%);
  bottom: 10px;
  animation: profile-badges-in 0.5s cubic-bezier(0.425, 1.04, 0.47, 1.105) 0.75s forwards;
  border: 1px solid var(--card-border);
  padding-top: 20px;
}

.profile-badges span {
  font-size: 1.6em;
  margin: 0 6px;
  opacity: 0.7;
}

.profile-badges svg {
  fill: var(--card-border);
}

/* First info section */
.profile-main {
  display: flex;
  flex-direction: row;
  align-items: center;
  z-index: 2;
  position: relative;
}

.profile-main img {
  border-radius: 50%;
  width: 120px;
  height: 120px;
  object-fit: cover;
}

.profile-info {
  padding: 0 20px;
}

.profile-info h1 {
  font-size: 1.6rem;
  line-height: 1.2;
}

.profile-info h3 {
  font-size: 1.1rem;
  color: var(--text-color-hl-card);
  font-style: italic;
  margin-top: 0.3rem;
}

.profile-info p.bio {
  color: var(--text-color);
  background-color: var(--card-bg);
}


/* Accessibility: scale for smaller screens */
@media (max-width: 600px) {
  .profile-main {
    flex-direction: column;
    text-align: center;
  }

  .profile-main img {
    width: 80px;
    height: 80px;
    margin-bottom: 12px;
  }

  .profile-info {
    padding: 0;
  }

  .profile-info h1 {
    font-size: 1.3rem;
    background-color: var(--card-bg);
  }

  .profile-info h3 {
    font-size: 1rem;
    background-color: var(--card-bg);
  }

  .profile-info p.bio {
    font-size: 0.9rem;
    background-color: var(--card-bg);
  }

  .profile-badges {
    font-size: 0.85rem;
    padding: 8px 12px;
  }
}

/* Animations */
@keyframes profile-slide-in {
  0% {
    opacity: 0;
    bottom: -500px;
  }

  100% {
    opacity: 1;
    bottom: 0px;
  }
}

@keyframes profile-badges-in {
  0% {
    bottom: 10px;
  }

  100% {
    bottom: -42px;
  }
}

@keyframes profile-rotate-bg {
  0% {
    opacity: 0;
    transform: rotate(0deg);
    top: -24px;
    left: -253px;
  }

  100% {
    transform: rotate(-30deg);
    top: -24px;
    left: -78px;
  }
}

