:root { color-scheme: light; font-family: Arial, Helvetica, sans-serif; font-size: 12px; color: #222; background: #fff; }
* { box-sizing: border-box; }
html { scrollbar-gutter: stable; }
[hidden] { display: none !important; }
body { margin: 0; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 4px; }
header, main, footer { width: 100%; margin-left: auto; margin-right: auto; padding-left: clamp(20px, 5vw, 70px); padding-right: clamp(20px, 5vw, 70px); }
header { padding-top: 32px; padding-bottom: 27.5px; }
.identity, .identity:hover, .identity:focus { text-decoration: none; font-size: 12px; line-height: 1.4; font-weight: normal; letter-spacing: normal; }
.identity-block { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }

.contact { font-size: 12px; line-height: 1.4; }
/* Una fotografía grande por proyecto, adaptable al ancho de la ventana. */
main { display: grid; grid-template-columns: minmax(0,1fr); gap: 55px; padding-bottom: 64px; }
.project { min-width: 0; }
.gallery { position: relative; display: block; background: transparent; min-width: 0; }
button { font: inherit; cursor: pointer; border: 0; }
.photo-next { display: block; width:100%; max-width:100%; min-width:0; padding:0; background:transparent; cursor: default; }
/* Referencia: ancho original de obra-02 (2048 × 1363), con el límite de altura anterior. */
/* Las verticales toman ese mismo ancho como altura y conservan su proporción. */
.photo-next img {
  display: block;
  --horizontal-reference-ratio: 1.502567865004;
  --long-edge: min(100%, calc(max(25vh, calc(100vh - 232.5px)) * var(--horizontal-reference-ratio)));
  width: calc(100% * var(--long-edge-factor, 1));
  width: calc(var(--long-edge) * var(--long-edge-factor, 1));
  width: calc(min(100%, calc(max(25dvh, calc(100dvh - 232.5px)) * var(--horizontal-reference-ratio))) * var(--long-edge-factor, 1));
  height: auto;
  max-width: 100%;
  max-height: none;
  object-fit: contain;
  object-position: left top;
  cursor: url("images/cursor-next.svg") 10 10, url("images/cursor-next.png") 10 10, e-resize;
}
.gallery[data-direction="previous"] .photo-next img { cursor: url("images/cursor-prev.svg") 10 10, url("images/cursor-prev.png") 10 10, w-resize; }
.project-caption { display:flex; flex-direction:column; justify-content:flex-start; align-items:flex-start; gap:16px; padding-top:11px; line-height:1.5; }
.portfolio, .portfolio:hover, .portfolio:focus { font-size:12px; white-space:nowrap; text-decoration:none; }
footer { margin:95px auto 0; border-top:1px solid #dedede; padding:23px clamp(20px, 5vw, 70px) 45px; font-size:12px; color:#666; }
footer p { margin:5px 0; }
:focus-visible { outline:2px solid #444; outline-offset:-3px; }
@media (max-width:700px) { header { padding-bottom:17.5px; } main { gap:40px; } footer { margin-top:60px; } }


.gallery, .photo-next, .photo-next img { border-radius: 0; }


/* Página de información bilingüe. */
.info-page .bio-content { display: block; padding-bottom: 55px; }
.bio { max-width: 720px; line-height: 1.6; }
.bio + .bio { margin-top: 48px; }
.bio h1 { font: inherit; margin: 0 0 16px; }
.bio p { margin: 0 0 12px; }

.work-caption { font-size: 12px; line-height: 1.5; font-weight: normal; }

/* Barquito: mismo trazo y color que el castillo y el lazo. */
.portfolio { display: inline-flex; align-items: center; gap: 5px; }
.portfolio-icon { display: block; width: 16px; height: 16px; flex: none; }
.work-caption em { font-style: italic; font-weight: normal; }
