/* Antonio Ramírez — portfolio
   Escritorio ≥1100 px · tablet 768–1099 px · móvil <768 px */

@font-face { font-family: 'Archivo'; font-weight: 300; font-display: swap; src: url('/fonts/archivo-latin-300-normal.woff2') format('woff2'); }
@font-face { font-family: 'Archivo'; font-weight: 400; font-display: swap; src: url('/fonts/archivo-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Archivo'; font-weight: 500; font-display: swap; src: url('/fonts/archivo-latin-500-normal.woff2') format('woff2'); }

:root {
  --bg: #000000; --logo: #252525; --text: #B5B5B5; --sub: #8A8A8A; --faint: #7A7A7A; --sign: #5E5E5E;
  --line: rgba(255,255,255,.08); --tile-line: rgba(255,255,255,.07); --hover: rgba(255,255,255,.05); --active: rgba(255,255,255,.08); --soft: rgba(255,255,255,.05);
  --glass: rgba(14,14,14,.5); --g-border: rgba(255,255,255,.09); --g-hi: rgba(255,255,255,.14); --shadow: rgba(0,0,0,.4);
  --veil: rgba(0,0,0,.45); --amb: .8; --scrim: rgba(0,0,0,.5); --pal: rgba(14,14,14,.8); --cta-hover: rgba(255,255,255,.2);
  --ease: cubic-bezier(.2,.8,.2,1); --ease-io: cubic-bezier(.65,0,.35,1);
  --font: 'Archivo', system-ui, -apple-system, sans-serif;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #F6F6F6; --logo: #C6C6C6; --text: #555555; --sub: #666666; --faint: #6E6E6E; --sign: #8C8C8C;
  --line: rgba(0,0,0,.07); --tile-line: rgba(0,0,0,.06); --hover: rgba(0,0,0,.03); --active: rgba(0,0,0,.05); --soft: rgba(0,0,0,.035);
  --glass: rgba(250,250,250,.7); --g-border: rgba(255,255,255,.8); --g-hi: rgba(255,255,255,.9); --shadow: rgba(0,0,0,.1);
  --veil: rgba(246,246,246,.5); --amb: .55; --scrim: rgba(0,0,0,.12); --pal: rgba(250,250,250,.88); --cta-hover: rgba(0,0,0,.18);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font-family: var(--font); -webkit-font-smoothing: antialiased; }
body { overflow: hidden; transition: background .4s ease, color .4s ease; }
a { color: inherit; }
button { font: inherit; color: inherit; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .45s; animation-timing-function: ease; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--sub); outline-offset: 2px; border-radius: 6px; }
.noscroll { scrollbar-width: none; } .noscroll::-webkit-scrollbar { display: none; }

/* ——— Ambient ——— */
.amb { position: fixed; inset: -120px; z-index: 0; opacity: var(--amb); filter: blur(100px) saturate(130%); pointer-events: none; transition: opacity .6s ease; transform: translateZ(0); will-change: transform; } /* capa propia: evita recuadros del desenfoque bajo el cristal en Chrome */
.amb > * { position: absolute; transition: background .6s ease, opacity .6s ease; }
.amb .a { left: 0; top: 0; width: 55%; height: 100%; }
.amb .b { right: 0; top: 0; width: 55%; height: 100%; }
.amb .c { left: 30%; top: 20%; width: 600px; height: 600px; border-radius: 50%; }
.amb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .8s ease; }
.amb img.on { opacity: 1; }
.veil { position: fixed; inset: 0; z-index: 0; background: var(--veil); pointer-events: none; }
.veil2 { position: fixed; inset: 0; z-index: 1; background: var(--bg); opacity: 0; pointer-events: none; transition: opacity .6s ease; }
body.acc-open .veil2 { opacity: .35; }
body.home .veil2 { opacity: .92; }

/* ——— Shared bits ——— */
.kbd { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 5px; border: 1px solid var(--line); background: var(--soft); color: var(--sub); font-size: 10.5px; font-family: inherit; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 30px; border-radius: 8px; border: 1px solid var(--line); background: transparent; color: var(--text); font-size: 11.5px; cursor: pointer; padding: 0 8px; }
.btn.icon { width: 30px; padding: 0; }
.ghost { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 8px 0 12px; border-radius: 8px; border: 1px solid var(--line); background: transparent; color: var(--text); font-size: 12px; text-decoration: none; cursor: pointer; white-space: nowrap; transition: background .2s ease, border-color .2s ease; }
.ghost:hover { background: var(--active); border-color: var(--cta-hover); }
.cta { align-self: flex-start; padding: 0 8px 0 10px; }
.logo { display: block; color: var(--logo); }
.dot-live { width: 7px; height: 7px; border-radius: 50%; background: #2fbf71; box-shadow: 0 0 0 3px rgba(47,191,113,.2); flex: none; }
.dot-live { animation: live 2s ease-in-out infinite; }
@keyframes live { 0%, 100% { opacity: 1; box-shadow: 0 0 0 3px rgba(47,191,113,.2); } 50% { opacity: .35; box-shadow: 0 0 0 5px rgba(47,191,113,0); } }
@media (prefers-reduced-motion: reduce) { .dot-live { animation: none; } }
.glass { background: var(--glass); backdrop-filter: blur(32px) saturate(160%); -webkit-backdrop-filter: blur(32px) saturate(160%); border: 1px solid var(--g-border); box-shadow: 0 30px 90px var(--shadow); }
.num { font-size: 11px; font-weight: 300; font-variant-numeric: tabular-nums; color: var(--faint); }
.meta-s { font-size: 11px; font-weight: 300; font-variant-numeric: tabular-nums; color: var(--sub); }
.sign { font-size: 11px; font-weight: 300; color: var(--sign); }

/* Media tile (video, image or placeholder) */
.tile { position: relative; overflow: hidden; border-radius: 10px; aspect-ratio: 4 / 5; background: transparent; isolation: isolate; }
/* Filo gris muy sutil por encima del vídeo (sin hueco negro entre borde y vídeo) */
.tile::after { content: ''; position: absolute; inset: 0; z-index: 2; border-radius: inherit; box-shadow: inset 0 0 0 1px var(--tile-line); pointer-events: none; }
.tile video, .tile img { transform: translateZ(0); }
.tile video, .tile img { position: absolute; inset: -1px; width: calc(100% + 2px); height: calc(100% + 2px); object-fit: cover; display: block; }
.tile .ph-c { position: absolute; border-radius: 50%; }
.tile .ph-b { position: absolute; left: 0; right: 0; bottom: 0; height: 14%; }

/* ——— Intro ——— */
.intro { position: fixed; inset: 0; z-index: 30; display: flex; align-items: center; justify-content: center; opacity: 0; pointer-events: none; transition: opacity .6s ease; touch-action: none; user-select: none; -webkit-user-select: none; }
body.home .intro { opacity: 1; pointer-events: auto; transition-delay: .2s; }
.intro .mark { width: min(620px, 60vh, 74vw); height: auto; display: block; transform: scale(.96); transition: transform .7s var(--ease); }
body.home .intro .mark { transform: scale(1); }
.intro .mark path { fill: var(--logo); }
.intro .stack { display: flex; flex-direction: column; align-items: center; gap: 56px; }
.intro .enter { height: 40px; padding: 0 8px 0 16px; border-radius: 999px; background: var(--glass); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); font-size: 13px; color: var(--sub); }
.intro .enter .kbd { min-width: 24px; height: 24px; border-radius: 999px; }
.corner { position: fixed; z-index: 31; font-size: 13px; color: var(--sub); opacity: 0; pointer-events: none; transition: opacity .6s ease; }
body.home .corner { opacity: 1; transition-delay: .35s; }
.corner.tl { left: 24px; top: 24px; height: 42px; display: flex; align-items: center; }
.corner.tr { right: 24px; top: 24px; height: 42px; display: flex; align-items: center; }
.corner.bl { left: 24px; bottom: 24px; } .corner.br { right: 24px; bottom: 24px; }
body.home:not(.first) .corner.tl { opacity: 0; }

/* ——— Desktop / tablet app ——— */
.app { position: fixed; inset: 0; z-index: 2; }
.side { position: absolute; z-index: 6; left: 24px; top: 24px; bottom: 24px; width: 400px; padding: 18px; display: flex; flex-direction: column; gap: 16px; border-radius: 18px;
  transition: opacity .5s ease, transform .7s var(--ease-io); transform-origin: left top; transition-delay: .1s; }
body.collapsed .side { opacity: 0; transform: translateX(-28px) scale(.97); pointer-events: none; transition-delay: 0s; }
body.in-proj .side { opacity: 0; transform: translateX(-12px); pointer-events: none; transition-delay: 0s; }
.side-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand .logo-btn { flex: none; display: inline-flex; padding: 0; border: none; background: transparent; cursor: pointer; }
.brand .who { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.brand .who b { font-size: 13px; font-weight: 500; letter-spacing: -.005em; }
.brand .who span { font-size: 12px; font-weight: 300; color: var(--sub); }
.tools { display: flex; align-items: center; gap: 4px; }
.side-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 16px; margin: -10px -6px 0; padding: 10px 6px 40px;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 14px, #000 calc(100% - 64px), transparent 100%); mask-image: linear-gradient(to bottom, transparent 0, #000 14px, #000 calc(100% - 64px), transparent 100%); }
.side-scroll > * { flex-shrink: 0; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-item { display: flex; align-items: center; justify-content: space-between; height: 30px; padding: 0 8px 0 10px; border-radius: 8px; font-size: 13px; text-decoration: none; color: var(--sub); background: transparent; border: 0; width: 100%; cursor: pointer; transition: background .2s ease, color .2s ease; }
.nav-item:hover { background: var(--hover); color: var(--text); }
.nav-item[aria-current="page"] { background: var(--active); color: var(--text); font-weight: 500; }
.nav-item .hint { display: inline-flex; gap: 3px; opacity: 0; transform: translateX(4px); transition: opacity .2s ease, transform .2s ease; }
.nav-item .chev { opacity: 0; transition: transform .3s var(--ease), opacity .2s ease; }
.nav-item:hover .hint, .nav-item:hover .chev, .nav-item:focus-visible .hint, .nav-item:focus-visible .chev { opacity: 1; transform: none; }
.nav-item[aria-expanded="true"] .chev { transform: rotate(90deg); }
body.no-keys .hint { display: none !important; }
.acc { display: grid; grid-template-rows: 0fr; opacity: 0; transition: grid-template-rows .45s var(--ease), opacity .35s ease; }
.acc.open { grid-template-rows: 1fr; opacity: 1; }
.acc > div { overflow: hidden; min-height: 0; }
.acc-in { display: flex; flex-direction: column; gap: 16px; margin: 6px 0 10px 10px; padding: 4px 4px 6px 14px; border-left: 1px solid var(--line); }
.p13 { margin: 0; font-size: 13px; font-weight: 300; line-height: 1.55; color: var(--text); }
.sec { display: flex; flex-direction: column; gap: 8px; padding-top: 14px; border-top: 1px solid var(--line); }
.sec h2 { margin: 0; font-size: 11px; font-weight: 400; letter-spacing: .04em; text-transform: uppercase; color: var(--faint); }
.chip { display: inline-flex; align-items: center; height: 18px; padding: 0 6px; border-radius: 5px; background: var(--soft); border: 1px solid var(--line); font-size: 10.5px; font-variant-numeric: tabular-nums; letter-spacing: .02em; color: var(--sub); }
.exp { display: flex; flex-direction: column; gap: 14px; }
.exp > div { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; font-size: 13px; line-height: 1.4; }
.aw { display: grid; grid-template-columns: 116px minmax(0,1fr) auto; align-items: center; gap: 10px; min-height: 40px; padding: 4px 0; }
.aw .pill { justify-self: start; display: inline-flex; align-items: center; height: 18px; padding: 0 6px; border-radius: 5px; border: 1px solid var(--line); font-size: 10.5px; background: var(--active); font-weight: 500; color: var(--text); white-space: nowrap; }
.aw .pill.out { background: transparent; font-weight: 400; color: var(--sub); }
.aw .t { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: 13px; line-height: 1.35; }
.aw .t small { font-size: 11px; font-weight: 300; color: var(--sub); }
.svc { display: flex; align-items: center; gap: 10px; min-height: 34px; font-size: 13px; line-height: 1.3; }
.svc .num { width: 22px; flex: none; }
.tags { display: flex; flex-wrap: wrap; gap: 5px; }
.tag { display: inline-flex; align-items: center; height: 26px; padding: 0 9px; border-radius: 7px; background: var(--soft); border: 1px solid var(--line); font-size: 12px; }
.crow { display: grid; grid-template-columns: 76px minmax(0,1fr); align-items: center; gap: 12px; min-height: 30px; font-size: 13px; }
.crow a { text-decoration: none; }
.crow .lnk { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.crow .arr { color: var(--faint); }
.copy { flex: none; height: 22px; padding: 0 8px; border-radius: 6px; border: 1px solid var(--line); background: var(--soft); color: var(--sub); font-size: 11px; cursor: pointer; }
.filters { display: flex; flex-wrap: nowrap; gap: 2px; padding-top: 14px; border-top: 1px solid var(--line); overflow-x: auto; }
.filter { flex: none; white-space: nowrap; display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 7px; border: none; border-radius: 7px; font-size: 12px; cursor: pointer; color: var(--sub); background: transparent; transition: background .2s ease, color .2s ease; }
.filter:hover { background: var(--hover); color: var(--text); }
.filter[aria-pressed="true"] { background: var(--active); color: var(--text); font-weight: 500; }
.filter i { font-style: normal; font-size: 11px; font-variant-numeric: tabular-nums; opacity: .65; }
.rows { display: flex; flex-direction: column; gap: 2px; }
.row { display: grid; grid-template-columns: 26px minmax(0,1fr) 48px; gap: 12px; align-items: center; width: 100%; height: 42px; padding: 0 10px; border-radius: 9px; text-decoration: none; color: var(--text); background: transparent; border: 0; text-align: left; cursor: pointer; transition: background .2s ease; }
.row[aria-current="true"] { background: var(--active); }
.row .nm { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.row .nm b { font-size: 13px; font-weight: 400; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .nm span { font-size: 11px; font-weight: 300; color: var(--sub); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .yr { text-align: right; }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 12px; padding-top: 14px; border-top: 1px solid var(--line); }
.status { display: flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 300; color: var(--sub); }

.mini { position: fixed; z-index: 32; left: 24px; top: 24px; display: flex; align-items: center; gap: 8px; padding: 6px; border-radius: 14px; opacity: 0; transform: translateY(-6px); pointer-events: none; transition: opacity .45s ease, transform .6s var(--ease-io); }
body.collapsed .mini { opacity: 1; transform: none; pointer-events: auto; transition-delay: .35s; }
body.home.first .mini { opacity: 0; pointer-events: none; }
body.v404 .mini { opacity: 0; pointer-events: none; }

.stage { position: absolute; z-index: 3; top: 24px; bottom: 24px; left: 448px; right: 24px; display: flex; align-items: center; justify-content: center;
  transition: opacity .4s ease, transform .5s var(--ease), left .75s var(--ease-io); transition-delay: .15s; }
body.collapsed .stage { left: 24px; }
/* Ocultar/mostrar la barra lateral: más rápido que la entrada desde la intro */
body.side-quick .side { transition: opacity .22s ease, transform .38s var(--ease-io); transition-delay: 0s; }
body.side-quick .mini { transition: opacity .2s ease, transform .3s var(--ease-io); transition-delay: 0s; }
body.side-quick.collapsed .mini { transition-delay: .12s; }
body.side-quick .stage { transition: opacity .4s ease, transform .5s var(--ease), left .42s var(--ease-io); transition-delay: 0s; }
body.in-proj .stage, body.home .stage { opacity: 0; transform: translateY(-16px) scale(.98); pointer-events: none; transition-delay: 0s; }
.stage-in { display: flex; flex-direction: column; gap: 20px; width: min(928px, 100%, calc((100vh - 160px) * 1.6 + 32px)); transition: opacity .2s ease; }
.stage-in.swap { opacity: 0; }
.cards { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 32px; }
.cards .tile { cursor: pointer; box-shadow: 0 30px 80px var(--shadow); }
.cap { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.cap .t { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cap .t b { font-size: 16px; font-weight: 400; letter-spacing: -.01em; }
.cap .t span { font-size: 12px; font-weight: 300; color: var(--sub); }
.cap .r { display: flex; align-items: center; gap: 16px; flex: none; }

.ppanel { position: absolute; z-index: 7; left: 24px; top: 24px; bottom: 24px; width: 400px; padding: 18px; display: flex; flex-direction: column; gap: 20px; border-radius: 18px; overflow-y: auto;
  opacity: 0; transform: translateX(-12px); pointer-events: none; transition: opacity .4s ease, transform .5s var(--ease); }
body.in-proj .ppanel { opacity: 1; transform: none; pointer-events: auto; transition-delay: .12s; }
.ppanel .top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ppanel .pos { display: flex; align-items: center; gap: 6px; }
.ppanel h1 { margin: 0; font-size: 24px; line-height: 1.1; font-weight: 400; letter-spacing: -.015em; }
.ppanel .meta { display: flex; flex-direction: column; gap: 2px; padding: 10px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.ppanel .desc { display: flex; flex-direction: column; gap: 12px; }
.ppanel .desc p { margin: 0; font-size: 13px; font-weight: 300; line-height: 1.6; }
.next { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-radius: 12px; background: var(--soft); border: 1px solid var(--line); text-decoration: none; color: var(--text); cursor: pointer; width: 100%; text-align: left; }
.next small { display: block; font-size: 11px; font-weight: 300; color: var(--sub); margin-bottom: 3px; }
.pgallery { position: absolute; z-index: 4; top: 0; bottom: 0; left: 448px; right: 0; padding: 24px 24px 48px 0; overflow-y: auto; opacity: 0; transform: translateY(28px); pointer-events: none;
  transition: opacity .5s ease, transform .6s var(--ease); }
body.in-proj .pgallery { opacity: 1; transform: none; pointer-events: auto; transition-delay: .22s; }
.pgallery.swap { opacity: 0 !important; transition-delay: 0s !important; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; }

/* Command menu */
.scrim { position: fixed; inset: 0; z-index: 40; background: var(--scrim); border: 0; padding: 0; }
.pal { position: fixed; z-index: 41; left: 50%; top: 110px; transform: translateX(-50%); width: min(560px, calc(100vw - 32px)); border-radius: 16px; overflow: hidden; background: var(--pal);
  backdrop-filter: blur(40px) saturate(160%); -webkit-backdrop-filter: blur(40px) saturate(160%); border: 1px solid var(--g-border); box-shadow: 0 40px 120px var(--shadow); }
.pal-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); color: var(--sub); }
.pal-head input { flex: 1; border: none; outline: none; background: transparent; color: var(--text); font: 300 15px var(--font); }
.pal-list { display: flex; flex-direction: column; gap: 1px; padding: 8px; max-height: min(60vh, 520px); overflow-y: auto; }
.pal-sec { padding: 10px 10px 4px; font-size: 11px; letter-spacing: .04em; text-transform: uppercase; color: var(--faint); }
.pal-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 36px; padding: 0 10px; border: none; border-radius: 8px; background: transparent; color: var(--text); font-size: 13px; text-align: left; cursor: pointer; }
.pal-row.on { background: var(--active); }
.pal-row .k { display: inline-flex; gap: 3px; }
.pal-foot { display: flex; gap: 16px; padding: 10px 16px; border-top: 1px solid var(--line); font-size: 11.5px; color: var(--faint); }
.pal-foot span { display: inline-flex; align-items: center; gap: 5px; }

/* 404 */
.nf { position: fixed; inset: 0; z-index: 35; display: none; align-items: center; justify-content: center; text-align: center; background: var(--bg); }
body.v404 .nf { display: flex; }
.nf .in { display: flex; flex-direction: column; align-items: center; gap: 28px; }
.nf .tx { display: flex; flex-direction: column; gap: 8px; align-items: center; }
.nf b { font-size: 24px; font-weight: 400; letter-spacing: -.015em; }

/* ——— Tablet ——— */
@media (max-width: 1099px) and (min-width: 768px) {
  .side, .ppanel { left: 16px; top: 16px; bottom: 16px; width: 320px; padding: 16px 16px 24px; }
  .mini { left: 16px; top: 16px; }
  .stage { left: 360px; right: 24px; top: 16px; bottom: 16px; }
  .pgallery { left: 360px; padding: 16px 16px 40px 0; }
  .hint, .tools .kbtn, .ghost .kbd, .cta .kbd { display: none !important; }
  .row, .nav-item { min-height: 44px; height: auto; }
  .filter { height: 36px; }
  .nav-item .chev { opacity: 1; }
}
@media (max-width: 1099px) and (min-width: 768px) and (orientation: portrait) {
  .side, .ppanel { width: 300px; }
  .stage { left: 340px; }
  .pgallery { left: 340px; }
  .cards { grid-template-columns: 1fr; }
  .cards .tile:nth-child(2) { display: none; }
  .stage-in { width: min(100%, calc((100vh - 140px) * .8)); }
  .grid2 { grid-template-columns: 1fr; }
}

/* ——— Mobile ——— */
.m { display: none; }
@media (max-width: 767px), (max-height: 500px) and (hover: none) {
  .app, .mini { display: none; }
  .m { display: block; position: fixed; inset: 0; z-index: 2; }
  .m-top { position: absolute; z-index: 3; left: 12px; right: 12px; top: calc(12px + env(safe-area-inset-top, 0px)); height: 56px; padding: 0 6px 0 12px; display: flex; align-items: center; justify-content: space-between; border-radius: 14px; }
  .m-brand { display: flex; align-items: center; gap: 10px; padding: 0; border: none; background: transparent; cursor: pointer; text-align: left; }
  .m-brand b { display: block; font-size: 13px; font-weight: 500; }
  .m-brand span { display: block; font-size: 11px; font-weight: 300; color: var(--sub); }
  .m-icon { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: none; border-radius: 10px; background: transparent; cursor: pointer; }
  .m-scroll { position: absolute; inset: 0; z-index: 1; overflow-x: hidden; overflow-y: auto; padding: calc(84px + env(safe-area-inset-top, 0px)) 16px calc(110px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column;
    transition: opacity .25s ease; }
  /* Cambio de pantalla en móvil: atenuado breve, sin llegar a negro. Los filtros cambian al corte. */
  .m-scroll.fade { opacity: .4; transition: opacity .12s ease; }
  .m-filters { display: flex; gap: 2px; overflow-x: auto; margin-bottom: 12px; }
  .m-filters .filter { height: 36px; padding: 0 8px; }
  .m-row { display: grid; grid-template-columns: minmax(0,1fr) 40px; gap: 14px; align-items: center; width: 100%; min-height: 60px; padding: 8px 0; border: none; border-bottom: 1px solid var(--line); background: transparent; text-align: left; cursor: pointer; }
  .m-row b { display: block; font-size: 14px; font-weight: 400; }
  .m-row span { display: block; font-size: 11px; font-weight: 300; color: var(--sub); margin-top: 2px; }
  .m-row .yr { text-align: right; }
  .m-proj-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
  .m-proj-head .pos { display: flex; align-items: center; gap: 6px; }
  .m-track { position: relative; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
  .m-panel { display: flex; flex-direction: column; gap: 20px; }
  .m-panel.side-l, .m-panel.side-r { position: absolute; left: 0; top: 0; width: 100%; opacity: .35; }
  .m-panel h1 { margin: 0; font-size: 24px; line-height: 1.1; font-weight: 400; letter-spacing: -.015em; }
  .m-meta { display: flex; flex-direction: column; padding: 8px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
  .m-meta div { display: grid; grid-template-columns: 80px minmax(0,1fr); gap: 12px; min-height: 30px; align-items: center; font-size: 13px; }
  .m-meta small { font-size: 11px; font-weight: 300; color: var(--sub); }
  .m-panel p, .m-p { margin: 0; font-size: 14px; font-weight: 300; line-height: 1.6; }
  .m-stack { display: flex; flex-direction: column; gap: 10px; }
  .m-info { display: flex; flex-direction: column; gap: 22px; }
  .m-info .sec { padding-top: 16px; gap: 6px; }
  .m-info .exp > div, .m-aw { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; padding: 4px 0; font-size: 14px; line-height: 1.4; }
  .m-aw .pill { display: inline-flex; align-items: center; height: 18px; padding: 0 6px; border-radius: 5px; border: 1px solid var(--line); font-size: 10.5px; background: var(--active); font-weight: 500; }
  .m-aw .pill.out { background: transparent; font-weight: 400; color: var(--sub); }
  .m-aw small { font-size: 11px; font-weight: 300; color: var(--sub); }
  .m-info .svc { font-size: 14px; min-height: 32px; }
  .m-info .tag { height: 28px; padding: 0 10px; }
  .m-contact { display: flex; flex-direction: column; gap: 22px; }
  .m-crow { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; border-bottom: 1px solid var(--line); font-size: 14px; text-decoration: none; }
  .m-crow small { display: block; font-size: 11px; font-weight: 300; color: var(--sub); margin-bottom: 2px; }
  .m-crow .copy { min-height: 32px; padding: 0 10px; }
  .m-foot { display: flex; flex-direction: column; gap: 6px; padding-top: 20px; font-size: 11px; font-weight: 300; color: var(--faint); }
  .m-nav { position: absolute; z-index: 3; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); display: flex; gap: 2px; padding: 4px; border-radius: 14px; }
  .m-nav button { min-height: 44px; padding: 0 18px; border: none; border-radius: 10px; font-size: 13px; cursor: pointer; color: var(--sub); background: transparent; }
  .m-nav button[aria-current="page"] { color: var(--text); background: var(--active); font-weight: 500; }
  .m .ghost { min-height: 36px; padding: 0 12px; }
  button:active, a:active { opacity: .6; }
  .intro .mark { width: 74vw; }
  .intro .enter .kbd { display: none; }
  .corner.tl, .corner.tr { top: calc(20px + env(safe-area-inset-top, 0px)); height: auto; }
  .corner.tl { left: 20px; } .corner.tr { display: none; }
  .corner.bl { left: 20px; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); } .corner.br { right: 20px; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); }
  body.home:not(.first) .corner.tl { opacity: 1; }
  .pal { top: 72px; }
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass { background: var(--bg); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; transition-delay: 0s !important; }
}

/* Intro sobre el móvil: oculta la interfaz detrás */
.m { transition: opacity .5s ease; }
body.home .m, body.v404 .m, body.v404 .app { opacity: 0; pointer-events: none; }
body.home .ppanel, body.home .pgallery { opacity: 0 !important; pointer-events: none !important; }
@media (max-width: 767px), (max-height: 500px) and (hover: none) { .m-scroll > * { flex-shrink: 0; } }

/* Indicador deslizante del menú principal */
.nav { position: relative; }
.nav-pill, .m-pill { position: absolute; left: 0; top: 0; border-radius: 8px; background: var(--active); pointer-events: none; z-index: 0; }
.nav-pill { right: 0; height: 30px; }
.nav-item { position: relative; z-index: 1; }
.nav-item[aria-current="page"] { background: transparent; }
.m-pill { top: 4px; bottom: 4px; border-radius: 10px; }
.m-nav button { position: relative; z-index: 1; }
@media (max-width: 767px), (max-height: 500px) and (hover: none) { .m-nav button[aria-current="page"] { background: transparent; } }
body.pills-on .nav-pill, body.pills-on .m-pill { transition: transform .35s cubic-bezier(.2,.8,.2,1), height .35s cubic-bezier(.2,.8,.2,1), width .35s cubic-bezier(.2,.8,.2,1); }

/* Móvil: premios con aire entre uno y otro */
.m-aw-list { display: flex; flex-direction: column; gap: 20px; padding-top: 4px; }
.m-aw-list .m-aw { padding: 0; gap: 4px; }
.m-aw-list .m-aw > span:first-child { margin-bottom: 4px; }

/* Botón Enter de la intro: cuando no se muestra la tecla ↵ (táctil), el texto va centrado */
body.no-keys .intro .enter { padding: 0 20px; }
body.no-keys .intro .enter .kbd { display: none; }
@media (max-width: 1099px) { .intro .enter { padding: 0 20px; } .intro .enter .kbd { display: none; } }

/* Aviso breve */
.toast { position: fixed; z-index: 60; left: 50%; bottom: calc(32px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 8px); padding: 10px 16px; border-radius: 999px; font-size: 13px; color: var(--text); opacity: 0; pointer-events: none; transition: opacity .25s ease, transform .35s cubic-bezier(.2,.8,.2,1); }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
@media (max-width: 767px), (max-height: 500px) and (hover: none) { .toast { bottom: calc(96px + env(safe-area-inset-bottom, 0px)); } }
