/* About Section Styles */
#about {
  background-color: var(--color-primary-dark);
}

.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
  
  /* Fallback for problematic browsers */
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: horizontal;
  -webkit-box-direction: normal;
  -ms-flex-direction: row;
  flex-direction: row;
  -webkit-box-align: start;
  -ms-flex-align: start;
  align-items: flex-start;
  
  /* Re-enable grid for modern browsers */
  display: grid;
}

/* Flexbox fallback for Samsung Android Chrome and other problematic browsers */
@supports not (display: grid) {
  .about-content {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: horizontal;
    -webkit-box-direction: normal;
    -ms-flex-direction: row;
    flex-direction: row;
    gap: 4rem;
  }
  
  .text-content {
    -webkit-box-flex: 1;
    -ms-flex: 1;
    flex: 1;
  }
  
  .image-wrapper {
    -webkit-box-flex: 1;
    -ms-flex: 1;
    flex: 1;
  }
}

.text-content {
  max-width: none;
}

.text-content h3 {
  color: var(--color-accent);
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.experience-list {
  list-style: none;
  padding-left: 0;
  margin: 1.5rem 0;
}

.experience-list li {
  padding: 0.5rem 0;
  padding-left: 1.5rem;
  position: relative;
  color: var(--color-neutral-200);
}

.experience-list li::before {
  content: '•';
  color: var(--color-accent);
  font-weight: bold;
  position: absolute;
  left: 0;
  font-size: 1.2rem;
}

/* Image Wrapper - Professional Display */
.image-wrapper {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  /* Removed sticky positioning for compatibility */
  position: relative;
  top: 0;
}

/* Progressive enhancement for sticky positioning */
@supports (position: sticky) {
  .image-wrapper {
    position: sticky;
    top: 2rem;
  }
}

/* Professional Image Container */
.image-wrapper img {
  width: 100%;
  max-width: 400px;
  height: 500px; /* Fixed height for consistency */
  
  /* Object-fit with fallback */
  -o-object-fit: cover;
  object-fit: cover;
  -o-object-position: center top;
  object-position: center top;
  
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  transition: transform var(--transition-medium), box-shadow var(--transition-medium);
  
  /* Ensure image is visible by default */
  opacity: 1;
  transform: translateX(0);
}

/* Object-fit fallback for older browsers */
@supports not (object-fit: cover) {
  .image-wrapper img {
    width: 100%;
    height: auto;
    min-height: 400px;
  }
}

.image-wrapper img:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

/* Tablet Layout */
@media (max-width: 1024px) {
  .about-content {
    gap: 3rem;
  }
  
  /* Flexbox fallback for tablets */
  @supports not (display: grid) {
    .about-content {
      gap: 3rem;
    }
  }
  
  .image-wrapper img {
    max-width: 350px;
    height: 400px;
  }
}

/* Mobile Layout - Stack Vertically */
@media (max-width: 768px) {
  .about-content {
    grid-template-columns: 1fr;
    gap: 2rem;
    /* Ensure flexbox fallback works on mobile */
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
  }
  
  .image-wrapper {
    order: -1; /* Move image above text on mobile */
    position: static;
    margin-bottom: 1rem;
  }
  
  .image-wrapper img {
    max-width: 300px;
    height: 350px;
    margin: 0 auto;
  }
}

/* Small Mobile */
@media (max-width: 480px) {
  .about-content {
    gap: 1.5rem;
  }
  
  .image-wrapper img {
    max-width: 250px;
    height: 300px;
  }

  .text-content h3 {
    margin-top: 1.5rem;
  }
}

/* Alternative: Square/Portrait Aspect Ratio Option */
.image-wrapper.square img {
  height: 400px;
  -o-object-position: center center;
  object-position: center center;
}

/* Alternative: Circular Profile Photo Option */
.image-wrapper.circular img {
  border-radius: 50%;
  width: 350px;
  height: 350px;
  -o-object-position: center top;
  object-position: center top;
}

@media (max-width: 768px) {
  .image-wrapper.circular img {
    width: 250px;
    height: 250px;
  }
}

/* Professional Frame Effect */
.image-wrapper.framed img {
  border: 4px solid var(--color-accent);
  padding: 8px;
  background-color: white;
}

/* Subtle Animation on Scroll - Only for browsers that support it properly */
@media (prefers-reduced-motion: no-preference) {
  /* Only apply animation to browsers that support both grid and sticky positioning */
  @supports (display: grid) and (position: sticky) {
    .image-wrapper img {
      opacity: 0;
      transform: translateX(30px);
      animation: slideInRight 0.8s ease-out 0.3s forwards;
    }
  }
  
  @keyframes slideInRight {
    to {
      opacity: 1;
      transform: translateX(0);
    }
  }
}