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

body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-weight: 400;
  background-color: #f5f5f5;
  overflow-x: hidden;
}

.profile-container {
  min-height: 100vh;
  width: 100%;
  margin: 0;
  background: white;
  position: relative;
}

/* Header Section */
.header-section {
  background: linear-gradient(to bottom right, #eff6ff, #faf5ff, #fdf2f8);
  height: 30vh;
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 20px;
  border-radius: 0 0 0 60px;
}

.back-button {
  display: flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  color: #9333ea;
  font-size: 18px;
  font-weight: 500;
  cursor: pointer;
  padding: 8px 0;
  align-self: flex-start;
  margin-bottom: 20px;
  transition: opacity 0.3s ease;
}

.back-button:hover {
  opacity: 0.8;
}

.back-button svg {
  width: 20px;
  height: 20px;
}

.profile-image-container {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.profile-image {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.curve-indicator {
  position: absolute;
  bottom: -12px;
  left: 50%;
  transform: translateX(-50%);
  color: #fdf2f8;
  z-index: 2;
}

/* Content Section */
.content-section {
  background: white;
  border-radius: 60px 0 0 0;
  padding: 40px 30px 30px;
  margin-top: -60px;
  position: relative;
  z-index: 1;
}

.profile-name {
  font-size: 36px;
  font-weight: 700;
  color: #9333ea;
  text-align: left;
  margin-bottom: 12px;
  line-height: 1.2;
}

.profile-title {
  font-size: 18px;
  font-weight: 500;
  color: #7e22ce;
  margin-bottom: 8px;
  opacity: 0.9;
}

.profile-location {
  font-size: 16px;
  color: #666;
  margin-bottom: 24px;
  font-weight: 400;
}

.profile-description {
  font-size: 16px;
  line-height: 1.6;
  color: #000000;
  margin-bottom: 30px;
  text-align: left;
  /* Add top padding to prevent overlap with profile image on mobile */
  padding-top: 20px;
  clear: both;
}

/* Profile Details Section */
.profile-details {
  margin-bottom: 40px;
}

.detail-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #f0f0f0;
}

.detail-item:last-child {
  border-bottom: none;
}

.detail-label {
  font-size: 15px;
  font-weight: 500;
  color: #7e22ce;
  flex: 0 0 40%;
}

.detail-value {
  font-size: 15px;
  color: #000000;
  text-align: right;
  flex: 1;
  word-wrap: break-word;
}

/* Statistics Section */
.stats-section {
  display: flex;
  justify-content: space-between;
  margin-bottom: 40px;
  padding: 0 10px;
}

.stat-item {
  text-align: center;
  flex: 1;
}

.stat-number {
  font-size: 48px;
  font-weight: 700;
  color: #9333ea;
  line-height: 1;
  margin-bottom: 8px;
}

.stat-label {
  font-size: 14px;
  color: #7e22ce;
  font-weight: 500;
  line-height: 1.2;
}

/* Contact Icons */
.contact-icons {
  display: flex;
  justify-content: center;
  gap: 40px;
  padding: 0 20px;
}

.contact-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: none;
  border: 2px solid #9333ea;
  color: #9333ea;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
}

.contact-icon:hover {
  background: #7e22ce;
  color: white;
  transform: scale(1.05);
}

.contact-icon svg {
  width: 24px;
  height: 24px;
}

.edit-icon {
  color: #9333ea;
}

.edit-icon:hover {
  background: #7e22ce;
  color: white;
}

/* Text content wrapper to avoid image overlap */
.profile-text-wrapper {
  padding-right: 160px;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
  /* On tablets and below, reduce padding for image overlap */
  .profile-text-wrapper {
    padding-right: 150px;
  }
}

/* Medium phones */
@media screen and (max-width: 600px) {
  .profile-image {
    width: 100px !important;
    height: 100px !important;
  }

  .profile-text-wrapper {
    padding-right: 115px;
  }

  .profile-name {
    font-size: 28px;
  }

  .profile-description {
    margin-top: 110px;
  }
}

/* Small phones */
@media screen and (max-width: 480px) {
  .profile-container {
    width: 100%;
  }

  .header-section {
    height: 25vh;
    padding: 15px;
    border-radius: 0;
  }

  /* Smaller profile image on mobile */
  .profile-image {
    width: 80px !important;
    height: 80px !important;
  }

  .content-section {
    border-radius: 40px 40px 0 0;
    padding: 30px 20px 20px;
  }

  /* Reduce right padding since image is smaller */
  .profile-text-wrapper {
    padding-right: 95px;
  }

  /* Add extra top margin to bio to avoid image overlap on mobile */
  .profile-description {
    margin-top: 100px;
    padding-top: 0;
  }

  /* Smaller text on mobile to prevent wrapping */
  .profile-name {
    font-size: 26px;
    line-height: 1.1;
  }
  
  .detail-label,
  .detail-value {
    font-size: 14px;
  }
  
  .detail-label {
    flex: 0 0 45%;
  }
  
  .stat-number {
    font-size: 40px;
  }
  
  .contact-icons {
    gap: 30px;
  }
  
  .contact-icon {
    width: 48px;
    height: 48px;
  }
}

@media screen and (max-width: 360px) {
  /* Even smaller image on very small screens */
  .profile-image {
    width: 70px !important;
    height: 70px !important;
  }

  /* Reduce padding even more on very small screens */
  .profile-text-wrapper {
    padding-right: 80px;
  }

  /* Adjust bio margin for smaller image on very small screens */
  .profile-description {
    margin-top: 90px;
  }

  .profile-name {
    font-size: 22px;
    line-height: 1.1;
  }

  .profile-title {
    font-size: 13px;
  }

  .profile-location {
    font-size: 12px;
  }
  
  .detail-label,
  .detail-value {
    font-size: 13px;
  }
  
  .detail-item {
    padding: 10px 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
  
  .detail-label {
    flex: none;
  }
  
  .detail-value {
    text-align: left;
    flex: none;
    width: 100%;
  }
  
  .stat-number {
    font-size: 36px;
  }
  
  .content-section {
    padding: 25px 15px 15px;
  }
  
  .contact-icons {
    gap: 25px;
  }
  
  .contact-icon {
    width: 44px;
    height: 44px;
  }
  
  .contact-icon svg {
    width: 20px;
    height: 20px;
  }
}