/* Profile Card - Stage 1b */

/* ---------- GLOBAL RESET ---------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, sans-serif;
  background: linear-gradient(135deg, #f5f7fa 0%, #e9eef5 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
    padding: 2rem 1rem;
  line-height: 1.5;
  color: #1e293b;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

/* ---------- BACK NAVIGATION ---------- */
.back-nav {
  margin-bottom: 2rem;
  animation: fadeInUp 0.4s ease;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #475569;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.875rem;
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(4px);
  border-radius: 100px;
  transition: all 0.25s ease;
  border: 1px solid rgba(203, 213, 225, 0.5);
}

.back-icon {
  width: 1.25rem;
  height: 1.25rem;
  transition: transform 0.2s ease;
}

.back-link:hover {
  background: white;
  color: #3b82f6;
  transform: translateX(-4px);
  border-color: #cbd5e1;
}

.back-link:hover .back-icon {
  transform: translateX(-2px);
}

.back-link:focus-visible {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
  border-radius: 100px;
}

/* Profile card */
.profile-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  animation: fadeInUp 0.5s ease;
}

.profile-card {
  max-width: 480px;
  width: 100%;
  background: #ffffff;
  border-radius: 32px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
  padding: 2rem 1.75rem;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.profile-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.2);
}

/* ---------- PROFILE IMAGE ---------- */
.profile-card__image-wrapper {
  display: flex;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.profile-card__image-container {
  position: relative;
  display: inline-block;
}

.profile-card__image {
  width: 128px;
  height: 128px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid white;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.profile-card__image:hover {
  transform: scale(1.02);
}

.profile-card__status-dot {
  position: absolute;
  bottom: 8px;
  right: 8px;
  width: 18px;
  height: 18px;
  background: #22c55e;
  border-radius: 50%;
  border: 2px solid white;
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.2);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4);
  }
  50% {
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.1);
  }
}

/* ---------- PROFILE INFO ---------- */
.profile-card__name {
  font-size: 1.75rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.25rem;
  letter-spacing: -0.02em;
}

.profile-card__title {
  font-size: 0.875rem;
  font-weight: 500;
  color: #3b82f6;
  margin-bottom: 0.75rem;
}

.profile-card__location {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  justify-content: center;
  font-size: 0.8125rem;
  color: #64748b;
  margin-bottom: 1rem;
  background: #f8fafc;
  padding: 0.25rem 0.75rem;
  border-radius: 100px;
}

.profile-card__bio {
  margin: 1rem 0 1.5rem;
  font-size: 0.875rem;
  color: #475569;
  line-height: 1.6;
  text-align: center;
}


/* ------ ACTION BUTTON ------ */
.profile-card__action {
  margin-bottom: 1.25rem;
}

.action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.875rem 1.5rem;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
  border: none;
  border-radius: 100px;
  font-weight: 600;
  font-size: 0.9375rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: inherit;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.action-button__icon {
  width: 1.125rem;
  height: 1.125rem;
  transition: transform 0.2s ease;
}

.action-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
}

.action-button:active {
  transform: translateY(0);
}

.action-button:focus-visible {
  outline: 3px solid #3b82f6;
  outline-offset: 3px;
}

/* Followed state (toggled via JS) */
.action-button--followed {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.action-button--followed:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
}

.action-button--followed .action-button__icon {
  transform: rotate(45deg);
}

/* ---------- META INFO ---------- */
.profile-card__meta {
  padding-top: 1rem;
  border-top: 1px solid #eef2f6;
}

.profile-card__member-since {
  font-size: 0.7rem;
  color: #94a3b8;
  font-weight: 500;
}

/* ---------- ACCESSIBILITY ---------- */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ---------- ANIMATIONS ---------- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------- RESPONSIVE DESIGN ---------- */
@media (max-width: 640px) {
  body {
    padding: 1rem;
  }
  
  .profile-card {
    padding: 1.5rem;
  }
  
  .profile-card__name {
    font-size: 1.5rem;
  }
  
  .profile-card__image {
    width: 104px;
    height: 104px;
  }
  
  .social-link {
    width: 40px;
    height: 40px;
  }
  
  .action-button {
    padding: 0.75rem 1.25rem;
    font-size: 0.875rem;
  }
}

@media (max-width: 480px) {
  .back-nav {
    margin-bottom: 1.5rem;
  }
  
  .profile-card {
    border-radius: 24px;
  }
  
  .profile-card__bio {
    font-size: 0.8125rem;
  }
  
  .social-link {
    width: 38px;
    height: 38px;
  }
  
  .social-link svg {
    width: 1rem;
    height: 1rem;
  }
}

/* Tablet optimization */
@media (min-width: 641px) and (max-width: 1024px) {
  .profile-card {
    max-width: 520px;
  }
}

/* Focus visible for all interactive elements */
button:focus-visible,
a:focus-visible {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}