/* ═══════════════════════════════════════════════════════════════
   JobMatch — Design System
   Layout rule: every region is a flow-level block or CSS grid.
   Nothing is absolutely positioned over content, so nothing can overlap.
   Radii are generous (10-18px) and every interactive edge is soft.
   ═══════════════════════════════════════════════════════════════ */

:root {
  /* Surfaces */
  --bg:            #0b0f16;
  --surface-1:     #121822;
  --surface-2:     #172030;
  --surface-3:     #1e293b;
  --border:        #263449;
  --border-soft:   #1e2a3d;

  /* Text */
  --text:          #e8eef7;
  --text-muted:    #94a3b8;
  --text-dim:      #64748b;

  /* Brand */
  --accent:        #6366f1;
  --accent-hover:  #818cf8;
  --accent-soft:   rgba(99, 102, 241, 0.12);

  /* Semantic */
  --green:         #22c55e;
  --green-soft:    rgba(34, 197, 94, 0.12);
  --blue:          #3b82f6;
  --blue-soft:     rgba(59, 130, 246, 0.12);
  --amber:         #f59e0b;
  --amber-soft:    rgba(245, 158, 11, 0.12);
  --red:           #ef4444;
  --red-soft:      rgba(239, 68, 68, 0.12);

  /* Radii — nothing sharp anywhere */
  --r-sm:   8px;
  --r-md:   12px;
  --r-lg:   16px;
  --r-xl:   20px;
  --r-pill: 999px;

  /* Elevation */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.24);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.28);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.36);

  /* Motion */
  --ease:  cubic-bezier(0.4, 0, 0.2, 1);
  --fast:  140ms;
  --base:  240ms;
  --slow:  400ms;

  /* Rhythm */
  --gap-xs: 6px;
  --gap-sm: 10px;
  --gap-md: 16px;
  --gap-lg: 24px;
  --gap-xl: 36px;

  --max-w: 1400px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Ambient background wash — fixed, behind everything, never intercepts clicks */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(1000px 620px at 12% -8%,  rgba(99, 102, 241, 0.14), transparent 62%),
    radial-gradient(880px 540px at 88% 4%,   rgba(34, 197, 94, 0.09),  transparent 60%);
}

/* Everything sits above the wash in normal document flow */
.page { position: relative; z-index: 1; }

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }
a { color: inherit; text-decoration: none; }

:focus-visible {
  outline: 2px solid var(--accent-hover);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

::selection { background: var(--accent-soft); color: var(--text); }

/* ── Scrollbar ───────────────────────────────────────────── */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
  background: var(--surface-3);
  border-radius: var(--r-pill);
  border: 2px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover { background: #334155; }

/* ═══════════════════════ HEADER ═══════════════════════════ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 15, 22, 0.85);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid var(--border-soft);
}

.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 14px clamp(16px, 3vw, 32px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gap-md);
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border-radius: var(--r-md);
  background: linear-gradient(135deg, var(--accent) 0%, #8b5cf6 100%);
  display: grid;
  place-items: center;
  font-size: 19px;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.36);
}

.brand-text { min-width: 0; }

.brand-name {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.3px;
  line-height: 1.25;
}

.brand-tag {
  font-size: 11.5px;
  color: var(--text-dim);
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-meta {
  display: flex;
  align-items: center;
  gap: var(--gap-sm);
  flex-wrap: wrap;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 13px;
  border-radius: var(--r-pill);
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}

.pill .dot {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 50%;
  background: var(--text-dim);
}

.pill.live .dot {
  background: var(--green);
  box-shadow: 0 0 0 3px var(--green-soft);
  animation: pulse 2.4s var(--ease) infinite;
}

.pill.live { color: var(--green); border-color: rgba(34, 197, 94, 0.3); }

.pill.offline .dot { background: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }
.pill.offline { color: var(--red); border-color: rgba(239, 68, 68, 0.3); }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.45; }
}

/* ═══════════════════════ LAYOUT ═══════════════════════════ */

.main {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: var(--gap-lg) clamp(16px, 3vw, 32px) 64px;
  display: flex;
  flex-direction: column;
  gap: var(--gap-lg);
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--gap-md);
  flex-wrap: wrap;
}

.section-title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.2px;
}

.section-sub {
  font-size: 12.5px;
  color: var(--text-dim);
}

/* ═══════════════════════ HERO / UPLOAD ════════════════════ */

.hero {
  background: linear-gradient(160deg, var(--surface-1) 0%, #0f1621 100%);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-xl);
  padding: clamp(24px, 4vw, 44px);
  box-shadow: var(--shadow-md);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--gap-md);
}

.hero h1 {
  margin: 0;
  font-size: clamp(24px, 4vw, 34px);
  font-weight: 800;
  letter-spacing: -0.9px;
  line-height: 1.18;
  background: linear-gradient(120deg, #e8eef7 20%, #a5b4fc 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  max-width: 22ch;
}

.hero p {
  margin: 0;
  font-size: 14.5px;
  color: var(--text-muted);
  max-width: 60ch;
  line-height: 1.62;
}

.hero-stats {
  display: flex;
  gap: var(--gap-lg);
  flex-wrap: wrap;
  justify-content: center;
  padding-top: var(--gap-xs);
}

.hero-stat { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.hero-stat b { font-size: 20px; font-weight: 800; color: var(--accent-hover); }
.hero-stat span { font-size: 11px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.7px; }

/* ── Dropzone ────────────────────────────────────────────── */

.dropzone {
  width: 100%;
  max-width: 620px;
  border: 2px dashed var(--border);
  border-radius: var(--r-lg);
  background: var(--surface-2);
  padding: clamp(26px, 4vw, 40px) var(--gap-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--gap-sm);
  cursor: pointer;
  transition: border-color var(--base) var(--ease),
              background var(--base) var(--ease),
              transform var(--base) var(--ease);
}

.dropzone:hover {
  border-color: var(--accent);
  background: var(--surface-3);
  transform: translateY(-2px);
}

.dropzone.dragging {
  border-color: var(--accent-hover);
  background: var(--accent-soft);
  transform: scale(1.015);
}

.dropzone.busy { pointer-events: none; opacity: 0.62; }

.dz-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--r-lg);
  background: var(--accent-soft);
  border: 1px solid rgba(99, 102, 241, 0.3);
  display: grid;
  place-items: center;
  font-size: 25px;
  transition: transform var(--base) var(--ease);
}

.dropzone:hover .dz-icon { transform: scale(1.08) translateY(-2px); }

.dz-title { font-size: 15.5px; font-weight: 700; }
.dz-hint  { font-size: 12.5px; color: var(--text-dim); }

.dz-formats {
  display: flex;
  gap: var(--gap-xs);
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 2px;
}

.fmt-chip {
  padding: 3px 10px;
  border-radius: var(--r-pill);
  background: var(--surface-3);
  border: 1px solid var(--border);
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.4px;
}

.hidden-input { display: none; }

/* ── Alternate entry: paste text ─────────────────────────── */

.alt-entry {
  width: 100%;
  max-width: 620px;
  display: flex;
  flex-direction: column;
  gap: var(--gap-sm);
}

.alt-toggle {
  align-self: center;
  font-size: 12.5px;
  color: var(--text-muted);
  padding: 7px 15px;
  border-radius: var(--r-pill);
  border: 1px solid transparent;
  transition: color var(--fast) var(--ease),
              background var(--fast) var(--ease),
              border-color var(--fast) var(--ease);
}

.alt-toggle:hover {
  color: var(--text);
  background: var(--surface-2);
  border-color: var(--border);
}

.paste-panel {
  display: none;
  flex-direction: column;
  gap: var(--gap-sm);
}

.paste-panel.open { display: flex; }

textarea.resume-text {
  width: 100%;
  min-height: 150px;
  max-height: 340px;
  resize: vertical;
  padding: 14px 16px;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-size: 13.5px;
  line-height: 1.6;
  transition: border-color var(--fast) var(--ease), background var(--fast) var(--ease);
}

textarea.resume-text:focus {
  border-color: var(--accent);
  background: var(--surface-3);
  outline: none;
}

textarea.resume-text::placeholder { color: var(--text-dim); }

/* ── Buttons ─────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: var(--r-pill);
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  transition: background var(--fast) var(--ease),
              transform var(--fast) var(--ease),
              box-shadow var(--fast) var(--ease),
              opacity var(--fast) var(--ease);
}

.btn:active { transform: translateY(1px) scale(0.985); }

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #8b5cf6);
  color: #fff;
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.34);
}

.btn-primary:hover {
  box-shadow: 0 7px 22px rgba(99, 102, 241, 0.46);
  transform: translateY(-1px);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-ghost {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.btn-ghost:hover { background: var(--surface-3); color: var(--text); }

/* ── Progress ────────────────────────────────────────────── */

.progress-block {
  display: none;
  width: 100%;
  max-width: 620px;
  flex-direction: column;
  gap: var(--gap-sm);
}

.progress-block.visible { display: flex; }

.progress-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gap-sm);
  font-size: 12.5px;
  color: var(--text-muted);
}

.progress-rail {
  height: 6px;
  border-radius: var(--r-pill);
  background: var(--surface-3);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0;
  border-radius: var(--r-pill);
  background: linear-gradient(90deg, var(--accent), #8b5cf6);
  transition: width var(--slow) var(--ease);
}

.spinner {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  border: 2px solid rgba(255, 255, 255, 0.22);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}

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

/* ── Toast (fixed, above content, never in flow) ─────────── */

.toast-stack {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: var(--gap-sm);
  align-items: center;
  pointer-events: none;
  width: min(92vw, 520px);
}

.toast {
  pointer-events: auto;
  width: 100%;
  padding: 13px 18px;
  border-radius: var(--r-md);
  background: var(--surface-3);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  font-size: 13px;
  line-height: 1.5;
  display: flex;
  align-items: flex-start;
  gap: 11px;
  animation: toastIn var(--base) var(--ease);
}

.toast.err  { border-color: rgba(239, 68, 68, 0.42); background: #24151a; }
.toast.ok   { border-color: rgba(34, 197, 94, 0.42); background: #13251a; }
.toast.info { border-color: rgba(59, 130, 246, 0.42); background: #131e2e; }

.toast-icon { flex: 0 0 auto; font-size: 15px; line-height: 1.35; }
.toast-body { flex: 1 1 auto; min-width: 0; }
.toast-close {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: var(--r-sm);
  color: var(--text-dim);
  font-size: 13px;
  line-height: 1;
  transition: color var(--fast) var(--ease), background var(--fast) var(--ease);
}

.toast-close:hover { color: var(--text); background: rgba(255, 255, 255, 0.08); }

@keyframes toastIn {
  from { opacity: 0; transform: translateY(14px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ═══════════════════════ PROFILE CARD ═════════════════════ */

.profile-card {
  background: var(--surface-1);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-lg);
  padding: var(--gap-lg);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--gap-md) var(--gap-lg);
  align-items: start;
  box-shadow: var(--shadow-sm);
}

.avatar {
  width: 54px;
  height: 54px;
  border-radius: var(--r-md);
  background: linear-gradient(135deg, var(--accent), #8b5cf6);
  display: grid;
  place-items: center;
  font-size: 21px;
  font-weight: 700;
  color: #fff;
}

.profile-body { min-width: 0; display: flex; flex-direction: column; gap: var(--gap-sm); }

.profile-top {
  display: flex;
  align-items: baseline;
  gap: var(--gap-sm);
  flex-wrap: wrap;
}

.profile-name { font-size: 17px; font-weight: 700; letter-spacing: -0.3px; }
.profile-line { font-size: 12.5px; color: var(--text-dim); }

.skill-cloud { display: flex; flex-wrap: wrap; gap: var(--gap-xs); }

.skill-chip {
  padding: 4px 11px;
  border-radius: var(--r-pill);
  background: var(--accent-soft);
  border: 1px solid rgba(99, 102, 241, 0.3);
  font-size: 11.5px;
  font-weight: 600;
  color: #a5b4fc;
}

/* ═══════════════════════ STATS BAR ════════════════════════ */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
  gap: var(--gap-sm);
}

.stat-card {
  background: var(--surface-1);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  transition: border-color var(--fast) var(--ease), transform var(--fast) var(--ease);
}

.stat-card:hover { border-color: var(--border); transform: translateY(-2px); }

.stat-value {
  font-size: clamp(21px, 2.4vw, 27px);
  font-weight: 800;
  letter-spacing: -0.7px;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.stat-label {
  font-size: 10.5px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.7px;
  font-weight: 600;
  line-height: 1.4;
}

.v-indigo { color: var(--accent-hover); }
.v-green  { color: var(--green); }
.v-blue   { color: var(--blue); }
.v-amber  { color: var(--amber); }

/* ═══════════════════════ FILTER BAR ═══════════════════════ */

.filter-bar {
  background: var(--surface-1);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-lg);
  padding: var(--gap-md);
  display: flex;
  flex-direction: column;
  gap: var(--gap-sm);
}

.filter-row {
  display: flex;
  align-items: center;
  gap: var(--gap-xs);
  flex-wrap: wrap;
}

.filter-tag {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.7px;
  margin-right: 4px;
  flex: 0 0 auto;
}

.chip {
  padding: 7px 15px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  transition: all var(--fast) var(--ease);
}

.chip:hover { border-color: var(--accent); color: var(--accent-hover); background: var(--accent-soft); }

.chip.on {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 2px 10px rgba(99, 102, 241, 0.32);
}

.chip.on.g { background: var(--green);  border-color: var(--green);  box-shadow: 0 2px 10px rgba(34,197,94,0.3); }
.chip.on.b { background: var(--blue);   border-color: var(--blue);   box-shadow: 0 2px 10px rgba(59,130,246,0.3); }
.chip.on.a { background: var(--amber);  border-color: var(--amber);  color: #1c1408; box-shadow: 0 2px 10px rgba(245,158,11,0.3); }

.chip-sm {
  padding: 4px 11px;
  border-radius: var(--r-sm);
  font-size: 11.5px;
  font-weight: 500;
}

.sub-row {
  display: none;
  gap: var(--gap-xs);
  flex-wrap: wrap;
  align-items: center;
  padding-top: var(--gap-xs);
  border-top: 1px solid var(--border-soft);
}

.sub-row.open { display: flex; }

.result-line {
  font-size: 12.5px;
  color: var(--text-dim);
  padding-left: 2px;
}

.result-line b { color: var(--accent-hover); font-weight: 700; }

/* ═══════════════════════ JOB LIST ═════════════════════════ */

.job-list { display: flex; flex-direction: column; gap: var(--gap-sm); }

.list-head {
  display: grid;
  grid-template-columns: 46px minmax(190px, 1.5fr) minmax(160px, 2fr) 132px 138px 130px 96px;
  gap: var(--gap-sm);
  padding: 4px 18px;
  font-size: 10px;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.job-card {
  display: grid;
  grid-template-columns: 46px minmax(190px, 1.5fr) minmax(160px, 2fr) 132px 138px 130px 96px;
  gap: var(--gap-sm);
  align-items: center;
  padding: 15px 18px;
  background: var(--surface-1);
  border: 1px solid var(--border-soft);
  border-left: 3px solid transparent;
  border-radius: var(--r-md);
  transition: background var(--fast) var(--ease),
              border-color var(--fast) var(--ease),
              transform var(--fast) var(--ease),
              box-shadow var(--fast) var(--ease);
  animation: cardIn var(--base) var(--ease) backwards;
}

.job-card:hover {
  background: var(--surface-2);
  border-color: var(--border);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.job-card.hot { border-left-color: var(--green); }

@keyframes cardIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.cell { min-width: 0; }

.rank {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-dim);
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.job-card.hot .rank { color: var(--green); }

.company {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--accent-hover);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.role {
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.35;
  margin-top: 2px;
  overflow-wrap: anywhere;
}

.badge-row { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 6px; }

.badge {
  font-size: 9px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--r-sm);
  letter-spacing: 0.4px;
  white-space: nowrap;
}

.b-remote { background: var(--green-soft); color: #4ade80; border: 1px solid rgba(34,197,94,0.32); }
.b-hybrid { background: var(--blue-soft);  color: #60a5fa; border: 1px solid rgba(59,130,246,0.32); }
.b-onsite { background: var(--red-soft);   color: #f87171; border: 1px solid rgba(239,68,68,0.32); }
.b-contract { background: var(--amber-soft); color: #fbbf24; border: 1px solid rgba(245,158,11,0.32); }
.b-perm   { background: rgba(45,212,191,0.12); color: #2dd4bf; border: 1px solid rgba(45,212,191,0.32); }

.tag-cloud { display: flex; flex-wrap: wrap; gap: 4px; align-content: center; }

.tag {
  font-size: 10px;
  font-weight: 600;
  padding: 2.5px 8px;
  border-radius: var(--r-sm);
  white-space: nowrap;
  line-height: 1.5;
  background: var(--surface-3);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.tag.hit {
  background: var(--green-soft);
  border-color: rgba(34, 197, 94, 0.34);
  color: #4ade80;
}

.tag.more { background: transparent; border-style: dashed; color: var(--text-dim); }

.loc  { font-size: 13px; font-weight: 500; line-height: 1.4; overflow-wrap: anywhere; }
.date { font-size: 11px; color: var(--text-dim); margin-top: 3px; line-height: 1.4; }
.date.fresh { color: var(--green); font-weight: 600; }
.date.recent { color: var(--amber); }

.salary { font-size: 13px; font-weight: 700; line-height: 1.35; overflow-wrap: anywhere; }
.salary-note { font-size: 10px; color: var(--text-dim); margin-top: 3px; }

.match-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 6px;
}

.match-pct { font-size: 16px; font-weight: 800; letter-spacing: -0.4px; font-variant-numeric: tabular-nums; }
.match-word { font-size: 9.5px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.6px; }

.bar {
  height: 5px;
  border-radius: var(--r-pill);
  background: var(--surface-3);
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  width: 0;
  border-radius: var(--r-pill);
  transition: width var(--slow) var(--ease);
}

.p-green { color: var(--green); }
.p-blue  { color: var(--blue); }
.p-amber { color: var(--amber); }

.f-green { background: linear-gradient(90deg, #15803d, var(--green)); }
.f-blue  { background: linear-gradient(90deg, #1d4ed8, var(--blue)); }
.f-amber { background: linear-gradient(90deg, #b45309, var(--amber)); }

.apply {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 100%;
  padding: 9px 12px;
  border-radius: var(--r-pill);
  background: var(--accent);
  color: #fff;
  font-size: 12.5px;
  font-weight: 700;
  white-space: nowrap;
  transition: background var(--fast) var(--ease),
              transform var(--fast) var(--ease),
              box-shadow var(--fast) var(--ease);
}

.apply:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.42);
}

.job-card.hot .apply { background: #16a34a; }
.job-card.hot .apply:hover { background: var(--green); box-shadow: 0 4px 14px rgba(34, 197, 94, 0.42); }

/* ── Empty state ─────────────────────────────────────────── */

.empty {
  padding: clamp(36px, 7vw, 68px) var(--gap-lg);
  text-align: center;
  background: var(--surface-1);
  border: 1px dashed var(--border);
  border-radius: var(--r-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--gap-sm);
}

.empty-icon { font-size: 38px; opacity: 0.6; }
.empty-title { font-size: 15.5px; font-weight: 700; }
.empty-text { font-size: 13px; color: var(--text-dim); max-width: 42ch; line-height: 1.6; }

/* ── Skeleton loader ─────────────────────────────────────── */

.skeleton-row {
  height: 74px;
  border-radius: var(--r-md);
  background: linear-gradient(90deg, var(--surface-1) 0%, var(--surface-2) 50%, var(--surface-1) 100%);
  background-size: 240% 100%;
  animation: shimmer 1.5s var(--ease) infinite;
}

@keyframes shimmer {
  0%   { background-position: 120% 0; }
  100% { background-position: -120% 0; }
}

/* ═══════════════════════ FOOTER ═══════════════════════════ */

.site-footer {
  border-top: 1px solid var(--border-soft);
  background: var(--surface-1);
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: var(--gap-lg) clamp(16px, 3vw, 32px);
  display: flex;
  gap: var(--gap-md);
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  font-size: 11.5px;
  color: var(--text-dim);
  line-height: 1.7;
}

.footer-inner b { color: var(--text-muted); }
.footer-links { display: flex; gap: var(--gap-md); flex-wrap: wrap; }
.footer-links a { color: var(--text-muted); transition: color var(--fast) var(--ease); }
.footer-links a:hover { color: var(--accent-hover); }

/* ═══════════════════════ RESPONSIVE ═══════════════════════
   Below 1080px the 7-column grid becomes a stacked card so no
   column can ever be squeezed into overlapping its neighbour.
   ═════════════════════════════════════════════════════════ */

@media (max-width: 1180px) {
  .list-head, .job-card {
    grid-template-columns: 42px minmax(170px, 1.3fr) minmax(140px, 1.6fr) 118px 124px 118px 88px;
    gap: var(--gap-xs);
  }
  .job-card { padding: 14px 15px; }
}

@media (max-width: 1080px) {
  .list-head { display: none; }

  .job-card {
    grid-template-columns: 44px minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas:
      "rank  head  head"
      ".     tags  tags"
      ".     meta  sal"
      ".     match match"
      ".     cta   cta";
    row-gap: 12px;
    column-gap: var(--gap-md);
    align-items: start;
    padding: 16px;
  }

  .job-card > .cell-rank  { grid-area: rank; padding-top: 2px; }
  .job-card > .cell-head  { grid-area: head; }
  .job-card > .cell-tags  { grid-area: tags; }
  .job-card > .cell-meta  { grid-area: meta; }
  .job-card > .cell-sal   { grid-area: sal; }
  .job-card > .cell-match { grid-area: match; }
  .job-card > .cell-cta   { grid-area: cta; }

  .apply { width: auto; align-self: flex-start; padding: 10px 26px; }
  .match-top, .bar { max-width: 260px; }
}

@media (max-width: 720px) {
  .header-inner { padding: 12px 16px; }
  .brand-tag { display: none; }
  .main { padding: var(--gap-md) 14px 48px; gap: var(--gap-md); }
  .hero { padding: 24px 18px; border-radius: var(--r-lg); }
  .stats-grid { grid-template-columns: repeat(auto-fit, minmax(132px, 1fr)); }
  .stat-card { padding: 13px 14px; }
  .profile-card { grid-template-columns: 1fr; }
  .avatar { width: 46px; height: 46px; font-size: 18px; }
  .filter-bar { padding: 13px; }
  .hero-stats { gap: var(--gap-md); }
}

@media (max-width: 460px) {
  .job-card {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "rank" "head" "tags" "meta" "sal" "match" "cta";
    row-gap: 10px;
  }
  .job-card > .cell-rank { padding-top: 0; }
  .rank { text-align: left; font-size: 12px; color: var(--text-dim); }
  .job-card.hot .rank::after { content: ' · HOT MATCH'; color: var(--green); font-size: 10px; letter-spacing: 0.5px; }
  .chip { padding: 6px 12px; font-size: 12px; }
  .match-top, .bar { max-width: none; }
}

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