/* ============================================================
   myskillsKenya — VISUAL ENHANCEMENT LAYER (visual.css)
   ------------------------------------------------------------
   Additive design layer on top of styles.css.

   Visual identity:  SKILLS -> GROWTH -> CONNECTION -> OPPORTUNITY

   Every graphic in this file is built around one motif:
   THIN CONDUITS + STRUCTURED NODES + TRAVELLING PULSES.
   Nothing here touches functional layout; all decorations are
   pointer-events:none, aria-hidden and reduced-motion aware.

   Colour tokens are CSS variables defined once for the light
   theme and re-defined under html[data-theme="dark"], so every
   SVG / pattern / glow follows the existing dark/light system.
   ============================================================ */

/* ============================================================
   1. DESIGN TOKENS  (light + dark)
   ============================================================ */

:root {
  /* conduit lines */
  --msk-line: rgba(59, 130, 246, 0.45);
  --msk-line-green: rgba(16, 185, 129, 0.40);

  /* nodes */
  --msk-node: #3b82f6;
  --msk-node-green: #10b981;
  --msk-node-soft: rgba(59, 130, 246, 0.28);
  --msk-node-ink: rgba(15, 23, 42, 0.22);
  --msk-node-fill: rgba(255, 255, 255, 0.72);
  --msk-node-text: #eaf0ff;

  /* background fields (dot grids / hairline conduits) */
  --msk-field-dot: rgba(59, 130, 246, 0.14);
  --msk-field-line: rgba(15, 23, 42, 0.045);

  /* skeleton shimmer */
  --msk-skeleton-a: rgba(15, 23, 42, 0.055);
  --msk-skeleton-b: rgba(59, 130, 246, 0.10);

  /* empty-state line art */
  --msk-ink: rgba(91, 100, 118, 0.80);
  --msk-ink-strong: rgba(15, 23, 42, 0.65);

  /* surface accents */
  --msk-hairline: rgba(15, 23, 42, 0.12);
  --msk-soft-bg: rgba(255, 255, 255, 0.5);

  /* hero-card pathway (card surface is dark in BOTH themes,
     so these are tuned once — same pattern as .badge #7ef0c8) */
  --msk-pw-chip-fill: rgba(255, 255, 255, 0.05);
  --msk-pw-chip-ink: rgba(148, 163, 184, 0.55);
}

html[data-theme="dark"] {
  --msk-line: rgba(98, 165, 255, 0.55);
  --msk-line-green: rgba(52, 211, 153, 0.42);
  --msk-node-soft: rgba(98, 165, 255, 0.30);
  --msk-node-ink: rgba(148, 163, 184, 0.30);
  --msk-node-fill: rgba(23, 32, 51, 0.88);
  --msk-field-dot: rgba(98, 165, 255, 0.14);
  --msk-field-line: rgba(148, 163, 184, 0.05);
  --msk-skeleton-a: rgba(148, 163, 184, 0.08);
  --msk-skeleton-b: rgba(98, 165, 255, 0.12);
  --msk-ink: rgba(148, 163, 184, 0.75);
  --msk-ink-strong: rgba(207, 224, 255, 0.55);
  --msk-hairline: rgba(148, 163, 184, 0.18);
  --msk-soft-bg: transparent;
}

/* ============================================================
   KEYFRAMES (all new motion lives here)
   ============================================================ */

@keyframes msk-ink-path {
  /* "lines gently drawing themselves" */
  from { stroke-dashoffset: var(--msk-dash, 200); }
  to   { stroke-dashoffset: 0; }
}

@keyframes msk-flow-path {
  /* slow travelling dashes along a conduit */
  to { stroke-dashoffset: -48; }
}

@keyframes msk-breathe {
  0%, 100% { opacity: 0.30; }
  50%      { opacity: 0.90; }
}

@keyframes msk-breathe-soft {
  /* gentle activation for node chips (never fully disappears) */
  0%, 100% { opacity: 0.62; }
  50%      { opacity: 1; }
}

@keyframes msk-pop-in {
  from { opacity: 0; transform: translateY(7px) scale(0.97); }
  to   { opacity: 1; transform: none; }
}

@keyframes msk-fade-up {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

@keyframes msk-bar-rise {
  from { transform: scaleY(0.12); }
  to   { transform: scaleY(1); }
}

@keyframes msk-shimmer {
  from { transform: translateX(-60%); }
  to   { transform: translateX(60%); }
}

@keyframes msk-spin {
  to { transform: rotate(360deg); }
}


@keyframes msk-rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

/* ============================================================
   2. CONNECTED-PATH FIELD  (section background motif)
   A faint node-grid with diagonal conduits. Purely decorative.
   ============================================================ */

.msk-path-field {
  position: relative;
}

.msk-path-field::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  border-radius: inherit;
  background-image:
    radial-gradient(circle, var(--msk-field-dot) 1.15px, transparent 1.7px),
    radial-gradient(circle, var(--msk-field-line) 0.6px, transparent 1px);
  background-size: 46px 46px, 23px 23px;
  opacity: 0.9;
}

/* ============================================================
   3. PATHWAY DIVIDER  (between homepage sections)
   hairline conduit + node dots + one soft travelling pulse.
   ============================================================ */

.msk-path-divider {
  position: relative;
  height: 58px;
  display: grid;
  place-items: center;
  overflow: hidden;
  pointer-events: none;
}

.msk-path-divider::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--msk-line) 12%,
    var(--msk-line) 88%,
    transparent 100%
  );
}

.msk-path-divider::after {
  content: "";
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--msk-node);
  box-shadow:
    0 0 0 7px var(--msk-node-soft),
    0 0 16px var(--msk-node);
  animation: msk-breathe 3.2s ease-in-out infinite;
}

.msk-path-dot {
  position: absolute;
  top: 50%;
  width: 5px;
  height: 5px;
  margin: -2.5px 0 0;
  border-radius: 50%;
  background: var(--msk-line-green);
}

.msk-path-dot:first-of-type {
  left: 26%;
}

.msk-path-dot:nth-of-type(2) {
  right: 26%;
}

.msk-path-pulse {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 8px;
  margin: -4px 0 0;
  border-radius: 50%;
  background: var(--msk-node-green);
  box-shadow: 0 0 10px var(--msk-node-green);
  animation: msk-breathe 3s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  .msk-path-divider::after,
  .msk-path-pulse {
    animation: none;
  }
}

/* ============================================================
   4. HERO LAB — entrance for the hero composition
   ============================================================ */

.msk-hero-shell {
  position: relative;
}

/* soft radial field behind the hero card (pure CSS art).
   z-index:-1 keeps the field BEHIND the hero copy and card. */
.msk-hero-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(
      ellipse at 82% 34%,
      var(--msk-node-soft) 0%,
      rgba(59, 130, 246, 0.05) 42%,
      transparent 68%
    ),
    radial-gradient(
      circle,
      var(--msk-field-dot) 1.1px,
      transparent 1.6px
    );
  background-size: auto, 38px 38px;
  opacity: 0.85;
}

/* ============================================================
   5. HERO CARD — OPPORTUNITY PATHWAY (compact ecosystem svg)
   The hero card interior is painted with a Skills -> Learning /
   Experience -> OPPORTUNITIES -> CAREER GROWTH pathway.
   The card surface is dark in BOTH themes, so these tokens are
   tuned once for that surface (same pattern as .badge #7ef0c8).
   ============================================================ */

.msk-pw-chip {
  fill: var(--msk-pw-chip-fill);
  stroke: var(--msk-pw-chip-ink);
  stroke-width: 1.2;
}

.msk-pw-label {
  fill: var(--msk-node-text);
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.msk-pw-canvas {
  display: block;
  width: 100%;
  height: auto;
  margin: 0 0 16px;
}

.msk-pw-line {
  fill: none;
  stroke: #5a72ff;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-dasharray: var(--msk-dash, 220) 400;
  animation: msk-ink-path 1.15s cubic-bezier(0.4, 0, 0.7, 0.4) both;
}

.msk-pw-line-soft {
  fill: none;
  stroke: rgba(90, 114, 255, 0.30);
  stroke-width: 1;
  stroke-linecap: round;
  stroke-dasharray: var(--msk-dash, 220) 400;
  animation: msk-ink-path 1.3s cubic-bezier(0.4, 0, 0.7, 0.4) both;
}

.msk-pw-flow {
  fill: none;
  stroke: #34d399;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-dasharray: 5 9;
  animation: msk-flow-path 1.6s linear 2.2s infinite;
}

.msk-pw-dot {
  fill: #5a72ff;
}

.msk-pw-dot-g {
  fill: #34d399;
}

.msk-pw-pulse {
  fill: #34d399;
  animation: msk-breathe 3s ease-in-out 1.4s infinite;
}

.msk-pw-chip-pulse .msk-pw-chip {
  animation: msk-breathe-soft 3.4s ease-in-out 0.9s infinite;
}

@media (prefers-reduced-motion: reduce) {
  .msk-pw-line,
  .msk-pw-line-soft,
  .msk-pw-flow,
  .msk-pw-pulse,
  .msk-pw-chip-pulse .msk-pw-chip {
    animation: none;
  }
}

/* ============================================================
   6. HERO CARD — ANIMATED GROWTH CHART + FLOWLINE
   The existing .chart bars gently "rise" into place once.
   The .msk-flowline is a hairline conduit with a travelling dot.
   ============================================================ */

.chart.msk-anim-chart span {
  transform-origin: 50% 100%;
  animation: msk-bar-rise 0.7s cubic-bezier(0.34, 1.2, 0.64, 1) both;
}

.chart.msk-anim-chart span:nth-child(1) { animation-delay: 0.50s; }
.chart.msk-anim-chart span:nth-child(2) { animation-delay: 0.58s; }
.chart.msk-anim-chart span:nth-child(3) { animation-delay: 0.66s; }
.chart.msk-anim-chart span:nth-child(4) { animation-delay: 0.74s; }
.chart.msk-anim-chart span:nth-child(5) { animation-delay: 0.82s; }
.chart.msk-anim-chart span:nth-child(6) { animation-delay: 0.90s; }
.chart.msk-anim-chart span:nth-child(7) { animation-delay: 0.98s; }

@media (prefers-reduced-motion: reduce) {
  .chart.msk-anim-chart span {
    animation: none;
  }
}

.msk-flowline {
  position: relative;
  height: 18px;
  margin: 6px 0 2px;
  pointer-events: none;
}

.msk-flowline::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    #5a72ff 16%,
    #34d399 84%,
    transparent
  );
  opacity: 0.85;
}

.msk-flowline::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 6px;
  height: 6px;
  margin: -3px 0 0;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 8px rgba(52, 211, 153, 0.8);
  animation: msk-breathe-soft 4s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  .msk-flowline::after {
    animation: none;
  }
}

/* ============================================================
   7. AUTH PANEL — CONNECTION NETWORK  (login / register)
   Small node-to-node graphic pinned to the auth-visual panel.
   ============================================================ */

.auth-visual {
  position: relative;
  overflow: hidden;
}

.msk-auth-network {
  position: absolute;
  right: 18px;
  bottom: 14px;
  width: 190px;
  height: 120px;
  pointer-events: none;
  opacity: 0.9;
}

.msk-auth-network .msk-an-line {
  fill: none;
  stroke: rgba(255, 255, 255, 0.28);
  stroke-width: 1.4;
  stroke-linecap: round;
}

.msk-auth-network .msk-an-node {
  fill: #7ef0c8;
}

.msk-auth-network .msk-an-node-2 {
  fill: #e5ebff;
}

.msk-auth-network .msk-an-flow {
  fill: none;
  stroke: #34d399;
  stroke-width: 1.3;
  stroke-linecap: round;
  stroke-dasharray: 4 8;
  animation: msk-flow-path 1.5s linear infinite;
}

.msk-auth-network .msk-an-breathe {
  animation: msk-breathe 3.2s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  .msk-auth-network .msk-an-flow,
  .msk-auth-network .msk-an-breathe {
    animation: none;
  }
}

/* ============================================================
   8. KPI VALUE ENTRANCE  (dashboard stat count-up)
   Small corner node grouping on KPI cards + labelled numbers.
   ============================================================ */

.kpi-card {
  position: relative;
}

.kpi-card::after {
  content: "";
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 22px;
  pointer-events: none;
  background-image:
    radial-gradient(circle, var(--msk-field-dot) 1px, transparent 1.5px),
    radial-gradient(circle, var(--msk-node-soft) 1.4px, transparent 2px);
  background-size: 8px 8px, 18px 18px;
  opacity: 0.8;
}

/* the strong element gets a labelled "value" treatment */
.msk-kpi-value {
  display: inline-block;
  color: inherit;
}

/* ============================================================
   9. SKELETON LOADING STATE
   Safe shimmer blocks that are replaced once real content
   finishes loading (they never mock data).
   ============================================================ */

.msk-skeleton {
  position: relative;
  overflow: hidden;
  background: var(--msk-skeleton-a);
  border-radius: 8px;
}

.msk-skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-60%);
  background: linear-gradient(
    90deg,
    transparent,
    var(--msk-skeleton-b),
    transparent
  );
  animation: msk-shimmer 1.25s ease-in-out infinite;
}

/* a full card-shaped skeleton (used inside job grids) */
.msk-skeleton-card {
  border: 1px solid var(--msk-hairline);
  border-radius: var(--radius, 18px);
  padding: 18px;
  background: var(--msk-soft-bg);
}

.msk-skeleton-card .msk-sk-row {
  display: block;
  margin: 10px 0;
  height: 14px;
  border-radius: 7px;
  background: var(--msk-skeleton-a);
  overflow: hidden;
}

.msk-skeleton-card .msk-sk-row::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-60%);
  background: linear-gradient(
    90deg,
    transparent,
    var(--msk-skeleton-b),
    transparent
  );
  animation: msk-shimmer 1.25s ease-in-out infinite;
}

.msk-skeleton-card .msk-sk-block {
  display: block;
  margin: 0 0 10px;
  height: 34px;
  border-radius: 10px;
  background: var(--msk-skeleton-a);
  overflow: hidden;
}

.msk-skeleton-card .msk-sk-block::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-60%);
  background: linear-gradient(
    90deg,
    transparent,
    var(--msk-skeleton-b),
    transparent
  );
  animation: msk-shimmer 1.25s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  .msk-skeleton::after,
  .msk-skeleton-card .msk-sk-row::after,
  .msk-skeleton-card .msk-sk-block::after {
    animation: none;
  }
}

/* ============================================================
   10. BRANDED SPINNER  (replace text-only loading)
   ============================================================ */

.msk-spinner {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 600;
}

.msk-spinner .msk-spinner-ring {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 2.5px solid var(--msk-line);
  border-top-color: var(--msk-node);
  animation: msk-spin 0.8s linear infinite;
}

@media (prefers-reduced-motion: reduce) {
  .msk-spinner .msk-spinner-ring {
    animation: none;
  }
}

/* ============================================================
   11. EMPTY STATES  (lightweight custom SVG illustrations)
   "An opportunity waiting to be discovered."
   ============================================================ */

.msk-empty-state {
  display: grid;
  place-items: center;
  gap: 12px;
  text-align: center;
  padding: 26px 16px;
  color: var(--text);
}

.msk-empty-state .msk-empty-art {
  display: inline-flex;
  align-items: center;
  opacity: 0.95;
}

.msk-empty-state .msk-empty-title {
  display: block;
  color: var(--text);
  font-size: 1.05rem;
  font-weight: 800;
}

.msk-empty-state .msk-empty-text {
  margin: 0;
  max-width: 46ch;
  color: var(--muted);
  line-height: 1.55;
}

.msk-empty-state .msk-empty-text a {
  color: var(--primary-dark);
  font-weight: 700;
  text-decoration: underline;
}

html[data-theme="dark"] .msk-empty-state .msk-empty-text a {
  color: #7fb0ff;
}

.msk-empty-state .msk-empty-cta {
  margin: 0;
}

/* art stroke/fill tokens for every empty-state svg */
.msk-es-line {
  fill: none;
  stroke: var(--msk-ink);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.msk-es-line-soft {
  fill: none;
  stroke: var(--msk-ink-strong);
  stroke-width: 1.2;
  stroke-linecap: round;
}

.msk-es-node {
  fill: var(--msk-node);
}

.msk-es-node-g {
  fill: var(--msk-node-green);
}

.msk-es-fill {
  fill: var(--msk-ink-strong);
}

.msk-es-dot-row {
  fill: var(--msk-field-dot);
}

@keyframes msk-es-draw {
  from { stroke-dashoffset: var(--msk-dash, 120); }
  to   { stroke-dashoffset: 0; }
}

.msk-es-draw {
  stroke-dasharray: var(--msk-dash, 120) 400;
  animation: msk-es-draw 0.9s ease-out both;
}

@media (prefers-reduced-motion: reduce) {
  .msk-es-draw {
    animation: none;
  }
}

/* ============================================================
   12. GENERIC MICRO-INTERACTIONS  (subtle, additive)
   ============================================================ */

/* Arrow-nudging buttons (\.btn-arrow + inline chevron svg) */
.btn-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.btn-arrow svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  transition: transform 0.24s ease;
}

.btn-arrow:hover svg {
  transform: translateX(3px);
}

@media (prefers-reduced-motion: reduce) {
  .btn-arrow svg {
    transition: none;
  }
}

/* Gentle press state for buttons (additive) */
.btn:active {
  transform: translateY(1px) scale(0.985);
}

/* Smooth active indicator for the primary nav */
.main-nav a {
  position: relative;
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 14%;
  right: 14%;
  bottom: -4px;
  height: 2px;
  border-radius: 2px;
  background: var(--primary);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.22s ease;
}

.main-nav a:hover::after,
.main-nav a.active::after {
  transform: scaleX(1);
}

@media (prefers-reduced-motion: reduce) {
  .main-nav a::after {
    transition: none;
  }
}

/* Input focus polish (additive; complements existing focus-visible) */
.form-grid input:focus,
.form-grid select:focus,
.form-grid textarea:focus,
.filter-row input:focus,
.filter-row select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--msk-node-soft);
}

/* ============================================================
   13. SCROLL ENTRANCE FOR GRIDS  (cards stagger in once)
   Uses the existing reveal system; adds a light rise for
   dynamically painted cards (job grids, listing stacks).
   ============================================================ */

.msk-rise-in {
  opacity: 0;
}

.msk-rise-in.msk-rise-visible {
  animation: msk-rise 0.55s ease-out both;
}

@media (prefers-reduced-motion: reduce) {
  .msk-rise-in {
    opacity: 1 !important;
  }
}

/* ============================================================
   15. ILLUSTRATION SYSTEM — Recognizable visual storytelling
   ------------------------------------------------------------
   Consistent modern editorial/product illustration style for
   myskillsKenya. Every illustration:
   - Uses the existing --msk-* and theme tokens
   - Is built as inline SVG for performance
   - Works in both light and dark mode
   - Supports subtle entrance animations
   - Respects prefers-reduced-motion
   - Is responsive (simplifies on mobile)
   ============================================================ */

/* --- Illustration container --- */
.msk-illustration {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  flex-shrink: 0;
}

/* Subtle entrance for illustrations */
.msk-illustration--entrance {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.msk-illustration--entrance.msk-illustration--visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .msk-illustration--entrance {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* --- Illustration component sizing --- */
.msk-illus-icon { width: 48px; height: 48px; }
.msk-illus-sm { width: 80px; height: 80px; }
.msk-illus-md { width: 120px; height: 120px; }
.msk-illus-lg { width: 200px; height: 200px; }
.msk-illus-xl { width: 280px; height: 280px; }

@media (max-width: 740px) {
  .msk-illus-xl { width: 220px; height: 220px; }
  .msk-illus-lg { width: 160px; height: 160px; }
  .msk-illus-md { width: 100px; height: 100px; }
}

/* ============================================================
   ILLUSTRATION STYLES — Shared visual language
   ============================================================ */

.msk-illo-base {
  fill: none;
  stroke: var(--msk-ink-strong, rgba(15, 23, 42, 0.65));
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.msk-illo-fill {
  fill: var(--msk-node, rgba(59, 130, 246, 0.34));
  stroke: none;
}

.msk-illo-accent {
  stroke: var(--primary, #3b82f6);
  stroke-width: 2;
  fill: var(--msk-node, rgba(59, 130, 246, 0.42));
}

.msk-illo-detail {
  stroke: var(--msk-ink, rgba(91, 100, 118, 0.80));
  stroke-width: 1.4;
}

html[data-theme="dark"] .msk-illo-base {
  stroke: var(--msk-ink, rgba(148, 163, 184, 0.75));
}

html[data-theme="dark"] .msk-illo-fill {
  fill: var(--msk-node, rgba(98, 165, 255, 0.24));
}

html[data-theme="dark"] .msk-illo-accent {
  fill: var(--msk-node, rgba(98, 165, 255, 0.32));
}

html[data-theme="dark"] .msk-illo-detail {
  stroke: rgba(148, 163, 184, 0.85);
}

/* Add depth shadow to section illustrations */
.msk-section-illustration {
  filter: drop-shadow(0 6px 18px rgba(15, 23, 42, 0.12));
  transition: filter 0.3s ease;
}

html[data-theme="dark"] .msk-section-illustration {
  filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.32));
}

.msk-section-illustration:hover {
  filter: drop-shadow(0 6px 18px rgba(15, 23, 42, 0.14));
}

html[data-theme="dark"] .msk-section-illustration:hover {
  filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.35));
}

/* ============================================================
   ANIMATIONS for illustrations
   ============================================================ */

@keyframes msk-illus-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.msk-illus-float {
  animation: msk-illus-float 4s ease-in-out infinite;
}

@keyframes msk-illus-appear {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.msk-illus-appear {
  animation: msk-illus-appear 0.5s ease-out forwards;
}

@keyframes msk-illus-draw {
  from { stroke-dashoffset: var(--msk-illus-dash, 100); }
  to { stroke-dashoffset: 0; }
}

.msk-illus-draw {
  stroke-dasharray: var(--msk-illus-dash, 100) 200;
  animation: msk-illus-draw 0.8s ease-out forwards;
}

.msk-illus-delay-1 { animation-delay: 0.1s; }
.msk-illus-delay-2 { animation-delay: 0.2s; }
.msk-illus-delay-3 { animation-delay: 0.3s; }
.msk-illus-delay-4 { animation-delay: 0.4s; }
.msk-illus-delay-5 { animation-delay: 0.5s; }

/* Glow effect for accent nodes — soft pulse, wider radius */
.msk-illus-glow {
  animation: msk-illus-glow 2.4s ease-in-out infinite;
  transform-origin: center;
  filter: drop-shadow(0 0 3px var(--primary, #3b82f6));
}

@keyframes msk-illus-glow {
  0%, 100% {
    opacity: 0.65;
    r: 3;
  }
  50% {
    opacity: 1;
    r: 5.5;
  }
}

/* Empty state illustration wrapper */
.msk-empty-illustration {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px 0;
}

.msk-empty-illustration svg {
  width: 120px;
  height: auto;
}

@media (prefers-reduced-motion: reduce) {
  .msk-illus-float,
  .msk-illus-appear,
  .msk-illus-draw,
  .msk-illus-glow {
    animation: none !important;
  }
}

/* ============================================================
   HERO ILLUSTRATION COMPOSITION
   ============================================================ */

.msk-hero-illustration {
  position: relative;
  width: 100%;
  max-width: 480px;
  height: auto;
  margin: 0 auto;
}

.msk-hero-illustration svg {
  width: 100%;
  height: auto;
  display: block;
}

.msk-hero-figure {
  fill: var(--msk-node, rgba(59, 130, 246, 0.34));
  stroke: var(--msk-ink-strong, rgba(15, 23, 42, 0.65));
  stroke-width: 2;
}

html[data-theme="dark"] .msk-hero-figure {
  stroke: var(--msk-ink, rgba(148, 163, 184, 0.75));
  fill: var(--msk-node, rgba(98, 165, 255, 0.24));
}

.msk-hero-object {
  fill: var(--msk-node-soft, rgba(59, 130, 246, 0.28));
  stroke: var(--msk-ink, rgba(91, 100, 118, 0.80));
  stroke-width: 1.5;
}

html[data-theme="dark"] .msk-hero-object {
  stroke: var(--msk-ink, rgba(148, 163, 184, 0.7));
  fill: var(--msk-node-soft, rgba(98, 165, 255, 0.18));
}

.msk-hero-connection {
  fill: none;
  stroke: var(--msk-line, rgba(59, 130, 246, 0.45));
  stroke-width: 1.6;
  stroke-dasharray: 5 4;
  opacity: 0.85;
}

html[data-theme="dark"] .msk-hero-connection {
  stroke: var(--msk-line, rgba(98, 165, 255, 0.50));
}

@media (max-width: 740px) {
  .msk-hero-illustration { max-width: 320px; }
  .msk-hero-object { opacity: 0.75; }
  .msk-hero-connection { opacity: 0.75; }
  .msk-illus-float { animation: none; }
}

@media (max-width: 480px) {
  .msk-hero-illustration { max-width: 240px; }
  .msk-hero-object { display: none; }
}

/* ---------- LANDING / HERO (expressive, atmospheric) ----------
   One composed scene: a key light behind the copy, a cooler light
   behind the hero visual and a horizon fade at the hero base
(::before), plus a masked structural field (::after) that keeps the
   top of the page engineered rather than empty.  Both layers are
   page-scoped, so nothing is pinned to the viewport. */
.msk-hero-shell { position:relative; isolation:isolate; overflow:clip; }
.msk-hero-shell::before { content:""; position:absolute; inset:0; z-index:-1; pointer-events:none;
  background:
    radial-gradient(ellipse 36% 42% at 15% 20%, var(--msk-hero-light-a) 0%, transparent 68%),
    radial-gradient(ellipse 40% 48% at 84% 28%, var(--msk-hero-light-b) 0%, transparent 68%),
    radial-gradient(ellipse 32% 26% at 96% 74%, var(--msk-hero-light-c) 0%, transparent 66%),
    linear-gradient(180deg, transparent 76%, var(--msk-hero-horizon) 100%); }
.msk-hero-shell::after { content:""; position:absolute; inset:0; z-index:-1; pointer-events:none;
  background-image:
    linear-gradient(var(--msk-field-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--msk-field-line) 1px, transparent 1px),
    radial-gradient(circle, var(--msk-field-dot) 1.1px, transparent 1.6px);
  background-size:64px 64px, 64px 64px, 26px 26px;
  background-position:center top;
  -webkit-mask-image: radial-gradient(ellipse 82% 60% at 50% 24%, black 20%, transparent 82%);
  mask-image: radial-gradient(ellipse 82% 60% at 50% 24%, black 20%, transparent 82%); opacity:.9; }
.hero { padding:88px 0 56px; }
.hero-copy .eyebrow, .msk-hero-shell .eyebrow { display:inline-flex; align-items:center; gap:8px; border:1px solid var(--card-border); background:rgba(255,255,255,.72); backdrop-filter:blur(10px); box-shadow:var(--shadow-sm); letter-spacing:.14em; }
html[data-theme="dark"] .hero-copy .eyebrow, html[data-theme="dark"] .msk-hero-shell .eyebrow { background:rgba(23,32,51,.72); }
.hero-copy h1, .msk-hero-shell .hero-copy h1 { font-size:clamp(2.7rem,5.4vw,4.4rem); line-height:.98; letter-spacing:-.045em; font-weight:800; text-wrap:balance; margin:18px 0; color:var(--text); }
.hero-copy h1 .hero-hl { color:#1d4ed8; }
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .hero-copy h1 .hero-hl { background:var(--gradient-ink); -webkit-background-clip:text; background-clip:text; color:transparent; }
}
.hero-copy h1 .hero-hl:last-of-type { position:relative; white-space:nowrap; }
.hero-copy h1 .hero-hl:last-of-type::after { content:""; position:absolute; left:0; right:0; bottom:.02em; height:.12em; border-radius:999px; background:linear-gradient(90deg,rgba(59,130,246,.65),rgba(16,185,129,.55)); opacity:.55; }
html[data-theme="dark"] .hero-copy h1 .hero-hl:last-of-type::after { opacity:.65; }
.hero-copy p { font-size:1.06rem; line-height:1.65; max-width:34rem; }
.hero-actions { display:flex; flex-wrap:wrap; gap:12px; margin-top:26px; }
.hero-stats { border-top:1px solid var(--card-border); padding-top:20px; margin-top:30px; }
.hero-stats strong { font-size:1.45rem; letter-spacing:-.03em; }
.hero-visual .hero-card, .hero-visual .pathway-card { border:1px solid rgba(255,255,255,.65); box-shadow:var(--shadow-xl); backdrop-filter:blur(14px); }
html[data-theme="dark"] .hero-visual .hero-card, html[data-theme="dark"] .hero-visual .pathway-card { border-color:var(--card-border); }
.trust-strip { border:1px solid var(--card-border); background:rgba(255,255,255,.66); backdrop-filter:blur(10px); box-shadow:var(--shadow-sm); border-radius:var(--radius-lg); }
html[data-theme="dark"] .trust-strip { background:rgba(23,32,51,.55); }
.section-header h2 { letter-spacing:-.03em; }
.job-card, .kpi-card, .panel, .page-banner, .category-card, .course-card { border-color:var(--card-border); }
.job-card, .kpi-card, .category-card, .course-card { box-shadow:var(--shadow-md); }
.job-card:hover, .category-card:hover, .course-card:hover { box-shadow:var(--shadow-lg); border-color:var(--card-border-strong); }
.kpi-card { position:relative; overflow:clip; }
.kpi-card::before { content:""; position:absolute; inset:0 0 auto 0; height:3px; background:var(--gradient-brand); opacity:0; transition:opacity 220ms ease; }
.kpi-card:hover { transform:translateY(-3px); box-shadow:var(--shadow-lg); border-color:var(--card-border-strong); }
.kpi-card:hover::before { opacity:1; }
.msk-kpi-value { letter-spacing:-.03em; }

/* ---------- APP WORKSPACE (calm SaaS: dashboards/admin/app) ---------- */
body.bg-dashboard .page-shell, body.bg-admin .page-shell, body.bg-generic .page-shell {
  background: radial-gradient(ellipse 60% 22% at 50% 0%, var(--workspace-ink) 0%, transparent 70%); }
.dashboard-content .page-banner { background:var(--gradient-soft); border:1px solid var(--card-border); box-shadow:var(--shadow-md); border-radius:var(--radius-lg); backdrop-filter:blur(10px); }
html[data-theme="dark"] .dashboard-content .page-banner { background:linear-gradient(180deg,rgba(23,32,51,.9),rgba(23,32,51,.55)); }
.sidebar { border:1px solid var(--card-border); box-shadow:var(--shadow-sm); border-radius:var(--radius-lg); background:rgba(255,255,255,.72); backdrop-filter:blur(10px); }
html[data-theme="dark"] .sidebar { background:rgba(23,32,51,.6); }
.sidebar nav a { position:relative; border-radius:10px; transition:background 160ms ease,color 160ms ease,transform 160ms ease; }
.sidebar nav a:hover { background:var(--surface-strong); color:var(--text); }
.sidebar nav a.active { background:#fff; color:var(--primary-dark); box-shadow:var(--shadow-sm); border:1px solid var(--card-border); font-weight:800; }
.sidebar nav a.active::before { content:""; position:absolute; left:-13px; top:10px; bottom:10px; width:3px; border-radius:3px; background:var(--gradient-brand); }
html[data-theme="dark"] .sidebar nav a.active { background:var(--surface-secondary); color:var(--text); }
.admin-profile, .admin-mode-switch, .report-card { box-shadow:var(--shadow-md); border-color:var(--card-border); }
.admin-section-link.active { box-shadow:var(--shadow-sm); }

/* ---------- AUTH / FORMS / TABLES / FOOTER ---------- */
.auth-shell { border:1px solid var(--card-border); box-shadow:var(--shadow-xl); border-radius:var(--radius-xl); overflow:hidden; }
.auth-visual { position:relative; isolation:isolate; overflow:hidden; }
.auth-visual::before { content:""; position:absolute; inset:auto -30% -25% -30%; height:70%; z-index:-1; pointer-events:none;
  background:radial-gradient(ellipse 55% 60% at 50% 100%, rgba(59,130,246,.28) 0%, transparent 65%); }
.form-card { box-shadow:var(--shadow-lg); border-color:var(--card-border); border-radius:var(--radius-lg); }
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]), select, textarea { border-radius:12px; transition:border-color 160ms ease,box-shadow 160ms ease; }
input:focus, select:focus, textarea:focus { border-color:rgba(59,130,246,.55); box-shadow:var(--ring); outline:none; }
table tr { transition:background 140ms ease; }
table tbody tr:hover { background:rgba(59,130,246,.05); }
html[data-theme="dark"] table tbody tr:hover { background:rgba(147,197,253,.07); }
.site-footer { border-top:1px solid var(--card-border); background:var(--background); color:var(--text); }
html[data-theme="dark"] .site-footer { background:var(--background); color:var(--text); }

/* ---------- MOTION / RESPONSIVE / ACCESSIBILITY ---------- */
.btn-arrow svg { transition:transform 200ms ease; }
.btn-arrow:hover svg { transform:translateX(3px); }
@media (max-width: 980px) { .hero { padding:64px 0 44px; } .msk-hero-shell::before { height:480px; } }
@media (max-width: 740px) {
  .hero-copy h1, .msk-hero-shell .hero-copy h1 { font-size:clamp(2.2rem,10vw,3rem); }
  .msk-hero-shell::after { opacity:.55; }
  .hero-actions .btn { width:100%; }
}
@media (prefers-reduced-motion: reduce) {
  .msk-hero-shell::before, .msk-hero-shell::after, .auth-visual::before { display:none; }
  .main-nav a::after, .kpi-card::before, .btn-arrow svg { transition:none; }
  .btn-primary:hover, .btn-secondary:hover, .btn-light:hover, .job-card:hover, .kpi-card:hover, .category-card:hover, .course-card:hover { transform:none; }
}
/* ============================================================
   PREMIUM POLISH LAYER (additive, CSS-only)
   Clean, premium, modern, professional, slightly futuristic.
   Two environments: public/marketing vs calm SaaS workspace.
   Strictly additive: no IDs/classes/data attrs touched.
   ============================================================ */
: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);
  --shadow-sm: 0 1px 2px rgba(15,23,42,.05), 0 2px 8px rgba(15,23,42,.05);
  --shadow-md: 0 6px 18px rgba(15,23,42,.08), 0 2px 6px rgba(15,23,42,.05);
  --shadow-lg: 0 18px 50px rgba(15,23,42,.10), 0 4px 14px rgba(15,23,42,.06);
  --shadow-xl: 0 32px 80px rgba(15,23,42,.14), 0 8px 24px rgba(15,23,42,.08);
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px;
  --space-6: 24px; --space-8: 32px; --space-12: 48px;
  --font-display: "Segoe UI","Helvetica Neue",Arial,system-ui,sans-serif;
  --gradient-brand: linear-gradient(120deg,#2563eb 0%,#4f46e5 48%,#7c3aed 100%);
  --gradient-ink: linear-gradient(100deg,#1d4ed8 0%,#6d28d9 55%,#0e7490 100%);
  --gradient-soft: linear-gradient(180deg,rgba(255,255,255,.9),rgba(255,255,255,.55));
  --ring: 0 0 0 3px rgba(59,130,246,.18);
  --card-border: rgba(15,23,42,.08);
  --card-border-strong: rgba(59,130,246,.28);
  --workspace-ink: rgba(15,23,42,.04);
}
html[data-theme="dark"] {
  --accent:#3b82f6;
  --accent-glow:rgba(59,130,246,.28);
  --shadow-sm: 0 1px 2px rgba(0,0,0,.35), 0 2px 8px rgba(0,0,0,.30);
  --shadow-md: 0 6px 18px rgba(0,0,0,.42), 0 2px 6px rgba(0,0,0,.35);
  --shadow-lg: 0 18px 50px rgba(0,0,0,.50), 0 4px 14px rgba(0,0,0,.40);
  --shadow-xl: 0 32px 80px rgba(0,0,0,.55), 0 8px 24px rgba(0,0,0,.45);
  --gradient-ink: linear-gradient(100deg,#93c5fd 0%,#c4b5fd 55%,#67e8f9 100%);
  --ring: 0 0 0 3px rgba(147,197,253,.22);
  --card-border: rgba(148,163,184,.16);
  --card-border-strong: rgba(147,197,253,.35);
  --workspace-ink: rgba(148,163,184,.06);
}
body { font-family: var(--font-display); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
::selection { background: rgba(59,130,246,.22); }
html[data-theme="dark"] ::selection { background: rgba(147,197,253,.30); }
.site-header { box-shadow: 0 1px 0 var(--card-border), 0 8px 30px rgba(15,23,42,.05); }
.main-nav a { position: relative; font-weight: 600; padding: 8px 2px; transition: color 180ms ease; }
.main-nav a::after { content:""; position:absolute; left:0; right:0; bottom:2px; height:2px; border-radius:2px; background:var(--gradient-brand); opacity:0; transform:scaleX(.4); transform-origin:left center; transition:opacity 200ms ease,transform 220ms ease; }
.main-nav a:hover { color: var(--text); }
.main-nav a:hover::after { opacity:.55; transform:scaleX(1); }
.main-nav a.active { color: var(--text); font-weight:800; }
.main-nav a.active::after { opacity:1; transform:scaleX(1); }
.btn { letter-spacing:.01em; box-shadow:var(--shadow-sm); }
.btn-primary { background:var(--gradient-brand); border-color:rgba(255,255,255,.18); box-shadow:0 14px 28px rgba(59,130,246,.28), inset 0 1px 0 rgba(255,255,255,.25); }
.btn-primary:hover { transform:translateY(-2px); box-shadow:0 20px 40px rgba(59,130,246,.32), inset 0 1px 0 rgba(255,255,255,.25); }
.btn-primary:active { transform:translateY(0); }
.btn-secondary,.btn-light { box-shadow:var(--shadow-sm); backdrop-filter:blur(8px); }
.btn-secondary:hover,.btn-light:hover { transform:translateY(-2px); box-shadow:var(--shadow-md); border-color:var(--card-border-strong); }
html[data-theme="dark"] .site-header{background:var(--surface);border-bottom-color:var(--border);}
html[data-theme="dark"] .main-nav a{color:var(--text-secondary);}
html[data-theme="dark"] .main-nav a.active,html[data-theme="dark"] .main-nav a:hover{color:var(--text);}
html[data-theme="dark"] .btn-secondary,html[data-theme="dark"] .btn-light{background:var(--surface-secondary);border-color:var(--border);color:var(--text);}
html[data-theme="dark"] .menu-toggle{background:var(--surface-secondary);border-color:var(--border);color:var(--text);}
html[data-theme="dark"] .theme-toggle{background:var(--surface-secondary);border-color:var(--border);color:var(--text);}
html[data-theme="dark"] h1,html[data-theme="dark"] h2,html[data-theme="dark"] h3,html[data-theme="dark"] h4{color:var(--text);}
html[data-theme="dark"] .job-card,html[data-theme="dark"] .panel,html[data-theme="dark"] .details-card,html[data-theme="dark"] .kpi-card,html[data-theme="dark"] .category-card,html[data-theme="dark"] .course-card,html[data-theme="dark"] .form-card,html[data-theme="dark"] .mini-item{background:var(--surface);border-color:var(--border);color:var(--text);}
html[data-theme="dark"] .hero-stats li{background:var(--surface);border-color:var(--border);color:var(--text-secondary);}
html[data-theme="dark"] input,html[data-theme="dark"] select,html[data-theme="dark"] textarea{background:var(--surface);border-color:var(--border);color:var(--text);}
html[data-theme="dark"] input::placeholder,html[data-theme="dark"] select::placeholder,html[data-theme="dark"] textarea::placeholder{color:var(--muted);}
html[data-theme="dark"] input::placeholder,html[data-theme="dark"] textarea::placeholder{color:var(--text-muted);opacity:1;}
html[data-theme="dark"] select option{background:var(--surface-secondary);color:var(--text);}
html[data-theme="dark"] .meta-pill,html[data-theme="dark"] .chip{background:var(--surface-secondary);border-color:var(--border);color:var(--text);}
html[data-theme="dark"] .meta-pill.active,html[data-theme="dark"] .chip.active{background:#1d4ed8;color:#fff;}
html[data-theme="dark"] table{color:var(--text);}html[data-theme="dark"] td{border-top-color:var(--border);}
html[data-theme="dark"] .form-grid a,html[data-theme="dark"] p a{color:#8fb8ff;}
.btn-primary{box-shadow:0 14px 28px var(--accent-glow),inset 0 1px 0 rgba(255,255,255,.22);}
.main-nav a.active{text-shadow:0 0 18px var(--accent-glow);}

/* ============================================================
   PART 7 — FULL-PAGE PASS (additive, CSS-only)
   Required <head> order on every page:
   styles.css -> admin-dashboard.css -> background.css -> visual.css
   (this sheet must stay last so nothing below can be flattened)
   No IDs, no classes, no data attributes added or renamed.
   ============================================================ */

/* ---------- CASCADE SAFETY: hero headline stays a gradient ---------- */
/* background.css paints a solid fallback colour on .hero-hl at (0,4,3);
   match that specificity here and win on order, keeping the fallback
   for browsers without background-clip:text. */
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  html[data-theme] .msk-hero-shell .hero-copy h1 .hero-hl,
  html[data-theme] .hero-copy h1 .hero-hl {
    background: var(--gradient-ink);
    -webkit-background-clip: text; background-clip: text;
    color: transparent; -webkit-text-fill-color: transparent;
  }
}
.msk-hero-shell .hero-copy h1 .hero-hl:last-of-type::after { background:var(--gradient-brand); opacity:.45; }

/* ---------- Auth pages: role-aware ambience REMOVED (obsolete) ----------
   The old radial-gradient blobs on .auth-page are gone. The login page uses
   a solid white page background and role-specific visuals are painted by
   professional-white.css (loaded last) via body[data-auth-role="..."]. */

/* ---------- AUTH SPLIT PAGE (login.html + register.html) ---------- */
.auth-page { padding: clamp(28px, 5vw, 72px) 0; }
.auth-shell { box-shadow: var(--shadow-xl); }
.auth-visual { display:flex; flex-direction:column; justify-content:center; }
.auth-visual h2 { font-size: clamp(1.8rem, 2.6vw, 2.35rem); line-height:1.06; letter-spacing:-.045em; text-wrap:balance; }
.auth-visual > p { font-size:1rem; line-height:1.7; max-width:34ch; }
.feature-item { transition: transform 180ms ease, background 180ms ease, border-color 180ms ease; }
.feature-item:hover { transform: translateX(4px); background: var(--surface-secondary); border-color: var(--border); }
html[data-theme="dark"] .feature-item:hover { background: var(--surface-elevated); border-color: var(--border); }
.auth-role-links a { transition: background 160ms ease, transform 160ms ease, box-shadow 160ms ease; background: var(--surface-secondary); border: 1px solid var(--border); color: var(--text); }
html[data-theme="dark"] .auth-role-links a { background: var(--surface-secondary); border: 1px solid var(--border); color: var(--text); }
.auth-role-links a:hover { background: #eaf0ff; transform: translateY(-1px); box-shadow: 0 8px 20px rgba(15,23,42,.08); }
.auth-role-note { letter-spacing:.01em; }
.form-card { padding: clamp(26px, 4vw, 40px); }
.form-card h2 { letter-spacing:-.035em; }
.form-row { gap:14px; }
label > span { letter-spacing:.01em; }
.form-footer { font-size:.9rem; }
.form-footer a, .form-grid p a { font-weight:700; }
.inline-check { cursor:pointer; }
.consent-box { background:var(--surface-secondary); border-color:var(--border); box-shadow:var(--shadow-sm); border-radius:var(--radius-md); }
html[data-theme="dark"] .consent-box { background:var(--surface-secondary); }
#authMessage { border-radius:var(--radius-md); }
@media (max-width: 900px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-visual { padding: 34px 26px; }
}




/* ---------- INNER PAGES: headers, search, panels, tables ---------- */
.page-header h1, .admin-banner h1 { letter-spacing:-.05em; }
.page-header p, .admin-banner p { max-width:58ch; }
.search-bar { background:rgba(255,255,255,.88); border-color:var(--card-border); box-shadow:var(--shadow-md); backdrop-filter:blur(10px); }
html[data-theme="dark"] .search-bar { background:rgba(17,24,39,.78); }
.search-bar:focus-within { border-color:var(--card-border-strong); box-shadow:var(--ring), var(--shadow-md); }
.panel, .details-card, .admin-profile, .admin-coming { border-color:var(--card-border); box-shadow:var(--shadow-md); border-radius:var(--radius-lg); }
.card-header h3, .admin-nav-label { letter-spacing:.14em; }
.table-wrap { scrollbar-width:thin; }
table th { letter-spacing:.06em; }
.back-link { font-weight:700; }
/* pills, chips, statuses */
.chip { box-shadow:var(--shadow-sm); }
.chip.active { background:var(--gradient-brand); border-color:transparent; color:#fff; box-shadow:0 12px 26px var(--accent-glow); }
.badge, .status, .job-tag, .meta-pill, .growth-tag { letter-spacing:.02em; }
.meta-pill { background:var(--surface-secondary); }
html[data-theme="dark"] .meta-pill { background:var(--surface-secondary); }
/* progress */
.progress-track { background:var(--surface-secondary); box-shadow:inset 0 1px 2px rgba(15,23,42,.06); }
.progress-fill { background:var(--gradient-brand); box-shadow:0 0 14px var(--accent-glow); }
.mini-item { background:var(--surface-secondary); border-color:var(--border); border-radius:var(--radius-md); transition:transform 180ms ease,border-color 180ms ease,background 180ms ease; }
.mini-item:hover { transform:translateY(-2px); border-color:var(--border-strong, var(--border)); }
.mini-item strong { color:var(--text); }
.mini-item span { color:var(--text-secondary); }
/* identity marks */
.brand-mark { box-shadow:0 10px 22px var(--accent-glow), inset 0 1px 0 rgba(255,255,255,.28); }
.company-mark, .admin-avatar { border:1px solid var(--card-border); box-shadow:var(--shadow-sm); }
/* admin workspace extras */
.admin-mode-btn { transition:background 160ms ease,color 160ms ease,transform 160ms ease; }
.admin-mode-btn:hover { transform:translateY(-1px); }
.admin-coming { background:var(--surface-secondary); }
.admin-empty { border-radius:var(--radius-md); }
/* ---------- SECTION RHYTHM (landing + inner) ---------- */
.section .section-title-group h2 { letter-spacing:-.04em; }
.band-col p { max-width:62ch; }
hr, .msk-path-divider { border-color:var(--card-border); }
/* refined scrollbars (WebKit/Blink + Firefox) */
html { scrollbar-color: rgba(100,116,139,.38) transparent; scrollbar-width: thin; }
::-webkit-scrollbar { width:10px; height:10px; }
::-webkit-scrollbar-track { background:transparent; }
::-webkit-scrollbar-thumb { background:rgba(100,116,139,.34); border-radius:999px; border:2px solid transparent; background-clip:padding-box; }
::-webkit-scrollbar-thumb:hover { background:rgba(100,116,139,.52); background-clip:padding-box; }
html[data-theme="dark"] ::-webkit-scrollbar-thumb { background:rgba(100,116,139,.34); background-clip:padding-box; }
html[data-theme="dark"] ::-webkit-scrollbar-thumb:hover { background:rgba(100,116,139,.52); background-clip:padding-box; }
/* motion safety for everything added in this pass */
@media (prefers-reduced-motion: reduce) {
  .feature-item:hover, .mini-item:hover, .admin-mode-btn:hover { transform:none; }
  .feature-item, .mini-item, .admin-mode-btn, .auth-role-links a { transition:none; }
}


/* ============================================================
   PART 6 - HERO COMPOSITION + LANDING RHYTHM  (additive layer)
   ------------------------------------------------------------
   Why this layer exists
   ---------------------
   The landing hero used its horizontal space unevenly: the top
   right of the hero held one illustration floating in a large
   empty field, the platform metrics were locked inside the copy
   column (so the right half of that row stayed empty), the hero
   visual had no stage, and the focus-area chips wrapped with a
   single orphan on a second line.  A fixed layer of oversized
   clip-art silhouettes was pinned to the viewport margins at the
   same time (removed in background.css).

   What changes here
   -----------------
   6.1  hero environment tokens (light + dark)
   6.2  hero grid: every row uses the full composition width
        row 1  copy  |  staged visual
        row 2  platform metrics band (full width)
        row 3  product band - Your journey / Skill growth / metrics
        row 4  pathway strip (skills > learning > jobs > career)
        row 5  focus areas band (skill categories, full width)
   6.3  a staged hero visual: spotlit panel, halo, framing ring
   6.4  illustration line work: translucent planes, legible strokes
   6.5  product band: measured chart, zone hairlines, 2x2 metrics
   6.6  hero search chips: one balanced row
   6.7  landing rhythm: transitions between sections
   6.8  responsive rules for the composed hero
   6.9  motion safety

   Nothing here touches markup ids, routing, auth, Supabase or any
   behaviour: rows, bands and stage are all expressed with the
   classes the page already renders.
   ============================================================ */

/* ---------- 6.1 HERO ENVIRONMENT TOKENS ---------- */
:root {
  --msk-hero-light-a: rgba(59, 130, 246, 0.15);
  --msk-hero-light-b: rgba(124, 58, 237, 0.09);
  --msk-hero-light-c: rgba(16, 185, 129, 0.10);
  --msk-hero-horizon: rgba(15, 23, 42, 0.045);
  --msk-hero-band: rgba(255, 255, 255, 0.66);
  --msk-hero-stage: rgba(255, 255, 255, 0.55);
  --msk-hero-stage-line: rgba(15, 23, 42, 0.07);
  --msk-hero-halo: rgba(59, 130, 246, 0.14);
  --msk-hero-ring: rgba(59, 130, 246, 0.20);
  --msk-hero-ring-soft: rgba(15, 23, 42, 0.07);
  --msk-chart-grid: rgba(148, 163, 184, 0.16);

  /* illustration line work */
  --msk-illo-plane: rgba(59, 130, 246, 0.15);
  --msk-illo-plane-strong: rgba(59, 130, 246, 0.30);
  --msk-illo-line: #2563eb;
}

html[data-theme="dark"] {
  --msk-hero-light-a: rgba(59, 130, 246, 0.15);
  --msk-hero-light-b: rgba(124, 58, 237, 0.09);
  --msk-hero-light-c: rgba(16, 185, 129, 0.10);
  --msk-hero-horizon: rgba(15, 23, 42, 0.045);
  --msk-hero-band: #FFFFFF;
  --msk-hero-stage: #FFFFFF;
  --msk-hero-stage-line: #E5E7EB;
  --msk-hero-halo: rgba(59, 130, 246, 0.14);
  --msk-hero-ring: rgba(59, 130, 246, 0.20);
  --msk-hero-ring-soft: rgba(15, 23, 42, 0.07);
  --msk-chart-grid: rgba(148, 163, 184, 0.16);

  --msk-illo-plane: rgba(59, 130, 246, 0.15);
  --msk-illo-plane-strong: rgba(59, 130, 246, 0.30);
  --msk-illo-line: #2563eb;
}

/* ---------- 6.2 HERO GRID: EVERY ROW IS COMPOSED ---------- */
.hero { padding: 96px 0 44px; }

.hero-grid {
  grid-template-columns: minmax(0, 1.04fr) minmax(0, 0.96fr);
  gap: 30px 54px;
}

/* Pin each child to its row so the composition is deterministic in
   both the wide and the collapsed layouts. */
.hero-grid > .hero-copy { grid-column: 1; grid-row: 1; }
.hero-grid > .hero-visual { grid-column: 2; grid-row: 1; }
.hero-grid > .hero-stats { grid-column: 1 / -1; grid-row: 2; }
.hero-grid > .hero-card { grid-column: 1 / -1; grid-row: 3; }
.hero-grid > .hero-journey { grid-column: 1 / -1; grid-row: 4; }
.hero-grid > .msk-industry-strip { grid-column: 1 / -1; grid-row: 5; }

/* Platform metrics as a glass band across the full composition width:
   three equal measures, inset hairlines, one accent rule each. */
.hero-grid > .hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 26px 6px;
  border: 1px solid var(--msk-hairline);
  border-radius: var(--radius-xl);
  background: var(--msk-hero-band);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-sm);
}

.hero-grid > .hero-stats li {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 2px 30px;
  background: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.hero-grid > .hero-stats li + li { border-left: 1px solid var(--msk-hairline); }

.hero-grid > .hero-stats li::before {
  content: "";
  width: 30px;
  height: 3px;
  border-radius: 999px;
  background: var(--gradient-brand);
}

.hero-grid > .hero-stats strong {
  margin: 0;
  font-size: clamp(1.85rem, 2.5vw, 2.5rem);
  line-height: 1.05;
  letter-spacing: -.04em;
  color: var(--text);
}

.hero-grid > .hero-stats span { font-size: .86rem; color: var(--muted); }

/* Pathway strip (skills > learning > jobs > career) spreads across the
   full width so it reads as a progression line, not a caption. */
.hero-grid > .hero-journey { margin: 22px 0 0; gap: 16px; }
.hero-grid > .hero-journey span { font-size: .72rem; letter-spacing: .11em; }
.hero-grid > .hero-journey .hj-link { height: 1px; }

/* Focus areas as one even band of seven (the skill categories the
   rest of the page filters by). */
.hero-grid > .msk-industry-strip {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0 0;
}

.msk-industry-strip .msk-industry-chip {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 11px 8px;
  font-size: .68rem;
  letter-spacing: .07em;
  color: var(--muted);
  background: var(--msk-hero-band);
  border: 1px solid var(--msk-hairline);
  box-shadow: var(--shadow-sm);
}

/* ---------- 6.3 A STAGED HERO VISUAL ---------- */
/* The illustration no longer floats in an empty column: it sits on a
   spotlit, hairline-framed stage that fades out at its base, with a
   framing ring behind it.  Pure decoration - the artwork and its
   existing entrance animations are untouched. */
.hero-visual {
  position: relative;
  isolation: isolate;
  min-height: 540px;
}

.hero-visual::before {\n    content: "";\n    position: absolute;\n    inset: 4% 0 6% 0;\n    z-index: -1;\n    pointer-events: none;\n    border-radius: 34px;\n    border: 1px solid var(--border);\n    background: var(--surface-secondary);
}

.hero-visual::after {
  content: "";
  position: absolute;
  inset: -3% -3%;
  z-index: -1;
  pointer-events: none;
  background: none;
}

.hero-visual .msk-hero-illustration { max-width: 520px; }

/* Dark theme: keep the staged artwork legible without a GPU-costly
   drop-shadow (headless --disable-gpu can rasterise SVG filters as
   transparent, which is why the 1600px dark capture looked empty). */

/* ---------- 6.4 ILLUSTRATION LINE WORK ---------- */
/* Planes are translucent and strokes stay legible, so the artwork
   reads as designed line work in both themes instead of flat,
   saturated clip-art. */
.msk-illo-fill { fill: var(--msk-illo-plane); }
.msk-illo-base { stroke-width: 1.8; }
.msk-illo-detail { stroke-width: 1.2; }
.msk-illo-accent { fill: var(--msk-illo-plane-strong); stroke: var(--msk-illo-line); }

html[data-theme="dark"] .msk-illo-fill { fill: var(--msk-illo-plane); }
html[data-theme="dark"] .msk-illo-accent {
  fill: var(--msk-illo-plane-strong);
  stroke: var(--msk-illo-line);
}

/* ---------- 6.5 PRODUCT BAND: MEASURED, ZONED ---------- */
/* Three zones separated by hairlines; the growth chart sits on a
   measured grid with a taller plot area and a peak highlight; the
   growth metrics balance it as a 2x2 block. */
.card-glass--band {
  grid-template-columns: minmax(200px, 0.6fr) minmax(0, 1.5fr) minmax(320px, 0.95fr);
  gap: 0;
}

.card-glass--band > .band-col { padding: 0 26px; min-width: 0; }
.card-glass--band > .band-col:first-child { padding-left: 0; }
.card-glass--band > .band-col:last-child { padding-right: 0; }
.card-glass--band > .band-col + .band-col { border-left: 1px solid rgba(148, 163, 184, 0.16); }

.band-col--chart .chart {
  height: 200px;
  gap: 12px;
  padding: 26px 14px 0;
  border-radius: 18px;
  background-image: repeating-linear-gradient(
    180deg,
    transparent 0 47px,
    var(--msk-chart-grid) 47px 48px
  );
  background-color: rgba(148, 163, 184, 0.06);
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.10);
}

.band-col--chart .chart span {
  border-radius: 9px 9px 3px 3px;
  box-shadow: 0 0 22px -8px rgba(90, 114, 255, 0.85);
}

.band-col--chart .chart span:nth-child(7) {
  background: linear-gradient(180deg, #d6fbee 0%, #34d399 100%);
  box-shadow: 0 0 24px -6px rgba(52, 211, 153, 0.85);
}

.band-col--stats .mini-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.band-col--stats .mini-item { padding: 16px 14px; }
.band-col--stats .mini-item strong { font-size: 1.35rem; margin-bottom: 4px; }

/* dark theme: the metric band and focus chips are glass, not cards */
html[data-theme="dark"] .hero-grid > .hero-stats li {
  background: none;
  border-color: transparent;
}
html[data-theme="dark"] .hero-grid > .hero-stats li + li { border-left-color: var(--msk-hairline); }

/* ---------- 6.6 HERO SEARCH CHIPS: ONE BALANCED ROW ---------- */
/* The five popular searches fit the copy column exactly, so the row
   never leaves one orphan chip on a second line. */
.hero-copy .chip-row { gap: 8px; }
.hero-copy .chip-row .mk-chip { padding: 6px 10px; font-size: .78rem; }

/* ---------- 6.7 LANDING RHYTHM ---------- */
/* The pathway divider becomes a real transition: a taller band with a
   conduit that fades in and out, so the dark product band and the
   next section meet on purpose. */
.msk-path-divider { height: 68px; }
.msk-path-divider::before {
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--msk-line) 20%,
    var(--msk-line) 80%,
    transparent 100%
  );
}

/* section bands: calm white in every theme */
.section::before { opacity: 0; background: none; }
html[data-theme="dark"] .section::before {
  background: none;
}

/* ---------- 6.8 RESPONSIVE ---------- */
@media (max-width: 1180px) {
  .card-glass--band {
    grid-template-columns: minmax(180px, 0.5fr) minmax(0, 1.4fr) minmax(280px, 0.9fr);
  }
  .card-glass--band > .band-col { padding: 0 20px; }
}

@media (max-width: 980px) {
  .hero { padding: 72px 0 40px; }
  .hero-grid { grid-template-columns: 1fr; gap: 28px; }

  /* one clean column: copy, visual, metrics, product band, pathway, focus */
  .hero-grid > .hero-copy,
  .hero-grid > .hero-visual,
  .hero-grid > .hero-stats,
  .hero-grid > .hero-card,
  .hero-grid > .hero-journey,
  .hero-grid > .msk-industry-strip {
    grid-column: 1 / -1;
    grid-row: auto;
  }

  .hero-visual { min-height: 0; margin-top: 6px; }
  .hero-visual::after { display: none; }

  .card-glass--band { grid-template-columns: 1fr; gap: 22px; }
  .card-glass--band > .band-col { padding: 0; }
  .card-glass--band > .band-col + .band-col {
    border-left: 0;
    border-top: 1px solid rgba(148, 163, 184, 0.16);
    padding-top: 22px;
  }
}

@media (max-width: 740px) {
  .hero-grid > .hero-stats { grid-template-columns: 1fr; padding: 16px 4px; }
  .hero-grid > .hero-stats li { padding: 14px 20px; }
  .hero-grid > .hero-stats li + li {
    border-left: 0;
    border-top: 1px solid var(--msk-hairline);
  }
  .hero-grid > .hero-stats li::before { width: 22px; height: 2px; }
  .hero-grid > .hero-stats strong { font-size: 1.6rem; }

  .hero-grid > .msk-industry-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-visual .msk-hero-illustration { max-width: min(340px, 100%); }
  .band-col--chart .chart { height: 168px; gap: 8px; padding: 20px 10px 0; }
}

/* ---------- 6.9 MOTION ---------- */
/* The composition itself is static: only the illustration motion that
   already existed in this file is animated, and that stays governed by
   the prefers-reduced-motion rules above. */

