/* ---------------------------------------------------------------
   Portfolio careers — job board and job page. Loads after
   style.css and ventures.css and reuses their tokens and parts.
--------------------------------------------------------------- */

/* ---------------------------------------------------------------
   Board header
--------------------------------------------------------------- */
.jobs-hero {
  position: relative;
  background: linear-gradient(to bottom, var(--bg) 45%, rgba(236, 228, 205, 0));
}
.jobs-hero__inner {
  position: relative;
  max-width: calc(var(--max) + 2 * var(--side));
  padding: 96px var(--side) 48px;
}
.jobs-hero__body { display: grid; gap: 20px; }
.jobs-hero__title {
  font-family: var(--font-display);
  font-synthesis: none;
  font-weight: 400;
  font-size: clamp(40px, 4.8vw, 60px);
  line-height: 1.04;
  letter-spacing: -0.015em;
  margin: 0;
  text-wrap: balance;
}
.jobs-hero__lede {
  font-family: var(--font-display);
  font-synthesis: none;
  font-size: 18px;
  line-height: 1.55;
  margin: 0;
  max-width: 560px;
  opacity: 0.8;
}
.jobs-note {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin: 4px 0 0;
}

/* ---------------------------------------------------------------
   Board: sidebar | list
--------------------------------------------------------------- */
.board { padding: 16px var(--side) 120px; }
.board__inner {
  display: grid;
  grid-template-columns: var(--v-left) minmax(0, 1fr);
  gap: var(--v-gap);
  align-items: start;
}

.filters {
  position: sticky;
  top: 92px;
  /* the sidebar scrolls on its own, independent of the page */
  max-height: calc(100vh - 116px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(36, 31, 22, 0.3) transparent;
  padding-right: 10px;
  display: grid;
  gap: 24px;
  align-content: start;
}
.filters .search { max-width: none; width: 100%; justify-self: stretch; }
.filters__groups { display: grid; }
.filters__group { border-top: 1px solid rgba(36, 31, 22, 0.2); }
.filters__group:last-child { border-bottom: 1px solid rgba(36, 31, 22, 0.2); }
.filters__group summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 0;
  user-select: none;
}
.filters__group summary::-webkit-details-marker { display: none; }
.filters__group summary:hover .v-label { opacity: 0.7; }
.filters__group summary:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
/* selected-count badge, shown when a group has ticks */
.filters__sel {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--bg);
  background: var(--accent);
  padding: 2px 6px;
  line-height: 1.2;
}
.filters__sel:empty { display: none; }
/* toggle chevron */
.filters__group summary::after {
  content: '';
  margin-left: auto;
  width: 7px;
  height: 7px;
  border-right: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  transform: rotate(-45deg);
  opacity: 0.6;
  transition: transform 0.2s var(--ease-out);
}
.filters__group[open] summary::after { transform: rotate(45deg); }
.filters__options {
  display: grid;
  gap: 8px;
  padding: 2px 0 16px;
}
.check {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-synthesis: none;
  font-size: 14.5px;
  cursor: pointer;
  opacity: 0.85;
}
.check:hover { opacity: 1; }
.check input {
  appearance: none;
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  margin: 0;
  border: 1px solid rgba(36, 31, 22, 0.5);
  background: transparent;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.check input::after {
  content: '';
  width: 8px;
  height: 8px;
  background: var(--accent);
  transform: scale(0);
  transition: transform 120ms var(--ease-out);
}
.check input:checked::after { transform: scale(1); }
.check input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.check__count {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  opacity: 0.5;
}
.filters__clear {
  all: unset;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  justify-self: start;
}
.filters__clear:hover { opacity: 0.6; }
.filters__clear[hidden] { display: none; }

/* List */
.list__bar {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(36, 31, 22, 0.3);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.list__count { opacity: 0.6; }
.list__updated { margin-left: 14px; opacity: 0.7; }
.list__updated[hidden] { display: none; }
.list__sort {
  display: flex;
  align-items: center;
  gap: 8px;
}
.list__sort select {
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  color: var(--accent);
  background: transparent;
  border: 0;
  cursor: pointer;
}
.jobs { display: grid; }
.job-row {
  display: grid;
  grid-template-columns: 60px minmax(0, 1fr) auto;
  gap: 24px;
  align-items: start;
  padding: 26px 0;
  border-bottom: 1px solid rgba(36, 31, 22, 0.2);
  color: inherit;
  transition: opacity 0.2s ease;
}
.job-row:hover { opacity: 1; }
.job-row:hover .job-row__title { color: var(--accent); }
.job-row:hover .job-row__arrow { transform: translateX(4px); color: var(--accent); }
.logo-box {
  width: 60px;
  aspect-ratio: 1 / 1;
  display: block;
  overflow: hidden;
  border: 1px solid rgba(36, 31, 22, 0.2);
}
.logo-box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: var(--pad, 18%);
  box-sizing: border-box;
  display: block;
}
.logo-box--light { background: rgba(255, 252, 244, 0.7); }
.logo-box--page { background: transparent; }
.logo-box--ink { background: var(--tile-ink); border-color: var(--tile-ink); }
.logo-box--black { background: var(--tile-black); border-color: var(--tile-black); }
.logo-box--lg { width: 88px; }
.job-row__body { display: grid; gap: 8px; min-width: 0; }
.job-row__title {
  font-family: var(--font-title);
  font-synthesis: none;
  font-weight: 400;
  font-size: 21px;
  line-height: 1.2;
  letter-spacing: 0.01em;
  margin: 0;
  transition: color 0.2s ease;
}
.job-row__meta,
.job__meta {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  display: flex;
  flex-wrap: wrap;
  gap: 4px 0;
}
.job-row__meta span + span::before,
.job__meta span + span::before { content: '·'; margin: 0 10px; opacity: 0.6; }
.job-row__meta .job-row__company { color: var(--ink); }
.job-row__summary {
  font-family: var(--font-display);
  font-synthesis: none;
  font-size: 15px;
  line-height: 1.6;
  margin: 2px 0 0;
  opacity: 0.8;
  max-width: 62ch;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.job-row__arrow {
  font-family: var(--font-mono);
  font-size: 18px;
  padding-top: 4px;
  transition: transform 0.2s var(--ease-out), color 0.2s ease;
}
.job-row--sample .job-row__title::after {
  content: 'SAMPLE';
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.16em;
  vertical-align: middle;
  margin-left: 10px;
  padding: 2px 6px;
  border: 1px solid rgba(36, 31, 22, 0.3);
  color: var(--ink);
  opacity: 0.5;
}
.jobs__empty {
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.04em;
  padding: 40px 0;
  margin: 0;
  opacity: 0.6;
}
.jobs__empty[hidden] { display: none; }

/* ---------------------------------------------------------------
   Job page
--------------------------------------------------------------- */
.job-head {
  position: relative;
  background: linear-gradient(to bottom, var(--bg) 45%, rgba(236, 228, 205, 0));
}
.job-head__inner {
  position: relative;
  max-width: calc(var(--max) + 2 * var(--side));
  padding: 72px var(--side) 48px;
  display: grid;
  gap: 28px;
}
.job-head__back {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  justify-self: start;
}
.job-head__company {
  display: flex;
  align-items: center;
  gap: 20px;
}
.job-head__company-name {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.job-head__company-sector {
  font-family: var(--font-display);
  font-size: 14px;
  opacity: 0.6;
  margin-top: 4px;
}
.job__title {
  font-family: var(--font-display);
  font-synthesis: none;
  font-weight: 400;
  font-size: clamp(34px, 4.2vw, 54px);
  line-height: 1.06;
  letter-spacing: -0.012em;
  margin: 0;
  max-width: 20ch;
  text-wrap: balance;
}

.job-body { padding: 24px var(--side) 120px; }
.job-body__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 72px;
  align-items: start;
}
.job-content { display: grid; gap: 40px; max-width: 68ch; }
.job-content h2 {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 14px;
}
.job-content p {
  font-family: var(--font-display);
  font-synthesis: none;
  font-size: 16.5px;
  line-height: 1.75;
  margin: 0 0 14px;
}
.job-content ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}
.job-content li {
  font-family: var(--font-display);
  font-synthesis: none;
  font-size: 16px;
  line-height: 1.6;
  padding-left: 22px;
  position: relative;
}
.job-content li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.75em;
  width: 10px;
  height: 1px;
  background: var(--accent);
}
.job-sample {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  color: var(--accent);
  border: 1px solid rgba(142, 59, 36, 0.4);
  padding: 12px 16px;
}

.job-aside {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 28px;
  padding: 28px;
  background: var(--cream);
  border: 1px solid rgba(36, 31, 22, 0.2);
}
.apply-btn {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  background: var(--band-bg);
  color: var(--band-fg);
  padding: 20px 24px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  transition: background-color 0.25s var(--ease-out), transform 160ms var(--ease-out);
}
.apply-btn:hover { background: var(--accent); opacity: 1; }
.apply-btn:active { transform: scale(0.98); }
.job-facts {
  display: grid;
  gap: 14px;
  margin: 0;
}
.job-facts div {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 12px;
  align-items: baseline;
}
.job-facts dt {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.55;
}
.job-facts dd {
  margin: 0;
  font-family: var(--font-display);
  font-synthesis: none;
  font-size: 14.5px;
}
.job-aside__links {
  display: grid;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.job-aside__links a { color: var(--accent); justify-self: start; }

.job-more {
  padding: 0 var(--side) 120px;
}
.job-more__inner {
  border-top: 1px solid rgba(36, 31, 22, 0.3);
  padding-top: 48px;
}
.job-more__title {
  font-family: var(--font-title);
  font-synthesis: none;
  font-weight: 400;
  font-size: 26px;
  margin: 0 0 8px;
}
.job-more[hidden] { display: none; }

/* ---------------------------------------------------------------
   Responsive
--------------------------------------------------------------- */
@media (max-width: 1100px) {
  .board__inner { grid-template-columns: 1fr; gap: 40px; }
  .filters { position: static; max-height: none; overflow: visible; padding-right: 0; }
  .filters__groups { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0 32px; }
  .filters__group:last-child { border-bottom: 0; }
  .filters__group { border-bottom: 1px solid rgba(36, 31, 22, 0.2); }
  .job-body__inner { grid-template-columns: 1fr; gap: 48px; }
  .job-aside { position: static; }
}
/* Phone: the list comes first and the filters live in a drawer that slides
   in from the right behind a floating button. Desktop is untouched. */
.filters__toggle,
.filters__close,
.filters__backdrop { display: none; }
@media (max-width: 900px) {
  .board__inner { gap: 0; }
  .filters {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(86vw, 360px);
    max-height: none;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 72px 24px 40px;
    gap: 20px;
    background: var(--bg);
    border-left: 1px solid rgba(36, 31, 22, 0.25);
    box-shadow: -24px 0 48px rgba(36, 31, 22, 0.12);
    transform: translateX(100%);
    transition: transform 0.35s var(--ease-in-out);
    z-index: 130;
  }
  body.grain .filters {
    background-image: url('assets/images/paper.webp');
    background-size: 1480px 1480px;
    background-blend-mode: multiply;
  }
  body.filters-open .filters { transform: translateX(0); }
  .filters__groups { display: grid; grid-template-columns: 1fr; gap: 0; }
  .filters__group:last-child { border-bottom: 1px solid rgba(36, 31, 22, 0.2); }
  .filters__close {
    display: flex;
    position: absolute;
    top: 18px;
    right: 18px;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(36, 31, 22, 0.3);
    background: transparent;
    color: var(--ink);
    font-family: var(--font-mono);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
  }
  .filters__backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(36, 31, 22, 0.35);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 125;
  }
  body.filters-open .filters__backdrop { opacity: 1; pointer-events: auto; }
  body.filters-open { overflow: hidden; }
  .filters__toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    position: fixed;
    right: 16px;
    bottom: 22px;
    z-index: 120;
    border: 0;
    background: var(--band-bg);
    color: var(--band-fg);
    font-family: var(--font-mono);
    font-size: 11.5px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    padding: 14px 18px;
    border-radius: 999px;
    box-shadow: 0 8px 24px rgba(36, 31, 22, 0.25);
    cursor: pointer;
  }
  .filters__toggle-count {
    background: var(--accent);
    color: var(--bg);
    padding: 2px 7px;
    border-radius: 999px;
    font-size: 10px;
  }
  .filters__toggle-count:empty { display: none; }
  body.filters-open .filters__toggle { display: none; }
}
@media (max-width: 640px) {
  .job-row { grid-template-columns: 48px minmax(0, 1fr); gap: 16px; }
  .logo-box { width: 48px; }
  .job-row__arrow { display: none; }
  .job-row__title { font-size: 19px; }
  .jobs-hero__inner { padding: 72px var(--side) 32px; }
  .job-facts div { grid-template-columns: 1fr; gap: 4px; }
}
