:root {
  /* Brand palette */
  --brand: #06979f;
  --brand-deep: #057a81;
  --brand-soft: #e1f3f4;
  --on-brand: #ffffff;
  --ink: #16161d;
  --muted: #6b6b76;
  --bg: #f7f7f9;
  --card: #ffffff;
  --line: #ececf0;
  --radius: 18px;
  --radius-lg: 26px;
  --shadow: 0 6px 24px rgba(22, 22, 29, 0.07);
  --shadow-hover: 0 10px 30px rgba(22, 22, 29, 0.12);
  font-family: "Nunito", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

.hidden { display: none !important; }

/* ---------- Top bar ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 28px;
  background: var(--card);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
}

.logo {
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  color: var(--brand);
}
.logo-text {
  font-weight: 900;
  font-size: 32px;
  letter-spacing: -0.6px;
}

.auth { display: flex; align-items: center; gap: 10px; }

.btn-ghost {
  border: none;
  background: transparent;
  font-family: inherit;
  font-weight: 800;
  font-size: 15px;
  color: var(--ink);
  cursor: pointer;
  padding: 10px 14px;
  border-radius: 999px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
.nav-links { display: inline-flex; align-items: center; gap: 2px; }
.btn-ghost:hover { background: #f0f0f3; }

.btn-pill {
  border: none;
  background: var(--brand);
  font-family: inherit;
  font-weight: 900;
  font-size: 15px;
  color: var(--on-brand);
  cursor: pointer;
  padding: 10px 20px;
  border-radius: 999px;
  box-shadow: var(--shadow);
  transition: transform 0.08s ease;
}
.btn-pill:hover { background: var(--brand-deep); }
.btn-pill:active { transform: scale(0.97); }

/* ---------- Landing ---------- */
.home {
  max-width: 860px;
  margin: 0 auto;
  padding: 80px 24px 60px;
  text-align: center;
}
.hero-title {
  font-size: clamp(22px, 5.4vw, 52px);
  font-weight: 900;
  letter-spacing: -1.5px;
  margin: 0 0 14px;
  line-height: 1.05;
  white-space: nowrap;
}
.hero-accent { color: var(--brand); }
.hero-sub {
  font-size: clamp(10px, 2.2vw, 18px);
  color: var(--muted);
  font-weight: 600;
  margin: 0 0 40px;
  white-space: nowrap;
}

/* ---------- Search bar ---------- */
.searchbar {
  display: flex;
  gap: 10px;
  background: var(--card);
  padding: 12px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  align-items: stretch;
}
.searchbar--compact {
  max-width: 980px;
  margin: 22px auto 8px;
  border-radius: var(--radius);
}

.field {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg);
  border: 2px solid transparent;
  border-radius: 14px;
  padding: 0 14px;
  transition: border-color 0.12s ease, background 0.12s ease;
}
.field:focus-within {
  background: #fff;
  border-color: var(--brand);
}
.field-icon { display: flex; align-items: center; color: #a0a0aa; }
.field-icon svg { display: block; }
.field:focus-within .field-icon { color: var(--brand); }
.field input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  padding: 16px 0;
  min-width: 0;
}
.field input::placeholder { color: #a0a0aa; font-weight: 600; }

.btn-search {
  border: none;
  background: var(--brand);
  color: var(--on-brand);
  font-family: inherit;
  font-weight: 900;
  font-size: 16px;
  padding: 0 30px;
  border-radius: 14px;
  cursor: pointer;
  transition: transform 0.08s ease, background 0.12s ease;
}
.btn-search:hover { background: var(--brand-deep); }
.btn-search:active { transform: scale(0.98); }

/* ---------- Results ---------- */
.results { max-width: 1100px; margin: 0 auto; padding: 8px 16px 60px; }
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  max-width: 980px;
  margin: 14px auto 6px;
  padding: 0 4px;
}
.sort {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  color: var(--muted);
}
/* Sort: label sits outside the dropdown; panel opens right-aligned */
.sort-wrap { display: flex; align-items: center; gap: 8px; }
.sort-label { font-weight: 800; font-size: 13px; color: var(--muted); }
.sort-filter .filter-panel { left: auto; right: 0; min-width: 170px; }
.sort-filter .filter-btn { padding: 8px 16px; }

/* Filter pills + dropdown panels */
.filter { position: relative; }
.filter-btn {
  font-family: inherit;
  font-weight: 800;
  font-size: 14px;
  color: var(--ink);
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: 999px;
  padding: 10px 20px;
  text-align: center;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.12s ease, background 0.12s ease, color 0.12s ease;
}
.filter-btn:hover { border-color: #d2d2da; }
.filter.open .filter-btn { border-color: var(--brand); }
.filter.active .filter-btn {
  border-color: var(--brand);
  background: var(--brand-soft);
  color: var(--brand-deep);
}

.filter-panel[hidden] { display: none; }
.filter-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 30;
  min-width: 230px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-hover);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.opt {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 12px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 700;
  font-size: 14px;
  color: var(--ink);
}
.opt:hover { background: var(--bg); }
.opt input { width: 17px; height: 17px; accent-color: var(--brand); cursor: pointer; margin: 0; }
.filter-apply {
  margin-top: 8px;
  border: none;
  background: var(--brand);
  color: var(--on-brand);
  font-family: inherit;
  font-weight: 800;
  font-size: 14px;
  padding: 11px;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.12s ease;
}
.filter-apply:hover { background: var(--brand-deep); }

.left-col { min-width: 0; }
.list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 4px 2px 12px;
}
.result-count { font-weight: 800; font-size: 16px; color: var(--ink); }
.sort { flex-direction: row; align-items: center; gap: 8px; }
.sort > span { color: var(--muted); font-size: 13px; }
.sort select { padding: 7px 10px; border-radius: 10px; }

.split {
  display: grid;
  grid-template-columns: minmax(320px, 420px) 1fr;
  gap: 18px;
  align-items: start;
}

.job-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: calc(100vh - 180px);
  overflow-y: auto;
  padding-right: 4px;
}

.job-card {
  position: relative;
  background: var(--card);
  border: 2px solid transparent;
  border-radius: var(--radius);
  padding: 16px 18px;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: transform 0.08s ease, border-color 0.12s ease, box-shadow 0.12s ease;
}

.card-save {
  position: absolute;
  top: 12px;
  right: 12px;
  border: none;
  background: transparent;
  color: #b6b6c0;
  cursor: pointer;
  padding: 5px;
  border-radius: 9px;
  display: inline-flex;
  transition: color 0.1s ease, background 0.1s ease;
}
.card-save svg { display: block; }
.card-save:hover { color: var(--ink); background: #f0f0f3; }
.card-save.saved { color: var(--brand); }
.card-save.saved svg { fill: currentColor; }
.job-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-1px); }
.job-card.active { border-color: var(--brand); }

.job-card h3 {
  margin: 0 0 4px;
  padding-right: 30px;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.3px;
}
.job-card .company { font-weight: 700; color: var(--ink); font-size: 14px; }
.job-card .meta { color: var(--muted); font-size: 13.5px; font-weight: 600; margin-top: 2px; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 10px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  background: var(--brand-soft);
  color: var(--brand-deep);
}
.badge.high { background: #d9f7d2; color: #2c6b1e; }
.badge.medium { background: #fff2c2; color: #7a5d00; }
.badge.low { background: #ffe2d6; color: #8a3a18; }

/* ---------- Detail ---------- */
.detail {
  position: sticky;
  top: 90px;
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 26px 28px;
  max-height: calc(100vh - 110px);
  overflow-y: auto;
}
.detail-empty { color: var(--muted); font-weight: 700; padding: 40px 0; text-align: center; }
.detail h2 { margin: 0 0 6px; font-size: 32px; font-weight: 900; letter-spacing: -0.8px; line-height: 1.12; }
.detail .d-company { font-weight: 800; font-size: 16px; }
.detail .d-meta { color: var(--muted); font-weight: 600; margin: 4px 0 18px; }

.actions { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 20px; }
.action {
  border: 2px solid var(--line);
  background: #fff;
  font-family: inherit;
  font-weight: 800;
  font-size: 14px;
  color: var(--ink);
  padding: 10px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.1s ease, border-color 0.1s ease, transform 0.08s ease;
}
.action:hover { background: #f6f6f9; }
.action:active { transform: scale(0.97); }
.action.primary { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.action.primary:hover { background: var(--brand-deep); border-color: var(--brand-deep); }
.action.saved { background: #d9f7d2; border-color: #bfe9b3; color: #2c6b1e; }

.action-right { margin-left: auto; display: flex; gap: 9px; }
.action.icon { padding: 10px 13px; display: inline-flex; align-items: center; justify-content: center; }
.action svg { display: block; }
.action.saved svg { fill: currentColor; }

.report-row { margin-top: 22px; border-top: 1px solid var(--line); padding-top: 16px; }
.action.subtle { border-color: transparent; background: transparent; color: var(--muted); padding: 8px 12px; font-size: 13.5px; }
.action.subtle:hover { background: #f6f6f9; color: var(--ink); }

.reason-box {
  background: #e7f6f7;
  border: 1.5px solid #bfe4e6;
  border-radius: 14px;
  padding: 12px 14px;
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 20px;
}
.reason-box .label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--brand); display: block; margin-bottom: 3px; }

.d-desc {
  font-size: 15px;
  line-height: 1.6;
  color: #33333d;
  font-weight: 500;
  white-space: pre-wrap;
}

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--ink);
  color: #fff;
  font-weight: 800;
  font-size: 14px;
  padding: 12px 20px;
  border-radius: 999px;
  box-shadow: var(--shadow-hover);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.empty-state {
  text-align: center;
  color: var(--muted);
  font-weight: 700;
  padding: 50px 20px;
}

/* ---------- Profile page ---------- */
.profile-page { padding: 28px 16px 80px; }
.profile-inner { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 34px; }

/* Profile header (avatar, name, contact, privacy bar) */
.profile-header {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.ph-banner { height: 116px; background: var(--brand-soft); }
.ph-body { padding: 0 24px 22px; }
.ph-avatar {
  width: 108px; height: 108px; border-radius: 50%;
  background: var(--ink); border: 5px solid var(--card);
  margin-top: -54px;
}
.ph-namerow { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; }
.ph-name { margin: 0; font-size: 24px; font-weight: 900; letter-spacing: -0.5px; }
.ph-contact { display: flex; flex-wrap: wrap; gap: 14px 28px; margin-top: 16px; }
.ph-item { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: 15px; color: var(--ink); }
.ph-item svg { flex: none; }
.ph-privacy {
  display: flex; align-items: center; flex-wrap: wrap; gap: 16px;
  margin-top: 24px; padding-top: 22px; border-top: 1px solid var(--line);
}
.ph-priv-icon {
  width: 44px; height: 44px; border-radius: 12px; flex: none;
  display: grid; place-items: center; background: #fce6d5; color: #9a5a25;
}
.ph-priv-icon.public { background: var(--brand-soft); color: var(--brand-deep); }
.ph-priv-text { flex: 1; min-width: 180px; }
.ph-priv-title { display: flex; align-items: center; gap: 6px; font-weight: 900; font-size: 16px; }
.ph-priv-title svg { color: var(--muted); }
.ph-priv-sub { color: var(--muted); font-weight: 600; font-size: 14px; margin-top: 2px; line-height: 1.4; }
.ph-toggle {
  border: none; background: var(--brand); color: var(--on-brand);
  font-family: inherit; font-weight: 900; font-size: 15px;
  padding: 13px 22px; border-radius: 12px; cursor: pointer; flex: none;
  transition: background 0.12s ease;
}
.ph-toggle:hover { background: var(--brand-deep); }
.ph-preview {
  border: none; background: transparent; font-family: inherit;
  font-weight: 900; font-size: 15px; color: var(--ink); cursor: pointer; flex: none;
}
.ph-preview:hover { text-decoration: underline; }

.completion {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 22px 24px;
}
.completion-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.completion-head h2 { margin: 0; font-size: 24px; font-weight: 900; letter-spacing: -0.5px; }
.completion-sub { margin: 2px 0 0; color: var(--muted); font-weight: 700; font-size: 14px; }
.completion-ring {
  width: 56px; height: 56px; border-radius: 50%; flex: none;
  background: conic-gradient(var(--brand) calc(var(--pct) * 1%), var(--line) 0);
  display: grid; place-items: center; position: relative;
}
.completion-ring::before { content: ""; position: absolute; inset: 6px; background: var(--card); border-radius: 50%; }
.completion-ring span { position: relative; font-size: 12px; font-weight: 900; color: var(--brand-deep); }
.progress { height: 8px; background: var(--bg); border-radius: 999px; margin: 16px 0 6px; overflow: hidden; }
.progress-bar { height: 100%; background: var(--brand); border-radius: 999px; transition: width 0.25s ease; }

.checklist { list-style: none; margin: 10px 0 0; padding: 0; }
.check-row {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 6px; border-top: 1px solid var(--line);
  font-weight: 800; font-size: 15px; cursor: pointer; color: var(--ink);
}
.check-row:hover { color: var(--brand-deep); }
.check-dot { width: 18px; height: 18px; border: 2px solid var(--line); border-radius: 50%; flex: none; }
.check-row .chev { margin-left: auto; color: var(--muted); font-size: 20px; font-weight: 700; }
.all-done { color: var(--brand-deep); font-weight: 800; margin: 12px 0 0; }

.psection-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.psection-head h2 { margin: 0; font-size: 22px; font-weight: 900; letter-spacing: -0.5px; }
.add-btn {
  border: 2px solid var(--line); background: var(--card);
  font-family: inherit; font-weight: 800; font-size: 14px; color: var(--ink);
  padding: 9px 16px; border-radius: 999px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 4px; white-space: nowrap;
  transition: border-color 0.12s ease, background 0.12s ease, color 0.12s ease;
}
.add-btn:hover { border-color: var(--brand); color: var(--brand-deep); }
.add-btn--solid { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.add-btn--solid:hover { background: var(--brand-deep); border-color: var(--brand-deep); color: var(--on-brand); }
.empty-hint { color: var(--muted); font-weight: 600; font-size: 14px; margin: 0; }

.about-card .about-name { font-size: 18px; font-weight: 900; }
.about-card .about-headline { font-weight: 700; margin-top: 2px; }
.about-card .about-loc { color: var(--muted); font-weight: 700; margin-top: 4px; font-size: 14px; }

.entry {
  display: flex; gap: 12px; align-items: flex-start; justify-content: space-between;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px; margin-bottom: 12px;
}
.entry-title { font-weight: 800; font-size: 16px; }
.entry-sub { color: var(--muted); font-weight: 700; font-size: 14px; margin-top: 2px; }
.entry-desc { margin-top: 8px; font-size: 14px; line-height: 1.5; color: #33333d; font-weight: 500; white-space: pre-wrap; }
.entry-actions { display: flex; gap: 8px; flex: none; }
.entry-edit, .entry-del {
  border: none; background: transparent; font-family: inherit; font-weight: 800;
  font-size: 13px; cursor: pointer; padding: 6px 10px; border-radius: 8px;
}
.entry-edit { color: var(--brand-deep); }
.entry-edit:hover { background: var(--brand-soft); }
.entry-del { color: var(--muted); }
.entry-del:hover { background: #f6f6f9; color: var(--ink); }

.skill-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.skill-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--brand-soft); color: var(--brand-deep);
  font-weight: 800; font-size: 14px; padding: 7px 12px; border-radius: 999px;
}
.skill-chip button { border: none; background: transparent; color: inherit; font-size: 16px; cursor: pointer; line-height: 1; padding: 0; }

.resume-row { display: flex; align-items: center; gap: 12px; }
.resume-file { font-weight: 800; }
.profile-disclaimer { color: var(--muted); font-size: 13px; font-weight: 600; line-height: 1.5; margin: 0; }

/* ---------- Modal ---------- */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(22, 22, 29, 0.45);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal {
  background: var(--card); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-hover); width: 100%; max-width: 460px;
  max-height: 90vh; overflow-y: auto; padding: 22px 24px;
}
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.modal-head h2 { margin: 0; font-size: 22px; font-weight: 900; letter-spacing: -0.5px; }
.modal-close { border: none; background: transparent; color: var(--muted); cursor: pointer; padding: 4px; border-radius: 8px; display: inline-flex; }
.modal-close:hover { background: #f0f0f3; color: var(--ink); }
.modal-body { display: flex; flex-direction: column; gap: 14px; }
.mfield { display: flex; flex-direction: column; gap: 5px; font-weight: 800; font-size: 13px; color: var(--muted); }
.mfield input, .mfield textarea {
  font-family: inherit; font-size: 15px; font-weight: 600; color: var(--ink);
  background: var(--bg); border: 2px solid transparent; border-radius: 12px; padding: 12px 14px;
}
.mfield textarea { min-height: 110px; resize: vertical; }
.mfield--check { flex-direction: row; align-items: center; gap: 9px; color: var(--ink); font-size: 14px; cursor: pointer; }
.mfield--check input { width: 17px; height: 17px; accent-color: var(--brand); margin: 0; cursor: pointer; }
.mfield input:focus, .mfield textarea:focus { outline: none; background: #fff; border-color: var(--brand); }
.modal-save {
  margin-top: 18px; width: 100%; border: none; background: var(--brand); color: var(--on-brand);
  font-family: inherit; font-weight: 900; font-size: 16px; padding: 14px; border-radius: 14px; cursor: pointer;
  transition: background 0.12s ease;
}
.modal-save:hover { background: var(--brand-deep); }

/* ---------- Auth ---------- */
.user-menu { display: inline-flex; align-items: center; gap: 10px; }
.user-email { font-weight: 800; font-size: 14px; color: var(--ink); max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.google-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%;
  border: 2px solid var(--line); background: #fff; font-family: inherit; font-weight: 800;
  font-size: 15px; color: var(--ink); padding: 12px; border-radius: 12px; cursor: pointer;
  transition: background 0.12s ease;
}
.google-btn:hover { background: var(--bg); }
.auth-divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-weight: 700; font-size: 13px; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth-error { color: #c0392b; font-weight: 700; font-size: 13px; margin: 0; }
.auth-toggle { text-align: center; font-weight: 700; font-size: 14px; color: var(--muted); margin: 14px 0 0; }
.auth-toggle button { border: none; background: transparent; color: var(--brand-deep); font-family: inherit; font-weight: 900; font-size: 14px; cursor: pointer; }
.auth-toggle button:hover { text-decoration: underline; }
.auth-modal .signup-only { display: none; }
.auth-modal.show-signup .signup-only { display: flex; }

/* ---------- My Jobs ---------- */
.myjobs-page { padding: 28px 16px 80px; }
.myjobs-inner { max-width: 760px; margin: 0 auto; }
.page-title { font-size: 28px; font-weight: 900; letter-spacing: -0.6px; margin: 0 0 18px; }
.myjobs-list { max-height: none; overflow: visible; }
.myjobs-list .job-card { cursor: default; }
.myjobs-list .job-card:hover { transform: none; }
.myjobs-actions { display: flex; gap: 9px; margin-top: 14px; }

/* ---------- Avatar photo ---------- */
.ph-avatar { position: relative; background-size: cover; background-position: center; cursor: pointer; overflow: hidden; }
.ph-avatar-edit {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, 0.45); color: #fff; font-weight: 800; font-size: 12px;
  opacity: 0; transition: opacity 0.12s ease;
}
.ph-avatar:hover .ph-avatar-edit { opacity: 1; }

/* ---------- Responsive ---------- */
.burger { display: none; border: none; background: transparent; color: var(--ink); cursor: pointer; padding: 6px; border-radius: 10px; }
.burger:hover { background: #f0f0f3; }
.detail-back { display: none; align-items: center; gap: 4px; border: none; background: transparent; color: var(--brand-deep); font-family: inherit; font-weight: 800; font-size: 15px; cursor: pointer; padding: 4px 0; margin-bottom: 8px; }

@media (max-width: 820px) {
  .searchbar { flex-direction: column; }
  .btn-search { padding: 16px; }
  .split { grid-template-columns: 1fr; }
  .job-list { max-height: none; overflow: visible; }
  .detail { position: static; max-height: none; }
  .entry { flex-direction: column; }
  .entry-actions { align-self: flex-end; }
}

@media (max-width: 640px) {
  /* Hero: stack the two sentences; readable tagline */
  .hero-title { white-space: nowrap; font-size: clamp(28px, 9.5vw, 42px); letter-spacing: -0.8px; line-height: 1.15; }
  .hero-accent { display: block; }
  .hero-sub { white-space: normal; font-size: 15px; line-height: 1.5; max-width: 340px; margin: 0 auto 32px; }
  .home { padding: 48px 18px; }

  /* Burger only when signed in (there are nav links to collapse) */
  body.logged-in .burger { display: inline-flex; }
  body.logged-in .auth {
    display: none; position: absolute; top: 100%; right: 12px; left: 12px;
    flex-direction: column; align-items: stretch; gap: 4px;
    background: var(--card); border: 1px solid var(--line); border-radius: 16px;
    box-shadow: var(--shadow-hover); padding: 10px; z-index: 50;
  }
  body.logged-in .auth.open { display: flex; }
  .nav-links { flex-direction: column; align-items: stretch; gap: 2px; }
  .nav-links .btn-ghost { justify-content: flex-start; padding: 12px 14px; }
  .user-menu { width: 100%; }
  .user-menu .btn-ghost { width: 100%; justify-content: center; }
  /* Signed out: keep Sign in / Register inline (no burger) */
  #authButtons { display: inline-flex; gap: 8px; }

  /* Filter dropdowns become bottom sheets so they never overflow / shrink the page */
  .filter-panel, .sort-filter .filter-panel {
    position: fixed; left: 0; right: 0; bottom: 0; top: auto;
    min-width: 0; border-radius: 18px 18px 0 0; max-height: 72vh; overflow-y: auto;
    box-shadow: 0 -10px 30px rgba(22, 22, 29, 0.18);
  }

  /* Profile readability */
  .profile-page { padding: 16px 12px 60px; }
  .profile-inner { gap: 26px; }
  .ph-body { padding: 0 16px 18px; }
  .ph-avatar { width: 88px; height: 88px; margin-top: -44px; }
  .ph-namerow { flex-direction: row; align-items: center; justify-content: space-between; gap: 12px; }
  .ph-name { font-size: 22px; }
  .ph-contact { gap: 10px 18px; }
  .ph-privacy { flex-direction: column; align-items: flex-start; gap: 12px; }
  .ph-toggle, .ph-preview { width: 100%; text-align: center; }
  .psection-head h2 { font-size: 20px; }
  .page-title { font-size: 24px; }

  /* Job detail opens as a full-screen popup (Indeed-style) */
  .detail {
    position: fixed; inset: 0; z-index: 80; margin: 0; border-radius: 0;
    max-height: none; overflow-y: auto; padding: 16px 16px 48px; display: none;
  }
  body.detail-open .detail { display: block; }
  .detail-back { display: inline-flex; }
}
