/* Final visual quality pass. Kept separate so the core design remains easy to update. */
:root {
  --quality-shadow: 0 16px 40px rgba(30, 52, 84, .09);
  --quality-shadow-soft: 0 8px 24px rgba(30, 52, 84, .065);
}

body {
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.site-header {
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  box-shadow: 0 1px 0 rgba(30, 52, 84, .035);
  -webkit-backdrop-filter: blur(14px) saturate(145%);
  backdrop-filter: blur(14px) saturate(145%);
}

.brand { transition: opacity .18s ease, transform .18s ease; }
.brand:hover { opacity: .82; transform: translateY(-1px); }

#main-content { min-height: calc(100vh - 250px); }

.main-nav a,
.mobile-nav-panel a { font-size: 13px; }

.main-nav a {
  border-radius: 8px;
  padding: 7px 9px;
  transition: color .18s ease, background-color .18s ease;
}

.main-nav a:hover { background: rgba(36, 87, 178, .07); }
.main-nav a.is-current { background: rgba(36, 87, 178, .09); color: var(--blue); font-weight: 700; }

.btn {
  min-height: 40px;
  padding: 9px 15px;
  font-size: 13px;
  font-weight: 650;
  border-radius: 10px;
  transition: transform .16s ease, box-shadow .16s ease, background-color .16s ease;
}

.btn:hover { transform: translateY(-1px); }
.btn.primary:hover { box-shadow: 0 8px 20px rgba(36, 87, 178, .22); }

.hero { padding-top: clamp(36px, 5vw, 64px); }
.hero p,
.lead { font-size: 15px; line-height: 1.65; }

.search-box {
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(36, 87, 178, .14);
  border-radius: 16px;
  box-shadow: var(--quality-shadow);
}

.autocomplete-field,
.autocomplete-field > .field,
.search-box > .field {
  width: 100%;
  min-width: 0;
}

.field {
  font-size: 14px;
  border-radius: 10px;
  transition: border-color .18s ease, box-shadow .18s ease;
}

.field:focus {
  border-color: #3b6fc9;
  box-shadow: 0 0 0 3px rgba(36, 87, 178, .12);
  outline: 0;
}

.results-grid { grid-template-columns: 230px minmax(0, 1fr); gap: 22px; }

.filters,
.results {
  border: 1px solid rgba(30, 52, 84, .1);
  border-radius: 14px;
  background: var(--surface, #fff);
  box-shadow: var(--quality-shadow-soft);
}

.filters { padding: 16px; }
.filters label,
.filters legend,
.check { font-size: 12px; line-height: 1.4; }
.check { min-height: 30px; align-items: center; }

.results { padding: 20px; }
.results-head { margin-bottom: 16px; }
.results h2 { font-size: 20px; letter-spacing: -.015em; }

.vacancy-card {
  border-radius: 13px;
  padding: 20px;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.vacancy-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--quality-shadow-soft);
}

.empty {
  min-height: 210px;
  margin: 16px;
  padding: 36px 24px;
  border: 1px dashed rgba(36, 87, 178, .2);
  border-radius: 13px;
  background: linear-gradient(145deg, rgba(36, 87, 178, .035), rgba(56, 149, 118, .025));
  color: var(--muted, #627083);
  font-size: 14px;
}

/* Compact empty states live inside list/table surfaces and need their own inset. */
.data-table > .empty,
.table-list > .empty,
.project-list > .empty,
.resume-grid > .empty,
.application-chat > .empty {
  min-height: 132px;
  padding: 28px 22px;
}

.data-table > .data-head + .empty { margin-top: 16px; }

.vacancy-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.vacancy-empty-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 12px;
  border-radius: 50%;
  background: rgba(36, 87, 178, .09);
  color: #2457b2;
  font-size: 27px;
  line-height: 1;
}

.vacancy-empty strong { color: var(--text, #172033); font-size: 17px; }
.vacancy-empty p { max-width: 470px; margin: 7px 0 17px; }

.site-footer { font-size: 12px; }
.site-footer .footer-row { gap: 18px; }
.footer-brand { display: inline-block !important; color: var(--text) !important; font-size: 18px !important; font-weight: 800; letter-spacing: -.04em; }
.footer-brand span { color: var(--blue); }
.footer a,
.footer-link-button { transition: color .18s ease; }
.footer a:hover,
.footer-link-button:hover { color: var(--blue); }
.legal-links { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.legal-links a { font-size: 12px; line-height: 1.45; }
.legal-links span { margin-left: auto; color: var(--muted); font-size: 11px; }

@media (max-width: 900px) {
  body { font-size: 14px; }
  .hero { padding-top: 30px; }
  .hero p, .lead { font-size: 14px; }
  .search-box { padding: 10px; border-radius: 14px; }
  .search-box .btn { width: 100%; }
  .results-grid { display: block; }
  .results { padding: 16px; border-radius: 13px; }
  .results-head { gap: 10px; align-items: flex-start; }
  .empty { min-height: 210px; margin: 12px; padding: 32px 18px; }
  .data-table > .empty,
  .table-list > .empty,
  .project-list > .empty,
  .resume-grid > .empty,
  .application-chat > .empty { min-height: 124px; padding: 24px 16px; }
  .mobile-nav > summary {
    min-width: 62px;
    min-height: 40px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface2);
    font-size: 12px;
    font-weight: 700;
  }
  .mobile-nav[open] > summary { color: var(--blue); border-color: color-mix(in srgb, var(--blue) 30%, var(--line)); }
  .mobile-nav-panel {
    top: calc(100% + 10px);
    padding: 8px;
    border-radius: 14px;
    background: var(--surface);
    box-shadow: 0 20px 50px rgba(28, 36, 48, .2);
  }
  .mobile-nav-panel > a {
    min-height: 43px;
    display: flex;
    align-items: center;
    padding: 9px 11px;
    border: 0;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 600;
  }
  .mobile-nav-panel > a:hover { background: var(--surface2); color: var(--blue); }
}

@media (max-width: 520px) {
  .container { width: min(var(--max), calc(100% - 28px)); }
  .site-header .container { width: calc(100% - 24px); }
  .hero h1 { font-size: clamp(29px, 9vw, 38px); line-height: 1.08; }
  .results { padding: 14px; }
  .results h2 { font-size: 18px; }
  .sort-select { max-width: 150px; }
  .site-footer { padding-block: 24px; }
  .site-footer .footer-row { align-items: flex-start; }
  .legal-links { gap: 7px 13px; }
  .legal-links span { width: 100%; margin-left: 0; }
  .footer-row { gap: 22px; }
  .footer-row > div:not(:first-child) { padding-top: 2px; }
}

@media (prefers-reduced-motion: reduce) {
  .btn,
  .field,
  .vacancy-card,
  .main-nav a,
  .brand,
  .footer a { transition: none; }
}
