/* ============================================================
   Profile — module-specific styles (ported from the kit).
   The banner (cover band + overlapping avatar + identity + stats),
   the two-tab bar, the "SEE LATEST" divider, and the photo-saved toast.
   Tokens only — never hard-code color.
   ============================================================ */

/* ---- banner card ---- */
.pf-card {
  border: 1px solid var(--hairline);
  background: var(--surface);
  border-radius: 20px;
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

/* cover band — emerald fallback when no photo, with the same designed
   ray-texture + radial highlight used on the Officials profile cover */
.pf-cover {
  position: relative;
  width: 100%; aspect-ratio: 1500 / 420;
  background: linear-gradient(115deg, color-mix(in srgb, var(--accent) 90%, #053) 0%, var(--accent) 52%, color-mix(in srgb, var(--accent) 72%, #0a6) 100%);
}
.pf-cover__tex {
  position: absolute; inset: 0; pointer-events: none; opacity: .16;
  background: repeating-linear-gradient(125deg, #fff 0 1px, transparent 1px 13px);
}
.pf-cover__glow {
  position: absolute; right: -44px; top: -70px; pointer-events: none;
  width: 230px; height: 230px; border-radius: 50%;
  opacity: .28; filter: blur(42px);
  background: radial-gradient(circle, #fff 0%, transparent 70%);
}
.pf-cover__photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pf-cover__edit {
  position: absolute; right: 14px; bottom: 14px; z-index: 3;
  display: inline-flex; align-items: center; gap: 7px;
  height: 38px; padding: 0 13px; border-radius: 11px;
  background: color-mix(in srgb, #0a0a0a 42%, transparent);
  color: #fff; border: 1px solid rgba(255,255,255,.22);
  font-size: 13px; font-weight: 600; cursor: pointer;
  white-space: nowrap;
  backdrop-filter: blur(6px);
  transition: background .15s ease;
}
.pf-cover__edit:hover { background: color-mix(in srgb, #0a0a0a 58%, transparent); }

/* identity block sits below the cover; avatar overlaps the seam */
.pf-body { position: relative; padding: 0 20px 20px; }
.pf-avatar-wrap {
  position: relative; z-index: 4; flex: none;
  width: 108px; height: 108px; margin-top: -54px;
}
@media (min-width: 560px) { .pf-avatar-wrap { width: 124px; height: 124px; margin-top: -62px; } }
.pf-avatar {
  position: relative;
  width: 100%; height: 100%; border-radius: 50%;
  background: var(--surface);
  padding: 4px;
  box-shadow: var(--shadow-card);
}
/* Clip the photo to the inner circle so a non-square image can't bleed past it. */
.pf-avatar__photo { display: block; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; overflow: hidden; }
.pf-avatar__edit {
  position: absolute; right: 2px; bottom: 2px; z-index: 5;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--accent); color: #fff;
  display: grid; place-items: center;
  border: 3px solid var(--surface);
  box-shadow: var(--shadow-soft); cursor: pointer;
}

.pf-id { margin-top: 14px; }
@media (min-width: 560px) { .pf-id { margin-top: 16px; } }
.pf-name {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-family: "Poppins", sans-serif; font-weight: 700;
  font-size: 23px; letter-spacing: -.01em; color: var(--ink); line-height: 1.1;
}
@media (min-width: 560px) { .pf-name { font-size: 27px; } }
.pf-handle { margin-top: 3px; font-size: 14.5px; color: var(--faint); }
.pf-meta { margin-top: 11px; display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; }
.pf-meta__item { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--muted); }
.pf-voter {
  display: inline-flex; align-items: center; gap: 5px;
  height: 24px; padding: 0 9px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent-ink);
  font-size: 12px; font-weight: 600; white-space: nowrap;
}
.pf-stats { margin-top: 15px; display: flex; align-items: center; gap: 22px; }
.pf-stat { display: inline-flex; align-items: baseline; gap: 6px; }
.pf-stat__n { font-family: "Poppins", sans-serif; font-weight: 700; font-size: 17px; color: var(--ink); }
.pf-stat__l { font-size: 13.5px; color: var(--muted); }
.pf-stat:hover .pf-stat__n { color: var(--accent-ink); }

/* ---- tab bar (Activity / Replies) ---- */
.pf-tabs {
  display: flex;
  border-bottom: 1px solid var(--hairline);
  margin-top: 4px;
}
/* opt-in: pin the tab strip to the top of the scroll area as the feed scrolls
   under it (translucent blurred backdrop so cards don't show through) */
.pf-tabs--sticky {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--paper) 90%, transparent);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.pf-tab {
  flex: 1; position: relative;
  height: 52px; border: none; background: transparent; cursor: pointer;
  font-family: "Poppins", sans-serif; font-weight: 600; font-size: 14.5px;
  color: var(--muted); transition: color .15s ease;
}
.pf-tab:hover { color: var(--ink); background: color-mix(in srgb, var(--sunken) 50%, transparent); }
.pf-tab.is-on { color: var(--accent-ink); }
.pf-tab__bar {
  position: absolute; left: 50%; bottom: -1px; transform: translateX(-50%);
  width: 0; height: 3px; border-radius: 3px 3px 0 0; background: var(--accent);
  transition: width .2s cubic-bezier(.22,.61,.36,1);
}
.pf-tab.is-on .pf-tab__bar { width: min(72%, 220px); }

/* ---- "SEE LATEST" divider ---- */
.pf-latest {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 4px 2px;
}
.pf-latest__line { flex: 1; height: 1px; background: var(--hairline); }
.pf-latest__text { font-family: "Open Sans", monospace; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); }

/* ---- empty state ---- */
.pf-empty {
  border: 1px dashed var(--hairline-strong);
  background: var(--surface);
  border-radius: 18px;
  padding: 60px 24px;
  text-align: center;
}

/* lazy-tab spinner (Replies loads on first reveal) */
.pf-spin {
  width: 30px; height: 30px; border-radius: 50%;
  border: 3px solid var(--sunken); border-top-color: var(--accent);
  display: inline-block; animation: pf-spin .7s linear infinite;
}
@keyframes pf-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .pf-spin { animation-duration: 1.6s; } }
