@keyframes pulse {
  0% {
    transform: translateY(0px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  }
  50% {
    transform: translateY(-10px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.25);
  }
  100% {
    transform: translateY(0px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  }
}

.profile-container {
  perspective: 1000px;
  width: 300px;  /* Made square and smaller */
  height: 300px;
  margin: 0 auto;
  cursor: pointer;
  position: relative;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  animation: pulse 2s ease-in-out infinite;
}

.profile-card {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.6s;
}

.profile-container.flipped .profile-card {
  transform: rotateY(180deg);
}

.profile-front, .profile-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-front {
  background: white;
}

.profile-back {
  /*default theme*/
  background: linear-gradient(135deg, rgba(250,172,224,0.95) 0%, rgba(174, 252, 255, 0.95) 100%);
  /*christmas theme*/
  /* background: rgba(241, 126, 120, 0.95); */
  transform: rotateY(180deg);
  text-align: center;
  overflow: auto;
  font-size: 0.9em;  /* Slightly smaller text to fit better */
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.profile-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /*default*/
  object-view-box: inset(0 0% 62.5% 0%);
  /*christmas*/
  /* object-view-box: inset(0 0% 10% 0%); */
  border: 3px solid rgba(250,172,224,0.4);
}

.profile-text {
  /*default theme*/
  color: rgb(0, 0, 128);
  /*christmas theme*/
  /* color: rgb(255, 255, 255); */
  font-family: 'Quicksand', sans-serif;
  font-size: 12.5px;
  line-height: 1.4;
  padding: 10px;
}

@keyframes rotateArrow {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.profile-container::before {
  content: '↻';
  position: absolute;
  font-size: 24px;
  color: rgb(202, 45, 81);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  top: 2.5px;
  right: 2.5px;
  z-index: 2;
  animation: rotateArrow 3s linear infinite;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.profile-container:hover::before {
  animation-duration: 1.5s;
}

.profile-container:hover {
  animation: none;
  transform: translateY(-6px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.3);
}

/* Media Queries */
@media (max-width: 1024px) {
  .profile-container {
    width: 200px;
    height: 200px;
  }
  .profile-text {
    font-size: 10px;
  }
  .profile-back {
    width: 130%;
    height: 130%;
  }
}

@media (max-width: 676px) {
  .profile-container {
    width: 180px;
    height: 180px;
  }
}
