:root {
  --bg: #f4f1ec;
  --bg-elevated: #ffffff;
  --bg-subtle: #f8f6f2;
  --text: #18181b;
  --text-muted: #52525b;
  --text-subtle: #a1a1aa;
  --accent: #9f1239;
  --accent-dark: #6b1230;
  --accent-soft: rgba(159, 18, 57, 0.08);
  --border: #e7e5e0;
  --border-soft: rgba(24, 24, 27, 0.06);
  --max-width: 760px;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow-card: 0 1px 2px rgba(24, 24, 27, 0.04), 0 8px 24px rgba(24, 24, 27, 0.05);
  --shadow-card-hover: 0 1px 2px rgba(24, 24, 27, 0.05), 0 12px 32px rgba(24, 24, 27, 0.07);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'cv11', 'ss01';
}

body {
  padding: 3rem 1.5rem 2rem;
}

#wrapper {
  max-width: var(--max-width);
  margin: 0 auto;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover,
a:focus-visible {
  color: var(--accent-dark);
}

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

h1, h2, h3, h4, p, ul {
  margin: 0;
  padding: 0;
}

ul {
  list-style: none;
}

/* ============ CARDS ============ */
.hero,
.section {
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 3rem 3rem 2.75rem;
  box-shadow: var(--shadow-card);
}

/* ============ HERO ============ */
.hero {
  margin-bottom: 1.5rem;
  padding: 3rem 3rem 2.75rem;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.15;
  margin-bottom: 1.25rem;
}

.accent-line {
  width: 48px;
  height: 2px;
  background: var(--accent);
  margin-bottom: 1.25rem;
}

.hero .role {
  font-size: 1.05rem;
  color: var(--text-muted);
  font-weight: 400;
  margin-bottom: 2.25rem;
}

.contacts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin-bottom: 2.5rem;
  font-size: 0.95rem;
}

.contacts a {
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.contacts a:hover,
.contacts a:focus-visible {
  color: var(--accent);
}

.contacts .fa {
  color: var(--accent);
  font-size: 0.95rem;
  width: 1rem;
  text-align: center;
}

.btn-cv {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.75rem 1.5rem;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  border-radius: var(--radius);
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.btn-cv:hover,
.btn-cv:focus-visible {
  background: var(--accent);
  color: #fff;
  transform: translateY(-1px);
}

/* ============ SECTION ============ */
.section {
  margin-bottom: 1.5rem;
}

.section:last-of-type {
  margin-bottom: 0;
}

.section-header {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 2.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.section-header .num {
  color: var(--accent);
  font-weight: 500;
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.08em;
}

.section-header h2 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-weight: 600;
  color: var(--text);
}

/* ============ SOBRE ============ */
.about p {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.about strong {
  color: var(--text);
  font-weight: 600;
}

.about-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.5rem 2rem;
  margin-top: 1.25rem;
}

.about-list li {
  position: relative;
  padding-left: 1.25rem;
  color: var(--text-muted);
}

.about-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.75rem;
  width: 8px;
  height: 1px;
  background: var(--accent);
}

/* ============ EXPERIÊNCIA ============ */
.exp-item {
  margin-bottom: 3.5rem;
}

.exp-item:last-child {
  margin-bottom: 0;
}

.exp-header {
  margin-bottom: 1.5rem;
}

.exp-title {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  letter-spacing: -0.01em;
}

.exp-meta {
  font-size: 0.9rem;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.75rem;
}

.exp-meta .sep {
  color: var(--text-subtle);
}

.exp-block {
  margin-bottom: 1.25rem;
}

.exp-block:last-child {
  margin-bottom: 0;
}

.exp-block-title {
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.4rem;
  font-size: 0.95rem;
}

.exp-block ul {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.exp-block li {
  position: relative;
  padding-left: 1.25rem;
  margin-bottom: 0.3rem;
}

.exp-block li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--accent);
}

.exp-block p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ============ FORMAÇÃO ============ */
.edu-grid {
  display: grid;
  gap: 1.75rem;
}

.edu-item {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  gap: 1rem 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.edu-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.edu-title {
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 0.25rem;
  letter-spacing: -0.01em;
}

.edu-school {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.edu-period {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.edu-status {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-top: 0.6rem;
}

.edu-status.completed {
  color: var(--text-subtle);
}

.edu-status.in-progress {
  color: var(--accent);
}

/* ============ COMPETÊNCIAS ============ */
.skill-group {
  margin-bottom: 3rem;
}

.skill-group:last-child {
  margin-bottom: 0;
}

.skill-group-title {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent);
  margin-bottom: 1.25rem;
  font-weight: 600;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.skill {
  background: var(--bg-subtle);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  padding: 1rem 1.15rem;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.skill:hover {
  background: #fff;
  border-color: var(--accent-soft);
  transform: translateY(-1px);
}

.skill-name {
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
  letter-spacing: -0.005em;
}

.skill-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ============ CERTIFICAÇÕES ============ */
.certs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.75rem;
}

.cert {
  background: var(--bg-subtle);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  padding: 1.15rem 1.25rem;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.cert:hover {
  background: #fff;
  border-color: var(--accent-soft);
  transform: translateY(-1px);
}

.cert-name {
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.35rem;
  letter-spacing: -0.005em;
}

.cert-school {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-bottom: 0.25rem;
}

.cert-hours {
  color: var(--accent);
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
}

/* ============ 404 ============ */
.error-page {
  min-height: calc(100vh - 6rem);
  display: flex;
  align-items: center;
  justify-content: center;
}

.error-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 4rem 3rem;
  box-shadow: var(--shadow-card);
  text-align: center;
  max-width: 520px;
  width: 100%;
}

.error-code {
  font-size: clamp(4.5rem, 14vw, 7rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--accent);
  margin-bottom: 0.75rem;
  font-variant-numeric: tabular-nums;
}

.error-card .accent-line {
  margin: 0 auto 1.5rem;
}

.error-title {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 0.75rem;
}

.error-text {
  color: var(--text-muted);
  font-size: 0.975rem;
  margin-bottom: 2rem;
  line-height: 1.6;
}

@media (max-width: 640px) {
  .error-card {
    padding: 2.5rem 1.75rem;
    border-radius: 12px;
  }

  .error-page {
    min-height: calc(100vh - 3rem);
  }
}

/* ============ FOOTER ============ */
.site-footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-subtle);
}

.site-footer p {
  margin: 0.25rem 0;
}

.site-footer a {
  color: var(--text-muted);
}

.site-footer a:hover {
  color: var(--accent);
}

/* ============ RESPONSIVE ============ */
@media (max-width: 640px) {
  body {
    padding: 1.5rem 1rem 1.5rem;
  }

  .hero,
  .section {
    padding: 1.75rem 1.5rem;
    border-radius: 12px;
  }

  .hero {
    margin-bottom: 1rem;
  }

  .section {
    margin-bottom: 1rem;
  }

  .skills-grid {
    grid-template-columns: 1fr;
  }

  .certs {
    grid-template-columns: 1fr;
  }

  .edu-item {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .edu-period {
    white-space: normal;
  }

  .contacts {
    flex-direction: column;
    gap: 0.75rem;
    align-items: flex-start;
  }

  .site-footer {
    margin-top: 2rem;
  }
}

/* ============ PRINT ============ */
@media print {
  body {
    background: #fff;
    padding: 1.5cm;
    font-size: 10.5pt;
    color: #000;
  }

  #wrapper {
    max-width: none;
  }

  .btn-cv,
  .site-footer {
    display: none;
  }

  .hero,
  .section {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    margin-bottom: 1.25rem;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .skill,
  .cert {
    background: transparent;
    border: none;
    padding: 0.25rem 0;
  }

  .exp-item {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .hero {
    margin-bottom: 1.5rem;
  }

  a {
    color: #000;
  }

  .accent-line {
    background: #999;
  }

  .section-header {
    border-color: #ccc;
  }
}
