/* =============================================
   USER PROFILE PAGE STYLES
   ICAC Institutional Design
   ============================================= */

/* ======= HERO ======= */
.user-profile-hero {
  position: relative;
  height: 220px;
  background: #0f172a;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.user-profile-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
  opacity: 1;
}

.user-profile-hero__overlay::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(185, 28, 28, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

.user-profile-hero__content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 0 2rem 0;
}

/* ======= BREADCRUMB ======= */
.user-profile-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.user-profile-breadcrumb a {
  color: rgba(250, 250, 250, 0.7);
  font-size: 14px;
  text-decoration: none;
  transition: color 0.2s;
}

.user-profile-breadcrumb a:hover {
  color: #fafafa;
}

.user-profile-breadcrumb svg {
  color: rgba(250, 250, 250, 0.4);
  flex-shrink: 0;
}

.user-profile-breadcrumb span {
  color: rgba(250, 250, 250, 0.5);
  font-size: 14px;
}

.user-profile-hero__title {
  font-family: 'Inter', sans-serif;
  font-size: 36px;
  font-weight: 700;
  color: #fafafa;
  margin: 0;
  line-height: 40px;
  letter-spacing: -0.02em;
}

/* ======= MAIN LAYOUT ======= */
.user-profile-main {
  background: #f8fafc;
  padding: 48px 0 80px;
  flex: 1;
}

.user-profile-container {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  gap: 48px;
  align-items: flex-start;
}

/* ======= SIDEBAR ======= */
.user-profile-sidebar {
  width: 280px;
  flex-shrink: 0;
  position: sticky;
  top: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* ======= PROFILE CARD ======= */
.user-profile-card {
  background: white;
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  padding: 32px 24px;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.user-profile-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: #f1f5f9;
  border: 3px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  color: #94a3b8;
}

.user-profile-card__name {
  font-family: 'Inter', sans-serif;
  font-size: 18px;
  font-weight: 600;
  color: #0a0a0a;
  margin: 0 0 4px;
}

.user-profile-card__role {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: #525252;
  margin: 0;
}

.user-profile-card__divider {
  height: 1px;
  background: #e5e5e5;
  margin: 20px 0;
}

.user-profile-card__meta {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.user-profile-card__meta-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.user-profile-card__meta-label {
  font-size: 13px;
  color: #737373;
  font-weight: 500;
}

.user-profile-card__meta-value {
  font-size: 13px;
  color: #0a0a0a;
  font-weight: 600;
}

.user-profile-card__meta-value--active {
  color: #16a34a;
  background: #f0fdf4;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 12px;
}

/* ======= SIDEBAR NAVIGATION ======= */
.user-profile-nav {
  background: white;
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.user-profile-nav__link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: #525252;
  text-decoration: none;
  transition: all 0.15s ease;
  border-bottom: 1px solid #f5f5f5;
}

.user-profile-nav__link:last-child {
  border-bottom: none;
}

.user-profile-nav__link:hover {
  background: #f8fafc;
  color: #0a0a0a;
}

.user-profile-nav__link--active {
  color: #b91c1c;
  background: #fef2f2;
  border-left: 3px solid #b91c1c;
  font-weight: 600;
}

.user-profile-nav__link--active:hover {
  background: #fef2f2;
  color: #b91c1c;
}

.user-profile-nav__link--logout {
  color: #dc2626;
}

.user-profile-nav__link--logout:hover {
  background: #fef2f2;
  color: #b91c1c;
}

.user-profile-nav__link svg {
  flex-shrink: 0;
  opacity: 0.7;
}

.user-profile-nav__link--active svg {
  opacity: 1;
  color: #b91c1c;
}

/* ======= CONTENT AREA ======= */
.user-profile-content {
  flex: 1;
  min-width: 0;
}

.user-profile-content__header {
  margin-bottom: 24px;
}

.user-profile-content__title {
  font-family: 'Inter', sans-serif;
  font-size: 24px;
  font-weight: 600;
  color: #0a0a0a;
  margin: 0 0 4px;
}

.user-profile-content__subtitle {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: #737373;
  margin: 0;
}

.user-profile-content__body {
  background: white;
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  padding: 32px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

/* Style Drupal's default profile output */
.user-profile-content__body .field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 0;
  border-bottom: 1px solid #f5f5f5;
}

.user-profile-content__body .field:last-child {
  border-bottom: none;
}

.user-profile-content__body .field__label {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: #737373;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.user-profile-content__body .field__item {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  color: #0a0a0a;
}

/* Hide Drupal tabs — we have our own nav */
.page-user-profile .tabs,
.page-user-profile .primary-tabs,
.page-user-profile nav.tabs,
.page-user-profile .tabs--primary,
.page-user-profile ul.primary,
.page-user-profile .breadcrumb-wrapper {
  display: none !important;
}

/* ======= QUICK ACCESS CARDS ======= */
.user-profile-quick-access {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.user-profile-quick-card {
  background: white;
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  padding: 24px;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.user-profile-quick-card:hover {
  border-color: #b91c1c;
  box-shadow: 0 4px 12px rgba(185, 28, 28, 0.08);
  transform: translateY(-2px);
}

.user-profile-quick-card__icon {
  width: 44px;
  height: 44px;
  background: #f1f5f9;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #475569;
  margin-bottom: 4px;
}

.user-profile-quick-card:hover .user-profile-quick-card__icon {
  background: #fef2f2;
  color: #b91c1c;
}

.user-profile-quick-card__title {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: #0a0a0a;
}

.user-profile-quick-card__desc {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: #737373;
}

/* ======= PAGE BACKGROUND ======= */
.page-user-profile {
  background: #f8fafc;
}

/* ======= RESPONSIVE ======= */
@media (max-width: 768px) {
  .user-profile-container {
    flex-direction: column;
    padding: 0 16px;
  }
  
  .user-profile-sidebar {
    width: 100%;
    position: static;
  }
  
  .user-profile-quick-access {
    grid-template-columns: 1fr;
  }
  
  .user-profile-hero__content {
    padding: 0 16px 2rem;
  }
}
