.wpar-profile-link { color: inherit; text-decoration: none; }
.wpar-profile-link:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.wpar-head__avatar-link { flex: 0 0 auto; display: block; text-decoration: none; }

.wpar-profile-layout {
  max-width: 1128px;
  margin: 0 auto;
  padding: 16px 12px 48px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 24px;
  align-items: start;
}
.wpar-profile-page { min-width: 0; grid-column: 1; grid-row: 1; display: grid; gap: 20px; }
.wpar-profile-sidebar {
  grid-column: 2;
  grid-row: 1;
  position: sticky;
  top: calc(var(--wpar-top, 8px) + 72px);
  display: grid;
  gap: 16px;
  min-width: 0;
}
.wpar-profile-hero { overflow: hidden; }
.wpar-profile-hero__cover { height: 150px; background: linear-gradient(135deg, var(--navy), var(--accent) 55%, #b2c2da 85%, var(--glow)); }
.wpar-profile-hero__body { padding: 0 28px 28px; }
.wpar-profile-hero__top { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; }
.wpar-profile-hero__avatar { margin-top: -52px; width: 112px; height: 112px; padding: 4px; border-radius: 50%; background: var(--surface); box-shadow: 0 3px 12px rgba(3,7,91,.14); }
.wpar-profile-hero__avatar .wpar-avatar { width: 104px !important; height: 104px !important; border-radius: 50%; }
.wpar-profile-hero__actions { display: flex; align-items: center; gap: 8px; }
.wpar-profile-hero__actions .wpar-btn { margin-top: 0; }
.wpar-profile-connection-state { display: inline-flex; align-items: center; min-height: 40px; padding: 0 2px; color: var(--muted); font-size: 14px; font-weight: 650; }
.wpar-profile-hero__identity h1 { margin: 12px 0 2px; font-size: 28px; line-height: 1.2; }
.wpar-profile-hero__username, .wpar-profile-hero__joined { color: var(--muted); font-size: 13px; }
.wpar-profile-hero__identity p { max-width: 700px; margin: 12px 0 8px; white-space: pre-line; }
.wpar-profile-hero__short-description { color: var(--muted); }
.wpar-profile-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin: 24px 0 0; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--line); }
.wpar-profile-stats div {
  min-height: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: var(--surface);
  text-align: center;
}
.wpar-profile-stat-link {
  width: 100%;
  display: block;
  padding: 14px 12px;
  color: inherit;
  text-decoration: none;
}
.wpar-profile-stat-link:hover { background: var(--bg); }
.wpar-profile-stats span { display: block; color: var(--muted); font-size: 12px; }
.wpar-profile-stats strong { display: block; margin-top: 2px; font-size: 20px; font-weight: 750; }
.wpar-profile-content { display: grid; gap: 16px; }
.wpar-profile-tabs {
  display: flex;
  align-items: stretch;
  gap: 4px;
  padding: 4px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(3,7,91,.05);
}
.wpar-profile-tab {
  flex: 1 1 0;
  appearance: none;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  padding: 11px 16px;
  font: inherit;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.2;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, box-shadow .15s ease;
}
.wpar-profile-tab span { margin-left: 5px; font-size: 12px; font-weight: 500; opacity: .8; }
.wpar-profile-tab:hover { color: var(--ink); background: var(--bg); }
.wpar-profile-tab.is-active {
  color: var(--ink);
  background: var(--surface);
  box-shadow: 0 1px 4px rgba(3,7,91,.12);
}
.wpar-profile-tab:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.wpar-profile-tab-panel[hidden] { display: none !important; }
.wpar-profile-section { padding: 20px; }
.wpar-profile-about { padding: 20px; }
.wpar-profile-about h2 { margin: 0 0 10px; font-size: 18px; }
.wpar-profile-about p { margin: 0; white-space: pre-line; line-height: 1.6; }
.wpar-profile-section__head { display:flex; align-items:center; justify-content:space-between; gap: 12px; margin-bottom: 16px; }
.wpar-profile-section__head h2 { margin: 0; font-size: 18px; }
.wpar-profile-section__head span { color: var(--muted); font-size: 13px; }
.wpar-profile-posts { display: grid !important; grid-template-columns: minmax(0, 1fr); gap: 16px !important; min-width: 0; }
.wpar-profile-posts > .wpar-card,
.wpar-profile-posts > [data-wpar-item] { margin: 0 !important; min-width: 0; }
.wpar-profile-posts > [data-wpar-item] + [data-wpar-item],
.wpar-profile-posts > .wpar-card + .wpar-card { margin-top: 0 !important; }
.wpar-profile-posts > .wpar-more { grid-column: 1 / -1; margin: 0 !important; min-width: 0; }
.wpar-profile-replies { display: grid; gap: 0; }
.wpar-profile-reply { padding: 14px 0; border-top: 1px solid var(--line); }
.wpar-profile-reply:first-child { border-top: 0; padding-top: 0; }
.wpar-profile-reply p { margin: 8px 0 0; }
.wpar-profile-reply__meta { color: var(--muted); font-size: 12px; }
.wpar-profile-reply__meta a { color: var(--ink); font-weight: 650; text-decoration: none; }
.wpar-profile-reply__meta a:hover { color: var(--accent); }
.wpar-profile-reply__meta time { margin-left: 8px; }
.wpar-profile-page .wpar-profile-posts .wpar-profile-page { padding: 0; }
.wpar-profile-page.is-swapping { opacity: .65; transition: opacity .15s ease; }

@media (max-width: 1099px) {
  .wpar-profile-layout {
    grid-template-columns: minmax(0, 1fr) 260px;
  }
  .wpar-profile-page {
    grid-column: 1;
    grid-row: 1;
  }
  .wpar-profile-sidebar {
    grid-column: 2;
    grid-row: 1;
    position: static;
  }
}

@media (max-width: 767px) {
  .wpar-profile-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .wpar-profile-page,
  .wpar-profile-sidebar {
    grid-column: 1;
  }
  .wpar-profile-page {
    grid-row: 1;
  }
  .wpar-profile-sidebar {
    grid-row: 2;
  }
}

@media (max-width: 600px) {
  .wpar-profile-layout { padding-left: 0; padding-right: 0; }
  .wpar-profile-hero__body { padding: 0 18px 20px; }
  .wpar-profile-hero__top { align-items: flex-start; flex-direction: column; }
  .wpar-profile-hero__actions { align-self: stretch; }
  .wpar-profile-hero__actions .wpar-btn { width: 100%; }
  .wpar-profile-stats { grid-template-columns: repeat(2, 1fr); }
  .wpar-profile-section { padding: 16px; }
}

