/*
  STYLE.CSS — MAPA DE EDICIÓN

  01–03   Fuentes, colores y reglas generales
  04      Portada
  05      Sobre mí y habilidades
  06–07   Estructura y contenido de proyectos
  08      Contacto
  09      Ventanas de proyecto y visor de imágenes
  10      Animaciones
  11–14   Ajustes generales por pantalla y accesibilidad
  15      Tarjetas, filtros y diseño actual de la galería
  16–17   Galería en tablet y móvil

  Busca el número o el nombre de la sección con Ctrl + F.
  Cada propiedad aparece en su propia línea.
*/

/* ============================================================
01. FUENTES
============================================================ */

@font-face {
  font-family: Bebas;
  src: url('fonts/BebasNeue-Regular.ttf') format('truetype');
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

/* ============================================================
02. COLORES Y MEDIDAS GENERALES
============================================================ */

:root {
  --wine: #510e2b;
  --pink: #ca3686;
  --light: #f7c4e4;
  --cream: #ffdef4;
  --page-width: 1440px;
  --gutter: clamp(24px, 6.8vw, 98px);
}

/* ============================================================
03. BASE Y ACCESIBILIDAD
============================================================ */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--wine);
  color: var(--wine);
  font-family: 'Arial Narrow', 'Helvetica Neue', Arial, sans-serif;
}

button, a, summary {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
  color: inherit;
}

a {
  color: inherit;
}

button, summary {
  cursor: pointer;
}

button:disabled {
  cursor: default;
  opacity: .35;
}

img {
  display: block;
  max-width: 100%;
}

a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 3px solid currentColor;
  outline-offset: 7px;
}

[hidden] {
  display: none!important;
}

.skip-link {
  position: fixed;
  left: 20px;
  top: 12px;
  z-index: 20;
  background: var(--cream);
  padding: 12px;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: none;
}

.container {
  width: min(100%, var(--page-width));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ============================================================
04. PORTADA
============================================================ */

.hero {
  height: min(900px, 100svh);
  min-height: 650px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #651634 0%, #c53584 33%, var(--light) 94%);
}

.hero-inner {
  height: 100%;
  position: relative;
  max-width: 1440px;
  margin: auto;
}

.hero-portrait {
  position: absolute;
  height: 96%;
  width: auto;
  max-width: none;
  left: 50%;
  bottom: -2%;
  transform: translateX(-50%);
  object-fit: contain;
  animation: portrait-enter 1.2s ease both;
}

.hero-title {
  font-family: Bebas, sans-serif;
  font-weight: 400;
  position: absolute;
  left: 6.4%;
  right: 6.4%;
  top: 46%;
  margin: 0;
  font-size: clamp(110px, 26.2vw, 378px);
  line-height: .87;
  letter-spacing: -.012em;
  display: flex;
  justify-content: space-between;
  color: var(--cream);
  animation: title-enter 1s .12s ease both;
  pointer-events: none;
}

.hero-title .outline {
  color: transparent;
  -webkit-text-stroke: 2px var(--cream);
}

.hero-caption {
  position: absolute;
  left: 6.8%;
  right: 6.8%;
  top: 83%;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  font-size: clamp(16px, 1.9vw, 27px);
  font-weight: 700;
}

.hero-caption p {
  margin: 0;
}

.hero-nav {
  position: absolute;
  right: var(--gutter);
  top: 28px;
  display: flex;
  gap: 24px;
  z-index: 2;
  color: var(--cream);
  font-size: 14px;
}

.hero-nav a {
  text-decoration: none;
  opacity: .82;
  transition: opacity .2s;
}

.hero-nav a:hover {
  opacity: 1;
}

.scroll-cue {
  position: absolute;
  right: var(--gutter);
  bottom: 26px;
  display: flex;
  gap: 12px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  align-items: center;
}

.scroll-cue span {
  font-size: 22px;
}

/* ============================================================
05. SOBRE MÍ Y HABILIDADES
============================================================ */

.about {
  background: linear-gradient(var(--light) 25%, #efb0d8 56%, var(--pink));
  padding-block: 78px 60px;
  min-height: 900px;
}

.section-heading {
  font: 400 clamp(75px, 11.8vw, 170px)/1 Bebas, sans-serif;
  margin: 0 0 58px;
  letter-spacing: -.015em;
}

.about-copy {
  max-width: 780px;
  font-size: clamp(20px, 1.95vw, 28px);
  line-height: 1.36;
  letter-spacing: -.035em;
}

.about-copy p {
  margin: 0 0 24px;
}

.skills {
  margin-top: 62px;
  display: flex;
  gap: 40px;
  align-items: center;
}

.skills h3 {
  font: 400 clamp(60px, 9vw, 130px)/1 Bebas, sans-serif;
  margin: 0;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--cream);
}

.skills ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  justify-content: space-between;
  flex: 1;
  gap: 26px;
  flex-wrap: wrap;
  font-size: clamp(18px, 1.9vw, 27px);
  font-weight: 700;
  letter-spacing: -.025em;
}

/* ============================================================
06. ESTRUCTURA DE PROYECTOS
============================================================ */

.projects {
  background: linear-gradient(var(--pink), #b62e77 55%, var(--wine));
  color: var(--cream);
  padding-block: 76px 90px;
  min-height: 900px;
  scroll-margin-top: 0;
}

.projects .section-heading {
  margin-bottom: 100px;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 70px 110px;
  max-width: 878px;
  margin: 150px auto 75px;
}

.category-card {
  min-height: 130px;
  padding: 28px 54px;
  background: var(--cream);
  color: var(--wine);
  border-radius: 13px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  text-decoration: none;
  font-size: 28px;
  transition: transform .3s, box-shadow .3s;
}

.category-card span:last-child {
  font-size: 23px;
  opacity: 0;
  transform: translate(-8px, 8px);
  transition: opacity .3s, transform .3s;
}

.category-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px #510e2b30;
}

.category-card:hover span:last-child {
  opacity: 1;
  transform: none;
}

/* ============================================================
07. CONTENIDO Y GALERÍAS DE LOS PROYECTOS
============================================================ */

.projects.is-expanded {
  background: var(--cream);
  color: var(--wine);
  min-height: 900px;
}

.projects.is-expanded>.container>.section-heading {
  font-size: clamp(64px, 8vw, 112px);
  margin-bottom: 24px;
}

.back-link {
  border: 0;
  background: none;
  padding: 12px 0;
  font-size: 16px;
  display: inline-flex;
  gap: 12px;
  text-decoration: none;
  align-items: center;
}

.group-layout {
  display: grid;
  grid-template-columns: 34% 1fr;
  align-items: center;
  gap: 12%;
  min-height: 590px;
  padding-block: 42px;
}

.group-title {
  background: var(--wine);
  color: var(--cream);
  border-radius: 13px;
  padding: 28px 38px;
  min-height: 130px;
  font-size: 28px;
  font-weight: 400;
  position: relative;
  display: flex;
  align-items: flex-start;
}

.group-title:after {
  content: '';
  position: absolute;
  right: -18%;
  width: 18%;
  height: 5px;
  top: 50%;
  background: var(--wine);
}

.project-list {
  position: relative;
  padding-left: 40px;
  border-left: 5px solid var(--wine);
}

.project {
  margin: 0;
}

.project summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 14px 0;
  font-size: clamp(20px, 2vw, 28px);
  line-height: 1.3;
}

.project summary::-webkit-details-marker {
  display: none;
}

.project summary:before {
  content: '';
  height: 5px;
  width: clamp(32px, 6vw, 110px);
  flex-shrink: 0;
  background: var(--wine);
  transition: width .3s;
}

.project summary:hover:before {
  width: clamp(42px, 7vw, 125px);
}

.project summary .project-arrow {
  margin-left: auto;
  font-size: 22px;
  opacity: 0;
  transition: opacity .2s;
}

.project summary:hover .project-arrow, .project summary:focus-visible .project-arrow {
  opacity: 1;
}

.project-content {
  background: var(--cream);
  color: var(--wine);
  padding: 30px 0;
}

.project-content h3 {
  font: 400 clamp(45px, 6vw, 80px)/1 Bebas, sans-serif;
  margin: 10px 0 25px;
}

.project-meta {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: .09em;
  margin: 0;
}

.project-description {
  max-width: 740px;
  font-size: 20px;
  line-height: 1.6;
  margin-bottom: 36px;
}

.project-description p {
  margin: 0 0 15px;
}

.project-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 30px;
}

.project-gallery figure {
  margin: 0;
  min-width: 0;
}

.project-gallery figure.wide {
  grid-column: 1/-1;
}

.project-gallery img {
  width: 100%;
  height: auto;
  max-height: 900px;
  object-fit: contain;
  background: #fff;
  cursor: zoom-in;
  border-radius: 4px;
  transition: filter .25s;
}

.project-gallery img:hover {
  filter: brightness(.97);
}

.project-gallery figcaption {
  font-size: 14px;
  line-height: 1.5;
  margin-top: 10px;
  opacity: .8;
}

.gallery-hint {
  font-size: 13px;
  opacity: .7;
  margin-bottom: 25px;
}

/* ============================================================
08. CONTACTO Y PIE DE PÁGINA
============================================================ */

.contact {
  background: var(--wine);
  color: var(--cream);
  padding-block: 230px 110px;
  min-height: 760px;
}

.contact .section-heading {
  font-size: clamp(60px, 11.3vw, 163px);
  white-space: nowrap;
  margin-bottom: 55px;
}

.contact-link {
  font-size: clamp(20px, 2.8vw, 40px);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 12px;
  display: inline-flex;
  gap: 24px;
  align-items: center;
  transition: gap .3s;
}

.contact-link:hover {
  gap: 38px;
}

.footer-row {
  margin-top: 130px;
  display: flex;
  justify-content: space-between;
  gap: 25px;
  font-size: 13px;
  opacity: .8;
}

.footer-row a {
  text-decoration: none;
}

/* ============================================================
09. VENTANAS DE PROYECTO E IMÁGENES
============================================================ */

.project-dialog {
  border: 0;
  width: min(1180px, calc(100% - 60px));
  max-height: 92svh;
  padding: 0;
  background: var(--cream);
  color: var(--wine);
  border-radius: 10px;
  box-shadow: 0 30px 100px #0003;
  overscroll-behavior: contain;
}

.project-dialog::backdrop, .lightbox::backdrop {
  background: #280a1ed9;
  backdrop-filter: blur(7px);
}

.dialog-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  background: var(--cream);
  z-index: 2;
  padding: 18px 38px;
  border-bottom: 1px solid #510e2b24;
  font-size: 13px;
}

.close-button {
  border: 1px solid #510e2b44;
  border-radius: 100px;
  background: none;
  padding: 9px 16px;
  display: inline-flex;
  gap: 15px;
  align-items: center;
}

.close-button:hover {
  background: #510e2b0d;
}

.dialog-body {
  padding: 15px 48px 48px;
}

.dialog-body .project-content {
  padding-top: 20px;
}

.project-dialog[open], .lightbox[open] {
  animation: dialog-enter .3s ease both;
}

body.modal-open {
  overflow: hidden;
}

.lightbox {
  border: 0;
  background: #23121e;
  color: #fff;
  width: min(1400px, 96vw);
  max-height: 96svh;
  padding: 18px;
  border-radius: 8px;
}

.lightbox-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  margin-bottom: 12px;
}

.lightbox .close-button {
  color: #fff;
  border-color: #ffffff55;
}

.lightbox-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.lightbox-image {
  max-height: 77svh;
  max-width: calc(100% - 105px);
  object-fit: contain;
}

.image-nav {
  background: transparent;
  border: 1px solid #ffffff55;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  font-size: 22px;
  color: #fff;
}

.lightbox-caption {
  text-align: center;
  margin: 14px 0 2px;
  font-size: 14px;
}

.reveal {
  transition: opacity .65s ease, transform .65s ease;
}

.reveal.pending {
  opacity: 0;
  transform: translateY(22px);
}

/* ============================================================
10. ANIMACIONES
============================================================ */

@keyframes portrait-enter {
  from {
    opacity: 0;
    transform: translate(-50%, 20px);
  }

  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }

}

@keyframes title-enter {
  from {
    opacity: 0;
    translate: 0 16px;
  }

  to {
    opacity: 1;
    translate: 0 0;
  }

}

@keyframes dialog-enter {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }

}

/* ============================================================
11. ADAPTACIÓN A PANTALLAS GRANDES
============================================================ */

@media(min-width:1600px) {
  .hero-title {
    font-size: 378px;
  }

}

/* ============================================================
12. ADAPTACIÓN A TABLET
============================================================ */

@media(max-width:1000px) {
  .hero {
    min-height: 600px;
    height: 78svh;
    max-height: 900px;
  }

  .hero-portrait {
    height: 94%;
  }

  .hero-title {
    top: 53%;
    font-size: 26.2vw;
  }

  .hero-caption {
    top: auto;
    bottom: 55px;
  }

  .about {
    min-height: unset;
    padding-block: 70px;
  }

  .skills {
    align-items: flex-start;
    gap: 24px;
  }

  .skills ul {
    font-size: 19px;
    justify-content: flex-start;
  }

  .category-grid {
    gap: 35px;
    margin: 75px auto;
  }

  .category-card {
    padding: 30px;
    min-height: 125px;
  }

  .projects {
    min-height: 730px;
  }

  .projects .section-heading {
    margin-bottom: 45px;
  }

  .group-layout {
    gap: 11%;
    grid-template-columns: 30% 1fr;
  }

  .group-title {
    padding: 25px;
    font-size: 25px;
  }

  .project-list {
    padding-left: 24px;
  }

  .project summary {
    gap: 15px;
  }

  .project summary::before {
    width: 45px;
  }

  .contact {
    padding-block: 150px 70px;
    min-height: 560px;
  }

  .contact .section-heading {
    white-space: normal;
  }

  .footer-row {
    margin-top: 110px;
  }

}

/* ============================================================
13. ADAPTACIÓN A MÓVIL
============================================================ */

@media(max-width:600px) {
  .hero {
    height: 88svh;
    min-height: 580px;
    max-height: 800px;
  }

  .hero-portrait {
    height: auto;
    width: 140%;
    bottom: 0;
  }

  .hero-title {
    left: 5%;
    right: 5%;
    top: 59%;
    font-size: 27vw;
  }

  .hero-title .outline {
    -webkit-text-stroke: 1px var(--cream);
  }

  .hero-caption {
    left: 24px;
    right: 24px;
    bottom: 55px;
    font-size: 13px;
    gap: 10px;
  }

  .hero-nav {
    right: 24px;
    top: 22px;
    gap: 18px;
    font-size: 12px;
  }

  .scroll-cue {
    right: 24px;
    bottom: 18px;
    font-size: 11px;
  }

  .about {
    padding-top: 65px;
  }

  .section-heading {
    margin-bottom: 30px;
    font-size: 80px;
  }

  .about-copy {
    font-size: 20px;
    letter-spacing: -.025em;
  }

  .skills {
    display: block;
    margin-top: 42px;
  }

  .skills h3 {
    font-size: 75px;
    margin-bottom: 24px;
  }

  .skills ul {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    font-size: 17px;
  }

  .projects {
    padding-block: 65px;
    min-height: 660px;
  }

  .category-grid {
    gap: 20px;
    grid-template-columns: 1fr;
    margin-top: 50px;
  }

  .category-card {
    padding: 24px 28px;
    min-height: 92px;
    font-size: 24px;
  }

  .category-card span::last-child {
    opacity: 1;
    transform: none;
  }

  .group-layout {
    display: block;
    min-height: unset;
    padding-top: 28px;
  }

  .group-title {
    min-height: 100px;
    margin: 0 0 35px;
    padding: 25px 28px;
  }

  .group-title::after {
    right: auto;
    left: 28px;
    top: 100%;
    height: 35px;
    width: 4px;
  }

  .project-list {
    border-left-width: 4px;
    margin-left: 28px;
    padding-left: 16px;
  }

  .project summary {
    font-size: 20px;
    padding: 13px 0;
    gap: 14px;
  }

  .project summary::before {
    height: 4px;
    width: 24px;
  }

  .project summary::hover::before {
    width: 32px;
  }

  .project summary .project-arrow {
    opacity: .7;
    font-size: 17px;
  }

  .contact {
    padding-block: 100px 45px;
    min-height: 500px;
  }

  .contact .section-heading {
    font-size: 70px;
    margin-bottom: 40px;
  }

  .contact-link {
    font-size: 22px;
    overflow-wrap: anywhere;
  }

  .footer-row {
    margin-top: 95px;
    flex-wrap: wrap;
    font-size: 12px;
  }

  .project-dialog {
    width: calc(100% - 20px);
    max-height: 94svh;
    border-radius: 8px;
  }

  .dialog-top {
    padding: 14px 20px;
  }

  .dialog-body {
    padding: 10px 20px 28px;
  }

  .project-content h3 {
    font-size: 52px;
  }

  .project-description {
    font-size: 17px;
  }

  .project-gallery {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  .project-gallery figure.wide {
    grid-column: auto;
  }

  .lightbox {
    width: 98vw;
    padding: 12px;
  }

  .lightbox-stage {
    gap: 6px;
  }

  .lightbox-image {
    max-width: calc(100% - 76px);
  }

  .image-nav {
    width: 32px;
    height: 32px;
  }

  .gallery-hint {
    line-height: 1.5;
  }

}

/* ============================================================
14. PREFERENCIA DE MOVIMIENTO REDUCIDO
============================================================ */

@media(prefers-reduced-motion:reduce) {
  html {
    scroll-behavior: auto;
  }

  *, *::before, *::after {
    animation: none!important;
    transition: none!important;
  }

  .reveal.pending {
    opacity: 1;
    transform: none;
  }

}

/* ============================================================
15. GALERÍA VISUAL — DISEÑO ACTUAL
============================================================ */

/* SELECTED WORK — visual gallery */

.projects {
  background: #fff1fa;
  color: var(--wine);
  padding-block: 110px 120px;
  min-height: 0;
}

.work-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 50px;
  margin-bottom: 60px;
}

.eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  margin: 0 0 22px;
}

.work-heading .section-heading {
  font-size: clamp(88px, 10.8vw, 155px);
  line-height: .88;
  margin: 0;
}

.work-heading .section-heading span {
  color: #bd2e78;
}

.work-intro {
  font-size: 20px;
  line-height: 1.6;
  margin: 0 0 8px;
  max-width: 350px;
  letter-spacing: -.02em;
}

.work-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-block: 1px solid #510e2b26;
  padding-block: 20px;
  margin-bottom: 48px;
}

.work-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.work-filters button {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 100px;
  padding: 11px 18px;
  font-size: 14px;
  transition: background .25s, color .25s, border-color .25s;
}

.work-filters button:hover {
  border-color: #510e2b40;
}

.work-filters button[aria-pressed=true] {
  background: var(--wine);
  color: var(--cream);
}

.filter-count {
  font-size: 10px;
  margin-left: 8px;
  opacity: .6;
  vertical-align: super;
}

.work-count {
  font-size: 12px;
  white-space: nowrap;
  margin: 0;
  opacity: .65;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 55px 32px;
  align-items: start;
}

.projects-grid .group-panel, .projects-grid .group-layout, .projects-grid .project-list {
  display: contents;
}

.projects-grid .group-title {
  display: none;
}

.projects-grid .project {
  margin: 0;
  min-width: 0;
  transition: transform .3s;
}

.projects-grid .project>summary {
  display: block;
  padding: 0;
  list-style: none;
  font-size: inherit;
}

.projects-grid .project>summary:before {
  display: none;
}

.project-cover {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1.3;
  overflow: hidden;
  border-radius: 14px;
  background: #f1e5e8;
  padding: 34px;
  isolation: isolate;
}

.project-cover:after {
  content: '';
  position: absolute;
  inset: 0;
  border: 1px solid #510e2b0a;
  border-radius: inherit;
  pointer-events: none;
}

.project-cover>img {
  width: 100%;
  height: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: transform .6s cubic-bezier(.2, .7, .2, 1);
  filter: drop-shadow(0 16px 20px #200b1714);
}

.cover--rose {
  background: #f3d6df;
}

.cover--aqua {
  background: #d2eeef;
}

.cover--sun {
  background: #ffedb5;
}

.cover--mint {
  background: #dceadd;
}

.cover--coffee {
  background: #e9d9d2;
}

.cover--sand {
  background: #e9e3d7;
}

.cover--lilac {
  background: #e2d9ee;
}

.cover-link {
  position: absolute;
  right: 22px;
  bottom: 22px;
  background: var(--wine);
  color: var(--cream);
  border-radius: 100px;
  padding: 13px 19px;
  font-size: 12px;
  font-weight: 700;
  opacity: 0;
  transform: translateY(10px);
  transition: transform .3s, opacity .3s;
}

.project>summary:hover .project-cover>img, .project>summary:focus-visible .project-cover>img {
  transform: scale(1.035);
}

.project>summary:hover .cover-link, .project>summary:focus-visible .cover-link {
  opacity: 1;
  transform: none;
}

.card-info {
  display: grid;
  grid-template-columns: 1fr auto;
  padding: 22px 2px 0;
  gap: 9px 20px;
}

.card-client {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  opacity: .7;
  grid-column: 1;
}

.card-title {
  font: 400 clamp(32px, 3.2vw, 46px)/1.08 Bebas, sans-serif;
  grid-column: 1;
  grid-row: 2;
  letter-spacing: .01em;
}

.card-type {
  font-size: 13px;
  grid-column: 1;
  grid-row: 3;
  opacity: .65;
}

.card-arrow {
  grid-column: 2;
  grid-row: 1/4;
  align-self: center;
  width: 46px;
  height: 46px;
  border: 1px solid #510e2b35;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  transition: background .3s, color .3s, transform .3s;
}

.project>summary:hover .card-arrow {
  background: var(--wine);
  color: var(--cream);
  transform: rotate(8deg);
}

#espacios-nescafe {
  grid-column: 1/-1;
}

#espacios-nescafe .project-cover {
  aspect-ratio: 2.25;
  padding: 0;
  background: #ddc6bd;
}

#espacios-nescafe .project-cover>img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: none;
}

#libros-calcetin .project-cover {
  padding: 22px;
}

#nestea-te-verde .project-cover, #maggi .project-cover, #web-mondelez .project-cover {
  padding: 26px;
}

#mailing-coca-cola .project-cover {
  padding: 24px;
}

.projects-grid .project[open] {
  grid-column: 1/-1;
}

.projects-grid .project[open]>.project-content {
  padding: 35px;
  border-radius: 14px;
  margin-top: 20px;
}

.project-dialog {
  width: min(1280px, calc(100% - 48px));
  max-height: 94svh;
  border-radius: 18px;
  background: #fff8fc;
}

.dialog-top {
  background: #fff8fc;
  padding: 20px 42px;
  font-size: 11px;
  letter-spacing: .06em;
}

.dialog-divider {
  margin-inline: 10px;
  opacity: .45;
}

.dialog-body {
  padding: 40px 64px 64px;
}

.dialog-body .project-content {
  padding: 0;
  background: transparent;
}

.dialog-body .project-meta {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .12em;
  opacity: .7;
  margin-bottom: 22px;
}

.dialog-body .project-content h3 {
  font-size: clamp(55px, 7vw, 100px);
  line-height: .95;
  max-width: 850px;
  margin: 0 0 28px;
}

.dialog-body .project-description {
  max-width: 720px;
  font-size: 19px;
  line-height: 1.65;
  margin-bottom: 30px;
}

.dialog-body .gallery-hint {
  padding-top: 25px;
  border-top: 1px solid #510e2b22;
  margin-bottom: 25px;
}

.dialog-body .project-gallery {
  gap: 36px 28px;
}

.dialog-body .project-gallery figure {
  padding: 16px;
  background: #f1e9ed;
  border-radius: 12px;
  align-self: start;
}

.dialog-body .project-gallery img {
  border-radius: 6px;
  max-height: 800px;
  background: transparent;
}

.dialog-body .project-gallery figcaption {
  font-size: 12px;
  padding: 4px 3px 0;
}

/* ============================================================
16. GALERÍA VISUAL — TABLET
============================================================ */

@media(max-width:1000px) {
  .projects {
    padding-block: 80px;
  }

  .work-heading {
    gap: 30px;
  }

  .work-intro {
    font-size: 17px;
  }

  .work-toolbar {
    gap: 15px;
  }

  .work-filters button {
    padding: 10px 13px;
    font-size: 13px;
  }

  .projects-grid {
    gap: 40px 24px;
  }

  .project-cover {
    padding: 24px;
  }

  .dialog-body {
    padding: 32px;
  }

  .card-title {
    font-size: 36px;
  }

}

/* ============================================================
17. GALERÍA VISUAL — MÓVIL
============================================================ */

@media(max-width:600px) {
  .projects {
    padding-block: 70px;
  }

  .work-heading {
    display: block;
    margin-bottom: 35px;
  }

  .work-heading .section-heading {
    font-size: 92px;
  }

  .work-intro {
    margin-top: 24px;
    font-size: 17px;
  }

  .eyebrow {
    font-size: 10px;
  }

  .work-toolbar {
    display: block;
    margin-bottom: 28px;
    padding-block: 16px;
  }

  .work-filters {
    gap: 5px;
  }

  .work-filters button {
    font-size: 12px;
    padding: 10px 12px;
  }

  .filter-count {
    margin-left: 5px;
    font-size: 9px;
  }

  .work-count {
    margin-top: 14px;
    font-size: 11px;
  }

  .projects-grid {
    grid-template-columns: 1fr;
    gap: 35px;
  }

  .project-cover {
    aspect-ratio: 1.2;
    border-radius: 12px;
    padding: 26px;
  }

  #espacios-nescafe .project-cover {
    aspect-ratio: 1.3;
  }

  #espacios-nescafe .project-cover>img {
    object-fit: contain;
  }

  .cover-link {
    opacity: 1;
    transform: none;
    padding: 10px 14px;
    font-size: 10px;
    right: 14px;
    bottom: 14px;
  }

  .card-info {
    padding-top: 17px;
    gap: 7px;
  }

  .card-title {
    font-size: 35px;
  }

  .card-arrow {
    height: 40px;
    width: 40px;
  }

  .card-type {
    font-size: 12px;
  }

  .project-dialog {
    width: calc(100% - 16px);
    border-radius: 12px;
  }

  .dialog-top {
    padding: 15px 18px;
    font-size: 9px;
    letter-spacing: 0;
  }

  .dialog-divider {
    margin-inline: 5px;
  }

  .dialog-body {
    padding: 25px 20px 30px;
  }

  .dialog-body .project-content h3 {
    font-size: 54px;
  }

  .dialog-body .project-description {
    font-size: 17px;
  }

  .dialog-body .project-gallery {
    gap: 22px;
  }

  .dialog-body .project-gallery figure {
    padding: 10px;
  }

  .dialog-body .project-meta {
    font-size: 10px;
  }

  .projects-grid .project[open]>.project-content {
    padding: 20px;
  }

}

#web-mondelez .project-cover {
  padding: 20px;
  background: #e2d9ee;
}

#web-mondelez .project-cover>img {
  object-fit: contain;
}


/* ============================================================
   NAVEGACIÓN POR SECCIONES
   ============================================================ */

#projects {
  height: 100svh;
  min-height: 640px;
  padding-block: 36px;
}

#projects > .container {
  height: 100%;
  display: flex;
  flex-direction: column;
}

#projects .work-heading {
  flex-shrink: 0;
  margin-bottom: 24px;
}

#projects .work-heading .section-heading {
  font-size: clamp(68px, 7vw, 100px);
}

#projects .work-toolbar {
  flex-shrink: 0;
  margin-bottom: 24px;
  padding-block: 12px;
}

/* Permite recorrer todas las tarjetas dentro de la sección. */
#projects .projects-grid {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  padding: 8px 12px 24px 8px;

  scrollbar-width: thin;
  scrollbar-color: var(--wine) transparent;
}

@media (max-width: 600px) {
  #projects .work-heading {
    margin-bottom: 18px;
  }

  #projects .work-heading .section-heading {
    font-size: 64px;
  }

  #projects .work-intro {
    display: none;
  }

  #projects .work-toolbar {
    margin-bottom: 16px;
  }
}

/* AJUSTES PARA EL SCROLL ENTRE SECCIONES */

#home {
  height: 100svh;
  min-height: 0;
  max-height: none;
}

#about,
#projects {
  height: 100svh;
  min-height: 0;
  padding-block: 36px;
}

/* Evita perder contenido en pantallas pequeñas. */
#about > .container {
  height: 100%;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  scrollbar-width: thin;
}

#contact {
  min-height: 100svh;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}