/* ===========================
   ABOUT SECTION
   =========================== */

/* Bubble canvas behind everything */
.bubble-field {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none; /* don't block UI */
}

/* Lift page content above the canvas */
.about-page {
  position: relative;
  z-index: 1;
}

/* Disable selection/copy in the about section */
#about, #about * {
  -webkit-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

/* Base layout */
.about-intro {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
  margin-bottom: 2rem;
}

/* The combined row (image + text) is capped at 75% */
.intro-content {
  display: flex;
  flex-wrap: nowrap;
  gap: 4rem;
  align-items: center;
  flex: 0 1 75%;
  max-width: 75%;
  margin: 0 auto;
}

.profile-container {
  flex: 0 1 300px;
  background: transparent;
  display: flex;
  justify-content: center;
}

.profile-pic {
  position: relative;
  overflow: visible;
  isolation: isolate;
}

/* Make the photo non-interactive itself; container handles hover */
.profile-pic img {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  border: 5px solid var(--color-secondary);
  box-shadow: 0 4px 15px var(--color-shadow);
  position: relative;
  z-index: 1;
  pointer-events: none;       /* can't click/drag the image */
  -webkit-user-drag: none;
  user-drag: none;
}

.text-container {
  flex: 1 1 320px;
  background: transparent;
  text-align: left;
}

.intro-text .tagline {
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--color-accent);
  margin-bottom: 1rem;
}

/* Bio block also capped at 75% */
.about-bio {
  flex: 0 1 75%;
  max-width: 75%;
  margin: 0 auto;
}

.about-bio p {
  font-size: 1.1rem;
  line-height: 1.8;
}

/* Desktop alignment preference */
@media (min-width: 993px) {
  .about-intro .text-container { text-align: left; }
  .about-intro .intro-text .tagline,
  .about-intro .about-bio p { text-align: left; }
}

/* ===========================
   Web layout (≤ 1240px)
   - Pic above text
   - Centered headings & body
   =========================== */
@media (max-width: 1240px) {
  /* let sections span full width */
  .intro-content,
  .about-bio {
    flex-basis: 100%;
    max-width: 100%;
  }

  /* stack vertically, image first */
  .intro-content {
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    text-align: center; /* default-center children text */
    padding-inline: 1rem;
  }

  /* make sure pic is on top even if DOM order ever changes */
  .profile-container { order: -1; width: 100%; justify-content: center; }
  .profile-pic { max-width: 260px; width: min(70vw, 320px); }
  .profile-pic img { width: 100%; }

  /* center all text blocks */
  .text-container { text-align: center; }
  .intro-text h1,
  .intro-text h2,
  .intro-text .tagline,
  .about-bio,
  .about-bio p { text-align: center; }

  /* a slightly narrower readable width for body on small screens */
  .about-bio { max-width: 42rem; width: 100%; padding-inline: 1rem; }
}

/* Respect users who prefer less motion */
@media (prefers-reduced-motion: reduce) {
  .bubble-field { display: none !important; }
}
