/* ============================================================
   Team member single profile (.tm-*)
   Split hero (photo + info) → body sidebar + content → related grid
   ============================================================ */


/* Light intro override — slimmer for single page */
.tm-intro {
  padding-bottom: 24px;
}


/* ============================================================
   Hero — photo left + info right
   ============================================================ */

.tm-hero {
  background: var(--white);
  padding: 16px 0 64px;
}

@media (max-width: 767.98px) {
  .tm-hero { padding: 8px 0 40px; }
}

.tm-hero__inner {
  display: grid;
  grid-template-columns: minmax(320px, 420px) 1fr;
  gap: 48px;
  align-items: start;
}

@media (max-width: 1023.98px) {
  .tm-hero__inner {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}


/* Photo */
.tm-hero__media {
  aspect-ratio: 4 / 5;
  border-radius: var(--r-4, 14px);
  overflow: hidden;
  background: var(--paper);
  position: relative;
}

@media (max-width: 1023.98px) {
  .tm-hero__media { aspect-ratio: 4 / 3; max-width: 480px; }
}

.tm-hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}


/* Info column */
.tm-hero__body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-top: 4px;
}

.tm-hero__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 4px;
}

.tm-hero__tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 11px;
  background: var(--paper);
  border-radius: var(--r-pill);
  font-size: var(--fs-11);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink);
}

.tm-hero__tag--role {
  background: var(--red);
  color: var(--white);
}

.tm-hero__name {
  font-size: clamp(28px, 3.4vw, 42px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--ink);
  text-wrap: balance;
}

.tm-hero__title {
  font-size: var(--fs-15, 0.9375rem);
  font-weight: 500;
  line-height: 1.5;
  color: var(--text-muted);
  max-width: 56ch;
}

.tm-hero__lede {
  font-size: var(--fs-14);
  line-height: 1.65;
  color: var(--ink-2, #1C1D21);
  max-width: 62ch;
  margin-top: 4px;
}


/* Quick stats */
.tm-hero__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--r-3);
  overflow: hidden;
  margin-top: 12px;
}

@media (max-width: 479.98px) {
  .tm-hero__stats { grid-template-columns: 1fr; gap: 1px; }
}

.tm-stat {
  background: var(--white);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tm-stat__num {
  font-family: 'Inter', sans-serif;
  font-size: clamp(22px, 2.2vw, 28px);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.tm-stat__label {
  font-size: var(--fs-12);
  color: var(--text-muted);
}


/* Hero actions */
.tm-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.tm-hero__actions .btn svg { width: 14px; height: 14px; }

.tm-hero__btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--border);
  transition: background var(--dur-fast) var(--ease),
              border-color var(--dur-fast) var(--ease);
}

.tm-hero__btn-ghost:hover {
  background: var(--paper);
  border-color: var(--ink-3);
}


/* ============================================================
   Body — content + sticky aside
   ============================================================ */

.tm-body {
  background: var(--paper);
  padding: 56px 0 72px;
}

@media (max-width: 767.98px) {
  .tm-body { padding: 40px 0 56px; }
}

.tm-body__inner {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 48px;
  align-items: start;
}

@media (max-width: 1023.98px) {
  .tm-body__inner { grid-template-columns: 1fr; gap: 32px; }
}


/* Content sections */
.tm-content {
  display: flex;
  flex-direction: column;
  gap: 40px;
  min-width: 0;
}

.tm-section {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-3);
  padding: 28px 32px 32px;
}

@media (max-width: 575.98px) {
  .tm-section { padding: 22px 22px 24px; }
}

.tm-section__title {
  font-size: clamp(20px, 2vw, 24px);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
  color: var(--ink);
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.tm-section__lead {
  font-size: var(--fs-15, 0.9375rem);
  font-weight: 500;
  line-height: 1.65;
  color: var(--ink);
  margin-bottom: 12px;
}

.tm-section__text {
  font-size: var(--fs-14);
  line-height: 1.7;
  color: var(--ink-2, #1C1D21);
  margin-bottom: 12px;
}

.tm-section__text:last-child { margin-bottom: 0; }


/* Education / experience list */
.tm-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.tm-list-item {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 24px;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}

.tm-list-item:last-child { border-bottom: 0; padding-bottom: 0; }
.tm-list-item:first-child { padding-top: 0; }

@media (max-width: 575.98px) {
  .tm-list-item {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

.tm-list-item__year {
  font-family: 'Inter', sans-serif;
  font-size: var(--fs-13);
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  padding-top: 1px;
}

.tm-list-item__title {
  font-size: var(--fs-15, 0.9375rem);
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.005em;
  line-height: 1.3;
  margin-bottom: 2px;
}

.tm-list-item__sub {
  font-size: var(--fs-13);
  color: var(--text-muted);
  line-height: 1.4;
}


/* Courses grid */
.tm-courses {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

@media (max-width: 767.98px) {
  .tm-courses { grid-template-columns: 1fr; }
}

.tm-course {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px 20px;
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--r-3);
  text-decoration: none;
  color: inherit;
  transition: border-color var(--dur-fast) var(--ease),
              box-shadow var(--dur-fast) var(--ease),
              transform var(--dur) var(--ease);
}

.tm-course:hover {
  border-color: var(--ink-3);
  box-shadow: var(--shadow-2);
  transform: translateY(-2px);
  background: var(--white);
}

.tm-course__num {
  font-size: var(--fs-11);
  font-weight: 700;
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--red);
}

.tm-course__title {
  font-size: var(--fs-15, 0.9375rem);
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.005em;
  line-height: 1.3;
}

.tm-course:hover .tm-course__title { color: var(--red); }

.tm-course__meta {
  font-size: var(--fs-12);
  color: var(--text-muted);
  margin-top: auto;
  padding-top: 4px;
}


/* ============================================================
   Sticky aside
   ============================================================ */

.tm-aside {
  position: sticky;
  top: calc(var(--header-h, 64px) + 24px);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

@media (max-width: 1023.98px) {
  .tm-aside { position: static; }
}

.tm-aside__card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-3);
  padding: 20px 22px;
}

.tm-aside__eyebrow {
  font-size: var(--fs-11);
  font-weight: 600;
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 12px;
}


/* Contact list */
.tm-aside__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tm-aside__item {
  display: grid;
  grid-template-columns: 16px 1fr;
  align-items: center;
  gap: 10px;
  font-size: var(--fs-13);
  line-height: 1.45;
  color: var(--ink-2, #1C1D21);
  min-width: 0;
}

.tm-aside__item svg {
  width: 14px;
  height: 14px;
  color: var(--text-muted);
}

.tm-aside__item a {
  color: inherit;
  text-decoration: none;
  word-break: break-all;
  transition: color var(--dur-fast) var(--ease);
}

.tm-aside__item a:hover { color: var(--red); }


/* Department link */
.tm-aside__dept {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 12px 14px;
  background: var(--paper);
  border-radius: var(--r-2);
  font-size: var(--fs-13);
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  transition: background var(--dur-fast) var(--ease);
}

.tm-aside__dept:hover { background: var(--ink); color: var(--white); }

.tm-aside__dept svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  transition: transform var(--dur) var(--ease);
}

.tm-aside__dept:hover svg { transform: translateX(2px); }


/* Socials */
.tm-aside__socials {
  display: flex;
  gap: 8px;
}

.tm-aside__socials a {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--paper);
  color: var(--ink);
  border-radius: 50%;
  transition: background var(--dur-fast) var(--ease),
              color var(--dur-fast) var(--ease);
}

.tm-aside__socials a:hover {
  background: var(--ink);
  color: var(--white);
}

.tm-aside__socials svg { width: 14px; height: 14px; }


/* ============================================================
   Related team members
   ============================================================ */

.tm-related {
  background: var(--white);
  padding: 72px 0 88px;
}

@media (max-width: 767.98px) {
  .tm-related { padding: 48px 0 64px; }
}

.tm-related__head {
  text-align: center;
  margin-bottom: 32px;
}

.tm-related__eyebrow {
  display: inline-block;
  font-size: var(--fs-11);
  font-weight: 600;
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.tm-related__title {
  font-size: clamp(22px, 2.4vw, 28px);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
  line-height: 1.3;
  text-wrap: balance;
}


/* Related grid */
.tm-related__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

@media (max-width: 1023.98px) {
  .tm-related__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 479.98px) {
  .tm-related__grid { grid-template-columns: 1fr; }
}

.tm-related-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-3);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: border-color var(--dur-fast) var(--ease),
              box-shadow var(--dur-fast) var(--ease),
              transform var(--dur) var(--ease);
}

.tm-related-card:hover {
  border-color: var(--ink-3);
  box-shadow: var(--shadow-2);
  transform: translateY(-3px);
}

.tm-related-card__photo {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--paper);
}

.tm-related-card__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: grayscale(0.2);
  transition: transform var(--dur-slow) var(--ease),
              filter var(--dur-slow) var(--ease);
}

.tm-related-card:hover .tm-related-card__photo img {
  transform: scale(1.04);
  filter: grayscale(0);
}

.tm-related-card__body {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.tm-related-card__name {
  font-size: var(--fs-15, 0.9375rem);
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.005em;
  line-height: 1.3;
}

.tm-related-card:hover .tm-related-card__name { color: var(--red); }

.tm-related-card__role {
  font-size: var(--fs-12);
  color: var(--text-muted);
  line-height: 1.4;
}


.tm-related__foot {
  text-align: center;
  margin-top: 32px;
}


/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .tm-course:hover,
  .tm-related-card:hover,
  .tm-related-card:hover .tm-related-card__photo img,
  .tm-aside__dept:hover svg { transform: none; }
}
