/* Public contributor profiles (VICE-inspired minimal) */
body.sca-profile-page {
  background:
    radial-gradient(ellipse 70% 40% at 50% 0%, rgba(255, 59, 48, 0.06), transparent),
    var(--bg);
}

.sca-profile-shell {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 5rem;
}

.sca-profile-hero {
  text-align: center;
  max-width: 560px;
  margin: 0 auto 3rem;
  padding: 2rem 1rem 0;
}

.sca-profile-hero .sca-avatar-xl {
  margin: 0 auto 1.25rem;
}

.sca-profile-name {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 0.75rem;
}

.sca-profile-bio {
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--text-dim);
  max-width: 42rem;
  margin: 0 auto;
}

.sca-profile-section-title {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.sca-profile-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem 1.5rem;
}

.sca-profile-post {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  group: profile-post;
}

.sca-profile-post-thumb {
  aspect-ratio: 16 / 10;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 0.85rem;
}

.sca-profile-post-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.sca-profile-post-thumb-empty {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--bg-elevated), var(--bg-card));
}

.sca-profile-post-type {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--read);
  text-decoration: underline;
  text-underline-offset: 3px;
  margin-bottom: 0.45rem;
}

.sca-profile-post-type.type-watch { color: var(--watch); }
.sca-profile-post-type.type-photo { color: var(--photo); }

.sca-profile-post h3 {
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 0.5rem;
  transition: color 0.15s;
}

.sca-profile-post:hover h3 {
  color: var(--read);
}

.sca-profile-post-excerpt {
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--text-dim);
  margin-bottom: 0.65rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sca-profile-post-date {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-top: auto;
}

/* Avatars (shared by account + public profile pages) */
.sca-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  font-weight: 800;
  color: var(--text-dim);
}

.sca-avatar-sm { width: 36px; height: 36px; font-size: 0.7rem; }
.sca-avatar-md { width: 48px; height: 48px; font-size: 0.85rem; }
.sca-avatar-lg { width: 96px; height: 96px; font-size: 1.5rem; }
.sca-avatar-xl { width: 120px; height: 120px; font-size: 1.75rem; }

img.sca-avatar {
  display: block;
  padding: 0;
}

/* Account profile editor */
.sca-profile-edit {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.5rem 1.75rem;
  margin-bottom: 2rem;
}

.sca-profile-edit-head {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.sca-avatar-upload-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.65rem;
}

.sca-avatar-upload {
  position: relative;
  display: block;
  width: 96px;
  height: 96px;
  cursor: pointer;
  border-radius: 50%;
  flex-shrink: 0;
}

.sca-avatar-upload:focus-visible {
  outline: 2px solid var(--read);
  outline-offset: 3px;
}

.sca-avatar-upload-preview {
  display: block;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  overflow: hidden;
}

.sca-avatar-upload-preview .sca-avatar {
  width: 100%;
  height: 100%;
  font-size: 1.5rem;
}

.sca-avatar-upload-overlay {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  text-align: center;
  line-height: 1.3;
  padding: 0.35rem;
  opacity: 0;
  transition: opacity 0.15s;
  pointer-events: none;
}

.sca-avatar-upload:hover .sca-avatar-upload-overlay,
.sca-avatar-upload:focus-visible .sca-avatar-upload-overlay {
  opacity: 1;
}

.sca-avatar-upload-btn {
  font-size: 0.8rem;
  padding: 0.45rem 0.85rem;
}

.sca-avatar-upload-hint {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin: 0;
  max-width: 12rem;
  line-height: 1.45;
}

@media (max-width: 900px) {
  .sca-profile-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .sca-profile-grid {
    grid-template-columns: 1fr;
  }
}
