/* ==========================================================================
   fabiog.com.br — estilos globais
   Paleta derivada da logo (azul #77AADD + cinza grafite)
   ========================================================================== */

:root {
  --brand: #77aadd;
  --brand-50: #f1f6fc;
  --brand-100: #e1ecf8;
  --brand-600: #3f7fc1;
  --brand-700: #2b64a0;
  --ink: #18222e;
  --ink-2: #3c4a59;
  --muted: #627080;
  --line: #e2e8ef;
  --surface: #f6f8fb;
  --bg: #ffffff;
  --dark: #111c28;
  --dark-2: #1a2735;
  --ok: #1f8a5b;
  --error: #c0392b;

  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-display: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif;

  --radius: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(17, 28, 40, .06);
  --shadow: 0 10px 30px -12px rgba(17, 28, 40, .18);
  --container: 1160px;
  --header-h: 76px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1rem/1.65 var(--font-body);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand-700); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--brand-600); }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: .005em;
  color: var(--ink);
  margin: 0 0 .5em;
}
h1 { font-size: clamp(2.4rem, 5.2vw, 4rem); }
h2 { font-size: clamp(1.9rem, 3.4vw, 2.6rem); }
h3 { font-size: 1.45rem; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; }
.stats, .timeline, .logo-grid, .chips, .link-list { list-style: none; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; border-radius: 4px; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 20px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 8px;
}
.skip-link:focus { top: 12px; color: #fff; }
.icon { flex-shrink: 0; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font: 600 .8rem/1 var(--font-body);
  text-transform: uppercase; letter-spacing: .14em;
  color: var(--brand-700);
  margin-bottom: 14px;
}
.eyebrow::before { content: ""; width: 22px; height: 3px; background: var(--brand); }
.lead { font-size: 1.15rem; color: var(--ink-2); max-width: 62ch; }

.section { padding-block: clamp(64px, 9vw, 112px); }
.section-alt { background: var(--surface); }
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px 32px; margin-bottom: 40px; }
.section-head h2 { margin: 0; }
.section-head p { margin: 6px 0 0; color: var(--muted); }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 22px;
  border-radius: 999px; border: 1.5px solid transparent;
  font: 600 .98rem/1 var(--font-body);
  text-decoration: none; cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s, transform .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--brand-700); color: #fff; }
.btn-primary:hover { background: var(--brand-600); color: #fff; }
.btn-outline { border-color: var(--line); color: var(--ink); background: #fff; }
.btn-outline:hover { border-color: var(--brand); color: var(--brand-700); }
.btn-light { background: #fff; color: var(--ink); }
.btn-light:hover { background: var(--brand-50); color: var(--ink); }
.btn-ghost-light { border-color: rgba(255,255,255,.35); color: #fff; }
.btn-ghost-light:hover { border-color: #fff; color: #fff; }
.btn-wa { background: #1f9d55; color: #fff; }
.btn-wa:hover { background: #188448; color: #fff; }
.btn[disabled] { opacity: .6; cursor: progress; }

.link-arrow { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; text-decoration: none; }
.link-arrow .icon { transition: transform .2s; }
.link-arrow:hover .icon { transform: translateX(3px); }

/* ---------- Cabeçalho ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s, box-shadow .2s;
}
.site-header.is-scrolled { border-color: var(--line); box-shadow: var(--shadow-sm); }
.header-inner { display: flex; align-items: center; gap: 24px; min-height: var(--header-h); }
.brand { display: block; flex-shrink: 0; }
.brand img { width: 132px; height: auto; }

.site-nav { display: flex; align-items: center; gap: 20px; margin-left: auto; }
.nav-list { display: flex; align-items: center; gap: 2px; list-style: none; }
.nav-item { position: relative; }
.nav-link {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 10px 14px; border-radius: 10px;
  font: 600 .95rem/1 var(--font-body);
  color: var(--ink-2); text-decoration: none;
  background: none; border: 0; cursor: pointer;
}
.nav-link:hover, .nav-link[aria-expanded="true"] { color: var(--brand-700); background: var(--brand-50); }
.nav-link.is-active { color: var(--brand-700); }
.nav-link.is-active::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 2px;
  height: 2px; background: var(--brand); border-radius: 2px;
}
.nav-link .icon { transition: transform .2s; }
.nav-split { display: flex; align-items: center; }
.nav-split .nav-link { padding-right: 4px; }
.nav-caret {
  display: grid; place-items: center; width: 28px; height: 34px; margin-left: -2px;
  border: 0; border-radius: 8px; background: none; color: var(--ink-2); cursor: pointer;
}
.nav-caret:hover, .nav-caret[aria-expanded="true"] { color: var(--brand-700); background: var(--brand-50); }
.nav-caret .icon { transition: transform .2s; }
.nav-caret[aria-expanded="true"] .icon { transform: rotate(180deg); }
.has-sub .nav-link.is-active::after { right: 4px; }
.nav-link[aria-expanded="true"] .icon { transform: rotate(180deg); }

.sub-menu {
  position: absolute; top: calc(100% + 6px); left: 0; min-width: 190px;
  list-style: none; padding: 8px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow);
  opacity: 0; visibility: hidden; transform: translateY(-4px);
  transition: opacity .15s, transform .15s, visibility .15s;
}
.has-sub.is-open .sub-menu { opacity: 1; visibility: visible; transform: none; }
.sub-menu a { display: block; padding: 10px 12px; border-radius: 8px; color: var(--ink-2); text-decoration: none; font-weight: 500; }
.sub-menu a:hover { background: var(--brand-50); color: var(--brand-700); }

.lang-switch {
  display: flex; align-items: center; gap: 2px;
  padding: 4px 6px 4px 10px; border: 1px solid var(--line); border-radius: 999px;
  color: var(--muted);
}
.lang-switch a {
  padding: 6px 8px; border-radius: 999px;
  font: 600 .78rem/1 var(--font-body); letter-spacing: .04em;
  color: var(--muted); text-decoration: none;
}
.lang-switch a:hover { color: var(--brand-700); }
.lang-switch a.is-active { background: var(--brand-700); color: #fff; }

.nav-toggle {
  display: none; margin-left: auto;
  width: 46px; height: 46px; border-radius: 12px;
  border: 1px solid var(--line); background: #fff; color: var(--ink);
  align-items: center; justify-content: center; cursor: pointer;
}
.nav-toggle-close { display: none; }

@media (max-width: 960px) {
  .nav-toggle { display: inline-flex; }
  .nav-toggle[aria-expanded="true"] .nav-toggle-open { display: none; }
  .nav-toggle[aria-expanded="true"] .nav-toggle-close { display: inline; }
  .site-nav {
    position: fixed; inset: var(--header-h) 0 0 0;
    flex-direction: column; align-items: stretch; gap: 24px;
    padding: 24px 20px 40px; margin: 0;
    background: #fff; overflow-y: auto;
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity .2s, transform .2s, visibility .2s;
  }
  .site-nav.is-open { opacity: 1; visibility: visible; transform: none; }
  .nav-list { flex-direction: column; align-items: stretch; gap: 4px; }
  .nav-link { width: 100%; justify-content: space-between; padding: 16px 12px; font-size: 1.1rem; }
  .nav-split .nav-link { flex: 1; }
  .nav-caret { width: 48px; height: 48px; }
  .nav-link.is-active::after { display: none; }
  .nav-link.is-active { background: var(--brand-50); }
  .sub-menu {
    position: static; box-shadow: none; border: 0; padding: 0 0 0 12px;
    opacity: 1; visibility: visible; transform: none; display: none;
  }
  .has-sub.is-open .sub-menu { display: block; }
  .lang-switch { align-self: flex-start; }
  body.nav-open { overflow: hidden; }
}

/* ---------- Hero (home) ---------- */
.hero {
  position: relative; overflow: hidden;
  padding-block: clamp(48px, 8vw, 96px) clamp(56px, 8vw, 104px);
  background:
    radial-gradient(1200px 500px at 85% -10%, var(--brand-100), transparent 60%),
    linear-gradient(180deg, #fff, var(--surface));
}
.hero::after {
  content: ""; position: absolute; right: -60px; bottom: -80px;
  width: 460px; height: 460px;
  background: url("../img/brand/logo-fabiog-512.png") center/contain no-repeat;
  opacity: .07; pointer-events: none;
}
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.25fr .75fr; gap: 56px; align-items: center; }
.hero h1 { margin-bottom: 10px; }
.hero-role {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(1.3rem, 2.4vw, 1.75rem); line-height: 1.2;
  color: var(--brand-700); margin-bottom: 20px;
}
.hero .lead { margin-bottom: 32px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-photo { position: relative; justify-self: center; width: min(100%, 380px); }
.hero-photo img { width: 100%; border-radius: 50%; box-shadow: 0 30px 60px -25px rgba(43,100,160,.55); }
.hero-photo::before {
  content: ""; position: absolute; inset: -14px; border-radius: 50%;
  border: 2px dashed var(--brand); opacity: .5;
}

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 56px; position: relative; z-index: 1; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow-sm); }
.stat strong { display: block; font: 600 2.1rem/1 var(--font-display); color: var(--ink); margin-bottom: 6px; }
.stat span { font-size: .92rem; color: var(--muted); line-height: 1.4; display: block; }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-photo { order: -1; width: 220px; justify-self: start; }
  .stats { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Sobre ---------- */
.about-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 56px; }
.about-grid p { font-size: 1.08rem; color: var(--ink-2); }
@media (max-width: 800px) { .about-grid { grid-template-columns: 1fr; gap: 16px; } }

/* ---------- Cards / grids ---------- */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 960px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card {
  position: relative; display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 28px; box-shadow: var(--shadow-sm);
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.card:hover { border-color: var(--brand-100); box-shadow: var(--shadow); }
.card h3 { margin-bottom: 8px; }
.card p { color: var(--muted); margin-bottom: 16px; }
.card .link-arrow { margin-top: auto; }
.card-icon {
  width: 48px; height: 48px; border-radius: 12px;
  display: grid; place-items: center; margin-bottom: 18px;
  background: var(--brand-50); color: var(--brand-700);
}

/* ---------- Timeline (formação) ---------- */
.edu-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 56px; }
@media (max-width: 900px) { .edu-grid { grid-template-columns: 1fr; } }
.timeline { list-style: none; position: relative; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 2px; background: var(--line); }
.timeline li { position: relative; padding: 0 0 26px 36px; }
.timeline li::before {
  content: ""; position: absolute; left: 0; top: 6px;
  width: 16px; height: 16px; border-radius: 4px;
  background: #fff; border: 3px solid var(--brand);
}
.timeline strong { display: block; font-size: 1.05rem; color: var(--ink); line-height: 1.35; }
.timeline span { font-size: .92rem; color: var(--muted); }

.chips { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; }
.chips li {
  padding: 9px 14px; border-radius: 999px;
  background: #fff; border: 1px solid var(--line);
  font-size: .92rem; font-weight: 500; color: var(--ink-2);
}
.certs-box { align-self: start; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 28px; }
.certs-box h3 { margin-bottom: 18px; }

/* ---------- Logos de clientes ---------- */
.logo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 16px; list-style: none; }
.logo-grid li {
  display: grid; place-items: center; aspect-ratio: 1;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px; transition: border-color .2s, box-shadow .2s;
}
.logo-grid li:hover { border-color: var(--brand-100); box-shadow: var(--shadow); }
.logo-grid img { width: 100%; max-width: 120px; max-height: 100%; object-fit: contain; filter: grayscale(1); opacity: .8; transition: filter .25s, opacity .25s; }
.logo-grid li:hover img { filter: none; opacity: 1; }
.logo-strip { grid-template-columns: repeat(6, 1fr); }
@media (max-width: 900px) { .logo-strip { grid-template-columns: repeat(3, 1fr); } }

/* ---------- Cards de projeto (home + /projetos/) ---------- */
.pcard {
  --accent: var(--brand);
  position: relative; display: flex; flex-direction: column;
  padding: 26px 24px 22px; border-radius: var(--radius-lg);
  background: #fff; border: 1px solid var(--line);
  color: inherit; text-decoration: none; overflow: hidden;
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.pcard::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--accent); }
.pcard:hover {
  transform: translateY(-3px); box-shadow: var(--shadow);
  border-color: color-mix(in srgb, var(--accent) 40%, var(--line));
}
.pcard-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.pcard-logo {
  flex-shrink: 0; width: 56px; height: 56px; padding: 9px;
  display: grid; place-items: center; border-radius: 16px;
  background: color-mix(in srgb, var(--accent) 13%, #fff);
}
.pcard-logo img { width: 100%; height: 100%; object-fit: contain; }
.pcard-name { font-size: 1.45rem; margin: 0; }
.pcard-tag {
  margin: 3px 0 0; font-size: .74rem; font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase;
  color: color-mix(in srgb, var(--accent) 55%, var(--ink-2));
}
.pcard-desc { color: var(--ink-2); font-size: .95rem; line-height: 1.6; margin-bottom: 18px; }
.pcard-foot {
  margin-top: auto; padding-top: 16px; border-top: 1px dashed var(--line);
  display: flex; flex-direction: column; align-items: flex-start; gap: 12px;
}
.btn-sm { min-height: 38px; padding: 8px 16px; font-size: .88rem; }
.pcard-cta { background: var(--ink); color: #fff; }
.pcard-cta:hover { background: var(--brand-700); color: #fff; }
.pcard-links { list-style: none; display: flex; flex-wrap: wrap; row-gap: 4px; font-size: .86rem; }
.pcard-links li:not(:last-child)::after { content: "·"; margin: 0 8px; color: var(--muted); }
.pcard-links a { color: var(--brand-700); font-weight: 500; text-decoration: none; }
.pcard-links a:hover { text-decoration: underline; }

.pcard.is-compact { padding-right: 52px; }
.pcard.is-compact .pcard-desc {
  margin: 0; font-size: .92rem;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.pcard-arrow { position: absolute; top: 24px; right: 20px; color: var(--muted); transition: color .2s, transform .2s; }
.pcard.is-compact:hover .pcard-arrow { color: var(--accent); transform: translate(2px, -2px); }

/* ---------- Páginas internas ---------- */
.page-hero {
  position: relative; overflow: hidden;
  padding-block: clamp(48px, 7vw, 88px) clamp(40px, 6vw, 72px);
  background: linear-gradient(180deg, var(--brand-50), #fff);
  border-bottom: 1px solid var(--line);
}
.page-hero::after {
  content: ""; position: absolute; right: -40px; top: -40px;
  width: 300px; height: 300px;
  background: url("../img/brand/logo-fabiog-512.png") center/contain no-repeat;
  opacity: .06; pointer-events: none;
}
.page-hero h1 { max-width: 20ch; }
.page-hero .lead { margin: 0; }

.prose { max-width: 760px; }
.prose h2 { font-size: 1.8rem; margin-top: 2em; }
.prose p, .prose li { color: var(--ink-2); }
.prose ul { padding-left: 1.2em; margin-bottom: 1em; }
.prose li { margin-bottom: .4em; }

.check-list { list-style: none; display: grid; gap: 10px; }
.check-list li { display: flex; gap: 10px; align-items: flex-start; color: var(--ink-2); }
.check-list .icon { color: var(--brand-600); margin-top: 3px; }
.check-cols { columns: 2; column-gap: 32px; }
.check-cols li { break-inside: avoid; margin-bottom: 10px; }
@media (max-width: 640px) { .check-cols { columns: 1; } }

.module { counter-increment: mod; }
.module ol { margin: 0; padding-left: 1.2em; color: var(--ink-2); }
.module ol li { margin-bottom: 6px; }

/* ---------- Projetos: listas ---------- */
.link-list { list-style: none; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.link-list li + li { border-top: 1px solid var(--line); }
.link-list a { display: flex; align-items: center; gap: 12px; padding: 15px 20px; color: var(--ink); text-decoration: none; font-weight: 500; }
.link-list a:hover { background: var(--brand-50); color: var(--brand-700); }
.link-list .icon { margin-left: auto; color: var(--muted); }
.link-list .badge { font-size: .74rem; font-weight: 600; color: var(--brand-700); background: var(--brand-50); padding: 3px 8px; border-radius: 6px; }
.list-title { display: flex; align-items: center; gap: 10px; font-size: 1.5rem; margin-bottom: 16px; }

.film { display: grid; grid-template-columns: 200px 1fr; gap: 36px; align-items: center; }
.film img { border-radius: var(--radius); box-shadow: var(--shadow); }
@media (max-width: 640px) { .film { grid-template-columns: 1fr; } .film img { width: 160px; } }

/* ---------- Contato ---------- */
.contact-grid { display: grid; grid-template-columns: 1.4fr .9fr; gap: 40px; align-items: start; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }
.form-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(22px, 4vw, 40px); box-shadow: var(--shadow-sm); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 640px) { .form-row { grid-template-columns: 1fr; } }
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: 6px; color: var(--ink); }
.field label small { font-weight: 400; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%; padding: 13px 14px;
  font: inherit; color: var(--ink);
  background: var(--surface); border: 1.5px solid var(--line); border-radius: 12px;
  transition: border-color .2s, background-color .2s;
}
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--brand); background: #fff; }
.field .error { display: block; margin-top: 6px; color: var(--error); font-size: .86rem; }
.field.has-error input, .field.has-error textarea { border-color: var(--error); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-note { font-size: .86rem; color: var(--muted); margin: 14px 0 0; }
.alert { padding: 14px 18px; border-radius: 12px; margin-bottom: 22px; font-weight: 500; }
.alert-error { background: #fdecea; color: #8a2a1f; }

.aside-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 28px; }
.aside-card + .aside-card { margin-top: 20px; }
.aside-card h2 { font-size: 1.5rem; }
.aside-card .btn { width: 100%; margin-bottom: 10px; }
.aside-card p { color: var(--ink-2); margin: 0; }

.center-box { max-width: 640px; margin-inline: auto; text-align: center; }
.center-box .icon-big {
  width: 72px; height: 72px; margin: 0 auto 22px; border-radius: 50%;
  display: grid; place-items: center; background: var(--brand-50); color: var(--brand-700);
}
.center-box .btn { margin-top: 10px; }

/* ---------- Currículo ---------- */
.cv-hero {
  padding-block: clamp(40px, 6vw, 72px) 40px;
  background: radial-gradient(1000px 420px at 90% -10%, var(--brand-100), transparent 60%), linear-gradient(180deg, #fff, var(--surface));
}
.cv-profile { display: flex; align-items: center; gap: 28px; }
.cv-photo { width: 140px; height: 140px; border-radius: 50%; flex-shrink: 0; box-shadow: 0 20px 40px -20px rgba(43,100,160,.6); }
.cv-profile h1 { margin-bottom: 4px; }
.cv-headline { font: 500 clamp(1.2rem, 2.2vw, 1.6rem)/1.2 var(--font-display); color: var(--brand-700); margin-bottom: 6px; }
.cv-meta { color: var(--muted); font-size: .92rem; margin: 0; }
.cv-intro { max-width: 80ch; margin-top: 28px; }
.cv-intro p { font-size: 1.08rem; color: var(--ink-2); }
.cv-actions { margin-top: 8px; }
.cv-facts { margin-top: 36px; }
@media (max-width: 640px) {
  .cv-profile { flex-direction: column; align-items: flex-start; gap: 18px; }
  .cv-photo { width: 104px; height: 104px; }
}

.cv-toc { position: sticky; top: var(--header-h); z-index: 20; background: rgba(255,255,255,.94); backdrop-filter: blur(8px); border-block: 1px solid var(--line); }
.cv-toc .container { display: flex; gap: 6px; overflow-x: auto; padding-block: 10px; scrollbar-width: none; }
.cv-toc a {
  flex-shrink: 0; padding: 8px 14px; border-radius: 999px;
  font-size: .88rem; font-weight: 600; color: var(--ink-2); text-decoration: none;
}
.cv-toc a:hover { background: var(--brand-50); color: var(--brand-700); }
[id] { scroll-margin-top: calc(var(--header-h) + 70px); }

.cv-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 48px; padding-block: 56px 88px; align-items: start; }
@media (max-width: 1000px) { .cv-layout { grid-template-columns: 1fr; } }
.cv-section + .cv-section { margin-top: 56px; }
.cv-section > h2 { margin-bottom: 24px; }

.cv-timeline { list-style: none; position: relative; }
.cv-timeline::before { content: ""; position: absolute; left: 7px; top: 10px; bottom: 10px; width: 2px; background: var(--line); }
.cv-item { position: relative; padding: 0 0 34px 40px; }
.cv-item::before {
  content: ""; position: absolute; left: 0; top: 8px; width: 16px; height: 16px;
  border-radius: 4px; background: #fff; border: 3px solid var(--brand);
}
.cv-item.is-current::before { background: var(--brand); box-shadow: 0 0 0 5px var(--brand-100); }
.cv-item-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.cv-item h3 { font-size: 1.5rem; margin: 0; }
.cv-badge { font: 700 .7rem/1 var(--font-body); letter-spacing: .08em; text-transform: uppercase; padding: 6px 10px; border-radius: 999px; background: var(--brand-700); color: #fff; }
.cv-company { margin: 4px 0 6px; color: var(--muted); }
.cv-company strong { color: var(--ink); }
.cv-previous { font-size: .9rem; color: var(--muted); margin-bottom: 8px; }
.cv-previous span { font-weight: 600; color: var(--ink-2); }
.cv-summary { color: var(--ink-2); margin-bottom: 10px; }

.cv-details { margin: 6px 0 12px; }
.cv-details summary {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer; list-style: none;
  font-size: .88rem; font-weight: 600; color: var(--brand-700);
}
.cv-details summary::-webkit-details-marker { display: none; }
.cv-details summary .icon { transition: transform .2s; }
.cv-details[open] summary .icon { transform: rotate(180deg); }
.cv-details .less, .cv-details[open] .more { display: none; }
.cv-details[open] .less { display: inline; }
.cv-bullets { list-style: none; display: grid; gap: 8px; margin: 12px 0 4px; }
.cv-bullets li { position: relative; padding-left: 18px; color: var(--ink-2); font-size: .96rem; }
.cv-bullets li::before { content: ""; position: absolute; left: 0; top: .62em; width: 8px; height: 2px; background: var(--brand); }
.cv-bullets.is-star li::before { width: 7px; height: 7px; top: .5em; border-radius: 2px; transform: rotate(45deg); }
.cv-sub { margin: 14px 0 0; font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }

.cv-tags { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.cv-tags li { padding: 5px 10px; border-radius: 8px; font-size: .8rem; font-weight: 600; background: var(--brand-50); color: var(--brand-700); }
.cv-tags.is-soft li { background: var(--surface); color: var(--ink-2); font-weight: 500; border: 1px solid var(--line); }

.cv-certs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
@media (max-width: 640px) { .cv-certs { grid-template-columns: 1fr; } }
.cv-cert-year { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.cv-cert-year h3 { font-size: 1.6rem; color: var(--brand-700); margin-bottom: 10px; }
.cv-cert-year ul { list-style: none; display: grid; gap: 10px; }
.cv-cert-year strong { display: block; font-size: .93rem; line-height: 1.35; color: var(--ink); font-weight: 600; }
.cv-cert-year span { font-size: .82rem; color: var(--muted); }

.cv-aside { display: grid; gap: 20px; position: sticky; top: calc(var(--header-h) + 72px); }
@media (max-width: 1000px) { .cv-aside { position: static; } }
.cv-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 24px; }
.cv-card h2 { font-size: 1.5rem; margin-bottom: 16px; }
.cv-card h3 { font: 700 .76rem/1 var(--font-body); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 18px 0 4px; }
.cv-card h3:first-of-type { margin-top: 0; }
.cv-edu { list-style: none; display: grid; gap: 16px; }
.cv-edu li { display: grid; gap: 2px; padding-left: 14px; border-left: 3px solid var(--brand-100); }
.cv-edu strong { font-size: .98rem; line-height: 1.3; }
.cv-edu span { font-size: .85rem; color: var(--muted); }
.cv-edu .cv-edu-type { font-size: .74rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--brand-700); }
.cv-langs { list-style: none; display: grid; gap: 14px; }
.cv-langs div { display: flex; justify-content: space-between; gap: 10px; font-size: .94rem; margin-bottom: 6px; }
.cv-langs div span { color: var(--muted); font-size: .86rem; }
.cv-bar { display: block; height: 8px; border-radius: 99px; background: var(--brand-50); overflow: hidden; }
.cv-bar span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--brand), var(--brand-700)); }

/* Impressão / Salvar em PDF (vale para todo o site, pensada para o currículo) */
@media print {
  @page { margin: 14mm; }
  body { font-size: 10.5pt; }
  .site-header, .site-footer, .cv-toc, .cv-actions, .skip-link, .cta-band, .nav-toggle, .cv-details summary { display: none !important; }
  .cv-hero { background: none; padding: 0 0 12px; }
  .cv-layout { display: block; padding: 0; }
  .cv-aside { position: static; display: block; }
  .cv-card, .cv-cert-year, .stat { box-shadow: none; break-inside: avoid; }
  .cv-card { margin-top: 14px; }
  .cv-item { break-inside: avoid; padding-bottom: 18px; }
  .cv-section + .cv-section { margin-top: 24px; }
  .cv-facts { display: none; }
  .js .reveal { opacity: 1 !important; transform: none !important; }
  a { color: inherit; text-decoration: none; }
}

/* ---------- 404 interativa ---------- */
.nf { background: radial-gradient(900px 420px at 90% 0%, var(--brand-100), transparent 60%), linear-gradient(180deg, #fff, var(--surface)); }
.nf-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
@media (max-width: 960px) { .nf-grid { grid-template-columns: 1fr; gap: 40px; } }
.nf-code {
  margin: 0 0 8px; font: 700 clamp(4.5rem, 12vw, 8rem)/.9 var(--font-display);
  color: var(--ink); letter-spacing: .02em;
}
.nf-code span { color: var(--brand); display: inline-block; }
@media (prefers-reduced-motion: no-preference) {
  .nf-code span { animation: nf-wobble 3.2s ease-in-out infinite; }
}
@keyframes nf-wobble { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(-14deg); } 40% { transform: rotate(10deg); } 60% { transform: rotate(0); } }
.nf h1 { font-size: clamp(2rem, 4vw, 3rem); }
.nf-joke {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 14px 16px; border-radius: 12px;
  background: #fff; border: 1px dashed var(--brand); color: var(--ink-2); font-weight: 500;
}
.nf-joke .icon { color: var(--brand-700); margin-top: 2px; }
.nf-url { font-size: .9rem; color: var(--muted); margin-bottom: 28px; word-break: break-all; }
.nf-url code { background: var(--brand-50); color: var(--brand-700); padding: 2px 8px; border-radius: 6px; }

.nf-game { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px; box-shadow: var(--shadow); }
.nf-game-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 16px; }
.nf-game-head p { margin: 0; font-size: .92rem; color: var(--muted); }
.nf-game-head strong { font: 600 1.35rem/1.2 var(--font-display); color: var(--ink); }
.nf-moves { flex-shrink: 0; font: 600 .82rem/1 var(--font-body); padding: 8px 12px; border-radius: 999px; background: var(--brand-50); color: var(--brand-700); }
.nf-board { position: relative; display: flex; justify-content: center; }
.nf-board canvas { display: block; border-radius: 8px; touch-action: none; outline-offset: 6px; }
.nf-board canvas.is-bump { animation: nf-bump .25s; }
@keyframes nf-bump { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.nf-win {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  text-align: center; padding: 20px; border-radius: 12px;
  background: rgba(255,255,255,.94); backdrop-filter: blur(3px);
}
.nf-win[hidden] { display: none; }
.nf-win h2 { font-size: 2rem; margin: 0; }
.nf-win p { color: var(--ink-2); max-width: 32ch; }
.nf-win .btn { margin-top: 6px; }
.nf-win .icon-big { margin: 0 auto 10px; }
.nf-controls { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 18px; flex-wrap: wrap; }
.nf-dpad { display: grid; grid-template-columns: repeat(3, 44px); grid-template-rows: repeat(2, 44px); gap: 6px; }
.nf-dpad button {
  display: grid; place-items: center; border-radius: 12px; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
}
.nf-dpad button:hover { background: var(--brand-50); color: var(--brand-700); border-color: var(--brand); }
.nf-dpad button:active { transform: scale(.94); }
.nf-dpad [data-dir="up"] { grid-column: 2; grid-row: 1; }
.nf-dpad [data-dir="up"] .icon { transform: rotate(180deg); }
.nf-dpad [data-dir="left"] { grid-column: 1; grid-row: 2; }
.nf-dpad [data-dir="left"] .icon { transform: rotate(90deg); }
.nf-dpad [data-dir="down"] { grid-column: 2; grid-row: 2; }
.nf-dpad [data-dir="right"] { grid-column: 3; grid-row: 2; }
.nf-dpad [data-dir="right"] .icon { transform: rotate(-90deg); }

/* ---------- CTA ---------- */
.cta-band { background: var(--dark); color: #fff; padding-block: clamp(48px, 7vw, 80px); position: relative; overflow: hidden; }
.cta-band::after {
  content: ""; position: absolute; left: -60px; bottom: -120px; width: 360px; height: 360px;
  background: url("../img/brand/logo-fabiog-512.png") center/contain no-repeat; opacity: .08;
}
.cta-inner { position: relative; z-index: 1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 28px; }
.cta-band h2 { color: #fff; margin-bottom: 6px; }
.cta-band p { color: #b9c6d4; margin: 0; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Rodapé ---------- */
.site-footer { background: var(--dark-2); color: #b9c6d4; padding-top: 64px; font-size: .95rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 48px; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }
.footer-brand img { width: 130px; margin-bottom: 16px; background: #fff; padding: 8px 10px; border-radius: 10px; }
.footer-brand p { max-width: 32ch; }
.footer-title { font: 600 .8rem/1 var(--font-body); text-transform: uppercase; letter-spacing: .14em; color: #fff; margin-bottom: 18px; }
.footer-links { list-style: none; display: grid; gap: 10px; }
.site-footer a { color: #b9c6d4; text-decoration: none; }
.site-footer a:hover { color: #fff; }
.social { display: flex; gap: 10px; list-style: none; margin-top: 18px; }
.social a {
  width: 42px; height: 42px; display: grid; place-items: center;
  border-radius: 50%; border: 1px solid rgba(255,255,255,.15);
}
.social a:hover { background: var(--brand-700); border-color: var(--brand-700); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); padding-block: 22px; font-size: .86rem; }
.footer-bottom p { margin: 0; }

/* ---------- Animação de entrada ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
  .js .reveal.is-visible { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
