:root {
  /* Tema claro (padrão) */
  --bg: #f6f7fb;
  --bg-elevated: #ffffff;
  --card-grad-1: #ffffff;
  --card-grad-2: #eef0f6;
  --border: #e2e3ea;
  --heading: #14151a;
  --text: #40414a;
  --text-muted: #6c6d78;
  --cyan: #0c8599;
  --purple: #7c3aed;
  --cyan-soft: rgba(12, 133, 153, 0.08);
  --hero-glow-1: rgba(124, 58, 237, 0.08);
  --hero-glow-2: rgba(12, 133, 153, 0.06);
  --shadow-cyan: rgba(12, 133, 153, 0.25);
  --shadow-purple: rgba(124, 58, 237, 0.3);
  --to-top-text: #ffffff;
  --gradient: linear-gradient(90deg, var(--purple), var(--cyan));
  --bg-card: linear-gradient(145deg, var(--card-grad-1), var(--card-grad-2));
  --font: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  --font-mono: "Consolas", "Courier New", monospace;
}

[data-theme="dark"] {
  --bg: #050505;
  --bg-elevated: #111111;
  --card-grad-1: #111111;
  --card-grad-2: #0d0d0d;
  --border: #232323;
  --heading: #ffffff;
  --text: #cfcfcf;
  --text-muted: #9a9a9a;
  --cyan: #00f3ff;
  --purple: #8b5cf6;
  --cyan-soft: rgba(0, 243, 255, 0.05);
  --hero-glow-1: rgba(139, 92, 246, 0.12);
  --hero-glow-2: rgba(0, 243, 255, 0.08);
  --shadow-cyan: rgba(0, 243, 255, 0.35);
  --shadow-purple: rgba(139, 92, 246, 0.4);
  --to-top-text: #000000;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--cyan);
  color: #fff;
  padding: 8px 16px;
  z-index: 100;
}
.skip-link:focus { left: 16px; top: 16px; }

a { color: inherit; text-decoration: none; }

img, svg { display: block; max-width: 100%; }

/* ---------- THEME TOGGLE ---------- */
.theme-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 60;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  transition: all 0.25s ease;
}
.theme-toggle:hover {
  border-color: var(--cyan);
  color: var(--cyan);
}

/* ---------- HERO ---------- */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 24px 40px;
  position: relative;
  background:
    radial-gradient(circle at 50% 0%, var(--hero-glow-1), transparent 60%),
    radial-gradient(circle at 50% 100%, var(--hero-glow-2), transparent 60%),
    var(--bg);
}

.eyebrow {
  color: var(--cyan);
  font-family: var(--font-mono);
  letter-spacing: 3px;
  font-size: 0.8rem;
  text-transform: uppercase;
  margin: 0 0 16px;
}

.hero__name {
  font-size: clamp(2.2rem, 6vw, 3.5rem);
  font-weight: 800;
  margin: 0 0 12px;
  color: var(--heading);
}

.hero__name .accent {
  color: var(--cyan);
  text-shadow: 0 0 24px var(--shadow-cyan);
}

.hero__role {
  color: var(--text-muted);
  font-size: clamp(1rem, 2vw, 1.15rem);
  margin: 0 auto 20px;
  max-width: 620px;
}

.focus-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 28px;
}

.focus-badge {
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  border: 1px solid var(--border);
  color: var(--text-muted);
  background: var(--bg-elevated);
}

.focus-badge--highlight {
  border-color: transparent;
  background: var(--gradient);
  color: #fff;
}

.hero__social {
  display: flex;
  gap: 20px;
  margin-bottom: 32px;
}

.hero__social a {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--border);
  color: var(--heading);
  transition: all 0.25s ease;
}

.hero__social a:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  transform: translateY(-3px);
  box-shadow: 0 0 16px var(--shadow-cyan);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.25s ease;
  border: 1px solid transparent;
}

.btn--outline {
  border-color: var(--cyan);
  color: var(--cyan);
  background: transparent;
}
.btn--outline:hover {
  background: var(--cyan-soft);
  box-shadow: 0 0 20px var(--shadow-cyan);
}

.btn--solid {
  background: var(--gradient);
  color: #fff;
}
.btn--solid:hover {
  filter: brightness(1.1);
  box-shadow: 0 0 24px var(--shadow-purple);
}

.hero__location {
  margin-top: 24px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.scroll-hint {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, 8px); }
}

/* ---------- SECTIONS ---------- */
.section {
  max-width: 900px;
  margin: 0 auto;
  padding: 80px 24px;
}

.section__title {
  text-align: center;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  text-transform: uppercase;
  color: var(--heading);
  margin: 0 0 40px;
  position: relative;
  padding-bottom: 18px;
}

.title-icon {
  color: var(--cyan);
  margin-right: 10px;
  font-size: 0.85em;
}

.section__title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background: var(--gradient);
  border-radius: 2px;
}

/* ---------- CARD ---------- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px 32px;
}

.card--quote {
  border-left: 3px solid var(--purple);
  color: var(--text);
}
.card--quote p { margin: 0 0 16px; }
.card--quote p:last-child { margin-bottom: 0; }
.card--quote strong { color: var(--heading); }

/* ---------- GALLERY ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 32px;
}

.gallery__card {
  aspect-ratio: 16 / 10;
  border-radius: 12px;
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-weight: 700;
  color: var(--heading);
  background: var(--bg-card);
  transition: transform 0.25s ease, border-color 0.25s ease;
}
.gallery__card i {
  font-size: 2rem;
  color: var(--cyan);
}
.gallery__card:hover {
  transform: translateY(-4px);
  border-color: var(--cyan);
}
@media (max-width: 640px) {
  .gallery { grid-template-columns: 1fr; }
}

/* ---------- SKILLS ---------- */
.skills {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
}

.skill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border: 1px solid var(--cyan);
  border-radius: 999px;
  color: var(--cyan);
  font-size: 0.9rem;
  font-weight: 600;
  background: var(--cyan-soft);
}
.skill i { font-size: 1rem; }

/* ---------- TIMELINE ---------- */
.timeline {
  position: relative;
  padding-left: 32px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(180deg, var(--purple), var(--cyan));
}

.timeline__item {
  position: relative;
  margin-bottom: 28px;
}
.timeline__item:last-child { margin-bottom: 0; }

.timeline__dot {
  position: absolute;
  left: -32px;
  top: 28px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--purple);
}

.card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.card__head h3 {
  margin: 0 0 4px;
  font-size: 1.1rem;
  color: var(--heading);
}

.card__company {
  margin: 0;
  color: var(--cyan);
  font-size: 0.9rem;
  font-weight: 600;
}

.badge {
  flex-shrink: 0;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.card ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.card li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
  color: var(--text);
  font-size: 0.95rem;
}
.card li:last-child { margin-bottom: 0; }
.card li i {
  color: var(--purple);
  margin-top: 4px;
  font-size: 0.8rem;
}

/* ---------- EDUCATION ---------- */
.education {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.education__card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--purple);
  border-radius: 10px;
  padding: 20px 24px;
}
.education__card h3 {
  margin: 0 0 6px;
  font-size: 1.05rem;
  color: var(--heading);
}
.education__school {
  margin: 0 0 8px;
  color: var(--text);
  font-weight: 600;
  font-size: 0.9rem;
}
.education__date {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.85rem;
}

@media (max-width: 640px) {
  .education { grid-template-columns: 1fr; }
}

/* ---------- TESTIMONIALS ---------- */
.testimonials {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.testimonial {
  margin: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px 26px;
}
.testimonial p {
  margin: 0 0 16px;
  color: var(--text);
  font-size: 0.95rem;
  font-style: italic;
}
.testimonial cite {
  display: block;
  font-style: normal;
  font-weight: 700;
  color: var(--heading);
  font-size: 0.85rem;
}

@media (max-width: 640px) {
  .testimonials { grid-template-columns: 1fr; }
}

/* ---------- CONTACT ---------- */
.section--contact {
  text-align: center;
}
.contact__subtitle {
  color: var(--text-muted);
  margin-bottom: 32px;
}
.contact__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
}

/* ---------- FOOTER ---------- */
.footer {
  text-align: center;
  padding: 32px 24px;
  color: var(--text-muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
}

/* ---------- TO TOP ---------- */
.to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: var(--cyan);
  color: var(--to-top-text);
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  box-shadow: 0 4px 20px var(--shadow-cyan);
  z-index: 50;
}
.to-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* ---------- REVEAL ANIMATION ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .scroll-hint { animation: none; }
}

/* ---------- PRINT (Currículo 1 página, gerado a partir do portfólio) ---------- */
.print-only { display: none; }

@media print {
  @page { size: A4; margin: 10mm 13mm; }

  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }

  html, body {
    background: #ffffff !important;
    color: #1c1d22 !important;
    font-size: 9.2pt;
    line-height: 1.3;
  }

  /* Paleta de impressão: navy/índigo + acentos cyan e roxo do site */
  :root, [data-theme="dark"] {
    --bg: #ffffff;
    --bg-elevated: #ffffff;
    --card-grad-1: #ffffff;
    --card-grad-2: #ffffff;
    --border: #d8dbe4;
    --heading: #14161f;
    --text: #2b2d36;
    --text-muted: #5a5d6b;
    --cyan: #0c8599;
    --purple: #6d28d9;
    --gradient: linear-gradient(90deg, var(--purple), var(--cyan));
  }

  .no-print { display: none !important; }
  .print-only { display: block; }

  /* Neutraliza a animação de revelação ao rolar: no PDF tudo deve
     aparecer de imediato, independente de ter "entrado" na viewport. */
  .reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  /* ----- Cabeçalho: faixa com gradiente escuro ----- */
  .hero {
    min-height: 0;
    text-align: left;
    background: linear-gradient(120deg, #111827 0%, #33206b 55%, #0b4a54 100%) !important;
    color: #f8fafc;
    border-radius: 10px;
    padding: 12px 18px;
    margin: 0 0 9px;
  }
  .hero__inner { max-width: none; }
  .eyebrow { display: none; }

  .hero__name {
    color: #ffffff;
    font-size: 19pt;
    margin: 0 0 1px;
  }
  .hero__name .accent {
    color: #5eead4;
    text-shadow: none;
  }

  .hero__role {
    color: #c9cee0;
    font-size: 9pt;
    margin: 0 0 5px;
    max-width: none;
  }

  .print-contact {
    display: flex;
    flex-wrap: wrap;
    gap: 3px 16px;
    font-size: 7.8pt;
    color: #dbe0ef;
    margin: 0 0 7px;
  }
  .print-contact span { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
  .print-contact i { color: #5eead4; font-size: 8pt; }

  .focus-badges { justify-content: flex-start; gap: 6px; margin-bottom: 0; }
  .focus-badge {
    font-size: 6.5pt;
    padding: 2px 9px;
    background: rgba(255, 255, 255, 0.12) !important;
    color: #e7eaf5 !important;
    border-color: rgba(255, 255, 255, 0.4);
  }
  .focus-badge--highlight {
    background: linear-gradient(90deg, #22d3ee, #a78bfa) !important;
    color: #10131f !important;
    border-color: transparent;
    font-weight: 800;
  }

  main { display: block; }

  .section {
    max-width: none;
    padding: 5px 0;
    page-break-inside: avoid;
  }

  .section__title {
    font-size: 11pt;
    text-align: left;
    color: var(--heading);
    margin: 0 0 7px;
    padding-bottom: 4px;
    letter-spacing: 0.5px;
  }
  .section__title::after {
    left: 0;
    transform: none;
    width: 44px;
    height: 3px;
    background: var(--gradient) !important;
    border-radius: 2px;
  }
  .title-icon {
    color: var(--cyan);
    margin-right: 7px;
    font-size: 0.82em;
  }

  .card--quote {
    background: #f4f6fc !important;
    border: none;
    border-left: 3px solid var(--purple);
    border-radius: 0 6px 6px 0;
    padding: 7px 14px;
    font-size: 8.8pt;
  }
  .card--quote p { margin: 0 0 4px; }
  .card--quote strong { color: var(--heading); }

  .skills { gap: 6px; }
  .skill {
    font-size: 7.5pt;
    padding: 3px 10px;
    font-weight: 700;
    background: #e3f6f8 !important;
    border-color: var(--cyan);
    color: #0a5d6b !important;
  }
  .skill i { display: none; }

  .timeline { padding-left: 12px; }
  .timeline::before {
    left: 3px;
    width: 2px;
    background: var(--gradient) !important;
  }
  .timeline__dot {
    left: -12px;
    top: 3px;
    width: 8px;
    height: 8px;
    border: 2px solid var(--purple);
    background: #fff !important;
  }
  .timeline__item { margin-bottom: 6px; page-break-inside: avoid; }

  .timeline .card {
    background: #fbfbfe !important;
    border: none;
    border-radius: 6px;
    padding: 6px 12px;
    box-shadow: inset 0 0 0 1px var(--border);
  }

  .card__head { margin-bottom: 3px; }
  .card__head h3 { font-size: 9.5pt; color: var(--heading); }
  .card__company { font-size: 8pt; color: var(--cyan); }
  .badge {
    background: #eef1ff !important;
    border-color: #c9cff5;
    color: #4338ca !important;
    font-weight: 600;
    font-size: 7.5pt;
    padding: 1px 9px;
  }

  .card li {
    font-size: 8.3pt;
    margin-bottom: 2px;
    color: var(--text);
  }
  .card li i { display: none; }
  .card li::before {
    content: "▸";
    margin-right: 5px;
    color: var(--cyan);
  }
  /* Compacta cada experiência para no máximo 3 bullets no currículo */
  .timeline .card li:nth-child(n+4) { display: none; }

  .education {
    grid-template-columns: repeat(2, 1fr);
    gap: 7px 20px;
  }
  .education__card {
    background: #f6f4fd !important;
    border: none;
    border-left: 3px solid var(--purple);
    border-radius: 0 6px 6px 0;
    padding: 5px 10px;
  }
  .education__card h3 { font-size: 8.5pt; color: var(--heading); }
  .education__card h3.accent { color: var(--cyan); }
  .education__school { font-size: 7.5pt; color: var(--text); font-weight: 700; }
  .education__date { font-size: 7.5pt; color: var(--text-muted); }
}
