/* ═══════════════════════════════════════════════════════════════
   LUCAS F. OLIVEIRA — folha de estilos
   Estética: contemporânea · conceptual · luminosa
   Layout: barra lateral esquerda (guia) + scroll contínuo
   ═══════════════════════════════════════════════════════════════ */

:root {
  /* paleta dessaturada — só cinzas neutros (experiência) */
  --bg:        #f4f4f4;
  --bg-deep:   #ececec;
  --ink:       #141414;
  --muted:     #6c6c6c;
  --line:      rgba(18, 18, 18, 0.12);
  --accent:    #3a3a3a;   /* cinza (sem saturação) */
  --accent-blue: #0037ff; /* azul elétrico — cor de accent do site */
  --glow-1: rgba(176, 176, 176, 0.42);          /* cinza (mancha ambiente) */
  --glow-2: rgba(187, 187, 187, 0.32);          /* cinza (mancha ambiente) */
  --glow-cursor: rgba(154, 154, 154, 0.28);     /* cinza (mancha do rato) */

  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body:    "IBM Plex Mono", system-ui, sans-serif;

  --sidebar: 280px;
  --gutter:  clamp(1.5rem, 4vw, 4rem);
  --radius:  4px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  /* mancha só do lado direito; lado esquerdo limpo p/ fundir com a sidebar */
  background-image:
    radial-gradient(58vw 62vw at 100% 0%, var(--glow-1), transparent 60%),
    radial-gradient(42vw 46vw at 108% 108%, var(--glow-2), transparent 58%);
  background-attachment: fixed;
}
/* página inicial: sem gradiente de fundo, p/ a sidebar fundir com a moldura.
   (as páginas de obra mantêm o gradiente, pois não têm esta classe) */
body.home { background-image: none; }
/* na página inicial, a luz do rato é SÓ a do interior do palco (.works3d__glow);
   a luz global é desligada para não acender a sidebar/moldura/margens */
body.home > .glow { display: none; }

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--accent); color: #fff; }

/* Mancha que segue o rato — cinza azulado, frio */
.glow {
  position: fixed; top: 0; left: 0;
  width: 32rem; height: 32rem; margin: -16rem 0 0 -16rem;
  border-radius: 50%;
  background: radial-gradient(circle, var(--glow-cursor), transparent 62%);
  pointer-events: none; opacity: 0; z-index: 30;
  transition: opacity 0.6s ease; mix-blend-mode: normal;
}
/* a opacidade da mancha do rato é controlada por JS (ao mexer o rato) */

/* ═══════════════ BARRA LATERAL (guia) ═══════════════ */
.sidebar {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: var(--sidebar);
  z-index: 40;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: clamp(28px, 5.5vh, 64px) clamp(1.6rem, 3vw, 2.4rem);   /* topo/fundo = espessura da moldura do palco */
  padding-left: clamp(2.6rem, 4.5vw, 4rem);   /* texto mais afastado da margem esquerda */
  background: rgba(244, 244, 244, 0.6);
  backdrop-filter: saturate(140%) blur(8px);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
}
.sidebar__brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.05rem, 1.5vw, 1.3rem);
  line-height: 1.05; letter-spacing: -0.02em;
  white-space: nowrap;   /* o nome nunca se separa */
}
/* logo (motivo cubo, azul) ao lado do nome + legenda */
.brand-mark { flex: none; width: 2.7rem; height: 2.7rem; display: block; }
.sidebar__brandrow { display: flex; align-items: center; gap: 0.7rem; }
.sidebar__idtext { display: flex; flex-direction: column; gap: 0.32rem; }
.sidebar__idtext .sidebar__role { margin-top: 0; }
.sidebar__role {
  margin-top: 0.7rem; font-family: var(--font-display);
  text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.64rem; color: var(--muted);
  white-space: nowrap;   /* numa só linha, sem quebra */
}

.sidebar__nav { display: flex; flex-direction: column; gap: 0.2rem; }
.sidebar__nav a {
  font-family: var(--font-display); font-size: 1.05rem; padding: 0.5rem 0;
  color: var(--muted); position: relative; width: fit-content;
  transition: color 0.3s ease, padding-left 0.3s ease, font-size 0.3s ease, font-weight 0.3s ease;
}
/* hover: avança e fica a negrito */
.sidebar__nav a:hover { color: var(--ink); font-weight: 700; padding-left: 0.7rem; }
/* selecionada: igual ao hover (mesmo tamanho, negrito, avançada) mas azul */
.sidebar__nav a.is-active { color: var(--accent-blue); font-weight: 700; padding-left: 0.7rem; }
.sidebar__nav a.is-private { margin-top: 0.6rem; }
.sidebar__nav a.is-private::after { content: "•"; margin-left: 0.4rem; color: var(--muted); }

.sidebar__bottom { display: flex; flex-direction: column; gap: 1.2rem; }
.lang {
  display: inline-flex; align-items: center; gap: 0.4rem;
  background: none; border: 0; cursor: pointer;
  font-family: var(--font-display); font-size: 0.85rem; color: var(--muted); width: fit-content;
}
.lang__opt { transition: color 0.25s ease; }
.lang__opt.is-on { color: var(--accent-blue); }
.lang__opt:not(.is-on):hover { color: var(--ink); }
.lang__sep { opacity: 0.5; }
.sidebar__domains { font-size: 0.76rem; color: var(--muted); line-height: 1.6; }

/* Barra superior com o nome + legenda — só no telemóvel (display em @media) */
.topbar { display: none; }
.topbar__brand { display: flex; align-items: center; gap: 0.6rem; }
.topbar__id { display: flex; flex-direction: column; gap: 0.25rem; }
.topbar__name {
  font-family: var(--font-display); font-weight: 700;
  font-size: 1.05rem; letter-spacing: -0.02em; color: var(--ink); white-space: nowrap;
}
.topbar__role {
  font-family: var(--font-display); text-transform: uppercase;
  letter-spacing: 0.16em; font-size: 0.62rem; color: var(--muted);
}

/* Botão hambúrguer (mobile) — só usado pelo JS; aparência é a seta da barra */
.sidebar-toggle {
  display: none; position: fixed; top: 1.1rem; right: 1.1rem; z-index: 60;
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(244,244,244,0.85); border: 1px solid var(--line); cursor: pointer;
}
.sidebar-toggle span {
  position: absolute; left: 50%; width: 18px; height: 1.5px; margin-left: -9px;
  background: var(--ink); transition: transform 0.3s ease, opacity 0.3s ease;
}
.sidebar-toggle span:nth-child(1) { top: 18px; }
.sidebar-toggle span:nth-child(2) { bottom: 18px; }
/* Seta para baixo na barra superior (substitui o círculo; abre o menu lateral) */
.topbar__arrow {
  position: static; display: inline-flex; align-items: center; justify-content: center;
  width: auto; height: auto; padding: 0.5rem; margin-right: -0.5rem;
  background: none; border: 0; border-radius: 0; box-shadow: none;
  color: var(--ink); cursor: pointer; transition: transform 0.35s cubic-bezier(0.16,1,0.3,1);
}
.topbar__arrow svg { display: none; }   /* usar o chevron desenhado em CSS */
.topbar__arrow::before {
  content: ""; display: block; width: 13px; height: 13px; margin-top: -5px;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
}
body.menu-open .topbar__arrow { transform: rotate(180deg); }   /* aponta p/ cima quando o menu está aberto */

/* ═══════════════ CONTEÚDO (scroll contínuo) ═══════════════ */
.main {
  position: relative;   /* sem z-index: senão cria stacking context e prende a moldura abaixo da luz */
  margin-left: var(--sidebar);
  padding: 0 var(--gutter);
  display: flex; flex-direction: column;
}

/* Painéis: mostra-se um de cada vez (sem scroll contínuo) */
.section { display: none; padding: clamp(4rem, 8vw, 7rem) 0; animation: fade 0.6s cubic-bezier(0.16,1,0.3,1); }
/* margem esquerda maior nos textos (não encostar à sidebar/borda) */
.section:not(.section--works) { padding-left: clamp(1.25rem, 4vw, 4rem); }
.section.is-active { display: block; }
/* palco dos cubos sem barras brancas: preenche da sidebar à borda direita */
.section.section--works {
  padding: 0;
  width: calc(100vw - var(--sidebar));
  margin-left: calc(-1 * var(--gutter));
}
.section.section--works.is-active { display: block; }

/* Vista dos cubos: bloquear scroll da página + esconder rodapé */
body.lock-scroll { overflow: hidden; }
body.view-works .footer { display: none; }

.section__head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap; margin-bottom: 2.5rem;
}
.section__head h2 {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(2rem, 5vw, 3.4rem); letter-spacing: -0.02em;
}
.section__meta { color: var(--muted); font-size: 0.9rem; }

/* ── Obras: palco 3D (entrada) ── */
.section.section--works { border-top: 0; padding: 0; }
.works3d {
  position: relative;
  z-index: 35;            /* acima da luz global do rato: esta nunca pinta no palco/moldura */
  width: 100%;
  height: 100svh;
  overflow: hidden;
  /* gradiente EM MOVIMENTO — cinza mais escuro com spots escuros que chegam ao tom dos highlights */
  --works-bg:   #9a9a9a;
  --works-base: #929292;
  --blob-a: #232323;  /* spot escuro (= tom do highlight) */
  --blob-b: #adadad;  /* zona mais clara */
  --blob-c: #2a2a2a;  /* spot escuro */
  --blob-d: #a0a0a0;  /* zona clara */
  --blob-e: #1c1c1c;  /* spot mais escuro (~highlight) */
  --works-blur: 46px;
  --works-sat: 1.0;
  background: var(--works-bg);
}
/* texto de fundo do palco — desenhado num ÚNICO canvas 2D (leve). Sobre o gradiente
   (z-2), por baixo da luz/moldura/cubos. */
.works-text-canvas { position: absolute; inset: 0; z-index: 2; pointer-events: none; }

/* camada rotativa: as manchas a mexer-se */
.works3d::before {
  content: ""; position: absolute; inset: -60%; z-index: 0; pointer-events: none;
  background:
    radial-gradient(circle at 28% 30%, var(--blob-a), transparent 54%),
    radial-gradient(circle at 72% 32%, var(--blob-b), transparent 56%),
    radial-gradient(circle at 64% 74%, var(--blob-c), transparent 54%),
    radial-gradient(circle at 24% 70%, var(--blob-d), transparent 56%),
    radial-gradient(circle at 50% 48%, var(--blob-e), transparent 48%);
  background-color: var(--works-base);
  filter: blur(var(--works-blur)) saturate(var(--works-sat));
  animation: bgspin 28s linear infinite;
}
/* luz do rato DENTRO do palco — fica por baixo da moldura (z-31) e dos cubos (z-32),
   por isso só ilumina o interior; recortada pelo overflow:hidden do palco */
.works3d__glow {
  position: absolute; top: 0; left: 0; z-index: 30; pointer-events: none;
  width: 32rem; height: 32rem; margin: -16rem 0 0 -16rem; border-radius: 50%;
  background: radial-gradient(circle, var(--glow-cursor), transparent 62%);
  opacity: 0; transition: opacity 0.4s ease;
}
/* moldura nas margens, na cor da barra lateral; por cima da luz (só ilumina dentro),
   por baixo do canvas (os modelos rodam por cima dela) */
.works3d::after {
  content: ""; position: absolute; inset: clamp(28px, 5.5vh, 64px); z-index: 31; pointer-events: none;
  border-radius: 15px;                    /* curva SÓ no interior */
  box-shadow: 0 0 0 100vmax var(--bg);    /* moldura: enche tudo p/ fora; o palco recorta (cantos do ecrã retos) */
}
@keyframes bgspin {
  0%   { transform: rotate(0deg)   scale(1.35); }
  100% { transform: rotate(360deg) scale(1.35); }
}
#works-canvas {
  display: block; width: 100%; height: 100%;
  position: relative; z-index: 32;   /* acima da moldura: os cubos rodam POR CIMA dela */
  background: transparent;   /* deixa ver o gradiente animado por trás */
}

.works3d__labels { position: absolute; inset: 0; pointer-events: none; }
.works3d__label {
  position: absolute; top: 0; left: 0;
  margin: 0;
  text-align: center;
  white-space: nowrap;
  transform: translate(-50%, 0);
  will-change: transform, opacity;
  transition: opacity 0.3s ease;
}
.works3d__name {
  display: block;
  font-family: var(--font-display);
  font-weight: 500; font-size: 1.2rem; letter-spacing: -0.01em;
}
.works3d__meta { display: block; color: var(--muted); font-size: 0.85rem; margin-top: 0.2rem; }
.works3d__labels { display: none; }   /* só fonte de dados p/ o título/legenda em DOM */

/* "montanha" branca: a moldura de baixo sobe no centro p/ o texto ter fundo branco */
.works3d__hill {
  /* ancorado à linha inferior da moldura; -3px p/ sobrepor a margem e fechar a costura */
  position: absolute; left: 0; bottom: calc(clamp(28px, 5.5vh, 64px) - 3px); width: 100%;
  height: clamp(88px, 16vh, 122px); z-index: 33; pointer-events: none;
  color: var(--bg); display: block;
}
.works3d__hill path { fill: currentColor; }

/* título + legenda da peça da frente — no planalto branco (texto escuro) */
.works3d__nameplate {
  position: absolute; left: 50%; bottom: calc(clamp(28px, 5.5vh, 64px) - 0.2rem);
  transform: translateX(-50%); z-index: 34; pointer-events: none;
  text-align: center; line-height: 1; white-space: nowrap;
  opacity: 0; transition: opacity 0.35s ease;
}
.works3d__title {
  display: block; font-family: var(--font-display); font-weight: 700;
  font-size: clamp(1.3rem, 3.2vw, 2.2rem); letter-spacing: -0.01em; color: var(--ink);
}
.works3d__caption {
  display: block; margin-top: 0.35rem;
  font-family: var(--font-body); text-transform: uppercase;
  letter-spacing: 0.16em; font-size: clamp(0.64rem, 1.3vw, 0.78rem); color: var(--muted);
}
.works3d__hint {
  /* no topo do palco — pill branco p/ ler sobre os marcadores escuros */
  position: absolute; left: 50%; top: calc(clamp(28px, 5.5vh, 64px) + 1rem);
  transform: translateX(-50%); z-index: 33;
  font-family: var(--font-display); font-weight: 500; text-transform: uppercase;
  letter-spacing: 0.16em; font-size: 0.68rem; color: var(--ink); white-space: nowrap;
  background: var(--bg); padding: 0.45rem 1.05rem; border-radius: 999px;
  animation: bob 2.4s ease-in-out infinite;
}
@keyframes bob { 0%,100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 5px); } }
/* abanar lateral (telemóvel: "swipe para rodar") */
@keyframes bob-x { 0%,100% { transform: translate(calc(-50% - 5px), 0); } 50% { transform: translate(calc(-50% + 5px), 0); } }

/* ── Obras: grelha (mantida para uso futuro) ── */
.work__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(1.5rem, 3vw, 3rem); }
.work__media { display: block; overflow: hidden; border-radius: var(--radius); aspect-ratio: 4 / 3; }
.work__media img, .work__media .ph {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.7s cubic-bezier(0.16,1,0.3,1);
}
.work__item:hover .work__media img, .work__item:hover .work__media .ph { transform: scale(1.04); }
.work__caption { margin-top: 1rem; }
.work__caption h3 { font-family: var(--font-display); font-weight: 500; font-size: 1.2rem; letter-spacing: -0.01em; }
.work__caption p { color: var(--muted); font-size: 0.88rem; margin-top: 0.2rem; }
.work__video { position: relative; padding-top: 56.25%; }
.work__video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.ph { background: var(--bg-deep); position: relative; }
.ph::after {
  content: "imagem / vídeo"; position: absolute; inset: 0;
  display: grid; place-items: center; font-family: var(--font-display);
  font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted);
}
.ph--1 { background: linear-gradient(135deg, #e2e2e2, #c2c2c2); }
.ph--2 { background: linear-gradient(135deg, #dbdbdb, #bdbdbd); }
.ph--3 { background: linear-gradient(135deg, #e0e0e0, #c7c7c7); }
.ph--4 { background: linear-gradient(135deg, #dbdbdb, #c0c0c0); }
.ph--portrait { background: linear-gradient(160deg, #e1e1e1, #c7c7c7); aspect-ratio: 3 / 4; }

/* ── Sobre ── */
.about { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.about__portrait { border-radius: var(--radius); overflow: hidden; max-width: 26rem; }
/* ── Cubo 3D (Sobre) — 6 faces com imagens; roda com o rato; clicar desdobra numa planta ── */
.about__cube-stage {
  position: relative; width: 100%; max-width: 27rem; aspect-ratio: 1; margin-inline: auto;
  display: flex; align-items: center; justify-content: center;
  perspective: 900px; cursor: default; -webkit-tap-highlight-color: transparent;
}
.about__cube {
  --cube-size: clamp(150px, 22vw, 200px);
  position: relative; width: var(--cube-size); height: var(--cube-size);
  transform-style: preserve-3d; will-change: transform;
}
/* pivot para centrar o cubo; faces aninhadas (dobradiças) — transforms geridos no main.js */
.cube__pivot { position: absolute; inset: 0; transform-style: preserve-3d; }
.cube__face {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  transform-style: preserve-3d; backface-visibility: hidden;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  transition: transform 0.9s cubic-bezier(0.62, 0, 0.2, 1);
}
.cube__face img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
/* abas de "colar" nas arestas livres — uma por aresta do cubo. Transparentes,
   contorno tracejado azul. Só visíveis desdobrado. */
.cube__tab {
  position: absolute; pointer-events: none;
  opacity: 0; transition: opacity 0.45s ease;
}
.about__cube.is-open .cube__tab { opacity: 1; }
.cube__tab svg { width: 100%; height: 100%; display: block; overflow: visible; }
.cube__tab polygon {
  fill: none; stroke: #111; stroke-width: 1.6;
  stroke-dasharray: 13 5; stroke-linecap: butt; vector-effect: non-scaling-stroke;
}
.cube__tab--N { left: 0; top: -19%;  width: 100%; height: 19%; }
.cube__tab--S { left: 0; top: 100%;  width: 100%; height: 19%; }
.cube__tab--E { top: 0; left: 100%;  width: 19%; height: 100%; }
.cube__tab--W { top: 0; left: -19%;  width: 19%; height: 100%; }
.about__text p { max-width: 56ch; margin-bottom: 1.1rem; color: #38362e; font-size: 1.05rem; }
.link-underline {
  display: inline-block; margin-top: 1rem; font-family: var(--font-display);
  border-bottom: 1px solid var(--ink); padding-bottom: 2px;
  transition: color 0.3s ease, border-color 0.3s ease;
}
/* títulos das obras na bio — links; tudo clicável no "Sobre" fica azul no hover */
.bio-link { color: inherit; text-decoration: none; cursor: pointer; transition: color 0.2s ease; }
@media (hover: hover) {
  .link-underline:hover { color: var(--accent-blue); border-color: var(--accent-blue); }
  .bio-link:hover { color: var(--accent-blue); }
}

/* ── Experiências (timeline) ── */
.timeline { list-style: none; display: flex; flex-direction: column; }
.timeline__item {
  display: grid; grid-template-columns: 6rem 1fr; gap: 1.5rem;
  padding: 1.5rem 0; border-bottom: 1px solid var(--line);
}
.timeline__item:first-child { border-top: 1px solid var(--line); }
.timeline__year { font-family: var(--font-display); color: var(--accent); font-size: 1.05rem; }
.timeline__body h3 { font-family: var(--font-display); font-weight: 500; font-size: 1.15rem; }
.timeline__body p { color: var(--muted); margin-top: 0.25rem; }

/* ── Ongoing ── */
.ongoing__item { max-width: 60ch; }
.ongoing__item h3 { font-family: var(--font-display); font-weight: 500; font-size: 1.4rem; margin-bottom: 0.6rem; }
.ongoing__item p { color: #38362e; }

/* ── Área privada ── */
.gate { max-width: 28rem; }
.gate__label { color: var(--muted); margin-bottom: 1rem; }
.gate__row { display: flex; gap: 0.6rem; }
.gate input {
  flex: 1; font-family: var(--font-body); font-size: 1rem; padding: 0.8rem 1rem;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: rgba(255,255,255,0.5); color: var(--ink);
}
.gate input:focus { outline: none; border-color: var(--accent); }
.gate button {
  font-family: var(--font-display); font-size: 0.95rem; cursor: pointer;
  padding: 0.8rem 1.4rem; border: 0; border-radius: var(--radius);
  background: var(--ink); color: var(--bg); transition: background 0.3s ease;
}
.gate button:hover { background: var(--accent); }
.gate__error { color: var(--accent); margin-top: 0.8rem; font-size: 0.9rem; }
.private { max-width: 60ch; animation: fade 0.6s ease; }
.private p { color: #38362e; }
@keyframes fade { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* email no "Sobre" — a seguir à bio (com um parágrafo de intervalo) */
.about__email {
  display: block; width: fit-content; margin-top: 1.6rem;
  font-size: 0.92rem; color: var(--muted);
  text-decoration: none; transition: color 0.2s ease;
}
.about__cv { margin-top: 3.6rem; }   /* "Descarregar CV" a seguir à bio, com intervalo */
.about__refslink { display: block; width: fit-content; margin-top: 0.7rem; font-size: 0.88rem; }   /* logo por baixo do CV, um pouco menor */
@media (hover: hover) { .about__email:hover { color: var(--accent-blue); } }

/* vista "Sobre": conteúdo centrado verticalmente e sem rodapé */
body:has(#sobre.is-active) .footer { display: none; }
@media (min-width: 861px) {
  #sobre.is-active {
    min-height: 100vh; box-sizing: border-box;
    display: flex; align-items: center;
    padding-top: 0; padding-bottom: 0;
  }
}

/* ── Explorações — cilindro 3D em WebGL (Three.js, explor3d.js) ──
   Ocupa todo o ecrã (100svh, full-bleed); as miniaturas são malhas curvas. */
/* full-bleed: contorna o padding lateral do .main p/ o canvas encostar à sidebar (esq.) e à borda (dir.) */
.section.section--explor {
  padding: 0; overflow: hidden;
  width: calc(100vw - var(--sidebar));
  margin-left: calc(-1 * var(--gutter));
}
.explor { height: 100svh; position: relative; }
.explor3d-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  display: block; cursor: default;
}
/* sobre uma miniatura, esconde o cursor normal → aparece só o pill azul personalizado */
.explor3d-canvas.is-hovering { cursor: none; }
/* filtro por categoria — coluna no canto inferior direito */
.explor-cats {
  position: absolute; z-index: 6;
  right: clamp(1.1rem, 2.6vw, 2.6rem);
  bottom: clamp(1.1rem, 4vh, 2.6rem);
  display: flex; flex-direction: column; align-items: flex-end; gap: 0.45rem;
}
.explor-cats__item {
  font-family: var(--font-body); font-size: 0.82rem; line-height: 1.2;
  color: var(--muted); background: none; border: 0; padding: 0.1rem 0;
  cursor: pointer; text-align: right; transition: color 0.25s ease;
}
.explor-cats__item:hover { color: var(--ink); }
.explor-cats__item.is-on { color: var(--accent-blue); font-weight: 500; }
/* cursor personalizado — pill azul com o tipo de trabalho, segue o rato sobre as miniaturas */
.explor-cursor {
  position: fixed; left: 0; top: 0; z-index: 200; pointer-events: none;
  /* mesmo tamanho do pill das obras (.cursor-tag) → os 15px de raio formam um pill perfeito */
  padding: 0.55rem 1.1rem; border-radius: 15px; white-space: nowrap;
  background: var(--accent-blue); color: #fff;
  font-family: var(--font-body); font-size: 0.68rem; font-weight: 500; line-height: 1;
  text-transform: uppercase; letter-spacing: 0.14em;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
  opacity: 0; transition: opacity 0.16s ease;
  will-change: transform;
}
.explor-cursor.is-on { opacity: 1; }
@media (hover: none) { .explor-cursor { display: none; } .explor__item { cursor: pointer; } }

/* ── Página individual de exploração ── */
.explor-page { max-width: 900px; margin: 2.4rem 0 0; }
.explor-page__media { position: relative; margin: 0 0 1.4rem; }
.explor-page__media img { width: 100%; height: auto; display: block; border-radius: 15px; }
/* PILL de liquid glass no fundo da imagem (texto branco por defeito) */
.explor-page__pill {
  position: absolute; left: 1.1rem; right: 1.1rem; bottom: 1.1rem;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 1.2rem;
  padding: 0.95rem 1.6rem; border-radius: 15px;
  color: #fff;
  background: rgba(244, 244, 244, 0.16);
  -webkit-backdrop-filter: blur(16px) saturate(1.5);
          backdrop-filter: blur(16px) saturate(1.5);
  border: 1px solid rgba(255, 255, 255, 0.45);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), 0 10px 28px rgba(0, 0, 0, 0.16);
}
.explor-page__pill-title {
  margin: 0; font-family: "Space Grotesk", sans-serif; font-weight: 600;
  font-size: clamp(1rem, 2.2vw, 1.3rem); line-height: 1.35; white-space: pre-line;
}
.explor-page__pill-year { flex: none; font-family: var(--font-body); font-size: 0.92rem; opacity: 0.9; }
.explor-page__pill--dark { color: var(--ink); }   /* imagens claras: branco não teria contraste */
.explor-page__note {
  font-family: var(--font-body); font-size: 0.95rem; line-height: 1.7;
  color: var(--muted); max-width: 60ch;
}

/* ── Referências (secção Sobre) — lista por data ── */
.about__refs { grid-column: 1 / -1; margin: clamp(3rem, 8vh, 5rem) 0 0; }
.about__refs h2 {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(1.15rem, 1.7vw, 1.5rem); letter-spacing: -0.01em; margin: 0 0 1.5rem;
}
.ref-list { display: flex; flex-direction: column; gap: 0.7rem; max-width: 64rem; }
.ref {
  display: grid; grid-template-columns: 5.4rem 1fr; gap: 0.15rem 1.1rem;
  align-items: baseline; font-family: var(--font-body); font-size: 0.86rem; line-height: 1.45;
}
.ref__date { color: var(--muted); font-size: 0.72rem; letter-spacing: 0.02em; white-space: nowrap; }
.ref a { color: var(--ink); border-bottom: 1px solid var(--line); transition: color 0.2s ease, border-color 0.2s ease; }
.ref a:hover { color: var(--accent-blue); border-color: var(--accent-blue); }
.ref__note { color: var(--muted); }
.ref__genre { font-style: italic; }
.ref__copy { margin-left: 0.5rem; font-size: 0.72rem; color: var(--muted); border-bottom: 1px dotted var(--line); white-space: nowrap; }
.ref__copy:hover { color: var(--accent-blue); border-color: var(--accent-blue); }
@media (max-width: 860px) { .ref { grid-template-columns: 1fr; gap: 0; } }
/* página de Referências (referencias.html) */
.refs-note { color: var(--muted); font-size: 0.82rem; line-height: 1.6; margin: 0 0 clamp(1.5rem, 4vh, 2.4rem); max-width: 62ch; }
/* ecrã cheio SEM scroll — lista em 2 colunas compactas */
body.refs-page { overflow: hidden; }
.refs-page .main {
  height: 100svh; box-sizing: border-box; justify-content: flex-start;
  padding-top: clamp(1rem, 2.5vh, 2rem); padding-bottom: clamp(0.6rem, 1.5vh, 1.2rem);
}
.refs-page .obra { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.refs-page .about__refs { margin-top: clamp(0.4rem, 1.5vh, 1rem); }
.refs-page .about__refs h2 { margin-bottom: 0.4rem; }
.refs-page .refs-note { margin-bottom: clamp(1.4rem, 3.5vh, 2.2rem); }
.refs-page .ref-list { display: block; max-width: none; columns: 2; column-gap: clamp(2rem, 4vw, 4rem); }
.refs-page .ref { break-inside: avoid; font-size: 0.78rem; line-height: 1.25; margin: 0 0 0.72rem; grid-template-columns: 5rem 1fr; align-items: start; }
.refs-page .ref__date { font-size: 0.72rem; line-height: 1.25; }   /* mesmo line-height → alinha com a 1.ª linha */
@media (max-width: 860px) { .refs-page .ref-list { columns: 1; } }
@media (max-width: 860px) {
  body.refs-page { overflow: auto; }
  .refs-page .main { height: auto; }
  .refs-page .ref-list { columns: 1; }
}

/* ── Rodapé ── */
.footer {
  padding: 2.5rem 0 3rem;
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  font-size: 0.82rem; color: var(--muted); border-top: 1px solid var(--line);
}
.footer a:hover { color: var(--ink); }

/* ── Animações de entrada ── */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.9s cubic-bezier(0.16,1,0.3,1), transform 0.9s cubic-bezier(0.16,1,0.3,1); }
.reveal.is-visible { opacity: 1; transform: none; }

/* ══════════ Página de obra — texto + media enquadrada (raio 10) ══════════ */
.obra { --media-radius: 15px; padding: clamp(0.6rem, 2vh, 1.2rem) 0 clamp(0.9rem, 2.5vh, 1.8rem); max-width: 1160px; }
.obra__back {
  display: inline-block; margin: clamp(0.5rem, 1.6vh, 1rem) 0 clamp(0.7rem, 2vh, 1.2rem);
  font-family: var(--font-body); font-size: 0.72rem; letter-spacing: 0.1em;
  color: var(--muted); text-decoration: none; transition: color 0.2s;
}
@media (hover: hover) { .obra__back:hover { color: var(--ink); } }

/* texto legível */
.obra__wrap { max-width: 60ch; }
.obra__wrap p { line-height: 1.8; }
.obra__wrap p + p { margin-top: 1.3rem; }

/* ── Cabeçalho compacto (título + meta numa linha só) ── */
.obra__head {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.4rem 1.2rem;
  margin-bottom: clamp(0.6rem, 2vh, 1.1rem);
}
.obra__title {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(1.7rem, 4vw, 2.6rem); line-height: 1; letter-spacing: -0.02em;
}
.obra__meta {
  font-family: var(--font-body);
  text-transform: uppercase; letter-spacing: 0.16em; font-size: clamp(0.62rem, 1.3vw, 0.72rem); color: var(--muted);
}

/* ── Vídeo em destaque — logo no topo, enquadrado raio 10 ── */
.obra__videoblock { margin: 0 0 clamp(2rem, 6vh, 3rem); }

/* ── Texto conciso (bloco único, citação inline) ── */
.obra__text { max-width: 64ch; margin: 0 0 clamp(2rem, 6vh, 3rem); }
.obra__text p { line-height: 1.6; }
.obra__text p + p { margin-top: 0.85rem; }
.obra__accent { font-family: var(--font-display); font-weight: 500; font-style: normal; letter-spacing: -0.01em; }
/* epígrafe / citação e créditos (usado nas páginas de obra) */
.obra__quote { font-style: italic; color: var(--muted); border-left: 2px solid var(--accent-blue); padding-left: 1rem; margin: 0 0 1.3rem; line-height: 1.55; }
.obra__cite { display: block; font-style: normal; font-family: var(--font-body); text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.66rem; margin-top: 0.6rem; color: var(--muted); }
.obra__credit { margin-top: 1.5rem !important; font-size: 0.82rem; color: var(--muted); }
/* apoios (créditos de produção/construção) — em parágrafos, com logo */
.obra__supports { margin-top: 1.6rem; font-size: 0.82rem; color: var(--muted); line-height: 1.5; }
.obra__support { display: flex; align-items: center; gap: 0.7rem; margin: 0 0 0.5rem; }
.obra__support-logo { height: 5rem; width: auto; display: block; }
.obra__support-text { margin: 0; }
/* nota de programação por baixo da ficha técnica (tira de dados) */
.obra__prog { margin: 0.75rem 0 0; font-size: 0.72rem; color: var(--muted); line-height: 1.5; }
/* variante: a linha de separação passa para DEPOIS da nota de programação */
.obra__data.obra__data--open { border-bottom: 0; padding-bottom: 0; }
.obra__prog--sep { margin-top: 1.85rem; padding-bottom: 1.1rem; border-bottom: 1px solid var(--line); }

/* ── Layout: vídeo (maior) + data por baixo | texto ao lado ── */
.obra__split {
  display: grid; grid-template-columns: minmax(0, 1.9fr) 1fr;
  gap: clamp(1.5rem, 3.5vw, 3.5rem); align-items: start;
  margin-bottom: clamp(2.2rem, 6vh, 4rem);
}
.obra__split .obra__col { min-width: 0; }
.obra__split .obra__videoblock { margin: 0; }
.obra__split .obra__data { margin: clamp(0.8rem, 2.5vh, 1.4rem) 0 0; }
.obra__split .obra__text { margin: 0; max-width: none; }

/* ── Podcast (Spotify) — barra na coluna do vídeo, por baixo da ficha ── */
.obra__audio { margin-top: clamp(0.6rem, 1.8vh, 1rem); }
.obra__audio-label {
  display: block; font-family: var(--font-body); font-weight: 500; text-transform: uppercase;
  letter-spacing: 0.16em; font-size: 0.68rem; color: var(--muted); margin-bottom: 0.5rem;
}
/* barra custom (controla o embed do Spotify por baixo, via IFrame API) */
.spot {
  position: relative; overflow: hidden;
  display: flex; align-items: center; gap: clamp(0.7rem, 1.6vw, 1.1rem);
  background: var(--bg); color: var(--ink); border: 1px solid var(--line);
  border-radius: var(--media-radius); padding: 0.7rem 0.9rem;
  transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}
.spot__toggle, .spot__body, .spot__logo, .spot__time { position: relative; z-index: 1; }
.spot__embed { position: absolute; inset: 0; opacity: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.spot__embed iframe { width: 100%; height: 100%; border: 0; }
.spot__toggle {
  flex: none; font-family: var(--font-body); font-weight: 500; text-transform: uppercase;
  letter-spacing: 0.14em; font-size: 0.7rem; line-height: 1; cursor: pointer;
  padding: 0.5rem 1.1rem; border-radius: 999px;
  background: transparent; border: 1px solid var(--line); color: var(--ink);
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.spot__toggle:hover { background: var(--accent-blue); border-color: var(--accent-blue); color: #fff; }
.spot__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.spot__title {
  font-family: var(--font-body); font-size: 0.72rem; color: inherit;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.spot__bar {
  position: relative; height: 4px; border-radius: 999px;
  background: rgba(18,18,18,0.16); cursor: pointer;
}
.spot__bar::before { content: ""; position: absolute; inset: -9px 0; }  /* área de clique maior */
.spot__fill {
  position: absolute; left: 0; top: 0; height: 100%; width: 0%;
  background: var(--accent-blue); border-radius: 999px; pointer-events: none;
}
.spot__logo { flex: none; display: inline-flex; align-items: center; color: inherit; transition: transform 0.2s; }
.spot__logo:hover { transform: scale(1.12); }
.spot__logo svg { width: 24px; height: 24px; display: block; fill: currentColor; }
/* contador de tempo à direita da barra (em vez do logo) */
.spot__time { flex: none; font-family: var(--font-body); font-size: 0.66rem; letter-spacing: 0.04em; color: inherit; opacity: 0.8; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* estado a tocar: barra azul, conteúdo branco */
.spot.is-playing { background: var(--accent-blue); color: #fff; border-color: var(--accent-blue); }
.spot.is-playing .spot__toggle { border-color: rgba(255,255,255,0.55); color: #fff; }
.spot.is-playing .spot__toggle:hover { background: #fff; border-color: #fff; color: var(--accent-blue); }
.spot.is-playing .spot__bar { background: rgba(255,255,255,0.35); }
.spot.is-playing .spot__fill { background: #fff; }

/* ── Tira de dados técnica ── */
.obra__data {
  display: flex; flex-wrap: wrap; gap: 0.35rem 2.4rem;
  margin: 0 0 clamp(1.4rem, 4vh, 2rem); padding-bottom: 1.1rem;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-body); font-size: 0.72rem; color: var(--muted); line-height: 1.5;
}
.obra__data b { color: var(--ink); font-weight: 500; letter-spacing: 0.08em; margin-right: 0.6rem; }
.obra__video {
  position: relative; aspect-ratio: 16 / 9; overflow: hidden;
  border-radius: var(--media-radius); background: #0a0a0a; will-change: transform;
  max-height: 56vh; margin-inline: auto;
}
.obra__video iframe, .obra__video video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
/* palco do Psi Psi Psi — canvas p5.js (sketch da bolsa), 16:9 como o vídeo */
.psi-stage {
  position: relative; aspect-ratio: 16 / 9; overflow: hidden;
  border-radius: var(--media-radius); background: #000; margin-inline: auto; max-height: 56vh;
}
.psi-stage canvas { position: absolute; inset: 0; width: 100% !important; height: 100% !important; display: block; }
/* poster próprio do vídeo YouTube — esconde a marca do YouTube quando parado/pausado */
.yt-poster {
  position: absolute; inset: 0; z-index: 2; cursor: pointer;
  background: #0a0a0a center / cover no-repeat;
  transition: opacity 0.4s ease;
}
.yt-poster.is-hidden { opacity: 0; pointer-events: none; }
/* (sem botão de play no poster — o cursor diz "PLAY" ao passar o rato) */
/* máscara preta do arranque — tapa o vídeo/marca do YouTube nos 1ºs segundos, mas POR BAIXO
   dos controlos (z1: acima do iframe, abaixo da barra/contador/progresso z2) → parece que é
   o próprio vídeo que está preto, com os botões por cima. */
.yt-startmask { position: absolute; inset: 0; z-index: 1; background: #000; opacity: 0; pointer-events: none; }

/* MODO CROP — o iframe tem a proporção "frame" (ex. 3:2), maior que a "view" (2.35); recortamos
   o topo/fundo (onde o YouTube põe título/logo) e mostramos só a faixa central. Player 2.35
   limpo, sem barras nem info do YouTube — mesmo em pausa. */
.obra__video.yt-crop { overflow: hidden; }
.obra__video.yt-crop iframe { inset: auto; top: var(--yt-top); left: 0; width: 100%; height: var(--yt-h); }
/* em ECRÃ INTEIRO o crop desliga-se (vídeo natural) e entram as barras falsas (ver .yt-bar) */
.obra__video.yt-crop:fullscreen iframe { inset: 0; top: 0; height: 100%; }

/* barras pretas falsas — só visíveis em ecrã inteiro (tapam o logo/título do YT ao pausar) */
.yt-bar { position: absolute; left: 0; right: 0; z-index: 1; background: #000; pointer-events: none; display: none; }
.obra__video:fullscreen .yt-bar { display: block; }
.yt-bar--top { top: 0; }
.yt-bar--bottom { bottom: 0; }

/* vídeo das explorações: MAIOR e ligeiramente magnético (transição suave do transform) */
/* vídeo o mais largo possível; título encostado à margem direita (coluna estreita) */
.obra__split--bigvideo {
  grid-template-columns: minmax(0, 1fr) clamp(13rem, 20vw, 19rem);
  gap: clamp(2.4rem, 5vw, 5rem);          /* mais espaço antes do título */
  align-items: start;                     /* topo do título alinhado com o topo do vídeo */
  margin-right: calc(1.2rem - var(--gutter));   /* estende p/ a direita → vídeo maior */
}
.obra__split--bigvideo .obra__col--text { text-align: left; }   /* título, legenda e ficha à esquerda */
/* sinopse (por baixo do vídeo) — à MESMA largura do vídeo (mesma grelha do split) */
.explor-info {
  margin-top: clamp(2rem, 5vh, 3.5rem);
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(13rem, 20vw, 19rem);
  gap: clamp(2.4rem, 5vw, 5rem);
  margin-right: calc(1.2rem - var(--gutter));   /* fim alinhado com o do vídeo */
}
.explor-info__synopsis p { font-family: var(--font-body); font-size: 1rem; line-height: 1.75; margin: 0 0 1.1rem; }
/* ficha técnica por categoria: label (pequeno, em caixa alta) + valor a negrito */
.explor-credits { margin: 1.5rem 0 0; display: flex; flex-direction: column; gap: 0.85rem; }
.explor-credits__row dt { font-family: var(--font-body); font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.13em; color: var(--muted); margin-bottom: 0.18rem; }
.explor-credits__row dd { margin: 0; font-family: var(--font-body); font-size: 0.86rem; font-weight: 500; color: var(--ink); }
.explor-credits__note { margin: 1.3rem 0 0; font-family: var(--font-body); font-size: 0.72rem; line-height: 1.6; color: var(--muted); }
.obra__video:has(.yt-poster) { max-height: 82vh; }   /* amortecimento do magnético é feito em JS (rAF) */
.obra__video:fullscreen { max-height: none; aspect-ratio: auto; width: 100%; height: 100%; border-radius: 0; transform: none !important; }
.obra__video:-webkit-full-screen { max-height: none; aspect-ratio: auto; width: 100%; height: 100%; transform: none !important; }

/* contador de tempo + bolinha na barra de progresso + botão de ecrã inteiro */
.vtime {
  position: absolute; right: clamp(0.9rem, 3%, 1.6rem); bottom: clamp(1.9rem, 5vh, 2.9rem); z-index: 2;
  font-family: var(--font-body); font-size: 0.72rem; letter-spacing: 0.08em; color: #f2f2f2;
  white-space: nowrap; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
  opacity: 0; visibility: hidden; transition: opacity 0.25s, visibility 0.25s;
}
.vtime.is-on { opacity: 1; visibility: visible; }
.vfull { display: inline-flex; align-items: center; justify-content: center; padding: 0.5rem 0.6rem; }
.vfull svg { display: block; }
/* menu de qualidade (HD) */
.vquality {
  position: absolute; top: clamp(3rem, 8vh, 4rem); left: clamp(0.8rem, 3%, 1.6rem); z-index: 4;
  display: flex; flex-direction: column; min-width: 5.2rem; overflow: hidden;
  background: rgba(10, 10, 10, 0.72); border: 1px solid rgba(242, 242, 242, 0.28); border-radius: 12px;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.vquality__opt {
  font-family: var(--font-body); font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: #f2f2f2; background: none; border: 0; cursor: pointer; text-align: left;
  padding: 0.5rem 0.9rem; transition: background 0.15s, color 0.15s;
}
@media (hover: hover) { .vquality__opt:hover { background: var(--accent-blue); color: #fff; } }
.vquality__opt.is-cur { color: var(--accent-blue); }
.vprogress__knob {
  position: absolute; bottom: 50%; left: 0; transform: translate(-50%, 50%);
  width: 12px; height: 12px; border-radius: 50%; background: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(0, 55, 255, 0.25); pointer-events: none;
}
/* scrubber flutuante (afastado das bordas) só no vídeo das explorações, p/ a bolinha caber */
.obra__video:has(.yt-poster) .vprogress {
  left: clamp(0.9rem, 3%, 1.6rem); right: clamp(0.9rem, 3%, 1.6rem);
  bottom: clamp(1rem, 3.2vh, 1.6rem); height: 4px; border-radius: 999px;
  background: rgba(242, 242, 242, 0.3);
}
.obra__video:has(.yt-poster) .vprogress__fill { border-radius: 999px; }

/* botões custom do vídeo (accent azul elétrico) */
.vbtn {
  font-family: var(--font-body); font-weight: 500; text-transform: uppercase;
  letter-spacing: 0.14em; font-size: 0.72rem; color: #f2f2f2; cursor: pointer;
  background: rgba(10,10,10,0.55); border: 1px solid rgba(242,242,242,0.35);
  border-radius: 999px; padding: 0.5rem 1.1rem; line-height: 1;
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.2s;
}
@media (hover: hover) { .vbtn:hover { background: var(--accent-blue); border-color: var(--accent-blue); color: #fff; } }
/* estado ativo (ex.: "Play" em pausa, "Som" em mute) — azul */
.vbtn.is-blue { background: var(--accent-blue); border-color: var(--accent-blue); color: #fff; }

/* zona de clique do vídeo (inicia/pausa) */
.vhit { position: absolute; inset: 0; z-index: 1; }

/* botão "Ver vídeo" — só no telemóvel (no desktop usa-se o cursor) */
.vwatch {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  z-index: 2; display: none; padding: 0.7rem 1.5rem; font-size: 0.8rem;
}

/* cursor personalizado — retângulo que segue o rato */
.cursor-tag {
  position: fixed; top: 0; left: 0; z-index: 300; pointer-events: none;
  background: var(--accent-blue); color: #fff;
  font-family: var(--font-body); font-weight: 500; text-transform: uppercase;
  letter-spacing: 0.14em; font-size: 0.68rem; line-height: 1;
  padding: 0.55rem 1.1rem; border-radius: 999px; white-space: nowrap;
  opacity: 0; transition: opacity 0.15s ease; will-change: transform;
}
.cursor-tag.is-on { opacity: 1; }
.vbar {
  position: absolute; top: clamp(0.8rem, 2.5vh, 1.4rem); left: clamp(0.8rem, 3%, 1.6rem); z-index: 2;
  display: flex; align-items: center; gap: clamp(0.5rem, 1.5vw, 0.9rem);
  opacity: 0; visibility: hidden; transition: opacity 0.25s, visibility 0.25s;
}
.vbar.is-on { opacity: 1; visibility: visible; }

/* time bar — progresso encostado ao fundo, sem bola, clicável (seek) */
.vprogress {
  position: absolute; left: 0; right: 0; bottom: 0; height: 4px; z-index: 2;
  background: rgba(242,242,242,0.22); cursor: pointer;
  opacity: 0; visibility: hidden; transition: opacity 0.25s, visibility 0.25s;
}
.vprogress::before { content: ""; position: absolute; inset: -10px 0 0; }  /* área de clique maior */
.vprogress.is-on { opacity: 1; visibility: visible; }
.vprogress__fill {
  position: absolute; left: 0; top: 0; height: 100%; width: 0%; background: var(--accent-blue);
  pointer-events: none;
}

/* ── Imagens pequenas (enquadradas raio 10, ampliáveis) ── */
.obra__thumbs {
  margin: 0;
  display: grid; grid-template-columns: repeat(7, 1fr); gap: clamp(0.5rem, 1.2vw, 0.9rem);
}
.obra__thumbs figure {
  position: relative; margin: 0; aspect-ratio: 4 / 3; overflow: hidden;
  border-radius: var(--media-radius); background: var(--bg-deep);
}
.obra__thumbs img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform 0.5s cubic-bezier(0.16,1,0.3,1), filter 0.3s; filter: grayscale(0.08);
}
.obra__thumbs figure:hover img { transform: scale(1.04); filter: grayscale(0) brightness(0.85); }
/* variante SÉRIE FOTOGRÁFICA — masonry que respeita o rácio de cada foto (analógico) */
.obra__thumbs--photos {
  display: block; columns: 19rem; column-gap: clamp(0.6rem, 1.4vw, 1rem);
}
.obra__thumbs--photos figure {
  aspect-ratio: auto; break-inside: avoid;
  margin: 0 0 clamp(0.6rem, 1.4vw, 1rem); cursor: pointer;
}
.obra__thumbs--photos img { height: auto; object-fit: contain; }

/* ── Layout fotos-à-esquerda / ficha+texto-à-direita (haiku exp-1, janela):
   .photo-featured = fotos em destaque empilhadas; .photo-mini = miniaturas ── */
.photo-featured {
  display: flex; flex-direction: column; gap: clamp(0.9rem, 1.8vw, 1.4rem);
}
.photo-featured figure { aspect-ratio: auto; margin: 0; cursor: pointer; }
.photo-featured img { height: auto; object-fit: contain; }
.photo-mini {
  margin-top: clamp(0.9rem, 1.8vw, 1.4rem);
  grid-template-columns: repeat(3, 1fr); gap: clamp(0.5rem, 1.1vw, 0.8rem);
}
.photo-mini figure { aspect-ratio: 16 / 9; cursor: pointer; }
/* texto (direita) acompanha o scroll das fotos */
.obra__col--sidetext { position: sticky; top: clamp(1.4rem, 5vh, 3rem); }
/* título mais contido para o haiku caber linha a linha, sem partir "separa-me" */
.obra__split--sidetext .obra__title {
  font-size: clamp(1.4rem, 2.3vw, 1.95rem); line-height: 1.08;
  overflow-wrap: normal; word-break: keep-all; hyphens: none;
}
.obra__col--sidetext .explor-info__synopsis { margin-top: clamp(1.1rem, 3vh, 1.8rem); }
@media (max-width: 860px) {
  .obra__col--sidetext { position: static; }
}
/* cabeçalho da partitura (ex.: "Peça Janela") dentro da sinopse */
.explor-info__synopsis .explor-info__heading {
  font-family: var(--font-display); font-weight: 700; font-size: 1.02rem;
  letter-spacing: -0.01em; margin-bottom: 0.5rem;
}
/* lista de instruções / partitura (ex.: janela) dentro da sinopse */
.explor-info__synopsis .explor-steps { margin: 0.4rem 0 0.9rem; padding-left: 1.15rem; list-style: disc; }
.explor-info__synopsis .explor-steps li { margin-bottom: 0.55rem; padding-left: 0.15rem; }
.explor-info__synopsis .explor-steps li::marker { color: var(--muted); }

/* ── Lightbox (ampliar imagens) ── */
.lightbox {
  position: fixed; inset: 0; z-index: 200; background: rgba(8,8,8,0.95);
  display: none; align-items: center; justify-content: center; padding: 3vw;
  cursor: zoom-out; opacity: 0; transition: opacity 0.25s ease;
}
.lightbox.is-open { display: flex; opacity: 1; }
.lightbox img { max-width: 95vw; max-height: 92vh; object-fit: contain; border-radius: 15px; box-shadow: 0 30px 80px rgba(0,0,0,0.5); }
.lightbox__close {
  position: absolute; top: clamp(1rem, 3vw, 2rem); right: clamp(1rem, 3vw, 2rem);
  width: 44px; height: 44px; border: 0; background: transparent; color: #f2f2f2;
  font-size: 1.6rem; cursor: pointer; line-height: 1;
}
.lightbox__nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 1;
  width: clamp(44px, 6vw, 60px); height: clamp(44px, 6vw, 60px); border-radius: 50%;
  border: 1px solid rgba(242,242,242,0.35); background: rgba(10,10,10,0.4); color: #f2f2f2;
  display: grid; place-items: center; cursor: pointer; font-size: 1.3rem; line-height: 1;
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}
.lightbox__nav:hover { background: var(--accent-blue); border-color: var(--accent-blue); }
.lightbox__nav--prev { left: clamp(0.8rem, 3vw, 2.5rem); }
.lightbox__nav--next { right: clamp(0.8rem, 3vw, 2.5rem); }
.lightbox__nav--prev:hover { transform: translateY(-50%) translateX(-2px); }
.lightbox__nav--next:hover { transform: translateY(-50%) translateX(2px); }
/* legenda/aviso opcional por imagem (ex.: qualidade da digitalização) */
.lightbox__note {
  position: absolute; left: 50%; bottom: clamp(0.8rem, 3vh, 1.8rem); transform: translateX(-50%);
  margin: 0; max-width: min(90vw, 46rem); text-align: center;
  font-family: var(--font-body); font-size: clamp(0.66rem, 1.5vw, 0.76rem); line-height: 1.4;
  letter-spacing: 0.01em; color: rgba(242,242,242,0.82);
  background: rgba(10,10,10,0.55); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  padding: 0.5rem 0.9rem; border-radius: 10px; cursor: default;
}
.lightbox__note[hidden] { display: none; }

/* ecrãs baixos (desktop): compacta para caber tudo sem scroll */
@media (min-width: 861px) and (max-height: 850px) {
  .obra__text p { font-size: 0.9rem; line-height: 1.5; }
  .obra__video { max-height: 39vh; }
  .obra__split { gap: clamp(1rem, 2.5vw, 2rem); margin-bottom: clamp(1.1rem, 3vh, 1.8rem); }
  .obra__data { font-size: 0.68rem; }
  .obra__audio { margin-top: clamp(0.45rem, 1.4vh, 0.85rem); }
  .obra__audio-label { margin-bottom: 0.35rem; }
}

/* ═══════════════ RESPONSIVO ═══════════════ */
@media (max-width: 860px) {
  .sidebar-toggle { display: block; }
  /* barra superior fixa com o nome (sobre o palco, abaixo da sidebar/menu) */
  .topbar {
    display: flex; align-items: center; justify-content: space-between;
    position: fixed; top: 0; left: 0; right: 0; z-index: 38;
    height: 5rem; padding: 0 1.4rem;   /* barra mais grossa */
    background: var(--bg);   /* opaco (sem blur por frame = mais leve) */
    border-bottom-left-radius: 15px; border-bottom-right-radius: 15px;   /* coesão c/ a moldura do PC */
  }
  .topbar__name { font-size: 1.2rem; }
  /* no telemóvel: sidebar opaca (o texto agora é canvas leve, fica ligado) */
  .sidebar { background: var(--bg); backdrop-filter: none; -webkit-backdrop-filter: none; }
  .sidebar {
    width: min(80vw, 320px); transform: translateX(-100%);
    transition: transform 0.5s cubic-bezier(0.16,1,0.3,1);
  }
  .sidebar.is-open { transform: none; }
  .main { margin-left: 0; padding-top: 5rem; }
  .section { scroll-margin-top: 5.5rem; }
  /* palco dos cubos a ecrã inteiro (sem barras brancas laterais nem topo) */
  .section.section--works {
    width: 100vw;
    margin-left: calc(-1 * var(--gutter));
    margin-top: -5rem;
  }
  .works3d::after { box-shadow: none; inset: 0; }   /* sem moldura no telemóvel */
  /* no telemóvel: sem planalto; título+legenda num pill; hint "swipe" mais para baixo */
  .works3d__hill { display: none; }
  .works3d__nameplate {
    background: var(--bg); border-radius: 999px; padding: 0.6rem 1.35rem;
    bottom: 1.7rem; line-height: 1.05;
  }
  .works3d__nameplate .works3d__caption { margin-top: 0.25rem; }
  .works3d__hint { animation-name: bob-x; top: auto; bottom: 6.5rem; }   /* pill "swipe" mais para baixo */
  /* vídeo estático + botão "Ver vídeo" visível quando parado (sem cursor no toque) */
  .obra__video:not(.is-playing) .vwatch { display: inline-flex; }
  /* seta "← Voltar" acima da barra fixa (senão o topbar tapa/rouba o toque no notch) */
  .obra__back { position: relative; z-index: 39; margin-top: 0.6rem; }
  .work__grid { grid-template-columns: 1fr; }
  .about { grid-template-columns: 1fr; }
  .about__portrait { max-width: 20rem; }
  body.menu-open .sidebar-toggle span:nth-child(1) { transform: rotate(45deg); top: 21px; }
  body.menu-open .sidebar-toggle span:nth-child(2) { transform: rotate(-45deg); bottom: 21px; }

  /* ── Obra: layout expressivo no telemóvel ── */
  .obra__statement { grid-template-columns: 1fr; gap: 1.4rem; }
  .obra__thumbs { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
  .obra__split { grid-template-columns: 1fr; gap: clamp(1.5rem, 5vh, 2.5rem); }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}


