.home-page {
    display: grid;
    gap: 22px;
}

.home-hero {
    position: relative;
    min-height: 430px;
    overflow: hidden;
    border-radius: var(--radius-xl);
    isolation: isolate;
    background:
        linear-gradient(90deg, rgba(28, 45, 74, .78) 0%, rgba(35, 54, 85, .54) 44%, rgba(36, 56, 83, .06) 78%),
        url('../img/background.jpg') center 57% / cover no-repeat;
}

.home-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(180deg, rgba(101, 124, 157, .06), rgba(28, 45, 72, .15));
}

.hero-overlay {
    position: absolute;
    inset: 0;
    z-index: -1;
    background: radial-gradient(circle at 78% 32%, rgba(255,255,255,.16), transparent 27%);
}

.hero-content {
    width: min(670px, 64%);
    min-height: 430px;
    padding: clamp(42px, 6vw, 78px) clamp(30px, 5vw, 58px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    color: #fff;
}

.hero-eyebrow {
    margin: 0 0 10px;
    font-size: clamp(18px, 2vw, 27px);
    font-weight: 400;
}

.hero-content h1 {
    margin: 0;
    font-size: clamp(52px, 7vw, 82px);
    line-height: .98;
    letter-spacing: -.055em;
}

.hero-content h1 span {
    background: linear-gradient(135deg, #b0b7ff, #6764ff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-description {
    max-width: 650px;
    margin: 24px 0 30px;
    font-size: clamp(16px, 1.6vw, 20px);
    line-height: 1.65;
    color: rgba(255,255,255,.92);
}

.primary-button {
    min-height: 58px;
    padding: 0 24px;
    display: inline-flex;
    align-items: center;
    gap: 22px;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(135deg, #716cff, #5650f6);
    box-shadow: 0 14px 30px rgba(71, 64, 239, .28);
    font-weight: 700;
    transition: transform var(--transition), box-shadow var(--transition);
}

.primary-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 34px rgba(71, 64, 239, .34);
}

.primary-button span {
    font-size: 23px;
}

.featured-section {
    border-radius: var(--radius-xl);
    padding: 24px;
}

.section-heading {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.section-heading h2 {
    margin: 0;
    font-size: clamp(20px, 2vw, 27px);
    letter-spacing: -.025em;
}

.section-heading a {
    color: var(--primary);
    font-weight: 700;
    font-size: 14px;
}

.subject-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 15px;
}

.subject-card {
    min-height: 235px;
    padding: 24px 20px 19px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    border: 1px solid var(--card-border);
    border-radius: 18px;
    background: rgba(255,255,255,.67);
    box-shadow: 0 8px 24px rgba(58, 77, 115, .06);
    transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
}

.subject-card:hover {
    transform: translateY(-4px);
    background: rgba(255,255,255,.82);
    box-shadow: 0 16px 32px rgba(58, 77, 115, .11);
}

.subject-icon {
    width: 49px;
    height: 49px;
    margin-bottom: 18px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: rgba(93, 85, 255, .09);
    font-size: 18px;
    font-weight: 800;
}

.icon-blue { color: #5079ff; background: rgba(80,121,255,.10); }
.icon-green { color: #27a66d; background: rgba(39,166,109,.10); }
.icon-purple { color: #934fe5; background: rgba(147,79,229,.10); }
.icon-amber { color: #c18a25; background: rgba(193,138,37,.11); }
.icon-cyan { color: #209bc8; background: rgba(32,155,200,.10); }

.subject-card strong {
    font-size: 17px;
    line-height: 1.25;
}

.subject-card p {
    margin: 9px 0 20px;
    color: var(--text-soft);
    font-size: 14px;
    line-height: 1.55;
}

.subject-meta {
    margin-top: auto;
    padding: 6px 10px;
    border-radius: 9px;
    border: 1px solid rgba(88, 106, 151, .12);
    color: #61708f;
    background: rgba(255,255,255,.4);
    font-size: 12px;
}

@media (max-width: 1380px) {
    .subject-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .home-hero {
        min-height: 390px;
        background-position: 60% 56%;
    }

    .hero-content {
        width: 78%;
        min-height: 390px;
    }

    .subject-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {
    .home-page {
        gap: 12px;
    }

    .home-hero {
        min-height: 470px;
        border-radius: 19px;
        background:
            linear-gradient(180deg, rgba(26, 43, 70, .38) 0%, rgba(26, 43, 70, .77) 66%, rgba(26, 43, 70, .88) 100%),
            url('../img/background.jpg') 57% center / cover no-repeat;
    }

    .hero-content {
        width: 100%;
        min-height: 470px;
        padding: 34px 22px;
        justify-content: flex-end;
    }

    .hero-description {
        margin: 18px 0 24px;
        font-size: 15px;
    }

    .primary-button {
        width: 100%;
        justify-content: space-between;
    }

    .featured-section {
        padding: 18px 14px;
        border-radius: 19px;
    }

    .subject-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .subject-card {
        min-height: 0;
        display: grid;
        grid-template-columns: 46px 1fr auto;
        grid-template-rows: auto auto;
        column-gap: 13px;
        align-items: center;
        padding: 16px;
    }

    .subject-icon {
        width: 46px;
        height: 46px;
        margin: 0;
        grid-row: 1 / 3;
    }

    .subject-card strong {
        font-size: 15px;
    }

    .subject-card p {
        margin: 3px 0 0;
        font-size: 12px;
    }

    .subject-meta {
        grid-row: 1 / 3;
        grid-column: 3;
        align-self: center;
        margin: 0;
    }
}
