/* Job board. Shares tokens and shell with base.css. */

.nav__link.is-active {
  color: var(--text);
  font-weight: 500;
}

.jobs {
  position: relative;
  padding: calc(var(--nav-height) + 44px) 0 88px;
}

.jobs::before {
  content: "";
  position: absolute;
  z-index: 0;
  top: 0;
  left: 50%;
  width: min(1200px, 100%);
  height: 520px;
  transform: translateX(-50%);
  background:
    radial-gradient(38% 55% at 18% 18%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 70%),
    radial-gradient(32% 50% at 82% 8%, rgba(109, 91, 208, 0.12), transparent 70%);
  pointer-events: none;
}

.jobs > .container {
  position: relative;
  z-index: 1;
  max-width: 920px;
}

/* Head */

/* Same title and lede as the tracker. */
.jobs__head {
  margin-bottom: 28px;
}

.jobs__title {
  font-size: clamp(30px, 4.3vw, 44px);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.05;
}

.jobs__lede {
  margin-top: 12px;
  max-width: 42rem;
  color: var(--text-secondary);
  font-size: 16px;
  line-height: 1.55;
}

/* Search bar: one pill that stays in reach while scrolling. */

.bar {
  position: sticky;
  z-index: 20;
  top: calc(var(--nav-height) + 10px);
  margin-bottom: 14px;
}

.bar__box {
  display: flex;
  align-items: center;
  height: 60px;
  padding: 0 8px 0 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  box-shadow: 0 1px 2px rgba(22, 22, 26, 0.04), 0 18px 40px -18px rgba(22, 22, 26, 0.22);
  backdrop-filter: blur(14px) saturate(1.4);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.bar__box:focus-within {
  border-color: color-mix(in srgb, var(--accent) 50%, var(--border));
  box-shadow: 0 0 0 4px var(--accent-soft), 0 18px 40px -18px rgba(22, 22, 26, 0.25);
}

.bar__icon {
  flex: none;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: var(--text-muted);
  stroke-width: 2;
  stroke-linecap: round;
}

.bar__q,
.bar__where,
.bar__country {
  min-width: 0;
  height: 100%;
  border: 0;
  background: transparent;
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  outline: none;
}

.bar__q {
  flex: 1 1 auto;
  padding: 0 12px;
  font-weight: 500;
}

.bar__where {
  flex: 0 1 150px;
  padding: 0 14px;
}

.bar__q::placeholder,
.bar__where::placeholder {
  color: var(--text-muted);
  font-weight: 400;
}

.bar__q::-webkit-search-cancel-button,
.bar__where::-webkit-search-cancel-button {
  display: none;
}

.bar__country {
  flex: 0 0 auto;
  max-width: 190px;
  padding: 0 30px 0 14px;
  background: 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='%238a8a94' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.bar__country option {
  background: var(--bg);
  color: var(--text);
}

.bar__kbd {
  flex: none;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-right: 6px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 12px;
}

.bar__box:focus-within .bar__kbd {
  opacity: 0;
}

.bar__split {
  flex: none;
  width: 1px;
  height: 26px;
  background: var(--border);
}

.bar__go {
  flex: none;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-left: 4px;
  border: 0;
  border-radius: 50%;
  background: var(--text);
  color: var(--on-strong);
  cursor: pointer;
  transition: transform 0.18s ease, background-color 0.18s ease;
}

.bar__go:hover {
  background: var(--primary-hover);
  transform: translateX(2px);
}

.bar__go svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Filters */

.bar__filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 0 6px;
}

.chips {
  display: flex;
  gap: 6px;
}

.chip {
  height: 32px;
  padding: 0 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.chip:hover {
  border-color: var(--border-strong);
  color: var(--text);
}

.chip[aria-pressed="true"] {
  border-color: var(--text);
  background: var(--text);
  color: var(--on-strong);
}

.bar__dot {
  width: 3px;
  height: 3px;
  margin: 0 2px;
  border-radius: 50%;
  background: var(--border-strong);
}

.seg {
  position: relative;
  display: flex;
  margin-left: auto;
  padding: 3px;
  border-radius: var(--radius-pill);
  background: var(--surface-alt);
}

.seg__glide {
  position: absolute;
  top: 3px;
  left: 0;
  bottom: 3px;
  border-radius: var(--radius-pill);
  background: var(--bg);
  box-shadow: 0 1px 3px rgba(22, 22, 26, 0.12);
  transition: transform 0.28s cubic-bezier(0.3, 0.7, 0.2, 1), width 0.28s cubic-bezier(0.3, 0.7, 0.2, 1);
}

.seg__opt {
  position: relative;
  height: 26px;
  padding: 0 12px;
  border: 0;
  background: none;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.2s ease;
}

.seg__opt[aria-pressed="true"] {
  color: var(--text);
}

/* Profile note */

.tuned {
  display: flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin: 4px 0 0;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  color: var(--text-secondary);
  font-size: 13px;
}

.tuned[hidden] {
  display: none;
}

.tuned svg {
  width: 15px;
  height: 15px;
  fill: var(--accent);
}

.tuned a {
  color: var(--accent);
  font-weight: 500;
  text-decoration: none;
}

.tuned a:hover {
  text-decoration: underline;
}

.jobs__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 16px;
  margin: 26px 4px 10px;
}

.jobs__count {
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.jobs__status {
  color: var(--text-secondary);
  font-size: 13px;
}

/* List: rows that open in place. */

.list {
  margin: 0;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: var(--bg);
  list-style: none;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.list:empty {
  display: none;
}

.job {
  position: relative;
  border-top: 1px solid var(--border);
  animation: job-in 0.45s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  animation-delay: calc(var(--i, 0) * 18ms);
}

.job:first-child {
  border-top: 0;
}

@keyframes job-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

.job__row {
  position: relative;
}

.job__toggle {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 16px 22px;
  border: 0;
  background: none;
  color: inherit;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.job__toggle:hover,
.job.is-open .job__toggle {
  background: var(--surface);
}

.job__toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.logo {
  flex: none;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: hsl(var(--h, 210) 70% 94%);
  color: hsl(var(--h, 210) 45% 32%);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.logo {
  position: relative;
  overflow: hidden;
}

.logo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 7px;
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.logo.has-img {
  border: 1px solid var(--border);
  background: #fff;
  color: transparent;
}

.logo.has-img img {
  opacity: 1;
}

:root[data-theme="dark"] .logo:not(.has-img) {
  background: hsl(var(--h, 210) 30% 20%);
  color: hsl(var(--h, 210) 60% 78%);
}

.job__main {
  flex: 1 1 auto;
  min-width: 0;
}

.job__title {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
  color: var(--text);
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.35;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.job__new {
  flex: none;
  padding: 1px 7px;
  border-radius: var(--radius-pill);
  background: color-mix(in srgb, #22a05a 14%, transparent);
  color: #1c8a4c;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

:root[data-theme="dark"] .job__new {
  color: #5fd08f;
}

.job__meta {
  display: flex;
  margin-top: 3px;
  overflow: hidden;
  color: var(--text-secondary);
  font-size: 13.5px;
  white-space: nowrap;
}

.job__meta > span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.job__meta > span:first-child {
  flex: none;
  color: var(--text);
  font-weight: 500;
}

.job__meta > span + span::before {
  content: "\00b7";
  margin: 0 7px;
  color: var(--text-muted);
}

.job__via {
  flex: none;
  color: var(--text-muted);
}

.job__side {
  flex: none;
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--text-muted);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.job__pay {
  color: var(--text);
  font-weight: 500;
}

.job__age {
  min-width: 26px;
  text-align: right;
}

.fit {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent);
  font-weight: 500;
}

.fit__bars {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 12px;
}

.fit__bars i {
  width: 3px;
  border-radius: 2px;
  background: var(--border-strong);
}

.fit__bars i:nth-child(1) { height: 5px; }
.fit__bars i:nth-child(2) { height: 7px; }
.fit__bars i:nth-child(3) { height: 10px; }
.fit__bars i:nth-child(4) { height: 12px; }

.fit__bars i.is-on {
  background: var(--accent);
}

/* The quick Tailor slides in over the row's numbers on hover. */
.job__quick {
  position: absolute;
  top: 50%;
  right: 18px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 15px 0 12px;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--text);
  color: var(--on-strong);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translate(8px, -50%);
  transition: opacity 0.18s ease, transform 0.18s ease, background-color 0.15s ease;
}

.job__quick svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

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

@media (hover: hover) {
  .job__row:hover .job__quick,
  .job__quick:focus-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translate(0, -50%);
  }

  .job__row:hover .job__side,
  .job__row:has(.job__quick:focus-visible) .job__side {
    opacity: 0;
    transform: translateX(-8px);
  }
}

/* Open state */

.job__more {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.3s cubic-bezier(0.3, 0.7, 0.2, 1);
}

.job.is-open .job__more {
  grid-template-rows: 1fr;
}

.job__inner {
  min-height: 0;
  overflow: hidden;
  padding: 0 22px 0 80px;
  background: var(--surface);
}

.job.is-open .job__inner {
  padding-bottom: 18px;
}

.job__snippet {
  max-width: 62ch;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
}

.have {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
}

.have__label {
  margin-right: 2px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.have__tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px 3px 7px;
  border-radius: var(--radius-pill);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12.5px;
  font-weight: 500;
}

.have__tag svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.job__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 16px;
}

.job__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
  font-size: 13.5px;
  font-weight: 500;
  text-decoration: none;
}

.job__link:hover {
  color: var(--text);
}

.job__link svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.job__tailor svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.18s ease;
}

.job__tailor:hover svg {
  transform: translateX(3px);
}

.job__tailor {
  text-decoration: none;
}

/* Loading */

.job.is-skel {
  animation: none;
}

.job.is-skel .job__toggle {
  cursor: default;
}

.job.is-skel .logo,
.skel {
  background: linear-gradient(90deg, var(--surface-alt) 0%, var(--surface) 50%, var(--surface-alt) 100%) 0 0 / 200% 100%;
  animation: skel 1.3s linear infinite;
}

.skel {
  display: block;
  height: 12px;
  border-radius: 6px;
}

.skel--title { width: 46%; height: 14px; }
.skel--meta { width: 30%; margin-top: 9px; }
.skel--side { width: 70px; }

@keyframes skel {
  to { background-position: -200% 0; }
}

/* Empty, more, credit */

.empty {
  padding: 56px 20px;
  border: 1px dashed var(--border-strong);
  border-radius: 22px;
  text-align: center;
}

.empty__title {
  color: var(--text);
  font-size: 17px;
  font-weight: 600;
}

.empty__hint {
  max-width: 40ch;
  margin: 6px auto 0;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.5;
}

.jobs__sentinel {
  height: 1px;
}

.jobs__more {
  display: flex;
  justify-content: center;
  margin-top: 20px;
}

.jobs__credit {
  max-width: 56ch;
  margin: 40px auto 0;
  color: var(--text-muted);
  font-size: 12.5px;
  line-height: 1.7;
  text-align: center;
}

.jobs__credit a {
  color: var(--text-secondary);
  text-decoration: none;
  border-bottom: 1px solid var(--border-strong);
}

.jobs__credit a:hover {
  color: var(--text);
}

@media (prefers-reduced-motion: reduce) {
  .job,
  .skel,
  .job.is-skel .logo {
    animation: none;
  }

  .job__more,
  .seg__glide {
    transition: none;
  }
}

/* Small screens: the bar folds to two lines, Tailor is always in reach. */

@media (max-width: 720px) {
  .jobs {
    padding-top: calc(var(--nav-height) + 32px);
  }

  .bar {
    top: calc(var(--nav-height) + 6px);
  }

  .bar__box {
    flex-wrap: wrap;
    height: auto;
    padding: 6px 6px 6px 16px;
    border-radius: 24px;
  }

  .bar__q {
    flex-basis: calc(100% - 90px);
    height: 44px;
  }

  .bar__kbd,
  .bar__split {
    display: none;
  }

  .bar__where,
  .bar__country {
    order: 3;
    flex: 1 1 40%;
    height: 40px;
    border-top: 1px solid var(--border);
  }

  .bar__where {
    padding-left: 0;
  }

  .bar__go {
    order: 1;
  }

  .bar__filters {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 2px 0;
    scrollbar-width: none;
    -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent);
    mask-image: linear-gradient(90deg, #000 88%, transparent);
  }

  .bar__filters::-webkit-scrollbar {
    display: none;
  }

  .chips,
  .chip,
  .seg,
  .bar__dot {
    flex: none;
  }

  .seg {
    margin-right: 24px;
  }

  .job__toggle {
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
  }

  .logo {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    font-size: 12px;
  }

  .job__title {
    white-space: normal;
  }

  .job__side {
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
  }

  .job__side .job__pay,
  .fit > span:last-child {
    display: none;
  }

  .job__quick {
    display: none;
  }

  .job__inner {
    padding: 0 16px 0 64px;
  }
}
