/* User profile page — public + own */

.profile-page {
  max-width: var(--layout-narrow, 48rem);
  margin: 0 auto;
}

.profile-card {
  border-radius: var(--radius-card, 10px);
  overflow: hidden;
}

.profile-hero {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.35rem 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--moner-border, #3a3a3f);
}

.profile-hero-avatar {
  flex-shrink: 0;
}

.profile-hero-avatar-img,
.profile-hero-avatar .user-avatar,
.profile-hero-avatar .user-avatar-placeholder {
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}

.profile-hero-name {
  margin: 0 0 0.2rem;
  font-size: clamp(1.45rem, 4vw, 2rem);
  font-weight: 900;
  line-height: 1.15;
  color: var(--moner-text, #e5e5e5);
  letter-spacing: -0.03em;
}

.profile-hero-handle {
  margin: 0 0 0.55rem;
  font-size: 0.88rem;
  color: var(--moner-text-muted, #888);
}

.profile-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  align-items: center;
  font-size: 0.82rem;
  color: var(--moner-text-muted, #888);
  margin-bottom: 0.75rem;
}

.profile-meta-dot {
  opacity: 0.55;
}

.profile-bio {
  margin: 0 0 0.85rem;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--moner-text, #d4d4d4);
  white-space: pre-wrap;
  word-break: break-word;
}

.profile-bio--empty,
.profile-socials-empty {
  margin: 0 0 0.85rem;
  font-size: 0.88rem;
  color: var(--moner-text-muted, #888);
}

.profile-bio--empty a,
.profile-socials-empty a {
  color: var(--moner-red, #dc2626);
}

.profile-socials {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1rem;
}

.profile-social-link {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.7rem;
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--moner-text, #e5e5e5);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--moner-border, #3a3a3f);
  border-radius: 999px;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.profile-social-link:hover {
  border-color: var(--moner-red, #dc2626);
  color: var(--moner-red, #dc2626);
  background: rgba(220, 38, 38, 0.08);
}

.profile-social-link--static {
  cursor: default;
}

.profile-social-link--static:hover {
  border-color: var(--moner-border, #3a3a3f);
  color: var(--moner-text, #e5e5e5);
  background: rgba(255, 255, 255, 0.04);
}

.profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  padding: 1.35rem 0;
  border-bottom: 1px solid var(--moner-border, #3a3a3f);
}

.profile-stat {
  padding: 0.85rem 0.75rem;
  text-align: center;
  background: var(--moner-bg-nav, #09090b);
  border: 1px solid var(--moner-border, #3a3a3f);
  border-radius: var(--radius-card, 10px);
  transition: border-color 0.15s ease;
}

.profile-stat:hover {
  border-color: var(--moner-border-strong, #52525b);
}

.profile-stat-value {
  font-size: clamp(1.35rem, 4vw, 1.85rem);
  font-weight: 900;
  line-height: 1;
  color: var(--moner-text, #f5f5f5);
  margin-bottom: 0.35rem;
}

.profile-stat-label {
  font-size: 0.68rem;
  font-weight: 800;
  font-family: var(--font-mono, var(--moner-font));
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--moner-text-muted, #777);
}

.profile-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.profile-section-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  color: var(--moner-text, #e5e5e5);
}

.profile-section-link {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--moner-red, #dc2626);
  text-decoration: none;
}

.profile-section-link:hover {
  text-decoration: underline;
}

.profile-posts {
  padding-top: 1.25rem;
}

.profile-posts--empty {
  font-size: 0.9rem;
  color: var(--moner-text-muted, #888);
}

.profile-posts--empty a {
  color: var(--moner-red, #dc2626);
}

.profile-post-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.profile-post-item {
  padding: 0.85rem 1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--moner-border, #3a3a3f);
  border-radius: 10px;
}

.profile-post-date {
  display: block;
  font-size: 0.75rem;
  color: var(--moner-text-muted, #777);
  margin-bottom: 0.4rem;
}

.profile-post-text {
  margin: 0 0 0.45rem;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--moner-text, #d4d4d4);
  white-space: pre-wrap;
}

.profile-post-text--muted {
  color: var(--moner-text-muted, #888);
  font-style: italic;
}

.profile-post-stats {
  font-size: 0.78rem;
  color: var(--moner-text-muted, #666);
}

.profile-own-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  margin-top: 1.35rem;
  padding-top: 1.15rem;
  border-top: 1px solid var(--moner-border, #3a3a3f);
}

.profile-age-note {
  font-size: 0.82rem;
  color: var(--moner-text-muted, #777);
}

body.wall-light .profile-hero {
  border-color: #e4e4e7;
}

body.wall-light .profile-stat,
body.wall-light .profile-post-item {
  background: #fafafa;
  border-color: #e4e4e7;
}

body.wall-light .profile-social-link {
  background: #fff;
  border-color: #d4d4d8;
  color: #18181b;
}

body.wall-light .profile-bio {
  color: #27272a;
}

@media (max-width: 640px) {
  .profile-hero {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .profile-hero-avatar {
    display: flex;
    justify-content: center;
  }

  .profile-hero-meta,
  .profile-socials,
  .profile-actions {
    justify-content: center;
  }

  .profile-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}