.team-panel {
    min-height: 100svh;
    padding: calc(var(--header-h) + 20px) 0 0;
    background:
        linear-gradient(rgba(13,52,34,.022) 1px, transparent 1px),
        linear-gradient(90deg, rgba(13,52,34,.022) 1px, transparent 1px),
        #ffffff;
    background-size: 56px 56px, 56px 56px, auto;
}
.team-shell { min-height: calc(100svh - var(--header-h) - 20px); display: flex; flex-direction: column; }
.team-heading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-align: center;
}
.team-kicker {
    margin: 0;
    color: var(--green-700);
    font-size: .76rem;
    font-weight: 820;
    letter-spacing: .16em;
    line-height: 1;
    text-transform: uppercase;
}
.team-heading h2 { margin: 0; font-size: clamp(3rem, 7vw, 6.6rem); line-height: .9; letter-spacing: -.06em; color: var(--green-950); }
.team-composition { display: grid; grid-template-columns: .94fr 1.06fr; gap: 64px; align-items: center; margin-top: 28px; }

.team-members {
    position: relative;
    min-height: 560px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 42px 52px;
    align-content: center;
    padding-top: 132px;
}
.team-member,
.team-adviser-node {
    position: relative;
    z-index: 3;
    border: 0;
    background: transparent;
    color: var(--green-950);
    cursor: pointer;
}
.team-member {
    display: grid;
    justify-items: center;
    align-content: center;
    gap: 11px;
    width: 100%;
    min-height: 176px;
    padding: 14px 10px;
    text-align: center;
}
.team-adviser-node {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: min(360px, 88%);
    display: grid;
    justify-items: center;
    gap: 10px;
    padding: 0;
    text-align: center;
}
.member-photo,
.team-adviser-photo {
    position: relative;
    width: 88px;
    height: 88px;
    padding: 4px;
    border-radius: 50%;
    overflow: visible;
    background: #fff;
    border: 2px solid rgba(253,197,48,.42);
    box-shadow: 0 0 0 8px rgba(253,197,48,.07), 0 14px 30px rgba(13,52,34,.11);
    transition: transform .30s cubic-bezier(.22,.8,.22,1), border-color .30s ease, box-shadow .30s ease, filter .30s ease;
}
.team-adviser-photo { width: 96px; height: 96px; }
.member-photo::before,
.team-adviser-photo::before {
    content: "";
    position: absolute;
    inset: -13px;
    z-index: -1;
    border-radius: inherit;
    border: 1px solid rgba(253,197,48,.24);
    box-shadow: 0 0 34px rgba(253,197,48,.08);
    opacity: .72;
    transform: scale(.92);
    transition: opacity .30s ease, transform .30s ease, box-shadow .30s ease;
}
.member-photo img,
.team-adviser-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
    background: #fff;
}
.member-copy,
.team-adviser-copy {
    display: grid;
    justify-items: center;
    gap: 4px;
    max-width: 250px;
    text-align: center;
}
.team-role {
    color: #6a786f;
    font-size: .70rem;
    font-weight: 820;
    text-transform: uppercase;
    letter-spacing: .11em;
    line-height: 1.2;
    transition: color .24s ease;
}
.team-name {
    color: var(--green-950);
    font-size: clamp(.96rem, 1.32vw, 1.16rem);
    font-weight: 780;
    line-height: 1.18;
    letter-spacing: -.018em;
}
.team-adviser-copy .team-name { font-size: clamp(1rem, 1.45vw, 1.22rem); }
.team-member:hover .member-photo,
.team-member:focus-visible .member-photo,
.team-adviser-node:hover .team-adviser-photo,
.team-adviser-node:focus-visible .team-adviser-photo {
    transform: translateY(-3px) scale(1.075);
    border-color: var(--gold-500);
    box-shadow: 0 0 0 10px rgba(253,197,48,.14), 0 18px 38px rgba(13,52,34,.15); filter: drop-shadow(0 8px 16px rgba(253,197,48,.12));
}
.team-member:hover .member-photo::before,
.team-member:focus-visible .member-photo::before,
.team-adviser-node:hover .team-adviser-photo::before,
.team-adviser-node:focus-visible .team-adviser-photo::before {
    opacity: 1;
    transform: scale(1.10);
    box-shadow: 0 0 38px rgba(253,197,48,.18);
}
.team-member:hover .team-name,
.team-member:focus-visible .team-name,
.team-adviser-node:hover .team-name,
.team-adviser-node:focus-visible .team-name { color: var(--green-800); }
.team-member:hover .team-role,
.team-member:focus-visible .team-role,
.team-adviser-node:hover .team-role,
.team-adviser-node:focus-visible .team-role { color: var(--gold-500); }
.team-member:focus-visible,
.team-adviser-node:focus-visible {
    outline: 3px solid rgba(253,197,48,.45);
    outline-offset: 5px;
    border-radius: 18px;
}

/* Each person arrives separately once the team composition enters view. */
.js .team-members.reveal .team-adviser-node,
.js .team-members.reveal .team-member {
    opacity: 0;
    transform: translateY(14px) scale(.97);
}
.js .team-members.reveal .team-adviser-node { transform: translateX(-50%) translateY(14px) scale(.97); }
.js .team-members.reveal.visible .team-adviser-node,
.js .team-members.reveal.visible .team-member {
    opacity: 1;
    transform: translateY(0) scale(1);
    transition: opacity .52s ease, transform .52s cubic-bezier(.22,.8,.22,1);
}
.js .team-members.reveal.visible .team-adviser-node { transform: translateX(-50%) translateY(0) scale(1); transition-delay: .04s; }
.js .team-members.reveal.visible .member-1 { transition-delay: .15s; }
.js .team-members.reveal.visible .member-2 { transition-delay: .24s; }
.js .team-members.reveal.visible .member-3 { transition-delay: .33s; }
.js .team-members.reveal.visible .member-4 { transition-delay: .42s; }

.team-dna { position: absolute; z-index: 1; inset: 98px 8% 40px; pointer-events: none; opacity: .64; }
.team-line { position: absolute; top: 0; bottom: 0; width: 3px; border-radius: 99px; background: rgba(13,52,34,.14); transform-origin: center; }
.team-line-a { left: 40%; transform: rotate(11deg); }
.team-line-b { right: 40%; transform: rotate(-11deg); }
.team-rung { position: absolute; left: 39%; width: 22%; height: 2px; background: rgba(253,197,48,.34); }
.team-rung-1 { top: 33%; transform: rotate(-8deg); }
.team-rung-2 { top: 67%; transform: rotate(8deg); }

.team-story-card { position: relative; min-height: 500px; border-radius: 32px; overflow: hidden; box-shadow: 0 28px 70px rgba(8,39,24,.18); background: var(--green-950); }
.team-photo-main { position: absolute; inset: 0; }
.team-photo-main img { width: 100%; height: 100%; object-fit: cover; }
.team-story-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8,39,24,.02) 30%, rgba(8,39,24,.9) 100%); }
.team-story-overlay { position: absolute; z-index: 3; left: 32px; right: 32px; bottom: 28px; display: grid; gap: 8px; color: white; }
.team-story-overlay > span { color: var(--gold-500); text-shadow: 0 0 16px rgba(253,197,48,.18); font-size: .75rem; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.team-story-overlay strong { max-width: 520px; font-size: clamp(1.8rem, 3.2vw, 3.1rem); line-height: 1; letter-spacing: -.04em; }
.team-story-overlay p {
    max-width: 560px;
    margin: 2px 0 0;
    color: rgba(255,255,255,.82);
    font-size: .9rem;
    line-height: 1.45;
}
.team-story-open { justify-self: start; margin-top: 8px; border: 1px solid rgba(255,255,255,.34); background: rgba(255,255,255,.12); color: white; padding: 11px 15px; border-radius: 12px; font-weight: 800; cursor: pointer; backdrop-filter: blur(8px); transition: .2s ease; }
.team-story-open:hover { background: linear-gradient(135deg, #FFF0A8 0%, #FFD246 100%); border-color: rgba(253,197,48,.55); color: var(--green-950); transform: translateY(-2px); box-shadow: 0 14px 30px rgba(253,197,48,.22); }

.site-footer { margin-top: auto; padding: 30px 20px 26px; text-align: center; border-top: 1px solid rgba(13,52,34,.12); }
.site-footer-line {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    max-width: 100%;
    white-space: nowrap;
}
.site-footer-logo {
    display: block;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    object-fit: contain;
    object-position: center;
    transform: translateY(-1px);
}
.site-footer p { margin: 0; color: #65756c; font-size: .82rem; line-height: 1.25; }

.team-story-dialog,
.member-profile-dialog { border: 0; padding: 0; color: var(--ink); background: transparent; }
.team-story-dialog::backdrop,
.member-profile-dialog::backdrop { background: rgba(4,20,12,.72); backdrop-filter: blur(8px); }
.team-dialog-shell { position: relative; width: min(1080px, calc(100vw - 42px)); max-height: min(86vh, 820px); padding: 28px; overflow: auto; border-radius: 28px; background: #fbf8ef; box-shadow: 0 30px 90px rgba(0,0,0,.28); }
.team-dialog-close,
.member-profile-close { position: absolute; z-index: 5; right: 18px; top: 18px; width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid rgba(13,52,34,.14); border-radius: 50%; background: rgba(255,255,255,.85); color: var(--green-950); font-size: 1.6rem; cursor: pointer; }
.team-dialog-header { padding: 8px 56px 22px 4px; }
.team-dialog-header h2 { margin: 8px 0 0; color: var(--green-950); font-size: clamp(2rem,5vw,4rem); line-height: .95; letter-spacing: -.05em; }
.team-story-stage { position: relative; min-height: 510px; border-radius: 22px; overflow: hidden; background: var(--green-950); }
.team-story-slide { position: absolute; inset: 0; margin: 0; opacity: 0; pointer-events: none; transition: opacity .35s ease; }
.team-story-slide.is-active { opacity: 1; pointer-events: auto; }
.team-story-slide img { width: 100%; height: 100%; object-fit: cover; }
.team-story-slide::after { content: ""; position: absolute; inset: 45% 0 0; background: linear-gradient(transparent, rgba(8,39,24,.92)); }
.team-story-slide figcaption { position: absolute; z-index: 2; left: 26px; right: 26px; bottom: 24px; display: grid; gap: 6px; color: white; }
.team-story-slide figcaption span { color: var(--gold-500); text-shadow: 0 0 16px rgba(253,197,48,.18); font-size: .72rem; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.team-story-slide figcaption strong { max-width: 760px; font-size: clamp(1.35rem,3vw,2.5rem); line-height: 1.08; letter-spacing: -.03em; }
.team-story-slide figcaption p {
    max-width: 680px;
    margin: 2px 0 0;
    color: rgba(255,255,255,.82);
    font-size: .92rem;
    line-height: 1.45;
}
.team-story-controls { display: flex; align-items: center; justify-content: center; gap: 16px; padding-top: 18px; color: #697970; font-size: .78rem; font-weight: 800; letter-spacing: .08em; }
.team-story-controls button { width: 44px; height: 44px; border: 1px solid rgba(13,52,34,.15); border-radius: 50%; background: white; color: var(--green-950); cursor: pointer; }

.member-profile-dialog { width: min(920px, calc(100vw - 42px)); border-radius: 28px; overflow: hidden; background: #fbf8ef; box-shadow: 0 30px 90px rgba(0,0,0,.28); }
.member-profile-dialog[open] { display: grid; grid-template-columns: .9fr 1.1fr; }
.member-profile-visual { position: relative; min-height: 520px; display: grid; place-items: center; overflow: hidden; background: var(--green-950); }
.member-profile-visual[data-theme="adviser"] { background: #3e3316; }
.member-circuit { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .22; }
.member-circuit path, .member-circuit circle { fill: none; stroke: var(--gold-300); stroke-width: 4; }
.member-circuit circle { fill: var(--gold-300); }
.portrait-frame {
    position: relative;
    z-index: 2;
    width: min(70%, 270px);
    aspect-ratio: .82;
    overflow: hidden;

    /* Modern EduSchedX profile frame:
       a clean data-card silhouette instead of the old arched/tomb shape. */
    border-radius: 26px;
    border: 3px solid rgba(255,255,255,.72);
    box-shadow:
        0 24px 54px rgba(0,0,0,.22),
        0 0 0 1px rgba(253,197,48,.18);
    background: #e9eee5;
}
.portrait-frame::after {
    content: "";
    position: absolute;
    inset: 10px;
    z-index: 2;
    pointer-events: none;
    border: 1px solid rgba(253,197,48,.36);
    border-radius: 18px;
    opacity: .78;
}
.portrait-frame img {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
}
.profile-index { position: absolute; z-index: 4; left: 24px; bottom: 18px; color: rgba(255,255,255,.82); font-size: 3.5rem; font-weight: 900; letter-spacing: -.08em; line-height: .82; text-shadow: 0 10px 26px rgba(0,0,0,.16); pointer-events: none; }
.member-profile-content { align-self: center; padding: 54px; }
.profile-eyebrow { margin: 0 0 12px; color: var(--green-700); font-size: .74rem; font-weight: 850; letter-spacing: .13em; text-transform: uppercase; }
.member-profile-content h2 { margin: 0; color: var(--green-950); font-size: clamp(2rem,4vw,3.7rem); line-height: .98; letter-spacing: -.05em; }
.profile-role { margin: 16px 0 0; color: var(--gold-500); font-weight: 850; text-transform: uppercase; letter-spacing: .09em; font-size: .78rem; }
.profile-summary { margin: 20px 0 0; color: #596a61; line-height: 1.7; }

.team-dialog-open { overflow: hidden; }

@media (max-width: 980px) {
    .team-composition { grid-template-columns: 1fr; gap: 36px; }
    .team-members { min-height: 500px; padding-top: 126px; }
    .team-story-card { min-height: 460px; }
}

@media (max-width: 720px) {
    .team-panel { padding-top: calc(var(--header-h) + 12px); }
    .team-heading {
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 8px;
        text-align: center;
    }
    .team-kicker { font-size: .66rem; letter-spacing: .14em; }
    .team-heading h2 { font-size: clamp(2.8rem, 14vw, 4.2rem); }
    .team-members { min-height: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 14px 10px; padding-top: 150px; }
    .team-adviser-node { top: 8px; width: min(320px, 94%); }
    .team-adviser-photo { width: 82px; height: 82px; }
    .team-member { min-height: 160px; padding: 10px 4px; }
    .member-photo { width: 72px; height: 72px; }
    .team-name { font-size: .86rem; }
    .team-role { font-size: .62rem; }
    /* Keep the adviser-to-proponents "tower" visible on mobile. */
    .team-dna {
        display: block;
        inset: 102px 12% 22px;
        z-index: 1;
        opacity: .58;
    }
    .team-line { width: 2px; background: rgba(13,52,34,.16); }
    .team-line-a { left: 41%; transform: rotate(7deg); }
    .team-line-b { right: 41%; transform: rotate(-7deg); }
    .team-rung { left: 34%; width: 32%; background: rgba(253,197,48,.32); }
    .team-rung-1 { top: 39%; transform: rotate(-6deg); }
    .team-rung-2 { top: 70%; transform: rotate(6deg); }
    .team-story-card { min-height: 420px; border-radius: 24px; }
    .team-story-overlay { left: 20px; right: 20px; bottom: 20px; }
    .team-story-overlay p { font-size: .8rem; line-height: 1.4; }
    .team-story-slide figcaption p { font-size: .8rem; line-height: 1.4; }
    .team-dialog-shell { padding: 18px; border-radius: 22px; }
    .team-story-stage { min-height: 58vh; }
    .member-profile-dialog[open] { display: block; }
    .member-profile-visual {
        min-height: 360px;
        align-content: start;
        justify-items: center;
        padding: 28px 18px 78px;
    }
    .portrait-frame {
        width: 210px;
        margin-top: 2px;
        border-radius: 22px;
    }
    .portrait-frame::after {
        inset: 8px;
        border-radius: 15px;
    }
    .profile-index {
        left: 18px;
        bottom: 14px;
        font-size: 4.1rem;
    }
    .member-profile-content { padding: 34px 28px 38px; }
    .site-footer-line { flex-direction: column; gap: 7px; }
    .site-footer-logo { width: 34px; height: 34px; flex-basis: 34px; transform: translateY(0); }
}


@media (max-width: 480px) {
    .team-members { grid-template-columns: 1fr 1fr; gap: 10px 4px; padding-top: 154px; }
    .team-member { min-height: 148px; }
    .member-photo { width: 66px; height: 66px; }
    .team-adviser-photo { width: 78px; height: 78px; }
    .team-adviser-copy .team-name { font-size: .92rem; }
    .team-name { font-size: .80rem; }
    .member-profile-visual {
        min-height: 344px;
        padding: 24px 14px 76px;
    }
    .portrait-frame {
        width: min(78vw, 228px);
    }
    .profile-index {
        left: 14px;
        bottom: 12px;
        font-size: 3.8rem;
    }
}

@media (max-width: 480px) {
    .team-dna { inset: 104px 8% 20px; opacity: .52; }
    .team-line-a { left: 42%; transform: rotate(6deg); }
    .team-line-b { right: 42%; transform: rotate(-6deg); }
}
@media (prefers-reduced-motion: reduce) {
    .team-story-slide { transition: none; }
    .js .team-members.reveal .team-adviser-node, .js .team-members.reveal .team-member { opacity: 1 !important; transition: none !important; }
    .js .team-members.reveal .team-adviser-node { transform: translateX(-50%) !important; }
    .js .team-members.reveal .team-member { transform: none !important; }
}

@media (max-width: 480px) {
    .site-footer {
        padding-inline: 8px;
    }
    .site-footer-line {
        flex-direction: row;
        gap: 3px;
    }
    .site-footer-logo {
        width: 24px;
        height: 24px;
        flex-basis: 24px;
    }
    .site-footer p {
        font-size: .56rem;
        letter-spacing: -.01em;
    }
}

/* ============================================================
   WELCOME FOOTER - UNIFIED OFFICIAL EDUSCHEDX LOGO
   ============================================================ */

.site-footer {
    position: relative;
}

.site-footer::before {
    content: "";
    position: absolute;
    top: -1px;
    left: 50%;
    width: min(280px, 70%);
    height: 2px;
    transform: translateX(-50%);
    background: linear-gradient(
        90deg,
        transparent 0%,
        #146939 28%,
        #FDC530 50%,
        #146939 72%,
        transparent 100%
    );
}

.site-footer-logo {
    object-fit: contain;
    object-position: center;
    filter: none;
    background: transparent;
}
