:root {
  --pointer-x: 50%;
  --pointer-y: 50%;
  --pointer-from-center: 0;
  --pointer-from-top: 0.5;
  --pointer-from-left: 0.5;
  --card-opacity: 0;
  --rotate-x: 0deg;
  --rotate-y: 0deg;
  --background-x: 50%;
  --background-y: 50%;
  --grain: url("https://reactbits.dev/assets/demo/grain.webp");
  --icon: url("data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22360%22%20height%3D%22360%22%20viewBox%3D%220%200%20360%20360%22%3E%3Cdefs%3E%3Cg%20id%3D%22csharp-logo%22%3E%3Cpolygon%20points%3D%220%2C-34%2029.4%2C-17%2029.4%2C17%200%2C34%20-29.4%2C17%20-29.4%2C-17%22%20fill%3D%22none%22%20stroke%3D%22%23ffffff%22%20stroke-width%3D%223.0%22%20stroke-linejoin%3D%22round%22%20opacity%3D%220.95%22%2F%3E%3Cpolygon%20points%3D%220%2C-28%2024%2C-14%2024%2C14%200%2C28%20-24%2C14%20-24%2C-14%22%20fill%3D%22none%22%20stroke%3D%22%23ffffff%22%20stroke-width%3D%220.9%22%20stroke-dasharray%3D%223%2C4%22%20opacity%3D%220.5%22%2F%3E%3Cpath%20d%3D%22M%204%2C-16%20A%2016%2C16%200%201%200%204%2C16%20L%204%2C10%20A%2010%2C10%200%201%201%204%2C-10%20Z%22%20fill%3D%22%23ffffff%22%20opacity%3D%220.95%22%2F%3E%3Cline%20x1%3D%2211%22%20y1%3D%22-13%22%20x2%3D%229%22%20y2%3D%2213%22%20stroke%3D%22%23ffffff%22%20stroke-width%3D%222.6%22%20stroke-linecap%3D%22round%22%2F%3E%3Cline%20x1%3D%2219.5%22%20y1%3D%22-13%22%20x2%3D%2217.5%22%20y2%3D%2213%22%20stroke%3D%22%23ffffff%22%20stroke-width%3D%222.6%22%20stroke-linecap%3D%22round%22%2F%3E%3Cline%20x1%3D%225.5%22%20y1%3D%22-5%22%20x2%3D%2223%22%20y2%3D%22-5%22%20stroke%3D%22%23ffffff%22%20stroke-width%3D%222.6%22%20stroke-linecap%3D%22round%22%2F%3E%3Cline%20x1%3D%225.5%22%20y1%3D%225%22%20x2%3D%2223%22%20y2%3D%225%22%20stroke%3D%22%23ffffff%22%20stroke-width%3D%222.6%22%20stroke-linecap%3D%22round%22%2F%3E%3C%2Fg%3E%3Cg%20id%3D%22unity-logo%22%3E%3Cpath%20d%3D%22M%20-3.0%2C-35.0%20L%20-31.5%2C-18.2%20L%200.0%2C0.0%20L%2031.5%2C-18.2%20L%203.0%2C-35.0%20L%203.0%2C-23.5%20L%2014.1%2C-18.2%20L%200.0%2C-9.4%20L%20-14.1%2C-18.2%20L%20-3.0%2C-23.5%20Z%22%20fill%3D%22%23ffffff%22%20opacity%3D%220.95%22%2F%3E%3Cpath%20d%3D%22M%20-28.9%2C20.1%20L%200.0%2C36.4%20L%200.0%2C0.0%20L%20-31.5%2C-18.2%20L%20-31.8%2C14.9%20L%20-21.9%2C9.2%20L%20-22.8%2C-3.1%20L%20-8.2%2C4.7%20L%20-8.7%2C21.3%20L%20-18.9%2C14.4%20Z%22%20fill%3D%22%23ffffff%22%20opacity%3D%220.82%22%2F%3E%3Cpath%20d%3D%22M%2031.8%2C14.9%20L%2031.5%2C-18.2%20L%200.0%2C0.0%20L%200.0%2C36.4%20L%2028.9%2C20.1%20L%2018.9%2C14.4%20L%208.7%2C21.3%20L%208.2%2C4.7%20L%2022.8%2C-3.1%20L%2021.9%2C9.2%20Z%22%20fill%3D%22%23ffffff%22%20opacity%3D%220.95%22%2F%3E%3Cpolygon%20points%3D%220%2C-39%2033.7%2C-19.5%2033.7%2C19.5%200%2C39%20-33.7%2C19.5%20-33.7%2C-19.5%22%20fill%3D%22none%22%20stroke%3D%22%23ffffff%22%20stroke-width%3D%220.9%22%20stroke-dasharray%3D%224%2C5%22%20opacity%3D%220.4%22%2F%3E%3C%2Fg%3E%3Cg%20id%3D%22holo-node%22%3E%3Ccircle%20cx%3D%220%22%20cy%3D%220%22%20r%3D%222.0%22%20fill%3D%22%23ffffff%22%20opacity%3D%220.6%22%2F%3E%3Ccircle%20cx%3D%220%22%20cy%3D%220%22%20r%3D%227.0%22%20fill%3D%22none%22%20stroke%3D%22%23ffffff%22%20stroke-width%3D%220.7%22%20stroke-dasharray%3D%222%2C3%22%20opacity%3D%220.35%22%2F%3E%3C%2Fg%3E%3C%2Fdefs%3E%3Cpath%20d%3D%22M%200%2C0%20L%20360%2C360%20M%20360%2C0%20L%200%2C360%22%20stroke%3D%22%23ffffff%22%20stroke-width%3D%220.6%22%20stroke-dasharray%3D%223%2C10%22%20opacity%3D%220.18%22%2F%3E%3Cpath%20d%3D%22M%20180%2C0%20L%20180%2C360%20M%200%2C180%20L%20360%2C180%22%20stroke%3D%22%23ffffff%22%20stroke-width%3D%220.6%22%20stroke-dasharray%3D%223%2C10%22%20opacity%3D%220.15%22%2F%3E%3Cg%20transform%3D%22translate%280%2C%200%29%22%3E%3Cuse%20href%3D%22%23unity-logo%22%2F%3E%3C%2Fg%3E%3Cg%20transform%3D%22translate%28180%2C%200%29%22%3E%3Cuse%20href%3D%22%23csharp-logo%22%2F%3E%3C%2Fg%3E%3Cg%20transform%3D%22translate%28360%2C%200%29%22%3E%3Cuse%20href%3D%22%23unity-logo%22%2F%3E%3C%2Fg%3E%3Cg%20transform%3D%22translate%280%2C%20180%29%22%3E%3Cuse%20href%3D%22%23csharp-logo%22%2F%3E%3C%2Fg%3E%3Cg%20transform%3D%22translate%28180%2C%20180%29%22%3E%3Cuse%20href%3D%22%23unity-logo%22%2F%3E%3C%2Fg%3E%3Cg%20transform%3D%22translate%28360%2C%20180%29%22%3E%3Cuse%20href%3D%22%23csharp-logo%22%2F%3E%3C%2Fg%3E%3Cg%20transform%3D%22translate%280%2C%20360%29%22%3E%3Cuse%20href%3D%22%23unity-logo%22%2F%3E%3C%2Fg%3E%3Cg%20transform%3D%22translate%28180%2C%20360%29%22%3E%3Cuse%20href%3D%22%23csharp-logo%22%2F%3E%3C%2Fg%3E%3Cg%20transform%3D%22translate%28360%2C%20360%29%22%3E%3Cuse%20href%3D%22%23unity-logo%22%2F%3E%3C%2Fg%3E%3Cg%20transform%3D%22translate%2890%2C%2090%29%22%3E%3Cuse%20href%3D%22%23holo-node%22%2F%3E%3C%2Fg%3E%3Cg%20transform%3D%22translate%28270%2C%2090%29%22%3E%3Cuse%20href%3D%22%23holo-node%22%2F%3E%3C%2Fg%3E%3Cg%20transform%3D%22translate%2890%2C%20270%29%22%3E%3Cuse%20href%3D%22%23holo-node%22%2F%3E%3C%2Fg%3E%3Cg%20transform%3D%22translate%28270%2C%20270%29%22%3E%3Cuse%20href%3D%22%23holo-node%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E");
  --behind-gradient: none;
  --behind-glow-color: rgba(125, 190, 255, 0.67);
  --behind-glow-size: 50%;
  --inner-gradient: linear-gradient(145deg, #60496e8c 0%, #71C4FF44 100%);
  --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%);
  --sunpillar-clr-1: var(--sunpillar-1);
  --sunpillar-clr-2: var(--sunpillar-2);
  --sunpillar-clr-3: var(--sunpillar-3);
  --sunpillar-clr-4: var(--sunpillar-4);
  --sunpillar-clr-5: var(--sunpillar-5);
  --sunpillar-clr-6: var(--sunpillar-6);
  --card-radius: 30px;
}

.pc-card-wrapper {
  perspective: 500px;
  transform: translate3d(0, 0, 0.1px);
  position: relative;
  touch-action: pan-y;
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
}

.pc-behind {
  position: absolute;
  inset: 0;
  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(50px) saturate(1.1);
  opacity: calc(0.8 * var(--card-opacity));
  transition: opacity 200ms ease;
}

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

.pc-card {
  height: 80svh;
  max-height: 540px;
  display: grid;
  aspect-ratio: 0.718;
  border-radius: var(--card-radius);
  position: relative;
  background-blend-mode: color-dodge, normal, normal, normal;
  animation: glow-bg 12s linear infinite;
  box-shadow: rgba(0, 0, 0, 0.8) calc((var(--pointer-from-left) * 10px) - 3px)
    calc((var(--pointer-from-top) * 20px) - 6px) 20px -5px;
  transition: transform 1s ease;
  transform: translateZ(0) rotateX(0deg) rotateY(0deg);
  background: rgba(0, 0, 0, 0.9);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  overflow: hidden;
}

@media (hover: hover) and (pointer: fine) {
  .pc-card:hover,
  .pc-card.active {
    transition: none;
    transform: translateZ(0) rotateX(var(--rotate-y)) rotateY(var(--rotate-x));
  }

  .pc-card-shell.entering .pc-card {
    transition: transform 180ms ease-out;
  }
}

@media (hover: none), (pointer: coarse), (max-width: 768px) {
  .pc-card-wrapper {
    touch-action: pan-y !important;
    --grain: none !important;
  }

  .pc-card,
  .pc-card:hover,
  .pc-card.active,
  .pc-card-shell.entering .pc-card {
    transform: translateZ(0) !important;
    transition: none !important;
  }

  .pc-behind {
    opacity: 0.5 !important;
  }

  /* Completely remove shimmering texture PNG and heavy blend modes on mobile alone to eliminate lag */
  .pc-shine,
  .pc-shine::before,
  .pc-shine::after,
  .pc-glare {
    display: none !important;
    animation: none !important;
    background-image: none !important;
    filter: none !important;
    opacity: 0 !important;
  }
}


.pc-card-shell {
  position: relative;
  z-index: 1;
}

.pc-card * {
  display: grid;
  grid-area: 1/-1;
  border-radius: var(--card-radius);
  pointer-events: none;
}

.pc-inside {
  inset: 0;
  position: absolute;
  background-image: var(--inner-gradient);
  background-color: rgba(0, 0, 0, 0.9);
  transform: none;
}

.pc-shine {
  mask-image: var(--icon);
  -webkit-mask-image: var(--icon);
  mask-mode: alpha, luminance;
  -webkit-mask-mode: alpha;
  mask-type: alpha;
  mask-repeat: repeat;
  -webkit-mask-repeat: repeat;
  mask-size: 270px;
  -webkit-mask-size: 270px;
  mask-position: top calc(200% - (var(--background-y) * 5)) left calc(100% - var(--background-x));
  -webkit-mask-position: top calc(200% - (var(--background-y) * 5)) left calc(100% - var(--background-x));
  transition: filter 0.8s ease;
  filter: brightness(1.2) contrast(1.7) saturate(0.9) opacity(0.9);
  animation: holo-bg 18s linear infinite;
  animation-play-state: running;
  mix-blend-mode: color-dodge;
}

.pc-shine,
.pc-shine::after {
  --space: 8%;
  --angle: -45deg;
  transform: translate3d(0, 0, 5px);
  overflow: hidden;
  z-index: 5;
  pointer-events: none;
  background: transparent;
  background-size: cover;
  background-position: center;
  background-image:
    repeating-linear-gradient(
      0deg,
      var(--sunpillar-clr-1) calc(var(--space) * 1),
      var(--sunpillar-clr-2) calc(var(--space) * 2),
      var(--sunpillar-clr-3) calc(var(--space) * 3),
      var(--sunpillar-clr-4) calc(var(--space) * 4),
      var(--sunpillar-clr-5) calc(var(--space) * 5),
      var(--sunpillar-clr-6) calc(var(--space) * 6),
      var(--sunpillar-clr-1) calc(var(--space) * 7)
    ),
    repeating-linear-gradient(
      var(--angle),
      #0e152e 0%,
      hsl(180, 10%, 60%) 3.8%,
      hsl(180, 29%, 66%) 4.5%,
      hsl(180, 10%, 60%) 5.2%,
      #0e152e 10%,
      #0e152e 12%
    ),
    radial-gradient(
      farthest-corner circle at var(--pointer-x) var(--pointer-y),
      hsla(0, 0%, 0%, 0.1) 12%,
      hsla(0, 0%, 0%, 0.15) 20%,
      hsla(0, 0%, 0%, 0.25) 120%
    );
  background-position:
    0 var(--background-y),
    var(--background-x) var(--background-y),
    center;
  background-blend-mode: color, hard-light;
  background-size:
    500% 500%,
    300% 300%,
    200% 200%;
  background-repeat: repeat;
}

.pc-shine::before,
.pc-shine::after {
  content: '';
  background-position: center;
  background-size: cover;
  grid-area: 1/1;
  opacity: 0.55;
  transition: opacity 0.8s ease;
}

.pc-card:hover .pc-shine,
.pc-card.active .pc-shine {
  filter: brightness(1.35) contrast(2.0) saturate(1.1) opacity(1);
  animation-play-state: paused;
}

.pc-card:hover .pc-shine::before,
.pc-card.active .pc-shine::before,
.pc-card:hover .pc-shine::after,
.pc-card.active .pc-shine::after {
  opacity: 1;
}

.pc-shine::before {
  background-image:
    linear-gradient(
      45deg,
      var(--sunpillar-4),
      var(--sunpillar-5),
      var(--sunpillar-6),
      var(--sunpillar-1),
      var(--sunpillar-2),
      var(--sunpillar-3)
    ),
    radial-gradient(circle at var(--pointer-x) var(--pointer-y), hsl(0, 0%, 70%) 0%, hsla(0, 0%, 30%, 0.2) 90%),
    var(--grain);
  background-size:
    250% 250%,
    100% 100%,
    220px 220px;
  background-position:
    var(--pointer-x) var(--pointer-y),
    center,
    calc(var(--pointer-x) * 0.01) calc(var(--pointer-y) * 0.01);
  background-blend-mode: color-dodge;
  filter: brightness(calc(2 - var(--pointer-from-center))) contrast(calc(var(--pointer-from-center) + 2))
    saturate(calc(0.5 + var(--pointer-from-center)));
  mix-blend-mode: luminosity;
}

.pc-shine::after {
  background-position:
    0 var(--background-y),
    calc(var(--background-x) * 0.4) calc(var(--background-y) * 0.5),
    center;
  background-size:
    200% 300%,
    700% 700%,
    100% 100%;
  mix-blend-mode: difference;
  filter: brightness(0.8) contrast(1.5);
}

.pc-glare {
  transform: translate3d(0, 0, 6px);
  overflow: hidden;
  background-image: radial-gradient(
    farthest-corner circle at var(--pointer-x) var(--pointer-y),
    hsl(248, 25%, 80%) 12%,
    hsla(207, 40%, 30%, 0.8) 90%
  );
  mix-blend-mode: overlay;
  filter: brightness(0.8) contrast(1.2);
  z-index: 6;
  pointer-events: none;
}

.pc-avatar-content {
  mix-blend-mode: luminosity;
  overflow: visible;
  transform: translate3d(0, 0, 1px);
  backface-visibility: hidden;
  z-index: 1;
}

.pc-avatar-content .avatar {
  width: 100%;
  position: absolute;
  left: 50%;
  transform-origin: 50% 100%;
  transform: translateX(calc(-50% + (var(--pointer-from-left) - 0.5) * 6px)) translateZ(0)
    scaleY(calc(1 + (var(--pointer-from-top) - 0.5) * 0.02)) scaleX(calc(1 + (var(--pointer-from-left) - 0.5) * 0.01));
  bottom: -1px;
  backface-visibility: hidden;
  will-change: transform;
  transition: transform 120ms ease-out;
}

.pc-avatar-content::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  backdrop-filter: none;
  pointer-events: none;
}

.pc-user-info {
  position: absolute;
  --ui-inset: 20px;
  --ui-radius-bias: 6px;
  bottom: var(--ui-inset);
  left: var(--ui-inset);
  right: var(--ui-inset);
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: calc(max(0px, var(--card-radius) - var(--ui-inset) + var(--ui-radius-bias)));
  padding: 12px 14px;
  pointer-events: auto;
}

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

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

.pc-mini-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.pc-user-text {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  gap: 6px;
}

.pc-handle {
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1;
}

.pc-status {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1;
}

.pc-contact-btn {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  background: transparent;
  transition: all 0.2s ease;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.pc-contact-btn:hover {
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-1px);
  transition: all 0.2s ease;
  background: rgba(255, 255, 255, 0.1);
}

.pc-content:not(.pc-avatar-content) {
  max-height: 100%;
  overflow: hidden;
  text-align: center;
  position: relative;
  transform: translate3d(
    calc(var(--pointer-from-left) * -6px + 3px),
    calc(var(--pointer-from-top) * -6px + 3px),
    0.1px
  );
  z-index: 5;
  mix-blend-mode: luminosity;
}

.pc-details {
  width: 100%;
  position: absolute;
  top: 2.4em;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 16px;
  box-sizing: border-box;
}

.pc-details h3 {
  font-weight: 700;
  margin: 0;
  font-size: min(4.5svh, 2.2em);
  line-height: 1.15;
  background-image: linear-gradient(180deg, #ffffff 40%, #818cf8 100%);
  -webkit-text-fill-color: transparent;
  background-clip: text;
  -webkit-background-clip: text;
  text-align: center;
}

.pc-details p {
  font-weight: 500;
  position: relative;
  top: 0;
  margin: 4px 0 0;
  white-space: normal;
  font-size: 14px;
  line-height: 1.3;
  text-align: center;
  background-image: linear-gradient(180deg, #ffffff 40%, #38bdf8 100%);
  -webkit-text-fill-color: transparent;
  background-clip: text;
  -webkit-background-clip: text;
}

@keyframes glow-bg {
  0% {
    --bgrotate: 0deg;
  }

  100% {
    --bgrotate: 360deg;
  }
}

@keyframes holo-bg {
  0% {
    background-position:
      0 var(--background-y),
      0 0,
      center;
  }

  100% {
    background-position:
      0 var(--background-y),
      90% 90%,
      center;
  }
}

@media (max-width: 768px) {
  .pc-card-wrapper {
    --grain: none !important;
  }

  .pc-shine,
  .pc-shine::before,
  .pc-shine::after,
  .pc-glare {
    display: none !important;
    animation: none !important;
    background-image: none !important;
    filter: none !important;
    opacity: 0 !important;
  }

  .pc-card {
    height: 70svh;
    max-height: 450px;
  }

  .pc-details {
    top: 1.8em;
    padding: 0 12px;
  }

  .pc-details h3 {
    font-size: min(4svh, 1.8em);
    line-height: 1.15;
  }

  .pc-details p {
    font-size: 13px;
    margin-top: 3px;
    top: 0;
  }

  .pc-user-info {
    --ui-inset: 15px;
    padding: 10px 12px;
  }

  .pc-mini-avatar {
    width: 28px;
    height: 28px;
  }

  .pc-user-details {
    gap: 10px;
  }

  .pc-handle {
    font-size: 13px;
  }

  .pc-status {
    font-size: 10px;
  }

  .pc-contact-btn {
    padding: 6px 12px;
    font-size: 11px;
  }
}

@media (max-width: 480px) {
  .pc-card {
    height: 60svh;
    max-height: 380px;
  }

  .pc-details {
    top: 1.2em;
    padding: 0 10px;
  }

  .pc-details h3 {
    font-size: clamp(1.2rem, 5.5vw, 1.55rem);
    line-height: 1.15;
  }

  .pc-details p {
    font-size: 0.76rem;
    top: 0;
    margin-top: 2px;
  }

  .pc-user-info {
    --ui-inset: 12px;
    padding: 8px 10px;
  }

  .pc-mini-avatar {
    width: 24px;
    height: 24px;
  }

  .pc-user-details {
    gap: 8px;
  }

  .pc-handle {
    font-size: 12px;
  }

  .pc-status {
    font-size: 9px;
  }

  .pc-contact-btn {
    padding: 5px 10px;
    font-size: 10px;
    border-radius: 50px;
  }
}

@media (max-width: 320px) {
  .pc-card {
    height: 55svh;
    max-height: 320px;
  }

  .pc-details {
    top: 0.8em;
  }

  .pc-details h3 {
    font-size: 1.15rem;
    line-height: 1.15;
  }

  .pc-details p {
    font-size: 0.7rem;
    top: 0;
    margin-top: 2px;
  }

  .pc-user-info {
    padding: 6px 8px;
  }

  .pc-mini-avatar {
    width: 20px;
    height: 20px;
  }

  .pc-user-details {
    gap: 6px;
  }

  .pc-handle {
    font-size: 11px;
  }

  .pc-status {
    font-size: 8px;
  }

  .pc-contact-btn {
    padding: 4px 8px;
    font-size: 9px;
    border-radius: 50px;
  }
}
