/* =========================================================
   Simão Ribeiro, portfolio: a página principal (css/styles.css)

   Ideia: uma pequena exposição com jardim. Entras pelo jardim
   (um prado pintado), passas pelas salas (paredes vermelhas e
   pretas, alternadas; azul no estágio) e sais para outro jardim,
   que ganha cor à medida que desces até ao fim.
   Os projetos têm uma página própria (em projects/, com o
   css/project.css); as paredes são escuras.

   Índice (procura o título em maiúsculas):
   1.  Cores, letras e medidas (:root) e a parede de cada sala
   2.  Base, botões e a seta
   3.  MENU
   4.  O PRADO (o desenho das flores)
   5.  O NOME (a mancha das letras)
   6.  ENTRADA (o palco, a frase e a espera)
   7.  SALAS (estrutura comum)
   8.  PROJECTS
   9.  ESTÁGIO CURRICULAR
   10. ABOUT (o texto, a fotografia e o percurso)
   11. CV (e as skills)
   12. CONTACT (e o formulário)
   13. SAÍDA (o jardim do fim)
   14. AO FAZER SCROLL (as entradas das coisas)
   15. RESPONSIVO e movimento reduzido
   16. IMPRESSÃO (Ctrl+P = CV)
   O script de cada parte está em js/ (vê o README).
   ========================================================= */

:root {
  /* Paredes: vermelho (oxblood) e preto (carvão), alternados */
  --charcoal: #1a1918;
  --oxblood:  #361e20;
  --night:    #121111;

  --wall-entrance: var(--charcoal); /* Home         */
  --wall-works:    var(--oxblood);  /* Projects     */
  --wall-intern:   #1b2d3a;         /* Estágio: o azul da Capgemini, no tom do vermelho */
  --wall-bio:      var(--charcoal); /* About        */
  --wall-cv:       var(--oxblood);  /* CV           */
  --wall-guest:    var(--charcoal); /* Contact      */
  --wall-exit:     var(--night);    /* Jardim final */

  /* O vermelho claro dos detalhes (e o azul claro, no estágio) */
  --rose: #c2948d;
  --sky:  #8db3cc;

  /* Papel e tinta */
  --paper:   #ece6da;
  --paper-2: #bdb5a7;
  --line:    rgb(236 230 218 / 0.14);
  --ink:     #1d1a16;
  --ink-2:   #5d564c;
  --accent:  var(--rose);

  --display: "IM Fell French Canon", "Ibarra Real Nova", Georgia, serif; /* o nome */
  --serif: "Ibarra Real Nova", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Schibsted Grotesk", ui-sans-serif, system-ui, sans-serif;

  /* A escala tipográfica: poucos tamanhos, sempre com o mesmo papel, no site e
     nas páginas dos projetos (o css/project.css tem os mesmos). Com o html a
     112.5% (1rem = 18 px) e, a partir de 760 px de largura, a 118.75% (19 px).
       --t-label    etiquetas pequenas, em maiúsculas, com espaço entre as letras
       --t-xs       notas: contadores, legendas curtas, rodapés, ajudas pequenas
       --t-sm       texto secundário: botões, chips, legendas, ajudas
       --t-base     o texto
       --t-lede     frases de abertura e texto em serifa (respostas, campos)
       --t-lead     destaques: títulos de cartões e parágrafos grandes
       --t-heading  títulos das partes (os nomes dos projetos, "What I learned"...)
       --t-title    títulos das secções (Projects, CV, Contact, o nome do projeto; o
                    "About" é a única exceção, maior: --a, na parte do About) */
  --t-label: 0.75rem;
  --t-xs: 0.8125rem;
  --t-sm: 0.9375rem;
  --t-base: 1.0625rem;
  --t-lede: clamp(1.125rem, 1.5vw, 1.3125rem);
  --t-lead: clamp(1.25rem, 2.2vw, 1.875rem);
  --t-heading: clamp(2rem, 3.6vw, 3rem);
  --t-title: clamp(3rem, 7vw, 6rem);
  --t-name: clamp(3.25rem, 10.13vw, 8rem); /* o nome, na entrada (só ele) */

  --gutter: clamp(16px, 4vw, 48px);
  --side: max(var(--gutter), 76px); /* margem lateral das salas: deixa espaço ao menu vertical */
  --max: 1200px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

html {
  font-size: 112.5%; /* todas as letras 12,5% maiores: 1rem = 18 px (era 16) */
  background-color: var(--wall-entrance); /* a cor de base, por baixo da parede */
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
/* Em ecrãs maiores do que um telemóvel, as letras ainda um pouco maiores
   (1rem = 19 px): mais legível e com mais presença. No telemóvel ficam a 18. */
@media screen and (min-width: 760px) {
  html { font-size: 118.75%; }
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--paper);
  font-family: var(--sans);
  font-size: var(--t-base);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* A parede: uma camada fixa com a cor da sala onde estás (o JS muda data-room).
   Tem camada própria e é uma cor lisa, por isso mudar de cor quase não custa
   nada (antes era o fundo da página, e a página inteira era repintada). */
.walls {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-color: var(--wall-entrance);
  transition: background-color 1.1s var(--ease);
  will-change: transform;
  pointer-events: none;
}
body[data-room="works"] .walls { background-color: var(--wall-works); }
body[data-room="intern"] .walls { background-color: var(--wall-intern); }
body[data-room="bio"] .walls   { background-color: var(--wall-bio); }
body[data-room="cv"] .walls    { background-color: var(--wall-cv); }
body[data-room="guest"] .walls { background-color: var(--wall-guest); }
body[data-room="exit"] .walls  { background-color: var(--wall-exit); }

[data-wall="entrance"] { --wall: var(--wall-entrance); }
[data-wall="works"]    { --wall: var(--wall-works); }
[data-wall="intern"]   { --wall: var(--wall-intern); }
[data-wall="bio"]      { --wall: var(--wall-bio); }
[data-wall="cv"]       { --wall: var(--wall-cv); }
[data-wall="guest"]    { --wall: var(--wall-guest); }
[data-wall="exit"]     { --wall: var(--wall-exit); }

/* Sem JavaScript, cada sala pinta a sua própria parede */
html:not(.js) [data-wall] { background-color: var(--wall); }

/* A passagem entre páginas: ao abrir um projeto (ou voltar), a imagem e o
   título viajam para o sítio deles na página seguinte e o resto desvanece.
   Os pares têm o mesmo view-transition-name nas duas páginas (no style de cada
   um). Nos browsers que não a suportam, a página muda como sempre; com
   "reduzir movimento", também. O mesmo está no css/project.css. */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
}
::view-transition-group(*) { animation-duration: 0.7s; animation-timing-function: cubic-bezier(0.22, 0.61, 0.36, 1); }
::view-transition-old(root),
::view-transition-new(root) { animation-duration: 0.45s; }
::view-transition-old(*),
::view-transition-new(*) { object-fit: contain; }

/* Grão de tinta sobre tudo + luz suave vinda do teto */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  opacity: 0.07;
  /* a luz suave do teto e o grão na mesma camada (uma camada de ecrã inteiro em vez de duas);
     0.64 x 0.07 dá a mesma luz de antes */
  background-image: radial-gradient(120% 70% at 50% -10%, rgb(255 238 214 / 0.64), transparent 60%), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* O que tem o atributo hidden fica mesmo escondido, mesmo que o CSS lhe dê
   outro display (sem isto, o painel do menu fechado ficava invisível por cima
   da página e apanhava os cliques e o rato) */
[hidden] { display: none !important; }

img { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; }

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

.defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr-only,
.icon-label {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.print-only { display: none; }

/* ---------- O botão cor de papoila (enviar, no contacto) ----------
   A mesma cor do jardim final. Só o ícone, ao centro; o nome está no
   aria-label, para quem usa leitor de ecrã. Ao passar o rato, a cor
   aquece um pouco e a seta faz o seu caminho, uma vez (bb-send, mais
   abaixo; o js/buttons.js deixa-a acabar mesmo que o rato saia). */
.bloom-btn {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 196px;
  height: 58px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(115deg, #8e2c26 0%, #b5483c 48%, #cf5d48 100%);
  background-size: 200% 100%;
  background-position: 0% 0;
  color: #fbf5ea;
  text-decoration: none;
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgb(255 236 220 / 0.22),
    inset 0 -1px 0 rgb(0 0 0 / 0.2),
    0 16px 32px -18px rgb(10 2 2 / 0.95);
  transition: background-position 0.8s var(--ease), box-shadow 0.45s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.bloom-btn:hover,
.bloom-btn:focus-visible {
  background-position: 100% 0;
  box-shadow:
    inset 0 1px 0 rgb(255 236 220 / 0.28),
    inset 0 -1px 0 rgb(0 0 0 / 0.2),
    0 20px 40px -16px rgb(207 93 72 / 0.5);
}
.bloom-btn:disabled,
.bloom-btn.is-busy { cursor: progress; opacity: 0.75; }
.bb-icon {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
/* A seta, uma volta por passagem do rato (o script junta .is-going):
   sai pelo canto de cima e volta a entrar pelo de baixo */
@media (prefers-reduced-motion: no-preference) {
  .bloom-btn--send.is-going .bb-arrow { animation: bb-send 0.75s both; }
}
@keyframes bb-send {
  0%   { transform: translate(0, 0); opacity: 1; animation-timing-function: cubic-bezier(0.55, 0, 0.8, 0.35); }
  40%  { transform: translate(9px, -9px); opacity: 0; }
  41%  { transform: translate(-9px, 9px); opacity: 0; animation-timing-function: cubic-bezier(0.2, 0.75, 0.3, 1); }
  100% { transform: translate(0, 0); opacity: 1; }
}

/* O botão de texto ("Write another message", depois de enviar) */
.text-btn {
  padding: 8px 0;
  border: 0;
  background: none;
  color: inherit;
  font: 500 var(--t-sm)/1.2 var(--sans);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 6px;
  cursor: pointer;
  transition: text-underline-offset 0.3s var(--ease);
}
.text-btn:hover { text-underline-offset: 3px; }

/* Seta para descer (entrada) e para subir (jardim final) */
.scroll-cue {
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  color: var(--paper-2);
  font-family: var(--sans);
  font-size: 1.375rem;
  line-height: 1;
  text-decoration: none;
  transition: color 0.3s, transform 0.4s var(--ease), opacity 0.6s var(--ease);
}
.scroll-cue:hover { color: var(--paper); transform: translateY(3px); }

/* =========================================================
   MENU: uma palavra na vertical, a meio do lado direito.
   Abre um painel no ecrã inteiro: duas cortinas entram do lado
   do botão e as opções sobem, uma a uma (js/menu.js).
   ========================================================= */
.menu-toggle {
  --roll: cubic-bezier(0.7, 0, 0.2, 1);
  position: fixed;
  top: 50%;
  right: clamp(6px, 1.3vw, 22px);
  z-index: 95;
  display: grid;
  padding: 14px 12px;
  overflow: hidden;
  border: 0;
  background: none;
  color: var(--paper);
  font: 700 clamp(0.9375rem, 1.24vw, 1.1875rem)/1 var(--sans);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  writing-mode: vertical-rl;
  transform: translateY(-50%);
  cursor: pointer;
  transition: color 0.3s, opacity 0.8s var(--ease), transform 0.8s var(--ease), visibility 0s;
}
.menu-toggle:hover { color: #fff; }
/* Na entrada (a landing) o MENU não aparece: só depois de ela acabar, quando
   chegas aos projetos (o js/rooms.js muda o data-room do <body>), entra a
   deslizar um pouco da direita. Ao voltar à entrada, sai. Aberto (é o "Close"),
   fica sempre. Sem JavaScript, fica sempre à vista. */
html.js body[data-room="entrance"] .menu-toggle[aria-expanded="false"] {
  opacity: 0;
  visibility: hidden;
  transform: translate(14px, -50%);
  transition: color 0.3s, opacity 0.45s var(--ease), transform 0.45s var(--ease), visibility 0s linear 0.45s;
}
/* MENU e CLOSE no mesmo sítio: ao abrir, uma rola para fora e a outra entra */
.menu-word {
  grid-area: 1 / 1;
  display: block;
  margin-bottom: -0.2em; /* o espaço depois da última letra não conta para o centro */
  transition: transform 0.75s var(--roll), opacity 0.5s var(--roll);
}
.menu-word--close { transform: translateY(-120%); opacity: 0; }
html.menu-open .menu-word--open { transform: translateY(120%); opacity: 0; }
html.menu-open .menu-word--close { transform: none; opacity: 1; transition-delay: 0.12s; }

/* O painel: duas cortinas entram do lado direito (onde está o botão), uma
   escura e logo atrás a vermelha; depois as opções sobem, uma a uma, por trás
   de uma linha invisível. A fechar, as opções saem para cima e as cortinas
   recolhem para o lado do botão.
   Só se mexe em transform e opacity: a placa gráfica faz tudo sozinha. */
.menu-panel {
  --curtain: cubic-bezier(0.76, 0, 0.24, 1);
  --rise: cubic-bezier(0.16, 1, 0.3, 1);
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  align-items: center;
  padding: 6vh clamp(28px, 12vw, 200px);
  overflow: hidden auto;
  pointer-events: none;
}
.menu-panel.is-open { pointer-events: auto; }
.menu-curtain {
  position: fixed;
  inset: 0;
  transform: translate3d(101%, 0, 0);
  transition: transform 0.95s var(--curtain), background-color 0.6s var(--ease);
  will-change: transform;
}
.menu-curtain--a { background: #231314; }
/* --menu-wall: a cor da secção por baixo do rato (o js/menu.js muda-a) */
.menu-curtain--b { background: var(--menu-wall, var(--oxblood)); }
.menu-panel.is-open .menu-curtain { transform: none; }
.menu-panel.is-open .menu-curtain--b { transition-delay: 0.09s; }
.menu-panel.is-closing .menu-curtain { transition-duration: 0.8s; }
.menu-panel.is-closing .menu-curtain--a { transition-delay: 0.1s; }
.menu-panel nav { position: relative; z-index: 1; }
.menu-list {
  display: grid;
  gap: clamp(0px, 0.6vh, 8px);
  margin: 0;
  padding: 0;
  list-style: none;
}
/* cada opção sobe por trás de uma linha invisível (o li corta o que está fora) */
.menu-list > li {
  overflow-x: visible;
  overflow-y: clip;
  padding-bottom: 0.1em;
  margin-bottom: -0.1em;
}
.menu-list > li > a {
  position: relative;
  display: inline-block;
  color: var(--paper-2);
  font-family: var(--serif);
  font-size: clamp(2.5rem, min(14.06vh, 14.63vw), 8.75rem);
  font-weight: 650;
  line-height: 1.02;
  letter-spacing: -0.02em;
  text-decoration: none;
  white-space: nowrap;
  transform: translate3d(0, 112%, 0) rotate(2.5deg);
  transform-origin: 0 100%;
  transition: color 0.3s, transform 1.05s var(--rise);
}
.menu-panel.is-open .menu-list > li > a {
  transform: none;
  transition-delay: 0s, calc(0.34s + var(--i, 0) * 0.07s);
}
.menu-panel.is-closing .menu-list > li > a {
  transform: translate3d(0, -112%, 0);
  opacity: 0;
  transition: color 0.3s, transform 0.45s var(--curtain), opacity 0.35s var(--ease);
  transition-delay: 0s, calc(var(--i, 0) * 0.03s), calc(var(--i, 0) * 0.03s);
}
.menu-panel.is-closing .menu-curtain--b { transition-delay: 0.12s; }
.menu-panel.is-closing .menu-curtain--a { transition-delay: 0.22s; }
/* só a palavra com o rato em cima (ou com o foco do teclado) fica clara; a da
   secção onde estás fica igual às outras. Ao abrir, o foco fica na lista (sem
   moldura), não numa palavra */
.menu-list:focus { outline: none; }
.menu-list > li > a:hover,
.menu-list > li > a:focus-visible { color: var(--paper); }

/* A mancha ao passar o rato (js/menu.js): por cima de cada palavra há uma
   cópia clara que se espalha pelas letras como tinta, com a orla rosa da
   mancha do nome. Com a mancha, a palavra de baixo fica no tom apagado. */
.menu-ink {
  position: absolute;
  inset: 0;
  color: var(--paper);
  visibility: hidden;
  pointer-events: none;
}
.menu-list.has-ink > li > a:is(:hover, :focus-visible) { color: var(--paper-2); }

/* Os projetos, ao lado de "Projects", na mesma linha de base. Só aparecem
   com o rato em cima de "Projects" (e ficam enquanto o rato passa para eles;
   o js/menu.js põe .show-sub) ou com o teclado lá dentro; num ecrã tátil,
   onde não há "rato em cima", ficam sempre à vista. Sem sublinhado: ao
   passar, só acendem. */
.menu-item--sub {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: clamp(22px, 3vw, 48px);
}
.menu-sub {
  display: flex;
  flex-wrap: wrap;
  gap: 6px clamp(16px, 1.6vw, 26px);
  margin: 0;
  padding: 0;
  list-style: none;
}
.menu-sub a {
  display: inline-block;
  color: var(--paper-2);
  font: 500 var(--t-sm)/1.3 var(--sans);
  letter-spacing: 0.02em;
  text-decoration: none;
  opacity: 0;
  pointer-events: none;
  transform: translate3d(-12px, 0, 0);
  transition: color 0.3s, opacity 0.3s var(--ease), transform 0.5s var(--rise);
}
.menu-panel.is-open .menu-item--sub.show-sub .menu-sub a {
  opacity: 1;
  pointer-events: auto;
  transform: none;
  transition-delay: 0s, calc(var(--j, 0) * 0.05s), calc(var(--j, 0) * 0.05s);
}
@media (hover: none) {
  .menu-panel.is-open .menu-sub a {
    opacity: 1;
    pointer-events: auto;
    transform: none;
    transition-delay: 0s, calc(0.62s + var(--j, 0) * 0.06s), calc(0.62s + var(--j, 0) * 0.06s);
  }
}
.menu-panel.is-closing .menu-sub a { opacity: 0; transition-duration: 0.3s; transition-delay: 0s; }
.menu-sub a:is(:hover, :focus-visible) { color: var(--paper); }
/* No telemóvel não cabem ao lado: ficam por baixo de "Projects", numa grelha
   de duas colunas, alinhados com a palavra, com ar por cima e por baixo (longe
   do "About") e com altura para um dedo */
@media (max-width: 640px) {
  .menu-sub {
    display: grid;
    flex-basis: 100%;
    grid-template-columns: repeat(2, max-content);
    gap: 0 clamp(28px, 9vw, 44px);
    margin: 4px 0 18px;
    padding-left: 2px;
  }
  .menu-sub a { padding: 7px 0; }
}
/* com o teclado, a opção escolhida já se vê pela cor (e pela mancha): sem moldura */
.menu-list a:focus-visible { outline: none; }
html.menu-open { overflow: hidden; }

/* =========================================================
   O PRADO (desenhado pelo js/meadow.js)
   Na página só há um prado em SVG: o da entrada, pintado, enquanto
   o WebGL não fica pronto (depois sai da página). Cada forma tem a
   sua cor (--c), o traço de desenho bem marcado e um segundo traço
   de lápis (.k), como o estilo "sketch" do meadow.js. O jardim do
   fim é desenhado em duas imagens (.m-layer): a lápis e pintada.
   ========================================================= */
.meadow {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 1;
  pointer-events: none;
}
.meadow svg,
.m-layer {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}
.meadow svg { overflow: visible; }
:is(.meadow, .flower) .s {
  fill: var(--c);
  stroke: rgb(222 214 200 / calc(var(--k) * 0.64));
  stroke-width: calc(var(--sw) * 0.95);
  stroke-linejoin: round;
}
:is(.meadow, .flower) .l {
  fill: none;
  stroke: rgb(222 214 200 / calc(var(--k) * 0.74));
  stroke-width: var(--sw);
  stroke-linecap: round;
  stroke-linejoin: round;
}
:is(.meadow, .flower) .t { stroke: rgb(222 214 200 / calc(var(--k) * 0.48)); stroke-width: calc(var(--sw) * 0.5); }
:is(.meadow, .flower) .wd { stroke-width: calc(var(--sw) * 1.4); }
:is(.meadow, .flower) .g { stroke: rgb(222 214 200 / calc(var(--k) * 0.5)); stroke-width: calc(var(--sw) * 0.75); }
:is(.meadow, .flower) .dots { fill: rgb(222 214 200 / var(--k)); }
:is(.meadow, .flower) .k {
  fill: none;
  stroke: rgb(222 214 200 / calc(var(--k) * 0.42));
  stroke-width: calc(var(--sw) * 0.55);
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* A camada pintada do jardim final: o script revela-a de baixo para
   cima com uma máscara (só a máscara muda; o desenho não é refeito) */
.m-paint {
  -webkit-mask-image: linear-gradient(to top, #000 -35%, transparent 0%);
  mask-image: linear-gradient(to top, #000 -35%, transparent 0%);
}

/* =========================================================
   O NOME (entrada e fim): as letras aparecem como se uma
   mancha se espalhasse por elas, com uma orla vermelha.
   ========================================================= */
.name {
  margin: 0;
  font-family: var(--display);
  font-size: var(--t-name);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.01em;
}
/* Escondido até o script começar a revelá-lo (se o script falhar,
   o nome aparece ao fim de 6 s; vê o <head> do index.html) */
.name-pending .name--hero {
  filter: url(#infest-hero);
  -webkit-mask-image: linear-gradient(90deg, #000 -40%, transparent 0%);
  mask-image: linear-gradient(90deg, #000 -40%, transparent 0%);
}
.js .name--garden { filter: url(#infest-end); }
/* O que muda a cada frame do scroll tem camada própria: só isso é
   redesenhado, e não o ecrã inteiro. Só perto da entrada e do fim (o
   script junta .is-near): no resto da página, as camadas não ocupam a
   memória da placa gráfica. */
.hero.is-near :is(.name--hero, .statement),
.exit.is-near :is(.garden, .name--garden, .m-layer) { will-change: transform; }

/* =========================================================
   ENTRADA: o palco fica preso ao ecrã enquanto fazes scroll
   ========================================================= */
/* 345svh: a passagem do nome para a frase e as flores a desfazerem-se têm,
   cada uma, um bom pedaço do scroll da entrada (devagar, para se verem bem) */
.hero {
  position: relative;
  height: 345vh;
  height: 345svh;
}
/* Os projetos sobem por cima do fim da entrada (a sala é transparente: por
   baixo está a parede). O título "Projects" chega ao fundo do ecrã logo a
   seguir às flores acabarem de se desfazer, a 82svh do fim da entrada (mais o
   espaço da sala por cima dele); o js/hero.js mede-o e espera por esse ponto.
   Só no ecrã, não no papel. */
@media screen {
  .hero + .room {
    margin-top: calc(-82vh - var(--room-pad));
    margin-top: calc(-82svh - var(--room-pad));
  }
}
/* A espera: se fizeres scroll mais depressa do que a entrada, a página fica
   parada no fim da entrada (o script junta .hero-hold) até a frase e as
   flores acabarem de se desfazer; depois, o scroll segue normalmente */
html.hero-hold { overflow: hidden; overscroll-behavior: none; }
.hero-stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
}
/* O prado da entrada: primeiro em SVG; quando o WebGL está pronto,
   passa a ser desenhado no canvas (pintado, lápis, tinta e grão) */
.hero-garden {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 1;
  height: 70%;
  pointer-events: none;
}
.meadow--hero { top: 0; height: 100%; }
/* sem WebGL, o SVG fica cinzento e desaparece com o scroll: tem camada própria */
.hero-garden:not(.gl-ready) .meadow--hero > svg { will-change: filter, opacity; }
.meadow-gl {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1.4s var(--ease);
}
/* o desenho WebGL (com o tracejado de lápis e o grão do papel) aparece por
   cima do SVG devagar; depois o SVG sai de cena */
.hero-garden.gl-ready .meadow-gl { opacity: 1; }
.hero-garden.gl-ready .meadow--hero { visibility: hidden; transition: visibility 0s 1.4s; }

.hero-intro {
  position: absolute;
  top: 14vh;
  left: 0; right: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 var(--gutter);
  text-align: center;
}
.hero-sub {
  margin: 20px 0 0;
  color: var(--paper-2);
  font-size: var(--t-base);
}
/* a seta, logo por baixo do nome: desce e sobe devagar, a indicar o scroll
   (usa "translate", para não chocar com o "transform" que o script lhe põe
   ao fazer scroll, quando ela desaparece) */
.hero-intro .scroll-cue { margin-top: clamp(28px, 5vh, 48px); }
@media (prefers-reduced-motion: no-preference) {
  .hero-intro .scroll-cue { animation: cue-down 2s var(--ease) infinite; }
}
@keyframes cue-down {
  0%, 20%, 100% { translate: 0 0; }
  50% { translate: 0 10px; }
}

/* A frase: aparece com a mesma mancha do nome quando o nome se desfaz,
   e desfaz-se de cima para baixo com as flores (o script controla tudo) */
.statement {
  position: absolute;
  top: 47%; left: 50%;
  z-index: 2;
  width: min(1000px, calc(100% - 2 * var(--gutter)));
  margin: 0;
  /* --settle: a frase assenta, vinda um pouco de cima, enquanto se forma */
  transform: translate(-50%, calc(-50% + var(--settle, 0px)));
  text-align: center;
  text-wrap: balance;
}
.js .statement { visibility: hidden; }
/* Os grãos de tinta da passagem do nome para a frase */
.hero-grains {
  position: absolute;
  inset: 0;
  z-index: 3;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.statement-text {
  display: block;
  font-family: var(--display);
  font-size: clamp(2.5rem, 6.98vw, 5.5rem);
  line-height: 1.02;
  letter-spacing: -0.01em;
}
/* a frase pequena, por baixo: curta, por isso um pouco maior */
.statement-note {
  display: block;
  max-width: 36ch;
  margin: 1.4rem auto 0;
  color: var(--paper-2);
  font-family: var(--serif);
  font-size: var(--t-lede);
  font-style: italic;
  line-height: 1.4;
}

@media (prefers-reduced-motion: no-preference) {
  .hero-garden { animation: garden-lights 1.6s 0.2s backwards var(--ease); }
}
@keyframes garden-lights {
  from { filter: brightness(0.15); }
  to   { filter: brightness(1); }
}

/* =========================================================
   SALAS (estrutura comum)
   ========================================================= */
.room {
  --room-pad: clamp(96px, 13vw, 168px);
  position: relative;
  padding: var(--room-pad) var(--side);
  overflow-x: clip;
}
.room-inner { max-width: var(--max); margin: 0 auto; }
.room-head h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: var(--t-title);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.015em;
}
/* O título dos projetos forma-se em grão (rv-grain, no js/reveal.js); o tamanho
   é o mesmo dos outros títulos das secções (--t-title) */
.wall-text {
  max-width: 32ch;
  margin: 0;
  font-family: var(--serif);
  font-size: var(--t-lead);
  line-height: 1.32;
  text-wrap: pretty;
}
.col-title {
  margin: 0 0 28px;
  color: var(--paper-2);
  font: 600 var(--t-sm)/1.3 var(--sans);
}

/* =========================================================
   PROJECTS: um em baixo do outro, nas cores do site.
   Em cada um, à esquerda (um terço), o nome (work-head) e por baixo
   o resto da etiqueta (work-label); à direita (dois terços), o vídeo
   curto da app a funcionar, inteiro e sem cortes, com a etiqueta ao
   centro dele. No telemóvel, numa coluna: o nome, o vídeo e o resto.
   A página inteira de cada projeto está em projects/.
   ========================================================= */
.work-list {
  display: grid;
  gap: clamp(112px, 12vw, 176px);
  margin-top: clamp(64px, 9vw, 112px);
}
/* as linhas 1fr, em cima e em baixo, ficam com o espaço que sobra: o nome e o
   resto ficam juntos, ao meio da altura do vídeo (que ocupa as linhas todas) */
.work {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  grid-template-rows: 1fr auto auto 1fr;
  column-gap: clamp(36px, 5vw, 80px);
}
.work-head,
.work-label { grid-column: 1; max-width: 26rem; }
.work-head { grid-row: 2; }
.work-label { grid-row: 3; }
.work-media { grid-column: 2; grid-row: 1 / -1; align-self: center; min-width: 0; }

/* O vídeo: inteiro, num caixilho fino */
.work-panel {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 10px;
  background: #151313;
  box-shadow: 0 0 0 1px rgb(236 230 218 / 0.12), 0 44px 80px -48px rgb(0 0 0 / 0.95);
  isolation: isolate;
}
/* sem zoom com o rato em cima: o vídeo fica parado no caixilho */
.work-shot {
  display: block;
  width: 100%;
  height: auto;
}
/* os três vídeos no mesmo caixilho, 16:9 (até tocarem, mostram a capa) */
.work-panel { aspect-ratio: 16 / 9; }
.work-video { width: 100%; height: 100%; background: #151313; object-fit: cover; }

/* ---------- O nome, a etiqueta e os botões (sem números por cima) ---------- */
.work-head h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: var(--t-heading);
  font-weight: 400;
  line-height: 1.04;
  letter-spacing: -0.015em;
}
.work-open { color: inherit; text-decoration: none; transition: color 0.4s var(--ease); }
.work-open:hover { color: var(--rose); }
.year { color: var(--paper-2); font-size: 0.62em; font-style: italic; font-weight: 400; }
.medium { margin: 14px 0 0; color: var(--paper-2); font-size: var(--t-sm); }
.desc { margin: 12px 0 0; line-height: 1.6; }
.work-actions { display: flex; align-items: center; gap: 12px; margin-top: 28px; }
.work-btn,
.work-gh {
  color: var(--paper);
  box-shadow: inset 0 0 0 1px rgb(236 230 218 / 0.26);
  transition: background-color 0.4s var(--ease), color 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.work-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 48px;
  padding: 0 20px 0 22px;
  border-radius: 999px;
  font: 500 var(--t-sm)/1 var(--sans);
  text-decoration: none;
}
.work-gh {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
}
.work-btn:hover,
.work-gh:hover { background: var(--paper); color: var(--ink); box-shadow: none; }
.work-btn .work-icon { transition: transform 0.5s var(--ease); }
.work-btn:hover .work-icon { transform: translateX(4px); }
.work-icon { width: 19px; height: 19px; flex: none; fill: currentColor; }

/* =========================================================
   ESTÁGIO CURRICULAR: por baixo dos projetos, numa sala própria,
   na parede azul (a cor da Capgemini, no tom do vermelho).
   Só o essencial: à esquerda, o título, a Capgemini e o botão
   para a página do estágio; à direita, a capa do relatório,
   direita, como uma folha (também abre a página), com o título
   tapado por letras que trocam sem parar.
   ========================================================= */
.room--internship { --ink-edge: var(--sky); } /* a mancha do título, em azul claro */
.intern {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: center;
}

/* 1. O título, a empresa e o nome do relatório */
.intern-title {
  margin: 0;
  font-family: var(--serif);
  font-size: var(--t-title);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.015em;
}
.intern-company {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 20px 0 0;
  color: var(--paper-2);
  font: 600 var(--t-label)/1 var(--sans);
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.intern-logo { width: auto; height: 22px; flex: none; fill: currentColor; color: var(--paper); }
/* a Capgemini é um link para o site oficial: com o rato em cima, o logótipo e
   o "Engineering" ficam no azul da marca (o mesmo no css/project.css) */
.brand-link {
  --brand-blue: #12abdb;
  display: inline-flex;
  align-items: center;
  gap: inherit;
  color: inherit;
  text-decoration: none;
}
.brand-link .intern-logo,
.brand-link > span { transition: color 0.35s var(--ease); }
.brand-link:hover .intern-logo,
.brand-link:hover > span,
.brand-link:focus-visible .intern-logo,
.brand-link:focus-visible > span { color: var(--brand-blue); }

/* 2. O botão para a página do estágio (o mesmo dos projetos) */
.intern-actions { display: flex; margin-top: clamp(32px, 3.4vw, 48px); }

/* A capa do relatório, sozinha; com o rato em cima, levanta um pouco */
.intern-cover {
  justify-self: end;
  width: min(100%, 440px);
  margin: 0;
}
.intern-open { display: block; text-decoration: none; }
.intern-page {
  display: block;
  border-radius: 2px;
  box-shadow: 0 2px 6px rgb(0 0 0 / 0.22), 0 36px 60px -30px rgb(0 0 0 / 0.75);
  transition: transform 0.9s var(--ease);
}
.intern-page > img { display: block; width: 100%; height: auto; border-radius: 2px; }
.intern-open:hover .intern-page { transform: translateY(-6px); }

/* O título da capa, tapado: as letras trocam sem parar (o script troca-as),
   por isso nunca se lê o que lá estava. Na imagem, o título foi apagado.
   Fica no sítio exato do título (as medidas seguem a largura da capa). */
.cover {
  position: relative;
  container-type: inline-size;
  background: #fff;
}
.cover-title {
  position: absolute;
  top: 27.76%;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #141414;
  font: 700 1rem/1.62 var(--serif);
  font-size: 3.3cqw;
  line-height: 5.36cqw;
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
}
.cover-title > span { display: block; }
.cover-title i { display: inline-block; width: 0.56em; font-style: normal; text-align: center; }

/* =========================================================
   ABOUT: "About me" (o "About" em grande e o "me" pequeno, que
   cai para o sítio e, com o rato em cima, dá lugar ao nome); por
   baixo, o texto a toda a largura; depois, o percurso
   ========================================================= */
/* --a: o tamanho do "About". É a única exceção à escala: cerca do dobro dos
   outros títulos das secções (e nunca tão grande que o "About me" não caiba na
   linha: o "About" mede ~2,5 vezes o tamanho e o "me" ~1,5 vezes o dele). O "me"
   tem o tamanho dos outros títulos (--t-title). Num ecrã estreito, o nome (com o
   rato em cima, ou um toque) não cabe inteiro na linha: aí encolhe o que for
   preciso ao aparecer (--fit, medido pelo js/path.js). */
.about-head {
  --a: clamp(5rem, 16vw, 14rem);
  container-type: inline-size;
  display: flex;
  align-items: baseline;
}
.about-head .about-giant {
  flex: none;
  margin: 0 0 -0.12em -0.05em;
  padding-top: 0.04em;
  color: var(--paper);
  font: 400 min(var(--a), calc((100cqw - var(--t-title) * 1.5) / 2.5))/1 var(--display);
  letter-spacing: -0.03em;
}
.about-me {
  position: relative;
  flex: none;
  margin-left: 0.32em;
  color: var(--rose);
  font: italic 400 var(--t-title)/1.1 var(--serif);
  letter-spacing: -0.01em;
  transform-origin: 40% 90%;
  -webkit-tap-highlight-color: transparent;
}
/* O "me" passa a nome, letra a letra (o js/path.js parte o nome em letras e
   põe .is-morph). O nome tem as duas letras do "me": o "m" de Simão e o "e"
   de Ribeiro (.is-anchor). Parado, só essas duas se veem, encostadas no sítio
   do "me" (--dx, em em, medido pelo script); as outras estão escondidas, um
   pouco abaixo. Com o rato em cima, o "m" e o "e" deslizam para o sítio deles
   no nome e as outras letras aparecem à volta deles, primeiro as mais perto
   (--d-in); ao sair, as outras apagam-se, das mais longe para as mais perto
   (--d-out), e o "m" e o "e" voltam a juntar-se. São letras normais (inline),
   mexidas com left/top, para o nome manter o espaço entre letras da fonte.
   O "me" de baixo (about-me-word) só guarda o lugar. */
.about-me-name {
  position: absolute;
  top: 0;
  left: 0;
  white-space: nowrap;
  pointer-events: none;
  transform-origin: 0 72%; /* encolhe (só num ecrã estreito) a partir do sítio do "me" */
  transition: scale 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.1s;
}
.about-me:not(.is-morph) .about-me-name { display: none; }
.about-me.is-morph .about-me-word { visibility: hidden; }
.about-me-name .ch {
  position: relative;
  left: 0;
  top: 0.16em;
  opacity: 0;
  transition: left 0.55s cubic-bezier(0.65, 0, 0.35, 1), top 0.35s var(--ease), opacity 0.28s var(--ease);
  transition-delay: var(--d-out, 0s);
}
.about-me-name .ch.is-anchor { left: var(--dx, 0); top: 0; opacity: 1; }
.about-me.is-measuring .about-me-name .ch { transition: none !important; }
.about-me:hover .about-me-name,
.about-me.is-named .about-me-name { pointer-events: auto; scale: var(--fit, 1); transition-delay: 0s; }
.about-me:hover .about-me-name .ch,
.about-me.is-named .about-me-name .ch {
  left: 0;
  top: 0;
  opacity: 1;
  transition: left 0.8s cubic-bezier(0.22, 1, 0.36, 1), top 0.6s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.5s var(--ease);
  transition-delay: var(--d-in, 0s);
}
/* o texto, a toda a largura; o que está em <strong> fica em rosa */
.about-text {
  margin: clamp(40px, 5vw, 72px) 0 0;
  font: 400 var(--t-lead)/1.42 var(--serif);
  letter-spacing: -0.005em;
  text-wrap: pretty;
}
.about-text strong { font-weight: inherit; color: var(--rose); }

/* O percurso: um ponto por momento, sem linhas. Ao passar o rato (ou o Tab)
   por um ponto, os pontos até ali acendem e abre-se por baixo, ao centro, o
   que fiz ali e o que aprendi. */
.path { margin-top: clamp(88px, 10vw, 136px); }

.tl {
  position: relative;
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
}

.tl-item { position: relative; }
.tl-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  padding: 0 4px 12px;
  border: 0;
  background: none;
  color: inherit;
  text-align: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.tl-date {
  height: 1.25rem;
  color: var(--rose);
  font: italic 400 var(--t-sm)/1.25rem var(--serif);
  white-space: nowrap;
  transition: color 0.3s;
}
.tl-dot {
  position: relative;
  z-index: 1;
  width: 11px; height: 11px;
  margin: 13px 0;
  border: 1.5px solid var(--rose);
  border-radius: 50%;
  background: transparent;
  transition: transform 0.5s var(--ease), background-color 0.35s var(--ease), box-shadow 0.5s var(--ease);
}
.tl-what {
  max-width: 13ch;
  color: var(--paper-2);
  font: 500 var(--t-xs)/1.35 var(--sans);
  overflow-wrap: anywhere;
  transition: color 0.3s;
}
.tl-item.is-past .tl-dot { background: var(--rose); }
.tl-item.is-active .tl-dot {
  transform: scale(1.6);
  background: var(--rose);
  box-shadow: 0 0 0 5px rgb(194 148 141 / 0.16);
}
.tl-item.is-active :is(.tl-date, .tl-what),
.tl-node:hover :is(.tl-date, .tl-what) { color: var(--paper); }
/* A onda: o ponto escolhido pulsa devagar, todos da mesma maneira; sem
   nenhum escolhido, pulsa o de agora. Assim há sempre uma onda, e só uma. */
.tl-dot::after {
  content: "";
  position: absolute;
  inset: -7px;
  border: 1px solid var(--rose);
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
}
@media (prefers-reduced-motion: no-preference) {
  .tl-item.is-active .tl-dot::after,
  .tl:not(.has-active) .tl-item--now .tl-dot::after { animation: halo 2.6s ease-out infinite; }
  /* a entrada: os pontos aparecem um a um */
  .js .tl:not(.is-in) .tl-dot { transform: scale(0); }
  .js .tl:not(.is-in) :is(.tl-date, .tl-what) { opacity: 0; }
  .js .tl.is-in .tl-dot { animation: dot-in 0.55s var(--ease) backwards; animation-delay: calc(var(--i, 0) * 90ms + 0.2s); }
  .js .tl.is-in :is(.tl-date, .tl-what) { animation: label-in 0.7s var(--ease) backwards; animation-delay: calc(var(--i, 0) * 90ms + 0.3s); }
}
@keyframes halo {
  from { opacity: 0.7; transform: scale(0.6); }
  to   { opacity: 0; transform: scale(1.9); }
}
@keyframes dot-in { from { transform: scale(0); } }
@keyframes label-in { from { opacity: 0; transform: translateY(6px); } }

/* O painel que se abre por baixo (nos ecrãs largos; o script copia para aqui
   a nota do ponto escolhido e a altura é a da nota mais comprida). Tudo ao
   centro, numa coluna: a data, o que era e onde; o que fiz; o que aprendi. */
.tl-panel {
  position: relative;
  height: 0;
  overflow: hidden;
  transition: height 0.45s var(--ease);
}
.path.is-open .tl-panel { height: var(--panel-h, 320px); }
.tl-panel-inner { position: relative; }
.tl-sheet {
  max-width: 700px;
  margin: 0 auto;
  padding: 44px 0 10px;
  text-align: center;
}
.tl-sheet.is-entering > * { animation: sheet-in 0.7s var(--ease) both; }
.tl-sheet.is-entering > :nth-child(2) { animation-delay: 0.1s; }
.tl-sheet.is-leaving {
  position: absolute;
  top: 0; left: 0; right: 0;
  animation: sheet-out 0.35s var(--ease) both;
}
@keyframes sheet-in { from { opacity: 0; transform: translateY(18px); } }
@keyframes sheet-out { to { opacity: 0; transform: translateY(-10px); } }

/* O texto de cada ponto (no painel e, no telemóvel, à vista na lista) */
.tl-card p,
.tl-sheet p { margin: 0; }
.tl-main .tl-when { color: var(--rose); font: italic 400 var(--t-sm)/1.3 var(--serif); }
.tl-main .tl-title { margin-top: 8px; font: 400 var(--t-lead)/1.12 var(--serif); }
.tl-main .tl-place { margin-top: 8px; color: var(--paper-2); font-size: var(--t-xs); letter-spacing: 0.02em; }
.tl-main .tl-text { margin-top: 20px; max-width: 46ch; line-height: 1.6; }
.tl-sheet .tl-text { max-width: 60ch; margin-inline: auto; }
.tl-learn { margin-top: 30px; }
.tl-learn .tl-label {
  color: var(--paper-2);
  font: 600 var(--t-label)/1 var(--sans);
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.tl-learn p:not(.tl-label) {
  margin-top: 12px;
  max-width: 52ch;
  font: italic 400 var(--t-lede)/1.45 var(--serif);
  text-wrap: pretty;
}
.tl-sheet .tl-learn p:not(.tl-label) { margin-inline: auto; }
/* nos ecrãs largos, as notas da lista ficam só para leitores de ecrã:
   à vista está o painel */
@media (min-width: 901px) {
  .tl-card {
    position: absolute;
    width: 1px; height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
}

/* =========================================================
   CV: tudo ao centro
   ========================================================= */
.cv-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.cv-title {
  margin: 0;
  font-family: var(--serif);
  font-size: var(--t-title);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.015em;
}

/* Ask me (js/ask.js): a caixa para perguntar e, por baixo, perguntas de
   exemplo. A resposta aparece num cartão, palavra a palavra, com o número
   da fonte de cada parte e as fontes por baixo. */
.ask {
  width: 100%;
  max-width: 760px;
  margin-top: clamp(64px, 7vw, 96px);
  text-align: left;
}
.ask .col-title {
  margin: 0 0 18px;
  font: 600 var(--t-label)/1 var(--sans);
  letter-spacing: 0.24em;
  text-align: center;
  text-transform: uppercase;
}
.ask-form {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 6px 6px 24px;
  border-radius: 999px;
  background: rgb(236 230 218 / 0.05);
  box-shadow: inset 0 0 0 1px rgb(236 230 218 / 0.16);
  transition: box-shadow 0.3s, background-color 0.3s;
}
.ask-form:focus-within { background: rgb(236 230 218 / 0.07); box-shadow: inset 0 0 0 1px var(--accent); }
.ask-input {
  flex: 1;
  min-width: 0;
  padding: 12px 0;
  border: 0;
  background: transparent;
  color: var(--paper);
  font: 400 var(--t-lede)/1.3 var(--serif);
  outline: none;
}
.ask-input::placeholder { color: rgb(189 181 167 / 0.72); }
.ask-send {
  display: grid;
  flex: none;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: var(--rose);
  color: var(--ink);
  cursor: pointer;
  transition: transform 0.3s var(--ease), background-color 0.3s;
}
.ask-send svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ask-send:hover { background: var(--paper); transform: translateX(2px); }
.ask-send:focus-visible { outline: 2px solid var(--paper); outline-offset: 3px; }
.ask-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 16px; }
.ask-chip {
  padding: 8px 14px;
  border: 0;
  border-radius: 999px;
  background: none;
  box-shadow: inset 0 0 0 1px rgb(236 230 218 / 0.18);
  color: var(--paper-2);
  font: 500 var(--t-xs)/1.2 var(--sans);
  cursor: pointer;
  transition: color 0.3s, box-shadow 0.3s;
}
.ask-chip:hover { color: var(--paper); box-shadow: inset 0 0 0 1px rgb(236 230 218 / 0.42); }
.ask-chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ask-out { margin-top: 28px; }
.ask-out:empty { display: none; }
.ask-card {
  padding: clamp(22px, 3vw, 34px);
  border-radius: 20px;
  background: rgb(236 230 218 / 0.035);
}
.ask-asked { margin: 0 0 12px; color: var(--paper-2); font: 500 var(--t-sm)/1.4 var(--sans); }
.ask-a { margin: 0; font: 400 var(--t-lede)/1.55 var(--serif); text-wrap: pretty; }
.ask-card.is-unknown .ask-a { color: var(--paper-2); }
.ask-cite {
  display: inline-grid;
  place-items: center;
  min-width: 1.45em;
  height: 1.45em;
  padding: 0 0.32em;
  border-radius: 999px;
  background: rgb(194 148 141 / 0.18);
  color: var(--rose);
  font: 600 var(--t-label)/1 var(--sans);
  text-decoration: none;
  vertical-align: 0.3em;
}
.ask-cite:hover { background: var(--rose); color: var(--ink); }
.ask-cite + .ask-cite { margin-left: 3px; }
/* à espera da primeira palavra do modelo: três pontos que acendem à vez */
.ask-wait { display: inline-flex; gap: 6px; height: 1em; align-items: center; vertical-align: -0.05em; }
.ask-wait i { width: 6px; height: 6px; border-radius: 50%; background: var(--paper-2); opacity: 0.25; animation: ask-wait 1.2s ease-in-out infinite; }
.ask-wait i:nth-child(2) { animation-delay: 0.15s; }
.ask-wait i:nth-child(3) { animation-delay: 0.3s; }
@keyframes ask-wait { 0%, 80%, 100% { opacity: 0.25; } 40% { opacity: 0.9; } }
.ask-sources {
  display: grid;
  gap: 6px;
  margin: 18px 0 0;
  padding: 14px 0 0;
  border-top: 1px solid var(--line);
  counter-reset: src;
  font: 500 var(--t-sm)/1.4 var(--sans);
  list-style: none;
}
.ask-sources li { display: flex; align-items: baseline; gap: 10px; counter-increment: src; }
.ask-sources li::before { content: counter(src); min-width: 1em; color: var(--rose); font-size: var(--t-xs); font-weight: 600; }
/* as fontes: sem sublinhado; uma seta pequena diz que levam a outro sítio */
.ask-sources a { color: var(--paper); text-decoration: none; transition: color 0.3s; }
.ask-sources a::after { content: " →"; color: var(--rose); }
.ask-sources a:hover { color: var(--rose); }
/* a resposta aparece palavra a palavra, como um modelo a escrever
   (--step e --after: o js/ask.js põe-nos ao tamanho da resposta) */
@media (prefers-reduced-motion: no-preference) {
  .ask-w,
  .ask-cite { animation: ask-word 0.45s var(--ease) both; animation-delay: calc(var(--i, 0) * var(--step, 20ms)); }
  .ask-sources { animation: ask-word 0.6s var(--ease) both; animation-delay: var(--after, 0.6s); }
}
@keyframes ask-word { from { opacity: 0; } }
@media (max-width: 600px) {
  .ask-form { padding-left: 18px; }
  .ask-input { font-size: var(--t-base); }
}

/* As skills: tudo ao centro, sem legendas. Em cima, os sítios onde as usei;
   por baixo, uma linha de skills por grupo. Passa o rato por um projeto e
   acendem-se as skills que usei lá, cada uma ligada a ele por uma linha (o
   resto apaga-se); por uma skill, e acendem-se os projetos, também com linhas. */
.skills {
  width: 100%;
  max-width: 980px;
  margin-top: clamp(96px, 11vw, 148px);
}
/* os links para as skills (as fontes do Ask me: "My stack", "Soft skills"...)
   param um pouco acima delas, com ar por cima do título */
#skills,
.skill-col .col-title { scroll-margin-top: clamp(48px, 9vh, 96px); }
.skills-head .col-title,
.skill-col .col-title {
  margin: 0;
  color: var(--paper-2);
  font: 600 var(--t-label)/1 var(--sans);
  letter-spacing: 0.24em;
  text-transform: uppercase;
}
.skills-body {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 12px;
  margin-top: 30px;
}
/* as linhas entre as skills e os projetos (o script desenha-as; passam por
   trás das pílulas e desenham-se a partir do que está debaixo do rato) */
.skill-links {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}
.skill-links .link {
  fill: none;
  stroke: var(--rose);
  stroke-width: 1.2;
  stroke-linecap: round;
  opacity: 0.75;
  stroke-dasharray: var(--len) var(--len);
  stroke-dashoffset: var(--len);
  animation: link-draw 0.7s var(--ease) forwards;
}
.skill-links.is-still .link { animation: none; stroke-dashoffset: 0; }
@keyframes link-draw { to { stroke-dashoffset: 0; } }
.skill-row--works { margin-bottom: 30px; }
/* os nomes dos grupos ficam para o CV impresso e para os leitores de ecrã */
@media screen {
  .skill-row-name {
    position: absolute;
    width: 1px; height: 1px;
    margin: -1px; padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
}
.skill-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.chip,
.work-tag {
  position: relative;
  display: inline-flex;
  align-items: center;
  border: 0;
  color: var(--paper);
  cursor: pointer;
  transition: opacity 0.5s var(--ease), color 0.35s, border-color 0.35s, background 0.35s, box-shadow 0.45s var(--ease), transform 0.5s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
/* os projetos: só as palavras, em itálico, com um ponto rosa entre elas */
.skill-row--works .skill-chips { gap: 0; }
.work-tag {
  padding: 6px 20px;
  background: none;
  color: var(--paper-2);
  font: italic 400 var(--t-lede)/1.2 var(--serif);
}
.work-tag + .work-tag::before {
  content: "";
  position: absolute;
  top: 50%;
  left: -2px;
  width: 4px;
  height: 4px;
  margin-top: -1px;
  border-radius: 50%;
  background: var(--rose);
  opacity: 0.55;
}
.work-tag:hover,
.work-tag:focus-visible { color: var(--paper); }
/* a Capgemini aparece com o logótipo, a preto e branco (na cor do texto) */
.work-logo {
  display: block;
  width: auto;
  height: 0.98em;
  fill: currentColor;
  transform: translateY(0.12em); /* a linha de base do logótipo alinha com a das palavras */
}
/* as skills: pílulas finas, com um brilho leve em cima */
.chip {
  gap: 10px;
  height: 42px;
  padding: 0 18px 0 14px;
  border: 1px solid rgb(236 230 218 / 0.11);
  border-radius: 999px;
  background: linear-gradient(180deg, rgb(255 244 236 / 0.06), rgb(255 244 236 / 0.016));
  box-shadow: inset 0 1px 0 rgb(255 244 236 / 0.06), 0 14px 26px -22px rgb(0 0 0 / 0.9);
  font: 500 var(--t-sm)/1 var(--sans);
  letter-spacing: 0.005em;
  white-space: nowrap;
}
.chip:hover,
.chip:focus-visible {
  border-color: rgb(194 148 141 / 0.5);
  background: linear-gradient(180deg, rgb(255 244 236 / 0.09), rgb(255 244 236 / 0.03));
}
.chip-icon {
  width: 17px; height: 17px;
  flex: none;
  color: var(--paper-2);
  fill: currentColor;
  transition: color 0.35s;
}
.chip-icon--line { fill: none; }
.chip:hover .chip-icon { color: var(--paper); }
/* com um projeto ou uma skill escolhidos, o resto apaga-se */
.skills.is-focus :is(.chip, .work-tag) { opacity: 0.24; }
.skills.is-focus :is(.chip, .work-tag).is-lit { opacity: 1; }
.skills.is-focus .work-tag.is-lit { color: var(--paper); }
.skills.is-focus .chip.is-lit {
  border-color: rgb(194 148 141 / 0.75);
  background: linear-gradient(180deg, rgb(194 148 141 / 0.22), rgb(194 148 141 / 0.08));
  box-shadow: inset 0 1px 0 rgb(255 244 236 / 0.1), 0 0 0 4px rgb(194 148 141 / 0.07), 0 16px 30px -20px rgb(0 0 0 / 0.9);
}
.chip.is-lit .chip-icon { color: var(--paper); }
/* a entrada: as skills aparecem uma a uma */
@media (prefers-reduced-motion: no-preference) {
  .js .skills:not(.is-in) :is(.chip, .work-tag) { opacity: 0; transform: translateY(12px); }
  .js .skills.is-in:not(.is-ready) :is(.chip, .work-tag) { transition-delay: calc(var(--i, 0) * 26ms); }
}

/* Soft skills e cursos: também ao centro, em duas colunas */
.skills-more {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(32px, 5vw, 80px);
  width: 100%;
  max-width: 820px;
  margin-top: clamp(72px, 8vw, 104px);
}
.skill-col .col-title { margin-bottom: 20px; }
.cert-head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: -4px 0 12px;
  color: var(--paper-2);
  font-family: var(--serif);
  font-style: italic;
}
.skill-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.skill-list li {
  font-family: var(--serif);
  font-size: var(--t-lede);
  line-height: 1.4;
}

/* =========================================================
   CONTACT: tudo ao centro, por ordem: o título, uma frase, os
   ícones e, por baixo, o formulário
   ========================================================= */
.contact {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.contact-lede { max-width: 26ch; margin-top: 24px; }

/* Ícones sem cor: GitHub, LinkedIn e email, em círculos */
.icons {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin: 36px 0 0;
  padding: 0;
  list-style: none;
}
.icons a {
  display: grid;
  place-items: center;
  width: 56px; height: 56px;
  border-radius: 50%;
  color: var(--paper);
  box-shadow: inset 0 0 0 1px rgb(236 230 218 / 0.22);
  transition: color 0.3s, background-color 0.3s, box-shadow 0.3s, transform 0.3s var(--ease);
}
.icons a:hover { background: var(--paper); color: var(--ink); box-shadow: none; transform: translateY(-2px); }
.icons svg { width: 22px; height: 22px; fill: currentColor; }

/* Formulário de contacto: só a mensagem, num cartão ao centro (a seta abre
   a app de email de quem escreve, já com o teu email como destinatário) */
.contact-form {
  display: grid;
  width: 100%;
  max-width: 620px;
  margin-top: clamp(48px, 6vw, 72px);
  padding: clamp(26px, 3.4vw, 40px);
  border-radius: 20px;
  background: rgb(236 230 218 / 0.035);
  text-align: left;
}
.cf-fields { display: grid; gap: 28px; }
.contact-form .field label {
  display: block;
  color: var(--paper-2);
  font-size: var(--t-xs);
  font-weight: 500;
}
.contact-form .field :is(textarea, input) {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 6px 0 10px;
  border: 0;
  border-bottom: 1px solid rgb(236 230 218 / 0.28);
  border-radius: 0;
  background: transparent;
  color: var(--paper);
  font: 400 var(--t-lede)/1.45 var(--serif);
  transition: border-color 0.3s, box-shadow 0.3s;
}
.contact-form .field textarea { min-height: 3.3em; overflow: hidden; resize: none; }
/* o campo escondido contra os robôs (as pessoas não o veem nem lá chegam) */
.cf-trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
/* a enviar: a seta fica a meio caminho, mais apagada, até o Worker responder */
.contact-form.is-sending .bloom-btn--send { opacity: 0.55; pointer-events: none; }
.contact-form .field :is(textarea, input):focus {
  border-bottom-color: var(--accent);
  box-shadow: 0 1px 0 var(--accent);
  outline: none;
}
.contact-form [aria-invalid="true"] { border-bottom-color: #e7aaa1; }
.field-error { margin: 8px 0 0; color: #e7aaa1; font-size: var(--t-xs); }
.cf-foot { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-top: 6px; }

.contact-form.is-sent .cf-fields,
.contact-form:not(.is-sent) .cf-done { display: none; }
/* "Message sent.": o título em grande, por baixo o obrigado e o "escrever outra";
   à direita, a papoila. O texto fica ao meio da altura da papoila. */
.cf-done {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: 1fr auto auto auto 1fr;
  column-gap: clamp(20px, 3vw, 36px);
  justify-items: start;
  min-height: 150px;
}
.cf-done > :not(.cf-flower, .cf-flight) { grid-column: 1; }
.cf-done-title { grid-row: 2; }
.cf-done-sent { grid-row: 3; }
.cf-again { grid-row: 4; }
/* a papoila que cresce ao lado de "Message sent." (o js/contact.js põe-na lá) */
.cf-flower {
  grid-column: 2;
  grid-row: 1 / -1;
  align-self: end;
  width: 92px;
  height: 140px;
}
.cf-flower svg { display: block; width: 100%; height: 100%; overflow: visible; transform-origin: 50% 100%; }
@media (prefers-reduced-motion: no-preference) {
  .cf-flower:not(.is-growing) svg { visibility: hidden; } /* só aparece quando começa a crescer */
  .cf-flower.is-growing svg { animation: flower-grow 1.9s var(--ease) both, flower-sway 4.6s 1.9s ease-in-out infinite; }
}
@keyframes flower-grow {
  from { clip-path: inset(100% -20% 0 -20%); transform: scaleY(0.6); }
  to   { clip-path: inset(-20% -20% 0 -20%); transform: none; }
}
@keyframes flower-sway {
  0%, 100% { transform: rotate(0deg); }
  50%      { transform: rotate(2.4deg); }
}
.cf-done:focus { outline: none; }
.cf-done-title {
  margin: 0;
  font: 400 var(--t-heading)/1.02 var(--serif);
  letter-spacing: -0.02em;
}
.cf-done .text-btn { padding: 0; text-decoration: none; transition: color 0.3s var(--ease); }
/* o obrigado, com o email de quem escreveu */
.cf-done-sent { grid-row: 3; max-width: 38ch; margin: 18px 0 0; color: var(--paper-2); font-size: var(--t-sm); line-height: 1.6; text-wrap: pretty; }
.cf-from { color: var(--paper); overflow-wrap: anywhere; }
/* se não der para enviar: o aviso, ao centro, por baixo da seta */
.cf-fail { max-width: 40ch; margin: 0; text-align: center; text-wrap: pretty; }
/* "Write another message": pequena, com uma seta que volta para trás */
.cf-again {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 22px;
  color: var(--paper-2);
  font-size: var(--t-xs);
  letter-spacing: 0.02em;
}
.cf-again::before {
  content: "";
  width: 14px;
  height: 14px;
  background: var(--accent);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23000' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 3 2.5 6.5 6 10'/%3E%3Cpath d='M2.5 6.5h7a4 4 0 0 1 0 8H8'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23000' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 3 2.5 6.5 6 10'/%3E%3Cpath d='M2.5 6.5h7a4 4 0 0 1 0 8H8'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: transform 0.4s var(--ease);
}
.cf-again:hover { color: var(--paper); }
.cf-again:hover::before { transform: translateX(-3px); }

/* O avião de papel: levanta voo do ponto final de "Message sent." e sai pelo
   canto de cima, à direita, com um rasto de pontos que se apaga atrás dele
   (o js/contact.js desenha o caminho à medida do cartão) */
.cf-flight {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}
.cf-plane { opacity: 0; }
.cf-plane-body path {
  fill: color-mix(in srgb, var(--wall-guest), var(--paper) 3.5%); /* a cor do cartão: tapa o rasto por baixo */
  stroke: var(--paper);
  stroke-width: 1.15;
  stroke-linejoin: round;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}
.cf-trail circle { fill: var(--paper); }
@media (prefers-reduced-motion: no-preference) {
  .contact-form.is-sent .cf-done > :is(.cf-done-title, .cf-done-sent, .cf-again) { animation: cf-in 0.9s var(--ease) both; }
  .contact-form.is-sent .cf-done-sent { animation-delay: 0.45s; }
  .contact-form.is-sent .cf-again { animation-delay: 0.6s; }
}
@media (prefers-reduced-motion: reduce) {
  .cf-flight { display: none; }
}
@keyframes cf-in { from { opacity: 0; transform: translateY(12px); } }
/* no telemóvel: tudo numa coluna (o título numa linha só) e a papoila, mais
   pequena, no canto de baixo, ao lado do "Write another message" */
@media (max-width: 560px) {
  .cf-done { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto auto; min-height: 0; }
  .cf-done-title { grid-row: 1; }
  .cf-done-sent { grid-row: 2; }
  .cf-again { grid-row: 3; white-space: nowrap; }
  .cf-flower { position: absolute; right: -2px; bottom: -4px; width: 42px; height: 64px; }
}

/* =========================================================
   SAÍDA: o fim ocupa o ecrã inteiro. Em cima, só a parede escura
   (assim, no fim, o formulário de contacto já não se vê); em
   baixo, em 3/5 do ecrã, o jardim. Sempre que aparece, o jardim
   cresce e ganha cor, com o agradecimento em cima e os créditos
   por baixo (o script corre a cena; fora do ecrã, volta ao início).
   ========================================================= */
.exit {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 100vh;
}
.exit-stage {
  position: relative;
  height: 60vh;
  height: 60svh;
  min-height: 380px;
  overflow: hidden;
}

/* O jardim final: cresce do chão, a lápis; a cor sobe e aparecem o
   agradecimento e os créditos. Ocupa o palco inteiro, sem fundo próprio
   (usa a mesma parede do rodapé), por isso não há faixas de outra cor. */
.garden {
  position: absolute;
  inset: 0;
  overflow: hidden;
  contain: paint;
}
.js .garden {
  -webkit-mask-image: linear-gradient(to top, #000 -30%, transparent 0%);
  mask-image: linear-gradient(to top, #000 -30%, transparent 0%);
}
.meadow--garden { height: 80%; }
/* as pétalas que caem depois do agradecimento (o js/exit.js desenha-as):
   por cima das flores, por baixo do texto */
/* o que cai no fim (o js/exit.js desenha-o): pétalas, folhas ou neve, conforme a
   estação, e pirilampos à noite; ocupa o fim inteiro, por cima do jardim */
.garden-petals {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* O agradecimento, no vale entre as flores, com a mancha do nome; os créditos
   logo por baixo, a direito; depois, o livro de visitas (vê mais abaixo: a
   linha da papoila dourada, o botão e quantas flores há). Fica um pouco acima
   do meio, para nenhuma linha tocar nas flores do vale. */
.garden-top {
  position: absolute;
  top: 27%; left: 0; right: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(14px, 1.6vw, 22px);
  padding: 0 var(--gutter);
  text-align: center;
}
.name--garden {
  font-size: clamp(2.25rem, 4.95vw, 4.25rem);
  text-wrap: balance;
}
.garden-credit {
  margin: 0;
  color: var(--paper-2);
  font: italic 400 var(--t-base)/1.3 var(--serif);
  letter-spacing: 0.02em;
  text-wrap: balance; /* no telemóvel, duas linhas iguais (o nome fica junto: &nbsp; no index.html) */
}

/* O livro de visitas (js/guestbook.js): as papoilas de quem passou por cá,
   à frente das outras flores. Crescem e ganham cor com o jardim (o
   js/exit.js dá-lhes o --grow e o --colour); com o rato em cima (ou um
   toque), mostram o nome, as palavras e o mês. */
.garden-guests {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 1;
  height: 34%;
  margin: 0;
  padding: 0;
  list-style: none;
  pointer-events: none;
}
.guest {
  position: absolute;
  left: var(--x);
  bottom: calc(3% + var(--row) * 4%);
  width: calc(var(--h) * 0.66);
  height: var(--h);
  transform: translateX(-50%) scaleY(var(--grow, 1));
  transform-origin: 50% 100%;
  filter: grayscale(calc(1 - var(--colour, 1))) brightness(calc(1 + (1 - var(--colour, 1)) * 0.9));
  opacity: clamp(0, calc(var(--grow, 1) * 3), 1);
}
.guest-btn {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  pointer-events: auto;
}
.guest-btn:focus-visible { outline: none; }
.guest-btn svg { display: block; width: 100%; height: 100%; overflow: visible; }
.guest.is-mine .guest-btn svg { filter: drop-shadow(0 0 7px rgb(255 214 170 / 0.4)); }
.guest.is-new { animation: guest-grow 1.6s var(--ease) both; }
@keyframes guest-grow { from { clip-path: inset(100% 0 0 0); } to { clip-path: inset(-40% -40% 0 -40%); } }
.guest-tip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 6px);
  z-index: 5;
  display: grid;
  gap: 2px;
  width: max-content;
  max-width: 220px;
  padding: 8px 11px;
  border-radius: 10px;
  background: rgb(26 25 24 / 0.96);
  box-shadow: 0 0 0 1px rgb(236 230 218 / 0.16), 0 14px 30px -12px rgb(0 0 0 / 0.8);
  color: var(--paper);
  font: 400 var(--t-xs)/1.35 var(--sans);
  text-align: left;
  opacity: 0;
  transform: translate(-50%, 4px);
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
  pointer-events: none;
}
.guest.tip-l .guest-tip { left: 0; transform: translate(0, 4px); }
.guest.tip-r .guest-tip { left: auto; right: 0; transform: translate(0, 4px); }
.guest-tip b { font-weight: 600; }
.guest-tip span { color: var(--paper-2); }
.guest-tip time { color: var(--paper-2); font-size: var(--t-label); opacity: 0.75; }
.guest:hover .guest-tip,
.guest:focus-within .guest-tip,
.guest.is-open .guest-tip { opacity: 1; transform: translate(-50%, 0); }
.guest.tip-l:is(:hover, :focus-within, .is-open) .guest-tip,
.guest.tip-r:is(:hover, :focus-within, .is-open) .guest-tip { transform: none; }

/* o botão por baixo dos créditos: só o texto, na cor dos detalhes; aparece com os créditos */
.gb-open {
  margin-top: 4px;
  padding: 6px 2px;
  border: 0;
  background: none;
  color: var(--rose);
  font: 500 var(--t-sm)/1.3 var(--sans);
  letter-spacing: 0.02em;
  cursor: pointer;
  opacity: var(--credit, 1);
  transition: color 0.3s var(--ease);
}
.gb-open span::after { content: "→"; display: inline-block; margin-left: 0.4em; transition: transform 0.3s var(--ease); }
.gb-open:hover,
.gb-open:focus-visible { color: var(--paper); outline: none; }
.gb-open:hover span::after { transform: translateX(4px); }
.garden:not(.is-credited) :is(.gb-open, .gb-count) { visibility: hidden; }
.gb-count { margin: -8px 0 0; color: var(--paper-2); font-size: var(--t-xs); opacity: calc(var(--credit, 1) * 0.75); }
.gb-count:empty { display: none; }
.gb-done { margin: 4px 0 0; color: var(--paper-2); font: italic 400 var(--t-sm)/1.4 var(--serif); }

/* A janela para plantar: um cartão de papel escuro, com o grão e a luz de cima
   do site (por cima de tudo, a janela não apanha os do <body>), uma orla fina
   e uma luz na aresta de cima. Abre a subir um nada, com a papoila a crescer. */
.gb-dialog {
  width: min(448px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  padding: 0;
  border: 0;
  border-radius: 24px;
  background: linear-gradient(180deg, #23211f 0%, var(--charcoal) 52%);
  color: var(--paper);
  box-shadow:
    0 0 0 1px rgb(236 230 218 / 0.09),
    inset 0 1px 0 rgb(236 230 218 / 0.07),
    0 60px 120px -40px rgb(0 0 0 / 0.95);
}
.gb-dialog::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0.06;
  background-image: radial-gradient(110% 60% at 50% -12%, rgb(255 238 214 / 0.9), transparent 62%), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.gb-dialog::backdrop { background: rgb(10 9 9 / 0.72); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.gb-form { position: relative; display: grid; gap: 16px; padding: 32px 36px 24px; }
.gb-head { display: grid; justify-items: center; margin-bottom: 6px; text-align: center; }
.gb-flower { width: 66px; height: 96px; margin: 0 0 8px; }
.gb-flower svg { display: block; width: 100%; height: 100%; overflow: visible; transform-origin: 50% 100%; }
.gb-title { margin: 0; font: 400 var(--t-lead)/1.1 var(--serif); letter-spacing: -0.012em; text-wrap: balance; }
.gb-lede { max-width: 36ch; margin: 12px 0 0; color: var(--paper-2); font-size: var(--t-sm); line-height: 1.55; text-wrap: pretty; }

/* os campos: a etiqueta pequena por cima (com o contador à direita) e uma caixa
   calma, que acende a orla rosa quando escreves */
.gb-field { display: grid; gap: 8px; }
.gb-label {
  display: flex;
  align-items: baseline;
  gap: 8px;
  color: var(--paper-2);
  font-size: var(--t-xs);
  font-weight: 500;
  letter-spacing: 0.02em;
}
.gb-label em { color: rgb(189 181 167 / 0.6); font-size: var(--t-label); font-style: normal; letter-spacing: 0.14em; text-transform: uppercase; }
.gb-n { margin-left: auto; color: rgb(189 181 167 / 0.55); font-size: var(--t-label); font-variant-numeric: tabular-nums; transition: color 0.3s; }
.gb-n.is-low { color: var(--rose); }
.gb-field input {
  height: 50px;
  padding: 0 16px;
  border: 1px solid rgb(236 230 218 / 0.13);
  border-radius: 14px;
  background: rgb(236 230 218 / 0.035);
  color: var(--paper);
  caret-color: var(--rose);
  font: 400 var(--t-base) var(--sans);
  transition: border-color 0.3s var(--ease), background-color 0.3s var(--ease);
}
.gb-field input:hover { border-color: rgb(236 230 218 / 0.22); }
.gb-field input:focus { outline: none; border-color: rgb(194 148 141 / 0.85); background: rgb(236 230 218 / 0.055); }
.gb-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.gb-error { min-height: 1.3em; margin: -6px 0 0; color: #e8a49a; font-size: var(--t-xs); }
.gb-error:empty { min-height: 0; margin: -16px 0 0; }

/* os botões: plantar (a cheio, rosa, com uma luz fina por cima) e "agora não" */
.gb-actions { display: flex; align-items: center; gap: 10px; margin-top: 4px; }
.gb-plant {
  flex: 1;
  height: 52px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, #cba19a, var(--rose));
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.22), 0 10px 24px -14px rgb(194 148 141 / 0.8);
  color: #1d1716;
  font: 600 var(--t-sm) var(--sans);
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: filter 0.3s var(--ease), transform 0.3s var(--ease);
}
.gb-plant:hover { filter: brightness(1.07); transform: translateY(-1px); }
.gb-plant:active { transform: none; }
.gb-plant:disabled { opacity: 0.6; cursor: default; transform: none; filter: none; }
.gb-cancel { height: 52px; padding: 0 16px; border: 0; background: none; color: var(--paper-2); font: 500 var(--t-sm) var(--sans); cursor: pointer; transition: color 0.3s var(--ease); }
.gb-cancel:hover { color: var(--paper); }
.gb-fine { max-width: 34ch; margin: -2px auto 0; color: rgb(189 181 167 / 0.72); font-size: var(--t-xs); line-height: 1.5; text-align: center; text-wrap: balance; }
@media (max-width: 480px) {
  .gb-form { gap: 16px; padding: 28px 22px 22px; }
}
@media (prefers-reduced-motion: no-preference) {
  .gb-dialog[open] { animation: gb-in 0.6s var(--ease) both; }
  .gb-dialog[open]::backdrop { animation: gb-fade 0.5s ease both; }
  .gb-dialog[open] .gb-flower:not(.is-grown) svg { animation: flower-grow 1.5s 0.15s var(--ease) both, flower-sway 4.6s 1.65s ease-in-out infinite; }
  .gb-dialog[open] .gb-flower.is-grown svg { animation: flower-sway 4.6s ease-in-out infinite; }
}
@keyframes gb-in { from { opacity: 0; transform: translateY(16px) scale(0.985); } }
@keyframes gb-fade { from { opacity: 0; } }

/* A papoila dourada: de quem passou por todas as salas. As pétalas a ouro (o
   js/guestbook.js troca-lhes a cor), com um brilho e duas estrelas pequenas a
   piscar à volta. */
.guest.is-gold .guest-btn svg,
.gb-flower.is-gold svg { filter: drop-shadow(0 0 8px rgb(255 206 112 / 0.45)); }
/* com o rato em cima de uma flor (ou um toque), o nome fica por cima do texto do fim */
.garden-guests:is(:hover, :focus-within, :has(.is-open)) { z-index: 3; }
.guest.is-gold::before,
.guest.is-gold::after {
  content: "✦";
  position: absolute;
  z-index: 2;
  color: #f6d98a;
  font-size: 11px;
  line-height: 1;
  pointer-events: none;
  animation: gold-twinkle 2.4s ease-in-out infinite;
}
.guest.is-gold::before { top: -6px; left: -2px; }
.guest.is-gold::after { top: 14px; right: -8px; font-size: 8px; animation-delay: 1.2s; }
@keyframes gold-twinkle { 0%, 100% { opacity: 0.15; transform: scale(0.7); } 50% { opacity: 1; transform: scale(1.1); } }
.guest-tip em { color: #f1d38a; font-style: normal; font-size: var(--t-label); }
/* a linha da papoila dourada: quantas salas faltam (dourada quando já não falta
   nenhuma). Fica por cima do botão, encostada a ele (antes ficava por baixo, a
   última, em cima das flores); por baixo do botão, só quantas flores há */
.gb-quest { margin: -6px 0 -14px; color: var(--paper-2); font-size: var(--t-xs); opacity: calc(var(--credit, 1) * 0.7); cursor: default; }
.garden-top .gb-quest { order: 1; }
.garden-top .gb-open { order: 2; }
.garden-top .gb-count { order: 3; }
.garden-top .gb-done { order: 4; }
/* as linhas do livro de visitas leem-se por cima das flores (no telemóvel, o texto fica sobre elas) */
.garden-top :is(.gb-open, .gb-count, .gb-quest, .gb-done) { text-shadow: 0 1px 10px rgb(18 17 17 / 0.95), 0 0 2px rgb(18 17 17 / 0.9); }
.gb-quest.is-gold { color: #ecd08b; opacity: var(--credit, 1); }
.garden:not(.is-credited) .gb-quest { visibility: hidden; }
/* na janela: a escolha da papoila dourada. Uma caixa a ouro, com a sua própria
   marca (um quadrado de cantos suaves que se enche de ouro, com o visto escuro),
   o nome em serifa e, à direita, uma estrela pequena que brilha quando está escolhida */
.gb-gold {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid rgb(236 210 139 / 0.22);
  border-radius: 14px;
  background: linear-gradient(100deg, rgb(236 210 139 / 0.09), rgb(236 210 139 / 0.025));
  cursor: pointer;
  transition: border-color 0.3s var(--ease), background-color 0.3s var(--ease);
}
.gb-gold[hidden] { display: none; }
.gb-gold:hover,
.gb-gold:has(input:checked) { border-color: rgb(236 210 139 / 0.42); }
.gb-gold input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.gb-gold-box {
  display: grid;
  place-items: center;
  flex: none;
  width: 20px;
  height: 20px;
  border: 1px solid rgb(236 210 139 / 0.55);
  border-radius: 6px;
  transition: background-color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.gb-gold-box::after {
  content: "";
  width: 10px;
  height: 6px;
  margin-top: -2px;
  border: solid #231c10;
  border-width: 0 0 1.75px 1.75px;
  transform: rotate(-45deg) scale(0.4);
  opacity: 0;
  transition: transform 0.35s var(--ease), opacity 0.2s;
}
.gb-gold input:checked + .gb-gold-box { border-color: #e2bd63; background: linear-gradient(180deg, #ecc874, #d4a94c); }
.gb-gold input:checked + .gb-gold-box::after { opacity: 1; transform: rotate(-45deg) scale(1); }
.gb-gold input:focus-visible + .gb-gold-box { border-color: #f3dda0; }
.gb-gold-text { display: grid; gap: 3px; color: #f0dca4; font: 400 var(--t-base)/1.15 var(--serif); }
.gb-gold-text em { color: rgb(189 181 167 / 0.8); font: 500 var(--t-label)/1.2 var(--sans); font-style: normal; letter-spacing: 0.12em; text-transform: uppercase; }
.gb-gold-star { margin-left: auto; color: #f3d68a; font-size: 0.9rem; opacity: 0.25; transition: opacity 0.4s var(--ease), transform 0.4s var(--ease); }
.gb-gold:has(input:checked) .gb-gold-star { opacity: 1; transform: rotate(18deg) scale(1.1); }

/* À noite (o js/exit.js põe .is-night no <html>, das 20h às 6h, e os pirilampos
   no jardim): uma lua pequena, em cima, à direita, nítida e sem brilho à volta.
   Os mares são manchas suaves, um pouco mais escuras; o disco é mais claro em
   cima, à esquerda, e escurece devagar para a borda. Aparece com a cena do fim
   (--moon, de 0 a 1, posto pelo js/exit.js) e apaga-se com ela, ao subir */
.is-night .exit-stage::before {
  content: "";
  position: absolute;
  top: 9%;
  right: 13%;
  width: clamp(28px, 2.8vw, 44px);
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 42%, rgb(170 160 138 / 0.4), rgb(170 160 138 / 0) 21%),
    radial-gradient(circle at 58% 31%, rgb(170 160 138 / 0.3), rgb(170 160 138 / 0) 14%),
    radial-gradient(circle at 55% 63%, rgb(170 160 138 / 0.34), rgb(170 160 138 / 0) 18%),
    radial-gradient(circle at 31% 70%, rgb(170 160 138 / 0.22), rgb(170 160 138 / 0) 10%),
    radial-gradient(circle at 70% 52%, rgb(170 160 138 / 0.18), rgb(170 160 138 / 0) 8%),
    radial-gradient(circle at 40% 35%, #f4efe2 0 40%, #e6dfce 72%, #d2c8b3);
  opacity: calc(var(--moon, 0) * 0.94);
  transform: translateY(calc((1 - var(--moon, 0)) * 16px));
  pointer-events: none;
}
/* no telemóvel, um pouco mais para dentro, longe do "MENU" */
@media (max-width: 600px) {
  .is-night .exit-stage::before { top: 7%; right: 26%; }
}

/* =========================================================
   AO FAZER SCROLL: o que aparece quando chega ao ecrã
   (o script junta .is-in; sem script, está tudo à vista)
   ========================================================= */
@media (prefers-reduced-motion: no-preference) {
  .js .rv {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity 0.9s var(--ease), transform 1.1s var(--ease), border-color 0.5s var(--ease), background-color 0.5s var(--ease);
    transition-delay: var(--rv-delay, 0s), var(--rv-delay, 0s), 0s, 0s;
  }
  .js .rv.is-in { opacity: 1; transform: none; }
  .js .rv-fade {
    opacity: 0;
    transition: opacity 1s var(--ease);
    transition-delay: var(--rv-delay, 0s);
  }
  .js .rv-fade.is-in { opacity: 1; }
  /* os painéis dos projetos abrem-se de baixo para cima e a imagem assenta lá dentro */
  .js .rv-wipe {
    clip-path: inset(100% -60px 0 -60px);
    transition: clip-path 1.3s cubic-bezier(0.65, 0, 0.25, 1);
  }
  .js .rv-wipe.is-in { clip-path: inset(-40px -60px -90px -60px); }
  .js .rv-wipe.rv-done { clip-path: none; }
  .js .rv-wipe :is(.work-shot, .intern-page) {
    scale: 1.08;
    transition: scale 1.9s cubic-bezier(0.2, 0.7, 0.2, 1), transform 0.9s var(--ease);
  }
  .js .rv-wipe.is-in :is(.work-shot, .intern-page) { scale: 1; }
  /* a subir, o que entra por cima do ecrã já lá está: sem transições (só por um
     instante, o script tira-o logo) e sem as animações dos pontos do percurso */
  .js .rv-now,
  .js .rv-now :is(.work-shot, .intern-page, .chip, .work-tag) { transition: none !important; }
  .js .rv-still :is(.tl-dot, .tl-date, .tl-what) { animation: none !important; }
  /* os títulos das secções aparecem com a mesma mancha do nome (e o dos
     projetos em grão, como as flores da entrada se desfazem) */
  .js :is(.rv-ink, .rv-grain) { visibility: hidden; }
  /* o "me" do About cai para o sítio: acelera a cair, dá um pequeno ressalto e
     assenta (a subir, já lá está: rv-still) */
  .js .rv-drop:not(.is-in) { opacity: 0; }
  .js .rv-drop.is-in { animation: me-fall 1.1s both; animation-delay: var(--rv-delay, 0s); }
  .js .rv-drop.rv-still { animation: none; }
}
@keyframes me-fall {
  0%   { opacity: 0; transform: translateY(-2.6em) rotate(-12deg); animation-timing-function: cubic-bezier(0.55, 0, 0.9, 0.45); }
  8%   { opacity: 1; }
  44%  { transform: translateY(0) rotate(0deg); animation-timing-function: cubic-bezier(0.2, 0.65, 0.4, 1); }
  62%  { transform: translateY(-0.22em) rotate(3.5deg); animation-timing-function: cubic-bezier(0.55, 0, 0.9, 0.45); }
  78%  { transform: translateY(0) rotate(-1.2deg); animation-timing-function: cubic-bezier(0.2, 0.65, 0.4, 1); }
  89%  { transform: translateY(-0.04em) rotate(0.4deg); }
  100% { opacity: 1; transform: none; }
}

/* =========================================================
   RESPONSIVO
   ========================================================= */
@media (max-width: 960px) {
  /* no telemóvel, numa coluna, pela ordem do index.html: o nome, o vídeo por
     baixo dele e depois as tecnologias, a descrição e os botões */
  .work { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; }
  .work-head,
  .work-label,
  .work-media { grid-column: 1; grid-row: auto; }
  .work-head,
  .work-label { max-width: none; }
  .work-media { margin-top: 26px; }
  .work-label { margin-top: 8px; }
  .intern { grid-template-columns: minmax(0, 1fr); gap: 48px; }
  .intern-cover { justify-self: start; width: min(100%, 340px); }
}

/* Ecrãs estreitos: o percurso fica na vertical, com tudo à vista */
@media (max-width: 900px) {
  .tl-panel { display: none; }
  .tl { display: block; padding-top: 4px; }
  .tl-item { padding: 0 0 34px 30px; }
  .tl-node { display: block; width: auto; padding: 0; text-align: left; cursor: default; }
  .tl-date { display: none; }
  .tl-dot { position: absolute; top: 9px; left: 0; margin: 0; }
  .tl-what {
    display: block;
    max-width: none;
    color: var(--paper);
    font: 400 var(--t-lede)/1.25 var(--serif);
  }
  .tl-card { margin-top: 6px; }
  .tl-main .tl-title { display: none; }
  .tl-main .tl-text { margin-top: 8px; color: var(--paper-2); }
  .tl-learn { margin-top: 18px; }
  .tl-learn p:not(.tl-label) { margin-top: 8px; font-size: var(--t-base); }
  .tl-item.is-seen .tl-dot { background: var(--rose); }
}

@media (max-width: 760px) {
  .skills-more { grid-template-columns: minmax(0, 1fr); }
  .skill-chips { gap: 8px; }
  .chip { height: 38px; padding: 0 14px 0 12px; font-size: var(--t-xs); }
  .work-tag { padding: 6px 14px; }
}

@media (max-width: 640px) {
  /* no telemóvel: margem normal à esquerda, espaço para o menu à direita */
  :root { --side: var(--gutter); }
  .room { padding-right: 46px; }
  .work-panel { border-radius: 14px; }
  .garden-top { padding: 0 56px; } /* o agradecimento não toca no menu */
  .bloom-btn { height: 54px; }
  .hero-garden { height: 62%; }
  .menu-panel { padding-left: 28px; }
}

/* Movimento reduzido: tudo instantâneo */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }
}

/* =========================================================
   IMPRESSÃO: Ctrl+P transforma o site num CV.
   Ordem no papel: nome, contactos, about, skills, projetos.
   ========================================================= */
@media print {
  @page { size: A4; margin: 14mm 16mm 15mm; }

  :root {
    --paper: #1d1a16;
    --paper-2: #5a5249;
    --line: rgb(29 26 22 / 0.16);
    --rose: #8a463f;
    --accent: #8a463f;
  }
  html { scroll-behavior: auto; }
  html,
  body { background: #fff !important; }
  body { font-size: 9.5pt; line-height: 1.45; }
  body::before,
  body::after { display: none !important; }
  a { text-decoration: none !important; }

  .print-only { display: block !important; }
  .print-url:empty { display: none !important; }

  /* O que não vai para o papel */
  .walls, .menu-toggle, .menu-panel, .meadow, .hero-garden, .hero-grains, .scroll-cue,
  .work-media, .work-actions, .cv-title, .bloom-btn,
  .tl-node, .tl-panel, .tl-learn, .about-me, .room--internship,
  .skills-caption, .skill-links, .skill-row--works, .chip-icon,
  #contact .room-head, #contact .wall-text,
  .contact-form, .ask, .exit { display: none !important; }
  /* o que aparece com o scroll fica logo à vista */
  .rv, .rv-fade, .rv-wipe, .rv-ink, .rv-grain, .chip, .work-tag {
    opacity: 1 !important;
    transform: none !important;
    clip-path: none !important;
    visibility: visible !important;
    filter: none !important;
    -webkit-mask-image: none !important;
    mask-image: none !important;
  }

  main { display: flex; flex-direction: column; }
  #home     { order: 1; }
  #contact  { order: 2; }
  #about    { order: 3; }
  #cv       { order: 4; }
  #projects { order: 5; }

  .room { padding: 0; margin-top: 8mm; overflow: visible; }
  .room-inner { max-width: none; }

  /* Cabeçalho: nome, papel e resumo */
  .hero { height: auto; }
  .hero-stage { position: static; height: auto; overflow: visible; }
  .hero-intro { position: static; display: block; padding: 0; text-align: left; }
  .name {
    font-size: 28pt;
    filter: none !important;
    -webkit-mask-image: none !important;
    mask-image: none !important;
    animation: none !important;
  }
  .hero-sub { margin-top: 1.5mm; font-size: 11pt; }
  .print-url { margin: 1mm 0 0; color: var(--paper-2); font-size: 9pt; }
  .statement {
    position: static;
    width: auto;
    margin: 3mm 0 0;
    transform: none;
    text-align: left;
    visibility: visible !important;
    filter: none !important;
    -webkit-mask-image: none !important;
    mask-image: none !important;
  }
  /* no papel, o papel e a cidade já estão por baixo do nome: fica só a frase pequena */
  .statement-text { display: none; }
  .statement-note { max-width: none; margin: 0; color: var(--paper); font: 400 11pt/1.35 var(--serif); }

  /* Contactos logo abaixo do nome, com o texto em vez de só ícones */
  #contact { margin-top: 3mm; }
  .contact { display: block; text-align: left; }
  .icons { justify-content: flex-start; gap: 6mm; margin: 0; }
  .icons a { display: inline-flex; align-items: center; gap: 1.5mm; width: auto; height: auto; margin: 0; border-radius: 0; box-shadow: none; }
  .icons svg { width: 9pt; height: 9pt; }
  .icon-label {
    position: static !important;
    width: auto; height: auto;
    margin: 0;
    overflow: visible;
    clip: auto;
    white-space: normal;
    font-size: 9.5pt;
  }

  /* Títulos de secção */
  .room-head {
    display: block;
    margin: 0;
    padding-bottom: 1.5mm;
    border-bottom: 0.5pt solid var(--line);
    break-after: avoid;
  }
  .room-head h2 { font-family: var(--serif); font-size: 15pt; font-weight: 400; line-height: 1.1; }

  /* About: a palavra como os outros títulos (sem o "me"), e o texto por baixo */
  .about-head { display: block; }
  .about-head .about-giant { margin: 0; padding: 0; color: var(--ink); font: 400 15pt/1.1 var(--serif); letter-spacing: 0; }
  .about-text { margin-top: 4mm; font-size: 10.5pt; line-height: 1.45; letter-spacing: 0; }
  .wall-text { max-width: none; font-size: 11pt; line-height: 1.45; }
  .col-title { margin-bottom: 2.5mm; font-size: 9pt; }
  .path { margin-top: 5mm; }
  .tl { display: block; margin-top: 2mm; padding: 0; }
  .tl-item { padding: 0; }
  .tl-card {
    position: static;
    width: auto; height: auto;
    margin: 0;
    overflow: visible;
    clip-path: none;
    white-space: normal;
    break-inside: avoid;
  }
  .tl-main {
    display: grid;
    grid-template-columns: 30mm minmax(0, 1fr);
    column-gap: 3mm;
    padding: 0 0 1.8mm;
  }
  .tl-main .tl-when { grid-row: span 3; font-size: 9.5pt; }
  .tl-main .tl-title { display: block; margin: 0; font-size: 10.5pt; }
  .tl-main .tl-place { margin: 0; font-size: 8.5pt; }
  .tl-main .tl-text { margin: 0.5mm 0 0; color: var(--paper); font-size: 9.5pt; }

  /* Skills: uma linha por grupo, sem ícones */
  .cv-center { display: block; text-align: left; }
  .skills,
  .skills-more { max-width: none; margin-top: 3mm; }
  .skills-body { display: block; margin-top: 1mm; }
  .skills-head .col-title,
  .skill-col .col-title { font: 600 9pt/1.3 var(--sans); letter-spacing: normal; text-transform: none; }
  .skill-row { display: grid; grid-template-columns: 30mm minmax(0, 1fr); gap: 0 3mm; padding: 0.8mm 0; border: 0; }
  .skill-row-name { margin: 0; padding: 0; color: var(--paper-2); font: 600 9pt/1.3 var(--sans); }
  .skill-chips { justify-content: flex-start; gap: 0 3.5mm; }
  .chip { height: auto; padding: 0; border: 0; background: none; box-shadow: none; font-size: 9.5pt; }
  .skills-more { text-align: left; }
  .cert-head { justify-content: flex-start; }
  .skills-more { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8mm; }
  .skill-list { gap: 1mm; }
  .skill-list li { font-size: 10pt; line-height: 1.35; }
  .cert-head { margin: 0 0 1mm; font-size: 9pt; }

  /* Projetos: só a etiqueta, em duas colunas */
  .work-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4mm 10mm; margin-top: 4mm; }
  .work { display: block; break-inside: avoid; }
  .work-head,
  .work-label { max-width: none; margin-top: 0; }
  .work-head h3 { font-size: 12pt; line-height: 1.2; }
  .year { font-size: 1em; }
  .medium { margin-top: 0.5mm; font-size: 8.5pt; }
  .desc { margin-top: 1mm; font-size: 9.5pt; }
}
