.page-courses .courses-hero {
    background:
        radial-gradient(ellipse 74% 54% at 14% 18%, rgba(28, 109, 255, 0.2), transparent 66%),
        radial-gradient(ellipse 36% 28% at 84% 24%, rgba(255, 107, 53, 0.12), transparent 72%),
        linear-gradient(180deg, #0A0F1E 0%, #0A0F1E 100%);
    background-color: #0A0F1E;
    color: var(--surface);
    overflow: hidden;
    position: relative;
}

.page-courses .courses-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 48px 48px;
    pointer-events: none;
}

.matrix-rain {
    position: absolute;
    inset: 0;
    display: flex;
    justify-content: space-around;
    pointer-events: none;
    overflow: hidden;
}

.matrix-column {
    font-family: monospace;
    font-size: 14px;
    line-height: 1.2;
    color: #FF6B00;
    writing-mode: vertical-rl;
    text-orientation: upright;
    opacity: 0;
    animation: matrix-fall linear infinite;
}

.matrix-column:nth-child(1) { animation-duration: 8s; animation-delay: 0s; }
.matrix-column:nth-child(2) { animation-duration: 12s; animation-delay: 1s; }
.matrix-column:nth-child(3) { animation-duration: 9s; animation-delay: 2s; }
.matrix-column:nth-child(4) { animation-duration: 11s; animation-delay: 0.5s; }
.matrix-column:nth-child(5) { animation-duration: 7s; animation-delay: 1.5s; }
.matrix-column:nth-child(6) { animation-duration: 10s; animation-delay: 2.5s; }
.matrix-column:nth-child(7) { animation-duration: 8s; animation-delay: 0.8s; }
.matrix-column:nth-child(8) { animation-duration: 13s; animation-delay: 1.8s; }

@keyframes matrix-fall {
    0% {
        transform: translateY(-100%);
        opacity: 0;
    }
    5% {
        opacity: var(--matrix-opacity, 0.05);
    }
    95% {
        opacity: var(--matrix-opacity, 0.05);
    }
    100% {
        transform: translateY(100vh);
        opacity: 0;
    }
}

.page-courses .courses-hero .container {
    width: min(1380px, 100% - 2rem);
}

.courses-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(420px, 0.92fr);
    gap: clamp(2rem, 5vw, 4.5rem);
    align-items: center;
}

.courses-hero-copy {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: clamp(1.4rem, 3vw, 2.8rem) 0;
    max-width: 52rem;
    position: relative;
    z-index: 2;
    text-align: center;
    justify-self: center;
}

.hero-kicker,
.section-kicker {
    display: inline-flex;
    align-items: center;
    padding: 0.38rem 0.82rem;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.72rem;
    font-weight: 700;
}

.hero-kicker {
    margin-bottom: 1rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.92);
}

.courses-hero h1 {
    font-size: clamp(2.7rem, 5vw, 4.85rem);
    line-height: 0.95;
    margin: 0 auto 1.25rem;
    max-width: 10.5ch;
    text-wrap: balance;
}

.hero-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 38rem;
    margin: 0 auto;
    padding: 0.5rem 0;
}

.page-courses .hero-pills .pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 0.95rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.78);
    transition: all 200ms ease;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.page-courses .hero-pills .pill:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.18);
    color: rgba(255, 255, 255, 0.95);
    transform: translateY(-1px);
}

.page-courses .hero-pills .pill::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 107, 53, 0.7);
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
    background: rgba(255, 107, 53, 0.12);
    border: 1px solid rgba(255, 107, 53, 0.25);
    color: rgba(255, 107, 53, 0.95);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    animation: pulse-glow 2.5s ease-in-out infinite;
}

.hero-badge::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #FF6B00;
    box-shadow: 0 0 8px #FF6B00;
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 6px rgba(255, 107, 0, 0.15), 0 0 12px rgba(255, 107, 0, 0.08);
    }
    50% {
        box-shadow: 0 0 14px rgba(255, 107, 0, 0.35), 0 0 28px rgba(255, 107, 0, 0.18);
    }
}

.courses-hero-visual {
position: relative;
min-height: 420px;
display: grid;
place-items: center;
}

/* Card carousel: two cards rotating */
.hero-card-carousel {
position: relative;
width: min(100%, 460px);
aspect-ratio: 1 / 1.02;
perspective: 1200px;
}

.hero-card-panel {
position: absolute;
inset: 0;
backface-visibility: hidden;
transform-style: preserve-3d;
}

/* Card rotation animation */
@keyframes card-rotate {
0%, 45% {
opacity: 1;
transform: rotateY(0deg) translateZ(50px);
}
50%, 95% {
opacity: 0;
transform: rotateY(-180deg) translateZ(50px);
}
100% {
opacity: 1;
transform: rotateY(0deg) translateZ(50px);
}
}

@keyframes card-rotate-delayed {
0%, 45% {
opacity: 0;
transform: rotateY(180deg) translateZ(50px);
}
50%, 95% {
opacity: 1;
transform: rotateY(0deg) translateZ(50px);
}
100% {
opacity: 0;
transform: rotateY(180deg) translateZ(50px);
}
}

.hero-card-panel[data-card="python"] {
animation: card-rotate 12s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite,
course-hero-drift 7s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite;
}

.hero-card-panel[data-card="ai-tooling"] {
animation: card-rotate-delayed 12s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite,
course-hero-drift 7s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite;
animation-delay: 0s, 0.5s;
}

/* Course link styling */
.hero-course-link {
text-decoration: none;
color: inherit;
transition: color 200ms ease;
}

.hero-course-link:hover {
color: var(--accent);
}

.hero-course-link strong {
cursor: pointer;
}

/* AI Tooling logo styling */
.hero-visual-logo--ai {
width: 58px;
height: 58px;
object-fit: contain;
filter: drop-shadow(0 10px 20px rgba(28, 109, 255, 0.32));
}

/* Session count styling (replaces Scope/Mode cards) */
.hero-visual-session-count {
display: grid;
grid-template-columns: auto minmax(0, 1fr);
align-items: center;
gap: 1rem;
padding: 1rem 1.05rem;
border-radius: 18px;
border: 1px solid rgba(255, 255, 255, 0.08);
background: rgba(28, 109, 255, 0.12);
}

.hero-visual-session-count strong {
font-family: "Poppins", sans-serif;
font-size: 1.3rem;
line-height: 0.98;
color: var(--surface);
text-align: right;
justify-self: end;
}

.hero-orbit {
    position: absolute;
    border-radius: 999px;
    pointer-events: none;
}

.hero-orbit-a {
    width: 480px;
    height: 480px;
    border: 1px solid rgba(28, 109, 255, 0.18);
    opacity: 0.8;
}

.hero-orbit-b {
    width: 360px;
    height: 360px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    opacity: 0.6;
}

.hero-visual-panel {
position: relative;
z-index: 2;
width: min(100%, 340px);
aspect-ratio: 1 / 1.08;
padding: 1rem;
border-radius: 20px;
background:
linear-gradient(180deg, rgba(16, 22, 41, 0.9), rgba(10, 15, 30, 0.96));
border: 1px solid rgba(255, 255, 255, 0.1);
box-shadow:
0 20px 40px rgba(8, 13, 27, 0.3),
inset 0 1px 0 rgba(255, 255, 255, 0.04);
overflow: hidden;
transform-origin: center;
}

.hero-visual-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(130deg, rgba(28, 109, 255, 0.18), transparent 42%),
        radial-gradient(circle at 82% 16%, rgba(255, 107, 53, 0.22), transparent 18%);
    pointer-events: none;
}

.hero-visual-head,
.hero-visual-body {
    position: relative;
    z-index: 1;
}

.hero-visual-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.1rem;
}

.hero-visual-label,
.hero-visual-status,
.hero-visual-card-label {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.7rem;
    font-weight: 800;
}

.hero-visual-label {
    color: rgba(255, 255, 255, 0.58);
}

.hero-visual-status {
    color: var(--accent);
}

.hero-visual-body {
height: calc(100% - 2rem);
display: grid;
grid-template-rows: auto 1fr auto;
gap: 1rem;
}

.hero-visual-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.8rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.hero-visual-logo {
    width: 56px;
    height: 56px;
    object-fit: contain;
    filter: drop-shadow(0 8px 18px rgba(28, 109, 255, 0.25));
}

.hero-visual-logo--python {
    width: 58px;
    height: 58px;
    filter: drop-shadow(0 10px 20px rgba(12, 21, 41, 0.32));
}

.hero-visual-brand strong {
    display: block;
    font-family: "Poppins", sans-serif;
    font-size: 1.15rem;
    color: var(--surface);
}

.hero-visual-brand span {
    color: rgba(255, 255, 255, 0.62);
    font-size: 0.92rem;
}

.hero-visual-track {
    position: relative;
    display: grid;
    gap: 0.85rem;
    align-content: center;
    padding: 0.4rem 0;
}

.hero-visual-track span {
    display: block;
    height: 10px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(28, 109, 255, 0.88), rgba(255, 107, 53, 0.76));
    opacity: 0.9;
    transform-origin: left center;
}

.hero-visual-track span:nth-child(2) {
    width: 82%;
}

.hero-visual-track span:nth-child(3) {
    width: 64%;
}

.hero-visual-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.05rem;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.hero-visual-card strong {
    font-family: "Poppins", sans-serif;
    font-size: 1.3rem;
    line-height: 0.98;
    color: var(--surface);
    text-align: right;
    justify-self: end;
    max-width: 12ch;
    text-wrap: balance;
}

.hero-visual-card-primary {
    background: rgba(28, 109, 255, 0.12);
}

.hero-visual-card-secondary {
    background: rgba(255, 107, 53, 0.1);
}

.hero-visual-card-primary strong {
    max-width: none;
}

.catalog-section {
    background: linear-gradient(180deg, var(--surface) 0%, #fbfcff 100%);
}

.catalog-head {
    margin-bottom: 1.5rem;
}

.catalog-intro {
    max-width: none;
}

.course-catalog {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
}

.course-release {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(245, 247, 251, 0.98));
    border: 1px solid var(--gray-200);
    border-radius: 24px;
    padding: clamp(1.4rem, 2vw, 2rem);
    box-shadow: var(--shadow);
    display: grid;
    gap: 1.5rem;
}

.course-release--featured {
    border-color: rgba(255, 107, 53, 0.24);
    box-shadow: 0 18px 46px rgba(255, 107, 53, 0.11);
}

.course-release-top {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: start;
}

.course-release-copy {
    max-width: none;
}

.course-badge-row {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex-wrap: wrap;
    margin-bottom: 0.95rem;
}

.course-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.34rem 0.78rem;
    border-radius: 999px;
    background: var(--gray-100);
    color: var(--muted);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.course-badge--live {
    background: rgba(255, 107, 53, 0.14);
    color: var(--accent);
}

.course-badge--upcoming {
    background: rgba(28, 109, 255, 0.12);
    color: var(--primary);
}

.course-release h3 {
    font-size: clamp(1.6rem, 2.3vw, 2.25rem);
    line-height: 1.06;
    margin-bottom: 0.6rem;
}

.course-release-price {
    min-width: 12rem;
    padding: 1rem 1.05rem;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(10, 15, 30, 0.03), rgba(28, 109, 255, 0.08));
    border: 1px solid rgba(28, 109, 255, 0.12);
}

.course-release-label,
.course-meta-label {
    display: block;
    margin-bottom: 0.4rem;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--muted);
}

.course-release-price strong {
    font-family: "Poppins", sans-serif;
    font-size: 1.55rem;
    color: var(--text);
    line-height: 1;
}

.course-meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.9rem;
}

.course-meta-item {
    padding: 1rem 1.05rem;
    border-radius: 18px;
    background: rgba(28, 109, 255, 0.04);
    border: 1px solid rgba(28, 109, 255, 0.08);
}

.course-meta-item strong {
    color: var(--text);
    font-size: 0.96rem;
    line-height: 1.4;
}

.course-release-foot {
    display: flex;
    justify-content: flex-end;
    padding-top: 0.15rem;
}

.course-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.course-actions .btn {
    min-width: 0;
}

.course-release--empty {
    background: linear-gradient(180deg, var(--surface) 0%, var(--gray-50) 100%);
}

.course-system-section {
    border-top: 1px solid rgba(205, 214, 229, 0.75);
}

.course-system-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.1fr);
    gap: clamp(1.5rem, 4vw, 3rem);
    align-items: start;
}

.course-system-list {
    display: grid;
    gap: 0.95rem;
}

.course-system-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 1rem;
    padding: 1.15rem 0;
    border-top: 1px solid rgba(205, 214, 229, 0.9);
}

.course-system-item:first-child {
    padding-top: 0;
    border-top: none;
}

.course-system-index {
    font-family: "Poppins", sans-serif;
    font-size: 1rem;
    color: var(--accent);
    line-height: 1;
    padding-top: 0.08rem;
}

.course-system-item h3 {
  font-size: 1.02rem;
}

.course-system-item p {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.5;
  margin-top: 0.35rem;
}

.scroll-cue {
    position: fixed;
    left: 50%;
    bottom: 1.5rem;
    z-index: 950;
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(10, 15, 30, 0.82);
    color: rgba(255, 255, 255, 0.92);
    box-shadow: 0 14px 28px rgba(8, 13, 27, 0.24);
    backdrop-filter: blur(10px);
    transform: translateX(-50%);
    opacity: 0;
    pointer-events: none;
    transition:
        opacity 220ms cubic-bezier(0.22, 1, 0.36, 1),
        transform 220ms cubic-bezier(0.22, 1, 0.36, 1),
        border-color 220ms ease,
        background 220ms ease;
}

.scroll-cue.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.scroll-cue.is-bottom .scroll-cue-icon {
    transform: rotate(180deg);
}

.scroll-cue:hover {
    border-color: rgba(255, 107, 53, 0.28);
    background: rgba(16, 22, 41, 0.92);
}

.scroll-cue-icon {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes course-hero-rise {
    from {
        opacity: 0;
        transform: translate3d(0, 28px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes course-hero-drift {
    0%, 100% {
        transform: translate3d(0, 0, 0);
    }
    50% {
        transform: translate3d(0, -8px, 0);
    }
}

@keyframes course-hero-track {
    0% {
        transform: scaleX(0.72);
        opacity: 0.5;
    }
    50% {
        transform: scaleX(1);
        opacity: 1;
    }
    100% {
        transform: scaleX(0.72);
        opacity: 0.5;
    }
}

@keyframes course-hero-rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes scroll-cue-float {
    0%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    50% {
        transform: translateX(-50%) translateY(-6px);
    }
}

.courses-hero-copy > * {
    opacity: 0;
    animation: course-hero-rise 720ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.courses-hero-copy > *:nth-child(1) {
    animation-delay: 90ms;
}

.courses-hero-copy > *:nth-child(2) {
    animation-delay: 170ms;
}

.courses-hero-copy > *:nth-child(3) {
    animation-delay: 250ms;
}

.courses-hero-visual {
    opacity: 0;
    animation: course-hero-rise 820ms cubic-bezier(0.22, 1, 0.36, 1) 140ms forwards;
}

.hero-visual-panel {
    animation: course-hero-drift 7s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite;
}

.hero-orbit-a {
    animation: course-hero-rotate 28s linear infinite;
}

.hero-orbit-b {
    animation: course-hero-rotate 22s linear infinite reverse;
}

.hero-visual-track span {
    animation: course-hero-track 4.8s cubic-bezier(0.22, 1, 0.36, 1) infinite;
}

.hero-visual-track span:nth-child(2) {
    animation-delay: 180ms;
}

.hero-visual-track span:nth-child(3) {
    animation-delay: 320ms;
}

.scroll-cue.is-visible {
    animation: scroll-cue-float 2.6s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite;
}

@media (max-width: 1024px) {
    .courses-hero-grid,
    .course-system-grid,
    .course-release-top,
    .course-meta {
        grid-template-columns: 1fr;
    }

    .courses-hero-copy {
        max-width: none;
    }

    .courses-hero h1 {
        max-width: 11ch;
    }

    .courses-hero-visual {
        min-height: 360px;
    }

    .course-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 768px) {
    .courses-hero h1 {
        max-width: 12ch;
    }

    .hero-pills {
        gap: 0.65rem;
    }

    .page-courses .hero-pills .pill {
        font-size: 0.78rem;
    }

    .courses-hero-visual {
        min-height: 300px;
    }

    .hero-visual-panel {
        width: 100%;
        border-radius: 24px;
    }

    .course-release {
        border-radius: 20px;
    }

    .course-release-price,
    .course-meta-item {
        padding: 0.95rem 1rem;
    }

    .course-actions .btn {
        width: 100%;
    }

    .scroll-cue {
        bottom: 1rem;
    }
}

@media (prefers-reduced-motion: reduce) {
.courses-hero-copy > *,
.courses-hero-visual,
.hero-visual-panel,
.hero-card-panel,
.hero-orbit-a,
.hero-orbit-b,
.hero-visual-track span,
.scroll-cue.is-visible {
animation: none !important;
opacity: 1 !important;
transform: none !important;
}

.hero-card-panel[data-card="python"],
.hero-card-panel[data-card="ai-tooling"] {
animation: none !important;
opacity: 1 !important;
transform: none !important;
}

.hero-card-panel[data-card="ai-tooling"] {
display: none;
}

.scroll-cue {
transform: translateX(-50%);
}
}
