:root {
  --ink: #14221f;
  --ink-soft: #2b3d38;
  --paper: #efe6d6;
  --surface: #fffaf2;
  --sand: #f4ead8;
  --line: rgba(20, 34, 31, 0.1);
  --line-strong: rgba(20, 34, 31, 0.22);
  --muted: #5d6b66;
  --low: #7a8682;
  --accent: #e24b1a;
  --accent-hover: #c43d12;
  --gold: #f3c15a;
  --gold-deep: #d7a12e;
  --teal: #1f7a6c;
  --select: #f8e6d2;
  --shadow: 0 18px 40px rgba(20, 34, 31, 0.08);
  --nav-h: 64px;
  --radius: 16px;
  --font: "Manrope", "Segoe UI", system-ui, sans-serif;
  --display: "Fraunces", Georgia, serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  background:
    radial-gradient(900px 320px at 8% -8%, rgba(226, 75, 26, 0.12), transparent 55%),
    radial-gradient(700px 380px at 100% 0%, rgba(31, 122, 108, 0.1), transparent 50%),
    var(--paper);
  color: var(--ink);
  font-family: var(--font);
}

body {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

body.drawer-expanded {
  padding-right: 188px;
}

a {
  color: var(--accent);
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

.boot-banner {
  display: none;
  margin: 0;
  padding: 10px 16px;
  background: var(--accent);
  color: #fff;
  font-size: 14px;
}

.boot-banner.is-on {
  display: block;
}

.boot-banner a {
  color: #fff;
  font-weight: 700;
  text-decoration: underline;
}

.global-nav {
  flex: 0 0 var(--nav-h);
  background: var(--ink);
  color: #f7efe2;
  z-index: 20;
}

.nav-inner {
  max-width: 1180px;
  height: var(--nav-h);
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}

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

.brand-mark {
  display: block;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  box-shadow: 0 0 0 1px rgba(243, 193, 90, 0.28);
  background: #0e1916;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.brand-copy strong {
  font-family: var(--display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.brand-copy em {
  font-style: normal;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
}

.nav-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(320px, 32vw);
  height: 38px;
  padding: 0 14px;
  background: rgba(255, 250, 242, 0.1);
  border: 1px solid rgba(243, 193, 90, 0.18);
  border-radius: 999px;
  color: rgba(247, 239, 226, 0.7);
}

.nav-search input {
  flex: 1;
  border: 0;
  background: transparent;
  outline: none;
  color: #fffaf2;
  min-width: 0;
}

.nav-go {
  height: 26px;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  background: var(--gold);
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.nav-go:hover {
  background: #ffe08a;
}

.nav-search input::placeholder {
  color: rgba(247, 239, 226, 0.55);
}

.nav-apps {
  display: flex;
  margin-left: auto;
  height: 100%;
  gap: 4px;
}

.nav-app {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  padding: 0 8px;
  color: rgba(247, 239, 226, 0.68);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
}

.nav-app svg {
  display: block;
}

.nav-app:hover,
.nav-app.is-on {
  color: #fffaf2;
}

.nav-app.is-on::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 8px;
  height: 3px;
  border-radius: 99px;
  background: var(--gold);
}

.drawer-fab {
  position: fixed;
  top: calc(50% - 28px);
  right: 0;
  z-index: 30;
  width: 56px;
  height: 56px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 16px 0 0 16px;
  background: var(--ink);
  color: #fff;
  box-shadow: -6px 8px 24px rgba(20, 34, 31, 0.28);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.drawer-fab:hover {
  transform: translateX(-4px);
}

.drawer-fab .avatar {
  width: 34px;
  height: 34px;
  font-size: 13px;
  position: relative;
  z-index: 1;
}

.drawer-fab-glow {
  position: absolute;
  inset: 8px;
  border-radius: 12px 0 0 12px;
  background: radial-gradient(circle at 30% 30%, rgba(243, 193, 90, 0.35), transparent 70%);
  pointer-events: none;
  animation: fab-pulse 2.4s ease-in-out infinite;
}

@keyframes fab-pulse {
  0%,
  100% {
    opacity: 0.55;
    transform: scale(0.96);
  }
  50% {
    opacity: 1;
    transform: scale(1.05);
  }
}

body.drawer-expanded .drawer-fab {
  opacity: 0;
  pointer-events: none;
  transform: translateX(20px);
}

.avatar {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
}

.avatar.lg {
  width: 44px;
  height: 44px;
  font-size: 16px;
  flex: 0 0 auto;
}

.side-drawer {
  position: fixed;
  top: var(--nav-h);
  right: 0;
  bottom: 0;
  z-index: 28;
  width: min(220px, 88vw);
  background: var(--ink);
  color: #f7efe2;
  border-left: 1px solid rgba(243, 193, 90, 0.16);
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 8px 16px;
  overflow: auto;
  transform: translateX(105%);
  transition: transform 0.22s ease;
  box-shadow: -12px 0 32px rgba(20, 34, 31, 0.18);
}

.side-drawer.is-open {
  transform: translateX(0);
}

.side-drawer[hidden] {
  display: flex !important;
}

.drawer-head {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  border-bottom: 1px solid rgba(255, 250, 242, 0.1);
  padding-bottom: 8px;
}

.drawer-close {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 10px;
  background: rgba(255, 250, 242, 0.08);
  color: #f7efe2;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  flex: 0 0 auto;
}

.drawer-close:hover {
  background: rgba(255, 250, 242, 0.16);
}

.drawer-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 6px 12px;
  min-height: 64px;
  flex: 1;
  min-width: 0;
}

.drawer-profile-copy {
  min-width: 0;
  flex: 1;
}

.drawer-profile-copy strong {
  display: block;
  font-size: 13px;
  line-height: 1.2;
}

.drawer-profile-copy p {
  margin: 4px 0 0;
  color: rgba(247, 239, 226, 0.62);
  font-size: 11px;
  line-height: 1.35;
}

.drawer-icons {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.drawer-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  padding: 0 10px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: rgba(247, 239, 226, 0.82);
  cursor: pointer;
  text-align: left;
  text-decoration: none;
  font: inherit;
  font-weight: 600;
  font-size: 13px;
}

.drawer-item:hover {
  background: rgba(255, 250, 242, 0.08);
  color: #fffaf2;
}

.drawer-ico {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border-radius: 10px;
  background: rgba(243, 193, 90, 0.12);
  color: var(--gold);
}

.drawer-label {
  white-space: nowrap;
}

.drawer-sep {
  height: 1px;
  margin: 8px 6px;
  background: rgba(255, 250, 242, 0.1);
}

.upload-btn {
  display: block;
  width: 100%;
  text-align: center;
  background: var(--accent);
  color: #fff;
  border-radius: 12px;
  padding: 8px 12px;
  cursor: pointer;
  font-weight: 700;
  margin: 4px 0 8px;
}

.upload-btn.compact {
  width: auto;
  margin: 0;
  height: 34px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  font-size: 13px;
  white-space: nowrap;
}

.upload-btn:hover {
  background: var(--accent-hover);
}

.jobs-search {
  background: transparent;
}

.jobs-search-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 18px 20px 8px;
  display: flex;
  gap: 10px;
  align-items: center;
}

.combo {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  height: 48px;
  padding: 0 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--muted);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset;
}

.combo:focus-within {
  border-color: var(--gold-deep);
  box-shadow: 0 0 0 3px rgba(243, 193, 90, 0.28);
}

.combo input {
  flex: 1;
  border: 0;
  background: transparent;
  outline: none;
  color: var(--ink);
  font-size: 15px;
  min-width: 0;
}

.btn-primary,
.btn-secondary {
  height: 48px;
  padding: 0 22px;
  border: 0;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-secondary {
  background: transparent;
  color: var(--ink);
  box-shadow: inset 0 0 0 1.5px var(--line-strong);
}

.btn-secondary:hover {
  background: var(--sand);
}

.filter-bar {
  background: transparent;
  z-index: 10;
}

.filter-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 8px 20px 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.cv-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.cv-pills .filter-note {
  margin: 0;
  display: inline-flex;
  align-items: center;
  height: 32px;
}

.pill {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.pill:hover {
  border-color: var(--ink);
}

.pill.is-on {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--gold);
}

.pill.ghost {
  color: var(--accent);
  border-color: rgba(226, 75, 26, 0.45);
  background: transparent;
}

.pill-select {
  position: relative;
  padding-right: 28px;
}

.pill-select::after {
  content: "";
  position: absolute;
  right: 12px;
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
}

.pill-select select {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
}

.jobs-shell {
  flex: 1;
  min-height: 0;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 4px 20px 20px;
  display: grid;
  grid-template-columns: minmax(280px, 420px) minmax(0, 1fr);
  gap: 16px;
}

.jobs-list,
.jobs-detail {
  background: var(--surface);
  border-radius: 22px;
  box-shadow: var(--shadow), 0 0 0 1px var(--line);
  min-height: 0;
  overflow: auto;
}

.list-head {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--surface);
  padding: 18px 18px 14px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.list-head h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.list-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.feed {
  display: flex;
  flex-direction: column;
}

.job-card {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 28px;
  gap: 12px;
  padding: 14px 14px 14px 18px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  text-align: left;
  cursor: pointer;
  width: 100%;
  color: inherit;
  appearance: none;
}

.co-wrap {
  position: relative;
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}

.job-card:hover {
  background: var(--sand);
}

.job-card.is-on {
  background: var(--select);
  box-shadow: inset 4px 0 0 var(--accent);
}

.co-logo,
.co-mark {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  object-fit: contain;
  background: #fff;
  border: 0;
}

.co-wrap .co-logo {
  position: absolute;
  inset: 0;
  background: #fff;
}

.co-mark {
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 700;
  font-size: 20px;
  border: 0;
}

.job-card h3 {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.job-card.is-on h3,
.job-card:hover h3 {
  color: var(--accent);
}

.job-card .company {
  margin: 2px 0 0;
  font-size: 14px;
}

.job-card .loc {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.job-card .meta {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.easy {
  color: var(--teal);
  font-weight: 700;
}

.insight {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.insight.egypt {
  color: var(--teal);
  font-weight: 700;
}

.bookmark {
  background: none;
  border: 0;
  color: var(--low);
  cursor: pointer;
  padding: 4px;
  align-self: start;
}

.bookmark.is-on {
  color: var(--accent);
}

.jobs-detail {
  padding: 0;
}

.detail-top {
  padding: 24px 28px 18px;
  border-bottom: 1px solid var(--line);
}

.detail-kicker {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.detail-top h1 {
  margin: 0;
  font-family: var(--display);
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.detail-sub {
  margin: 8px 0 0;
  font-size: 14px;
}

.detail-sub span {
  color: var(--muted);
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.detail-actions .btn-primary,
.detail-actions .btn-secondary {
  height: 38px;
  padding: 0 16px;
  font-size: 14px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.detail-about {
  padding: 22px 28px 36px;
}

.detail-about h2 {
  margin: 0 0 12px;
  font-family: var(--display);
  font-size: 22px;
}

.detail-about p {
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.65;
  color: var(--ink-soft);
}

.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
}

.skill-pill {
  background: var(--sand);
  color: var(--ink);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 13px;
  font-weight: 700;
}

.back {
  display: none;
  background: none;
  border: 0;
  color: var(--muted);
  cursor: pointer;
  margin: 0 0 8px;
  padding: 0;
  font-size: 14px;
}

.empty {
  padding: 48px 24px;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(20, 34, 31, 0.62);
  display: grid;
  place-items: center;
  z-index: 40;
  padding: 24px;
}

.modal[hidden] {
  display: none;
}

.modal-card {
  width: min(744px, 100%);
  max-height: min(720px, 90vh);
  background: var(--surface);
  border-radius: 22px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
}

.modal-card header,
.modal-card footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}

.modal-card footer {
  border-bottom: 0;
  border-top: 1px solid var(--line);
  justify-content: flex-end;
  gap: 8px;
}

.modal-card h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 24px;
}

.icon-x {
  width: 40px;
  height: 40px;
  border: 0;
  background: none;
  font-size: 28px;
  color: var(--muted);
  cursor: pointer;
  border-radius: 50%;
}

.icon-x:hover {
  background: var(--sand);
}

.modal-body {
  overflow: auto;
  padding: 8px 16px 20px;
}

.filter-label {
  margin: 16px 0 8px;
  font-size: 15px;
  font-weight: 700;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: #fff;
  cursor: pointer;
  color: var(--ink);
  font-weight: 600;
}

.chip.is-on {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--gold);
}

.chip b {
  font-weight: 700;
}

.filter-note {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.sources label.src,
.src {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 14px;
  cursor: pointer;
}

.src .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.src.is-ok .dot {
  background: var(--teal);
}

@media (max-width: 860px) {
  body {
    overflow: auto;
    padding-right: 0;
  }

  body.drawer-expanded {
    padding-right: 0;
  }

  .nav-app > span {
    display: none;
  }

  .nav-search {
    width: min(220px, 42vw);
  }

  .nav-search input {
    font-size: 13px;
  }

  .brand-copy em {
    display: none;
  }

  .nav-app {
    min-width: 48px;
  }

  .drawer-fab {
    top: auto;
    bottom: 20px;
    right: 16px;
    border-radius: 18px;
    width: 58px;
    height: 58px;
  }

  .side-drawer {
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: auto;
    max-height: 48vh;
    border-left: 0;
    border-top: 1px solid rgba(243, 193, 90, 0.16);
    transform: translateY(110%);
    border-radius: 18px 18px 0 0;
  }

  .side-drawer.is-open {
    transform: translateY(0);
  }

  .drawer-icons {
    flex-direction: row;
    flex-wrap: wrap;
    width: 100%;
    justify-content: center;
  }

  .drawer-item {
    width: auto;
    min-width: 64px;
    flex-direction: column;
    gap: 4px;
    padding: 8px;
  }

  .drawer-label {
    font-size: 11px;
  }

  .drawer-sep {
    display: none;
  }

  .jobs-search-inner {
    flex-wrap: wrap;
  }

  .jobs-shell {
    grid-template-columns: 1fr;
    height: auto;
    overflow: visible;
  }

  .jobs-list,
  .jobs-detail {
    overflow: visible;
  }

  .jobs-detail {
    display: none;
  }

  .jobs-shell.show-detail .jobs-list {
    display: none;
  }

  .jobs-shell.show-detail .jobs-detail {
    display: block;
  }

  .back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
  }
}
