/* PAKLAB — Careers page */

.careers-hero {
  background: var(--ink);
  color: var(--bone);
  padding: 80px 0 100px;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line-dark);
}
.careers-hero .ch-meta {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  margin-bottom: 60px;
}
.careers-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(72px, 11vw, 200px);
  line-height: 0.84;
  letter-spacing: -0.015em;
  text-transform: uppercase;
  margin: 0 0 40px;
}
.careers-hero h1 .red { color: var(--red); }
.careers-hero h1 .out {
  -webkit-text-stroke: 2px #fff;
  color: transparent;
}
.careers-hero .ch-sub {
  font-size: 18px;
  line-height: 1.55;
  max-width: 640px;
  color: rgba(255,255,255,0.82);
  margin-bottom: 40px;
}
.careers-hero .ch-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid rgba(255,255,255,0.2);
  margin-top: 40px;
}
.careers-hero .ch-stat {
  padding: 24px 20px;
  border-right: 1px solid rgba(255,255,255,0.2);
}
.careers-hero .ch-stat:last-child { border-right: none; }
.careers-hero .ch-stat .big {
  font-family: var(--font-display);
  font-size: 56px;
  line-height: 0.9;
  letter-spacing: -0.01em;
}
.careers-hero .ch-stat .big .red { color: var(--red); }
.careers-hero .ch-stat .lab {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  margin-top: 10px;
}

/* Manifesto — WITH EDITORIAL ACCENTS */
.careers-manifesto {
  padding: 120px 0;
  border-bottom: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}
/* Giant ghost quote mark in background */
.careers-manifesto::before {
  content: '"';
  position: absolute;
  top: -80px;
  left: 60px;
  font-family: var(--font-display);
  font-size: clamp(240px, 36vw, 560px);
  line-height: 1;
  color: rgba(179, 0, 0, 0.05);
  font-weight: 700;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}
.careers-manifesto .container {
  position: relative;
  z-index: 1;
}
.cm-grid {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 40px;
  align-items: start;
}
.cm-grid .num { color: var(--red); font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.2em; }
.cm-body {
  border-left: 3px solid var(--red);
  padding-left: 32px;
}
.cm-body p {
  font-family: 'Oswald', var(--font-display);
  font-size: clamp(30px, 3.5vw, 52px);
  line-height: 1.15;
  letter-spacing: -0.005em;
  text-transform: none;
  font-weight: 500;
  margin: 0;
  padding: 18px 0;
  border-bottom: 1px solid rgba(10,10,10,0.08);
}
.cm-body p:first-child { padding-top: 0; }
.cm-body p:last-of-type { border-bottom: 0; }
.cm-body p .red {
  color: var(--red);
  font-weight: 700;
}
.cm-body p .out {
  color: var(--muted);
  text-decoration: line-through;
  text-decoration-color: var(--red);
  text-decoration-thickness: 4px;
  text-underline-offset: 0;
  font-weight: 400;
}

/* Chinese typography optimization for this block */
html[lang="zh-Hant"] .cm-body p,
:lang(zh-Hant) .cm-body p {
  font-family: 'Noto Sans TC', 'PingFang TC', 'Microsoft JhengHei', sans-serif;
  font-weight: 500;
  letter-spacing: 0.01em;
}
.cm-signoff {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
}

/* Roles */
.roles-section { padding: 100px 0; border-bottom: 1px solid var(--line); }
.roles-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 48px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}
.roles-head h2 {
  font-family: var(--font-display);
  font-size: clamp(56px, 7vw, 96px);
  line-height: 0.9;
  letter-spacing: -0.01em;
  margin: 0;
  text-transform: uppercase;
}
.roles-head .rh-filter {
  display: flex;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.roles-head .rh-filter span {
  padding: 6px 10px;
  border: 1px solid var(--line);
}
.roles-head .rh-filter span.active { background: var(--red); color: #fff; border-color: var(--red); }

.role-card {
  border: 1px solid var(--line);
  margin-bottom: 16px;
  overflow: hidden;
  transition: border-color .15s;
}
.role-card:hover { border-color: var(--ink); }
body.dark .role-card:hover { border-color: var(--bone); }
.role-card.urgent { border-color: var(--red); border-width: 1px; }

.role-head {
  display: grid;
  grid-template-columns: 80px 1.6fr 1fr 160px 40px;
  gap: 24px;
  padding: 28px 32px;
  align-items: center;
  cursor: pointer;
  background: transparent;
  transition: background .15s;
}
.role-head:hover { background: rgba(0,0,0,0.02); }
body.dark .role-head:hover { background: rgba(255,255,255,0.03); }
.role-card.open .role-head { background: var(--ink); color: var(--bone); border-bottom: 1px solid var(--line-dark); }
.role-card.open.urgent .role-head { background: var(--red); color: #fff; }

.role-head .r-num {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--red);
}
.role-card.open .role-head .r-num { color: #fff; }
.role-head .r-title {
  font-family: var(--font-display);
  font-size: clamp(36px, 4vw, 56px);
  line-height: 0.95;
  letter-spacing: -0.005em;
  text-transform: uppercase;
}
.role-head .r-title small {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--muted);
  margin-top: 6px;
  text-transform: uppercase;
  font-weight: 400;
}
.role-card.open .role-head .r-title small { color: rgba(255,255,255,0.65); }
.role-head .r-meta {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.role-card.open .role-head .r-meta { color: rgba(255,255,255,0.65); }
.role-head .r-badge {
  justify-self: end;
}
.role-head .r-badge span {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 6px 10px;
  border: 1px solid currentColor;
  white-space: nowrap;
}
.role-card.urgent .role-head .r-badge span {
  background: var(--red); color: #fff; border-color: var(--red);
}
.role-card.open.urgent .role-head .r-badge span {
  background: #fff; color: var(--red); border-color: #fff;
}
.role-head .r-toggle {
  font-family: var(--font-display);
  font-size: 28px;
  justify-self: end;
  transition: transform .2s;
  line-height: 1;
}
.role-card.open .role-head .r-toggle { transform: rotate(45deg); }

.role-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height .35s ease;
}
.role-card.open .role-body { max-height: 2400px; }
.role-body-inner {
  padding: 40px 32px 44px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  border-top: 1px solid var(--line);
}
.rb-block h4 {
  margin: 0 0 14px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--red);
}
.rb-block ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.rb-block li {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 12px;
  font-size: 15px;
  line-height: 1.5;
}
.rb-block li::before {
  content: '';
  display: block;
  width: 8px;
  height: 8px;
  background: var(--red);
  margin-top: 9px;
}
.rb-block p {
  margin: 0 0 12px;
  font-size: 15px;
  line-height: 1.55;
}
.rb-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.rb-tags span {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 5px 10px;
  border: 1px solid var(--line);
}

.role-foot {
  padding: 20px 32px;
  background: transparent;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.role-foot .rf-note {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.role-foot .rf-ctas { display: flex; gap: 10px; }

/* Stack / Tools — DARK VARIANT */
.stack-section {
  padding: 100px 0;
  background: var(--ink);
  color: var(--bone);
  position: relative;
  overflow: hidden;
  border-bottom: 0;
}
.stack-section::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--red);
  z-index: 2;
}
.stack-section .section-head h2,
.stack-section h2 { color: var(--bone); }
.stack-section .section-head .mono,
.stack-section .mono { color: rgba(255,255,255,0.5); }
.stack-section .section-head .n,
.stack-section .n { color: var(--red); }

.stack-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0;
  border-top: 1px solid rgba(255,255,255,0.12);
  border-left: 1px solid rgba(255,255,255,0.12);
  margin-top: 40px;
}
.stack-cell {
  padding: 28px 28px;
  border-right: 1px solid rgba(255,255,255,0.12);
  border-bottom: 1px solid rgba(255,255,255,0.12);
  transition: background 0.2s;
}
.stack-cell:hover {
  background: rgba(255,255,255,0.03);
}
.stack-cell .s-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--red);
  margin-bottom: 16px;
  text-transform: uppercase;
}
.stack-cell .s-items {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.stack-cell .s-items span {
  font-family: var(--font-display);
  font-size: 26px;
  letter-spacing: 0;
  text-transform: uppercase;
  line-height: 1.05;
  color: var(--bone);
}

/* Process timeline */
.process-section {
  padding: 100px 0;
  border-bottom: 1px solid var(--line);
}
.process-list {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
  margin-top: 40px;
}
.process-step {
  padding: 28px 24px 32px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  min-height: 260px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.process-step .ps-num {
  font-family: var(--font-display);
  font-size: 72px;
  line-height: 0.8;
  color: var(--red);
  letter-spacing: -0.02em;
}
.process-step .ps-title {
  font-family: var(--font-display);
  font-size: 24px;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: -0.005em;
}
.process-step .ps-desc {
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
  margin-top: auto;
}

/* General apply form */
.apply-section {
  padding: 100px 0;
  border-bottom: 1px solid var(--line);
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, var(--bone) 0%, rgba(244, 241, 236, 0.5) 100%);
}
/* Ghost "APPLY" decorative text in background */
.apply-section::before {
  content: 'APPLY';
  position: absolute;
  bottom: -60px;
  right: -40px;
  font-family: var(--font-display);
  font-size: clamp(240px, 34vw, 480px);
  font-weight: 700;
  line-height: 0.85;
  letter-spacing: -0.04em;
  color: rgba(10,10,10,0.035);
  pointer-events: none;
  user-select: none;
  z-index: 0;
}
.apply-section .container { position: relative; z-index: 1; }

.apply-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 60px;
  align-items: start;
}
.apply-left h2 {
  font-family: var(--font-display);
  font-size: clamp(56px, 7vw, 110px);
  line-height: 0.88;
  letter-spacing: -0.01em;
  margin: 0 0 24px;
  text-transform: uppercase;
}
.apply-left h2 .red { color: var(--red); }
.apply-left p {
  font-size: 16px;
  line-height: 1.55;
  color: var(--muted);
  max-width: 440px;
  margin: 0 0 24px;
}

.apply-form {
  border: 1px solid var(--line);
  padding: 36px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.apply-form .af-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-bottom: 1px solid var(--line);
  padding-bottom: 16px;
  margin-bottom: 6px;
}
.apply-form .af-title {
  font-family: var(--font-display);
  font-size: 32px;
  letter-spacing: -0.005em;
  text-transform: uppercase;
}
.apply-form .af-code {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--muted);
}
.apply-form label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  display: block;
  margin-bottom: 8px;
}
.apply-form input,
.apply-form select,
.apply-form textarea {
  width: 100%;
  border: none;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: inherit;
  font-family: var(--font-body);
  font-size: 15px;
  padding: 8px 0;
  outline: none;
  transition: border-color .15s;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  border-radius: 0;
}
.apply-form select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%23999' d='M0 0h10L5 6z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 4px center;
  padding-right: 20px;
}
.apply-form input:focus,
.apply-form select:focus,
.apply-form textarea:focus { border-color: var(--red); }
.apply-form textarea { min-height: 90px; resize: vertical; }
.af-row { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.af-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.af-pills label {
  border: 1px solid var(--line);
  padding: 8px 14px;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: inherit;
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: border-color .15s, background .15s, color .15s;
}
.af-pills label input { display: none; }
.af-pills label.checked { background: var(--red); color: #fff; border-color: var(--red); }

.apply-form .submit-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.apply-form .submit-row .note {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--muted);
}
.apply-form button[type=submit] {
  background: var(--red);
  color: #fff;
  padding: 14px 24px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.apply-form button[type=submit]:hover { background: var(--red-deep); }

/* responsive */
@media (max-width: 900px) {
  .careers-hero .ch-stats { grid-template-columns: 1fr 1fr; }
  .careers-hero .ch-stat:nth-child(2) { border-right: none; }
  .cm-grid { grid-template-columns: 1fr; gap: 16px; }
  .role-head { grid-template-columns: 40px 1fr 40px; gap: 16px; padding: 22px 20px; }
  .role-head .r-meta, .role-head .r-badge { display: none; }
  .role-body-inner { grid-template-columns: 1fr; padding: 28px 20px; gap: 28px; }
  .role-foot { padding: 16px 20px; }
  .stack-grid { grid-template-columns: 1fr 1fr; }
  .process-list { grid-template-columns: 1fr 1fr; }
  .apply-grid { grid-template-columns: 1fr; gap: 32px; }
  .af-row { grid-template-columns: 1fr; gap: 18px; }
  .apply-form { padding: 24px; }
  .roles-head { flex-direction: column; align-items: flex-start; gap: 16px; }
}

/* ============================================================= */
/* === CAREERS — COMPREHENSIVE MOBILE OPTIMIZATION ============ */
/* ============================================================= */
@media (max-width: 768px) {
  /* Hero */
  .careers-hero { padding: 80px 0 60px; }
  .careers-hero h1 { font-size: clamp(56px, 16vw, 110px) !important; line-height: 0.86; }
  .careers-hero .ch-body { font-size: 14px; line-height: 1.5; }
  .careers-hero .ch-ctas { flex-wrap: wrap; gap: 10px; }
  .careers-hero .ch-ctas a {
    flex: 1 1 45%;
    justify-content: center;
    text-align: center;
    padding: 12px 14px;
    font-size: 11px;
  }
  .careers-hero .ch-stats { grid-template-columns: 1fr 1fr; }
  .careers-hero .ch-stat { padding: 18px 16px; }
  .careers-hero .ch-stat .big { font-size: clamp(36px, 11vw, 56px); }

  /* Commitment ("WHY") block */
  .careers-manifesto { padding: 72px 0; }
  .careers-manifesto::before {
    font-size: clamp(160px, 48vw, 280px) !important;
    top: -40px !important;
    left: 0 !important;
  }
  .cm-body {
    padding-left: 18px !important;
    border-left-width: 2px !important;
  }
  .cm-body p {
    font-size: clamp(22px, 6.2vw, 38px) !important;
    line-height: 1.2 !important;
    padding: 14px 0 !important;
  }
  .cm-grid .num { font-size: 10px; }

  /* Stack (tools) */
  .stack-grid { grid-template-columns: 1fr 1fr; gap: 14px; }
  .stack-cell { padding: 18px 16px; }
  .stack-cell .s-label { font-size: 9px; }
  .stack-cell .s-items span { font-size: 14px; line-height: 1.4; }

  /* Process (fixed: ps- not p-, compact layout) */
  .process-section { padding: 60px 0 !important; }
  .process-list {
    grid-template-columns: 1fr 1fr !important;
    gap: 0 !important;
  }
  .process-step {
    padding: 18px 16px 20px !important;
    min-height: 140px !important;
    gap: 8px !important;
  }
  .process-step .ps-num {
    font-size: 32px !important;
    line-height: 0.9 !important;
  }
  .process-step .ps-title {
    font-size: 16px !important;
    line-height: 1.1 !important;
  }
  .process-step .ps-desc {
    font-size: 11.5px !important;
    line-height: 1.5 !important;
    margin-top: 4px !important;
  }

  /* Roles section */
  .roles-head h2 { font-size: clamp(44px, 12vw, 72px); }
  .role-card { margin-bottom: 10px; }
  .role-head {
    grid-template-columns: 36px 1fr 32px !important;
    padding: 18px 16px !important;
    gap: 12px !important;
  }
  .role-head .r-title { font-size: 22px !important; line-height: 1.05; }
  .role-head .r-meta, .role-head .r-badge { display: none; }
  .role-body-inner { padding: 24px 16px !important; gap: 22px !important; }
  .role-body-inner h4 { font-size: 10px; }
  .role-body-inner p { font-size: 13px; line-height: 1.55; }
  .role-body-inner li { font-size: 12px; }
  .role-foot { padding: 14px 16px !important; flex-wrap: wrap; gap: 8px; }
  .role-toolkit { flex-wrap: wrap; gap: 4px; }
  .role-toolkit span { font-size: 9px; padding: 3px 7px; }

  /* Application form */
  .apply-grid { grid-template-columns: 1fr !important; gap: 28px; }
  .apply-lede h2 { font-size: clamp(44px, 12vw, 72px) !important; line-height: 0.9; }
  .apply-lede p { font-size: 13px; }
  .apply-form { padding: 24px 20px !important; }
  .af-pills { flex-wrap: wrap; gap: 6px; }
  .af-pills label {
    flex: 1 1 calc(50% - 3px);
    text-align: center;
    padding: 8px 6px;
    font-size: 10px;
  }
  .af-row { grid-template-columns: 1fr; gap: 18px; }
  .af-title { font-size: 24px; }
  .af-code { font-size: 9px; }
  .apply-form label { font-size: 9px; }
  .apply-form input, .apply-form select, .apply-form textarea { font-size: 14px; }
  .submit-row { flex-direction: column; align-items: stretch; gap: 14px; }
  .submit-row button { justify-content: center; padding: 14px 18px; }
}

@media (max-width: 420px) {
  .careers-hero h1 { font-size: clamp(42px, 13vw, 72px) !important; }
  .stack-grid { grid-template-columns: 1fr; }
  .process-list { grid-template-columns: 1fr 1fr !important; }
  .process-step { padding: 14px 12px 16px !important; min-height: 120px !important; }
  .process-step .ps-num { font-size: 28px !important; }
  .process-step .ps-title { font-size: 14px !important; }
  .process-step .ps-desc { font-size: 11px !important; }
  .cm-body p { font-size: clamp(20px, 5.8vw, 32px) !important; }
  .cm-body { padding-left: 14px !important; }
}
