/* =========================================================
   engwagner.com.br — estilos do site
   Mobile-first. Cores e fontes vêm de tokens.css.
   ========================================================= */

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
  transition: background-color .35s ease, color .35s ease;
}

body {
  min-height: 100vh;
  line-height: 1.65;
  font-size: 1rem;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul { list-style: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 8px; }
::selection { background: rgb(var(--poly-a) / .35); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: fixed; left: 16px; top: -60px; z-index: 100;
  padding: 10px 16px; border-radius: 10px;
  background: var(--accent-strong); color: #fff; font-weight: 600;
  transition: top .2s;
}
.skip-link:focus { top: 12px; }

.container { width: min(100% - 32px, var(--container)); margin-inline: auto; }

.i {
  width: 20px; height: 20px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}
.i-sm { width: 16px; height: 16px; }
.i-lg { width: 24px; height: 24px; }

/* ---------- Fundo: malha de polígonos ---------- */
.mesh {
  position: fixed; left: 0; right: 0; top: 0;
  height: 100vh; height: 100lvh;   /* lvh: a barra do navegador no celular não redimensiona a malha */
  z-index: -2; pointer-events: none;
  opacity: var(--mesh-opacity, 1);
}
.mesh canvas { width: 100%; height: 100%; display: block; }

.mesh-glow {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(55rem 38rem at 92% -8%, rgb(var(--poly-b) / .13), transparent 62%),
    radial-gradient(48rem 34rem at -8% 6%, rgb(var(--poly-a) / .11), transparent 60%),
    radial-gradient(40rem 30rem at 50% 110%, rgb(var(--poly-c) / .07), transparent 60%);
}

/* ---------- Cabeçalho ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: var(--header-h);
  display: flex; align-items: center;
  background: color-mix(in srgb, var(--bg) 70%, transparent);
  border-bottom: 1px solid transparent;
  transition: background-color .3s, border-color .3s;
}
.site-header.is-scrolled {
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  border-color: var(--border);
}
.site-header::after { /* faixa da zona segura ativa */
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px;
  background: var(--zone-grad); opacity: 0; transition: opacity .4s;
}
html.zone-on .site-header::after { opacity: 1; }

.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; letter-spacing: -.01em; }
.brand-mark {
  width: 34px; height: 39px; display: grid; place-items: center;
  clip-path: var(--hex); background: var(--grad);
  color: #fff; font-size: .78rem; letter-spacing: .02em;
}
.brand-name { display: none; }

.nav { display: none; }
.nav a {
  display: block; padding: 8px 12px; border-radius: 999px;
  color: var(--text-muted); font-size: .9rem; font-weight: 500;
  transition: color .2s, background-color .2s;
}
.nav a:hover { color: var(--text); background: var(--surface-2); }
.nav a[aria-current="true"] { color: var(--text); background: var(--accent-soft); }

.header-actions { display: flex; align-items: center; gap: 8px; }

.icon-btn {
  height: 40px; min-width: 40px; padding: 0 10px; border-radius: 12px;
  display: inline-grid; place-items: center;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  transition: border-color .2s, background-color .2s;
}
.icon-btn:hover { border-color: var(--border-strong); }
.lang-btn { font-family: var(--font-mono); font-size: .76rem; font-weight: 600; letter-spacing: .04em; }

.theme-btn .i-moon { display: none; }
:root[data-theme="light"] .theme-btn .i-sun { display: none; }
:root[data-theme="light"] .theme-btn .i-moon { display: block; }

.zone-btn {
  height: 40px; padding: 0 12px; border-radius: 12px;
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid rgb(var(--zone-rgb) / .45); background: var(--zone-soft);
  color: var(--text); font-size: .86rem; font-weight: 600;
  transition: border-color .2s, background-color .2s;
}
.zone-btn:hover { border-color: var(--zone); }
.zone-btn .i { color: var(--zone); }
.zone-btn .zone-label { display: none; }
.zone-btn .zone-timer { font-family: var(--font-mono); font-size: .76rem; color: var(--text-muted); display: none; }
.zone-btn .i-shield-check { display: none; }
html.zone-on .zone-btn .i-shield { display: none; }
html.zone-on .zone-btn .i-shield-check { display: block; }
html.zone-on .zone-btn .zone-timer { display: inline; }

/* Tooltip e sugestão da zona segura */
.zone-wrap { position: relative; }
.zone-tip, .zone-nudge {
  position: absolute; top: calc(100% + 12px); right: 0; z-index: 60;
  background: var(--surface-solid); border: 1px solid var(--border-strong);
  box-shadow: var(--shadow); border-radius: 14px;
}
.zone-tip::before, .zone-nudge::before { /* setinha apontando para o botão */
  content: ""; position: absolute; top: -6px; right: 26px; width: 10px; height: 10px;
  background: inherit; border-left: 1px solid; border-top: 1px solid; border-color: inherit;
  transform: rotate(45deg);
}
.zone-tip {
  width: max-content; max-width: 290px; padding: 11px 13px;
  font-size: .82rem; line-height: 1.5; color: var(--text-muted);
  opacity: 0; transform: translateY(-4px); pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}
.zone-tip strong { display: block; margin-bottom: 3px; color: var(--text); font-size: .86rem; }
.zone-tip .tip-on { display: none; }
html.zone-on .zone-tip .tip-off { display: none; }
html.zone-on .zone-tip .tip-on { display: block; }
.zone-btn:hover + .zone-tip,
.zone-btn:focus-visible + .zone-tip { opacity: 1; transform: none; transition-delay: .15s; }
.zone-wrap.has-nudge .zone-tip { display: none; }
@media (hover: none) { .zone-tip { display: none; } }

.zone-nudge {
  width: min(340px, calc(100vw - 32px)); padding: 16px;
  display: flex; gap: 14px; align-items: flex-start;
  border-color: rgb(var(--zone-rgb) / .5);
  box-shadow: var(--shadow), 0 0 0 4px var(--zone-soft);
  animation: pop .3s var(--ease);
}
.zone-nudge[hidden] { display: none; }
.zone-nudge .card-icon { width: 36px; height: 36px; border-radius: 10px; margin: 0; flex: none; }
.zone-nudge h3 { font-family: var(--font-display); font-size: 1rem; line-height: 1.3; }
.zone-nudge p { margin: 4px 0 14px; color: var(--text-muted); font-size: .86rem; line-height: 1.5; }
.nudge-actions { display: flex; gap: 8px; justify-content: flex-end; }
.zone-btn.is-nudging { animation: nudge-pulse 1.6s ease-in-out 3; }
@keyframes nudge-pulse { 50% { box-shadow: 0 0 0 6px rgb(var(--zone-rgb) / .25); } }
@media (max-width: 559px) {
  .zone-nudge { position: fixed; top: calc(var(--header-h) + 8px); left: 16px; right: 16px; width: auto; }
  .zone-nudge::before { display: none; }
}

.menu-btn .i-x { display: none; }
.menu-btn[aria-expanded="true"] .i-menu { display: none; }
.menu-btn[aria-expanded="true"] .i-x { display: block; }

/* Menu do celular: painel abaixo do cabeçalho */
.nav.is-open {
  display: block; position: fixed; inset: var(--header-h) 0 0 0;
  background: var(--bg); padding: 24px 16px; overflow-y: auto;
  border-top: 1px solid var(--border);
}
.nav.is-open ul { display: grid; gap: 4px; }
.nav.is-open a { font-family: var(--font-display); font-size: 1.5rem; font-weight: 600; padding: 12px 16px; border-radius: 14px; }

@media (min-width: 560px) {
  .brand-name { display: inline; }
  .zone-btn .zone-label { display: inline; }
}
@media (min-width: 1040px) {
  .nav, .nav.is-open { display: block; position: static; background: none; padding: 0; border: 0; overflow: visible; }
  .nav ul, .nav.is-open ul { display: flex; gap: 2px; }
  .nav.is-open a { font-family: inherit; font-size: .9rem; font-weight: 500; padding: 8px 12px; }
  .menu-btn { display: none; }
}

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 48px; padding: 0 22px; border-radius: 14px;
  font-weight: 600; font-size: .95rem; white-space: nowrap;
  transition: transform .2s var(--ease), box-shadow .2s, background-color .2s, border-color .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn-primary { background: var(--accent-strong); color: #fff; box-shadow: 0 12px 30px -12px rgb(var(--poly-a) / .7); }
.btn-ghost { border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); }
/* Botões da zona segura: verde, nunca o carmim da marca */
.btn-zone { background: var(--zone-strong); color: var(--zone-on-strong); box-shadow: 0 12px 30px -12px rgb(var(--zone-rgb) / .7); }
.btn-ghost[data-zone-open] .i { color: var(--zone); }
.btn-ghost[data-zone-open]:hover { border-color: var(--zone); }
.btn-sm { height: 40px; padding: 0 16px; font-size: .88rem; border-radius: 12px; }

.link-arrow { display: inline-flex; align-items: center; gap: 6px; color: var(--accent); font-weight: 600; font-size: .92rem; }
.link-arrow:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- Herói ---------- */
.hero { min-height: 100svh; display: grid; align-items: center; padding: calc(var(--header-h) + 36px) 0 56px; overflow-x: clip; }
.hero-grid { display: grid; gap: 48px; align-items: center; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: .76rem; font-weight: 500;
  letter-spacing: .1em; text-transform: uppercase; color: var(--accent);
}

.hero h1 {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(2.9rem, 1.6rem + 5.6vw, 5.4rem);
  line-height: .98; letter-spacing: -.035em; margin: 16px 0 18px;
}
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

.rotator { font-family: var(--font-display); font-size: clamp(1.2rem, 1rem + 1.1vw, 1.7rem); color: var(--text-muted); min-height: 1.5em; }
.rotator .txt-rotate { color: var(--text); font-weight: 600; }
.rotator .caret { display: inline-block; width: 2px; height: 1.05em; margin-left: 3px; vertical-align: -0.12em; background: var(--accent); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.lead { max-width: 58ch; color: var(--text-muted); font-size: clamp(1rem, .95rem + .3vw, 1.12rem); margin: 22px 0 30px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }

.hero-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-top: 30px; }
.status { display: inline-flex; align-items: center; gap: 10px; font-size: .88rem; color: var(--text-muted); }
.status strong { color: var(--text); font-weight: 600; }
.pulse { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--sky); }
.pulse::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--sky); opacity: .5; animation: ping 2s ease-out infinite; }
@keyframes ping { 0% { transform: scale(.6); opacity: .6; } 100% { transform: scale(1.8); opacity: 0; } }

.socials { display: flex; gap: 8px; }
.social {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  border: 1px solid var(--border); background: var(--surface); color: var(--text-muted);
  transition: color .2s, border-color .2s, transform .2s var(--ease);
}
.social:hover { color: var(--text); border-color: var(--border-strong); transform: translateY(-2px); }

/* Foto em hexágono */
/* No celular a foto vem antes do nome, menor, para aparecer sem rolar. */
.portrait { position: relative; isolation: isolate; justify-self: center; order: -1; width: min(52vw, 230px); aspect-ratio: .866; }
.portrait::before {
  content: ""; position: absolute; inset: -14%; z-index: -1; border-radius: 50%;
  background: radial-gradient(closest-side, rgb(var(--poly-b) / .32), rgb(var(--poly-a) / .12) 60%, transparent);
  filter: blur(18px);
}
.portrait-ring { position: absolute; inset: 0; clip-path: var(--hex); background: var(--grad); }
.portrait-img {
  position: absolute; inset: 4px; clip-path: var(--hex); overflow: hidden; background: var(--surface-solid);
}
.portrait-img img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; filter: saturate(.92) contrast(1.03); }
.portrait-img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgb(9 14 26 / .35), transparent 40%); }

/* Moldura de hexágonos em volta da foto: decoração pura, nada por cima do rosto.
   O SVG é um quadrado de 1,3 × a altura da foto, centrado nela. */
.portrait-orbit {
  position: absolute; left: 50%; top: 50%; z-index: -1;
  width: 150%; height: 130%;
  transform: translate(-50%, -50%);
  overflow: visible; pointer-events: none;
}
.portrait-orbit polygon { fill: none; stroke: url(#orbit-grad); stroke-width: .45; }
.orbit { transform-box: fill-box; transform-origin: center; }
.orbit-a { opacity: .6; animation: spin 80s linear infinite; }
.orbit-b { opacity: .35; animation: spin 120s linear infinite reverse; }
.orbit-b polygon { stroke-dasharray: 1.5 2.5; }

/* Tecnologias principais: no texto do herói, não sobre a foto */
.hero-stack { display: flex; flex-wrap: wrap; gap: 8px; margin: -10px 0 30px; }
.hero-stack li {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 11px; border-radius: 10px;
  background: var(--surface); border: 1px solid var(--border);
  font-family: var(--font-mono); font-size: .74rem; font-weight: 500; color: var(--text);
}
.hero-stack .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--d, var(--accent)); }

@media (max-width: 559px) { .hero-grid { gap: 28px; } }

.scroll-hint { display: none; }

@media (min-width: 900px) {
  .hero-grid { grid-template-columns: minmax(0, 1.18fr) minmax(0, .82fr); gap: 64px; }
  .portrait { order: 0; width: min(100%, 360px); }
  .scroll-hint {
    display: inline-flex; position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%);
    width: 38px; height: 38px; border-radius: 50%; place-items: center; justify-content: center; align-items: center;
    border: 1px solid var(--border); color: var(--text-muted); animation: bob 2.4s ease-in-out infinite;
  }
  .hero { position: relative; }
}
@keyframes bob { 50% { transform: translate(-50%, 6px); } }

/* ---------- Números ---------- */
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.stat { padding: 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.stat-num { font-family: var(--font-display); font-weight: 700; font-size: clamp(2rem, 1.5rem + 2vw, 2.8rem); line-height: 1.05; letter-spacing: -.03em; }
.stat-label { margin-top: 6px; color: var(--text-muted); font-size: .9rem; line-height: 1.45; }
@media (min-width: 900px) { .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* ---------- Seções ---------- */
.section { padding: clamp(72px, 10vw, 124px) 0 0; }
.section:last-of-type { padding-bottom: clamp(72px, 10vw, 124px); }
.section-head { display: grid; gap: 14px; margin-bottom: 40px; max-width: 760px; }
.section-title { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.9rem, 1.35rem + 2.2vw, 2.8rem); line-height: 1.08; letter-spacing: -.025em; text-wrap: balance; }
.section-sub { color: var(--text-muted); max-width: 62ch; }

.class-tag {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: .66rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 6px; border: 1px solid var(--border-strong); color: var(--text-faint);
}
.class-tag.is-restricted { border-color: rgb(var(--zone-rgb) / .5); color: var(--zone); }

/* ---------- Cartões ---------- */
.card {
  position: relative; overflow: hidden;
  padding: 24px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border);
  transition: border-color .25s, transform .25s var(--ease), background-color .25s;
}
.card:hover { border-color: var(--border-strong); }
.card-glow {
  position: absolute; right: -70px; top: -70px; width: 180px; height: 180px; border-radius: 50%;
  background: var(--glow, var(--accent)); opacity: .14; filter: blur(46px); pointer-events: none;
  transition: opacity .3s;
}
.card:hover .card-glow { opacity: .26; }
.card h3 { font-family: var(--font-display); font-size: 1.2rem; font-weight: 600; line-height: 1.3; letter-spacing: -.01em; }
.card p { color: var(--text-muted); font-size: .95rem; }

.card-icon {
  width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; margin-bottom: 18px;
  color: #fff; background: linear-gradient(135deg, var(--c1), var(--c2));
  box-shadow: 0 10px 24px -10px var(--c2);
}
.tone-crimson { --c1: #ff6b86; --c2: #c70039; --glow: #ff4d6d; }
.tone-violet  { --c1: #b69cff; --c2: #7c3aed; --glow: #a78bfa; }
.tone-sky     { --c1: #5cc8fa; --c2: #0284c7; --glow: #38bdf8; }
.tone-fuchsia { --c1: #f08cf7; --c2: #c026d3; --glow: #e879f9; }
.tone-indigo  { --c1: #8b9cff; --c2: #4338ca; --glow: #818cf8; }
.tone-teal    { --c1: #4fd1c5; --c2: #0f766e; --glow: #2dd4bf; }
.tone-orange  { --c1: #fdba74; --c2: #ea580c; --glow: #fb923c; }
.tone-zone    { --c1: #4ade80; --c2: #16a34a; --glow: #22c55e; } /* só para a zona segura */

/* Chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 11px; border-radius: 999px; line-height: 1.35;
  border: 1px solid var(--border); background: var(--surface-2);
  font-size: .8rem; font-weight: 500; color: var(--text); overflow-wrap: anywhere;
}
.chip[data-nivel]::before { content: ""; width: 8px; height: 8px; border-radius: 50%; flex: none; }
.chip[data-nivel="diario"]::before { background: var(--accent); }
.chip[data-nivel="solido"]::before { background: linear-gradient(90deg, var(--violet) 50%, transparent 50%); box-shadow: inset 0 0 0 1.5px var(--violet); }
.chip[data-nivel="conhecimento"]::before { box-shadow: inset 0 0 0 1.5px var(--sky); }

.legend { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: .82rem; color: var(--text-muted); }
.legend .chip { border: 0; background: none; padding: 0; color: var(--text-muted); font-size: .82rem; }

/* Nuvem de tecnologias (Habilidades): o tamanho segue o nível de uso */
.tech-cloud-wrap { margin: 0 0 36px; }
.tech-cloud {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px 12px;
  max-width: 920px; margin: 0 auto; padding: 8px 0;
}
.tech {
  display: inline-flex; align-items: center; gap: 9px; line-height: 1.2;
  padding: 8px 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface);
  font-family: var(--font-display, inherit); font-weight: 600; color: var(--text);
  transition: transform .25s var(--ease), border-color .25s, box-shadow .25s;
}
.tech-logo { width: 1.45em; height: 1.45em; flex: none; }
.tech[data-nivel="diario"] { font-size: 1.22rem; padding: 10px 18px; border-color: var(--border-strong); }
.tech[data-nivel="solido"] { font-size: .98rem; }
.tech[data-nivel="conhecimento"] { font-size: .84rem; color: var(--text-muted); }
.tech:nth-child(3n+1) { transform: translateY(-4px); }
.tech:nth-child(4n+2) { transform: translateY(5px); }
.tech:hover { transform: translateY(-3px) scale(1.04); border-color: var(--accent); box-shadow: 0 8px 26px -12px var(--accent); }
.tech-cloud-wrap figcaption { margin-top: 14px; text-align: center; font-size: .8rem; color: var(--text-muted); }
@media (max-width: 599px) {
  .tech-cloud { gap: 8px; }
  .tech[data-nivel="diario"] { font-size: 1.02rem; padding: 8px 14px; }
  .tech[data-nivel="solido"] { font-size: .88rem; padding: 6px 12px; }
  .tech[data-nivel="conhecimento"] { font-size: .78rem; padding: 6px 11px; }
}
@media (prefers-reduced-motion: reduce) { .tech, .tech:hover { transform: none; } }

/* ---------- Sobre ---------- */
.about-grid { display: grid; gap: 20px; }
.prose p { color: var(--text-muted); font-size: 1.04rem; }
.prose p + p { margin-top: 16px; }
.prose strong { color: var(--text); font-weight: 600; }
.about-main { display: grid; gap: 28px; align-content: start; }
/* Visão de mercado (Sobre) */
.vision-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; }
.vision-head h3 { font-size: 1.1rem; margin-right: auto; }
.vision-head .card-icon { margin: 0; }
.vision-body { margin-top: 14px; display: grid; gap: 12px; }
.vision-body p { color: var(--text-muted); font-size: .95rem; }
.vision-body strong { color: var(--text); font-weight: 600; }
@media (min-width: 900px) { .about-grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 32px; align-items: start; } }

/* Conteúdo restrito (tarjas) */
.restricted-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.redacted { display: grid; gap: 11px; margin: 18px 0 22px; }
.redacted span {
  display: block; height: 12px; border-radius: 4px;
  background: linear-gradient(90deg, var(--redact) 0%, var(--redact-hi) 50%, var(--redact) 100%);
  background-size: 220% 100%; animation: shimmer 2.8s linear infinite;
}
.redacted span:nth-child(1) { width: 92%; } .redacted span:nth-child(2) { width: 78%; }
.redacted span:nth-child(3) { width: 86%; } .redacted span:nth-child(4) { width: 64%; }
.redacted span:nth-child(5) { width: 74%; }
@keyframes shimmer { to { background-position: -220% 0; } }
.locked-note { display: flex; align-items: center; gap: 10px; color: var(--text-muted); font-size: .9rem; margin-bottom: 16px; }
.locked-note .i { color: var(--zone); }

.story { margin-top: 14px; }
.story p { color: var(--text-muted); }
.story > * + * { margin-top: 14px; }
.story h4 { margin-top: 24px; font-size: 1rem; color: var(--text); }
.story-photo {
  position: relative; margin: 18px 0 4px; aspect-ratio: 4 / 3; overflow: hidden;
  border-radius: 14px; border: 1px solid var(--border); background: var(--surface-2);
}
.story-photo a { display: block; width: 100%; height: 100%; cursor: zoom-in; }
.story-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.story-photo figcaption {
  position: absolute; inset: auto 0 0 0; padding: 26px 12px 8px; pointer-events: none;
  font-size: .8rem; font-weight: 500; color: #fff; background: linear-gradient(rgb(0 0 0 / 0), rgb(0 0 0 / .75));
}
/* Fim da história: segue para "Fora do código" */
.story-more {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 20px;
  font-weight: 600; font-size: .92rem; color: var(--zone); text-decoration: none;
}
.story-more:hover { text-decoration: underline; text-underline-offset: 3px; }
.story-more .i { transition: transform .2s var(--ease); }
.story-more:hover .i { transform: translateY(2px); }
.story p + p { margin-top: 14px; }
.story strong { color: var(--text); }
.unlocked-tag { margin-top: 18px; }

/* ---------- Trajetória ---------- */
.timeline { --tl-date: 0px; --tl-gap: 14px; position: relative; display: grid; gap: 18px; }
.timeline::before {
  content: ""; position: absolute; top: 10px; bottom: 10px;
  left: calc(var(--tl-date) + var(--tl-gap) * var(--tl-has-date, 0) + 7px); width: 2px;
  background: linear-gradient(var(--accent), var(--violet), var(--sky)); opacity: .45;
}
.tl-item { display: grid; grid-template-columns: 16px minmax(0, 1fr); column-gap: var(--tl-gap); align-items: start; }
.tl-date { grid-column: 2; font-family: var(--font-mono); font-size: .8rem; color: var(--text-muted); margin-bottom: 6px; }
.tl-marker { grid-column: 1; grid-row: 1 / span 2; width: 16px; height: 18px; margin-top: 4px; clip-path: var(--hex); background: var(--marker, var(--accent)); }
.tl-item[data-tipo="formacao"] { --marker: var(--violet); }
.tl-item[data-tipo="inicio"] { --marker: var(--sky); }
.tl-card { grid-column: 2; }
.tl-card .org { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 4px; font-size: .92rem; color: var(--text-muted); }
.tl-card .org a { color: var(--accent); font-weight: 600; }
.tl-card .org a:hover { text-decoration: underline; text-underline-offset: 3px; }
.tl-card > p { margin-top: 12px; }
/* Logo da empresa (ou ícone, em formação e início) ao lado do título */
.tl-head { display: flex; align-items: flex-start; gap: 14px; }
.tl-head-text { min-width: 0; }
.tl-logo {
  flex: none; width: 48px; height: 48px; padding: 9px;
  display: grid; place-items: center; overflow: hidden;
  border-radius: 12px; border: 1px solid var(--border);
  background: #fff; /* os logos foram desenhados para fundo claro */
}
.tl-logo img { width: 100%; height: 100%; object-fit: contain; }
.tl-logo--full { padding: 0; } /* o logo já traz o próprio fundo */
.tl-logo--icon { padding: 0; background: var(--surface-2); color: var(--marker, var(--accent)); }
.tl-logo--icon .i { width: 22px; height: 22px; }
/* O nome da empresa vem em destaque; o resto da linha (remoto, grupo) fica discreto */
.tl-card .org > span:first-child { color: var(--text); font-weight: 600; font-size: 1rem; }
@media (max-width: 479px) {
  /* No celular a linha não cabe: empresa em cima, detalhe embaixo, sem o "·" sobrando */
  .tl-card .org { flex-direction: column; align-items: flex-start; gap: 0; }
  .tl-card .org > span[aria-hidden="true"] { display: none; }
}
.type-pill { font-family: var(--font-mono); font-size: .66rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--marker, var(--accent)); }
.highlights { margin-top: 12px; display: grid; gap: 6px; }
.highlights li { position: relative; padding-left: 18px; color: var(--text-muted); font-size: .93rem; }
.highlights li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 7px; height: 7px; clip-path: var(--hex); background: var(--marker, var(--accent)); }

@media (min-width: 760px) {
  .timeline { --tl-date: 150px; --tl-gap: 22px; --tl-has-date: 1; }
  .tl-date { white-space: nowrap; }
  .tl-item { grid-template-columns: var(--tl-date) 16px minmax(0, 1fr); }
  .tl-date { grid-column: 1; grid-row: 1; text-align: right; margin: 22px 0 0; }
  .tl-marker { grid-column: 2; grid-row: 1; margin-top: 26px; }
  .tl-card { grid-column: 3; grid-row: 1; }
}

/* ---------- Habilidades (bento) ---------- */
.bento { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
.bento-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
@media (min-width: 700px) {
  .bento { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .bento > * { grid-column: span 6; }
}
@media (min-width: 1040px) {
  .bento > * { grid-column: span 4; }
  .bento > .is-wide { grid-column: span 8; }
  .bento > .is-half { grid-column: span 6; }
}

/* ---------- Projetos ---------- */
.projects { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.project { display: flex; flex-direction: column; }
.project::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: linear-gradient(90deg, var(--c1), var(--c2)); }
.project .role { display: inline-flex; align-self: flex-start; margin-bottom: 14px; padding: 4px 10px; border-radius: 999px; font-size: .74rem; font-weight: 600; background: var(--surface-2); border: 1px solid var(--border); color: var(--text); }
.project .tagline { margin-top: 6px; font-style: italic; color: var(--text-faint); font-size: .88rem; }
.project > p { margin-top: 12px; flex: 1; }
.project .link-arrow { margin-top: 20px; }
.project .muted-link { margin-top: 20px; color: var(--text-faint); font-size: .88rem; }

/* ---------- Interesses ---------- */
/* Colunas fixas: o cartão em destaque ocupa a linha inteira e os demais não deixam vaga sobrando */
.interests { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 600px) { .interests { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 900px) { .interests { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.interest .card-icon { width: 40px; height: 40px; border-radius: 11px; margin-bottom: 14px; }
.interest h3 { font-size: 1.05rem; }
.interest p { margin-top: 6px; font-size: .9rem; }

/* Interesse em destaque: texto ao lado de uma grade de fotos */
.interest-feature { grid-column: 1 / -1; display: grid; gap: 22px; }
.interest-feature h3 { font-size: 1.3rem; }
.interest-feature p { margin-top: 8px; font-size: .95rem; }
.garden { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.garden figure {
  position: relative; margin: 0; aspect-ratio: 1; overflow: hidden;
  border-radius: 14px; border: 1px solid var(--border); background: var(--surface-2);
}
.garden img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.garden figure:hover img { transform: scale(1.04); }
.garden figcaption {
  position: absolute; inset: auto 0 0 0; padding: 26px 10px 8px;
  font-size: .76rem; font-weight: 500; line-height: 1.3; color: #fff;
  background: linear-gradient(rgb(0 0 0 / 0), rgb(0 0 0 / .75));
}
@media (max-width: 479px) { .garden figcaption { font-size: .7rem; padding: 20px 8px 6px; } }
@media (min-width: 900px) {
  .interest-feature { grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 32px; align-items: center; padding: 28px; }
  .garden figcaption { font-size: .8rem; }
}
/* Fotos restritas: chegam do Worker; enquanto isso, um brilho no lugar */
.garden figure.is-loading, .story-photo.is-loading {
  background: linear-gradient(90deg, var(--redact) 0%, var(--redact-hi) 50%, var(--redact) 100%);
  background-size: 220% 100%; animation: shimmer 2.8s linear infinite;
}
.garden figure.is-loading a::after, .garden figure.is-failed a::after { display: none; }
.garden figure.is-loading img:not([src]), .garden figure.is-failed img:not([src]),
.story-photo img:not([src]) { visibility: hidden; }

/* Prévia trancada (versão pública): ícones no lugar das fotos e o convite para a zona segura */
.garden-locked { position: relative; border-radius: 16px; overflow: hidden; }
.garden-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.garden-tiles li {
  aspect-ratio: 1; display: grid; place-content: center; justify-items: center; gap: 10px;
  border-radius: 14px; border: 1px dashed var(--border-strong); background: var(--surface-2);
  color: var(--text-muted); font-size: .8rem; font-weight: 500;
}
.garden-tiles .i { width: 34px; height: 34px; color: var(--zone); opacity: .55; }
.garden-lock {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: min(300px, calc(100% - 24px)); display: grid; justify-items: center; gap: 12px;
  padding: 20px 18px; text-align: center; border-radius: 16px;
  border: 1px solid rgb(var(--zone-rgb) / .35); background: var(--surface-solid);
  box-shadow: 0 18px 48px -18px rgb(0 0 0 / .6), 0 0 0 6px rgb(var(--zone-rgb) / .06);
}
.garden-lock p { max-width: 30ch; font-size: .9rem; color: var(--text); margin: 0; }
@media (max-width: 479px) { .garden-tiles li { font-size: .72rem; } .garden-tiles .i { width: 26px; height: 26px; } }

/* Cada foto abre ampliada (js/lightbox.js); a lupa no canto avisa que dá para clicar */
.garden a { display: block; width: 100%; height: 100%; cursor: zoom-in; }
.garden a:focus-visible { outline: 2px solid var(--accent); outline-offset: -3px; border-radius: 14px; }
.garden a::after {
  content: ""; position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; border-radius: 9px;
  background: rgb(0 0 0 / .45) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.6-3.6M11 8v6M8 11h6'/%3E%3C/svg%3E") center / 16px no-repeat;
  opacity: .85; transition: opacity .2s;
}
.garden a:hover::after { opacity: 1; }
.garden figcaption { pointer-events: none; }

/* ---------- Foto ampliada (js/lightbox.js) ---------- */
html.lb-open { overflow: hidden; }
.lightbox {
  position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0; overflow: hidden;
  background: rgb(3 6 12 / .94); color: #fff;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.lightbox[open] { display: grid; grid-template-rows: minmax(0, 1fr) auto; }
.lightbox::backdrop { background: transparent; }
.lb-stage { position: relative; display: grid; place-items: center; overflow: hidden; touch-action: none; user-select: none; cursor: zoom-in; }
.lightbox.is-zoomed .lb-stage { cursor: grab; }
.lightbox.is-zoomed .lb-stage:active { cursor: grabbing; }
.lb-img { max-width: none; border-radius: 10px; transform-origin: 50% 50%; will-change: transform; -webkit-user-drag: none; }
.lb-img.is-animating { transition: transform .28s var(--ease); }
.lb-bar { padding: 10px 16px calc(14px + env(safe-area-inset-bottom, 0px)); text-align: center; }
.lb-caption { font-weight: 600; font-size: .95rem; }
.lb-hint { margin-top: 2px; font-size: .78rem; color: rgb(255 255 255 / .6); }
.lb-btn {
  position: absolute; display: grid; place-items: center; width: 44px; height: 44px;
  border-radius: 12px; border: 1px solid rgb(255 255 255 / .16);
  background: rgb(15 23 42 / .72); color: #fff; cursor: pointer;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  transition: background-color .2s, opacity .2s;
}
.lb-btn:hover { background: rgb(30 41 59 / .92); }
.lb-btn:disabled { opacity: .35; cursor: default; }
.lb-btn[hidden] { display: none; }
.lb-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.lb-close { top: calc(10px + env(safe-area-inset-top, 0px)); right: 10px; }
.lb-zoom { position: absolute; top: calc(10px + env(safe-area-inset-top, 0px)); left: 10px; display: flex; gap: 8px; }
.lb-zoom .lb-btn { position: static; }
.lb-prev, .lb-next { top: 50%; margin-top: -22px; }
.lb-prev { left: 10px; }
.lb-next { right: 10px; }

/* ---------- Contato ---------- */
.contact-grid { display: grid; gap: 16px; }
.contact-public { display: grid; gap: 16px; align-content: start; }
.contact-card { display: flex; align-items: center; gap: 16px; }
.contact-card .card-icon { margin: 0; }
.contact-card h3 { font-size: 1.05rem; }
.contact-card p { font-size: .88rem; }
.contact-card .i-arrow { margin-left: auto; color: var(--text-faint); transition: transform .2s var(--ease), color .2s; }
.contact-card:hover .i-arrow { color: var(--accent); transform: translate(2px, -2px); }
@media (min-width: 900px) { .contact-grid { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); } }

.contact-rows { display: grid; gap: 10px; margin-top: 18px; }
.contact-row {
  display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 14px;
  background: var(--surface-2); border: 1px solid var(--border);
}
.contact-row .i { color: var(--zone); }
.contact-row .label { font-size: .74rem; font-family: var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--text-faint); }
.contact-row .value { font-weight: 600; overflow-wrap: anywhere; }
.contact-row .row-actions { margin-left: auto; display: flex; gap: 6px; }
.contact-row .row-actions a, .contact-row .row-actions button {
  height: 34px; min-width: 34px; padding: 0 10px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid var(--border); background: var(--surface); font-size: .8rem; font-weight: 600; color: var(--text);
}
.contact-row .row-actions a:hover, .contact-row .row-actions button:hover { border-color: var(--accent); }
.contact-extra { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }

/* ---------- Rodapé ---------- */
.site-footer { margin-top: 24px; padding: 28px 0 40px; border-top: 1px solid var(--border); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; color: var(--text-faint); font-size: .86rem; }
.footer-inner .class-line { display: inline-flex; align-items: center; gap: 8px; }

/* ---------- Modal da zona segura ---------- */
dialog.zone {
  width: min(100% - 24px, 560px); max-height: calc(100dvh - 24px);
  margin: auto; padding: 0; overflow: auto;
  border: 1px solid var(--border-strong); border-radius: 24px;
  background: var(--surface-solid); color: var(--text);
  box-shadow: 0 40px 90px -30px rgb(0 0 0 / .75);
}
dialog.zone::backdrop { background: rgb(4 7 15 / .7); }
dialog.zone[open] { animation: pop .28s var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.98); } }

.zone-head { position: relative; padding: 26px 26px 18px; border-bottom: 1px solid var(--border); overflow: hidden; }
.zone-head .card-glow { opacity: .22; }
.zone-head .card-icon { margin-bottom: 14px; }
.zone-head h2 { font-family: var(--font-display); font-size: 1.45rem; line-height: 1.2; letter-spacing: -.02em; }
.zone-head p { margin-top: 8px; color: var(--text-muted); font-size: .94rem; }
.zone-close { position: absolute; right: 14px; top: 14px; }

.zone-body { padding: 20px 26px; display: grid; gap: 16px; font-size: .92rem; }
.zone-body h3 { font-family: var(--font-mono); font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--text-faint); margin-bottom: 8px; }
.zone-list { display: grid; gap: 7px; }
.zone-list li { display: flex; gap: 10px; color: var(--text-muted); }
.zone-list .i { color: var(--zone); margin-top: 3px; }
.zone-facts { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.zone-fact { padding: 12px 14px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border); }
.zone-fact strong { display: block; font-size: .78rem; color: var(--text); margin-bottom: 2px; }
.zone-fact span { color: var(--text-muted); font-size: .84rem; line-height: 1.45; display: block; }

.consent { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 14px; border: 1px solid var(--border-strong); cursor: pointer; }
.consent input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--zone-strong); flex: none; }

/* Widget do Cloudflare Turnstile (iframe de 300 × 65) */
.verify { display: grid; gap: 6px; }
.turnstile-box { min-height: 65px; }
.verify .fine { display: inline-flex; align-items: center; gap: 6px; }
.zone-error {
  padding: 10px 12px; border-radius: 12px; font-size: .86rem;
  border: 1px solid rgb(var(--poly-a) / .45); background: var(--accent-soft); color: var(--text);
}
.zone-error[hidden] { display: none; }
.btn.is-loading { pointer-events: none; opacity: .7; }
.btn.is-loading .i { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.zone-foot { padding: 0 26px 24px; display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; align-items: center; }
.zone-foot .fine { margin-right: auto; }
.zone-foot-solo { padding-top: 20px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.fine { font-size: .78rem; color: var(--text-faint); line-height: 1.5; }

.record { display: grid; gap: 8px; }
.record div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); font-size: .86rem; }
.record dt { color: var(--text-faint); }
.record dd { font-family: var(--font-mono); font-size: .8rem; text-align: right; overflow-wrap: anywhere; }

[data-pane][hidden] { display: none !important; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 80; transform: translate(-50%, 20px);
  display: inline-flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 14px;
  background: var(--surface-solid); border: 1px solid var(--border-strong); box-shadow: var(--shadow);
  font-size: .9rem; font-weight: 500; opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s var(--ease);
  max-width: calc(100% - 32px);
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.toast .i { color: var(--zone); }

/* ---------- Revelação ao rolar ---------- */
html.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
html.js .reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Movimento reduzido ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  html.js .reveal { opacity: 1; transform: none; }
}
