/* ============================================================
   OBSIDIAN BLUEPRINT — Rafaela Marques · portfólio
   Tokens: marrom profundo · bordô · salmão · papel quente
   papel quente #E8E3D7 · Space Grotesk / Inter / JetBrains Mono
   ============================================================ */

:root {
  /* superfícies */
  --void: #1A1412;
  --surface: #221C18;
  --surface-lowest: #1A1412;
  --surface-low: #2A221D;
  --surface-c: #302720;
  --surface-high: #3B3028;
  --surface-highest: #493B31;
  /* acentos */
  --cyan: #992339;
  --cyan-rgb: 153, 35, 57;
  --cyan-soft: rgba(153, 35, 57, .14);
  --teal: #F5B895;
  --teal-rgb: 245, 184, 149;
  --teal-deep: #E8A17D;
  --concrete: #E8D8BE;
  --error: #FFB4AB;
  /* texto */
  --on: #E8E3D7;
  --on-var: #C9BDAF;
  --outline: #B5A391;
  --outline-var: #625247;
  /* tipografia */
  --f-display: 'Space Grotesk', sans-serif;
  --f-body: 'Inter', sans-serif;
  --f-mono: 'JetBrains Mono', monospace;
  /* geometria */
  --r: 4px;
  --r-lg: 8px;
  --hairline: 1px solid rgba(245, 230, 210, .10);
  --glow: 0 0 14px rgba(153, 35, 57, .22);
  --nav-h: 64px;
  /* altura da viewport 3D (o HUD de modos se ancora nela) */
  --vp-h: clamp(420px, 58vh, 640px);
}

/* ticker */
.ticker { border-top: var(--hairline); border-bottom: var(--hairline); background: rgba(26, 20, 18, .6); overflow: hidden; }
.ticker-track {
  display: flex; align-items: center; gap: 2.5rem; width: max-content;
  padding: .55rem 0; animation: ticker 32s linear infinite;
}
.ticker-track span { font-family: var(--f-mono); font-size: .64rem; letter-spacing: .14em; color: var(--on-var); white-space: nowrap; }
.ticker-track span:nth-child(odd) { color: var(--teal); }
.ticker-track i { color: var(--cyan); font-style: normal; font-size: .6rem; }
@keyframes ticker { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .ticker-track { animation: none; }
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); }
body {
  margin: 0;
  background: var(--surface);
  color: var(--on);
  font: 400 16px/1.6 var(--f-body);
  letter-spacing: -.005em;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
h1, h2, h3, b, strong { font-family: var(--f-display); font-weight: 600; }
p { margin: 0; }

/* scrollbar visível e estilizada (correção vs Stitch) */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--surface-lowest); }
::-webkit-scrollbar-thumb { background: var(--surface-highest); border-radius: 5px; border: 2px solid var(--surface-lowest); }
::-webkit-scrollbar-thumb:hover { background: var(--teal); }

/* ---------- utilitários ---------- */
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 clamp(1rem, 4vw, 2.5rem); }
.mono { font-family: var(--f-mono); font-size: .72rem; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; }
.dim { color: var(--on-var); }
.cyan { color: var(--cyan); }
.teal { color: var(--teal); }
.concrete { color: var(--concrete); }

.section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.section-dim { background: var(--surface-lowest); }

.sec-head { margin-bottom: clamp(1.7rem, 4vw, 2.8rem); max-width: 760px; }
.sec-head h2, .sec-head h3 {
  font-size: clamp(1.6rem, 3.6vw, 2.2rem);
  letter-spacing: -.02em; text-transform: uppercase;
  margin: .15rem 0 .65rem; line-height: 1.15;
}
.sec-kicker { color: var(--cyan); letter-spacing: .18em; }
.sec-head .dim { max-width: 56ch; }

.chip {
  display: inline-flex; align-items: center; gap: .4rem;
  font-family: var(--f-mono); font-size: .66rem; font-weight: 500;
  letter-spacing: .08em; text-transform: uppercase;
  padding: 4px 8px; border-radius: var(--r);
  background: rgba(26, 20, 18, .88);
  border: 1px solid var(--outline-var);
  color: var(--on);
}
.chip-cyan { color: var(--cyan); border-color: rgba(var(--cyan-rgb), .48); }
.chip-teal { color: var(--teal); border-color: rgba(var(--teal-rgb), .42); background: rgba(var(--teal-rgb), .08); }
.chip-plain { background: var(--surface-c); }
.chip-row { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }

.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--teal); display: inline-block; animation: pulse 2.2s infinite; flex: none; }
.cyan-bg { background: var(--cyan); }
.teal-bg { background: var(--teal); }
.concrete-bg { background: var(--concrete); }

/* ---------- botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  padding: .85rem 1.4rem; border-radius: var(--r-lg);
  font-family: var(--f-display); font-weight: 600; font-size: .85rem;
  letter-spacing: .04em; text-transform: uppercase;
  border: 1px solid transparent;
  transition: filter .2s, background .2s, color .2s, transform .15s, box-shadow .2s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--cyan); color: #1A1412; box-shadow: var(--glow); }
.btn-primary:hover { filter: brightness(1.08); box-shadow: 0 0 20px rgba(var(--cyan-rgb), .42); }
.btn-ghost { background: rgba(255, 255, 255, .04); border-color: rgba(255, 255, 255, .12); color: var(--concrete); }
.btn-ghost:hover { background: var(--surface-high); border-color: var(--teal); color: var(--teal); }
.btn-outline { background: transparent; border-color: rgba(var(--cyan-rgb), .62); color: var(--cyan); }
.btn-outline:hover { background: var(--cyan); color: #1A1412; }
.btn-small { padding: .5rem .9rem; font-size: .72rem; background: transparent; border-color: rgba(var(--cyan-rgb), .62); color: var(--cyan); }
.btn-small:hover { background: var(--cyan); color: #1A1412; }

/* ---------- nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 clamp(1rem, 3vw, 2rem);
  background: rgba(26, 20, 18, .76);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: var(--hairline);
}
.nav.scrolled { background: rgba(26, 20, 18, .94); }
.nav-brand {
  display: flex; align-items: center; gap: .6rem;
  font-family: var(--f-display); font-weight: 700; font-size: .95rem; letter-spacing: .06em;
  color: var(--on);
}
.nav-brand svg { color: var(--cyan); }
.nav-brand em { font-style: normal; color: var(--teal); }
.nav-links-wrap { display: flex; align-items: center; gap: .25rem; }
.nav-link {
  font-family: var(--f-mono); font-size: .68rem; font-weight: 500;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--on-var); padding: .5rem .7rem; border-radius: var(--r);
  position: relative; transition: color .2s, background .2s;
}
.nav-link:hover { color: var(--on); background: rgba(255, 255, 255, .05); }
.nav-link.active { color: var(--cyan); }
.nav-link.active::after {
  content: ''; position: absolute; left: .7rem; right: .7rem; bottom: 2px;
  height: 2px; background: var(--cyan); box-shadow: var(--glow);
}
.nav-cta { border: 1px solid rgba(var(--cyan-rgb), .62); color: var(--cyan); }
.nav-cta:hover { background: var(--cyan); color: #1A1412; }
.nav-cta.active::after { display: none; }

.nav-burger { display: none; background: none; border: 0; padding: .5rem; }
.nav-burger span { display: block; width: 22px; height: 2px; background: var(--on); margin: 5px 0; transition: transform .25s, opacity .25s; }

/* ---------- hero ---------- */
.hero { position: relative; padding: calc(var(--nav-h) + clamp(2rem, 6vw, 4rem)) 0 0; overflow: hidden; background: var(--surface-lowest); }
.hero-grid-bg {
  position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image:
    radial-gradient(rgba(181, 163, 145, .18) 1px, transparent 1px),
    linear-gradient(rgba(var(--cyan-rgb), .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--cyan-rgb), .035) 1px, transparent 1px);
  background-size: 24px 24px, 80px 80px, 80px 80px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 30%, #000 30%, transparent 75%);
}
.hero-inner {
  position: relative;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 400px);
  gap: clamp(1.8rem, 4vw, 3.2rem); align-items: center;
  padding-bottom: 2.5rem;
}
.hero-copy { display: flex; flex-direction: column; gap: 1.3rem; }
.hero-media { display: flex; flex-direction: column; gap: .7rem; min-width: 0; }
.hero-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem; }
.hero-title {
  font-size: clamp(2.1rem, 6vw, 3.6rem); line-height: 1.02;
  letter-spacing: -.03em; text-transform: uppercase; margin: 0; max-width: 20ch;
}
.hero-title span { color: var(--cyan); display: block; font-size: .55em; letter-spacing: -.02em; }
/* o & da tipografia display fica estranho: esse símbolo usa Arial */
.amp { font-family: Arial, Helvetica, sans-serif; font-style: normal; font-weight: inherit; }
.hero-sub { max-width: 58ch; color: var(--on-var); font-size: 1.05rem; }

/* slider comparativo */
.compare {
  position: relative; height: clamp(230px, 26vw, 300px);
  border-radius: var(--r-lg); overflow: hidden;
  border: var(--hairline); background: var(--void);
  cursor: ew-resize; touch-action: pan-y; user-select: none;
}
.compare img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.compare-render::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(26, 20, 18, .62), transparent 40%);
}
.compare-blueprint {
  position: absolute; inset: 0;
  clip-path: inset(0 calc(100% - 50%) 0 0);
  background: var(--void);
}
.compare-blueprint img { filter: grayscale(1) contrast(1.45) brightness(.72); }
.bp-tint { position: absolute; inset: 0; background: rgba(102, 16, 31, .28); mix-blend-mode: overlay; }
.bp-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(var(--teal-rgb), .12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--teal-rgb), .12) 1px, transparent 1px);
  background-size: 40px 40px;
}
.compare-handle {
  position: absolute; top: 0; bottom: 0; left: 50%; width: 2px;
  background: var(--cyan); box-shadow: 0 0 15px var(--cyan); z-index: 5;
  cursor: ew-resize;
}
.compare-handle::after {
  content: ''; position: absolute; inset: 0 auto 0 -7px; width: 16px;
}
.compare-handle svg {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 40px; height: 40px; padding: 11px;
  background: var(--surface-high); border-radius: 50%;
  color: var(--cyan); box-shadow: 0 4px 16px rgba(26, 20, 18, .5);
}
.compare-tag {
  position: absolute; z-index: 4;
  display: inline-flex; align-items: center; gap: .4rem;
  font-family: var(--f-mono); font-size: .55rem; letter-spacing: .06em; text-transform: uppercase;
  background: rgba(26, 20, 18, .88); backdrop-filter: blur(8px);
  padding: 3px 6px; border-radius: var(--r); border: 1px solid var(--outline-var);
  max-width: 52%; line-height: 1.35;
}
.compare-tag.tl { top: 12px; left: 12px; color: var(--cyan); }
.compare-tag.tr { top: 12px; right: 12px; color: var(--on); }
.compare-tag.bl { bottom: 12px; left: 12px; color: var(--on-var); font-family: var(--f-mono); font-size: .6rem; }
.compare-tag.br { bottom: 40px; left: 12px; color: var(--cyan); opacity: .8; font-size: .58rem; }

.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; }
.cmp-presets {
  display: flex; flex-wrap: wrap; gap: 2px; padding: 2px;
  background: var(--surface-low); border-radius: var(--r-lg); border: var(--hairline);
}
.cmp-preset {
  background: none; border: 0; color: var(--on-var);
  padding: .45rem .6rem; border-radius: 6px; font-size: .64rem;
  transition: color .2s, background .2s;
}
.cmp-preset:hover { color: var(--on); background: var(--surface-c); }
.cmp-preset.active { color: var(--cyan); background: var(--surface-high); }

/* ---------- métricas ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.stat-card {
  background: var(--surface-low); border: var(--hairline); border-radius: var(--r-lg);
  padding: 1.5rem; display: flex; flex-direction: column; gap: .8rem;
  transition: transform .25s, border-color .25s, box-shadow .25s;
}
.stat-card:hover { transform: translateY(-4px); border-color: rgba(var(--cyan-rgb), .68); box-shadow: var(--glow); }
.stat-card header { display: flex; justify-content: space-between; }
.stat-value { font-family: var(--f-display); font-weight: 700; font-size: clamp(2.2rem, 4vw, 3rem); line-height: 1; margin: 0; letter-spacing: -.02em; }
.stat-value small { font-size: .45em; color: var(--concrete); }
.stat-card h3 { font-size: 1rem; margin: 0; text-transform: uppercase; letter-spacing: .02em; }
.meter { height: 3px; background: var(--surface-c); border-radius: 2px; overflow: hidden; }
.meter span { display: block; height: 100%; background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
.meter .teal { background: var(--teal); box-shadow: 0 0 8px var(--teal); }
.meter .concrete { background: var(--concrete); box-shadow: none; }

.workbench {
  margin-top: 1rem;
  display: grid; grid-template-columns: 1.1fr 1fr 1fr; gap: 1rem;
  background: var(--surface-lowest); border: var(--hairline); border-radius: var(--r-lg); padding: 1.5rem;
}
.wb-text { display: flex; flex-direction: column; gap: .7rem; justify-content: center; }
.wb-text h3 { font-size: 1.25rem; text-transform: uppercase; letter-spacing: .01em; margin: 0; line-height: 1.25; }
.wb-media { position: relative; margin: 0; }
.wb-media img { height: 100%; min-height: 200px; width: 100%; object-fit: cover; border-radius: var(--r); border: 1px solid var(--outline-var); }
.wb-media figcaption {
  position: absolute; bottom: 8px; left: 8px;
  font-family: var(--f-mono); font-size: .58rem; letter-spacing: .08em; color: var(--teal);
  background: rgba(26, 20, 18, .88); padding: 2px 6px; border-radius: 3px;
}

/* ---------- trajetória ---------- */
.phases { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: clamp(2.5rem, 6vw, 4rem); }
.phase {
  background: var(--surface-low); border: var(--hairline); border-radius: var(--r-lg);
  padding: 1.25rem; display: flex; flex-direction: column; gap: .5rem; position: relative; overflow: hidden;
  transition: border-color .25s, transform .25s;
}
.phase:hover { border-color: rgba(var(--cyan-rgb), .62); transform: translateY(-3px); }
.phase-top { display: flex; justify-content: space-between; align-items: flex-start; }
.phase-num {
  font-family: var(--f-display); font-weight: 700; font-size: 2rem;
  color: var(--outline-var); line-height: 1; transition: color .25s;
}
.phase:hover .phase-num { color: var(--cyan); }
.phase h3 { font-size: .95rem; margin: .25rem 0 0; }
.phase p { font-size: .85rem; }
.phase .mono { font-size: .62rem; }

.case {
  display: grid; grid-template-columns: 1.4fr 1fr; gap: 1rem;
  margin-bottom: 1.5rem;
}
.case-flip { grid-template-columns: 1fr 1.4fr; }
.case-flip .case-media { order: 2; }
.case-media {
  position: relative; border-radius: var(--r-lg); overflow: hidden;
  border: var(--hairline); min-height: 280px;
}
.case-media img { width: 100%; height: 100%; object-fit: cover; }
.case-body {
  background: var(--surface-low); border: var(--hairline); border-radius: var(--r-lg);
  padding: 1.5rem; display: flex; flex-direction: column; gap: .7rem; justify-content: center;
}
.case-body h3 { font-size: 1.3rem; text-transform: uppercase; line-height: 1.2; margin: 0; }
.case-body .mono { font-size: .64rem; }
.case-specs { display: grid; grid-template-columns: repeat(2, 1fr); gap: .5rem; margin-top: .4rem; }
.case-specs div { background: var(--surface-lowest); border-radius: var(--r); padding: .6rem .7rem; }
.case-specs b { display: block; font-family: var(--f-mono); font-weight: 600; font-size: .8rem; color: var(--on); }
.case-specs span { font-family: var(--f-mono); font-size: .58rem; letter-spacing: .1em; color: var(--outline); text-transform: uppercase; }

/* HUDs de imagem */
.hud { 
  position: absolute; z-index: 3;
  font-family: var(--f-mono); font-size: .6rem; letter-spacing: .06em;
  background: rgba(26, 20, 18, .88); backdrop-filter: blur(8px);
  padding: 5px 8px; border-radius: var(--r);
  display: inline-flex; align-items: center; gap: .45rem;
  border: 1px solid rgba(181, 163, 145, .28); color: var(--on);
  line-height: 1.5;
}
.hud-tl { top: 12px; left: 12px; color: var(--cyan); }
.hud-tr { top: 12px; right: 12px; color: var(--teal); text-align: right; }
.hud-bl { bottom: 12px; left: 12px; }
.hud-br { bottom: 12px; right: 12px; }

/* ---------- pilares ---------- */
.pillar-filters { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1.5rem; }
.pillar-tab {
  background: var(--surface-low); border: var(--hairline); color: var(--on-var);
  padding: .55rem .9rem; border-radius: var(--r); font-size: .66rem;
  transition: all .2s;
}
.pillar-tab:hover { color: var(--on); background: var(--surface-c); }
.pillar-tab.active { background: var(--cyan); color: #1A1412; border-color: var(--cyan); box-shadow: var(--glow); }

.pillar-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.pillar-card {
  background: var(--surface-low); border: var(--hairline); border-radius: var(--r-lg);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform .25s, border-color .25s, box-shadow .25s, opacity .3s;
}
.pillar-card.hidden { display: none; }
 .pillar-card:hover { transform: translateY(-4px); border-color: rgba(var(--cyan-rgb), .68); box-shadow: var(--glow); }
.pillar-media { position: relative; aspect-ratio: 16/8.2; overflow: hidden; }
.pillar-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s; }
.pillar-card:hover .pillar-media img { transform: scale(1.04); }
.pillar-media::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to top, var(--surface-low), transparent 45%);
}
.pillar-body { padding: 1.25rem 1.4rem 1.5rem; display: flex; flex-direction: column; gap: .55rem; flex: 1; }
.pillar-body .mono { font-size: .62rem; }
.pillar-body h3 { font-size: 1.15rem; margin: 0; }
.pillar-body p { font-size: .88rem; }
.spec-matrix {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem;
  background: var(--surface-c); border-radius: var(--r); padding: .7rem;
  margin-top: auto;
}
.spec-matrix div { display: flex; flex-direction: column; gap: 2px; }
.spec-matrix span { font-size: .54rem; letter-spacing: .1em; color: var(--outline); text-transform: uppercase; }
.spec-matrix b { font-family: var(--f-mono); font-weight: 600; font-size: .72rem; color: var(--teal); }

/* benchmark table */
.bench { margin-top: 3rem; }
.bench-table {
  width: 100%; border-collapse: collapse;
  background: var(--surface-low); border-radius: var(--r-lg); overflow: hidden;
  border: var(--hairline); font-size: .8rem;
}
.bench-table th {
  font-family: var(--f-mono); font-weight: 500; font-size: .62rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--outline); background: var(--surface-high);
  text-align: left; padding: .8rem 1rem;
}
.bench-table td { padding: .8rem 1rem; border-top: 1px solid rgba(181, 163, 145, .16); color: var(--on); vertical-align: middle; }
.bench-table td[data-label="Pilar"] { display: flex; align-items: center; gap: .5rem; font-family: var(--f-mono); font-size: .72rem; }
.bench-table td[data-label="Software"] { color: var(--on-var); }
.bench-table tbody tr { transition: background .2s; }
.bench-table tbody tr:hover { background: var(--surface-c); }

/* ---------- viewer ---------- */
/* Grid blowout: sem `min-width: 0` os itens da grid recebem o tamanho mínimo
   automático (= min-content). No celular, a lista de modelos vira uma fileira
   rolável e o canvas do three.js já nasce dimensionado — os dois inflariam a
   track `1fr` além da coluna, estourando a página inteira. */
.viewer-wrap {
  display: grid; grid-template-columns: 300px 1fr; gap: 1rem;
}
/* todos os itens da grid podem encolher até a largura real da coluna */
.viewer-wrap > * { min-width: 0; }
.model-list-wrap {
  background: var(--surface-low); border: var(--hairline); border-radius: var(--r-lg);
  padding: .8rem; display: flex; flex-direction: column; gap: .6rem;
  max-height: var(--vp-h);   /* a coluna não passa da altura do render */
}
/* ---------- scroll nas listas (projetos + viewer) ----------
   Linguagem única de barra: fina, track --surface-lowest, thumb
   --surface-highest, hover ciano — espelhada no tema claro. */
.scroll-area {
  scrollbar-width: thin;
  scrollbar-color: var(--surface-highest) var(--surface-lowest);
  overscroll-behavior: contain;
  scroll-behavior: smooth;
}
.scroll-area::-webkit-scrollbar { width: 9px; }
.scroll-area::-webkit-scrollbar-track { background: var(--surface-lowest); }
.scroll-area::-webkit-scrollbar-thumb {
  background: var(--surface-highest); border-radius: 5px; border: 2px solid var(--surface-lowest);
}
.scroll-area::-webkit-scrollbar-thumb:hover { background: var(--teal); }
:root[data-theme="light"] .scroll-area { scrollbar-color: #9B7468 var(--surface-lowest); }
:root[data-theme="light"] .scroll-area::-webkit-scrollbar-thumb { background: #B9A99A; }
:root[data-theme="light"] .scroll-area::-webkit-scrollbar-thumb:hover { background: #8A3442; }

/* a lista de modelos ocupa o resto da coluna e rola dentro dela: assim as
   duas colunas terminam na mesma altura (a do render) e a seção não estufa */
.model-list {
  display: flex; flex-direction: column; gap: .4rem; min-width: 0;
  flex: 1 1 auto; min-height: 0; overflow-y: auto;
  scrollbar-gutter: stable; padding-right: .1rem;
}
.model-list-wrap > header, .model-list-wrap > footer { font-size: .58rem; }
.model-item {
  display: flex; align-items: center; gap: .7rem; width: 100%;
  background: var(--surface-c); border: 1px solid transparent; border-radius: var(--r);
  padding: .6rem .7rem; text-align: left; color: var(--on-var);
  transition: border-color .2s, background .2s, color .2s;
}
.model-item:hover { background: var(--surface-high); color: var(--on); }
.model-item.active { border-color: rgba(var(--cyan-rgb), .65); background: var(--surface-highest); color: var(--on); }
.model-idx { font-family: var(--f-mono); font-size: .66rem; color: var(--cyan); flex: none; }
.model-item.active .model-idx { text-shadow: 0 0 8px var(--cyan); }
.model-info { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.model-title { font-family: var(--f-display); font-weight: 600; font-size: .82rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.model-meta { font-family: var(--f-mono); font-size: .56rem; letter-spacing: .08em; text-transform: uppercase; color: var(--outline); }
.model-ext { font-family: var(--f-mono); font-size: .56rem; color: var(--teal); flex: none; }
.model-empty { font-family: var(--f-mono); font-size: .62rem; color: var(--outline); }

.viewport-shell { position: relative; }
.viewport {
  position: relative; height: var(--vp-h);
  background: #211B17; border-radius: var(--r-lg); overflow: hidden;
  border: var(--hairline);
}
/* o three.js controla só o drawing buffer — o elemento nunca pode passar da
   caixa do viewport, senão volta a inflar a coluna da grid */
.viewport canvas { display: block; max-width: 100%; max-height: 100%; }
.vhud {
  position: absolute; z-index: 6; pointer-events: none;
  display: flex; flex-direction: column; gap: 2px;
  font-family: var(--f-mono); font-size: .62rem; letter-spacing: .06em;
  background: rgba(26, 20, 18, .88); backdrop-filter: blur(8px);
  padding: 6px 10px; border-radius: var(--r); border: 1px solid var(--outline-var);
}
.vhud-tl { top: 12px; left: 12px; color: var(--on); }
.vhud-tr { top: 12px; right: 12px; color: var(--outline); }
.vmodes {
  /* a barra de modos é um HUD do canvas: ancora no fundo da viewport, não no
     fundo da shell (senão invade a legenda do modelo) */
  position: absolute; z-index: 7; bottom: calc(100% - var(--vp-h) + 12px); left: 12px;
  display: flex; gap: 2px; padding: 3px;
  background: rgba(26, 20, 18, .88); backdrop-filter: blur(10px);
  border: var(--hairline); border-radius: var(--r);
}
.vmode-btn {
  background: none; border: 0; color: var(--on-var);
  font-size: .6rem; padding: .45rem .75rem; border-radius: 4px;
  transition: color .2s, background .2s;
}
.vmode-btn:hover { color: var(--on); background: var(--surface-c); }
.vmode-btn.active { color: #1A1412; background: var(--cyan); box-shadow: var(--glow); }
.viewer-model-desc { margin: .6rem 0 0; font-size: .62rem; }

.v-state {
  position: absolute; inset: 0; z-index: 8; display: none;
  align-items: center; justify-content: center; gap: .8rem;
  background: rgba(26, 20, 18, .88); backdrop-filter: blur(4px);
  font-family: var(--f-mono); font-size: .72rem; letter-spacing: .1em; color: var(--on);
}
.v-state.show { display: flex; }
.v-error { color: var(--error); }
.v-error a { color: var(--cyan); text-decoration: underline; }
.v-spinner {
  width: 22px; height: 22px; flex: none;
  border: 2px solid var(--surface-highest); border-top-color: var(--cyan);
  border-radius: 50%; animation: spin .9s linear infinite;
}
.v-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--error); flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.v-fallback { display: flex; flex-direction: column; gap: 1rem; align-items: center; justify-content: center; height: 100%; padding: 1.5rem; }
.v-fallback-title { font-family: var(--f-mono); font-size: .7rem; color: var(--error); letter-spacing: .12em; }
.v-fallback img { max-height: 75%; object-fit: cover; border-radius: var(--r); border: var(--hairline); }
.v-fallback-hint { font-family: var(--f-body); font-size: .78rem; line-height: 1.7; color: var(--on-var); text-align: center; max-width: 46ch; }
.v-fallback-hint code { font-family: var(--f-mono); font-size: .72rem; color: var(--cyan); background: var(--surface-c); padding: .2rem .5rem; border-radius: 4px; border: var(--hairline); }
.v-fallback-hint b { color: var(--on); }

/* ---------- projetos ---------- */
/* grade de 3 colunas reaproveitando o padrão .pillar-grid/.pillar-card */
.projeto-grid { grid-template-columns: repeat(3, 1fr); }

/* numeração dos filtros em CSS (counter) — nada de texto novo no HTML */
.projeto-filters { counter-reset: proj -1; }
.projeto-filters .pillar-tab { text-transform: uppercase; }
.projeto-filters .pillar-tab::before {
  counter-increment: proj; content: '[' counter(proj, decimal-leading-zero) ']';
  margin-right: .5rem; opacity: .55;
}

.projeto-count { font-size: .62rem; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 1rem; }
.projeto-cat { align-self: flex-start; font-size: .55rem; letter-spacing: .1em; text-transform: uppercase; }
.projeto-tags {
  font-size: .58rem; letter-spacing: .07em; color: var(--on-var);
  border-top: 1px solid var(--hairline); padding-top: .6rem; margin-top: auto;
}

/* faixa de miniaturas — fica sobre a mídia, não altera a altura do card */
.projeto-img-count { z-index: 4; }
/* cards com foto: o media inteiro (e o corpo) abrem o lightbox */
.projeto-card .projeto-media { cursor: pointer; }
.projeto-strip { position: absolute; left: 12px; bottom: 12px; z-index: 4; display: flex; gap: 5px; }
.projeto-thumb {
  position: relative; width: 48px; height: 34px; padding: 0; margin: 0;
  border: 1px solid rgba(255, 255, 255, .32); border-radius: 3px; overflow: hidden;
  background: var(--surface-c); cursor: pointer;
  transition: border-color .2s, transform .2s;
}
.projeto-thumb img { width: 100%; height: 100%; object-fit: cover; }
.projeto-thumb:hover { border-color: var(--cyan); transform: translateY(-2px); }
.projeto-thumb:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
/* thumb de vídeo: selo de play sobre o frame */
.projeto-thumb--video .projeto-play {
  position: absolute; inset: 0; z-index: 2; display: grid; place-items: center;
  font-size: .55rem; line-height: 1; color: #FFF4E8;
  background: rgba(26, 20, 18, .45); text-shadow: 0 1px 4px rgba(0,0,0,.6);
}
.projeto-num {
  position: absolute; right: 0; bottom: 0; font-size: .5rem; line-height: 1.4;
  padding: 0 3px; color: var(--on); background: rgba(26, 20, 18, .82);
  border-radius: 2px 0 0 0;
}

/* variante sem foto: mesma card, painel tipográfico no lugar da caixa de imagem */
.projeto-card--vazio { position: relative; background: var(--surface-c); }
.projeto-card--vazio::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(var(--outline-var) 1px, transparent 1px),
                    linear-gradient(90deg, var(--outline-var) 1px, transparent 1px);
  background-size: 26px 26px; opacity: .3;
}
.projeto-body-vazia { position: relative; z-index: 1; justify-content: center; gap: .7rem; padding: 1.5rem 1.4rem; }
.projeto-index { font-family: var(--f-mono); font-size: 2.2rem; line-height: 1; color: var(--outline); }

.projeto-vazio { padding: 2.5rem 0; text-align: center; letter-spacing: .1em; }

/* ---------- projetos: lista sem scroll interno ----------
   Antes era uma região rolável (scroll próprio no desktop); agora os
   cards ocupam a grade inteira e a rolagem é só a da página.
   As variáveis ficam para a matemática de largura/altura das mídias. */
.projeto-scroll-wrap { position: relative; }
.projeto-scroll {
  --projeto-cols: 3;
  --projeto-gap: 1rem;
  --projeto-media-ratio: .5125;   /* 8.2 / 16 — a proporção do .pillar-media */
  --projeto-texto: 15.5rem;       /* chip + título + descrição + tags */
}

/* antigo véu de "tem mais conteúdo": não faz sentido sem scroll próprio */
.projeto-scroll-fade { display: none; }

.projeto-cta {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.25rem;
  margin-top: 2.5rem; padding: clamp(1.4rem, 3vw, 2.2rem);
  background: var(--surface-high); border: var(--hairline); border-radius: var(--r-lg);
}
.projeto-cta h3 { font-size: 1.15rem; margin: .35rem 0 0; }
.projeto-cta .mono { font-size: .62rem; letter-spacing: .14em; }

/* anúncio da troca de imagem (só para leitor de tela) */
.projeto-live {
  position: absolute; left: 0; top: 0; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}

/* ---------- sobre ---------- */
.about-grid { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
.about-photo { position: relative; display: flex; flex-direction: column; gap: 1.25rem; }
.tick { position: absolute; width: 14px; height: 14px; z-index: 2; }
.tick::before, .tick::after { content: ''; position: absolute; background: var(--cyan); }
.tick.tl { top: -6px; left: -6px; } .tick.tl::before { width: 14px; height: 1px; } .tick.tl::after { width: 1px; height: 14px; }
.tick.tr { top: -6px; right: -6px; } .tick.tr::before { width: 14px; height: 1px; right: 0; } .tick.tr::after { width: 1px; height: 14px; right: 0; }
.tick.bl { bottom: -6px; left: -6px; } .tick.bl::before { width: 14px; height: 1px; bottom: 0; } .tick.bl::after { width: 1px; height: 14px; bottom: 0; }
.tick.br { bottom: -6px; right: -6px; } .tick.br::before { width: 14px; height: 1px; bottom: 0; right: 0; } .tick.br::after { width: 1px; height: 14px; bottom: 0; right: 0; }

.about-photo > figure { position: relative; margin: 0; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--outline-var); }
/* o enquadramento do slot grande sobe 20% (centro horizontal, 20% do topo):
   reposiciona o corte da foto — sem scale/transform */
.about-photo > figure img { width: 100%; height: 480px; object-fit: cover; object-position: 50% 20%; filter: contrast(1.08); }
.about-photo > figure figcaption {
  position: absolute; inset: auto 0 0 0;
  background: linear-gradient(to top, rgba(17, 19, 23, .95), transparent);
  padding: 2.5rem 1.1rem 1rem; display: flex; flex-direction: column; gap: .25rem;
}
.about-photo > figure b { font-family: var(--f-display); font-size: 1.2rem; }
.about-photo > figure .mono { font-size: .58rem; }
.about-photo > figure .dim { font-size: .78rem; }

.field-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
.field-grid figure { position: relative; margin: 0; border-radius: var(--r); overflow: hidden; border: 1px solid var(--outline-var); }
.field-grid img { height: 110px; width: 100%; object-fit: cover; filter: grayscale(.6) contrast(1.15); transition: filter .5s, transform .5s; }
.field-grid figure:hover img { filter: grayscale(0) contrast(1.05); transform: scale(1.05); }
.field-grid figcaption {
  position: absolute; inset: auto 0 0 0; padding: 1.4rem .5rem .35rem;
  background: linear-gradient(to top, rgba(26, 20, 18, .9), transparent);
  display: flex; flex-direction: column; gap: 1px;
  pointer-events: none; /* o clique tem de chegar ao botão da imagem */
}
.field-grid figcaption b { font-family: var(--f-mono); font-size: .52rem; letter-spacing: .06em; }
.field-grid figcaption span { font-family: var(--f-mono); font-size: .5rem; }

/* ---------- sobre: troca de imagem (slot grande ↔ thumbnails) ----------
   O par <img> + <figcaption> viaja entre os slots; cada slot tem
   altura fixa (480px / 110px), então a troca não produz pulo de layout. */

/* o botão é o alvo real do clique e do teclado; a imagem é conteúdo */
.field-grid .thumb-btn {
  display: block; width: 100%; height: 110px; padding: 0; margin: 0;
  border: 0; background: none; cursor: pointer; position: relative; overflow: hidden;
  -webkit-appearance: none; appearance: none;
}
/* anel de foco: o outline do botão é pintado ABAIXO da foto pelo Gecko,
   então o anel visível é um overlay (::after, posicionado) por cima da imagem.
   outline-offset interno porque a figura tem overflow:hidden */
.field-grid .thumb-btn:focus-visible { outline: 2px solid var(--cyan); outline-offset: -3px; }
.field-grid .thumb-btn::after {
  content: ''; position: absolute; inset: 0; z-index: 3; pointer-events: none;
  border: 2px solid var(--cyan); border-radius: 2px;
  box-shadow: inset 0 0 0 2px rgba(4, 8, 12, .55);
  opacity: 0; transition: opacity .15s ease;
}
.field-grid .thumb-btn:focus-visible::after { opacity: 1; }
.field-grid .thumb-btn:focus-visible img { filter: grayscale(0) contrast(1.05); }

/* tema claro (papel): o cinza de .6 lava as fotos sobre o fundo claro —
   aqui a dessaturação é menor e o contraste mais baixo, sem virar "sujeira" */
:root[data-theme="light"] .field-grid img { filter: grayscale(.28) contrast(1.04); }
:root[data-theme="light"] .field-grid figure:hover img { filter: grayscale(0) contrast(1.02); }
:root[data-theme="light"] .field-grid .thumb-btn:focus-visible img { filter: grayscale(0) contrast(1.02); }

/* dica de troca (decorativa, some no repouso) */
.field-grid .thumb-swap {
  position: absolute; top: 6px; right: 6px; z-index: 2;
  display: grid; place-items: center; width: 22px; height: 22px;
  background: rgba(9, 12, 15, .78); border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 3px; color: var(--teal); pointer-events: none;
  opacity: 0; transform: translateY(-4px);
  transition: opacity .22s ease, transform .22s ease;
}
.field-grid .thumb-swap svg { width: 14px; height: 14px; display: block; }
.field-grid figure:hover .thumb-swap,
.field-grid .thumb-btn:focus-visible .thumb-swap { opacity: 1; transform: none; }

/* legenda no tile de 110px: no máximo 2 linhas, com ellipsis em vez de corte
   — a 3ª linha (subtítulo do retrato) não cabe: sai da vista e continua
   disponível para o leitor de tela */
.field-grid figcaption b,
.field-grid figcaption span {
  max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.field-grid figcaption b { order: 1; }
.field-grid figcaption span { order: 2; }
.field-grid figcaption .dim {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}

/* anúncio da troca (só para leitor de tela) */
.about-status {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}

/* crossfade + leve deslocamento na troca (curto, sem mexer no layout) */
@keyframes about-swap-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}
.about-swap-in { animation: about-swap-in .42s cubic-bezier(.22, .61, .36, 1) backwards; }

.about-body { display: flex; flex-direction: column; gap: 1.25rem; }
.about-body h2 { font-size: clamp(1.5rem, 3vw, 2rem); line-height: 1.15; margin: .25rem 0 0; letter-spacing: -.02em; }
.about-body p.dim { font-size: .95rem; line-height: 1.7; }
.about-sign {
  margin-top: .25rem; color: var(--cyan);
  font-family: var(--f-display); font-size: 1.05rem; font-weight: 600;
}
.about-chips { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; }
.about-chips div { background: var(--surface-c); border: var(--hairline); border-radius: var(--r); padding: .7rem; display: flex; flex-direction: column; gap: 2px; }
.about-chips b { font-size: .58rem; }
.about-chips strong { font-family: var(--f-display); font-size: .95rem; }
.about-chips span { font-size: .68rem; }

.tl-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; }
.tl-head .dim { font-size: .6rem; }
.timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .6rem; position: relative; }
.timeline::before {
  content: ''; position: absolute; left: 5px; top: 8px; bottom: 8px;
  width: 1px; background: linear-gradient(var(--cyan), var(--outline-var));
}
.timeline li {
  position: relative; padding: .8rem 1rem .8rem 1.5rem;
  background: var(--surface-high); border-radius: var(--r);
  display: grid; grid-template-columns: 1fr auto; gap: .2rem .8rem; align-items: start;
  transition: background .2s;
}
.timeline li:hover { background: var(--surface-highest); }
.timeline li::before {
  content: ''; position: absolute; left: 2px; top: 1.05rem;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--cyan); box-shadow: 0 0 6px var(--cyan);
}
.timeline b { font-family: var(--f-display); font-size: .92rem; }
.timeline p { grid-column: 1; font-size: .8rem; }
.timeline > li > .mono { grid-row: 1 / span 2; grid-column: 2; font-size: .6rem; padding-top: 2px; }

.skills { background: var(--surface-c); border: var(--hairline); border-radius: var(--r-lg); padding: 1.1rem; display: flex; flex-direction: column; gap: .8rem; }
.skills header { display: flex; justify-content: space-between; gap: 1rem; }
.skill { display: grid; grid-template-columns: minmax(0, 1fr) 44px; gap: .5rem; align-items: center; font-size: .8rem; }
/* posicionamento explícito: sem isto o <b> (linha 1, coluna automática) era
   colocado antes do rótulo e o texto caía na coluna de 44px — estourando a
   caixa no celular e sangrando fora do painel no desktop */
.skill > span { grid-column: 1; grid-row: 1; min-width: 0; overflow-wrap: break-word; }
.skill i {
  grid-column: 1 / -1; grid-row: 2; height: 4px; border-radius: 2px;
  background: var(--surface-lowest); overflow: hidden; position: relative;
}
.skill-fill {
  position: absolute; inset: 0 auto 0 0; width: 0;
  background: var(--cyan); box-shadow: 0 0 8px var(--cyan);
  transition: width 1.4s cubic-bezier(.22, 1, .36, 1);
}
.skill-fill.teal { background: var(--teal); box-shadow: 0 0 8px var(--teal); }
.skill b { grid-column: 2; grid-row: 1; text-align: right; font-size: .66rem; }

/* ---------- contato ---------- */
.contact-grid { display: grid; grid-template-columns: 8fr 4fr; gap: 1rem; align-items: start; }
.briefing {
  background: var(--surface-c); border: var(--hairline); border-radius: var(--r-lg);
  padding: clamp(1.25rem, 3vw, 1.75rem); display: flex; flex-direction: column; gap: 1.1rem;
}
.form-top { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: .6rem; }
fieldset { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .6rem; }
legend { font-family: var(--f-mono); font-size: .64rem; letter-spacing: .1em; text-transform: uppercase; color: var(--on-var); }
.scope-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.scope-btn {
  background: var(--surface-high); border: 1px solid transparent; border-radius: var(--r);
  padding: .8rem; text-align: left; color: var(--on);
  display: flex; flex-direction: column; gap: .2rem;
  opacity: .75; transition: all .2s;
}
.scope-btn:hover { opacity: 1; background: var(--surface-highest); }
.scope-btn strong { font-family: var(--f-display); font-size: .9rem; }
.scope-btn .dim { font-size: .72rem; }
.scope-btn.selected {
  opacity: 1; border-color: var(--cyan); box-shadow: var(--glow);
  background: var(--surface-highest);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.briefing label {
  display: flex; flex-direction: column; gap: .35rem;
  font-family: var(--f-mono); font-size: .64rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--on-var);
}
.briefing input, .briefing select, .briefing textarea {
  background: var(--surface-lowest); border: 1px solid var(--outline-var); border-radius: var(--r);
  color: var(--on); font: 400 .92rem var(--f-body);
  padding: .7rem .9rem; transition: border-color .2s, box-shadow .2s;
}
.briefing input:focus, .briefing select:focus, .briefing textarea:focus {
  outline: none; border-color: var(--cyan); box-shadow: var(--glow);
}
.briefing textarea { resize: vertical; }
.form-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; }
.status-msg { display: none; text-align: center; padding: .7rem; border-radius: var(--r); background: var(--surface-lowest); }
.status-msg.show { display: block; }
.status-msg.ok { color: var(--teal); border: 1px solid rgba(var(--teal-rgb), .52); }
.status-msg.err { color: var(--error); border: 1px solid rgba(255, 180, 171, .4); }

.channels { display: flex; flex-direction: column; gap: 1rem; }
.channel-card {
  background: var(--surface-c); border: var(--hairline); border-radius: var(--r-lg);
  padding: 1.1rem; display: flex; flex-direction: column; gap: .6rem;
}
.channel-card > .mono { font-size: .62rem; }
.channel {
  display: flex; flex-direction: column; gap: 1px;
  background: var(--surface-high); border-radius: var(--r); padding: .7rem .8rem;
  transition: background .2s;
}
.channel:hover { background: var(--surface-highest); }
.channel b { font-family: var(--f-mono); font-size: .56rem; letter-spacing: .12em; color: var(--outline); }
.channel span { font-size: .85rem; color: var(--on); word-break: break-all; transition: color .2s; }
.channel:hover span { color: var(--cyan); }
.channel.static span { color: var(--on-var); }
.net-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.net {
  background: var(--surface-high); border-radius: var(--r); padding: .7rem .8rem;
  font-size: .62rem; color: var(--on); transition: all .2s;
  display: flex; justify-content: space-between;
}
.net:hover { background: var(--surface-highest); color: var(--cyan); }

/* ---------- footer ---------- */
.footer { background: var(--surface-lowest); border-top: var(--hairline); padding: clamp(2.5rem, 6vw, 4rem) 0 1.5rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; }
.footer-grid > div { display: flex; flex-direction: column; gap: .5rem; }
.footer-grid b { font-family: var(--f-display); font-size: 1.15rem; }
.footer-grid .dim { font-size: .8rem; max-width: 40ch; }
/* footer básico: só nome + assinatura */
.footer-grid--basi { grid-template-columns: 1fr; gap: .3rem; }
.footer-grid--basi b { font-size: 1.05rem; letter-spacing: .06em; }
.stack-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .4rem; font-size: .66rem; color: var(--on); }
.stack-list li { display: flex; align-items: center; gap: .5rem; }
.footer-base {
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  margin-top: 2.5rem; padding-top: 1rem; border-top: 1px solid rgba(181, 163, 145, .18);
  font-size: .58rem;
}
.footer-base .credit { color: var(--cyan); text-decoration: none; transition: opacity .2s; }
.footer-base .credit:hover { opacity: .7; text-decoration: underline; }

/* ---------- reveal ---------- */
[data-reveal] { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s cubic-bezier(.22, 1, .36, 1); }
[data-reveal].in, .pillar-card.in { opacity: 1; transform: none; }
.pillar-card { opacity: 0; transform: translateY(22px); }
.pillar-card.in { transition: opacity .5s ease, transform .5s cubic-bezier(.22, 1, .36, 1), border-color .25s, box-shadow .25s, transform .25s; }

@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

/* ---------- responsivo ---------- */
@media (max-width: 1080px) {
  .stat-grid, .phases, .about-chips { grid-template-columns: repeat(2, 1fr); }
  .workbench { grid-template-columns: 1fr 1fr; }
  .wb-text { grid-column: 1 / -1; }
  .pillar-grid { grid-template-columns: 1fr; }
  .projeto-grid { grid-template-columns: repeat(2, 1fr); }
  .projeto-scroll { --projeto-cols: 2; }
  .viewer-wrap { grid-template-columns: 240px 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .nav-burger { display: block; }
  .nav-links-wrap {
    position: fixed; inset: var(--nav-h) 0 auto 0; flex-direction: column;
    align-items: stretch; gap: 0; padding: .5rem 1rem 1rem;
    background: rgba(26, 20, 18, .97); backdrop-filter: blur(20px);
    border-bottom: var(--hairline);
    transform: translateY(-8px); opacity: 0; pointer-events: none;
    transition: transform .25s, opacity .25s;
  }
  .nav.open .nav-links-wrap { transform: none; opacity: 1; pointer-events: auto; }
  .nav.open .nav-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav.open .nav-burger span:nth-child(2) { opacity: 0; }
  .nav.open .nav-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .nav-link { padding: .9rem .5rem; border-bottom: var(--hairline); }

  .case, .case-flip { grid-template-columns: 1fr; }
  .case-flip .case-media { order: 0; }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-media { max-width: 560px; width: 100%; }
  .about-grid { grid-template-columns: 1fr; }
  .about-photo > figure img { height: 420px; }
  .contact-grid { grid-template-columns: 1fr; }

  /* tabela benchmark → cards */
  .bench-table thead { display: none; }
  .bench-table, .bench-table tbody { display: block; }
  .bench-table tr {
    display: grid; grid-template-columns: 1fr 1fr; gap: .5rem;
    padding: .9rem 1rem; border-top: 1px solid rgba(181, 163, 145, .16);
  }
  .bench-table td { border: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
  .bench-table td::before {
    content: attr(data-label);
    font-family: var(--f-mono); font-size: .54rem; letter-spacing: .12em;
    text-transform: uppercase; color: var(--outline);
  }
  .bench-table td[data-label="Pilar"] { grid-column: 1 / -1; flex-direction: row; }
}

@media (max-width: 560px) {
  .stat-grid, .phases, .about-chips, .scope-grid, .form-row,
  .workbench, .spec-matrix, .case-specs, .net-grid { grid-template-columns: 1fr; }
  .spec-matrix, .case-specs { grid-template-columns: 1fr 1fr; }
  .projeto-grid { grid-template-columns: 1fr; }
  .projeto-cta { flex-direction: column; align-items: flex-start; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .cmp-presets { justify-content: center; }
  .footer-grid { grid-template-columns: 1fr; }
  .compare { height: 260px; }
  .compare-tag.br { display: none; }
  .compare-tag.bl { display: none; }
  .timeline li { grid-template-columns: 1fr; }
  .timeline > li > .mono { grid-row: auto; grid-column: 1; }

  /* viewer em tela estreita: os dois HUDs do topo não cabem lado a lado —
     o hint de navegação desce uma linha e passa a ancorar embaixo do bloco
     de identificação (topo-esquerda) */
  .vhud-tr { top: 84px; }
}

/* a lista de projetos nunca teve scroll interno agora: já é fluxo natural
   em todas as larguras (regra base) — bloco mantido por compatibilidade */

/* viewer no celular/tablet: a lista de modelos vira uma fileira horizontal
   (sem rolagem vertical, altura natural) e o rodapé some — como antes.
   A coluna volta a ter a altura do conteúdo (sem o teto de --vp-h). */
@media (max-width: 900px) {
  .viewer-wrap { grid-template-columns: 1fr; }
  .model-list-wrap { max-height: none; }
  .model-list {
    flex-direction: row; overflow-x: auto; overflow-y: hidden;
    flex: 0 0 auto; min-height: 0; max-height: none;
    scrollbar-gutter: auto; padding: 0 0 .3rem 0;
  }
  .model-item { flex: none; width: auto; }
  .model-list-wrap > footer { display: none; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
  .skill-fill { transition: none; }
  .scroll-area { scroll-behavior: auto; }
  .projeto-scroll { scroll-behavior: auto; }
}
