:root {
  --ink: #17202a;
  --ink-soft: #596675;
  --navy: #3d5672;
  --navy-dark: #253c56;
  --blue-pale: #c8d6e5;
  --paper: #f4f6f5;
  --paper-2: #e8ecec;
  --line: rgba(23, 32, 42, 0.14);
  --outer: #171918;
  --white: #ffffff;
  /* Os três acentos da seção de Notes. Vieram do CSS da página de artigos e
     eram usados aqui sem nunca terem sido definidos: `var(--blue)` sem valor faz
     a declaração inteira cair, então "Ler a nota" herdava a cor do card e o anel
     de foco do formulário sumia. Os tons do tema claro são escurecidos para
     ficarem legíveis sobre papel — os originais foram pensados sobre fundo preto. */
  --blue: #2f6ba6;
  --cyan: #177b8c;
  --amber: #8a5b09;
  --radius: 26px;
  --font-display: "Manrope", sans-serif;
  --font-body: "DM Sans", sans-serif;

  /* Raio interno derivado para que os cantos aninhados acompanhem o slider do painel. */
  --radius-inner: calc(var(--radius) * 0.62);
  --line-strong: rgba(23, 32, 42, 0.2);
  --ink-muted: #6a7684;
  --surface-forte: #17202a;
  --surface-forte-texto: #ffffff;

  --shadow-sm: 0 2px 6px rgba(23, 32, 42, 0.04), 0 8px 20px rgba(23, 32, 42, 0.05);
  --shadow-md: 0 4px 10px rgba(23, 32, 42, 0.05), 0 16px 38px rgba(23, 32, 42, 0.08);
  --shadow-lg: 0 8px 18px rgba(23, 32, 42, 0.06), 0 28px 64px rgba(23, 32, 42, 0.13);

  --ease-out: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.28, 0.64, 1);
  --dur-fast: 0.16s;
  --dur: 0.28s;
  --dur-slow: 0.5s;
}

:root[data-theme="dark"] {
  --ink: #f0f4f8 !important;
  --ink-soft: #9aaaba !important;
  --ink-muted: #788a9c !important;
  --navy: #5279a3 !important;
  --navy-dark: #375375 !important;
  --blue-pale: #1c2734 !important;
  --paper: #0e1318 !important;
  --paper-2: #151b22 !important;
  --line: rgba(255, 255, 255, 0.12) !important;
  --line-strong: rgba(255, 255, 255, 0.22) !important;
  --outer: #080b0e !important;
  --white: #ffffff !important;
  --blue: #72a7dc !important;
  --cyan: #57d4e7 !important;
  --amber: #f3b64c !important;
  --surface-forte: #f0f4f8 !important;
  --surface-forte-texto: #17202a !important;

  --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.3), 0 8px 20px rgba(0, 0, 0, 0.4) !important;
  --shadow-md: 0 4px 10px rgba(0, 0, 0, 0.4), 0 16px 38px rgba(0, 0, 0, 0.5) !important;
  --shadow-lg: 0 8px 18px rgba(0, 0, 0, 0.5), 0 28px 64px rgba(0, 0, 0, 0.7) !important;
}

* {
  box-sizing: border-box;
}

::selection {
  color: var(--white);
  background: var(--navy-dark);
}

:root[data-theme="dark"] ::selection {
  color: var(--white);
  background: var(--navy);
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 128px;
}

body {
  margin: 0;
  padding: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  transition: background-color var(--dur) var(--ease-out), color var(--dur) var(--ease-out);
}

button,
input {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

/* O site não tinha nenhum indicador de foco: navegar por teclado ficava invisível. */
:is(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--navy-dark);
  outline-offset: 3px;
  border-radius: 8px;
}

:root[data-theme="dark"] :is(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline-color: var(--navy);
}

.contact :is(a, button):focus-visible,
.topbar .contact-pill:focus-visible,
.preview-live :focus-visible {
  outline-color: var(--white);
}

.skip-link {
  position: fixed;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 12px 16px;
  border-radius: 10px;
  background: var(--white);
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 16px;
}

/* Conteúdo ocupa a tela inteira sem moldura escura em volta, alinhando com as seções */
.page-frame {
  position: relative;
  width: 100%;
  max-width: 100%;
  margin: 0;
  overflow: clip;
  border-radius: 0;
  background: var(--paper);
  box-shadow: none;
  transition: background-color var(--dur) var(--ease-out);
}

.topbar {
  position: sticky;
  top: 14px;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  width: calc(100% - 48px);
  margin: 24px auto;
  padding: 10px 12px 10px 18px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  /* Liquid Glass, variante regular: a Apple manda usá-la quando o componente
     carrega texto, porque ela ajusta a luminosidade do fundo para manter a
     legibilidade. A variante clear é só para mídia rica, que não é o caso aqui. */
  background: rgba(214, 223, 230, 0.62);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.75),
    inset 0 -1px 0 rgba(23, 32, 42, 0.06),
    0 2px 6px rgba(23, 32, 42, 0.05),
    0 14px 38px rgba(23, 32, 42, 0.12);
  backdrop-filter: blur(24px) saturate(180%) brightness(108%);
  -webkit-backdrop-filter: blur(24px) saturate(180%) brightness(108%);
  transition:
    background-color var(--dur) var(--ease-out),
    border-color var(--dur) var(--ease-out),
    box-shadow var(--dur) var(--ease-out);
}

/* Reflexo especular na borda superior: é o que faz o vidro parecer vidro. */
.topbar::after {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  border-radius: inherit;
  background: linear-gradient(
    160deg,
    rgba(255, 255, 255, 0.5) 0%,
    rgba(255, 255, 255, 0.12) 28%,
    transparent 55%
  );
  pointer-events: none;
}

/* A Apple exige respeitar redução de transparência: sem vidro, fundo sólido. */
@media (prefers-reduced-transparency: reduce) {
  .topbar {
    background: var(--paper-2);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  .topbar::after { display: none; }
  .floating-tag, .code-card, .preview-badge, .preview-live > span {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.04em;
  transition: opacity var(--dur-fast) var(--ease-out);
}

.brand:hover { opacity: 0.72; }

/* The mark was four dots in a 2x2 grid before it became an SVG. What is left
   of that rule is the transition; the grid, the padding and the round white
   plate belonged to the dots and outlived them. */
.brand-mark {
  transition: transform var(--dur) var(--ease-spring);
}

.brand:hover .brand-mark { transform: rotate(45deg); }

.nav-pills {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
  box-shadow:
    inset 0 1px 2px rgba(23, 32, 42, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.nav-link,
.contact-pill {
  position: relative;
  padding: 10px 17px;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 600;
  transition:
    color var(--dur) var(--ease-out),
    background var(--dur) var(--ease-out),
    box-shadow var(--dur) var(--ease-out),
    transform var(--dur) var(--ease-out);
}

.nav-link:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.9);
}

.nav-link.active {
  color: var(--white);
  background: var(--navy);
  box-shadow: 0 2px 8px rgba(61, 86, 114, 0.28);
}

.topbar-end {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 10px;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.5);
  box-shadow: inset 0 1px 2px rgba(23, 32, 42, 0.05);
  cursor: pointer;
  flex-shrink: 0;
  transition:
    color var(--dur) var(--ease-out),
    background var(--dur) var(--ease-out),
    box-shadow var(--dur) var(--ease-out),
    transform var(--dur) var(--ease-out);
}

.theme-toggle:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.85);
  transform: translateY(-1px);
}

.theme-toggle:active {
  transform: translateY(0);
  transition-duration: var(--dur-fast);
}

.theme-toggle:focus-visible {
  border-radius: 999px;
}

.theme-toggle-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  line-height: 1;
  transition: transform var(--dur) var(--ease-spring);
}

.theme-toggle:hover .theme-toggle-icon {
  transform: scale(1.12) rotate(-8deg);
}

.lang-switch {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
  box-shadow: inset 0 1px 2px rgba(23, 32, 42, 0.05);
}

.lang-switch button {
  padding: 7px 11px;
  border: 0;
  border-radius: 999px;
  color: var(--ink-soft);
  background: var(--paper-2);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: color var(--dur) var(--ease-out), background var(--dur) var(--ease-out);
}

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

.lang-switch button[aria-pressed="true"] {
  color: var(--surface-forte-texto);
  background: var(--surface-forte);
  box-shadow: 0 2px 8px rgba(61, 86, 114, 0.26);
}

.contact-pill {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--white);
  background: var(--navy-dark);
  box-shadow: 0 2px 10px rgba(37, 60, 86, 0.24);
}

.contact-pill span {
  transition: transform var(--dur) var(--ease-spring);
}

.contact-pill:hover span {
  transform: translate(2px, -2px);
}

.contact-pill:hover,
.button:hover,
.project-arrow:hover {
  transform: translateY(-2px);
}

.contact-pill:hover {
  box-shadow: 0 8px 22px rgba(37, 60, 86, 0.3);
}

.contact-pill:active,
.button:active {
  transform: translateY(0);
  transition-duration: var(--dur-fast);
}

/* O deslocamento das âncoras vive em html { scroll-padding-top }, que também cobre #conteudo. */
.section-anchor {
  scroll-margin-top: 0;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: 1.04fr 0.96fr;
  min-height: 760px;
  padding: 112px 8% 96px;
  overflow: hidden;
}

/* Era papel milimetrado: uma grade de 54px atravessando o hero inteiro. Nenhuma
   daquelas linhas separava nada nem alinhava com o texto — só riscava a área mais
   importante do site. No lugar entra luz: um véu que dá profundidade sem desenhar
   nada que o leitor precise interpretar. */
.hero::before {
  position: absolute;
  inset: 0;
  content: "";
  background-image:
    radial-gradient(120% 90% at 78% 8%, rgba(61, 86, 114, 0.09), transparent 60%),
    radial-gradient(90% 70% at 0% 100%, rgba(32, 45, 57, 0.05), transparent 62%);
  pointer-events: none;
}

.hero-copy,
.hero-art {
  position: relative;
  z-index: 1;
}

.hero-copy {
  align-self: center;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 24px;
  color: var(--ink-soft);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.eyebrow > span {
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #809db8;
  box-shadow: 0 0 0 5px rgba(128, 157, 184, 0.16);
  animation: eyebrow-breathe 3.6s var(--ease-out) infinite;
}

@keyframes eyebrow-breathe {
  50% { box-shadow: 0 0 0 8px rgba(128, 157, 184, 0.08); }
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

h1 {
  max-width: 760px;
  margin-bottom: 30px;
  font-size: clamp(3.3rem, 6.2vw, 6.7rem);
  line-height: 0.94;
  letter-spacing: -0.075em;
  overflow-wrap: break-word;
}

h1 em {
  display: inline-block;
  color: var(--navy);
  font-family: Georgia, serif;
  font-weight: 400;
  font-style: italic;
  letter-spacing: -0.045em;
}

.hero-description {
  max-width: 600px;
  margin-bottom: 34px;
  color: var(--ink-soft);
  font-size: 1.14rem;
  line-height: 1.72;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 25px;
}

.hero-stack {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
}

.hero-stack span,
.hero-stack b {
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.64rem;
  letter-spacing: 0.01em;
  transition: border-color var(--dur) var(--ease-out), background var(--dur) var(--ease-out), transform var(--dur) var(--ease-out);
}

.hero-stack span { color: var(--ink-soft); background: transparent; letter-spacing: 0.14em; }
.hero-stack b {
  color: var(--navy-dark);
  background: rgba(255, 255, 255, 0.58);
  box-shadow: 0 1px 2px rgba(23, 32, 42, 0.03);
  font-weight: 600;
}

.hero-stack b:hover {
  border-color: var(--line-strong);
  background: var(--white);
  transform: translateY(-1px);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  min-height: 52px;
  padding: 0 24px;
  border: 0;
  border-radius: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: transform var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out), background var(--dur) var(--ease-out);
}

.button > span[aria-hidden] {
  transition: transform var(--dur) var(--ease-spring);
}

.button-primary {
  color: var(--white);
  background: var(--navy-dark);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 2px 6px rgba(37, 60, 86, 0.18),
    0 12px 28px rgba(37, 60, 86, 0.2);
}

.button-primary:hover {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 4px 10px rgba(37, 60, 86, 0.2),
    0 18px 38px rgba(37, 60, 86, 0.26);
}

.button-primary:hover > span[aria-hidden] { transform: translateY(3px); }

.text-link {
  position: relative;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--line-strong);
  font-size: 0.92rem;
  font-weight: 600;
  transition: color var(--dur) var(--ease-out), border-color var(--dur) var(--ease-out);
}

.text-link::after {
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 0;
  height: 1px;
  content: "";
  background: var(--surface-forte);
  transition: width var(--dur) var(--ease-out);
}

.text-link:hover { border-color: transparent; }
.text-link:hover::after { width: 100%; }

.hero-stats {
  display: flex;
  gap: 44px;
  margin: 64px 0 0;
  padding-top: 30px;
  border-top: 1px solid var(--line);
}

.hero-stats div {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 12px;
}

.hero-stats dt {
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.hero-stats dd {
  max-width: 92px;
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.74rem;
  line-height: 1.35;
}

.hero-art {
  min-height: 520px;
}

.hero-art::before {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 0;
  width: 82%;
  height: 70%;
  content: "";
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, rgba(61, 86, 114, 0.22), transparent 70%);
  filter: blur(24px);
  transform: translate(-50%, -50%);
}

.hero-photo {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 6;
  width: min(400px, 78%);
  aspect-ratio: 0.8;
  border: 10px solid rgba(255, 255, 255, 0.75);
  border-radius: 36px;
  object-fit: cover;
  object-position: center;
  box-shadow: 0 32px 65px rgba(22, 28, 33, 0.25);
  transform: translate(-45%, -50%) rotate(3deg);
}

.hero-art.photo-mode .orbit,
.hero-art.photo-mode .floating-tag,
.hero-art.photo-mode .profile-card,
.hero-art.photo-mode .code-card {
  display: none;
}

.hero.hero-minimal {
  grid-template-columns: minmax(0, 880px);
}

.hero.hero-minimal .hero-copy {
  max-width: 880px;
}

.profile-card {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(390px, 74%);
  aspect-ratio: 0.76;
  padding: 24px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 36px;
  color: var(--white);
  background:
    linear-gradient(145deg, rgba(117, 150, 181, 0.38), transparent 40%),
    var(--ink);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 6px 14px rgba(22, 28, 33, 0.16),
    0 34px 68px rgba(22, 28, 33, 0.3);
  transform: translate(-43%, -50%) rotate(4deg);
  transition: transform var(--dur-slow) var(--ease-out), box-shadow var(--dur-slow) var(--ease-out);
}

.hero-art:hover .profile-card {
  transform: translate(-43%, -52%) rotate(2.5deg);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 10px 20px rgba(22, 28, 33, 0.18),
    0 44px 84px rgba(22, 28, 33, 0.34);
}

.profile-card::after {
  position: absolute;
  inset: auto -25% -31% 15%;
  height: 72%;
  border-radius: 50%;
  content: "";
  background: #607f9f;
  filter: blur(1px);
}

.profile-card-top,
.profile-card-copy {
  position: relative;
  z-index: 2;
}

.profile-card-top {
  display: flex;
  justify-content: space-between;
  font-size: 0.62rem;
  letter-spacing: 0.13em;
}

.profile-card-top span:last-child {
  color: #a9dba9;
}

.monogram {
  position: absolute;
  top: 49%;
  left: 50%;
  z-index: 1;
  font-family: var(--font-display);
  font-size: 14rem;
  font-weight: 800;
  line-height: 1;
  opacity: 0.16;
  transform: translate(-50%, -50%);
}

.profile-card-copy {
  position: absolute;
  left: 24px;
  bottom: 28px;
  display: flex;
  flex-direction: column;
  font-size: 1.2rem;
}

.profile-card-copy span {
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.9rem;
}

.code-card {
  position: absolute;
  right: -2%;
  bottom: 10%;
  z-index: 4;
  width: 230px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 18px;
  color: #dfe9f4;
  background: rgba(29, 37, 46, 0.93);
  backdrop-filter: blur(6px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 6px 14px rgba(18, 24, 30, 0.18),
    0 26px 54px rgba(18, 24, 30, 0.32);
  transform: rotate(-6deg);
  transition: transform var(--dur-slow) var(--ease-out);
}

.hero-art:hover .code-card { transform: rotate(-4deg) translateY(-6px); }

.code-card > span,
.code-card small {
  display: block;
  font-family: ui-monospace, monospace;
  font-size: 0.7rem;
}

.code-card i {
  display: block;
  width: 74%;
  height: 6px;
  margin-top: 12px;
  border-radius: 99px;
  background: #597b9c;
}

.code-card i:nth-of-type(2) { width: 52%; background: #b99e72; }
.code-card i:nth-of-type(3) { width: 85%; background: #7c8b99; }
.code-card small { margin-top: 20px; color: #91c79a; }

.orbit {
  position: absolute;
  top: 50%;
  left: 50%;
  border: 1px solid rgba(61, 86, 114, 0.18);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.orbit-one {
  width: 520px;
  height: 520px;
  border-style: dashed;
  border-color: rgba(61, 86, 114, 0.14);
  animation: orbit-spin 90s linear infinite;
}

.orbit-two { width: 390px; height: 390px; }

@keyframes orbit-spin {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

.floating-tag {
  position: absolute;
  z-index: 5;
  padding: 10px 15px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 999px;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.72);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    0 2px 6px rgba(23, 32, 42, 0.04),
    0 12px 30px rgba(23, 32, 42, 0.09);
  backdrop-filter: blur(8px);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  animation: tag-float 7s var(--ease-out) infinite;
}

@keyframes tag-float {
  50% { transform: translateY(-9px); }
}

.tag-one { left: 1%; top: 17%; }
.tag-two { right: 0; top: 24%; animation-delay: -2.4s; animation-duration: 8s; }
.tag-three { left: 4%; bottom: 12%; animation-delay: -4.8s; animation-duration: 9s; }

.projects {
  position: relative;
  padding: 110px 8%;
  background: var(--paper-2);
}

/* Sem filete entre hero e projetos: a troca de --paper para --paper-2 já faz
   a separação, e a linha por cima dela era ruído repetindo a mesma informação. */

.section-heading {
  display: grid;
  grid-template-columns: 1fr 0.65fr;
  gap: 70px;
  align-items: end;
  margin-bottom: 56px;
}

.section-heading h2,
.certificate-intro h2,
.contact h2 {
  margin-bottom: 0;
  font-size: clamp(2.7rem, 5vw, 5rem);
  line-height: 1;
  letter-spacing: -0.065em;
}

.section-heading > p {
  margin-bottom: 6px;
  color: var(--ink-soft);
  line-height: 1.7;
}

.project-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.project-filter-btn {
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.6);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: color var(--dur) var(--ease-out), background var(--dur) var(--ease-out), border-color var(--dur) var(--ease-out);
}

.project-filter-btn:hover { color: var(--ink); border-color: var(--line-strong); background: rgba(255, 255, 255, 0.9); }

.project-filter-btn.active {
  color: var(--white);
  background: var(--navy);
  border-color: var(--navy);
  box-shadow: 0 2px 8px rgba(61, 86, 114, 0.26);
}

/* auto-fit, não `repeat(2, …)`: com duas colunas fixas, alargar a janela — ou
   dar zoom out — só esticava os mesmos dois cartões, que chegavam a 1399px de
   largura cada num monitor de 3200. O número de colunas agora acompanha o
   espaço, então diminuir a página passa a mostrar mais projeto em vez de
   mostrar o mesmo projeto maior. */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  align-items: stretch;
  gap: 24px;
  /* Sem teto, um monitor de 3200 rendia sete colunas de cartão apertado. */
  max-width: 2200px;
  margin-inline: auto;
}

.notes-section {
  padding: 110px 8%;
  background: linear-gradient(135deg, var(--paper) 0%, var(--paper-2) 100%);
}

.notes-preview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.notes-preview-card {
  position: relative;
  display: flex;
  min-height: 330px;
  flex-direction: column;
  overflow: hidden;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.7);
  box-shadow: var(--shadow-sm);
  transition: transform var(--dur-slow) var(--ease-out), box-shadow var(--dur-slow) var(--ease-out), border-color var(--dur-slow) var(--ease-out);
}

.notes-preview-card:hover { transform: translateY(-6px); border-color: var(--line-strong); box-shadow: var(--shadow-lg); }
/* Azul fixo, igual nos dois temas. O `--navy` seguia o tema e mudava o chão
   debaixo dos acentos deste card, que são claros e fixos: no claro o ciano caía
   para 4,3:1. Este tom deixa ciano em 5,8:1, âmbar em 5,7:1 e o texto branco em
   10,2:1 — folga suficiente para o card não depender mais de qual tema está. */
.notes-preview-featured { grid-column: 1 / -1; min-height: 390px; background: #2b4260; color: var(--white); }
.notes-preview-card > span { color: var(--ink-soft); font: 700 0.68rem/1.3 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 0.1em; }
.notes-preview-card > span b { color: inherit; font: inherit; }
/* Estas duas precisam vencer `.notes-preview-card p`, que tem a mesma força e
   aparece depois: sem o `.notes-preview-card` no seletor, o parágrafo do card em
   destaque saía cinza sobre azul — 1,9:1 no escuro e 1,3:1 no claro. */
.notes-preview-card.notes-preview-featured > span,
.notes-preview-card.notes-preview-featured p { color: rgba(255, 255, 255, 0.78); }
.notes-preview-card h3 { max-width: 790px; margin: auto 0 16px; font-family: var(--font-display); font-size: clamp(2rem, 4.5vw, 4rem); line-height: 1.04; letter-spacing: -0.055em; }
.notes-preview-card:not(.notes-preview-featured) h3 { font-size: clamp(1.65rem, 3vw, 2.35rem); }
.notes-preview-card p { max-width: 600px; margin: 0; color: var(--ink-soft); line-height: 1.65; }
.notes-preview-card strong { margin-top: 26px; color: var(--blue); font-size: 0.92rem; }
/* O card em destaque é azul-escuro NOS DOIS TEMAS, então os acentos dele não
   podem seguir o tema: no claro, o `--cyan` e o `--amber` escurecem para caber
   sobre papel e ficariam ilegíveis aqui (1,5:1 e 1,3:1 medidos). Estes dois são
   os tons claros, fixos, porque o fundo deles é fixo. */
.notes-preview-card.notes-preview-featured strong { color: #57d4e7; }
.notes-preview-card.notes-preview-featured em { color: #f3b64c; }
.notes-preview-card em { position: absolute; top: 28px; right: 28px; color: var(--amber); font: 700 0.76rem ui-monospace, SFMono-Regular, Menlo, monospace; font-style: normal; }

.notes-request {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 58px;
  margin-top: 24px;
  padding: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.56);
}

.notes-request h3 { margin: 0 0 16px; font-family: var(--font-display); font-size: clamp(2rem, 4vw, 3.5rem); line-height: 1; letter-spacing: -0.055em; }
.notes-request > div > p:last-child { margin: 0; color: var(--ink-soft); line-height: 1.7; }
.notes-request-form { display: grid; gap: 14px; }
.notes-request-form label { display: grid; gap: 7px; color: var(--ink); font-size: 0.84rem; font-weight: 700; }
.notes-request-form input, .notes-request-form textarea { width: 100%; border: 1px solid var(--line); border-radius: 12px; outline: 0; background: rgba(255, 255, 255, 0.82); color: var(--ink); padding: 12px 14px; font: inherit; resize: vertical; }
.notes-request-form input:focus, .notes-request-form textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(97, 139, 180, 0.16); }
.notes-request-note, .notes-request-status { margin: 0; color: var(--ink-soft); font-size: 0.8rem; line-height: 1.55; }
/* Campo-armadilha do formulário de pedido. `display:none` seria detectável por robô
   que lê o CSS; tirar do fluxo e jogar para fora da tela custa o mesmo e engana mais. */
.notes-request-trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.notes-request-status { min-height: 1.3em; color: var(--blue); }
.notes-request-form .button { justify-self: start; }

.project-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100%;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.7);
  box-shadow: var(--shadow-sm);
  transition:
    transform var(--dur-slow) var(--ease-out),
    box-shadow var(--dur-slow) var(--ease-out),
    border-color var(--dur-slow) var(--ease-out),
    background var(--dur-slow) var(--ease-out);
}

.project-card:hover {
  transform: translateY(-6px);
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-lg);
}

/* Destaques seguem a mesma malha dos demais cartões: a mídia e o rodapé não
   mudam de formato só por causa da ordem do projeto. */
.project-card-featured {
  grid-column: auto;
}

/* A moldura define a geometria, não o arquivo: qualquer captura preenche o mesmo
   retângulo 16/9 e nunca altera a altura do cartão. */
.project-preview {
  position: relative;
  flex: 0 0 auto;
  width: 100%;
  height: auto;
  min-width: 0;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius-inner);
  box-shadow: inset 0 0 0 1px rgba(23, 32, 42, 0.08);
}

/* Moldura de 1px sutil e vinheta suave por cima da captura (mais forte embaixo para uniformizar cartões claros e escuros) */
.project-preview::after {
  position: absolute;
  inset: 0;
  z-index: 3;
  border: 1px solid var(--line);
  border-radius: var(--radius-inner);
  content: "";
  background:
    radial-gradient(ellipse at 50% 35%, transparent 45%, rgba(23, 32, 42, 0.12) 100%),
    linear-gradient(to bottom, rgba(23, 32, 42, 0.02) 0%, rgba(23, 32, 42, 0.1) 45%, rgba(17, 24, 32, 0.52) 100%);
  pointer-events: none;
  transition: border-color var(--dur-slow) var(--ease-out);
}

.project-card:hover .project-preview::after {
  border-color: var(--line-strong);
}

.preview-live {
  display: grid;
  place-items: center;
  background: var(--navy-dark);
}

.preview-live > img[data-project-image] {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  will-change: transform;
  transition: transform 0.5s var(--ease-out);
}

.project-card:hover .preview-live > img[data-project-image] {
  transform: scale(1.05);
}

/* Celular sobreposto: só entra quando a versão mobile do projeto vale a pena. */
.preview-phone {
  position: absolute;
  right: 5%;
  bottom: 6%;
  z-index: 4;
  /* 112px numa coluna de 1399px era 8% da largura: a tela do celular ficava
     pequena demais para se ler o que há nela, que é o ponto de mostrá-la. */
  width: 26%;
  max-width: 210px;
  min-width: 104px;
  border: 3px solid rgba(255, 255, 255, 0.82);
  border-radius: 16px;
  background: var(--surface-forte);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.28), 0 22px 44px rgba(0, 0, 0, 0.34);
  transform: rotate(-4deg);
  transition: transform var(--dur-slow) var(--ease-out);
}

.project-card:hover .preview-phone { transform: rotate(-2deg) translateY(-6px) scale(1.03); }

.preview-live.has-phone > img[data-project-image] { object-position: left center; }
.preview-live.image-failed > img { display: none; }

/* Sem isso o selo e o celular disputam o mesmo canto. */
.preview-live.has-phone > .preview-badge { right: auto; left: 14px; }

.preview-live-fallback {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  padding: 30px;
  color: white;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), transparent 55%), var(--navy-dark);
}

.preview-live-fallback strong {
  max-width: 80%;
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 0.95;
  letter-spacing: -0.06em;
  text-align: center;
}

.preview-live > span {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 4;
  padding: 7px 11px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  color: white;
  background: rgba(16, 22, 29, 0.72);
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  backdrop-filter: blur(10px);
  transition: transform var(--dur-slow) var(--ease-out), border-color var(--dur-slow) var(--ease-out);
}

.project-card:hover .preview-live > span {
  border-color: rgba(255, 255, 255, 0.42);
  transform: translateY(-2px);
}

.preview-atlas {
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 80% 15%, rgba(215, 183, 143, 0.6), transparent 30%),
    #cad6de;
}

.mock-window {
  width: 78%;
  overflow: hidden;
  border-radius: 14px;
  background: #f6f3ee;
  box-shadow: 0 6px 14px rgba(36, 50, 64, 0.12), 0 30px 54px rgba(36, 50, 64, 0.22);
  transform: rotate(-3deg);
  transition: transform var(--dur-slow) var(--ease-out);
}

.project-card:hover .mock-window { transform: rotate(-1.5deg) scale(1.03); }

.mock-bar {
  display: flex;
  gap: 5px;
  padding: 10px;
  background: #e8e4df;
}

.mock-bar i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #89939b;
}

.atlas-layout {
  display: grid;
  grid-template-columns: 1fr 0.7fr;
  align-items: center;
  min-height: 240px;
  padding: 28px;
}

.atlas-layout > div:first-child {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.atlas-layout span { font-size: 0.5rem; letter-spacing: 0.2em; }
.atlas-layout strong { max-width: 180px; font-family: var(--font-display); font-size: 1.6rem; line-height: 1; }
.atlas-layout small { width: 50px; height: 5px; background: var(--navy); }
.atlas-orb { aspect-ratio: 1; border-radius: 50%; background: linear-gradient(145deg, #8fa4b5, #e7c4a4); }

.project-info {
  display: flex;
  flex: 1 1 auto;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 16px 14px;
}

.project-info h3 {
  margin-bottom: 8px;
  font-size: clamp(1.4rem, 1.9vw, 1.85rem);
  line-height: 1.12;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

.project-info p:not(.project-number) {
  max-width: 460px;
  margin-bottom: 0;
  color: var(--ink-soft);
  font-size: 0.92rem;
  line-height: 1.58;
}

.project-number {
  margin-bottom: 7px;
  color: var(--ink-muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.13em;
}

.project-arrow {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: var(--white);
  background: var(--navy-dark);
  transition: transform 0.2s ease;
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 7px;
  padding: 0 16px 14px;
}

.project-meta span {
  padding: 6px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-soft);
  font-size: 0.65rem;
  letter-spacing: 0.01em;
  white-space: nowrap;
  transition: border-color var(--dur) var(--ease-out), color var(--dur) var(--ease-out);
}

.project-card:hover .project-meta span {
  border-color: var(--line-strong);
  color: var(--ink);
}

.project-notice {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 16px 12px;
  padding: 10px 12px;
  border-radius: var(--radius-inner);
  font-size: 0.82rem;
  font-weight: 500;
  line-height: 1.4;
  transition:
    background-color var(--dur) var(--ease-out),
    color var(--dur) var(--ease-out);
}

.project-notice::before {
  flex: 0 0 auto;
  font-size: 1.1rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.project-notice[data-level="aviso"] {
  background-color: #fef3c7;
  color: #92400e;
}

.project-notice[data-level="aviso"]::before {
  content: "⚠️";
}

.project-notice[data-level="parado"] {
  background-color: #f3f4f6;
  color: #374151;
}

.project-notice[data-level="parado"]::before {
  content: "ℹ️";
}

:root[data-theme="dark"] .project-notice[data-level="aviso"] {
  background-color: rgba(217, 119, 6, 0.2) !important;
  color: #fbbf24 !important;
}

:root[data-theme="dark"] .project-notice[data-level="parado"] {
  background-color: rgba(255, 255, 255, 0.06) !important;
  color: #d1d5db !important;
}

.project-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  padding: 2px 16px 16px;
}

.project-action {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.75);
  font-size: 0.72rem;
  font-weight: 700;
  transition:
    color var(--dur) var(--ease-out),
    border-color var(--dur) var(--ease-out),
    background var(--dur) var(--ease-out),
    box-shadow var(--dur) var(--ease-out),
    transform var(--dur) var(--ease-out);
}

.project-action span {
  transition: transform var(--dur) var(--ease-spring);
}

.project-action:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  background: var(--white);
  box-shadow: 0 6px 16px rgba(23, 32, 42, 0.1);
}

.project-action:hover span { transform: translate(2px, -2px); }
.project-action:active { transform: translateY(0); }

.project-action-primary {
  color: white;
  border-color: var(--navy-dark);
  background: var(--navy-dark);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.project-action-primary:hover {
  color: var(--surface-forte-texto);
  border-color: var(--surface-forte);
  background: var(--surface-forte);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 6px 18px rgba(37, 60, 86, 0.28);
}

.preview-focus {
  display: grid;
  place-items: center;
  background: #17212c;
}

.focus-ui {
  display: grid;
  grid-template-columns: 48px 1fr;
  width: 74%;
  height: 72%;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  color: white;
  background: #202d39;
  box-shadow: 0 20px 35px rgba(0, 0, 0, 0.28);
}

.focus-sidebar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding-top: 18px;
  background: #111a22;
}

.focus-sidebar i {
  width: 16px;
  height: 16px;
  border-radius: 5px;
  background: #3e546a;
}

.focus-sidebar i:first-child { background: #aac3d7; }

.focus-main { padding: 22px; }
.focus-main > span { color: #8da5b8; font-size: 0.52rem; letter-spacing: 0.13em; }
.focus-score { margin: 30px 0 16px; font-family: var(--font-display); font-size: 4rem; font-weight: 700; }
.focus-lines i { display: block; width: 90%; height: 7px; margin-top: 9px; border-radius: 9px; background: #3e5365; }
.focus-lines i:nth-child(2) { width: 63%; background: #7696ae; }
.focus-lines i:nth-child(3) { width: 78%; }

.preview-pulse {
  display: grid;
  place-items: center;
  color: white;
  background: linear-gradient(145deg, #8a503d, #221b28 70%);
}

.preview-generic {
  display: flex;
  align-items: flex-end;
  padding: 26px;
  color: var(--ink);
  background:
    radial-gradient(circle at 84% 18%, rgba(61, 86, 114, 0.13), transparent 30%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.76), rgba(244, 246, 245, 0.18)),
    var(--paper-2);
}

.preview-generic::before {
  position: absolute;
  inset: 16px;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius-inner) * 0.72);
  content: "";
  pointer-events: none;
}

/* A inicial continua identificando a prévia, mas como marca d'água discreta. */
.preview-glyph {
  position: absolute;
  top: 50%;
  right: 26px;
  font-family: var(--font-display);
  font-size: clamp(3rem, 5vw, 4.5rem);
  font-style: normal;
  font-weight: 800;
  line-height: 1;
  opacity: 0.055;
  pointer-events: none;
  transform: translateY(-50%);
  transition: transform var(--dur-slow) var(--ease-out), opacity var(--dur-slow) var(--ease-out);
}

.project-card:hover .preview-glyph { opacity: 0.09; transform: translateY(calc(-50% - 4px)); }

.preview-path {
  position: absolute;
  top: 24px;
  left: 26px;
  z-index: 1;
  max-width: calc(100% - 52px);
  margin: 0;
  overflow: hidden;
  color: var(--ink-muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preview-generic strong {
  position: relative;
  z-index: 1;
  max-width: calc(100% - 52px);
  font-family: var(--font-display);
  font-size: clamp(1rem, 1.5vw, 1.3rem);
  line-height: 1.15;
  letter-spacing: -0.035em;
  text-align: left;
  overflow-wrap: anywhere;
}

.preview-generic:has(.preview-badge) strong {
  max-width: calc(100% - 140px);
}

.preview-generic .preview-badge {
  color: var(--ink-soft);
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow-sm);
}

.preview-badge {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 11px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background: rgba(16, 22, 29, 0.6);
  backdrop-filter: blur(10px);
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.11em;
}

.preview-badge::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #8fc79a;
  box-shadow: 0 0 0 3px rgba(143, 199, 154, 0.2);
  content: "";
}

/* Variações sutis preservam o ritmo sem transformar a ausência de captura em destaque. */
.preview-generic[data-preview-variant="1"] {
  background:
    radial-gradient(circle at 18% 78%, rgba(61, 86, 114, 0.11), transparent 30%),
    linear-gradient(210deg, rgba(255, 255, 255, 0.78), rgba(244, 246, 245, 0.16)),
    var(--paper-2);
}

.preview-generic[data-preview-variant="2"] {
  background:
    radial-gradient(circle at 78% 82%, rgba(37, 60, 86, 0.1), transparent 28%),
    linear-gradient(60deg, rgba(255, 255, 255, 0.76), rgba(232, 236, 236, 0.2)),
    var(--paper);
}

.preview-generic[data-preview-variant="3"] {
  background:
    radial-gradient(circle at 20% 20%, rgba(61, 86, 114, 0.12), transparent 29%),
    linear-gradient(320deg, rgba(255, 255, 255, 0.74), rgba(244, 246, 245, 0.2)),
    var(--paper-2);
}

.empty-projects {
  grid-column: 1 / -1;
  padding: 60px 40px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.42);
  color: var(--ink-soft);
  font-size: 0.95rem;
  text-align: center;
}

.preview-pulse p {
  position: absolute;
  bottom: 17px;
  left: 22px;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.22em;
}

.pulse-ring {
  display: grid;
  place-items: center;
  width: 150px;
  height: 150px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 50%;
  box-shadow: 0 0 0 26px rgba(255, 255, 255, 0.035), 0 0 0 52px rgba(255, 255, 255, 0.025);
}

.pulse-ring span {
  width: 68px;
  height: 68px;
  border-radius: 48% 52% 65% 35%;
  background: #e6b48d;
  filter: blur(1px);
  animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
  50% { transform: scale(1.12) rotate(30deg); border-radius: 64% 36% 48% 52%; }
}

.certificates {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 80px;
  align-items: center;
  min-height: 680px;
  padding: 110px 8%;
}

.certificate-intro > p:not(.eyebrow) {
  max-width: 550px;
  margin: 26px 0 28px;
  color: var(--ink-soft);
  line-height: 1.72;
}

.coming-label {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-soft);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.coming-label::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #b99e72;
  content: "";
}

.certificate-stack {
  position: relative;
  min-height: 390px;
}

.certificate-stack.certificate-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  min-height: 0;
}

.certificate-entry-link { color: inherit; text-decoration: none; }

.certificate-entry {
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-inner);
  background: rgba(255, 255, 255, 0.76);
  box-shadow: var(--shadow-sm);
  transition:
    transform var(--dur) var(--ease-out),
    box-shadow var(--dur) var(--ease-out),
    border-color var(--dur) var(--ease-out),
    background var(--dur) var(--ease-out);
}

.certificate-entry-link:hover .certificate-entry {
  transform: translateY(-5px);
  border-color: var(--line-strong);
  background: var(--white);
  box-shadow: var(--shadow-md);
}

.certificate-entry img,
.certificate-placeholder {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: #dbe2e5;
  transition: transform var(--dur-slow) var(--ease-out);
}

.certificate-entry-link:hover .certificate-entry img { transform: scale(1.035); }

.certificate-placeholder {
  display: grid;
  place-items: center;
  color: white;
  background: linear-gradient(145deg, #8298aa, var(--navy-dark));
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 800;
}

.certificate-entry > div:last-child { padding: 18px 18px 20px; }
.certificate-entry p { margin: 0 0 8px; color: var(--ink-muted); font-size: 0.65rem; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; }
.certificate-entry h3 { margin: 0 0 8px; font-family: var(--font-display); font-size: 1.05rem; line-height: 1.25; letter-spacing: -0.02em; }
.certificate-entry span { color: var(--ink-soft); font-size: 0.72rem; }

.certificate-card {
  position: absolute;
  inset: 7% 3%;
  border: 1px solid var(--line);
  border-radius: 20px;
  transition: transform var(--dur-slow) var(--ease-out), box-shadow var(--dur-slow) var(--ease-out);
}

.card-back { background: #9dafbd; transform: rotate(7deg); box-shadow: 0 10px 26px rgba(42, 49, 55, 0.1); }
.card-middle { background: #d4c7b5; transform: rotate(-4deg); box-shadow: 0 12px 30px rgba(42, 49, 55, 0.12); }
.card-front {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  text-align: center;
  background: linear-gradient(160deg, #fdfbf7, #f5f1e9);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 8px 18px rgba(42, 49, 55, 0.08),
    0 30px 64px rgba(42, 49, 55, 0.18);
}

.certificate-stack:hover .card-back { transform: rotate(10deg) translateY(-4px); }
.certificate-stack:hover .card-middle { transform: rotate(-7deg) translateY(-2px); }
.certificate-stack:hover .card-front { transform: translateY(-6px); }

.certificate-seal {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 25px;
  border: 1px solid var(--navy);
  border-radius: 50%;
  color: var(--navy-dark);
  box-shadow: 0 0 0 4px rgba(61, 86, 114, 0.07);
  font-family: var(--font-display);
  font-weight: 800;
}

.card-front p,
.card-front small { color: var(--ink-soft); font-size: 0.55rem; font-weight: 700; letter-spacing: 0.18em; }
.card-front h3 { margin: 12px 0 5px; font-family: Georgia, serif; font-size: 2rem; font-weight: 400; font-style: italic; letter-spacing: -0.02em; }
.card-front span { color: var(--ink-soft); font-size: 0.85rem; }
.certificate-line { flex: 0 0 auto; width: 120px; height: 1px; margin: 30px 0 12px; background: linear-gradient(90deg, transparent, var(--ink), transparent); }

.contact {
  position: relative;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 80px;
  align-items: end;
  margin: 0 24px 24px;
  padding: 96px 7%;
  overflow: hidden;
  border-radius: 28px;
  color: var(--white);
  background:
    radial-gradient(circle at 70% -20%, rgba(122, 157, 189, 0.5), transparent 35%),
    var(--ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.contact-copy,
.contact-actions { position: relative; z-index: 1; }

.eyebrow.light { color: rgba(255, 255, 255, 0.66); }
.eyebrow.light > span { background: #a9c4dc; box-shadow: 0 0 0 5px rgba(169, 196, 220, 0.14); }
.contact h2 { font-size: clamp(3rem, 6vw, 6rem); }
.contact-actions > p { max-width: 450px; margin-bottom: 28px; color: rgba(255, 255, 255, 0.68); line-height: 1.7; }

.button-light {
  color: var(--surface-forte);
  background: var(--white);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2), 0 14px 32px rgba(0, 0, 0, 0.28);
}

.button-light:hover { box-shadow: 0 4px 10px rgba(0, 0, 0, 0.22), 0 20px 44px rgba(0, 0, 0, 0.34); }
.button-light:hover > span[aria-hidden] { transform: translate(3px, -3px); }

.copy-email {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  margin-top: 28px;
  padding: 15px 0;
  border: 0;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: color var(--dur) var(--ease-out), border-color var(--dur) var(--ease-out);
}

.copy-email:hover { color: var(--ink); border-top-color: var(--line-strong, rgba(23, 32, 42, 0.28)); }

.copy-email span {
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.66;
  transition: opacity var(--dur) var(--ease-out);
}

.copy-email:hover span { opacity: 1; }

footer {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  gap: 20px;
  padding: 54px 4% 40px;
  color: var(--ink-soft);
  font-size: 0.75rem;
}

footer p { margin: 0; }
footer p:last-child { justify-self: end; }

.footer-meta {
  display: grid;
  gap: 6px;
  text-align: center;
}

.footer-meta p:last-child {
  color: var(--ink-soft);
  font-size: 0.68rem;
}

.footer-meta .footer-email,
.footer-meta #footerContactEmail {
  color: var(--ink);
  text-decoration: none;
  text-underline-offset: 0.2em;
  transition: color var(--dur) var(--ease-out);
}

.footer-meta .footer-email:hover,
.footer-meta #footerContactEmail:hover {
  text-decoration: underline;
  text-decoration-thickness: 1px;
}

.footer-brand {
  justify-self: start;
  padding: 0;
  border: 0;
  color: var(--ink);
  background: transparent;
  font-family: var(--font-display);
  font-size: 2.6rem;
  font-weight: 800;
  letter-spacing: -0.08em;
  line-height: 1;
  cursor: default;
  user-select: none;
  /* Sem isto o navegador do celular trata os toques repetidos como zoom de toque duplo e
     engole parte deles — o gatilho escondido só abria no computador. */
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  transition: opacity var(--dur) var(--ease-out);
}

.footer-brand:active { opacity: 0.5; }

/* Só o ® é sobrescrito: o span da marca é preenchido pelo app.js e precisa manter o tamanho grande. */
.footer-brand > span:not([data-site-brand]) { margin-left: 4px; font-size: 0.55rem; vertical-align: top; }

.admin-dialog {
  width: min(460px, calc(100% - 32px));
  max-height: calc(100vh - 32px);
  padding: 0;
  border: 0;
  border-radius: 24px;
  color: var(--ink);
  background: var(--paper);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.4);
  overflow: auto;
}

.admin-dialog::backdrop {
  background: rgba(10, 14, 17, 0.72);
  backdrop-filter: blur(8px);
}

.admin-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 38px;
}

.dialog-close {
  position: absolute;
  top: 16px;
  right: 17px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
}

.admin-icon {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  margin-bottom: 30px;
  border-radius: 14px;
  color: var(--white);
  background: var(--navy-dark);
  font-family: var(--font-display);
  font-weight: 800;
}

.admin-panel h2 { margin-bottom: 12px; font-size: 2rem; }
.admin-description { margin-bottom: 25px; color: var(--ink-soft); line-height: 1.55; }
.admin-panel label { margin: 13px 0 7px; font-size: 0.72rem; font-weight: 700; }
.admin-panel input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  outline: none;
  background: var(--white);
}

.admin-panel input:focus { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(61, 86, 114, 0.12); }
.admin-submit { width: 100%; margin-top: 22px; }
.admin-status { min-height: 22px; margin: 13px 0 0; color: var(--ink-soft); font-size: 0.75rem; text-align: center; }

.admin-settings-view {
  display: grid;
  gap: 20px;
}

.admin-settings-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.admin-settings-heading .eyebrow { margin-bottom: 10px; }
.admin-settings-heading h3 { margin: 0; font-size: 1.5rem; }
.admin-settings-heading > span {
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--ink-soft);
  background: var(--paper-2);
  font-size: 0.65rem;
  font-weight: 700;
}

.admin-fieldset {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 15px;
}

.admin-fieldset legend {
  padding: 0 7px;
  font-size: 0.72rem;
  font-weight: 700;
}

.admin-choice,
.admin-toggle {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 0;
  cursor: pointer;
}

.admin-choice span {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.admin-choice small { color: var(--ink-soft); }
.admin-choice input,
.admin-toggle input { width: auto; min-height: auto; }
.admin-toggle { justify-content: space-between; padding: 7px 0; }

.admin-upload {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 4px 12px;
  margin: 0;
  padding: 15px;
  border: 1px dashed var(--navy);
  border-radius: 15px;
  cursor: pointer;
}

.admin-upload span { color: var(--ink-soft); font-size: 0.7rem; }
.admin-upload input { grid-column: 1 / -1; padding: 8px; }

.toast {
  position: fixed;
  right: 28px;
  bottom: 28px;
  z-index: 50;
  max-width: min(360px, calc(100vw - 56px));
  padding: 13px 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: var(--surface-forte-texto);
  background: var(--surface-forte);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2), 0 18px 40px rgba(0, 0, 0, 0.32);
  font-size: 0.88rem;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px) scale(0.98);
  transition: opacity var(--dur) var(--ease-out), transform var(--dur) var(--ease-spring);
}

.toast.show { opacity: 1; transform: translateY(0) scale(1); }

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

.reveal-delay { transition-delay: 0.12s; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* A "vazada": o HTML entregue pelo servidor traz um conteúdo padrão em português
   que o app.js troca assim que a configuração publicada chega. Enquanto isso não
   acontece, `boot.js` mantém `data-boot="pending"` no documento e o que vai ser
   substituído fica invisível — mas continua ocupando o mesmo espaço.

   `visibility` e não `display`: o elemento some da tela sem sair do fluxo, então
   a revelação não empurra nada. E como a configuração já foi aplicada antes de
   revelar, as seções que o painel escondeu nunca chegam a aparecer.

   O fundo, a moldura, a marca, o botão de tema e o seletor de idioma não levam a
   marca: eles não dependem de rede nenhuma e seguem visíveis o tempo todo. */
:root[data-boot="pending"] [data-boot-swap] {
  visibility: hidden;
}

/* Só opacidade — transformar ou animar altura reintroduziria o deslocamento que
   este bloco existe para evitar. */
@keyframes nspx-revelar {
  from { opacity: 0; }
  to { opacity: 1; }
}

:root[data-boot="ready"] [data-boot-swap] {
  animation: nspx-revelar 0.24s var(--ease-out) both;
}

/* Quem pediu menos movimento recebe o conteúdo direto, sem o fade. O bloco geral
   de `prefers-reduced-motion` mais abaixo já reduz a duração, mas declarar aqui
   deixa a intenção explícita em vez de depender de um efeito colateral. */
@media (prefers-reduced-motion: reduce) {
  :root[data-boot="ready"] [data-boot-swap] { animation: none; }
}

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

@media (max-width: 1050px) {
  body { padding: 0; }
  html { scroll-padding-top: 116px; }
  .topbar { grid-template-columns: auto 1fr auto; width: calc(100% - 30px); margin: 15px; }
  .hero { grid-template-columns: 1fr; min-height: 0; padding: 96px 6% 84px; }
  .hero-art { min-height: 600px; }
  .profile-card { width: min(390px, 62%); }
  .projects, .notes-section, .certificates { padding: 88px 6%; }
  .section-heading { gap: 40px; margin-bottom: 44px; }
  .certificates { grid-template-columns: 1fr; gap: 56px; min-height: 0; }
  .certificate-stack { min-height: 430px; }
  .contact { padding: 84px 6%; }
}

/* Abaixo disso duas colunas deixam a prévia quase quadrada; uma coluna respira melhor. */
@media (max-width: 860px) {
  .project-grid { grid-template-columns: 1fr; }
  .project-card-featured { grid-column: auto; }
  .notes-preview-grid { grid-template-columns: 1fr; }
  .notes-preview-featured { grid-column: auto; }
  .notes-request { grid-template-columns: 1fr; gap: 32px; }
}

@media (max-width: 760px) {
  body { padding: 0; background: var(--paper); }
  /* A barra de cima vira duas linhas aqui (marca e abas). Se a folga for menor que ela,
     clicar numa aba leva o título para debaixo da própria barra. */
  html { scroll-padding-top: 150px; }
  .page-frame { border: 0; border-radius: 0; box-shadow: none; }
  .topbar {
    top: 8px;
    grid-template-columns: auto 1fr;
    gap: 10px;
    width: calc(100% - 20px);
    margin: 10px;
    padding: 9px 10px 9px 13px;
    /* Quase opaca no celular. A 0.82 os chips de filtro passando por baixo
       ficavam legíveis através do vidro e a barra parecia ter duas camadas de
       conteúdo — e o Safari do iPhone borra menos do que o Chrome, então lá
       ficava pior ainda. O material continua sendo vidro; só para de competir
       com o que passa atrás. */
    background: rgba(244, 247, 250, 0.94);
    backdrop-filter: blur(26px) saturate(140%);
    -webkit-backdrop-filter: blur(26px) saturate(140%);
  }
  :root[data-theme="dark"] .topbar { background: rgba(10, 14, 19, 0.94); }
  .nav-pills { grid-column: 1 / -1; grid-row: 2; justify-content: center; overflow-x: auto; }
  .nav-link { flex: 1 0 auto; padding: 9px 12px; text-align: center; }
  /* Só a seta permanece: o rótulo é apagado pelo font-size herdado. */
  .contact-pill { padding: 10px 14px; gap: 0; font-size: 0; }
  .contact-pill span[aria-hidden] { font-size: 1rem; }
  .topbar-end { gap: 8px; }
  .theme-toggle { width: 42px; height: 42px; }
  .lang-switch { padding: 2px; }
  /* Trocar de idioma é botão de dedo, não de ponteiro: abaixo disso erra o alvo. */
  .lang-switch button { min-width: 42px; min-height: 38px; padding: 6px 10px; font-size: 0.66rem; }
  .nav-pills, .project-actions, .hero-tags { -webkit-overflow-scrolling: touch; }
  .nav-link, .project-action, .button, .contact-pill, .theme-toggle { touch-action: manipulation; }
  .hero { min-height: auto; padding: 90px 24px 68px; }
  h1 { margin-bottom: 24px; font-size: clamp(3.15rem, 15vw, 5.4rem); }
  .eyebrow { margin-bottom: 20px; }
  .hero-description { margin-bottom: 30px; font-size: 1rem; }
  .hero-actions { align-items: stretch; flex-direction: column; gap: 16px; }
  .hero-actions .button { width: 100%; }
  .hero-actions .text-link { align-self: flex-start; }
  .hero-stats { gap: 18px; justify-content: space-between; margin-top: 46px; padding-top: 24px; }
  .hero-stats div { grid-template-columns: 1fr; gap: 4px; }
  .hero-stats dd { max-width: none; }
  .hero-art { min-height: 470px; margin-top: 20px; }
  .profile-card { width: 74%; }
  .orbit-one { width: 390px; height: 390px; }
  .orbit-two { width: 290px; height: 290px; }
  .code-card { right: -8%; width: 190px; }
  .tag-two { right: -3%; }
  .projects, .notes-section, .certificates { padding: 76px 20px; }
  .section-heading { grid-template-columns: 1fr; gap: 20px; margin-bottom: 34px; }
  .project-grid { grid-template-columns: 1fr; gap: 18px; }
  .project-info { padding: 22px 10px 14px; }
  .project-notice { margin: 0 10px 12px; }
  .project-meta { padding: 0 10px 12px; }
  .project-actions { padding: 0 10px 12px; }
  .project-action { flex: 1 1 auto; justify-content: center; gap: 12px; }
  .notes-preview-card, .notes-preview-featured { min-height: 330px; padding: 24px; }
  .notes-request { padding: 26px; }
  .certificate-stack { min-height: 340px; }
  .certificate-stack.certificate-gallery { grid-template-columns: 1fr; min-height: 0; }
  .certificate-card { inset: 4%; }
  .card-front { padding: 20px; }
  .contact { grid-template-columns: 1fr; gap: 40px; margin: 0 10px 10px; padding: 72px 24px; }
  .contact-actions .button { width: 100%; }
  footer { grid-template-columns: 1fr; padding: 44px 24px 36px; text-align: left; }
  .footer-meta { text-align: left; }
  footer p:last-child { justify-self: start; }
  .toast { right: 14px; left: 14px; bottom: 14px; max-width: none; }
}

@media (max-width: 430px) {
  h1 { font-size: clamp(2.85rem, 13.6vw, 5.4rem); }
  .hero { padding: 86px 20px 60px; }
  .projects, .notes-section, .certificates { padding: 66px 16px; }
  .contact { padding: 64px 20px; }
  .hero-stats { flex-direction: column; gap: 20px; }
  .hero-stats div { grid-template-columns: auto 1fr; align-items: center; gap: 12px; }
  .hero-stats dd { max-width: 160px; }
  .profile-card { width: 82%; }
  .floating-tag { padding: 8px 12px; font-size: 0.58rem; }
  .certificate-card { inset: 8% 1%; }
  .card-front h3 { font-size: 1.55rem; }
  .project-info { gap: 14px; }
  .project-info h3 { font-size: 1.45rem; }
  .preview-live > span { right: 10px; bottom: 10px; padding: 5px 8px; font-size: 0.5rem; letter-spacing: 0.08em; }
}

/* ==========================================================================
   Dark Theme Component Adjustments (:root[data-theme="dark"])
   ========================================================================== */

:root[data-theme="dark"] .hero::before {
  background-image:
    radial-gradient(120% 90% at 78% 8%, rgba(82, 121, 163, 0.15), transparent 60%),
    radial-gradient(90% 70% at 0% 100%, rgba(55, 83, 117, 0.12), transparent 62%);
}

:root[data-theme="dark"] .topbar {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(21, 27, 34, 0.75);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    inset 0 -1px 0 rgba(0, 0, 0, 0.4),
    0 2px 6px rgba(0, 0, 0, 0.3),
    0 14px 38px rgba(0, 0, 0, 0.4);
}

:root[data-theme="dark"] .topbar::after {
  background: linear-gradient(
    160deg,
    rgba(255, 255, 255, 0.15) 0%,
    rgba(255, 255, 255, 0.04) 28%,
    transparent 55%
  );
}

:root[data-theme="dark"] .nav-pills {
  background: rgba(255, 255, 255, 0.06);
  box-shadow:
    inset 0 1px 2px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

:root[data-theme="dark"] .nav-link:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.12);
}

:root[data-theme="dark"] .lang-switch,
:root[data-theme="dark"] .theme-toggle {
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
}

:root[data-theme="dark"] .button-light {
  color: var(--surface-forte-texto) !important;
}

:root[data-theme="dark"] .lang-switch button:hover:not([aria-pressed="true"]),
:root[data-theme="dark"] .theme-toggle:hover {
  color: var(--ink);
  background: var(--paper);
}

:root[data-theme="dark"] .hero-stack b {
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink);
}

:root[data-theme="dark"] .hero-stack b:hover {
  background: rgba(255, 255, 255, 0.16);
}

:root[data-theme="dark"] .profile-card {
  background:
    linear-gradient(145deg, rgba(117, 150, 181, 0.28), transparent 40%),
    #131a23;
}

:root[data-theme="dark"] .orbit {
  border-color: rgba(128, 157, 184, 0.22);
}

:root[data-theme="dark"] .floating-tag {
  background: rgba(26, 34, 44, 0.75);
  border-color: rgba(255, 255, 255, 0.15);
  color: var(--ink-soft);
}

:root[data-theme="dark"] .project-filter-btn {
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink-soft);
}

:root[data-theme="dark"] .project-filter-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  color: var(--ink);
}

:root[data-theme="dark"] .project-card {
  background: rgba(26, 34, 44, 0.65);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

:root[data-theme="dark"] .project-card:hover {
  background: rgba(32, 42, 54, 0.85);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}

:root[data-theme="dark"] .preview-phone {
  background: #0e1318;
  border-color: rgba(255, 255, 255, 0.7);
}

:root[data-theme="dark"] .project-action {
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink);
}

:root[data-theme="dark"] .project-action:hover {
  background: rgba(255, 255, 255, 0.16);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

:root[data-theme="dark"] .preview-generic {
  color: var(--ink);
  background:
    radial-gradient(circle at 84% 18%, rgba(82, 121, 163, 0.18), transparent 35%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.05), rgba(0, 0, 0, 0.25)),
    var(--paper-2);
}

:root[data-theme="dark"] .preview-generic[data-preview-variant="1"] {
  background:
    radial-gradient(circle at 18% 78%, rgba(82, 121, 163, 0.16), transparent 35%),
    linear-gradient(210deg, rgba(255, 255, 255, 0.06), rgba(0, 0, 0, 0.28)),
    var(--paper-2);
}

:root[data-theme="dark"] .preview-generic[data-preview-variant="2"] {
  background:
    radial-gradient(circle at 78% 82%, rgba(55, 83, 117, 0.15), transparent 32%),
    linear-gradient(60deg, rgba(255, 255, 255, 0.05), rgba(0, 0, 0, 0.25)),
    var(--paper);
}

:root[data-theme="dark"] .preview-generic[data-preview-variant="3"] {
  background:
    radial-gradient(circle at 20% 20%, rgba(82, 121, 163, 0.18), transparent 34%),
    linear-gradient(320deg, rgba(255, 255, 255, 0.06), rgba(0, 0, 0, 0.26)),
    var(--paper-2);
}

:root[data-theme="dark"] .preview-generic .preview-badge {
  color: var(--ink-soft);
  border-color: var(--line);
  background: rgba(16, 22, 29, 0.75);
}

:root[data-theme="dark"] .empty-projects {
  background: rgba(255, 255, 255, 0.04);
}

:root[data-theme="dark"] .certificate-entry {
  background: rgba(26, 34, 44, 0.65);
}

:root[data-theme="dark"] .certificate-entry-link:hover .certificate-entry {
  background: rgba(32, 42, 54, 0.85);
}

:root[data-theme="dark"] .card-front {
  background: linear-gradient(160deg, #1c2633, #131b24);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 8px 18px rgba(0, 0, 0, 0.35),
    0 30px 64px rgba(0, 0, 0, 0.55);
}

:root[data-theme="dark"] .card-middle {
  background: #293646;
}

:root[data-theme="dark"] .card-back {
  background: #1d2734;
}

:root[data-theme="dark"] .card-front h3 {
  color: var(--ink);
}

:root[data-theme="dark"] .card-front p,
:root[data-theme="dark"] .card-front small,
:root[data-theme="dark"] .card-front span {
  color: var(--ink-soft);
}

:root[data-theme="dark"] .certificate-seal {
  border-color: var(--navy);
  color: var(--ink);
  box-shadow: 0 0 0 4px rgba(82, 121, 163, 0.2);
}

:root[data-theme="dark"] .certificate-line {
  background: linear-gradient(90deg, transparent, var(--line-strong), transparent);
}

:root[data-theme="dark"] .contact {
  background:
    radial-gradient(circle at 70% -20%, rgba(122, 157, 189, 0.35), transparent 35%),
    #131a23;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

:root[data-theme="dark"] .admin-dialog {
  background: #131a23;
  color: var(--ink);
  border: 1px solid var(--line);
}

:root[data-theme="dark"] .admin-panel input {
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
  border-color: var(--line);
}

:root[data-theme="dark"] .dialog-close {
  color: var(--ink);
  border-color: var(--line);
}

/* A seção de Notes na página principal.
   Ela entrou depois do resto e ficou sem a versão escura que todo card daqui tem,
   então continuava com fundo branco cravado enquanto `--ink` virava quase branco:
   texto branco sobre card branco, 1,11:1 medido. O tom segue o `.project-card`,
   que é o card vizinho na mesma página. */
:root[data-theme="dark"] .notes-preview-card:not(.notes-preview-featured) {
  background: rgba(26, 34, 44, 0.65);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

:root[data-theme="dark"] .notes-preview-card:not(.notes-preview-featured):hover {
  background: rgba(32, 42, 54, 0.85);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}

:root[data-theme="dark"] .notes-request {
  background: rgba(26, 34, 44, 0.55);
}

/* O campo do formulário tinha o mesmo problema, e pior: quem digitasse não veria
   o que escreveu. */
:root[data-theme="dark"] .notes-request-form input,
:root[data-theme="dark"] .notes-request-form textarea {
  background: rgba(14, 19, 24, 0.75);
  color: var(--ink);
}

:root[data-theme="dark"] .notes-request-form input::placeholder,
:root[data-theme="dark"] .notes-request-form textarea::placeholder {
  color: var(--ink-muted);
}

:root[data-theme="dark"] .skip-link {
  background: #1f2a37;
  color: var(--ink);
  border: 1px solid var(--line);
}

/* ==========================================================================
   NSPX / 2026 — direção cinematográfica

   A referência usa WebGL, Rive e uma pilha grande de animação. Aqui a mesma
   linguagem entra com transformações nativas: fica expressiva sem obrigar um
   portfólio a baixar um motor gráfico antes de mostrar os projetos.
   ========================================================================== */

:root {
  --signal: #7ca7d8;
  --signal-bright: #a9cfff;
  --night: #080c11;
  --night-2: #0e151d;
  --hero-x: 0px;
  --hero-y: 0px;
}

body.menu-open { overflow: hidden; }

.topbar {
  position: fixed;
  top: 18px;
  left: 50%;
  z-index: 40;
  grid-template-columns: 1fr auto 1fr;
  width: calc(100% - 36px);
  max-width: 1540px;
  min-height: 66px;
  margin: 0;
  padding: 9px 10px 9px 18px;
  border-color: rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  color: #f5f8fb;
  background: rgba(8, 12, 17, 0.72);
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(22px) saturate(145%);
  -webkit-backdrop-filter: blur(22px) saturate(145%);
  transform: translateX(-50%);
}

.topbar::after {
  z-index: 0;
  border-radius: inherit;
  background: linear-gradient(110deg, rgba(255, 255, 255, 0.1), transparent 28%, transparent 74%, rgba(124, 167, 216, 0.08));
}

.topbar > *:not(.scroll-progress) { position: relative; z-index: 1; }
.topbar .brand { color: #f5f8fb; }

.nav-location {
  display: flex;
  align-items: center;
  gap: 7px;
  color: rgba(255, 255, 255, 0.42);
  font: 700 0.62rem/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.nav-location strong { color: rgba(255, 255, 255, 0.88); font-weight: 700; }

.topbar-end { gap: 7px; }
.topbar .theme-toggle,
.topbar .lang-switch { background: rgba(255, 255, 255, 0.07); box-shadow: none; }
.topbar .theme-toggle { color: rgba(255, 255, 255, 0.68); }
.topbar .theme-toggle:hover { color: white; background: rgba(255, 255, 255, 0.14); }
.topbar .lang-switch button { color: rgba(255, 255, 255, 0.55); background: transparent; }
.topbar .lang-switch button[aria-pressed="true"] { color: #091018; background: #eef4fb; box-shadow: none; }
.topbar .contact-pill { min-height: 42px; padding: 0 17px; color: #081018; background: var(--signal-bright); box-shadow: none; }

.menu-toggle {
  position: relative;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 12px;
  color: white;
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
  transition: background var(--dur) var(--ease-out), transform var(--dur) var(--ease-spring);
}

.menu-toggle:hover { background: rgba(255, 255, 255, 0.14); transform: rotate(2deg); }
.menu-toggle span {
  position: absolute;
  width: 18px;
  height: 1px;
  border-radius: 99px;
  background: currentColor;
  transition: transform 0.45s var(--ease-spring), width 0.3s var(--ease-out);
}
.menu-toggle span:first-child { transform: translateY(-4px); }
.menu-toggle span:last-child { width: 12px; transform: translate(3px, 4px); }
.menu-open .menu-toggle span:first-child { transform: rotate(45deg); }
.menu-open .menu-toggle span:last-child { width: 18px; transform: rotate(-45deg); }

.scroll-progress {
  position: absolute;
  right: 12px;
  bottom: -1px;
  left: 12px;
  z-index: 2;
  height: 1px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.06);
}
.scroll-progress i { display: block; width: 100%; height: 100%; background: var(--signal-bright); transform: scaleX(0); transform-origin: left; }

.site-menu {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: minmax(360px, 0.92fr) minmax(500px, 1.08fr);
  color: #f4f7fa;
  background: #080c11;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-18px);
  transition: opacity 0.42s var(--ease-out), visibility 0.42s, transform 0.55s var(--ease-out);
}
.menu-open .site-menu { opacity: 1; visibility: visible; pointer-events: auto; transform: none; }

.menu-gallery {
  position: relative;
  overflow: hidden;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  background:
    radial-gradient(circle at 15% 15%, rgba(124, 167, 216, 0.24), transparent 35%),
    #0c131b;
}
.menu-gallery::after { position: absolute; inset: 0; content: ""; background: linear-gradient(180deg, transparent 55%, rgba(5, 8, 12, 0.78)); pointer-events: none; }
.menu-shot { position: absolute; margin: 0; overflow: hidden; border: 1px solid rgba(255, 255, 255, 0.17); background: #111923; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.42); }
.menu-shot img { width: 100%; height: 100%; object-fit: cover; }
.menu-shot figcaption { position: absolute; right: 14px; bottom: 12px; left: 14px; color: rgba(255, 255, 255, 0.74); font: 700 0.58rem ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 0.11em; }
.menu-shot-main { inset: 14% 11% 22% 8%; transform: rotate(-3deg); }
.menu-shot-side { right: -8%; bottom: 8%; z-index: 2; width: 44%; aspect-ratio: 0.8; transform: rotate(7deg); }
.menu-gallery > p { position: absolute; left: 8%; bottom: 8%; z-index: 3; display: flex; align-items: center; gap: 10px; margin: 0; font: 700 0.62rem ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 0.12em; }
.menu-gallery > p span { width: 7px; height: 7px; border-radius: 50%; background: #80d79c; box-shadow: 0 0 0 5px rgba(128, 215, 156, 0.12); }

.menu-content { display: flex; min-height: 100vh; flex-direction: column; padding: 130px clamp(36px, 6vw, 96px) 44px; }
.menu-kicker { margin: 0 0 5vh; color: rgba(255, 255, 255, 0.38); font: 700 0.66rem ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 0.14em; }
.nav-pills { display: grid; gap: 0; padding: 0; border-radius: 0; background: transparent; box-shadow: none; }
.nav-link {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 11px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0;
  color: rgba(255, 255, 255, 0.72);
  font: 700 clamp(2.6rem, 5.7vw, 6.4rem)/0.98 var(--font-display);
  letter-spacing: -0.07em;
}
.nav-link:first-child { border-top: 1px solid rgba(255, 255, 255, 0.12); }
.nav-link small { align-self: start; padding-top: 9px; color: rgba(255, 255, 255, 0.34); font: 700 0.58rem ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 0.1em; }
.nav-link i { font-size: 0.25em; font-style: normal; opacity: 0; transform: translate(-12px, -12px); transition: opacity var(--dur) var(--ease-out), transform var(--dur) var(--ease-spring); }
.nav-link:hover,
.nav-link.active { color: white; background: transparent; box-shadow: none; }
.nav-link:hover i,
.nav-link.active i { opacity: 1; transform: none; }
.nav-link span { transition: transform var(--dur-slow) var(--ease-out); }
.nav-link:hover span { transform: translateX(12px); }
.menu-foot { display: flex; justify-content: space-between; gap: 24px; margin-top: auto; padding-top: 28px; color: rgba(255, 255, 255, 0.52); font: 700 0.68rem ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 0.08em; }
.menu-foot a:hover { color: white; }

.hero {
  grid-template-columns: minmax(0, 0.92fr) minmax(500px, 1.08fr);
  align-items: center;
  min-height: 100svh;
  padding: 148px max(6vw, 48px) 88px;
  color: #f2f6fa;
  background: var(--night);
}
.hero::before {
  background:
    radial-gradient(60% 65% at 75% 46%, rgba(67, 106, 149, 0.28), transparent 64%),
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: auto, 80px 80px, 80px 80px;
  mask-image: linear-gradient(to bottom, black, transparent 96%);
}
.hero::after { position: absolute; right: 4vw; bottom: 34px; content: "NSPX / 2026"; color: rgba(255, 255, 255, 0.28); font: 700 0.58rem ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 0.12em; }
.hero-copy { z-index: 5; }
.hero .eyebrow { color: rgba(255, 255, 255, 0.52); }
.hero .eyebrow > span { background: var(--signal-bright); box-shadow: 0 0 0 5px rgba(169, 207, 255, 0.12); }
.hero h1 { position: relative; z-index: 5; max-width: 900px; margin: 0 0 34px; font-size: clamp(4.2rem, 7.4vw, 8.8rem); line-height: 0.88; letter-spacing: -0.085em; }
.hero h1 > span,
.hero h1 > em { display: block; }
.hero h1 em { color: var(--signal); font-family: var(--font-display); font-weight: 500; font-style: normal; letter-spacing: -0.075em; }
.hero-description { max-width: 520px; color: rgba(235, 242, 249, 0.58); font-size: 1.03rem; line-height: 1.65; }
.hero .button-primary { color: #071019; background: var(--signal-bright); box-shadow: 0 16px 42px rgba(59, 105, 158, 0.24); }
.hero .text-link { color: rgba(255, 255, 255, 0.78); border-color: rgba(255, 255, 255, 0.22); }
.hero-stack span,
.hero-stack b { border-color: rgba(255, 255, 255, 0.12); }
.hero-stack span { color: rgba(255, 255, 255, 0.38); }
.hero-stack b,
:root[data-theme="dark"] .hero-stack b { color: rgba(255, 255, 255, 0.74); background: rgba(255, 255, 255, 0.05); box-shadow: none; }
.hero-stats { border-color: rgba(255, 255, 255, 0.12); }
.hero-stats dd { color: rgba(255, 255, 255, 0.45); }

.hero.hero-minimal { grid-template-columns: minmax(0, 0.92fr) minmax(500px, 1.08fr); }
.hero.hero-minimal .hero-copy { max-width: none; }
.hero-art { min-height: min(68vw, 720px); perspective: 1400px; }
.hero-art::before { width: 90%; height: 80%; background: radial-gradient(circle, rgba(93, 142, 194, 0.22), transparent 68%); filter: blur(42px); }
.hero-reel { position: absolute; inset: 0; transform: translate3d(var(--hero-x), var(--hero-y), 0); transition: transform 0.45s var(--ease-out); transform-style: preserve-3d; }
.hero-reel-card { position: absolute; margin: 0; overflow: hidden; border: 1px solid rgba(255, 255, 255, 0.16); border-radius: 18px; background: #111923; box-shadow: 0 35px 90px rgba(0, 0, 0, 0.52); transition: transform 0.7s var(--ease-out), filter 0.7s var(--ease-out); }
.hero-reel-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.9s var(--ease-out); }
.hero-reel-card::after { position: absolute; inset: 0; content: ""; background: linear-gradient(180deg, transparent 58%, rgba(4, 7, 10, 0.84)); pointer-events: none; }
.hero-reel-card figcaption { position: absolute; right: 18px; bottom: 15px; left: 18px; z-index: 2; display: flex; justify-content: space-between; gap: 16px; color: rgba(255, 255, 255, 0.72); font: 700 0.56rem ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 0.1em; }
.hero-reel-card figcaption b { color: var(--signal-bright); font: inherit; }
.hero-reel-main { top: 16%; right: 2%; width: 79%; aspect-ratio: 16 / 10; transform: rotate(2.5deg) translateZ(10px); }
.hero-reel-top { top: 0; left: 0; z-index: 2; width: 45%; aspect-ratio: 16 / 10; transform: rotate(-7deg) translateZ(80px); }
.hero-reel-bottom { right: -5%; bottom: 1%; z-index: 3; width: 47%; aspect-ratio: 16 / 10; transform: rotate(7deg) translateZ(130px); }
.hero-art:hover .hero-reel-main { transform: rotate(1deg) translateY(-6px) translateZ(10px); }
.hero-art:hover .hero-reel-top { transform: rotate(-4deg) translate(-6px, -10px) translateZ(80px); }
.hero-art:hover .hero-reel-bottom { transform: rotate(4deg) translate(4px, -12px) translateZ(130px); }
.hero-art:hover .hero-reel-card img { transform: scale(1.035); }
.hero-reel-orbit { position: absolute; left: 2%; bottom: 8%; z-index: 4; display: grid; place-items: center; width: 96px; height: 96px; border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 50%; color: rgba(255, 255, 255, 0.6); background: rgba(8, 12, 17, 0.72); backdrop-filter: blur(14px); animation: orbit-spin 18s linear infinite; }
.hero-reel-orbit::before { position: absolute; inset: 8px; border: 1px dashed rgba(169, 207, 255, 0.46); border-radius: 50%; content: ""; }
.hero-reel-orbit span { font: 800 0.7rem var(--font-display); letter-spacing: -0.03em; }
.hero-art.photo-mode .hero-reel { display: none; }
.hero-photo { border-color: rgba(255, 255, 255, 0.12); border-radius: 18px; }

.signal-marquee { overflow: hidden; padding: 16px 0; border-top: 1px solid rgba(255, 255, 255, 0.1); border-bottom: 1px solid rgba(255, 255, 255, 0.1); color: #d9e7f6; background: #0b1118; }
.signal-track { display: flex; width: max-content; align-items: center; gap: 28px; animation: signal-run 30s linear infinite; }
.signal-track span { font: 700 clamp(0.76rem, 1vw, 0.98rem) ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 0.13em; }
.signal-track i { width: 7px; height: 7px; border-radius: 50%; background: var(--signal); box-shadow: 0 0 0 5px rgba(124, 167, 216, 0.1); }
@keyframes signal-run { to { transform: translateX(-50%); } }

.projects,
.notes-section,
.certificates { padding-right: max(6vw, 48px); padding-left: max(6vw, 48px); }
.projects { padding-top: 132px; padding-bottom: 132px; }
.section-heading { grid-template-columns: 1.1fr 0.55fr; margin-bottom: 64px; }
.section-heading h2,
.certificate-intro h2 { font-size: clamp(3.4rem, 6.8vw, 7.8rem); line-height: 0.9; }
.section-heading > p { max-width: 480px; }
.project-grid { gap: 18px; }
.project-card { padding: 10px; border-radius: 18px; background: rgba(255, 255, 255, 0.58); }
.project-card:first-child { grid-column: 1 / -1; }
.project-card:first-child .project-preview { aspect-ratio: 21 / 9; }
.project-preview { border-radius: 12px; }
.project-preview::after { border-radius: 12px; }
.project-info { padding-top: 23px; }
.project-info h3 { font-size: clamp(1.65rem, 2.4vw, 2.7rem); }
.project-card:first-child .project-info h3 { font-size: clamp(2.2rem, 4.2vw, 4.5rem); }
:root[data-theme="dark"] .projects { background: #0d131a; }
:root[data-theme="dark"] .project-card { border-color: rgba(255, 255, 255, 0.09); background: rgba(20, 29, 39, 0.78); }
:root[data-theme="dark"] .project-card:hover { border-color: rgba(169, 207, 255, 0.28); background: rgba(24, 35, 47, 0.94); }

.notes-section { padding-top: 132px; padding-bottom: 132px; }
.notes-preview-card { border-radius: 18px; box-shadow: none; }
.notes-preview-featured { color: white; background: linear-gradient(135deg, #17283b, #2c5077 60%, #172231); }
.notes-preview-featured::after { position: absolute; right: -12%; bottom: -48%; width: 55%; aspect-ratio: 1; border: 1px solid rgba(255, 255, 255, 0.15); border-radius: 50%; content: ""; box-shadow: 0 0 0 60px rgba(255, 255, 255, 0.025), 0 0 0 120px rgba(255, 255, 255, 0.018); }
.notes-preview-card h3 { position: relative; z-index: 1; }
.notes-request { border-radius: 18px; }

.contact { min-height: 72vh; margin: 0 18px 18px; border-radius: 22px; background: radial-gradient(circle at 75% 0%, rgba(102, 155, 211, 0.5), transparent 38%), #0b1118; }
:root[data-theme="dark"] .contact { background: radial-gradient(circle at 75% 0%, rgba(102, 155, 211, 0.46), transparent 38%), #0b1118; }
.contact h2 { font-size: clamp(4rem, 8.8vw, 10rem); line-height: 0.86; }

@media (max-width: 1120px) {
  .hero,
  .hero.hero-minimal { grid-template-columns: minmax(0, 0.88fr) minmax(430px, 1.12fr); padding-right: 5vw; padding-left: 5vw; }
  .hero h1 { font-size: clamp(4rem, 7.2vw, 7rem); }
  .hero-art { min-height: 610px; }
  .site-menu { grid-template-columns: 0.8fr 1.2fr; }
}

@media (max-width: 900px) {
  html { scroll-padding-top: 98px; }
  .topbar { top: 10px; grid-template-columns: 1fr auto; width: calc(100% - 20px); min-height: 62px; padding-left: 14px; }
  .nav-location { display: none; }
  .topbar-end { grid-column: 2; grid-row: 1; }
  .site-menu { grid-template-columns: 1fr; }
  .menu-gallery { display: none; }
  .menu-content { padding: 110px 28px 30px; }
  .nav-link { font-size: clamp(2.8rem, 10vw, 5.6rem); }
  .hero,
  .hero.hero-minimal { grid-template-columns: 1fr; min-height: 0; padding: 154px 28px 86px; }
  .hero h1 { font-size: clamp(4.3rem, 13.4vw, 7.8rem); }
  .hero-art { min-height: min(82vw, 650px); margin-top: 60px; }
  .projects,
  .notes-section,
  .certificates { padding: 96px 28px; }
  .project-card:first-child { grid-column: auto; }
  .project-card:first-child .project-preview { aspect-ratio: 16 / 9; }
  .section-heading { grid-template-columns: 1fr; gap: 24px; }
  .contact { min-height: 0; }
}

@media (max-width: 600px) {
  .topbar .contact-pill { display: none; }
  .topbar .theme-toggle { width: 40px; height: 40px; }
  .topbar .lang-switch button { min-width: 35px; min-height: 34px; padding: 5px 7px; }
  .menu-toggle { width: 42px; height: 42px; }
  .menu-content { padding-right: 20px; padding-left: 20px; }
  .menu-kicker { margin-bottom: 3vh; }
  .nav-link { grid-template-columns: 28px 1fr auto; gap: 8px; padding: 14px 0; font-size: clamp(2.65rem, 12vw, 4rem); }
  .nav-link small { padding-top: 5px; font-size: 0.5rem; }
  .menu-foot { flex-direction: column; gap: 10px; }
  .hero,
  .hero.hero-minimal { padding: 132px 20px 68px; }
  .hero h1 { font-size: clamp(3.65rem, 17vw, 6rem); }
  .hero-description { font-size: 0.96rem; }
  .hero-art { min-height: 108vw; margin-top: 44px; }
  .hero-reel-main { top: 18%; right: 0; width: 91%; }
  .hero-reel-top { width: 55%; }
  .hero-reel-bottom { right: -4%; width: 58%; }
  .hero-reel-orbit { left: 0; bottom: 2%; width: 76px; height: 76px; }
  .hero-stats { flex-direction: row; }
  .projects,
  .notes-section,
  .certificates { padding: 82px 16px; }
  .section-heading h2,
  .certificate-intro h2 { font-size: clamp(3.2rem, 15vw, 5.5rem); }
  .project-card { padding: 7px; }
  .notes-request { padding: 22px; }
  .contact { margin: 0 10px 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .signal-track,
  .hero-reel-orbit { animation: none; }
  .hero-reel { transform: none !important; }
}

/* ==========================================================================
   Navegação e temas — a moldura inteira responde ao tema, não só os cartões.
   ========================================================================== */

:root {
  color-scheme: light;
  --chrome-bg: rgba(239, 244, 248, 0.82);
  --chrome-line: rgba(17, 31, 45, 0.12);
  --chrome-text: #14202c;
  --chrome-muted: rgba(20, 32, 44, 0.56);
  --chrome-hover: rgba(20, 32, 44, 0.07);
  --hero-surface: #edf2f6;
  --hero-surface-2: #dfe9f1;
  --hero-ink: #111c27;
  --hero-copy-muted: rgba(17, 28, 39, 0.64);
  --menu-surface: #e8eef3;
  --menu-surface-2: #dbe6ef;
  --menu-ink: #111c27;
  --menu-muted: rgba(17, 28, 39, 0.5);
  --end-surface: #dfe9f1;
  --end-ink: #111c27;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --chrome-bg: rgba(8, 12, 17, 0.78);
  --chrome-line: rgba(255, 255, 255, 0.12);
  --chrome-text: #f5f8fb;
  --chrome-muted: rgba(255, 255, 255, 0.5);
  --chrome-hover: rgba(255, 255, 255, 0.09);
  --hero-surface: #080c11;
  --hero-surface-2: #0e151d;
  --hero-ink: #f2f6fa;
  --hero-copy-muted: rgba(235, 242, 249, 0.62);
  --menu-surface: #080c11;
  --menu-surface-2: #0c131b;
  --menu-ink: #f4f7fa;
  --menu-muted: rgba(255, 255, 255, 0.46);
  --end-surface: #0b1118;
  --end-ink: #f4f7fa;
}

.topbar {
  grid-template-columns: auto minmax(0, 1fr) auto;
  color: var(--chrome-text);
  border-color: var(--chrome-line);
  background: var(--chrome-bg);
  box-shadow: 0 18px 55px rgba(9, 15, 22, 0.16);
}

.topbar::after {
  background: linear-gradient(110deg, rgba(255, 255, 255, 0.16), transparent 28%, transparent 74%, rgba(124, 167, 216, 0.1));
}

.topbar .brand { color: var(--chrome-text); }
.brand-mark {
  display: block;
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 11px;
  color: var(--chrome-text);
  background: transparent;
}
:root[data-theme="light"] .topbar .brand-mark,
:root[data-theme="dark"] .topbar .brand-mark {
  color: var(--chrome-text);
  background: transparent;
}
.brand-mark svg { display: block; width: 100%; height: 100%; overflow: visible; }
.brand-mark path { fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; }
.brand-mark .brand-letter { stroke-width: 3.2; }
.brand-mark .brand-orbit { stroke: var(--signal); stroke-width: 1.6; opacity: 0.8; }
.brand-mark circle { fill: var(--signal-bright); }
.brand:hover .brand-mark { transform: rotate(-4deg) scale(1.04); }

.nav-inline {
  justify-self: center;
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  padding: 4px;
  border: 1px solid var(--chrome-line);
  border-radius: 13px;
  background: color-mix(in srgb, var(--chrome-hover) 58%, transparent);
}
.nav-inline-link {
  position: relative;
  padding: 8px 13px;
  border-radius: 9px;
  color: var(--chrome-muted);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
  transition: color var(--dur) var(--ease-out), background var(--dur) var(--ease-out), transform var(--dur) var(--ease-out);
}
.nav-inline-link:hover { color: var(--chrome-text); background: var(--chrome-hover); }
.nav-inline-link.active { color: var(--chrome-text); background: var(--chrome-hover); }
.nav-inline-link.active::after {
  position: absolute;
  right: 13px;
  bottom: 4px;
  left: 13px;
  height: 1px;
  border-radius: 2px;
  content: "";
  background: var(--signal);
}

.topbar .theme-toggle,
.topbar .lang-switch,
.menu-toggle { color: var(--chrome-muted); border-color: var(--chrome-line); background: var(--chrome-hover); }
.topbar .theme-toggle:hover,
.menu-toggle:hover { color: var(--chrome-text); background: color-mix(in srgb, var(--chrome-hover) 160%, transparent); }
.topbar .lang-switch button { color: var(--chrome-muted); }
.topbar .lang-switch button[aria-pressed="true"] { color: var(--hero-surface); background: var(--hero-ink); }

.theme-toggle-icon,
.theme-toggle-icon svg { width: 20px; height: 20px; }
.theme-toggle-icon svg { display: block; overflow: visible; }
.theme-toggle-icon :is(circle, path) { fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; transform-origin: center; transition: opacity var(--dur) var(--ease-out), transform 0.4s var(--ease-spring); }
.theme-toggle .theme-sun,
.theme-toggle .theme-rays { opacity: 1; transform: scale(1) rotate(0); }
.theme-toggle .theme-moon { opacity: 0; transform: scale(0.55) rotate(-28deg); }
.theme-toggle[data-mode="dark"] .theme-sun,
.theme-toggle[data-mode="dark"] .theme-rays { opacity: 0; transform: scale(0.55) rotate(28deg); }
.theme-toggle[data-mode="dark"] .theme-moon { opacity: 1; transform: scale(1) rotate(0); }

.hero {
  color: var(--hero-ink);
  background:
    radial-gradient(60% 65% at 75% 46%, color-mix(in srgb, var(--signal) 24%, transparent), transparent 64%),
    var(--hero-surface);
}
.hero::before {
  background:
    linear-gradient(color-mix(in srgb, var(--hero-ink) 4%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--hero-ink) 4%, transparent) 1px, transparent 1px);
  background-size: 80px 80px;
}
.hero::after,
.hero .eyebrow { color: color-mix(in srgb, var(--hero-ink) 43%, transparent); }
.hero-description { color: var(--hero-copy-muted); }
.hero .text-link { color: color-mix(in srgb, var(--hero-ink) 78%, transparent); border-color: color-mix(in srgb, var(--hero-ink) 22%, transparent); }
.hero-stack span,
.hero-stack b,
:root[data-theme="dark"] .hero-stack b { border-color: color-mix(in srgb, var(--hero-ink) 12%, transparent); color: color-mix(in srgb, var(--hero-ink) 74%, transparent); background: color-mix(in srgb, var(--hero-ink) 5%, transparent); }
.hero-stack span { color: color-mix(in srgb, var(--hero-ink) 42%, transparent); }
.hero-stats { border-color: color-mix(in srgb, var(--hero-ink) 12%, transparent); }
.hero-stats dd { color: color-mix(in srgb, var(--hero-ink) 48%, transparent); }

.site-menu { color: var(--menu-ink); background: var(--menu-surface); }
.menu-gallery { border-color: color-mix(in srgb, var(--menu-ink) 10%, transparent); background: radial-gradient(circle at 15% 15%, color-mix(in srgb, var(--signal) 24%, transparent), transparent 35%), var(--menu-surface-2); }
.menu-kicker,
.menu-foot { color: var(--menu-muted); }
.nav-link { color: color-mix(in srgb, var(--menu-ink) 70%, transparent); border-color: color-mix(in srgb, var(--menu-ink) 12%, transparent); }
.nav-link:first-child { border-color: color-mix(in srgb, var(--menu-ink) 12%, transparent); }
.nav-link:hover,
.nav-link.active { color: var(--menu-ink); }
.nav-link small { color: var(--menu-muted); }

.signal-marquee { color: color-mix(in srgb, var(--hero-ink) 86%, transparent); border-color: color-mix(in srgb, var(--hero-ink) 10%, transparent); background: var(--hero-surface-2); }
.contact,
:root[data-theme="dark"] .contact { color: var(--end-ink); background: radial-gradient(circle at 75% 0%, color-mix(in srgb, var(--signal) 38%, transparent), transparent 40%), var(--end-surface); }

.projects,
:root[data-theme="dark"] .projects {
  background: var(--hero-surface);
}

@media (max-width: 1180px) {
  .topbar .contact-pill { display: none; }
}

@media (max-width: 900px) {
  .nav-inline { display: none; }
  .topbar { grid-template-columns: 1fr auto; }
}

@media (max-width: 520px) {
  .topbar .lang-switch { display: none; }
  .brand > span:last-child { font-size: 0.92rem; }
}

/* ---------------------------------------------------------------------------
   Alvo de toque no dedo.

   Medido no site no ar em 375px: 50 dos 72 elementos clicáveis tinham menos de
   44px de altura — os botões de projeto em 42px, os filtros em 34px, o seletor
   de tema em 38px. No mouse isso não incomoda; no dedo, cada erro de toque é
   uma volta.

   O bloco vale só para ponteiro grosso, então o desenho no computador continua
   exatamente como está: o que muda é a área que responde, não o que se vê.
   --------------------------------------------------------------------------- */
@media (pointer: coarse) {
  .project-action,
  .project-filter-btn,
  .theme-toggle,
  .menu-toggle,
  .lang-btn,
  .nav-link,
  .brand {
    min-height: 44px;
  }

  .theme-toggle,
  .menu-toggle {
    min-width: 44px;
  }

  .project-filter-btn {
    padding-top: 0;
    padding-bottom: 0;
    display: inline-flex;
    align-items: center;
  }

  /* O link de e-mail é texto correndo dentro do parágrafo: esticar a altura
     abriria um buraco no meio da frase. Aqui o alvo cresce por fora. */
  .footer-email {
    display: inline-block;
    padding: 12px 0;
  }
}

@media (pointer: coarse) {
  .text-link,
  .footer-brand {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }
}

/*
 * APOIAR no rodapé.
 *
 * O botão fica na mesma linha do texto e não vira faixa como o `.copy-email`:
 * ali ele é a ação da seção de contato, e aqui é uma nota de rodapé — dar a
 * mesma presença aos dois faria o pedido de doação competir com o conteúdo.
 */
.footer-donate {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.copy-btc {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
  transition: color var(--dur) var(--ease-out);
}

/* --white is #ffffff in both themes, so hovering used to paint the address
   white on the light theme's paper and it disappeared. --ink follows the
   theme: near-black on paper, near-white on the dark background. */
.copy-btc:hover { color: var(--ink); }

.copy-btc code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.82em;
}

.copy-btc span {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.6;
}

.copy-btc:hover span { opacity: 1; }
