/* ============================================================
   SenseiWyze theme — design system
   ============================================================ */
:root {
    --sw-ink: #0f172a;
    --slate-900: #0f172a;
    --slate-800: #1e293b;
    --slate-700: #334155;
    --slate-500: #64748b;
    --slate-300: #cbd5e1;
    --slate-200: #e2e8f0;
    --slate-100: #f1f5f9;
    --slate-50: #f8fafc;
    --primary: #2563eb;
    --primary-600: #1d4ed8;
    --primary-700: #1e40af;
    --accent: #6366f1;
    --grad: linear-gradient(135deg, #2563eb 0%, #6366f1 100%);
    --grad-dark: linear-gradient(135deg, #0f172a 0%, #1e293b 60%, #1e3a8a 130%);
    --radius: 14px;
    --radius-sm: 9px;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06), 0 1px 3px rgba(15, 23, 42, .04);
    --shadow-md: 0 10px 25px -8px rgba(15, 23, 42, .18), 0 4px 10px -6px rgba(15, 23, 42, .10);
    --shadow-lg: 0 30px 60px -20px rgba(15, 23, 42, .30);
    --container: 1140px;
    --space: clamp(3.5rem, 8vw, 7rem);
    --ease: cubic-bezier(.4, 0, .2, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--slate-800);
    background: #fff;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

a { color: var(--primary-600); text-decoration: none; }
a:hover { color: var(--primary-700); }

h1, h2, h3, h4 { color: var(--slate-900); line-height: 1.15; letter-spacing: -.02em; font-weight: 700; }
h1 { font-size: clamp(2.1rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
h3 { font-size: 1.25rem; }

/* ---------- Header ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, .82);
    backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--slate-200);
}
.site-header__inner {
    max-width: var(--container);
    margin: 0 auto;
    padding: .85rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.site-title {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--slate-900);
    letter-spacing: -.02em;
}
.site-title:hover { color: var(--slate-900); }
.site-title__mark {
    display: inline-grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--grad);
    color: #fff;
    font-size: .8rem;
    font-weight: 800;
    box-shadow: var(--shadow-sm);
}
.main-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}
.main-navigation a {
    color: var(--slate-700);
    font-size: .95rem;
    font-weight: 500;
}
.main-navigation a:hover { color: var(--primary-600); }
.main-navigation .nav-signin {
    padding: .5rem 1rem;
    border-radius: var(--radius-sm);
    background: var(--slate-900);
    color: #fff;
}
.main-navigation .nav-signin:hover { background: var(--slate-800); color: #fff; }
.main-navigation .nav-account {
    color: var(--slate-500);
    font-size: .95rem;
    font-weight: 500;
}
.main-navigation .nav-account a {
    color: var(--slate-500);
    font-weight: 500;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: .85rem 1.6rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 1rem;
    transition: transform .15s var(--ease), box-shadow .2s var(--ease), background .2s var(--ease);
    cursor: pointer;
    border: 1px solid transparent;
}
.btn--primary {
    background: var(--grad);
    color: #fff;
    box-shadow: 0 8px 20px -6px rgba(37, 99, 235, .55);
}
.btn--primary:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 14px 28px -8px rgba(37, 99, 235, .6); }
.btn--ghost {
    background: rgba(255, 255, 255, .08);
    color: #fff;
    border-color: rgba(255, 255, 255, .35);
}
.btn--ghost:hover { color: #fff; background: rgba(255, 255, 255, .16); }
.btn--light { background: #fff; color: var(--slate-900); }
.btn--light:hover { color: var(--slate-900); transform: translateY(-2px); box-shadow: var(--shadow-md); }

/* ---------- Hero ---------- */
.hero {
    position: relative;
    overflow: hidden;
    background: var(--grad-dark);
    color: #fff;
    padding: var(--space) 1.5rem;
    text-align: center;
}
.hero__inner { position: relative; z-index: 2; max-width: 760px; margin: 0 auto; }
.hero__eyebrow {
    display: inline-block;
    margin: 0 0 1.2rem;
    padding: .35rem .9rem;
    border-radius: 999px;
    font-size: .8rem;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #c7d2fe;
    background: rgba(99, 102, 241, .18);
    border: 1px solid rgba(99, 102, 241, .35);
}
.hero__title { color: #fff; margin: 0 0 1.1rem; }
.hero__sub { font-size: clamp(1.05rem, 2vw, 1.3rem); color: var(--slate-300); margin: 0 auto 2rem; max-width: 620px; }
.hero__cta { display: flex; gap: .9rem; justify-content: center; flex-wrap: wrap; }
.hero__glow {
    position: absolute;
    z-index: 1;
    top: -30%;
    left: 50%;
    transform: translateX(-50%);
    width: 900px;
    height: 900px;
    background: radial-gradient(circle, rgba(99, 102, 241, .35) 0%, rgba(37, 99, 235, .12) 35%, transparent 65%);
    pointer-events: none;
}

/* ---------- Sections ---------- */
.section { padding: var(--space) 1.5rem; max-width: var(--container); margin: 0 auto; }
.section--features { background: var(--slate-50); max-width: none; }
.section--features .section__head,
.section--courses .section__head { max-width: var(--container); margin: 0 auto 2.75rem; }
.section__head { text-align: center; }
.section__title { margin: 0 0 .6rem; }
.section__kicker { color: var(--slate-500); margin: 0; font-size: 1.05rem; }
.section__empty { text-align: center; color: var(--slate-500); }

/* ---------- Course cards ---------- */
.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.75rem;
}
.course-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--slate-200);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform .2s var(--ease), box-shadow .25s var(--ease), border-color .2s var(--ease);
    color: inherit;
}
.course-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--slate-300);
    color: inherit;
}
.course-card__media {
    aspect-ratio: 16 / 9;
    background: var(--grad-dark);
    display: grid;
    place-items: center;
    overflow: hidden;
}
.course-card__media img { width: 100%; height: 100%; object-fit: cover; }
.course-card__placeholder { color: rgba(255, 255, 255, .9); font-weight: 800; font-size: 2rem; letter-spacing: .1em; }
.course-card__body { padding: 1.4rem; display: flex; flex-direction: column; gap: .55rem; flex: 1; }
.course-card__tag {
    align-self: flex-start;
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--primary-600);
    background: rgba(37, 99, 235, .1);
    padding: .2rem .55rem;
    border-radius: 999px;
}
.course-card__title { margin: 0; font-size: 1.2rem; }
.course-card__excerpt { color: var(--slate-500); margin: 0; flex: 1; font-size: .95rem; }
.course-card__link { color: var(--primary-600); font-weight: 600; font-size: .92rem; }

/* ---------- Features ---------- */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    max-width: var(--container);
    margin: 0 auto;
}
.feature {
    background: #fff;
    border: 1px solid var(--slate-200);
    border-radius: var(--radius);
    padding: 1.75rem;
    box-shadow: var(--shadow-sm);
}
.feature__icon {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: rgba(37, 99, 235, .1);
    font-size: 1.4rem;
    margin-bottom: 1rem;
}
.feature__title { margin: 0 0 .4rem; }
.feature__text { color: var(--slate-500); margin: 0; font-size: .95rem; }

/* ---------- CTA strip ---------- */
.cta-strip {
    background: var(--grad);
    color: #fff;
    padding: clamp(3rem, 7vw, 5rem) 1.5rem;
    text-align: center;
}
.cta-strip__title { color: #fff; margin: 0 0 .6rem; }
.cta-strip__sub { color: rgba(255, 255, 255, .85); margin: 0 0 1.6rem; font-size: 1.1rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--slate-900); color: var(--slate-300); padding: 2.5rem 1.5rem; }
.site-footer .site-info { max-width: var(--container); margin: 0 auto; display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.site-footer a { color: var(--slate-300); }
.site-footer a:hover { color: #fff; }
.site-footer .copyright { margin: 0; font-size: .9rem; color: var(--slate-500); }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 1.25rem; }

/* ---------- Single post / page content ---------- */
.site-content { max-width: var(--container); margin: 0 auto; padding: 3rem 1.5rem; }
.entry { max-width: 760px; margin: 0 auto; }
.entry-header { margin-bottom: 2rem; }
.entry-title { margin: 0 0 .5rem; }
.entry-meta { color: var(--slate-500); font-size: .9rem; }
.entry-content { font-size: 1.075rem; color: var(--slate-700); }
.entry-content p { margin: 0 0 1.3rem; }
.entry-content h2 { margin: 2.2rem 0 .8rem; }
.entry-thumbnail { margin-bottom: 1.5rem; border-radius: var(--radius); overflow: hidden; }
.entry-thumbnail img { display: block; width: 100%; }

/* Pagination + search + 404 */
.nav-links { display: flex; gap: 1rem; justify-content: center; margin-top: 2.5rem; }
.nav-links a, .nav-links span { padding: .5rem 1rem; border: 1px solid var(--slate-200); border-radius: var(--radius-sm); }
.search-form { display: flex; gap: .5rem; max-width: 420px; margin: 1rem auto; }
.search-form .search-field { flex: 1; padding: .6rem .8rem; border: 1px solid var(--slate-300); border-radius: var(--radius-sm); font-size: 1rem; }
.search-form .search-submit { padding: .6rem 1.2rem; border: none; border-radius: var(--radius-sm); background: var(--grad); color: #fff; font-weight: 600; cursor: pointer; }
.error-404, .no-results { text-align: center; }

/* LearnDash content basics */
.learndash img { max-width: 100%; height: auto; }

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
    .site-header__inner { flex-direction: column; align-items: flex-start; }
    .main-navigation ul { gap: 1rem; }
    .hero__cta { flex-direction: column; }
    .hero__cta .btn { width: 100%; }
    .site-footer .site-info { flex-direction: column; align-items: flex-start; }
}

.screen-reader-text {
    border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
    height: 1px; width: 1px; overflow: hidden; position: absolute !important;
}

/* ============================================================
   Learner Dashboard
   ============================================================ */
.dashboard {
    max-width: var(--container);
    margin: 0 auto;
    padding: clamp(2rem, 5vw, 3.5rem) 1.5rem 5rem;
}
.dash-gate {
    text-align: center;
    padding: 5rem 1rem;
}
.dash-gate__title { margin-bottom: .5rem; }
.dash-gate__sub { color: var(--slate-500); margin-bottom: 1.5rem; }

.dash-flash {
    border-radius: var(--radius-sm);
    padding: .85rem 1.1rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
    font-size: .95rem;
}
.dash-flash--ok  { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.dash-flash--err { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }

/* Profile header */
.dash-profile {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.75rem;
    background: var(--grad-dark);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    color: #fff;
    margin-bottom: 1.75rem;
}
.dash-profile__avatar img {
    border-radius: 50%;
    display: block;
    border: 3px solid rgba(255, 255, 255, .25);
}
.dash-profile__meta { flex: 1; min-width: 0; }
.dash-profile__name { color: #fff; margin: 0 0 .15rem; font-size: 1.6rem; }
.dash-profile__sub { color: rgba(255, 255, 255, .7); margin: 0 0 .6rem; }
.dash-profile__tags { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0; }
.dash-chip {
    display: inline-block;
    padding: .2rem .65rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, .15);
    color: #fff;
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .01em;
}
.dash-chip--muted { background: rgba(255, 255, 255, .08); color: rgba(255, 255, 255, .75); font-weight: 500; }
.dash-profile__action .btn--ghost { color: #fff; border-color: rgba(255, 255, 255, .4); }
.dash-profile__action .btn--ghost:hover { background: rgba(255, 255, 255, .12); }

/* Stats */
.dash-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 2.5rem;
}
.dash-stat {
    background: #fff;
    border: 1px solid var(--slate-200);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 1.25rem;
    text-align: center;
}
.dash-stat__num { display: block; font-size: 2rem; font-weight: 800; color: var(--slate-900); line-height: 1; }
.dash-stat__label { display: block; margin-top: .35rem; font-size: .85rem; color: var(--slate-500); font-weight: 600; }

/* Sections */
.dash-section { margin-bottom: 2.5rem; }
.dash-section__title { font-size: 1.35rem; margin: 0 0 1rem; }
.dash-empty { color: var(--slate-500); }

/* Course cards */
.dash-courses { display: grid; gap: 1rem; }
.dash-course {
    background: #fff;
    border: 1px solid var(--slate-200);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 1.25rem 1.4rem;
}
.dash-course__head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .75rem; }
.dash-course__title { margin: 0; font-size: 1.1rem; }
.dash-badge {
    flex-shrink: 0;
    padding: .2rem .65rem;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    background: var(--slate-100);
    color: var(--slate-700);
}
.dash-badge--done { background: #ecfdf5; color: #065f46; }
.dash-badge--new  { background: var(--slate-100); color: var(--slate-500); }
.dash-progress {
    height: 8px;
    border-radius: 999px;
    background: var(--slate-200);
    overflow: hidden;
    margin-bottom: .65rem;
}
.dash-progress__bar { height: 100%; border-radius: 999px; background: var(--grad); transition: width .4s var(--ease); }
.dash-course__foot { display: flex; align-items: center; justify-content: space-between; gap: 1rem; font-size: .9rem; }
.dash-course__pct { color: var(--slate-500); font-weight: 600; }
.dash-course__links { display: flex; gap: 1rem; }
.dash-course__cert { font-weight: 600; }
.dash-course__grade { color: var(--slate-700); font-weight: 600; }

/* Grades */
.dash-grades { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--slate-200); border-radius: var(--radius-sm); box-shadow: var(--shadow-sm); overflow: hidden; }
.dash-grades th, .dash-grades td { text-align: left; padding: .7rem 1rem; border-bottom: 1px solid var(--slate-200); }
.dash-grades thead th { background: var(--slate-100, #f1f5f9); font-size: .85rem; color: var(--slate-500); }
.dash-grades tr:last-child td { border-bottom: 0; }
.dash-grade-letter { display: inline-block; min-width: 2.2rem; text-align: center; font-weight: 700; padding: .15rem .5rem; border-radius: var(--radius-sm); background: linear-gradient(135deg, var(--brand-blue, #2563eb), var(--brand-indigo, #4f46e5)); color: #fff; }

/* Certificates */
.dash-certs { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; }
.dash-cert {
    display: flex;
    align-items: center;
    gap: .85rem;
    background: #fff;
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
    padding: .9rem 1.1rem;
}
.dash-cert__icon { font-size: 1.3rem; }
.dash-cert__title { flex: 1; font-weight: 600; color: var(--slate-900); }
.dash-cert__dl { font-weight: 600; }

/* Edit form */
.dash-form {
    background: #fff;
    border: 1px solid var(--slate-200);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 1.6rem;
    max-width: 540px;
}
.dash-field { margin-bottom: 1.1rem; }
.dash-field label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: .35rem; color: var(--slate-700); }
.dash-hint { font-weight: 400; color: var(--slate-500); }
.dash-field input {
    width: 100%;
    padding: .65rem .8rem;
    border: 1px solid var(--slate-300);
    border-radius: var(--radius-sm);
    font-size: .95rem;
    color: var(--slate-900);
    background: var(--slate-50);
}
.dash-field input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37, 99, 235, .15); background: #fff; }
.dash-form__actions { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-top: .5rem; }

@media (max-width: 720px) {
    .dash-stats { grid-template-columns: repeat(2, 1fr); }
    .dash-profile { flex-direction: column; text-align: center; }
    .dash-profile__tags { justify-content: center; }
}
