/* Public instructor directory and profile. Scoped to these two views. */

.teacher-page,
.teacher-profile {
    padding-block-end: 80px;
    background: var(--site-ivory, #f7f6f2);
    color: var(--site-text, #25384c);
}

.teacher-page *,
.teacher-profile * {
    box-sizing: border-box;
}

.teacher-breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding-block: 24px;
    color: var(--site-muted, #536276);
    font-size: 13px;
    line-height: 1.4;
}

.teacher-breadcrumb a {
    flex: 0 0 auto;
    color: var(--site-blue, #244a80) !important;
    text-decoration: none !important;
}

.teacher-breadcrumb a:hover {
    text-decoration: underline !important;
}

.teacher-breadcrumb [aria-current] {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.teacher-breadcrumb > [aria-hidden] {
    color: var(--site-line-strong, #b9c5d1);
}

.teacher-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--site-blue, #244a80);
    font-size: 13px;
    font-weight: 800;
    line-height: 1.4;
}

.teacher-eyebrow::before {
    content: "";
    width: 24px;
    height: 2px;
    background: var(--site-gold, #b58a3b);
}

.teacher-page__intro {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 32px;
    padding-block: 36px 40px;
    border-block-end: 1px solid var(--site-line, #dce2e8);
}

.teacher-page__intro > div:first-child {
    max-width: 730px;
}

.teacher-page__intro h1,
.teacher-profile__hero h1 {
    margin: 12px 0 14px;
    color: var(--site-ink, #12243a);
    font-size: clamp(34px, 4vw, 52px);
    font-weight: 800;
    line-height: 1.18;
    letter-spacing: -0.025em;
}

.teacher-page__intro p {
    max-width: 660px;
    margin: 0;
    color: var(--site-muted, #536276);
    font-size: 17px;
    line-height: 1.7;
}

.teacher-page__count {
    display: grid;
    flex: 0 0 auto;
    gap: 3px;
    min-width: 145px;
    padding-inline-start: 24px;
    border-inline-start: 2px solid var(--site-gold, #b58a3b);
}

.teacher-page__count strong {
    color: var(--site-ink, #12243a);
    font-size: 34px;
    font-weight: 800;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.teacher-page__count span {
    color: var(--site-muted, #536276);
    font-size: 14px;
    line-height: 1.4;
}
.teacher-page__count small {
    color: var(--site-gold-text, #8b6828);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.4;
}

.teacher-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    padding-block-start: 24px;
}

.teacher-page__group {
    padding-block-start: 42px;
}

.teacher-page__group h2 {
    margin: 0;
    color: var(--site-ink, #12243a);
    font-size: clamp(25px, 2.5vw, 34px);
    font-weight: 800;
}

.teacher-card,
.teacher-profile__hero,
.teacher-profile__about,
.teacher-course,
.teacher-side-panel,
.teacher-empty {
    border: 1px solid var(--site-line, #dce2e8);
    border-radius: var(--site-radius-lg, 12px);
    background: #fff;
    box-shadow: none;
}

.teacher-card,
.teacher-course {
    min-width: 0;
    overflow: hidden;
    transition: border-color 160ms ease;
}

.teacher-card {
    display: grid;
    grid-template-columns: 124px minmax(0, 1fr);
    min-height: 170px;
}

.teacher-card:hover,
.teacher-course:hover {
    border-color: var(--site-line-strong, #b9c5d1);
}

.teacher-card__media {
    display: grid;
    place-items: center;
    overflow: hidden;
    border-inline-end: 1px solid var(--site-line, #dce2e8);
    background: #edf2f8;
    text-decoration: none !important;
}

.teacher-card__media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.teacher-card__initial {
    color: var(--site-blue, #244a80);
    font-size: 62px;
    font-weight: 800;
    line-height: 1;
}

.teacher-card__body {
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding: 20px;
}

.teacher-card__role {
    color: var(--site-blue, #244a80);
    font-size: 13px;
    font-weight: 800;
    line-height: 1.4;
}

.teacher-card h3 {
    margin: 8px 0 16px;
    color: var(--site-ink, #12243a);
    font-size: 20px;
    font-weight: 800;
    line-height: 1.3;
}

.teacher-card:not(:has(.teacher-card__role)) h3 {
    margin-block-start: 0;
}

.teacher-card h3 a,
.teacher-course h3 a {
    color: inherit !important;
    text-decoration: none !important;
}

.teacher-card h3 a:hover,
.teacher-course h3 a:hover {
    color: var(--site-blue, #244a80) !important;
}

.teacher-card__footer {
    display: flex;
    align-items: start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-block-start: auto;
    padding-block-start: 8px;
    border-block-start: 1px solid var(--site-line, #dce2e8);
}

.teacher-text-link {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-height: 32px;
    color: var(--site-blue, #244a80) !important;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.4;
    text-decoration: none !important;
}

.teacher-text-link:hover {
    text-decoration: underline !important;
    text-underline-offset: 3px;
}

.teacher-text-link [aria-hidden] {
    font-size: 19px;
    line-height: 1;
    transition: transform 160ms ease;
}

.teacher-text-link:hover [aria-hidden] {
    transform: translateX(-3px);
}

[dir="ltr"] .teacher-text-link:hover [aria-hidden] {
    transform: translateX(3px);
}

.teacher-socials {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
}

.teacher-socials a {
    color: var(--site-muted, #536276) !important;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none !important;
}

.teacher-socials a:hover {
    color: var(--site-blue, #244a80) !important;
    text-decoration: underline !important;
}

.teacher-page__elite {
    margin-block-start: 48px;
    padding: clamp(24px, 3vw, 40px);
    border-radius: 10px;
    background: #172b40;
}
.teacher-page__elite-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    margin-block-end: 26px;
}
.teacher-page__elite-heading > div {
    min-width: 0;
}
.teacher-page__elite-heading span {
    color: #e0c17c;
    font-size: 13px;
    font-weight: 800;
}
.teacher-page__elite-heading h2 {
    margin-block-start: 8px;
    color: #fff;
}
.teacher-page__elite-heading p {
    max-width: 400px;
    margin: 0;
    color: #d2dce6;
    font-size: 14px;
    line-height: 1.6;
}

.teacher-empty {
    padding: 32px;
}

.teacher-page > .site-container > .teacher-empty {
    margin-block-start: 40px;
}

.teacher-empty h2 {
    margin: 0 0 10px;
    color: var(--site-ink, #12243a);
    font-size: 22px;
    font-weight: 800;
}

.teacher-empty p {
    margin: 0 0 14px;
    color: var(--site-muted, #536276);
    font-size: 15px;
    line-height: 1.7;
}

.teacher-empty p:last-child {
    margin-block-end: 0;
}

/* Profile */

.teacher-profile__hero {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    align-items: center;
    gap: clamp(28px, 5vw, 64px);
    padding: 32px;
    margin-block: 30px 40px;
}

.teacher-profile__portrait {
    display: grid;
    width: 240px;
    height: 240px;
    place-items: center;
    overflow: hidden;
    border: 1px solid var(--site-line, #dce2e8);
    border-radius: 10px;
    background: var(--site-blue-soft, #edf2f8);
}

.teacher-profile__portrait img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.teacher-profile__portrait > span {
    color: var(--site-blue, #244a80);
    font-size: 96px;
    font-weight: 800;
    line-height: 1;
}

.teacher-profile__hero-copy {
    min-width: 0;
}

.teacher-profile__hero h1 {
    margin-block: 14px 6px;
}

.teacher-profile__role {
    margin: 0;
    color: var(--site-muted, #536276);
    font-size: 18px;
    line-height: 1.6;
}

.teacher-profile__stats {
    display: flex;
    flex-wrap: wrap;
    gap: 24px 40px;
    margin-block-start: 28px;
    padding-block-start: 24px;
    border-block-start: 1px solid var(--site-line, #dce2e8);
}

.teacher-profile__stats > div {
    display: grid;
    gap: 4px;
    min-width: 90px;
}

.teacher-profile__stats strong {
    color: var(--site-ink, #12243a);
    font-size: 27px;
    font-weight: 800;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}

.teacher-profile__stats span {
    color: var(--site-muted, #536276);
    font-size: 13px;
    line-height: 1.4;
}

.teacher-profile__layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 270px;
    align-items: start;
    gap: 32px;
}

.teacher-profile__main {
    min-width: 0;
}

.teacher-profile__about {
    padding: 32px;
}

.teacher-profile__about h2,
.teacher-section-heading h2,
.teacher-side-panel h2 {
    margin: 0;
    color: var(--site-ink, #12243a);
    font-size: clamp(22px, 2vw, 28px);
    font-weight: 800;
    line-height: 1.3;
}

.teacher-profile__about h2 {
    margin-block-end: 20px;
}

.teacher-profile__bio {
    max-width: 730px;
    overflow-wrap: anywhere;
    color: var(--site-text, #25384c);
    font-size: 16px;
    line-height: 1.85;
}

.teacher-profile__bio > :first-child {
    margin-block-start: 0;
}

.teacher-profile__bio > :last-child {
    margin-block-end: 0;
}

.teacher-profile__bio :is(img, video, iframe) {
    max-width: 100%;
    height: auto;
}

.teacher-profile__bio a {
    color: var(--site-blue, #244a80) !important;
    text-decoration: underline !important;
}

.teacher-profile__quiet {
    margin: 0;
    color: var(--site-muted, #536276);
    font-size: 15px;
    line-height: 1.7;
}

.teacher-profile__courses {
    margin-block-start: 40px;
}

.teacher-section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-block-end: 20px;
}

.teacher-section-heading > span {
    display: inline-grid;
    min-width: 32px;
    height: 32px;
    place-items: center;
    padding-inline: 8px;
    border-radius: 7px;
    background: var(--site-blue-soft, #edf2f8);
    color: var(--site-blue, #244a80);
    font-size: 13px;
    font-weight: 800;
}

.teacher-course-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.teacher-course {
    display: flex;
    flex-direction: column;
}

.teacher-course__image {
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-block-end: 1px solid var(--site-line, #dce2e8);
    background: #f2f4f6;
}

.teacher-course__image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.teacher-course__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
    padding: 22px;
}

.teacher-course__category {
    align-self: start;
    color: var(--site-blue, #244a80);
    font-size: 12px;
    font-weight: 800;
    line-height: 1.4;
}

.teacher-course h3 {
    margin: 12px 0 16px;
    color: var(--site-ink, #12243a);
    font-size: 21px;
    font-weight: 800;
    line-height: 1.35;
}

.teacher-course__details {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    margin-block-end: 18px;
    color: var(--site-muted, #536276);
    font-size: 13px;
    line-height: 1.4;
}

.teacher-course__details [aria-hidden] {
    color: var(--site-gold-text, #8b6828);
}

.teacher-course__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-block-start: auto;
    padding-block-start: 17px;
    border-block-start: 1px solid var(--site-line, #dce2e8);
}

.teacher-course__footer strong {
    color: var(--site-ink, #12243a);
    font-size: 15px;
    font-weight: 800;
}

.teacher-side-panel {
    padding: 24px;
}

.teacher-side-panel + .teacher-side-panel {
    margin-block-start: 16px;
}

.teacher-side-panel h2 {
    margin-block-end: 14px;
    font-size: 17px;
}

.teacher-profile__socials {
    display: grid;
}

.teacher-profile__socials a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 42px;
    padding-block: 8px;
    border-block-start: 1px solid var(--site-line, #dce2e8);
    color: var(--site-blue, #244a80) !important;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none !important;
}

.teacher-profile__socials a:hover {
    text-decoration: underline !important;
}

@media (max-width: 1000px) {
    .teacher-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .teacher-profile__layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .teacher-profile__aside {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }

    .teacher-side-panel + .teacher-side-panel {
        margin-block-start: 0;
    }
}

@media (max-width: 700px) {
    .teacher-profile__hero {
        grid-template-columns: minmax(0, 1fr);
        gap: 24px;
    }

    .teacher-profile__portrait {
        width: min(100%, 250px);
        height: 250px;
    }

    .teacher-course-grid,
    .teacher-profile__aside {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 640px) {
    .teacher-page,
    .teacher-profile {
        padding-block-end: 56px;
    }

    .teacher-breadcrumb {
        padding-block: 18px;
    }

    .teacher-page__intro {
        align-items: start;
        flex-direction: column;
        gap: 24px;
        padding-block: 28px 32px;
    }

    .teacher-page__intro h1,
    .teacher-profile__hero h1 {
        font-size: 36px;
    }

    .teacher-page__intro p {
        font-size: 16px;
    }

    .teacher-page__count {
        min-width: 0;
    }

    .teacher-page__count strong {
        font-size: 28px;
    }

    .teacher-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 16px;
        padding-block-start: 32px;
    }

    .teacher-card__body {
        min-height: 0;
        padding: 16px;
    }

    .teacher-page__elite-heading {
        align-items: start;
        flex-direction: column;
        gap: 8px;
    }

    .teacher-profile__hero {
        margin-block: 24px 32px;
        padding: 20px;
    }

    .teacher-profile__portrait {
        width: 100%;
        height: auto;
        aspect-ratio: 1 / 1;
    }

    .teacher-profile__stats {
        gap: 20px 28px;
    }

    .teacher-profile__about,
    .teacher-side-panel {
        padding: 22px;
    }

    .teacher-profile__courses {
        margin-block-start: 32px;
    }
}

@media (max-width: 380px) {
    .teacher-card {
        grid-template-columns: 94px minmax(0, 1fr);
    }
    .teacher-card h3 {
        font-size: 18px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .teacher-card,
    .teacher-course,
    .teacher-text-link [aria-hidden] {
        transition: none;
    }
}
