/**
 * Instructor profile + teacher listing.
 *
 * @package TeacherTo
 */

/* ---------- Hero ---------- */
.tt-profile .tt-page-body { padding-bottom: calc(var(--tt-bottom-nav-h) + 1.5rem); }

.tt-prof-hero {
    position: relative;
    overflow: hidden;
    border-radius: var(--tt-r-lg);
    padding: 1.35rem 1.1rem 0;
    margin-bottom: 1.1rem;
    color: #fff;
    background:
        radial-gradient(circle at 86% 8%, rgba(255, 183, 3, .5), transparent 52%),
        radial-gradient(circle at 8% 96%, rgba(0, 168, 232, .38), transparent 55%),
        linear-gradient(135deg, #b3163a 0%, #8a0b2a 52%, #5c0018 100%);
    box-shadow: var(--tt-sh-lg);
}
.tt-prof-hero__blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(38px);
    opacity: .5;
    pointer-events: none;
}
.tt-prof-hero__blob--1 {
    width: 190px; height: 190px;
    top: -70px; inset-inline-end: -40px;
    background: rgba(255, 183, 3, .65);
    animation: tt-float 9s ease-in-out infinite;
}
.tt-prof-hero__blob--2 {
    width: 160px; height: 160px;
    bottom: 40px; inset-inline-start: -60px;
    background: rgba(0, 168, 232, .5);
    animation: tt-float 11s ease-in-out infinite reverse;
}

.tt-prof-hero__inner {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .9rem;
    text-align: center;
    padding-bottom: 1.25rem;
}

.tt-prof-hero__avatar {
    position: relative;
    flex: 0 0 auto;
}
.tt-prof-hero__avatar img,
.tt-prof-hero__avatar .tt-avatar-initial {
    width: 96px;
    height: 96px;
    border-radius: 30px;
    object-fit: cover;
    display: grid;
    place-items: center;
    font-size: 2rem;
    font-weight: 900;
    border: 3px solid rgba(255, 255, 255, .55);
    box-shadow: 0 18px 34px -14px rgba(0, 0, 0, .55);
}
.tt-prof-hero__verified {
    position: absolute;
    bottom: -6px;
    inset-inline-start: -6px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: linear-gradient(145deg, #ffc93c, #f39c12);
    color: #fff;
    border: 2.5px solid #8a0b2a;
    box-shadow: var(--tt-sh-gold);
}
.tt-prof-hero__verified .material-symbols-outlined { font-size: 1rem; }

.tt-prof-hero__main { min-width: 0; }
.tt-prof-hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .22rem .7rem;
    border-radius: var(--tt-r-full);
    background: rgba(255, 255, 255, .16);
    border: 1px solid rgba(255, 255, 255, .28);
    font-size: .64rem;
    font-weight: 800;
    backdrop-filter: blur(6px);
}
.tt-prof-hero__eyebrow .material-symbols-outlined { font-size: .95rem; }
.tt-prof-hero__name {
    margin: .45rem 0 .15rem;
    font-size: clamp(1.35rem, 6vw, 2rem);
    font-weight: 900;
    line-height: 1.25;
    letter-spacing: -.02em;
}
.tt-prof-hero__headline {
    margin: 0;
    font-size: .8rem;
    font-weight: 600;
    opacity: .92;
    line-height: 1.8;
}
.tt-prof-hero__rating {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    margin-top: .55rem;
    padding: .25rem .7rem;
    border-radius: var(--tt-r-full);
    background: rgba(0, 0, 0, .18);
    font-size: .72rem;
}
.tt-prof-hero__rating strong { font-weight: 900; }
.tt-stars { display: inline-flex; color: var(--tt-gold); }
.tt-stars .material-symbols-outlined { font-size: 1rem; font-variation-settings: 'FILL' 1; }
.tt-prof-hero__reviews { opacity: .8; font-size: .66rem; }

.tt-prof-hero__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .45rem;
    margin-top: .9rem;
    width: 100%;
}
.tt-prof-hero__actions .tt-btn:first-child { grid-column: 1 / -1; }
.tt-prof-hero__actions .tt-btn {
    min-height: 42px;
    padding: .45rem .8rem;
    font-size: .74rem;
    justify-content: center;
}
.tt-prof-hero__actions .tt-btn .material-symbols-outlined { font-size: 1.05rem; }
.tt-prof-hero__actions .tt-btn--ghost {
    background: rgba(255, 255, 255, .14);
    border: 1.5px solid rgba(255, 255, 255, .4);
    color: #fff;
}
.tt-prof-hero__actions .tt-btn--ghost:hover {
    background: rgba(255, 255, 255, .26);
    color: #fff;
}

/* Stats strip */
.tt-prof-stats {
    position: relative;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .3rem;
    padding: .8rem .3rem;
    margin: 0 -.15rem;
    border-top: 1px solid rgba(255, 255, 255, .18);
    text-align: center;
}
.tt-prof-stat strong {
    display: block;
    font-size: 1rem;
    font-weight: 900;
    line-height: 1.3;
}
.tt-prof-stat span {
    font-size: .58rem;
    font-weight: 700;
    opacity: .82;
    line-height: 1.6;
}

/* ---------- Layout ---------- */
.tt-prof-grid { display: grid; gap: .9rem; }
.tt-prof-main,
.tt-prof-aside { display: flex; flex-direction: column; gap: .9rem; min-width: 0; }

.tt-prof-card {
    background: var(--tt-surface);
    border: 1.5px solid var(--tt-line);
    border-radius: var(--tt-r-md);
    padding: 1rem;
    box-shadow: var(--tt-sh-sm);
}
.tt-prof-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    margin-bottom: .75rem;
}
.tt-prof-card__head .tt-prof-card__title { margin-bottom: 0; }
.tt-prof-card__title {
    display: flex;
    align-items: center;
    gap: .4rem;
    margin: 0 0 .75rem;
    font-size: .92rem;
    font-weight: 900;
    color: var(--tt-text);
}
.tt-prof-card__title .material-symbols-outlined {
    font-size: 1.2rem;
    color: var(--tt-primary);
}
.tt-prof-card__link {
    font-size: .7rem;
    font-weight: 800;
    color: var(--tt-primary);
    text-decoration: none;
    white-space: nowrap;
}
.tt-prof-card__link:hover { text-decoration: underline; }

.tt-prof-bio {
    font-size: .82rem;
    line-height: 2;
    color: var(--tt-text-2);
}
.tt-prof-bio p { margin: 0 0 .6rem; }
.tt-prof-bio p:last-child { margin-bottom: 0; }

/* Chips */
.tt-chips { display: flex; flex-wrap: wrap; gap: .35rem; }
.tt-chip {
    display: inline-flex;
    align-items: center;
    padding: .3rem .7rem;
    border-radius: var(--tt-r-full);
    font-size: .7rem;
    font-weight: 800;
    color: var(--tt-primary);
    background: color-mix(in srgb, var(--tt-primary) 8%, var(--tt-surface));
    border: 1.5px solid color-mix(in srgb, var(--tt-primary) 18%, transparent);
}

/* Timeline */
.tt-timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .55rem; }
.tt-timeline__item {
    position: relative;
    display: flex;
    gap: .7rem;
    padding-inline-start: .95rem;
}
.tt-timeline__item::before {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    top: .55rem;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--tt-primary);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--tt-primary) 14%, transparent);
}
.tt-timeline__item:not(:last-child)::after {
    content: "";
    position: absolute;
    inset-inline-start: 4px;
    top: 1.3rem;
    bottom: -.55rem;
    width: 1.5px;
    background: var(--tt-line);
}
.tt-timeline--edu .tt-timeline__item::before { background: var(--tt-azure); box-shadow: 0 0 0 4px rgba(0, 168, 232, .16); }
.tt-timeline__year {
    flex: 0 0 auto;
    font-size: .66rem;
    font-weight: 900;
    color: var(--tt-text-3);
    padding-top: .1rem;
    font-variant-numeric: tabular-nums;
}
.tt-timeline__body { display: flex; flex-direction: column; min-width: 0; }
.tt-timeline__body strong { font-size: .78rem; font-weight: 800; line-height: 1.7; }
.tt-timeline__body span { font-size: .68rem; color: var(--tt-text-3); line-height: 1.7; }

/* Contact list */
.tt-prof-contact__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .4rem; }
.tt-prof-contact__list a {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .5rem;
    border-radius: var(--tt-r-sm);
    background: var(--tt-surface-2);
    border: 1.5px solid var(--tt-line);
    text-decoration: none;
    transition: transform .2s cubic-bezier(.34, 1.56, .64, 1), box-shadow .2s ease;
}
.tt-prof-contact__list a:hover {
    transform: translateY(-2px);
    box-shadow: var(--tt-sh-sm);
}
.tt-prof-contact__icon {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    color: #fff;
}
.tt-prof-contact__icon .material-symbols-outlined { font-size: 1.1rem; }
.tt-prof-contact__icon--mint { background: linear-gradient(145deg, #45d6c6, #17a398); box-shadow: var(--tt-sh-mint); }
.tt-prof-contact__icon--azure { background: linear-gradient(145deg, #4dc3f5, #0077b6); box-shadow: var(--tt-sh-azure); }
.tt-prof-contact__icon--pink { background: linear-gradient(145deg, #ff5c9d, #d81b60); box-shadow: var(--tt-sh-pink); }
.tt-prof-contact__text { display: flex; flex-direction: column; min-width: 0; }
.tt-prof-contact__text em {
    font-style: normal;
    font-size: .6rem;
    color: var(--tt-text-3);
    font-weight: 700;
}
.tt-prof-contact__text strong {
    font-size: .74rem;
    font-weight: 800;
    color: var(--tt-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* CTA card */
.tt-prof-cta {
    text-align: center;
    background:
        radial-gradient(circle at 80% 10%, rgba(255, 183, 3, .3), transparent 58%),
        var(--tt-surface-2);
}
.tt-prof-cta__emoji {
    display: inline-grid;
    place-items: center;
    width: 62px;
    height: 62px;
    border-radius: 22px;
    font-size: 1.9rem;
    margin-bottom: .5rem;
    background: var(--tt-surface);
    box-shadow: var(--tt-sh-sm);
    animation: tt-float 5s ease-in-out infinite;
}
.tt-prof-cta h3 { margin: 0 0 .3rem; font-size: .88rem; font-weight: 900; line-height: 1.7; }
.tt-prof-cta p { margin: 0 0 .8rem; font-size: .72rem; color: var(--tt-text-3); }

/* Other instructors */
.tt-prof-others { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .3rem; }
.tt-prof-others a {
    display: flex;
    align-items: center;
    gap: .55rem;
    padding: .4rem;
    border-radius: var(--tt-r-sm);
    text-decoration: none;
    transition: background .18s ease;
}
.tt-prof-others a:hover { background: var(--tt-surface-2); }
.tt-prof-others img,
.tt-prof-others .tt-avatar-initial {
    width: 38px;
    height: 38px;
    border-radius: 13px;
    object-fit: cover;
    display: grid;
    place-items: center;
    font-size: .85rem;
    font-weight: 900;
    flex: 0 0 auto;
}
.tt-prof-others span { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; }
.tt-prof-others strong { font-size: .74rem; font-weight: 800; color: var(--tt-text); }
.tt-prof-others em {
    font-style: normal;
    font-size: .62rem;
    color: var(--tt-text-3);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.tt-prof-others > li > a > .material-symbols-outlined {
    font-size: 1.1rem;
    color: var(--tt-text-3);
}

/* Course grid inside the profile */
.tt-prof-courses { grid-template-columns: 1fr; }
@media (min-width: 560px) {
    .tt-prof-courses { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.tt-empty--inline { padding: 1.5rem 1rem; background: var(--tt-surface-2); }

@media (min-width: 768px) {
    .tt-prof-hero { padding: 1.75rem 1.75rem 0; }
    .tt-prof-hero__inner {
        flex-direction: row;
        align-items: center;
        text-align: start;
        gap: 1.35rem;
        padding-bottom: 1.5rem;
    }
    .tt-prof-hero__avatar img,
    .tt-prof-hero__avatar .tt-avatar-initial { width: 132px; height: 132px; border-radius: 38px; font-size: 2.6rem; }
    .tt-prof-hero__actions {
        display: flex;
        flex-wrap: wrap;
        justify-content: flex-start;
        width: auto;
    }
    .tt-prof-hero__actions .tt-btn:first-child { grid-column: auto; }
    .tt-prof-hero__actions .tt-btn { padding: .5rem 1.05rem; }
    .tt-prof-stats { padding: .95rem .5rem; }
    .tt-prof-stat strong { font-size: 1.15rem; }
    .tt-prof-stat span { font-size: .66rem; }
}

@media (min-width: 900px) {
    .tt-prof-grid { grid-template-columns: minmax(0, 1fr) 320px; align-items: start; gap: 1.15rem; }
    .tt-prof-aside { position: sticky; top: calc(var(--tt-header-h) + 1rem); }
}
@media (min-width: 1024px) {
    .tt-profile .tt-page-body { padding-bottom: 3rem; }
}

/* ---------- Dark mode ---------- */
html[data-theme="dark"] .tt-prof-card { background: var(--tt-surface); border-color: var(--tt-line); }
html[data-theme="dark"] .tt-prof-contact__list a,
html[data-theme="dark"] .tt-prof-cta { background: var(--tt-surface-2); border-color: var(--tt-line); }
html[data-theme="dark"] .tt-prof-cta__emoji { background: var(--tt-surface-3); }
html[data-theme="dark"] .tt-chip { background: rgba(255, 255, 255, .06); color: var(--tt-primary); }
html[data-theme="dark"] .tt-prof-others a:hover { background: var(--tt-surface-2); }
html[data-theme="dark"] .tt-empty--inline { background: var(--tt-surface-2); }

/* ---------- Teachers listing cards ---------- */
.tt-teacher {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .3rem;
    padding: 1rem .7rem;
    border-radius: var(--tt-r-md);
    background: var(--tt-surface);
    border: 1.5px solid var(--tt-line);
    text-decoration: none;
    text-align: center;
    transition: transform .25s cubic-bezier(.34, 1.56, .64, 1), box-shadow .25s ease;
}
.tt-teacher:hover {
    transform: translateY(-5px);
    box-shadow: var(--tt-sh);
    border-color: color-mix(in srgb, var(--tt-primary) 30%, var(--tt-line));
}
.tt-teacher__avatar img,
.tt-teacher__avatar .tt-avatar-initial {
    width: 66px;
    height: 66px;
    border-radius: 22px;
    object-fit: cover;
    display: grid;
    place-items: center;
    font-size: 1.4rem;
    font-weight: 900;
    margin-bottom: .2rem;
}
.tt-teacher__name { font-size: .8rem; font-weight: 900; color: var(--tt-text); }
.tt-teacher__role {
    font-size: .66rem;
    color: var(--tt-text-3);
    line-height: 1.7;
    min-height: 3.4em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.tt-teacher__stars {
    display: inline-flex;
    align-items: center;
    gap: .15rem;
    margin-top: .2rem;
    font-size: .66rem;
    font-weight: 800;
    color: var(--tt-gold);
}
.tt-teacher__stars .material-symbols-outlined { font-size: .95rem; font-variation-settings: 'FILL' 1; }
html[data-theme="dark"] .tt-teacher { background: var(--tt-surface); border-color: var(--tt-line); }
