:root{--ink:#0F1E2E;--ink2:#1A3652;--paper:#F4F7FA;--card:#fff;--line:#DAE2EA;--text:#1D2B3A;--muted:#566677;--red:#D9362B;--water:#7CC4E8}
*{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth;scroll-padding-top:4.5rem;font-size:max(16px,.8vw);background:#0A1520;-webkit-text-size-adjust:100%}
body{min-height:100vh;min-height:100dvh;display:flex;flex-direction:column;overflow-x:hidden;font:400 1.0625rem/1.65 "IBM Plex Sans",system-ui,sans-serif;color:var(--text);background:var(--paper)}
img{max-width:100%;display:block}
a{color:inherit}
h1,h2,h3,h4{font-family:"Bricolage Grotesque",system-ui,sans-serif;line-height:1.1;letter-spacing:-.02em}
.wrap{width:min(72rem,100% - 2.5rem);margin-inline:auto}
main{flex:1}
:focus-visible{outline:3px solid var(--red);outline-offset:3px}

/* nav */
.nav{position:fixed;inset:0 0 auto;z-index:20;background:var(--ink);border-bottom:1px solid rgba(255,255,255,.08)}
.nav-in{display:flex;align-items:center;justify-content:space-between;height:4rem}
.brand{display:block;color:#fff;text-decoration:none;font:800 1.05rem "Bricolage Grotesque",sans-serif}
.menu{display:flex;gap:.25rem;list-style:none;margin-left:auto}
.menu a{display:block;padding:.5rem .9rem;border-radius:99px;color:#C9D6E3;text-decoration:none;font-size:.95rem;font-weight:500;transition:background .2s,color .2s}
.menu a:hover{background:rgba(255,255,255,.1);color:#fff}
.menu .dl{background:var(--red);color:#fff}.menu .dl:hover{background:#b92b21}
.lang{display:flex;margin-left:1rem;padding:3px;border-radius:99px;background:rgba(255,255,255,.1)}
.lang button{border:0;background:none;color:#C9D6E3;font:600 .8rem "IBM Plex Sans",sans-serif;padding:.35rem .75rem;border-radius:99px;cursor:pointer;transition:background .2s,color .2s}
.lang button[aria-pressed=true]{background:#fff;color:var(--ink)}
.burger{display:none;background:none;border:0;width:44px;height:44px;cursor:pointer;position:relative}
.burger span{position:absolute;left:11px;right:11px;height:2px;background:#fff;transition:transform .25s}
.burger span:first-child{top:17px}.burger span:last-child{top:25px}
.burger[aria-expanded=true] span:first-child{transform:translateY(4px) rotate(45deg)}
.burger[aria-expanded=true] span:last-child{transform:translateY(-4px) rotate(-45deg)}

/* hero */
.hero{position:relative;isolation:isolate;overflow:hidden;background:var(--ink);color:#fff;padding:9rem 0 6rem}
.hero-video{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:center;opacity:.4;filter:grayscale(1) contrast(1.2);mix-blend-mode:screen}
.hero-in{position:relative;z-index:2;display:grid;grid-template-columns:1.4fr .8fr;gap:3rem;align-items:center}
.hello{color:var(--water);font-weight:600;margin-bottom:1rem}
.hero h1{font-size:clamp(3rem,8.5vw,6.6rem);font-weight:800;line-height:.92;letter-spacing:-.04em}
.role{max-width:34rem;margin:1.75rem 0 2rem;font-size:1.2rem;color:#C9D6E3}
.cta{display:flex;flex-wrap:wrap;gap:.8rem}
.btn{display:inline-block;padding:.85rem 1.5rem;border-radius:10px;border:2px solid transparent;font:600 1rem "IBM Plex Sans",sans-serif;text-decoration:none;cursor:pointer;transition:transform .15s,background .2s}
.btn:hover{transform:translateY(-2px)}
.btn-red{background:var(--red);color:#fff}.btn-red:hover{background:#b92b21}
.btn-ghost{border-color:rgba(255,255,255,.4);color:#fff}.btn-ghost:hover{background:rgba(255,255,255,.1)}
.hero-photo{position:relative;justify-self:center;width:min(100%,20rem)}
.hero-photo::before{content:"";position:absolute;inset:1.1rem -1.1rem -1.1rem 1.1rem;border:3px solid var(--red);border-radius:999px 999px 24px 24px}
.hero-photo img{position:relative;aspect-ratio:4/5;width:100%;object-fit:cover;border-radius:999px 999px 24px 24px}

/* sections */
.section{padding:6rem 0}
.alt{background:#fff;border-block:1px solid var(--line)}
h2{font-size:clamp(2rem,4.5vw,3.2rem);font-weight:800;margin-bottom:2.5rem;max-width:20ch}
.about{display:grid;grid-template-columns:1.6fr 1fr;gap:4rem;align-items:stretch}
.prose{display:grid;gap:1.1rem;max-width:62ch}
.social{display:flex;flex-direction:column;background:var(--ink);color:#fff;border-radius:20px;padding:2rem}
.social h3{font-size:1.4rem;margin-bottom:1rem}
.social a{flex:1;display:flex;align-items:center;gap:1.1rem;padding:1rem 0;border-top:1px solid rgba(255,255,255,.14);text-decoration:none;transition:color .2s}
.social .ico{flex:none;width:2.75rem;height:2.75rem;padding:.65rem;border-radius:12px;background:rgba(255,255,255,.08);color:#fff;transition:background .2s,color .2s}
.social a:hover .ico{background:var(--red)}
.social .t{min-width:0}
.social b{display:block;font-weight:600}
.social span span{color:#A9BACB;font-size:.95rem;overflow-wrap:anywhere}
.social a:hover b{color:var(--water)}
.social h3{padding-bottom:.25rem}


.sec-head{display:flex;flex-wrap:wrap;align-items:flex-end;justify-content:space-between;gap:1.25rem 2rem;margin-bottom:2.5rem}
.sec-head h2{margin:0}
.filters{display:flex;flex-wrap:wrap;gap:.5rem}
.filters button{font:500 .95rem "IBM Plex Sans",sans-serif;padding:.5rem 1.1rem;border-radius:99px;border:1px solid var(--line);background:#fff;color:var(--text);cursor:pointer;transition:background .2s,color .2s,border-color .2s}
.filters button:hover{border-color:var(--ink)}
.filters button.on{background:var(--ink);color:#fff;border-color:var(--ink)}
.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,22rem),1fr));gap:1.75rem}
.card{display:flex;flex-direction:column;background:#fff;border:1px solid var(--line);border-radius:14px;overflow:hidden;text-decoration:none;transition:border-color .2s,box-shadow .2s}
.card:hover{border-color:var(--ink);box-shadow:0 12px 28px rgba(15,30,46,.12)}
.card[hidden]{display:none}
.thumb{aspect-ratio:16/10;position:relative;overflow:hidden;background:var(--paper);border-bottom:1px solid var(--line)}
.thumb img{position:absolute;inset:0;height:100%;width:100%;object-fit:contain;background:var(--paper)}
.kind{position:absolute;left:.9rem;top:.9rem;padding:.25rem .7rem;border-radius:99px;background:var(--ink);color:#fff;font-size:.8rem;font-weight:500}
.body{flex:1;display:flex;flex-direction:column;padding:1.4rem 1.5rem 1.3rem}
.card h4{font-size:1.35rem;margin-bottom:.5rem}
.card p{color:var(--muted);font-size:1rem;margin-bottom:1.1rem}
.tags{display:flex;flex-wrap:wrap;gap:.4rem;list-style:none;margin:auto 0 1.4rem}
.tags li{padding:.2rem .65rem;border-radius:6px;background:var(--paper);border:1px solid var(--line);font-size:.82rem;font-weight:500;color:var(--ink2)}
.more{display:flex;align-items:center;gap:.55rem;padding-top:1rem;border-top:1px solid var(--line);font-weight:600;font-size:.95rem;color:var(--ink)}
.more svg{width:1.2rem;height:1.2rem}
.card:hover .more{color:var(--red)}

.footer{background:#0A1520;color:#8FA2B5;padding:1.5rem 0;font-size:.9rem}

button.card{width:100%;font:inherit;color:inherit;text-align:left;cursor:pointer}
.priv{display:flex;align-items:center;gap:.4rem;margin-top:.6rem;color:var(--muted);font-size:.82rem}
.priv svg{width:.95rem;height:.95rem;flex:none}
.modal{border:0;border-radius:16px;padding:0;margin:auto;width:min(52rem,100% - 1.5rem);max-height:90dvh;overflow:auto;color:var(--text);background:#fff;box-shadow:0 30px 80px rgba(0,0,0,.4)}
.modal::backdrop{background:rgba(10,21,32,.72)}
html:has(dialog[open]){overflow:hidden}
.m-head{position:sticky;top:0;z-index:1;display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:1.1rem 1.5rem;background:var(--ink);color:#fff}
.m-head h3{font-size:1.5rem}
.m-close{flex:none;width:2.5rem;height:2.5rem;border:0;border-radius:50%;background:rgba(255,255,255,.12);color:#fff;cursor:pointer;display:grid;place-items:center}
.m-close:hover{background:var(--red)}.m-close svg{width:1.2rem;height:1.2rem}
.m-body{padding:1.75rem 1.5rem 2rem}
.m-body h4{font-size:1.1rem;margin:1.6rem 0 .4rem;color:var(--ink)}
.m-body>p{max-width:62ch}
.m-body .tags{margin:.5rem 0 0}
.shots{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,16rem),1fr));gap:1rem}
.shots figure{margin:0}
.shots img{aspect-ratio:16/10;width:100%;object-fit:cover;border-radius:10px;border:1px solid var(--line);background:var(--paper)}
.shots figcaption{margin-top:.4rem;color:var(--muted);font-size:.85rem}
.m-body .priv{margin-top:2rem;padding-top:1rem;border-top:1px solid var(--line)}
@media(max-width:820px){
  .hero-in,.about{grid-template-columns:1fr;gap:2.5rem}
  .social a{flex:none}
  .hero{padding:6.5rem 0 4rem}.section{padding:4rem 0}
  .hero-photo{width:15rem;margin-right:1.1rem;justify-self:start;order:-1}
  .burger{display:block}
  .lang{margin-left:auto}.menu{margin-left:0}
  .menu{display:none;position:absolute;top:4rem;left:0;right:0;flex-direction:column;background:var(--ink);padding:.5rem 1.25rem 1rem}
  .menu.open{display:flex}
}
@media(prefers-reduced-motion:reduce){html,.modal{scroll-behavior:auto}.hero-video{display:none}*{transition:none!important}}

/* Espaciado general del contenedor de texto */
.txt p {
  margin-bottom: 1rem;       /* Espacio entre párrafos */
  line-height: 1.6;          /* Altura de línea para mejor legibilidad */
}

/* Espaciado de la lista de elementos */
.parts {
  margin: 1rem 0;
  padding-left: 1.25rem;
}

.parts li {
  margin-bottom: 0.5rem;     /* Espacio entre cada <li> */
  line-height: 1.5;
}

/* Espacio entre la etiqueta en negrita y el texto descriptivo */
.parts li b {
  margin-right: 0.25rem;
}

/* Modal: botón "Ver fotos" en la cabecera + espaciado */
.modal{scroll-behavior:smooth}
.m-head h3{min-width:0}
.m-actions{display:flex;align-items:center;gap:.6rem;flex:none}
.m-jump{display:inline-flex;align-items:center;gap:.5rem;height:2.5rem;padding:0 1rem;border:0;border-radius:99px;background:rgba(255,255,255,.12);color:#fff;font:600 .9rem "IBM Plex Sans",sans-serif;cursor:pointer;transition:background .2s}
.m-jump svg{width:1.15rem;height:1.15rem;flex:none}
.m-jump:hover{background:var(--red)}
.m-body .m-first{margin:0 0 .85rem;font-size:1.2rem}
.txt p:last-child{margin-bottom:0}
.parts{margin:1.1rem 0}
.parts li{margin-bottom:.6rem}
.parts li b{margin-right:0}
.m-body>p.priv{max-width:none;margin:1.75rem 0 0;padding:0;border:0}
.m-body .m-shots-t{scroll-margin-top:5rem;margin:2.25rem 0 1.1rem;padding-top:1.75rem;border-top:1px solid var(--line);font-size:1.2rem}
.shots{gap:1.5rem 1.25rem}
.shots figcaption{margin-top:.55rem}
@media(max-width:520px){
  .m-jump{width:2.5rem;padding:0;justify-content:center}
  .m-jump span{display:none}
}

/* Capturas ampliables */
.zoom{position:relative;display:block;width:100%;padding:0;border:0;background:none;border-radius:10px;overflow:hidden;cursor:zoom-in}
.zoom img{transition:transform .35s ease}
.zoom:hover img,.zoom:focus-visible img{transform:scale(1.06)}
.zoom::after{content:"";position:absolute;right:.6rem;bottom:.6rem;width:2.2rem;height:2.2rem;border-radius:50%;opacity:0;transition:opacity .2s;background:rgba(15,30,46,.85) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='6.5'/%3E%3Cpath d='M16 16l5 5M11 8v6M8 11h6'/%3E%3C/svg%3E") center/58% no-repeat}
.zoom:hover::after,.zoom:focus-visible::after{opacity:1}
@media(hover:none){.zoom::after{opacity:1}}

/* Visor a pantalla completa */
.lightbox{border:0;padding:0;margin:0;max-width:none;max-height:none;width:100%;height:100dvh;background:rgba(6,12,19,.95);color:#fff}
.lightbox::backdrop{background:transparent}
.lightbox[open]{display:grid;grid-template-columns:auto minmax(0,1fr) auto;grid-template-rows:minmax(0,1fr) auto;align-items:center}
.lb-stage{grid-column:2;grid-row:1;height:100%;min-width:0;overflow:auto;display:grid;padding:3.5rem .5rem 1rem}
.lb-stage img{margin:auto;max-width:100%;max-height:calc(100dvh - 8rem);object-fit:contain;border-radius:6px;cursor:zoom-in}
.lb-stage.zoomed img{max-width:none;max-height:none;cursor:zoom-out}
.lb-cap{grid-column:1/-1;grid-row:2;text-align:center;padding:.25rem 1rem 1.25rem;color:#C9D6E3;font-size:.95rem}
.lb-nav,.lb-close{border:0;border-radius:50%;background:rgba(255,255,255,.14);color:#fff;cursor:pointer;display:grid;place-items:center;transition:background .2s}
.lb-nav:hover,.lb-close:hover{background:var(--red)}
.lb-nav{grid-row:1;width:3rem;height:3rem;margin:0 .75rem}
.lb-prev{grid-column:1}.lb-next{grid-column:3}
.lb-nav svg,.lb-close svg{width:1.4rem;height:1.4rem}
.lb-close{position:absolute;top:.9rem;right:.9rem;width:2.75rem;height:2.75rem;z-index:2}
.lightbox.single .lb-nav{visibility:hidden}
@media(max-width:820px){.lb-nav{width:2.5rem;height:2.5rem;margin:0 .25rem}}


/* Escena interactiva del TFG */
a.m-jump{text-decoration:none}
.m-body .m-scene-t{margin:2.25rem 0 .6rem;padding-top:1.75rem;border-top:1px solid var(--line);font-size:1.2rem}
.scene-cta p{max-width:62ch;margin-bottom:1rem;color:var(--muted)}
.scene-modal{width:min(84rem,100% - 1rem);height:min(90dvh,62rem);max-height:90dvh;overflow:hidden}
.scene-modal[open]{display:flex;flex-direction:column}
.scene-modal .m-head{position:static;flex:none}
.scene-modal iframe{flex:1;min-height:0;width:100%;border:0;display:block;background:#07130f}
@media(max-width:520px){.scene-modal{width:100%;height:100dvh;max-height:100dvh;border-radius:0}}

#scene-tab {
    display: none !important;
}

/* Footer + aviso legal */
.footer .foot{display:flex;flex-wrap:wrap;justify-content:space-between;gap:.5rem 1.5rem}
.foot-link{background:none;border:0;padding:0;color:inherit;font:inherit;text-decoration:underline;cursor:pointer;transition:color .2s}
.foot-link:hover{color:#fff}
