*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; cursor: none !important; }

button { border: none; outline: none; }

:root {
  --bg:   #ffffff;
  --fg:   #313131;
  --dim:  rgba(13,13,13,0.10);
  --font: 'Azeret Mono', monospace;
}

html, body {
  width: 100%; height: 100%;
  background: var(--bg);
  color: var(--fg);
  overflow: hidden;
  overscroll-behavior: none;
  font-family: var(--font);
  cursor: none;
}

/* ══════════════════════════════════════ PRELOADER */
#preloader {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 9000;
  overflow: hidden;
}

/* Top-aligned — full width, always centred as a block */
#loader-text {
  position: absolute;
  top: 48px;
  left: 0; right: 0;
  display: flex;
  align-items: baseline;
  justify-content: center;
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 700;
  font-size: 1.4em;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg);
  white-space: nowrap;
  user-select: none;
}

#loader-text span:not(.space) {
  display: inline-block;
  opacity: 0;
}

/* space between SELECTED and WORKS — wide at start, collapses */
#loader-text .space {
  display: inline-block;
  width: 0; /* set by JS */
}

#loader-text-2 {
  position: absolute;
  top: 48px;
  left: 0; right: 0;
  display: flex;
  align-items: baseline;
  justify-content: center;
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 700;
  font-size: 1.4em;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg);
  white-space: nowrap;
  user-select: none;
  opacity: 0;
}

#loader-text-2 span:not(.space) {
  display: inline-block;
  opacity: 0;
}

#loader-text-2 .space {
  display: inline-block;
  width: 0;
}

/* full-width bar */
#loader-bar-wrap {
  position: absolute;
  top: 76px;
  left: 0; right: 0;
  height: 1px;
  background: #fff;
}

#loader-line {
  height: 100%;
  background: var(--fg);
  transform-origin: left center;
  transform: scaleX(0);
}

/* ══════════════════════════════════════ SITE */
#site {
  opacity: 0;
  width: 100%;
  height: 100%;
  position: relative;
}

/* ── Centre block ──────────────────────────── */
#home {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  z-index: 100;
  pointer-events: none; /* no bloquea eventos sobre las imágenes */
}

/* el nav sí recibe clicks */
#home nav {
  pointer-events: auto;
}

/* ── Nav menu ──────────────────────────────── */
.nav-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  position: relative; /* anchor the doodle */
}

/* gap between SELECTED WORKS and the category items */
.nav-links button:first-child {
  margin-bottom: 10px;
}

.nav-links button {
  background: none;
  border: none;
  font-family: var(--font);
  font-weight: 400;
  font-size:0.8em;
  /* letter-spacing: 0.12em;
  text-transform: uppercase; */
  color: var(--fg);
  padding: 1px 0;
  line-height: 1.5;
  position: relative;
}

/* strikethrough on hover/active */
.nav-links button::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 0; right: 0;
  height: 1px;
  background: var(--fg);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.35s ease;
}

.nav-links button.active::after,
.nav-links button:hover::after {
  transform: scaleX(1);
}

#contact-bio {
  font-weight: 600;
  font-size: 1.4em;
  letter-spacing: 0.12em;
  line-height: 50px;
  font-family: Arial, Helvetica, sans-serif;
}

.doodle {
  position: absolute;
  inset: -32px -48px;
  width: calc(100% + 96px);
  height: calc(100% + 64px);
  pointer-events: none;
  opacity: 0;
  color: currentColor;
  overflow: visible;
}

/* ══════════════════════════════════════ CONTACT-BIO PANEL */
#contact-bio-cv {
  position: fixed;
  inset: 0;
  z-index: 400;
  background: transparent;
  overflow: hidden;
  pointer-events: none; /* nav links stay clickable through the panel */
}

#bio-folio-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  pointer-events: none;
  filter: grayscale(1);
}

#bio-profile {
  position: absolute;
      bottom: 0;
    left: -44px;
    height: 61%;

  width: auto;
  object-fit: contain;
  object-position: bottom left;
  pointer-events: none;
  transform: translateX(-6%) translateY(10%);
}

#close-contactbio {
  position: absolute;
  top: 24px;
  right: 14vw;
  background: none;
  border: none;
  font-family: var(--font);
  font-size: 14px;
  color: var(--fg);
  letter-spacing: 0.1em;
  cursor: pointer;
  z-index: 2;
  pointer-events: auto;
}

/* ── bio grid ── */
#bio-grid {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns:30% 35% 33%;
  pointer-events: none;
}

/* LEFT column */
#bio-left {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding-top: 8px;
  pointer-events: none;
}

#bio-dev, #bio-ui-sound, #bio-label-softwares {
  pointer-events: auto;
}

.bio-label {
  font-family: var(--font);
  font-size: 0.65rem;
  font-weight: 500;
  text-transform: uppercase;
  color: #000;
  margin: 15px 100px;
  margin: 0;
}

/* ── scattered icons area — same total width as #bio-profile ── */
#bio-icons-area {
  position: absolute;
  top: 32px;
  left: 18vw;
  width: 26vw;
  height: 42vw;
  pointer-events: none;
}

.bico {
  pointer-events: auto;
}

/* wrapper — carries position + tooltip */
.bico-wrap {
  position: absolute;
  width: 11%;
}

.bico {
  display: block;
  width: 100%;
  filter: grayscale(1);
  object-fit: contain;
}

/* tooltip label */
.bico-wrap::after {
  content: attr(data-label);
  position: absolute;
  bottom: -1.3em;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font);
  font-size: 0.45rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg);
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.bico-wrap:hover::after {
  opacity: 1;
}

/* positions */
.bico-blender     { top:  2%; left: 14%; }
.bico-unreal      { top:  2%; left: 39%; }
.bico-daz         { top:  8%; left: 63%; }
.bico-ae          { top: 12%; left: 28%; }
.bico-comfy       { top: 23%; left: 16%; }
.bico-effecthouse { top: 26%; left: 74%; }
.bico-premiere    { top: 17%; left: 47%; }
.bico-photoshop   { top: 26%; left: 66%; }

/* social icons — absolute, beside the right edge of the profile image */
#bio-social {
  position: absolute;
  bottom: 8%;
  left: 29vw;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: auto;
}

#bio-social a {
  display: flex;
  align-items: center;
  width: 24px;
  height: 24px;
  color: #000;
  text-decoration: none;
}

#bio-social svg,
#bio-social img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  filter: grayscale(1);
}


/* reference overlay for manual icon placement */
#bio-ref-overlay {
  position: absolute;
  top: 36px;
  left: 19px;
  width: 21vw;
  height: 42vw;
  object-fit: contain;
  object-position: top left;
  pointer-events: none;
  opacity: 0;
  z-index: 3;
}

#bio-ui-sound {
  font-family: var(--font);
  font-size: 0.65rem;
  font-weight: 300;
  color: #000;
  margin: 2vh 3vw 0.2vh;
  inline-size: max-content;
}
#bio-dev {
  font-family: var(--font);
  font-size: 0.65rem;
  font-weight: 300;
  color: #000;
  margin: -18px 3vw 0;
  inline-size: max-content;
}

#bio-dev a, #bio-ui-sound a {
  color: #000;
  text-decoration: underline;
  opacity: 0.6;
}

/* CENTER column */
#bio-center {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  padding-top: 57px;
  justify-content: flex-start;
}

#bio-label-languages {
  position: absolute;
  top: 21vh;
  right: 40vw;
}

#bio-label-softwares {
  position: absolute;
      top: 15vh;
    left: 15vw;
    opacity: 0;
}

#bio-skills-label {
  position: absolute;
  top: 35vh;
  left: 41vw;
}

.lang-option {
  font-family: var(--font);
  font-weight: 400;
  font-size: 0.7em;
  letter-spacing: 0;
  text-transform: lowercase;
  color: var(--fg);
  cursor: pointer;
  pointer-events: auto;
  line-height: 1.5;
  position: relative;
  display: inline-block;
}

/* underline — same as nav-links button::after */
.lang-option::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 0; right: 0;
  height: 1px;
  background: var(--fg);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.35s ease;
}

.lang-option:hover::after,
.lang-option.active::after {
  transform: scaleX(1);
}

/* RIGHT column */
#bio-right {
  display: flex;
  flex-direction: column;
  gap: 15px;
  padding: 88px 0px 23px 48px;
  overflow-y: auto;
}

#bio-header-info {
  text-align: right;
  flex-shrink: 0;
}

#bio-header-info p {
  font-family: 'Azeret Mono', monospace;
  font-size: 0.75rem;
  line-height: 1.6;
  color: #000;
  margin: 0;
  font-weight: 500;
  text-transform: uppercase;
}

#bio-container {
  flex: 1;
}

.bio-lang {
  display: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.bio-lang.active {
  display: block;
  opacity: 1;
}

.bio-lang p {
  font-family: 'Azeret Mono', monospace;
  font-size: .6rem;
  line-height: 1.7;
  text-align: justify;
  color: #000;
  margin: 0 0 0.9em 0;
  font-weight: 300;
}
/* ══════════════════════════════════════ FLOATING IMAGES */
.float-img {
  position: fixed;
  pointer-events: auto;
  z-index: 10;
  transform: scale(0);
  opacity: 0;
}

.float-img img {
  width: 100%;
  display: block;
  object-fit: cover;
  pointer-events: none;
}
/* ══════════════════════════════════════ BADGE TYPE (misc, etc) */
.badge-type {
  position: absolute;
  top: 0;
  right: calc(100% + 6px);
  font-family: var(--font);
  font-size: 9px;
  font-weight: 300;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg);
  white-space: nowrap;
  clip-path: inset(0 100% 0 0);
  transition: clip-path 0.6s cubic-bezier(.22,.61,.36,1);
  will-change: clip-path;
  pointer-events: none;
}

.float-img:hover .badge-type {
  clip-path: inset(0 0 0 0);
}

/* ══════════════════════════════════════ PANELS */
.panel-bg {
  position: fixed;
  inset: 0;
  background: linear-gradient(rgba(255,255,255,0) 50%);
  backdrop-filter: blur(4px);
  z-index: 200;
  pointer-events: none;
}

.project-panel {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 201;
  pointer-events: none;
  overflow-y: auto;
  padding: 48px;
}

/* is-project resetea lo heredado y define layout */
.project-panel.is-project {
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.panel-close {
    position: absolute;
    top: 24px;
    right: 14vw;
    background: none;
    border: none;
    font-family: var(--font);
    font-size: 14px;
    color: var(--fg);
    letter-spacing: 0.1em;
    z-index: 10;
}

.panel-close:hover {
  opacity: 0.5;
}

.panel-title {
  font-family: var(--font);
  font-weight: 300;
  font-size: clamp(18px, 3vw, 36px);
  letter-spacing: 0.15em;
  margin-bottom: 8px;
}

.panel-desc {
  font-family: var(--font);
  font-weight: 300;
  font-size: 11px;
  letter-spacing: 0.12em;
  color: rgba(13,13,13,0.4);
  margin-bottom: 48px;
}

/* ══════════════════════════════════════ PANEL MISC — CAROUSEL */
.project-panel.is-misc {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  overflow: hidden;
}

/* contenedor relativo que ocupa casi toda la pantalla */
.project-panel.is-misc .panel-content {
  position: relative;
  width: 88vw;
  height: 100vh;
}

/* project-info hidden on desktop for misc panels */
@media (min-width: 769px) {
  .project-panel.is-misc .project-info {
    display: none;
  }
}

/* cada imagen del carousel */
.panel-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  user-select: none;
  pointer-events: none;
}

/* ══════════════════════════════════════ PANEL — PROYECTO */

/* ══════════════════════════════════════ PANEL — PROYECTO */

/* ── 20%: franja texto ── */
.project-info {
  height: 20vh;
  flex-shrink: 0;
  display: grid;
  grid-template-columns: 15% 70% 15%;
  border-bottom: 1px solid #0d0d0d;
  position: relative;
}

.project-info__title,
.project-info__desc,
.project-info__software {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 18px 28px 0;
  overflow: hidden;
}

.project-info__software {
  padding: 55px 28px 0;
}

/* close dentro del espacio libre de project-info */
.is-project .panel-close {
  align-self: flex-end;
  font-size: 14px;
}

/* título */
.proj-title {
  font-family: var(--font);
  font-weight: 300;
  font-size: clamp(14px, 1.8vw, 26px);
  letter-spacing: 0.04em;
  margin: 0;
  line-height: 1.15;
}

.proj-title-sub {
  font-family: var(--font);
  font-weight: 300;
  font-size: 11px;
  letter-spacing: 0.08em;
  margin-top: 5px;
  opacity: 0.45;
}

/* descripción */
.proj-year {
    font-family: var(--font);
  font-weight: 400;
      font-size: 11px;
    opacity: 0.45;
    margin-bottom: 6px;
  display: block;
}

.proj-desc {
    font-family: 'Cutive Mono', monospace;
    font-size: 0.85rem;
    line-height: 1.25;
    color: #313131;
    margin: 0;
    font-weight: 500;
    text-align: justify;
}
.proj-desc a { color: #1D3FC1; }

/* softwares */
.proj-sw-label {
  font-family: var(--font);
  font-weight: 400;
      font-size: 11px;
    opacity: 0.45;
    margin-bottom: 6px;
    display: block;
  text-align: right;
  text-transform: uppercase;
}



.proj-sw-list {
  list-style: none;
  margin: 0;
  padding: 0;
  text-align: right;
}

.proj-sw-list li {
    font-family: 'Cutive Mono', monospace;
    font-size: 0.65rem;
    line-height: 1.15;
    color: #313131;
    margin: 0;
    font-weight: 500;
}



.proj-sw-list a { color: #1D3FC1; }

/* ── 80%: franja media ── */
.project-media {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding-top: 0px;
}

/* variante: video con aire lateral, alto completo */
.project-media--video {
  padding: 0;
  background: #fff;
}

.project-media--video .project-video-wrap {
  height: 100%;
  aspect-ratio: 16 / 9;
  max-width: 100%;
}

.project-media--video iframe {
  width: 100%;
  height: 100%;
  display: block;
}
/* ══════════════════════════════════════ PANEL — CAROUSEL EN PROYECTO */

.project-media--carousel {
  padding: 0;
}

.project-carousel {
  position: relative;
  width: 100%;
  height: 100%;
}

.carousel-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  pointer-events: none;
  user-select: none;
}

.carousel-img.is-active {
  opacity: 1;
  pointer-events: auto;
}

.panel-img.is-visible {
  pointer-events: auto;
}
/* ══════════════════════════════════════ PANEL — SPLIT (carousel + video) */

.project-media--split {
  padding: 0;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  overflow: hidden;
  gap: 2px;
}

/* mitad izquierda: carousel */
.split-carousel {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.split-carousel .carousel-img {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  pointer-events: none;
  user-select: none;
}

.split-carousel .carousel-img.is-active {
  opacity: 1;
}

/* mitad derecha: video */
.split-video {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding-top: 33px;
}

.split-video .project-video-wrap {
  height: 100%;
  aspect-ratio: 16 / 9;
  max-width: 100%;
}

.split-video iframe {
  width: 100%;
  height: 100%;
  display: block;
}

/* ══════════════════════════════════════ PANEL — SPLIT (carousel + video vertical split) */

/* Right side split vertically: YouTube on top, Spotify on bottom */
.split-video-vertical {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.split-video-vertical .video-top {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-bottom: 1px solid #0d0d0d;
}

.split-video-vertical .video-top .project-video-wrap {
  width: 100%;
  height: 100%;
}

.split-video-vertical .video-top iframe {
  width: 100%;
  height: 100%;
  display: block;
}

.split-video-vertical .video-bottom {
  flex: 0 0 152px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  flex-direction: column;
  min-height: 450px;
  overflow: hidden;
}

.split-video-vertical .video-bottom iframe {
  width: 100%;
  height: 100%;
  display: block;
  border: none;
}

/* ══════════════════════════════════════ HOVER TOOLTIP */
.hover-tooltip {
  position: fixed;
  pointer-events: none;
  z-index: 10000;
  font-family: 'Azeret Mono', monospace;
  font-size: 12px;
  color: #ffffff;
  background: #313131;
  padding: 6px 10px;
  border-radius: 4px;
  white-space: nowrap;
  opacity: 0;
  transform: translate(10px, 10px);
  transition: opacity 0.15s ease;
}

.hover-tooltip.visible {
  opacity: 1;
}

/* ══════════════════════════════════════ CUSTOM CURSOR */
#cursor {
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 99999;
  will-change: transform;
  opacity: 0;
}

.cursor-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #0d0d0d;
  transform: translate(-50%, -50%);
}

.cursor-label {
  position: absolute;
  left: 8px;
  top: -5px;
  font-family: var(--font);
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #0d0d0d;
  white-space: nowrap;
  line-height: 1;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.cursor-label.is-visible {
  opacity: 1;
}
/* ══════════════════════════════════════ PANEL — SCROLL HORIZONTAL */

/* ══════════════════════════════════════ PANEL — SCROLL HORIZONTAL */

.project-media--hscroll {
  padding: 0;
  overflow: hidden;
  align-items: stretch;
  justify-content: flex-start;
  position: relative;
}

.hscroll-track {
  display: flex;
  flex-direction: row;
  height: 100%;
  gap: 10px;
  padding: 0 8vw;
  will-change: transform;
}

.hscroll-section {
  flex: 0 0 50vw;
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* área principal */
.hscroll-section__main {
  flex: 1;
  min-height: 0;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* carousel dentro de hscroll */
.hscroll-section__main.split-carousel {
  cursor: pointer;
  width: 100%;
}

.hscroll-section__main.split-carousel .carousel-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  pointer-events: none;
  user-select: none;
}

.hscroll-section__main.split-carousel .carousel-img.is-active {
  opacity: 1;
}

/* video dentro de main */
.split-video-top {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.split-video-top .project-video-wrap {
  height: 100%;
  aspect-ratio: 16 / 9;
  max-width: 100%;
}

.split-video-top iframe {
  width: 100%;
  height: 100%;
  display: block;
}

/* footer: spotify fijo 152px */
.hscroll-section__footer {
  flex: 0 0 152px;
  overflow: hidden;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  flex-direction: column;
  min-height: 450px;
  padding: 12px 0;
}

.hscroll-section__footer iframe {
  width: 60%;
  min-width: 60%;
  height: 100%;
  display: block;
  border-radius: 12px !important;
}

/* quitar borde nativo de iframes */
iframe {
  border: none;
}

/* ══════════════════════════════════════ DESARIA — full-height media */

#desaria-panel .hscroll-track {
  padding: 0;
  gap: 100px;
}

#desaria-panel .hscroll-section {
  flex: 0 0 60vw;
}

#desaria-panel .desaria-section--sm {
  flex: 0 0 500px;
}

#desaria-panel .hscroll-section__main.split-carousel .carousel-img {
  inset: auto;
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  height: 100%;
  width: auto;
  object-fit: unset;
}

#desaria-panel .desaria-video {
  height: 100%;
  width: auto;
  display: block;
}

#desaria-panel .split-video-top .project-video-wrap {
  width: 100%;
  height: 100%;
  max-width: unset;
}

#desaria-panel .split-video-top iframe {
  width: 100%;
  height: 100%;
  display: block;
}

/* ══════════════════════════════════════ CIELOAZUL — full-height media */

#cieloazul-panel .hscroll-track {
  padding: 0;
  gap: 8vw;
}

#cieloazul-panel .hscroll-section {
  flex: 0 0 80vw;
}

#cieloazul-panel .hscroll-section__main.split-carousel .carousel-img {
  inset: auto;
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  height: 100%;
  width: auto;
  object-fit: unset;
}

#cieloazul-panel .split-video-top .project-video-wrap {
  width: 100%;
  height: 100%;
  max-width: unset;
}

#cieloazul-panel .split-video-top iframe {
  width: 100%;
  height: 100%;
  display: block;
}

/* ══════════════════════════════════════ AZIZ — spotify section */

.aziz-spotify-section {
  flex: 0 0 500px;
}

.aziz-spotify-section .hscroll-section__main {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 0 40px;
  min-height: 450px;
  flex-direction: column;
}

.aziz-spotify-section iframe {
  display: block;
  width: 100%;
}

/* ══════════════════════════════════════ LAPERLA — video sizing */

#guidobarbosch-panel .hscroll-track {
  gap: 8vw;
}

#guidobarbosch-panel .proj-title {
  font-size: clamp(10px, 1.1vw, 16px);
}


#guidobarbosch-panel .split-video-top video {
  height: 100%;
  width: auto;
  max-width: 100%;
  max-height: 100%;
  display: block;
}

/* ══════════════════════════════════════ SUERTE — full-height carousel */

#suerte-panel .hscroll-section__main.split-carousel .carousel-img {
  inset: auto;
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  height: 100%;
  width: auto;
  object-fit: unset;
}

/* ══════════════════════════════════════ TRAIN — full-height media */

#train-panel .hscroll-track {
  padding: 0;
  gap: 0;
}

#train-panel .hscroll-section {
  flex: 0 0 100vw;
}

#train-panel .hscroll-section__main.split-carousel .carousel-img {
  inset: auto;
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  height: 100%;
  width: auto;
  object-fit: unset;
}

/* ══════════════════════════════════════ MARINESERRE — full-height media */

#marineserre-panel .hscroll-track {
  padding: 0;
  gap: 0;
}

#marineserre-panel .hscroll-section {
  flex: 0 0 100vw;
}

#marineserre-panel .hscroll-section__main.split-carousel .carousel-img {
  inset: auto;
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  height: 100%;
  width: auto;
  object-fit: unset;
}

/* ══════════════════════════════════════ ANTU — full-height media */

#antu-panel .hscroll-track {
  padding: 0;
  gap: 0;
}

#antu-panel .hscroll-section {
  flex: 0 0 50vw;
}

#antu-panel .hscroll-section__main.split-carousel .carousel-img {
  inset: auto;
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  height: 100%;
  width: auto;
  object-fit: unset;
}

#antu-panel .split-video-top .project-video-wrap {
  width: 100%;
  height: 100%;
  max-width: unset;
}

#antu-panel .split-video-top iframe {
  width: 100%;
  height: 100%;
  display: block;
}

/* ══════════════════════════════════════ GINEBRA — full-height media */

#ginebra-panel .hscroll-track {
  padding: 0;
  gap: 0;
}

#ginebra-panel .hscroll-section {
  flex: 0 0 40vw;
}

#ginebra-panel .hscroll-section:first-child {
  flex: 0 0 calc(40vw / 3);
}

#ginebra-panel .ginebra-video {
  height: 100%;
  width: auto;
  display: block;
}

/* ══════════════════════════════════════ RONPE1 — full-height media */

#ronpe1-panel .hscroll-track {
  padding: 0;
  gap: 0;
}

#ronpe1-panel .hscroll-section {
  flex: 0 0 80vw;
}

#ronpe1-panel .hscroll-section__main.split-carousel .carousel-img {
  inset: auto;
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  height: 100%;
  width: auto;
  object-fit: unset;
}

#ronpe1-panel .split-video-top .project-video-wrap {
  width: 100%;
  height: 100%;
  max-width: unset;
}

#ronpe1-panel .split-video-top iframe {
  width: 100%;
  height: 100%;
  display: block;
}

/* ══════════════════════════════════════ SIDRA 1888 — full-height media */

#sidra1888-panel .hscroll-track {
  padding: 0;
  gap: 8vw;
}

#sidra1888-panel .hscroll-section {
  flex: 0 0 80vw;
}

#sidra1888-panel .hscroll-section__main.split-carousel .carousel-img {
  inset: auto;
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  height: 100%;
  width: auto;
  object-fit: unset;
}

#sidra1888-panel .split-video-top .project-video-wrap {
  width: 100%;
  height: 100%;
  max-width: unset;
}

#sidra1888-panel .split-video-top iframe {
  width: 100%;
  height: 100%;
  display: block;
}

#sidra1888-panel .sidra-video {
  height: 100%;
  width: auto;
  display: block;
}

/* ══════════════════════════════════════ SCROLL gap — multi-section panels */

#antu-dg-panel .hscroll-track,
#polvareda-panel .hscroll-track,
#lacura-dg-panel .hscroll-track {
  padding: 0;
  gap: 8vw;
}




/* ══════════════════════════════════════ PAGE LANGUAGE SWITCHER */

#page-lang-switcher {
  position: fixed;
  top: 24px;
  right: 28px;
  display: flex;
  align-items: center;
  gap: 4px;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  padding-top: 2px;
}

.page-lang-btn {
  background: none;
  border: none;
  font-family: var(--font);
  font-size: 0.65rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  color: var(--fg);
  cursor: pointer;
  padding: 0;
  margin: 0;
  line-height: 1;
  opacity: 0.4;
  transition: opacity 0.2s ease;
}

.page-lang-btn.active {
  opacity: 1;
  font-weight: 700;
}

.page-lang-btn:hover {
  opacity: 0.8;
}

.page-lang-sep {
  font-family: var(--font);
  font-size: 0.65rem;
  line-height: 1;
  color: var(--fg);
  opacity: 0.4;
}

/* ══════════════════════════════════════ PANEL NAVIGATION ARROWS */

#panel-nav {
  position: absolute;
  top: 24px;
  left: 28px;
  display: flex;
  align-items: center;
  gap: 4px;
  z-index: 20;
  opacity: 0;
  pointer-events: none;
  padding-top: 2px;
  transition: opacity 0.25s ease;
}

#panel-nav.is-open {
  opacity: 1;
  pointer-events: auto;
}

.panel-nav-btn {
  background: none;
  border: none;
  font-family: var(--font);
  font-size: 0.65rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  color: var(--fg);
  cursor: pointer;
  padding: 0;
  margin: 0;
  line-height: 1;
  opacity: 0.4;
  transition: opacity 0.2s ease;
}

.panel-nav-btn:hover {
  opacity: 1;
}

/* ══════════════════════════════════════════════════════════════════════
   TABLET  ·  769px – 1024px
   ══════════════════════════════════════════════════════════════════════ */
@media (min-width: 769px) and (max-width: 1024px) {

  /* ── OVERFLOW LOCK (SPA) ─────────────────────────────────────────── */

  html, body { overflow: hidden; touch-action: none; }

  /* ── PRELOADER ──────────────────────────────────────────────────── */

  /* ── NAV ────────────────────────────────────────────────────────── */

  /* ── FLOAT IMAGES ───────────────────────────────────────────────── */

  /* ── PANELS ─────────────────────────────────────────────────────── */

  .panel-close { top: 46px; }

  /* ── CONTACT / BIO ──────────────────────────────────────────────── */

  /* ── LANGUAGE SWITCHER ──────────────────────────────────────────── */

}


/* ══════════════════════════════════════════════════════════════════════
   MOBILE  ·  max-width: 768px
   ══════════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {

  /* ── LANGUAGE SWITCHER ──────────────────────────────────────────── */

  #page-lang-switcher { left: 28px; right: unset; }
  #panel-nav { left: auto; right: 28px; }

  /* ── CAROUSEL FILMSTRIP ─────────────────────────────────────────── */

  /* misc panel: column so filmstrip + project-info sit below images */
  .project-panel.is-misc {
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
  }

  .project-panel.is-misc .panel-content {
    flex: 1;
    min-height: 0;
    width: 100% !important;
    height: auto !important;
  }

  .project-panel.is-misc {
    padding-bottom: var(--info-height, 100px);
  }


  .project-media--carousel {
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
  }

  .project-media--carousel .project-carousel {
    flex: 1;
    min-height: 0;
  }

  .project-media--carousel .carousel-filmstrip {
    order: 2;
    margin-top: auto;
  }

  .carousel-filmstrip {
    width: 100%;
    height: 50px;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
  }

  .carousel-filmstrip img {
    position: absolute;
    top: 0;
    height: 100%;
    width: 50px;
    object-fit: cover;
    opacity: 0.3;
    transition: opacity 0.2s ease;
  }

  .carousel-filmstrip img.is-active {
    opacity: 1;
  }



  /* ── OVERFLOW LOCK (SPA) ─────────────────────────────────────────── */

  html, body { overflow: hidden; touch-action: none; }

  /* ── PRELOADER ──────────────────────────────────────────────────── */

  #loader-text, #loader-text-2 { top: unset; bottom: 56px; }
  #loader-bar-wrap              { top: unset; bottom: 40px; }

  /* ── NAV ────────────────────────────────────────────────────────── */

  #home { justify-content: flex-end; padding-bottom: 36px; }

  /* ── FLOAT IMAGES ───────────────────────────────────────────────── */

  /* confine float-imgs to top 40% — nav lives at vertical center */
  #site { overflow: hidden; height: 40vh; }
  .float-img { width: 30% !important; }

  /* all category float-imgs hidden on mobile — carousels take over */
  .float-img[data-category="ai"],
  .float-img[data-category="3d"],
  .float-img[data-category="vfx"],
  .float-img[data-category="graphic-design"] { opacity: 0 !important; pointer-events: none !important; }

  /* ── MOBILE CATEGORY CAROUSELS ───────────────────────────────────── */

  .mob-cat-carousel {
    position: fixed;
    top: 0;
    bottom: 150px;
    left: 0; right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    z-index: 50;
    transition: opacity 0.3s ease;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 22%, black 78%, transparent 100%);
    mask-image:         linear-gradient(to bottom, transparent 0%, black 22%, black 78%, transparent 100%);
  }

  .mob-cat-carousel.is-visible {
    opacity: 1;
    pointer-events: auto;
  }

  .mob-car-item {
    position: absolute;
    left: calc(50% - 38vw);
    top: 0;
    width: 76vw;
    cursor: pointer;
  }


  .mob-car-item img {
    width: 100%;
    height: auto;
    display: block;
  }

  /* ── PANELS — PROJECT ───────────────────────────────────────────── */

  /* panel is full-screen flex column; overflow hidden keeps info in view */
  .project-panel.is-project { overflow: hidden; }

  /* media fills exactly the space above the fixed info bar */
  .project-media {
    order: unset;
    flex: 1;
    height: calc(100dvh - var(--info-height, 160px));
    max-height: calc(100dvh - var(--info-height, 160px));
    min-height: 0;
    padding-top: 100px !important;
  }

  /* info bar fixed at bottom — always visible */
  .project-info {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    z-index: 202;
    background: var(--bg);
    order: unset;
    display: flex;
    flex-direction: column;
    height: auto;
    grid-template-columns: unset;
    padding: 14px 20px 24px;
    border-top: 1px solid rgba(13,13,13,0.2);
    border-bottom: none;
    gap: 10px;
  }

  .project-info__title,
  .project-info__desc,
  .project-info__software { padding: 0; overflow: visible; }

  .project-info__software { margin-top: auto; padding-top: 4px; }

  /* close button at title level, right-aligned inside info bar */
  .is-project .panel-close {
    position: absolute;
    top: 14px;
    right: 20px;
    left: unset;
    z-index: 203;
  }

  /* prevent title text from running under the close button */
  .project-info__title { padding-right: 36px; }


  /* ── VIDEO IFRAMES — width-first ────────────────────────────────── */

  .project-media--video .project-video-wrap,
  .split-video-top .project-video-wrap {
    width: 100% !important;
    height: auto !important;
    max-width: 100% !important;
    aspect-ratio: 16 / 9;
  }
  .project-media--video iframe,
  .split-video-top iframe {
    width: 100% !important;
    height: 100% !important;
    display: block;
  }

  /* hscroll sections with video */
  .hscroll-section__main { align-items: flex-end !important; }
  .split-video-top { align-items: flex-end !important; height: auto !important; }

  /* ── SPLIT PANELS → VERTICAL SCROLL ─────────────────────────────── */

  .project-media--split {
    flex-direction: column !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch;
    align-items: stretch !important;
    /* padding-bottom: 180px !important; */
    padding-top: 250px !important;
  }

  /* carousel half → full width block with defined height for abs children */
  .split-carousel {
    flex: 0 0 auto !important;
    width: 100% !important;
    height: 75vw !important;
  }

  /* video half → width-first */
  .split-video {
    flex: 0 0 auto !important;
    width: 100% !important;
    height: auto !important;
  }

  .split-video .project-video-wrap {
    width: 100% !important;
    height: auto !important;
    max-width: 100% !important;
    aspect-ratio: 16 / 9;
  }

  .split-video iframe {
    width: 100% !important;
    height: 100% !important;
    display: block;
  }

  /* vertical-split variant */
  .split-video-vertical {
    flex: 0 0 auto !important;
    width: 100% !important;
  }

  .split-video-vertical .video-top { height: auto !important; }

  .split-video-vertical .video-top .project-video-wrap {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 16 / 9;
  }

  /* ── HSCROLL → VERTICAL SCROLL ──────────────────────────────────── */

  .project-media--hscroll {
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch;
    align-items: flex-start !important;
    justify-content: flex-start !important;
  }

  .hscroll-track {
    flex-direction: column !important;
    height: auto !important;
    width: 100% !important;
    /* padding: 8px 4vw 88px !important; */
    gap: 160px !important;
    transform: none !important;
  }

  .hscroll-section {
    flex: 0 0 auto !important;
    width: 100% !important;
    height: 56vw !important;
  }

  /* ── CONTACT / BIO ──────────────────────────────────────────────── */

  .doodle { display: none !important; }

  #contact-bio-cv {
    overflow-y: auto;
    overflow-x: hidden;
    pointer-events: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    /* padding: 64px 24px 80px; */
    gap: 28px;
    margin-bottom: 200px;
    /* transform: translate(0%, 150%); */
  }

  #bio-folio-bg { position: fixed; object-position: center top; }
  #bio-ref-overlay { display: none; }

  #bio-profile {
    position: absolute;
    top: 62px;
    left: -33px;
    width: 55%;
    height: auto;
    transform: none;
  }

  #bio-social {
    position: static;
    order: 2;
    display: flex;
    flex-direction: row;
    gap: 24px;
    justify-content: center;
    align-items: center;
    width: 100%;
    flex-shrink: 0;
  }

  #bio-icons-area {
    /* display: none; */
    position: absolute;
    display: grid;
    gap: 12px;
    left: 140px;
    grid-auto-flow: column;
    justify-content: center;
    align-items: center;
    top: 220px;
    align-content: center;
    justify-items: center;
  }

  .bico-wrap {
    position: static;
    width: 36px;
  }

  .bico-wrap::after,
  .bico-wrap:hover::after {
    display: none;
  }

  #bio-grid {
    display: contents;
  }

  #bio-center  { display: none; }
  #bio-right {
    order: 1;
    width: 100%;
    overflow-y: visible;
    flex-shrink: 0;
    padding-top: 350px;
    padding-left: 50px;
    padding-right: 50px;
    padding-bottom: 15px;
  }
  #bio-left {
    order: 3;
    flex-shrink: 0;
    gap: 33px;
    padding-top: 0;
    flex-direction: row;
    padding: 0px 50px;
    padding-bottom: 15px;
  }

  #bio-label-softwares { display: none; }
  #bio-header-info     { text-align: left; }

  #bio-ui-sound { margin: 0; }
  #bio-dev      { margin: 0; }

  #close-contactbio {
    position: fixed;
    top: 24px;
    right: 24px;
  }

  /* ── LANGUAGE SWITCHER ──────────────────────────────────────────── */

}

