/* =========================================================
   Lucas Silva · Portfolio
   Edite as cores em :root para mudar o visual inteiro.
   ========================================================= */

:root {
  /* Paleta do mosaico (modo claro) */
  --p-green: #1f5f4a;
  --p-blue: #4a6cd4;
  --p-yellow: #f5c33b;
  --p-pink: #eaa5d0;
  --p-sky: #dde7f4;

  --bg: #fbfaf7;
  --surface: #ffffff;
  --text: #0f1412;
  --muted: #646b68;
  --border: #e6e4de;
  --accent: #3553c4;
  --accent-soft: #3553c414;
  --radius: 14px;
  --maxw: 1080px;
  --font: "Inter", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --p-green: #2e7a60;
    --p-blue: #5876d8;
    --p-yellow: #e2b43c;
    --p-pink: #cf8fba;
    --p-sky: #1b2635;

    --bg: #0c100f;
    --surface: #131917;
    --text: #ecefed;
    --muted: #8d9692;
    --border: #232b28;
    --accent: #8ea5f5;
    --accent-soft: #8ea5f51f;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --p-green: #2e7a60;
  --p-blue: #5876d8;
  --p-yellow: #e2b43c;
  --p-pink: #cf8fba;
  --p-sky: #1b2635;

  --bg: #0c100f;
  --surface: #131917;
  --text: #ecefed;
  --muted: #8d9692;
  --border: #232b28;
  --accent: #8ea5f5;
  --accent-soft: #8ea5f51f;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  transition: background .3s, color .3s;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; letter-spacing: -0.025em; line-height: 1.15; font-weight: 600; }
p { margin: 0 0 1rem; }
::selection { background: var(--accent); color: #fff; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.muted { color: var(--muted); }

.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; background: var(--text); color: var(--bg); padding: 8px 12px; border-radius: 8px; z-index: 100; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s;
}
.nav.scrolled { border-bottom-color: var(--border); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.nav__logo { font-weight: 700; font-size: 18px; letter-spacing: -0.04em; }
.nav__logo span { color: var(--p-yellow); }
.nav__links { display: flex; gap: 28px; font-size: 14px; color: var(--muted); }
.nav__links a { transition: color .2s; }
.nav__links a:hover { color: var(--text); }
.theme-toggle {
  width: 36px; height: 36px; display: grid; place-items: center;
  border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); cursor: pointer;
}
.theme-toggle .icon-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: block; }
}

/* ---------- Idiomas (PT / EN) ---------- */
:root[data-lang="en"] body [lang="pt"],
:root:not([data-lang="en"]) body [lang="en"] { display: none !important; }
.nav__actions { display: flex; align-items: center; gap: 8px; }
.lang-toggle {
  height: 36px; padding: 0 12px; display: inline-flex; align-items: center; gap: 6px;
  border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface); color: var(--muted); cursor: pointer;
  font-family: var(--mono); font-size: 12px;
}
.lang-toggle b { font-weight: 500; }
:root:not([data-lang="en"]) .lang-toggle .opt-pt,
:root[data-lang="en"] .lang-toggle .opt-en { color: var(--text); }

/* ---------- Hero ---------- */
.hero { padding-top: 120px; padding-bottom: 96px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 12.5px; color: var(--muted);
  padding: 6px 12px; border: 1px solid var(--border); border-radius: 999px;
  background: var(--surface); margin-bottom: 32px;
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--p-green); box-shadow: 0 0 0 3px color-mix(in srgb, var(--p-green) 25%, transparent); }
.hero__title { font-size: clamp(2.25rem, 5.5vw, 4rem); max-width: 18ch; font-weight: 600; }
.hero__title .muted { display: block; font-size: clamp(1.25rem, 2.6vw, 1.75rem); max-width: 30ch; font-weight: 500; margin-top: 16px; letter-spacing: -0.02em; line-height: 1.35; }
.hero__lead { font-size: 18px; color: var(--muted); max-width: 58ch; margin-top: 28px; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }

.btn {
  display: inline-flex; align-items: center; gap: 6px;
  height: 44px; padding: 0 20px; border-radius: 999px;
  font-size: 14.5px; font-weight: 500;
  transition: transform .15s, background .2s, border-color .2s, opacity .2s;
}
.btn:active { transform: scale(.98); }
.btn--primary { background: var(--text); color: var(--bg); }
.btn--primary:hover { opacity: .85; }
.btn--ghost { border: 1px solid var(--border); background: var(--surface); }
.btn--ghost:hover { border-color: var(--muted); }

/* ---------- Hero: do rascunho à interface ---------- */
.hero-scroll { position: relative; }
.hero-scroll.is-pinned { height: 260vh; margin-top: -64px; } /* -64px: a primeira dobra começa atrás da barra de navegação */
.hero-stage { position: relative; padding: 112px 0 72px; }
.is-pinned .hero-stage {
  position: sticky; top: 0; height: 100vh; height: 100svh;
  padding: 64px 0 0; display: flex; align-items: center; overflow: hidden;
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 64px; align-items: center; }
.hero-copy { position: relative; z-index: 3; }
.hero-copy .eyebrow { margin-bottom: 24px; }
.hero-copy .hero__title { font-size: clamp(2.5rem, 4.8vw, 3.9rem); }
.hero-copy .hero__title .muted { font-size: clamp(1.1rem, 1.8vw, 1.4rem); }
.hero-copy .hero__lead { font-size: 16px; margin-top: 20px; }
.hero-copy .hero__cta { margin-top: 28px; }
.mock-wrap { position: relative; z-index: 1; width: 100%; max-width: 470px; justify-self: end; }

/* Mockup */
.mock {
  --wire: color-mix(in srgb, var(--muted) 60%, transparent);
  --wire-fill: color-mix(in srgb, var(--muted) 14%, transparent);
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px; overflow: hidden;
  transition: box-shadow .8s ease;
}
.s3 .mock { box-shadow: 0 40px 80px -40px rgb(0 0 0 / .45), 0 0 0 1px var(--border); }
.mock__bar { height: 34px; display: flex; align-items: center; gap: 6px; padding: 0 12px; border-bottom: 1px solid var(--border); }
.mock__bar > i { width: 9px; height: 9px; border-radius: 50%; border: 1.5px dashed var(--wire); transition: background .5s, border-color .5s; }
.s1 .mock__bar > i { border-style: solid; }
.s2 .mock__bar > i { border-color: transparent; }
.s2 .mock__bar > i:nth-child(1) { background: var(--p-pink); }
.s2 .mock__bar > i:nth-child(2) { background: var(--p-yellow); }
.s2 .mock__bar > i:nth-child(3) { background: var(--p-green); }
.mock__tag { margin-left: auto; position: relative; height: 16px; min-width: 110px; font-family: var(--mono); font-size: 11px; color: var(--muted); }
.mock__tag > span { position: absolute; right: 0; top: 0; white-space: nowrap; opacity: 0; transform: translateY(6px); transition: opacity .35s, transform .35s; }
.mock__tag > span.on { opacity: 1; transform: none; }
.mock__body { padding: 16px; display: grid; gap: 12px; }

/* Elementos de wireframe: tracejado torto -> cinza alinhado -> interface */
.w {
  display: block; border: 1.5px dashed var(--wire); border-radius: 6px;
  transform: rotate(var(--r, 0deg));
  transition: border-color .5s, background .5s, transform .7s cubic-bezier(.2,.7,.2,1), border-radius .5s, opacity .4s, clip-path .5s;
}
.s1 .w { border-style: solid; border-color: transparent; background: var(--wire-fill); transform: none; }

.mock__nav { display: flex; align-items: center; gap: 10px; }
.mock__logo { width: 22px; height: 22px; }
.mock__link { height: 8px; width: 38px; border-radius: 4px; }
.mock__link:nth-of-type(1) { margin-left: auto; }
.s2 .mock__logo { background: var(--p-yellow); border-radius: 50%; }
.s2 .mock__link { background: color-mix(in srgb, var(--text) 16%, transparent); }

.mock__img { position: relative; aspect-ratio: 2 / 1; display: grid; grid-template-columns: repeat(6, 1fr); grid-template-rows: repeat(3, 1fr); border-radius: 8px; overflow: hidden; }
.mock__img .slot { display: block; }
.mock__x { position: absolute; inset: 0; width: 100%; height: 100%; stroke: var(--wire); stroke-width: .6; vector-effect: non-scaling-stroke; transition: opacity .5s; }
.s2 .mock__x { opacity: 0; }
.s2 .mock__img { background: transparent; }

.swap { position: relative; display: grid; gap: 7px; }
.swap .sk { height: 8px; border-radius: 4px; }
.swap .real { position: absolute; left: 0; top: 0; right: 0; opacity: 0; transform: translateY(4px); transition: opacity .5s .1s, transform .5s .1s; }
.s2 .swap .sk { opacity: 0; }
.s2 .swap .real { opacity: 1; transform: none; }
.mock__title { min-height: 26px; }
.mock__title .sk { height: 18px; width: 68%; }
.mock__title .real { font-size: 20px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.25; }
.mock__para { min-height: 38px; }
.mock__para .sk:first-child { width: 92%; }
.mock__para .sk:nth-child(2) { width: 64%; }
.mock__para .real { font-size: 13px; line-height: 1.5; color: var(--muted); }

.mock__cta { position: relative; }
.mock__btn { position: relative; display: inline-flex; align-items: center; justify-content: center; height: 34px; min-width: 112px; padding: 0 18px; border-radius: 999px; font-size: 13px; font-weight: 500; }
.mock__btn .sk { width: 56px; height: 8px; }
.mock__btn .real { position: absolute; inset: 0; display: grid; place-items: center; opacity: 0; transition: opacity .5s .1s; }
.s2 .mock__btn.w { background: var(--text); color: var(--bg); border-radius: 999px; }
.s2 .mock__btn .sk { opacity: 0; }
.s2 .mock__btn .real { opacity: 1; }
.s3 .mock__btn { animation: press .5s .85s both; }
.mock__btn::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: 0 0 0 0 var(--p-blue); opacity: 0; }
.s3 .mock__btn::after { animation: ripple .9s 1s both; }
@keyframes press { 0%, 100% { transform: scale(1); } 45% { transform: scale(.93); } }
@keyframes ripple { 0% { opacity: .6; box-shadow: 0 0 0 0 var(--p-blue); } 100% { opacity: 0; box-shadow: 0 0 0 14px var(--p-blue); } }
.mock__cursor {
  position: absolute; left: 80px; top: 18px; fill: var(--text); stroke: var(--bg); stroke-width: 1.5;
  opacity: 0; transform: translate(150px, 70px); transition: transform .9s cubic-bezier(.3,.7,.2,1), opacity .3s; pointer-events: none;
}
.s3 .mock__cursor { opacity: 1; transform: none; }

.mock__cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.mock__card { padding: 12px; display: grid; gap: 10px; }
.mock__card .swap { min-height: 16px; }
.mock__card .sk { width: 70%; }
.mock__card .real { font-size: 12px; font-weight: 500; }
.ico { width: 20px; height: 20px; border-radius: 50%; }
.s2 .mock__card.w { background: var(--bg); border: 1px solid var(--border); }
.s2 .ico { border-color: transparent; }
.s2 .ico--1 { background: var(--p-blue); }
.s2 .ico--2 { background: var(--p-yellow); border-radius: 3px; transform: rotate(45deg) scale(.82); }
.s2 .ico--3 { background: var(--p-pink); border-radius: 0; clip-path: polygon(50% 0, 100% 100%, 0 100%); }

/* Etapas do processo */
.steps { list-style: none; margin: 20px 0 0; padding: 0; position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; font-family: var(--mono); font-size: 11px; color: var(--muted); }
.steps::before, .steps::after { content: ""; position: absolute; left: 0; top: 0; height: 2px; border-radius: 2px; }
.steps::before { right: 0; background: var(--border); }
.steps::after { width: calc(var(--p, 0) * 100%); background: var(--p-blue); }
.steps li { padding-top: 12px; transition: color .4s; }
.steps li.on { color: var(--text); }

/* Quadradinhos voando */
.tiles { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.tile {
  position: absolute; left: 0; top: 0; will-change: transform; overflow: hidden;
  border-radius: calc(var(--wob, 1) * 6px);
  box-shadow: 0 10px 24px -12px rgb(0 0 0 / calc(var(--wob, 1) * .45));
}
.tile svg { width: 100%; height: 100%; display: block; animation: wob 4.5s ease-in-out infinite; animation-delay: var(--dl, 0s); }
@keyframes wob {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  50% { transform: translate(calc(var(--wob, 1) * 6px), calc(var(--wob, 1) * -9px)) rotate(calc(var(--wob, 1) * 10deg)); }
}

/* Dica de scroll */
.scroll-hint { position: absolute; left: max(16px, calc((100% - var(--maxw)) / 2 + 24px)); bottom: 28px; display: none; flex-direction: row; align-items: center; gap: 8px; font-family: var(--mono); font-size: 11px; color: var(--muted); transition: opacity .4s; z-index: 3; }
.is-pinned .scroll-hint { display: flex; }
.scroll-hint.hide { opacity: 0; }
.scroll-hint .mouse { width: 20px; height: 30px; border: 1.5px solid var(--muted); border-radius: 10px; position: relative; }
.scroll-hint .mouse::after { content: ""; position: absolute; left: 50%; top: 6px; width: 3px; height: 6px; margin-left: -1.5px; border-radius: 2px; background: var(--muted); animation: wheel 1.6s ease-in-out infinite; }
@keyframes wheel { 0% { transform: translateY(0); opacity: 1; } 100% { transform: translateY(9px); opacity: 0; } }

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .mock-wrap { justify-self: stretch; max-width: none; }
  .hero-stage { padding: 88px 0 56px; }
}
@media (max-height: 760px) and (min-width: 861px) {
  .hero-copy .hero__lead { display: none; }
  .mock__cards { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .w, .swap .real, .mock__cursor, .mock__tag > span { transition: none; }
  .s3 .mock__btn, .s3 .mock__btn::after, .tile svg, .scroll-hint .mouse::after { animation: none; }
}

/* ---------- Mosaico geométrico ---------- */
.mosaic {
  --tile: 64px;
  display: grid;
  grid-auto-flow: column;
  grid-template-rows: repeat(var(--rows, 2), var(--tile));
  grid-auto-columns: var(--tile);
  overflow: hidden;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.mosaic--thin { --rows: 1; --tile: 40px; border-bottom: 0; }
.mosaic svg { width: 100%; height: 100%; display: block; transition: transform .5s cubic-bezier(.2,.7,.2,1); }
.mosaic svg:hover { transform: rotate(90deg); }
:is(.mosaic, .tiles, .skill__tile) .c0 { fill: var(--p-green); }
:is(.mosaic, .tiles, .skill__tile) .c1 { fill: var(--p-blue); }
:is(.mosaic, .tiles, .skill__tile) .c2 { fill: var(--p-yellow); }
:is(.mosaic, .tiles, .skill__tile) .c3 { fill: var(--p-pink); }
:is(.mosaic, .tiles, .skill__tile) .c4 { fill: var(--p-sky); }
@media (max-width: 720px) { .mosaic { --tile: 48px; } .mosaic--thin { --tile: 32px; } }
@media (prefers-reduced-motion: reduce) { .mosaic svg:hover { transform: none; } }

/* ---------- Sections ---------- */
.section { padding-top: 96px; padding-bottom: 32px; }
.section__head { margin-bottom: 48px; }
.label { display: block; font-family: var(--mono); font-size: 12.5px; color: var(--accent); margin-bottom: 14px; letter-spacing: .02em; }
.section__head h2, .contact__title { font-size: clamp(1.75rem, 3.5vw, 2.5rem); max-width: 22ch; }

/* ---------- Work grid ---------- */
.work { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.card { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); overflow: hidden; transition: border-color .25s, transform .25s, box-shadow .25s; }
.card:hover { border-color: color-mix(in srgb, var(--muted) 50%, var(--border)); transform: translateY(-3px); box-shadow: 0 20px 40px -24px rgb(0 0 0 / .25); }
.card__link { display: block; }
.card__media {
  aspect-ratio: 16 / 10; display: grid; place-items: center; overflow: hidden;
  background: linear-gradient(135deg, var(--c1, #eee), var(--c2, #ddd));
  border-bottom: 1px solid var(--border);
}
.card__media:not(.cover) img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.card:hover .card__media:not(.cover) img { transform: scale(1.03); }
.card__placeholder { font-family: var(--mono); font-size: 12px; color: #fffc; mix-blend-mode: normal; }
.card__media[style*="yellow"] .card__placeholder, .card__media[style*="pink"] .card__placeholder { color: #0009; }
.card__body { padding: 22px 24px 26px; }
.card__meta { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.card h3 { font-size: 19px; margin-bottom: 8px; }
.card .arrow { display: inline-block; color: var(--muted); transition: transform .25s, color .25s; }
.card:hover .arrow { transform: translateX(4px); color: var(--accent); }
.card p { color: var(--muted); font-size: 15px; margin-bottom: 16px; }
.tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tags li { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--border); color: var(--text); }
.tags li::before { content: ""; width: 7px; height: 7px; border-radius: 2px; background: var(--p-blue); }
.tags li:nth-child(4n+2)::before { background: var(--p-yellow); border-radius: 50%; }
.tags li:nth-child(4n+3)::before { background: var(--p-pink); transform: rotate(45deg); }
.tags li:nth-child(4n+4)::before { background: var(--p-green); }

/* ---------- About ---------- */
.about { display: grid; grid-template-columns: 1.4fr 1fr; gap: 64px; }
.about__text p { font-size: 17px; }

/* ---------- Timeline ---------- */
.timeline { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--border); }
.timeline li { display: grid; grid-template-columns: 180px 1fr; gap: 24px; padding: 28px 0; border-bottom: 1px solid var(--border); }
.timeline__date { font-family: var(--mono); font-size: 13px; color: var(--muted); padding-top: 3px; }
.timeline h3 { font-size: 18px; margin-bottom: 6px; }
.timeline p { color: var(--muted); margin: 0; }

/* ---------- Trajetória: profissional / formação ---------- */
.track + .track { margin-top: 72px; }
.track__title {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 13px; font-weight: 500; letter-spacing: .04em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 16px;
}
.track__icon { width: 12px; height: 12px; display: inline-block; }
.track__icon--work { background: var(--p-blue); border-radius: 2px; }
.track__icon--study { background: var(--p-yellow); border-radius: 50%; }
.certs__title { font-size: 15px; font-weight: 600; margin: 40px 0 16px; }
.certs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.certs li {
  display: flex; flex-direction: column; gap: 6px;
  padding: 20px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface);
  border-top: 3px solid var(--p-pink);
}
.certs li:nth-child(3n+2) { border-top-color: var(--p-green); }
.certs li:nth-child(3n+3) { border-top-color: var(--p-blue); }
.certs strong { font-size: 15px; font-weight: 600; line-height: 1.35; letter-spacing: -0.01em; }
.certs__org, .certs__year { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.certs__year { margin-top: auto; padding-top: 6px; }
@media (max-width: 860px) { .certs { grid-template-columns: 1fr; } }

/* ---------- Contact / Footer ---------- */
.contact { padding-top: 128px; padding-bottom: 128px; }
.contact__title { font-size: clamp(2rem, 5vw, 3.5rem); }
.footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding-top: 28px; padding-bottom: 40px; border-top: 1px solid var(--border); font-size: 13.5px; }

/* ---------- Case study ---------- */
.case { padding-top: 80px; padding-bottom: 96px; }
.case__back { font-size: 14px; color: var(--muted); display: inline-block; margin-bottom: 40px; }
.case__back:hover { color: var(--text); }
.case h1 { font-size: clamp(2rem, 5vw, 3.25rem); max-width: 20ch; margin-bottom: 20px; }
.case__facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; padding: 28px 0; margin: 40px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.case__facts dt { font-family: var(--mono); font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.case__facts dd { margin: 0; font-size: 15px; }
.case__hero { border-radius: var(--radius); border: 1px solid var(--border); aspect-ratio: 16/9; margin-bottom: 64px; }
.prose { max-width: 680px; }
.prose h2 { font-size: 24px; margin: 56px 0 16px; }
.prose p, .prose li { font-size: 17px; color: color-mix(in srgb, var(--text) 82%, var(--bg)); }
.prose ul { padding-left: 20px; }
.prose figure { margin: 32px 0; }
.prose figcaption { font-size: 13px; color: var(--muted); margin-top: 8px; }
.metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 24px 0; }
.metric { border: 1px solid var(--border); border-radius: 12px; padding: 20px; background: var(--surface); }
.metric strong { display: block; font-size: 28px; letter-spacing: -0.03em; }
.metric span { font-size: 13px; color: var(--muted); }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .about { grid-template-columns: 1fr; gap: 40px; }
  .case__facts { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .container { padding: 0 16px; }
  .nav__links { display: none; }
  .hero { padding-top: 72px; padding-bottom: 56px; }
  .section { padding-top: 72px; }
  .work { grid-template-columns: 1fr; }
  .timeline li { grid-template-columns: 1fr; gap: 6px; }
  .metrics { grid-template-columns: 1fr; }
  .contact { padding-top: 88px; padding-bottom: 88px; }
}

/* ---------- Case study: imagens ---------- */
.case__hero img { display: block; }
.prose figure img { display: block; width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--border); background: #fff; }
.prose figure a { display: block; cursor: zoom-in; }
.prose.figure--wide { width: auto; max-width: none; margin: 40px 0; }
.case__list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; padding: 0 !important; list-style: none; margin: 20px 0; }
.case__list li { border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; background: var(--surface); font-size: 15px !important; }
.case__list li b { display: block; font-family: var(--mono); font-size: 12px; font-weight: 500; color: var(--accent); margin-bottom: 4px; }
.case__links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 40px; }
@media (max-width: 640px) { .case__list { grid-template-columns: 1fr; } }

/* ---------- Case study: tabelas e personas ---------- */
.metrics--6 { grid-template-columns: repeat(3, 1fr); }
.case__table-wrap { overflow-x: auto; margin: 24px 0; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.case__table { width: 100%; border-collapse: collapse; font-size: 14.5px; min-width: 560px; }
.case__table th { text-align: left; font-family: var(--mono); font-size: 12px; font-weight: 500; color: var(--muted); padding: 14px 16px; border-bottom: 1px solid var(--border); }
.case__table td { padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: top; color: color-mix(in srgb, var(--text) 82%, var(--bg)); }
.case__table tr:last-child td { border-bottom: 0; }
.case__table td:first-child { color: var(--text); font-weight: 500; white-space: nowrap; }
.personas { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 24px 0; }
.persona { border: 1px solid var(--border); border-radius: 12px; padding: 20px; background: var(--surface); }
.persona h3 { font-size: 17px; margin-bottom: 2px; }
.persona__meta { font-family: var(--mono); font-size: 12px; color: var(--muted); margin-bottom: 12px; display: block; }
.persona p { font-size: 14px !important; margin: 0 0 8px; }
.persona p b { color: var(--text); font-weight: 600; }
@media (max-width: 860px) { .personas, .metrics--6 { grid-template-columns: 1fr; } }

/* ---------- Case study: imagem com texto ao lado ---------- */
.case__split { display: grid; grid-template-columns: 340px 1fr; gap: 40px; align-items: center; margin: 32px 0; }
.case__split img { width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--border); display: block; }
.case__split ol { margin: 0; padding-left: 20px; }
.case__split li { font-size: 15.5px; margin-bottom: 10px; color: color-mix(in srgb, var(--text) 82%, var(--bg)); }
.case__split li b { color: var(--text); }
.case__note { font-size: 14px !important; color: var(--muted) !important; border-left: 2px solid var(--border); padding-left: 14px; margin-top: 24px; }
@media (max-width: 760px) { .case__split { grid-template-columns: 1fr; } .case__split img { max-width: 340px; } }

/* ---------- Sobre: foto ---------- */
.about { align-items: start; }
.about__text p:first-child { margin-top: 0; }
.about__photo { position: relative; margin: 6px 14px 14px 0; width: 100%; max-width: 340px; justify-self: end; }
.about__photo::before { content: ""; position: absolute; inset: 14px -14px -14px 14px; border-radius: 20px; background: var(--p-green); }
.about__photo img { position: relative; display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 20px; border: 1px solid var(--border); }
.about__photo figcaption { position: absolute; left: 14px; bottom: 14px; display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); font-family: var(--mono); font-size: 12px; color: var(--text); }
.about__photo figcaption .dot { width: 7px; height: 7px; }

/* ---------- Sobre: o que eu faço ---------- */
.skills { margin-top: 88px; }
.skills__title { font-family: var(--mono); font-size: 12px; font-weight: 500; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 20px; }
.skills__grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.skill { position: relative; border: 1px solid var(--border); border-radius: 16px; padding: 20px; background: var(--surface); transition: border-color .25s, transform .25s; }
.skill:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--muted) 50%, var(--border)); }
.skill__tile { display: block; width: 44px; height: 44px; border-radius: 10px; overflow: hidden; margin-bottom: 28px; }
.skill__tile svg { display: block; width: 100%; height: 100%; transition: transform .5s cubic-bezier(.2,.7,.2,1); }
.skill:hover .skill__tile svg { transform: rotate(90deg); }
.skill__num { position: absolute; top: 20px; right: 20px; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.skill h3 { font-size: 16px; margin: 0 0 6px; }
.skill p { margin: 0; font-size: 14px; color: var(--muted); line-height: 1.5; }

/* ---------- Sobre: ferramentas (faixa rolando) ---------- */
.tools { margin-top: 48px; }
.tools__track { display: flex; overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.tools__list { list-style: none; margin: 0; padding: 0 12px 0 0; display: flex; gap: 12px; flex-shrink: 0; animation: tools-scroll 32s linear infinite; }
.tools__track:hover .tools__list { animation-play-state: paused; }
.tools__list li { display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; padding: 10px 18px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); font-size: 15px; }
.tools__list i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.tools__list .t0 { background: var(--p-green); }
.tools__list .t1 { background: var(--p-blue); border-radius: 50%; }
.tools__list .t2 { background: var(--p-yellow); }
.tools__list .t3 { background: var(--p-pink); border-radius: 50%; }
.tools__list .t4 { background: var(--p-sky); }
@keyframes tools-scroll { to { transform: translateX(-100%); } }
@media (prefers-reduced-motion: reduce) {
  .tools__list { animation: none; flex-wrap: wrap; }
  .tools__list[aria-hidden] { display: none; }
  .tools__track { mask-image: none; -webkit-mask-image: none; }
}

@media (max-width: 980px) { .skills__grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 860px) { .about__photo { justify-self: start; max-width: 300px; } .skills { margin-top: 64px; } }
@media (max-width: 520px) { .skills__grid { grid-template-columns: 1fr; } .skill { display: grid; grid-template-columns: 44px 1fr; column-gap: 16px; } .skill__tile { margin: 0; grid-row: span 2; } }

/* ---------- Capas dos projetos ---------- */
.cover { position: relative; display: block; overflow: hidden; background: var(--cv-bg); isolation: isolate; }
.cover > * { position: absolute; }
.cover img { transition: transform .5s cubic-bezier(.2,.7,.2,1); }
.cover__tile { width: 13%; aspect-ratio: 1; border-radius: 10px; overflow: hidden; z-index: 0; transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.cover__tile svg { display: block; width: 100%; height: 100%; }
.card:hover .cover__tile { transform: rotate(90deg); }
:is(.cover__tile) .c0 { fill: var(--p-green); }
:is(.cover__tile) .c1 { fill: var(--p-blue); }
:is(.cover__tile) .c2 { fill: var(--p-yellow); }
:is(.cover__tile) .c3 { fill: var(--p-pink); }
:is(.cover__tile) .c4 { fill: var(--p-sky); }
.cover__shadow { filter: drop-shadow(0 18px 28px rgb(0 0 0 / .28)); }

/* Moldura de navegador */
.cover__browser { border-radius: 10px; overflow: hidden; background: #fff; box-shadow: 0 24px 48px -16px rgb(0 0 0 / .45); z-index: 1; transition: transform .5s cubic-bezier(.2,.7,.2,1); }
.cover__bar { display: flex; gap: 5px; align-items: center; height: 18px; padding: 0 9px; background: #eef0f2; border-bottom: 1px solid #dde1e5; }
.cover__bar i { width: 6px; height: 6px; border-radius: 50%; background: #c9ced4; }
.cover__bar i:nth-child(1) { background: #ff6159; } .cover__bar i:nth-child(2) { background: #ffbd2e; } .cover__bar i:nth-child(3) { background: #28c941; }
.cover__browser img { display: block; width: 100%; height: auto; }
.cover__chip { z-index: 3; display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 999px; background: #fff; color: #111; font-size: 12px; font-weight: 600; box-shadow: 0 12px 24px -10px rgb(0 0 0 / .35); white-space: nowrap; }
.cover__chip b { font-size: 15px; }

/* Airline: três telas em leque */
.cover--airline { --cv-bg: linear-gradient(150deg, #7c6cf2, #5546d6); }
.cover--airline .ph { width: 23%; top: 15%; z-index: 1; transition: transform .5s cubic-bezier(.2,.7,.2,1); }
.cover--airline .ph--1 { left: 17%; transform: rotate(-9deg) translateY(10%); }
.cover--airline .ph--2 { left: 38.5%; top: 9%; width: 25%; z-index: 2; }
.cover--airline .ph--3 { left: 61%; transform: rotate(9deg) translateY(10%); }
.card:hover .cover--airline .ph--1 { transform: rotate(-12deg) translate(-6%, 8%); }
.card:hover .cover--airline .ph--3 { transform: rotate(12deg) translate(6%, 8%); }
.card:hover .cover--airline .ph--2 { transform: translateY(-4%); }
.cover--airline .t1 { left: 4%; top: 8%; }
.cover--airline .t2 { right: 4%; bottom: 10%; width: 11%; }

/* Educoração: quebra-cabeça e foto */
.cover--edu { --cv-bg: #f3efe6; }
.cover--edu .puzzle { left: 7%; top: 50%; width: 27%; aspect-ratio: 1; transform: translateY(-50%) rotate(-8deg); display: grid; grid-template-columns: 1fr 1fr; gap: 5px; z-index: 1; }
.cover--edu .puzzle span { border-radius: 10px; }
.cover--edu .puzzle span:nth-child(1) { background: #e04b3f; } .cover--edu .puzzle span:nth-child(2) { background: #f2bf3c; }
.cover--edu .puzzle span:nth-child(3) { background: #4a8fd4; } .cover--edu .puzzle span:nth-child(4) { background: #40ac46; }
.cover--edu .puzzle svg { position: absolute; inset: 22%; width: 56%; height: 56%; }
.card:hover .cover--edu .puzzle { transform: translateY(-50%) rotate(0deg); transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.cover--edu .photo { right: 6%; top: 10%; width: 54%; height: 80%; border-radius: 16px; overflow: hidden; box-shadow: 0 24px 48px -18px rgb(0 0 0 / .4); z-index: 1; transform: rotate(2deg); transition: transform .5s cubic-bezier(.2,.7,.2,1); }
.cover--edu .photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 38%; display: block; transform: scale(1.22); transform-origin: 58% 40%; }
.card:hover .cover--edu .photo { transform: rotate(0deg) scale(1.02); }
.cover--edu .cover__chip { left: 30%; bottom: 11%; }
.cover--edu .cover__chip b { color: #2f8f36; }

/* Feirão: navegador + card flutuante */
.cover--banco { --cv-bg: radial-gradient(120% 120% at 100% 0%, #1f5262, #12303a 60%); }
.cover--banco .cover__browser { left: 7%; top: 12%; width: 74%; }
.cover--banco .float { right: 5%; bottom: -6%; width: 27%; border-radius: 12px; z-index: 2; transform: rotate(4deg); transition: transform .5s cubic-bezier(.2,.7,.2,1); box-shadow: 0 24px 40px -12px rgb(0 0 0 / .55); }
.card:hover .cover--banco .float { transform: rotate(0deg) translateY(-6%); }
.card:hover .cover--banco .cover__browser { transform: translateY(-3%); }
.cover--banco .t1 { right: 6%; top: 8%; width: 11%; }

/* Dream: navegador + brilhos */
.cover--dream { --cv-bg: linear-gradient(160deg, #47b866, #2f9a52); }
.cover--dream .cover__browser { left: 9%; top: 14%; width: 82%; }
.card:hover .cover--dream .cover__browser { transform: translateY(-3%); }
.cover--dream .spark { z-index: 2; width: 9%; fill: #fff; transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.cover--dream .spark--1 { right: 4%; top: 5%; }
.cover--dream .spark--2 { right: 12%; top: 1%; width: 5%; }
.cover--dream .spark--3 { left: 3%; bottom: 8%; width: 6%; fill: #1b1f1c; }
.card:hover .cover--dream .spark { transform: rotate(45deg) scale(1.1); }

@media (prefers-reduced-motion: reduce) { .cover *, .cover img { transition: none !important; } }

/* Capa grande no topo de cada case */
.case__hero.cover { aspect-ratio: 16 / 9; }
.case__hero .cover__bar { height: 30px; gap: 8px; padding: 0 14px; }
.case__hero .cover__bar i { width: 10px; height: 10px; }
.case__hero .cover__browser { border-radius: 16px; }
.case__hero .cover__tile { border-radius: 16px; }
.case__hero .cover__chip { padding: 12px 20px; font-size: 16px; gap: 10px; }
.case__hero .cover__chip b { font-size: 22px; }
.case__hero.cover--edu .photo, .case__hero.cover--banco .float { border-radius: 24px; }
.case__hero.cover--edu .puzzle { gap: 10px; }
.case__hero.cover--edu .puzzle span { border-radius: 18px; }
@media (max-width: 640px) {
  .case__hero .cover__bar { height: 16px; gap: 4px; padding: 0 8px; }
  .case__hero .cover__bar i { width: 5px; height: 5px; }
  .case__hero .cover__chip { padding: 6px 10px; font-size: 11px; }
  .case__hero .cover__chip b { font-size: 13px; }
}

/* ---------- Case: protótipo embutido e download ---------- */
.case__proto { margin-top: 24px; }
.embed { margin: 28px 0 20px; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); background: var(--surface); }
.embed iframe { display: block; width: 100%; height: 100%; border: 0; }
.download { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding: 20px 24px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); }
.download strong { display: block; font-size: 16px; margin-bottom: 2px; }
.download .muted { font-family: var(--mono); font-size: 12px; }
@media (max-width: 640px) { .embed { aspect-ratio: 4 / 5; } }

/* ---------- Entrelinhas: capa ---------- */
.cover--entre { --cv-bg: radial-gradient(130% 120% at 0% 100%, #4241b8 0%, #24237a 45%, #16154d 100%); container-type: inline-size; }
.cover--entre .stroke { left: 30%; right: -6%; top: 52%; height: 24%; background: #ffe36b; transform: rotate(-6deg); border-radius: 8px; z-index: 0; }
.cover--entre .ph { width: 21%; aspect-ratio: 585 / 1266; border-radius: 3cqw; border: .9cqw solid #0f0f12; overflow: hidden; background: #f7f4ee; box-shadow: 0 3cqw 5cqw -2cqw rgb(0 0 0 / .55); z-index: 1; transition: transform .5s cubic-bezier(.2,.7,.2,1); }
.cover--entre .ph img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.cover--entre .ph--1 { left: 39%; top: 21%; transform: rotate(-8deg); }
.cover--entre .ph--2 { left: 57.5%; top: 9%; width: 23%; z-index: 2; }
.cover--entre .ph--3 { left: 77%; top: 21%; transform: rotate(8deg); }
.card:hover .cover--entre .ph--1 { transform: rotate(-11deg) translate(-5%, 3%); }
.card:hover .cover--entre .ph--3 { transform: rotate(11deg) translate(5%, 3%); }
.card:hover .cover--entre .ph--2 { transform: translateY(-4%); }
.cover--entre .word { left: 5%; top: 8%; z-index: 3; font-family: "Source Serif 4", Georgia, serif; font-weight: 600; font-size: 2.6cqw; color: #fff; letter-spacing: -.01em; }
.cover--entre .word mark { color: #16154d; background: #ffe36b; border-radius: .2em; padding: 0 .2em; }
.cover--entre .clip { left: 5%; top: 27%; width: 34%; z-index: 3; background: #fffdf7; border-radius: 1.4cqw; padding: 2.2cqw 2.4cqw; transform: rotate(-3deg); box-shadow: 0 3cqw 5cqw -2cqw rgb(0 0 0 / .6); font-family: "Source Serif 4", Georgia, serif; font-size: 1.75cqw; line-height: 1.55; color: #2d2c33; transition: transform .5s cubic-bezier(.2,.7,.2,1); }
.cover--entre .clip small { display: block; font-family: var(--mono); font-size: 1.15cqw; letter-spacing: .06em; text-transform: uppercase; color: #77756f; margin-bottom: .8cqw; }
.cover--entre .clip mark { background: #ffe36b; color: inherit; padding: 0 .15em; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.card:hover .cover--entre .clip { transform: rotate(0deg) translateY(-3%); }
.cover--entre .alert { left: 8%; top: 74%; z-index: 4; display: inline-flex; align-items: center; gap: .8cqw; background: #fbe9e7; color: #b3261e; font-weight: 700; font-size: 1.6cqw; padding: .9cqw 1.6cqw; border-radius: 999px; box-shadow: 0 2cqw 3cqw -1.5cqw rgb(0 0 0 / .5); white-space: nowrap; }
.cover--entre .alert svg { width: 1.9cqw; height: 1.9cqw; }
.cover--entre .cover__tile { right: 3%; top: 5%; width: 8%; z-index: 0; opacity: .95; }

/* ---------- Telas em moldura de celular ---------- */
.screens { display: grid; grid-template-columns: repeat(var(--n, 3), 1fr); gap: 24px; margin: 36px 0; }
.screen-shot { margin: 0; }
.screen-shot .frame { border: 6px solid #17171a; border-radius: 30px; overflow: hidden; background: #f7f4ee; box-shadow: 0 24px 48px -24px rgb(0 0 0 / .35); }
.screen-shot img { display: block; width: 100%; height: auto; }
.screen-shot figcaption { font-size: 13px; color: var(--muted); margin-top: 12px; line-height: 1.5; }
.screen-shot figcaption b { color: var(--text); font-weight: 600; display: block; margin-bottom: 2px; }
@media (max-width: 760px) { .screens { grid-template-columns: repeat(2, 1fr); gap: 16px; } .screen-shot .frame { border-width: 4px; border-radius: 22px; } }

/* Tabela da lei */
.law-table td:nth-child(2) { white-space: normal; }

/* Protótipo embutido (com mapa de telas) */
.embed--proto { aspect-ratio: auto; height: 940px; background: #e9e6df; }
@media (max-width: 760px) { .embed--proto { height: 780px; } }

/* ---------- Card em destaque na home ---------- */
.card--feature { grid-column: 1 / -1; }
.card--feature .card__link { display: grid; grid-template-columns: 1.25fr 1fr; }
.card--feature .card__media { aspect-ratio: 16 / 10; border-bottom: 0; border-right: 1px solid var(--border); }
.card--feature .card__body { padding: 32px; align-self: center; }
.card--feature h3 { font-size: 24px; }
.card__badge { display: inline-block; font-family: var(--mono); font-size: 11.5px; padding: 3px 10px; border-radius: 999px; background: var(--p-yellow); color: #1b1b1f; margin-bottom: 12px; }
@media (max-width: 860px) {
  .card--feature .card__link { grid-template-columns: 1fr; }
  .card--feature .card__media { border-right: 0; border-bottom: 1px solid var(--border); }
  .card--feature .card__body { padding: 22px 24px 26px; }
}
