/* ==========================================================================
   A teacher's page: the introduction video, the name and photo, what they
   teach, a card to start learning that stays in view, about me and the
   courses.

   One grid, so the card can sit beside everything on a wide screen and
   between the facts and "About me" on a phone.
   ========================================================================== */

.rt-tp { padding-top: var(--rt-s5); }

.rt-tp__crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: var(--rt-s5);
  font-size: var(--rt-t-sm);
  color: var(--rt-text-dim);
}
[data-rt] .rt-tp__crumbs a { color: var(--rt-text-dim); text-decoration: none; }
[data-rt] .rt-tp__crumbs a:hover { color: var(--rt-emerald); text-decoration: underline; text-underline-offset: 3px; }
.rt-tp__crumbs [aria-current] { color: var(--rt-text); font-weight: 600; }

.rt-tp__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(17rem, 22rem);
  grid-template-areas:
    "head    aside"
    "facts   aside"
    "about   aside"
    "courses aside";
  grid-template-rows: auto auto auto 1fr;
  column-gap: clamp(1.5rem, 4vw, 3.5rem);
  max-width: 76rem;
}
.rt-tp__grid.has-video {
  grid-template-areas:
    "video   aside"
    "head    aside"
    "facts   aside"
    "about   aside"
    "courses aside";
  grid-template-rows: auto auto auto auto 1fr;
}
.rt-tp__video   { grid-area: video; }
.rt-tp__head    { grid-area: head; }
.rt-tp__facts   { grid-area: facts; }
.rt-tp__aside   { grid-area: aside; }
.rt-tp__about   { grid-area: about; }
.rt-tp__courses { grid-area: courses; }

/* the video */

.rt-tp__video {
  position: relative;
  aspect-ratio: 16 / 9;
  margin-bottom: var(--rt-s6);
  border-radius: 14px;
  overflow: hidden;
  background: #0b1a15;
  box-shadow: var(--rt-lift-2);
}
.rt-tp__video iframe,
.rt-tp__video video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }
[data-rt] .rt-tp__poster {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: #000;
  cursor: pointer;
}
[data-rt] .rt-tp__poster img {
  width: 100%;
  height: 100%;
  margin: 0;
  object-fit: cover;
  opacity: 0.9;
  transition: opacity 0.3s var(--rt-ease), transform 0.6s var(--rt-ease);
}
.rt-tp__poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(0, 0, 0, 0.55));
}
.rt-tp__poster:hover img { opacity: 1; transform: scale(1.02); }
.rt-tp__play {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  color: #15604a;
  font-size: 1.5rem;
  transform: translate(-50%, -50%);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  transition: transform 0.25s var(--rt-ease);
}
.rt-tp__play i { margin-left: 4px; }
.rt-tp__poster:hover .rt-tp__play,
.rt-tp__poster:focus-visible .rt-tp__play { transform: translate(-50%, -50%) scale(1.08); }
.rt-tp__playlabel {
  position: absolute;
  left: var(--rt-s5);
  bottom: var(--rt-s4);
  z-index: 1;
  color: #ffffff;
  font-size: var(--rt-t-sm);
  font-weight: 600;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
}

/* the name and photo */

.rt-tp__head { display: flex; align-items: center; gap: var(--rt-s5); min-width: 0; }
.rt-tp__photo {
  display: grid;
  place-items: center;
  flex: none;
  width: 112px;
  height: 112px;
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(150deg, #1a7457, #0e4633);
  box-shadow: 0 0 0 4px var(--rt-ink-2), 0 0 0 5px color-mix(in srgb, var(--rt-gold) 40%, transparent), var(--rt-lift-2);
}
[data-rt] .rt-tp__photo img { width: 100%; height: 100%; margin: 0; border: 0; object-fit: cover; }
.rt-tp__photo span { font-family: var(--rt-display); font-size: 2.6rem; font-weight: 700; color: #ffffff; }
.rt-tp__who { min-width: 0; }
[data-rt] .rt-tp__name {
  margin: 0 0 0.3rem;
  font-family: var(--rt-display);
  font-size: clamp(2rem, 2.6vw + 1rem, 3rem);
  font-weight: 700;
  line-height: 1.08;
  color: var(--rt-text);
  overflow-wrap: anywhere;
}
.rt-tp__line {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 0.5rem;
  margin: 0 0 0.6rem;
  font-size: var(--rt-t-base);
  font-weight: 600;
  color: var(--rt-text);
}
.rt-tp__dot { color: var(--rt-text-dim); }
.rt-tp__verified {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--rt-emerald) 10%, transparent);
  color: var(--rt-emerald);
  font-size: var(--rt-t-xs);
  font-weight: 600;
}

/* teaches, speaks, classes */

.rt-tp__facts {
  display: grid;
  gap: var(--rt-s4);
  margin: var(--rt-s6) 0 0;
  padding: var(--rt-s5) 0 0;
  border-top: 1px solid var(--rt-rule-soft);
  list-style: none;
}
.rt-tp__facts li { display: flex; gap: var(--rt-s3); align-items: flex-start; }
.rt-tp__facts li > i {
  display: grid;
  place-items: center;
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--rt-gold) 12%, transparent);
  color: var(--rt-gold);
  font-size: 0.95rem;
}
.rt-tp__facts strong { display: block; margin-bottom: 0.1rem; font-size: var(--rt-t-sm); color: var(--rt-text); }
.rt-tp__facts span { font-size: var(--rt-t-sm); line-height: 1.6; color: var(--rt-text-dim); }
[data-rt] .rt-tp__facts a { color: var(--rt-emerald); text-decoration: none; font-weight: 600; }
[data-rt] .rt-tp__facts a:hover { text-decoration: underline; text-underline-offset: 3px; }
.rt-tp__chips { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.2rem; }
.rt-tp__chip {
  padding: 0.15rem 0.6rem;
  border: 1px solid var(--rt-rule);
  border-radius: 999px;
  font-size: var(--rt-t-xs);
  color: var(--rt-text);
}

/* the card beside it all */

.rt-tp__aside { align-self: start; position: sticky; top: 6.5rem; min-width: 0; }
.rt-tp__card {
  padding: var(--rt-s5);
  background: var(--rt-surface);
  border: 1px solid var(--rt-rule-soft);
  border-radius: 14px;
  box-shadow: var(--rt-lift-2);
}
[data-rt] .rt-tp__cardtitle {
  margin: 0 0 var(--rt-s4);
  font-family: var(--rt-display);
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--rt-text);
}
.rt-tp__stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(4.5rem, 1fr));
  gap: var(--rt-s2);
  margin: 0 0 var(--rt-s5);
}
.rt-tp__stats > div {
  padding: var(--rt-s3) var(--rt-s2);
  border-radius: 10px;
  background: var(--rt-ink-3);
  text-align: center;
}
.rt-tp__stats dt {
  font-size: var(--rt-t-xs);
  font-weight: 500;
  color: var(--rt-text-dim);
}
.rt-tp__stats dd {
  margin: 0 0 0.1rem;
  font-family: var(--rt-display);
  font-size: 1.55rem;
  font-weight: 700;
  line-height: 1;
  color: var(--rt-text);
}
.rt-tp__stats > div { display: flex; flex-direction: column-reverse; }
.rt-tp__actions { display: grid; gap: var(--rt-s2); }
[data-rt] .rt-tp__actions .rt-btn { width: 100%; justify-content: center; gap: 0.5rem; }
.rt-tp__help { margin: var(--rt-s4) 0 0; font-size: var(--rt-t-xs); line-height: 1.6; color: var(--rt-text-dim); text-align: center; }
[data-rt] .rt-tp__help a { color: var(--rt-emerald); font-weight: 600; }

/* about me */

.rt-tp__about { margin-top: var(--rt-s7); }
[data-rt] .rt-tp__h2 {
  margin: 0 0 var(--rt-s4);
  font-family: var(--rt-display);
  font-size: clamp(1.6rem, 1vw + 1.2rem, 2rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--rt-text);
}
.rt-tp__text p {
  margin: 0 0 var(--rt-s4);
  font-size: var(--rt-t-md);
  line-height: 1.8;
  color: var(--rt-text);
  overflow-wrap: anywhere;
}
.rt-tp__text p:last-child { margin-bottom: 0; }
.rt-tp__text > :last-child { margin-bottom: 0; }
[data-rt] .rt-tp__text h3,
[data-rt] .rt-tp__text h4 {
  margin: var(--rt-s5) 0 var(--rt-s2);
  font-family: var(--rt-display);
  font-weight: 700;
  line-height: 1.25;
  color: var(--rt-text);
}
[data-rt] .rt-tp__text h3 { font-size: 1.35rem; }
[data-rt] .rt-tp__text h4 { font-size: 1.15rem; }
.rt-tp__text ul,
.rt-tp__text ol {
  display: grid;
  gap: 0.45rem;
  margin: 0 0 var(--rt-s4);
  padding: 0;
  list-style: none;
  font-size: var(--rt-t-md);
  line-height: 1.7;
  color: var(--rt-text);
}
.rt-tp__text ol { counter-reset: tp-list; }
.rt-tp__text li { position: relative; padding-inline-start: 2.1rem; }
.rt-tp__text ul > li::before {
  content: "";
  position: absolute;
  top: 0.62em;
  left: 0.55rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--rt-gold);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--rt-gold) 18%, transparent);
}
.rt-tp__text ol > li { counter-increment: tp-list; }
.rt-tp__text ol > li::before {
  content: counter(tp-list);
  position: absolute;
  top: 0.15em;
  left: 0;
  display: grid;
  place-items: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: var(--rt-emerald);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
}
.rt-tp__text blockquote {
  margin: 0 0 var(--rt-s4);
  padding: var(--rt-s3) var(--rt-s4);
  border-inline-start: 3px solid var(--rt-gold);
  background: color-mix(in srgb, var(--rt-gold) 7%, transparent);
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: var(--rt-text);
}
[data-rt] .rt-tp__text a { color: var(--rt-emerald); text-decoration: underline; text-underline-offset: 3px; }
.rt-tp__text strong { font-weight: 700; }
.rt-tp__text.is-short {
  max-height: 14.5rem;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(180deg, #000 65%, transparent);
  mask-image: linear-gradient(180deg, #000 65%, transparent);
}
[data-rt] .rt-tp__more {
  margin-top: var(--rt-s3);
  padding: 0;
  min-width: 0;
  border: 0;
  background: none;
  color: var(--rt-emerald);
  font-size: var(--rt-t-sm);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
}
.rt-tp__empty { margin: 0; color: var(--rt-text-dim); font-style: italic; }

/* the courses */

.rt-tp__courses { margin-top: var(--rt-s7); }
.rt-tp__coursegrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(16rem, 100%), 1fr));
  gap: var(--rt-s4);
}
.rt-tp__course {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border: 1px solid var(--rt-rule-soft);
  border-radius: 12px;
  overflow: hidden;
  background: var(--rt-surface);
  box-shadow: var(--rt-lift-1);
  transition: box-shadow 0.25s var(--rt-ease), transform 0.25s var(--rt-ease);
}
.rt-tp__course:hover { box-shadow: var(--rt-lift-2); transform: translateY(-2px); }
.rt-tp__courseart { position: relative; display: block; aspect-ratio: 16 / 9; background: var(--rt-ink-3); }
[data-rt] .rt-tp__courseart img { width: 100%; height: 100%; margin: 0; object-fit: cover; }
.rt-tp__coursetag {
  position: absolute;
  top: var(--rt-s3);
  left: var(--rt-s3);
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #15604a;
  font-size: 0.7rem;
  font-weight: 700;
}
.rt-tp__coursebody { display: flex; flex-direction: column; flex: 1; padding: var(--rt-s4); }
[data-rt] .rt-tp__coursebody h3 {
  margin: 0 0 var(--rt-s2);
  font-family: var(--rt-display);
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.25;
}
[data-rt] .rt-tp__coursebody h3 a { color: var(--rt-text); text-decoration: none; }
[data-rt] .rt-tp__coursebody h3 a:hover { color: var(--rt-emerald); }
.rt-tp__coursebody p { flex: 1; margin: 0 0 var(--rt-s3); font-size: var(--rt-t-sm); line-height: 1.6; color: var(--rt-text-dim); }
.rt-tp__coursefoot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--rt-s2);
  margin-top: auto;
  padding-top: var(--rt-s3);
  border-top: 1px solid var(--rt-rule-soft);
  font-size: var(--rt-t-xs);
  color: var(--rt-text-dim);
}
.rt-tp__coursefoot i { margin-right: 0.25rem; color: var(--rt-gold); }
[data-rt] .rt-tp__coursefoot a { color: var(--rt-emerald); font-size: var(--rt-t-sm); font-weight: 600; text-decoration: none; white-space: nowrap; }
.rt-tp__coursefoot a i { margin: 0 0 0 0.25rem; color: inherit; font-size: 0.75em; }

/* one column: the card comes after the facts */

@media (max-width: 62rem) {
  .rt-tp__grid,
  .rt-tp__grid.has-video {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "head" "facts" "aside" "about" "courses";
    grid-template-rows: none;
  }
  .rt-tp__grid.has-video { grid-template-areas: "video" "head" "facts" "aside" "about" "courses"; }
  .rt-tp__aside { position: static; margin-top: var(--rt-s6); }
}

@media (max-width: 30rem) {
  .rt-tp__video { margin-bottom: var(--rt-s5); border-radius: 10px; }
  .rt-tp__head { align-items: flex-start; gap: var(--rt-s4); }
  .rt-tp__photo { width: 84px; height: 84px; border-radius: 14px; }
  .rt-tp__photo span { font-size: 2rem; }
  .rt-tp__playlabel { display: none; }
}
