/* ==========================================================================
   joaoataide.com · estilos
   Tema escuro por padrão; claro via prefers-color-scheme ou botão (data-theme).
   Nenhum estilo inline: a CSP bloqueia style="" e <style>.
   ========================================================================== */

:root {
  --bg: #070b14;
  --bg-soft: #0b1120;
  --surface: #0f172a;
  --surface-2: #131d35;
  --border: rgba(148, 163, 184, 0.16);
  --border-strong: rgba(148, 163, 184, 0.3);
  --text: #e7ecf5;
  --text-soft: #c3cbda;
  --muted: #8f9bb3;
  --accent: #38bdf8;
  --accent-2: #818cf8;
  --accent-ink: #04121f;
  --glow: rgba(56, 189, 248, 0.22);
  --grad: linear-gradient(120deg, #38bdf8 0%, #818cf8 55%, #c084fc 100%);
  --shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.6);
  --radius: 16px;
  --radius-sm: 10px;
  --container: 1160px;
  --narrow: 760px;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --mono: ui-monospace, SFMono-Regular, "Cascadia Code", "JetBrains Mono", Menlo, Consolas, monospace;
  --header-h: 68px;
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f6f8fb; --bg-soft: #eef2f8; --surface: #ffffff; --surface-2: #f3f6fb;
    --border: rgba(15, 23, 42, 0.1); --border-strong: rgba(15, 23, 42, 0.2);
    --text: #0b1324; --text-soft: #26324a; --muted: #5a6680;
    --accent: #0284c7; --accent-2: #4f46e5; --accent-ink: #ffffff; --glow: rgba(2, 132, 199, 0.15);
    --grad: linear-gradient(120deg, #0284c7 0%, #4f46e5 60%, #9333ea 100%);
    --shadow: 0 10px 30px -14px rgba(15, 23, 42, 0.25);
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: #f6f8fb; --bg-soft: #eef2f8; --surface: #ffffff; --surface-2: #f3f6fb;
  --border: rgba(15, 23, 42, 0.1); --border-strong: rgba(15, 23, 42, 0.2);
  --text: #0b1324; --text-soft: #26324a; --muted: #5a6680;
  --accent: #0284c7; --accent-2: #4f46e5; --accent-ink: #ffffff; --glow: rgba(2, 132, 199, 0.15);
  --grad: linear-gradient(120deg, #0284c7 0%, #4f46e5 60%, #9333ea 100%);
  --shadow: 0 10px 30px -14px rgba(15, 23, 42, 0.25);
  color-scheme: light;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body {
  margin: 0; background: var(--bg); color: var(--text); font-family: var(--font);
  font-size: 1rem; line-height: 1.65; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--text); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3, h4 { line-height: 1.2; letter-spacing: -0.02em; margin: 0 0 0.6em; }
p { margin: 0 0 1em; }
code { font-family: var(--mono); font-size: 0.9em; }
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.container-narrow { max-width: var(--narrow); }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }
.visually-hidden { position: absolute !important; 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(--accent); color: var(--accent-ink); padding: 10px 14px; border-radius: 8px; font-weight: 600; }
.skip-link:focus { top: 12px; }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- botões, chips, badges ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; border-radius: 999px; font-weight: 600; font-size: 0.95rem; line-height: 1;
  text-decoration: none; border: 1px solid transparent; cursor: pointer; transition: transform .15s ease, background .2s, border-color .2s, color .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 8px 24px -10px var(--glow); }
.btn-primary:hover { color: #fff; filter: brightness(1.08); }
.btn-outline { border-color: var(--border-strong); color: var(--text); background: transparent; }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-sm { padding: 8px 14px; font-size: 0.875rem; }
.btn-block { width: 100%; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0 0; }
.chip {
  display: inline-flex; align-items: center; padding: 7px 14px; border-radius: 999px; font-size: 0.9rem;
  border: 1px solid var(--border); background: var(--surface); color: var(--text-soft); text-decoration: none; cursor: pointer; font: inherit;
}
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip[aria-current="page"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.chip-sm { padding: 4px 11px; font-size: 0.82rem; }
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 0.75rem; font-weight: 600; letter-spacing: .02em;
  background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); text-decoration: none; }
.badge:hover { color: var(--text); }
.link-arrow { font-weight: 600; text-decoration: none; white-space: nowrap; }
.link-arrow::after { content: " →"; }

/* ---------- cabeçalho ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50; height: var(--header-h);
  background: color-mix(in srgb, var(--bg) 78%, transparent); backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent; transition: border-color .2s;
}
.site-header.is-scrolled { border-bottom-color: var(--border); }
.header-inner { height: 100%; display: flex; align-items: center; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 700; letter-spacing: -0.01em; }
.brand:hover { color: var(--text); }
.brand-logo { width: 36px; height: 36px; object-fit: contain; filter: drop-shadow(0 0 10px var(--glow)); }
/* logo: versão clara no tema escuro, versão azul-marinho no tema claro */
.logo-for-light { display: none; }
:root[data-theme="light"] .logo-for-dark { display: none; }
:root[data-theme="light"] .logo-for-light { display: block; filter: none; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .logo-for-dark { display: none; }
  :root:not([data-theme="dark"]) .logo-for-light { display: block; filter: none; }
}
.site-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.site-nav a:not(.btn) { color: var(--text-soft); text-decoration: none; padding: 8px 12px; border-radius: 8px; font-size: 0.95rem; }
.site-nav a:not(.btn):hover, .site-nav a[aria-current="page"] { color: var(--text); background: var(--surface); }
.nav-cta { margin-left: 8px; }
.header-actions { display: flex; align-items: center; gap: 6px; }
.icon-btn {
  width: 40px; height: 40px; display: inline-grid; place-items: center; border-radius: 10px; cursor: pointer;
  background: transparent; border: 1px solid var(--border); color: var(--text);
}
.icon-btn:hover { border-color: var(--accent); color: var(--accent); }
.icon-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.i-moon { display: none; }
:root[data-theme="light"] .i-sun { display: none; }
:root[data-theme="light"] .i-moon { display: block; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .i-sun { display: none; }
  :root:not([data-theme="dark"]) .i-moon { display: block; }
}
.menu-btn { display: none; }

@media (max-width: 860px) {
  .menu-btn { display: inline-grid; }
  .site-nav {
    position: fixed; inset: var(--header-h) 0 auto 0; flex-direction: column; align-items: stretch; gap: 2px;
    padding: 12px 20px 20px; background: var(--bg); border-bottom: 1px solid var(--border); box-shadow: var(--shadow);
    transform: translateY(-8px); opacity: 0; visibility: hidden; transition: opacity .2s, transform .2s, visibility .2s;
  }
  .site-nav.is-open { transform: none; opacity: 1; visibility: visible; }
  .site-nav a:not(.btn) { padding: 12px; }
  .nav-cta { margin: 8px 0 0; }
  .header-actions { margin-left: auto; }
}
@media (min-width: 861px) { .header-actions { margin-left: 0; } }

/* ---------- redes sociais (ícones PNG como máscara → herdam a cor) ---------- */
.social { display: flex; gap: 10px; list-style: none; margin: 0; padding: 0; }
.social a {
  width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%;
  border: 1px solid var(--border); color: var(--text-soft); transition: color .2s, border-color .2s, transform .15s;
}
.social a:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-2px); }
.icon { width: 18px; height: 18px; background-color: currentColor; -webkit-mask: center / contain no-repeat; mask: center / contain no-repeat; }
.icon-github { -webkit-mask-image: url("../img/site/icons/github.png"); mask-image: url("../img/site/icons/github.png"); }
.icon-linkedin { -webkit-mask-image: url("../img/site/icons/linkedin.png"); mask-image: url("../img/site/icons/linkedin.png"); }
.icon-instagram { -webkit-mask-image: url("../img/site/icons/instagram.png"); mask-image: url("../img/site/icons/instagram.png"); }

/* ---------- seções ---------- */
.section { padding: 96px 0; }
.section-tight { padding: 32px 0 96px; }
.section-alt { background: var(--bg-soft); border-block: 1px solid var(--border); }
.kicker { text-transform: uppercase; letter-spacing: .14em; font-size: 0.78rem; font-weight: 700; color: var(--accent); margin-bottom: 10px; }
.section-title { font-size: clamp(1.7rem, 3.2vw, 2.4rem); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 32px; flex-wrap: wrap; }
.section-head .section-title { margin: 0; }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.2rem); color: var(--text-soft); max-width: 62ch; }
.prose-lg { font-size: 1.08rem; color: var(--text-soft); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }

/* ---------- hero (home) ---------- */
.hero { position: relative; overflow: hidden; padding: 72px 0 96px; }
.hero-bg {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(60% 60% at 80% 20%, var(--glow), transparent 70%),
    radial-gradient(40% 50% at 10% 90%, color-mix(in srgb, var(--accent-2) 18%, transparent), transparent 70%),
    linear-gradient(var(--border) 1px, transparent 1px) 0 0 / 48px 48px,
    linear-gradient(90deg, var(--border) 1px, transparent 1px) 0 0 / 48px 48px;
  -webkit-mask-image: radial-gradient(90% 80% at 50% 30%, #000 40%, transparent 100%);
  mask-image: radial-gradient(90% 80% at 50% 30%, #000 40%, transparent 100%);
}
.hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 56px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); font-size: 0.85rem; color: var(--text-soft); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 4px rgba(34, 197, 94, .18); }
.hero-title { font-size: clamp(2.4rem, 6vw, 4.2rem); font-weight: 800; letter-spacing: -0.035em; margin: 18px 0 16px; }
.role-list { display: flex; flex-wrap: wrap; gap: 6px 14px; list-style: none; padding: 0; margin: 0 0 20px; color: var(--muted); font-family: var(--mono); font-size: 0.85rem; }
.role-list li + li::before { content: "/"; margin-right: 14px; color: var(--border-strong); }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0; }
.cta-row.center { justify-content: center; }
.hero-photo { margin: 0; position: relative; }
.hero-photo::before {
  content: ""; position: absolute; inset: -14px; border-radius: 28px; background: var(--grad); opacity: .35; filter: blur(30px); z-index: -1;
}
.hero-photo img { width: 100%; aspect-ratio: 4 / 4.2; object-fit: cover; object-position: 50% 30%; border-radius: 24px; border: 1px solid var(--border-strong); }

/* ---------- sobre ---------- */
.about-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 48px; align-items: start; }
.contact-card { padding: 28px; display: grid; gap: 12px; position: sticky; top: calc(var(--header-h) + 24px); }
.contact-card h3 { margin: 0; font-size: 1.3rem; }
.contact-card p { margin: 0 0 6px; }
.contact-card .btn { overflow: hidden; text-overflow: ellipsis; }

/* ---------- competências ---------- */
.expertise { list-style: none; padding: 0; margin: 32px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.expertise-card { padding: 22px 24px; display: grid; gap: 10px; align-content: start; }
.expertise-num { font-family: var(--mono); font-size: 0.8rem; color: var(--accent); }
.expertise-card h3 { font-size: 1.1rem; margin: 0; }
.expertise-card p { margin: 0 0 4px; font-size: 0.93rem; }

/* ---------- experiência ---------- */
.timeline { list-style: none; padding: 0; margin: 40px 0 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 130px; top: 8px; bottom: 8px; width: 2px; background: linear-gradient(var(--accent), transparent); opacity: .5; }
.timeline-item { display: grid; grid-template-columns: 130px 1fr; gap: 32px; margin-bottom: 24px; position: relative; }
.timeline-item::before { content: ""; position: absolute; left: 124px; top: 22px; width: 14px; height: 14px; border-radius: 50%; background: var(--bg); border: 3px solid var(--accent); }
.timeline-period { font-family: var(--mono); font-size: 0.85rem; color: var(--muted); padding-top: 18px; }
.timeline-card { padding: 22px 24px; }
.timeline-card h3 { font-size: 1.15rem; margin-bottom: 2px; }
.timeline-company { color: var(--accent); font-weight: 600; margin-bottom: 10px; }
.timeline-card p:last-child { margin: 0; color: var(--text-soft); }

.timeline-bullets { margin: 0; padding-left: 1.1em; color: var(--text-soft); display: grid; gap: 6px; font-size: 0.95rem; }
.timeline-bullets li::marker { color: var(--accent); }

/* ---------- foco e etiquetas ---------- */
.focus { margin-top: 18px; padding: 14px 16px; border-left: 3px solid var(--accent); background: var(--surface); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; color: var(--text-soft); }
.tag { padding: 4px 10px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); font-size: 0.82rem; color: var(--text-soft); font-family: var(--mono); }

/* ---------- formação ---------- */
.edu-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; margin-top: 32px; align-items: start; }
.edu-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.edu-item { padding: 16px 20px; }
.edu-item h3 { font-size: 1.02rem; margin: 4px 0 2px; }
.edu-item p { margin: 0; font-size: 0.9rem; }
.edu-period { font-family: var(--mono); font-size: 0.78rem; color: var(--accent); }
.edu-main { display: grid; gap: 14px; }
.edu-other { margin: 0 4px; font-size: 0.88rem; }
.edu-side { display: grid; gap: 12px; }
.side-card { padding: 18px 20px; }
.side-card h3 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: 10px; }
.side-card ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.side-card li { display: grid; gap: 1px; font-size: 0.93rem; }
.side-card li .muted { font-size: 0.85rem; }
.lang-list li { grid-template-columns: 1fr auto; align-items: baseline; }
@media (max-width: 900px) { .edu-grid { grid-template-columns: 1fr; } }

/* ---------- cards de post ---------- */
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; }
.post-card { display: flex; flex-direction: column; overflow: hidden; transition: transform .2s, border-color .2s, box-shadow .2s; }
.post-card:hover { transform: translateY(-3px); border-color: var(--border-strong); box-shadow: var(--shadow); }
.post-card-media { display: block; aspect-ratio: 16 / 9; background: var(--surface-2); overflow: hidden; }
.post-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.post-card:hover .post-card-media img { transform: scale(1.04); }
.post-card-body { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 0.82rem; color: var(--muted); }
.post-card-title { font-size: 1.12rem; margin: 2px 0 0; }
.post-card-title a { color: var(--text); text-decoration: none; }
.post-card-title a:hover { color: var(--accent); }
.post-card-excerpt { color: var(--muted); font-size: 0.93rem; margin: 0; }
@media (min-width: 900px) {
  .post-card--featured { grid-column: 1 / -1; flex-direction: row; }
  .post-card--featured .post-card-media { flex: 1.2; aspect-ratio: auto; min-height: 320px; }
  .post-card--featured .post-card-body { flex: 1; padding: 32px; justify-content: center; }
  .post-card--featured .post-card-title { font-size: 1.6rem; }
}

/* ---------- banner do ebook ---------- */
.ebook-band { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 32px; align-items: center; padding: 32px 40px; overflow: hidden;
  background: radial-gradient(70% 90% at 0% 50%, var(--glow), transparent 70%), var(--surface); }
.ebook-band .section-title { font-size: clamp(1.4rem, 2.6vw, 2rem); }

/* ---------- topo de páginas internas ---------- */
.page-hero { padding: 64px 0 8px; position: relative; }
.page-hero-compact { padding-bottom: 0; }
.page-title { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 800; letter-spacing: -0.03em; }
.search { margin-top: 20px; display: grid; gap: 8px; max-width: 520px; }
.search input {
  width: 100%; padding: 12px 16px; border-radius: 12px; border: 1px solid var(--border-strong); background: var(--surface);
  color: var(--text); font: inherit;
}
.search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--glow); }
.empty { padding: 40px 0; text-align: center; }

/* ---------- artigo ---------- */
.article-header { padding-top: 48px; }
.breadcrumb { display: flex; gap: 8px; font-size: 0.88rem; color: var(--muted); margin-bottom: 16px; }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent); }
.article-title { font-size: clamp(2rem, 4.6vw, 3rem); font-weight: 800; letter-spacing: -0.03em; }
.article-meta { display: flex; align-items: center; gap: 12px; margin: 20px 0 8px; font-size: 0.92rem; }
.article-meta strong { display: block; }
.avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; border: 1px solid var(--border-strong); }
.article-cover { margin: 28px auto 8px; max-width: 1000px; }
.article-cover img { width: 100%; max-height: 520px; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--border); }
.article-layout { display: grid; grid-template-columns: minmax(0, var(--narrow)); justify-content: center; gap: 48px; padding-top: 32px; padding-bottom: 72px; }
.article-layout.has-toc { grid-template-columns: 240px minmax(0, var(--narrow)); }
.toc { position: sticky; top: calc(var(--header-h) + 24px); align-self: start; max-height: calc(100vh - var(--header-h) - 48px); overflow: auto; font-size: 0.88rem; }
.toc summary { font-weight: 700; cursor: pointer; margin-bottom: 10px; color: var(--text); }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--border); }
.toc li a { display: block; padding: 5px 0 5px 14px; color: var(--muted); text-decoration: none; border-left: 2px solid transparent; margin-left: -1px; }
.toc li a:hover, .toc li a.is-active { color: var(--accent); border-left-color: var(--accent); }
.toc .toc-l3 a { padding-left: 26px; }
.toc .toc-l4 a { padding-left: 38px; }
@media (max-width: 1060px) {
  .article-layout.has-toc { grid-template-columns: minmax(0, var(--narrow)); }
  .toc { position: static; max-height: none; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px 16px; background: var(--surface); }
}

.prose { font-size: 1.07rem; line-height: 1.78; color: var(--text-soft); min-width: 0; }
.prose > * { margin-top: 0; margin-bottom: 0; }
.prose > * + * { margin-top: 1.1em; }
.prose h2, .prose h3, .prose h4 { color: var(--text); margin: 2em 0 0.6em; scroll-margin-top: calc(var(--header-h) + 16px); }
.prose h2 { font-size: 1.6rem; }
.prose h3 { font-size: 1.3rem; }
.prose h4 { font-size: 1.15rem; }
.prose strong { color: var(--text); }
.prose a { word-break: break-word; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li + li { margin-top: .35em; }
.prose img { border-radius: var(--radius-sm); border: 1px solid var(--border); margin: 1.6em auto; background: #fff; }
.prose blockquote { margin: 1.6em 0; padding: 4px 0 4px 20px; border-left: 3px solid var(--accent); color: var(--text); font-style: italic; }
.prose hr { border: 0; height: 1px; background: var(--border); margin: 2.4em 0; }
.prose :not(pre) > code { background: var(--surface-2); border: 1px solid var(--border); padding: 0.12em 0.4em; border-radius: 6px; color: var(--text); }
.prose .codehilite, .prose pre {
  position: relative; border-radius: var(--radius-sm); border: 1px solid var(--border); background: #0d1117; overflow: hidden; margin: 1.6em 0;
}
.prose .codehilite pre { margin: 0; border: 0; }
.prose pre { padding: 18px 20px; overflow-x: auto; font-size: 0.86rem; line-height: 1.6; color: #e6edf3; tab-size: 4; }
.copy-btn {
  position: absolute; top: 8px; right: 8px; padding: 4px 10px; border-radius: 6px; font-size: 0.75rem; cursor: pointer;
  background: rgba(255, 255, 255, .08); color: #c9d1d9; border: 1px solid rgba(255, 255, 255, .14); opacity: 0; transition: opacity .2s;
}
.codehilite:hover .copy-btn, .copy-btn:focus-visible { opacity: 1; }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-sm); margin: 1.6em 0; }
.prose table { border-collapse: collapse; width: 100%; font-size: 0.82rem; font-family: var(--mono); white-space: nowrap; }
.prose th, .prose td { padding: 8px 12px; border-bottom: 1px solid var(--border); text-align: left; }
.prose th { background: var(--surface-2); color: var(--text); position: sticky; top: 0; }
.prose tr:last-child td { border-bottom: 0; }
.article-footer { margin-top: 3em !important; padding-top: 1.6em; border-top: 1px solid var(--border); display: grid; gap: 16px; }
.tags { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

/* ---------- ebook ---------- */
.ebook-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 24px; }
.ebook-head .page-title { font-size: clamp(1.7rem, 4vw, 2.6rem); max-width: 22ch; }
.ebook-actions { display: flex; flex-wrap: wrap; gap: 10px; padding-bottom: 1em; }
.pdf-frame { border: 1px solid var(--border-strong); border-radius: var(--radius); overflow: hidden; background: var(--surface); box-shadow: var(--shadow); }
.pdf-frame iframe { display: block; width: 100%; height: min(85vh, 1100px); border: 0; }
.pdf-frame + p { margin-top: 14px; }
.pdf-missing { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: center; padding: 32px; }

/* ---------- erros ---------- */
.error-page { padding: 96px 0; }
.error-code { font-size: clamp(4rem, 12vw, 7rem); font-weight: 900; line-height: 1; margin: 0 0 8px; letter-spacing: -0.05em; }

/* ---------- rodapé ---------- */
.site-footer { border-top: 1px solid var(--border); background: var(--bg-soft); padding: 56px 0 24px; font-size: 0.93rem; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 32px; }
.footer-brand .brand { margin-bottom: 10px; }
.footer-brand p { max-width: 36ch; }
.footer-title { font-size: 0.8rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin-bottom: 12px; }
.footer-nav, .footer-contact { display: flex; flex-direction: column; gap: 8px; }
.footer-nav a, .footer-contact a { color: var(--text-soft); text-decoration: none; word-break: break-word; }
.footer-nav a:hover, .footer-contact a:hover { color: var(--accent); }
.footer-bottom { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--border); color: var(--muted); font-size: 0.85rem; }
.footer-bottom p { margin: 0; }

/* ---------- responsivo ---------- */
@media (max-width: 900px) {
  .hero { padding: 40px 0 72px; }
  .hero-grid, .about-grid, .ebook-band, .pdf-missing { grid-template-columns: 1fr; }
  .hero-photo { order: -1; max-width: 420px; }
  .contact-card { position: static; }
  .ebook-band { padding: 24px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .section { padding: 72px 0; }
}
@media (max-width: 640px) {
  .container { padding: 0 16px; }
  .timeline::before { left: 7px; }
  .timeline-item { grid-template-columns: 1fr; gap: 6px; padding-left: 32px; }
  .timeline-item::before { left: 0; top: 4px; }
  .timeline-period { padding-top: 0; }
  .footer-grid { grid-template-columns: 1fr; }
  .brand-name { font-size: 0.98rem; }
  .prose { font-size: 1.02rem; }
}

/* ---------- idiomas ---------- */
.lang-btn { width: auto; padding: 0 10px; font-size: 0.8rem; font-weight: 700; letter-spacing: .06em; text-decoration: none; }
.lang-note { margin: 12px 0 0; font-size: 0.9rem; color: var(--muted); }
.lang-note a { font-weight: 600; }

/* ---------- certificações ---------- */
.certs-title { margin: 40px 0 16px; font-size: 1.25rem; }
.certs-title .muted { font-weight: 400; font-size: 1rem; }
.certs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; align-items: start; }
.certs-group { font-size: 0.8rem; text-transform: uppercase; letter-spacing: .1em; color: var(--accent); margin: 0 0 10px; }

/* ---------- projetos ---------- */
.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 18px; margin-top: 32px; }
.project-card { padding: 24px; display: flex; flex-direction: column; gap: 10px; transition: transform .2s, border-color .2s, box-shadow .2s; }
.project-card:hover { transform: translateY(-3px); border-color: var(--border-strong); box-shadow: var(--shadow); }
.project-kind { margin: 0; font-size: 0.78rem; text-transform: uppercase; letter-spacing: .1em; color: var(--accent); font-weight: 700; }
.project-name { margin: 0; font-size: 1.3rem; }
.project-desc { margin: 0; color: var(--text-soft); flex: 1; }
.project-link { align-self: flex-start; margin-top: 6px; }
