.profile-card-wrapper {
  position: relative;
  perspective: 1200px;
  width: 100%;
  max-width: 420px; /* Base size */
  margin: 0 auto;
}

.pc-behind-glow {
  position: absolute;
  top: -20%;
  left: -20%;
  width: 140%;
  height: 140%;
  filter: blur(80px);
  opacity: 1;
  z-index: -1;
  pointer-events: none;
  border-radius: 50%;
  transition: opacity 0.4s ease;
}

.profile-card-wrapper:hover .pc-behind-glow {
  opacity: 0.9;
}

.profile-card {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5; /* Rectangular shape for portrait */
  border-radius: 24px;
  background: var(--bg-color, #1a1f35); /* Deep slate blue background */
  box-shadow: 0 40px 80px -20px rgba(0, 0, 0, 0.5), inset 0 0 0 1px rgba(255, 255, 255, 0.05);
  transform-style: preserve-3d;
  transition: transform 0.1s ease-out;
  overflow: hidden;
  cursor: pointer;
}

/* Base image taking full background */
.pc-bg-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  z-index: 0;
  pointer-events: none;
  transform: translateZ(-10px) scale(1.05); /* Slight depth */
  opacity: 0.95; 
  filter: grayscale(100%) contrast(1.15) brightness(1.05); /* Sleek B&W to match the vibe */
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 40%, rgba(0,0,0,0) 100%);
  mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 40%, rgba(0,0,0,0) 100%);
}

/* Icon pattern overlay */
.pc-icon-pattern {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  pointer-events: none;
  z-index: 1;
  opacity: 0.15; /* Subdued background pattern */
  background-image: url("data:image/svg+xml,%3Csvg width='120' height='120' viewBox='0 0 120 120' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 40l-20 20 20 20M90 40l20 20-20 20' stroke='white' stroke-width='2.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 120px 120px;
  transform: translateZ(5px);
}

/* Gradient overlay to make text readable */
.pc-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(10, 15, 30, 0.1) 0%,
    rgba(10, 15, 30, 0.3) 40%,
    rgba(10, 15, 30, 0.9) 100%
  );
  z-index: 1;
  pointer-events: none;
}

/* Glare effect on hover */
.pc-glare {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle 300px at var(--mx, 50%) var(--my, 50%), rgba(255,255,255,0.4) 0%, transparent 80%);
  mix-blend-mode: color-dodge;
  z-index: 4;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.profile-card:hover .pc-glare {
  opacity: 1;
}

/* Content Area */
.pc-content {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 32px 24px;
  transform: translateZ(40px); /* 3D pop effect */
}

.pc-header {
  text-align: left;
  margin-top: 0;
  margin-bottom: 0;
}

.pc-name {
  font-family: var(--font-display, 'Space Grotesk', sans-serif);
  font-size: 2.2rem;
  font-weight: 600;
  color: #fff;
  margin: 0 0 4px 0;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.pc-title {
  font-family: var(--font-body, 'Inter', sans-serif);
  font-size: 1.05rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.8);
  margin: 0;
  text-shadow: 0 1px 5px rgba(0,0,0,0.5);
}

/* Bottom Glass Pill */
.pc-bottom-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(25, 25, 30, 0.4);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 14px;
  border-radius: 18px;
  width: 100%;
  box-shadow: 0 10px 30px -10px rgba(0,0,0,0.5);
}

.pc-user-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pc-avatar-small-container {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-color, #1a1f35);
  border: 1px solid rgba(255, 255, 255, 0.2);
  overflow: hidden;
  flex-shrink: 0;
}

.pc-avatar-small {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.95;
  filter: grayscale(100%) contrast(1.15) brightness(1.05); /* Sleek B&W to match the vibe */
}

.pc-user-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pc-handle {
  font-family: var(--font-body, 'Inter', sans-serif);
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
  line-height: 1;
}

.pc-status {
  font-family: var(--font-body, 'Inter', sans-serif);
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1;
}

.pc-contact-btn {
  font-family: var(--font-body, 'Inter', sans-serif);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  padding: 10px 18px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pc-contact-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-1px);
}

.pc-contact-popup {
  position: absolute;
  bottom: calc(100% + 15px);
  right: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: rgba(15, 20, 35, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 10px;
  min-width: 150px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.6);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px) scale(0.95);
  transform-origin: bottom right;
  transition: all 0.3s cubic-bezier(0.19, 1, 0.22, 1);
  z-index: 100;
}

.pc-contact-popup.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.pc-popup-link {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-main, #ffffff);
  text-decoration: none;
  font-family: var(--font-body, 'Inter', sans-serif);
  font-size: 0.9rem;
  padding: 10px 14px;
  border-radius: 8px;
  transition: background 0.2s, color 0.2s;
}

.pc-popup-link:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.pc-popup-link svg, .pc-popup-link i {
  width: 18px;
  height: 18px;
}

@media (max-width: 480px) {
  .pc-name { font-size: 1.8rem; }
  .pc-title { font-size: 0.9rem; }
  .pc-bottom-bar { padding: 10px; border-radius: 14px; }
  .pc-avatar-small { width: 36px; height: 36px; }
  .pc-contact-btn { padding: 8px 14px; font-size: 0.8rem; border-radius: 10px; }
}
