/* ============================================================
   about.css — "Sobre mim" + processo criativo
   ============================================================ */

/* ---- scroll-reveal primitive ----
   Elements start displaced and settle into place. Everything on the page
   arrives with a bit of weight to it, matching the hero.

   Gated behind .js (set by an inline script in <head>): content must never
   depend on JavaScript to become visible. If the script fails to load, the
   opacity:0 never applies and the whole section still reads normally. */
.js [data-reveal]{
  opacity:0;
  transform:translateY(28px);
  transition:opacity .7s var(--ease), transform .8s var(--ease);
}
.js [data-reveal].in{
  opacity:1;
  transform:none;
}

/* Word-by-word headline reveal.
   An overflow:hidden clip mask per word looks great on a single line, but
   breaks the moment the headline wraps: the clip box is sized from font
   metrics, so descenders get cut and negative margins drag the next line
   over the one above. A rise-and-fade needs no clipping box, so it survives
   wrapping, descenders and inline <em> untouched. */
.w{ display:inline-block; }
.w-in{
  display:inline-block;
  transition:transform .8s var(--ease), opacity .6s ease;
}
.js .w-in{
  transform:translateY(.45em);
  opacity:0;
}
.js .in .w-in{
  transform:none;
  opacity:1;
}

@media (prefers-reduced-motion: reduce){
  .js [data-reveal]{ opacity:1; transform:none; }
  .js .w-in{ transform:none; opacity:1; }
}

/* A antiga secção "About" foi movida para o painel lateral (ver panels.css);
   o que resta aqui são as primitivas de revelação, a marquee e o processo. */

/* ============================ MARQUEE ============================ */
.marquee{
  overflow:hidden;
  border-top:1px solid var(--rule);
  border-bottom:1px solid var(--rule);
  padding:clamp(.9rem, 2vh, 1.4rem) 0;
  background:var(--ink);
  user-select:none;
}
.marquee-track{
  display:flex;
  width:max-content;
  will-change:transform;
}
.marquee-item{
  display:inline-flex;
  align-items:center;
  gap:clamp(1.5rem, 4vw, 3rem);
  padding-right:clamp(1.5rem, 4vw, 3rem);
  font-size:clamp(1.3rem, 3.2vw, 2.4rem);
  font-weight:600;
  letter-spacing:-.02em;
  text-transform:uppercase;
  color:var(--paper);
  white-space:nowrap;
}
.marquee-item i{
  font-style:normal;
  color:var(--gold);
  font-size:.7em;
}

/* ============================ PROCESSO ============================ */
.process{
  padding-top:clamp(4.5rem, 11vh, 8rem);
}
.process-head{
  display:flex;
  flex-wrap:wrap;
  align-items:flex-end;
  justify-content:space-between;
  gap:1.5rem;
  max-width:1200px;
}
.process h2{
  font-size:clamp(1.9rem, 4.4vw, 3.2rem);
  font-weight:500;
  letter-spacing:-.025em;
  margin-top:.8rem;
  line-height:1.06;
}
.process-note{
  font-size:.95rem;
  line-height:1.6;
  color:var(--ink-soft);
  max-width:34ch;
}

.process-list{
  list-style:none;
  margin:clamp(2.5rem, 6vh, 4rem) 0 0;
  padding:0;
  max-width:1200px;
  border-top:1px solid var(--rule);
}

.step{
  border-bottom:1px solid var(--rule);
  --accent:var(--burnt);
}

/* the row you click */
.step-head{
  width:100%;
  background:none;
  border:0;
  padding:clamp(1.4rem, 3vh, 2.1rem) 0;
  display:grid;
  grid-template-columns:auto 1fr auto;
  align-items:center;
  gap:clamp(1rem, 3vw, 2.5rem);
  cursor:pointer;
  text-align:left;
  font-family:var(--sans);
  color:var(--ink);
  transition:padding-left .4s var(--ease), color .3s ease;
}
.step-head:hover{ padding-left:clamp(.4rem, 1.4vw, 1.2rem); }
.step-head:focus-visible{
  outline:2px solid var(--accent);
  outline-offset:4px;
}

.step-index{
  font-size:.8rem;
  font-weight:600;
  letter-spacing:.1em;
  color:var(--ink-faint);
  transition:color .3s ease;
}
.step[data-open="true"] .step-index{ color:var(--accent); }

.step-title{
  font-size:clamp(1.35rem, 3.4vw, 2.4rem);
  font-weight:500;
  letter-spacing:-.025em;
  line-height:1.05;
  transition:color .3s ease;
}
.step[data-open="true"] .step-title{ color:var(--accent); }

/* the little physics-flavoured marker: a dot that grows into a bar */
.step-mark{
  width:clamp(34px, 5vw, 54px);
  height:14px;
  position:relative;
  flex:0 0 auto;
}
.step-mark::before{
  content:'';
  position:absolute;
  right:0; top:50%;
  transform:translateY(-50%);
  height:14px;
  width:14px;
  border-radius:99px;
  background:var(--accent);
  transition:width .5s var(--ease);
}
.step[data-open="true"] .step-mark::before{ width:100%; }

/* expanding body — 0fr -> 1fr animates cleanly without measuring heights */
.step-body{
  display:grid;
  grid-template-rows:0fr;
  transition:grid-template-rows .55s var(--ease), opacity .45s ease;
  opacity:0;
}
.step[data-open="true"] .step-body{
  grid-template-rows:1fr;
  opacity:1;
}
.step-body-inner{
  overflow:hidden;
}
.step-body p{
  font-size:1.02rem;
  line-height:1.68;
  color:var(--ink-soft);
  max-width:60ch;
  padding-bottom:clamp(1.4rem, 3vh, 2.2rem);
  padding-left:calc(clamp(1rem, 3vw, 2.5rem) + 2.2rem);
}

@media (max-width:720px){
  .step-body p{ padding-left:0; }
  .step-head{ gap:1rem; }
}

/* ============================================================
   About me a preto, como o Contact me: letras e linhas a branco
   ============================================================ */
.work-view.about-view{ background:#0B0B0B; color:#fff; }
.work-view.about-view h2{ color:#fff; }
.about-view .about-hi{ color:#fff; }
.about-view .about-intro .about-text p{ color:rgba(255,255,255,.72); }
.about-view .about-intro .about-portrait{ background:#1a1a1a; }
/* o wordmark fixo por cima da vista também passa a claro */
body.view-about #hero-copy h1{ color:rgba(255,255,255,.62); }
body.view-about .back-arrow{ stroke:rgba(255,255,255,.62); }

/* ============================================================
   How I work: mural. O quadro tem proporção fixa e as notas são
   posicionadas em % dele (--x, --y, --w), cada uma rodada (--r).
   As setas são um SVG por cima, desenhado pelo about.js.
   ============================================================ */
.about-pag.mural{ max-width:none; justify-content:center; }
.mural-quadro{
  position:relative;
  height:min(100%, 620px);
  aspect-ratio:2.5 / 1;
  min-height:420px;
}
.mural-quadro .nota{
  position:absolute;
  left:var(--x); top:var(--y);
  width:var(--w);
  transform:rotate(var(--r, 0deg));
  font-size:clamp(.82rem, 1.05vw, .98rem);
  line-height:1.5;
}
.mural-quadro .nota p{ margin:0; }
.nota-rot{
  display:block;
  font-size:.7rem;
  font-weight:600;
  letter-spacing:.16em;
  text-transform:uppercase;
  margin-bottom:.55rem;
}
/* título do mural */
.nota-titulo .passo-rot{ color:#FFBE0B; margin-bottom:.8rem; }
.nota-titulo h3{
  font-size:clamp(1.4rem, 2.5vw, 2.3rem);
  font-weight:500;
  letter-spacing:-.03em;
  line-height:1.08;
  color:#fff;
  margin:0;
}
.nota-titulo h3 em{ font-style:normal; color:#FFBE0B; }
/* nota de papel: cor cheia, texto escuro */
.nota-papel{
  background:var(--c);
  color:#111;
  padding:1rem 1.1rem 1.15rem;
  border-radius:2px;
}
.nota-papel .nota-rot{ color:rgba(0,0,0,.6); }
/* nota de linha: só contorno na cor, texto branco */
.nota-linha{
  border:1.5px solid var(--c);
  color:rgba(255,255,255,.86);
  padding:.95rem 1.05rem 1.1rem;
  border-radius:2px;
}
.nota-linha .nota-rot{ color:var(--c); }
/* apontamentos soltos, à margem: sem caixa, como escritos à mão */
.nota-solta{
  color:rgba(255,255,255,.55);
  font-style:italic;
  font-weight:300;
  border-left:1.5px solid rgba(255,255,255,.25);
  padding-left:.8rem;
}
/* a conclusão */
.nota-fim p{
  font-size:clamp(1.3rem, 2.2vw, 2rem);
  font-weight:500;
  letter-spacing:-.025em;
  line-height:1.1;
  color:#fff;
}
.nota-fim em{ font-style:normal; color:#F2481B; }
/* setas desenhadas à mão */
.mural-setas{
  position:absolute; inset:0;
  width:100%; height:100%;
  overflow:visible;
  pointer-events:none;
  fill:none;
  stroke:rgba(255,255,255,.7);
  stroke-width:1.8;
  stroke-linecap:round;
  stroke-linejoin:round;
}
.mural-setas .volta{ stroke:#FFBE0B; stroke-dasharray:5 7; }
.mural-setas text{
  fill:#FFBE0B; stroke:none;
  font:italic 300 13px var(--sans);
}
/* a seta da apresentação para o mural fica branca no fundo preto */
.about-view .seta-intro{ stroke:#fff; }

@media (max-width:760px){
  .mural-quadro{ height:auto; aspect-ratio:auto; min-height:0; width:84vw; display:flex; flex-direction:column; gap:1.4rem; }
  .mural-quadro .nota{ position:static; width:auto; transform:none; }
  .mural-setas{ display:none; }
}
/* espaço em cima para a seta que volta atrás, que sobe acima das notas */
.mural-quadro{ margin-top:clamp(2.4rem, 7vh, 4rem); height:min(calc(100% - clamp(2.4rem, 7vh, 4rem)), 600px); }

/* ---- mural v2: títulos mais fortes, sublinhados, pergunta ---- */
.mural-pergunta{
  font-size:clamp(1.6rem, 2.9vw, 2.7rem);
  font-weight:700;
  letter-spacing:-.035em;
  line-height:1.02;
  color:#fff;
  margin:0 0 .7rem;
}
.mural-frase{
  font-size:clamp(1.15rem, 1.9vw, 1.7rem);
  font-weight:600;
  letter-spacing:-.025em;
  line-height:1.12;
  color:rgba(255,255,255,.88);
}
.mural-frase em{ font-style:normal; color:#FFBE0B; }
.nota-rot{
  font-size:clamp(.95rem, 1.25vw, 1.15rem);
  font-weight:700;
  letter-spacing:-.01em;
  text-transform:none;
  margin-bottom:.45rem;
}
.mural-quadro .nota u{
  text-decoration:underline;
  text-decoration-thickness:2px;
  text-underline-offset:.2em;
  text-decoration-color:var(--c, #fff);
}
.nota-papel u{ text-decoration-color:rgba(0,0,0,.75); }
.nota-fim p{ font-weight:700; }
.nota-fim em{ text-decoration:underline; text-decoration-thickness:3px; text-underline-offset:.15em; }

/* o "About me." sai quando se desliza para o lado */
.about-view .work-head{ transition:opacity .35s ease, transform .35s ease; }
.about-view.passou .work-head{ opacity:0; transform:translateY(-10px); pointer-events:none; }

/* ---- mural v3: sem cartões, só título e texto, mais espaço ----
   O quadro ocupa a altura toda da faixa e é mais largo, para as setas
   terem ar entre as notas. */
.mural-quadro{
  margin-top:clamp(1.5rem, 4vh, 3rem);
  height:calc(100% - clamp(1.5rem, 4vh, 3rem));
  max-height:none;
  aspect-ratio:3.1 / 1;
}
.mural-pergunta{
  font-size:clamp(2.4rem, 4.6vw, 4.4rem);
  color:#FFBE0B;
  margin-bottom:.9rem;
}
.nota-papel, .nota-linha{
  background:none;
  border:0;
  padding:0;
  color:rgba(255,255,255,.82);
}
/* o título de cada nota na cor dela, maior, e o texto por baixo */
.nota-papel .nota-rot, .nota-linha .nota-rot{
  color:var(--c);
  font-size:clamp(1.3rem, 2vw, 1.9rem);
  font-weight:700;
  letter-spacing:-.03em;
  margin-bottom:.6rem;
}
.nota-papel u, .nota-linha u{ text-decoration-color:var(--c); }
.mural-quadro .nota{ font-size:clamp(.92rem, 1.15vw, 1.08rem); line-height:1.55; }
/* sem a seta da apresentação: mais espaço entre ela e o mural */
.about-view .about-pista{ gap:clamp(5rem, 12vw, 11rem); }
/* espaço em cima para a seta que volta atrás e a sua legenda */
.mural-quadro{ margin-top:clamp(3.5rem, 9vh, 5.5rem); height:calc(100% - clamp(3.5rem, 9vh, 5.5rem)); }
.work-view.about-view .mural-pergunta{ color:#FFBE0B; }
.nota-titulo h3.mural-pergunta{ font-size:clamp(2.4rem, 4.6vw, 4.4rem); font-weight:700; }   /* ganha à regra antiga ".nota-titulo h3" */

/* ---- mural v4: o "How I work?" à altura do "About me." ----
   O cabeçalho sai do fluxo (fica por cima, no mesmo sítio), por isso a
   faixa começa à altura dele: a apresentação guarda o espaço do título
   com padding, e o mural usa a altura toda, a começar lá em cima. */
.work-view.about-view{ --cab:calc(clamp(1.4rem, 4vh, 2.6rem) + 2.6rem + clamp(1rem, 3vh, 2.2rem)); }
.about-view .work-head{ position:absolute; top:var(--cab); left:0; right:0; z-index:2; }
.about-view .about-track{ margin-top:0; }
.about-view .about-intro{ padding-top:clamp(4.6rem, 10vh, 6rem); }
.mural-quadro{ margin-top:0; height:100%; }
/* sublinhados: a palavra na cor do título da nota e com o peso da frase
   "The creative process is", sem mudar o tamanho */
.mural-quadro .nota u{ color:var(--c, #fff); font-weight:600; text-decoration-color:var(--c, #fff); }
.nota-fim u, .nota-fim em{ color:#F2481B; }
.mural-quadro .nota u, .nota-fim em{ text-decoration:none; }   /* sem sublinhados: fica só a cor e o peso */

/* setas desenhadas à mão (SVG do Afonso), em % do quadro como as notas */
.seta-mao{
  position:absolute;
  left:var(--x); top:var(--y);
  width:var(--w); height:auto;
  pointer-events:none;
}
.seta-legenda{
  position:absolute;
  left:var(--x); top:var(--y);
  color:#FFBE0B;
  font:italic 300 clamp(.75rem, .9vw, .9rem)/1 var(--sans);
  white-space:nowrap;
}
@media (max-width:760px){ .seta-mao, .seta-legenda{ display:none; } }

/* ---- mural v5 ---- */
.nota-titulo h3.mural-pergunta{ font-size:clamp(2.9rem, 5.6vw, 5.4rem); }
.mural-frase{ font-size:clamp(1.3rem, 2.15vw, 1.95rem); }
/* "and back again" com o mesmo peso visual de "straight line" */
.seta-legenda{
  font:600 clamp(1.3rem, 2.15vw, 1.95rem)/1.1 var(--sans);
  letter-spacing:-.025em;
  font-style:normal;
  color:#FFBE0B;
}
.nota-fim p{ line-height:1.08; }
.nota-fim em{ color:#F2481B; }
.nota-fim .fim-design{ color:#FFBE0B; font-weight:inherit; }   /* o amarelo do How I work? */

/* ---- My skills: título amarelo como o "How I work?", duas listas ---- */
.about-pag.skills{ max-width:none; justify-content:center; padding-right:var(--gutter); }
.skills-titulo{
  font-size:clamp(2.9rem, 5.6vw, 5.4rem);
  font-weight:700;
  letter-spacing:-.035em;
  line-height:1.02;
  color:#FFBE0B;
  margin:0 0 clamp(1.6rem, 4vh, 2.6rem);
}
.skills-colunas{ display:flex; gap:clamp(2.5rem, 6vw, 6rem); align-items:flex-start; }
.skills-rot{
  font-size:clamp(1.15rem, 1.7vw, 1.55rem);
  font-weight:700;
  letter-spacing:-.025em;
  color:#fff;
  margin:0 0 1rem;
}
.skills-lista{ list-style:none; margin:0; padding:0; }
.skills-lista li{
  position:relative;
  padding-left:1.2em;
  font-size:clamp(.95rem, 1.2vw, 1.1rem);
  line-height:1.9;
  color:rgba(255,255,255,.82);
  white-space:nowrap;
}
/* o bullet: um ponto amarelo */
.skills-lista li::before{
  content:'';
  position:absolute; left:0; top:.78em;
  width:.42em; height:.42em; border-radius:50%;
  background:#FFBE0B;
}
.skills-nota{ color:rgba(255,255,255,.45); }
@media (max-width:760px){ .skills-colunas{ flex-direction:column; gap:2rem; } .skills-lista li{ white-space:normal; } }
.about-pag.skills{ justify-content:flex-start; }   /* título à mesma altura do "How I work?" */

/* frase do mural um pouco mais afastada do "How I work?" */
.nota-titulo h3.mural-pergunta{ margin-bottom:1.3rem; }

/* ---- My skills v2: hierarquia como o "How I work?", mais perto do mural ---- */
.about-pag.skills{ margin-left:calc(-1 * clamp(2.5rem, 6vw, 5.5rem)); }
.skills-titulo{ margin-bottom:1.3rem; }
.skills-colunas{ gap:clamp(3rem, 7vw, 7rem); }
/* o nome de cada lista com o peso e tamanho da frase do mural */
.skills-rot{
  font-size:clamp(1.3rem, 2.15vw, 1.95rem);
  font-weight:600;
  letter-spacing:-.025em;
  line-height:1.12;
  color:rgba(255,255,255,.88);
  margin:0 0 .9rem;
}
.skills-lista li{ line-height:1.65; padding-left:1.4em; }
/* traço em vez de ponto */
.skills-lista li::before{
  top:.82em;
  width:.75em; height:2px;
  border-radius:1px;
}

/* ============================================================
   Mural: o texto escala com o QUADRO, não com a janela.
   As setas estão em % do quadro; se o texto usar vw, outra janela
   (outra proporção) quebra as linhas noutros sítios e as setas
   desencontram-se (foi o que aconteceu no Chrome e no Safari).
   Com unidades cqw tudo cresce e encolhe junto. Os valores são os
   que estavam certos num quadro de 2139px (ecrã de 1440px).
   ============================================================ */
.mural-quadro{ container-type:inline-size; }
@container (min-width:1px){
  .nota-titulo h3.mural-pergunta{ font-size:3.77cqw; margin-bottom:.4em; }
  .mural-frase{ font-size:1.45cqw; }
  .mural-quadro .nota{ font-size:.774cqw; }
  .nota-papel .nota-rot, .nota-linha .nota-rot{ font-size:1.35cqw; margin-bottom:.45em; }
  .seta-legenda{ font-size:1.45cqw; }
  .nota-fim p{ font-size:1.48cqw; }
}

/* About me: o espaço por cima da apresentação é sempre a altura do
   título, para a foto nunca passar por baixo dele */
.about-view .about-intro{ padding-top:calc(clamp(2.4rem, 6vw, 4.6rem) * 1.02 + clamp(1.2rem, 3vh, 2rem)); }
.about-view .about-intro .about-portrait{ max-height:calc(100% - clamp(2.4rem, 6vw, 4.6rem) - 2rem); width:auto; aspect-ratio:4 / 5; }

/* My skills: o bloco ao centro do ecrã, na horizontal e na vertical */
.about-pag.skills{
  margin-left:0;
  width:calc(100vw - var(--gutter) * 2);
  justify-content:center;
  align-items:center;
  padding-right:0;
}
.about-pag.skills > *{ align-self:center; }
.skills-titulo{ align-self:flex-start; }
.about-pag.skills{ display:grid; place-content:center; }
.about-pag.skills{ justify-items:start; }
@container (min-width:1px){ .nota-titulo h3.mural-pergunta{ margin-bottom:.26em; } }
/* no fim da faixa sobram 2 gutters à direita (pista + faixa): com esta largura o bloco fica ao centro do ecrã */ .about-pag.skills{ width:calc(100vw - var(--gutter) * 4); }

/* ---- correções: My skills perto do mural, foto à altura do texto ---- */
/* sem a largura de ecrã inteiro (deixava um vazio enorme antes): o bloco
   fica logo a seguir ao mural e só se centra na vertical */
.about-pag.skills{
  width:auto;
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:flex-start;
  margin-left:calc(-1 * clamp(2.5rem, 6vw, 5.5rem));
  padding-right:var(--gutter);
}
/* a foto acompanha o bloco de texto: começa na linha do "Hi," e acaba
   na última linha do texto, em qualquer browser */
.about-view .about-intro{ align-items:stretch; }
.about-view .about-intro .about-portrait{
  aspect-ratio:auto;
  max-height:none;
  height:auto;
  width:clamp(220px, 24vw, 340px);
  flex:0 0 auto;
}
.about-view .about-intro .about-text{ align-self:center; }
.about-view .about-intro{ align-self:center; height:auto; }   /* o bloco tem a altura do texto, e a foto estica só até aí */
.about-pag.skills{ margin-left:calc(-1 * clamp(5rem, 12vw, 11rem) + clamp(3rem, 6vw, 6rem) - clamp(3rem, 7vw, 8rem)); }   /* ~120px depois da frase final */
.about-pag.skills > *{ align-self:flex-start; }
.about-pag.skills{ margin-left:0; }   /* a mesma distância da pista entre a apresentação e o mural */
@container (min-width:1px){ .nota-titulo h3.mural-pergunta{ font-size:5.03cqw; } }   /* 1/3 maior */
/* a apresentação começa sempre por baixo do título "About me.": a altura
   do título é medida em js/faixas.js (--cab-h) em vez de adivinhada */
.about-view .about-intro{ padding-top:calc(var(--cab-h, 5rem) + clamp(1rem, 2.6vh, 1.8rem)); }
