/* ==========================================================================
   home — perfil (profile)
   Padrao de rede social: capa, avatar sobreposto, numeros e feed de posts.
   Depende de design-system.css. Sem Bootstrap.

   Componentes do DS reaproveitados: .container, .section-flush, .section-heading,
   .btn/.btn-primary/.btn-ghost/.btn-lg, .min-width-0, .u-flex-row, .avatar-circle.
   As classes abaixo sao o layout de rede social e nao existem no DS.
   ========================================================================== */

.profile-page {
  padding-bottom: 80px;
}

/* Capa --------------------------------------------------------------------
   A logo disponivel e quadrada (192x192) com fundo cinza proprio, entao
   esticada em 1327x300 vira um borrão cortado. A capa usa o tom --ink-deep do
   DS e a marca entra contida e centralizada, como marca d'agua discreta. */
.profile-cover {
  position: relative;
  height: 300px;
  border-radius: var(--radius-xxxl);
  overflow: hidden;
  background: var(--ink-deep);
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-cover-img {
  width: auto;
  height: 56%;
  max-width: 30%;
  object-fit: contain;
  opacity: 0.9;
  border-radius: var(--radius-lg);
}

/* Cabecalho: avatar sobreposto a capa, como no Facebook/LinkedIn ---------- */
.profile-head {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 24px;
  align-items: end;
  margin-top: -60px;
  padding: 0 32px;
  position: relative;
  z-index: 1;
}

.profile-avatar {
  width: 168px;
  height: 168px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--canvas);
  background: var(--surface-soft);
  box-shadow: var(--elev-1);
}

.profile-head-body {
  padding: 20px 24px;
  background: var(--canvas);
  border: 1px solid var(--hairline-soft);
  border-radius: var(--radius-xl);
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.profile-name {
  font-size: 36px;
  font-weight: 500;
  line-height: 1.28;
  letter-spacing: -0.5px;
  color: var(--ink-deep);
}

.profile-headline {
  font-size: 16px;
  color: var(--charcoal);
  letter-spacing: -0.16px;
  line-height: 1.5;
}

.profile-head-actions {
  margin-top: 8px;
}

/* Numeros ----------------------------------------------------------------- */
.profile-stats {
  display: flex;
  gap: 48px;
  flex-wrap: wrap;
  margin: 24px 0 0;
  padding: 20px 32px;
  border: 1px solid var(--hairline-soft);
  border-radius: var(--radius-xl);
  background: var(--canvas);
}

.profile-stat {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.profile-stat-value {
  font-size: 24px;
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.3px;
  color: var(--ink-deep);
}

.profile-stat-label {
  font-size: 14px;
  color: var(--steel);
  letter-spacing: -0.14px;
}

/* Feed -------------------------------------------------------------------- */
.profile-feed {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 680px;
  margin: 24px auto 0;
}

.post {
  background: var(--canvas);
  border: 1px solid var(--hairline-soft);
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.post-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
}

.post-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--surface-soft);
  flex-shrink: 0;
}

.post-author {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.14px;
  line-height: 1.43;
}

.post-meta {
  font-size: 12px;
  color: var(--steel);
  letter-spacing: -0.14px;
  line-height: 1.33;
}

.post-body {
  padding: 0 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.post-body p {
  font-size: 16px;
  color: var(--charcoal);
  line-height: 1.5;
  letter-spacing: -0.16px;
}

.post-subtitle {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.44;
  color: var(--ink-deep);
}

.post-empty {
  font-size: 14px;
  color: var(--stone);
  text-align: center;
  padding: 8px 0;
}

.post-foot {
  padding: 0 20px 20px;
}

/* Divisor de secao dentro do feed */
.profile-section-label {
  padding: 8px 0 0;
}

.profile-section-title {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.44;
  color: var(--ink-deep);
}

/* Breakpoints ------------------------------------------------------------- */
@media (max-width: 1024px) {
  .profile-cover {
    height: 240px;
  }

  .profile-name {
    font-size: 28px;
  }

  .profile-head {
    padding: 0;
  }

  .profile-stats {
    padding: 16px 24px;
    gap: 32px;
  }
}

@media (max-width: 767px) {
  .profile-page {
    padding-bottom: 48px;
  }

  .profile-cover {
    height: 140px;
    border-radius: var(--radius-xl);
  }

  .profile-cover-img {
    height: 60%;
    max-width: 44%;
  }

  .profile-head {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 16px;
    margin-top: -48px;
  }

  .profile-avatar {
    width: 120px;
    height: 120px;
  }

  .profile-head-body {
    padding: 20px;
  }
  .profile-name {
    font-size: 24px;
  }

  .profile-headline {
    font-size: 14px;
  }

  .profile-stats {
    gap: 20px;
    margin-top: 16px;
    padding: 16px 20px;
  }

  .profile-stat-value {
    font-size: 20px;
  }

  .profile-feed {
    margin-top: 16px;
    gap: 16px;
  }

  .post-body {
    padding: 0 16px 16px;
  }

  .post-head {
    padding: 14px 16px;
  }

  .post-foot {
    padding: 0 16px 16px;
  }
}

@media (max-width: 479px) {
  .profile-name {
    font-size: 20px;
  }
}
