/* Scoped styles for about-page main */
.about-page {
  background: linear-gradient(120deg, #0077b6, #ff6f91, #6a5acd);
  background-size: 400% 400%;
  animation: gradientBG 12s ease infinite;
  padding: 60px 20px;
  color: #e0e0e0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  overflow-x: hidden;
  min-height: 100vh;
}

/* Container styling */
.about-page .container {
  max-width: 900px;
  margin: 0 auto;
  background-color: #1e1e2f;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(255 255 255 / 0.05);
}

/* Header */
.about-header {
  text-align: center;
  margin-bottom: 40px;
}

.about-header .animate-title {
  font-size: 36px;
  font-weight: 700;
  color: #66d9ef;
  animation: fadeInUp 1s ease forwards;
  opacity: 0;
  animation-delay: 0.2s;
}

.about-header .animate-text {
  font-size: 20px;
  color: #ccc;
  max-width: 600px;
  margin: 15px auto 0;
  line-height: 1.5;
  animation: fadeInUp 1s ease forwards;
  opacity: 0;
  animation-delay: 0.4s;
}

/* About Content Layout */
.about-content {
  display: flex;
  gap: 40px;
  align-items: flex-start;
  flex-wrap: wrap;
  justify-content: center;
}

/* Image styling with glowing pulse */
.about-image {
  flex: 1 1 250px;
  max-width: 300px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 0 15px rgba(102, 217, 239, 0.4);
  animation: pulseGlow 3s ease-in-out infinite alternate;
  animation-fill-mode: forwards;
}

.about-image img {
  width: 100%;
  display: block;
  border-radius: 12px;
  transition: transform 0.3s ease;
  cursor: default;
}

.about-image img:hover {
  transform: scale(1.05);
  box-shadow: 0 0 20px 5px rgba(102, 217, 239, 0.6);
}

/* Details */
.about-details {
  flex: 2 1 450px;
  color: #ccc;
  font-size: 18px;
  line-height: 1.6;
}

.about-details h3 {
  font-size: 26px;
  font-weight: 600;
  color: #66d9ef;
  margin-top: 30px;
  margin-bottom: 12px;
  animation: fadeInUp 1s ease forwards;
  opacity: 0;
}

.about-details p {
  margin-bottom: 20px;
  color: #bbb;
  animation: fadeInUp 1s ease forwards;
  opacity: 0;
}

/* Animate blocks with delay for cascading effect */
.about-details h3:nth-of-type(1) { animation-delay: 0.6s; }
.about-details p:nth-of-type(1) { animation-delay: 0.8s; }
.about-details h3:nth-of-type(2) { animation-delay: 1s; }
.about-details p:nth-of-type(2) { animation-delay: 1.2s; }
.about-details h3:nth-of-type(3) { animation-delay: 1.4s; }
.about-details p:nth-of-type(3) { animation-delay: 1.6s; }
.about-details h3:nth-of-type(4) { animation-delay: 1.8s; }
.about-details p:nth-of-type(4) { animation-delay: 2s; }
.about-details h3:nth-of-type(5) { animation-delay: 2.2s; }
.about-details p:nth-of-type(5) { animation-delay: 2.4s; }

/* Nested section (Mental Health Journey) */
.about-details section {
  background: rgba(102, 217, 239, 0.1);
  padding: 15px 20px;
  border-left: 4px solid #66d9ef;
  border-radius: 6px;
  margin-bottom: 20px;
  animation: fadeInUp 1s ease forwards;
  opacity: 0;
  animation-delay: 2.6s;
}

.about-details section h3 {
  margin-top: 0;
  color: #99d9ff;
}

/* Contact Link Button */
.contact-link {
  display: inline-block;
  margin-top: 30px;
  padding: 14px 32px;
  background: linear-gradient(135deg, #0077b6, #ff6f91);
  background-size: 200% 200%;
  color: white;
  font-weight: 700;
  font-size: 20px;
  text-decoration: none;
  border-radius: 8px;
  box-shadow: 0 6px 20px rgba(0 0 0 / 0.3);
  transition: background-position 0.4s ease, transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  user-select: none;
  animation: fadeInUp 1s ease forwards;
  opacity: 0;
  animation-delay: 2.8s;
  cursor: pointer;
}

.contact-link:hover,
.contact-link:focus {
  background-position: right center;
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 0 12px 3px rgba(255, 111, 145, 0.8), 0 8px 28px rgba(0, 0, 0, 0.4);
  outline: none;
}

/* Glowing pulse keyframe */
@keyframes pulseGlow {
  0% {
    box-shadow: 0 0 15px rgba(102, 217, 239, 0.3);
  }
  100% {
    box-shadow: 0 0 25px 6px rgba(102, 217, 239, 0.7);
  }
}

/* Fade in and slide up animation */
@keyframes fadeInUp {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Gradient Background Animation */
@keyframes gradientBG {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* Responsive */
@media (max-width: 768px) {
  .about-content {
    flex-direction: column;
    gap: 30px;
  }

  .about-image {
    max-width: 100%;
    flex: none;
    margin: 0 auto;
  }

  .about-details {
    flex: none;
  }

  .about-details h3 {
    text-align: center;
  }

  .about-details p {
    text-align: center;
  }

  .contact-link {
    display: block;
    width: 100%;
    text-align: center;
  }
}

/* Timeline */
.timeline {
  list-style: none;
  padding-left: 0;
  margin: 20px 0;
  border-left: 3px solid #ff6f91;
}

.timeline li {
  position: relative;
  padding: 10px 0 10px 20px;
  color: #ddd;
}

.timeline li::before {
  content: '';
  position: absolute;
  left: -7px;
  top: 14px;
  width: 12px;
  height: 12px;
  background-color: #ff6f91;
  border-radius: 50%;
}

/* Quotes */
.quotes {
  margin-top: 20px;
  font-style: italic;
}

.quotes blockquote {
  margin-bottom: 15px;
  padding-left: 20px;
  border-left: 4px solid #fcb045;
  color: #ccc;
  font-size: 1rem;
}

/* Basic fade-in & slide-up animation */
@keyframes fadeSlideUp {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Apply animation to main elements */
.animate-title,
.animate-text,
.animate-details,
.timeline li,
.quotes blockquote {
  opacity: 0;
  animation-fill-mode: forwards;
  animation-timing-function: ease-out;
  animation-duration: 0.8s;
}

/* Stagger animations with delays */
.animate-title {
  animation-name: fadeSlideUp;
  animation-delay: 0.2s;
}

.animate-text {
  animation-name: fadeSlideUp;
  animation-delay: 0.4s;
}

.animate-img {
  animation-name: fadeSlideUp;
  animation-delay: 0.6s;
}

.animate-details {
  animation-name: fadeSlideUp;
  animation-delay: 0.8s;
}

/* Timeline items: stagger each one */
.timeline li {
  opacity: 0;
  animation-name: fadeSlideUp;
  animation-duration: 0.7s;
  animation-fill-mode: forwards;
  animation-timing-function: ease-out;
}

/* Add delay per timeline item */
.timeline li:nth-child(1) { animation-delay: 1.0s; }
.timeline li:nth-child(2) { animation-delay: 1.2s; }
.timeline li:nth-child(3) { animation-delay: 1.4s; }
.timeline li:nth-child(4) { animation-delay: 1.6s; }
.timeline li:nth-child(5) { animation-delay: 1.8s; }

/* Quotes: stagger fade-in */
.quotes blockquote {
  animation-name: fadeSlideUp;
  animation-duration: 0.7s;
  animation-fill-mode: forwards;
  animation-timing-function: ease-out;
}

.quotes blockquote:nth-child(1) { animation-delay: 2.0s; }
.quotes blockquote:nth-child(2) { animation-delay: 2.2s; }
.quotes blockquote:nth-child(3) { animation-delay: 2.4s; }

.intro-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 3rem;
}

.passport-photo img {
  width: 160px;
  height: 210px;
  object-fit: cover;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  margin-bottom: 1.5rem;
}
