@font-face {
    font-family: "Neuton";
    src: url("Neuton-Regular.ttf") format("truetype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Neuton";
    src: url("Neuton-Bold.ttf") format("truetype");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

:root {
    --banana-yellow: #fbea8c;
    --banana-yellow-strong: #f4d83d;
    --pure-black: #2b2b2b;
    --pure-white: #faf8f5;
    --action-orange: #5c3a21;
    --teacher-accent: #5c3a21;
    --teacher-soft: #fff3b0;
    --teacher-ink: #2b2b2b;
    --teacher-muted: #6f665e;
    --teacher-line: rgba(43, 43, 43, 0.18);
    --profile-max: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body.teacher-profile-page {
    min-width: 0;
    min-height: 100vh;
    margin: 0;
    color: var(--teacher-ink);
    background:
        linear-gradient(rgba(43, 43, 43, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(43, 43, 43, 0.025) 1px, transparent 1px),
        radial-gradient(circle at 6% 16%, rgba(251, 234, 140, 0.46), transparent 27rem),
        radial-gradient(circle at 95% 74%, rgba(92, 58, 33, 0.1), transparent 30rem),
        var(--pure-white);
    background-size: 30px 30px, 30px 30px, auto, auto, auto;
    font-family: "Montserrat", Arial, sans-serif;
    line-height: 1.65;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

.profile-bogdan {
    --teacher-accent: #5c3a21;
    --teacher-soft: #fbea8c;
}

.profile-kirill {
    --teacher-accent: #2b2b2b;
    --teacher-soft: #fff2aa;
}

.profile-adam {
    --teacher-accent: #6d472d;
    --teacher-soft: #fff0c8;
}

.profile-polina {
    --teacher-accent: #7a4a2d;
    --teacher-soft: #fbe7a2;
}

.teacher-profile-page .top-nav {
    position: fixed;
    z-index: 100;
    top: 0;
    left: 0;
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    padding: 15px 40px;
    border-bottom: 3px solid var(--pure-black);
    background: rgba(250, 248, 245, 0.95);
    box-shadow: 0 6px 20px rgba(43, 43, 43, 0.16);
    backdrop-filter: blur(12px);
}

.teacher-profile-page .nav-links,
.teacher-profile-page .nav-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.teacher-profile-page .nav-link,
.teacher-profile-page .tg-btn,
.teacher-profile-page .login-btn,
.teacher-profile-page .mobile-brand {
    color: var(--pure-black);
    font-family: "Press Start 2P", cursive;
    font-size: 0.72rem;
    line-height: 1.35;
    text-decoration: none;
}

.teacher-profile-page .nav-link {
    padding: 8px 9px;
    border-radius: 7px;
}

.teacher-profile-page .nav-link:hover,
.teacher-profile-page .nav-link[aria-current="page"] {
    background: var(--banana-yellow);
}

.teacher-profile-page .tg-btn,
.teacher-profile-page .login-btn {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    padding: 9px 16px;
    border: 2px solid var(--pure-black);
    border-radius: 8px;
}

.teacher-profile-page .login-btn {
    background: var(--banana-yellow);
    box-shadow: 4px 4px 0 var(--action-orange);
}

.teacher-profile-page .mobile-brand,
.teacher-profile-page .mobile-menu-toggle {
    display: none;
}

.teacher-profile-main {
    width: min(100%, calc(var(--profile-max) + 48px));
    margin: 0 auto;
    padding: 126px 24px 92px;
}

.profile-back {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    gap: 9px;
    margin-bottom: 22px;
    color: var(--action-orange);
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
}

.profile-back svg {
    width: 19px;
    height: 19px;
    stroke: currentColor;
    stroke-width: 2.2;
}

.teacher-profile-hero {
    display: grid;
    grid-template-columns: minmax(330px, 0.84fr) minmax(0, 1.16fr);
    min-height: 610px;
    overflow: hidden;
    border: 4px solid var(--pure-black);
    border-radius: 24px;
    background: var(--pure-white);
    box-shadow: 13px 13px 0 var(--teacher-accent);
}

.teacher-profile-portrait {
    position: relative;
    display: flex;
    min-height: 610px;
    align-items: flex-end;
    justify-content: center;
    overflow: hidden;
    border-right: 4px solid var(--pure-black);
    background:
        radial-gradient(circle at 50% 34%, rgba(255, 255, 255, 0.48), transparent 28%),
        var(--teacher-soft);
}

.teacher-profile-portrait::before {
    position: absolute;
    inset: 24px;
    border: 2px solid rgba(43, 43, 43, 0.2);
    border-radius: 18px;
    content: "";
}

.teacher-profile-portrait::after {
    position: absolute;
    top: 25px;
    right: 25px;
    width: 54px;
    height: 54px;
    border: 3px solid var(--pure-black);
    border-radius: 12px;
    background: url("banana.png") center / 31px no-repeat var(--pure-white);
    box-shadow: 5px 5px 0 var(--teacher-accent);
    content: "";
    transform: rotate(5deg);
}

.teacher-profile-photo {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    height: 100%;
    min-height: 610px;
    object-fit: contain;
    object-position: center bottom;
}

.teacher-profile-copy {
    display: flex;
    min-width: 0;
    flex-direction: column;
    justify-content: center;
    padding: clamp(38px, 5vw, 70px);
}

.profile-kicker,
.section-kicker,
.profile-mini-label {
    display: block;
    color: var(--teacher-accent);
    font-family: "Press Start 2P", cursive;
    font-size: 0.6rem;
    line-height: 1.65;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.teacher-profile-copy h1 {
    max-width: 760px;
    margin: 18px 0 20px;
    font-family: "Press Start 2P", cursive;
    font-size: clamp(1.75rem, 4vw, 3.1rem);
    font-weight: 400;
    line-height: 1.25;
    letter-spacing: -0.04em;
    text-wrap: balance;
}

.profile-slogan {
    max-width: 680px;
    margin: 0;
    color: #473d35;
    font-family: "Neuton", Georgia, serif;
    font-size: clamp(1.6rem, 2.45vw, 2.15rem);
    font-weight: 700;
    line-height: 1.18;
    text-wrap: balance;
}

.profile-lead {
    max-width: 660px;
    margin: 22px 0 0;
    color: var(--teacher-muted);
    font-size: 1.03rem;
    line-height: 1.72;
}

.profile-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 26px;
}

.profile-tag {
    display: inline-flex;
    min-height: 36px;
    align-items: center;
    padding: 8px 12px;
    border: 2px solid var(--pure-black);
    border-radius: 999px;
    color: var(--pure-black);
    background: var(--teacher-soft);
    font-size: 0.77rem;
    font-weight: 700;
}

.profile-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 30px;
}

.profile-primary-action,
.profile-secondary-action {
    display: inline-flex;
    min-height: 52px;
    align-items: center;
    justify-content: center;
    padding: 13px 19px;
    border: 3px solid var(--pure-black);
    border-radius: 10px;
    color: var(--pure-black);
    font-family: "Press Start 2P", cursive;
    font-size: 0.64rem;
    line-height: 1.45;
    text-align: center;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.profile-primary-action {
    background: var(--banana-yellow);
    box-shadow: 5px 5px 0 var(--teacher-accent);
}

.profile-secondary-action {
    background: var(--pure-white);
}

.profile-primary-action:hover,
.profile-secondary-action:hover {
    transform: translateY(-3px);
}

.profile-primary-action:hover {
    box-shadow: 8px 8px 0 var(--teacher-accent);
}

.profile-primary-action:active,
.profile-secondary-action:active,
.page-teachers .teacher-card:active {
    transform: translate(2px, 2px);
}

.profile-proof-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: 32px 0 0;
}

.profile-proof {
    min-width: 0;
    padding: 18px 19px;
    border: 2px solid var(--pure-black);
    border-radius: 12px;
    background: rgba(250, 248, 245, 0.92);
    box-shadow: 5px 5px 0 var(--banana-yellow);
}

.profile-proof strong {
    display: block;
    margin-bottom: 4px;
    font-family: "Press Start 2P", cursive;
    font-size: 0.68rem;
    font-weight: 400;
    line-height: 1.5;
}

.profile-proof span {
    color: var(--teacher-muted);
    font-size: 0.88rem;
}

.profile-section {
    margin-top: 76px;
}

.profile-section-heading {
    max-width: 760px;
    margin: 13px 0 0;
    font-family: "Press Start 2P", cursive;
    font-size: clamp(1.25rem, 2.5vw, 2rem);
    font-weight: 400;
    line-height: 1.45;
    text-wrap: balance;
}

.profile-story-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(320px, 0.88fr);
    gap: 22px;
    margin-top: 25px;
}

.profile-story,
.profile-fit,
.profile-method-card,
.profile-first-lesson {
    border: 3px solid var(--pure-black);
    border-radius: 18px;
    background: var(--pure-white);
    box-shadow: 8px 8px 0 var(--banana-yellow);
}

.profile-story {
    padding: clamp(28px, 4vw, 48px);
}

.profile-story p {
    margin: 0;
    color: #4f463f;
    font-size: 1.05rem;
    line-height: 1.82;
}

.profile-story p + p {
    margin-top: 18px;
}

.profile-story strong {
    color: var(--pure-black);
}

.profile-fit {
    padding: clamp(26px, 3vw, 38px);
    color: var(--pure-white);
    background:
        radial-gradient(circle at 85% 5%, rgba(251, 234, 140, 0.18), transparent 13rem),
        var(--pure-black);
    box-shadow: 8px 8px 0 var(--teacher-accent);
}

.profile-fit h3,
.profile-first-lesson h3 {
    margin: 13px 0 22px;
    font-family: "Press Start 2P", cursive;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.55;
}

.profile-fit .profile-mini-label {
    color: var(--banana-yellow);
}

.profile-fit-list,
.profile-first-list {
    display: grid;
    gap: 14px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.profile-fit-list li,
.profile-first-list li {
    position: relative;
    padding-left: 28px;
    font-size: 0.96rem;
    line-height: 1.6;
}

.profile-fit-list li::before,
.profile-first-list li::before {
    position: absolute;
    top: 0.58em;
    left: 2px;
    width: 11px;
    height: 11px;
    border: 2px solid currentColor;
    border-radius: 3px;
    background: var(--banana-yellow);
    content: "";
    transform: rotate(45deg);
}

.profile-method-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-top: 26px;
}

.profile-method-card {
    position: relative;
    min-height: 250px;
    padding: 29px;
}

.profile-method-card::after {
    position: absolute;
    right: 18px;
    bottom: 13px;
    color: rgba(43, 43, 43, 0.11);
    font-family: "Press Start 2P", cursive;
    font-size: 2rem;
    content: attr(data-step);
}

.profile-method-icon {
    display: inline-flex;
    width: 48px;
    height: 48px;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--pure-black);
    border-radius: 12px;
    background: var(--teacher-soft);
    box-shadow: 4px 4px 0 var(--teacher-accent);
}

.profile-method-icon svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

.profile-method-card h3 {
    margin: 23px 0 10px;
    font-family: "Press Start 2P", cursive;
    font-size: 0.85rem;
    font-weight: 400;
    line-height: 1.55;
}

.profile-method-card p {
    margin: 0;
    color: var(--teacher-muted);
    font-size: 0.94rem;
    line-height: 1.68;
}

.profile-first-lesson {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 0.62fr);
    gap: 28px;
    align-items: center;
    padding: clamp(30px, 5vw, 54px);
    background: var(--teacher-soft);
}

.profile-first-lesson h3 {
    max-width: 700px;
    margin-bottom: 14px;
    font-size: clamp(1rem, 2vw, 1.4rem);
}

.profile-first-lesson p {
    max-width: 680px;
    margin: 0;
    color: #554a41;
}

.profile-first-list {
    padding: 25px;
    border: 2px solid var(--pure-black);
    border-radius: 14px;
    background: rgba(250, 248, 245, 0.78);
}

.profile-cta {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 30px;
    align-items: center;
    margin-top: 76px;
    padding: clamp(34px, 5vw, 58px);
    border: 4px solid var(--pure-black);
    border-radius: 22px;
    color: var(--pure-white);
    background:
        radial-gradient(circle at 10% 0%, rgba(251, 234, 140, 0.19), transparent 20rem),
        var(--pure-black);
    box-shadow: 11px 11px 0 var(--teacher-accent);
}

.profile-cta .section-kicker {
    color: var(--banana-yellow);
}

.profile-cta h2 {
    max-width: 750px;
    margin: 14px 0 10px;
    font-family: "Press Start 2P", cursive;
    font-size: clamp(1.1rem, 2.3vw, 1.72rem);
    font-weight: 400;
    line-height: 1.45;
    text-wrap: balance;
}

.profile-cta p {
    max-width: 690px;
    margin: 0;
    color: #d8d1cc;
}

.profile-cta .profile-primary-action {
    min-width: 240px;
    background: var(--banana-yellow);
}

.teacher-profile-page .site-footer {
    width: 100%;
    padding: 28px 20px;
    border-top: 5px solid var(--action-orange);
    color: var(--pure-white);
    background: var(--pure-black);
    text-align: center;
}

.teacher-profile-page .site-footer p {
    margin: 0;
}

.teacher-profile-page a:focus-visible,
.teacher-profile-page button:focus-visible {
    outline: 4px solid var(--teacher-accent);
    outline-offset: 4px;
}

/* Карточки каталога теперь ведут в полноценные профили. */
.page-teachers .teacher-card {
    color: var(--pure-black);
    text-decoration: none;
}

.page-teachers .teacher-card__summary {
    margin: 13px 0 0;
    color: #675e56;
    font-family: "Montserrat", Arial, sans-serif;
    font-size: 0.9rem;
    line-height: 1.55;
}

.page-teachers .teacher-card__link {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    margin-top: 18px;
    padding: 9px 12px;
    border: 2px solid var(--pure-black);
    border-radius: 8px;
    color: var(--pure-black);
    background: var(--banana-yellow);
    font-family: "Press Start 2P", cursive;
    font-size: 0.52rem;
    line-height: 1.4;
}

.page-teachers .teacher-card:focus-visible {
    outline: 4px solid var(--action-orange);
    outline-offset: 5px;
}

@media (max-width: 900px) {
    .teacher-profile-page .mobile-brand {
        display: inline-flex;
    }

    .mobile-nav-ready .teacher-profile-page .mobile-menu-toggle {
        display: flex;
        flex-direction: column;
    }

    .teacher-profile-main {
        padding-top: calc(92px + env(safe-area-inset-top));
    }
}

@media (max-width: 960px) {
    .teacher-profile-hero {
        grid-template-columns: minmax(270px, 0.78fr) minmax(0, 1.22fr);
    }

    .teacher-profile-copy {
        padding: 36px;
    }

    .profile-proof-strip,
    .profile-method-grid {
        grid-template-columns: 1fr;
    }

    .profile-method-card {
        min-height: 0;
    }

    .profile-cta {
        grid-template-columns: 1fr;
    }

    .profile-cta .profile-primary-action {
        width: fit-content;
    }
}

@media (max-width: 760px) {
    .teacher-profile-main {
        width: 100%;
        padding: calc(72px + env(safe-area-inset-top)) 16px calc(64px + env(safe-area-inset-bottom));
    }

    .teacher-profile-hero {
        grid-template-columns: 1fr;
        min-height: 0;
        border-width: 3px;
        border-radius: 18px;
        box-shadow: 8px 8px 0 var(--teacher-accent);
    }

    .teacher-profile-portrait {
        min-height: 410px;
        border-right: 0;
        border-bottom: 3px solid var(--pure-black);
    }

    .teacher-profile-photo {
        min-height: 410px;
        max-height: 510px;
    }

    .teacher-profile-copy {
        padding: 30px 24px 32px;
    }

    .teacher-profile-copy h1 {
        margin-top: 14px;
        font-size: clamp(1.65rem, 9vw, 2.35rem);
    }

    .profile-slogan {
        font-size: 1.65rem;
    }

    .profile-lead,
    .profile-story p {
        font-size: 1rem;
    }

    .profile-actions,
    .profile-primary-action,
    .profile-secondary-action,
    .profile-cta .profile-primary-action {
        width: 100%;
    }

    .profile-proof-strip {
        margin-top: 24px;
    }

    .profile-section,
    .profile-cta {
        margin-top: 52px;
    }

    .profile-story-grid,
    .profile-first-lesson {
        grid-template-columns: 1fr;
    }

    .profile-section-heading {
        font-size: 1.22rem;
    }

    .profile-story,
    .profile-fit,
    .profile-method-card,
    .profile-first-lesson {
        border-radius: 14px;
        box-shadow: 6px 6px 0 var(--banana-yellow);
    }

    .profile-cta {
        padding: 32px 24px;
        border-width: 3px;
        border-radius: 17px;
        box-shadow: 8px 8px 0 var(--teacher-accent);
    }

    .page-teachers .teacher-card__summary {
        display: -webkit-box;
        overflow: hidden;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 3;
        font-size: 0.83rem;
    }
}

@media (max-width: 520px) {
    .profile-back {
        margin-bottom: 14px;
        font-size: 0.84rem;
    }

    .teacher-profile-portrait,
    .teacher-profile-photo {
        min-height: 350px;
        max-height: 430px;
    }

    .teacher-profile-portrait::before {
        inset: 15px;
    }

    .teacher-profile-portrait::after {
        top: 17px;
        right: 17px;
        width: 46px;
        height: 46px;
        background-size: 27px;
        box-shadow: 4px 4px 0 var(--teacher-accent);
    }

    .teacher-profile-copy {
        padding: 27px 20px 29px;
    }

    .profile-kicker,
    .section-kicker,
    .profile-mini-label {
        font-size: 0.52rem;
    }

    .teacher-profile-copy h1 {
        font-size: clamp(1.45rem, 9vw, 2rem);
        line-height: 1.32;
    }

    .profile-slogan {
        font-size: 1.48rem;
    }

    .profile-lead {
        margin-top: 18px;
        line-height: 1.65;
    }

    .profile-tag {
        min-height: 34px;
        font-size: 0.72rem;
    }

    .profile-primary-action,
    .profile-secondary-action {
        min-height: 50px;
        padding: 12px 13px;
        font-size: 0.55rem;
    }

    .profile-proof {
        padding: 16px;
    }

    .profile-proof strong {
        font-size: 0.59rem;
    }

    .profile-section-heading {
        font-size: 1.02rem;
    }

    .profile-story,
    .profile-fit,
    .profile-method-card,
    .profile-first-lesson {
        padding: 24px 20px;
    }

    .profile-method-card h3 {
        font-size: 0.77rem;
    }

    .profile-cta h2 {
        font-size: 1rem;
    }

    .page-teachers .teacher-card {
        grid-template-columns: 118px minmax(0, 1fr);
        gap: 14px;
    }

    .page-teachers .teacher-photo {
        width: 118px;
        height: 172px;
        object-fit: cover;
    }

    .page-teachers .teacher-card__copy {
        gap: 8px;
    }

    .page-teachers .teacher-card__summary {
        margin-top: 4px;
        -webkit-line-clamp: 2;
        font-size: 0.76rem;
        line-height: 1.45;
    }

    .page-teachers .teacher-card__link {
        min-height: 40px;
        margin-top: 3px;
        padding: 7px 9px;
        font-size: 0.44rem;
    }
}

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

    .profile-primary-action,
    .profile-secondary-action {
        transition: none;
    }
}
