/* ============================================================
   Guilherme Marinho — site (dark-cinematográfico, vanilla)
   Multi-página por tipologia. Sem build.
   ============================================================ */

/* @view-transition cross-página removido: o currículo virou overlay, não há mais
   navegação entre páginas — evita o "Transition was skipped" benigno no reload.
   Os morphs do grid/detalhe usam document.startViewTransition (mesmo documento). */

/* Camadas de cascata explícitas (sem build): base < components < pages.
   Overrides de estado de página (body.is-expanded) vivem em `pages` e vencem
   `components` por estarem numa camada POSTERIOR — não dependem só de especificidade.
   Os pseudos de View Transition ficam top-level (fora das camadas), no fim do arquivo. */
@layer base, components, pages;

@layer base {

:root {
  --bg:     #0b0b0c;
  --bg-2:   #141416;
  --ink:    #f3f1ec;
  --muted:  #a8a39a;   /* clareado p/ contraste AA (≈5.2:1 no bg) */
  --line:   #2a2a2e;
  --accent: #d08a4f;   /* âmbar — eco do laranja da marca do Guit */

  /* cor por tipologia — cada filtro/tag/título/máscara pega a sua. Trocar aqui é trivial. */
  --ty-hospitalar:            #3fa7a0;   /* teal clínico */
  --ty-comercial:             #d08a4f;   /* âmbar (marca) */
  --ty-residencial:           #cf7e6b;   /* terracota */
  --ty-urbanismo-mobilidade:  #6d97cf;   /* azul-aço */
  --ty-obras-executadas:      #8f9e5c;   /* sálvia-oliva */

  --font-display: "Anton", Impact, sans-serif;
  --font-sans: "Inter", system-ui, sans-serif;
  --font-mono: "Space Mono", ui-monospace, monospace;

  --maxw: 720px;
  --gut: clamp(20px, 5vw, 36px);
  --sp: clamp(60px, 13vw, 110px);

  /* View Transitions (morph expand/collapse) — ajuste o tom aqui. */
  --vt-dur: 560ms;
  --vt-dur-collapse: 460ms;
  --vt-ease: cubic-bezier(.22, .61, .36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; background: #000; }
body {
  background: var(--bg); color: var(--ink);
  font-family: var(--font-sans); font-weight: 300;
  font-size: 17px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
  max-width: 720px; margin-inline: auto; min-height: 100svh; position: relative;   /* MOBILE-ONLY: site vira coluna de 720 centrada (html #000 nas laterais) */
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
::selection { background: var(--accent); color: #000; }

.mono { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; }
.section__label { color: var(--muted); }
em { font-style: normal; color: var(--accent); }

/* acessibilidade */
.skip-link {
  position: fixed; top: -100px; left: 16px; z-index: 100;
  background: var(--accent); color: #000; padding: 10px 16px;
  font-family: var(--font-mono); font-size: 13px; border-radius: 2px;
  transition: top .2s;
}
.skip-link:focus { top: 16px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* fundo revelado no hover (desktop) */
.revealbg {
  position: fixed; inset: 0; z-index: 0; display: none;   /* reveal-on-hover é efeito desktop; off no mobile-only */
  background-size: cover; background-position: center;
  opacity: 0; transition: opacity .6s ease;
}
.revealbg::after { content: ""; position: absolute; inset: 0; background: rgba(11,11,12,.6); }
body.is-revealing .revealbg { opacity: 1; }

}  /* @layer base */

@layer components {

/* ============================================================ NAV (hambúrguer + título sticky) */
.nav {
  position: fixed; top: 0; left: 0; right: 0; margin-inline: auto; width: min(100%, 720px); z-index: 56;   /* centra SEM transform (transform reancoraria o .nav__panel fixed) */
  display: flex; align-items: center; gap: 16px;
  padding: 18px var(--gut); color: #fff;
  border-bottom: 1px solid transparent;
  transition: background .4s ease, padding .3s ease, border-color .4s ease;
}
.nav.is-scrolled { background: rgba(11,11,12,.82); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); padding-top: 12px; padding-bottom: 12px; border-bottom-color: var(--line); }
.nav__brand { font-family: var(--font-mono); font-weight: 700; font-size: 15px; letter-spacing: .1em; text-decoration: none; flex-shrink: 0; text-shadow: 0 1px 10px rgba(0,0,0,.5); }
.nav__brand span { color: var(--accent); }
.nav__here { flex: 1; min-width: 0; font-family: var(--font-mono); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: 0; transform: translateX(-6px); transition: opacity .4s, transform .4s; text-shadow: 0 1px 8px rgba(0,0,0,.5); }
.nav.is-scrolled .nav__here { opacity: 1; transform: none; }
.nav__toggle { flex-shrink: 0; margin-left: auto; display: flex; flex-direction: column; justify-content: center; gap: 5px; width: 30px; height: 22px; padding: 0; background: none; border: none; cursor: pointer; color: inherit; }
.nav__toggle span { display: block; width: 100%; height: 2px; background: currentColor; border-radius: 2px; box-shadow: 0 1px 6px rgba(0,0,0,.4); transition: transform .3s ease, opacity .25s ease; }
.nav__toggle.is-open { color: var(--ink); }
.nav__toggle.is-open span { box-shadow: none; }
.nav__toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle.is-open span:nth-child(2) { opacity: 0; }
.nav__toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.nav__panel { position: fixed; top: 0; right: 0; z-index: 55; height: 100vh; width: min(340px, 82vw); display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 100px 40px 40px; background: var(--bg-2); border-left: 1px solid var(--line); transform: translateX(100%); transition: transform .42s cubic-bezier(.2,.8,.2,1); }   /* fecha 100% fora (ancorado no viewport) — robusto */
.nav__panel.is-open { transform: translateX(calc(-1 * max(0px, 50vw - 360px))); }   /* aberto: encosta na borda direita da coluna de 720 */
.nav__panel a { font-family: var(--font-display); font-weight: 400; font-size: clamp(30px,5vw,46px); line-height: 1.18; text-transform: uppercase; text-decoration: none; color: var(--ink); transition: color .2s; }
.nav__panel a:hover, .nav__panel a:focus-visible { color: var(--accent); }
.nav__backdrop { position: fixed; inset: 0; z-index: 54; background: rgba(8,8,9,.6); opacity: 0; pointer-events: none; transition: opacity .42s; }
.nav__backdrop.is-open { opacity: 1; pointer-events: auto; }
@media (max-width: 600px) { .nav__here { display: none; } }
/* MOBILE-ONLY: removido o bloco @media(min-width:861px) que punha a nav inline no desktop.
   A nav fica sempre hambúrguer + gaveta. Preservado só o realce da página atual: */
.nav__panel a[aria-current="page"] { color: var(--accent); }

/* ============================================================ HERO */
.hero { position: relative; isolation: isolate; min-height: 100svh; display: flex; align-items: flex-end; overflow: hidden; }   /* isolate: contém o hero__media (z-index:-2) agora que o html tem fundo próprio (sem propagação do body) */
.hero__media { position: absolute; inset: 0; z-index: -2; }
.hero__slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1.1s ease; overflow: hidden; }
.hero__slide.is-active { opacity: 1; }
.hero__slide img, .hero__slide video { width: 100%; height: 100%; object-fit: cover; filter: grayscale(.2) contrast(1.04) brightness(.5); }
/* Ken Burns: imagem estática ganha zoom lento contínuo enquanto ativa (efeito de vídeo) */
@keyframes kenburns { from { transform: scale(1); } to { transform: scale(1.1); } }
.hero__slide.is-active img { animation: kenburns 7s ease-out forwards; }
.hero__media::after { content:""; position:absolute; inset:0; z-index:2; background: linear-gradient(180deg, rgba(11,11,12,.5), rgba(11,11,12,.15) 38%, var(--bg) 100%); }
.hero__dots { position: absolute; left: 50%; transform: translateX(-50%); bottom: clamp(26px,4vw,46px); z-index: 3; display: flex; gap: 10px; }
/* botão com área de clique de 17px; o visual continua a barra de 3px (background-clip) */
.hero__dots button { position: relative; width: 34px; height: 17px; border: none; padding: 7px 0; cursor: pointer; background: rgba(255,255,255,.3); background-clip: content-box; overflow: hidden; }
.hero__dots button .fill { position: absolute; inset: 7px 0; background: var(--accent); transform: scaleX(0); transform-origin: left; }
.hero__inner { position: relative; z-index: 1; width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gut) clamp(40px,6vw,72px); }
.hero__eyebrow { color: var(--muted); margin-bottom: 16px; text-shadow: 0 1px 8px rgba(0,0,0,.7); }
.hero__title { font-family: var(--font-display); font-weight: 400; font-size: clamp(56px, 15vw, 80px); line-height: .9; letter-spacing: .01em; text-transform: uppercase; text-shadow: 0 2px 22px rgba(0,0,0,.5); }
@media (max-width: 600px) { .hero__title { font-size: clamp(56px, 16vw, 80px); } }
.hero__lede { max-width: 54ch; color: var(--accent); margin-top: 22px; font-size: clamp(12px, 1.2vw, 15px); line-height: 1.45; text-shadow: 0 1px 10px rgba(0,0,0,.6); }
.hero__scroll { position: absolute; right: var(--gut); bottom: clamp(40px,6vw,72px); z-index: 1; color: var(--muted); text-shadow: 0 1px 8px rgba(0,0,0,.7); }
@media (max-width: 600px){ .hero__scroll { display:none; } }

.btn { display: inline-block; font-family: var(--font-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; text-decoration: none; color: #000; background: var(--ink); padding: 14px 26px; border: 1px solid var(--ink); transition: background .25s, color .25s, transform .25s; }
.btn:hover { background: var(--accent); border-color: var(--accent); transform: translateY(-2px); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { background: var(--ink); color: #000; }

/* ============================================================ GRID DE TIPOLOGIAS */
.work { position: relative; z-index: 1; max-width: var(--maxw); margin: 0 auto; padding: var(--sp) var(--gut); }
.work__head { display: flex; justify-content: space-between; border-bottom: 1px solid var(--line); padding-bottom: 16px; margin-bottom: clamp(24px,4vw,44px); color: var(--muted); }

.tcard {
  position: relative; display: flex; flex-direction: column; justify-content: flex-end;
  min-height: clamp(200px, 26vw, 360px); padding: clamp(16px,1.8vw,28px);
  text-decoration: none; color: #fff; overflow: hidden; border: 1px solid var(--line);
  isolation: isolate;
  transition: border-color .35s ease;
}
.tcard:hover { border-color: var(--ty, var(--accent)); }
/* capa SEMPRE visível como <img> real (resolve mobile/touch + a11y; não depende de hover) */
.tcard__cover {
  position: absolute; inset: 0; z-index: -2;
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 1s cubic-bezier(.2,.8,.2,1); /* volta rápida ao sair */
}
.tcard::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(11,11,12,.12) 0%, rgba(11,11,12,.55) 62%, color-mix(in srgb, var(--ty, var(--accent)) 40%, rgba(11,11,12,.9)) 100%);
  transition: background .4s ease;
}
/* zoom lento quase-infinito enquanto o mouse está em cima (até sair ou clicar) */
.tcard:hover .tcard__cover { transform: scale(1.35); transition: transform 28s cubic-bezier(.12,.5,.25,1); }
.tcard:hover::after { background: linear-gradient(180deg, rgba(11,11,12,.04) 0%, rgba(11,11,12,.4) 55%, color-mix(in srgb, var(--ty, var(--accent)) 36%, rgba(11,11,12,.78)) 100%); }
.tcard__count { color: #fff; font-weight: 700; font-size: 13px; margin-bottom: 10px; text-shadow: 0 1px 6px rgba(0,0,0,.85), 0 0 2px rgba(0,0,0,.6); }
.tcard__name { font-family: var(--font-display); font-weight: 400; font-size: clamp(26px,3.4vw,50px); line-height: .96; text-transform: uppercase; color: var(--ty, #fff); text-shadow: 0 2px 14px rgba(0,0,0,.55); }

/* ===== GRID DE PROJETOS (1 projeto por tile + filtros) — redesign 26/06 ===== */
/* slug da tipologia → --ty (vale pro tile [data-typology] e pro chip [data-slug]) */
[data-typology="hospitalar"],            .filterchip[data-slug="hospitalar"]            { --ty: var(--ty-hospitalar); }
[data-typology="comercial"],             .filterchip[data-slug="comercial"]             { --ty: var(--ty-comercial); }
[data-typology="residencial"],           .filterchip[data-slug="residencial"]           { --ty: var(--ty-residencial); }
[data-typology="urbanismo-mobilidade"],  .filterchip[data-slug="urbanismo-mobilidade"]  { --ty: var(--ty-urbanismo-mobilidade); }
[data-typology="obras-executadas"],      .filterchip[data-slug="obras-executadas"]      { --ty: var(--ty-obras-executadas); }
#projetos { padding-block: clamp(56px, 9vw, 110px); }   /* sem o home-snap centrado, dá respiro moderado */
.projgrid { list-style: none; display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(10px, 1.2vw, 18px); }
.projgrid__wide { grid-column: 1 / -1; }
/* tile de projeto: proporção FIXA (mesma em mobile e desktop); reusa todo o .tcard
   (capa absoluta, gradiente ::after, hover slow-zoom + borda âmbar). */
.projtile { min-height: 0; aspect-ratio: 4 / 3; padding: clamp(12px, 1.5vw, 22px); }
.projtile--wide { aspect-ratio: 3 / 1; }                /* Obras: banner full-width */
/* tag de tipologia: âmbar discreto sobre o nome (o .mono dá a fonte/tracking) */
.tcard__tag { color: var(--ty, var(--accent)); font-size: 10px; margin-bottom: 6px; opacity: .92; text-shadow: 0 1px 6px rgba(0,0,0,.85); }
/* nome do projeto menor que o nome de tipologia (tile menor + nome mais longo) */
.projtile .tcard__name { font-size: clamp(15px, 1.5vw, 23px); line-height: 1.02; text-transform: none; }
.projtile--wide .tcard__name { font-size: clamp(22px, 3vw, 40px); text-transform: uppercase; }

/* barra de filtros (chips de tipologia) — no .work__head, ao lado do label "Projetos" */
.work__head { flex-wrap: wrap; gap: 10px 16px; align-items: center; }
.filterbar { display: flex; flex-wrap: wrap; gap: 8px; }
@media (max-width: 560px) { .filterbar { width: 100%; } }
.filterchip {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .04em; text-transform: uppercase;
  color: var(--muted); background: transparent; border: 1px solid var(--line);
  padding: 6px 12px; cursor: pointer; transition: color .2s, border-color .2s;
}
.filterchip:hover { color: var(--ink); border-color: var(--muted); }
.filterchip.is-on { color: var(--ty, var(--accent)); border-color: var(--ty, var(--accent)); }   /* tipologia ativa = cor da tipologia */
.filterchip--all.is-on { color: var(--ink); border-color: var(--line); }            /* "Todos" ativo = neutro */
@keyframes chipFloor { 0%,100% { transform: translateX(0); } 20% { transform: translateX(-3px); } 60% { transform: translateX(3px); } }
.filterchip.is-floor { animation: chipFloor .3s ease; }

/* ===== DETALHE DO PROJETO (painel fixed full-screen; morph do tile) ===== */
.detail { position: fixed; top: 0; left: 0; right: 0; margin-inline: auto; width: min(100%, 720px); height: 100svh; z-index: 90; background: var(--bg); overflow-y: auto; -webkit-overflow-scrolling: touch; }
.detail[hidden] { display: none; }
body.detail-open { overflow: hidden; }
/* hero maior que o slot antigo (22vh → ~44vh) pra dar peso ao detalhe */
.detail .detail__hero { height: clamp(260px, 44vh, 520px); min-height: 0; }
/* corpo: flui e scrolla COM o .detail (não é contido como no slot antigo); centrado */
.detail .detail__body { flex: none; min-height: 0; overflow: visible; border-top: 0; width: 100%; max-width: var(--maxw); margin: 0 auto; padding: clamp(20px, 3vw, 44px) var(--gut) clamp(48px, 7vw, 90px); }
/* timeline das Obras no detalhe: sem o scroll interno do slot */
.detail .timeline-embed { flex: none; overflow: visible; padding: 0; }

/* ============================================================ VIEWER 3D */
.viewer__stage { position: relative; overflow: visible; }
.prj__media > .viewer__stage { aspect-ratio: 4/3; } /* fallback de altura se o JS não montar o .prj__preview */
/* cursor seta (do guit-website) — SÓ dentro do canvas 3D; resto do site usa o padrão */
.viewer__stage canvas { display: block; width: 100%; height: 100%; cursor: url('../img/cursor-arrow.svg') 5 5, grab; }
.viewer__stage canvas:active { cursor: url('../img/cursor-arrow.svg') 5 5, grabbing; }
.viewer__loading { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 12px; color: var(--muted); font-family: var(--font-mono); font-size: 12px; text-transform: uppercase; text-shadow: 0 1px 6px rgba(0,0,0,.7); transition: opacity .5s; }
.viewer__loading.is-hidden { opacity: 0; pointer-events: none; }
.spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
/* botões discretos de câmera no card (reset + topo) — aparecem no hover do stage */
.viewer__ctrls { position: absolute; top: 10px; right: 10px; display: flex; gap: 6px; z-index: 3; opacity: 0; transition: opacity .25s; }
.viewer__stage:hover .viewer__ctrls, .viewer__ctrls:focus-within { opacity: 1; }
.viewer__ctrl { font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); background: rgba(11,11,12,.72); border: 1px solid var(--line); padding: 5px 9px; cursor: pointer; transition: color .2s, border-color .2s; }
.viewer__ctrl:hover { color: var(--ink); border-color: var(--accent); }
@media (hover: none) { .viewer__ctrls { opacity: .85; } }

/* ============================================================ CONTATO (links do Sobre) + FOOTER */
.contato__links { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.contato__links a { display: block; padding: 22px 0; border-bottom: 1px solid var(--line); text-decoration: none; font-size: clamp(13px,1.6vw,16px); transition: padding-left .3s, color .3s; }
.contato__links a:hover { padding-left: 18px; color: var(--accent); }

.foot { max-width: var(--maxw); margin: 0 auto; padding: 40px var(--gut); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; color: var(--muted); border-top: 1px solid var(--line); position: relative; z-index: 1; }

/* ============================================================ REVEAL ON SCROLL */
.reveal { opacity: 0; transform: translateY(28px); }
.reveal.is-in { opacity: 1; transform: none; transition: opacity 1s cubic-bezier(.2,.8,.2,1), transform 1s cubic-bezier(.2,.8,.2,1); }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
  /* sem Ken Burns nos heros e sem zoom-lento nos tiles (viewer.js já respeita via matchMedia) */
  .hero__slide.is-active img, .thero__slide.is-active img { animation: none; }
  .tcard__cover, .tcard:hover .tcard__cover { transform: none; transition: none; }
}

/* ============================================================ PÁGINA DE TIPOLOGIA (projetos) */
.thero { position: relative; min-height: 62svh; display: flex; align-items: flex-end; overflow: hidden; }
.thero__bg { position: absolute; inset: 0; z-index: -2; }
.thero__bg img, .thero__bg video { width: 100%; height: 100%; object-fit: cover; filter: grayscale(.2) brightness(.5); }
.thero__slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1.1s ease; overflow: hidden; }
.thero__slide.is-active { opacity: 1; }
.thero__slide.is-active img { animation: kenburns 7s ease-out forwards; }
.thero__bg::after { content:""; position:absolute; inset:0; z-index: 1; background: linear-gradient(180deg, rgba(11,11,12,.4), var(--bg)); }
.thero__dots { position: absolute; right: var(--gut); bottom: clamp(20px,3vw,34px); z-index: 2; display: flex; gap: 8px; }
/* mesma área de clique de 17px dos dots do hero (visual: barra de 3px) */
.thero__dots button { position: relative; width: 34px; height: 17px; border: none; padding: 7px 0; cursor: pointer; background: rgba(255,255,255,.3); background-clip: content-box; overflow: hidden; }
.thero__dots button .fill { position: absolute; inset: 7px 0; background: var(--accent); transform: scaleX(0); transform-origin: left; }
.thero__inner { position: relative; z-index: 1; max-width: var(--maxw); width: 100%; margin: 0 auto; padding: 0 var(--gut) clamp(30px,4vw,56px); }
.thero__back { position: relative; z-index: 2; color: var(--muted); text-decoration: none; text-shadow: 0 1px 8px rgba(0,0,0,.75); transition: color .25s; }
.thero__back:hover { color: var(--accent); }
.thero__title { font-family: var(--font-display); font-weight: 400; font-size: clamp(40px,8vw,110px); line-height: .92; text-transform: uppercase; margin-top: 12px; text-shadow: 0 2px 18px rgba(0,0,0,.5); }
.thero__sub { color: var(--muted); text-transform: none; margin-top: 12px; max-width: 60ch; text-shadow: 0 1px 9px rgba(0,0,0,.7); }


.projcar { position: relative; max-width: var(--maxw); margin: 0 auto; padding: clamp(30px,5vw,72px) 0 var(--sp); overflow: hidden; }
.projlist { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: nowrap; transition: transform .5s cubic-bezier(.2,.8,.2,1); }
.prj { flex: 0 0 100%; width: 100%; display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(20px,4vw,60px); align-items: start; padding: 0 var(--gut); }
.prj__media { display: flex; flex-direction: column; gap: 14px; }
/* preview do projeto: 3D ou imagem base + camada que troca pela foto no hover do thumb */
.prj__preview { position: relative; aspect-ratio: 4/3; }
.prj__preview > .viewer__stage, .prj__preview > .prj__hero, .prj__preview-swap { position: absolute; inset: 0; width: 100%; height: 100%; }
.prj__preview > .prj__hero { object-fit: cover; aspect-ratio: auto; border: 0; }
video.prj__hero { cursor: pointer; } /* capa-vídeo (ex.: Orla II): clique abre o modal */
.prj__preview-swap { object-fit: cover; opacity: 0; transition: opacity .25s ease; pointer-events: none; z-index: 4; }
.prj__preview-swap.is-on { opacity: 1; }
/* vídeo tocando no preview ao passar o mouse no vthumb (clique amplia no modal) */
.prj__preview-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .25s ease; pointer-events: none; z-index: 4; background: #000; }
.prj__preview-video.is-on { opacity: 1; }
.projcar__nav { display: flex; align-items: center; justify-content: center; gap: 22px; margin-top: clamp(28px,4vw,52px); }
.projnav { width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--line); background: transparent; color: var(--ink); font-size: 17px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background .2s, border-color .2s, color .2s; }
.projnav:hover:not([disabled]) { background: var(--accent); border-color: var(--accent); color: #000; }
.projnav[disabled] { opacity: .25; cursor: default; }
.projcar__count { font-family: var(--font-mono); font-size: 14px; letter-spacing: .1em; color: var(--muted); min-width: 78px; text-align: center; }
.prj__hero { width: 100%; aspect-ratio: 4/3; object-fit: cover; cursor: zoom-in; }
.prj__gallery { position: relative; margin-top: 2px; }
.prj__gview { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; scroll-behavior: smooth; }
.prj__gview::-webkit-scrollbar { display: none; }
.prj__gview > img, .prj__gview > .prj__vthumb { flex: 0 0 calc((100% - 20px) / 3); min-width: 0; scroll-snap-align: start; }
.prj__gview > img { aspect-ratio: 3/2; object-fit: cover; border: 1px solid var(--line); cursor: zoom-in; opacity: .82; transition: opacity .3s, border-color .3s; }
.prj__gview > img:hover { opacity: 1; border-color: var(--accent); }
.prj__gnav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 3; width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line); background: rgba(11,11,12,.78); color: var(--ink); cursor: pointer; font-size: 11px; display: none; align-items: center; justify-content: center; transition: background .2s, color .2s, border-color .2s; }
.prj__gallery.has-nav .prj__gnav { display: flex; }
.prj__gnav:hover:not([disabled]) { background: var(--accent); border-color: var(--accent); color: #000; }
.prj__gnav[disabled] { opacity: 0; pointer-events: none; }
.prj__gnav--prev { left: -8px; }
.prj__gnav--next { right: -8px; }
.prj__vthumb { position: relative; flex: 1; min-width: 0; aspect-ratio: 3/2; padding: 0; border: 1px solid var(--line); background: #000; cursor: pointer; overflow: hidden; transition: border-color .3s; }
.prj__vthumb:hover { border-color: var(--accent); }
.prj__vthumb img { width: 100%; height: 100%; object-fit: cover; opacity: .7; transition: opacity .3s; }
.prj__vthumb:hover img { opacity: 1; }
.prj__vthumb::after { content: "▶"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 20px; text-shadow: 0 2px 10px rgba(0,0,0,.7); pointer-events: none; }
.prj__info { padding-top: clamp(0px,1vw,12px); }
.prj__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.prj__seal { width: clamp(40px,4.5vw,52px); height: auto; display: block; opacity: .92; flex: none; }
.prj__idx { color: var(--accent); font-family: var(--font-mono); font-size: 13px; }
.prj__badge { font-family: var(--font-mono); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; padding: 3px 8px; border: 1px solid var(--line); border-radius: 2px; color: var(--muted); background: transparent; flex: none; margin-right: auto; }
.prj__name { font-family: var(--font-display); font-weight: 400; font-size: clamp(28px,4vw,52px); line-height: .98; text-transform: uppercase; margin: 8px 0 6px; }
.prj__subtitle { font-family: var(--font-mono); font-weight: 400; font-size: clamp(12px, 1.1vw, 15px); color: var(--accent); letter-spacing: .02em; margin: 0 0 16px; }
.detail__body .prj__subtitle { font-size: clamp(10px, .95vw, 13px); margin: 0 0 10px; }
.prj__meta { display: grid; grid-template-columns: repeat(2,auto); gap: 6px 28px; color: var(--muted); margin-bottom: 18px; width: fit-content; }
.prj__meta dt { font-size: 10px; opacity: .6; font-family: var(--font-mono); text-transform: uppercase; }
.prj__meta dd { font-size: 13px; color: var(--ink); }
.prj__desc { color: #cfccc5; } /* mesma largura do head (título/ficha) — alinhado à coluna */
.prj__plan { margin-top: 18px; }
.prj__plan-label { font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; color: var(--accent); display: block; margin-bottom: 8px; }
.prj__plan-imgs { display: flex; flex-wrap: wrap; gap: 8px; }
.prj__plan-imgs img { width: 92px; height: 64px; object-fit: cover; border: 1px solid var(--line); background: #fff; cursor: zoom-in; opacity: .85; transition: opacity .3s; }
.prj__plan-imgs img:hover { opacity: 1; }
/* un-gated (mobile-only): .prj sempre 1-col + thumbs 2-por-vez */
.prj { grid-template-columns: 1fr; }
.prj__meta { grid-template-columns: 1fr; width: auto; }
.prj__gview > img, .prj__gview > .prj__vthumb { flex: 0 0 calc((100% - 10px) / 2); }

/* lightbox */
.lightbox { position: fixed; top: 0; bottom: 0; left: 0; right: 0; margin-inline: auto; width: min(100%, 720px); z-index: 100; display: none; align-items: center; justify-content: center; background: rgba(8,8,9,.95); padding: min(3vw, 20px); cursor: zoom-out; }
.lightbox.is-open { display: flex; }
.lightbox img { max-width: min(94vw, 680px); max-height: 92vh; object-fit: contain; }
.lightbox__close { position: absolute; top: 22px; right: 26px; background: none; border: none; color: #fff; font-size: 26px; cursor: pointer; opacity: .8; }
.lightbox__close:hover { opacity: 1; }

/* botão "ver vídeo" no card + player modal */
.prj__video-btn { display: inline-flex; align-items: center; gap: 8px; margin-top: 18px; font-family: var(--font-mono); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink); background: transparent; border: 1px solid var(--line); padding: 10px 16px; cursor: pointer; transition: background .25s, color .25s, border-color .25s; }
.prj__video-btn:hover { background: var(--accent); border-color: var(--accent); color: #000; }
.videobox { position: fixed; top: 0; bottom: 0; left: 0; right: 0; margin-inline: auto; width: min(100%, 720px); z-index: 100; display: none; align-items: center; justify-content: center; background: rgba(8,8,9,.96); padding: min(3vw, 20px); cursor: zoom-out; }
.videobox.is-open { display: flex; }
.videobox video { max-width: min(92vw, 680px); max-height: 90vh; outline: none; }
.videobox__close { position: absolute; top: 22px; right: 26px; background: none; border: none; color: #fff; font-size: 26px; cursor: pointer; opacity: .8; }
.videobox__close:hover { opacity: 1; }

/* página Sobre */
.about-wrap { max-width: var(--maxw); margin: 0 auto; padding: clamp(40px,6vw,90px) var(--gut) var(--sp); }
.about-header { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: clamp(24px,4vw,60px); align-items: start; margin-bottom: clamp(40px,6vw,72px); }
.about-header__text { grid-column: 1 / 3; }
.about-photo { width: 100%; aspect-ratio: 3/4; object-fit: cover; object-position: top center; border: 1px solid var(--line); }
/* un-gated (mobile-only): Sobre sempre empilhado */
.about-header { grid-template-columns: 1fr; } .about-header__text { grid-column: 1; } .about-photo { width: 140px; aspect-ratio: 3/4; }
.about-lead { font-size: clamp(20px,2.6vw,32px); line-height: 1.42; font-weight: 300; }
.about-lead em { color: var(--accent); }
.about-p { max-width: 720px; margin-top: clamp(16px,2vw,22px); color: var(--muted); font-size: clamp(15px,1.5vw,18px); line-height: 1.65; }
.about-p em { color: var(--accent); font-style: normal; }
.stats { display: grid; grid-template-columns: repeat(4,1fr); gap: clamp(16px,3vw,40px); margin: clamp(40px,6vw,72px) 0; border-top: 1px solid var(--line); padding-top: 36px; }
.stats__n { font-family: var(--font-display); font-weight: 400; font-size: clamp(30px,4vw,56px); line-height: 1; }
.stats__n small { font-family: var(--font-sans); font-size: 14px; color: var(--muted); margin-left: 3px; }
.stats__c { color: var(--muted); font-size: 12px; margin-top: 6px; line-height: 1.4; }
.about-sec { border-top: 1px solid var(--line); padding-top: 32px; margin-top: clamp(40px,5vw,64px); }
.about-sec__h { color: var(--accent); margin-bottom: 22px; }
.about-cta { margin-top: clamp(26px,4vw,38px); }
.skills { display: flex; flex-wrap: wrap; gap: 10px; }
.skills span { font-family: var(--font-mono); font-size: 12px; border: 1px solid var(--line); padding: 8px 12px; color: var(--ink); }
.xp { display: grid; grid-template-columns: 130px 1fr; gap: 8px 28px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.xp__when { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.xp__role { font-size: 17px; }
.xp__role b { font-weight: 500; }
.xp__role span { color: var(--muted); font-size: 14px; }
.xp__list { list-style: none; margin: 12px 0 2px; padding: 0; display: grid; gap: 7px; }
.xp__list li { position: relative; padding-left: 18px; color: var(--muted); font-size: 14px; line-height: 1.55; }
.xp__list li::before { content: "—"; position: absolute; left: 0; color: var(--accent); }
/* un-gated (mobile-only): stats 2-col, xp empilhado */
.stats { grid-template-columns: 1fr 1fr; } .xp { grid-template-columns: 1fr; gap: 4px; } .xp__list { margin-top: 8px; }

/* ============================================================ OBRAS EXECUTADAS (linha do tempo zigzag) */
.timeline { max-width: 720px; margin: 0 auto; padding: clamp(60px,9vw,100px) var(--gut) var(--sp); position: relative; }
.timeline::before { content: ''; position: absolute; left: 50%; transform: translateX(-50%); top: 0; bottom: 0; width: 2px; background: var(--line); }
.tl { position: relative; padding-top: 46px; margin-bottom: clamp(50px, 8vw, 100px); }
.tl:last-child { margin-bottom: 0; }
.tl__card { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(56px, 8vw, 112px); align-items: center; }
.tl:nth-child(even) .tl__media { order: 2; }
.tl:nth-child(even) .tl__info { text-align: left; }   /* mobile-only vertical: não alinhar à direita */
/* nó central: bolinha na linha + ano ao lado */
.tl__when { position: absolute; top: 4px; display: flex; align-items: center; gap: 12px; background: var(--bg); padding: 2px 0; z-index: 2; white-space: nowrap; }
.tl__when::before { content: ''; width: 17px; height: 17px; border-radius: 50%; background: var(--bg); border: 3px solid var(--accent); box-shadow: 0 0 0 6px var(--bg); flex: none; }
.tl:nth-child(odd) .tl__when { left: 50%; margin-left: -9px; }
.tl:nth-child(even) .tl__when { right: 50%; margin-right: -9px; flex-direction: row-reverse; }
.tl__year { font-family: var(--font-display); font-weight: 400; font-size: clamp(26px, 3.4vw, 42px); line-height: 1; color: var(--accent); }
.tl__client { font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.tl__hero { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; border: 1px solid var(--line); border-radius: 4px; cursor: zoom-in; }
.tl__thumbs { display: flex; gap: 10px; margin-top: 10px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; scroll-behavior: smooth; }
.tl__thumbs::-webkit-scrollbar { display: none; }
.tl__thumbs > img, .tl__thumbs > .tl__vthumb { flex: 0 0 calc((100% - 20px) / 3); min-width: 0; scroll-snap-align: start; }
.tl__thumbs > img { width: 100%; aspect-ratio: 3/2; object-fit: cover; display: block; border: 1px solid var(--line); cursor: zoom-in; opacity: .82; transition: opacity .3s, border-color .3s; }
.tl__thumbs > img:hover { opacity: 1; border-color: var(--accent); }
.tl__vthumb { position: relative; padding: 0; border: 0; background: none; cursor: pointer; }
.tl__vthumb img { width: 100%; aspect-ratio: 3/2; object-fit: cover; display: block; border: 1px solid var(--line); opacity: .82; transition: opacity .3s, border-color .3s; }
.tl__vthumb:hover img { opacity: 1; border-color: var(--accent); }
.tl__vthumb::after { content: '▶'; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; background: rgba(0,0,0,.30); font-size: 18px; }
.tl__tag { display: inline-block; font-family: var(--font-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin-bottom: 12px; }
.tl__title { font-family: var(--font-display); font-weight: 400; font-size: clamp(24px, 3vw, 38px); line-height: 1.04; text-transform: uppercase; margin: 0 0 14px; }
.tl__desc { color: var(--muted); line-height: 1.6; font-size: 15px; }
/* un-gated (mobile-only): timeline sempre vertical (eixo à esquerda) */
.timeline { padding: 48px 18px 72px; }
.timeline::before { left: 7px; transform: none; }
.tl { padding-top: 0; padding-left: 32px; margin-bottom: 52px; }
.tl::before { content: ''; position: absolute; left: -1px; top: 4px; width: 16px; height: 16px; border-radius: 50%; background: var(--bg); border: 3px solid var(--accent); box-shadow: 0 0 0 4px var(--bg); }
.tl__card { grid-template-columns: 1fr; gap: 14px; }
.tl:nth-child(even) .tl__media { order: 0; }
.tl__when { position: static; flex-direction: row !important; left: auto; right: auto; margin: 0 0 14px 0; }
.tl__when::before { display: none; }

}  /* @layer components */

@layer pages {

/* ============================================================ DETALHE DO PROJETO
   Hero (capa + topbar "← voltar" + card título/sub) + body (.prj galeria/ficha/desc
   OU timeline). Reusado pelo #projDetail (.detail, em @layer components).
   (Renomeado de .expand-slot__* -> .detail__* no polish de 27/06.) */
.detail__hero { position: relative; height: 22vh; min-height: 150px; flex: none; overflow: hidden; }
.detail__hero > img,
.detail__hero > video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.detail__hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(11,11,12,.18) 0%, rgba(11,11,12,.55) 62%, rgba(11,11,12,.95) 100%);
}
.detail__topbar {
  position: absolute; top: 14px; left: 18px; right: 18px; z-index: 2;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.detail__typo {
  font-family: var(--font-mono); font-weight: 400;
  font-size: clamp(11px, 1.05vw, 14px); letter-spacing: .04em;
  text-transform: uppercase; color: var(--muted);
  margin: 0; line-height: 1;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  flex: 1 1 auto; min-width: 0;
}
.detail__close {
  background: rgba(11,11,12,.6); border: 1px solid var(--line); color: var(--ink);
  padding: 4px 10px; font: inherit; cursor: pointer; transition: border-color .25s, color .25s;
  flex: 0 0 auto;
}
.detail__close:hover { border-color: var(--accent); color: var(--accent); }
.detail__card {
  position: absolute; left: 18px; bottom: 12px; right: 18px; z-index: 2;
}
.detail__card-title {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(28px, 3.6vw, 56px); line-height: .96; text-transform: uppercase;
  color: #fff; text-shadow: 0 2px 14px rgba(0,0,0,.55);
  margin: 0;
}
.detail__card-sub {
  font-family: var(--font-mono); font-weight: 400;
  font-size: clamp(12px, 1.1vw, 14px); letter-spacing: .02em;
  color: var(--accent);
  margin: 6px 0 0; line-height: 1.2;
  text-shadow: 0 1px 6px rgba(0,0,0,.55);
}
.detail__card-sub:empty { display: none; }

/* ===== COR DA TIPOLOGIA NO DETALHE: o painel recebe data-typology (openDetail) → --ty;
   os acentos âmbar do detalhe herdam a cor da tipologia (fallback --accent fora dela). ===== */
.detail .detail__typo { color: var(--ty, var(--muted)); }
.detail .detail__card-sub,
.detail .prj__plan-label,
.detail .tl__year,
.detail .tl__tag { color: var(--ty, var(--accent)); }
.detail .detail__close:hover { border-color: var(--ty, var(--accent)); color: var(--ty, var(--accent)); }
.detail .prj__gview > img:hover,
.detail .prj__vthumb:hover,
.detail .tl__thumbs > img:hover,
.detail .tl__vthumb:hover img { border-color: var(--ty, var(--accent)); }
.detail .tl__when::before,
.detail .tl::before { border-color: var(--ty, var(--accent)); }
.detail .prj__gnav:hover:not([disabled]),
.detail .prj__video-btn:hover { background: var(--ty, var(--accent)); border-color: var(--ty, var(--accent)); }
.detail__body {
  flex: 1 1 auto; min-height: 0; position: relative; overflow: hidden;
  display: flex; flex-direction: column;
  border-top: 1px solid var(--line);                     /* separador hero ↔ card */
}
.detail__body .projlist { flex: 0 0 auto; min-height: 0; align-items: start; }
/* cada .prj no slot: flex column = head (media|info) + descrição abaixo. Sem scroll
   interno em nenhum dos componentes — tudo cabe naturalmente. Cabe ao conteúdo dos
   textos ser proporcional ao espaço (descrições muito longas serão encurtadas no HTML). */
.detail__body .projlist > .prj {
  display: flex; flex-direction: column; gap: 14px;
  min-height: 0;
  padding: 18px 22px;
}
.detail__body .prj__head {
  display: grid; grid-template-columns: 1.05fr 1fr;
  gap: clamp(16px, 1.8vw, 28px);
  flex: 1 1 auto; min-height: 0;
}
.detail__body .prj__media { display: flex; flex-direction: column; gap: 10px; min-height: 0; min-width: 0; }
/* Galeria SOBE pra primeiro; preview/canvas fica embaixo. Universal (mobile + desktop). */
.detail__body .prj__gallery { flex: 0 0 auto; order: 1; }
.detail__body .prj__preview { aspect-ratio: 16/9; flex: 0 0 auto; order: 2; }
/* Cards SEM GLB: hero do slot ja mostra a 1a midia do card via syncSlotHero — a
   .prj__preview duplicaria. Oculta. Universal. */
.detail__body .prj__media:not(:has([data-model])) .prj__preview { display: none; }
/* No slot, esconde o "01/02/..." dentro do .prj__info — o contador 01/05 do
   .projcar__nav ja serve a mesma funcao, e o idx solto virou ruido visual.
   Tambem esconde .prj__name e .prj__subtitle: ja estao no hero do slot
   (.detail__card-title / .detail__card-sub) via syncSlotHero. */
.detail__body .prj__idx,
.detail__body .prj__name,
.detail__body .prj__subtitle { display: none; }
/* Galeria: 3 thumbs visiveis por vez (universal — em desktop o flex 1.05fr controla
   a largura do .prj__media, entao 33% bate de novo). */
.detail__body .prj__gview { gap: 6px; }
.detail__body .prj__gview > img,
.detail__body .prj__gview > .prj__vthumb {
  flex: 0 0 calc((100% - 12px) / 3);
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.detail__body .prj__info { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
/* nome+meta compactos pra info caber sem scroll */
.detail__body .prj__name { font-size: clamp(18px, 1.9vw, 28px); line-height: 1.05; margin: 6px 0 12px; }
.detail__body .prj__meta { gap: 6px 16px; }
.detail__body .prj__meta dt { font-size: 9px; }
.detail__body .prj__meta dd { font-size: 12px; line-height: 1.35; }
/* descrição em barra cheia entre head e nav — sem scroll: altura natural do texto */
.detail__body .prj > .prj__desc {
  flex: 0 0 auto;
  margin: 0;
  padding: 12px 4px 0;
  border-top: 1px solid var(--line);
}
.detail__body .prj__desc { font-size: 14px; line-height: 1.55; }
/* Pra Obras: timeline com scroll interno */
.detail__body .timeline-embed { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 14px 18px; }
.detail__body .timeline-embed .timeline { padding: 24px var(--gut); }
.detail__body .timeline-embed .tl { margin-bottom: clamp(36px, 5vw, 64px); }

/* ===== CURRÍCULO (overlay do tile + sobre.html) — layout do mockup B, classes namespaced sob .cvdoc ===== */
.projtile--cv .tcard__cover { object-position: center 22%; }
.cvdoc { color: var(--ink); }
.cvdoc .mono { font-family: var(--font-mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
.cvdoc em { font-style: normal; color: var(--accent); }
.cvdoc .detail__top { position: sticky; top: 0; z-index: 5; display: flex; justify-content: space-between; align-items: center; padding: 12px var(--gut); background: rgba(11,11,12,.82); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.cvdoc .detail__brand { font-family: var(--font-mono); font-size: 12px; letter-spacing: .08em; color: var(--muted); }
.cvdoc .detail__brand b { color: var(--accent); }
.cvdoc .back { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink); border: 1px solid var(--line); padding: 8px 14px; cursor: pointer; background: none; text-decoration: none; transition: .2s; }
.cvdoc .back:hover { border-color: var(--accent); color: var(--accent); }
.cvdoc .dhead { position: relative; min-height: clamp(220px, 38vh, 340px); display: flex; align-items: flex-end; overflow: hidden; padding: var(--gut); }
.cvdoc .dhead::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(11,11,12,.35), rgba(11,11,12,.92)), url("../img/projetos/dunas-2.jpg") center/cover no-repeat; transform: scale(1.03); z-index: 0; }
.cvdoc .dhead__in { position: relative; z-index: 1; width: 100%; display: flex; gap: clamp(16px,3vw,32px); align-items: flex-end; flex-wrap: wrap; }
.cvdoc .dhead__photo { width: clamp(86px,16vw,128px); aspect-ratio: 1; object-fit: cover; border-radius: 3px; border: 1px solid rgba(243,241,236,.25); flex: none; }
.cvdoc .dhead__txt { flex: 1; min-width: 220px; }
.cvdoc .dhead__k { color: var(--accent); margin-bottom: 12px; }
.cvdoc .dhead h1 { font-family: var(--font-display); font-weight: 400; text-transform: uppercase; line-height: .9; font-size: clamp(34px,7vw,64px); }
.cvdoc .dhead__sub { color: var(--muted); margin-top: 12px; font-size: clamp(13px,1.4vw,16px); }
.cvdoc .wrap { max-width: var(--maxw); margin-inline: auto; padding: clamp(28px,5vw,52px) var(--gut); }
.cvdoc .lead { font-size: clamp(18px,2.4vw,26px); font-weight: 300; line-height: 1.4; }
.cvdoc .lead em { color: var(--accent); }
.cvdoc .lead2 { margin-top: 16px; color: var(--muted); font-size: 14.5px; line-height: 1.6; }
.cvdoc .stats { display: grid; grid-template-columns: repeat(4,1fr); gap: 1px; margin: clamp(26px,4vw,42px) 0; background: var(--line); border: 1px solid var(--line); }
.cvdoc .stats > div { background: var(--bg); padding: 18px 16px; }
.cvdoc .stats__n { font-family: var(--font-display); font-weight: 400; font-size: clamp(26px,3vw,40px); line-height: 1; color: var(--accent); }
.cvdoc .stats__n small { font-size: .42em; color: var(--muted); margin-left: 5px; letter-spacing: .04em; }
.cvdoc .stats__c { color: var(--muted); font-size: 12px; margin-top: 8px; line-height: 1.4; }
.cvdoc .sec { margin-top: clamp(30px,5vw,52px); }
.cvdoc .sec__h { display: flex; align-items: baseline; gap: 12px; border-bottom: 1px solid var(--line); padding-bottom: 11px; margin-bottom: 22px; }
.cvdoc .sec__h .mono { color: var(--accent); }
.cvdoc .sec__h h2 { font-family: var(--font-display); font-weight: 400; text-transform: uppercase; font-size: clamp(20px,2.4vw,30px); letter-spacing: .01em; }
.cvdoc .chips { display: flex; flex-wrap: wrap; gap: 8px; }
.cvdoc .chip { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .03em; border: 1px solid var(--line); padding: 8px 11px; color: var(--ink); display: flex; gap: 7px; align-items: center; }
.cvdoc .chip i { font-style: normal; color: var(--muted); font-size: 10px; text-transform: uppercase; }
.cvdoc .chip--hot { border-color: var(--accent); color: var(--accent); }
.cvdoc .chips__note { color: var(--muted); font-size: 12.5px; margin-top: 13px; }
.cvdoc .xpgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 22px; }
.cvdoc .xpc { border: 1px solid var(--line); border-left: 2px solid var(--accent); background: var(--bg-2); padding: 16px 18px; }
.cvdoc .xpc__top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 7px; }
.cvdoc .xpc__role { font-weight: 500; font-size: 15px; }
.cvdoc .xpc__when { font-family: var(--font-mono); font-size: 10.5px; color: var(--accent); white-space: nowrap; }
.cvdoc .xpc__org { color: var(--muted); font-size: 12.5px; margin-bottom: 7px; }
.cvdoc .xpc ul { list-style: none; display: flex; flex-direction: column; gap: 5px; }
.cvdoc .xpc li { position: relative; padding-left: 14px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.cvdoc .xpc li::before { content: ""; position: absolute; left: 0; top: 8px; width: 5px; height: 5px; background: var(--accent); border-radius: 50%; opacity: .7; }
.cvdoc .edu { display: flex; flex-direction: column; }
.cvdoc .edu__r { display: grid; grid-template-columns: 120px 1fr; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.cvdoc .edu__w { font-family: var(--font-mono); font-size: 12px; color: var(--accent); }
.cvdoc .edu__t b { font-weight: 500; }
.cvdoc .edu__t span { color: var(--muted); }
.cvdoc .tl { position: relative; margin-top: 26px; }
.cvdoc .tl::before { content: ""; position: absolute; left: 7px; top: 0; bottom: 0; width: 2px; background: linear-gradient(var(--ty-obras-executadas), var(--line)); }
.cvdoc .tlrow { position: relative; padding: 0 0 34px 30px; }
.cvdoc .tlrow::before { content: ""; position: absolute; left: 0; top: 4px; width: 15px; height: 15px; border-radius: 50%; background: var(--bg); border: 2px solid var(--ty-obras-executadas); }
.cvdoc .tl__year { font-family: var(--font-mono); font-size: 11.5px; color: var(--ty-obras-executadas); margin-bottom: 6px; }
.cvdoc .tl__title { font-family: var(--font-display); font-weight: 400; text-transform: uppercase; font-size: clamp(18px,2vw,24px); line-height: 1; margin-bottom: 6px; }
.cvdoc .tl__tag { display: inline-block; font-family: var(--font-mono); font-size: 10.5px; color: var(--muted); border: 1px solid var(--line); padding: 3px 8px; margin-bottom: 11px; }
.cvdoc .tl__media { display: grid; grid-template-columns: 1.4fr 1fr; gap: 6px; margin: 10px 0 12px; }
.cvdoc .tl__media img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border: 1px solid var(--line); cursor: zoom-in; }
.cvdoc .tl__media img:first-child { grid-row: span 2; aspect-ratio: auto; }
.cvdoc .tl__desc { color: var(--muted); font-size: 13.5px; line-height: 1.6; }
.cvdoc .contact { margin-top: clamp(36px,5vw,64px); border-top: 1px solid var(--line); padding-top: clamp(26px,4vw,40px); }
.cvdoc .contact__grid { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; }
.cvdoc .contact__links { display: flex; flex-wrap: wrap; gap: 10px; }
.cvdoc .contact__links a { font-family: var(--font-mono); font-size: 12px; border: 1px solid var(--line); padding: 10px 14px; color: var(--muted); text-decoration: none; transition: .2s; }
.cvdoc .contact__links a:hover { border-color: var(--accent); color: var(--accent); }
.cvdoc .btn { display: inline-flex; align-items: center; gap: 9px; background: var(--accent); color: #000; font-family: var(--font-mono); font-size: 12px; letter-spacing: .05em; text-transform: uppercase; font-weight: 700; padding: 12px 20px; text-decoration: none; }
.cvdoc .foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; padding: 28px var(--gut); border-top: 1px solid var(--line); color: var(--muted); font-family: var(--font-mono); font-size: 11px; letter-spacing: .04em; text-transform: uppercase; }
@media (max-width: 560px) {
  .cvdoc .stats { grid-template-columns: 1fr 1fr; }
  .cvdoc .xpgrid { grid-template-columns: 1fr; }
  .cvdoc .edu__r { grid-template-columns: 1fr; gap: 3px; }
  .cvdoc .tl__media { grid-template-columns: 1fr; }
  .cvdoc .tl__media img:first-child { grid-row: auto; aspect-ratio: 4/3; }
}

/* un-gated (mobile-only): detalhe sempre em modo mobile (hero menor, head empilha, ficha 2-col compacta) */
.detail__hero { height: 32vh; min-height: 200px; }
.detail__card-title { font-size: clamp(22px, 6.5vw, 32px); }
.detail__card-sub { font-size: 11px; margin-top: 4px; }
.detail__topbar { top: 10px; left: 14px; right: 14px; }
.detail__card { left: 14px; right: 14px; bottom: 10px; }
.detail__body { overflow-y: auto; -webkit-overflow-scrolling: touch; }
.detail__body .projlist > .prj { padding: 14px 16px; gap: 12px; }
.detail__body .prj__head { grid-template-columns: 1fr; gap: 14px; }
.detail__body .prj__name { font-size: clamp(22px, 5.5vw, 30px); margin: 4px 0 6px; }
.detail__body .prj__subtitle { font-size: 12px; margin: 0 0 12px; }
.detail__body .prj__meta { grid-template-columns: 1fr 1fr; gap: 8px 14px; }
.detail__body .prj__meta dd { font-size: 12px; }
.detail__body .prj__desc { font-size: 13px; line-height: 1.5; padding: 10px 0 0; }
.detail__body .viewer__stage { touch-action: pan-y; }

}  /* @layer pages */

/* ============================================================ TRANSITIONS (View Transitions)
   Morph expand/collapse nativo (home-spa.js: slot-morph + tile-<slug>). TOP-LEVEL
   (fora de @media) pra valer em TODO viewport — antes estavam aninhados no @media
   desktop por engano (só desktop pegava o timing/reduced-motion). --vt-* no :root. */
::view-transition-group(*) {
  animation-duration: var(--vt-dur);
  animation-timing-function: var(--vt-ease);
}
body.is-collapsing::view-transition-group(*) { animation-duration: var(--vt-dur-collapse); }
@media (prefers-reduced-motion: reduce) { ::view-transition-group(*) { animation: none; } }
