/* UPLINK // profile.css — Profile cards. */

/* --- profile card --- */
.pmodal {
  position: fixed;
  inset: 0;
  z-index: 48;
  background: #000a;
  display: grid;
  place-items: center;
  padding: 16px;
}
.pcard {
  --c: var(--accent);
  position: relative;
  width: min(340px, 100%);
  background: var(--panel);
  border: 1px solid var(--line);
  overflow: hidden;
  clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 22px, 100% 100%, 0 100%);
}
.pcard::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background: repeating-linear-gradient(0deg, var(--c) 0 1px, transparent 1px 4px);
  mix-blend-mode: screen;
}
.pcard.glitch {
  animation: glitchIn 0.65s steps(1) both;
}
.pcard.glitch::after {
  animation: scanFlash 0.7s steps(5) both;
}
.pcard.glitch .pc-name {
  animation: rgbSplit 0.9s steps(2);
}
.pcard.glitch .pc-av {
  animation: avJit 0.7s steps(1);
}
@keyframes avJit {
  0% {
    transform: translate(-6px, 0);
    filter: invert(1);
  }
  20% {
    transform: translate(5px, 2px);
    filter: none;
  }
  40% {
    transform: translate(-3px, -1px);
    filter: hue-rotate(120deg);
  }
  60% {
    transform: translate(2px, 0);
    filter: none;
  }
  100% {
    transform: none;
  }
}
.pc-band {
  height: 76px;
  background: var(--c);
  position: relative;
  background-image: repeating-linear-gradient(-45deg, #0b0b0c22 0 10px, transparent 10px 20px);
}
.pc-band span {
  position: absolute;
  top: 10px;
  left: 14px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: #0b0b0c;
}
.pc-band b {
  position: absolute;
  bottom: 8px;
  right: 14px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: #0b0b0c;
}
.pc-av {
  position: absolute;
  left: 18px;
  top: 40px;
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-weight: 900;
  font-size: 44px;
  color: #0b0b0c;
  background: var(--c);
  border: 4px solid var(--panel);
  clip-path: polygon(0 0, 100% 0, 100% 74%, 74% 100%, 0 100%);
}
.pc-body {
  padding: 46px 18px 18px;
}
.pc-name {
  font-family: var(--display);
  font-weight: 900;
  font-size: 42px;
  line-height: 0.9;
  text-transform: uppercase;
  margin: 0;
  color: var(--fg);
  overflow-wrap: anywhere;
}
.pc-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0 16px;
}
.pc-tags span {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 4px 8px;
  border: 1px solid var(--line);
  color: var(--mute);
}
.pc-tags .role {
  background: var(--c);
  border-color: var(--c);
  color: #0b0b0c;
  font-weight: 600;
}
.pc-tags .on {
  color: var(--ok);
  border-color: #c8ff3d55;
}
.pc-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--line);
}
.pc-stats div {
  padding: 10px;
  border-left: 1px solid var(--line);
  min-width: 0;
}
.pc-stats div:first-child {
  border-left: 0;
}
.pc-stats b {
  display: block;
  font-family: var(--display);
  font-weight: 800;
  font-size: 24px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pc-stats small {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  color: var(--mute);
  text-transform: uppercase;
}
.pc-code {
  display: flex;
  gap: 2px;
  height: 26px;
  margin-top: 14px;
  align-items: stretch;
}
.pc-code i {
  background: var(--fg);
  opacity: 0.8;
}
.pc-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.16em;
  color: var(--mute);
}
.pc-edit {
  margin-top: 14px;
  width: 100%;
}
.pc-x {
  position: absolute;
  top: 8px;
  right: 28px;
  width: 28px;
  height: 28px;
  font-size: 13px;
  border-color: #0b0b0c55;
  color: #0b0b0c;
  background: #ffffff22;
  z-index: 2;
}
.pc-x:hover {
  background: #0b0b0c;
  color: var(--c);
  border-color: #0b0b0c;
}
.set-profile .pcard {
  width: 100%;
}
.set-profile .pc-x,
.set-profile .pc-edit {
  display: none;
}

/* clickable names/avatars */
[data-profile] {
  cursor: pointer;
}
.mh b[data-profile]:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.msg .avatar[data-profile]:hover {
  filter: brightness(1.15);
}
.crew-list li[data-profile]:hover {
  border-color: var(--c, var(--accent));
}
