* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "Inter", Arial, sans-serif;
}

a {
    text-decoration: none;
}

.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

.navbar-inner {
    width: 100%;
    max-width: 1280px;
    min-height: 76px;
    margin: 0 auto;
    padding: 10px 24px;
    display: flex;
    align-items: center;
    gap: 24px;
    position: relative;
}

.navbar-brand {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    font-weight: 800;
    transition: transform 0.25s ease, color 0.25s ease;
}

.navbar-links {
    display: flex;
    align-items: center;
    gap: clamp(16px, 2vw, 28px);
    flex: 1;
}

.navbar-links a {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    font-size: 0.95rem;
    font-weight: 700;
    transition: color 0.25s ease, transform 0.25s ease;
}

.navbar-links a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 4px;
    height: 2px;
    border-radius: 999px;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.25s ease;
}

.navbar-links a:hover,
.navbar-links a.active {
    transform: translateY(-1px);
}

.navbar-links a:hover::after,
.navbar-links a.active::after {
    transform: scaleX(1);
}

.navbar-auth {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-left: auto;
    flex: 0 0 auto;
}

.user-greeting {
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.9rem;
    font-weight: 700;
}

.btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    border-radius: 8px;
    font-weight: 800;
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, color 0.25s ease;
}

.btn-sm {
    min-height: 38px;
    padding: 9px 15px;
    font-size: 0.88rem;
}

.btn-primary {
    color: #ffffff;
    background: linear-gradient(135deg, #5b21b6, #8b5cf6);
    box-shadow: 0 14px 30px rgba(91, 33, 182, 0.22);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 38px rgba(91, 33, 182, 0.28);
}

.btn-outline {
    border: 1px solid currentColor;
}

.mobile-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 8px;
    background: rgba(124, 58, 237, 0.08);
    cursor: pointer;
    font-size: 1.1rem;
}

@media (max-width: 920px) {
    .navbar-inner {
        min-height: 70px;
        padding: 10px 16px;
    }

    .navbar-links {
        position: absolute;
        top: calc(100% + 8px);
        left: 16px;
        right: 16px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        margin-left: 0;
        padding: 14px;
        border-radius: 8px;
        background: #ffffff;
        box-shadow: 0 18px 36px rgba(91, 33, 182, 0.12);
    }

    .navbar-links.open {
        display: flex;
        animation: navDrop 0.28s ease both;
    }

    .navbar-links a {
        width: 100%;
        min-height: 44px;
        padding: 8px 10px;
    }

    .navbar-links a::after {
        bottom: 6px;
    }

    .mobile-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
}

@media (max-width: 520px) {
    .navbar-auth .btn {
        display: none;
    }

    .user-greeting {
        display: none;
    }
}

@keyframes navDrop {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Shared subpage hero video card */
.about-hero.subpage-hero,
.contact-hero.subpage-hero,
.facility-hero.subpage-hero,
.partner-hero.subpage-hero {
    display: grid;
    place-items: normal;
    align-items: center;
    text-align: left;
    padding: 118px 20px;
}

.partner-hero.subpage-hero {
    padding: 100px 20px;
}

.subpage-hero .subpage-hero-inner {
    position: relative;
    z-index: 2;
    width: min(calc(100% - 48px), 1280px);
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 0.98fr) minmax(460px, 1fr);
    gap: 38px;
    align-items: center;
}

.subpage-hero .subpage-hero-copy {
    min-width: 0;
    max-width: 780px;
}

.subpage-hero .subpage-hero-copy h1,
.subpage-hero .subpage-hero-copy p {
    margin-left: 0;
    margin-right: 0;
}

.subpage-hero .subpage-hero-copy p {
    margin-bottom: 0;
}

.subpage-hero .home-hero-media {
    width: 100%;
    max-width: 800px;
    justify-self: end;
}

.subpage-hero .home-hero-video-frame {
    min-height: 390px;
}

.home-hero-media {
    --hero-purple-900: #351064;
    --hero-purple-800: #4c1d95;
    --hero-purple-700: #6d28d9;
    --hero-gold: #f7c948;

    position: relative;
    min-width: 0;
    animation: homeRevealUp 0.85s ease 0.12s both;
}

.home-hero-video-card {
    position: relative;
    border-radius: 28px;
    padding: 12px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0.12)) padding-box,
        linear-gradient(135deg, rgba(255, 255, 255, 0.88), rgba(139, 92, 246, 0.42), rgba(247, 201, 72, 0.74)) border-box;
    border: 1px solid transparent;
    box-shadow: 0 30px 90px rgba(33, 16, 63, 0.34);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
}

.home-hero-video-card::before {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.48), transparent);
    opacity: 0.34;
    animation: homeBorderSweep 5.5s ease-in-out infinite;
    pointer-events: none;
}

.home-hero-video-frame {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    aspect-ratio: 16 / 10;
    min-height: 360px;
    background:
        radial-gradient(ellipse at 18% 20%, rgba(247, 201, 72, 0.2), transparent 38%),
        radial-gradient(ellipse at 82% 80%, rgba(53, 208, 255, 0.16), transparent 36%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(242, 235, 255, 0.88));
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.42);
}

.home-hero-video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center center;
    background: transparent;
    filter: saturate(1.06) contrast(1.02);
    transform: translate3d(0, 0, 0);
}

.home-hero-video-shade {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(180deg, rgba(32, 19, 53, 0.12), transparent 24%, transparent 66%, rgba(32, 19, 53, 0.12)),
        radial-gradient(ellipse at center, transparent 42%, rgba(76, 29, 149, 0.16));
}

.home-hero-video-topbar {
    position: absolute;
    top: 14px;
    left: 14px;
    right: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    z-index: 2;
}

.home-hero-video-label,
.home-hero-live {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 34px;
    padding: 8px 11px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.42);
    background: rgba(255, 255, 255, 0.72);
    color: var(--hero-purple-900);
    font-size: 0.78rem;
    font-weight: 900;
    box-shadow: 0 12px 28px rgba(32, 19, 53, 0.12);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.home-hero-video-label {
    min-width: 0;
    max-width: calc(100% - 84px);
}

.home-hero-live {
    flex: 0 0 auto;
}

.home-hero-live i {
    color: #10b981;
    filter: drop-shadow(0 0 6px rgba(16, 185, 129, 0.52));
}

.home-hero-float-card {
    position: absolute;
    z-index: 4;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 178px;
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.34);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.17);
    color: #ffffff;
    box-shadow: 0 22px 50px rgba(33, 16, 63, 0.22);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    animation: homeFloat 6s ease-in-out infinite;
}

.home-hero-float-card i {
    display: inline-flex;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border-radius: 14px;
    color: var(--hero-purple-900);
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 12px 26px rgba(33, 16, 63, 0.12);
}

.home-hero-float-card strong {
    display: block;
    color: #ffffff;
    font-size: 1.2rem;
    line-height: 1.1;
    font-weight: 950;
}

.home-hero-float-card span {
    display: block;
    margin-top: 3px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.78rem;
    font-weight: 800;
}

.home-float-students {
    left: -34px;
    bottom: 36px;
}

.home-float-success {
    right: -24px;
    top: 88px;
    animation-delay: -2.4s;
}

@keyframes homeRevealUp {
    from {
        opacity: 0;
        transform: translateY(22px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes homeBorderSweep {
    0%,
    100% {
        opacity: 0.22;
        transform: translateX(-18%);
    }

    50% {
        opacity: 0.46;
        transform: translateX(18%);
    }
}

@keyframes homeFloat {
    0%,
    100% {
        transform: translate3d(0, 0, 0);
    }

    50% {
        transform: translate3d(0, -13px, 0);
    }
}

@media (max-width: 1050px) {
    .about-hero.subpage-hero,
    .contact-hero.subpage-hero,
    .facility-hero.subpage-hero,
    .partner-hero.subpage-hero {
        padding: 98px 20px 82px;
        text-align: center;
    }

    .subpage-hero .subpage-hero-inner {
        width: min(calc(100% - 32px), 780px);
        grid-template-columns: 1fr;
        gap: 34px;
    }

    .subpage-hero .subpage-hero-copy {
        margin: 0 auto;
    }

    .subpage-hero .subpage-hero-copy h1,
    .subpage-hero .subpage-hero-copy p {
        margin-left: auto;
        margin-right: auto;
    }

    .subpage-hero .home-hero-media {
        width: min(100%, 800px);
        max-width: 800px;
        justify-self: center;
    }
}

@media (max-width: 680px) {
    .about-hero.subpage-hero,
    .contact-hero.subpage-hero,
    .facility-hero.subpage-hero,
    .partner-hero.subpage-hero {
        padding: 82px 16px 66px;
        text-align: left;
    }

    .subpage-hero .subpage-hero-inner {
        width: 100%;
        gap: 26px;
    }

    .subpage-hero .subpage-hero-copy {
        margin: 0;
    }

    .subpage-hero .subpage-hero-copy h1,
    .subpage-hero .subpage-hero-copy p {
        margin-left: 0;
        margin-right: 0;
    }

    .home-hero-video-card {
        border-radius: 22px;
        padding: 8px;
    }

    .home-hero-video-frame,
    .subpage-hero .home-hero-video-frame {
        aspect-ratio: 16 / 11;
        min-height: 230px;
        border-radius: 16px;
    }

    .home-hero-video-topbar {
        top: 10px;
        left: 10px;
        right: 10px;
    }

    .home-hero-video-label,
    .home-hero-live {
        min-height: 30px;
        padding: 7px 9px;
        font-size: 0.68rem;
    }

    .home-hero-float-card {
        position: static;
        margin-top: 12px;
        min-width: 0;
        animation: none;
    }

    .home-hero-media {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .home-hero-video-card {
        grid-column: 1 / -1;
    }
}

@media (max-width: 440px) {
    .home-hero-media {
        grid-template-columns: 1fr;
    }

    .home-hero-video-frame,
    .subpage-hero .home-hero-video-frame {
        min-height: 200px;
    }

    .home-hero-video-label {
        max-width: 156px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .home-hero-media,
    .home-hero-media *,
    .home-hero-video-card::before {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
