/* Circlo Iteration 3 - member profile system.
   ASCII-only source to protect against encoding regressions. */

#profileView .profile-hero {
  overflow: hidden;
}

#profileView .profile-cover {
  position: relative;
  min-height: 220px;
  max-height: 340px;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 20%, rgba(37,99,235,.26), transparent 34%),
    linear-gradient(135deg, rgba(37,99,235,.18), rgba(59,130,246,.05));
}

#profileView .profile-cover img {
  width: 100%;
  height: 100%;
  min-height: 220px;
  max-height: 340px;
  object-fit: cover;
  display: block;
}

#profileView .profile-main {
  gap: 16px;
  min-width: 0;
}

#profileView .profile-main .avatar.xl {
  width: 132px !important;
  height: 132px !important;
  min-width: 132px !important;
  min-height: 132px !important;
  max-width: 132px !important;
  max-height: 132px !important;
  flex: 0 0 132px !important;
  object-fit: cover;
  border: 5px solid var(--surface, #fff);
  box-sizing: border-box;
  box-shadow: 0 8px 26px rgba(15,23,42,.16);
}

#profileView .profile-name {
  min-width: 0;
  flex: 1;
}

#profileView .profile-name h2 {
  margin-bottom: 4px;
  overflow-wrap: anywhere;
}

#profileView .profile-name p {
  margin: 0;
  color: var(--muted, #64748b);
  overflow-wrap: anywhere;
}

#profileView .profile-bio {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.55;
}

.i3-profile-completion {
  margin: 0 1rem 1rem;
  padding: 12px 14px;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 12px;
  background: var(--surface-2, #f8fafc);
}

.i3-profile-completion-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  font-size: .86rem;
  margin-bottom: 8px;
}

.i3-profile-completion-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-3, #e2e8f0);
}

.i3-profile-completion-fill {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: var(--brand, #2563eb);
  transition: width .2s ease;
}

.i3-about-card,
.i3-photos-card {
  max-width: 760px;
  margin: 1rem auto;
  padding: 20px;
}

.i3-about-card.hidden,
.i3-photos-card.hidden {
  display: none !important;
}

.i3-about-card h3,
.i3-photos-card h3 {
  margin: 0 0 16px;
}

.i3-about-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.i3-about-item {
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 12px;
  background: var(--surface-2, #f8fafc);
}

.i3-about-item.i3-wide {
  grid-column: 1 / -1;
}

.i3-about-label {
  display: block;
  margin-bottom: 4px;
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted, #64748b);
}

.i3-about-value {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
  line-height: 1.4;
}

.i3-about-value a {
  color: var(--brand, #2563eb);
  word-break: break-all;
}

.i3-empty-detail {
  color: var(--muted, #64748b);
  font-style: italic;
}

.i3-interest-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.i3-interest {
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--brand-soft, #dbeafe);
  color: var(--brand, #1d4ed8);
  font-size: .84rem;
  font-weight: 650;
}

.i3-photo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.i3-photo-grid a {
  display: block;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 10px;
  background: var(--surface-3, #e2e8f0);
}

.i3-photo-grid img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

#profileView .profile-tabs {
  overflow-x: auto;
}

#profileView .profile-tabs button {
  white-space: nowrap;
}

#profileView .profile-tabs button[aria-selected="true"] {
  color: var(--brand, #2563eb);
  border-bottom-color: var(--brand, #2563eb);
}

.i3-editor-section {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border, #e2e8f0);
}

.i3-editor-section h4 {
  margin: 0 0 12px;
  font-size: 1rem;
}

.i3-editor-note {
  margin: -4px 0 12px;
  color: var(--muted, #64748b);
  font-size: .83rem;
  line-height: 1.4;
}

.i3-editor-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.i3-editor-counter {
  display: block;
  text-align: right;
  margin-top: 4px;
  color: var(--muted, #64748b);
  font-size: .75rem;
}

.i3-profile-url {
  margin-top: 6px;
  font-size: .82rem;
  color: var(--muted, #64748b);
}

.i3-route-loading {
  max-width: 760px;
  margin: 2rem auto;
  padding: 28px;
  text-align: center;
}

.i3-route-loading p {
  color: var(--muted, #64748b);
}

@media (max-width: 720px) {
  #profileView .profile-cover,
  #profileView .profile-cover img {
    min-height: 170px;
  }

  #profileView .profile-main .avatar.xl {
    width: 104px !important;
    height: 104px !important;
    min-width: 104px !important;
    min-height: 104px !important;
    max-width: 104px !important;
    max-height: 104px !important;
    flex-basis: 104px !important;
  }

  .i3-about-grid,
  .i3-editor-grid {
    grid-template-columns: 1fr;
  }

  .i3-about-item.i3-wide {
    grid-column: auto;
  }

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