/* =========================================
   LEADERSHIP PROFILE CARDS
   Clean, reliable layout — no grid tricks
   ========================================= */

:root {
  --card-radius: 24px;
  --pointer-x: 50%;
  --pointer-y: 50%;
  --pointer-from-center: 0;
  --pointer-from-top: 0.5;
  --pointer-from-left: 0.5;
  --rotate-x: 0deg;
  --rotate-y: 0deg;
  --background-x: 50%;
  --background-y: 50%;
  --behind-glow-color: rgba(125, 190, 255, 0.67);
  --behind-glow-size: 25%;
  --glow-opacity: 0.1;
  --sunpillar-1: hsl(2, 100%, 73%);
  --sunpillar-2: hsl(53, 100%, 69%);
  --sunpillar-3: hsl(93, 100%, 69%);
  --sunpillar-4: hsl(176, 100%, 76%);
  --sunpillar-5: hsl(228, 100%, 74%);
  --sunpillar-6: hsl(283, 100%, 73%);
}

/* ---- WRAPPER ---- */
.pc-card-wrapper {
  perspective: 800px;
  position: relative;
  touch-action: none;
  width: 100%;
}

/* ---- BEHIND GLOW ---- */
.pc-behind {
  position: absolute;
  inset: -20px;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(
    circle at var(--pointer-x) var(--pointer-y),
    var(--behind-glow-color) 0%,
    transparent var(--behind-glow-size)
  );
  filter: blur(40px) saturate(1.2);
  opacity: var(--glow-opacity);
  transition: opacity 400ms ease;
  border-radius: var(--card-radius);
}

.pc-card-wrapper:hover { --glow-opacity: 0.55; }

/* ---- SHELL ---- */
.pc-card-shell {
  position: relative;
  z-index: 1;
  width: 100%;
}

/* ---- THE CARD ---- */
.pc-card {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  max-height: 480px;
  border-radius: var(--card-radius);
  overflow: hidden;
  background: #111;
  box-shadow:
    0 25px 60px rgba(0,0,0,0.5),
    0 0 0 1px rgba(255,255,255,0.06);
  transition: transform 1s ease, box-shadow 0.4s ease;
  transform: rotateX(0deg) rotateY(0deg);
  transform-style: preserve-3d;
  cursor: default;
}

.pc-card:hover,
.pc-card.active {
  transition: none;
  box-shadow:
    0 30px 80px rgba(0,0,0,0.7),
    0 0 0 1px rgba(255,255,255,0.1);
}

/* ---- AVATAR IMAGE — fills entire card ---- */
.pc-avatar {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  transition: transform 0.4s ease;
}

.pc-card:hover .pc-avatar {
  transform: scale(1.03);
}

/* ---- GRADIENT OVERLAY — bottom fade so text is readable ---- */
.pc-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0) 40%,
    rgba(0,0,0,0.55) 70%,
    rgba(0,0,0,0.85) 100%
  );
  z-index: 1;
  pointer-events: none;
}

/* ---- HOLOGRAPHIC SHINE ---- */
.pc-shine {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
  mix-blend-mode: color-dodge;
  background-image:
    repeating-linear-gradient(
      0deg,
      var(--sunpillar-1) 0%,
      var(--sunpillar-2) 16.6%,
      var(--sunpillar-3) 33.3%,
      var(--sunpillar-4) 50%,
      var(--sunpillar-5) 66.6%,
      var(--sunpillar-6) 83.3%,
      var(--sunpillar-1) 100%
    );
  background-size: 100% 600%;
  background-position: 0 var(--background-y);
  filter: brightness(0.4) saturate(0.4);
}

.pc-card:hover .pc-shine,
.pc-card.active .pc-shine {
  opacity: 0.25;
}

/* ---- GLARE ---- */
.pc-glare {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
  background: radial-gradient(
    circle at var(--pointer-x) var(--pointer-y),
    rgba(255,255,255,0.18) 0%,
    transparent 60%
  );
  mix-blend-mode: overlay;
}

.pc-card:hover .pc-glare,
.pc-card.active .pc-glare {
  opacity: 1;
}

/* ---- BOTTOM INFO BAR ---- */
.pc-user-info {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 14px;
  padding: 10px 14px;
  pointer-events: auto;
}

.pc-user-details {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.pc-mini-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  border: 1.5px solid rgba(255,255,255,0.3);
  flex-shrink: 0;
}

.pc-mini-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.pc-user-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.pc-handle {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,0.95);
  white-space: nowrap;
}

.pc-status {
  font-size: 11px;
  color: rgba(255,255,255,0.65);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 130px;
}

.pc-contact-btn {
  flex-shrink: 0;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,0.9);
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  white-space: nowrap;
  pointer-events: auto;
  background: rgba(255,255,255,0.05);
}

.pc-contact-btn:hover {
  background: rgba(255,255,255,0.15);
  border-color: rgba(255,255,255,0.45);
  color: white;
}

/* ---- NAME PLATE — top of card, not covering face ---- */
.pc-nameplate {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 4;
  padding: 20px 20px 40px;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.65) 0%,
    rgba(0,0,0,0) 100%
  );
  pointer-events: none;
}

.pc-nameplate h3 {
  margin: 0 0 4px;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #fff;
  text-shadow: 0 2px 12px rgba(0,0,0,0.8);
  line-height: 1.1;
  font-family: 'Anton', sans-serif;
}

.pc-nameplate p {
  margin: 0;
  font-size: 12px;
  font-weight: 500;
  color: rgba(255,255,255,0.75);
  text-shadow: 0 1px 6px rgba(0,0,0,0.7);
  letter-spacing: 0.02em;
}

/* ---- EXTERNAL DESCRIPTION ---- */
.leader-desc-external {
  color: #555;
  text-align: center;
  font-size: 14px;
  line-height: 1.7;
  max-width: 90%;
  margin: 0 auto;
  font-weight: 400;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
  .pc-card { max-height: 420px; }
  .pc-nameplate h3 { font-size: 1.2rem; }
  .pc-nameplate p { font-size: 11px; }
}

@media (max-width: 480px) {
  .pc-card { max-height: 360px; }
  .pc-nameplate { padding: 14px 14px 30px; }
  .pc-nameplate h3 { font-size: 1rem; }
  .pc-mini-avatar { width: 32px; height: 32px; }
  .pc-handle { font-size: 12px; }
  .pc-status { font-size: 10px; }
  .pc-contact-btn { padding: 6px 10px; font-size: 11px; }
}
