/* Eduardo Amaral — portfolio v2
   Coluna única, tipografia pequena, hierarquia por cor. */

:root {
  --bg: #fafaf9;
  --fg: #171717;
  --muted: #6f6f6f;
  --subtle: #a3a3a3;
  --line: rgba(0, 0, 0, 0.08);
  --line-strong: rgba(0, 0, 0, 0.14);
  --hover: rgba(0, 0, 0, 0.035);
  --chip: #ffffff;
  --panel: #f0f0ee;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 12px 32px -8px rgba(0, 0, 0, 0.18);
  --accent: #0a7aff;

  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --serif: "Instrument Serif", ui-serif, Georgia, serif;

  --col: 600px;
  --wide: 880px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #111111;
  --fg: #ededed;
  --muted: #a1a1a1;
  --subtle: #666666;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --hover: rgba(255, 255, 255, 0.04);
  --chip: #1b1b1b;
  --panel: #191919;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 16px 40px -8px rgba(0, 0, 0, 0.7);
  color-scheme: dark;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.65;
  text-wrap: balance;
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease);
}

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

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

::selection { background: var(--fg); color: var(--bg); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip {
  position: absolute;
  left: 16px;
  top: -40px;
  padding: 6px 10px;
  background: var(--fg);
  color: var(--bg);
  border-radius: 6px;
  font-size: 13px;
  z-index: 10;
}
.skip:focus { top: 16px; }

/* Layout */

.page {
  width: 100%;
  max-width: calc(var(--col) + 48px);
  margin: 0 auto;
  padding: 72px 24px 48px;
}

.section { margin-top: 72px; }

.label {
  margin: 0 0 16px;
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.label small {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--subtle);
  letter-spacing: 0.02em;
}

p { margin: 0 0 16px; }
p:last-child { margin-bottom: 0; }

.muted { color: var(--muted); }

.serif {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.18em;
  letter-spacing: -0.005em;
  line-height: 1;
}

.mono {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.01em;
}

/* Text links: sublinhado discreto que fica sólido no hover */
.link {
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s var(--ease), color 0.2s var(--ease);
}
.link:hover { text-decoration-color: currentColor; }

/* Header */

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

.avatar {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  object-fit: cover;
  box-shadow: 0 0 0 1px var(--line);
}

.header-brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.header-name { line-height: 1.35; }
.header-name strong { display: block; font-weight: 500; }
.header-name span { color: var(--muted); }

.header-actions { display: flex; gap: 4px; }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease);
}
.icon-btn:hover { background: var(--hover); color: var(--fg); }
.icon-btn svg { width: 16px; height: 16px; }

.theme-toggle .sun { display: none; }
[data-theme="dark"] .theme-toggle .sun { display: block; }
[data-theme="dark"] .theme-toggle .moon { display: none; }

/* Intro */

.intro { margin-top: 40px; }
.intro p { color: var(--muted); }
.intro p:first-child { color: var(--fg); }

.org {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--fg);
  white-space: nowrap;
  vertical-align: bottom;
}
.org img {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  background: var(--chip);
  box-shadow: 0 0 0 1px var(--line);
}
a.org { text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
a.org:hover { text-decoration-color: currentColor; }

/* Social links */

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  margin-top: 24px;
  padding: 0;
  list-style: none;
}
.links a {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  color: var(--muted);
  transition: color 0.2s var(--ease);
}
.links a:hover { color: var(--fg); }
.links .arrow { width: 12px; height: 12px; opacity: 0.6; transition: transform 0.25s var(--ease); }
.links a:hover .arrow { transform: translate(1px, -1px); opacity: 1; }
.social-icons { display: flex; gap: 4px; margin: 16px 0 0; padding: 0; list-style: none; }
.social-icons a { text-decoration: none; }
.social-icons svg { width: 16px; height: 16px; }

/* Lista genérica: projetos e experiência */

.list { margin: 0; padding: 0; list-style: none; }
.list > li + li { border-top: 1px solid var(--line); }

/* Seção oculta na home (conteúdo mantido no HTML) */
.section[hidden] { display: none; }

.more {
  margin-top: 12px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}

.more:hover, .more:focus-visible { color: var(--fg); }

/* Projetos: os outros itens esmaecem enquanto um recebe hover */
.projects:hover .project:not(:hover) { opacity: 0.45; }

.project {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  gap: 0 16px;
  align-items: baseline;
  padding: 14px 0;
  transition: opacity 0.25s var(--ease);
}

.project .year { color: var(--subtle); }
.project .title { font-weight: 500; }
.project .desc { display: block; color: var(--muted); font-size: 14px; line-height: 1.55; margin-top: 2px; }
.project .type { color: var(--subtle); font-size: 13px; text-align: right; white-space: nowrap; }
.project .ext { width: 11px; height: 11px; display: inline-block; vertical-align: 1px; margin-left: 3px; opacity: 0.45; }

/* Toque: links e botões pequenos ganham área de toque maior sem mudar o visual */
@media (pointer: coarse) {
  .more, .footer-nav a, .back, .bio-card h2 a { position: relative; }
  .more::after, .footer-nav a::after, .back::after, .bio-card h2 a::after {
    content: "";
    position: absolute;
    inset: -10px -8px;
  }
  /* Controles pequenos ganham área de toque de ~44px sem mudar o desenho */
  .t-dot, .t-arrow, .icon-btn, .org { position: relative; }
  .t-dot::after, .t-arrow::after, .icon-btn::after, .org::after { content: ""; position: absolute; }
  .t-dot::after { inset: -8px -2px; }
  .t-arrow::after { inset: -7px -2px; }
  .icon-btn::after { inset: -6px; }
  .org::after { inset: -6px -4px; }
}

/* Capa em miniatura: aparece onde não existe hover (touch e mobile) */
.project .thumb { display: none; }
.project .thumb {
  align-self: start;
  margin-top: 2px;
  aspect-ratio: 4 / 3;
  border-radius: 8px;
  overflow: hidden;
  background: var(--panel);
  box-shadow: 0 0 0 1px var(--line);
}
.project .thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
@media (hover: none) and (min-width: 641px) {
  .project { grid-template-columns: 88px 52px 1fr auto; }
  .project .thumb { display: block; }
}

/* Preview flutuante da capa (somente com mouse) */
.preview {
  position: fixed;
  left: 0;
  top: 0;
  width: 300px;
  aspect-ratio: 16 / 10;
  border-radius: 12px;
  overflow: hidden;
  pointer-events: none;
  z-index: 20;
  background: var(--panel);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translate3d(var(--x, 0), var(--y, 0), 0) scale(0.92) rotate(-2deg);
  transition: opacity 0.25s var(--ease), transform 0.35s var(--ease);
}
.preview.is-visible {
  opacity: 1;
  transform: translate3d(var(--x, 0), var(--y, 0), 0) scale(1) rotate(0deg);
}
.preview img { width: 100%; height: 100%; object-fit: cover; }

@media (hover: none) { .preview { display: none; } }

/* Experiência com divulgação progressiva */

.job summary {
  display: grid;
  grid-template-columns: 20px 1fr auto 14px;
  gap: 0 12px;
  align-items: center;
  padding: 12px 0;
  cursor: pointer;
  list-style: none;
}
.job summary::-webkit-details-marker { display: none; }

.job .logo, .mark {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background: var(--chip);
  box-shadow: 0 0 0 1px var(--line);
}

.mark {
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 9px;
  color: var(--muted);
}

.job .role { font-weight: 500; }
.job .company { color: var(--muted); }
.job .period { color: var(--subtle); text-align: right; white-space: nowrap; }

.job .chev {
  width: 14px;
  height: 14px;
  color: var(--subtle);
  transition: transform 0.3s var(--ease), color 0.2s var(--ease);
}
.job summary:hover .chev { color: var(--fg); }
.job[open] .chev { transform: rotate(45deg); }

.job .body {
  padding: 0 26px 16px 32px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}
.job .body ul { margin: 0; padding-left: 18px; }
.job .body li + li { margin-top: 4px; }
.job .body li::marker { color: var(--subtle); }

/* Logos de empresas */

.logos {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 4px;
  margin: 0 -6px;
  padding: 0;
  list-style: none;
}

.logos li {
  position: relative;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 12px;
  transition: background-color 0.25s var(--ease);
}
.logos img {
  width: 62%;
  height: 62%;
  object-fit: contain;
  filter: grayscale(1);
  opacity: 0.5;
  transition: filter 0.3s var(--ease), opacity 0.3s var(--ease), transform 0.3s var(--ease);
}
/* No escuro a grade fica monocromática clara, inclusive no hover */
[data-theme="dark"] .logos img { filter: grayscale(1) invert(1) brightness(1.15); opacity: 0.5; }
[data-theme="dark"] .logos .only-dark { filter: grayscale(1) brightness(1.4); }

/* Logos pretos ganham versão clara no tema escuro */
[data-theme="dark"] .invert-dark { filter: invert(1); background: #e4e4e4; }

.logos li::after {
  content: attr(data-name);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  translate: -50% 4px;
  padding: 3px 7px;
  border-radius: 6px;
  background: var(--fg);
  color: var(--bg);
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s var(--ease), translate 0.2s var(--ease);
}
/* Hover só em quem tem hover; no toque o nome aparece enquanto o dedo pressiona e some ao soltar */
@media (hover: hover) {
  .logos li:hover { background: var(--hover); }
  .logos li:hover img { filter: none; opacity: 1; transform: scale(1.06); }
  [data-theme="dark"] .logos li:hover img { filter: grayscale(1) invert(1) brightness(1.15); opacity: 1; }
  .logos li:hover::after { opacity: 1; translate: -50% 0; }
}
@media (hover: none) {
  .logos li:active::after { opacity: 1; translate: -50% 0; }
}

/* Variantes de logo por tema */
.only-dark { display: none !important; }
[data-theme="dark"] .only-dark { display: block !important; }
[data-theme="dark"] .only-light { display: none !important; }

/* Depoimento */

.quote {
  margin: 0;
  padding: 20px;
  border-radius: 14px;
  background: var(--chip);
  box-shadow: 0 0 0 1px var(--line);
}
.quote p { color: var(--fg); }
.quote footer { display: flex; align-items: center; gap: 10px; margin-top: 16px; font-size: 14px; }
.quote footer img { width: 28px; height: 28px; border-radius: 999px; object-fit: cover; }
.quote footer span { color: var(--muted); }

/* Depoimentos: um por vez, slides empilhados na mesma célula para a altura não pular */
.t-stage { display: grid; }
.t-slide {
  grid-area: 1 / 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  opacity: 0;
  visibility: hidden;
  translate: 0 6px;
  filter: blur(3px);
  transition: opacity 0.35s var(--ease), translate 0.45s var(--ease), filter 0.35s var(--ease), visibility 0s linear 0.35s;
}
.t-slide.is-active {
  opacity: 1;
  visibility: visible;
  translate: 0 0;
  filter: none;
  transition-delay: 0.08s, 0.08s, 0.08s, 0s;
}
.t-slide footer > div { display: flex; flex-wrap: wrap; align-items: center; column-gap: 5px; row-gap: 2px; }
.quote footer .t-via {
  margin-left: 0;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 12px;
  color: var(--muted);
  box-shadow: 0 0 0 1px var(--line);
  white-space: nowrap;
}

.t-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
}
.t-people { display: flex; gap: 4px; }
.t-dot {
  display: grid;
  place-items: center;
  padding: 3px;
  border: 0;
  border-radius: 999px;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.t-mini {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  object-fit: cover;
  opacity: 0.45;
  filter: grayscale(1);
  transition: opacity 0.2s var(--ease), filter 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.t-dot:hover .t-mini { opacity: 0.8; filter: none; }
.t-dot[aria-current="true"] .t-mini { opacity: 1; filter: none; box-shadow: 0 0 0 2px var(--bg), 0 0 0 3px var(--fg); }
.t-dot:focus-visible, .t-arrow:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.t-dot { flex-shrink: 0; }
.t-count {
  margin-left: auto;
  white-space: nowrap;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--subtle);
  font-variant-numeric: tabular-nums;
}
.t-arrows { display: flex; gap: 4px; }
.t-arrow {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--chip);
  color: var(--muted);
  box-shadow: 0 0 0 1px var(--line);
  cursor: pointer;
  transition: background-color 0.15s var(--ease), color 0.15s var(--ease), transform 0.15s var(--ease);
}
.t-arrow:hover { color: var(--fg); background: var(--hover); }
.t-arrow:active { transform: scale(0.94); }
.t-arrow svg { width: 14px; height: 14px; }
@media (prefers-reduced-motion: reduce) {
  .t-slide, .t-slide.is-active { transition: none; translate: none; filter: none; }
}
/* Telas estreitas: as fotos e as setas já mostram a posição, o contador sai para nada encolher */
@media (max-width: 360px) {
  .t-count { display: none; }
  .t-arrows { margin-left: auto; }
}
/* Toque: arrastar o card troca o depoimento sem travar a rolagem vertical */
.t-stage { touch-action: pan-y; }

/* Contato */

.contact-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 14px;
  border: 0;
  border-radius: 10px;
  background: var(--chip);
  color: var(--fg);
  box-shadow: 0 0 0 1px var(--line-strong);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.2s var(--ease), transform 0.15s var(--ease);
}
.btn:hover { background: var(--hover); }
.btn:active { transform: scale(0.98); }
.btn svg { width: 15px; height: 15px; color: var(--muted); }
.btn--primary { background: var(--fg); color: var(--bg); box-shadow: none; }
.btn--primary:hover { background: var(--fg); opacity: 0.88; }
.btn--primary svg { color: inherit; opacity: 0.7; }
.btn .copied { display: none; }
.btn.is-copied .copied { display: inline; }
.btn.is-copied .to-copy { display: none; }

/* Footer */

.footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 96px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--subtle);
  font-size: 13px;
}
.footer .clock { font-variant-numeric: tabular-nums; }
.footer a:hover { color: var(--fg); }
.footer-nav { display: none; }
@media (max-width: 640px) {
  .header .nav { display: none; }
  .footer { flex-wrap: wrap; row-gap: 12px; }
  .footer-nav { display: flex; gap: 20px; flex-basis: 100%; order: -1; font-size: 14px; }
  .footer-nav a { color: var(--muted); }
  .footer-nav a[aria-current="page"] { color: var(--fg); }
}

/* Case */

.back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  transition: color 0.2s var(--ease);
}
.back:hover { color: var(--fg); }
.back svg { width: 14px; height: 14px; transition: transform 0.25s var(--ease); }
.back:hover svg { transform: translateX(-2px); }

.case-head { margin-top: 56px; }
.case-head h1 {
  margin: 0;
  font-size: 15px;
  font-weight: 500;
}
.case-head .lede {
  margin-top: 12px;
  font-size: 22px;
  line-height: 1.35;
  letter-spacing: -0.015em;
  color: var(--fg);
  text-wrap: balance;
}
.case-head .lede em { font-family: var(--serif); font-size: 1.12em; font-weight: 400; }

.meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 32px 0 0;
  padding: 16px 0 0;
  border-top: 1px solid var(--line);
}
.meta dt { color: var(--subtle); font-size: 13px; }
.meta dd { margin: 2px 0 0; font-size: 14px; }

.figure { margin-block: 40px; margin-inline: 0; }

.wide {
  --w: min(var(--wide), calc(100vw - 40px));
  width: var(--w);
  margin-inline: calc((100% - var(--w)) / 2);
}
.figure img { width: 100%; height: auto; border-radius: 12px; box-shadow: 0 0 0 1px var(--line); }
.figure figcaption { margin-top: 10px; color: var(--subtle); font-size: 13px; text-align: center; }

.panel {
  padding: 28px;
  border-radius: 16px;
  background: var(--panel);
}
.panel img { box-shadow: 0 0 0 1px var(--line), 0 8px 24px -12px rgba(0, 0, 0, 0.18); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: start; }

.case-section { margin-top: 64px; }
.case-section h2 {
  margin: 0 0 4px;
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
}
.case-section h3 {
  margin: 0 0 14px;
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.4;
}
.case-section p { color: var(--muted); }
.case-section p strong { color: var(--fg); font-weight: 500; }

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin: 24px 0;
  border-radius: 14px;
  overflow: hidden;
  background: var(--line);
  box-shadow: 0 0 0 1px var(--line);
}
.stats div { padding: 16px; background: var(--bg); }
.stats strong { display: block; font-size: 22px; font-weight: 500; letter-spacing: -0.02em; }
.stats span { color: var(--muted); font-size: 13px; line-height: 1.45; display: block; margin-top: 4px; }

.next {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 80px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.next small { display: block; color: var(--subtle); font-size: 13px; }
.next strong { font-weight: 500; }
.next span { color: var(--muted); font-size: 14px; }
.next svg { width: 16px; height: 16px; color: var(--muted); transition: transform 0.25s var(--ease); flex: none; }
.next:hover svg { transform: translateX(3px); color: var(--fg); }

/* Navegação do cabeçalho */

.nav { display: flex; align-items: center; gap: 2px; }
.nav a {
  padding: 4px 8px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 14px;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease);
}
.nav a:hover { background: var(--hover); color: var(--fg); }
.nav a[aria-current="page"] { color: var(--fg); }

/* Mídia extra dos cases */

.figure video {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 0 0 1px var(--line);
  background: var(--panel);
}

/* Páginas longas ficam dentro de uma moldura com rolagem */
.scroll-frame {
  max-height: 560px;
  overflow-y: auto;
  border-radius: 12px;
  box-shadow: 0 0 0 1px var(--line);
  overscroll-behavior: contain;
  scrollbar-width: thin;
}
.scroll-frame img { border-radius: 0; box-shadow: none; }
.panel .scroll-frame { box-shadow: 0 0 0 1px var(--line), 0 8px 24px -12px rgba(0, 0, 0, 0.18); background: #fff; }
.grid-mobile { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; align-items: start; }

.swatches {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 8px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}
.swatches li {
  padding: 8px;
  border-radius: 12px;
  background: var(--chip);
  box-shadow: 0 0 0 1px var(--line);
  font-size: 13px;
  line-height: 1.4;
}
.swatches i {
  display: block;
  height: 56px;
  margin-bottom: 8px;
  border-radius: 7px;
  box-shadow: inset 0 0 0 1px var(--line);
}
.swatches span { display: block; color: var(--subtle); font-family: var(--mono); font-size: 11px; }

.brand-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.brand-tiles div {
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  box-shadow: 0 0 0 1px var(--line);
}
.brand-tiles img { width: 40%; height: auto; box-shadow: none; border-radius: 0; }

.steps { margin: 20px 0 0; padding: 0; list-style: none; counter-reset: step; }
.steps li {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  counter-increment: step;
}
.steps li::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--mono);
  font-size: 12px;
  color: var(--subtle);
  padding-top: 3px;
}
.steps strong { color: var(--fg); font-weight: 500; }

.case-section .quote { margin-top: 20px; }
.store-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }

/* Sobre e CV */

.page-head { margin-top: 56px; }
.page-head h1 {
  margin: 0;
  font-size: 22px;
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
.page-head h1 .serif { font-size: 1.12em; font-weight: 400; }
.page-head .sub { margin-top: 4px; color: var(--muted); }

.page-head .avatar-lg {
  width: 72px;
  height: 72px;
  margin-bottom: 20px;
  border-radius: 999px;
  object-fit: cover;
  box-shadow: 0 0 0 1px var(--line);
}

.prose p { color: var(--muted); }
.prose p strong, .prose p .org { color: var(--fg); font-weight: inherit; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.chips li {
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--chip);
  box-shadow: 0 0 0 1px var(--line);
  color: var(--muted);
  font-size: 13px;
}

/* Experiência completa: sempre aberta */
.timeline > li { display: grid; grid-template-columns: 20px 1fr; gap: 0 12px; padding: 16px 0; }
.timeline .logo { width: 20px; height: 20px; margin-top: 2px; border-radius: 6px; background: var(--chip); box-shadow: 0 0 0 1px var(--line); }
[data-theme="dark"] .timeline .invert-dark { background: #e4e4e4; }
.timeline .row { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.timeline .role { font-weight: 500; }
.timeline .company { color: var(--muted); }
.timeline .period { color: var(--subtle); white-space: nowrap; }
.timeline p, .timeline ul { margin: 6px 0 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
.timeline ul { padding-left: 18px; }
.timeline ul li + li { margin-top: 4px; }
.timeline ul li::marker { color: var(--subtle); }

/* CV */

.cv-meta {
  display: grid;
  grid-template-columns: repeat(3, auto);
  justify-content: space-between;
  gap: 12px 16px;
  margin: 24px 0 0;
  padding: 16px 0 0;
  border-top: 1px solid var(--line);
}
.cv-meta dt { color: var(--subtle); font-size: 13px; }
.cv-meta dd { margin: 2px 0 0; font-size: 14px; }
.cv-meta a:hover { text-decoration: underline; text-underline-offset: 3px; }

.plain { margin: 0; padding: 0; list-style: none; }
.plain li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); color: var(--fg); font-size: 14px; }
.plain li span { color: var(--subtle); white-space: nowrap; }

.cv-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }

/* Sobre: versão curta */
.about { margin-top: 56px; }
.about .avatar-lg { width: 64px; height: 64px; margin-bottom: 20px; border-radius: 999px; object-fit: cover; box-shadow: 0 0 0 1px var(--line); }
.about h1 { margin: 0; font-size: 15px; font-weight: 500; line-height: 1.5; letter-spacing: 0; }
.about .sub { margin: 0; color: var(--muted); }
.about .sub .org { color: var(--fg); }
@media (max-width: 640px) { .about { margin-top: 32px; } }

/* Playground: grade em duas colunas, no espírito do Explorations do nelson.co */
.explore { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: start; }
.explore-col { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.x { position: relative; }
.x button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 14px;
  background: var(--panel);
  overflow: hidden;
  cursor: zoom-in;
  box-shadow: 0 0 0 1px var(--line);
}
.x img { width: 100%; height: auto; transition: transform 0.6s var(--ease); }
.x--phone button { display: grid; place-items: center; aspect-ratio: 4 / 5; }
.x--phone img {
  width: auto;
  height: 86%;
  aspect-ratio: 375 / 812;
  object-fit: cover;
  object-position: top;
  border-radius: 18px;
  box-shadow: 0 0 0 1px var(--line), 0 18px 40px -18px rgba(0, 0, 0, 0.35);
}
.x button:hover img { transform: scale(1.015); }
.x button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.x-label {
  position: absolute;
  left: 10px;
  bottom: 10px;
  margin: 0;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 12px;
  color: var(--fg);
  background: color-mix(in srgb, var(--chip) 88%, transparent);
  backdrop-filter: blur(8px);
  box-shadow: 0 0 0 1px var(--line);
  pointer-events: none;
  opacity: 0;
  translate: 0 4px;
  transition: opacity 0.2s var(--ease), translate 0.25s var(--ease);
}
.x-label span { color: var(--muted); }
.x:hover .x-label, .x:focus-within .x-label { opacity: 1; translate: 0 0; }
@media (hover: none) { .x-label { opacity: 1; translate: 0 0; } }
@media (max-width: 640px) { .explore, .explore-col { gap: 8px; } .x-label { display: none; } }

.lightbox {
  max-width: 94vw;
  max-height: 94vh;
  padding: 0;
  border: 0;
  border-radius: 16px;
  background: var(--panel);
  overflow: auto;
  box-shadow: var(--shadow);
}
/* Com a peça ampliada, a página de trás não rola (no toque o arraste vazava para o fundo) */
:root:has(.lightbox[open]) { overflow: hidden; }
.lightbox { overscroll-behavior: contain; }
.lightbox::backdrop { background: rgba(0, 0, 0, 0.55); backdrop-filter: blur(6px); }
.lightbox img { display: block; max-width: 94vw; max-height: 94vh; width: auto; height: auto; }
.lightbox.is-tall img { max-height: none; width: min(420px, 94vw); }
.lightbox form { position: sticky; top: 0; height: 0; display: flex; justify-content: flex-end; z-index: 1; }
.lightbox-close { margin: 10px; background: var(--chip); box-shadow: 0 0 0 1px var(--line); }
@media (prefers-reduced-motion: no-preference) {
  .lightbox[open] { animation: zoom-in 0.35s var(--ease); }
  @keyframes zoom-in { from { opacity: 0; scale: 0.96; } }
}

/* Modo layout: contorno em todos os blocos, como em wireframe.co */
:root { --grid: rgba(8, 145, 178, 0.32); --grid-strong: #0891b2; }
[data-theme="dark"] { --grid: rgba(34, 211, 238, 0.28); --grid-strong: #22d3ee; }
.layout-fab {
  position: fixed;
  left: 20px;
  bottom: 20px;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  box-shadow: 0 0 0 1px var(--line);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.layout-fab:focus-visible { outline: 2px solid var(--grid-strong); outline-offset: 2px; }
.layout-fab[data-active] { color: var(--grid-strong); background: color-mix(in srgb, var(--grid-strong) 12%, var(--bg)); box-shadow: 0 0 0 1px var(--grid); }
.layout-fab[aria-expanded="true"] { color: var(--fg); background: var(--chip); }
@media (max-width: 899px), (hover: none) { .layout-fab, .inspect-menu, .inspect-layer, .inspect-palette, .inspect-legend { display: none !important; } }

.lang-switch { text-decoration: none; }
.lang-switch svg { width: 22px; height: 22px; filter: grayscale(1); opacity: 0.7; transition: filter 0.2s var(--ease), opacity 0.2s var(--ease); }
.lang-switch:hover svg, .lang-switch:focus-visible svg { filter: none; opacity: 1; }
[data-layout="on"] .page *:not(svg *):not(.skip) { outline: 1px solid var(--grid); outline-offset: -1px; }
[data-inspect="on"] .page .is-inspected { outline: 1px solid var(--grid-strong) !important; background-color: color-mix(in srgb, var(--grid-strong) 6%, transparent); }
[data-layout="on"] body::before {
  content: "";
  position: fixed;
  top: 0;
  bottom: 0;
  left: 50%;
  width: min(var(--col), 100vw - 48px);
  translate: -50% 0;
  border-inline: 1px dashed var(--grid);
  pointer-events: none;
  z-index: 40;
}
.inspect-tag {
  position: fixed;
  z-index: 60;
  display: grid;
  gap: 2px;
  padding: 5px 8px;
  border-radius: 6px;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.4;
  color: #fff;
  background: #171717;
  box-shadow: 0 6px 20px -6px rgba(0, 0, 0, 0.4);
  pointer-events: none;
  white-space: nowrap;
}
[data-theme="dark"] .inspect-tag { background: #262626; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 6px 20px -6px rgba(0, 0, 0, 0.6); }
.inspect-tag > div { display: flex; justify-content: space-between; gap: 16px; }
.inspect-tag b { font-weight: 400; color: var(--grid-strong); }
[data-theme="light"] .inspect-tag b { color: #67e8f9; }
.inspect-tag .k { color: #a3a3a3; }
.inspect-tag i { display: inline-block; width: 9px; height: 9px; margin-right: 5px; border-radius: 2px; vertical-align: -1px; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.3); }

/* Inspetor: menu (snippet 05, Menu dropdown, do transitions.dev) */
:root {
  --dropdown-open-dur: 250ms;
  --dropdown-close-dur: 150ms;
  --dropdown-pre-scale: 0.97;
  --dropdown-closing-scale: 0.99;
  --dropdown-ease: cubic-bezier(0.22, 1, 0.36, 1);
}
.t-dropdown {
  transform-origin: top left;
  transform: scale(var(--dropdown-pre-scale));
  opacity: 0;
  pointer-events: none;
  transition:
    transform var(--dropdown-open-dur) var(--dropdown-ease),
    opacity   var(--dropdown-open-dur) var(--dropdown-ease);
  will-change: transform, opacity;
}
.t-dropdown[data-origin="top-right"]     { transform-origin: top right; }
.t-dropdown[data-origin="top-center"]    { transform-origin: top center; }
.t-dropdown[data-origin="bottom-left"]   { transform-origin: bottom left; }
.t-dropdown[data-origin="bottom-center"] { transform-origin: bottom center; }
.t-dropdown[data-origin="bottom-right"]  { transform-origin: bottom right; }

.t-dropdown.is-open {
  transform: scale(1);
  opacity: 1;
  pointer-events: auto;
}
.t-dropdown.is-closing {
  transform: scale(var(--dropdown-closing-scale));
  opacity: 0;
  pointer-events: none;
  transition:
    transform var(--dropdown-close-dur) var(--dropdown-ease),
    opacity   var(--dropdown-close-dur) var(--dropdown-ease);
}

@media (prefers-reduced-motion: reduce) {
  .t-dropdown { transition: none !important; }
}

/* Cores dos modos */
:root { --space: #e5488a; --margin: #ea6c0a; --gap: #059669; --comp: #9747ff; --swatch: #d97706; }
[data-theme="dark"] { --space: #f472b6; --margin: #fb923c; --gap: #34d399; --comp: #b386ff; --swatch: #fbbf24; }

.inspect-menu {
  position: fixed;
  left: 20px;
  bottom: 60px;
  z-index: 55;
  width: 196px;
  padding: 4px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--chip) 92%, transparent);
  box-shadow: 0 0 0 1px var(--line-strong), var(--shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-size: 13px;
}
.inspect-menu:not(.is-open):not(.is-closing) { visibility: hidden; }
.im-title { margin: 0; padding: 6px 8px 4px; font: 400 11px/1.4 var(--mono); color: var(--subtle); }
.inspect-menu button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  height: 32px;
  padding: 0 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--fg);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.inspect-menu button:hover, .inspect-menu button:focus-visible { background: var(--hover); outline: none; }
.inspect-menu button:focus-visible { box-shadow: inset 0 0 0 1px var(--line-strong); }
.im-ico { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; color: var(--muted); background: var(--hover); transition: color 0.2s var(--ease), background-color 0.2s var(--ease); }
.im-ico svg { width: 14px; height: 14px; }
.im-name { flex: 1; }
.im-check { width: 14px; height: 14px; opacity: 0; transform: scale(0.6); transition: opacity 0.2s var(--ease), transform 0.2s var(--ease); }
.inspect-menu [aria-checked="true"] .im-check { opacity: 1; transform: none; }
[data-mode="layout"] { --mode: var(--grid-strong); }
[data-mode="spacing"] { --mode: var(--space); }
[data-mode="colors"] { --mode: var(--swatch); }
[data-mode="components"] { --mode: var(--comp); }
.inspect-menu [aria-checked="true"] .im-ico { color: var(--mode); background: color-mix(in srgb, var(--mode) 14%, transparent); }
.inspect-menu [aria-checked="true"] .im-check { color: var(--mode); }
.inspect-menu button[hidden] { display: none; }
[data-inspect="on"] .preview { display: none; }
.inspect-menu .im-clear { height: 30px; margin-top: 4px; color: var(--muted); font-size: 12px; box-shadow: 0 -1px 0 var(--line); border-radius: 0 0 8px 8px; }

/* Camadas */
.inspect-layer { position: absolute; left: 0; top: 0; width: 0; height: 0; z-index: 45; pointer-events: none; }
.inspect-layer > div { position: absolute; }
/* Espaçamentos: padding rosa, margin laranja e gap verde, com hachuras em direções diferentes */
.is-pad { --c: var(--space); --hatch: -45deg; }
.is-margin { --c: var(--margin); --hatch: 45deg; }
.is-gap { --c: var(--gap); --hatch: 90deg; }
.is-space {
  background:
    repeating-linear-gradient(var(--hatch), color-mix(in srgb, var(--c) 55%, transparent) 0 1px, transparent 1px 5px),
    color-mix(in srgb, var(--c) 7%, transparent);
  box-shadow: inset 0 0 0 0.5px color-mix(in srgb, var(--c) 40%, transparent);
  transition: opacity 0.2s var(--ease);
}
.is-space span {
  position: absolute;
  left: 50%;
  top: 50%;
  translate: -50% -50%;
  padding: 0 4px;
  border-radius: 3px;
  font: 400 10px/14px var(--mono);
  color: #fff;
  background: var(--c);
}
[data-theme="dark"] .is-space span { color: #1a1a1a; }
.inspect-layer[data-focus="pad"] .is-space:not(.is-pad),
.inspect-layer[data-focus="margin"] .is-space:not(.is-margin),
.inspect-layer[data-focus="gap"] .is-space:not(.is-gap) { opacity: 0.08; }

.inspect-legend {
  position: fixed;
  left: 60px;
  bottom: 20px;
  z-index: 50;
  display: flex;
  align-items: center;
  height: 32px;
  padding: 0 4px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  box-shadow: 0 0 0 1px var(--line);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font: 400 11px/1 var(--mono);
  color: var(--muted);
}
html:not([data-spacing="on"]) .inspect-legend { display: none; }
.inspect-legend span { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 8px; border-radius: 6px; cursor: default; }
.inspect-legend span:hover { background: var(--hover); color: var(--fg); }
.inspect-legend i { width: 10px; height: 10px; border-radius: 2px; }
@media (prefers-reduced-motion: no-preference) {
  .inspect-legend { animation: reveal 0.35s var(--ease) both; }
}

/* Dica do cursor: largura × altura e gap */
.inspect-tag .sw-gap { background: #34d399; }
.is-comp { box-shadow: 0 0 0 1px var(--comp); border-radius: 2px; }
.is-comp span {
  position: absolute;
  left: -1px;
  bottom: calc(100% + 1px);
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 0 5px 0 4px;
  border-radius: 3px 3px 3px 0;
  font: 500 10px/15px var(--sans);
  color: #fff;
  background: var(--comp);
  white-space: nowrap;
}
.is-comp span svg { width: 9px; height: 9px; fill: currentColor; stroke: none; }
[data-theme="dark"] .is-comp span { color: #1a0838; }
.is-token { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--swatch) 45%, transparent); border-radius: 2px; transition: opacity 0.2s var(--ease); }
.is-token.is-dim { opacity: 0.15; }
.is-token span {
  position: absolute;
  right: -1px;
  bottom: calc(100% + 1px);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0 5px 0 3px;
  border-radius: 3px 3px 0 3px;
  font: 400 10px/15px var(--mono);
  color: var(--fg);
  background: var(--chip);
  box-shadow: 0 0 0 1px var(--swatch);
  white-space: nowrap;
}
.is-token i { width: 9px; height: 9px; border-radius: 2px; box-shadow: inset 0 0 0 1px var(--line-strong); }
.is-match { outline: 1.5px dashed var(--swatch); outline-offset: 2px; border-radius: 3px; background: color-mix(in srgb, var(--swatch) 8%, transparent); }

.inspect-palette {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 55;
  width: 268px;
  padding: 6px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--chip) 92%, transparent);
  box-shadow: 0 0 0 1px var(--line-strong), var(--shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font: 400 11px/1.4 var(--mono);
}
html:not([data-colors="on"]) .inspect-palette { display: none; }
.ip-head { display: flex; justify-content: space-between; margin: 0; padding: 4px 6px 6px; color: var(--subtle); }
.inspect-palette ul { margin: 0; padding: 0; list-style: none; }
.inspect-palette li { display: grid; grid-template-columns: 18px 1fr auto 22px; align-items: center; gap: 8px; height: 26px; padding: 0 6px; border-radius: 6px; cursor: default; }
.inspect-palette li:hover { background: var(--hover); }
.ip-sw { width: 16px; height: 16px; border-radius: 4px; box-shadow: inset 0 0 0 1px var(--line-strong); }
.inspect-palette code { font: inherit; color: var(--fg); white-space: nowrap; }
.inspect-palette .is-unused { opacity: 0.45; }
.ip-val { color: var(--muted); }
.ip-n { text-align: right; color: var(--subtle); }
@media (prefers-reduced-motion: no-preference) {
  .inspect-palette { animation: reveal 0.35s var(--ease) both; }
}
@media (max-width: 640px) {
  .header-name strong, .header-name span { white-space: nowrap; }
  .header-actions { gap: 0; }
  .nav a { padding: 4px 6px; }
}
@media (max-width: 400px) {
  .header .avatar { width: 36px; height: 36px; }
  .nav a { padding: 4px 5px; font-size: 13px; }
}
/* GitHub: painel de contribuições (dados do perfil uxdudu) */
:root { --gh-0: #ebedf0; --gh-1: #9be9a8; --gh-2: #40c463; --gh-3: #30a14e; --gh-4: #216e39; }
[data-theme="dark"] { --gh-0: #1f2328; --gh-1: #0e4429; --gh-2: #006d32; --gh-3: #26a641; --gh-4: #39d353; }
.gh-months, .gh-grid { display: grid; grid-template-columns: repeat(53, minmax(0, 1fr)); gap: 3px; }
.gh-months { height: 14px; margin-bottom: 6px; font-size: 11px; line-height: 14px; color: var(--subtle); white-space: nowrap; }
.gh-grid { grid-template-rows: repeat(7, auto); }
.gh-d { display: block; aspect-ratio: 1; border-radius: 2px; background: var(--gh-0); }
.gh-d[data-level="1"] { background: var(--gh-1); }
.gh-d[data-level="2"] { background: var(--gh-2); }
.gh-d[data-level="3"] { background: var(--gh-3); }
.gh-d[data-level="4"] { background: var(--gh-4); }
.gh-foot { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 16px; font-size: 13px; color: var(--muted); }
.gh-foot a {
  display: inline-flex; align-items: center; gap: 4px; color: var(--fg); text-decoration: none;
  background-image: linear-gradient(var(--line-strong), var(--line-strong));
  background-size: 100% 1px; background-position: 0 100%; background-repeat: no-repeat;
  transition: background-size 0.25s var(--ease);
}
.gh-foot a:hover { background-image: linear-gradient(var(--fg), var(--fg)); }
.gh-foot .arrow { width: 12px; height: 12px; opacity: 0.45; }
.gh-legend { display: inline-flex; align-items: center; gap: 4px; }
.gh-legend span { width: 10px; height: 10px; border-radius: 2px; }
.gh-legend span[data-level="0"] { background: var(--gh-0); }
.gh-legend span[data-level="1"] { background: var(--gh-1); }
.gh-legend span[data-level="2"] { background: var(--gh-2); }
.gh-legend span[data-level="3"] { background: var(--gh-3); }
.gh-legend span[data-level="4"] { background: var(--gh-4); }
@media (max-width: 640px) { .gh-months, .gh-grid { gap: 2px; } .gh-months { font-size: 10px; } }

@media print { .layout-fab, .inspect-tag, .inspect-menu, .inspect-layer, .inspect-palette, .inspect-legend { display: none !important; } [data-layout="on"] .page * { outline: none !important; } }

@media print {
  @page { margin: 14mm 14mm; }
  :root, [data-theme="dark"] { --bg: #fff; --fg: #111; --muted: #444; --subtle: #777; --line: #ddd; --chip: #fff; color-scheme: light; }
  body { font-size: 11pt; line-height: 1.5; }
  .page { max-width: none; padding: 0; }
  .header, .footer, .cv-actions, .skip { display: none !important; }
  .page-head { margin-top: 0; }
  .section { margin-top: 22px; break-inside: auto; }
  .timeline > li { padding: 10px 0; }
  .timeline .row { break-after: avoid; }
  .timeline ul li, .plain li { break-inside: avoid; }
  .job .chev { display: none; }
  details.job::details-content { content-visibility: visible; display: block; height: auto; }
  .job summary { grid-template-columns: 20px 1fr auto; padding: 10px 0 4px; break-after: avoid; }
  .job .body { padding: 0 0 8px 32px; }
  .job .body li { break-inside: avoid; }
  .reveal { animation: none !important; }
  .only-dark, [data-theme] .only-dark { display: none !important; }
  .only-light, [data-theme] .only-light { display: block !important; }
  .invert-dark, [data-theme] .invert-dark { filter: none !important; background: none !important; }
  a { text-decoration: none; }
}

/* Loader de construção, inspirado no builder do transitions.dev:
   a página aparece primeiro como planta (contornos, medidas e linhas de texto)
   e depois o conteúdo real entra de cima para baixo.
   Cross-fade com blur do snippet 14 (Skeleton reveal) do transitions.dev. */
:root {
  --reveal-dur: 400ms;
  --reveal-blur: 2px;
  --reveal-ease: ease-in-out;
}
@property --wipe { syntax: "<length>"; inherits: true; initial-value: -120px; }
[data-build="on"], [data-build="reveal"] { --sy: 0px; }
[data-build="on"] .page, [data-build="reveal"] .page {
  -webkit-mask-image: linear-gradient(to bottom, #000 calc(var(--wipe) + var(--sy) - 100px), transparent calc(var(--wipe) + var(--sy)));
  mask-image: linear-gradient(to bottom, #000 calc(var(--wipe) + var(--sy) - 100px), transparent calc(var(--wipe) + var(--sy)));
}
[data-build] .reveal { animation: none !important; }
[data-build="on"] .reveal { opacity: 0; filter: blur(var(--reveal-blur)); }
[data-build="reveal"] .reveal {
  opacity: 1;
  filter: blur(0);
  transition:
    opacity var(--reveal-dur) var(--reveal-ease),
    filter  var(--reveal-dur) var(--reveal-ease);
  transition-delay: calc(var(--i, 0) * 60ms);
}
[data-build="reveal"] { animation: build-wipe 700ms cubic-bezier(0.65, 0, 0.35, 1) forwards; }
@keyframes build-wipe { from { --wipe: -120px; } to { --wipe: calc(100vh + 120px); } }
[data-build="on"] .layout-fab, [data-build="reveal"] .layout-fab, [data-build="on"] .inspect-palette, [data-build="reveal"] .inspect-palette { opacity: 0; }
.layout-fab { transition: opacity 0.3s var(--ease); }

.build {
  position: fixed;
  inset: 0;
  z-index: 70;
  pointer-events: none;
  color: var(--grid-strong);
  font: 400 10px/1 var(--mono);
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}
[data-build="reveal"] .build {
  -webkit-mask-image: linear-gradient(to bottom, transparent calc(var(--wipe) - 100px), #000 var(--wipe));
  mask-image: linear-gradient(to bottom, transparent calc(var(--wipe) - 100px), #000 var(--wipe));
}
.build-col {
  position: absolute;
  top: 0;
  bottom: 0;
  border-inline: 1px dashed var(--grid);
  animation: build-in 400ms var(--ease) both;
}
.build-time { position: absolute; top: 12px; left: 0; translate: 0 0; opacity: 0.8; white-space: nowrap; }
.build-box {
  position: absolute;
  border: 1px dotted var(--grid-strong);
  border-radius: 3px;
  opacity: 0;
  animation: build-draw 340ms var(--ease) both;
  animation-delay: var(--d);
}
.build-box.is-round { border-radius: 50%; }
.build-box i {
  position: absolute;
  width: 5px;
  height: 5px;
  background: var(--bg);
  border: 1px solid var(--grid-strong);
}
.build-box i:nth-child(1) { left: -3px; top: -3px; }
.build-box i:nth-child(2) { right: -3px; top: -3px; }
.build-box i:nth-child(3) { left: -3px; bottom: -3px; }
.build-box i:nth-child(4) { right: -3px; bottom: -3px; }
.build-box b {
  position: absolute;
  left: 0;
  bottom: calc(100% + 4px);
  font-weight: 400;
  white-space: nowrap;
  opacity: 0.75;
}
.build-line {
  position: absolute;
  height: 0;
  border-top: 1px dotted var(--grid-strong);
  opacity: 0;
  transform-origin: left center;
  animation: build-line 380ms var(--ease) both;
  animation-delay: var(--d);
}
.build-line::before, .build-line::after {
  content: "";
  position: absolute;
  top: -2.5px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--grid-strong);
}
.build-line::before { left: -2px; }
.build-line::after { right: -2px; }
@keyframes build-in { from { opacity: 0; } }
@keyframes build-draw {
  from { opacity: 0; clip-path: inset(0 100% 100% 0); }
  to { opacity: 1; clip-path: inset(-24px -8px -8px -8px); }
}
@keyframes build-line {
  from { opacity: 0; transform: scaleX(0); }
  to { opacity: 0.7; transform: scaleX(1); }
}
.build.is-leaving {
  opacity: 0;
  filter: blur(var(--reveal-blur));
  transition:
    opacity var(--reveal-dur) var(--reveal-ease),
    filter  var(--reveal-dur) var(--reveal-ease);
}
@media print { .build { display: none !important; } }
@media (prefers-reduced-motion: reduce) {
  .build { display: none !important; }
  .build.is-leaving { transition: none !important; }
}

/* Entrada suave */

@media (prefers-reduced-motion: no-preference) {
  .reveal {
    animation: reveal 0.7s var(--ease) both;
    animation-delay: calc(var(--i, 0) * 70ms);
  }
  @keyframes reveal {
    from { opacity: 0; transform: translateY(8px); filter: blur(4px); }
    to { opacity: 1; transform: none; filter: none; }
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* Mobile */

@media (max-width: 640px) {
  .page { padding: 40px 20px 32px; }
  .section { margin-top: 56px; }
  .project { grid-template-columns: 76px 1fr auto; gap: 0 14px; }
  .project .thumb { display: block; grid-column: 1; grid-row: 1; }
  .project .year { grid-column: 3; grid-row: 1; text-align: right; }
  .project .info { grid-column: 2; grid-row: 1; }
  .project .type { display: none; }
  .job summary { grid-template-columns: 20px 1fr 14px; }
  .job .period { grid-column: 2; grid-row: 2; text-align: left; }
  .job .chev { grid-row: 1 / span 2; grid-column: 3; }
  .job .body { padding-right: 0; }
  .logos { grid-template-columns: repeat(5, 1fr); }
  .meta { grid-template-columns: 1fr 1fr; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr; }
  .panel { padding: 14px; border-radius: 12px; }
  .case-head .lede { font-size: 20px; }
  .footer { flex-direction: column; gap: 4px; }
  .grid-mobile, .brand-tiles { grid-template-columns: 1fr; }
  .scroll-frame { max-height: 440px; }
  .cv-meta { grid-template-columns: 1fr 1fr; }
  .cv-meta .span-2 { grid-column: span 2; }
  .timeline .row { flex-direction: column; gap: 0; }
}

/* Bio: página de links (adaptada do link da bio publicado) */
.bio-hero { position: relative; }
.bio-cover { position: relative; height: 140px; border-radius: 16px; overflow: hidden; background: var(--panel); box-shadow: 0 0 0 1px var(--line); }
.bio-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.bio-avatar { position: relative; display: block; width: 88px; height: 88px; margin: -44px 0 0 20px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 4px var(--bg); }
.bio-id { padding: 14px 4px 0; }
.bio-id h1 { margin: 0; font-size: 24px; font-weight: 500; letter-spacing: -0.02em; line-height: 1.2; }
.bio-id p { margin: 6px 0 0; max-width: 46ch; font-size: 15px; line-height: 1.55; color: var(--muted); }
.bio-social { display: flex; gap: 4px; margin: 12px 0 0; padding: 0; list-style: none; }
.bio-social a { text-decoration: none; }
.bio-social svg { width: 16px; height: 16px; }
.bio-grid { display: grid; grid-template-columns: 1fr; gap: 12px; margin-top: 32px; }
@media (min-width: 640px) {
  .bio-grid { grid-template-columns: 1fr 1fr; }
  .bio-card--wide { grid-column: 1 / -1; }
}
.bio-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  padding: 18px;
  border-radius: 16px;
  background: var(--chip);
  box-shadow: 0 0 0 1px var(--line);
  color: var(--fg);
  text-decoration: none;
  transition: box-shadow 0.2s var(--ease);
}
a.bio-card:hover { box-shadow: 0 0 0 1px var(--line-strong); }
.bio-card > svg { width: 18px; height: 18px; color: var(--muted); margin-bottom: 6px; }
.bio-card > img.bio-card-logo { width: 24px; height: 24px; border-radius: 6px; margin-bottom: 6px; }
.bio-card[hidden] { display: none; }
.bio-card h2 { margin: 0; font-size: 16px; font-weight: 500; letter-spacing: -0.005em; }
.bio-card h2 a { color: inherit; text-decoration: none; }
.bio-card h2 a:hover { text-decoration: underline; text-underline-offset: 3px; }
.bio-card p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--muted); }
.bio-card small { display: inline-flex; align-items: center; gap: 4px; margin-top: 2px; font-family: var(--mono); font-size: 12px; color: var(--subtle); }
.bio-card .arrow { width: 10px; height: 10px; opacity: 0.6; transition: transform 0.25s var(--ease); }
a.bio-card:hover .arrow { transform: translate(1px, -1px); opacity: 1; }
.bio-thumbs { display: grid; gap: 6px; margin-top: 10px; }
.bio-thumbs a { display: block; overflow: hidden; border-radius: 8px; }
.bio-thumbs img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s var(--ease); }
.bio-thumbs a:hover img { transform: scale(1.03); }
.bio-thumbs--square { grid-template-columns: repeat(3, 1fr); }
.bio-thumbs--square a { aspect-ratio: 4 / 5; }
.bio-thumbs--video { grid-template-columns: repeat(2, 1fr); }
.bio-thumbs--video a { aspect-ratio: 16 / 9; }
.bio-thumbs--podcast { grid-template-columns: repeat(3, 1fr); }
.bio-thumbs--podcast a { aspect-ratio: 1; border-radius: 8px; }
#empresas { margin-top: 32px; }
/* Bio: sem cabeçalho; idioma e tema ficam no rodapé */
.footer--bio { align-items: center; }
.footer-meta { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.bio-actions { display: flex; gap: 4px; margin-right: -6px; }
@media (max-width: 640px) {
  .footer.footer--bio { flex-direction: row; }
  .footer--bio .footer-meta { flex-direction: column; }
}
