.teacher-profile {
    --tp-brand: #ff004c;
    --tp-brand-dark: #d1003f;
    --tp-brand-soft: #fff0f4;
    --tp-ink: #111318;
    --tp-text: #4b5160;
    --tp-muted: #6b7280;
    --tp-line: #eef0f3;
    --tp-gold: #f5a524;
    --tp-card-shadow: 0 1px 2px rgba(28, 29, 33, 0.04), 0 14px 36px rgba(28, 29, 33, 0.06);
    background: #f4f8f9;
    padding: 4px 0 56px;
    direction: rtl;
    color: #1a1c21;
    -webkit-font-smoothing: antialiased;
    scroll-behavior: smooth;
}

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

.teacher-profile .tp-section,
.teacher-profile .tp-hero {
    scroll-margin-top: 90px;
}

/* ---------- Breadcrumb ---------- */
.tp-crumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 16px 2px 0;
    color: var(--tp-muted);
    font-size: 13px;
}

.tp-crumbs a {
    color: var(--tp-muted);
    text-decoration: none;
}

.tp-crumbs a:hover {
    color: var(--tp-brand);
}

.tp-crumbs [aria-current] {
    color: var(--tp-ink);
    font-weight: 700;
}

/* ---------- Hero ---------- */
.tp-hero {
    position: relative;
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr) 250px;
    grid-template-areas:
        "photo copy score"
        "stats stats stats";
    gap: 26px 32px;
    margin-top: 14px;
    padding: 30px;
    border-radius: 28px;
    background: #fff;
    box-shadow: var(--tp-card-shadow);
    overflow: hidden;
    isolation: isolate;
}

.tp-hero::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 120px;
    background:
        radial-gradient(600px 160px at 85% -40px, rgba(255, 0, 76, 0.10), transparent 70%),
        radial-gradient(500px 140px at 10% -60px, rgba(245, 165, 36, 0.10), transparent 70%);
    z-index: -1;
}

.tp-photo {
    grid-area: photo;
    position: relative;
    align-self: start;
    aspect-ratio: 4 / 5;
    border-radius: 24px;
    overflow: hidden;
    background: linear-gradient(160deg, #ffe3ec, #fff6e6);
    box-shadow: 0 18px 40px rgba(17, 19, 24, 0.12);
}

.tp-photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
}

.tp-photo-alt {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.45s ease;
}

.tp-photo.has-alt:hover .tp-photo-alt {
    opacity: 1;
}

.tp-photo-empty {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    color: var(--tp-brand);
    font-size: 84px;
    font-weight: 800;
}

.tp-badge {
    position: absolute;
    inset: auto 12px 12px 12px;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 7px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(6px);
    color: var(--tp-ink);
    font-size: 12px;
    font-weight: 800;
    line-height: 1.5;
    box-shadow: 0 6px 18px rgba(17, 19, 24, 0.12);
}

.tp-badge svg {
    flex: none;
    padding: 2px;
    border-radius: 50%;
    background: #12a150;
    color: #fff;
    box-sizing: content-box;
}

.tp-copy {
    grid-area: copy;
    min-width: 0;
    padding-top: 6px;
}

.tp-copy h1 {
    margin: 0;
    padding: 0;
    color: var(--tp-ink);
    font-size: clamp(1.6rem, 1.2rem + 1.3vw, 2.25rem);
    font-weight: 800;
    line-height: 1.45;
}

.tp-headline {
    margin: 4px 0 0;
    color: var(--tp-brand);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.8;
}

.tp-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 14px 0 0;
    padding: 0;
    list-style: none;
}

.tp-skills li {
    margin: 0;
    padding: 4px 12px;
    border: 1px solid #ffd6e2;
    border-radius: 999px;
    background: var(--tp-brand-soft);
    color: #a3002f;
    font-size: 12.5px;
    font-weight: 700;
    line-height: 1.7;
}

.tp-bio {
    margin-top: 14px;
    max-width: 72ch;
}

.tp-bio-text {
    color: var(--tp-text);
    font-size: 14.5px;
    line-height: 2.05;
    text-align: justify;
    overflow-wrap: anywhere;
}

.tp-bio-text p {
    margin: 0 0 8px;
}

.tp-bio-text p:last-child {
    margin-bottom: 0;
}

.tp-bio:not(.is-short):not(.is-open) .tp-bio-text {
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tp-bio-more {
    margin: 4px 0 0;
    padding: 0;
    border: 0;
    background: none;
    color: var(--tp-brand);
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
}

.tp-bio-more[hidden] {
    display: none;
}

.tp-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.tp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 44px;
    padding: 0 20px;
    border: 1px solid #e4e7ec;
    border-radius: 14px;
    background: #fff;
    color: var(--tp-ink);
    font-size: 14px;
    font-weight: 800;
    line-height: 1;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.tp-btn:hover {
    border-color: var(--tp-brand);
    color: var(--tp-brand);
}

.tp-btn.is-primary {
    border-color: var(--tp-brand);
    background: var(--tp-brand);
    color: #fff;
    box-shadow: 0 10px 24px rgba(255, 0, 76, 0.25);
}

.tp-btn.is-primary:hover {
    background: var(--tp-brand-dark);
    color: #fff;
    transform: translateY(-1px);
}

.tp-btn:focus-visible,
.tp-tabs a:focus-visible,
.tp-bio-more:focus-visible {
    outline: 2px solid var(--tp-brand);
    outline-offset: 3px;
}

/* ---------- Score card ---------- */
.tp-score {
    grid-area: score;
    align-self: start;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 22px 18px;
    border-radius: 22px;
    background: linear-gradient(165deg, #1b1d24 0%, #2b1820 100%);
    color: #fff;
    text-align: center;
    box-shadow: 0 18px 40px rgba(27, 29, 36, 0.25);
}

.tp-score-label {
    color: rgba(255, 255, 255, 0.7);
    font-size: 12.5px;
    font-weight: 700;
}

.tp-score-value {
    font-size: 52px;
    font-weight: 900;
    line-height: 1.15;
    font-variant-numeric: tabular-nums;
}

.tp-score-value small {
    margin-inline-start: 2px;
    color: rgba(255, 255, 255, 0.55);
    font-size: 18px;
    font-weight: 700;
}

.tp-score-value.is-empty {
    color: rgba(255, 255, 255, 0.5);
}

.tp-score-count {
    color: rgba(255, 255, 255, 0.72);
    font-size: 12.5px;
    line-height: 1.8;
}

.tp-score-satisfied {
    width: 100%;
    margin-top: 8px;
    padding: 10px 8px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.8);
    font-size: 12px;
    line-height: 1.8;
}

.tp-score-satisfied b {
    display: block;
    color: #4ade80;
    font-size: 20px;
    font-weight: 900;
}

/* Stars: grey track with a gold layer clipped to --tp-fill. */
.tp-stars {
    position: relative;
    display: inline-block;
    font-size: 18px;
    line-height: 1;
    letter-spacing: 2px;
    white-space: nowrap;
}

.tp-stars::before {
    content: "★★★★★";
    color: #d9dde3;
}

.tp-stars::after {
    content: "★★★★★";
    position: absolute;
    inset: 0 0 0 auto;
    width: var(--tp-fill, 0%);
    overflow: hidden;
    color: var(--tp-gold);
}

.tp-score .tp-stars::before {
    color: rgba(255, 255, 255, 0.18);
}

.tp-stars.is-large {
    font-size: 24px;
}

.tp-stars.is-small {
    font-size: 14px;
    letter-spacing: 1px;
}

/* ---------- Stats ---------- */
.tp-stats {
    grid-area: stats;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.tp-stats li {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    align-items: center;
    column-gap: 12px;
    margin: 0;
    padding: 14px 16px;
    border: 1px solid var(--tp-line);
    border-radius: 18px;
    background: #fafbfc;
}

.tp-stats b {
    color: var(--tp-ink);
    font-size: 1.35rem;
    font-weight: 900;
    line-height: 1.3;
    font-variant-numeric: tabular-nums;
}

.tp-stats li > span:last-child {
    grid-column: 2;
    color: var(--tp-muted);
    font-size: 12.5px;
    line-height: 1.6;
}

.tp-stat-icon {
    grid-row: span 2;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background-color: var(--tp-brand-soft);
    position: relative;
}

.tp-stat-icon::before {
    content: "";
    position: absolute;
    inset: 11px;
    background: var(--tp-brand);
    -webkit-mask: var(--tp-icon) center / contain no-repeat;
    mask: var(--tp-icon) center / contain no-repeat;
}

.tp-stat-icon.is-courses {
    --tp-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 19.5V5a2 2 0 0 1 2-2h14v15H6a2 2 0 0 0-2 2Zm0 0A2 2 0 0 0 6 22h14v-4'/%3E%3C/svg%3E");
}

.tp-stat-icon.is-students {
    --tp-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='8' r='4'/%3E%3Cpath d='M2 21a7 7 0 0 1 14 0M16 3.5a4 4 0 0 1 0 9M22 21a7 7 0 0 0-4-6.3'/%3E%3C/svg%3E");
    background-color: #ecfdf3;
}

.tp-stat-icon.is-students::before {
    background: #12a150;
}

.tp-stat-icon.is-years {
    --tp-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/svg%3E");
    background-color: #fff7e6;
}

.tp-stat-icon.is-years::before {
    background: #d48806;
}

.tp-stat-icon.is-comments {
    --tp-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 12a8 8 0 0 1-11.6 7.1L4 20.5l1.4-4.9A8 8 0 1 1 21 12Z'/%3E%3C/svg%3E");
    background-color: #eef4ff;
}

.tp-stat-icon.is-comments::before {
    background: #2f6bff;
}

.tp-stat-icon.is-certs {
    --tp-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='9' r='6'/%3E%3Cpath d='m8.5 14-1.5 8 5-3 5 3-1.5-8'/%3E%3C/svg%3E");
    background-color: #f5f0ff;
}

.tp-stat-icon.is-certs::before {
    background: #7c3aed;
}

/* ---------- In-page tabs ---------- */
.tp-tabs {
    display: flex;
    gap: 8px;
    margin: 18px 0 0;
    padding: 6px;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(28, 29, 33, 0.04);
    overflow-x: auto;
    scrollbar-width: none;
}

.tp-tabs::-webkit-scrollbar {
    display: none;
}

.tp-tabs a {
    flex: none;
    padding: 9px 18px;
    border-radius: 13px;
    color: var(--tp-text);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
}

.tp-tabs a:hover,
.tp-tabs a.is-active {
    background: var(--tp-brand-soft);
    color: var(--tp-brand);
}

/* ---------- Sections ---------- */
.tp-section {
    margin-top: 34px;
}

.tp-section-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 16px;
    margin-bottom: 16px;
}

.tp-section-head h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 0;
    color: var(--tp-ink);
    font-size: 21px;
    font-weight: 800;
    line-height: 1.6;
}

.tp-section-head h2::before {
    content: "";
    flex: none;
    width: 5px;
    height: 22px;
    border-radius: 5px;
    background: var(--tp-brand);
}

.tp-section-sub {
    color: var(--tp-muted);
    font-size: 13px;
}

.tp-section-link {
    color: var(--tp-brand);
    font-size: 13.5px;
    font-weight: 800;
    text-decoration: none;
}

.teacher-profile .teacher-courses {
    margin: 0;
}

/* ---------- Resume sections (shared Renderer markup) ---------- */
.teacher-profile .arya-profile-sections {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin: 0;
}

.teacher-profile .arya-profile-section {
    min-width: 0;
    padding: 22px;
    border: 0;
    border-radius: 24px;
    background: #fff;
    box-shadow: var(--tp-card-shadow);
}

.teacher-profile .arya-profile-section:only-child,
.teacher-profile .arya-profile-section:first-child:has(+ .is-certs:last-child),
.teacher-profile .arya-profile-section.is-certs {
    grid-column: 1 / -1;
}

.teacher-profile .arya-profile-sections:has(.arya-profile-section--education):has(.arya-profile-section--honor) .arya-profile-section--experience {
    grid-row: span 2;
}

.teacher-profile .arya-profile-head {
    margin-bottom: 16px;
}

.teacher-profile .arya-profile-section h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    color: var(--tp-ink);
    font-size: 17px;
    font-weight: 800;
    line-height: 1.6;
}

.teacher-profile .arya-profile-section h2::before {
    content: "";
    flex: none;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: var(--tp-brand-soft) var(--tp-section-icon) center / 20px no-repeat;
}

.teacher-profile .arya-profile-section--experience {
    --tp-section-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ff004c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='7' width='18' height='13' rx='2'/%3E%3Cpath d='M8 7V5a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2M3 13h18'/%3E%3C/svg%3E");
}

.teacher-profile .arya-profile-section--education {
    --tp-section-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ff004c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m2 9 10-5 10 5-10 5Z'/%3E%3Cpath d='M6 11v5c3 2.5 9 2.5 12 0v-5M22 9v6'/%3E%3C/svg%3E");
}

.teacher-profile .arya-profile-section--honor {
    --tp-section-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ff004c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 21h8M12 17v4M7 4h10v5a5 5 0 0 1-10 0Z'/%3E%3Cpath d='M17 5h3v2a4 4 0 0 1-4 4M7 5H4v2a4 4 0 0 0 4 4'/%3E%3C/svg%3E");
}

.teacher-profile .arya-profile-section--certificate {
    --tp-section-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ff004c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='9' r='6'/%3E%3Cpath d='m8.5 14-1.5 8 5-3 5 3-1.5-8'/%3E%3C/svg%3E");
}

.teacher-profile .arya-profile-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    margin: 0;
    padding: 0 8px;
    border-radius: 999px;
    background: #f1f3f5;
    color: var(--tp-muted);
    font-size: 12px;
    font-weight: 800;
    line-height: 1.8;
}

.teacher-profile .arya-profile-copy {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.teacher-profile .arya-profile-copy strong {
    color: var(--tp-ink);
    font-size: 15px;
    line-height: 1.7;
    overflow-wrap: anywhere;
}

.teacher-profile .arya-profile-copy p {
    margin: 0;
    color: #5c6770;
    font-size: 13.5px;
    line-height: 1.9;
}

.teacher-profile .arya-profile-meta {
    gap: 6px;
}

.teacher-profile .arya-profile-meta span {
    padding: 2px 10px;
    border-radius: 999px;
    background: #f4f6f8;
    color: #3d484e;
    font-size: 12px;
    line-height: 1.8;
}

.teacher-profile .arya-profile-meta span + span::before {
    content: none;
}

.teacher-profile .arya-profile-meta .is-period {
    background: var(--tp-brand-soft);
    color: #b0002f;
    font-weight: 800;
}

/* Experience and education read as a vertical timeline. */
.teacher-profile .arya-profile-section--experience .arya-profile-list,
.teacher-profile .arya-profile-section--education .arya-profile-list {
    position: relative;
    gap: 0;
    padding-inline-start: 26px;
}

.teacher-profile .arya-profile-section--experience .arya-profile-list::before,
.teacher-profile .arya-profile-section--education .arya-profile-list::before {
    content: "";
    position: absolute;
    inset-block: 8px 8px;
    inset-inline-start: 7px;
    width: 2px;
    border-radius: 2px;
    background: linear-gradient(to bottom, #ffc2d3, #eef0f3);
}

.teacher-profile .arya-profile-section--experience .arya-profile-item,
.teacher-profile .arya-profile-section--education .arya-profile-item {
    position: relative;
    padding: 0 0 18px;
    border: 0;
}

.teacher-profile .arya-profile-section--experience .arya-profile-item:last-child,
.teacher-profile .arya-profile-section--education .arya-profile-item:last-child {
    padding-bottom: 0;
}

.teacher-profile .arya-profile-section--experience .arya-profile-item::before,
.teacher-profile .arya-profile-section--education .arya-profile-item::before {
    content: "";
    position: absolute;
    top: 6px;
    inset-inline-start: -25px;
    width: 14px;
    height: 14px;
    border: 3px solid var(--tp-brand);
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 0 4px #fff;
}

.teacher-profile .arya-profile-section--experience .arya-profile-meta .is-period,
.teacher-profile .arya-profile-section--education .arya-profile-meta .is-period {
    order: -1;
}

/* Honors read as award cards. */
.teacher-profile .arya-profile-section--honor .arya-profile-list {
    display: grid;
    gap: 10px;
}

.teacher-profile .arya-profile-section--honor .arya-profile-item,
.teacher-profile .arya-profile-section--honor .arya-profile-item:first-child {
    padding: 14px 16px;
    border: 1px solid #fde7c2;
    border-radius: 16px;
    background: linear-gradient(135deg, #fffaf0 0%, #fff 70%);
}

.teacher-profile .arya-profile-section--honor .arya-profile-item::before {
    content: "🏆";
    flex: none;
    font-size: 22px;
    line-height: 1.4;
}

.teacher-profile .arya-profile-section--honor .arya-profile-meta span {
    background: #fff3d6;
    color: #8a5a00;
}

/* Certificates: horizontal gallery that opens in the lightbox. */
.teacher-profile .arya-profile-nav {
    display: flex;
    gap: 8px;
}

.teacher-profile .is-certs.is-static .arya-profile-nav {
    display: none;
}

.teacher-profile .arya-profile-nav button {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    margin: 0;
    padding: 0;
    border: 1px solid #ebedf0;
    border-radius: 999px;
    background: #fff;
    color: #1c2428;
    cursor: pointer;
    transition: border-color 0.2s ease, color 0.2s ease;
}

.teacher-profile .arya-profile-nav button:hover:not(:disabled) {
    border-color: var(--tp-brand);
    color: var(--tp-brand);
}

.teacher-profile .arya-profile-nav button:disabled {
    opacity: 0.35;
    cursor: default;
}

.teacher-profile .is-certs .arya-profile-scroller {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    margin: -6px;
    padding: 6px;
}

.teacher-profile .is-certs .arya-profile-scroller::-webkit-scrollbar {
    display: none;
}

.teacher-profile .is-certs .arya-profile-list {
    display: flex;
    gap: 14px;
    width: max-content;
}

.teacher-profile .is-certs .arya-profile-item,
.teacher-profile .is-certs .arya-profile-item:first-child {
    display: flex;
    flex-direction: column;
    flex: 0 0 250px;
    width: 250px;
    gap: 10px;
    margin: 0;
    padding: 10px 10px 14px;
    border: 1px solid var(--tp-line);
    border-radius: 20px;
    background: #fff;
    scroll-snap-align: start;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.teacher-profile .is-certs .arya-profile-item.is-image-only {
    padding-bottom: 10px;
}

.teacher-profile .is-certs .arya-profile-item:hover {
    border-color: #ffd1de;
    box-shadow: 0 12px 28px rgba(28, 29, 33, 0.08);
}

.teacher-profile .is-certs .arya-profile-photo {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 14px;
    background: #f5f6f8;
    cursor: zoom-in;
}

.teacher-profile .is-certs .arya-profile-photo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 0;
    background: transparent;
    transition: transform 0.35s ease;
}

.teacher-profile .is-certs .arya-profile-item:hover .arya-profile-photo img {
    transform: scale(1.04);
}

.teacher-profile .is-certs a.arya-profile-photo::after {
    content: "";
    position: absolute;
    inset-block-end: 8px;
    inset-inline-start: 8px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(17, 19, 24, 0.7) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='6'/%3E%3Cpath d='m20 20-4.2-4.2M11 8.5v5M8.5 11h5'/%3E%3C/svg%3E") center / 16px no-repeat;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.teacher-profile .is-certs .arya-profile-item:hover a.arya-profile-photo::after,
.teacher-profile .is-certs a.arya-profile-photo:focus-visible::after {
    opacity: 1;
}

.teacher-profile .is-certs .arya-profile-photo.is-empty {
    background: linear-gradient(145deg, #3a121c 0%, var(--tp-brand) 80%);
    color: #fff;
    font-size: 42px;
    font-weight: 800;
    cursor: default;
}

.teacher-profile .is-certs .arya-profile-copy {
    flex: 1;
    padding: 0 4px;
}

.teacher-profile .is-certs .arya-profile-copy strong {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 14px;
}

.teacher-profile .is-certs .arya-profile-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: auto;
    color: #12a150;
    font-size: 12.5px;
    font-weight: 800;
    text-decoration: none;
}

.teacher-profile .is-certs .arya-profile-link::before {
    content: "";
    width: 14px;
    height: 14px;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3 4 6v6c0 5 3.5 8 8 9 4.5-1 8-4 8-9V6Z'/%3E%3Cpath d='m8.5 12 2.5 2.5 4.5-5'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3 4 6v6c0 5 3.5 8 8 9 4.5-1 8-4 8-9V6Z'/%3E%3Cpath d='m8.5 12 2.5 2.5 4.5-5'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* ---------- Reviews ---------- */
.tp-reviews {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.tp-rating-card {
    position: sticky;
    top: 90px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 24px 22px;
    border-radius: 24px;
    background: #fff;
    box-shadow: var(--tp-card-shadow);
    text-align: center;
}

.tp-rating-value {
    color: var(--tp-ink);
    font-size: 54px;
    font-weight: 900;
    line-height: 1.1;
}

.tp-rating-card .tp-stars {
    font-size: 22px;
}

.tp-rating-count {
    color: var(--tp-muted);
    font-size: 12.5px;
}

.tp-breakdown {
    display: grid;
    gap: 8px;
    width: 100%;
    margin: 16px 0 0;
    padding: 16px 0 0;
    border-top: 1px solid var(--tp-line);
    list-style: none;
}

.tp-breakdown li {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr) 38px;
    align-items: center;
    gap: 10px;
    margin: 0;
    font-size: 12.5px;
}

.tp-breakdown-label {
    color: var(--tp-text);
    text-align: start;
    white-space: nowrap;
}

.tp-breakdown-bar {
    height: 8px;
    border-radius: 999px;
    background: #f0f2f5;
    overflow: hidden;
}

.tp-breakdown-bar i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #ffc857, var(--tp-gold));
}

.tp-breakdown-share {
    color: var(--tp-muted);
    font-variant-numeric: tabular-nums;
    text-align: end;
}

.tp-review-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.tp-review {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 0;
    padding: 18px;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(28, 29, 33, 0.04);
    border: 1px solid var(--tp-line);
}

.tp-review-head {
    display: flex;
    align-items: center;
    gap: 10px;
}

.tp-review-avatar {
    display: grid;
    place-items: center;
    flex: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(145deg, #ffe0ea, #ffeccc);
    color: #a3002f;
    font-size: 17px;
    font-weight: 800;
}

.tp-review-who {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.tp-review-who b {
    overflow: hidden;
    color: var(--tp-ink);
    font-size: 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tp-review-who small {
    color: var(--tp-muted);
    font-size: 11.5px;
}

.tp-review p {
    flex: 1;
    margin: 0;
    color: var(--tp-text);
    font-size: 13.5px;
    line-height: 2;
}

.tp-review-course {
    align-self: flex-start;
    max-width: 100%;
    overflow: hidden;
    padding: 3px 10px;
    border-radius: 999px;
    background: #f4f6f8;
    color: #3d484e;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tp-review-course:hover {
    background: var(--tp-brand-soft);
    color: var(--tp-brand);
}

/* ---------- Posts ---------- */
.tp-posts {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.tp-posts > li {
    display: flex;
    margin: 0;
}

.tp-post {
    display: flex;
    flex-direction: column;
    width: 100%;
    overflow: hidden;
    border: 1px solid var(--tp-line);
    border-radius: 18px;
    background: #fff;
    color: inherit;
    text-decoration: none;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.tp-post:hover {
    border-color: #ffd1de;
    box-shadow: 0 10px 28px rgba(28, 29, 33, 0.08);
    color: inherit;
}

.tp-post-thumb {
    display: block;
    aspect-ratio: 16 / 10;
    background: linear-gradient(145deg, #f3f4f6, #fdeef3);
    overflow: hidden;
}

.tp-post-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tp-post-copy {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 10px;
    padding: 14px 16px 16px;
}

.tp-post-copy strong {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: #1a1c21;
    font-size: 15px;
    line-height: 1.65;
}

.tp-post:hover .tp-post-copy strong {
    color: var(--tp-brand);
}

.tp-post-meta {
    display: flex;
    flex-wrap: wrap;
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px dashed #e7e9ee;
    color: var(--tp-muted);
    font-size: 12.5px;
}

.tp-post-meta span + span::before {
    content: "·";
    margin: 0 8px;
    color: #c5c9d1;
}

/* ---------- CTA ---------- */
.tp-cta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 18px 28px;
    margin-top: 40px;
    padding: 28px 32px;
    border-radius: 28px;
    background:
        radial-gradient(420px 200px at 0% 0%, rgba(255, 255, 255, 0.18), transparent 70%),
        linear-gradient(120deg, #ff004c 0%, #c4003a 100%);
    color: #fff;
    box-shadow: 0 20px 44px rgba(255, 0, 76, 0.25);
}

.tp-cta h2 {
    margin: 0 0 6px;
    padding: 0;
    color: #fff;
    font-size: 21px;
    font-weight: 800;
    line-height: 1.6;
}

.tp-cta p {
    margin: 0;
    color: rgba(255, 255, 255, 0.86);
    font-size: 14px;
    line-height: 1.9;
}

.tp-cta-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tp-btn.is-light {
    border-color: #fff;
    background: #fff;
    color: var(--tp-brand);
}

.tp-btn.is-light:hover {
    background: #fff5f8;
    color: var(--tp-brand-dark);
}

.tp-btn.is-outline {
    border-color: rgba(255, 255, 255, 0.6);
    background: transparent;
    color: #fff;
}

.tp-btn.is-outline:hover {
    border-color: #fff;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.tp-back {
    display: inline-block;
    margin-top: 22px;
    color: var(--tp-muted);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.tp-back:hover {
    color: var(--tp-brand);
}

/* ---------- Lightbox ---------- */
.tp-lightbox {
    width: 100vw;
    max-width: 100vw;
    height: 100vh;
    max-height: 100vh;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: #fff;
}

.tp-lightbox[open] {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr) 64px;
    align-items: center;
}

.tp-lightbox::backdrop {
    background: rgba(10, 11, 14, 0.88);
    backdrop-filter: blur(4px);
}

.tp-lightbox figure {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin: 0;
    min-width: 0;
}

.tp-lightbox img {
    max-width: 100%;
    max-height: calc(100vh - 120px);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
}

.tp-lightbox figcaption {
    font-size: 15px;
    font-weight: 700;
    text-align: center;
}

.tp-lightbox button {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    margin: auto;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

.tp-lightbox button:hover {
    background: rgba(255, 255, 255, 0.26);
}

.tp-lightbox button[hidden] {
    visibility: hidden;
}

.tp-lightbox .tp-lightbox-close {
    position: absolute;
    top: 16px;
    inset-inline-end: 16px;
    margin: 0;
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
    .tp-hero {
        grid-template-columns: 200px minmax(0, 1fr);
        grid-template-areas:
            "photo copy"
            "score score"
            "stats stats";
    }

    .tp-score {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        column-gap: 14px;
    }

    .tp-score-value {
        font-size: 40px;
    }

    .tp-score-satisfied {
        width: auto;
        margin: 0;
        padding: 0 14px;
        border-top: 0;
        border-inline-start: 1px solid rgba(255, 255, 255, 0.15);
    }

    .tp-posts {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .tp-reviews {
        grid-template-columns: 1fr;
    }

    .tp-rating-card {
        position: static;
    }
}

@media (max-width: 860px) {
    .teacher-profile .arya-profile-sections {
        grid-template-columns: 1fr;
    }

    .tp-review-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .tp-hero {
        grid-template-columns: 1fr;
        grid-template-areas:
            "photo"
            "copy"
            "score"
            "stats";
        gap: 18px;
        padding: 20px 16px;
        border-radius: 24px;
        text-align: center;
    }

    .tp-photo {
        justify-self: center;
        width: 190px;
    }

    .tp-badge {
        inset: auto 8px 8px 8px;
        padding: 6px 8px;
        font-size: 11px;
        white-space: nowrap;
    }

    .tp-section-sub {
        width: 100%;
    }

    .tp-review-list {
        display: flex;
        gap: 12px;
        padding: 2px 0 8px;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
    }

    .tp-review-list::-webkit-scrollbar {
        display: none;
    }

    .tp-review {
        flex: 0 0 86%;
        scroll-snap-align: center;
    }

    .tp-skills,
    .tp-actions {
        justify-content: center;
    }

    .tp-bio-text {
        text-align: start;
    }

    .tp-actions .tp-btn {
        flex: 1 1 100%;
    }

    .tp-score {
        flex-direction: column;
    }

    .tp-score-satisfied {
        width: 100%;
        padding: 10px 0 0;
        border-inline-start: 0;
        border-top: 1px solid rgba(255, 255, 255, 0.12);
    }

    .tp-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        text-align: start;
    }

    .tp-stats li {
        padding: 12px;
        column-gap: 10px;
    }

    .tp-stat-icon {
        width: 38px;
        height: 38px;
    }

    .tp-stat-icon::before {
        inset: 9px;
    }

    .tp-stats b {
        font-size: 1.1rem;
    }

    .tp-section {
        margin-top: 26px;
    }

    .tp-section-head h2 {
        font-size: 18px;
    }

    .teacher-profile .arya-profile-section {
        padding: 16px;
        border-radius: 20px;
    }

    .teacher-profile .is-certs .arya-profile-item,
    .teacher-profile .is-certs .arya-profile-item:first-child {
        flex-basis: 220px;
        width: 220px;
    }

    .tp-posts {
        grid-template-columns: 1fr;
    }

    .tp-cta {
        padding: 22px 18px;
        text-align: center;
        justify-content: center;
    }

    .tp-cta-actions,
    .tp-cta-actions .tp-btn {
        width: 100%;
    }

    .tp-lightbox[open] {
        grid-template-columns: 44px minmax(0, 1fr) 44px;
    }

    .tp-lightbox button {
        width: 38px;
        height: 38px;
        font-size: 22px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .teacher-profile {
        scroll-behavior: auto;
    }

    .teacher-profile *,
    .teacher-profile *::before,
    .teacher-profile *::after {
        transition: none !important;
    }
}
