/* ============================================================
   Currículo Jonnathan Barroso — estilos próprios
   Complementam o Bootstrap 5.3.8 (tema escuro).
   ============================================================ */

:root {
  --accent: #22d3ee;
  --accent-strong: #0ea5e9;
  --accent-soft: rgba(34, 211, 238, .14);

  --bg: #16181d;
  --surface: #1d2027;
  --surface-2: #23262e;
  --border: rgba(255, 255, 255, .08);
  --text: #e7e9ee;
  --muted: #99a0ad;

  --sidebar-w: 310px;
  --content-max: 1080px;

  --font-body: "Inter", system-ui, "Segoe UI", Arial, sans-serif;
  --font-head: "Poppins", var(--font-body);
}

/* Sobrescreve variáveis do Bootstrap para o tema escuro */
[data-bs-theme="dark"] {
  --bs-body-bg: var(--bg);
  --bs-body-color: var(--text);
  --bs-border-color: var(--border);
  --bs-link-color: var(--accent);
  --bs-link-hover-color: var(--accent-strong);
  --bs-emphasis-color: var(--text);
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
}

h1, h2, h3, h4 { font-family: var(--font-head); }

a { text-decoration: none; }
a:hover { text-decoration: underline; }

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

/* ---------- Botão de destaque ---------- */
.btn-accent {
  --bs-btn-color: #06222b;
  --bs-btn-bg: var(--accent);
  --bs-btn-border-color: var(--accent);
  --bs-btn-hover-color: #06222b;
  --bs-btn-hover-bg: var(--accent-strong);
  --bs-btn-hover-border-color: var(--accent-strong);
  --bs-btn-active-bg: var(--accent-strong);
  font-weight: 600;
}
.btn-accent i { margin-right: .35rem; }

/* ============================================================
   Layout: sidebar fixa + conteúdo
   ============================================================ */
.layout { display: block; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 1030;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.topbar .navbar-brand { color: var(--text); }

.sidebar {
  background: var(--surface);
  border-right: 1px solid var(--border);
}

.sidebar-body { display: flex; flex-direction: column; gap: 1.5rem; padding: 1.75rem 1.25rem; }

@media (min-width: 992px) {
  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--sidebar-w);
    overflow-y: auto;
  }
  .content {
    margin-left: var(--sidebar-w);
  }
}

/* ---------- Card de perfil ---------- */
.profile-card { display: flex; flex-direction: column; align-items: center; gap: .85rem; }
.profile-avatar {
  border-radius: 50%;
  object-fit: cover;
  background: var(--surface-2);
  padding: 4px;
  box-shadow: 0 0 0 1px var(--border), 0 8px 24px rgba(0, 0, 0, .35);
}
.profile-name { font-size: 1.35rem; font-weight: 600; margin: 0; }
.profile-role { color: var(--muted); font-size: .92rem; margin: 0; }

.social-list {
  list-style: none; display: flex; gap: .5rem; padding: 0; margin: .25rem 0 .5rem;
}
.social-list a {
  display: grid; place-items: center; width: 40px; height: 40px;
  border-radius: 50%; background: var(--surface-2); color: var(--text);
  border: 1px solid var(--border); font-size: 1.05rem; transition: .2s;
}
.social-list a:hover { background: var(--accent); color: #06222b; transform: translateY(-2px); text-decoration: none; }

.profile-actions { width: 100%; }

/* ---------- Navegação lateral ---------- */
.side-nav { gap: .15rem; }
.side-nav .nav-link {
  display: flex; align-items: center; gap: .7rem;
  color: var(--muted); border-radius: 8px; padding: .6rem .8rem; transition: .15s;
}
.side-nav .nav-link i { font-size: 1.05rem; width: 1.2rem; text-align: center; }
.side-nav .nav-link:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }
.side-nav .nav-link.active {
  color: var(--accent); background: var(--accent-soft); font-weight: 600;
}

/* ---------- Seletor de idioma ---------- */
.lang-switch { display: flex; align-items: center; gap: .35rem; justify-content: center; }
.lang-btn {
  background: none; border: 0; color: var(--muted); font-weight: 600;
  padding: .2rem .45rem; border-radius: 6px; cursor: pointer; font-size: .9rem;
}
.lang-btn.active, .lang-btn:hover { color: var(--accent); background: var(--accent-soft); }
.lang-sep { color: var(--border); }

/* ============================================================
   Seções de conteúdo
   ============================================================ */
.content { max-width: 100%; }
.section {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 4.5rem 1.5rem;
  scroll-margin-top: 70px;
}
.section + .section { border-top: 1px solid var(--border); }

.section-head { display: flex; align-items: center; gap: 1rem; margin-bottom: 2rem; }
.section-title { font-size: 1.9rem; font-weight: 700; margin: 0; }
.section-line { flex: 1; height: 1px; background: var(--border); }

.subsection-title {
  font-size: 1.15rem; font-weight: 600; margin: 0 0 1.25rem;
  display: flex; align-items: center; gap: .5rem;
}
.subsection-title i { color: var(--accent); }

/* ---------- Home ---------- */
.section-home { min-height: 100vh; display: flex; align-items: center; }
.home-inner { max-width: 720px; }
.home-greeting { color: var(--accent); font-weight: 600; letter-spacing: .02em; margin-bottom: .5rem; }
.home-name { font-size: clamp(2.2rem, 6vw, 3.6rem); font-weight: 700; margin: 0 0 .5rem; }
.home-typed-wrap { font-size: clamp(1.1rem, 3vw, 1.6rem); color: var(--muted); margin-bottom: 1.25rem; }
.home-typed { color: var(--text); font-weight: 600; }
.home-cursor { color: var(--accent); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.home-lead { color: var(--muted); font-size: 1.05rem; max-width: 640px; margin-bottom: 1.75rem; }
.home-cta { display: flex; flex-wrap: wrap; gap: .75rem; }

/* ---------- About ---------- */
.about-text { color: var(--muted); line-height: 1.75; }
.facts-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .75rem; }
.facts-list li { display: flex; gap: .7rem; align-items: start; }
.facts-list i { color: var(--accent); font-size: 1.05rem; margin-top: .15rem; }
.fact-label { color: var(--text); font-weight: 600; }

.service-card {
  height: 100%; background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 1.25rem; transition: .2s;
}
.service-card:hover { border-color: var(--accent); transform: translateY(-3px); }
.service-card i { font-size: 1.6rem; color: var(--accent); }
.service-card h4 { font-size: 1rem; font-weight: 600; margin: .75rem 0 .35rem; }
.service-card p { color: var(--muted); font-size: .9rem; margin: 0; }

/* ---------- Timeline ---------- */
.timeline { position: relative; padding-left: 1.5rem; }
.timeline::before {
  content: ""; position: absolute; left: 5px; top: .4rem; bottom: .4rem;
  width: 2px; background: var(--border);
}
.timeline-item { position: relative; padding-bottom: 1.75rem; }
.timeline-item::before {
  content: ""; position: absolute; left: -1.5rem; top: .4rem;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft);
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-org { font-size: 1.02rem; font-weight: 600; margin: 0; }
.timeline-place { display: block; color: var(--muted); font-size: .82rem; margin-bottom: .5rem; }
.timeline-role {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: .25rem .75rem;
  margin-top: .5rem;
}
.role-title { color: var(--accent); font-weight: 600; font-size: .92rem; }
.role-period {
  color: var(--muted); font-size: .78rem; background: var(--surface-2);
  border: 1px solid var(--border); border-radius: 20px; padding: .05rem .6rem; white-space: nowrap;
}
.timeline-desc { color: var(--muted); font-size: .9rem; line-height: 1.65; margin: .35rem 0 0; }
.role-desc { color: var(--muted); font-size: .9rem; line-height: 1.6; margin: .35rem 0 .15rem; }
.role-detail strong { color: var(--text); font-weight: 600; }
.role-sublabel { display: block; margin: .55rem 0 .25rem; font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.role-list, .role-results { list-style: none; padding: 0; margin: 0; display: grid; gap: .28rem; }
.role-list li, .role-results li { position: relative; padding-left: 1.1rem; font-size: .88rem; line-height: 1.5; }
.role-list li { color: var(--muted); }
.role-list li::before { content: "•"; position: absolute; left: .15rem; color: var(--muted); }
.role-results li { color: var(--text); }
.role-results li::before { content: "▸"; position: absolute; left: 0; color: var(--accent); font-weight: 700; }

/* ---------- Skills (chips por categoria) ---------- */
.skills { display: grid; gap: 1.1rem; }
.skill-cat { font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 0 0 .5rem; }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; padding: 0; margin: 0; }
.chips li {
  font-size: .82rem; color: var(--text); background: var(--surface-2);
  border: 1px solid var(--border); border-radius: 20px; padding: .3rem .7rem;
}
.chips li:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- Certificações ---------- */
.certs { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.certs li { font-size: .9rem; line-height: 1.4; }
.certs .cert-name { font-weight: 600; color: var(--text); }
.certs .cert-area { color: var(--muted); font-size: .85rem; }
.certs-link {
  display: inline-flex; align-items: center; gap: .4rem;
  margin-top: .8rem; font-size: .85rem; color: var(--accent);
}
.certs-link:hover { color: var(--accent-strong); text-decoration: none; }

/* ---------- Highlights ---------- */
.highlights { list-style: none; padding: 0; margin: 0; display: grid; gap: .75rem; }
.highlights li { display: flex; gap: .6rem; color: var(--muted); font-size: .92rem; }
.highlights i { color: var(--accent); margin-top: .15rem; }

/* ---------- Contact ---------- */
.contact-lead { color: var(--muted); max-width: 640px; margin-bottom: 1.75rem; }
.contact-card {
  display: flex; align-items: center; gap: .9rem; height: 100%;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 1.1rem 1.25rem; color: var(--text); transition: .2s;
}
.contact-card:hover { border-color: var(--accent); text-decoration: none; transform: translateY(-2px); }
.contact-card i { font-size: 1.5rem; color: var(--accent); }
.contact-card div { display: flex; flex-direction: column; }
.contact-label { color: var(--muted); font-size: .78rem; }
.contact-value { font-weight: 600; }

/* ---------- Footer ---------- */
.site-footer {
  max-width: var(--content-max); margin: 0 auto; padding: 2rem 1.5rem;
  border-top: 1px solid var(--border); color: var(--muted); font-size: .85rem; text-align: center;
}

/* ---------- Contadores / exibição de dados ---------- */
.stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 2.25rem;
}
.stat {
  display: flex; flex-direction: column; justify-content: center; text-align: center;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 1.1rem .75rem; transition: .2s;
}
.stat:hover { border-color: var(--accent); transform: translateY(-3px); }
.stat-num { font-family: var(--font-head); font-size: 1.9rem; font-weight: 700; color: var(--accent); line-height: 1; }
.stat-label { color: var(--muted); font-size: .82rem; margin-top: .4rem; }

/* Cards clicáveis (Alura) */
a.stat { color: inherit; text-decoration: none; }
.stat-cue { display: block; margin-top: .45rem; font-size: .72rem; color: var(--muted); transition: .2s; }
.stat-cue i { font-size: .72rem; }
.stat-link:hover .stat-cue { color: var(--accent); }
@media (max-width: 575.98px) { .stats { grid-template-columns: 1fr; } }

/* ---------- Scroll-reveal (entrada animada) ----------
   Usa animação (não transition) para não conflitar com o hover dos cards;
   o JS remove as classes ao terminar, devolvendo o estado natural. */
.reveal { opacity: 0; }
.reveal.is-visible { animation: reveal-in .6s ease both; }
@keyframes reveal-in {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}

/* ---------- Acessibilidade: reduzir movimento ---------- */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition: none !important; }
  .reveal { opacity: 1 !important; animation: none !important; }
}

/* ============================================================
   Impressão / Geração de PDF (botão "Baixar CV")
   Reformata a página para um currículo claro, em 1 coluna.
   ============================================================ */
@media print {
  @page { margin: 12mm 14mm; }

  /* Tema claro só na impressão (reaproveitando as variáveis) */
  [data-bs-theme="dark"] {
    --bs-body-bg: #fff;
    --bs-body-color: #111;
  }
  :root {
    --bg: #fff; --surface: #fff; --surface-2: #f3f4f6;
    --border: #cbd5e1; --text: #111; --muted: #3a3a3a;
    --accent: #0e7490; --accent-strong: #0e7490; --accent-soft: #e0f2fe;
  }
  html, body { background: #fff; color: #111; font-size: 10.5pt; line-height: 1.4; }

  /* Esconde navegação/decoração */
  .topbar, .side-nav, .lang-switch, .profile-actions, #home,
  .home-cursor, .section-line, .social-list, .stats { display: none !important; }

  /* Neutraliza os gutters do Bootstrap (causa do espaçamento exagerado) */
  .row { --bs-gutter-x: .9rem !important; --bs-gutter-y: 0 !important; margin: 0 !important; }
  .row > [class*="col-"] { padding-top: 0 !important; padding-bottom: 0 !important; }

  /* Sidebar vira um cabeçalho compacto no topo */
  .layout { display: block; }
  .sidebar {
    position: static !important; width: auto !important;
    border: none !important; background: none !important;
  }
  .sidebar-body { padding: 0; gap: .4rem; }
  .profile-card { flex-direction: row; align-items: center; gap: .9rem; text-align: left; margin-bottom: .2rem; }
  .profile-avatar { width: 72px; height: 72px; padding: 0; box-shadow: none; }
  .profile-name { font-size: 1.4rem; margin: 0; }
  .profile-role { font-size: .95rem; }

  .content { margin-left: 0 !important; }
  .section {
    max-width: none; padding: .55rem 0 0; border-top: 1px solid var(--border);
    margin-top: .55rem; scroll-margin-top: 0; min-height: 0;
  }
  .section:first-of-type { border-top: none; margin-top: 0; }
  .section-head { margin-bottom: .55rem; }
  .section-title { font-size: 1.15rem; }
  .subsection-title { font-size: 1rem; margin: .2rem 0 .5rem; }

  /* Ritmo vertical compacto */
  .about-text { line-height: 1.45; margin-bottom: .35rem; }
  .facts-list { gap: .25rem; }
  .timeline { padding-left: 1.2rem; }
  .timeline-item { padding-bottom: .6rem; }
  .timeline-desc { margin-top: .2rem; line-height: 1.4; }
  .timeline-role { margin-top: .25rem; }
  .skills { gap: .55rem; }
  .highlights { gap: .35rem; }
  .service-card { padding: .6rem .75rem; }
  .service-card i { font-size: 1.2rem; }
  .service-card h4 { margin: .35rem 0 .2rem; }
  .contact-card { padding: .55rem .75rem; }

  /* Evita cortar blocos pequenos entre páginas (a seção grande pode quebrar) */
  .timeline-item, .service-card, .contact-card, .skill-group { break-inside: avoid; }
  .subsection-title { break-after: avoid; }

  a { color: #111 !important; text-decoration: none; }
  .service-card:hover, .contact-card:hover, .chips li:hover { transform: none; border-color: var(--border); color: inherit; }
}
