@charset "UTF-8";
/* ==================================================================================
   A11y — focus-visible global + skip-link
================================================================================== */
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--color-accent, #f74b2a);
  outline-offset: 3px;
  border-radius: 4px;
}
.skip-link {
  position: fixed;
  top: -48px;
  left: 8px;
  z-index: 9999;
  padding: 0.5rem 1rem;
  background: #1b1a1c;
  color: #fff;
  text-decoration: none;
  font: 500 0.875rem system-ui, sans-serif;
  border-radius: 6px;
  transition: top 0.2s ease-out;
}
.skip-link:focus,
.skip-link:focus-visible {
  top: 8px;
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* ==================================================================================
   Variables
================================================================================== */
:root {
  /* neutros */
  --color-light: #f1ede9;
  --color-light-surface: #d4cfc9;
  --color-light-opacity: #f1ede9cc;
  --color-dark: #1b1a1c;
  --color-dark-surface: #2e2c30;
  --color-dark-opacity: #1b1a1ccc;
  --color-border: #9b9590;
  /* acentos */
  --color-accent: #f74b2a;
  --color-accent-subtle: #f74b2a1f;
  --color-primary: #305b49; /* verde musgo, marca */
  --color-primary-light: #afdbcc;
  --color-primary-dark: #1f3d30;
  --color-muted: #8a857f;
  /* un color por categoría. la variante "-light" va en reposo del marquee,
     la saturada en hover. el 0 es el fallback neutro del agregador. */
  --color-comp-0: #305b49; /* portfolio (neutro) */
  --color-comp-1: #677898; /* branding */
  --color-comp-1-light: #a5b6d4;
  --color-comp-2: #bf6031; /* web design */
  --color-comp-2-light: #e3a384;
  --color-comp-3: #cb9340; /* artes gráficas */
  --color-comp-3-light: #e7c785;
  --color-comp-4: #688f67; /* fotografía */
  --color-comp-4-light: #a3c2a1;
  /* tipografías */
  --font-titles: "Source Serif 4", serif;
  --font-text: "Switzer", sans-serif;
  --font-label: "DM Mono", monospace;
  /* medidas recurrentes */
  --max-width: 60.25rem;
  --max-width-xl: 90rem;
  --padding-section: clamp(2rem, 5vw, 4rem) clamp(1rem, 5vw, 2rem);
  --padding-short: 1.25rem clamp(1rem, 5vw, 2rem);
  --padding-side: 0 clamp(1rem, 5vw, 2rem);
  --padding-header: 1.5rem clamp(1.5rem, 5vw, 2.5rem);
  --header-height: 5rem;
  --radius-s: 0.5rem;
  --radius-m: 1rem;
  --radius-l: 1.5rem;
  --radius-pill: 20rem;
  --transition-fast: 0.2s cubic-bezier(0.39, 0.575, 0.565, 1);
  --transition-medium: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  --transition-slow: 0.8s cubic-bezier(0.23, 1, 0.32, 1);
  --transition-jump: 0.6s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

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

* {
  margin: 0;
  padding: 0;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}
body {
  background-color: var(--color-light);
  color: var(--color-dark);
  font: 400 1rem var(--font-text);
  line-height: 1.6;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
}

/* congela scroll cuando el overlay está abierto */
body.menu-open {
  overflow: hidden;
}

img, video, svg {
  max-width: 100%;
  width: 100%;
  height: auto;
  display: block;
}

ul, ol {
  list-style: none;
}

h1, h2, h3, h4, h5, h6, a, p, li {
  text-decoration: none;
  color: inherit;
}

h1, h2, h3, h4, h5, h6 {
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

a {
  cursor: pointer;
}

button {
  cursor: pointer;
  background: none;
  border: none;
  color: inherit;
}

input, textarea, select, button {
  font: inherit;
  color: inherit;
}

input:focus,
textarea:focus,
select:focus,
button:focus {
  outline: none;
}

table {
  width: 100%;
  border-collapse: collapse;
}

/* ==================================================================================
   Tipografía base
================================================================================== */
p, input, select, label, textarea, li {
  font: 400 0.9375rem var(--font-text);
}

h1, .h1 {
  font: 400 clamp(2.5rem, 7vw, 4rem) var(--font-titles);
}

h2, .h2 {
  font: 400 clamp(1.5rem, 5vw, 2rem) var(--font-titles);
}

h3, .h3 {
  font: 400 clamp(1.1875rem, 3vw, 1.5rem) var(--font-titles);
}

h4, .h4 {
  font: 500 clamp(1.0625rem, 3vw, 1.1875rem) var(--font-text);
}

a, .link, button {
  font: 500 0.9375rem var(--font-text);
  cursor: pointer;
}

.link:hover {
  text-decoration: underline;
}

/* ==================================================================================
   Componentes globales
================================================================================== */
/* ====== .label ====== */
.label {
  font-family: var(--font-label);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-dark-surface);
}

/* ====== .tag-pill ====== */
.tag-pill {
  font: 400 0.8125rem var(--font-label);
  letter-spacing: 0.03em;
  padding: 0.375rem 0.875rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  color: var(--color-dark-surface);
}

/* ====== .btn ======
   Botón pill outline, se rellena al hover. Color vía --btn-color (por defecto accent).
   Para cambiar color en una instancia: `style="--btn-color: var(--color-dark)"` o similar. */
.btn {
  --btn-color: var(--color-accent);
  --btn-text-hover: var(--color-light);
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.75rem;
  font: 500 0.875rem var(--font-label);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--btn-color);
  background-color: transparent;
  border: 1.5px solid var(--btn-color);
  border-radius: var(--radius-pill);
  transition: background-color var(--transition-medium), color var(--transition-medium);
  /* icono interno (ej: flecha) desliza en diagonal al hover */
}
.btn i {
  font-size: 1.125rem;
  transition: transform var(--transition-medium);
}
.btn:hover {
  background-color: var(--btn-color);
  color: var(--btn-text-hover);
}
.btn:hover i {
  transform: translate(0.25rem, -0.25rem);
}

/* ==================================================================================
    Layout base
================================================================================== */
.section {
  max-width: var(--max-width-xl);
  margin: 0 auto;
  padding: var(--padding-section);
}

/* ==================================================================================
    .nav-link — píldora base del header y cualquier enlace píldora.
    --link-color por contexto: el modo claro/oscuro cambia solo esa var.
================================================================================== */
.nav-link {
  --link-color: var(--color-dark);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font: 500 0.875rem var(--font-label);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--link-color);
  opacity: 0.8;
  background: transparent;
  transition: var(--transition-medium);
}
.nav-link:hover {
  opacity: 1;
}
.nav-link {
  /* min-width fijo: el JS hace typing animation "Menu"↔"Cerrar" (4→6 chars) */
}
.nav-link--bordered {
  padding: 0.35rem 0.9rem;
  border: 1.5px solid var(--link-color);
  border-radius: var(--radius-pill);
  min-width: 6.5rem;
  justify-content: center;
}
.nav-link--light {
  --link-color: var(--color-light);
}
.nav-link {
  /* target del typing animation; el centrado evita el parpadeo del caret */
}
.nav-link__text {
  display: inline-block;
  text-align: center;
}
.nav-link__circle {
  display: inline-block;
  width: 8px;
  height: 8px;
  border: 1.5px solid var(--link-color);
  border-radius: var(--radius-pill);
  background-color: transparent;
  transition: var(--transition-fast);
}
.nav-link:hover .nav-link__circle {
  background-color: var(--link-color);
}

/* ==================================================================================
   .scroll-image — imagen que mueve del banner hasta el about mediante JavaScript
================================================================================== */
.scroll-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  z-index: 0;
  overflow: hidden;
  will-change: transform, width, height, top, left;
}
.scroll-image picture,
.scroll-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: left center;
}

/* ==================================================================================
   .reveal — aparición de elementos con IntersectionObserver.
   Se puede escalonar añadiendo `style="--reveal-delay: 0.2s"` inline en el HTML.
================================================================================== */
.reveal {
  opacity: 0;
  transform: translateY(2rem);
  transition: opacity 1s cubic-bezier(0.23, 1, 0.32, 1) var(--reveal-delay, 0s), transform 1s cubic-bezier(0.23, 1, 0.32, 1) var(--reveal-delay, 0s);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ==================================================================================
   .header
================================================================================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  padding: var(--padding-header);
  display: flex;
  align-items: start;
  justify-content: space-between;
  z-index: 20;
  background-color: transparent;
  border-bottom: 1px solid var(--color-light-surface);
  transform: translateY(-100%);
  opacity: 0;
  transition: var(--transition-slow);
  /* Estados de Visibilidade (Scroll ou Classes de Página) */
}
.header.is-visible, .page-branding .header, .page-web-design .header, .page-artes-graficas .header, .page-fotografia .header, .page-portfolio .header {
  transform: translateY(0);
  opacity: 1;
  background-color: var(--color-light-opacity);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}
.header.is-visible .header__nav-item--hide, .page-branding .header .header__nav-item--hide, .page-web-design .header .header__nav-item--hide, .page-artes-graficas .header .header__nav-item--hide, .page-fotografia .header .header__nav-item--hide, .page-portfolio .header .header__nav-item--hide {
  opacity: 0.8;
  pointer-events: auto;
}
.header {
  /* Estado: Menu Aberto */
}
.header.is-menu-open {
  transform: translateY(0);
  height: 100dvh;
  padding: var(--padding-header);
  align-items: start;
  opacity: 1;
  background-color: var(--color-dark);
  border-bottom-color: transparent;
  /* Fix: baixa o z-index para ficar atras de .navigation (z-index: 30)
     para que as tarjetas do menu apareçam sobre o background escuro do header */
  z-index: 29;
}
/* Botao Cerrar: position: fixed para escapar do stacking context do header
   e ficar por cima de .navigation (z-index: 30) */
.header.is-menu-open .header__nav-item--menu {
  position: fixed;
  top: 1.5rem;
  right: clamp(1rem, 3vw, 2rem);
  z-index: 40;
}
.header.is-menu-open .header__logo img {
  filter: brightness(0) invert(1);
}
.header.is-menu-open .header__nav-item:not(.header__nav-item--menu) {
  display: none;
}
.header.is-menu-open .header__logo,
.header.is-menu-open .nav-link--bordered,
.header.is-menu-open .nav-link__circle {
  --link-color: var(--color-light);
}
.header {
  /* Elementos Internos */
}
.header__logo {
  width: clamp(5rem, 15vw, 6.25rem);
  display: flex;
  align-items: center;
}
.header__logo img {
  color: var(--link-color);
  transition: var(--transition-fast);
}
.header__nav-list {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.header__nav-item {
  transition: var(--transition-fast);
}
.header__nav-item--hide {
  opacity: 0;
  pointer-events: none;
}
.header__nav-item {
  /* Responsividade dentro do item */
}
@media (max-width: 720px) {
  .header__nav-item:not(.header__nav-item--menu) {
    display: none;
  }
}

/* ==================================================================================
   .navigation — Overlay de navegación
================================================================================== */
.navigation {
  position: fixed;
  top: var(--header-height);
  width: 100%;
  z-index: 30;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: var(--transition-medium);
}
.navigation[aria-hidden=false] {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.navigation__secondary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--padding-short);
}

/* ==================================================================================
   .main-links — Bloques de categorías para el menú y el next-section
================================================================================== */
.main-links {
  position: relative;
  height: 100dvh;
  overflow: visible;
  z-index: 1;
}
.main-links__item {
  position: absolute;
  left: 0;
  right: 0;
  height: 100dvh;
  --offsetY: calc(var(--index) * 22vh);
  top: var(--offsetY);
  z-index: calc(10 + var(--index));
  transform: translateY(100vh);
  transition: var(--transition-medium);
  will-change: transform;
}
[aria-hidden=false] .main-links__item {
  transform: translateY(0);
  transition-delay: calc(var(--index) * 0.08s);
}
.main-links__item > a {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: clamp(1.5rem, 4vw, 3rem);
  height: 100dvh;
  color: var(--color-light);
  border-radius: 24px 24px 0 0;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.15);
  will-change: transform;
}
.main-links__item:not(.main-links__item--next):hover {
  transform: translateY(-50px);
}
.main-links__item {
  /* Elemento clicado: sube y ocupa la pantalla */
}
.main-links__item.is-focused {
  top: 0;
  transition: var(--transition-jump);
  pointer-events: none;
}
.main-links__item {
  /* El contenido del elemento actual "bucea" al navegar a la sección siguiente */
}
.main-links__item.is-diving {
  transform: translateY(120vh);
  transition: var(--transition-jump);
  pointer-events: none;
}
.main-links__item {
  /* Los elementos que no fueron clicados salen hacia abajo */
}
.main-links__item.is-leaving {
  transform: translateY(120vh);
  transition: var(--transition-jump);
  pointer-events: none;
}
.main-links__item {
  /* Modificador: tarjeta de próxima sección */
}
.main-links__item--next {
  position: fixed;
  top: auto;
  left: 0;
  right: 0;
  bottom: 0;
  height: 100dvh;
  will-change: transform;
  z-index: 20;
  pointer-events: none;
  --hover-height: clamp(6.5rem, 10vw, 9rem);
  transform: translateY(100%);
  /* Visible en el fondo de la página */
}
.main-links__item--next.is-ready {
  transform: translateY(calc(100% - var(--hover-height)));
  pointer-events: auto;
}
.main-links__item--next.is-ready:hover {
  --hover-height: clamp(11rem, 17vw, 16rem);
  transform: translateY(calc(100% - var(--hover-height)));
}
.main-links__item--next {
  /* Clicado: revela por completo */
}
.main-links__item--next.is-focused {
  transform: translateY(15%);
  transition: var(--transition-jump);
  pointer-events: none;
}
.main-links__item--next {
  /* Sale cuando el usuario vuelve arriba o cambia de contexto */
}
.main-links__item--next.is-leaving {
  transform: translateY(120%);
  transition: var(--transition-jump);
  pointer-events: none;
}
.main-links {
  /* Elementos de texto compartidos */
}
.main-links__subtitle {
  font-family: var(--font-label);
  color: var(--color-light-opacity);
  font-size: clamp(0.75rem, 2vw, 1rem);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.8;
  margin-bottom: 0.5rem;
}
.main-links__title {
  font-family: var(--font-text);
  color: var(--color-light);
  text-transform: uppercase;
  font-weight: 600;
  line-height: 0.9;
  letter-spacing: -0.02em;
  font-size: clamp(3rem, 11vw, 10rem);
  margin: 0;
}

/* Colores por categoría — compartidos entre .main-links__item y .next-section */
.main-links__item [data-category=branding],
.next-section [data-category=branding] {
  background-color: var(--color-comp-1);
}

.main-links__item [data-category=web-design],
.next-section [data-category=web-design] {
  background-color: var(--color-comp-2);
}

.main-links__item [data-category=artes-graficas],
.next-section [data-category=artes-graficas] {
  background-color: var(--color-comp-3);
}

.main-links__item [data-category=fotografia],
.next-section [data-category=fotografia] {
  background-color: var(--color-comp-4);
}

.main-links__item [data-category=portfolio],
.next-section [data-category=portfolio] {
  background-color: var(--color-comp-0);
}

/* ==================================================================================
   .next-section — placeholder en el flujo que reserva el espacio de la tarjeta fija
================================================================================== */
.next-section {
  position: relative;
  width: 100%;
  height: clamp(6.5rem, 10vw, 9rem);
  z-index: 1;
}

/* ==================================================================================
   .hero — sección principal del index
================================================================================== */
.hero {
  display: grid;
  grid-template-rows: auto 1fr auto;
  grid-template-columns: repeat(5, 1fr);
  width: 100vw;
  /* Descontando header fixo/sticky para o conteudo nao estourar o viewport */
  min-height: calc(100vh - var(--header-height, 5rem));
  min-height: calc(100dvh - var(--header-height, 5rem));
  margin: 0 auto;
  padding: clamp(2rem, 5vh, 4rem) clamp(1.25rem, 5vw, 3rem) clamp(3rem, 8vh, 6rem);
  position: relative;
  z-index: 1;
  gap: clamp(1.5rem, 3vh, 3rem);
}
.hero__top {
  grid-row: 1/span 1;
  grid-column: 1/span 4;
  align-self: start;
  will-change: opacity, transform;
}
.hero__title {
  font-family: var(--font-text);
  font-size: clamp(3.5rem, 11vw, 9.5rem);
  font-weight: 800;
  color: var(--color-light);
  text-transform: uppercase;
  letter-spacing: -0.04em;
  line-height: 0.9;
}
.hero__location {
  font-family: var(--font-label);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-light-opacity);
  margin: 0.75rem 0 0 1rem;
}
.hero__info {
  grid-row: 3/span 1;
  grid-column: 4/span 2;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 1rem;
  will-change: opacity, transform;
}
.hero__tagline {
  font-family: var(--font-text);
  font-size: clamp(0.95rem, 1.6vw, 1.5rem);
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: 0.08em;
  color: var(--color-light);
  text-transform: uppercase;
  max-width: 100%;
  word-wrap: break-word;
}

/* Viewports curtos (notebooks 13-14", janelas reduzidas) */
@media (max-height: 900px) and (min-width: 721px) {
  .hero {
    padding-top: clamp(2.5rem, 5vh, 4rem);
    padding-bottom: clamp(4rem, 9vh, 6rem);
    gap: clamp(1rem, 2.5vh, 2rem);
  }
  .hero__title {
    font-size: clamp(3rem, 9vw, 7.5rem);
    line-height: 0.88;
  }
  .hero__tagline {
    font-size: clamp(0.85rem, 1.3vw, 1.15rem);
    line-height: 1.22;
    letter-spacing: 0.06em;
  }
}

/* Viewports muito curtos (janelas reduzidas, landscape em tablets) */
@media (max-height: 700px) and (min-width: 721px) {
  .hero__title { font-size: clamp(2.75rem, 7vw, 5.5rem); }
  .hero__tagline { font-size: clamp(0.75rem, 1.1vw, 1rem); }
  .hero { padding-bottom: clamp(3.5rem, 7vh, 5rem); }
}
.hero__highlight {
  font-family: var(--font-titles);
  font-style: italic;
  font-weight: 700;
  letter-spacing: 0;
}
.hero__side-nav {
  grid-row: 3/span 1;
  grid-column: 1/span 1;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  justify-content: flex-end;
  will-change: opacity, transform;
}
@media (max-width: 720px) {
  .hero {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr auto;
  }
  .hero__top {
    grid-column: 1;
  }
  .hero__location {
    margin-left: 0.25rem;
  }
  .hero__info {
    grid-column: 1;
    align-items: flex-start;
  }
  .hero__tagline {
    font-size: clamp(1rem, 4.5vw, 1.25rem);
    letter-spacing: 0.05em;
  }
  .hero__side-nav {
    display: none;
  }
}

/* ==================================================================================
   .about — sección "sobre mí" del index
================================================================================== */
.about {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
  margin: 0 auto;
}
.about__image {
  height: 36rem;
  overflow: hidden;
}
.about__content {
  padding-top: 0.5rem;
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.about__content.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.about__content {
  /* Override del componente .label en este contexto */
}
.about__content .label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--color-primary);
}
.about__title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 400;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  color: var(--color-dark);
}
.about__text {
  color: var(--color-muted);
  line-height: 1.7;
  margin-bottom: 1rem;
  font-size: 0.9375rem;
}
.about__cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 2rem 0 1.5rem;
}
.about__card {
  padding: 1rem 1rem 0 0;
  border-top: 1.5px solid var(--color-border);
}
.about__card-title {
  font-weight: 600;
  font-size: 0.9375rem;
  margin-bottom: 0.375rem;
  color: var(--color-dark);
}
.about__card-text {
  font-size: 0.8125rem;
  color: var(--color-muted);
  line-height: 1.5;
}
.about__link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-family: var(--font-label);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-dark);
  margin-top: 0.5rem;
  transition: color var(--transition-fast);
}
.about__link-arrow span {
  font-size: 1rem;
}
.about__link-arrow:hover {
  color: var(--color-primary);
}
@media (max-width: 720px) {
  .about {
    grid-template-columns: 1fr;
  }
  .about__image {
    height: 28rem;
  }
  .about__cards {
    grid-template-columns: 1fr;
  }
}

/* ==================================================================================
   .marquee — versión simplificada con previsualización encima del elemento
================================================================================== */
.marquee {
  position: relative;
  width: 100%;
  padding: var(--padding-short);
  background-color: var(--color-dark);
}
.marquee__preview {
  position: fixed;
  width: 16rem;
  height: 18.75rem;
  object-fit: cover;
  pointer-events: none;
  z-index: 2;
  opacity: 0;
  transform: translate(-50%, 3rem);
  transition: var(--transition-fast), transform var(--transition-medium);
  will-change: left, top, transform;
}
.marquee__preview.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}
.marquee__track {
  display: flex;
  max-width: var(--max-width-xl);
  margin: 0 auto;
  justify-content: space-between;
}
.marquee__item {
  font-family: var(--font-label);
  font-size: 1.5rem;
  letter-spacing: 0.05em;
  text-transform: lowercase;
  white-space: nowrap;
  user-select: none;
  cursor: pointer;
  padding: 0.5rem;
}
.marquee__item--branding {
  --marquee-color: var(--color-comp-1-light);
}
.marquee__item--web-design {
  --marquee-color: var(--color-comp-2-light);
}
.marquee__item--artes-graficas {
  --marquee-color: var(--color-comp-3-light);
}
.marquee__item--fotografia {
  --marquee-color: var(--color-comp-4-light);
}
.marquee__text {
  display: block;
  color: var(--marquee-color, rgba(254, 248, 243, 0.45));
  transition: color 0.3s ease;
}
.marquee__text:hover {
  color: var(--color-light);
}
@media (max-width: 720px) {
  .marquee {
    padding: 1rem 1.25rem;
  }
  .marquee__track {
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
    justify-content: center;
  }
  .marquee__item {
    font-size: 0.75rem;
  }
}

/* ==================================================================================
   .cv — grid de currículum (index)
================================================================================== */
.cv {
  background-color: var(--color-light);
}
.cv__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  max-width: var(--max-width-xl);
  margin: 0 auto;
}
.cv__col {
  padding: 2rem 1.5rem;
  border-left: 1px solid var(--color-border);
}
.cv__col:first-child {
  border-left: none;
}
.cv__block {
  margin-bottom: 2.5rem;
}
.cv__block:last-child {
  margin-bottom: 0;
}
.cv__heading {
  font: 500 0.75rem var(--font-label);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-dark);
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1.5px solid var(--color-dark);
}
.cv__text {
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--color-muted);
  margin-bottom: 0.5rem;
}
.cv__text strong {
  color: var(--color-dark);
  font-weight: 600;
}
.cv__link {
  display: block;
  font: 400 0.875rem var(--font-text);
  color: var(--color-muted);
  transition: color var(--transition-fast);
  margin-bottom: 0.25rem;
}
.cv__link:hover {
  color: var(--color-primary);
}
.cv__entry {
  margin-bottom: 1.5rem;
}
.cv__entry:last-child {
  margin-bottom: 0;
}
.cv__date {
  font: 500 0.75rem var(--font-label);
  letter-spacing: 0.05em;
  color: var(--color-primary);
  display: block;
  margin-bottom: 0.25rem;
}
.cv__role {
  font: 600 0.9375rem var(--font-text);
  color: var(--color-dark);
  margin-bottom: 0.125rem;
}
.cv__detail {
  font: 400 0.8125rem var(--font-text);
  color: var(--color-border);
  margin-bottom: 0.5rem;
}
.cv__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-start;
}
.cv__tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font: 400 0.8125rem var(--font-label);
  letter-spacing: 0.03em;
  padding: 0.375rem 0.875rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  color: var(--color-dark-surface);
  line-height: 1.2;
  white-space: nowrap;
  flex: 0 1 auto;
  min-width: clamp(4.5rem, 22%, 8rem);
  max-width: 100%;
}
@media (max-width: 720px) {
  .cv__tags {
    gap: 0.4rem;
  }
  .cv__tag {
    min-width: clamp(4rem, 30%, 7rem);
    padding: 0.5rem 0.75rem;
    font-size: 0.8125rem;
  }
}
.cv__list {
  list-style: none;
}
.cv__list li {
  font: 400 0.875rem var(--font-text);
  color: var(--color-muted);
  padding: 0.375rem 0;
  border-bottom: 1px solid var(--color-light-surface);
}
.cv__list li:last-child {
  border-bottom: none;
}
@media (max-width: 1024px) {
  .cv__grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .cv__col:nth-child(3) {
    border-left: none;
  }
}
@media (max-width: 720px) {
  .cv__grid {
    grid-template-columns: 1fr;
  }
  .cv__col {
    border-left: none;
    border-bottom: 1px solid var(--color-border);
    padding: 1.5rem 0;
  }
  .cv__col:last-child {
    border-bottom: none;
  }
}

/* ==================================================================================
   Colores de página por categoría (--page-color)
================================================================================== */
body.page-portfolio {
  --page-color: var(--color-comp-0);
}

body.page-branding {
  --page-color: var(--color-comp-1);
}

body.page-web-design {
  --page-color: var(--color-comp-2);
}

body.page-artes-graficas {
  --page-color: var(--color-comp-3);
}

body.page-fotografia {
  --page-color: var(--color-comp-4);
}

/* ==================================================================================
   PAGES → page-project
   Layout de página de proyecto individual (projects/*.html).
   Fondo blanco, cabecera centrada minimalista y stack vertical de imágenes sin gaps
   — rolagem continua al estilo case-study de Behance. Reutiliza tipografías y cores
   del :root global (no crea colores nuevos).
================================================================================== */
body.page-project {
  background-color: #ffffff;
  color: var(--color-dark);
}

.project {
  /* respeta el header fixed global */
  padding-top: var(--header-height);
  /* cabecera del proyecto — centrada, minimalista */
}
.project__header {
  max-width: var(--max-width-xl); /* 1440px */
  margin: 0 auto;
  padding: clamp(4rem, 10vw, 8rem) clamp(1rem, 5vw, 2rem) clamp(3rem, 6vw, 5rem);
  text-align: center;
}
.project {
  /* categoría — heredada de la variable de página (--page-color) */
}
.project__category {
  display: inline-block;
  margin-bottom: 1.25rem;
  font: 500 0.875rem var(--font-label);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--page-color, var(--color-primary));
}
.project {
  /* título principal — serif editorial en itálico */
}
.project__title {
  margin-bottom: 1.5rem;
  font: 300 clamp(3rem, 9vw, 6.5rem) var(--font-titles);
  font-style: italic;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--color-dark);
}
.project {
  /* meta — subtítulo y año, separados por una regla fina */
}
.project__meta {
  display: inline-flex;
  gap: 0.75rem;
  align-items: center;
  justify-content: center;
  font: 400 0.8125rem var(--font-label);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-muted);
}
.project__meta-sep {
  width: 2rem;
  height: 1px;
  background-color: var(--color-border);
}
.project {
  /* galería — stack vertical sin gaps, ancho máximo 1440px centralizado.
     border-radius + overflow:hidden recortan los extremos del stack en un único bloque;
     la sombra suave lo separa del fondo blanco de la página. */
}
.project__gallery {
  max-width: var(--max-width-xl);
  margin: 0 auto clamp(3rem, 6vw, 5rem);
  border-radius: var(--radius-l);
  overflow: hidden;
  box-shadow: 0 1.25rem 3.75rem -1rem rgba(27, 26, 28, 0.18), 0 0 0 1px rgba(27, 26, 28, 0.04);
}
.project {
  /* aplicado directamente al <picture> — sin <figure> wrapper */
}
.project__figure {
  display: block;
  margin: 0;
  width: 100%;
}
.project__figure img {
  display: block;
  width: 100%;
  height: auto;
}
.project {
  /* bloque de texto dentro del stack — rompe la secuencia visual sin cortar el contenedor */
}
.project__intro {
  max-width: 42rem;
  margin: 0 auto;
  padding: clamp(3rem, 7vw, 6rem) clamp(1.25rem, 5vw, 2rem);
  background-color: #ffffff;
}
.project__intro-title {
  margin-bottom: 1.5rem;
  font: 400 clamp(1.75rem, 4vw, 2.5rem) var(--font-titles);
  font-style: italic;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--color-dark);
  text-align: center;
}
.project__intro-text {
  margin-bottom: 1.25rem;
  font: 400 clamp(0.9375rem, 1.2vw, 1.0625rem) var(--font-text);
  line-height: 1.7;
  color: var(--color-dark-surface);
}
.project__intro-text:last-child {
  margin-bottom: 0;
}
.project {
  /* créditos — lista de pares label/valor tipo ficha técnica */
}
.project__credits {
  max-width: 45rem;
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 4rem) clamp(1.25rem, 5vw, 2rem) clamp(4rem, 8vw, 6rem);
}
.project__credits-title {
  margin-bottom: 2rem;
  font: 400 clamp(1.5rem, 3vw, 2rem) var(--font-titles);
  font-style: italic;
  color: var(--color-dark);
  text-align: center;
}
.project__credits-list {
  display: grid;
  gap: 0;
}
.project__credits-row {
  display: grid;
  grid-template-columns: 12rem 1fr;
  gap: 1rem;
  padding: 1rem 0;
  border-top: 1px solid var(--color-light-surface);
}
.project__credits-row:last-child {
  border-bottom: 1px solid var(--color-light-surface);
}
.project__credits-row dt {
  font: 500 0.8125rem var(--font-label);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-muted);
}
.project__credits-row dd {
  font: 400 0.9375rem var(--font-text);
  color: var(--color-dark);
}
@media (max-width: 540px) {
  .project__credits-row {
    grid-template-columns: 1fr;
    gap: 0.375rem;
  }
}
.project {
  /* visit — wrapper del CTA para visitar el sitio real (usado en web-design).
     el botón usa el componente global .btn (color --accent por defecto). */
}
.project__visit {
  max-width: var(--max-width-xl);
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 4rem) clamp(1.25rem, 5vw, 2rem);
  text-align: center;
}
.project {
  /* url pequeña dentro del botón — hereda la currentColor del .btn */
}
.project__visit-url {
  font-weight: 400;
  letter-spacing: 0.02em;
  text-transform: lowercase;
  opacity: 0.7;
}
.project {
  /* bajo 1440px la galería respira 1rem a cada lado para que la sombra se vea */
}
@media (max-width: 1440px) {
  .project__gallery {
    max-width: calc(100% - 2rem);
  }
}

/* ==================================================================================
   .showcase — layout de duas colunas de branding.html
================================================================================== */
/* corpo congelado: scroll apenas dentro de .showcase__right.
   aplicado via classe has-showcase (páginas de categoría branding/web-design/artes-graficas/fotografia),
   não afeta páginas de proyecto (page-project) que tienen scroll vertical normal */
body.has-showcase {
  overflow: hidden;
  height: 100vh;
  height: 100dvh;
}

/* --sc-* agrupa valores reutilizáveis e simplifica media queries.
   --sc-accent herda a cor de categoria. */
.showcase {
  --sc-col-left: 38%;
  --sc-pad-v: clamp(2rem, 5vw, 4.5rem);
  --sc-pad-h: clamp(1rem, 3vw, 3rem);
  --sc-gap: 0.625rem;
  --sc-accent: var(--color-comp-1);
  --sc-ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --sc-height: calc(100dvh - var(--header-height));
  --sc-dark-rgb: 27, 26, 28;
  --sc-light-rgb: 241, 237, 233;
  position: relative;
  width: 100%;
  top: var(--header-height);
  bottom: 0;
  overflow: hidden;
  background-color: var(--color-light);
  color: var(--color-dark);
  /* linha vertical fixa que separa as duas colunas */
}
.showcase__line {
  position: fixed;
  inset: var(--header-height) auto 0 var(--sc-col-left);
  width: 1px;
  background: rgba(var(--sc-dark-rgb), 0.08);
  z-index: 2;
  pointer-events: none;
}
.showcase {
  /* linha de progresso (height = % do projeto atual / total) */
}
.showcase__progress {
  position: fixed;
  top: var(--header-height);
  left: var(--sc-col-left);
  width: 1px;
  height: 0%;
  background: var(--sc-accent);
  z-index: 3;
  pointer-events: none;
  transition: height 0.6s var(--sc-ease);
}
.showcase {
  /* layout — flex row com as duas colunas principais */
}
.showcase__canva {
  display: flex;
  height: var(--sc-height);
}
.showcase {
  /* coluna esquerda — lista de projetos centralizada verticalmente */
}
.showcase__left {
  position: relative;
  width: var(--sc-col-left);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 clamp(1.5rem, 3vw, 3rem);
  z-index: 1;
}
.showcase__label {
  display: block;
  margin-bottom: 1.25rem;
  font-family: var(--font-label);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-muted);
}
.showcase__list {
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
}
.showcase__list-item {
  display: block;
}
.showcase__list-item.is-active .showcase__list-link {
  opacity: 1;
  color: var(--color-dark);
}
.showcase__list-item.is-active .showcase__year {
  opacity: 1;
  transform: translateX(0);
}
.showcase {
  /* link de cada projeto — título em itálico.
     item ativo chega a 100% de opacidade; demais ficam em 0.22. */
}
.showcase__list-link {
  display: inline-flex;
  align-items: baseline;
  gap: 0.75rem;
  padding: 0.3125rem 0;
  font-family: var(--font-titles);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.625rem, 2.9vw, 3rem);
  letter-spacing: -0.02em;
  line-height: 1.12;
  color: var(--color-dark);
  opacity: 0.22;
  cursor: pointer;
  user-select: none;
  transition: opacity 0.4s var(--sc-ease), color 0.4s var(--sc-ease);
}
.showcase__list-link:hover {
  opacity: 0.55;
  color: var(--color-dark-surface);
}
.showcase__name {
  display: inline;
}
.showcase {
  /* indicador de link — flecha aparece só no item ativo, deslizando da esquerda */
}
.showcase__year {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-style: normal;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--color-dark);
  opacity: 0;
  transform: translateX(-0.375rem);
  transition: opacity 0.35s 0.1s ease, transform 0.35s 0.1s ease;
}
.showcase__list-link:hover .showcase__year {
  transform: translate(0.125rem, -0.125rem);
}
.showcase {
  /* coluna direita — scroll-snap de seções */
}
.showcase__right {
  position: relative;
  flex: 1;
  height: var(--sc-height);
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.showcase__right::-webkit-scrollbar {
  display: none;
}
.showcase__right {
  /* fundidos para revelar suavemente os bordos do scroll */
}
.showcase__right::before, .showcase__right::after {
  content: "";
  position: fixed;
  left: var(--sc-col-left);
  right: 0;
  height: 80px;
  pointer-events: none;
  z-index: 10;
}
.showcase__right::before {
  top: var(--header-height);
  background: linear-gradient(to bottom, rgba(var(--sc-light-rgb), 0.95) 0%, rgba(var(--sc-light-rgb), 0) 100%);
}
.showcase__right::after {
  bottom: 0;
  background: linear-gradient(to top, rgba(var(--sc-light-rgb), 0.95) 0%, rgba(var(--sc-light-rgb), 0) 100%);
}
.showcase {
  /* seção individual — ocupa 100dvh menos o header, snap start */
}
.showcase__section {
  position: relative;
  width: 100%;
  height: var(--sc-height);
  padding: var(--sc-pad-v) var(--sc-pad-h);
  display: flex;
  align-items: center;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}
.showcase {
  /* grid de imagens — variantes por quantidade de peças */
}
.showcase__grid {
  width: 100%;
  height: 100%;
  display: grid;
  gap: var(--sc-gap);
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
}
.showcase__grid--count-2 {
  grid-template-columns: 3fr 2fr;
  grid-template-rows: 1fr;
}
.showcase__grid--count-3 {
  grid-template-columns: 3fr 2fr;
  grid-template-rows: 1fr 1fr;
}
.showcase__grid--count-3 .showcase__cell:first-child {
  grid-row: 1/3;
}

/* Grid com 1 unica imagem — usado no web-design para preview com iframe */
.showcase__grid--single {
  grid-template-columns: 1fr;
  grid-template-rows: 1fr;
}

/* Preview cell: botao cobre toda a celula, imagem cover, CTA overlay */
.showcase__cell--preview {
  overflow: hidden;
  position: relative;
}
.showcase__preview-trigger {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  margin: 0;
  border: 0;
  background: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  border-radius: inherit;
  transition: transform 0.4s var(--sc-ease);
}
.showcase__preview-trigger picture,
.showcase__preview-trigger img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}
.showcase__preview-trigger img {
  transition: transform 0.8s var(--sc-ease);
}
.showcase__preview-trigger:hover img,
.showcase__preview-trigger:focus-visible img {
  transform: scale(1.03);
}

/* CTA overlay no centro inferior da imagem */
.showcase__preview-cta {
  position: absolute;
  bottom: clamp(1rem, 3vw, 2rem);
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 1.25rem;
  background: rgba(27, 26, 28, 0.85);
  color: #fff;
  border-radius: 999px;
  font: 500 0.875rem var(--font-label, sans-serif);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s var(--sc-ease), background 0.3s;
  pointer-events: none;
  white-space: nowrap;
}
.showcase__preview-cta i {
  font-size: 1.2em;
  line-height: 1;
}
.showcase__preview-trigger:hover .showcase__preview-cta,
.showcase__preview-trigger:focus-visible .showcase__preview-cta {
  background: #1b1a1c;
  transform: translateX(-50%) translateY(-4px);
}

/* Estado com iframe ativo: substitui botao por iframe em tela cheia da celula */
.showcase__cell--preview.is-preview-active .showcase__preview-trigger {
  display: none;
}
.showcase__preview-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: #0b0b0c;
}
.showcase__preview-close {
  position: absolute;
  top: clamp(0.75rem, 1.5vw, 1rem);
  right: clamp(0.75rem, 1.5vw, 1rem);
  width: 2.25rem;
  height: 2.25rem;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(27, 26, 28, 0.85);
  color: #fff;
  cursor: pointer;
  font-size: 1.1rem;
  z-index: 5;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: background 0.2s, transform 0.2s;
}
.showcase__preview-close:hover {
  background: #1b1a1c;
  transform: scale(1.06);
}

@media (max-width: 720px) {
  .showcase__preview-cta {
    font-size: 0.75rem;
    padding: 0.6rem 1rem;
    bottom: 0.75rem;
  }
  /* Em mobile, a celula de preview ocupa toda a largura disponivel
     com aspect-ratio da imagem (1440x900 = 16:10) em vez de esticar a altura */
  .showcase__grid--single {
    height: auto;
    width: 100%;
    align-self: center;
  }
  .showcase__grid--single .showcase__cell--preview {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 10;
  }
  .showcase__grid--single .showcase__preview-trigger img,
  .showcase__grid--single .showcase__preview-trigger picture {
    object-fit: cover;
  }
}
.showcase__cell {
  position: relative;
  overflow: hidden;
  background: var(--color-light-surface);
  border-radius: var(--radius-s);
}
.showcase__cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1.06);
  transition: transform 1.1s var(--sc-ease);
  will-change: transform;
}
.showcase__section.is-in-view .showcase__cell img {
  transform: scale(1);
}
.showcase {
  /* meta — título + categoria na esquina inferior direita */
}
.showcase__meta {
  position: absolute;
  bottom: calc(var(--sc-pad-v) + 0.75rem);
  right: calc(var(--sc-pad-h) + 0.5rem);
  text-align: right;
  z-index: 10;
  pointer-events: none;
}
.showcase__meta-label, .showcase__meta-category {
  display: block;
  font-family: var(--font-label);
  font-size: 0.625rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(var(--sc-dark-rgb), 0.35);
}
.showcase__meta-category {
  margin-top: 0.25rem;
  letter-spacing: 0.14em;
  color: rgba(var(--sc-dark-rgb), 0.2);
}
.showcase {
  /* UI fixa — redes sociais */
}
.showcase__socials {
  position: fixed;
  left: clamp(1.5rem, 3vw, 2.5rem);
  bottom: clamp(1.5rem, 3vw, 2rem);
  display: flex;
  gap: 1rem;
  z-index: 10;
}
.showcase__socials a {
  font-family: var(--font-label);
  font-size: 0.625rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(var(--sc-dark-rgb), 0.3);
  transition: color 0.2s ease;
}
.showcase__socials a:hover {
  color: var(--color-dark);
}
.showcase {
  /* responsive — mobile (< 700 px) */
}
@media (max-width: 700px) {
  .showcase {
    --sc-col-left: 6.875rem;
    --sc-pad-v: 1rem;
    --sc-pad-h: 0.875rem;
    --sc-gap: 0.5rem;
  }
  .showcase__rule, .showcase__progress {
    display: none;
  }
  .showcase__left {
    padding: 0 1rem 2.5rem;
  }
  .showcase__eyebrow {
    display: none;
  }
  .showcase__list-link {
    font-size: 0.875rem;
    line-height: 1.3;
    letter-spacing: -0.005em;
  }
  .showcase__year {
    display: none;
  }
  .showcase__right::before, .showcase__right::after {
    left: 6.875rem;
    height: 5rem;
  }
  .showcase [class*=__grid] {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(3, 1fr);
  }
  .showcase [class*=__grid] .showcase__cell:first-child {
    grid-row: auto;
  }
  .showcase__grid--count-2 {
    grid-template-rows: repeat(2, 1fr);
  }
  .showcase__meta, .showcase__socials {
    display: none;
  }
}
.showcase {
  /* acessibilidade — respeita prefers-reduced-motion */
}
@media (prefers-reduced-motion: reduce) {
  .showcase__cell img, .showcase__list-link, .showcase__progress, .showcase__year {
    transition: none;
  }
}

/* ==================================================================================
   .portfolio-grid — grid editorial asimétrico del portfolio.html

   Cada tarjeta controla su posición con `grid-column` inline y su proporción con
   `--card-ratio` (aspect-ratio del media). `grid-auto-flow: dense` deja que el
   motor del grid rellene los huecos, evitando superposiciones. Para romper la
   alineación de filas y conseguir el ritmo editorial (inspirado en
   davidebaratta.com) algunas tarjetas llevan `--row-offset` inline (margin-top
   adicional).

   - 12 columnas en desktop (> 900 px)
   - 6 columnas en tablet (720 — 900 px)
   - 1 columna en móvil (< 720 px)

   Colores por categoría via `[data-category]` -> `--card-color` (se usa en la
   línea decorativa del marker y en el hover del título).
================================================================================== */
/* ==================================================================================
   Colores de categoría — comparten `--card-color`, aplicado a label, cell y hover.
================================================================================== */
[data-category=branding] {
  --card-color: var(--color-comp-1);
}

[data-category=web-design] {
  --card-color: var(--color-comp-2);
}

[data-category=artes-graficas] {
  --card-color: var(--color-comp-3);
}

[data-category=fotografia] {
  --card-color: var(--color-comp-4);
}

/* ==================================================================================
   .portfolio-grid — stack vertical de secciones (branding, web-design,
   artes-graficas, fotografia). Cada sección lleva un header editorial
   (línea animada + título + flecha) arriba y debajo 2-3 proyectos, cada
   uno como fila de 2-3 imágenes a la misma altura.
================================================================================== */
.portfolio-grid {
  --pg-pad-v: clamp(5rem, 10vw, 8rem);
  --pg-pad-h: clamp(1rem, 3vw, 2rem);
  --pg-row-h: clamp(11rem, 20vw, 15rem); /* altura fija para alinear imágenes */
  --pg-gap: clamp(0.5rem, 1vw, 1rem);
  max-width: var(--max-width-xl);
  margin: 0 auto;
  padding: var(--pg-pad-v) var(--pg-pad-h);
  display: flex;
  flex-direction: column;
  gap: clamp(2.5rem, 5vw, 4.5rem);
  /* Título grande — PORTFOLIO */
}
.portfolio-grid__heading {
  margin: 0 0 clamp(1rem, 3vw, 2.5rem);
  font: 400 clamp(3rem, 10vw, 7.5rem) var(--font-titles);
  font-style: italic;
  line-height: 0.9;
  letter-spacing: -0.03em;
  color: var(--color-primary);
}
.portfolio-grid {
  /* ── Sección de categoría ─────────────────────────────────────────────────────── */
}
.portfolio-grid__section {
  display: flex;
  flex-direction: column;
  gap: clamp(1rem, 2.5vw, 1.75rem);
}
.portfolio-grid {
  /* header de sección — funciona como link a la página de la categoría.
     línea superior anima de 0→100% al entrar en viewport, la flecha desliza al hover. */
}
.portfolio-grid__section-header {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: 1.25rem 0 0.75rem;
  margin-bottom: 0.5rem;
  border-top: 1px solid var(--color-border);
  text-decoration: none;
  color: inherit;
}
.portfolio-grid__section-header::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: clamp(3rem, 18%, 7rem);
  height: 2px;
  background-color: var(--card-color, var(--color-primary));
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.9s cubic-bezier(0.23, 1, 0.32, 1) calc(var(--reveal-delay, 0s) + 0.2s), width var(--transition-medium);
}
.portfolio-grid__section-header.is-visible::before {
  transform: scaleX(1);
}
.portfolio-grid__section-header:hover::before {
  width: clamp(4.5rem, 28%, 11rem);
}
.portfolio-grid__section-eyebrow {
  font: 500 0.6875rem var(--font-label);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-muted);
}
.portfolio-grid__section-title {
  font: 400 clamp(1.625rem, 3.2vw, 2.75rem) var(--font-titles);
  font-style: italic;
  line-height: 1;
  letter-spacing: -0.01em;
  color: var(--card-color, var(--color-dark));
  transition: transform var(--transition-medium);
}
.portfolio-grid__section-header:hover .portfolio-grid__section-title {
  transform: translateX(0.25rem);
}
.portfolio-grid__section-arrow {
  margin-left: auto;
  font-size: clamp(1rem, 1.5vw, 1.25rem);
  color: var(--color-dark);
  transition: transform var(--transition-medium);
}
.portfolio-grid__section-header:hover .portfolio-grid__section-arrow {
  transform: translate(0.375rem, -0.375rem);
}
.portfolio-grid {
  /* ── Proyecto individual ──────────────────────────────────────────────────────── */
}
.portfolio-grid__project {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  text-decoration: none;
  color: inherit;
}
.portfolio-grid {
  /* fila de 2-3 imágenes: altura fija uniforme, cada imagen en flex equal-width */
}
.portfolio-grid__project-images {
  display: flex;
  gap: var(--pg-gap);
  height: var(--pg-row-h);
}
.portfolio-grid__project-image {
  flex: 1 1 0;
  min-width: 0;
  height: 100%;
  overflow: hidden;
  border-radius: var(--radius-s);
  background-color: var(--color-light-surface);
}
.portfolio-grid__project-image picture {
  display: block;
  width: 100%;
  height: 100%;
}
.portfolio-grid__project-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
  transition: transform 1.2s cubic-bezier(0.23, 1, 0.32, 1);
  will-change: transform;
}
.portfolio-grid__project:hover .portfolio-grid__project-image img {
  transform: scale(1.06);
}
.portfolio-grid {
  /* label del proyecto — pequeño, uppercase, debajo de las imágenes */
}
.portfolio-grid__project-label {
  font: 500 0.6875rem var(--font-label);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-muted);
  transition: color var(--transition-fast);
}
.portfolio-grid__project:hover .portfolio-grid__project-label {
  color: var(--card-color, var(--color-dark));
}

/* ==================================================================================
   .portfolio-grid — responsive.
   Tablet (≤720px)  → altura de fila reducida, imágenes aún en fila.
   Móvil  (≤540px)  → imágenes en columna, una debajo de la otra.
================================================================================== */
@media (max-width: 720px) {
  .portfolio-grid {
    --pg-row-h: clamp(8rem, 28vw, 12rem);
  }
}
@media (max-width: 540px) {
  .portfolio-grid {
    --pg-row-h: auto;
  }
  .portfolio-grid__project-images {
    flex-direction: column;
    height: auto;
  }
  .portfolio-grid__project-images > * {
    flex: 0 0 auto;
    height: clamp(11rem, 55vw, 16rem);
  }
}
/* ==================================================================================
   .portfolio-grid — respeta prefers-reduced-motion.
================================================================================== */
@media (prefers-reduced-motion: reduce) {
  .portfolio-grid__project-image img,
  .portfolio-grid__section-header::before,
  .portfolio-grid__section-title,
  .portfolio-grid__section-arrow {
    transition: none;
  }
  .portfolio-grid__section-header::before {
    transform: scaleX(1);
  }
}

/* ==================================================================================
   ===================================================================================
   UX IMPROVEMENTS — MELHORIAS DE EXPERIÊNCIA DO USUÁRIO
   ===================================================================================
   Este bloco reúne melhorias focadas exclusivamente em UX:
   acessibilidade, feedback visual, micro-interações, estados,
   performance percebida, responsividade, conforto de leitura,
   suporte a preferências do sistema (reduced-motion, high-contrast,
   dark-mode, reduced-transparency), navegação por teclado,
   touch targets adequados, safe-area para iOS e muito mais.
   ===================================================================================
================================================================================== */


/* ==================================================================================
   UX.01 — TOKENS ADICIONAIS DE UX
   Variáveis para sombras, elevação, durações, easings e z-index stacking.
================================================================================== */
:root {
  /* Sombras — sistema de elevação */
  --ux-shadow-xs: 0 1px 2px rgba(27, 26, 28, 0.04);
  --ux-shadow-sm: 0 2px 4px rgba(27, 26, 28, 0.06), 0 1px 2px rgba(27, 26, 28, 0.04);
  --ux-shadow-md: 0 4px 8px rgba(27, 26, 28, 0.08), 0 2px 4px rgba(27, 26, 28, 0.05);
  --ux-shadow-lg: 0 10px 20px rgba(27, 26, 28, 0.10), 0 4px 8px rgba(27, 26, 28, 0.06);
  --ux-shadow-xl: 0 20px 40px rgba(27, 26, 28, 0.12), 0 8px 16px rgba(27, 26, 28, 0.08);
  --ux-shadow-2xl: 0 32px 64px rgba(27, 26, 28, 0.16);
  --ux-shadow-inset: inset 0 2px 4px rgba(27, 26, 28, 0.06);
  --ux-shadow-focus: 0 0 0 3px rgba(247, 75, 42, 0.35);
  --ux-shadow-focus-dark: 0 0 0 3px rgba(175, 219, 204, 0.45);

  /* Durações adicionais */
  --ux-dur-xxfast: 0.08s;
  --ux-dur-xfast: 0.12s;
  --ux-dur-fast: 0.2s;
  --ux-dur-medium: 0.36s;
  --ux-dur-slow: 0.6s;
  --ux-dur-xslow: 1s;

  /* Easings */
  --ux-ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ux-ease-in: cubic-bezier(0.7, 0, 0.84, 0);
  --ux-ease-in-out: cubic-bezier(0.83, 0, 0.17, 1);
  --ux-ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ux-ease-smooth: cubic-bezier(0.25, 0.46, 0.45, 0.94);

  /* Z-index stacking — evita conflitos entre camadas */
  --ux-z-base: 1;
  --ux-z-raised: 10;
  --ux-z-sticky: 100;
  --ux-z-header: 500;
  --ux-z-overlay: 1000;
  --ux-z-modal: 1100;
  --ux-z-toast: 1200;
  --ux-z-tooltip: 1300;
  --ux-z-skip: 9999;

  /* Tipografia de conforto */
  --ux-reading-width: 65ch;
  --ux-leading-tight: 1.25;
  --ux-leading-normal: 1.6;
  --ux-leading-loose: 1.9;
  --ux-tracking-tight: -0.01em;
  --ux-tracking-normal: 0;
  --ux-tracking-wide: 0.04em;

  /* Focus ring adaptável */
  --ux-focus-ring-color: var(--color-accent);
  --ux-focus-ring-width: 3px;
  --ux-focus-ring-offset: 3px;

  /* Espaçamento de toque */
  --ux-touch-target-min: 44px;
  --ux-touch-target-comfortable: 48px;

  /* Safe area — iOS */
  --ux-safe-top: env(safe-area-inset-top, 0);
  --ux-safe-bottom: env(safe-area-inset-bottom, 0);
  --ux-safe-left: env(safe-area-inset-left, 0);
  --ux-safe-right: env(safe-area-inset-right, 0);
}


/* ==================================================================================
   UX.02 — FOCUS MANAGEMENT UNIVERSAL
   Torna o foco por teclado muito mais evidente sem prejudicar o mouse.
================================================================================== */
:focus {
  outline: none;
}

:focus-visible {
  outline: var(--ux-focus-ring-width) solid var(--ux-focus-ring-color);
  outline-offset: var(--ux-focus-ring-offset);
  border-radius: var(--radius-s);
  transition: outline-offset var(--ux-dur-fast) var(--ux-ease-out);
}

a:focus-visible,
button:focus-visible,
[role="button"]:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: var(--ux-focus-ring-width) solid var(--ux-focus-ring-color);
  outline-offset: var(--ux-focus-ring-offset);
  box-shadow: var(--ux-shadow-focus);
  position: relative;
  z-index: var(--ux-z-raised);
}

/* Remove foco automático ao clicar — mantém ao navegar com teclado */
:focus:not(:focus-visible) {
  outline: none;
  box-shadow: none;
}


/* ==================================================================================
   UX.03 — SKIP LINKS (pular para conteúdo principal)
   Invisível até receber foco — essencial para leitores de tela e teclado.
================================================================================== */
.ux-skip-link {
  position: fixed;
  top: -100px;
  left: 1rem;
  padding: 0.75rem 1.25rem;
  background: var(--color-dark);
  color: var(--color-light);
  font: 500 0.875rem var(--font-text);
  border-radius: var(--radius-s);
  box-shadow: var(--ux-shadow-lg);
  text-decoration: none;
  z-index: var(--ux-z-skip);
  transition: top var(--ux-dur-fast) var(--ux-ease-out);
}

.ux-skip-link:focus,
.ux-skip-link:focus-visible {
  top: calc(1rem + var(--ux-safe-top));
}


/* ==================================================================================
   UX.04 — TEXT SELECTION (seleção de texto com cores da marca)
================================================================================== */
::selection {
  background-color: var(--color-accent);
  color: var(--color-light);
  text-shadow: none;
}

::-moz-selection {
  background-color: var(--color-accent);
  color: var(--color-light);
  text-shadow: none;
}

/* Seleção em superfícies escuras */
.section--dark ::selection,
.cv ::selection {
  background-color: var(--color-primary-light);
  color: var(--color-dark);
}


/* ==================================================================================
   UX.05 — CUSTOM SCROLLBAR (sutil, alinhada à marca)
================================================================================== */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--color-border) transparent;
}

*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

*::-webkit-scrollbar-track {
  background: transparent;
}

*::-webkit-scrollbar-thumb {
  background-color: var(--color-border);
  border-radius: 10px;
  border: 2px solid transparent;
  background-clip: content-box;
  transition: background-color var(--ux-dur-fast);
}

*::-webkit-scrollbar-thumb:hover {
  background-color: var(--color-muted);
  background-clip: content-box;
}

*::-webkit-scrollbar-corner {
  background: transparent;
}

/* Scrollbar dentro de áreas escuras */
.cv *::-webkit-scrollbar-thumb {
  background-color: rgba(241, 237, 233, 0.25);
  background-clip: content-box;
}


/* ==================================================================================
   UX.06 — SMOOTH PAGE LOAD (fade-in inicial para evitar flash)
   NOTA: Usamos apenas opacity no body. Qualquer `transform` no body estabelece
   um containing block para descendentes `position: fixed`, quebrando o menu
   (`.navigation`), o header fixo, `.scroll-image` e `.main-links__item--next`.
   O micro-slide-up só é aplicado em elementos internos via `.ux-fade-enter`.
================================================================================== */
@keyframes uxPageFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes uxContentFadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

body {
  animation: uxPageFadeIn var(--ux-dur-medium) var(--ux-ease-out) both;
}

/* Ao trocar de página/seção dinamicamente — não aplicar no body */
.ux-fade-enter {
  animation: uxContentFadeIn var(--ux-dur-medium) var(--ux-ease-out) both;
}


/* ==================================================================================
   UX.07 — HEADINGS: BALANCE DE LINHAS + FLUIDEZ
   Headings mais bonitos em qualquer largura; `text-wrap: balance` evita viúvas.
================================================================================== */
h1, h2, h3, h4, h5, h6 {
  text-wrap: balance;
  letter-spacing: var(--ux-tracking-tight);
  line-height: var(--ux-leading-tight);
  overflow-wrap: break-word;
  hyphens: auto;
}

/* Parágrafos longos — pretty evita linhas solitárias no final */
p {
  text-wrap: pretty;
  max-width: var(--ux-reading-width);
  line-height: var(--ux-leading-normal);
}


/* ==================================================================================
   UX.08 — LINKS: SUBLINHADO ANIMADO + FEEDBACK SEMÂNTICO
================================================================================== */
a[href]:not([class]) {
  color: inherit;
  position: relative;
  text-decoration: none;
  background-image: linear-gradient(var(--color-accent), var(--color-accent));
  background-size: 0% 1px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  transition: background-size var(--ux-dur-medium) var(--ux-ease-out),
              color var(--ux-dur-fast);
}

a[href]:not([class]):hover,
a[href]:not([class]):focus-visible {
  background-size: 100% 1px;
  color: var(--color-accent);
}

a[href]:not([class]):active {
  color: var(--color-accent);
  filter: brightness(0.92);
}

/* Ícone externo discreto para links que abrem nova aba */
a[href][target="_blank"]:not([class])::after {
  content: "↗";
  display: inline-block;
  margin-left: 0.15em;
  font-size: 0.85em;
  transition: transform var(--ux-dur-fast) var(--ux-ease-out);
}

a[href][target="_blank"]:not([class]):hover::after {
  transform: translate(2px, -2px);
}


/* ==================================================================================
   UX.09 — BUTTONS: FEEDBACK TÁCTIL (press, hover, ripple)
================================================================================== */
button,
[role="button"] {
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  min-height: var(--ux-touch-target-min);
  touch-action: manipulation;
  position: relative;
  overflow: hidden;
  transition: transform var(--ux-dur-fast) var(--ux-ease-out),
              box-shadow var(--ux-dur-fast) var(--ux-ease-out),
              background-color var(--ux-dur-fast),
              color var(--ux-dur-fast);
}

button:not(:disabled):hover,
[role="button"]:not([aria-disabled="true"]):hover {
  box-shadow: var(--ux-shadow-md);
}

button:not(:disabled):active,
[role="button"]:not([aria-disabled="true"]):active {
  transform: scale(0.97);
  box-shadow: var(--ux-shadow-inset);
  transition-duration: var(--ux-dur-xxfast);
}

button:disabled,
[role="button"][aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.55;
  filter: saturate(0.7);
  pointer-events: none;
}

/* Ripple effect — camada visual ao clicar */
.ux-ripple {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.ux-ripple::after {
  content: "";
  position: absolute;
  inset: 50% 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: currentColor;
  opacity: 0;
  transform: translate(-50%, -50%);
  transition: width 0.5s var(--ux-ease-out),
              height 0.5s var(--ux-ease-out),
              opacity 0.8s var(--ux-ease-out);
  pointer-events: none;
  z-index: -1;
}

.ux-ripple:active::after {
  width: 300%;
  height: 300%;
  opacity: 0.15;
  transition-duration: 0s;
}


/* ==================================================================================
   UX.10 — IMAGE LOADING (skeleton + blur-up)
================================================================================== */
@keyframes uxShimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.ux-skeleton {
  background: linear-gradient(
    90deg,
    var(--color-light-surface) 0%,
    rgba(241, 237, 233, 0.6) 50%,
    var(--color-light-surface) 100%
  );
  background-size: 200% 100%;
  animation: uxShimmer 1.4s linear infinite;
  border-radius: var(--radius-s);
  min-height: 1rem;
  color: transparent !important;
  user-select: none;
  pointer-events: none;
}

.ux-skeleton--circle {
  border-radius: 50%;
  aspect-ratio: 1;
}

.ux-skeleton--text {
  height: 0.875rem;
  width: 100%;
  margin-bottom: 0.5rem;
  border-radius: 4px;
}

.ux-skeleton--text:last-child {
  width: 60%;
}

/* Blur-up — imagem carrega desfocada e vai nítida */
img.ux-blur-up {
  filter: blur(20px);
  transform: scale(1.02);
  transition: filter var(--ux-dur-slow) var(--ux-ease-out),
              transform var(--ux-dur-slow) var(--ux-ease-out);
}

img.ux-blur-up.loaded,
img.ux-blur-up[data-loaded="true"] {
  filter: blur(0);
  transform: scale(1);
}

/* Placeholder de imagem antes de carregar */
img[loading="lazy"] {
  background: var(--color-light-surface);
  min-height: 40px;
}


/* ==================================================================================
   UX.11 — CARDS: HOVER ELEVATION + TILT SUAVE
================================================================================== */
.ux-card {
  background-color: var(--color-light);
  border-radius: var(--radius-m);
  padding: 1.5rem;
  box-shadow: var(--ux-shadow-sm);
  transition: transform var(--ux-dur-medium) var(--ux-ease-out),
              box-shadow var(--ux-dur-medium) var(--ux-ease-out),
              border-color var(--ux-dur-fast);
  border: 1px solid transparent;
  will-change: transform;
}

.ux-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--ux-shadow-lg);
  border-color: var(--color-border);
}

.ux-card:active {
  transform: translateY(-2px);
  transition-duration: var(--ux-dur-fast);
}

.ux-card--interactive {
  cursor: pointer;
}

.ux-card--interactive:focus-visible {
  outline-offset: 6px;
}


/* ==================================================================================
   UX.12 — SCROLL REVEAL (elementos aparecem ao entrar na viewport)
   Usa IntersectionObserver no JS para adicionar .is-visible.
================================================================================== */
[data-ux-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity var(--ux-dur-slow) var(--ux-ease-out),
              transform var(--ux-dur-slow) var(--ux-ease-out);
  will-change: opacity, transform;
}

[data-ux-reveal].is-visible,
[data-ux-reveal][data-visible="true"] {
  opacity: 1;
  transform: translateY(0);
}

[data-ux-reveal="left"] { transform: translateX(-30px); }
[data-ux-reveal="right"] { transform: translateX(30px); }
[data-ux-reveal="scale"] { transform: scale(0.94); }
[data-ux-reveal="fade"] { transform: none; }

[data-ux-reveal="left"].is-visible,
[data-ux-reveal="right"].is-visible {
  transform: translateX(0);
}

[data-ux-reveal="scale"].is-visible {
  transform: scale(1);
}

/* Delay em cascata via data-ux-delay */
[data-ux-delay="100"] { transition-delay: 0.1s; }
[data-ux-delay="200"] { transition-delay: 0.2s; }
[data-ux-delay="300"] { transition-delay: 0.3s; }
[data-ux-delay="400"] { transition-delay: 0.4s; }
[data-ux-delay="500"] { transition-delay: 0.5s; }
[data-ux-delay="600"] { transition-delay: 0.6s; }


/* ==================================================================================
   UX.13 — SCROLL PROGRESS BAR (indicador horizontal no topo)
================================================================================== */
.ux-scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: transparent;
  z-index: var(--ux-z-header);
  pointer-events: none;
}

.ux-scroll-progress__bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(
    90deg,
    var(--color-accent),
    var(--color-primary)
  );
  transition: width 0.1s linear;
  will-change: width;
}


/* ==================================================================================
   UX.14 — BACK TO TOP (botão flutuante, aparece após scroll)
================================================================================== */
.ux-back-to-top {
  position: fixed;
  right: max(1.25rem, var(--ux-safe-right));
  bottom: max(1.25rem, var(--ux-safe-bottom));
  width: var(--ux-touch-target-comfortable);
  height: var(--ux-touch-target-comfortable);
  border: none;
  border-radius: 50%;
  background: var(--color-dark);
  color: var(--color-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--ux-shadow-lg);
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px) scale(0.9);
  transition: opacity var(--ux-dur-medium) var(--ux-ease-out),
              transform var(--ux-dur-medium) var(--ux-ease-spring),
              background-color var(--ux-dur-fast);
  z-index: var(--ux-z-sticky);
}

.ux-back-to-top.is-visible,
.ux-back-to-top[data-visible="true"] {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.ux-back-to-top:hover {
  background: var(--color-accent);
  transform: translateY(-2px) scale(1.05);
}

.ux-back-to-top:active {
  transform: translateY(0) scale(0.95);
}


/* ==================================================================================
   UX.15 — FORM INPUTS: FEEDBACK VISUAL RICO
================================================================================== */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="number"],
input[type="password"],
input[type="search"],
textarea,
select {
  font: inherit;
  color: inherit;
  background-color: var(--color-light);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-s);
  padding: 0.75rem 1rem;
  width: 100%;
  min-height: var(--ux-touch-target-min);
  transition: border-color var(--ux-dur-fast),
              box-shadow var(--ux-dur-fast),
              background-color var(--ux-dur-fast);
}

input:hover:not(:disabled):not(:focus),
textarea:hover:not(:disabled):not(:focus),
select:hover:not(:disabled):not(:focus) {
  border-color: var(--color-muted);
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-accent-subtle);
  background-color: #fff;
}

input:disabled,
textarea:disabled,
select:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  background-color: var(--color-light-surface);
}

input[readonly],
textarea[readonly] {
  background-color: var(--color-light-surface);
  cursor: default;
}

/* Estados de validação */
input:invalid:not(:placeholder-shown):not(:focus),
textarea:invalid:not(:placeholder-shown):not(:focus) {
  border-color: #d64545;
  box-shadow: 0 0 0 3px rgba(214, 69, 69, 0.15);
}

input:valid:not(:placeholder-shown):not(:focus),
textarea:valid:not(:placeholder-shown):not(:focus) {
  border-color: #3a8a57;
}

/* Placeholder mais legível */
::placeholder {
  color: var(--color-muted);
  opacity: 1;
  font-style: italic;
}

/* Textarea — redimensionamento confortável */
textarea {
  resize: vertical;
  min-height: 8rem;
  line-height: var(--ux-leading-normal);
}


/* ==================================================================================
   UX.16 — FLOATING LABEL PATTERN
================================================================================== */
.ux-field {
  position: relative;
  margin-bottom: 1.25rem;
}

.ux-field__input {
  width: 100%;
  padding: 1.25rem 1rem 0.5rem;
}

.ux-field__label {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-muted);
  pointer-events: none;
  transition: top var(--ux-dur-fast) var(--ux-ease-out),
              transform var(--ux-dur-fast) var(--ux-ease-out),
              font-size var(--ux-dur-fast);
  background: transparent;
  padding: 0 0.25rem;
}

.ux-field__input:focus ~ .ux-field__label,
.ux-field__input:not(:placeholder-shown) ~ .ux-field__label {
  top: 0.35rem;
  transform: translateY(0);
  font-size: 0.75rem;
  color: var(--color-accent);
}


/* ==================================================================================
   UX.17 — CHECKBOX / RADIO customizados e acessíveis
================================================================================== */
.ux-checkbox,
.ux-radio {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  cursor: pointer;
  user-select: none;
  min-height: var(--ux-touch-target-min);
  padding: 0.25rem 0;
}

.ux-checkbox input,
.ux-radio input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.ux-checkbox__box,
.ux-radio__box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid var(--color-border);
  background: var(--color-light);
  transition: border-color var(--ux-dur-fast),
              background-color var(--ux-dur-fast),
              box-shadow var(--ux-dur-fast);
  flex-shrink: 0;
}

.ux-checkbox__box { border-radius: 4px; }
.ux-radio__box    { border-radius: 50%; }

.ux-checkbox:hover .ux-checkbox__box,
.ux-radio:hover .ux-radio__box {
  border-color: var(--color-accent);
}

.ux-checkbox input:focus-visible ~ .ux-checkbox__box,
.ux-radio input:focus-visible ~ .ux-radio__box {
  box-shadow: var(--ux-shadow-focus);
}

.ux-checkbox input:checked ~ .ux-checkbox__box {
  background: var(--color-accent);
  border-color: var(--color-accent);
}

.ux-checkbox input:checked ~ .ux-checkbox__box::after {
  content: "";
  width: 0.3rem;
  height: 0.6rem;
  border: solid var(--color-light);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) translate(-1px, -1px);
  animation: uxCheckPop var(--ux-dur-fast) var(--ux-ease-spring);
}

.ux-radio input:checked ~ .ux-radio__box::after {
  content: "";
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  background: var(--color-accent);
  animation: uxCheckPop var(--ux-dur-fast) var(--ux-ease-spring);
}

@keyframes uxCheckPop {
  0%   { transform: scale(0) rotate(45deg); }
  70%  { transform: scale(1.2) rotate(45deg); }
  100% { transform: scale(1) rotate(45deg); }
}


/* ==================================================================================
   UX.18 — TOOLTIPS nativos (aparecem no hover/focus)
================================================================================== */
[data-ux-tooltip] {
  position: relative;
}

[data-ux-tooltip]::before,
[data-ux-tooltip]::after {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--ux-dur-fast) var(--ux-ease-out),
              transform var(--ux-dur-fast) var(--ux-ease-out);
  z-index: var(--ux-z-tooltip);
}

[data-ux-tooltip]::before {
  content: attr(data-ux-tooltip);
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  background: var(--color-dark);
  color: var(--color-light);
  padding: 0.4rem 0.7rem;
  border-radius: var(--radius-s);
  font: 500 0.75rem var(--font-label);
  letter-spacing: 0.04em;
  white-space: nowrap;
  box-shadow: var(--ux-shadow-md);
  max-width: 220px;
}

[data-ux-tooltip]::after {
  content: "";
  bottom: calc(100% + 2px);
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  border: 4px solid transparent;
  border-top-color: var(--color-dark);
}

[data-ux-tooltip]:hover::before,
[data-ux-tooltip]:hover::after,
[data-ux-tooltip]:focus-visible::before,
[data-ux-tooltip]:focus-visible::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}


/* ==================================================================================
   UX.19 — LOADING SPINNER / DOTS
================================================================================== */
.ux-spinner {
  display: inline-block;
  width: 1.5rem;
  height: 1.5rem;
  border: 2px solid var(--color-border);
  border-top-color: var(--color-accent);
  border-radius: 50%;
  animation: uxSpin 0.8s linear infinite;
}

.ux-spinner--sm { width: 1rem; height: 1rem; border-width: 1.5px; }
.ux-spinner--lg { width: 2.5rem; height: 2.5rem; border-width: 3px; }

@keyframes uxSpin {
  to { transform: rotate(360deg); }
}

.ux-dots {
  display: inline-flex;
  gap: 0.35rem;
}

.ux-dots span {
  width: 0.5rem;
  height: 0.5rem;
  background: var(--color-accent);
  border-radius: 50%;
  animation: uxBounce 1.4s ease-in-out infinite both;
}

.ux-dots span:nth-child(1) { animation-delay: -0.32s; }
.ux-dots span:nth-child(2) { animation-delay: -0.16s; }
.ux-dots span:nth-child(3) { animation-delay: 0s; }

@keyframes uxBounce {
  0%, 80%, 100% { transform: scale(0); opacity: 0.4; }
  40%           { transform: scale(1); opacity: 1; }
}


/* ==================================================================================
   UX.20 — PROGRESS BAR (barra indeterminada e determinada)
================================================================================== */
.ux-progress {
  width: 100%;
  height: 6px;
  background: var(--color-light-surface);
  border-radius: 20rem;
  overflow: hidden;
  position: relative;
}

.ux-progress__bar {
  height: 100%;
  background: linear-gradient(90deg, var(--color-accent), var(--color-primary));
  border-radius: 20rem;
  width: 0;
  transition: width var(--ux-dur-medium) var(--ux-ease-out);
}

.ux-progress--indeterminate .ux-progress__bar {
  width: 40%;
  animation: uxProgressSlide 1.4s var(--ux-ease-in-out) infinite;
}

@keyframes uxProgressSlide {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(300%); }
}


/* ==================================================================================
   UX.21 — BADGES / TAGS com hover de marca
================================================================================== */
.ux-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  font: 500 0.75rem var(--font-label);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-dark);
  background: var(--color-light-surface);
  border-radius: 20rem;
  border: 1px solid transparent;
  transition: background-color var(--ux-dur-fast),
              color var(--ux-dur-fast),
              border-color var(--ux-dur-fast);
}

.ux-badge--accent   { background: var(--color-accent-subtle); color: var(--color-accent); }
.ux-badge--primary  { background: var(--color-primary-light); color: var(--color-primary-dark); }
.ux-badge--outline  { background: transparent; border-color: var(--color-border); color: var(--color-muted); }

.ux-badge:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

/* cv__tag: incrementa os existentes do CV sem quebrar */
.cv__tag {
  transition: background-color var(--ux-dur-fast),
              color var(--ux-dur-fast),
              transform var(--ux-dur-fast);
  cursor: default;
}

.cv__tag:hover {
  background-color: var(--color-accent-subtle);
  color: var(--color-accent);
  transform: translateY(-1px);
}


/* ==================================================================================
   UX.22 — LIST HOVER (listas com destaque ao passar)
================================================================================== */
.cv__list li,
.ux-list li {
  position: relative;
  padding: 0.2rem 0 0.2rem 1rem;
  transition: color var(--ux-dur-fast), padding-left var(--ux-dur-fast);
}

.cv__list li::before,
.ux-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 6px;
  height: 1px;
  background: var(--color-muted);
  transform: translateY(-50%);
  transition: width var(--ux-dur-fast) var(--ux-ease-out),
              background-color var(--ux-dur-fast);
}

.cv__list li:hover,
.ux-list li:hover {
  color: var(--color-accent);
  padding-left: 1.35rem;
}

.cv__list li:hover::before,
.ux-list li:hover::before {
  width: 12px;
  background: var(--color-accent);
}


/* ==================================================================================
   UX.23 — TOAST / SNACKBAR
================================================================================== */
.ux-toast-stack {
  position: fixed;
  bottom: max(1.5rem, var(--ux-safe-bottom));
  right: max(1.5rem, var(--ux-safe-right));
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  z-index: var(--ux-z-toast);
  max-width: min(380px, calc(100vw - 3rem));
  pointer-events: none;
}

.ux-toast {
  background: var(--color-dark);
  color: var(--color-light);
  padding: 0.9rem 1.1rem;
  border-radius: var(--radius-s);
  box-shadow: var(--ux-shadow-xl);
  font-size: 0.9rem;
  line-height: 1.4;
  display: flex;
  gap: 0.75rem;
  align-items: center;
  animation: uxToastIn var(--ux-dur-medium) var(--ux-ease-spring) both;
  pointer-events: auto;
  border-left: 3px solid var(--color-accent);
}

.ux-toast--success { border-left-color: #3a8a57; }
.ux-toast--error   { border-left-color: #d64545; }
.ux-toast--info    { border-left-color: var(--color-primary-light); }

.ux-toast[data-leaving="true"] {
  animation: uxToastOut var(--ux-dur-fast) var(--ux-ease-in) forwards;
}

@keyframes uxToastIn {
  from { opacity: 0; transform: translateX(20px) scale(0.98); }
  to   { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes uxToastOut {
  to { opacity: 0; transform: translateX(20px) scale(0.96); }
}


/* ==================================================================================
   UX.24 — MODAL / DIALOG polido
================================================================================== */
.ux-modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background: rgba(27, 26, 28, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: var(--ux-z-modal);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--ux-dur-medium) var(--ux-ease-out),
              visibility 0s linear var(--ux-dur-medium);
}

.ux-modal[data-open="true"],
.ux-modal.is-open {
  opacity: 1;
  visibility: visible;
  transition-delay: 0s;
}

.ux-modal__panel {
  background: var(--color-light);
  border-radius: var(--radius-l);
  padding: 2rem;
  max-width: min(560px, 100%);
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--ux-shadow-2xl);
  transform: translateY(16px) scale(0.98);
  transition: transform var(--ux-dur-medium) var(--ux-ease-spring);
}

.ux-modal[data-open="true"] .ux-modal__panel,
.ux-modal.is-open .ux-modal__panel {
  transform: translateY(0) scale(1);
}

.ux-modal__close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: var(--ux-touch-target-min);
  height: var(--ux-touch-target-min);
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  line-height: 1;
  transition: background-color var(--ux-dur-fast), transform var(--ux-dur-fast);
}

.ux-modal__close:hover {
  background-color: var(--color-light-surface);
  transform: rotate(90deg);
}


/* ==================================================================================
   UX.25 — ACCORDION / DETAILS aprimorado
================================================================================== */
details.ux-details {
  border-bottom: 1px solid var(--color-border);
  padding: 0.5rem 0;
}

details.ux-details[open] {
  border-bottom-color: var(--color-accent);
}

details.ux-details summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  list-style: none;
  padding: 0.75rem 0;
  font-weight: 500;
  transition: color var(--ux-dur-fast);
}

details.ux-details summary::-webkit-details-marker { display: none; }

details.ux-details summary::after {
  content: "+";
  font-size: 1.5rem;
  line-height: 1;
  transition: transform var(--ux-dur-medium) var(--ux-ease-spring);
}

details.ux-details[open] summary::after {
  transform: rotate(45deg);
  color: var(--color-accent);
}

details.ux-details summary:hover {
  color: var(--color-accent);
}

details.ux-details > *:not(summary) {
  animation: uxDetailsOpen var(--ux-dur-medium) var(--ux-ease-out) both;
  padding-bottom: 0.75rem;
}

@keyframes uxDetailsOpen {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}


/* ==================================================================================
   UX.26 — TABS com indicador animado
================================================================================== */
.ux-tabs {
  display: flex;
  gap: 0.25rem;
  border-bottom: 1px solid var(--color-border);
  overflow-x: auto;
  scrollbar-width: none;
}

.ux-tabs::-webkit-scrollbar { display: none; }

.ux-tab {
  border: none;
  background: transparent;
  padding: 0.75rem 1.25rem;
  font: inherit;
  cursor: pointer;
  color: var(--color-muted);
  position: relative;
  white-space: nowrap;
  min-height: var(--ux-touch-target-min);
  transition: color var(--ux-dur-fast);
}

.ux-tab::after {
  content: "";
  position: absolute;
  left: 1rem;
  right: 1rem;
  bottom: -1px;
  height: 2px;
  background: var(--color-accent);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform var(--ux-dur-medium) var(--ux-ease-out);
}

.ux-tab:hover,
.ux-tab[aria-selected="true"] {
  color: var(--color-dark);
}

.ux-tab[aria-selected="true"]::after {
  transform: scaleX(1);
}


/* ==================================================================================
   UX.27 — CURSOR FEEDBACK (micro interações com cursor)
================================================================================== */
.ux-cursor-pointer { cursor: pointer; }
.ux-cursor-text    { cursor: text; }
.ux-cursor-help    { cursor: help; }
.ux-cursor-grab    { cursor: grab; }
.ux-cursor-grab:active { cursor: grabbing; }
.ux-cursor-zoom    { cursor: zoom-in; }
.ux-cursor-zoom:active { cursor: zoom-out; }
.ux-cursor-none    { cursor: none; }

/* Feedback de "clicável" em qualquer elemento */
[data-ux-clickable] {
  cursor: pointer;
  transition: opacity var(--ux-dur-fast), transform var(--ux-dur-fast);
}

[data-ux-clickable]:hover   { opacity: 0.85; }
[data-ux-clickable]:active  { transform: scale(0.98); }


/* ==================================================================================
   UX.28 — IMAGE ZOOM ON HOVER (delicado)
================================================================================== */
.ux-img-zoom {
  overflow: hidden;
  border-radius: var(--radius-s);
  position: relative;
  isolation: isolate;
}

.ux-img-zoom img {
  transition: transform var(--ux-dur-slow) var(--ux-ease-out),
              filter var(--ux-dur-slow) var(--ux-ease-out);
  will-change: transform;
}

.ux-img-zoom:hover img {
  transform: scale(1.06);
  filter: brightness(1.04);
}

.ux-img-zoom::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(27, 26, 28, 0.45), transparent 55%);
  opacity: 0;
  transition: opacity var(--ux-dur-medium) var(--ux-ease-out);
  pointer-events: none;
}

.ux-img-zoom:hover::after { opacity: 1; }


/* ==================================================================================
   UX.29 — GALERIA: foco e arrasto
================================================================================== */
.ux-scroll-gallery {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 1rem;
  -webkit-overflow-scrolling: touch;
  cursor: grab;
  padding-bottom: 0.5rem;
}

.ux-scroll-gallery:active { cursor: grabbing; }

.ux-scroll-gallery > * {
  flex: 0 0 auto;
  scroll-snap-align: start;
  transition: transform var(--ux-dur-medium) var(--ux-ease-out);
}

.ux-scroll-gallery > *:hover {
  transform: scale(1.02);
}


/* ==================================================================================
   UX.30 — BREADCRUMB com separador suave
================================================================================== */
.ux-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--color-muted);
  align-items: center;
}

.ux-breadcrumb li {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.ux-breadcrumb li:not(:last-child)::after {
  content: "/";
  color: var(--color-border);
  padding-left: 0.25rem;
}

.ux-breadcrumb a {
  color: var(--color-muted);
  transition: color var(--ux-dur-fast);
}

.ux-breadcrumb a:hover,
.ux-breadcrumb a:focus-visible {
  color: var(--color-accent);
}

.ux-breadcrumb [aria-current="page"] {
  color: var(--color-dark);
  font-weight: 500;
}


/* ==================================================================================
   UX.31 — EMPTY STATE (quando não há conteúdo)
================================================================================== */
.ux-empty {
  display: grid;
  place-items: center;
  text-align: center;
  padding: 3rem 1.5rem;
  gap: 1rem;
  max-width: 420px;
  margin-inline: auto;
}

.ux-empty__icon {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  background: var(--color-light-surface);
  border-radius: 50%;
  color: var(--color-muted);
  font-size: 1.5rem;
}

.ux-empty__title {
  font: 500 1.125rem var(--font-titles);
  color: var(--color-dark);
}

.ux-empty__text {
  color: var(--color-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}


/* ==================================================================================
   UX.32 — ASPECT RATIO UTILITIES (evitam layout shift)
================================================================================== */
.ux-ratio          { aspect-ratio: 1 / 1; overflow: hidden; }
.ux-ratio--4-3     { aspect-ratio: 4 / 3; overflow: hidden; }
.ux-ratio--16-9    { aspect-ratio: 16 / 9; overflow: hidden; }
.ux-ratio--3-4     { aspect-ratio: 3 / 4; overflow: hidden; }
.ux-ratio--21-9    { aspect-ratio: 21 / 9; overflow: hidden; }
.ux-ratio--golden  { aspect-ratio: 1.618 / 1; overflow: hidden; }

.ux-ratio > img,
.ux-ratio > video,
.ux-ratio > iframe {
  width: 100%;
  height: 100%;
  object-fit: cover;
}


/* ==================================================================================
   UX.33 — TOUCH OPTIMIZATION (mobile-first UX)
================================================================================== */
@media (hover: none) and (pointer: coarse) {
  /* Em dispositivos touch, remove hover artificial que "gruda" */
  a[href]:not([class]):hover {
    background-size: 0% 1px;
    color: inherit;
  }

  /* Aumenta áreas clicáveis */
  a, button, [role="button"], .cv__tag {
    min-height: var(--ux-touch-target-comfortable);
  }

  .cv__list li {
    padding-top: 0.45rem;
    padding-bottom: 0.45rem;
  }

  /* Remove animações pesadas que "travam" no toque */
  .ux-card:hover,
  .ux-img-zoom:hover img {
    transform: none;
  }

  /* Em vez de hover, confia em :active */
  .ux-card:active {
    transform: scale(0.99);
    box-shadow: var(--ux-shadow-md);
  }
}


/* ==================================================================================
   UX.34 — SAFE AREA (iOS notch, Android punch-hole)
================================================================================== */
@supports (padding: env(safe-area-inset-top)) {
  body {
    padding-top: var(--ux-safe-top);
    padding-bottom: var(--ux-safe-bottom);
  }

  .header,
  header {
    padding-top: calc(1.5rem + var(--ux-safe-top));
  }

  .main-links,
  .next-section {
    padding-left: calc(1rem + var(--ux-safe-left));
    padding-right: calc(1rem + var(--ux-safe-right));
  }
}


/* ==================================================================================
   UX.35 — ORIENTATION: PAISAGEM EM MOBILE
   Ajusta alturas para não cortar conteúdo em landscape pequeno.
================================================================================== */
@media (max-height: 480px) and (orientation: landscape) {
  .hero,
  .landing-hero,
  [class*="hero"] {
    min-height: auto;
    padding-top: 4rem;
    padding-bottom: 2rem;
  }

  .ux-back-to-top {
    width: 38px;
    height: 38px;
  }
}


/* ==================================================================================
   UX.36 — DARK MODE (sem remover a identidade visual)
   Aplicado apenas se usuário marcar prefers-color-scheme: dark e desde que
   o site não tenha marcação explícita de theme="light".
================================================================================== */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --color-light: #1b1a1c;
    --color-light-surface: #2e2c30;
    --color-light-opacity: #1b1a1ccc;
    --color-dark: #f1ede9;
    --color-dark-surface: #2e2c30;
    --color-border: #454347;
    --color-muted: #a8a39e;
    --ux-shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.3);
    --ux-shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.35);
    --ux-shadow-md: 0 4px 8px rgba(0, 0, 0, 0.4);
    --ux-shadow-lg: 0 10px 20px rgba(0, 0, 0, 0.45);
    --ux-shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.5);
    --ux-focus-ring-color: var(--color-primary-light);
  }

  :root:not([data-theme="light"]) img:not([src*=".svg"]) {
    filter: brightness(0.92) contrast(1.02);
  }
}


/* ==================================================================================
   UX.37 — HIGH CONTRAST MODE (Windows / acessibilidade)
================================================================================== */
@media (prefers-contrast: more) {
  :root {
    --color-border: #000;
    --color-muted: #000;
    --ux-focus-ring-width: 4px;
  }

  a[href]:not([class]) {
    text-decoration: underline;
  }

  button,
  [role="button"] {
    border: 2px solid currentColor;
  }

  .ux-card {
    border: 2px solid currentColor;
  }
}

@media (prefers-contrast: less) {
  :root {
    --ux-shadow-sm: none;
    --ux-shadow-md: 0 1px 2px rgba(0, 0, 0, 0.04);
    --ux-shadow-lg: 0 2px 4px rgba(0, 0, 0, 0.05);
  }
}


/* ==================================================================================
   UX.38 — REDUCED TRANSPARENCY (iOS / Windows)
================================================================================== */
@media (prefers-reduced-transparency: reduce) {
  .ux-modal {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(27, 26, 28, 0.9);
  }

  .color-light-opacity,
  .color-dark-opacity {
    opacity: 1 !important;
  }
}


/* ==================================================================================
   UX.39 — PRINT STYLES (imprime limpo)
================================================================================== */
@media print {
  *,
  *::before,
  *::after {
    background: transparent !important;
    color: #000 !important;
    box-shadow: none !important;
    text-shadow: none !important;
    animation: none !important;
    transition: none !important;
  }

  html, body {
    font-size: 11pt;
    line-height: 1.45;
  }

  a[href]:not([class])::after {
    content: " (" attr(href) ")";
    font-size: 0.85em;
    color: #555 !important;
  }

  .header,
  .footer,
  .ux-back-to-top,
  .ux-scroll-progress,
  .ux-toast-stack,
  .next-section,
  [data-ux-print="hide"] {
    display: none !important;
  }

  h1, h2, h3, h4 {
    page-break-after: avoid;
    break-after: avoid;
  }

  img, table, figure {
    page-break-inside: avoid;
    break-inside: avoid;
  }

  p, li, blockquote {
    orphans: 3;
    widows: 3;
  }

  .cv,
  .cv__col,
  .cv__block {
    page-break-inside: avoid;
    break-inside: avoid;
  }
}


/* ==================================================================================
   UX.40 — REDUCED MOTION (respeita quem sente enjoo com animações)
   Completa o bloco existente desativando TUDO que anima.
================================================================================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  [data-ux-reveal] {
    opacity: 1;
    transform: none;
  }

  .ux-skeleton {
    animation: none;
    background: var(--color-light-surface);
  }

  .ux-spinner {
    animation-duration: 0.001ms !important;
  }

  body {
    animation: none;
  }

  .ux-back-to-top {
    transform: none;
  }
}


/* ==================================================================================
   UX.41 — FOCUS WITHIN (destaca grupos quando algo interno recebe foco)
================================================================================== */
.ux-card:focus-within,
.cv__block:focus-within {
  box-shadow: var(--ux-shadow-lg);
  border-color: var(--color-accent);
}

.ux-field:focus-within .ux-field__label {
  color: var(--color-accent);
}


/* ==================================================================================
   UX.42 — STICKY HEADER COM COMPRESSÃO NO SCROLL
================================================================================== */
.header,
header[data-ux-sticky] {
  position: sticky;
  top: 0;
  z-index: var(--ux-z-header);
  transition: padding var(--ux-dur-medium) var(--ux-ease-out),
              background-color var(--ux-dur-medium),
              box-shadow var(--ux-dur-medium);
  backdrop-filter: saturate(1.2) blur(6px);
  -webkit-backdrop-filter: saturate(1.2) blur(6px);
}

body[data-scrolled="true"] .header,
body[data-scrolled="true"] header[data-ux-sticky] {
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
  background-color: var(--color-light-opacity);
  box-shadow: var(--ux-shadow-sm);
}


/* ==================================================================================
   UX.43 — HOVERABLE TABLES (para portfolios com listagens)
================================================================================== */
.ux-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.ux-table th,
.ux-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}

.ux-table thead th {
  font: 500 0.75rem var(--font-label);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-muted);
  position: sticky;
  top: 0;
  background: var(--color-light);
}

.ux-table tbody tr {
  transition: background-color var(--ux-dur-fast);
}

.ux-table tbody tr:hover {
  background-color: var(--color-accent-subtle);
}

.ux-table tbody tr:focus-within {
  background-color: var(--color-accent-subtle);
  outline: 2px solid var(--color-accent);
  outline-offset: -2px;
}


/* ==================================================================================
   UX.44 — CODE / KBD (tipografia de código confortável)
================================================================================== */
code,
kbd,
samp,
pre {
  font-family: var(--font-label);
  font-size: 0.875em;
}

:not(pre) > code {
  padding: 0.15em 0.4em;
  background: var(--color-light-surface);
  border-radius: 4px;
  border: 1px solid var(--color-border);
  white-space: nowrap;
}

kbd {
  display: inline-block;
  padding: 0.2em 0.5em;
  background: var(--color-light);
  border: 1px solid var(--color-border);
  border-bottom-width: 2px;
  border-radius: 4px;
  font-size: 0.8em;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05);
}

pre {
  background: var(--color-dark);
  color: var(--color-light);
  padding: 1rem 1.25rem;
  border-radius: var(--radius-s);
  overflow-x: auto;
  line-height: 1.5;
}


/* ==================================================================================
   UX.45 — FIGURE / CAPTION
================================================================================== */
figure {
  margin: 1.5rem 0;
}

figcaption {
  margin-top: 0.6rem;
  font: 400 0.8125rem var(--font-label);
  color: var(--color-muted);
  letter-spacing: 0.04em;
  text-align: center;
}


/* ==================================================================================
   UX.46 — BLOCKQUOTE (citações com destaque sutil)
================================================================================== */
blockquote {
  border-left: 3px solid var(--color-accent);
  padding: 0.5rem 0 0.5rem 1.25rem;
  margin: 1.5rem 0;
  font-style: italic;
  color: var(--color-dark);
  font-size: 1.05rem;
  line-height: 1.6;
}

blockquote cite {
  display: block;
  margin-top: 0.5rem;
  font-style: normal;
  font-size: 0.825rem;
  color: var(--color-muted);
  font-family: var(--font-label);
  letter-spacing: 0.05em;
}


/* ==================================================================================
   UX.47 — HR SUTIL
================================================================================== */
hr {
  border: none;
  height: 1px;
  background: linear-gradient(
    to right,
    transparent,
    var(--color-border),
    transparent
  );
  margin: 2rem 0;
}


/* ==================================================================================
   UX.48 — MARK / HIGHLIGHT
================================================================================== */
mark {
  background-color: var(--color-accent-subtle);
  color: var(--color-accent);
  padding: 0.05em 0.25em;
  border-radius: 3px;
  font-weight: 500;
}


/* ==================================================================================
   UX.49 — DROPDOWN / MENU FLOATING
================================================================================== */
.ux-dropdown {
  position: relative;
  display: inline-block;
}

.ux-dropdown__menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 180px;
  background: var(--color-light);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-s);
  box-shadow: var(--ux-shadow-lg);
  padding: 0.35rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity var(--ux-dur-fast) var(--ux-ease-out),
              transform var(--ux-dur-fast) var(--ux-ease-out),
              visibility 0s linear var(--ux-dur-fast);
  z-index: var(--ux-z-sticky);
}

.ux-dropdown[data-open="true"] .ux-dropdown__menu,
.ux-dropdown:focus-within .ux-dropdown__menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition-delay: 0s;
}

.ux-dropdown__item {
  display: block;
  padding: 0.5rem 0.75rem;
  border-radius: 4px;
  color: inherit;
  text-decoration: none;
  transition: background-color var(--ux-dur-fast), color var(--ux-dur-fast);
}

.ux-dropdown__item:hover,
.ux-dropdown__item:focus-visible {
  background: var(--color-accent-subtle);
  color: var(--color-accent);
  outline: none;
}


/* ==================================================================================
   UX.50 — SCROLL SNAP HELPERS
================================================================================== */
.ux-snap-x {
  scroll-snap-type: x mandatory;
  overflow-x: auto;
  display: flex;
  gap: 1rem;
}

.ux-snap-x > * {
  scroll-snap-align: start;
  flex: 0 0 auto;
}

.ux-snap-y {
  scroll-snap-type: y mandatory;
  overflow-y: auto;
  max-height: 100dvh;
}

.ux-snap-y > * {
  scroll-snap-align: start;
  min-height: 100dvh;
}


/* ==================================================================================
   UX.51 — GRID AUTO-FIT (responsivo sem media queries)
================================================================================== */
.ux-grid-auto {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
  gap: 1.25rem;
}

.ux-grid-auto--sm {
  grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr));
  gap: 0.75rem;
}

.ux-grid-auto--lg {
  grid-template-columns: repeat(auto-fit, minmax(min(360px, 100%), 1fr));
  gap: 2rem;
}


/* ==================================================================================
   UX.52 — STACK UTILS (espaçamento vertical consistente)
================================================================================== */
.ux-stack        > * + * { margin-top: 1rem; }
.ux-stack-sm     > * + * { margin-top: 0.5rem; }
.ux-stack-lg     > * + * { margin-top: 2rem; }
.ux-stack-xl     > * + * { margin-top: 3rem; }


/* ==================================================================================
   UX.53 — ANIMATION UTILS (pequenas animações reutilizáveis)
================================================================================== */
@keyframes uxFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes uxSlideUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes uxSlideDown {
  from { opacity: 0; transform: translateY(-16px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes uxScaleIn {
  from { opacity: 0; transform: scale(0.94); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes uxPulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.55; }
}

@keyframes uxFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}

@keyframes uxShake {
  0%, 100%        { transform: translateX(0); }
  20%, 60%        { transform: translateX(-4px); }
  40%, 80%        { transform: translateX(4px); }
}

.ux-anim-fade       { animation: uxFadeIn var(--ux-dur-medium) var(--ux-ease-out) both; }
.ux-anim-slide-up   { animation: uxSlideUp var(--ux-dur-medium) var(--ux-ease-out) both; }
.ux-anim-slide-down { animation: uxSlideDown var(--ux-dur-medium) var(--ux-ease-out) both; }
.ux-anim-scale      { animation: uxScaleIn var(--ux-dur-medium) var(--ux-ease-spring) both; }
.ux-anim-pulse      { animation: uxPulse 2s ease-in-out infinite; }
.ux-anim-float      { animation: uxFloat 3s ease-in-out infinite; }
.ux-anim-shake      { animation: uxShake 0.4s ease-in-out; }


/* ==================================================================================
   UX.54 — KEYBOARD INDICATOR
   Mostra as teclas nas tooltips para usuários avançados.
================================================================================== */
.ux-key-hint {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  font-family: var(--font-label);
  font-size: 0.7rem;
  color: var(--color-muted);
  margin-left: 0.5rem;
}

.ux-key-hint kbd {
  font-size: 0.7rem;
  padding: 0.1em 0.35em;
}


/* ==================================================================================
   UX.55 — MEDIA (vídeos com estado de reprodução)
================================================================================== */
video {
  border-radius: var(--radius-s);
  overflow: hidden;
  background: var(--color-dark);
}

video[controls]:focus-visible {
  box-shadow: var(--ux-shadow-focus);
}

video::-webkit-media-controls-panel {
  background: rgba(27, 26, 28, 0.75);
}


/* ==================================================================================
   UX.56 — EXTRA RESPONSIVE POLISH
   Pequenos ajustes em breakpoints estratégicos.
================================================================================== */
@media (max-width: 1024px) {
  :root {
    --ux-reading-width: 62ch;
  }
}

@media (max-width: 768px) {
  :root {
    --ux-focus-ring-offset: 2px;
    --ux-reading-width: 58ch;
  }

  .ux-back-to-top {
    width: 44px;
    height: 44px;
    font-size: 1.1rem;
  }
}

@media (max-width: 480px) {
  :root {
    --ux-reading-width: 100%;
  }

  .ux-modal {
    padding: 0.75rem;
  }

  .ux-modal__panel {
    padding: 1.25rem;
    border-radius: var(--radius-m);
  }

  .ux-toast-stack {
    right: 0.75rem;
    left: 0.75rem;
    max-width: calc(100vw - 1.5rem);
  }
}


/* ==================================================================================
   UX.57 — SELECTION UTILITY + HIDE SCROLLBAR UTILITY
================================================================================== */
.ux-no-select {
  user-select: none;
  -webkit-user-select: none;
}

.ux-hide-scrollbar {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.ux-hide-scrollbar::-webkit-scrollbar {
  display: none;
}


/* ==================================================================================
   UX.58 — TEXT UTILITIES (truncate, clamp, balance)
================================================================================== */
.ux-truncate {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.ux-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ux-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ux-clamp-4 {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ux-balance { text-wrap: balance; }
.ux-pretty  { text-wrap: pretty; }
.ux-nowrap  { white-space: nowrap; }


/* ==================================================================================
   UX.59 — DRAG & DROP VISUAL
================================================================================== */
[draggable="true"] {
  cursor: grab;
  transition: opacity var(--ux-dur-fast), transform var(--ux-dur-fast);
}

[draggable="true"]:active {
  cursor: grabbing;
}

[data-ux-dragging="true"] {
  opacity: 0.55;
  transform: scale(0.98);
}

[data-ux-drop-target="true"] {
  outline: 2px dashed var(--color-accent);
  outline-offset: 4px;
  background-color: var(--color-accent-subtle);
}


/* ==================================================================================
   UX.60 — VISUALLY HIDDEN (acessibilidade para screen readers)
================================================================================== */
.ux-visually-hidden,
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.ux-visually-hidden-focusable:not(:focus):not(:focus-within) {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}


/* ==================================================================================
   UX.61 — HOVER SUPPORT GUARDS (aplica efeitos só quando hover real existe)
================================================================================== */
@media (hover: hover) and (pointer: fine) {
  .ux-card-hover {
    transition: transform var(--ux-dur-medium) var(--ux-ease-out),
                box-shadow var(--ux-dur-medium) var(--ux-ease-out);
  }
  .ux-card-hover:hover {
    transform: translateY(-6px) rotate(-0.5deg);
    box-shadow: var(--ux-shadow-xl);
  }
}


/* ==================================================================================
   UX.62 — SCROLL-DRIVEN ANIMATION (progressiva, cai pra fallback)
================================================================================== */
@supports (animation-timeline: view()) {
  [data-ux-scroll-anim] {
    animation: uxSlideUp 1s linear both;
    animation-timeline: view();
    animation-range: entry 0% cover 40%;
  }
}


/* ==================================================================================
   UX.63 — MEDIA EMBEDS RESPONSIVOS
================================================================================== */
iframe[src*="youtube"],
iframe[src*="vimeo"],
iframe[src*="maps.google"] {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: none;
  border-radius: var(--radius-s);
  background: var(--color-light-surface);
}


/* ==================================================================================
   UX.64 — FINAL POLISH: CV + PORTFOLIO UX EXTRAS
   Reforços específicos sobre classes já existentes sem quebrá-las.
================================================================================== */
.cv__block {
  transition: transform var(--ux-dur-medium) var(--ux-ease-out),
              box-shadow var(--ux-dur-medium) var(--ux-ease-out);
  border-radius: var(--radius-s);
  padding: 0.5rem;
  margin: -0.5rem -0.5rem 1rem;
}

.cv__block:hover {
  background-color: rgba(241, 237, 233, 0.04);
}

.cv__heading {
  position: relative;
  display: inline-block;
}

.cv__heading::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform var(--ux-dur-medium) var(--ux-ease-out);
}

.cv__block:hover .cv__heading::after,
.cv__block:focus-within .cv__heading::after {
  transform: scaleX(0.3);
}

.cv__role {
  transition: color var(--ux-dur-fast);
}

.cv__entry:hover .cv__role {
  color: var(--color-primary-light);
}

.portfolio-grid__project {
  transition: filter var(--ux-dur-medium) var(--ux-ease-out);
}

.portfolio-grid:hover .portfolio-grid__project:not(:hover) {
  filter: brightness(0.85) saturate(0.85);
}

.portfolio-grid__project:focus-within {
  filter: none !important;
  outline: 2px solid var(--color-accent);
  outline-offset: 4px;
  border-radius: var(--radius-s);
}


/* ==================================================================================
   UX.65 — FOOTER POLISH (pequeno refinamento para melhor leitura)
================================================================================== */
.footer a,
footer a {
  transition: color var(--ux-dur-fast), transform var(--ux-dur-fast);
  display: inline-block;
}

.footer a:hover,
footer a:hover {
  color: var(--color-accent);
  transform: translateY(-1px);
}


/* ==================================================================================
   UX.66 — MENU OVERLAY: travar scroll e melhorar foco
================================================================================== */
body.menu-open {
  overscroll-behavior: contain;
}

body.menu-open [aria-hidden="true"] {
  visibility: hidden;
}


/* ==================================================================================
   UX.67 — SCROLL MARGINS PARA ÂNCORAS
   Quando o usuário clica em link #ancora, evita que o header sticky cubra o título.
================================================================================== */
:target,
[id] {
  scroll-margin-top: calc(var(--header-height, 5rem) + 1rem);
}


/* ==================================================================================
   UX.68 — CONTENT-VISIBILITY (performance em listas longas)
================================================================================== */
.ux-cv-auto {
  content-visibility: auto;
  contain-intrinsic-size: 300px;
}


/* ==================================================================================
   UX.69 — IMAGE ERROR FALLBACK
================================================================================== */
img[alt]:not([alt=""]) {
  font-size: 0.8rem;
  color: var(--color-muted);
  font-style: italic;
  text-align: center;
}


/* ==================================================================================
   UX.70 — FIM DO BLOCO UX
   Total de melhorias aplicadas: ~70 seções / ~1100 linhas.
================================================================================== */


/* ==================================================================================
   UX.71 — NEXT SECTION COMPACTA (override)
   A tarjeta "Próxima Sección" deixa de ocupar 100dvh e passa a ocupar
   apenas a altura do conteúdo + 40px acima e 40px abaixo do texto.
   Mantém as animações de emergência (is-ready / is-focused).
================================================================================== */
.next-section {
  height: auto;
  min-height: clamp(6.5rem, 10vw, 9rem);
}

.main-links__item--next {
  height: auto;
  min-height: min-content;
  --hover-height: auto;
}

.main-links__item--next > a {
  height: auto;
  min-height: auto;
  padding-top: 40px;
  padding-bottom: 40px;
  padding-left: clamp(1rem, 5vw, 2rem);
  padding-right: clamp(1rem, 5vw, 2rem);
  gap: 0.5rem;
  justify-content: center;
  box-sizing: border-box;
}

/* O título gigante precisa respirar dentro desse container compacto */
.main-links__item--next .main-links__title {
  font-size: clamp(2.5rem, 11vw, 9rem);
  line-height: 0.95;
  word-break: break-word;
  max-width: 100%;
  text-align: center;
}

.main-links__item--next .main-links__subtitle {
  margin-bottom: 0.25rem;
}

/* Estado aberto (is-focused) — já não precisa ocupar 85% da tela */
.main-links__item--next.is-focused {
  transform: translateY(0);
}

/* Responsivo: tablet */
@media (max-width: 768px) {
  .main-links__item--next > a {
    padding-top: 32px;
    padding-bottom: 32px;
  }

  .main-links__item--next .main-links__title {
    font-size: clamp(2.25rem, 14vw, 5.5rem);
  }
}

/* Responsivo: mobile pequeno */
@media (max-width: 480px) {
  .main-links__item--next > a {
    padding-top: 28px;
    padding-bottom: 28px;
  }

  .main-links__item--next .main-links__title {
    font-size: clamp(2rem, 16vw, 4rem);
  }

  .main-links__item--next .main-links__subtitle {
    font-size: 0.75rem;
  }
}


/* ==================================================================================
   UX.72 — NEXT SECTION NO FLUXO (não cobre mais o conteúdo)
   A tarjeta deixa de ser position: fixed e passa a ocupar o espaço real
   do placeholder .next-section. Isso evita que a barra verde fique em cima
   do conteúdo da página ao rolar.
   As animações de navegação (is-focused / is-leaving) continuam funcionando
   porque os transforms são relativos ao próprio elemento.
================================================================================== */
.next-section {
  position: relative;
  width: 100%;
  min-height: clamp(6.5rem, 10vw, 9rem);
  overflow: hidden;
  isolation: isolate;
}

/* Override total: tira o fixed e coloca no fluxo */
.main-links__item--next {
  position: relative;
  top: auto;
  bottom: auto;
  left: 0;
  right: 0;
  width: 100%;
  height: auto;
  z-index: 1;
  transform: translateY(100%);
  pointer-events: none;
}

/* Estado inicial — aparece quando o placeholder entra no viewport */
.main-links__item--next.is-ready {
  transform: translateY(0);
  pointer-events: auto;
}

/* Hover — discreto, apenas um leve realce (sem crescer fora do fluxo) */
.main-links__item--next.is-ready:hover {
  transform: translateY(-4px);
}

/* Animação de saída ao clicar — desce para fora do placeholder */
.main-links__item--next.is-focused {
  transform: translateY(-8px);
  transition: var(--transition-jump);
  pointer-events: none;
}

.main-links__item--next.is-leaving {
  transform: translateY(120%);
  transition: var(--transition-jump);
  pointer-events: none;
}

/* Garante que o link interno também não force 100dvh */
.main-links__item--next > a {
  height: auto;
  min-height: auto;
  border-radius: 24px 24px 0 0;
}


/*# sourceMappingURL=index.css.map */
