/* Stable desktop composition across different monitor sizes */
@media (min-width: 1181px) {
    body {
        min-width: 1180px;
    }

    .navbar {
        width: min(1500px, calc(100vw - 90px));
    }

    .hero {
        min-height: clamp(650px, 48vw, 760px);
        padding: clamp(112px, 7vw, 126px) clamp(42px, 4.8vw, 80px) 26px;
    }

    .hero-content {
        width: min(1500px, calc(100vw - 96px));
        grid-template-columns: minmax(420px, 0.47fr) minmax(650px, 0.53fr);
        gap: clamp(26px, 3.4vw, 58px);
        align-items: center;
    }

    .hero-title {
        font-size: clamp(4.3rem, 4.45vw, 5.7rem);
    }

    .hero-title small {
        font-size: clamp(2.45rem, 2.55vw, 3.05rem);
    }

    .hero-robot-scene {
        min-height: auto;
        transform: none;
        justify-content: center;
        overflow: visible;
    }

    .hero-reference-image {
        width: 100%;
        max-width: 980px;
        min-width: 0;
        object-fit: contain;
    }

    .stats-bar {
        width: min(1500px, calc(100vw - 120px));
        margin-top: clamp(-22px, -1.2vw, -8px);
    }

    .courses-section {
        width: min(1500px, calc(100vw - 120px));
        margin: 0 auto;
        padding-left: 0;
        padding-right: 0;
    }

    .section-header {
        margin-left: 0;
    }

    .courses-grid {
        width: calc(100% - 500px);
        min-width: 770px;
    }

    .future-banner {
        width: 430px;
    }
}

@media (min-width: 1500px) {
    .hero-reference-image {
        max-width: 1040px;
    }
}

@media (max-width: 1280px) and (min-width: 1181px) {
    .hero-content {
        width: min(1160px, calc(100vw - 58px));
        grid-template-columns: 410px 1fr;
        gap: 18px;
    }

    .hero-title {
        font-size: 4.15rem;
    }

    .hero-title small {
        font-size: 2.25rem;
    }

    .hero-reference-image {
        max-width: 720px;
    }

    .stats-bar,
    .courses-section {
        width: min(1160px, calc(100vw - 58px));
    }
}

/* Final responsive lock: keep the reference-style hero intact on 17" and 25" monitors. */
@media (min-width: 1181px) {
    .hero {
        width: 100%;
    }

    .hero-content {
        max-width: 1500px;
    }

    .hero-text {
        min-width: 0;
    }

    .hero-title,
    .hero-title small,
    .hero-desc {
        max-width: 100%;
    }

    .hero-robot-scene {
        min-width: 0;
    }
}

@media (min-width: 1361px) {
    .hero-content {
        grid-template-columns: minmax(520px, 0.78fr) minmax(680px, 1fr);
    }
}

@media (max-width: 1360px) and (min-width: 1181px) {
    .hero {
        min-height: 690px;
        padding: 124px 35px 28px;
    }

    .hero-content {
        width: min(1180px, calc(100vw - 70px));
        grid-template-columns: 470px minmax(0, 1fr);
        gap: 30px;
    }

    .hero-title {
        font-size: clamp(3.4rem, 4.05vw, 4rem);
        letter-spacing: -0.055em;
    }

    .hero-title small {
        font-size: clamp(1.9rem, 2.35vw, 2.3rem);
    }

    .hero-desc {
        max-width: 440px;
        font-size: 1.05rem;
    }

    .hero-reference-image {
        width: 100%;
        max-width: 635px;
    }

    .stats-bar,
    .courses-section {
        width: min(1180px, calc(100vw - 70px));
    }

    .courses-grid {
        width: calc(100% - 470px);
        min-width: 650px;
    }

    .future-banner {
        width: 420px;
    }
}

/* Match the reference course row without squeezing content on medium desktops. */
@media (min-width: 1181px) {
    .courses-section .course-meta {
        display: none;
    }

    .courses-section .course-card-inner {
        grid-template-columns: 70px minmax(0, 1fr);
    }

    .courses-section .course-card h3,
    .courses-section .course-card p {
        grid-column: 2;
    }

    .courses-section .course-card p {
        margin-top: 4px;
    }

    .future-banner {
        min-height: 214px;
        padding: 0;
        background: transparent;
    }

    .future-banner > img {
        display: block;
    }

    .future-banner > div,
    .future-banner > span {
        display: none;
    }
}

@media (max-width: 1360px) and (min-width: 1181px) {
    .courses-grid {
        width: 100%;
        min-width: 0;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 18px;
    }

    .future-banner {
        width: min(430px, 100%);
        margin: 22px 0 0 auto;
    }
}

/* Polished reference-style hero and courses. These rules intentionally sit last. */
.hero-robot-scene {
    position: relative;
}

.hero-robot-scene::before {
    content: '';
    position: absolute;
    inset: -12% -9% -14% -10%;
    z-index: 0;
    border-radius: 48% 52% 44% 56%;
    background:
        radial-gradient(circle at 52% 48%, rgba(255, 255, 255, 0.95), transparent 46%),
        radial-gradient(circle at 68% 45%, rgba(34, 204, 255, 0.2), transparent 36%),
        radial-gradient(circle at 36% 58%, rgba(122, 77, 255, 0.15), transparent 34%);
    filter: blur(18px);
}

.hero-reference-image {
    position: relative;
    z-index: 1;
    border-radius: 0;
    box-shadow: none;
    clip-path: none;
    margin-bottom: 0;
    -webkit-mask-image: none;
    mask-image: none;
}

@media (min-width: 1181px) {
    .hero-content {
        width: min(1540px, calc(100vw - 80px));
        grid-template-columns: minmax(410px, 0.44fr) minmax(690px, 0.56fr);
        gap: clamp(10px, 1.6vw, 30px);
    }

    .hero-robot-scene {
        justify-content: flex-end;
        margin-right: clamp(-36px, -2vw, -12px);
    }

    .hero-reference-image {
        width: min(118%, 1120px);
        max-width: none;
        transform: translateX(14px) scale(1.04);
        transform-origin: center right;
    }
}

@media (min-width: 1181px) and (max-width: 1360px) {
    .hero {
        padding-left: 28px;
        padding-right: 28px;
    }

    .hero-content {
        width: min(1240px, calc(100vw - 42px));
        grid-template-columns: minmax(370px, 0.43fr) minmax(700px, 0.57fr);
        gap: 8px;
    }

    .hero-reference-image {
        width: min(124%, 890px);
        transform: translateX(26px) scale(1.08);
    }
}

@media (min-width: 1500px) {
    .hero-reference-image {
        width: min(120%, 1180px);
        transform: translateX(18px) scale(1.04);
    }
}

.courses-showcase {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 430px);
    gap: 24px;
    align-items: start;
}

.courses-section .reveal,
.courses-section.reveal {
    opacity: 1;
    transform: none;
}

.courses-section .courses-grid {
    width: 100%;
    min-width: 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(14px, 1.4vw, 18px);
}

.courses-section .courses-grid .course-card:nth-child(n+4) {
    display: block;
}

.courses-section .courses-grid .course-card:nth-child(n+6) {
    display: none;
}

.courses-section .course-card {
    min-height: 132px;
    border: 1px solid rgba(18, 115, 255, 0.14);
    border-radius: 18px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.88), rgba(242, 250, 255, 0.74));
    box-shadow: 0 18px 46px rgba(20, 72, 142, 0.09);
}

.courses-section .course-card:nth-child(1) {
    background:
        linear-gradient(135deg, rgba(232, 255, 247, 0.92), rgba(255, 255, 255, 0.78));
}

.courses-section .course-card:nth-child(2) {
    background:
        linear-gradient(135deg, rgba(247, 241, 255, 0.94), rgba(255, 255, 255, 0.78));
}

.courses-section .course-card:nth-child(3) {
    background:
        linear-gradient(135deg, rgba(235, 248, 255, 0.94), rgba(255, 255, 255, 0.78));
}

.courses-section .course-card-inner {
    position: relative;
    min-height: 132px;
    grid-template-columns: 82px minmax(0, 1fr) 38px;
    gap: 18px;
    padding: 18px;
}

.courses-section .course-icon {
    width: 74px;
    height: 74px;
    border-radius: 20px;
    box-shadow: 0 16px 32px rgba(18, 115, 255, 0.16);
}

.courses-section .course-icon::before {
    content: '';
    display: block;
    width: 38px;
    height: 38px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

.courses-section .course-icon-cyber {
    background: linear-gradient(135deg, #dff2ff, #f7fbff);
}

.courses-section .course-icon-cyber::before {
    background-image: url("data:image/svg+xml,%3Csvg width='48' height='48' viewBox='0 0 48 48' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M24 5 39 11v11c0 10-6 17-15 21C15 39 9 32 9 22V11l15-6Z' stroke='%231e72ff' stroke-width='4' stroke-linejoin='round'/%3E%3Cpath d='M18 24h12M20 30h8M17 20c0-4 3-7 7-7s7 3 7 7' stroke='%231e72ff' stroke-width='4' stroke-linecap='round'/%3E%3C/svg%3E");
}

.courses-section .course-icon-ai {
    background: linear-gradient(135deg, #adf4dc, #e8fff7);
}

.courses-section .course-icon-ai::before {
    background-image: url("data:image/svg+xml,%3Csvg width='48' height='48' viewBox='0 0 48 48' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M19 8c-5 1-8 5-8 10-4 2-6 6-5 10 1 5 5 8 10 8 1 4 4 6 8 6s7-2 8-6c5 0 9-3 10-8 1-5-2-9-6-10 0-5-4-9-9-10-3-1-6 0-8 3Z' stroke='%2318bf85' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M18 18c4 0 6 2 6 6v18M30 16c-4 3-5 7-2 11M14 27c4-2 8-1 10 3M33 28c-4 0-7 2-9 6' stroke='%2318bf85' stroke-width='4' stroke-linecap='round'/%3E%3C/svg%3E");
}

.courses-section .course-icon-robot {
    background: linear-gradient(135deg, #efe6ff, #fbf7ff);
}

.courses-section .course-icon-robot::before {
    background-image: url("data:image/svg+xml,%3Csvg width='48' height='48' viewBox='0 0 48 48' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M14 34h13l9-9' stroke='%236b45ff' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M11 29h16v11H11zM32 17l8 8-6 6-8-8z' stroke='%236b45ff' stroke-width='4' stroke-linejoin='round'/%3E%3Cpath d='M36 13l4 4M8 42h23' stroke='%236b45ff' stroke-width='4' stroke-linecap='round'/%3E%3C/svg%3E");
}

.courses-section .course-icon-code {
    background: linear-gradient(135deg, #dff2ff, #f5fbff);
}

.courses-section .course-icon-code::before {
    background-image: url("data:image/svg+xml,%3Csvg width='48' height='48' viewBox='0 0 48 48' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M19 14 9 24l10 10M29 14l10 10-10 10' stroke='%231e72ff' stroke-width='5' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M26 11 22 37' stroke='%231e72ff' stroke-width='4' stroke-linecap='round'/%3E%3C/svg%3E");
}

.courses-section .course-icon-computer {
    background: linear-gradient(135deg, #e8fff7, #f7fffc);
}

.courses-section .course-icon-computer::before {
    background-image: url("data:image/svg+xml,%3Csvg width='48' height='48' viewBox='0 0 48 48' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='8' y='10' width='32' height='22' rx='4' stroke='%2318bf85' stroke-width='4'/%3E%3Cpath d='M18 40h12M24 32v8M14 24h20' stroke='%2318bf85' stroke-width='4' stroke-linecap='round'/%3E%3C/svg%3E");
}

.courses-section .course-card h3,
.courses-section .course-card p {
    grid-column: 2;
}

.courses-section .course-card h3 {
    align-self: end;
    font-size: clamp(1.06rem, 1.18vw, 1.22rem);
    line-height: 1.15;
}

.courses-section .course-card p {
    align-self: start;
    max-width: 260px;
    margin: 2px 0 0;
    font-size: clamp(0.8rem, 0.8vw, 0.9rem);
    line-height: 1.35;
}

.courses-section .course-arrow {
    display: grid;
    grid-column: 3;
    grid-row: 1 / span 2;
    align-self: center;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    color: var(--primary);
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(18, 115, 255, 0.12);
    box-shadow: 0 12px 24px rgba(18, 115, 255, 0.12);
    font-size: 1.25rem;
    font-weight: 900;
}

.logo-image {
    width: 112px;
    height: 74px;
}

@media (min-width: 1181px) {
    .navbar {
        height: 88px;
        padding-left: 28px;
    }
}

.future-banner {
    align-self: start;
    width: 100%;
    height: 214px;
    min-height: 214px;
    margin: 0;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: 0 18px 46px rgba(20, 72, 142, 0.12);
}

.future-banner > img {
    display: block;
    position: static;
    width: 100%;
    height: 100%;
    min-height: 214px;
    object-fit: cover;
    border-radius: 26px;
}

.future-banner > div,
.future-banner > span {
    display: none;
}

@media (max-width: 1360px) and (min-width: 1181px) {
    .courses-showcase {
        grid-template-columns: minmax(0, 1fr) 430px;
        gap: 18px;
    }

    .courses-section .course-card-inner {
        grid-template-columns: 70px minmax(0, 1fr) 34px;
        gap: 14px;
        padding: 16px 14px;
    }

    .courses-section .course-icon {
        width: 64px;
        height: 64px;
        border-radius: 18px;
    }

    .courses-section .course-icon::before {
        width: 36px;
        height: 36px;
    }

    .courses-section .course-arrow {
        width: 32px;
        height: 32px;
    }
}

@media (max-width: 1180px) {
    .hero-reference-image {
        -webkit-mask-image: radial-gradient(ellipse at 50% 50%, #000 0 68%, rgba(0, 0, 0, 0.86) 82%, transparent 100%);
        mask-image: radial-gradient(ellipse at 50% 50%, #000 0 68%, rgba(0, 0, 0, 0.86) 82%, transparent 100%);
    }

    .courses-showcase {
        grid-template-columns: 1fr;
    }

    .future-banner {
        width: min(430px, 100%);
        margin: 10px auto 0;
    }
}

@media (max-width: 760px) {
    .courses-section .courses-grid {
        grid-template-columns: 1fr;
    }

    .courses-section .course-card-inner {
        grid-template-columns: 62px minmax(0, 1fr) 34px;
    }
}

/* Final nav and course detail polish. */
.nav-links a {
    font-size: 1rem;
    padding: 12px 18px;
}

@media (min-width: 1181px) {
    .nav-links {
        gap: 14px;
    }
}

.course-detail-desc {
    font-size: clamp(1.08rem, 1.45vw, 1.28rem);
    line-height: 1.6;
}

.course-detail-image {
    min-height: 420px;
    background:
        radial-gradient(circle at 70% 22%, rgba(19, 200, 255, 0.18), transparent 36%),
        linear-gradient(135deg, rgba(255,255,255,0.76), rgba(238,248,255,0.62));
}

.course-detail-image img {
    object-fit: contain;
    padding: 14px;
}

.detail-panel h2,
.detail-panel h3 {
    font-size: clamp(1.45rem, 2vw, 2rem);
}

/* Final visual match pass for desktop hero. */
@media (min-width: 1181px) {
    .hero-logo-watermark {
        display: none !important;
    }

    .hero {
        min-height: clamp(560px, 41vw, 690px);
        padding-top: clamp(104px, 6vw, 116px);
        padding-bottom: 8px;
    }

    .hero-content {
        grid-template-columns: minmax(455px, 0.46fr) minmax(680px, 0.54fr);
        align-items: center;
    }

    .hero-title {
        font-size: clamp(3.65rem, 4.2vw, 5.45rem);
        line-height: 0.98;
    }

    .hero-title small {
        font-size: clamp(2.1rem, 2.45vw, 2.95rem);
        line-height: 1.16;
        margin-top: 6px;
    }

    .hero-desc {
        max-width: 520px;
    }

    .hero-robot-scene {
        align-self: center;
    }
}

@media (min-width: 1181px) and (max-width: 1360px) {
    .hero {
        min-height: 575px;
        padding-top: 104px;
    }

    .hero-content {
        width: min(1235px, calc(100vw - 38px));
        grid-template-columns: 455px minmax(690px, 1fr);
        gap: 0;
    }

    .hero-title {
        font-size: 3.35rem;
        letter-spacing: -0.06em;
    }

    .hero-title small {
        font-size: 1.95rem;
    }

    .hero-desc {
        max-width: 430px;
        font-size: 1rem;
    }

    .hero-reference-image {
        width: min(126%, 910px);
        transform: translateX(22px) scale(1.06);
    }

    .stats-bar {
        margin-top: -8px;
    }
}
