/* One navigation geometry across the entire personal site. */
body header{display:grid!important;grid-template-columns:25% 38% 1fr!important;align-items:start!important;gap:0!important;inset:0 0 auto!important;padding:12px 12px!important;font:700 11px/18px 'Courier New',monospace!important;letter-spacing:0!important;background:transparent!important;view-transition-name:site-navigation}
body header .brand{font:inherit!important;letter-spacing:0!important;text-align:left;padding:0!important;white-space:nowrap}
body header .brand .dot,body header #color{display:none!important}
body header nav{position:static!important;display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;left:auto!important;width:100%!important;order:0!important;gap:0!important;font:inherit!important}
body header nav button{min-width:0!important;font:inherit!important;padding:0 0 6px!important;line-height:18px!important;text-align:left!important;white-space:nowrap;border-radius:0}
body header .tools{grid-column:auto!important;justify-self:end!important;gap:0!important;font:inherit!important}
body header .tools button{font:inherit!important;padding:0!important;line-height:18px!important;white-space:nowrap}
::view-transition-group(site-navigation){animation:none!important}
::view-transition-old(site-navigation),::view-transition-new(site-navigation){animation:none!important;mix-blend-mode:normal}
/* Restore the original text-only close affordance in the sidebar. */
#detail .chapter-close{position:fixed;left:auto;right:calc(75% + 18px);top:7px;z-index:45;margin:0;padding:6px 0;min-height:32px;min-width:48px;border:0;border-radius:0;box-shadow:none;background:transparent;color:var(--fg);font:700 11px/18px 'Courier New',monospace;text-align:right;transition:opacity .18s}
#detail .chapter-close:hover{background:transparent;opacity:.55}
#detail .chapter-top{padding-right:66px}
.gallery-pointer{padding:0;border:0;border-radius:0;background:none;box-shadow:none;color:#fff;mix-blend-mode:difference;font:700 10px/16px 'Courier New',monospace;letter-spacing:0;transform:translate(13px,15px);transition:opacity .15s}
.focus-toolbar button{border:0;border-radius:0;background:transparent;padding:10px 4px;box-shadow:none;font:700 10px/18px 'Courier New',monospace;color:var(--fg)}
.focus-toolbar button:hover{background:transparent;opacity:.55}
@media(max-width:760px){
 body header{grid-template-columns:26% 74%!important;padding:12px 8px!important;row-gap:12px!important;font-size:clamp(8px,2.1vw,12px)!important}
 body header nav{grid-column:2!important}
 body header .tools{grid-column:1/-1!important;justify-self:end!important}
 #detail .chapter-close{right:8px;top:5px;padding:8px 0;min-height:40px;font-size:12px;background:transparent}
 .focus-toolbar{right:8px;top:5px}
}
@media(prefers-reduced-motion:reduce){.gallery-pointer,#detail .chapter-close{transition:none}}

/* Shared footer placement: no layout jump between views. */
body footer{position:fixed!important;inset:auto 0 0!important;display:flex!important;flex-wrap:nowrap!important;justify-content:space-between!important;align-items:center!important;gap:18px!important;padding:12px 14px!important;z-index:25;background:transparent!important;border:0!important;box-shadow:none!important;backdrop-filter:none!important;color:var(--fg);font:700 9px/16px 'Courier New',monospace!important;letter-spacing:0!important}
body footer>span{font:inherit!important}body footer>span:last-child{display:none!important}
body footer .social-links{display:flex!important;width:auto!important;order:0!important;justify-content:space-between!important;gap:clamp(18px,4vw,70px)!important}
body footer .social-links a{font:700 10px/16px 'Courier New',monospace!important;padding:8px 0!important;border:0!important}
body:has(#about:not([hidden])) footer{--bg:#121513;--fg:#f3f3ef}
#archive{padding-bottom:110px}
.focus-stage{cursor:default}
#photoFocus .keyboard-close{position:fixed;top:12px;right:16px;opacity:0;pointer-events:none}
#photoFocus .keyboard-close:focus-visible{opacity:1;pointer-events:auto}
@media(max-width:760px),(hover:none),(pointer:coarse){.gallery-frame>img,.gallery-frame>svg{cursor:default;touch-action:pan-y pinch-zoom}}
@media(max-width:700px){body footer{flex-wrap:wrap!important;padding:12px 8px!important;gap:4px 16px!important}body footer .social-links{width:100%!important;order:-1!important;gap:12px!important}body footer .social-links a{padding:7px 0!important}body footer>span{font-size:8px!important}}
.decode-text{white-space:pre;display:inline-block}

/* Social labels remain visible when the decoding effect inserts a span. */
body footer .social-links a .decode-text{display:inline-block!important;font:inherit!important;color:inherit;visibility:visible!important}
body footer{view-transition-name:site-footer;pointer-events:none}
body footer .social-links{pointer-events:auto}
::view-transition-group(site-footer),::view-transition-old(site-footer),::view-transition-new(site-footer){animation:none!important}

/* Long pages: social links follow the content instead of floating over it. */
body:has(#archive:not([hidden])) footer,
body:has(#about:not([hidden])) footer{position:relative!important;inset:auto!important;margin:0!important;view-transition-name:none}
body:has(#archive:not([hidden])) #archive{padding-bottom:55px}
body:has(#about:not([hidden])) .about-editorial{padding-bottom:65px}

/* Keep the system arrow on photographs; text labels carry the action. */
.gallery-frame>svg,.gallery-frame>img,.focus-stage,.focus-stage>svg,.focus-stage>img{cursor:default!important}
.gallery-pointer{transform:none!important;transition:opacity .15s!important;will-change:left,top}

/* Touch exploration belongs to the home canvas; other sections scroll normally. */
@media(pointer:coarse){#universe{touch-action:pinch-zoom}}

/* A short editorial opening, independent of network loading. */
#entry-loader{display:none;position:fixed;inset:0;z-index:10000;background:#fff;color:#161616;place-items:center;pointer-events:auto;opacity:1;transition:opacity .45s ease}
.entry-loading #entry-loader{display:grid}
.entry-loading{overflow:hidden}
.entry-composition{position:relative;width:220px;text-align:center;transform:translateY(-8px)}
.entry-photo{width:120px;height:80px;margin:0 auto 30px;overflow:hidden;opacity:0;transition:opacity .18s ease;filter:grayscale(1)}
.entry-photo svg,.entry-photo img{display:block;width:100%;height:100%;object-fit:cover}
.entry-words{font:700 clamp(11px,2.8vw,13px)/1.5 'Courier New',monospace;letter-spacing:.02em}
.entry-words span{display:block;white-space:nowrap}
#entry-loader.entry-leaving{opacity:0;pointer-events:none}
@media(prefers-reduced-motion:reduce){#entry-loader{display:none!important}}

/* Final editorial polish: retain the composition, improve readability and stability. */
[hidden]{display:none!important}
body{-webkit-font-smoothing:antialiased}
#universe .art{user-select:none;-webkit-user-select:none;-webkit-user-drag:none}
#universe .art svg{pointer-events:none;box-shadow:none!important}
#archive .tile{min-width:0;text-align:left}
#archive .tile p{line-height:1.5;gap:12px}
#archive .tile svg{transition:filter .45s ease,transform .6s cubic-bezier(.2,.75,.25,1)}
@media(hover:hover){#archive .tile:hover svg{transform:translateY(-3px)}}
.chapter-copy p{line-height:1.65}
.chapter-top h2{max-width:none;overflow-wrap:anywhere}
.chapter-sidebar{scrollbar-width:thin}
.gallery-frame img{background:var(--bg)}
button:focus-visible,a:focus-visible{outline:1px solid currentColor;outline-offset:5px}
@media(max-width:760px){
 .chapter-copy p{line-height:1.65}
 .about-editorial{column-gap:12px}
 body header nav button,body header .brand,body header .tools button{position:relative}
 body header nav button:before,body header .brand:before,body header .tools button:before{content:'';position:absolute;inset:-8px 0}
 body footer{padding-bottom:max(12px,env(safe-area-inset-bottom))!important}
}
@media(prefers-reduced-motion:reduce){#archive .tile svg{transition:none}}

/* Match the reference's crisp, opaque contact-sheet composition. */
body header,body header button,body footer,body footer>span,body footer .social-links a,
#universe .intro button,#universe #motion,.entry-words{font-family:Consolas,'Lucida Console',monospace!important}
#universe .art{opacity:1;background:#171717}
#universe .intro{z-index:250}
#universe .intro button{font-size:12px;font-weight:700}
@media(min-width:761px){
 body header{grid-template-columns:12.5% 37.5% 1fr!important}
 body footer .social-links{width:50%!important;gap:0!important}
}
@media(max-width:760px){
 body header{font-size:clamp(9px,2.5vw,12px)!important;padding-top:8px!important;row-gap:4px!important}
 body footer .social-links a{font-size:11px!important}
 #universe .intro button{font-size:12px}
}

#universe{isolation:isolate;z-index:0}


/* The archive is already laid out behind the camera journey: no second fade-in. */
body.entering-archive #archive{animation:none!important}
@media(max-width:760px),(pointer:coarse){
 body:has(#universe:not([hidden])){overflow:hidden;overscroll-behavior:none}
 #universe{overscroll-behavior:none}
}

/* Subida de fotos local ocultada (la web usa imágenes de Cloudinary) */
#addPhotos,#addPhotosEmpty,.photo-empty,#aboutPhoto,#photoInput,#aboutPhotoInput,.chapter-controls,.chapter-controls small{display:none!important}
