/**
 * profile.css — FacultyPage Theme
 * Extra styles specific to user and organisation profile pages.
 * Loaded via the 'profile' library only on profile content types.
 */

/* ── PROFILE GRID COLUMN WRAPPERS ── */
.fp-col-left {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  min-width: 0;
}

.fp-col-right {
  display: grid;
  row-gap: 20px;
  flex-direction: column;
  min-width: 0;
}

/* When profile hero spans full width, subsequent columns go below it */
.fp-profile-hero {
  animation: fp-fade-up 0.45s ease both;
}

/* ═══════════════════════════════════════════════════════════
   PROFILE HERO (full-width card on profile pages)
   ═══════════════════════════════════════════════════════════ */
.fp-profile-hero {
  grid-column: 1 / -1;
  background: var(--fp-white);
  border: 1.5px solid var(--fp-border);
  border-radius: var(--fp-radius-lg);
  overflow: hidden;
  animation: fp-fade-up 0.5s ease both;
}

.fp-cover-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.1;
  background-image: radial-gradient(circle at 2px 2px, rgba(255,255,255,0.6) 1px, transparent 0);
  background-size: 24px 24px;
}

/* ── PROFILE HERO COVER ── */
.fp-cover-banner {
  background: linear-gradient(135deg, var(--fp-terra) 0%, var(--fp-terra-dark) 60%, #5a1a0a 100%);
  position: relative;
  overflow: hidden;
  min-height: 62px;
}

/* Subtle shimmer on cover hover */
.fp-cover-banner::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(255,255,255,0) 0%,
    rgba(255,255,255,0.04) 50%,
    rgba(255,255,255,0) 100%
  );
  pointer-events: none;
}

/* ── MISSION STATEMENT ── */
.fp-profile-mission {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 0.9rem;
  color: var(--fp-terra);
  line-height: 1.55;
  margin-top: 0.5rem;
  max-width: 520px;
}

/* ── INFO GRID FULL-SPAN ITEM ── */
.fp-info-item--full {
  grid-column: 1 / -1;
}

/* Mission in info grid */
.fp-info-value--mission {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 1rem;
  color: var(--fp-terra);
  line-height: 1.5;
}

/* ── FOLLOW / CONNECT BUTTON VARIANTS ── */
.fp-btn--follow {
  background: var(--fp-terra-pale);
  color: var(--fp-terra-dark);
  border: 1.5px solid rgba(196, 99, 58, 0.25);
  padding: 0.4rem 1.1rem;
  border-radius: var(--fp-radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--fp-transition);
}
.fp-btn--follow:hover,
.fp-btn--follow.is-following {
  background: var(--fp-terra);
  color: white;
  border-color: var(--fp-terra);
}

/* ── CARD ANIMATIONS ── */
.fp-col-left .fp-card {
  animation: fp-fade-up 0.5s ease both;
}
.fp-col-left .fp-card:nth-child(1) { animation-delay: 0.05s; }
.fp-col-left .fp-card:nth-child(2) { animation-delay: 0.10s; }
.fp-col-left .fp-card:nth-child(3) { animation-delay: 0.15s; }
.fp-col-left .fp-card:nth-child(4) { animation-delay: 0.20s; }

.fp-col-right > * {
  animation: fp-fade-up 0.5s ease both;
}
.fp-col-right > *:nth-child(1) { animation-delay: 0.08s; }
.fp-col-right > *:nth-child(2) { animation-delay: 0.14s; }


/* ── PROFILE HERO CARD ── */
.profile-hero {
  grid-column: 1 / -1;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  animation: fadeUp 0.5s ease both;
}
.cover-banner {
  height: 140px;
  background: linear-gradient(135deg, var(--terra) 0%, var(--terra-dark) 60%, #5a1a0a 100%);
  position: relative;
  overflow: hidden;
}
.cover-pattern {
  position: absolute; inset: 0;
  background-image:
    repeating-linear-gradient(45deg, rgba(255,255,255,0.04) 0, rgba(255,255,255,0.04) 1px, transparent 1px, transparent 18px),
    repeating-linear-gradient(-45deg, rgba(255,255,255,0.04) 0, rgba(255,255,255,0.04) 1px, transparent 1px, transparent 18px);
}
.cover-edit-btn {
  position: absolute;
  top: 1rem; right: 1rem;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  color: white;
  font-size: 0.72rem;
  padding: 0.35rem 0.85rem;
  border-radius: 100px;
  cursor: pointer;
  font-family: 'Instrument Sans', sans-serif;
  backdrop-filter: blur(4px);
  transition: background 0.2s;
}
.cover-edit-btn:hover { background: rgba(255,255,255,0.25); }

.profile-hero-body {
  padding: 0 2rem 1.75rem;
  display: flex;
  gap: 1.5rem;
  align-items: flex-end;
  flex-wrap: wrap;
}
.avatar-wrap {
  margin-top: -44px;
  flex-shrink: 0;
}
.big-avatar {
  width: 96px; height: 96px;
  border-radius: 50%;
  border: 4px solid var(--fp-white);
  background: var(--fp-paper);
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}
.big-avatar img {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.big-avatar-initials {
  font-family: 'Fraunces', serif;
  font-size: 2rem;
  font-weight: 700;
  color: white;
  background: linear-gradient(135deg, var(--fp-terra), var(--fp-terra-dark));
  width: 100%; height: 100%;
  display: flex; align-items: normal; justify-content: center;
  border-radius: 50%;
}

.profile-identity {
  flex: 1;
  padding-top: 1.2rem;
  min-width: 0;
}
.profile-name {
  font-family: 'Fraunces', serif;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--fp-charcoal);
  line-height: 1.1;
}
.profile-org {
  display: flex; align-items: center; gap: 0.5rem;
  margin-top: 0.35rem;
}
.org-badge {
  display: inline-flex; align-items: center; gap: 0.3rem;
  background: var(--fp-terra-pale);
  color: var(--fp-terra-dark);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.65rem;
  border-radius: 100px;
}
.org-tagline {
  font-size: 0.85rem;
  color: var(--mid);
  font-style: italic;
}
.profile-location {
  display: flex; align-items: center; gap: 0.4rem;
  margin-top: 0.4rem;
  font-size: 0.85rem;
  color: var(--light);
}
.profile-mission {
  margin-top: 0.5rem;
  font-family: 'Fraunces', serif;
  font-size: 1rem;
  font-style: italic;
  color: var(--terra);
  font-weight: 300;
}

.profile-hero-stats {
  display: flex;
  gap: 0;
  margin-left: auto;
  border: 1.5px solid var(--fp-border);
  border-radius: 8px;
  overflow: hidden;
  align-self: flex-end;
  margin-bottom: 0.2rem;
}
.phs {
  padding: 0.7rem 1.2rem;
  border-right: 1px solid var(--fp-border);
  text-align: center;
}
.phs:last-child { border-right: none; }
.phs-n {
  font-family: 'Fraunces', serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--charcoal);
  line-height: 1;
  letter-spacing: -0.02em;
}
.phs-l { font-size: 0.65rem; color: var(--fp-light); margin-top: 0.15rem; }

.profile-actions {
  grid-column: 1 / -1;
  display: flex; gap: 0.75rem;
  padding: 1rem 2rem;
  border-top: 1px solid var(--fp-border);
  background: var(--fp-off-white);
}
/* ── RESPONSIVE OVERRIDES ── */
@media (max-width: 768px) {
  .fp-col-left,
  .fp-col-right {
    gap: 1rem;
  }

  .fp-profile-hero-body {
    padding: 0 1rem 1.25rem;
  }

  .fp-profile-actions {
    padding: 0.85rem 1rem;
  }
}
