:root {
  --background:#f3f6fb;
  --surface:#ffffff;
  --surface-secondary:#eef3ff;
  --text-primary:#111827;
  --text-secondary:#5b6476;
  --text-muted:#7a8193;
  --border:rgba(15,23,42,.08);
  --accent:#3b82f6;
  --accent-glow:rgba(59,130,246,.28);
  --bg:#f3f6fb;
  --bg-soft:#eef3ff;
  --surface-strong:#edf3ff;
  --surface-elevated:#111827;
  --text:#111827;
  --muted:#5b6476;
  --muted-soft:#7a8193;
  --primary:#3b82f6;
  --primary-dark:#1d4ed8;
  --warning:#f59e0b;
  --danger:#ef4444;
  --shadow:0 18px 50px rgba(15,23,42,.08);
  --radius:18px;
}

/* Premium dark interface: deep charcoal hierarchy, NOT pure black.
   Canonical theme tokens: --background/--surface/--surface-secondary/
   --text-primary/--text-secondary/--text-muted/--border/--accent. */
html[data-theme="dark"] {
  --background:#0a0f1c;
  --surface:#111827;
  --surface-secondary:#172033;
  --text-primary:#f8fafc;
  --text-secondary:#94a3b8;
  --text-muted:#7c8aa5;
  --border:#263244;
  --accent:#62a5ff;
  --cta:#62a5ff;
  --accent-glow:rgba(98,165,255,.28);
  --bg:#0a0f1c;
  --bg-soft:#0e1524;
  --surface-strong:#1b2538;
  --surface-elevated:#10182b;
  --text:#f8fafc;
  --muted:#94a3b8;
  --muted-soft:#7c8aa5;
  --primary:#62a5ff;
  --primary-dark:#93c5fd;
  --shadow:0 18px 50px rgba(2,6,23,.6);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Segoe UI", Arial, sans-serif;
  background: linear-gradient(180deg, #f9fbff 0%, #f3f6fb 100%);
  color: var(--text);
}

a {
  color: inherit;
  text-decoration: none;
}

button, input, select, textarea {
  font: inherit;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 82px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), #7c3aed);
  color: white;
  font-size: 0.8rem;
  box-shadow: 0 12px 24px rgba(59, 130, 246, 0.25);
}

.brand-name {
  font-size: 0.8rem;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 22px;
}

.main-nav a {
  color: var(--muted);
  font-size: 0.95rem;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 12px;
  border: 1px solid transparent;
  cursor: pointer;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  box-shadow: 0 14px 28px rgba(59, 130, 246, 0.24);
}

.btn-secondary {
  background: white;
  border-color: var(--border);
  color: var(--text);
}

.btn-light {
  background: var(--surface-strong);
  border-color: var(--border);
  color: var(--text);
}

.menu-toggle {
  display: none;
  border: 1px solid var(--border);
  background: white;
  border-radius: 12px;
  width: 42px;
  height: 42px;
  cursor: pointer;
}

.hero {
  padding: 72px 0 46px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
  gap: 34px 48px;
  align-items: center;
}

/* Recomposed hero: copy and illustration share the top row, the Skill
   Growth panel spans the full width below, and the progression strip
   closes the composition. No stretched column = no blank canvas. */
.hero-copy {
  grid-column: 1;
  grid-row: 1;
  position: relative;
  padding-right: 6px;
}

.hero-card {
  grid-column: 1 / -1;
  grid-row: 2;
  position: relative;
}

/* Floating skill-node accent in the gap between columns — part of the
   same visual language (nodes + conduits) used throughout the site. */
.hero-copy::before {
  content: "";
  position: absolute;
  top: 36px;
  right: -40px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--primary, #3b82f6);
  box-shadow:
    0 0 0 6px var(--msk-node-soft, rgba(59, 130, 246, 0.18)),
    0 0 14px var(--primary, #3b82f6);
  opacity: 0.55;
  pointer-events: none;
}

/* Hero journey strip — Learning -> Skills -> Jobs -> Career.
   Anchors the lower-left column to the card's base using the site's
   conduit + node language, so the space beside the lower half of the
   hero card is occupied intentionally (no filler graphics). */
.hero-journey {
  display: flex;
  align-items: center;
  gap: 10px;
  grid-column: 1 / -1;
  grid-row: 3;
  margin: 0;
}

.hero-journey span {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

.hero-journey .hj-node {
  flex-shrink: 0;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--primary, #3b82f6);
  box-shadow: 0 0 0 4px var(--msk-node-soft, rgba(59, 130, 246, 0.18));
}

.hero-journey .hj-node--green {
  background: var(--accent, #10b981);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.16);
}

.hero-journey .hj-link {
  flex: 1;
  min-width: 12px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--msk-line), var(--msk-line-green));
}

/* Top-row hero illustration (moved out of the analytics panel) */
.hero-visual {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Horizontal Skill Growth band — three zones instead of a tall column:
   journey label | animated chart | skill statistics */
.card-glass--band {
  display: grid;
  grid-template-columns: minmax(170px, 0.62fr) minmax(0, 1.55fr) minmax(270px, 0.95fr);
  gap: 28px;
  align-items: center;
}

.band-col--intro .card-header {
  margin-bottom: 12px;
}

.band-col--intro .badge {
  margin-bottom: 16px;
}

.band-col--chart .chart {
  margin: 12px 0 0;
}

/* Very narrow screens: tighten the strip so it never overflows */
@media (max-width: 740px) {
  .hero-journey {
    gap: 7px;
  }
  .hero-journey span {
    font-size: 0.62rem;
    letter-spacing: 0.06em;
  }
  .hero-journey .hj-link {
    min-width: 6px;
  }

  .header-illus {
    width: 84px;
  }

  .banner-illus {
    width: 160px;
  }

  .banner-illus--wide {
    width: 180px;
  }

  /* Keep the growth band's statistics compact (2x2) on phones */
  .card-glass--band .mini-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.eyebrow {
  display: inline-flex;
  border-radius: 999px;
  padding: 8px 12px;
  background: var(--bg-soft);
  color: var(--primary-dark);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 18px 0 16px;
  font-size: clamp(2.8rem, 5vw, 5rem);
  line-height: 0.96;
  letter-spacing: -0.06em;
}

.hero-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(100px, 1fr));
  gap: 16px;
  list-style: none;
  padding: 0;
  margin: 30px 0 0;
}

.hero-stats li {
  background: white;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 18px 16px;
  box-shadow: var(--shadow);
}

.hero-stats strong {
  display: block;
  margin-bottom: 5px;
  font-size: 1.6rem;
  letter-spacing: -0.05em;
}

.hero-stats span {
  color: var(--muted);
  font-size: 0.8rem;
}

.hero-card {
  background: linear-gradient(180deg, #101827 0%, #0d1320 100%);
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 28px;
  padding: 22px;
  box-shadow:
    0 36px 90px rgba(10, 15, 30, 0.28),
    0 4px 18px rgba(10, 15, 30, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.window-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
}

.window-bar span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: block;
}

.window-bar span:nth-child(1) { background: #ff6b6b; }
.window-bar span:nth-child(2) { background: #facc15; }
.window-bar span:nth-child(3) { background: #34d399; }

.card-glass {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 20px;
  padding: 20px;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.card-header h3 {
  margin: 0;
  color: #e5ebff;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(52, 211, 153, 0.12);
  border: 1px solid rgba(52, 211, 153, 0.22);
  color: #7ef0c8;
  font-size: 0.7rem;
  font-weight: 700;
}

.chart {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  align-items: end;
  gap: 10px;
  height: 138px;
  margin: 10px 0 14px;
  padding: 14px 10px 0;
  border-radius: 16px;
  background: rgba(148, 163, 184, 0.06);
}

.chart span {
  display: block;
  border-radius: 10px 10px 0 0;
  background: linear-gradient(180deg, #c2d1ff 0%, #5a72ff 100%);
}

.mini-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.mini-item {
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(148, 163, 184, 0.12);
  padding: 14px 12px;
}

.mini-item strong {
  display: block;
  color: white;
  font-size: 1.3rem;
  margin-bottom: 5px;
}

.mini-item span {
  color: #b1bcdb;
  font-size: 0.8rem;
}

/* ---------- Section separation ---------- */
.section {
  padding: 38px 0;
  position: relative;
}

.section::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 0%, var(--surface-strong) 50%, transparent 100%);
  opacity: 0.4;
}

html[data-theme="dark"] .section::before {
  background: linear-gradient(180deg, transparent 0%, rgba(15, 23, 42, 0.3) 50%, transparent 100%);
}

.section-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.section-header h2 {
  margin: 0;
  font-size: clamp(1.8rem, 2vw, 2.4rem);
  letter-spacing: -0.04em;
}

.section-header p {
  margin: 0;
  color: var(--muted);
}

/* Section headers with an inline illustration — one composed title row.
   Used by the landing page story sections (skills / learning / career). */
.section-title-group {
  display: flex;
  align-items: center;
  gap: 18px;
}

.header-illus {
  width: 118px;
  flex-shrink: 0;
  filter: drop-shadow(0 12px 26px rgba(15, 23, 42, 0.14));
}

html[data-theme="dark"] .header-illus {
  filter: drop-shadow(0 12px 26px rgba(0, 0, 0, 0.4));
}

.header-illus svg {
  width: 100%;
  height: auto;
  display: block;
}

/* Illustrations anchored inside stretched page-banners — they occupy the
   banner's lower area so the two-column bands read as complete compositions. */
.banner-illus {
  width: 200px;
  margin: 20px auto 0;
  margin-top: auto;
  padding-top: 18px;
}

.banner-illus--wide {
  width: 220px;
}

.banner-illus svg {
  width: 100%;
  height: auto;
  display: block;
}

.job-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.job-card, .panel, .dashboard-card, .form-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.job-card {
  padding: 18px;
}

.company-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.company-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--surface-strong);
  color: var(--primary-dark);
  font-weight: 800;
}

.company-meta h4 {
  margin: 0;
  font-size: 1rem;
}

.company-meta p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.job-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.08);
  color: var(--primary-dark);
  font-size: 0.74rem;
  font-weight: 700;
}

.job-card h3 {
  margin: 0 0 10px;
  font-size: 1.2rem;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border-radius: 999px;
  background: #f7f9fd;
  border: 1px solid var(--border);
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
}

.salary {
  font-weight: 800;
  color: var(--text);
}

.page-shell {
  padding: 34px 0 60px;
}

.page-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 26px;
}

.page-header h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.05em;
}

.page-header p {
  margin: 8px 0 0;
  color: var(--muted);
}

.page-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.search-bar {
  display: flex;
  align-items: center;
  background: white;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0 14px;
  min-height: 52px;
  box-shadow: var(--shadow);
}

.search-bar input {
  width: 100%;
  border: none;
  outline: none;
  background: transparent;
  min-width: 200px;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
}

.filter-row select,
.form-grid input,
.form-grid textarea,
.form-grid select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0 14px;
  background: white;
  color: var(--text);
}

.filter-row select {
  min-width: 170px;
}

.jobs-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 22px;
}

.listing-stack {
  display: grid;
  gap: 18px;
}

.details-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 24px;
}

.details-card h2 {
  margin: 0 0 12px;
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  letter-spacing: -0.05em;
}

.details-card h3 {
  margin: 16px 0 8px;
}

.details-card p,
.details-card li {
  color: var(--muted);
  line-height: 1.7;
}

.details-card ul {
  padding-left: 16px;
}

.auth-page {
  min-height: calc(100vh - 82px);
  display: grid;
  place-items: center;
  padding: 56px 0;
}

.auth-shell {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: min(980px, calc(100% - 28px));
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: white;
  box-shadow: var(--shadow);
}

.auth-visual {
  background: linear-gradient(180deg, #0f172a 0%, #1d4ed8 100%);
  padding: 42px 32px;
  color: white;
}

.auth-visual h2 {
  margin: 0 0 10px;
  font-size: 2rem;
  letter-spacing: -0.05em;
}

.auth-visual p {
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.7;
}

.feature-list {
  display: grid;
  gap: 12px;
  margin-top: 28px;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.form-card {
  padding: 32px 26px;
}

.form-card h2 {
  margin-top: 0;
  font-size: 2rem;
  letter-spacing: -0.05em;
}

.form-grid {
  display: grid;
  gap: 16px;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 0.9rem;
}

.inline-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.inline-check input {
  width: 16px;
  height: 16px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 24px;
  align-items: start;
}

.sidebar {
  background: white;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 18px;
  box-shadow: var(--shadow);
}

.sidebar nav {
  display: grid;
  gap: 8px;
}

.sidebar a {
  display: block;
  padding: 12px 14px;
  border-radius: 12px;
  color: var(--muted);
  font-weight: 600;
}

.sidebar a.active,
.sidebar a:hover {
  background: var(--surface-strong);
  color: var(--primary-dark);
}

.dashboard-content {
  display: grid;
  gap: 20px;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.kpi-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 18px;
  box-shadow: var(--shadow);
}

.kpi-card .label {
  color: var(--muted);
  font-size: 0.8rem;
}

.kpi-card strong {
  display: block;
  margin-top: 10px;
  font-size: 2rem;
  letter-spacing: -0.05em;
}

.kpi-card .trend {
  display: inline-block;
  margin-top: 10px;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 620px;
}

th, td {
  padding: 14px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

th {
  color: var(--muted);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
}

.status.live { background: rgba(16, 185, 129, 0.12); color: #0b8b61; }
.status.review { background: rgba(245, 158, 11, 0.12); color: #b7791f; }
.status.pending { background: rgba(59, 130, 246, 0.12); color: var(--primary-dark); }
.status.rejected { background: rgba(239, 68, 68, 0.12); color: #b91c1c; }

.applicant-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #dfe9ff, #c7d2fe);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-dark);
  font-weight: 800;
}

.page-banner {
  background: linear-gradient(135deg, #eff6ff, #ecfeff);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 22px 24px;
  margin-bottom: 22px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
}

/* Story banners stretch beside their sibling cards — the anchored
   banner-illustration fills the lower area, so the full height reads
   as an intentional composition. */
#connect-employers .page-banner,
#skills-profile .page-banner {
  display: flex;
  flex-direction: column;
}

@media (max-width: 980px) {
  .jobs-layout,
  .auth-shell,
  .dashboard-grid,
  .hero-grid {
    grid-template-columns: 1fr;
  }

  /* The floating node accent lives in the column gap — remove it
     once the hero stacks so nothing overflows horizontally. */
  .hero-copy::before {
    display: none;
  }

  .hero-copy {
    padding-right: 0;
  }

  /* Reset the hero's explicit grid placement once it stacks:
     copy -> illustration -> growth band -> progression strip */
  .hero-copy,
  .hero-visual,
  .hero-card,
  .hero-journey {
    grid-column: auto;
    grid-row: auto;
  }

  .card-glass--band {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .job-grid {
    grid-template-columns: 1fr 1fr;
  }

  .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 740px) {
  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .main-nav {
    position: absolute;
    top: 82px;
    left: 16px;
    right: 16px;
    display: none;
    flex-direction: column;
    align-items: flex-start;
    background: white;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 16px;
    box-shadow: var(--shadow);
  }

  .main-nav.open {
    display: flex;
  }

  .hero {
    padding-top: 44px;
  }

  .job-grid,
  .kpi-grid,
  .form-row,
  .hero-stats,
  .mini-grid {
    grid-template-columns: 1fr;
  }

  .page-header,
  .section-header,
  .form-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .header-actions .btn-secondary {
    display: none;
  }

  /* The icon-only theme toggle stays visible on small screens. */
  .header-actions .theme-toggle {
    display: inline-flex;
  }
}
/* Role-scoped dashboard/nav blocks must obey the hidden attribute. */
[hidden] {
  display: none !important;
}
/* ============================================================
   SKILLS ECOSYSTEM (additive styles — chips, progress bars)
   ============================================================ */

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: white;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.chip:hover {
  transform: translateY(-1px);
}

.chip.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-color: transparent;
  color: white;
  box-shadow: 0 12px 24px rgba(59, 130, 246, 0.25);
}

.progress-track {
  display: block;
  height: 8px;
  border-radius: 999px;
  background: #eef2fb;
  border: 1px solid var(--border);
  overflow: hidden;
}

.progress-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), #7c3aed);
}

.growth-tag {
  color: var(--accent);
  font-weight: 800;
  font-size: 0.85rem;
}

/* ============================================================
   PHASE 3 — REFINEMENT LAYER
   Dark/Light themes · motion · back links · consent · statuses
   Palette identity preserved; dark surfaces reuse #0f172a family.
   ============================================================ */

/* ---------- Dark theme : TRUE DARK MODE ---------- */

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0a0f1c;                 /* near-black navy page background */
  --bg-soft: #0e1524;
  --surface: #111827;            /* card surface */
  --surface-secondary: #172033;  /* inputs, mini-items, filled areas */
  --surface-strong: #1b2538;     /* hover / elevated */
  --surface-elevated: #10182b;
  --border: #263244;             /* clearly readable border */
  --border-soft: rgba(148,163,184,0.16);
  --text: #f8fafc;               /* high contrast */
  --muted: #94a3b8;
  --muted-soft: #7c8aa5;
  --shadow: 0 18px 50px rgba(2, 6, 23, 0.6);
  --card-shadow: 0 16px 40px rgba(2, 6, 23, 0.45);
}

html[data-theme="dark"] body {
  background: linear-gradient(180deg, #0d1424 0%, #0a0f1c 100%);
  color: var(--text);
}

html[data-theme="dark"] .site-header {
  background: rgba(10, 15, 28, 0.82);
  border-bottom-color: var(--border);
}

html[data-theme="dark"] .site-footer {
  background: #070b16 !important;
  color: #e5ecf7;
}

html[data-theme="dark"] .brand-name {
  color: var(--text);
}

/* Cards, panels, dashboards, forms */
html[data-theme="dark"] .hero-stats li,
html[data-theme="dark"] .job-card,
html[data-theme="dark"] .panel,
html[data-theme="dark"] .dashboard-card,
html[data-theme="dark"] .details-card,
html[data-theme="dark"] .form-card,
html[data-theme="dark"] .kpi-card,
html[data-theme="dark"] .search-bar,
html[data-theme="dark"] .job-card.panel {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
  box-shadow: var(--card-shadow);
}

/* Secondary filled surfaces (badges, chips, mini-items, meta pills) */
html[data-theme="dark"] .mini-item,
html[data-theme="dark"] .meta-pill,
html[data-theme="dark"] .chip,
html[data-theme="dark"] .progress-track,
html[data-theme="dark"] .consent-box {
  background: var(--surface-secondary);
  border-color: var(--border-soft);
  color: var(--text);
}

/* Override inline hardcoded light backgrounds (#f7f9fd, white) */
html[data-theme="dark"] .mini-item[style*="#f7f9fd"],
html[data-theme="dark"] .mini-item[style*="background:#f7f9fd"],
html[data-theme="dark"] .mini-item.page-banner,
html[data-theme="dark"] .mini-item[style*="background:#f7f9fd;"],
html[data-theme="dark"] .mini-item[style*="#f7f9fd;"] {
  background: var(--surface-secondary) !important;
  color: var(--text);
}

/* Buttons that were white/bordered */
html[data-theme="dark"] .btn-secondary,
html[data-theme="dark"] .btn-light,
html[data-theme="dark"] .menu-toggle {
  background: var(--surface-secondary);
  border-color: var(--border);
  color: var(--text);
}

html[data-theme="dark"] .btn-primary {
  /* keep brand gradient, ensure legible */
  color: #fff;
}

/* Forms & inputs */
html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea {
  background: var(--surface-secondary);
  border: 1px solid var(--border);
  color: var(--text);
}

html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder {
  color: var(--muted-soft);
}

html[data-theme="dark"] select option {
  background: var(--surface);
  color: var(--text);
}

/* Tables */
html[data-theme="dark"] .table-wrap {
  color: var(--text);
}
html[data-theme="dark"] th,
html[data-theme="dark"] td {
  border-bottom-color: var(--border);
  color: var(--text);
}
html[data-theme="dark"] th { color: var(--muted); }

/* Sidebar (dashboard) */
html[data-theme="dark"] .sidebar {
  background: var(--surface);
  border-color: var(--border);
}
html[data-theme="dark"] .sidebar a {
  color: var(--muted);
}
html[data-theme="dark"] .sidebar a.active,
html[data-theme="dark"] .sidebar a:hover {
  color: var(--text);
  background: var(--surface-secondary);
}

/* Accordion / page banner / soft areas */
html[data-theme="dark"] .eyebrow {
  background: rgba(59, 130, 246, 0.16);
  color: #cfe0ff;
}

html[data-theme="dark"] .page-banner {
  background: linear-gradient(135deg, rgba(59,130,246,0.12), rgba(16,185,129,0.08));
  border-color: var(--border);
  color: var(--text);
  box-shadow: 0 10px 30px rgba(2, 6, 23, 0.35);
}

html[data-theme="dark"] .panel[style*="background:#f7f9fd"],
html[data-theme="dark"] .page-banner p,
html[data-theme="dark"] .details-card p,
html[data-theme="dark"] .panel p {
  color: var(--muted);
}

html[data-theme="dark"] a:hover { color: #93c5fd; }

html[data-theme="dark"] .hero-card,
html[data-theme="dark"] .auth-visual {
  background: linear-gradient(180deg, #0f1b33 0%, #0c1424 100%);
}

html[data-theme="dark"] .feature-item,
html[data-theme="dark"] .feature-list {
  color: var(--text);
}

html[data-theme="dark"] .brand-mark {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12),
              0 8px 20px rgba(2, 6, 23, 0.5);
}

html[data-theme="dark"] .category-card,
html[data-theme="dark"] .course-card {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
  box-shadow: var(--card-shadow);
}

/* Smooth theme transition (fires only on [data-theme] change) */
html.theme-anim,
html.theme-anim body,
html.theme-anim .site-header,
html.theme-anim .site-footer,
html.theme-anim .job-card,
html.theme-anim .panel,
html.theme-anim .form-card,
html.theme-anim .kpi-card,
html.theme-anim .mini-item {
  transition:
    background 320ms ease,
    color 320ms ease,
    border-color 320ms ease,
    box-shadow 320ms ease;
}

/* ---------- Motion & micro-interactions ---------- */

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.5s ease,
    transform 0.5s ease,
    box-shadow 0.3s ease;
  will-change: opacity, transform;
}

.reveal-visible {
  opacity: 1;
  transform: none;
}

.job-card,
.kpi-card,
.panel {
  transition:
    transform 220ms ease,
    box-shadow 220ms ease,
    border-color 220ms ease,
    background-color 320ms ease,
    color 320ms ease;
}

.job-card:hover,
.kpi-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 24px 54px rgba(15, 23, 42, 0.12);
  border-color: rgba(59, 130, 246, 0.35);
}

.btn:hover { transform: translateY(-2px); }

.btn:active,
.chip:active {
  transform: translateY(0) scale(0.97);
}

.chip { transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease; }

/* Focus visibility for keyboard users */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 6px;
}

.btn:focus-visible,
.chip:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
}

/* Category / course cards share the existing card language */
.category-card,
.course-card {
  display: block;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  transition:
    transform 220ms ease,
    box-shadow 220ms ease,
    border-color 220ms ease,
    background-color 320ms ease;
}

.category-card:hover,
.course-card:hover {
  transform: translateY(-3px);
  border-color: rgba(59, 130, 246, 0.35);
}

.category-card h3,
.course-card h3 { margin: 8px 0 4px; }
.category-card p,
.course-card p { margin: 0; color: var(--muted); font-size: 0.9rem; }
.category-card a { display: block; }

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .job-card:hover,
  .kpi-card:hover,
  .category-card:hover,
  .course-card:hover,
  .btn:hover { transform: none; }
  .btn:active { transform: none; }
  * { scroll-behavior: auto !important; }
}

/* ---------- Back link ---------- */

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
  transition: color 160ms ease, transform 160ms ease;
}

.back-link:hover {
  color: var(--primary-dark);
  transform: translateX(-2px);
}

/* ---------- Consent checkboxes ---------- */

.consent-box {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 16px;
  background: var(--bg-soft);
  display: grid;
  gap: 10px;
}

.consent-box .inline-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.92rem;
  line-height: 1.5;
}

.consent-box a { color: var(--primary-dark); font-weight: 700; }
html[data-theme="dark"] .consent-box a { color: #7fb0ff; }

/* ---------- Status badges (account lifecycle) ---------- */

.status.approved,
.status.active { background: rgba(16, 185, 129, 0.12); color: #0b8b61; }
.status.pending_review,
.status.pending { background: rgba(245, 158, 11, 0.14); color: #b7791f; }
.status.suspended { background: rgba(245, 158, 11, 0.18); color: #92610f; }
.status.banned,
.status.rejected { background: rgba(239, 68, 68, 0.12); color: #b91c1c; }
.status.deactivated { background: rgba(100, 116, 139, 0.15); color: #475569; }

/* ---------- Theme toggle (icon-only) ---------- */

.theme-toggle {
  min-width: 46px;
  width: 46px;
  height: 46px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0;
}
.theme-toggle svg {
  width: 20px;
  height: 20px;
  display: block;
}

/* ---------- Range inputs (My Skills progress) ---------- */

input[type="range"][data-skill-row] {
  width: 100%;
  accent-color: var(--primary);
  margin-top: 10px;
}
