/* ==========================================================================
   Erick Cardoso · Portfólio
   Design system: Deno — "whitepaper schematic with mint highlighter"
   Tokens extraídos do DESIGN.md. Substitutos de fonte: Moranga → Space Grotesk,
   Menlo → JetBrains Mono.
   ========================================================================== */

:root {
  /* Cores */
  --canvas: #f8f9fc;
  --paper: #ffffff;
  --ink: #0a0e1c;
  --graphite: #25272b;
  --charcoal: #121417;
  --slate: #475269;
  --pebble: #56575a;
  --fog: #868789;
  --mist: #9ea0a5;
  --frost: #cbd1e1;
  --chalk: #e5e7eb;
  --mint: #70ffaf;
  --daffodil: #ffdb1e;
  --sky: #66c2ff;
  --sky-ink: #0077cc;
  --moss: #116329;
  --crimson: #cf222e;
  --iris: #6639ba;
  --cobalt: #0550ae;

  /* Tipografia */
  --font-display: "Space Grotesk", "Inter", ui-sans-serif, system-ui, sans-serif;
  --font-ui: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;

  /* Forma */
  --radius: 6px;
  --radius-pill: 9997px;
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --shadow-subtle: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
  --shadow-sky: 2px 4px 0 0 var(--sky);

  /* Layout */
  --max: 1200px;
  --gutter: clamp(16px, 4vw, 56px);
  --section: clamp(72px, 11vw, 128px);
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font: 400 16px/1.5 var(--font-ui);
  font-feature-settings: "ss12", "cv11";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
p { margin: 0; }
h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); font-weight: 700; color: var(--ink); }
ul { margin: 0; padding: 0; list-style: none; }
::selection { background: var(--mint); color: var(--ink); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 4px; }
code, kbd, .mono { font-family: var(--font-mono); }

/* Idiomas: PT é o padrão, EN alterna via <html lang="en"> */
[data-l] { display: none; }
html[lang="pt-BR"] [data-l="pt"], html[lang="en"] [data-l="en"] { display: inline; }
html[lang="pt-BR"] div[data-l="pt"], html[lang="en"] div[data-l="en"],
html[lang="pt-BR"] p[data-l="pt"], html[lang="en"] p[data-l="en"],
html[lang="pt-BR"] ul[data-l="pt"], html[lang="en"] ul[data-l="en"] { display: block; }

.skip {
  position: absolute; left: 16px; top: -64px; z-index: 100;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: var(--radius);
  font-weight: 700; transition: top 0.2s var(--ease);
}
.skip:focus { top: 12px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { width: 100%; max-width: calc(var(--max) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }
/* Filhos de grid podem encolher abaixo do conteúdo (evita estouro horizontal) */
.hero__grid > *, .umbra > *, .about > *, .projects > *, .proj > *, .stats > *, .services > *, .stack > *, .job > * { min-width: 0; }
body { overflow-x: clip; }
.band { padding: var(--section) 0; }
.band--paper { background: var(--paper); border-block: 1px solid var(--chalk); }
/* Duas faixas seguidas com o mesmo fundo não somam o espaçamento */
.band:not(.band--paper) + .band:not(.band--paper) { padding-top: 0; }

/* ---------- Átomos ---------- */
.tag {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--mint); color: var(--ink);
  font: 700 14px/1.4 var(--font-ui); padding: 2px 8px; border-radius: var(--radius);
}
.tag--dot::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ink);
  animation: pulse 2s var(--ease) infinite;
}
.eyebrow {
  font: 500 13px/1 var(--font-mono); letter-spacing: 0.02em; color: var(--slate);
  display: flex; align-items: center; gap: 10px; margin-bottom: 16px;
}
.eyebrow::before { content: "//"; color: var(--fog); }

.h-section {
  font-size: clamp(32px, 5vw, 44px); line-height: 1.1; letter-spacing: -0.025em; max-width: 20ch;
}
.lead { font-size: 18px; line-height: 1.56; color: var(--slate); max-width: 60ch; margin-top: 16px; }

.btn {
  display: inline-flex; align-items: center; gap: 10px; cursor: pointer;
  font: 700 16px/1.25 var(--font-ui); padding: 12px 20px; border-radius: var(--radius);
  border: 1px solid transparent; transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease), background 0.18s;
  white-space: nowrap;
}
.btn svg { width: 16px; height: 16px; flex: none; transition: transform 0.18s var(--ease); }
.btn:hover svg.arrow { transform: translateX(3px); }
.btn:active { transform: translateY(1px); }
.btn--mint { background: var(--mint); color: var(--ink); box-shadow: var(--shadow-subtle); }
.btn--mint:hover { box-shadow: 0 0 0 4px rgba(112, 255, 175, 0.35), var(--shadow-subtle); }
.btn--dark { background: var(--ink); color: #fff; }
.btn--dark:hover { background: var(--graphite); }
.btn--sky { background: transparent; color: var(--sky-ink); border-color: var(--sky); box-shadow: var(--shadow-sky); }
.btn--sky:hover { transform: translate(-1px, -1px); box-shadow: 3px 5px 0 0 var(--sky); }
.btn--sm { padding: 8px 14px; font-size: 14px; }

.chip {
  display: inline-flex; align-items: center; gap: 6px; font: 500 12px/1 var(--font-mono);
  color: var(--slate); background: var(--canvas); border: 1px solid var(--chalk);
  padding: 6px 9px; border-radius: var(--radius);
}
.band--paper .chip { background: var(--paper); }

/* ---------- Navegação ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.86); backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--chalk);
}
.nav__in { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font: 700 17px/1 var(--font-display); letter-spacing: -0.02em; }
.brand img { width: 30px; height: 30px; object-fit: contain; }
.nav__links { display: flex; align-items: center; gap: 4px; }
.nav__links a:not(.btn) {
  padding: 8px 12px; border-radius: var(--radius); font-size: 15px; color: var(--slate);
  transition: color 0.15s, background 0.15s;
}
.nav__links a:not(.btn):hover, .nav__links a[aria-current="true"] { color: var(--ink); background: var(--canvas); }
.nav__tools { display: flex; align-items: center; gap: 8px; }

.lang {
  display: inline-flex; border: 1px solid var(--chalk); border-radius: var(--radius);
  background: var(--canvas); padding: 2px; font: 500 12px/1 var(--font-mono);
}
.lang button {
  all: unset; cursor: pointer; padding: 7px 9px; border-radius: 4px; color: var(--pebble);
}
.lang button:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; }
.lang button[aria-pressed="true"] { background: var(--paper); color: var(--ink); box-shadow: var(--shadow-subtle); font-weight: 700; }

.burger {
  all: unset; display: none; cursor: pointer; width: 40px; height: 40px; place-items: center;
  border: 1px solid var(--chalk); border-radius: var(--radius); background: var(--paper);
}
.burger svg { width: 18px; height: 18px; margin: auto; }
.burger:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: clamp(48px, 9vw, 112px) 0 var(--section); }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 60% 45% at 50% 0%, rgba(112, 255, 175, 0.2), transparent 70%),
    linear-gradient(var(--chalk) 1px, transparent 1px),
    linear-gradient(90deg, var(--chalk) 1px, transparent 1px);
  background-size: auto, 48px 48px, 48px 48px;
  background-position: 0 0, -1px -1px, -1px -1px;
  -webkit-mask-image: linear-gradient(#000 55%, transparent);
  mask-image: linear-gradient(#000 55%, transparent);
}
.hero__grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.15fr 0.85fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero h1 {
  font-size: clamp(44px, 8.2vw, 72px); line-height: 1; letter-spacing: -0.033em; margin: 20px 0 24px;
}
.hero h1 em { font-style: normal; background: linear-gradient(transparent 62%, rgba(112, 255, 175, 0.75) 62%); padding: 0 2px; }
.hero__sub { font-size: 20px; line-height: 1.45; color: var(--slate); max-width: 52ch; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero__meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }

/* Retrato */
.portrait {
  position: relative; margin: 0; justify-self: end; width: min(100%, 440px);
  border: 1px solid var(--chalk); border-radius: var(--radius); background: var(--paper);
  box-shadow: var(--shadow-md), 0 30px 60px -30px rgba(10, 14, 28, 0.25); overflow: hidden;
}
.portrait::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; z-index: 2;
  background: linear-gradient(90deg, rgba(112, 255, 175, 0) 0%, var(--mint) 50%, rgba(112, 255, 175, 0) 100%);
  background-size: 200% 100%; animation: sweep 5s linear infinite;
}
.portrait img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 18%; background: var(--canvas); }
.portrait figcaption {
  position: absolute; left: 12px; right: 12px; bottom: 12px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px;
  background: rgba(255, 255, 255, 0.92); backdrop-filter: blur(8px); border: 1px solid var(--chalk); border-radius: var(--radius);
  padding: 10px 12px; font-size: 12px; color: var(--slate);
}

/* Sobre */
.about { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.prose { display: grid; gap: 16px; margin-top: 20px; color: var(--slate); font-size: 18px; line-height: 1.56; max-width: 58ch; }

/* Cartão de código (profile.ts) */
.code {
  position: relative; background: var(--paper); border: 1px solid var(--chalk); border-radius: var(--radius);
  box-shadow: var(--shadow-md), 0 30px 60px -30px rgba(10, 14, 28, 0.2); overflow: hidden;
}
.code::before, .copybar::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px;
  background: linear-gradient(90deg, rgba(112, 255, 175, 0) 0%, var(--mint) 50%, rgba(112, 255, 175, 0) 100%);
  background-size: 200% 100%; animation: sweep 5s linear infinite;
}
.code__bar { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--chalk); background: var(--canvas); }
.code__dots { display: flex; gap: 6px; }
.code__dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--chalk); }
.code__file { margin-left: 6px; font: 500 12px/1 var(--font-mono); color: var(--pebble); }
.code pre {
  margin: 0; padding: 20px; font: 400 14px/1.7 var(--font-mono); color: var(--ink);
  overflow-x: auto; tab-size: 2;
}
.k { color: var(--iris); } .s { color: var(--moss); } .f { color: var(--cobalt); } .c { color: var(--fog); font-style: italic; } .b { color: var(--crimson); }
.caret { display: inline-block; width: 8px; height: 1.1em; background: var(--ink); vertical-align: -0.15em; margin-left: 2px; animation: blink 1s steps(1) infinite; }

/* ---------- Estatísticas ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: -24px; position: relative; z-index: 2; }
.stat {
  background: var(--paper); border: 1px solid var(--chalk); border-radius: var(--radius);
  box-shadow: var(--shadow-md); padding: 24px;
}
.stat b { display: block; font: 700 36px/1.25 var(--font-display); letter-spacing: -0.02em; margin-top: 12px; }
.stat span.l { display: block; font-size: 14px; line-height: 1.43; color: var(--pebble); margin-top: 2px; }

/* ---------- Cards com brilho que segue o cursor ---------- */
.card {
  position: relative; background: var(--paper); border: 1px solid var(--chalk); border-radius: var(--radius);
  box-shadow: var(--shadow-subtle); transition: box-shadow 0.25s var(--ease), border-color 0.25s, transform 0.25s var(--ease);
  overflow: hidden;
}
.card::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 0.25s;
  background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 50%), rgba(112, 255, 175, 0.16), transparent 60%);
}
.card:hover { box-shadow: var(--shadow-md); border-color: var(--frost); }
.card:hover::after { opacity: 1; }
.band--paper .card { background: var(--canvas); }

/* ---------- Projetos ---------- */
.projects { display: grid; grid-template-columns: repeat(6, 1fr); gap: 20px; margin-top: 48px; }
.proj { padding: 24px; display: flex; flex-direction: column; gap: 16px; grid-column: span 2; }
.proj--feat { grid-column: span 6; display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 32px; padding: 28px; align-items: center; }
.proj--wide { grid-column: span 3; }
.proj__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.proj__kind { font: 500 12px/1 var(--font-mono); color: var(--pebble); text-transform: uppercase; letter-spacing: 0.06em; }
.proj h3 { font-size: 28px; line-height: 1.2; letter-spacing: -0.02em; }
.proj--feat h3 { font-size: 36px; line-height: 1.15; }
.proj p.d { color: var(--slate); font-size: 16px; line-height: 1.5; }
.proj ul.pts { display: grid; gap: 8px; color: var(--slate); font-size: 15px; }
.proj ul.pts li { display: flex; gap: 10px; }
.proj ul.pts li::before { content: "→"; font-family: var(--font-mono); color: var(--ink); flex: none; }
.proj__chips { display: flex; flex-wrap: wrap; gap: 6px; }
.proj__links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; }
.proj__note { font-size: 13px; line-height: 1.5; color: var(--pebble); }

/* Prévias desenhadas em CSS */
.preview { border: 1px solid var(--chalk); border-radius: var(--radius); overflow: hidden; background: var(--canvas); box-shadow: var(--shadow-subtle); }
.preview__bar { display: flex; align-items: center; gap: 6px; padding: 9px 12px; border-bottom: 1px solid var(--chalk); background: var(--paper); }
.preview__bar i { width: 8px; height: 8px; border-radius: 50%; background: var(--chalk); }
.preview__bar span { margin-left: 8px; font: 500 11px/1 var(--font-mono); color: var(--pebble); }
.tv { display: grid; grid-template-columns: 0.8fr 1.4fr 0.8fr; gap: 8px; padding: 10px; background: #0b0d12; aspect-ratio: 16 / 9.4; }
.tv > div { background: #12151c; border: 1px solid #232733; border-radius: 4px; padding: 10px; display: flex; flex-direction: column; gap: 6px; }
.tv .av { width: 38px; height: 38px; border-radius: 50%; border: 2px solid var(--mint); margin: 6px auto 2px; box-shadow: 0 0 0 4px rgba(112, 255, 175, 0.12); }
.tv .st { text-align: center; font: 700 13px/1 var(--font-display); color: var(--mint); letter-spacing: 0.04em; }
.tv .nm { text-align: center; font: 600 10px/1 var(--font-ui); color: #cfd3dd; }
.tv .row { height: 14px; border-radius: 3px; background: #1b1f29; position: relative; }
.tv .row::after { content: ""; position: absolute; left: 6px; top: 5px; height: 4px; width: var(--w, 60%); border-radius: 2px; background: #3a4052; }
.tv .row.now { background: rgba(112, 255, 175, 0.1); border: 1px solid rgba(112, 255, 175, 0.35); }
.tv .row.now::after { background: var(--mint); }
.tv .h { font: 500 8px/1 var(--font-mono); color: #7d8497; text-transform: uppercase; letter-spacing: 0.08em; }
.tv .bd { display: flex; align-items: center; gap: 6px; font: 600 9px/1 var(--font-ui); color: #cfd3dd; }
.tv .bd b { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 4px; background: #1b1f29; color: #fff; font: 700 10px/1 var(--font-display); }

.mini { padding: 14px; display: grid; gap: 10px; background: var(--paper); aspect-ratio: 16 / 9; align-content: center; }
.mini .in { display: flex; align-items: center; justify-content: space-between; border: 1px solid var(--chalk); border-radius: var(--radius); padding: 10px 12px; background: var(--canvas); font: 600 14px/1 var(--font-mono); letter-spacing: 0.04em; }
.mini .in small { font: 700 10px/1 var(--font-ui); background: var(--mint); padding: 3px 6px; border-radius: 4px; letter-spacing: 0; }
.mini .seg { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 4px; background: var(--canvas); border: 1px solid var(--chalk); border-radius: var(--radius); padding: 3px; font: 600 11px/1 var(--font-ui); text-align: center; }
.mini .seg span { padding: 7px 0; border-radius: 3px; color: var(--pebble); }
.mini .seg span:first-child { background: var(--paper); color: var(--ink); box-shadow: var(--shadow-subtle); }

.game { aspect-ratio: 16 / 9; background: #14131c; display: grid; place-items: center; position: relative; overflow: hidden; }
.game .px { width: 100%; height: 100%; image-rendering: pixelated;
  background:
    linear-gradient(#14131c 0 58%, #2a2838 58% 62%, #1d1b29 62% 100%);
}
.game .wave { position: absolute; left: 0; right: 0; top: 26%; display: flex; gap: 4px; justify-content: center; align-items: center; height: 40px; }
.game .wave i { width: 5px; border-radius: 3px; background: #5e5a78; animation: wave 1.6s ease-in-out infinite; animation-delay: calc(var(--i) * 90ms); }
.game .p1, .game .p2 { position: absolute; bottom: 38%; width: 18px; height: 30px; border-radius: 3px 3px 0 0; }
.game .p1 { left: 36%; background: #f2c14e; } .game .p2 { left: 56%; background: #8ecae6; }
.game .p1::before, .game .p2::before { content: ""; position: absolute; top: -14px; left: 2px; width: 14px; height: 14px; background: inherit; border-radius: 3px; }

.more { display: grid; place-content: center; text-align: center; gap: 12px; padding: 24px; }
.more svg { width: 32px; height: 32px; margin: 0 auto; }

/* ---------- Umbra ---------- */
.umbra { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.umbra__logo { display: grid; place-items: center; padding: clamp(32px, 6vw, 64px); }
.umbra__logo img { width: min(260px, 70%); height: auto; }
.services { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 32px; }
.svc { padding: 20px; }
.svc svg { width: 22px; height: 22px; margin-bottom: 14px; color: var(--ink); }
.svc h3 { font: 700 18px/1.3 var(--font-display); letter-spacing: -0.01em; }
.svc p { color: var(--slate); font-size: 14px; line-height: 1.5; margin-top: 6px; }

/* ---------- Stack ---------- */
.marquee { overflow: hidden; border-block: 1px solid var(--chalk); background: var(--paper); margin-top: 48px; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee__track { display: flex; gap: 12px; width: max-content; padding: 16px 0; animation: marquee 38s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__track span { font: 500 14px/1 var(--font-mono); color: var(--slate); padding: 9px 14px; border: 1px solid var(--chalk); border-radius: var(--radius); background: var(--canvas); }
.stack { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 32px; }
.grp { padding: 22px; }
.grp h3 { font: 500 12px/1 var(--font-mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--pebble); margin-bottom: 16px; }
.grp ul { display: flex; flex-wrap: wrap; gap: 6px; }

/* ---------- Trajetória ---------- */
.time { margin-top: 48px; display: grid; gap: 20px; position: relative; }
.time::before { content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 1px; background: var(--frost); }
.job { display: grid; grid-template-columns: 16px 1fr; gap: 24px; }
.job__dot { width: 15px; height: 15px; border-radius: 50%; background: var(--paper); border: 2px solid var(--ink); margin-top: 24px; position: relative; z-index: 1; }
.job--now .job__dot { background: var(--mint); }
.job .card { padding: 24px; display: grid; gap: 12px; }
.job__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; }
.job h3 { font-size: 22px; line-height: 1.25; letter-spacing: -0.015em; }
.job__org { color: var(--slate); font-size: 16px; }
.job__date { font: 500 12px/1 var(--font-mono); color: var(--pebble); background: var(--paper); border: 1px solid var(--chalk); padding: 6px 9px; border-radius: var(--radius); }
.job ul { display: grid; gap: 8px; color: var(--slate); font-size: 15px; }
.job ul li { display: flex; gap: 10px; }
.job ul li::before { content: "→"; font-family: var(--font-mono); color: var(--ink); flex: none; }

/* ---------- Contato ---------- */
.contact { text-align: center; display: grid; justify-items: center; }
.contact .h-section { max-width: 18ch; font-size: clamp(36px, 6vw, 56px); }
.contact .lead { margin-inline: auto; }
.copybar {
  position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: min(100%, 640px); margin-top: 36px; padding: 16px 20px; text-align: left;
  background: var(--paper); border: 1px solid var(--chalk); border-radius: var(--radius); box-shadow: var(--shadow-md); overflow: hidden;
}
.copybar code { font: 400 15px/1.4 var(--font-mono); color: var(--ink); word-break: break-all; }
.copybar code i { font-style: normal; color: var(--fog); user-select: none; }
.copybar button {
  flex: none; cursor: pointer; display: inline-flex; align-items: center; gap: 8px;
  font: 700 14px/1 var(--font-ui); color: var(--ink); background: var(--canvas); border: 1px solid var(--chalk);
  padding: 9px 12px; border-radius: var(--radius); transition: background 0.15s, border-color 0.15s;
}
.copybar button:hover { background: var(--paper); border-color: var(--frost); }
.copybar button svg { width: 16px; height: 16px; }
.contact__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 24px; }

/* ---------- Rodapé ---------- */
.foot { background: var(--graphite); color: #fff; padding: 40px 0; }
.foot__in { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px 32px; font-size: 14px; }
.foot a { color: var(--mist); transition: color 0.15s; }
.foot a:hover { color: #fff; }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.foot p { color: var(--mist); }
.foot img { width: 28px; height: 28px; filter: invert(1) brightness(1.2); opacity: 0.9; }
.foot .brandline { display: flex; align-items: center; gap: 12px; color: #fff; font-weight: 700; font-family: var(--font-display); }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 80; transform: translate(-50%, 24px); opacity: 0; pointer-events: none;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: var(--radius); font-size: 14px; font-weight: 600;
  box-shadow: var(--shadow-md); transition: opacity 0.2s, transform 0.2s var(--ease);
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Animações ---------- */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); transition-delay: var(--d, 0ms); }
.js .reveal.in { opacity: 1; transform: none; }
@keyframes sweep { to { background-position: -200% 0; } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(10, 14, 28, 0.35); } 50% { box-shadow: 0 0 0 5px rgba(10, 14, 28, 0); } }
@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes wave { 0%, 100% { height: 6px; } 50% { height: 30px; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
  .marquee__track { flex-wrap: wrap; width: auto; justify-content: center; }
  .marquee__track [aria-hidden="true"] { display: none; }
}

/* ---------- Responsivo ---------- */
@media (max-width: 1020px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stack { grid-template-columns: repeat(2, 1fr); }
  .proj, .proj--wide { grid-column: span 3; }
  .proj--feat { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .hero__grid, .umbra, .about { grid-template-columns: 1fr; }
  .portrait { justify-self: center; width: min(100%, 380px); }
  .burger { display: grid; }
  .nav__links {
    position: absolute; left: 0; right: 0; top: 64px; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--chalk); padding: 8px var(--gutter) 16px;
    display: none; box-shadow: var(--shadow-md);
  }
  .nav__links.open { display: flex; }
  .nav__links a:not(.btn) { padding: 14px 4px; border-bottom: 1px solid var(--chalk); border-radius: 0; font-size: 16px; }
  .nav__links .btn { margin-top: 12px; justify-content: center; }
}
@media (max-width: 640px) {
  .proj, .proj--wide, .proj--feat { grid-column: span 6; }
  .services, .stack { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; gap: 12px; }
  .stat { padding: 18px; }
  .stat b { font-size: 30px; }
  .hero__sub { font-size: 18px; }
  .hero__cta .btn { flex: 1 1 100%; justify-content: center; }
  .copybar { flex-direction: column; align-items: stretch; }
  .copybar button { justify-content: center; }
  .job { grid-template-columns: 12px 1fr; gap: 14px; }
  .time::before { left: 5px; }
  .job__dot { width: 11px; height: 11px; }
  .job .card { padding: 18px; }
  .code pre { font-size: 12.5px; padding: 16px; }
}
@media (max-width: 420px) {
  .stats { grid-template-columns: 1fr; }
  .stat b { font-size: 28px; }
  .hero h1 { font-size: clamp(36px, 12vw, 44px); }
  .btn { white-space: normal; }
  .proj--feat, .proj { padding: 18px; }
  .proj h3, .proj--feat h3 { font-size: 26px; }
}
