/* ==========================================================================
   Gustavo Costa (Guh) — site editorial de currículo
   HTML, CSS e JavaScript estáticos. Sem dependências externas.
   Fonte de display auto-hospedada (EB Garamond, licença OFL).

   Escala de z-index:
   10 = cabeçalho fixo
   20 = menu móvel aberto
   30 = skip-link
   40 = revelação de conteúdo (sem sobreposição)
   ========================================================================== */

/* ---------- Fontes auto-hospedadas ---------- */
@font-face {
  font-family: "EB Garamond";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../assets/fonts/ebgaramond-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "EB Garamond";
  font-style: italic;
  font-weight: 400 700;
  font-display: swap;
  src: url("../assets/fonts/ebgaramond-latin-italic.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Tokens ---------- */
:root {
  --font-display: "EB Garamond", Georgia, "Times New Roman", serif;
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  --shell: 1160px;
  --gutter: clamp(1.25rem, 5vw, 3rem);
  --radius: 0;

  --step-1: 0.75rem;
  --step-2: 0.875rem;
  --step-3: 1rem;
  --step-4: clamp(1.05rem, 1.4vw, 1.2rem);
  --step-5: clamp(1.3rem, 2.1vw, 1.7rem);
  --step-6: clamp(1.75rem, 3.4vw, 2.5rem);
  --step-7: clamp(2.1rem, 4.6vw, 3.25rem);
  --step-8: clamp(3rem, 8.6vw, 6.25rem);

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --dur: 0.35s;
}

/* Tema claro (padrão resolvido pelo script) */
:root,
html[data-theme="light"] {
  color-scheme: light;
  --paper: #f4f4f2;
  --ink: #0a0a0a;
  --ink-soft: #55554f;
  --rule: #d7d7d2;
  --plate: #ffffff;
  --band-bg: #0b0b0b;
  --band-ink: #f4f4f2;
  --band-soft: #b4b4af;
  --band-line: #353532;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --paper: #0c0c0c;
  --ink: #f1f1ee;
  --ink-soft: #a5a5a0;
  --rule: #2c2c29;
  --plate: #ffffff;
  --band-bg: #f1f1ee;
  --band-ink: #0c0c0c;
  --band-soft: #4a4a45;
  --band-line: #c9c9c4;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--step-3);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

h1,
h2,
h3,
h4,
p,
ul,
ol,
dl,
dd,
figure {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-thickness: 2px;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  cursor: pointer;
  padding: 0.5rem 0.75rem;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease),
    border-color var(--dur) var(--ease), transform 0.12s var(--ease);
}

button:hover {
  border-color: var(--ink);
}

button:active,
.btn:active {
  transform: translateY(1px);
}

:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

::selection {
  background: var(--ink);
  color: var(--paper);
}

.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Troca de idioma: apenas a variante ativa é exibida */
html[data-locale="pt-BR"] [data-t="en"],
html[data-locale="en"] [data-t="pt"] {
  display: none !important;
}

/* Controles que dependem de JavaScript */
.js-only {
  display: none;
}

.js .lang-switch,
.js .tool-btn,
.js .theme-switch {
  display: inline-flex;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: var(--gutter);
  z-index: 30;
  background: var(--ink);
  color: var(--paper);
  padding: 0.75rem 1.25rem;
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: var(--step-1);
}

.skip-link:focus {
  top: 0.75rem;
}

/* ---------- Cabeçalho ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}

.header__inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 64px;
  padding-block: 0.5rem;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  margin-right: auto;
}

.brand__mark {
  width: 42px;
  height: 42px;
  flex: none;
}

.brand__text {
  display: grid;
  gap: 0.1rem;
  line-height: 1.1;
}

.brand__name {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.brand__real {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.09em;
  color: var(--ink-soft);
}

.plate {
  display: block;
  border-radius: var(--radius);
}

/* A logo flutua sobre o papel do tema.
   Mesmo desenho em duas tintas: preta no claro, branca no escuro.
   O CSS troca a imagem antes da pintura; o JavaScript mantém o atributo
   src coerente para navegadores sem suporte a content em imagens. */
[data-logo] {
  content: url("../assets/guh-logo-transparente.png");
}

html[data-theme="dark"] [data-logo] {
  content: url("../assets/guh-logo-transparente-branca.png");
}

.plate img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.header__tools {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.lang-switch {
  display: inline-flex;
  border: 1px solid var(--rule);
}

.lang-btn {
  border: 0;
  min-height: 44px;
  min-width: 44px;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: var(--step-1);
  letter-spacing: 0.08em;
}

.lang-btn + .lang-btn {
  border-left: 1px solid var(--rule);
}

.lang-btn[aria-pressed="true"] {
  background: var(--ink);
  color: var(--paper);
}

.tool-btn {
  font-family: var(--font-mono);
  font-size: var(--step-1);
  letter-spacing: 0.06em;
}

/* Switch de tema: única pílula do sistema, por ser um controle deslizante.
   O alvo de toque tem 44px de altura; a pista desenhada é menor. */
.theme-switch {
  border: 0;
  padding: 0;
  min-height: 44px;
  align-items: center;
  background: none;
}

.theme-switch__track {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  justify-items: center;
  width: 62px;
  height: 30px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  transition: border-color var(--dur) var(--ease);
}

.theme-switch:hover .theme-switch__track {
  border-color: var(--ink);
}

.theme-switch__icon {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  color: var(--ink-soft);
  transition: color var(--dur) var(--ease);
}

.theme-switch__icon svg {
  width: 14px;
  height: 14px;
  display: block;
}

.theme-switch__knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: var(--ink);
  transition: transform var(--dur) var(--ease);
}

/* A posição visual segue o data-theme (definido antes da pintura);
   o aria-checked, mantido pelo JS, reflete o mesmo estado para leitores de tela */
html[data-theme="dark"] .theme-switch__knob {
  transform: translateX(32px);
}

html[data-theme="light"] .theme-switch__icon--sun,
html[data-theme="dark"] .theme-switch__icon--moon {
  color: var(--paper);
}

/* Navegação: painel no móvel, linha única no desktop */
.nav {
  display: none;
  width: 100%;
  order: 3;
}

.site-header[data-menu-open="true"] .nav {
  display: block;
  z-index: 20;
  border-top: 1px solid var(--rule);
  padding-block: 0.5rem;
}

.nav__list {
  display: flex;
  flex-direction: column;
}

.nav__list a {
  display: block;
  padding: 0.85rem 0;
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  font-family: var(--font-mono);
  font-size: var(--step-2);
  letter-spacing: 0.04em;
}

.nav__list li:last-child a {
  border-bottom: 0;
}

.nav__list a:hover {
  text-decoration: underline;
  text-decoration-thickness: 1px;
}

/* ---------- Botões ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.5rem;
  min-height: 48px;
  border-radius: var(--radius);
  text-decoration: none;
  font-size: var(--step-2);
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease),
    border-color var(--dur) var(--ease), transform 0.12s var(--ease);
}

.btn--solid {
  background: var(--ink);
  color: var(--paper);
  border: 1px solid var(--ink);
}

.btn--solid:hover {
  background: var(--paper);
  color: var(--ink);
}

.btn--ghost {
  border: 1px solid var(--ink);
}

.btn--ghost:hover {
  background: var(--ink);
  color: var(--paper);
}

.btn--invert {
  background: var(--band-ink);
  color: var(--band-bg);
  border: 1px solid var(--band-ink);
}

.btn--invert:hover {
  background: transparent;
  color: var(--band-ink);
}

/* ---------- Hero ---------- */
.hero {
  padding-block: clamp(2.5rem, 7vw, 5rem) clamp(3rem, 8vw, 6rem);
  border-bottom: 1px solid var(--rule);
}

.hero__inner {
  display: grid;
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: center;
}

.hero__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(4rem, 14vw, 9.5rem);
  line-height: 1;
  letter-spacing: -0.02em;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.4rem 1rem;
}

.hero__nick {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: clamp(0.72rem, 1.4vw, 0.88rem);
  font-weight: 400;
  letter-spacing: 0.12em;
  line-height: 1;
  border: 1px solid currentColor;
  padding: 0.45em 0.6em;
}

.hero__deck {
  margin-top: clamp(1rem, 2.5vw, 1.5rem);
  font-family: var(--font-mono);
  font-size: var(--step-1);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  line-height: 1.9;
  color: var(--ink-soft);
  max-width: 46ch;
}

.hero__sub {
  margin-top: clamp(1rem, 2.5vw, 1.5rem);
  font-size: var(--step-4);
  max-width: 44ch;
}

.hero__actions {
  margin-top: clamp(1.75rem, 4vw, 2.5rem);
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.hero__figure {
  order: -1;
}

.hero__plate {
  padding: clamp(0.85rem, 2.5vw, 1.5rem);
  width: 100%;
  max-width: min(64vw, 260px);
}

/* ---------- Seções ---------- */
.section {
  padding-block: clamp(3.25rem, 9vw, 6.5rem);
  scroll-margin-top: 4.5rem;
}

.sec-head {
  border-top: 1px solid var(--rule);
  padding-top: 1.15rem;
  margin-bottom: clamp(2rem, 5vw, 3.25rem);
}

.sec-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--step-7);
  line-height: 1.08;
  letter-spacing: -0.01em;
}

.sec-lede {
  margin-top: 0.9rem;
  max-width: 62ch;
  font-size: var(--step-3);
  line-height: 1.65;
  color: var(--ink-soft);
}

/* ---------- Sobre ---------- */
.about {
  display: grid;
  gap: clamp(2rem, 5vw, 3.5rem);
}

.about__text {
  display: grid;
  gap: 1.25rem;
  max-width: 65ch;
}

.lead {
  font-family: var(--font-display);
  font-size: var(--step-5);
  line-height: 1.4;
}

.facts {
  display: grid;
  gap: 1rem;
  align-content: start;
}

.facts__item {
  border-top: 1px solid var(--rule);
  padding-top: 0.85rem;
}

.facts__item dt {
  font-family: var(--font-mono);
  font-size: var(--step-1);
  letter-spacing: 0.08em;
  color: var(--ink-soft);
}

.facts__item dd {
  margin-top: 0.35rem;
  font-size: var(--step-2);
}

.stats {
  margin-top: clamp(2.5rem, 6vw, 4rem);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.5rem, 4vw, 2.5rem);
}

.stat {
  border-top: 1px solid var(--rule);
  padding-top: 0.85rem;
  display: grid;
  gap: 0.35rem;
  align-content: start;
}

.stat__value {
  font-family: var(--font-display);
  font-size: var(--step-6);
  font-weight: 600;
  line-height: 1.05;
}

.stat__label {
  font-family: var(--font-mono);
  font-size: var(--step-1);
  color: var(--ink-soft);
  line-height: 1.5;
}

/* ---------- Experiência ---------- */
.entries {
  display: grid;
}

.entry {
  display: grid;
  gap: 1.5rem;
  border-top: 1px solid var(--rule);
  padding-block: clamp(2rem, 4.5vw, 3rem);
}

.entry__period,
.role__period,
.degree__period {
  font-family: var(--font-mono);
  font-size: var(--step-1);
  letter-spacing: 0.06em;
  color: var(--ink-soft);
}

.entry__company {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.2vw, 2.25rem);
  font-weight: 600;
  line-height: 1.12;
  margin-top: 0.5rem;
  overflow-wrap: break-word;
}

.entry--feature .entry__company {
  font-size: clamp(1.7rem, 2.6vw, 2.6rem);
}

.entry__meta {
  margin-top: 0.5rem;
  font-family: var(--font-mono);
  font-size: var(--step-1);
  color: var(--ink-soft);
  line-height: 1.7;
}

.entry__body {
  display: grid;
  gap: 2rem;
  max-width: 68ch;
}

.role + .role {
  border-top: 1px solid var(--rule);
  padding-top: 1.75rem;
}

.role__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.35rem 1.5rem;
  margin-bottom: 0.75rem;
}

.role__title {
  font-family: var(--font-sans);
  font-size: var(--step-3);
  font-weight: 600;
  letter-spacing: 0.01em;
}

.entry__body p {
  color: var(--ink);
}

.marks {
  margin-top: 1rem;
  display: grid;
  gap: 0.6rem;
}

.marks li {
  position: relative;
  padding-left: 1.35rem;
  font-size: var(--step-2);
  line-height: 1.6;
  color: var(--ink-soft);
}

.marks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 5px;
  height: 5px;
  background: currentColor;
}

/* ---------- Stack ---------- */
.stack {
  display: grid;
  gap: clamp(1.75rem, 4vw, 2.75rem);
}

.stack__group {
  border-top: 1px solid var(--rule);
  padding-top: 1rem;
}

.stack__label {
  font-family: var(--font-sans);
  font-size: var(--step-3);
  font-weight: 600;
}

.stack__top {
  margin-top: 0.5rem;
  font-family: var(--font-display);
  font-size: var(--step-6);
  font-weight: 600;
  line-height: 1.15;
}

.chips {
  margin-top: 0.85rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.chips li {
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 0.35rem 0.7rem;
  font-family: var(--font-mono);
  font-size: var(--step-1);
  letter-spacing: 0.02em;
}

/* ---------- Projetos open source ---------- */
.projects {
  display: grid;
  gap: clamp(1.1rem, 2.5vw, 1.6rem);
}

.project {
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 3vw, 2.25rem);
  display: flex;
  flex-direction: column;
  gap: clamp(1.25rem, 3vw, 1.75rem);
}

.project__head {
  display: grid;
  gap: 0.7rem;
  align-content: start;
}

.project__body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.9rem;
  flex: 1 1 auto;
  align-self: stretch;
}

.project__index {
  font-family: var(--font-mono);
  font-size: var(--step-1);
  letter-spacing: 0.12em;
  color: var(--ink-soft);
}

.project__name {
  font-family: var(--font-display);
  font-size: var(--step-6);
  font-weight: 600;
  line-height: 1.1;
  overflow-wrap: break-word;
}

.project--feature .project__name {
  font-size: var(--step-7);
}

.project__role {
  font-size: var(--step-2);
  color: var(--ink-soft);
  line-height: 1.6;
  max-width: 44ch;
}

.project__stars {
  font-family: var(--font-mono);
  font-size: var(--step-1);
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  white-space: nowrap;
}

.project__desc {
  font-size: var(--step-2);
  max-width: 56ch;
}

.project__stack {
  font-family: var(--font-mono);
  font-size: var(--step-1);
  color: var(--ink-soft);
  line-height: 1.6;
}

.project__actions {
  margin-top: auto;
  width: 100%;
  padding-top: clamp(1rem, 2.5vw, 1.35rem);
  border-top: 1px solid var(--rule);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
}

.project__link {
  font-family: var(--font-mono);
  font-size: var(--step-1);
  letter-spacing: 0.04em;
}

.project__link::after {
  content: "↗";
  margin-left: 0.35em;
}

/* Inversão para o projeto em destaque (fundo escuro no tema claro e vice-versa) */
.project--feature {
  background: var(--band-bg);
  color: var(--band-ink);
  border-color: var(--band-bg);
}

.project--feature .project__index,
.project--feature .project__role,
.project--feature .project__stack,
.project--feature .project__stars {
  color: var(--band-soft);
}

.project--feature .project__actions {
  justify-content: flex-start;
  border-top-color: var(--band-line);
}

.project--feature .project__link {
  color: var(--band-ink);
}

/* Botão de contorno que herda a tinta do fundo */
.project--feature .btn--outline {
  background: transparent;
  color: var(--band-ink);
  border-color: var(--band-ink);
}

.project--feature .btn--outline:hover {
  background: var(--band-ink);
  color: var(--band-bg);
}

.projects__more {
  margin-top: clamp(1.75rem, 4vw, 2.5rem);
}

.projects__more a {
  font-family: var(--font-mono);
  font-size: var(--step-2);
  letter-spacing: 0.04em;
}

/* ---------- Formação ---------- */
.degree {
  border-top: 1px solid var(--rule);
  padding-top: clamp(1.5rem, 3vw, 2.25rem);
  display: grid;
  gap: 0.5rem;
  max-width: 65ch;
}

.degree__school {
  font-family: var(--font-display);
  font-size: var(--step-6);
  font-weight: 600;
  line-height: 1.15;
}

.degree__title {
  font-size: var(--step-4);
}

/* ---------- Certificações ---------- */
.certs {
  display: grid;
  gap: 1.5rem;
}

.cert {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 1rem;
  row-gap: 0.15rem;
  border-top: 1px solid var(--rule);
  padding-top: 1rem;
  align-items: baseline;
}

.cert__index {
  grid-row: span 2;
  font-family: var(--font-mono);
  font-size: var(--step-1);
  letter-spacing: 0.12em;
  color: var(--ink-soft);
}

.cert__name {
  font-family: var(--font-display);
  font-size: var(--step-5);
  font-weight: 600;
  line-height: 1.2;
}

.cert__issuer {
  font-family: var(--font-mono);
  font-size: var(--step-1);
  color: var(--ink-soft);
}

/* ---------- FAQ ---------- */
.faq {
  border-bottom: 1px solid var(--rule);
  max-width: 72ch;
}

.faq__item {
  border-top: 1px solid var(--rule);
}

.faq__item summary {
  position: relative;
  list-style: none;
  cursor: pointer;
  padding: 1.25rem 3rem 1.25rem 0;
  font-family: var(--font-display);
  font-size: var(--step-5);
  font-weight: 600;
  line-height: 1.25;
}

.faq__item summary::-webkit-details-marker {
  display: none;
}

.faq__item summary::after {
  content: "+";
  position: absolute;
  right: 0.25rem;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-mono);
  font-size: 1.35rem;
  font-weight: 400;
}

.faq__item[open] summary::after {
  content: "\2212";
}

.faq__item summary:hover {
  text-decoration: underline;
  text-decoration-thickness: 1px;
}

.faq__body {
  padding-bottom: 1.5rem;
  max-width: 62ch;
}

/* ---------- Contato (banda inversa) ---------- */
.band {
  background: var(--band-bg);
  color: var(--band-ink);
}

.band .sec-head {
  border-top-color: var(--band-line);
}

.contact {
  display: grid;
  gap: 1.25rem;
}

.contact__lead {
  font-family: var(--font-display);
  font-size: var(--step-5);
  line-height: 1.35;
  max-width: 40ch;
}

.contact__email a {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 5.2vw, 3.1rem);
  font-weight: 600;
  line-height: 1.1;
  overflow-wrap: anywhere;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}

.contact__email a:hover {
  border-bottom-width: 2px;
}

.contact__phone {
  font-family: var(--font-mono);
  font-size: var(--step-3);
  letter-spacing: 0.04em;
}

.contact__links {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.75rem;
  border-top: 1px solid var(--band-line);
  padding-top: 1.5rem;
}

.contact__links a:not(.btn) {
  font-family: var(--font-mono);
  font-size: var(--step-2);
  letter-spacing: 0.04em;
}

/* ---------- Rodapé ---------- */
.site-footer {
  border-top: 1px solid var(--rule);
  padding-block: 1.75rem;
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 2rem;
  align-items: baseline;
  justify-content: space-between;
}

.footer__meta,
.footer__top {
  font-family: var(--font-mono);
  font-size: var(--step-1);
  color: var(--ink-soft);
  letter-spacing: 0.04em;
}

.footer__top a {
  color: var(--ink);
}

/* ---------- Tablet e desktop ---------- */
@media (min-width: 720px) {
  .stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .stack {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stack__group--top {
    grid-column: 1 / -1;
  }

  .stack__group--wide {
    grid-column: 1 / -1;
  }

  .certs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.75rem 2.5rem;
  }

  .projects {
    grid-template-columns: repeat(12, minmax(0, 1fr));
  }

  .project--half {
    grid-column: span 6;
  }

  .project--wide {
    grid-column: span 12;
  }
}

@media (min-width: 900px) {
  .header__inner {
    flex-wrap: nowrap;
    min-height: 72px;
    gap: 1.5rem;
  }

  .nav {
    display: block;
    width: auto;
    order: 0;
  }

  .nav__list {
    flex-direction: row;
    gap: 1.5rem;
  }

  .nav__list a {
    border-bottom: 0;
    padding: 0.5rem 0;
  }

  .js .menu-btn,
  .menu-btn {
    display: none;
  }

  .hero__inner {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  }

  .hero__figure {
    order: 0;
  }

  .hero__plate {
    max-width: 520px;
    margin-inline: auto;
  }

  .about {
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.8fr);
  }

  .entry {
    grid-template-columns: 280px minmax(0, 1fr);
    gap: clamp(1.5rem, 4vw, 3rem);
  }

  .project--wide {
    flex-direction: row;
    gap: clamp(1.5rem, 4vw, 3rem);
  }

  .project--wide .project__head {
    flex: 0 0 34%;
  }

  .project--wide .project__body {
    flex: 1 1 0;
  }
}

/* ---------- Ajustes móveis ---------- */
@media (max-width: 899px) {
  .header__inner {
    gap: 0.5rem;
  }

  .lang-btn {
    min-width: 40px;
  }

  .tool-btn {
    padding-inline: 0.6rem;
  }

  .nav__cta {
    display: block;
    margin-top: 1rem;
  }

  .nav__cta .btn {
    width: 100%;
    justify-content: center;
  }

  /* Celular: hero como capa centralizada.
     Texto corrido, listas e dados seguem à esquerda por legibilidade. */
  .hero__copy {
    text-align: center;
  }

  .hero__title {
    justify-content: center;
  }

  .hero__deck,
  .hero__sub {
    margin-inline: auto;
  }

  .hero__actions {
    justify-content: center;
  }

  .hero__plate {
    max-width: min(58vw, 230px);
    margin-inline: auto;
  }

  /* Fecho da página centralizado, com a hairline ainda de ponta a ponta */
  .band .sec-head {
    text-align: center;
  }

  .contact {
    text-align: center;
  }

  .contact__lead {
    margin-inline: auto;
  }

  .contact__links {
    justify-content: center;
  }

  .footer__inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}

@media (min-width: 900px) {
  .nav__cta {
    display: none;
  }
}

/* Telas estreitas: a marca perde a linha do nome completo e, por fim, o texto,
   mantendo a linha única do cabeçalho */
@media (max-width: 560px) {
  .brand__real {
    display: none;
  }
}

@media (max-width: 400px) {
  .brand__text {
    display: none;
  }
}

@media (max-width: 380px) {
  .hero__actions .btn {
    flex: 1 1 100%;
  }
}

/* ---------- Movimento ----------
   Hierarquia e feedback apenas: entrada do hero e revelação ao rolar.
   Nunca esconde conteúdo com JavaScript: se a animação não for suportada
   ou o usuário preferir menos movimento, tudo aparece pintado na hora. */
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .hero__title {
    animation: rise 0.8s var(--ease) backwards;
  }

  .hero__deck {
    animation: rise 0.8s var(--ease) 0.08s backwards;
  }

  .hero__sub {
    animation: rise 0.8s var(--ease) 0.16s backwards;
  }

  .hero__actions {
    animation: rise 0.8s var(--ease) 0.24s backwards;
  }

  .hero__figure {
    animation: rise 0.9s var(--ease) 0.12s backwards;
  }
}

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    [data-reveal] {
      animation: rise 0.7s var(--ease) both;
      animation-timeline: view();
      animation-range: entry 0% entry 70%;
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

  [data-reveal],
  .hero__title,
  .hero__deck,
  .hero__sub,
  .hero__actions,
  .hero__figure {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }
}

/* ---------- Impressão ---------- */
@media print {
  .site-header,
  .skip-link,
  .hero__actions,
  .footer__top {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
  }

  .band {
    background: #fff;
    color: #000;
    border-top: 1px solid #000;
    border-bottom: 1px solid #000;
  }

  [data-reveal] {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }

  .section {
    padding-block: 1.5rem;
  }
}
