/* =========================================================
   ESTILO DO SITE (Lorena Trovo)
   ---------------------------------------------------------
   Cores, fonte e tamanhos ficam aqui no topo, em :root.
   Mude um valor e ele muda no site inteiro.

   Layout: colunas lado a lado, separadas por linhas finas,
   com texto pequeno em serifa (como num caderno de processo).
   ========================================================= */

:root {
  /* Cores */
  --fundo: #ffffff;
  --texto: rgba(0, 0, 0, 0.85);
  --texto-suave: rgba(0, 0, 0, 0.6);
  --texto-claro: rgba(0, 0, 0, 0.4);
  --linha: rgba(0, 0, 0, 0.15);
  --area-imagem: #f2f1ee;

  /* Fonte */
  --fonte: "Newsreader", "Times New Roman", Times, serif;
  --tamanho: 13px;
  --entrelinha: 1.18;

  /* Espaços */
  --respiro: 8px;     /* espaço interno das colunas */
  --entre: 1.2em;     /* espaço entre blocos de texto */

  color-scheme: light;
}

/* No celular o texto fica maior para ler bem */
@media (max-width: 760px) {
  :root { --tamanho: 16px; --respiro: 10px; }
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--fundo);
  color: var(--texto);
  font-family: var(--fonte);
  font-size: var(--tamanho);
  line-height: var(--entrelinha);
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
p { margin: 0 0 var(--entre); }
p:last-child { margin-bottom: 0; }
h1, h2, h3 { font: inherit; margin: 0; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--texto-claro); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 1px dotted var(--texto); outline-offset: 2px;
}
em { font-style: italic; }
[hidden] { display: none !important; }
.suave { color: var(--texto-suave); }
.claro { color: var(--texto-claro); }

/* Links entre colchetes: [Ver mais..] */
.colchete { color: var(--texto); }
.colchete:hover { color: var(--texto-claro); }

/* ---------- Moldura geral ---------- */
.moldura {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ---------- Colunas com linhas finas ----------
   Cada célula desenha uma linha fina à sua esquerda.
   A grade esconde a linha da primeira coluna. */
.grade {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow: hidden;
}
.grade > * {
  min-width: 0;
  padding: var(--respiro);
  box-shadow: -1px 0 0 var(--linha);
}
.ocupa-2 { grid-column: span 2; }

/* ---------- Topo ---------- */
.topo { border-bottom: 1px solid var(--linha); }
.topo .nome { font-style: italic; }
.menu { display: flex; flex-wrap: wrap; gap: 0 1.4em; }
.menu a[aria-current="page"] { font-style: italic; text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; }
.topo .profissao { text-align: right; color: var(--texto-suave); }

/* ---------- Conteúdo ---------- */
main { flex: 1; display: flex; flex-direction: column; }
main > .grade { flex: 1; }

/* Rótulo no alto de cada coluna (como "Graphic" na referência) */
.rotulo {
  display: flex; justify-content: space-between; gap: 1em;
  padding-bottom: var(--respiro);
  margin-bottom: var(--respiro);
  border-bottom: 1px solid var(--linha);
}

/* Pares "rótulo | valor" (Formação, Atualmente...) */
.par {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: var(--respiro);
  padding-block: var(--respiro) calc(var(--respiro) * 3);
  border-top: 1px solid var(--linha);
}
.par:first-child, .rotulo + .par { border-top: 0; padding-top: 0; }
.par > * { min-width: 0; overflow-wrap: anywhere; }

/* ---------- Abertura (Início) ---------- */
.abertura-nome { font-size: 2.2em; line-height: 1.05; padding-bottom: var(--entre); text-wrap: balance; }
.abertura-texto p { max-width: 22em; }
.abertura-links { margin-top: calc(var(--entre) * 2); }
.abertura-foto { display: flex; justify-content: center; align-items: flex-start; }
.abertura-foto figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: var(--respiro); max-width: 100%; }
.abertura-foto img {
  width: auto; max-width: 100%;
  max-height: calc(100vh - 6.5em);  /* a foto e a frase cabem na tela */
  object-fit: contain;
}
.abertura-foto figcaption { text-align: center; }

/* ---------- Sobre mim ---------- */
/* A coluna da foto é mais estreita que as colunas de texto.
   O topo desta página segue as mesmas medidas, para as linhas ficarem alinhadas.
   Para mudar o tamanho da foto, mude o primeiro número (0.6). */
@media (min-width: 761px) {
  .sobre,
  [data-pagina="sobre"] .topo { grid-template-columns: minmax(0, 0.6fr) minmax(0, 1fr) minmax(0, 1fr); }
}
.foto img { width: 100%; height: auto; }  /* a foto aparece inteira, sem cortes */
.apresentacao { max-width: 34em; }
.lista-simples { list-style: none; margin: 0; padding: 0; }

/* ---------- Projetos ---------- */
.barra-filtros {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--respiro);
  padding: var(--respiro) 0;
  border-bottom: 1px solid var(--linha);
}
#filtros { display: flex; flex-wrap: wrap; gap: 0 1.4em; }
#filtros button {
  font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer;
}
#filtros button:hover { color: var(--texto-claro); }
#filtros button[aria-pressed="true"] { font-style: italic; text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; }

.grade-projetos { align-content: start; }
.card { display: flex; flex-direction: column; gap: var(--respiro); padding-bottom: calc(var(--respiro) * 4) !important; }
.card-imagem img {
  width: 100%; aspect-ratio: 4 / 5; object-fit: cover; background: var(--area-imagem);
  transition: opacity .35s ease;
}
.card-imagem:hover img { opacity: .82; }
.legenda {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--respiro);
  padding-top: var(--respiro); border-top: 1px solid var(--linha);
}
.legenda-texto { display: flex; flex-direction: column; gap: var(--entre); }
.legenda-texto p { margin: 0; }
.vazio { padding: var(--respiro); color: var(--texto-suave); }

/* ---------- Detalhe do projeto ---------- */
.detalhe-info { display: flex; flex-direction: column; }
.detalhe-info > p { margin-bottom: calc(var(--respiro) * 2); }
.titulo-projeto { font-style: italic; padding-bottom: calc(var(--respiro) * 3); }
.detalhe-info .par:first-of-type { border-top: 1px solid var(--linha); padding-top: var(--respiro); }
.texto-projeto { border-top: 1px solid var(--linha); padding-block: var(--respiro) calc(var(--respiro) * 3); max-width: 34em; }
.navegacao-projeto { display: flex !important; justify-content: space-between; }
@media (min-width: 761px) {
  .colado { position: sticky; top: var(--respiro); }
}
.galeria { display: grid; grid-template-columns: minmax(0, 1fr); gap: calc(var(--respiro) * 3); align-content: start; }
.galeria figure { margin: 0; }
.galeria img { width: auto; max-width: 100%; max-height: 90vh; margin-inline: auto; background: var(--area-imagem); }  /* fotos verticais não ficam gigantes */
.galeria figcaption { padding-top: 4px; color: var(--texto-suave); }

/* ---------- Contato ---------- */
.botao-texto {
  font: inherit; color: var(--texto-suave); background: none; border: 0; padding: 0; cursor: pointer;
}
.botao-texto:hover { color: var(--texto); }
.formulario { max-width: 44em; }
.formulario .par { align-items: start; }
.formulario label { padding-top: 2px; }
.formulario input, .formulario textarea {
  width: 100%; font: inherit; color: var(--texto); background: transparent;
  border: 0; border-bottom: 1px solid var(--linha); border-radius: 0;
  padding: 2px 0 4px;
}
.formulario textarea { min-height: 10em; resize: vertical; }
.formulario input:focus, .formulario textarea:focus { outline: none; border-bottom-color: var(--texto); }
.enviar {
  font: inherit; color: var(--texto); background: none; border: 0; padding: 0; cursor: pointer;
}
.enviar:hover { color: var(--texto-claro); }
#aviso-form:empty { display: none; }

/* ---------- Rodapé ---------- */
.rodape {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: var(--respiro);
  padding-block: var(--respiro);
  border-top: 1px solid var(--linha);
  color: var(--texto-suave);
}

/* ---------- Tablet ---------- */
@media (max-width: 1100px) and (min-width: 761px) {
  .grade-projetos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sobre { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sobre .info { grid-column: 1 / -1; box-shadow: 0 -1px 0 var(--linha); }
}

/* ---------- Celular: tudo em uma coluna ---------- */
@media (max-width: 760px) {
  .grade { grid-template-columns: minmax(0, 1fr); }
  .grade > * { box-shadow: 0 -1px 0 var(--linha); padding-inline: 0; }
  .ocupa-2 { grid-column: auto; }
  .topo.grade > * { box-shadow: none; padding-block: 4px; }
  .topo .topo-vazio { display: none; }
  .topo { padding-block: 6px; }
  .topo .profissao { text-align: left; }
  .grade-projetos .card { padding-bottom: calc(var(--respiro) * 3) !important; }
  .galeria { grid-template-columns: minmax(0, 1fr); }
  /* No celular a foto vem primeiro, depois o texto */
  .abertura-foto { order: -1; padding-top: 0; }
  .abertura-texto { display: none; }
  .abertura-foto img { max-height: none; width: 100%; }
}

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