:root {
  --ink: #1e2532;
  --carbon: #0f141e;
  --pencil: #656e83;
  --fog: #828ba2;
  --haze: #9fa6bb;
  --paper: #ffffff;
  --mist: #f7f9fc;
  --lavender: #f1f2ff;
  --chalk: #d9deeb;
  --ash: #e7eaf4;
  --blue: #1a91f0;
  --blue-deep: #016fd0;
  --iris: #5660e8;
  --midnight: #1a1c6a;
  --mint: #e7f4ed;
  --mint-ink: #1b7a4e;
  --blush: #ffebe4;
  --blush-ink: #b05226;

  --font: 'Outfit', ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --page-max: 1200px;
  --r-card: 16px;
  --r-btn: 36px;
  --r-input: 10px;
  --r-tag: 100px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.2px;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, select { font-family: inherit; }
.wrap { max-width: var(--page-max); margin: 0 auto; padding: 0 24px; }

/* ============ NAV ============ */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--chalk);
}
.nav-inner {
  height: 68px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.brand { display: flex; align-items: center; gap: 11px; flex-shrink: 0; }
.brand-mark {
  width: 36px; height: 36px; border-radius: 9px;
  background: var(--blue);
  color: #fff; font-weight: 700; font-size: 16px; letter-spacing: 0.5px;
  display: grid; place-items: center;
}
.brand-name { font-size: 18px; font-weight: 600; color: var(--carbon); letter-spacing: 0.1px; }
.brand-name span { color: var(--blue); }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { font-size: 15.5px; color: var(--ink); transition: color .15s ease; }
.nav-links a:hover { color: var(--blue); }
.nav-cta {
  background: var(--blue); color: #fff; border: none;
  font-size: 15px; font-weight: 500;
  padding: 10px 22px; border-radius: var(--r-btn);
  transition: background .15s ease, transform .1s ease;
  display: inline-block;
}
.nav-cta:hover { background: var(--blue-deep); color: #fff; }
.nav-cta:active { transform: scale(0.98); }
.nav-cta span { opacity: .85; font-variant-numeric: tabular-nums; }
@media (max-width: 800px) { .nav-links a:not(.nav-cta) { display: none; } }

/* ============ HERO ============ */
.hero { background: var(--mist); border-bottom: 1px solid var(--ash); overflow: hidden; }
.hero-inner {
  display: grid; grid-template-columns: 1.08fr 0.92fr; gap: 48px;
  align-items: center; padding: 64px 0 72px;
}
.hero h1 {
  font-size: clamp(38px, 5vw, 58px);
  line-height: 1.02; letter-spacing: 1px;
  font-weight: 600; color: var(--carbon);
  max-width: 13ch;
}
.hero h1 em { font-style: normal; color: var(--blue); }
.hero-sub {
  margin-top: 18px;
  font-size: 18px; line-height: 1.45; color: var(--pencil);
  max-width: 46ch;
}

.searchbar {
  margin-top: 30px;
  display: flex; align-items: stretch;
  background: var(--paper);
  border: 1px solid var(--chalk);
  border-radius: var(--r-btn);
  padding: 6px;
  max-width: 620px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.searchbar:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(26,145,240,0.12); }
.searchbar .field {
  display: flex; align-items: center; gap: 9px; flex: 1; min-width: 0; padding: 6px 14px;
}
.searchbar .field + .field { border-left: 1px solid var(--ash); flex: 0.8; }
.searchbar svg { flex-shrink: 0; color: var(--haze); }
.searchbar input {
  border: none; outline: none; width: 100%;
  font-size: 15.5px; color: var(--ink); background: transparent;
}
.searchbar input::placeholder { color: var(--haze); }
.searchbar .go {
  background: var(--blue); color: #fff; border: none;
  font-size: 15.5px; font-weight: 500;
  padding: 12px 26px; border-radius: var(--r-btn);
  white-space: nowrap; flex-shrink: 0;
  transition: background .15s ease, transform .1s ease;
}
.searchbar .go:hover { background: var(--blue-deep); }
.searchbar .go:active { transform: scale(0.98); }

.hero-chips { margin-top: 18px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.hero-chips .lbl { font-size: 14px; color: var(--fog); margin-right: 2px; }
.chip {
  background: var(--paper); border: 1px solid var(--chalk);
  color: var(--ink); font-size: 13.5px; font-weight: 500;
  padding: 6px 14px; border-radius: var(--r-tag);
  transition: border-color .15s ease, color .15s ease, background .15s ease;
}
.chip:hover { border-color: var(--blue); color: var(--blue); }

/* hero preview: real mini job cards rendered from live data */
.hero-visual { position: relative; min-height: 380px; }
.preview-card {
  position: absolute; left: 0; right: 40px;
  background: var(--paper); border: 1px solid var(--chalk);
  border-radius: var(--r-card); padding: 18px 20px;
  display: flex; align-items: center; gap: 14px;
}
.preview-card:nth-child(1) { top: 12px; transform: rotate(-1.6deg); }
.preview-card:nth-child(2) { top: 132px; left: 34px; right: 6px; transform: rotate(1.2deg); }
.preview-card:nth-child(3) { top: 252px; transform: rotate(-0.8deg); }
.preview-card .avatar { width: 44px; height: 44px; font-size: 16px; }
.preview-card .pt { font-size: 16px; font-weight: 600; color: var(--carbon); line-height: 1.2; }
.preview-card .pm { font-size: 13.5px; color: var(--pencil); margin-top: 3px; }
.preview-card .badge {
  margin-left: auto; flex-shrink: 0;
  background: var(--mint); color: var(--mint-ink);
  font-size: 12.5px; font-weight: 600;
  padding: 5px 12px; border-radius: var(--r-tag);
  white-space: nowrap;
}
.float-tag {
  position: absolute; top: -14px; right: 10px; z-index: 2;
  background: var(--midnight); color: #fff;
  font-size: 13px; font-weight: 500;
  padding: 9px 18px; border-radius: var(--r-tag);
  transform: rotate(2deg);
}
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; padding: 48px 0 56px; }
  .hero-visual { display: none; }
}
@media (max-width: 560px) {
  .searchbar { flex-direction: column; border-radius: 20px; gap: 4px; }
  .searchbar .field + .field { border-left: none; border-top: 1px solid var(--ash); }
  .searchbar .go { width: 100%; padding: 13px; }
}

/* ============ STATS ============ */
.stats { border-bottom: 1px solid var(--ash); background: var(--paper); }
.stats-inner {
  display: flex; justify-content: space-between; gap: 24px;
  padding: 26px 0; flex-wrap: wrap;
}
.stat { display: flex; align-items: baseline; gap: 9px; }
.stat b { font-size: 30px; font-weight: 600; color: var(--blue); letter-spacing: 0.3px; font-variant-numeric: tabular-nums; }
.stat span { font-size: 16px; color: var(--ink); }
@media (max-width: 700px) { .stats-inner { justify-content: flex-start; gap: 28px; } .stat b { font-size: 24px; } }

/* ============ JOBS ============ */
.jobs { padding: 64px 0 40px; }
.jobs-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.jobs-head h2 { font-size: 31px; line-height: 1.14; font-weight: 600; color: var(--carbon); }
.jobs-count { font-size: 15.5px; color: var(--pencil); }
.jobs-count b { color: var(--blue); font-weight: 600; }

/* date freshness filter */
.date-filter {
  margin-top: 22px;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 14px 16px;
  background: var(--mist);
  border: 1px solid var(--ash);
  border-radius: 14px;
}
.date-label { font-size: 14px; font-weight: 600; color: var(--ink); margin-right: 4px; }
.date-chip {
  background: var(--paper); border: 1px solid var(--chalk);
  color: var(--ink); font-size: 14px; font-weight: 500;
  padding: 8px 18px; border-radius: var(--r-tag);
  transition: all .15s ease;
}
.date-chip:hover { border-color: var(--blue); color: var(--blue); }
.date-chip.active { background: var(--midnight); border-color: var(--midnight); color: #fff; }

.toolbar {
  margin-top: 18px;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.cat-chips { display: flex; gap: 8px; flex-wrap: wrap; flex: 1; }
.cat-chip {
  background: var(--paper); border: 1px solid var(--chalk);
  color: var(--ink); font-size: 14px; font-weight: 500;
  padding: 8px 16px; border-radius: var(--r-tag);
  transition: all .15s ease;
}
.cat-chip:hover { border-color: var(--blue); color: var(--blue); }
.cat-chip.active { background: var(--blue); border-color: var(--blue); color: #fff; }
.toolbar select {
  appearance: none; -webkit-appearance: none;
  background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23828ba2' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center;
  border: 1px solid var(--chalk); border-radius: var(--r-tag);
  font-size: 14px; font-weight: 500; color: var(--ink);
  padding: 8px 36px 8px 16px;
  outline: none; cursor: pointer;
  transition: border-color .15s ease;
}
.toolbar select:hover, .toolbar select:focus { border-color: var(--blue); }

/* live-source note */
.src-note {
  margin-top: 18px;
  display: flex; align-items: center; gap: 10px;
  font-size: 14px; color: var(--pencil);
}
.src-note.err { color: var(--blush-ink); }
.live-dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--mint-ink); flex-shrink: 0;
  box-shadow: 0 0 0 0 rgba(27,122,78,0.5);
  animation: pulse 2s infinite;
}
.src-note.err .live-dot { background: var(--blush-ink); animation: none; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(27,122,78,0.45); }
  70% { box-shadow: 0 0 0 7px rgba(27,122,78,0); }
  100% { box-shadow: 0 0 0 0 rgba(27,122,78,0); }
}

.grid {
  margin-top: 22px;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 18px;
}
.card {
  background: var(--paper);
  border: 1px solid var(--chalk);
  border-radius: var(--r-card);
  padding: 22px;
  display: flex; flex-direction: column; gap: 14px;
  cursor: pointer;
  transition: border-color .18s ease, transform .18s ease;
}
.card:hover { border-color: var(--blue); transform: translateY(-3px); }
.card:active { transform: translateY(-1px) scale(0.995); }
.card-top { display: flex; align-items: flex-start; gap: 13px; }
.avatar {
  width: 48px; height: 48px; border-radius: 12px; flex-shrink: 0;
  display: grid; place-items: center;
  font-weight: 600; font-size: 17px; letter-spacing: 0.5px;
  overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: contain; }
.card-co { min-width: 0; }
.card-title {
  font-size: 18px; font-weight: 600; color: var(--carbon); line-height: 1.25;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-meta { margin-top: 4px; font-size: 14px; color: var(--pencil); display: flex; flex-wrap: wrap; column-gap: 6px; }
.card-meta .co { font-weight: 500; color: var(--ink); }
.save {
  margin-left: auto; flex-shrink: 0;
  width: 36px; height: 36px; border-radius: 50%;
  background: none; border: 1px solid transparent;
  display: grid; place-items: center;
  color: var(--haze);
  transition: color .15s ease, border-color .15s ease, transform .1s ease;
}
.save:hover { color: var(--blue); border-color: var(--ash); }
.save:active { transform: scale(0.9); }
.save.on { color: var(--blue); }
.save.on svg path { fill: var(--blue); }
.tags { display: flex; flex-wrap: wrap; gap: 7px; }
.tag {
  font-size: 12.5px; font-weight: 500;
  padding: 4px 11px; border-radius: var(--r-tag);
  background: var(--mist); color: var(--pencil);
  border: 1px solid var(--ash);
}
.tag.salary { background: var(--mint); color: var(--mint-ink); border-color: var(--mint); font-weight: 600; }
.tag.remote { background: var(--lavender); color: var(--iris); border-color: var(--lavender); }
.card-foot {
  margin-top: auto; padding-top: 14px; border-top: 1px solid var(--ash);
  display: flex; align-items: center; gap: 12px;
}
.posted { font-size: 13.5px; color: var(--fog); }
.posted.fresh { color: var(--mint-ink); font-weight: 500; }
.apply {
  margin-left: auto;
  background: var(--paper); color: var(--blue);
  border: 1px solid var(--blue);
  font-size: 14px; font-weight: 500;
  padding: 8px 20px; border-radius: var(--r-btn);
  transition: all .15s ease;
}
.apply:hover { background: var(--blue); color: #fff; }
.apply:active { transform: scale(0.97); }

/* skeleton loaders */
.skel { pointer-events: none; }
.skel .sk { background: var(--ash); border-radius: 6px; position: relative; overflow: hidden; }
.skel .sk::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.65), transparent);
  animation: shimmer 1.4s infinite;
}
@keyframes shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }

.empty {
  grid-column: 1 / -1;
  text-align: center; padding: 72px 24px;
  background: var(--mist); border-radius: var(--r-card);
}
.empty h3 { font-size: 22px; font-weight: 600; color: var(--carbon); }
.empty p { margin-top: 8px; color: var(--pencil); font-size: 15.5px; }
.empty button { margin-top: 20px; }

.more-row { display: flex; flex-direction: column; align-items: center; gap: 10px; margin: 36px 0 8px; }
.more-btn {
  background: var(--blue); color: #fff; border: none;
  font-size: 15.5px; font-weight: 500;
  padding: 13px 34px; border-radius: var(--r-btn);
  transition: background .15s ease, transform .1s ease;
}
.more-btn:hover { background: var(--blue-deep); }
.more-btn:active { transform: scale(0.98); }
.more-btn:disabled { opacity: .6; cursor: default; }
.more-hint { font-size: 13.5px; color: var(--fog); }

/* ============ FOOTER ============ */
footer { border-top: 1px solid var(--chalk); background: var(--paper); }
.foot-inner {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px;
  padding: 56px 0 40px;
}
.foot-brand .brand { margin-bottom: 14px; }
.foot-brand p { font-size: 14.5px; color: var(--pencil); max-width: 30ch; line-height: 1.5; }
.foot-col h4 { font-size: 14px; font-weight: 600; color: var(--carbon); margin-bottom: 14px; }
.foot-col a { display: block; font-size: 14.5px; color: var(--pencil); padding: 5px 0; transition: color .15s ease; }
.foot-col a:hover { color: var(--blue); }
.foot-bar {
  border-top: 1px solid var(--ash);
  padding: 20px 0;
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  font-size: 13.5px; color: var(--fog);
}
@media (max-width: 860px) { .foot-inner { grid-template-columns: 1fr 1fr; } }
@media (max-width: 500px) { .foot-inner { grid-template-columns: 1fr; } }

/* ============ MODAL ============ */
.modal-veil {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(15,20,30,0.5);
  display: none; align-items: flex-start; justify-content: center;
  padding: 5vh 16px;
  overflow-y: auto;
}
.modal-veil.open { display: flex; }
.modal {
  background: var(--paper); border-radius: 20px;
  max-width: 680px; width: 100%;
  padding: 32px;
  position: relative;
}
.modal-close {
  position: absolute; top: 18px; right: 18px;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--mist); border: none;
  color: var(--pencil); font-size: 18px; line-height: 1;
  transition: background .15s ease;
}
.modal-close:hover { background: var(--ash); }
.modal-head { display: flex; align-items: flex-start; gap: 16px; padding-right: 40px; }
.modal-head .avatar { width: 56px; height: 56px; font-size: 20px; }
.modal h3 { font-size: 24px; font-weight: 600; color: var(--carbon); line-height: 1.2; }
.modal .m-meta { margin-top: 6px; font-size: 15px; color: var(--pencil); }
.modal .m-meta b { color: var(--ink); font-weight: 500; }
.modal .tags { margin-top: 18px; }
.m-desc {
  margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--ash);
  font-size: 15.5px; line-height: 1.62; color: var(--ink);
  max-height: 340px; overflow-y: auto;
}
.m-desc p { margin-bottom: 12px; }
.m-actions { margin-top: 24px; display: flex; gap: 12px; align-items: center; }
.m-apply {
  background: var(--blue); color: #fff; border: none;
  font-size: 16px; font-weight: 500;
  padding: 13px 32px; border-radius: var(--r-btn);
  transition: background .15s ease, transform .1s ease;
  display: inline-block;
}
.m-apply:hover { background: var(--blue-deep); color: #fff; }
.m-apply:active { transform: scale(0.98); }
.m-save {
  background: var(--paper); border: 1px solid var(--chalk); color: var(--ink);
  font-size: 15px; font-weight: 500;
  padding: 12px 24px; border-radius: var(--r-btn);
  transition: border-color .15s ease, color .15s ease;
}
.m-save:hover { border-color: var(--blue); color: var(--blue); }
.m-src { margin-left: auto; font-size: 13px; color: var(--fog); }

/* ============ TOAST ============ */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(80px);
  background: var(--carbon); color: #fff;
  font-size: 14.5px; font-weight: 500;
  padding: 13px 24px; border-radius: var(--r-tag);
  z-index: 200; opacity: 0;
  transition: transform .3s cubic-bezier(0.16,1,0.3,1), opacity .3s ease;
  pointer-events: none;
  max-width: calc(100vw - 32px);
}
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }
