 .trainers-wrap {
      max-width: 1180px;
      margin: 0 auto;
    }

    .trainer-card {
      background: #F5F7FC;
      border: none;
      border-radius: 14px;
      overflow: visible;
      transform: translate3d(0,0,0);
      will-change: transform, opacity;
      transform: translate3d(0, 16px, 0);
      transition: opacity 620ms cubic-bezier(.2,.9,.2,1), transform 620ms cubic-bezier(.2,.9,.2,1), box-shadow 260ms ease;
      margin-bottom: 20px;
    }

    /* the visible white card (info area) */
    .trainer-inner {
      background: #F5F7FC;
      border-radius: 0 0 14px 14px;
      box-shadow:  0 18px 40px rgba(2,6,23,0.08);;
      padding: 18px 16px;
      text-align: center;
    }

    .trainer-photo-wrap {
      overflow: hidden;
      border-radius: 14px;
      background: #fff;
      box-shadow: 0 6px 20px rgba(2,6,23,0.06);
      position: relative;
    }

    .trainer-photo {
      display:block;
      width: 100%;
      height: auto;
      object-fit: cover;
      transform-origin: center center;
      transition: transform 480ms cubic-bezier(.2,.9,.2,1);
      border-radius: 14px 14px 0 0;
      will-change: transform;
    }

    .trainer-name {
      font-family: "Jost", sans-serif;
      font-weight: 300;
      font-size: 1.5rem;
      margin-top: 8px;
      margin-bottom: 6px;
      color: var(--black);
    }

    .trainer-title {
      font-size: 1rem;
      color: var(--gray);
      margin-bottom: 10px;
    }

    .profile-link {
      font-family: "Instrument Sans", sans-serif;
      color: var(--theme);
      font-weight: 500;
      text-decoration: none;
      display:inline-flex;
      align-items:center;
      gap:8px;
    }
    .profile-link svg { transition: transform 220ms ease; }

    /* Hover / focus state - lift whole card and zoom image */
    .trainer-card:hover,
    .trainer-card:focus-within {
      transform: translate3d(0, -10px, 0);
      box-shadow: 0 36px 80px rgba(2,6,23,0.14);;
    }
    .trainer-card:hover .trainer-photo,
    .trainer-card:focus-within .trainer-photo {
      transform: scale(1.04);
    }
    .trainer-card:hover .profile-link svg { transform: translateX(6px); }

    /* Make rounded corners slightly bigger on large screens */
    @media (min-width: 992px) {
      .trainer-photo { border-radius: calc(12px - 2px) calc(14px - 2px) 0 0; }
    }

    /* grid spacing */
    .trainer-grid { margin-top: 18px; }

    /* reveal visible */
    .trainer-card.in-view {
      opacity: 1;
      transform: translate3d(0,0,0);
    }

    /* Accessibility: reduced motion */
    @media (prefers-reduced-motion: reduce) {
      .trainer-card,
      .trainer-photo,
      .profile-link svg {
        transition: none !important;
      }
      .trainer-card:hover,
      .trainer-card:focus-within {
        transform: none !important;
        box-shadow:  0 18px 40px rgba(2,6,23,0.08); !important;
      }
    }

    /* small screens tweak */
    @media (max-width: 575.98px) {
      .trainer-name { font-size: 1rem; }
      .trainer-inner { padding: 14px 12px; }
    }

       /* Section wrapper */

    /* Top area: image + right info card */
    .detail-top {
      position: relative;
      overflow: visible;
    }

    /* Left portrait */
    .portrait {
      width: 100%;
      display:block;
      height: 650px;
      object-fit: cover;
      border-radius: 6px;
      box-shadow: 0 18px 40px rgba(2,6,23,0.06);
    }
    .portrait-wrap {
    padding: 0;
    position: absolute;
    width: 54%;
    z-index: 9;
}

    /* Right info card (overlap on desktop) */
    .info-card {
      background: var(--theme);
      color: #fff;
      border-radius: var(--card-radius);
      padding: 60px;
      padding-left: 100px;
      box-shadow: 0 30px 60px rgba(17,24,39,0.25);
      position: relative;
      overflow: hidden;
      margin-top: 60px;
      min-height: 700px;
    }

    /* Subtle repeating pattern using SVG (keeps file self-contained) */
    .info-card::before{
      content: "";
      position: absolute;
      inset: 0;
      background-image: url(../images/pattern.png);
      background-size: cover;
      opacity: 0.25;
      pointer-events:none;
    }

    .info-head {
      font-family: "Libre Caslon Display", serif;
      font-size: 3rem;
      margin-bottom: 1.5rem;
      color: #fff;
      font-weight: 400;
    }
    .info-role {
      color: rgba(255,255,255,0.92);
      margin-bottom: 18px;
    }

    .info-list {
      color: rgba(255,255,255,0.95);
      line-height:1.7;
      margin-bottom: 14px;
    }
    .info-list ul { padding-left: 18px; margin-bottom: 1.5rem }
   .info-list li {
    margin-bottom: 8px;
    font-size: 1.1rem;
    font-weight: 300;
}

    /* Large quote / hero text below top area */
    .big-quote {
      font-family: "Playfair Display", Georgia, serif;
      color: var(--accent-blue);
      font-size: clamp(28px, 5.8vw, 46px);
      line-height: 1.03;
      margin: 30px 0 20px;
    }

    /* Layout: on large screens show image left and info card overlapping to right */
    @media (min-width: 992px) {
      .row-top {
        align-items: start;
      }
      .portrait-col { padding-right: 0; }
      .info-col {
        position: absolute;
        right: 0;
        top: 12%;
        width: 44%;
        padding-left: 22px;
      }
      /* keep image column taking left ~56% */
      .portrait-col .portrait {
        border-radius: 6px 0 0 6px;
      }
      .big-quote { margin-left: 2px; }
    }

    /* On tablet / mobile stack: image first, info card below */
    @media (max-width: 991.98px) {
      .info-col { position: static; width: 100%; margin-top: 18px; }
      .info-card { padding: 50px; height: auto; }
      .portrait { border-radius: 8px; height: auto}
      .portrait-wrap {
    position: static;
    width: 50%;
}
.teacher-name {
    height: auto;
    position: relative;
    top: 0;
    margin-top: 1.5rem;
}
section.teacher-detail {
    padding: 10px 0 48px;
    padding-bottom: 0;
}
.info-card {
    margin-top: 30px;
}
    }
 @media (max-width: 767px) {
        .portrait-wrap {
        position: static;
        width: 100%;
    }
}
    /* subtle reveal (intersection observer toggles .in-view) */
    .reveal {
      transform: translateY(16px);
      transition: opacity .72s cubic-bezier(.2,.9,.2,1), transform .72s cubic-bezier(.2,.9,.2,1);
      will-change: opacity, transform;
    }
    .reveal.in-view {
      opacity: 1;
      transform: translateY(0);
    }
    .trainer-name::after {
    background: transparent;
}

    /* Accessibility: respect reduced motion */
    @media (prefers-reduced-motion: reduce) {
      .reveal { transition: none !important; transform: none !important; opacity: 1 !important; }
    }
   @media (min-width: 1600px) {
.info-card {
    padding: 80px;
    padding-left: 200px;
}
}
   @media (min-width: 1900px) {

    .trainer-title {
      font-size: 1.2rem;
      color: var(--gray);
      margin-bottom: 10px;
    }
    .info-list li {
    margin-bottom: 10px;
    font-size: 1.4rem;
}
    .portrait {
        height: 600px;
    }
        .info-card {
        padding: 80px;
        padding-left: 300px;
        margin-top: 100px;
    }
  }

  @media (min-width: 1600px) {
    .trainer-title {
      font-size: 1.1rem;
    }
       .trainer-name {
        font-size: 1.8rem;
        margin-top: 8px;
        margin-bottom: 10px;
    }
  }

   @media (min-width: 1900px) {
     .trainer-name {
      font-size: 2rem;
      margin-top: 8px;
      margin-bottom: 6px;
      color: var(--black);
    }

    .trainer-title {
        font-size: 1.35rem;
        margin-bottom: 10px;
    }
    .info-list li {
    margin-bottom: 10px;
    font-size: 1.4rem;
}
    .portrait {
        height: 800px;
    }
        .info-card {
               padding: 120px;
        padding-left: 250px;
    }
  }

  @media (min-width: 2200px) {
    .trainer-name {
        font-size: 2.5rem;
    }
    .portrait {
        height: 1000px;
    }
        .trainer-title {
        font-size: 1.8rem;
        margin-bottom: 10px;
    }
        .info-list li {
        margin-bottom: 10px;
        font-size: 1.8rem;
    }
}