/* ===========================
   Team Bio Block – Fluid & Consolidated
   =========================== */

:root {
  /* Fluid spacing & sizing */
  --tb-space: clamp(1rem, 1.2vw + 0.75rem, 2rem);
  --tb-space-lg: clamp(1.5rem, 2vw + 1rem, 3rem);
  --tb-radius: 16px;

  /* Fluid typography */
  /* --tb-h6: clamp(0.8rem, 0.5vw + 0.7rem, 1rem);
     --tb-copy: clamp(1rem, 0.7vw + 0.9rem, 1.225rem); */

  /* Colors (inherits your theme vars where used) */
  --tb-dark: var(--dark-blue, #0f1a2a);
  --tb-text-on-gradient: #fff;

  /* Layout widths */
  --tb-img-min: clamp(60%, 8vw + 40%, 73%);
}

/* ===========================
   Block Shell
   =========================== */
.team-bio-block {
  position: relative;
  /* margin: clamp(2rem, 4vw, 3rem) 0; */
  /* background: linear-gradient(to bottom, #090f30 0%, #5b0b64 55%, #ffffff 100%); */
  /* background-image: url(./images/team-bg.jpg); */
  background: linear-gradient(64deg, #F53ECB -1.69%, #5376FF 66.86%);
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
  /* padding: 4rem 0 5rem; */
}

.team-bio-block__wrap {
  display: flex;
  flex-direction: column-reverse;
  border-radius: var(--tb-radius);
  padding: var(--tb-space);
  gap: var(--tb-space);
}



/* ===========================
   Image & Text Sides
   =========================== */
.team-bio-block__image-side,
.team-bio-block__text-side {
  width: 100%;
}

.team-bio-block__image-side {
  text-align: center;
}

.team-bio-block__image-side img {
  display: block;
  margin: 0 auto;
  border-radius: calc(var(--tb-radius) * 0.55);
  overflow: hidden;
  /* width: 100%; */
  max-width: 100%;
}

.team-bio-block__text-side {
  padding: 0;
}

/* ===========================
   Position Tag
   =========================== */
.team-bio-block__tag {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.09rem;
  margin: 0 0 var(--tb-space);
  color: var(--tb-text-on-gradient);
  font-size: var(--tb-h6); /* NOTE: --tb-h6 is commented out in :root */
  font-weight: var(--header-font-weight, 700);
  line-height: 1.125;
}

/* ===========================
   Headings
   =========================== */
.team-bio-block__text-side :where(h2, h3, h4, h5, h6) {
  color: var(--tb-dark);
  margin: 0 0 clamp(0.5rem, 0.6vw + 0.4rem, 1rem);
}

.team-bio-block__text-side h2 {
  font-size: clamp(1.5rem, 2vw + 1.2rem, 2.25rem);
}

.team-bio-block__text-side h3 {
  font-size: clamp(1.25rem, 1.6vw + 1rem, 1.75rem);
}

.team-bio-block__text-side h4 {
  font-size: clamp(1.1rem, 1.2vw + 0.9rem, 1.4rem);
}

.team-bio-block__text-side h5 {
  font-size: clamp(1rem, 1vw + 0.85rem, 1.2rem);
}

.team-bio-block__text-side h6 {
  font-size: var(--tb-h6); /* NOTE: --tb-h6 is commented out in :root */
}

/* ===========================
   Copy
   =========================== */
.team-bio-block__copy {
  color: var(--tb-text-on-gradient);
  font-size: var(--tb-copy);
  line-height: 1.5;
  margin-bottom: var(--tb-space-lg);
}

.team-bio-block__copy :where(h1, h2, h3, h4, h5, h6) {
  color: var(--tb-dark);
}

.team-bio-block__copy :where(p, ul, li, strong, a, span) {
  line-height: inherit;
  font-size: inherit;
  color: inherit;
}

.team-bio-block__copy ul {
  margin: 0 0 var(--tb-space);
  padding: 0;
}

.team-bio-block__copy ul li {
  position: relative;
  list-style: none;
  padding-left: clamp(1.25rem, 1vw + 1rem, 2rem);
  margin-bottom: clamp(0.25rem, 0.5vw, 0.75rem);
}

.team-bio-block__copy ul li::before {
  content: url(../../../../assets/images/purple-check.svg);
  position: absolute;
  left: 0;
  top: 0.15em;
}

/* ===========================
   Buttons
   =========================== */
.team-bio-block__btns {
  display: flex;
  flex-direction: column;
  gap: clamp(0.75rem, 1vw, 1rem);
  margin-bottom: var(--tb-space-lg);
}

/* Default buttons (commented out for reference)
.team-bio-block__btns .btn {
  width: max-content;
  max-width: 100%;
  margin: 0 auto;
}
*/

/* ===========================
   Desktop Layout (~1024px+)
   =========================== */
@media (min-width: 64rem) {
  .team-bio-block {
    margin: 0 0 3rem;
  }

  .team-bio-block__wrap {
    flex-direction: row;
    align-items: center !important;
    justify-content: center;
    padding: clamp(1.5rem, 1.2vw + 1rem, 2rem)
             clamp(2rem, 2vw + 1.5rem, 2.5rem)
             0
             clamp(2.5rem, 2.5vw + 2rem, 4.5rem);
    gap: clamp(1rem, 2vw, 2.5rem);
  }

  .team-bio-block.reversed .team-bio-block__wrap {
    flex-direction: row-reverse;
    padding: clamp(1.5rem, 1.2vw + 1rem, 2rem)
             clamp(2rem, 2.2vw + 1.5rem, 3rem)
             0
             clamp(0.25rem, 1vw, 0.5rem);
  }

  .team-bio-block__image-side,
  .team-bio-block__text-side {
    width: 50%;
  }

  .team-bio-block__image-side {
    display: flex;
    align-items: center;
    padding-left: clamp(0.5rem, 1vw, 1rem);
    margin: 0;
  }

  .team-bio-block.reversed .team-bio-block__image-side {
    padding: 0 clamp(0.25rem, 0.8vw, 0.5rem) 0 0;
  }

  .team-bio-block__image-side img {
    width: var(--tb-img-min);
  }

  .team-bio-block__text-side {
    padding: 0 clamp(2rem, 2.5vw + 1rem, 3rem) 0 0;
  }

  .team-bio-block.reversed .team-bio-block__text-side {
    padding: 0 0 0 clamp(1rem, 1.5vw, 2rem);
  }

  /* Keep headings readable in reversed layouts */
  .team-bio-block.reversed .team-bio-block__text-side :where(h2, h3, h4) {
    max-width: 28rem;
    color: var(--tb-text-on-gradient);
  }

  /* Final intent: column layout on reversed */
  .team-bio-block.reversed .team-bio-block__btns {
    flex-direction: column;
    align-items: stretch;
  }

  .team-bio-block__btns .btn {
    margin: 0;
  }
}

/* ===========================
   Variants: Upper & Lower
   =========================== */
.team-bio-block--upper {
  margin-bottom: 0;
  padding-top: 60px;
  padding-bottom: 60px;
}

.team-bio-block--lower {
  margin-top: 0;
  background: #fff;
  color: #000;
}

.team-bio-block--lower .team-bio-block__copy {
  color: #000;
}

@media (min-width: 64rem) {
  .team-bio-block--lower.reversed .team-bio-block__text-side :where(h2, h3, h4) {
    color: #000;
  }
}

.team-bio-block--lower .team-bio-block__image-side {
  display: none;
}

.team-bio-block--lower .team-bio-block__text-side {
  width: 100%;
  padding: 0;
}

/* Remove trailing spacing */
.team-bio-block--lower .team-bio-block__copy:last-child,
.team-bio-block--lower .team-bio-block__btns:last-child {
  margin-bottom: 0;
}

/* ===========================
   Lower Layout: Bio Left, Sidebar Right
   =========================== */
.team-bio-block--lower .team-bio-block__text-side {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(24px, 2.5vw, 40px);
}

@media (min-width: 64rem) {
  .team-bio-block--lower .team-bio-block__text-side {
    grid-template-columns: minmax(0, 2.25fr) minmax(0, 1fr);
  }

  

  /* Replacement to keep intended behavior for the actual grid item */
  .team-bio-block--lower .team-bio-block__btns {
    grid-column: 2;
  }
}

/* ===========================
   Buttons: Full Width + No Underline
   =========================== */
.team-bio-block__btns .btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 75%;
  max-width: none;
  text-align: center;
  border-radius: 0.44rem;
  padding: 0.285rem 0.285rem 0.285rem 0.8rem;
}

.team-bio-block__btns .btn,
.team-bio-block__btns .btn:link,
.team-bio-block__btns .btn:visited,
.team-bio-block__btns .btn:hover,
.team-bio-block__btns .btn:focus,
.team-bio-block__btns .btn:active {
  text-decoration: none;
}

@media (min-width: 64rem) {
  /* INEFFECTIVE: .team-bio-block__education is not a direct grid item (inside .team-bio-block__stack)
  .team-bio-block--lower .team-bio-block__education {
    grid-column: 1 !important;
  }
  */

  .team-bio-block--lower .team-bio-block__btns {
    grid-column: 2;
  }

  .team-bio-block--lower .team-bio-block__text-side {
    align-items: start;
  }

  .team-bio-block--lower .team-bio-block__btns {
    grid-column: 2;
    grid-row: 1;
    align-self: start;
    margin-top: 0;
  }

  
}

/* ===========================
   Unified Body Copy Sizes
   =========================== */
.team-bio-block--upper .team-bio-block__copy,
.team-bio-block--lower .team-bio-block__bio,
.team-bio-block--lower .team-bio-block__education .team-bio-block__education-content,
.team-bio-block--lower .team-bio-block__past-experience {
  font-size: var(--tb-copy) !important;
  line-height: 1.5 !important;
}

.team-bio-block--upper .team-bio-block__copy :where(p, ul, li, a, span, strong, em),
.team-bio-block--lower .team-bio-block__bio :where(p, ul, li, a, span, strong, em),
.team-bio-block--lower .team-bio-block__education .team-bio-block__education-content :where(p, ul, li, a, span, strong, em),
.team-bio-block--lower .team-bio-block__past-experience :where(p, ul, li, a, span, strong, em) {
  font-size: inherit !important;
  line-height: inherit !important;
}

/* ===========================
   Mobile Override
   =========================== */
@media (max-width: 63.999rem) {
  .team-bio-block__text-side h2 {
    color: var(--tb-text-on-gradient);
  }
}
