/* ── Index page layout ─────────────────────────────────────── */

.idx-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 32px;
    padding: 48px 20px;
}

/* ── Row of course cards ───────────────────────────────────── */

.idx-courses-row {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    justify-content: center;
    align-items: stretch;
}

/* ── Course card ───────────────────────────────────────────── */

.idx-course-link {
    text-decoration: none !important;
    color: inherit;
    display: block;
}

/* Kill browser default link styles inside cards */
.idx-course-link *,
.idx-about-link * {
    text-decoration: none !important;
}

.idx-course-card {
    background: #1a1d21;
    border: 1px solid #2e3338;
    border-radius: 20px;
    overflow: hidden;
    width: min(680px, 90vw);
    display: flex;
    flex-direction: column;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
    cursor: pointer;
}

.idx-course-link:hover .idx-course-card {
    border-color: #33a2ff;
    box-shadow: 0 0 0 1px #33a2ff, 0 0 32px rgba(51, 162, 255, 0.22);
    transform: translateY(-4px);
}

/* strip the old green terminal styles from card media */
.idx-card-media {
    overflow: hidden;
    line-height: 0;
}

.idx-card-media .card-text {
    display: none;
}

.idx-card-media .card-img {
    width: 100%;
    height: 360px;
    object-fit: cover;
    border-radius: 0;
    display: block;
}

.idx-card-body {
    padding: 28px 32px 32px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
}

.idx-card-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #e8e4df;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    text-decoration: none !important;
}

.idx-card-desc {
    font-size: 0.9rem;
    color: #9e9689;
    line-height: 1.6;
    flex: 1;
    text-decoration: none !important;
}

/* Prominent CTA button */
.idx-card-cta {
    display: inline-block;
    margin-top: 12px;
    padding: 13px 28px;
    background: #33a2ff;
    color: #fff !important;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    border-radius: 10px;
    text-decoration: none !important;
    transition: background 0.15s ease, transform 0.1s ease;
    align-self: flex-start;
}

.idx-course-link:hover .idx-card-cta {
    background: #55b4ff;
    transform: translateY(-1px);
}

/* ── About Me card ─────────────────────────────────────────── */

.idx-about-link {
    text-decoration: none !important;
    color: inherit;
    display: block;
}

.idx-about-card {
    background: #1a1d21;
    border: 1px solid #2e3338;
    border-radius: 16px;
    padding: 22px 28px;
    display: flex;
    align-items: center;
    gap: 20px;
    width: min(680px, 90vw);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
    cursor: pointer;
}

.idx-about-link:hover .idx-about-card {
    border-color: #d29d00;
    box-shadow: 0 0 24px rgba(210, 157, 0, 0.15);
    transform: translateY(-3px);
}

.idx-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #2e3338;
    flex-shrink: 0;
}

.idx-about-text {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1;
}

.idx-about-name {
    font-size: 1.4rem;
    font-weight: 700;
    color: #e8e4df;
    text-decoration: none !important;
}

.idx-about-sub {
    font-size: 0.9rem;
    color: #9e9689;
    line-height: 1.4;
    text-decoration: none !important;
}

.idx-about-cta {
    font-size: 0.9rem;
    font-weight: 600;
    color: #d29d00;
    white-space: nowrap;
    text-decoration: none !important;
    transition: color 0.15s ease;
}

.idx-about-link:hover .idx-about-cta {
    color: #f0b800;
}

/* ── PC two-column layout ──────────────────────────────────── */

@media (min-width: 1200px) {
    .idx-page {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: flex-start;
        justify-content: center;
        gap: 36px;
        padding: 60px 48px;
    }

    .idx-courses-row {
        flex-direction: column;
        align-items: stretch;
        flex: 0 0 auto;
    }

    .idx-course-card { width: 640px; }

    .idx-about-link {
        align-self: flex-start;
    }

    .idx-about-card {
        width: 340px;
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .idx-about-cta {
        align-self: flex-end;
    }
}

/* ── Mobile single column ──────────────────────────────────── */

@media (max-width: 600px) {
    .idx-card-media .card-img {
        height: 240px;
    }

    /* title stays 1.4rem on mobile too — no override needed */
    .idx-card-body { padding: 20px 22px 24px; }
}
