/* ══════════════════════════════════════════════
   PUBLIC PROFILE — /u/:username only
   Layered on profile.css + core.css
══════════════════════════════════════════════ */

.public-profile-wrap {
  max-width: 560px;
}

.public-profile-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
  padding: 28px 20px 32px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 8px;
}

@media (min-width: 480px) {
  .public-profile-card {
    padding: 36px 28px 40px;
    gap: 18px;
  }
}

/* Avatar — read-only, no cursor/edit affordance */
.public-profile-avatar {
  flex-shrink: 0;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: var(--bg3);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--profile-font-display, "Space Grotesk", system-ui, sans-serif);
  font-weight: 700;
  font-size: 32px;
  color: var(--accent2);
  overflow: hidden;
  cursor: default;
}

@media (min-width: 480px) {
  .public-profile-avatar {
    width: 112px;
    height: 112px;
    font-size: 36px;
  }
}

.public-profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.public-profile-name {
  font-family: var(--profile-font-display, "Space Grotesk", system-ui, sans-serif);
  font-weight: 700;
  font-size: clamp(20px, 5vw, 28px);
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--text);
  margin: 0;
}

.public-profile-username {
  font-family: var(--profile-font-mono, "JetBrains Mono", ui-monospace, monospace);
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.02em;
  margin-top: -8px;
}

.public-profile-bio-wrap {
  max-width: 36em;
  width: 100%;
}

.public-profile-bio {
  font-family: var(--profile-font-body, "Inter", system-ui, sans-serif);
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0;
}

.public-profile-bio.bio-text.is-collapsed {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 5;
  overflow: hidden;
  white-space: normal;
}

.public-profile-bio-wrap .bio-more-btn,
.public-profile-bio-wrap button.bio-more-btn {
  display: inline-block;
  margin-top: 8px;
  padding: 0;
  border: none;
  background: none;
  font-family: var(--profile-font-body, "Inter", system-ui, sans-serif);
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  line-height: 1.3;
}

.public-profile-bio-wrap .bio-more-btn:hover {
  color: var(--accent2, var(--accent));
}

.public-profile-empty {
  text-align: center;
  padding: 48px 16px;
}

.public-profile-empty h1 {
  font-family: var(--profile-font-display, "Space Grotesk", system-ui, sans-serif);
  font-weight: 700;
  font-size: clamp(18px, 4.5vw, 22px);
  color: var(--text);
  margin: 0 0 10px;
}

.public-profile-empty p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.55;
  margin: 0 0 20px;
}

.public-profile-empty .btn-secondary {
  display: inline-flex;
}

/* ─────────────────────────────────────
   Action row — mobile-first
   Base (mobile): full-width, stacked, share is the primary action
   ≥420px: shrink to auto-width, side by side
───────────────────────────────────── */
.public-profile-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  margin-top: 24px;
  position: relative;
}

@media (min-width: 420px) {
  .public-profile-actions {
    flex-direction: row;
    justify-content: center;
    width: auto;
  }
}

.public-profile-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  width: 100%;
  padding: 0.85rem 1.4rem;
  border-radius: 4px;
  font-family: var(--profile-font-body, "Inter", system-ui, sans-serif);
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.2s, background 0.2s;
  -webkit-tap-highlight-color: transparent;
}

@media (min-width: 420px) {
  .public-profile-btn {
    width: auto;
    padding: 0.75rem 1.4rem;
  }
}

.public-profile-btn svg {
  flex-shrink: 0;
}

.public-profile-btn:active {
  transform: scale(0.98);
}

.public-profile-btn:focus-visible {
  outline: 2.5px solid var(--accent2, var(--accent));
  outline-offset: 2px;
}

/* Share — primary action for a page whose whole purpose is to be sent to someone */
.public-profile-btn-primary {
  background: var(--accent);
  color: var(--accent-foreground);
}

.public-profile-btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-1px);
  color: var(--accent-foreground);
}

/* Home — secondary, ghost style (matches 404's error-btn-ghost) */
.public-profile-btn-ghost {
  background: transparent;
  color: var(--accent2, var(--accent));
  border: 0.5px solid var(--border);
}

.public-profile-btn-ghost:hover {
  background: var(--glow, rgba(45, 106, 79, 0.12));
  transform: translateY(-1px);
  color: var(--accent2, var(--accent));
}

/* Copy-link feedback toast */
.public-profile-toast {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  transform: translateX(-50%) translateY(4px);
  background: var(--text);
  color: var(--bg2);
  font-family: var(--profile-font-body, "Inter", system-ui, sans-serif);
  font-size: 12.5px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
}

.public-profile-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
