:root {
  --color-bg: #f6f8fb;
  --color-surface: #ffffff;
  --color-text: #172033;
  --color-muted: #5f6f89;
  --color-border: #d9e1ec;
  --color-brand: #006fca;
  --color-brand-dark: #004d91;
  --color-accent: #190a6e;
  --color-success: #147a43;
  --color-warning: #a86600;
  --color-danger: #b42318;
  --shadow-soft: 0 14px 36px rgba(20, 39, 64, 0.12);
  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --container: 72rem;
}

/* Tema escuro persistido via localStorage. */
body.theme-dark {
  --color-bg: #101724;
  --color-surface: #172236;
  --color-text: #f3f7fb;
  --color-muted: #b8c5d8;
  --color-border: #33435d;
  --color-brand: #4db2ff;
  --color-brand-dark: #8fcfff;
  --color-accent: #9c9898;
  --shadow-soft: 0 14px 36px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.5;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

button,
input,
select,
textarea {
  font: inherit;
}

/* Foco visivel para acessibilidade por teclado. */
:focus-visible {
  outline: 0.2rem solid var(--color-accent);
  outline-offset: 0.18rem;
}

#site-header {
  min-height: 8.5rem;
}

.site-header {
  background: var(--color-surface);
  border-bottom: 0.0625rem solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 10;
}

.site-header__inner,
.site-footer__inner,
main > section {
  margin: 0 auto;
  max-width: var(--container);
  padding-left: 1rem;
  padding-right: 1rem;
}

.site-header__inner {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  padding-bottom: 0.85rem;
  padding-top: 0.85rem;
}

.brand-link {
  align-items: center;
  display: flex;
  gap: 0.75rem;
  min-width: 12rem;
  text-decoration: none;
}

.brand-link img {
  height: auto;
  width: clamp(10rem, 42vw, 16rem);
}

.navigation {
  display: flex;
  flex: 1 1 100%;
  flex-direction: column;
  gap: 0.75rem;
}

.menu-toggle {
  align-items: center;
  align-self: flex-end;
  background: var(--color-text);
  border: 0;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  flex-direction: column;
  gap: 0.25rem;
  height: 2.75rem;
  justify-content: center;
  padding: 0;
  width: 2.75rem;
}

.menu-toggle span {
  background: var(--color-surface);
  border-radius: 999rem;
  display: block;
  height: 0.16rem;
  transition: transform 180ms ease, opacity 180ms ease;
  width: 1.25rem;
}

.navigation--open .menu-toggle span:nth-child(1) {
  transform: translateY(0.41rem) rotate(45deg);
}

.navigation--open .menu-toggle span:nth-child(2) {
  opacity: 0;
}

.navigation--open .menu-toggle span:nth-child(3) {
  transform: translateY(-0.41rem) rotate(-45deg);
}

.nav-list {
  align-items: center;
  display: none;
  flex-direction: column;
  flex-wrap: nowrap;
  gap: 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
  width: 100%;
}

.navigation--open .nav-list {
  display: flex;
}

.nav-list a {
  border-radius: var(--radius-sm);
  color: var(--color-muted);
  display: inline-flex;
  justify-content: center;
  padding: 0.55rem 0.75rem;
  text-decoration: none;
  width: 100%;
}

.nav-list a:hover {
  background: rgba(0, 111, 202, 0.1);
  color: var(--color-brand-dark);
}

.hero {
  padding-bottom: 2rem;
  padding-top: 2.5rem;
}

.hero__content {
  background: linear-gradient(135deg, rgba(0, 111, 202, 0.12), rgba(255, 155, 26, 0.14));
  border: 0.0625rem solid var(--color-border);
  border-radius: var(--radius-md);
  padding: clamp(1.25rem, 4vw, 2.4rem);
}

.hero__eyebrow,
.section-heading__label {
  color: var(--color-accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0;
  margin: 0 0 0.35rem;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  line-height: 1.15;
  margin: 0;
}

h1 {
  font-size: clamp(2rem, 9vw, 4.5rem);
}

h2 {
  font-size: clamp(1.35rem, 5vw, 2rem);
}

h3 {
  font-size: 1.15rem;
}

.hero__text {
  color: var(--color-muted);
  font-size: clamp(1rem, 4vw, 1.25rem);
  margin: 1rem 0 0;
  max-width: 46rem;
}

.profile-section,
.controls-section,
.results-section {
  padding-bottom: 2.2rem;
}

.section-heading {
  margin-bottom: 1rem;
}

.profile-form,
.result-controls,
.summary-panel,
.status-box,
.job-card {
  background: var(--color-surface);
  border: 0.0625rem solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
}

.profile-form {
  padding: 1rem;
}

.form-row,
.result-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.field-group {
  display: flex;
  flex: 1 1 16rem;
  flex-direction: column;
  gap: 0.4rem;
}

label {
  font-weight: 700;
}

input,
select,
textarea {
  background: var(--color-bg);
  border: 0.0625rem solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text);
  min-height: 2.75rem;
  padding: 0.75rem;
  width: 100%;
}

textarea {
  resize: vertical;
}

.field-hint {
  color: var(--color-muted);
}

.field-error,
.form-message[data-tipo="erro"] {
  color: var(--color-danger);
}

.form-message[data-tipo="sucesso"] {
  color: var(--color-success);
}

.field-error,
.form-message {
  min-height: 1.25rem;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.button {
  align-items: center;
  border: 0;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  font-weight: 700;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.75rem 1rem;
}

.button--primary {
  background: var(--color-brand);
  color: #ffffff;
}

.button--primary:hover {
  background: var(--color-brand-dark);
}

.button--secondary {
  background: rgba(255, 155, 26, 0.14);
  color: var(--color-text);
}

.button--icon {
  align-self: flex-end;
  background: var(--color-text);
  color: var(--color-surface);
  flex: 0 0 2.75rem;
  padding: 0;
  width: 2.75rem;
}

.result-controls {
  align-items: flex-end;
  padding: 1rem;
}

.status-box {
  color: var(--color-muted);
  margin-bottom: 1rem;
  padding: 1rem;
}

.summary-panel {
  margin-bottom: 1rem;
  padding: 1rem;
}

.summary-panel strong {
  color: var(--color-brand-dark);
}

.cards-list {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.job-card {
  display: flex;
  flex: 1 1 18rem;
  flex-direction: column;
  gap: 0.85rem;
  padding: 1rem;
}

.job-card__top {
  align-items: flex-start;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
}

.job-card__company {
  color: var(--color-muted);
  margin: 0.2rem 0 0;
}

.badge {
  border-radius: 999rem;
  display: inline-flex;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.35rem 0.6rem;
  white-space: nowrap;
}

.badge--alta {
  background: rgba(20, 122, 67, 0.14);
  color: var(--color-success);
}

.badge--media {
  background: rgba(255, 155, 26, 0.18);
  color: var(--color-warning);
}

.badge--baixa {
  background: rgba(180, 35, 24, 0.12);
  color: var(--color-danger);
}

.job-card__meta,
.skills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0;
  padding: 0;
}

.job-card__meta li,
.skill-pill {
  background: var(--color-bg);
  border: 0.0625rem solid var(--color-border);
  border-radius: 999rem;
  display: inline-flex;
  list-style: none;
  padding: 0.32rem 0.55rem;
}

.skills-group p {
  font-weight: 700;
  margin: 0 0 0.4rem;
}

.skill-pill--ok {
  border-color: rgba(20, 122, 67, 0.45);
}

.skill-pill--missing {
  border-color: rgba(180, 35, 24, 0.45);
}

.site-footer {
  background: var(--color-surface);
  border-top: 0.0625rem solid var(--color-border);
  margin-top: 2rem;
}

.site-footer__inner {
  align-items: center;
  color: var(--color-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  padding-bottom: 1rem;
  padding-top: 1rem;
}

@media (min-width: 48rem) {
  #site-header {
    min-height: 5.5rem;
  }

  .site-header__inner,
  .site-footer__inner,
  main > section {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }

  .navigation {
    flex: 0 1 auto;
  }

  .menu-toggle {
    display: none;
  }

  .nav-list {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    width: auto;
  }

  .nav-list a {
    width: auto;
  }

  .profile-form,
  .result-controls,
  .summary-panel,
  .status-box,
  .job-card {
    padding: 1.25rem;
  }
}
