/* ============ Tokens ============ */
:root {
  --pink: #F2C6CF;
  --pink-soft: #FBEAEE;
  --rose: #C2768A;   /* solo detalles: bordes, puntos, cursor. Nunca texto. */
  --ink: #1A1A1A;
  --white: #FFFFFF;

  --font: "Sora", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 22px;
  --header-h: 64px;
  --ease-bounce: cubic-bezier(.34, 1.56, .64, 1);
  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --focus: var(--ink);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 8px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-weight: 300;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--ink);
  background: var(--white);
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }

.container { width: min(1120px, 100% - 40px); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.skip-link {
  position: fixed; left: 12px; top: -60px; z-index: 100;
  background: var(--ink); color: var(--white); padding: .6rem 1rem; border-radius: 10px; text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* ============ Tipografía ============ */
h1, h2, h3 { font-weight: 700; line-height: 1.1; letter-spacing: -.02em; }
h2 { font-size: clamp(2.2rem, 7vw, 3.8rem); margin-bottom: 1.25rem; }
h3 { font-size: 1.1rem; }

.tab {
  display: inline-block;
  font-size: .75rem; font-weight: 600; letter-spacing: .04em;
  background: var(--pink); color: var(--ink);
  padding: .35rem .9rem .3rem;
  border-radius: 10px 10px 0 0;
  margin-bottom: 1.25rem;
  border-bottom: 2px solid var(--rose);
}
.tab--dark { background: var(--pink); }
.section { padding: clamp(72px, 12vw, 130px) 0; }
.section-lead { max-width: 52ch; font-size: 1.05rem; margin-bottom: 2rem; }

/* ============ Botones ============ */
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; }
.btn {
  display: inline-flex; flex-direction: column; justify-content: center;
  min-height: 48px; padding: .7rem 1.5rem;
  border-radius: 999px; border: 2px solid var(--ink);
  font-weight: 600; font-size: .95rem; line-height: 1.25; text-decoration: none;
  transition: transform .25s var(--ease-out), box-shadow .25s var(--ease-out), background-color .2s;
}
.btn__detail { font-weight: 300; font-size: .78rem; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 6px 0 var(--rose); }
.btn:active { transform: translateY(0); box-shadow: 0 2px 0 var(--rose); }
.btn--dark { background: var(--ink); color: var(--white); }
/* Enlace externo chico y discreto */
.btn--ext {
  flex-direction: row; align-items: center; justify-content: center; gap: .3rem;
  min-height: 34px; padding: .25rem .9rem; border-width: 1px; border-color: rgb(26 26 26 / .25);
  background: var(--white); color: var(--ink); font-size: .8rem; font-weight: 600;
}
.btn--ext:hover, .btn--ext:active { transform: none; box-shadow: none; border-color: var(--ink); background: var(--pink-soft); }
.btn--pink { background: var(--pink); color: var(--ink); }

/* ============ Header ============ */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--header-h);
  background: rgb(255 255 255 / .82);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 1px solid rgb(26 26 26 / .08);
}
.site-header__inner { width: min(1120px, 100% - 40px); margin-inline: auto; height: 100%; display: flex; align-items: center; justify-content: space-between; }
.logo { font-weight: 700; font-size: 1.05rem; letter-spacing: -.02em; text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }
.logo__mark { width: 40px; height: 40px; margin-right: .5rem; }
.logo__cursor { width: 3px; height: 1.15em; background: var(--rose); border-radius: 2px; animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.nav-toggle { display: grid; place-items: center; width: 44px; height: 44px; background: none; border: 0; border-radius: 12px; }
.nav-toggle__bars, .nav-toggle__bars::before { content: ""; display: block; width: 22px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .3s var(--ease-out); }
.nav-toggle__bars { position: relative; transform: translateY(-4px); }
.nav-toggle__bars::before { position: absolute; top: 8px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars { transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { transform: translateY(-8px) rotate(-90deg); top: 8px; }

.nav {
  position: absolute; top: var(--header-h); left: 0; right: 0;
  background: var(--white); border-bottom: 1px solid rgb(26 26 26 / .1);
  padding: 1rem 20px 1.5rem;
  display: none;
}
.nav.is-open { display: block; }
.nav ul { display: flex; flex-direction: column; gap: .25rem; }
.nav a { display: block; padding: .7rem .25rem; text-decoration: none; font-weight: 400; }
.nav a[aria-current="true"] { background: linear-gradient(transparent 62%, var(--pink) 62%); font-weight: 600; }
.nav .nav__cta { background: var(--ink); color: var(--white); border-radius: 999px; text-align: center; margin-top: .5rem; font-weight: 600; }

@media (min-width: 860px) {
  .nav-toggle { display: none; }
  .nav { position: static; display: block; background: none; border: 0; padding: 0; }
  .nav ul { flex-direction: row; align-items: center; gap: 1.75rem; }
  .nav a { padding: .25rem 0; font-size: .9rem; }
  .nav .nav__cta { padding: .55rem 1.2rem; margin: 0; }
  .nav .nav__cta:hover { background: var(--pink); color: var(--ink); }
}

/* ============ Hero ============ */
.hero {
  padding: calc(var(--header-h) + 48px) 0 72px;
  position: relative; overflow: hidden;
  background:
    radial-gradient(60% 50% at 85% 40%, rgb(242 198 207 / .75), transparent 70%),
    var(--white);
}
.hero__grid { display: grid; gap: 3rem; align-items: center; }
.status {
  display: inline-flex; align-items: center; gap: .6rem;
  font-size: .8rem; font-weight: 400;
  background: var(--white); border: 1px solid rgb(26 26 26 / .15);
  padding: .35rem .9rem; border-radius: 999px; margin-bottom: 1.5rem;
}
.status__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--rose); box-shadow: 0 0 0 4px var(--pink); }
.hero h1 { display: flex; flex-direction: column; gap: .9rem; }
.hero__name { font-size: clamp(2.8rem, 12vw, 6rem); letter-spacing: -.04em; line-height: .95; }
.hero__role { font-size: clamp(1.15rem, 3.6vw, 1.7rem); font-weight: 600; letter-spacing: -.01em; }
.hero__lead { margin: 1.5rem 0 2rem; max-width: 40ch; font-size: 1.1rem; }

.cursor-tag { display: flex; align-items: flex-start; margin-top: 2.5rem; animation: float 5s ease-in-out infinite; width: max-content; }
.cursor-tag span {
  margin: 14px 0 0 -4px; font-size: .75rem; font-weight: 600;
  background: var(--pink); border: 1.5px solid var(--ink); border-radius: 0 12px 12px 12px; padding: .15rem .7rem;
}
@keyframes float { 50% { transform: translate(10px, -8px); } }

.hero__photo { position: relative; justify-self: center; width: min(78vw, 380px); aspect-ratio: 13 / 16; }
/* marco en arco; la persona (recorte sin fondo) se apoya adentro y el rodete sobresale por arriba */
.hero__photo::before {
  content: ''; position: absolute; inset: 0;
  background: var(--pink);
  border-radius: 999px 999px 28px 28px;
  border: 2px solid var(--ink);
  box-shadow: 10px 12px 0 var(--rose);
}
.hero__photo img {
  position: absolute; left: 2px; bottom: 2px; width: calc(100% - 4px); height: auto;
  clip-path: inset(-30% 0 0 0 round 0 0 26px 26px);
}
.hero__chip {
  position: absolute; background: var(--white); border: 2px solid var(--ink);
  border-radius: 12px; padding: .3rem .8rem; font-size: .8rem; font-weight: 600;
}
.hero__chip--a { top: 14%; left: -8%; transform: rotate(-6deg); }
.hero__chip--b { bottom: 14%; right: -6%; transform: rotate(5deg); background: var(--pink); }

@media (min-width: 860px) {
  .hero__grid { grid-template-columns: 1.15fr .85fr; }
  .hero { padding-top: calc(var(--header-h) + 80px); padding-bottom: 110px; }
}

/* ============ Sobre mí ============ */
.about { background: var(--pink-soft); }
.about__grid { display: grid; gap: 2rem; align-items: start; }
.eyebrow { font-size: .75rem; font-weight: 400; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 1rem; }
.about h2 { font-size: clamp(2.4rem, 7vw, 3.6rem); margin: 0; }
.about__text { font-size: clamp(.95rem, 1.6vw, 1.05rem); line-height: 1.55; max-width: 58ch; }
.about__text + .about__text { margin-top: 1rem; }
.about__chips { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.75rem; }
.about__chips li {
  background: var(--white); border: 1px solid rgb(26 26 26 / .1); border-radius: 999px;
  padding: .4rem 1.1rem; font-size: .88rem; font-weight: 400;
}
@media (min-width: 860px) {
  .about__grid { grid-template-columns: 1fr 1.4fr; gap: 4rem; }
}

/* ============ Portfolio ============ */
.portfolio { background: var(--white); }
.portfolio__head { display: grid; gap: 1.25rem; margin-bottom: 2rem; align-items: end; }
.portfolio__head h2 { margin: 0; }
.portfolio__head .section-lead { margin: 0; font-size: .98rem; }
@media (min-width: 860px) { .portfolio__head { grid-template-columns: 1.3fr 1fr; gap: 4rem; } .portfolio__head .section-lead { justify-self: end; max-width: 34ch; } }

.filters {
  display: flex; gap: .45rem; margin-bottom: 3.5rem;
  overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
  padding: 4px 20px 8px; margin-inline: -20px;
  scroll-snap-type: x proximity;
}
.filters::-webkit-scrollbar { display: none; }
.pill {
  flex: none; scroll-snap-align: start;
  min-height: 34px; padding: .25rem 1rem;
  border: 1px solid rgb(26 26 26 / .18); border-radius: 999px;
  background: var(--white); font-weight: 400; font-size: .8rem; white-space: nowrap;
  transition: background-color .2s, color .2s, transform .25s var(--ease-bounce);
}
.pill:hover { transform: translateY(-2px); border-color: var(--ink); }
.pill[aria-pressed="true"] { background: var(--ink); color: var(--white); border-color: var(--ink); font-weight: 600; }
@media (min-width: 1160px) { .filters { margin-inline: 0; padding-inline: 4px; } }

.grid { display: grid; gap: 0 2.25rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1180px) { .grid { grid-template-columns: repeat(4, 1fr); gap: 0 1.75rem; } }
@media (max-width: 639px) { .grid { justify-items: center; } .card { width: min(100%, 360px); } }
.card[hidden] { display: none; }

/* Entrada escalonada con rebote */
.js .card:not(.in) { opacity: 0; }
.card.in { animation: folder-in .85s var(--ease-bounce) backwards; animation-delay: calc(var(--d, 0) * 90ms); }
@keyframes folder-in {
  0%   { opacity: 0; transform: translateY(48px) scale(.9); }
  100% { opacity: 1; transform: none; }
}

/* Carpeta: fondo (z -2) y piezas (z -1) detrás; panel de vidrio en el flujo */
.card {
  position: relative; isolation: isolate;
  /* 3 filas compartidas con las carpetas vecinas (subgrid): chips / título / descripción alineados */
  display: grid; grid-row: span 3; grid-template-rows: subgrid; row-gap: 0;
  margin-bottom: 3.75rem; transform-origin: 50% 100%;
  transition: transform .55s var(--ease-out);
}
.folder__shadow {
  position: absolute; left: 8%; right: 8%; bottom: -20px; height: 28px; border-radius: 50%; z-index: -3;
  background: rgb(26 26 26 / .3); filter: blur(16px);
  transition: transform .5s var(--ease-out), opacity .5s;
}
.folder__back {
  position: absolute; inset: 30px 0 0 0; z-index: -2; border-radius: 8px 20px 20px 20px;
  background: var(--tone); box-shadow: 0 0 0 1px rgb(26 26 26 / .06);
}
.folder__back::before {
  content: ""; position: absolute; left: 0; top: -22px; width: 38%; height: 24px;
  border-radius: 14px 14px 0 0; background: var(--tone);
}
.folder__pieces { position: absolute; inset: 0; z-index: -1; }
.piece {
  --w: min(32%, 118px);
  position: absolute; width: var(--w); aspect-ratio: 3 / 4; object-fit: cover; object-position: top;
  border-radius: 12px; background: var(--white); color: transparent; font-size: 0;
  box-shadow: 0 8px 18px rgb(26 26 26 / .14);
  transform-origin: 50% 100%;
  transition: transform .6s var(--ease-bounce);
}
.piece--1 { left: calc(50% - var(--w) * 1.46); top: 30px; transform: rotate(-5deg); }
.piece--2 { left: calc(50% - var(--w) / 2);    top: 16px; transform: rotate(0deg); }
.piece--3 { left: calc(50% + var(--w) * .46);  top: 26px; transform: rotate(5deg); }

.folder__front {
  grid-row: 1 / span 3; margin-top: 118px;
  display: grid; grid-template-rows: subgrid; align-content: start;
  padding: .9rem 1.15rem 1.15rem; border-radius: 20px;
  background:
    linear-gradient(160deg, rgb(255 255 255 / .55), rgb(255 255 255 / .15) 70%),
    color-mix(in srgb, var(--glass, var(--tone)) 32%, rgb(255 255 255 / .45));
  -webkit-backdrop-filter: blur(16px) saturate(1.4); backdrop-filter: blur(16px) saturate(1.4);
  border: 1px solid rgb(255 255 255 / .85);
  box-shadow: inset 0 1px 0 #fff, 0 12px 28px rgb(26 26 26 / .08);
}

/* Abierto: hover (desktop) o .is-open (mobile, al entrar en pantalla) */
@media (hover: hover) {
  .card:hover, .card:focus-within { transform: rotate(-1.5deg) translateY(-6px); }
  .card:hover .folder__shadow, .card:focus-within .folder__shadow { transform: scale(.88) translateX(6%); opacity: .75; }
  .card:hover .piece--1, .card:focus-within .piece--1 { transform: translate(-8%, -16px) rotate(-11deg); }
  .card:hover .piece--2, .card:focus-within .piece--2 { transform: translateY(-24px) rotate(0deg); }
  .card:hover .piece--3, .card:focus-within .piece--3 { transform: translate(8%, -14px) rotate(10deg); }
  .card:hover .card__arrow, .card:focus-within .card__arrow { transform: translateX(8px); }
}
.card.is-open { transform: rotate(-1deg) translateY(-4px); }
.card.is-open .piece--1 { transform: translate(-7%, -14px) rotate(-10deg); }
.card.is-open .piece--2 { transform: translateY(-20px) rotate(0deg); }
.card.is-open .piece--3 { transform: translate(7%, -12px) rotate(9deg); }

/* Contenido del panel */
.card__tags { display: flex; flex-wrap: wrap; align-items: flex-start; align-content: flex-start; gap: .35rem; margin-bottom: .75rem; }
.tag { display: inline-block; font-size: .72rem; font-weight: 600; background: var(--white); border: 1px solid rgb(26 26 26 / .1); border-radius: 999px; padding: .15rem .8rem; line-height: 1.6; }
.tag--figma { background: rgb(255 255 255 / .55); font-weight: 400; }
.card__row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.card__title { font-size: 1.1rem; }
.card__open { background: none; border: 0; padding: 0; text-align: left; font-weight: 700; letter-spacing: -.02em; }
.card__open::after { content: ""; position: absolute; inset: 0; z-index: 5; border-radius: 20px; } /* toda la tarjeta clickeable */
.card__open:focus-visible { outline: none; }
.card:has(.card__open:focus-visible) .folder__front { outline: 3px solid var(--ink); outline-offset: 4px; }
.year { display: block; margin-top: .3rem; font-size: .78rem; font-weight: 600; letter-spacing: .02em; }
.card__sub { font-size: .85rem; margin-top: .25rem; max-width: 34ch; }
.card__arrow { flex: none; display: grid; place-items: center; transition: transform .45s var(--ease-bounce); }

/* ============ Experiencia ============ */
.experience { background: var(--pink-soft); }
.experience h2 { margin-bottom: 2.5rem; }
.jobs { border-bottom: 1px solid rgb(26 26 26 / .1); }
.jobs li { display: grid; gap: .35rem; padding: 1.5rem 0; border-top: 1px solid rgb(26 26 26 / .1); }
.jobs time { font-size: .85rem; font-weight: 400; }
.jobs h3 { font-size: 1.1rem; letter-spacing: -.01em; }
.jobs p { font-size: .95rem; margin-top: .3rem; max-width: 62ch; }
@media (min-width: 760px) {
  .jobs li { grid-template-columns: 220px 1fr; gap: 0 2rem; padding: 1.6rem 0; }
  .jobs time { padding-top: .2rem; }
}

/* ============ Herramientas y formación ============ */
.skills { background: var(--white); }
.skills__grid { display: grid; gap: 3rem; }
.skills .eyebrow { margin-bottom: 1.25rem; }
@media (min-width: 860px) { .skills__grid { grid-template-columns: 1.3fr 1fr; gap: 4rem; } }

.chips { display: flex; flex-wrap: wrap; gap: .6rem; }
.chips li {
  background: var(--white); border: 1px solid rgb(26 26 26 / .1); border-radius: 999px;
  padding: .4rem 1.1rem; font-size: .88rem; font-weight: 400;
}

.edu { display: grid; gap: 1.25rem; }
.edu h3 { font-size: 1.05rem; letter-spacing: -.01em; }
.edu p { font-size: .88rem; margin-top: .1rem; }
.acc { margin-top: 2rem; border-top: 1px solid rgb(26 26 26 / .1); border-bottom: 1px solid rgb(26 26 26 / .1); }
.acc summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 56px; cursor: pointer; list-style: none; font-weight: 600; font-size: .95rem; }
.acc summary::-webkit-details-marker { display: none; }
.acc summary i { position: relative; flex: none; width: 28px; height: 28px; border-radius: 50%; border: 1px solid rgb(26 26 26 / .18); transition: background-color .2s, border-color .2s; }
.acc summary i::before, .acc summary i::after { content: ""; position: absolute; left: 50%; top: 50%; width: 10px; height: 1.5px; background: var(--ink); translate: -50% -50%; transition: rotate .3s var(--ease-out); }
.acc summary i::after { rotate: 90deg; }
.acc summary:hover i { border-color: var(--ink); }
.acc[open] summary i { background: var(--pink); border-color: var(--pink); }
.acc[open] summary i::after { rotate: 0deg; }
.acc[open] .courses { animation: acc-in .35s var(--ease-out); }
@keyframes acc-in { from { opacity: 0; translate: 0 -6px; } }
.courses { padding-bottom: .5rem; }
.courses li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .1rem 1rem; padding: .65rem 0; border-top: 1px solid rgb(26 26 26 / .1); font-size: .88rem; }
.courses span { font-weight: 600; }

/* ============ Contacto ============ */
.contact { background: var(--white); padding-bottom: clamp(40px, 6vw, 72px); }
.contact__card {
  background: var(--pink); border-radius: clamp(28px, 5vw, 44px);
  padding: clamp(3rem, 8vw, 5.5rem) 1.5rem; text-align: center;
}
.contact__card .eyebrow { margin-bottom: 1.25rem; }
.contact h2 { font-size: clamp(2.2rem, 8vw, 4.6rem); letter-spacing: -.04em; margin: 0 0 1.5rem; }
.sel { position: relative; display: inline-block; white-space: nowrap; padding: .02em .14em; margin-left: .05em; z-index: 0; }
.sel::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--white); border: 1px solid var(--ink); }
.sel i { position: absolute; width: 9px; height: 9px; background: var(--white); border: 1px solid var(--ink); }
.sel i:nth-child(1) { top: -5px; left: -5px; }
.sel i:nth-child(2) { top: -5px; right: -5px; }
.sel i:nth-child(3) { bottom: -5px; left: -5px; }
.sel i:nth-child(4) { bottom: -5px; right: -5px; }
.hero__hi { display: block; position: relative; z-index: 2; }
.hero .sel { margin-left: -.14em; top: -.08em; } /* sube la caja: 'soy' queda apenas encimado */
.hero .sel::before { background: var(--pink); }
.hero .sel i { width: 11px; height: 11px; }
.hero .sel i:nth-child(1) { top: -6px; left: -6px; }
.hero .sel i:nth-child(2) { top: -6px; right: -6px; }
.hero .sel i:nth-child(3) { bottom: -6px; left: -6px; }
.hero .sel i:nth-child(4) { bottom: -6px; right: -6px; }

/* La caja se "dibuja" al aparecer: se abre desde el centro y los puntos rebotan */
.sel::before, .sel i { transition: opacity .35s var(--ease-out), transform .6s var(--ease-bounce), clip-path .6s var(--ease-out); }
.js .sel:not(.sel--on)::before { opacity: 0; clip-path: inset(0 100% 0 0); }
.js .sel:not(.sel--on) i { opacity: 0; transform: scale(0); }
.sel--on::before { transition-delay: .35s; }
.sel--on i:nth-child(1) { transition-delay: .35s; }
.sel--on i:nth-child(3) { transition-delay: .5s; }
.sel--on i:nth-child(4) { transition-delay: .95s; }
.sel--on i:nth-child(2) { transition-delay: .8s; }
.contact__lead { max-width: 40ch; margin: 0 auto 2rem; font-size: 1.05rem; }
.contact .btn-row { justify-content: center; }
.btn--white { background: var(--white); color: var(--ink); border-color: var(--white); }
.btn--outline { background: transparent; color: var(--ink); border-color: var(--ink); border-width: 1px; }
.btn--outline:hover { background: var(--ink); color: var(--white); }

.site-footer { background: var(--white); padding: 1.5rem 0 2rem; font-size: .85rem; }
.site-footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .4rem 1.5rem; }

/* ============ Modal ============ */
.modal {
  width: min(1120px, 94vw); max-height: 92vh; padding: 0; overflow: auto;
  border: 2px solid var(--ink); border-radius: 24px; background: var(--white); color: var(--ink);
  box-shadow: 10px 12px 0 var(--ink);
}
.modal[open] { animation: modal-in .4s var(--ease-bounce); }
/* modales con pestañas: alto fijo para que no cambie de tamaño al cambiar de pestaña */
.modal[open]:has(.tabs) { display: flex; flex-direction: column; }
.modal:has(.tabs) > * { flex-shrink: 0; }
.modal:has(.tabs) { height: 92vh; height: 92dvh; max-height: 92dvh; }
.modal::backdrop { background: rgb(26 26 26 / .6); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
@keyframes modal-in { from { opacity: 0; transform: translateY(24px) scale(.96); } }
.modal__bar { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: .9rem; padding: .7rem 1rem; background: var(--pink); border-bottom: 2px solid var(--ink); }
.modal__dots { display: flex; gap: 6px; }
.modal__path { font-size: .78rem; font-weight: 600; flex: 1; }
.modal__close { width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--ink); background: var(--white); font-size: 1rem; line-height: 1; }
.modal__close:hover { background: var(--ink); color: var(--white); }

/* Caso completo: galería a todo el ancho (cualquier cantidad de imágenes) + texto fijo al costado */
.modal__body { display: grid; gap: 1.75rem; padding: 1.25rem; }
.modal__gallery { display: grid; gap: 1rem; grid-template-columns: 1fr; align-content: start; }
.modal__gallery img { width: 100%; height: auto; display: block; border-radius: 14px; border: 1px solid rgb(26 26 26 / .12); background: var(--pink-soft); color: transparent; font-size: 0; }
.zoom { display: block; width: 100%; padding: 0; border: 0; background: none; border-radius: 14px; cursor: zoom-in; transition: transform .3s var(--ease-out); }
.zoom:hover { transform: scale(1.01); }
.modal__text { order: -1; display: flex; flex-wrap: wrap; align-items: flex-start; gap: .6rem; align-content: flex-start; }
.modal__text .tag { margin-right: .2rem; }
.modal__text h3 { flex-basis: 100%; font-size: clamp(1.7rem, 4vw, 2.3rem); margin-top: .6rem; }
.modal__sub--light { font-weight: 400; margin-top: -.3rem; }
.tabtext { display: contents; }
.tabtext[hidden] { display: none; }
.modal__sub { flex-basis: 100%; font-weight: 600; font-size: .95rem; }
.modal__text p:not(.tag):not(.modal__sub) { flex-basis: 100%; max-width: 60ch; font-size: .875rem; line-height: 1.6; }
@media (min-width: 860px) {
  .modal__body { grid-template-columns: 1.6fr 1fr; padding: 1.75rem; gap: 2.5rem; }
  .modal__text { order: 0; align-self: stretch; }
  /* escritorio: alto fijo y dos columnas con scroll propio (texto e imágenes por separado) */
  .modal[open] { display: flex; flex-direction: column; height: 92vh; height: 92dvh; max-height: 92dvh; overflow: hidden; }
  .modal[open] > * { flex-shrink: 0; }
  .modal[open] > .modal__body { flex: 1 1 0; min-height: 0; overflow: hidden; grid-template-rows: minmax(0, 1fr); padding-bottom: 0; }
  .modal__gallery, .modal__text { min-height: 0; max-height: 100%; overflow-y: auto; overscroll-behavior: contain; padding-bottom: 1.75rem; }
  .modal__gallery { padding-right: .6rem; }
  .modal__text { padding-right: .4rem; }
}

.modal__text .btn { margin-top: .9rem; }
.modal__text .btn--ext { margin-top: 0; }
.btn-stack { display: grid; gap: .5rem; width: max-content; max-width: 100%; margin-top: .9rem; }

/* Anterior / siguiente */
.modal__nav { display: flex; justify-content: space-between; gap: 1rem; padding: .6rem 1.25rem; margin-top: auto; position: sticky; bottom: 0; z-index: 5; background: var(--white); border-top: 1px solid rgb(26 26 26 / .1); }
.modal__nav button {
  display: flex; flex-direction: column; flex-direction: row; align-items: baseline; gap: .45rem; max-width: 48%; padding: .4rem .85rem; border-radius: 999px;
  border: 1px solid rgb(26 26 26 / .18); background: var(--white); text-align: left;
  transition: transform .25s var(--ease-out), border-color .2s;
}
.modal__nav button:hover { transform: translateY(-2px); border-color: var(--ink); }
.modal__nav small { font-size: .72rem; white-space: nowrap; font-weight: 700; }
.modal__nav strong { font-size: .8rem; font-weight: 400; color: rgb(26 26 26 / .55); }
.modal__nav .is-next { text-align: right; margin-left: auto; }

/* Visor */
.lightbox { width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgb(26 26 26 / .94); color: var(--white); }
.lightbox[open] { display: grid; place-items: center; }
.lightbox::backdrop { background: transparent; }
.lightbox img { max-width: min(92vw, 1400px); max-height: 82vh; width: auto; height: auto; border-radius: 12px; background: var(--white); }
.lightbox__btn { position: absolute; width: 48px; height: 48px; border-radius: 50%; border: 0; background: var(--white); color: var(--ink); font-size: 1.2rem; line-height: 1; display: grid; place-items: center; }
.lightbox__btn:hover { background: var(--pink); }
.lightbox .lightbox__btn:focus-visible { outline-color: var(--white); }
.lightbox__close { top: 1.25rem; right: 1.25rem; }
.lightbox__prev { left: 1.25rem; top: 50%; translate: 0 -50%; }
.lightbox__next { right: 1.25rem; top: 50%; translate: 0 -50%; }
.lightbox__count { position: absolute; bottom: 1.25rem; left: 0; right: 0; text-align: center; font-size: .85rem; }

/* Reporte largo: recuadro con scroll propio, controles flotando sobre la imagen */
.report { position: relative; margin: 0; border: 1px solid rgb(26 26 26 / .18); border-radius: 16px; overflow: hidden; background: var(--white); }
.report__full { position: absolute; bottom: .6rem; right: .6rem; z-index: 3; padding: .3rem .85rem; border: 1px solid rgb(26 26 26 / .2); border-radius: 999px; background: rgb(255 255 255 / .92); font-size: .75rem; font-weight: 600; box-shadow: 0 2px 8px rgb(26 26 26 / .08); }
.report__full:hover { background: var(--ink); color: var(--white); border-color: var(--ink); }
.report__scroll { max-height: min(70vh, 680px); overflow-y: auto; scrollbar-width: thin; background: #fff; }
.report__scroll img { display: block; width: 100%; height: auto; border: 0; border-radius: 0; background: #fff; }
.report__hint, .deck__count { position: absolute; bottom: .7rem; left: 50%; translate: -50% 0; z-index: 3; padding: .25rem .8rem; border-radius: 999px; background: rgb(26 26 26 / .85); color: var(--white); font-size: .75rem; font-weight: 600; pointer-events: none; transition: opacity .3s; }
.report.is-scrolled .report__hint { opacity: 0; }
.report--pages .report__scroll { background: rgb(26 26 26 / .08); display: grid; gap: 10px; }
.report--pages .report__scroll img { box-shadow: 0 1px 0 rgb(26 26 26 / .1); cursor: zoom-in; }
.report--mobile { width: min(100%, 300px); margin-inline: auto; }
.report--mobile .report__scroll { max-height: min(70vh, 620px); }
.reportview { width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgb(26 26 26 / .94); }
.reportview[open] { display: block; }
.reportview::backdrop { background: transparent; }
.reportview__scroll { width: 100%; height: 100%; overflow-y: auto; padding: 1.25rem 0 2rem; }
.reportview__scroll img { display: block; width: min(94vw, 1400px); height: auto; margin: 0 auto; background: #fff; }
.reportview__close { position: fixed; top: 1.25rem; right: 1.25rem; z-index: 2; }
.reportview .lightbox__btn:focus-visible { outline-color: var(--white); }

/* Pestañas de reportes: una sola pieza visible por vez */
.tabs { display: none; flex-wrap: wrap; align-content: flex-start; gap: .3rem; }
.js .tabs { display: flex; }
.tab { margin: 0; letter-spacing: 0; min-height: 28px; padding: .15rem .8rem; border: 1px solid rgb(26 26 26 / .18); border-radius: 999px; background: var(--white); font-size: .75rem; font-weight: 400; transition: background-color .2s, color .2s, border-color .2s; }
.tab:hover { border-color: var(--ink); }
.tab[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: var(--white); font-weight: 600; }
.tabpanel[hidden] { display: none; }
.tabpanel + .tabpanel { margin-top: 1rem; }
.js .tabpanel + .tabpanel { margin-top: 0; }
.tabpanel .deck { margin-top: 0; }
.tabpanel:not([hidden]):not(:has(.deck)) { display: grid; gap: 1rem; margin-top: .75rem; }

/* Reporte en diapositivas */
.deck { margin-top: 1rem; }
.deck__slide { display: block; width: 100%; height: auto; background: #fff; border: 0; border-radius: 0; }
.deck__nav { display: none; }
.deck--on .deck__stage { position: relative; aspect-ratio: var(--ratio, 16 / 9); overflow: hidden; background: #fff; cursor: zoom-in; }
.deck--on .deck__slide { height: 100%; object-fit: contain; background: #fff; }
.deck--on .deck__slide:first-of-type { object-fit: cover; }
.deck--on .deck__slide[hidden] { display: none; }
.deck--on .deck__nav { display: grid; place-items: center; position: absolute; top: 50%; translate: 0 -50%; width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgb(26 26 26 / .2); background: rgb(255 255 255 / .92); font-size: 1.1rem; line-height: 1; cursor: pointer; transition: background-color .2s, transform .25s var(--ease-bounce); }
.deck--on .deck__nav:hover { background: var(--pink); transform: scale(1.08); }
.deck__prev { left: .6rem; }
.deck__next { right: .6rem; }

/* ============ Movimiento reducido ============ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .card:not(.in) { opacity: 1; }
}

.modal__dots i { width: 11px; height: 11px; border-radius: 50%; border: 1.5px solid var(--ink); background: var(--white); }
.modal__dots i:first-child { background: var(--rose); }

/* disuasión básica: las imágenes de los proyectos no se arrastran ni se seleccionan */
.modal img, .reportview img, .lightbox img, .folder__pieces img {
  -webkit-user-drag: none; user-drag: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
}

/* marca de agua: oculta; aparece solo al intentar guardar, imprimir o capturar la pantalla */
:root { --wm: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='360' height='210'%3E%3Ctext x='180' y='110' text-anchor='middle' transform='rotate(-24 180 105)' font-family='Sora,Arial,sans-serif' font-size='19' font-weight='700' letter-spacing='1' fill='%231A1A1A' fill-opacity='.28' stroke='%23fff' stroke-opacity='.45' stroke-width='3' paint-order='stroke'%3Emarianapiovano.com.ar%3C/text%3E%3C/svg%3E"); }
.modal::after, .reportview::after, .lightbox::after {
  content: ''; position: fixed; inset: 0; z-index: 20; pointer-events: none;
  background: var(--wm) 0 0 / 360px 210px repeat;
  opacity: 0; transition: opacity .12s;
}
html.wm-on .modal::after, html.wm-on .reportview::after, html.wm-on .lightbox::after { opacity: 1; }
@media print {
  .modal::after, .reportview::after, .lightbox::after { opacity: 1; }
}
.site-footer__map { display: inline-flex; align-items: center; gap: .4rem; color: inherit; text-decoration: none; }
.site-footer__map:hover, .site-footer__map:focus-visible { text-decoration: underline; text-underline-offset: 3px; }
.site-footer__rights { flex-basis: 100%; font-size: .75rem; opacity: .7; }

/* Servicios (Sobre mí) y preguntas frecuentes */
.services { margin-top: clamp(2.5rem, 6vw, 4rem); }
.services__list { display: grid; gap: 1rem; grid-template-columns: 1fr; }
.services__list li { padding: 1.25rem 1.25rem 1.35rem; border-radius: 20px; background: var(--white); }
.services__list h4 { font-size: .95rem; font-weight: 600; margin-bottom: .4rem; letter-spacing: -.01em; }
.services__list p { font-size: .85rem; line-height: 1.55; }
@media (min-width: 700px) { .services__list { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .services__list { grid-template-columns: repeat(4, 1fr); } }
.faq h2 { margin-bottom: 1.5rem; }
.faq__list { max-width: 760px; border-top: 1px solid rgb(26 26 26 / .1); }
.faq__list .acc { margin-top: 0; border-top: 0; }
.faq__list .acc p { padding: 0 3rem 1.1rem 0; font-size: .875rem; line-height: 1.6; animation: acc-in .35s var(--ease-out); }
