*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

.ssr-body--profile {
  min-height: 100vh;
  font-family: "Manrope", system-ui, -apple-system, sans-serif;
  color: var(--ssr-text-primary);
  background: var(--ssr-page-bg);
}

.profile {
  min-height: 100vh;
  width: 100%;
  padding-bottom: 2rem;
}

.profile__header-wrap {
  position: relative;
  width: 100%;
  margin: 0 auto 1.25rem;
  /* Full-bleed ≤400px; then side inset grows to 48px (see --profile-header-padding clamp). */
  padding-inline: var(--profile-header-padding);
  padding-bottom: var(--profile-hero-overlap);
  overflow: visible;
}

.profile__header {
  position: relative;
  width: 100%;
  height: var(--profile-header-height);
  overflow: visible;
  border: 1px solid var(--ssr-shadow-header);
  border-top: none;
  border-radius: 0 0 0.9375rem 0.9375rem;
  background: linear-gradient(
    180deg,
    var(--ssr-orange-start) 0%,
    var(--ssr-orange-mid) 50%,
    var(--ssr-orange-end) 100%
  );
  box-shadow: 0 1px 1.5px var(--ssr-shadow-soft);
}

.profile__header-top {
  display: none;
}

.profile__logo {
  display: inline-flex;
  filter: drop-shadow(0 0.978px 1.467px var(--ssr-shadow-soft));
}

.profile__logo img {
  display: block;
  width: 6.625rem;
  height: auto;
}

.profile__hero {
  position: absolute;
  top: var(--profile-hero-avatar-top);
  left: var(--profile-hero-avatar-left);
  right: var(--profile-hero-avatar-left);
  height: calc(var(--profile-hero-status-top) + var(--profile-hero-status-height));
  z-index: 1;
}

.profile__avatar-wrap {
  position: absolute;
  top: 0;
  left: 0;
  width: var(--profile-hero-avatar-size);
  height: var(--profile-hero-avatar-size);
}

.profile__avatar {
  display: block;
  width: var(--profile-hero-avatar-size);
  height: var(--profile-hero-avatar-size);
  object-fit: cover;
  border: 2px solid var(--ssr-text-on-orange);
  border-radius: 0.625rem;
  box-shadow: 0 2px 4px var(--ssr-shadow-soft);
  background: var(--ssr-page-bg);
}

.profile__name {
  position: absolute;
  top: 0;
  left: calc(var(--profile-hero-avatar-size) + var(--profile-hero-name-gap));
  right: 0;
  margin: 0;
  font-size: 1.375rem;
  font-weight: 800;
  line-height: 1.3;
  color: var(--ssr-text-on-orange);
  text-shadow: 0 2px 4px var(--ssr-shadow-soft);
}

.profile__status {
  position: absolute;
  top: var(--profile-hero-status-top);
  left: calc(var(--profile-hero-avatar-size) + var(--profile-hero-status-gap));
  width: min(100%, var(--profile-hero-status-max-width));
  max-width: var(--profile-hero-status-max-width);
  height: var(--profile-hero-status-height);
}

.profile__status-shape {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  overflow: visible;
}

.profile__status-shape-fill {
  fill: var(--ssr-card-bg);
}

.profile__status-shape-stroke {
  fill: none;
  stroke: var(--ssr-text-on-orange);
  stroke-width: 1;
}

.profile__status-content {
  position: absolute;
  top: 20%;
  right: 2%;
  bottom: 8%;
  left: 2%;
  z-index: 1;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 0.45rem 1.5rem 0.35rem 0.5rem;
}

.profile__status-placeholder {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  width: 100%;
  user-select: none;
  pointer-events: none;
}

.profile__status-line {
  display: block;
  height: 0.65rem;
  border-radius: 0.2rem;
  background: linear-gradient(
    90deg,
    rgba(29, 62, 85, 0.55) 0%,
    rgba(29, 62, 85, 0.38) 100%
  );
  filter: blur(3px);
  opacity: 0.85;
}

.profile__status-line--medium {
  width: 82%;
}

.profile__status-lock {
  position: absolute;
  right: 0.35rem;
  bottom: 0.25rem;
  color: var(--ssr-text-tertiary);
}

.profile__content {
  display: none;
}

.profile__mobile-feed {
  display: flex;
  flex-direction: column;
  gap: var(--profile-content-gap);
  width: 100%;
  margin: 0;
  padding-inline: var(--profile-content-padding);
}

.profile-card {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  padding: 1rem;
  border: 1px solid var(--ssr-text-on-orange);
  border-radius: 0.625rem;
  background: var(--ssr-card-bg);
  box-shadow: 0 2px 4px var(--ssr-shadow-soft);
}

.profile-card--cta {
  gap: 1rem;
}

.profile-card__handle,
.profile-card__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--ssr-text-secondary);
}

.profile-card__bio,
.profile-card__text {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--ssr-text-primary);
}

.profile-card__cta-copy {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.profile-card__location {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--ssr-text-primary);
}

.profile-card__location-icon {
  flex-shrink: 0;
  color: var(--ssr-text-tertiary);
}

.profile-card__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  align-self: flex-start;
  padding: 0.75rem 1rem;
  border: 1px solid var(--ssr-shadow-header);
  border-radius: 0.625rem;
  background: var(--ssr-text-secondary);
  color: var(--ssr-text-on-orange);
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  box-shadow: 0 2px 2px var(--ssr-shadow-soft);
}

.profile-card__button:hover,
.profile-card__button:focus-visible {
  filter: brightness(1.05);
}

.profile-icon {
  display: block;
}

.profile__ad {
  display: none;
}

.profile__footer-links {
  display: none;
}

.profile--not-found {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 2rem 1rem;
}

.profile__not-found {
  max-width: 24rem;
  text-align: center;
}

.profile__not-found h1 {
  margin: 0 0 0.75rem;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--ssr-text-primary);
}

.profile__not-found p {
  margin: 0 0 1rem;
  font-size: 1rem;
  color: var(--ssr-text-tertiary);
}

.profile__not-found-link {
  color: var(--ssr-text-secondary);
  font-weight: 700;
  text-decoration: none;
}

.profile__not-found-link:hover,
.profile__not-found-link:focus-visible {
  text-decoration: underline;
}

@media (min-width: 48rem) {
  .profile {
    padding-bottom: 3rem;
  }

  .profile__header-wrap {
    margin-bottom: 1.5rem;
  }

  .profile__header-top {
    display: flex;
    justify-content: flex-start;
    width: 100%;
    min-height: 2.5rem;
    margin-left: 32px;
    padding-top: 20px;
  }

  .profile__logo img {
    width: 6.625rem;
  }

  .profile__content {
    display: grid;
    grid-template-columns: var(--profile-main-column-width) minmax(0, 1fr);
    gap: var(--profile-content-column-gap);
    width: 100%;
    margin: 1rem 0 0;
    padding-inline: var(--profile-content-margin);
  }

  .profile__main {
    width: var(--profile-main-column-width);
    min-width: 0;
  }

  .profile__mobile-feed {
    display: none;
  }

  .profile__sidebar {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-width: 0;
  }

  .profile__ad {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 17.5rem;
    padding: 1rem;
    border: 1px solid var(--ssr-text-on-orange);
    border-radius: 0.625rem;
    background: var(--ssr-card-bg);
    box-shadow: 0 2px 4px var(--ssr-shadow-soft);
  }

  .profile__ad-label {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 21rem;
    height: 17.5rem;
    border-radius: 0.25rem;
    background: var(--ssr-text-primary);
    color: var(--ssr-text-on-orange);
    font-size: 0.5rem;
    font-weight: 600;
    text-align: center;
  }

  .profile__footer-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    padding: 0.25rem 0;
    font-size: 0.625rem;
    font-weight: 600;
    color: var(--ssr-text-tertiary);
  }

  .profile__footer-links a {
    color: inherit;
    text-decoration: none;
  }

  .profile__footer-links a:hover,
  .profile__footer-links a:focus-visible {
    text-decoration: underline;
  }
}
