:root {
    --ink: #101522;
    --muted: #657085;
    --paper: #fffaf2;
    --surface: rgba(255, 255, 255, 0.74);
    --blue: #2146d0;
    --blue-deep: #0c256f;
    --red: #ed3851;
    --green: #1e9f71;
    --shadow: 0 24px 80px rgba(16, 21, 34, 0.18);
    --radius-xl: 32px;
    --radius-lg: 24px;
    --radius-md: 16px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--ink);
    font-family: "Outfit", "Avenir Next", "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at 8% 12%, rgba(33, 70, 208, 0.18), transparent 30%),
        radial-gradient(circle at 88% 10%, rgba(237, 56, 81, 0.16), transparent 28%),
        linear-gradient(135deg, #fffaf2 0%, #f5f8ff 50%, #fff3f3 100%);
}

body::before {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    content: "";
    opacity: 0.35;
    background-image:
        linear-gradient(rgba(16, 21, 34, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(16, 21, 34, 0.06) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: linear-gradient(to bottom, black, transparent 82%);
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input {
    font: inherit;
}

.page-shell,
.admin-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 28px 0;
    animation: slide-down 700ms ease both;
}

.brand {
    display: inline-flex;
    gap: 12px;
    align-items: center;
}

.brand-mark {
    display: grid;
    width: 48px;
    height: 48px;
    color: #ffffff;
    font-weight: 800;
    place-items: center;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--blue), var(--red));
    box-shadow: 0 14px 28px rgba(33, 70, 208, 0.24);
}

.brand strong,
.brand small {
    display: block;
}

.brand small,
.modal-intro,
.course-card p,
.hero-copy p,
.info-grid p,
.section-heading p,
.curriculum span {
    color: var(--muted);
}

.header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 8px;
    border: 1px solid rgba(16, 21, 34, 0.08);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.64);
    backdrop-filter: blur(18px);
}

.header-actions a {
    padding: 10px 16px;
    color: var(--muted);
    font-weight: 600;
    border-radius: 999px;
}

.header-actions a:hover {
    color: var(--ink);
    background: #ffffff;
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.02fr) minmax(320px, 0.98fr);
    gap: 56px;
    align-items: center;
    min-height: 680px;
    padding: 52px 0 78px;
}

.hero-copy {
    animation: rise-in 800ms ease both;
}

.eyebrow {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    width: fit-content;
    margin-bottom: 18px;
    color: var(--blue-deep);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.flag-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.9);
}

.flag-dot.blue {
    background: #2146d0;
}

.flag-dot.white {
    background: #ffffff;
}

.flag-dot.red {
    background: #ed3851;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1,
h2 {
    letter-spacing: -0.045em;
}

h1 {
    max-width: 760px;
    margin-bottom: 22px;
    font-family: "Playfair Display", Georgia, serif;
    font-size: clamp(3.3rem, 8vw, 6.8rem);
    line-height: 0.88;
}

h2 {
    margin-bottom: 12px;
    font-size: clamp(2.2rem, 4vw, 4rem);
    line-height: 0.98;
}

h3 {
    margin-bottom: 12px;
    font-size: 1.45rem;
}

.hero-copy p,
.section-heading p,
.course-card p,
.info-grid p,
.curriculum span,
.modal-intro {
    font-size: 1.07rem;
    line-height: 1.7;
}

.hero-copy > p {
    max-width: 640px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin: 34px 0;
}

.primary-button,
.secondary-button {
    display: inline-flex;
    min-height: 54px;
    align-items: center;
    justify-content: center;
    padding: 0 24px;
    font-weight: 800;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.primary-button {
    position: relative;
    overflow: hidden;
    color: #ffffff;
    background: linear-gradient(135deg, var(--blue), var(--red));
    box-shadow: 0 16px 34px rgba(237, 56, 81, 0.24);
}

.primary-button:hover,
.secondary-button:hover {
    transform: translateY(-3px);
}

.primary-button::after {
    position: absolute;
    inset: 0;
    content: "";
    opacity: 0;
    background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transform: translateX(-80%);
    transition: opacity 180ms ease, transform 520ms ease;
}

.primary-button:hover::after {
    opacity: 1;
    transform: translateX(80%);
}

.secondary-button {
    color: var(--ink);
    border: 1px solid rgba(16, 21, 34, 0.12);
    background: rgba(255, 255, 255, 0.76);
}

.wide {
    width: 100%;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    max-width: 580px;
}

.hero-stats div,
.info-grid article,
.curriculum,
.course-card,
.admin-card {
    border: 1px solid rgba(16, 21, 34, 0.08);
    background: var(--surface);
    box-shadow: 0 18px 60px rgba(16, 21, 34, 0.09);
    backdrop-filter: blur(22px);
}

.hero-stats div {
    padding: 18px;
    border-radius: 18px;
}

.hero-stats strong,
.hero-stats span {
    display: block;
}

.hero-stats strong {
    font-size: 1.35rem;
}

.hero-stats span {
    color: var(--muted);
}

.hero-visual {
    position: relative;
    min-height: 560px;
    animation: float-in 900ms 120ms ease both;
}

.orb {
    position: absolute;
    border-radius: 999px;
    filter: blur(4px);
}

.orb-blue {
    top: 52px;
    right: 80px;
    width: 220px;
    height: 220px;
    background: rgba(33, 70, 208, 0.25);
}

.orb-red {
    right: 20px;
    bottom: 84px;
    width: 260px;
    height: 260px;
    background: rgba(237, 56, 81, 0.18);
}

.glass-card {
    position: absolute;
    border: 1px solid rgba(255, 255, 255, 0.62);
    border-radius: var(--radius-xl);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.42));
    box-shadow: var(--shadow);
    backdrop-filter: blur(24px);
}

.language-card {
    top: 70px;
    left: 24px;
    width: min(420px, 88%);
    padding: 36px;
}

.language-card strong {
    display: block;
    margin: 16px 0 8px;
    font-family: "Playfair Display", Georgia, serif;
    font-size: clamp(2.4rem, 5vw, 4rem);
    line-height: 0.95;
}

.mini-label {
    color: var(--red);
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.progress-card {
    right: 0;
    bottom: 92px;
    width: 280px;
    padding: 24px;
}

.progress-card span,
.progress-card small {
    display: block;
    color: var(--muted);
    font-weight: 700;
}

.progress-track {
    height: 12px;
    margin: 14px 0;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(16, 21, 34, 0.08);
}

.progress-track span {
    display: block;
    width: 82%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--blue), var(--red));
}

.flag-ribbon {
    position: absolute;
    right: 76px;
    top: 262px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    width: 260px;
    height: 170px;
    overflow: hidden;
    border: 8px solid #ffffff;
    border-radius: 28px;
    box-shadow: var(--shadow);
    transform: rotate(-7deg);
}

.flag-ribbon span:nth-child(1) {
    background: #2146d0;
}

.flag-ribbon span:nth-child(2) {
    background: #ffffff;
}

.flag-ribbon span:nth-child(3) {
    background: #ed3851;
}

.course-section,
.info-grid,
.curriculum {
    margin-bottom: 92px;
}

.section-heading {
    max-width: 760px;
    margin-bottom: 24px;
}

.course-card {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    overflow: hidden;
    border-radius: var(--radius-xl);
}

.course-card-media {
    min-height: 410px;
    padding: 34px;
    color: #ffffff;
    background:
        linear-gradient(145deg, rgba(12, 37, 111, 0.92), rgba(237, 56, 81, 0.72)),
        radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.34), transparent 30%);
}

.course-card-media h3 {
    margin-top: 110px;
    font-family: "Playfair Display", Georgia, serif;
    font-size: clamp(2.6rem, 6vw, 5rem);
    line-height: 0.92;
}

.course-card-media p {
    color: rgba(255, 255, 255, 0.84);
}

.course-badge {
    display: inline-flex;
    padding: 10px 14px;
    font-weight: 800;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
}

.course-card-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(26px, 5vw, 56px);
}

.feature-list {
    display: grid;
    gap: 16px;
    margin: 0 0 30px;
    padding: 0;
    list-style: none;
}

.feature-list li {
    position: relative;
    padding-left: 32px;
    color: var(--muted);
    font-size: 1.04rem;
}

.feature-list li::before {
    position: absolute;
    left: 0;
    display: grid;
    width: 22px;
    height: 22px;
    content: "";
    border-radius: 999px;
    background: var(--green);
}

.feature-list li::after {
    position: absolute;
    top: 7px;
    left: 7px;
    width: 8px;
    height: 4px;
    content: "";
    border-bottom: 2px solid #ffffff;
    border-left: 2px solid #ffffff;
    transform: rotate(-45deg);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.info-grid article {
    padding: 28px;
    border-radius: var(--radius-lg);
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.info-grid article:hover {
    transform: translateY(-6px);
    box-shadow: 0 26px 70px rgba(16, 21, 34, 0.14);
}

.info-grid article > span {
    display: inline-block;
    margin-bottom: 42px;
    color: var(--red);
    font-weight: 900;
}

.curriculum {
    display: grid;
    grid-template-columns: 0.85fr 1.15fr;
    gap: 28px;
    padding: 34px;
    border-radius: var(--radius-xl);
}

.timeline {
    display: grid;
    gap: 12px;
}

.timeline div {
    padding: 18px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.68);
}

.timeline strong,
.timeline span {
    display: block;
}

.modal {
    position: fixed;
    inset: 0;
    z-index: 20;
    display: grid;
    padding: 20px;
    pointer-events: none;
    opacity: 0;
    place-items: center;
    transition: opacity 180ms ease;
}

.modal.is-open {
    pointer-events: auto;
    opacity: 1;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(11, 16, 31, 0.62);
    backdrop-filter: blur(12px);
}

.modal-panel {
    position: relative;
    width: min(540px, 100%);
    max-height: calc(100vh - 40px);
    padding: clamp(24px, 5vw, 36px);
    overflow: auto;
    border: 1px solid rgba(255, 255, 255, 0.44);
    border-radius: var(--radius-xl);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow);
    transform: translateY(20px) scale(0.98);
    transition: transform 220ms ease;
}

.modal.is-open .modal-panel {
    transform: translateY(0) scale(1);
}

.modal-close {
    position: absolute;
    top: 18px;
    right: 18px;
    display: grid;
    width: 38px;
    height: 38px;
    color: var(--muted);
    border: 0;
    border-radius: 999px;
    background: rgba(16, 21, 34, 0.06);
    cursor: pointer;
    place-items: center;
}

form {
    display: grid;
    gap: 16px;
}

label {
    display: grid;
    gap: 8px;
    color: var(--ink);
    font-weight: 800;
}

input {
    width: 100%;
    min-height: 54px;
    padding: 0 16px;
    color: var(--ink);
    border: 1px solid rgba(16, 21, 34, 0.12);
    border-radius: 16px;
    outline: none;
    background: #ffffff;
    transition: border 160ms ease, box-shadow 160ms ease;
}

input:focus {
    border-color: rgba(33, 70, 208, 0.55);
    box-shadow: 0 0 0 4px rgba(33, 70, 208, 0.12);
}

.submit-button.is-loading {
    pointer-events: none;
}

.button-loader {
    display: none;
    width: 20px;
    height: 20px;
    margin-left: 10px;
    border: 3px solid rgba(255, 255, 255, 0.38);
    border-top-color: #ffffff;
    border-radius: 999px;
    animation: spin 700ms linear infinite;
}

.submit-button.is-loading .button-loader {
    display: inline-block;
}

.toast-region {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 30;
    display: grid;
    gap: 12px;
    width: min(420px, calc(100vw - 36px));
}

.toast {
    padding: 16px 18px;
    color: #ffffff;
    font-weight: 800;
    border-radius: 18px;
    box-shadow: var(--shadow);
    animation: toast-in 240ms ease both;
}

.toast.success {
    background: linear-gradient(135deg, #16855e, #23bd86);
}

.toast.error {
    background: linear-gradient(135deg, #aa2437, #ed3851);
}

.admin-hero {
    display: flex;
    gap: 24px;
    align-items: end;
    justify-content: space-between;
    padding: 62px 0 28px;
}

.admin-card {
    overflow: hidden;
    border-radius: var(--radius-xl);
}

.logs-card {
    margin-top: 24px;
}

.admin-toolbar {
    display: flex;
    gap: 12px;
    justify-content: space-between;
    padding: 18px;
    border-bottom: 1px solid rgba(16, 21, 34, 0.08);
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    min-width: 860px;
    border-collapse: collapse;
}

th,
td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid rgba(16, 21, 34, 0.07);
}

th {
    color: var(--muted);
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.badge {
    display: inline-flex;
    padding: 6px 10px;
    font-size: 0.82rem;
    font-weight: 900;
    border-radius: 999px;
}

.badge.pending {
    color: #835900;
    background: rgba(242, 187, 86, 0.22);
}

.badge.success {
    color: #0e6d4c;
    background: rgba(30, 159, 113, 0.16);
}

.badge.failed {
    color: #9a1f31;
    background: rgba(237, 56, 81, 0.16);
}

.logs-grid {
    display: grid;
    gap: 10px;
    padding: 18px;
}

.log-item {
    padding: 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.7);
}

.log-item p {
    margin: 8px 0;
}

.log-item strong {
    text-transform: uppercase;
}

.log-item small,
.log-item span {
    display: block;
    color: var(--muted);
}

@keyframes rise-in {
    from {
        opacity: 0;
        transform: translateY(22px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float-in {
    from {
        opacity: 0;
        transform: translateY(28px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes slide-down {
    from {
        opacity: 0;
        transform: translateY(-14px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes toast-in {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 1ms !important;
        transition-duration: 1ms !important;
    }
}

@media (max-width: 900px) {
    .site-header,
    .admin-hero {
        align-items: flex-start;
        flex-direction: column;
    }

    .header-actions {
        width: 100%;
        overflow-x: auto;
        justify-content: flex-start;
    }

    .hero,
    .course-card,
    .curriculum {
        grid-template-columns: 1fr;
    }

    .hero {
        gap: 18px;
        min-height: auto;
        padding-top: 36px;
    }

    .hero-visual {
        min-height: 520px;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 620px) {
    .page-shell,
    .admin-shell {
        width: min(100% - 22px, 1180px);
    }

    .hero-stats {
        grid-template-columns: 1fr;
    }

    .hero-actions {
        flex-direction: column;
    }

    .secondary-button,
    .primary-button {
        width: 100%;
    }

    .language-card {
        left: 0;
        width: 100%;
    }

    .progress-card {
        right: 0;
        bottom: 62px;
        width: 84%;
    }

    .flag-ribbon {
        right: 16px;
        top: 272px;
        width: 210px;
        height: 140px;
    }

    .course-card-media {
        min-height: 320px;
    }

    .course-card-media h3 {
        margin-top: 72px;
    }

    .admin-toolbar {
        align-items: stretch;
        flex-direction: column;
    }
}
