.site-header { position: sticky; top: 0; z-index: 1000; background: var(--background-color); border-bottom: 1px solid var(--border-color); }
.header-inner { display: flex; justify-content: space-between; align-items: center; min-height: 60px; gap: 16px; }
.logo { font: 700 25px/1 var(--font-heading); color: var(--text-color); text-decoration: none; letter-spacing: -.015em; white-space: nowrap; }
.logo-dot { color: var(--accent-color); }
.header-controls { display: flex; align-items: center; }
#menu-toggle { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 44px; padding: 8px 0 8px 12px; border: 0; background: transparent; color: var(--text-color); font-size: 14px; }
#nav-links { display: block; position: absolute; top: 100%; left: 0; right: 0; padding: 12px var(--gutter) 20px; background: var(--background-color); border-bottom: 1px solid var(--border-color); max-height: calc(100dvh - 60px); overflow-y: auto; visibility: hidden; opacity: 0; transform: translateY(-8px); clip-path: inset(0 0 100% 0); pointer-events: none; transition: opacity 200ms ease-out, transform 320ms var(--ease), clip-path 320ms var(--ease), visibility 0s linear 320ms; }
#nav-links.active { visibility: visible; opacity: 1; transform: none; clip-path: inset(0 0 0 0); pointer-events: auto; transition: opacity 220ms ease-out, transform 360ms var(--ease), clip-path 360ms var(--ease), visibility 0s; }
#nav-links ul { list-style: none; margin: 0; padding: 0; }
#nav-links li a { display: flex; align-items: center; min-height: 48px; color: var(--text-color); text-decoration: none; border-bottom: 1px solid var(--border-color); }
#nav-links li a.active { color: var(--accent-color); font-weight: 600; }
#nav-links a:hover { color: var(--accent-color); }
.nav-utilities { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin-top: 12px; }
#auth-icons-container { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.account-link, .dark-mode-toggle { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 8px 0; color: var(--text-color); text-decoration: none; font-size: 14px; }
.dark-mode-toggle { border: 0; background: transparent; }
.mobile-contact { display: flex; justify-content: space-between; align-items: center; min-height: 48px; text-decoration: none; border-top: 1px solid var(--border-color); margin-top: 12px; font-size: 14px; }
.career-section { padding-block: 0 var(--section-space); }
.section-heading { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin-bottom: 24px; }
.section-heading h2 { margin: 0; }
.section-heading p { color: var(--muted); max-width: 60ch; margin-top: 10px; }
.career-list { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--border-color); }
.career-list li { display: grid; gap: 8px; padding-block: 22px; border-bottom: 1px solid var(--border-color); }
.career-list time { font: 500 12px/1.5 var(--font-mono); color: var(--accent-color); }
.career-list h3 { font: 500 18px/1.5 var(--font-body); margin: 0; letter-spacing: 0; max-width: 56ch; }
.content-section, .list-section { padding-block: 30px; border-bottom: 1px solid var(--border-color); }
.content-section:first-child, .list-section:first-child { padding-top: 0; }
.content-section p, .list-section p { max-width: 70ch; }
.content-section ul, .list-section ul { margin: 0; }
blockquote { margin: 28px 0; padding: 24px; background: var(--surface-soft); border-radius: var(--radius); }
blockquote cite { font-size: 14px; color: var(--muted); }
.about-intro { display: grid; grid-template-columns: 1.6fr 1fr; gap: clamp(28px, 6vw, 80px); align-items: start; padding-bottom: 56px; }
.about-intro img { width: 100%; border-radius: var(--radius); }
.about-intro p { color: var(--muted); }
.credentials { display: flex; flex-wrap: wrap; gap: 20px 48px; padding-block: 24px; border-block: 1px solid var(--border-color); }
.credentials strong { display: block; color: var(--primary-color); }
.credentials span { font-size: 14px; color: var(--muted); }
.affiliation-layout, .contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 72px); }
.affiliation-list { list-style: none; padding: 0; }
.affiliation-list li { border-bottom: 1px solid var(--border-color); padding-block: 14px; }
.contact-info-item { border-bottom: 1px solid var(--border-color); padding-block: 22px; overflow-wrap: anywhere; }
.contact-info-item h4 { font-size: 14px; color: var(--muted); margin-bottom: 8px; letter-spacing: 0; }
.contact-info-item p { margin-bottom: 8px; }
.contact-info-item a { text-decoration: none; }
.contact-info-item a:hover { text-decoration: underline; }
.schedule-section { margin-bottom: 56px; }
.schedule-section .btn { flex-shrink: 0; }
.schedule-status { color: var(--muted); padding: 24px 0; }
.schedule-status:empty { display: none; }
.schedule-status button { margin-top: 12px; }
.lms-layout { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(28px, 6vw, 72px); align-items: center; }
.lms-layout p { color: var(--muted); }
.lms-feature-image { border: 1px solid var(--border-color); border-radius: var(--radius); width: 100%; }
.lms-access-grid { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: 28px; }
.btn-app-store img, .btn-google-play img { height: 48px; width: auto; }
.floating-actions { position: fixed; bottom: max(20px, env(safe-area-inset-bottom)); right: 16px; z-index: 900; display: flex; flex-direction: column; gap: 10px; }
#whatsapp-fab, #back-to-top-btn { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 2px; border: 1px solid var(--border-color); background: var(--card-background); color: var(--text-color); text-decoration: none; box-shadow: var(--shadow-light); }
#whatsapp-fab { font-size: 24px; color: var(--success-text-light); }

.about-intro, .affiliation-layout, .contact-grid, .lms-layout { grid-template-columns: 1fr; }
.about-intro img { max-width: 380px; }
@media (min-width: 701px) {
    .section-heading { flex-direction: row; justify-content: space-between; gap: 28px; align-items: center; }
    .career-list li { grid-template-columns: 160px 1fr; gap: 24px; }
    .about-intro { grid-template-columns: 1.6fr 1fr; }
    .affiliation-layout, .contact-grid { grid-template-columns: 1fr 1fr; }
    .lms-layout { grid-template-columns: 1fr 1.1fr; }
    .floating-actions { display: flex; }
}
@media (min-width: 1101px) {
    .header-inner { min-height: 76px; }
    .logo { font-size: 28px; }
    #menu-toggle { display: none; }
    #nav-links { display: flex; align-items: center; gap: 24px; position: static; padding: 0; border: 0; overflow: visible; max-height: none; visibility: visible; opacity: 1; transform: none; clip-path: none; pointer-events: auto; transition: none; }
    #nav-links ul { display: flex; gap: 22px; }
    #nav-links li a { min-height: 44px; border: 0; font-size: 14px; }
    #nav-links li a.active { text-decoration: underline; text-underline-offset: 6px; }
    .nav-utilities { margin: 0; flex-wrap: nowrap; gap: 20px; }
    .dark-mode-toggle > span { display: none; }
    .dark-mode-toggle { min-width: 44px; }
    .mobile-contact { display: none; }
}

/* Adapted from Design5: balanced hero, linked panels, and compact navigation. */
.site-header { background: var(--background-color); border-bottom-color: var(--border-color); }
.logo { font: 700 19px/1.2 var(--font-heading); letter-spacing: -.04em; }
.logo-dot { color: var(--accent-color); }
#menu-toggle { border: 1px solid var(--border-color); border-radius: 6px; padding: 8px 12px; }
#nav-links { padding-top: 16px; }
#nav-links li a { padding-inline: 12px; border: 0; }
#nav-links li a.active { color: var(--accent-color); text-decoration: underline; text-underline-offset: 6px; }
.teacher-hero { padding-block: 28px 32px; }
.teacher-hero-copy { min-width: 0; }
.teacher-hero .eyebrow { font-size: 13px; margin-bottom: 20px; }
.mobile-teacher-intro { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.teacher-hero h1 { font-size: clamp(38px, 11vw, 46px); letter-spacing: -.055em; line-height: 1.02; margin: 0; }
.mobile-portrait { width: 92px; height: 106px; border-radius: 4px; object-fit: cover; object-position: center 20%; flex-shrink: 0; }
.teacher-hero h2 { font-size: 21px; line-height: 1.4; font-weight: 500; letter-spacing: -.035em; margin-bottom: 14px; }
.hero-description { font-size: 14px; line-height: 1.7; color: var(--muted); max-width: 48ch; margin-bottom: 24px; }
.hero-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hero-actions .btn { padding: 12px 8px; min-height: 48px; font-size: 13px; gap: 7px; }
.hero-syllabuses { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 22px; color: var(--muted); font: 400 10px/1.7 var(--font-mono); }
.hero-syllabuses b { font-weight: 400; color: var(--text-color); }
.teacher-hero-access { display: none; }
.teaching-experience { padding-block: 40px; }
.experience-facts { display: grid; list-style: none; padding: 0; margin: 0; gap: 18px; }
.experience-facts li { display: flex; flex-direction: column; gap: 7px; padding-bottom: 18px; border-bottom: 1px solid var(--border-color); }
.experience-facts strong { font: 600 24px/1.2 var(--font-heading); letter-spacing: -.035em; }
.experience-facts span { font-size: 13px; color: var(--muted); }
.career-section { padding-top: 24px; }
.career-list h3 { font-size: 16px; font-weight: 500; }
.career-list time { font-size: 11px; }
#whatsapp-fab, #back-to-top-btn { border-radius: 50%; }
@media (max-width: 359px) {
    .mobile-teacher-intro { gap: 12px; }
    .mobile-portrait { width: 78px; height: 96px; }
    .teacher-hero h1 { font-size: 36px; }
    .hero-actions .btn { font-size: 12px; gap: 5px; }
}
@media (min-width: 701px) {
    .teaching-experience { padding-block: 64px 48px; }
    .experience-facts { grid-template-columns: repeat(3, 1fr); gap: 36px; }
    .experience-facts strong { font-size: 28px; }
    .career-section { padding-top: 40px; }
}
@media (min-width: 1101px) {
    .header-inner { min-height: 76px; }
    .logo { font-size: 21px; }
    #nav-links ul { gap: 2px; }
    #nav-links li a { padding: 9px 12px; font-size: 13px; }
    #nav-links { gap: 16px; }
    .nav-utilities { gap: 12px; }
    .account-link { font-size: 12px; }
    .dark-mode-toggle { border: 1px solid var(--border-color); border-radius: 6px; width: 44px; }
}

/* Phone-sized, full-height opening on mobile. */
.teacher-hero { min-height: calc(100svh - 61px); display: flex; flex-direction: column; padding: 24px 0 12px; }
.teacher-hero-layout { width: min(calc(100% - 2 * var(--gutter)), 480px); flex: 1; display: flex; align-items: center; padding-block: 12px 24px; }
.teacher-hero-copy { width: 100%; }
.teacher-hero h1 { font-size: clamp(38px, 8vw, 50px); }
.hero-syllabuses { margin-bottom: 0; }
.scroll-to-learning { display: inline-flex; flex-direction: column; gap: 2px; justify-content: center; align-items: center; align-self: center; min-height: 44px; padding: 4px 16px; color: var(--muted); font-size: 11px; text-decoration: none; }
.scroll-to-learning > span:last-child { font-size: 20px; line-height: 1.2; color: var(--accent-color); }
#learning { scroll-margin-top: 84px; }
.header-controls { gap: 10px; }
#auth-icons-container { flex-wrap: nowrap; }
#auth-icons-container .account-link { border: 1px solid var(--border-color); border-radius: 6px; padding: 8px 10px; min-height: 44px; font-size: 12px; white-space: nowrap; }
#auth-icons-container .account-link i { display: none; }
#auth-icons-container .account-link[aria-label='Log out'] { display: none; }
.nav-utilities { margin: 0 0 12px; padding-bottom: 12px; border-bottom: 1px solid var(--border-color); align-items: center; }
.mobile-logout { display: inline-flex; align-items: center; min-height: 44px; font-size: 14px; text-decoration: none; }
@media (max-width: 359px) {
    .header-inner { gap: 8px; }
    .site-header .logo { font-size: 17px; }
    .header-controls { gap: 6px; }
    #menu-toggle { gap: 8px; padding-inline: 8px; font-size: 12px; }
    #auth-icons-container .account-link { padding-inline: 8px; font-size: 11px; }
    .teacher-hero h1 { font-size: 36px; }
}
@media (min-width: 701px) {
    .teacher-hero h2 { font-size: 23px; }
    .hero-description { font-size: 16px; }
    .hero-actions .btn { font-size: 14px; }
    .mobile-portrait { width: 106px; height: 120px; }
}
@media (min-width: 1101px) {
    #nav-links { order: 0; padding-top: 0; }
    #auth-icons-container { order: 1; }
    .nav-utilities { margin: 0; padding: 0; border: 0; order: 1; }
    .mobile-logout { display: none; }
    #auth-icons-container .account-link i { display: inline; }
    #auth-icons-container .account-link[aria-label='Log out'] { display: inline-flex; border: 0; }
}

/* Tablet and desktop keep the wider Design5-based composition. */
@media (min-width: 701px) {
    .teacher-hero { min-height: calc(100svh - var(--site-header-h)); display: block; padding-block: 44px 48px; }
    .teacher-hero-layout { width: min(calc(100% - 2 * var(--gutter)), var(--max-width)); display: block; padding: 0; }
    .teacher-hero-copy { max-width: 720px; }
    .teacher-hero h1 { font-size: 60px; }
    .teacher-hero h1 br { display: none; }
    .mobile-portrait { width: 120px; height: 128px; }
    .teacher-hero h2 { font-size: 26px; }
    .hero-description { font-size: 17px; }
    .hero-actions { max-width: 420px; }
    .hero-actions .btn { font-size: 14px; padding-inline: 24px; }
    .hero-syllabuses { font-size: 11px; }
    .scroll-to-learning { display: none; }
}
@media (min-width: 1024px) {
    .teacher-hero-layout { display: grid; grid-template-columns: 1.15fr .9fr; gap: clamp(40px, 6vw, 88px); align-items: center; }
    .teacher-hero .eyebrow { font-size: 14px; }
    .teacher-hero h1 { font-size: clamp(48px, 5vw, 72px); }
    .mobile-teacher-intro { margin-bottom: 22px; }
    .mobile-portrait { display: none; }
    .teacher-hero h2 { font-size: 27px; line-height: 1.5; }
    .teacher-hero-access { display: block; min-width: 0; }
    .portrait-location { display: inline-flex; align-items: center; gap: 8px; font: 500 13px/1.5 var(--font-body); color: var(--muted); }
    .portrait-location i { color: var(--accent-color); font-size: 13px; }
    .portrait-about { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font: 600 14px/1 var(--font-body); color: var(--text-color); text-decoration: none; }
    .portrait-about svg { transition: transform 240ms var(--ease); }
    .portrait-about:is(:hover, :focus-visible) { color: var(--accent-color); }
    .portrait-about:is(:hover, :focus-visible) svg { transform: translateX(3px); }
}

/* Study access lives with the teacher; CTI's responsive track carries the career. */
.hero-assistant { display: flex; align-items: center; gap: 12px; padding-block: 16px; margin-top: 14px; border-bottom: 1px solid var(--border-color); text-decoration: none; color: var(--text-color); }
.assistant-mark { color: var(--accent-color); font-size: 21px; }
.hero-assistant > span:nth-child(2) { min-width: 0; }
.hero-assistant strong { display: block; font-size: 13px; }
.hero-assistant small { display: block; font-size: 11px; color: var(--muted); margin-top: 4px; line-height: 1.5; }
.hero-assistant:hover strong { color: var(--accent-color); }
.hero-syllabuses { margin-top: 16px; }
.teaching-experience { background: var(--card-background); border-block: 1px solid var(--border-color); padding-block: clamp(44px, 7vw, 88px); }
.experience-layout { display: grid; gap: 24px; }
.experience-intro h2 { font-size: clamp(27px, 3.3vw, 42px); line-height: 1.2; margin: 0; }
.experience-ledger { list-style: none; padding: 0; margin: 0; }
.experience-ledger li { display: flex; gap: 20px; align-items: baseline; padding-block: 22px; border-bottom: 1px solid var(--border-color); }
.experience-ledger li:last-child { border-bottom: 0; padding-bottom: 0; }
.experience-ledger strong { font: 600 clamp(36px, 5vw, 60px)/1.05 var(--font-heading); letter-spacing: -.05em; }
.experience-ledger strong span { font-size: .6em; color: var(--accent-color); }
.experience-ledger p { font-size: 13px; color: var(--muted); margin: 8px 0 0; }
.career-journey { padding-block: clamp(48px, 7vw, 96px); }
.career-track { position: relative; --career-progress: 1; }
.career-progress { position: absolute; top: 10px; bottom: 10px; left: 10px; width: 2px; background: var(--border-color); }
.career-progress span { display: block; width: 100%; height: 100%; background: var(--accent-color); transform: scaleY(var(--career-progress)); transform-origin: top; }
.career-milestones { list-style: none; padding: 0; margin: 0; display: grid; gap: 32px; }
.career-milestones li { position: relative; padding: 0 0 0 44px; scroll-margin-top: 110px; }
.career-dot { position: absolute; top: 4px; left: 1px; width: 20px; height: 20px; border: 2px solid var(--border-color); border-radius: 50%; background: var(--background-color); transition: border-color 300ms ease-out, transform 300ms ease-out; }
.career-dot::after { content: ''; position: absolute; inset: 4px; border-radius: 50%; background: var(--muted); }
.career-milestones .is-reached .career-dot { border-color: var(--accent-color); transform: scale(1.1); }
.career-milestones .is-reached .career-dot::after { background: var(--accent-color); }
.career-milestones time { font: 400 12px/1.7 var(--font-mono); color: var(--accent-color); }
.career-milestones h3 { font-size: 21px; line-height: 1.3; margin: 12px 0 8px; }
.career-milestones p { font-size: 14px; line-height: 1.8; color: var(--muted); margin: 0; max-width: 48ch; }
@media (min-width: 701px) {
    .hero-assistant { max-width: 420px; }
    .hero-assistant strong { font-size: 14px; }
    .hero-assistant small { font-size: 12px; }
    .experience-layout { grid-template-columns: 1fr 1fr; align-items: start; gap: 48px; }
    .experience-intro { position: static; }
    .experience-ledger li:first-child { padding-top: 0; }
}
@media (min-width: 900px) {
    .career-milestones { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; }
    .career-milestones li { padding: 48px 0 0; }
    .career-dot { top: 0; }
    .career-progress { top: 9px; bottom: auto; left: 10px; width: calc(75% + 8px); height: 2px; }
    .career-progress span { transform: scaleX(var(--career-progress)); transform-origin: left; }
    .career-milestones h3 { font-size: 23px; }
}
/* The timeline closes with one quiet route to the full teaching story. */
.career-more { margin: 40px 0 0; }
.career-more .btn { gap: 8px; min-height: 44px; }
.career-more svg { transition: transform 240ms var(--ease); }
.career-more a:focus-visible svg { transform: translateX(3px); }
@media (hover: hover) and (pointer: fine) { .career-more a:hover svg { transform: translateX(3px); } }
@media (prefers-reduced-motion: reduce) {
    .career-dot { transition: none; }
    .career-progress span { transform: none; }
    .career-more svg, .career-more a:is(:hover, :focus-visible) svg { transition: none; transform: none; }
}
#career-title { scroll-margin-top: 110px; }

.experience-ledger strong .experience-number { display: inline-block; font-size: 1em; color: var(--text-color); font-variant-numeric: tabular-nums; }
.experience-number.is-counting { animation: experience-count-arrival 1.6s var(--ease) both; }
@keyframes experience-count-arrival {
    0% { transform: translateY(10px); color: var(--accent-color); }
    65% { color: var(--accent-color); }
    100% { transform: translateY(0); color: var(--text-color); }
}
@media (prefers-reduced-motion: reduce) {
    .experience-number.is-counting { animation: none; }
}

/* Give the teacher's portrait more presence without crowding student access. */
@media (max-width: 700px) {
    .mobile-portrait { width: 136px; height: 164px; }
    .mobile-teacher-intro { gap: 16px; }
}
@media (max-width: 359px) {
    .mobile-portrait { width: 110px; height: 138px; }
    .mobile-teacher-intro { gap: 12px; }
}
@media (min-width: 701px) and (max-width: 1023px) {
    .mobile-portrait { width: 160px; height: 184px; }
}

/* Course timetable: previews on phones, complete columns on desktop. */
:root { --site-header-h: 61px; --course-nav-h: 62px; }
@media (min-width: 701px) { :root { --course-nav-h: 74px; } }
@media (min-width: 1101px) { :root { --site-header-h: 77px; } }
.courses-intro { display: block; padding-block: 36px 28px; }
.courses-intro h1 { font-size: var(--page-heading-size); line-height: 1.08; margin-bottom: 16px; max-width: 13ch; }
.courses-intro > div > p:last-child { font-size: 15px; line-height: 1.8; color: var(--muted); max-width: 48ch; margin: 0; }
.course-section-nav { position: sticky; top: var(--site-header-h); z-index: 30; background: var(--background-color); border-block: 1px solid var(--border-color); }
.course-section-nav > div { display: flex; align-items: center; gap: 12px; padding-block: 8px; }
.course-section-nav a:not(.course-register) { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-size: 15px; font-weight: 600; text-decoration: none; color: var(--text-color); position: relative; }
.course-section-nav a:not(.course-register)::after { content: ''; position: absolute; inset: auto 0 -1px; height: 2px; background: var(--accent-color); transform: scaleX(0); transform-origin: left; transition: transform 240ms var(--ease); }
.course-section-nav a[aria-current] { color: var(--accent-color); }
.course-section-nav a[aria-current]::after { transform: scaleX(1); }
.course-section-nav [data-course-count]:not(:empty) { font: 500 12px/1.5 var(--font-body); color: var(--muted); }
.course-timetable { padding-block: 32px 56px; }
.courses-page .schedule-section { display: block; margin: 0; scroll-margin-top: calc(var(--site-header-h) + var(--course-nav-h) + 12px); }
.courses-page .schedule-section + .schedule-section { margin-top: 24px; }
@media (max-width: 700px) { .courses-page .schedule-head { margin-bottom: 16px; } }
.schedule-intro h2 { font-size: 26px; margin-bottom: 10px; line-height: 1.15; }
.schedule-intro > p { font-size: 13px; line-height: 1.8; color: var(--muted); max-width: none; margin-bottom: 0; }

/* The contact prompt closes the timetable as a quiet note, not a header CTA. */
.course-note { margin: 32px 0 0; font-size: 14px; color: var(--muted); }
.course-note a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }
.courses-page .schedule-status { padding: 24px; border: 1px dashed var(--border-color); border-radius: 14px; font-size: 14px; }
.courses-page .schedule-status:empty { display: none; }
@media (min-width: 701px) {
    .courses-intro { padding-block: 52px 40px; }
    .courses-intro h1 { max-width: none; }
    .courses-intro > div > p:last-child { font-size: 17px; }
    .course-timetable { padding-block: 44px 72px; }

}
/* Desktop: the section title and its column labels form one solid sticky band at the top of the box. */
.schedule-columns { display: none; }
@media (min-width: 1024px) {
    .courses-page .schedule-section { --schedule-cols: 28% 36% 36%; padding: 0 32px 32px; }
    .courses-page .schedule-section + .schedule-section { margin-top: 32px; }
    .schedule-head {
        position: sticky;
        top: var(--courses-sticky-top, calc(var(--site-header-h) + var(--course-nav-h) - 1px));
        z-index: 5;
        margin: 0 -32px 8px;
        padding: 28px 32px 0;
        background: var(--card-background);
        border-radius: 10px 10px 0 0;
    }
    .schedule-intro { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding-bottom: 20px; }
    .schedule-intro h2 { margin: 0; font-size: 30px; }
    .schedule-intro > p { max-width: none; text-align: left; margin: 0; }
    .schedule-columns { display: grid; grid-template-columns: var(--schedule-cols); padding-block: 12px; border-top: 1px solid var(--border-color); border-bottom: 1px solid var(--border-color); font: 500 12px/1.6 var(--font-body); color: var(--muted); }
    .schedule-columns span { padding-inline: 16px; }
    .schedule-section:not(.has-courses) .schedule-columns { display: none; }
    .schedule-table thead th { padding: 0; height: 0; border: 0; }
    .schedule-th-label { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
}
.courses-page .course-timetable { padding-block: 32px 56px; }
@media (min-width: 701px) { .courses-page .course-timetable { padding-block: 44px 72px; } }

/* Motion follows the teacher's portrait and the student's chosen actions. */
.teacher-hero .btn { transition: background 180ms ease-out, border-color 180ms ease-out, transform 220ms var(--ease); }
.teacher-hero .btn:active { transform: scale(.98); }
.hero-assistant { position: relative; }
.hero-assistant::after { content: ''; position: absolute; inset: auto 0 -1px; height: 2px; background: var(--accent-color); transform: scaleX(0); transform-origin: left; transition: transform 320ms var(--ease); }
.hero-assistant:focus-visible::after { transform: scaleX(1); }
.career-date { display: inline-flex; align-items: center; min-height: 44px; text-decoration-thickness: 1px; text-underline-offset: 5px; }
.career-milestones h3 { transition: color 220ms ease-out, transform 300ms var(--ease); }
.career-milestones .is-selected h3 { color: var(--accent-color); }
.career-milestones .is-selected .career-dot { border-color: var(--accent-color); transform: scale(1.2); }
.career-milestones .is-selected .career-dot::after { background: var(--accent-color); }
@media (hover: hover) and (pointer: fine) {
    .teacher-hero .btn:hover { transform: translateY(-3px); }
    .hero-assistant:hover::after { transform: scaleX(1); }
    .career-milestones li:hover h3 { transform: translateY(-3px); color: var(--accent-color); }
}
@media (prefers-reduced-motion: reduce) {
    .teacher-hero .btn:hover, .teacher-hero .btn:active,
    .portrait-about:is(:hover, :focus-visible) svg, .career-milestones li:hover h3 { transform: none; }
    .portrait-about svg { transition: none; }
}

/* Useful pages open directly into their content rather than a second hero. */
.utility-page .page-header, .account-page .page-header { padding-block: 28px 24px; background: transparent; }
.utility-page .page-header h1, .account-page .page-header h1 { font-size: var(--page-heading-size); line-height: 1.15; margin-bottom: 10px; }
.utility-page .page-description { font-size: 15px; max-width: 56ch; }
.utility-page .list-section h2 { font-size: 23px; }
.about-page .about-intro { gap: 28px; padding-bottom: 36px; }
.about-page .about-intro > img { order: -1; justify-self: center; width: 240px; height: 240px; object-fit: cover; border: 1px solid var(--border-color); border-radius: 10px; box-shadow: var(--shadow); }
.about-page .about-intro p { font-size: 16px; line-height: 1.8; }
.about-page .credentials { gap: 16px 32px; }
.about-page .affiliation-layout h2, .contact-page .contact-grid h2 { font-size: 25px; }
.contact-page .contact-info-item { padding-block: 18px; }
.contact-page .contact-info-item a:not(.btn) { display: inline-flex; align-items: center; min-height: 44px; }
.contact-page .contact-info-item h4 { margin-bottom: 0; }
.contact-page .contact-info-item p { margin-bottom: 0; }
.lms-page .lms-layout { align-items: start; }
.lms-page .lms-feature-image { border-radius: 4px; }
.lms-page .lms-access-grid { margin-top: 20px; gap: 12px; }
.lms-access-grid a { transition: transform 220ms var(--ease); }
.lms-access-grid a:active { transform: scale(.98); }
@media (min-width: 701px) {
    .utility-page .page-header { padding-block: 40px 28px; }
    .about-page .about-intro { grid-template-columns: minmax(0, 1.4fr) minmax(240px, 1fr); gap: 64px; align-items: center; }
    .about-page .about-intro > img { order: 0; width: 100%; height: auto; aspect-ratio: 1; }
    .lms-page .lms-layout { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); align-items: center; }
}
@media (hover: hover) and (pointer: fine) {
    .lms-access-grid a:hover { transform: translateY(-3px); }
    .affiliation-list li { transition: color 180ms ease-out; }
    .affiliation-list li:hover { color: var(--accent-color); }
}
@media (prefers-reduced-motion: reduce) { .lms-access-grid a:hover, .lms-access-grid a:active { transform: none; } }

.contact-page .contact-label { font-size: 16px; }

.course-section-nav .course-register { display: inline-flex; align-items: center; justify-content: center; gap: 8px; margin-left: auto; min-height: 44px; padding: 8px 12px; border: 1px solid var(--accent-color); border-radius: 6px; background: var(--accent-color); color: var(--light-text-color); font-size: 15px; font-weight: 600; text-decoration: none; transition: background 180ms ease-out, border-color 180ms ease-out; }
@media (min-width: 600px) {
    .course-section-nav .course-register { width: auto; margin-left: auto; margin-bottom: 0; }
}


/* Institutions: all three groups share the same divided-row list; roles are quiet mono labels. */
.teaching-institutions { display: grid; gap: 20px; padding-bottom: 48px; }
.institution-group header { margin-bottom: 12px; }
.institution-group h2 { scroll-margin-top: 95px; margin: 0 0 4px; }
.institution-group header p { margin: 0; font: 400 12px/1.6 var(--font-mono); color: var(--muted); }
.institution-list { list-style: none; padding: 0; margin: 0; }
.institution-list li { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; min-height: 56px; padding-block: 12px; border-top: 1px solid var(--border-color); font-size: 16px; }
.institution-list li:first-child { border-top: 0; }
.institution-name { color: var(--text-color); }
.institution-tag { flex-shrink: 0; font: 400 11px/1.6 var(--font-mono); letter-spacing: .02em; color: var(--muted); text-transform: uppercase; }
.institution-tag--accent { color: var(--accent-color); }
.institution-history { background: transparent; border: 1px solid var(--border-color); }
@media (min-width: 768px) {
    .teaching-institutions { grid-template-columns: 1fr 1fr; gap: 24px; }
    .institution-history { grid-column: 1 / -1; }
    .institution-history .institution-list { display: grid; grid-template-columns: 1fr 1fr; column-gap: 48px; }
    .institution-history .institution-list li:nth-child(2) { border-top: 0; }
}

/* The classroom image leads; the three access badges sit together beneath it. */
.lms-page .lms-classroom, .lms-page .page-header .container { max-width: 860px; }
.lms-page .lms-classroom { padding-bottom: 40px; }
.lms-classroom .lms-feature-image { display: block; width: 100%; border-radius: 6px 6px 0 0; }
.lms-downloads { padding: 20px 12px; border: 1px solid var(--border-color); border-top: 0; background: var(--card-background); border-radius: 0 0 6px 6px; }
.lms-page .lms-access-grid { display: grid; grid-template-columns: auto auto; justify-content: center; gap: 14px 12px; margin: 0; align-items: center; }
.lms-page .btn-app-store img, .lms-page .btn-google-play img { height: 48px; width: auto; display: block; }
.btn-lms-web { display: inline-flex; justify-content: center; align-items: center; gap: 10px; grid-column: 1 / -1; justify-self: center; height: 54px; min-width: 180px; padding: 0 14px; border: 1px solid #AEA6A6; border-radius: 8px; background: #08090B; color: #FDFEFF; text-decoration: none; font-weight: 600; font-size: 15px; }
.btn-lms-web i { font-size: 21px; }
.btn-lms-web:hover { background: #292C32; color: #FDFEFF; }
@media (max-width: 359px) { .lms-page .btn-app-store img, .lms-page .btn-google-play img { height: 40px; } }
@media (min-width: 701px) {
    .lms-page .lms-access-grid { grid-template-columns: auto auto auto; gap: 24px; }
    .lms-page .btn-app-store img, .lms-page .btn-google-play img { height: 56px; }
    .btn-lms-web { grid-column: auto; height: 56px; min-width: 188px; }
    .lms-downloads { padding: 28px; }
}

/* Contact columns begin and end on clear shared rules. */
.contact-page .contact-grid { gap: 28px; align-items: start; padding-bottom: 0; }
.contact-grid > section { min-width: 0; }
.contact-grid > section > h2 { margin: 0; padding-bottom: 18px; border-bottom: 1px solid var(--border-color); }
.contact-page .contact-info-item { padding-block: 20px; }
.contact-page .contact-info-item h3 { font-size: 19px; margin: 0 0 8px; }
.contact-page .contact-info-item p { font-size: 14px; }
/* Social media reads as a cohesive band aligned to the contact grid columns. */
.contact-page .contact-social { margin-top: 48px; padding-bottom: 56px; }
.contact-social h2 { margin: 0; padding-bottom: 18px; border-bottom: 1px solid var(--border-color); font-size: var(--section-heading-size); }
.social-links { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; }
.social-link { display: flex; align-items: center; gap: 16px; min-height: 72px; padding-block: 16px; border-bottom: 1px solid var(--border-color); color: var(--text-color); text-decoration: none; }
.social-link > i { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--accent-tint); color: var(--accent-color); font-size: 20px; flex-shrink: 0; }
.social-text { min-width: 0; }
.social-text strong { display: block; font: 600 17px/1.3 var(--font-heading); }
.social-text > span { font-size: 14px; color: var(--muted); }
.social-arrow { margin-left: auto; color: var(--accent-color); transition: transform 240ms var(--ease); }
@media (min-width: 701px) { .social-links { grid-template-columns: 1fr 1fr; column-gap: 28px; } }
@media (min-width: 768px) {
    .contact-page .contact-grid { gap: 64px; align-items: stretch; }
    .contact-grid > section { display: grid; grid-template-rows: auto 1fr 1fr; }
    .social-links { column-gap: 64px; }
}
@media (hover: hover) and (pointer: fine) {
    .social-link:hover .social-text strong { color: var(--accent-color); }
    .social-link:hover .social-arrow { transform: translate(2px, -2px); }
}
.social-link:focus-visible .social-arrow { transform: translate(2px, -2px); }
@media (prefers-reduced-motion: reduce) { .social-arrow { transition: none; } .social-link:hover .social-arrow, .social-link:focus-visible .social-arrow { transform: none; } }

/* The hero keeps its wide composition and finishes with a quiet continuation cue. */
.hero-assistant { padding: 14px 16px; border: 1px solid var(--border-color); border-radius: 8px; background: var(--accent-tint); transition: border-color 220ms ease-out, background 220ms ease-out; }
.hero-assistant::after { content: none; }
.assistant-action { margin-left: auto; flex-shrink: 0; color: var(--accent-color); transition: transform 240ms var(--ease); }
.hero-assistant:is(:hover, :focus-visible) { border-color: var(--accent-color); background: var(--surface-soft); }
.hero-assistant:is(:hover, :focus-visible) .assistant-action { transform: translateX(3px); }
.course-section-nav .course-register:is(:hover, :focus-visible) { background: var(--primary-hover); border-color: var(--primary-hover); }
.scroll-to-learning { width: 44px; padding: 0; color: var(--muted); opacity: .65; transition: opacity 200ms ease-out; }
.scroll-to-learning:is(:hover, :focus-visible) { opacity: 1; }
@media (max-width: 700px) {
    .experience-layout { text-align: center; }
    .experience-ledger li { justify-content: center; }
    .experience-ledger p { max-width: 32ch; margin-inline: auto; }
}
@media (max-width: 359px) {
    .course-section-nav > div { gap: 10px; }
    .course-section-nav a:not(.course-register) { gap: 4px; }
    .course-section-nav .course-register { padding-inline: 10px; gap: 5px; }
}
@media (prefers-reduced-motion: reduce) {
    .assistant-action, .schedule-disclosure, .schedule-chevron { transition: none; }
    .hero-assistant:is(:hover, :focus-visible) .assistant-action { transform: none; }
}

/* Secondary page sections share one type scale. */
.institution-group h2, .schedule-intro h2, .contact-page .contact-grid h2 { font-size: var(--section-heading-size); }
.institution-history h2 { font-size: 22px; }



.about-page .credentials { padding: 20px; border: 0; border-radius: 6px; background: var(--surface-soft); }

/* Timetables: grouped native disclosures on phones, semantic tables on desktop. */
/* Three clear surface levels: section card > level tile > per-batch inset card. */
.schedule-list { display: grid; gap: 10px; }
.schedule-table { display: none; }
.schedule-item { border: 1px solid var(--border-color); border-radius: 10px; background: var(--background-color); overflow: clip; transition: border-color 220ms ease-out, box-shadow 220ms ease-out; }
.schedule-item summary { position: relative; display: flex; flex-direction: column; align-items: stretch; gap: 6px; padding: 18px 64px 18px 16px; min-height: 76px; list-style: none; cursor: pointer; }
.schedule-item summary::-webkit-details-marker { display: none; }
.schedule-item summary:focus-visible { outline-offset: -4px; }
.schedule-title { font: 600 20px/1.25 var(--font-heading); letter-spacing: -.03em; overflow-wrap: anywhere; }
.schedule-count { font: 500 13px/1.6 var(--font-body); color: var(--muted); }
.schedule-disclosure { position: absolute; top: 50%; right: 12px; translate: 0 -50%; }
.schedule-item[open] { border-color: var(--border-color); box-shadow: none; }
.schedule-item[open] summary { background: var(--background-color); }
.schedule-item[open] .schedule-count { color: var(--text-color); }
.schedule-item[open] .schedule-disclosure { background: var(--card-background); }
.schedule-batches { display: grid; gap: 10px; padding: 12px; background: var(--surface-soft); border-top: 1px solid var(--border-color); }
.schedule-batches > dl { display: grid; gap: 10px; margin: 0; padding: 14px 16px; background: var(--card-background); border: 1px solid var(--border-color); border-radius: 8px; }
.schedule-batches dt { font: 500 11px/1.5 var(--font-body); color: var(--muted); margin: 0 0 2px; letter-spacing: .02em; text-transform: uppercase; }
.schedule-batches dd { margin: 0; font-size: 14px; line-height: 1.7; color: var(--text-color); overflow-wrap: anywhere; }
.schedule-batches dl > div:first-child dd { font-weight: 600; font-size: 15px; }
.schedule-batches dl > div + div dd { display: flex; gap: 8px; align-items: baseline; }
.schedule-icon { flex-shrink: 0; color: var(--accent-color); translate: 0 2px; }
.schedule-list a { display: inline-flex; align-items: center; min-height: 44px; }
@media (hover: hover) and (pointer: fine) {
    .schedule-item:not([open]):hover { border-color: var(--control-border); }
}
@media (prefers-reduced-motion: reduce) { .schedule-item { transition: none; } }
@media (min-width: 701px) {
    .schedule-list { display: block; }
    .schedule-item { display: none; }
    .courses-page .schedule-section { --schedule-cols: 28% 36% 36%; }
    .schedule-table { display: table; width: 100%; table-layout: fixed; border-collapse: separate; border-spacing: 0 8px; font-size: 14px; line-height: 1.8; }
    .schedule-table th, .schedule-table td { text-align: left; vertical-align: top; padding: 20px 16px; overflow-wrap: anywhere; }
    .schedule-table thead th { font: 400 12px/1.6 var(--font-body); color: var(--muted); padding-block: 0 8px; }
    .schedule-table thead th:nth-child(1) { width: 28%; }
    .schedule-table thead th:nth-child(2), .schedule-table thead th:nth-child(3) { width: 36%; }
    .schedule-table tbody th { font: 600 20px/1.4 var(--font-heading); }
    .schedule-table tbody tr:nth-child(odd) { background: var(--surface-soft); }
    .schedule-table tbody :is(th,td):first-child { border-radius: 6px 0 0 6px; }
    .schedule-table tbody td:last-child { border-radius: 0 6px 6px 0; }
}
@media (min-width: 701px) and (hover: hover) and (pointer: fine) {
    .schedule-table tbody tr:hover { background: var(--surface-soft); }
}
@media (prefers-reduced-motion: reduce) { .schedule-item { transition: none; } }

/* A compact footer keeps destinations and attribution without a second sitemap. */
.site-footer { padding-top: 24px; border-top: 1px solid var(--border-color); background: var(--card-background); }
.footer-top { display: grid; gap: 12px; padding-bottom: 16px; }
.footer-top p { color: var(--muted); font-size: 12px; margin: 4px 0 0; }
.footer-top nav { display: flex; flex-wrap: wrap; column-gap: 18px; }
.footer-top nav a { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); text-decoration: none; font-size: 12px; }
.footer-bottom { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding-block: 14px 20px; border-top: 1px solid var(--border-color); font-size: 13px; color: var(--muted); }
.footer-bottom p { margin: 0; }
.footer-bottom p:last-child { font-size: 14px; font-weight: 500; color: var(--text-color); }
.footer-bottom p:last-child a { color: var(--accent-color); font-weight: 600; text-decoration: none; border-bottom: 1px solid currentColor; }
.footer-bottom p:last-child a:hover { color: var(--primary-hover); }
@media (min-width: 768px) { .footer-top { grid-template-columns: 1fr 1.4fr; align-items: center; gap: 28px; } .footer-top nav { justify-content: flex-end; } }

/* Match the desktop reading scale while keeping the phone navigation compact. */
.course-register-label { display: none; }
@media (min-width: 701px) {
    .course-section-nav > div { gap: 32px; padding-block: 12px; }
    .course-section-nav a:not(.course-register) { min-height: 48px; font-size: 17px; font-weight: 600; color: var(--text-color); gap: 10px; }
    .course-section-nav a[aria-current]:not(.course-register) { color: var(--accent-color); }
    .course-section-nav [data-course-count]:not(:empty) { font: 500 13px/1.5 var(--font-body); }
    .course-section-nav .course-register { min-height: 48px; padding: 10px 20px; font-size: 16px; }
    .course-register-label { display: inline; }
}

/* Shared scroll-reveal primitive. Visible by default; JS only enhances. */
[data-reveal] { opacity: 1; }
[data-reveal].reveal-init { opacity: 0; transform: translateY(14px); }
[data-reveal].reveal-in {
    opacity: 1;
    transform: none;
    transition: opacity 600ms var(--ease), transform 600ms var(--ease);
    transition-delay: var(--reveal-delay, 0ms);
}
@media (prefers-reduced-motion: reduce) {
    [data-reveal].reveal-init { opacity: 1; transform: none; }
}
/* The sticky courses intro must not carry a reveal transform (it would break sticky). */
@media (min-width: 1024px) {
    .schedule-intro[data-reveal].reveal-init { opacity: 1; transform: none; }
}

/* Mobile/tablet menu motion: animated open AND close, staggered links, morphing icon. */
@media (max-width: 1100px) {
    #nav-links li, #nav-links .nav-utilities, #nav-links .mobile-contact { opacity: 0; transform: translateY(-4px); transition: opacity 180ms ease-out, transform 240ms var(--ease); }
    #nav-links.active li { opacity: 1; transform: none; transition-delay: calc(60ms + var(--i, 0) * 30ms); }
    #nav-links.active .nav-utilities { opacity: 1; transform: none; transition-delay: 40ms; }
    #nav-links.active .mobile-contact { opacity: 1; transform: none; transition-delay: 260ms; }
}
.menu-icon { position: relative; width: 18px; height: 14px; flex-shrink: 0; }
.menu-icon span { position: absolute; left: 0; width: 100%; height: 2px; border-radius: 2px; background: currentColor; transition: transform 280ms var(--ease), opacity 180ms ease-out, top 280ms var(--ease); }
.menu-icon span:nth-child(1) { top: 0; }
.menu-icon span:nth-child(2) { top: 6px; }
.menu-icon span:nth-child(3) { top: 12px; }
#menu-toggle[aria-expanded="true"] .menu-icon span:nth-child(1) { top: 6px; transform: rotate(45deg); }
#menu-toggle[aria-expanded="true"] .menu-icon span:nth-child(2) { opacity: 0; }
#menu-toggle[aria-expanded="true"] .menu-icon span:nth-child(3) { top: 6px; transform: rotate(-45deg); }
@media (prefers-reduced-motion: reduce) {
    #nav-links, #nav-links.active, #nav-links li, #nav-links .nav-utilities, #nav-links .mobile-contact, .menu-icon span { transition: none !important; }
    #nav-links li, #nav-links .nav-utilities, #nav-links .mobile-contact { transform: none; }
}
@media (min-width: 1101px) {
    #nav-links li, #nav-links .nav-utilities, #nav-links .mobile-contact { opacity: 1; transform: none; transition: none; }
}

/* Transparent Minhas portrait: keep the artwork free of photo-card framing. */
.mobile-portrait { border-radius: 0; object-fit: contain; object-position: center; }
.about-page .about-intro > img { border: 0; border-radius: 0; box-shadow: none; object-fit: contain; }

/* The atmosphere spans the hero; only the photograph extends beyond its column. */
.teacher-hero, .about-portrait {
    position: relative; isolation: isolate; overflow: clip;
    --hero-atmosphere: radial-gradient(ellipse 76% 67% at 65% 44%, color-mix(in srgb, var(--accent-color) 13%, transparent), color-mix(in srgb, var(--accent-color) 6%, transparent) 40%, color-mix(in srgb, var(--accent-color) 2%, transparent) 64%, transparent 82%);
    --portrait-round-fade: radial-gradient(ellipse 80% 92% at 43% 32%, #000 62%, rgb(0 0 0 / 98%) 66%, rgb(0 0 0 / 92%) 70%, rgb(0 0 0 / 83%) 74%, rgb(0 0 0 / 70%) 78%, rgb(0 0 0 / 54%) 82%, rgb(0 0 0 / 38%) 86%, rgb(0 0 0 / 22%) 90%, rgb(0 0 0 / 9%) 94%, rgb(0 0 0 / 1%) 98%, transparent 100%);
    --portrait-right-fade: linear-gradient(to right, #000 86%, rgb(0 0 0 / 98%) 87.3%, rgb(0 0 0 / 92%) 88.5%, rgb(0 0 0 / 83%) 89.8%, rgb(0 0 0 / 70%) 91.1%, rgb(0 0 0 / 57%) 92.4%, rgb(0 0 0 / 43%) 93.6%, rgb(0 0 0 / 30%) 94.9%, rgb(0 0 0 / 17%) 96.2%, rgb(0 0 0 / 8%) 97.5%, rgb(0 0 0 / 2%) 98.7%, transparent 100%);
    --portrait-bottom-fade: linear-gradient(to bottom, #000 80%, rgb(0 0 0 / 98%) 81.9%, rgb(0 0 0 / 92%) 83.8%, rgb(0 0 0 / 83%) 85.6%, rgb(0 0 0 / 70%) 87.5%, rgb(0 0 0 / 55%) 89.4%, rgb(0 0 0 / 40%) 91.3%, rgb(0 0 0 / 25%) 93.1%, rgb(0 0 0 / 13%) 95%, rgb(0 0 0 / 5%) 96.9%, rgb(0 0 0 / 1%) 98.8%, transparent 100%);
}
.hero-course-code, .hero-technical-lines { display: none; }
/* Light backgrounds need a smaller translucent area to preserve the jacket. */
:root:not([data-theme='dark']) :is(.teacher-hero, .about-portrait) {
    --hero-atmosphere: radial-gradient(ellipse 76% 67% at 65% 44%, color-mix(in srgb, var(--accent-color) 8%, transparent), color-mix(in srgb, var(--accent-color) 4%, transparent) 40%, color-mix(in srgb, var(--accent-color) 1%, transparent) 64%, transparent 82%);
    --portrait-round-fade: radial-gradient(ellipse 78% 90% at 43% 32%, #000 68%, rgb(0 0 0 / 99%) 72%, rgb(0 0 0 / 96%) 76%, rgb(0 0 0 / 91%) 80%, rgb(0 0 0 / 83%) 84%, rgb(0 0 0 / 73%) 88%, rgb(0 0 0 / 62%) 92%, rgb(0 0 0 / 51%) 96%, rgb(0 0 0 / 42%) 100%, rgb(0 0 0 / 36%) 104%);
    --portrait-right-fade: linear-gradient(to right, #000 90%, rgb(0 0 0 / 99%) 90.9%, rgb(0 0 0 / 97%) 91.8%, rgb(0 0 0 / 93%) 92.7%, rgb(0 0 0 / 86%) 93.6%, rgb(0 0 0 / 75%) 94.5%, rgb(0 0 0 / 59%) 95.5%, rgb(0 0 0 / 41%) 96.4%, rgb(0 0 0 / 24%) 97.3%, rgb(0 0 0 / 10%) 98.2%, rgb(0 0 0 / 2%) 99.1%, transparent 100%);
    --portrait-bottom-fade: linear-gradient(to bottom, #000 82%, rgb(0 0 0 / 99%) 83.6%, rgb(0 0 0 / 97%) 85.3%, rgb(0 0 0 / 93%) 86.9%, rgb(0 0 0 / 86%) 88.5%, rgb(0 0 0 / 75%) 90.2%, rgb(0 0 0 / 59%) 91.8%, rgb(0 0 0 / 41%) 93.5%, rgb(0 0 0 / 24%) 95.1%, rgb(0 0 0 / 10%) 96.7%, rgb(0 0 0 / 2%) 98.4%, transparent 100%);
}
.mobile-portrait {
    object-position: center bottom;
    -webkit-mask-image: var(--portrait-bottom-fade), var(--portrait-right-fade), var(--portrait-round-fade);
    mask-image: var(--portrait-bottom-fade), var(--portrait-right-fade), var(--portrait-round-fade);
    -webkit-mask-composite: source-in;
    mask-composite: intersect;
}
.mobile-hero-art { display: none; }
.about-page #main-content { overflow: clip; }
.about-page .about-intro { position: relative; isolation: isolate; }
.about-portrait {
    order: -1;
    justify-self: center;
    width: min(240px, 100%);
    aspect-ratio: 1;
    container-type: inline-size;
    overflow: visible;
}
.about-portrait::before {
    content: '';
    position: absolute;
    z-index: -1;
    inset: -20% -30% -20% -100%;
    background: var(--hero-atmosphere);
    pointer-events: none;
}
.about-page .about-portrait img {
    position: absolute;
    z-index: 2;
    top: -5%; left: -16%;
    width: 112%; max-width: none; height: auto;
    border: 0; border-radius: 0; box-shadow: none;
    object-fit: contain;
    -webkit-mask-image: var(--portrait-bottom-fade), var(--portrait-right-fade), var(--portrait-round-fade);
    mask-image: var(--portrait-bottom-fade), var(--portrait-right-fade), var(--portrait-round-fade);
    -webkit-mask-composite: source-in;
    mask-composite: intersect;
}
.about-portrait .hero-course-code {
    display: block; position: absolute; z-index: 1;
    color: var(--accent-color);
    font: 400 19.7cqw/1 var(--font-heading);
    letter-spacing: .025em; opacity: .045;
    white-space: nowrap; user-select: none; pointer-events: none;
}
.about-portrait .hero-course-code--ale { top: -3%; right: -4%; }
.about-portrait .hero-course-code--ole { top: 50%; right: -6%; font-size: 13.5cqw; }
.about-portrait .hero-technical-lines {
    display: block; position: absolute; z-index: 1;
    top: -4%; left: -42%; width: 150%; height: 94%;
    overflow: visible; stroke: var(--accent-color); stroke-width: 1;
    opacity: .065; pointer-events: none;
}
@media (min-width: 701px) {
    .about-portrait { order: 0; width: 100%; max-width: 380px; }
}
@media (min-width: 1024px) {
    .teacher-hero { display: flex; min-height: calc(100svh - var(--site-header-h)); padding-block: 24px 32px; }
    .teacher-hero::before {
        content: '';
        position: absolute;
        z-index: 0;
        inset: -8% -12% -8% 24%;
        background: var(--hero-atmosphere);
        animation: portrait-atmosphere-in 900ms var(--ease) both;
        pointer-events: none;
    }
    .teacher-hero-layout { position: relative; z-index: 1; flex: 1; padding-block: 0; }
    .scroll-to-learning { display: inline-flex; flex-shrink: 0; }
    .teacher-hero-access { position: relative; isolation: isolate; }
    .hero-course-code {
        display: block;
        position: absolute;
        z-index: 1;
        color: var(--accent-color);
        font: 400 clamp(64px, 7vw, 100px)/1 var(--font-heading);
        letter-spacing: .025em;
        opacity: .045;
        white-space: nowrap;
        user-select: none;
        pointer-events: none;
    }
    .hero-course-code--ale { top: -3%; right: -4%; }
    .hero-course-code--ole { top: 50%; right: -6%; font-size: clamp(48px, 4.8vw, 70px); }
    .hero-technical-lines {
        display: block;
        position: absolute;
        z-index: 1;
        top: -4%; left: -42%;
        width: 150%; height: 94%;
        overflow: visible;
        stroke: var(--accent-color);
        stroke-width: 1;
        opacity: .065;
        pointer-events: none;
    }
    .teacher-profile { position: relative; z-index: 2; width: 100%; margin: 0; }
    .teacher-profile .portrait-frame {
        position: relative;
        display: block;
        width: 100%;
        aspect-ratio: 1;
    }
    .portrait-frame img {
        position: absolute;
        top: -5%; left: -16%;
        display: block;
        width: min(112%, 545px);
        max-width: none;
        height: auto;
        object-fit: contain;
        -webkit-mask-image: var(--portrait-bottom-fade), var(--portrait-right-fade), var(--portrait-round-fade);
        mask-image: var(--portrait-bottom-fade), var(--portrait-right-fade), var(--portrait-round-fade);
        -webkit-mask-composite: source-in;
        mask-composite: intersect;
    }
    .portrait-caption {
        position: relative;
        z-index: 4;
        display: grid;
        grid-template-columns: max-content minmax(16px, 1fr) max-content;
        align-items: center;
        gap: clamp(8px, 1vw, 14px);
        margin-top: -8px;
    }
    .portrait-location, .portrait-about { white-space: nowrap; }
    .portrait-caption-rule { height: 1px; background: var(--border-color); }
}
@keyframes portrait-atmosphere-in {
    from { opacity: 0; transform: scale(.97); }
    to { opacity: 1; transform: scale(1); }
}
@media (max-width: 1023px) {
    .mobile-teacher-intro {
        position: relative;
        isolation: isolate;
        --mobile-portrait-width: 160px;
    }
    /* Use the desktop portrait's square coordinate space at a smaller size. */
    .mobile-hero-art {
        display: block;
        position: absolute;
        z-index: -1;
        width: calc(var(--mobile-portrait-width) / 1.12);
        aspect-ratio: 1;
        right: calc(var(--mobile-portrait-width) / -28);
        bottom: calc(var(--mobile-portrait-width) * .07 / 1.12);
        container-type: inline-size;
        pointer-events: none;
    }
    .mobile-hero-art::before {
        content: '';
        position: absolute;
        z-index: -1;
        inset: -20% -30% -20% -100%;
        background: var(--hero-atmosphere);
        -webkit-mask-image: linear-gradient(to bottom, transparent, rgb(0 0 0 / 15%) 4%, rgb(0 0 0 / 50%) 9%, rgb(0 0 0 / 85%) 14%, #000 20%, #000 80%, rgb(0 0 0 / 85%) 86%, rgb(0 0 0 / 50%) 91%, rgb(0 0 0 / 15%) 96%, transparent);
        mask-image: linear-gradient(to bottom, transparent, rgb(0 0 0 / 15%) 4%, rgb(0 0 0 / 50%) 9%, rgb(0 0 0 / 85%) 14%, #000 20%, #000 80%, rgb(0 0 0 / 85%) 86%, rgb(0 0 0 / 50%) 91%, rgb(0 0 0 / 15%) 96%, transparent);
        pointer-events: none;
    }
    .mobile-hero-art .hero-course-code {
        display: block;
        position: absolute;
        color: var(--accent-color);
        font: 400 19.7cqw/1 var(--font-heading);
        letter-spacing: .025em;
        opacity: .045;
        white-space: nowrap;
        user-select: none;
    }
    .mobile-hero-art .hero-course-code--ale { top: -3%; right: -4%; }
    .mobile-hero-art .hero-course-code--ole { top: 50%; right: -6%; font-size: 13.5cqw; }
    .mobile-hero-art .hero-technical-lines {
        display: block;
        position: absolute;
        top: -4%; left: -42%;
        width: 150%; height: 94%;
        overflow: visible;
        stroke: var(--accent-color);
        stroke-width: 1;
        opacity: .065;
    }
}
@media (max-width: 700px) {
    .mobile-teacher-intro { --mobile-portrait-width: clamp(112px, 38vw, 164px); }
    .mobile-portrait { width: var(--mobile-portrait-width); height: clamp(136px, 45.5vw, 194px); }
    :root:not([data-theme='dark']) .mobile-portrait {
        --portrait-right-fade: linear-gradient(to right, #000 86%, rgb(0 0 0 / 98%) 87.2%, rgb(0 0 0 / 92%) 88.4%, rgb(0 0 0 / 83%) 89.6%, rgb(0 0 0 / 70%) 90.8%, rgb(0 0 0 / 57%) 92%, rgb(0 0 0 / 43%) 93.2%, rgb(0 0 0 / 30%) 94.4%, rgb(0 0 0 / 17%) 95.6%, rgb(0 0 0 / 8%) 96.8%, rgb(0 0 0 / 2%) 98%, transparent 99%);
        --portrait-bottom-fade: linear-gradient(to bottom, #000 80%, rgb(0 0 0 / 98%) 81.8%, rgb(0 0 0 / 92%) 83.6%, rgb(0 0 0 / 83%) 85.4%, rgb(0 0 0 / 70%) 87.2%, rgb(0 0 0 / 57%) 89%, rgb(0 0 0 / 43%) 90.8%, rgb(0 0 0 / 30%) 92.6%, rgb(0 0 0 / 17%) 94.4%, rgb(0 0 0 / 8%) 96.2%, rgb(0 0 0 / 2%) 98%, transparent 99%);
    }
}
@media (prefers-reduced-motion: reduce) {
    .teacher-hero::before { animation: none; }
}
