.profile-document-ui,
.profile-document-ui * {
  box-sizing: border-box;
}

.profile-document-ui {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 21;
  transform: translate(-50%, -50%) scale(2.5);
  transform-origin: center;
}

.profile-document-card {
  position: relative;
  width: 300px;
  height: 200px;
  background: rgba(242, 242, 242, 0.92);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  perspective: 1000px;
  box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.5),
    0 24px 70px rgba(0, 0, 0, 0.28);
  transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.profile-document-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.profile-document-card:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 16px rgba(255, 255, 255, 0.2),
    0 30px 80px rgba(0, 0, 0, 0.34);
}

.profile-document-content {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  padding: 20px;
  background: rgba(242, 242, 242, 0.96);
  transform: rotateX(-90deg);
  transform-origin: bottom;
  transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.profile-document-card:hover .profile-document-content {
  transform: rotateX(0deg);
}

.profile-document-title {
  margin: 0;
  font-size: 24px;
  color: #333;
  font-weight: 700;
}

.profile-document-card:hover .profile-document-image {
  scale: 0;
  opacity: 0;
}

.profile-document-description {
  margin: 10px 0 0;
  font-size: 14px;
  color: #777;
  line-height: 1.4;
}

@media (max-width: 767px) {
  .profile-document-ui {
    top: 56%;
    transform: translate(-50%, -50%) scale(1.35);
  }

  .profile-document-card {
    width: min(300px, 78vw);
  }
}

@media (prefers-reduced-motion: reduce) {
  .profile-document-card,
  .profile-document-image,
  .profile-document-content {
    transition: none;
  }
}
