/* ── Jobs page styles ── */

/* ── Hamburger ── */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: flex-end;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  width: 32px;
  flex-shrink: 0;
  justify-self: end;
}

.nav-hamburger span {
  display: block;
  height: 2px;
  background: var(--dark);
  transition: transform 0.22s ease, opacity 0.22s ease, width 0.22s ease;
}

.nav-hamburger span:nth-child(1) { width: 22px; }
.nav-hamburger span:nth-child(2) { width: 14px; }
.nav-hamburger span:nth-child(3) { width: 22px; }

header.nav-open .nav-hamburger span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
  width: 22px;
}

header.nav-open .nav-hamburger span:nth-child(2) {
  opacity: 0;
  width: 0;
}

header.nav-open .nav-hamburger span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
  width: 22px;
}

/* ── Mobile nav panel ── */
.mobile-nav {
  display: none;
  flex-direction: column;
  border-top: 1px solid rgba(13, 13, 13, 0.12);
  padding: 0.5rem 0 0.75rem;
}

.mobile-nav a {
  color: var(--dark);
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  padding: 0.9rem 0;
  border-bottom: 1px solid rgba(13, 13, 13, 0.07);
  transition: opacity 0.15s;
}

.mobile-nav a:last-child {
  border-bottom: none;
}

.mobile-nav a:hover {
  opacity: 0.55;
}

/* ── Mobile breakpoint ── */
@media (max-width: 768px) {
  header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0;
  }

  .logo {
    flex: 1;
  }

  .wordmark {
    width: min-content;
    white-space: normal;
    line-height: 1.25;
  }

  .nav-center {
    display: none;
  }

  .header-nav {
    display: none;
  }

  .nav-hamburger {
    display: flex;
  }

  .mobile-nav {
    width: 100%;
  }

  header.nav-open .mobile-nav {
    display: flex;
  }
}

/* ── Hero ── */
.jobs-hero {
  position: relative;
  z-index: 1;
  padding: 4rem 2.5rem 3rem;
  border-bottom: 2px solid var(--dark);
}

.jobs-eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  color: var(--muted);
  margin-bottom: 1rem;
}

.jobs-title {
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  font-size: clamp(2.8rem, 7vw, 5.5rem);
  letter-spacing: 0.02em;
  line-height: 0.92;
  color: var(--dark);
  margin-bottom: 1.5rem;
}

.jobs-lead {
  font-size: 0.88rem;
  line-height: 1.75;
  letter-spacing: 0.04em;
  color: rgba(0, 0, 0, 0.6);
  max-width: 520px;
  margin-bottom: 2rem;
}

.jobs-submit-btn {
  display: inline-block;
  background: var(--dark);
  color: var(--bg);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  padding: 12px 24px;
  text-decoration: none;
  transition: opacity 0.15s;
}

.jobs-submit-btn:hover {
  opacity: 0.82;
}

/* ── Main wrap ── */
.jobs-wrap {
  position: relative;
  z-index: 1;
  flex: 1;
  max-width: 1320px;
  width: 100%;
  margin: 0 auto;
  padding: 2rem 2.5rem 4rem;
}

/* ── Empty state ── */
.jobs-empty {
  text-align: center;
  padding: 4rem 0;
}

.jobs-empty-title {
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.1em;
  margin-bottom: 0.75rem;
}

.jobs-empty-sub {
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 2rem;
}

/* ── Job grid (responsive tiles) ── */
.jobs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: 1.1rem 1.25rem;
  align-items: stretch;
}

/* ── Job card ── */
.job-card {
  background: #111;
  color: var(--text-inv);
  border: 1px solid rgba(232, 93, 4, 0.25);
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 0 100%);
  position: relative;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

.job-card::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0 18px 18px 0;
  border-color: transparent var(--bg) transparent transparent;
}

.job-card:hover {
  border-color: rgba(232, 93, 4, 0.65);
  transform: translateY(-3px);
  box-shadow: 6px 6px 0 rgba(232, 93, 4, 0.35);
}

/* ── Orange accent rail ── */
.job-rail {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--bg), rgba(232, 93, 4, 0.3));
}

.job-inner {
  padding: 1.35rem 1.35rem 1.2rem 1.6rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* ── Card head: rank + votes ── */
.job-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.85rem;
}

.job-rank {
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.07);
  line-height: 1;
}

.job-votes-pill {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(232, 93, 4, 0.15);
  border: 1px solid rgba(232, 93, 4, 0.35);
  padding: 5px 12px;
  transition: background 0.15s, border-color 0.15s;
}

.job-card:hover .job-votes-pill {
  background: rgba(232, 93, 4, 0.25);
  border-color: rgba(232, 93, 4, 0.6);
}

.job-votes-arrow {
  font-size: 0.7rem;
  color: var(--bg);
  line-height: 1;
}

.job-votes-count {
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--bg);
  letter-spacing: 0.06em;
}

/* ── Title ── */
.job-title {
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  font-size: clamp(0.95rem, 2.2vw, 1.05rem);
  letter-spacing: 0.06em;
  line-height: 1.3;
  color: var(--text-inv);
  margin-bottom: 0.6rem;
}

/* ── Body excerpt ── */
.job-body {
  font-size: 0.78rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.45);
  margin-bottom: 0.75rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
  min-height: 0;
}

/* ── Footer: meta + CTA ── */
.job-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 0.85rem;
  margin-top: auto;
}

.job-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  min-width: 0;
  flex: 1;
}

.job-avatar {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.job-author {
  font-weight: 700;
  color: rgba(255, 255, 255, 0.5);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.job-sep {
  color: rgba(232, 93, 4, 0.3);
  font-size: 0.55rem;
  letter-spacing: 0.08em;
}

.job-time {
  color: rgba(255, 255, 255, 0.25);
}

.job-cta {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--dark);
  background: var(--bg);
  padding: 4px 10px;
  white-space: nowrap;
  transition: opacity 0.15s;
}

.job-card:hover .job-cta {
  opacity: 0.82;
}

/* ── Mobile ── */
@media (max-width: 600px) {
  .jobs-hero {
    padding: 3rem 1.5rem 2rem;
  }

  .jobs-wrap {
    padding: 1.5rem 1.5rem 3rem;
  }

  .job-rank {
    display: none;
  }

  .job-head {
    margin-bottom: 0.65rem;
  }

  .job-cta {
    display: none;
  }
}
