/*
 * ========================================================
 * PROJECT: Marcus Escalona Portfolio
 * AUTHOR: Marco Escalona 
 * DESCRIPTION: Custom UI styles, Layout, and WebGL overlays
 * ========================================================
 */
 
 
 :root {
  --bg-default: #141414;
  --text-main: #bac4b8;
  --text-light: #ffffff;
  --transition-curve: cubic-bezier(0.25, 1, 0.5, 1);
  --page-padding: 5vw;
}

* { 
  margin: 0; padding: 0; box-sizing: border-box; 
  -webkit-tap-highlight-color: transparent !important;
}

*:focus, *:active { outline: none !important; box-shadow: none !important; }
::-moz-focus-inner { border: 0; }

html.lenis { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }

body {
  font-family: "Inter", sans-serif;
  background-color: var(--bg-default);
  color: var(--text-main);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  cursor: none;
}

video { pointer-events: none !important; outline: none !important; }
video::-webkit-media-controls, video::-webkit-media-controls-enclosure { display: none !important; }

a, button, .gallery-item, .thumb-item, .close-btn, .close-about-btn, .nav-info, .lang-opt { cursor: none !important; }
::-webkit-scrollbar { display: none; }

#custom-cursor {
  position: fixed; top: 0; left: 0; width: 6px; height: 6px; background-color: #fff;
  border-radius: 50%; pointer-events: none; z-index: 9999999; mix-blend-mode: difference;
  transform: translate(-50%, -50%); opacity: 0;
  transition: width 0.2s cubic-bezier(0.25, 1, 0.5, 1), height 0.2s cubic-bezier(0.25, 1, 0.5, 1), background-color 0.2s ease, border 0.2s ease, opacity 0.3s ease;
  will-change: transform;
}

#custom-cursor.hovered { width: 45px; height: 45px; background-color: transparent; border: 1.5px solid rgba(255, 255, 255, 0.8); }

#preloader {
  position: fixed; inset: 0; background-color: var(--bg-default); z-index: 99999;
  display: flex; justify-content: center; align-items: center; flex-direction: column; color: #fff;
}

#preloader .preloader-name { font-family: "Oswald", sans-serif; font-size: clamp(2rem, 5vw, 4rem); letter-spacing: 0.15em; text-align: center; opacity: 0; will-change: transform, opacity; }
#preloader .preloader-role { font-family: "Inter", sans-serif; font-weight: 400; font-size: 0.9rem; letter-spacing: 0.4em; color: rgba(255, 255, 255, 0.5); margin-top: 1.5rem; text-align: center; opacity: 0; text-transform: uppercase; will-change: transform, opacity; }

#project-particles { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: -1; pointer-events: none; opacity: 0; }

.bg-layer { position: fixed; inset: 0; background-color: var(--bg-default); z-index: -2; transition: background-color 0.5s var(--transition-curve); }

.giant-text-layer { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 1; width: 100vw; text-align: center; pointer-events: none; display: flex; justify-content: center; align-items: center; }

#dynamic-title {
  font-family: "Oswald", sans-serif; font-weight: 700; text-transform: uppercase;
  color: rgba(0, 0, 0, 0.15); white-space: nowrap; width: auto; text-align: center; opacity: 0;
  user-select: none; clip-path: inset(0 50% 0 50%); -webkit-clip-path: inset(0 50% 0 50%);
  line-height: 1.1; 
}

.lang-wipe-target { 
  display: inline-block; position: relative; 
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
  -webkit-clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
}

header { position: fixed; top: 0; left: 0; width: 100%; padding: 2.5rem var(--page-padding); display: grid; grid-template-columns: 1fr auto 1fr; align-items: start; z-index: 100; pointer-events: none; mix-blend-mode: difference; color: #fff; }
header .logo { justify-self: start; font-family: "Inter", sans-serif; font-weight: 500; font-size: 0.75rem; letter-spacing: 0.2em; text-transform: uppercase; }
.header-nav { justify-self: end; display: flex; gap: 2.5rem; align-items: flex-start; pointer-events: auto; }

.nav-info, .footer-links a, .lang-opt, .visit-link { font-family: "Inter", sans-serif; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.2em; font-weight: 500; text-decoration: none; color: rgba(255, 255, 255, 0.5); display: inline-flex; align-items: center; transition: color 0.3s ease; }
.nav-info:hover, .footer-links a:hover, .lang-opt:hover, .lang-opt.active, .visit-link:hover { color: rgba(255, 255, 255, 1); }

.animated-underline { position: relative; }
.animated-underline::after { content: ""; position: absolute; bottom: -4px; left: 0; width: 100%; height: 1px; background: #fff; transform: scaleX(0); transform-origin: right; transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1); }
.animated-underline:hover::after, .animated-underline.active::after { transform: scaleX(1); transform-origin: left; }

.lang-dropdown-wrapper { position: relative; display: flex; flex-direction: column; align-items: flex-end; padding-bottom: 2rem; }
.lang-current { color: rgba(255, 255, 255, 0.5); }
.lang-dropdown-wrapper:hover .lang-current { color: rgba(255, 255, 255, 1); }
.lang-current .lang-long { max-width: 0; opacity: 0; display: inline-block; vertical-align: bottom; overflow: hidden; white-space: nowrap; transition: max-width 0.4s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.4s ease; }
.lang-dropdown-wrapper:hover .lang-current .lang-long { max-width: 80px; opacity: 1; }
.lang-options { position: absolute; top: 2rem; right: 0; display: flex; flex-direction: column; align-items: flex-end; gap: 0.8rem; opacity: 0; pointer-events: none; transform: translateY(-10px); transition: opacity 0.3s ease 0.2s, transform 0.3s ease 0.2s; }
.lang-dropdown-wrapper:hover .lang-options { opacity: 1; pointer-events: auto; transform: translateY(0); }

.spectrum-container { justify-self: center; display: flex; align-items: center; gap: 3px; height: 20px; pointer-events: none; }
.spectrum-bar { width: 1.5px; background-color: rgba(255, 255, 255, 0.25); border-radius: 2px; transition: background-color 0.2s ease, transform 0.2s ease; will-change: transform; }
.spectrum-bar.active { background-color: #fff; transform: scaleY(1.5); }

.context-text { position: fixed; bottom: 2.5rem; left: var(--page-padding); font-family: "Inter", sans-serif; font-size: 0.55rem; text-transform: uppercase; letter-spacing: 0.15em; line-height: 1.6; color: rgba(255, 255, 255, 0.3); pointer-events: none; z-index: 100; mix-blend-mode: difference; border-left: 1px solid rgba(255, 255, 255, 0.2); padding-left: 1rem; }
.footer-links { position: fixed; bottom: 2.5rem; right: var(--page-padding); display: flex; gap: 2rem; z-index: 100; mix-blend-mode: difference; pointer-events: auto; }

#about-modal { position: fixed; inset: 0; background-color: var(--bg-default); z-index: 10000; display: none; opacity: 0; padding: 10vh var(--page-padding); color: #fff; overflow-y: auto; overscroll-behavior: contain; transform: none !important; }
#about-particles { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; z-index: 0; pointer-events: none; }
.fluid-bg { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.fluid-blob { position: absolute; border-radius: 50%; filter: blur(50px); opacity: 0.4; animation: moveBlob 25s infinite alternate cubic-bezier(0.45, 0, 0.55, 1); will-change: transform; }
.blob-1 { width: 60vw; height: 60vw; background: rgba(255, 255, 255, 0.02); top: -10%; left: -10%; }
.blob-2 { width: 50vw; height: 50vw; background: rgba(255, 255, 255, 0.015); bottom: -20%; right: -10%; animation-delay: -5s; animation-direction: alternate-reverse; }
.blob-3 { width: 45vw; height: 45vw; background: rgba(255, 255, 255, 0.02); top: 40%; left: 60%; animation-delay: -10s; }
@keyframes moveBlob { 0% { transform: translate(0, 0) scale(1) rotate(0deg); } 100% { transform: translate(-15vw, 15vh) scale(1.2) rotate(45deg); } }

.about-wrapper { max-width: 1200px; margin: 0 auto; position: relative; z-index: 1; padding-top: 4rem; padding-bottom: 8rem; }
.about-layout { display: grid; grid-template-columns: 1fr 1.5fr; gap: 6vw; align-items: start; margin-top: 2rem; }

.about-img-box {
  border-radius: 8px; overflow: hidden; position: relative;
  border: 1px solid rgba(255, 255, 255, 0.06); 
  padding: 10px; background-color: rgba(255, 255, 255, 0.02); 
  box-shadow: inset 0 0 15px rgba(255,255,255,0.02); 
  transition: transform 0.6s var(--transition-curve), border-color 0.6s ease;
  will-change: transform, opacity;
}
.about-img-box:hover { transform: translateY(-5px); border-color: rgba(255, 255, 255, 0.15); }
.about-img-box img { width: 100%; height: auto; object-fit: cover; border-radius: 4px; }

.about-title { font-family: "Oswald", sans-serif; font-size: clamp(3rem, 5vw, 4.5rem); margin-bottom: 2rem; text-transform: uppercase; line-height: 1; }
.about-subtitle { font-family: "Oswald", sans-serif; font-size: 1.5rem; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 1.5rem; color: #fff; opacity: 0.9; }
.about-text { font-family: "Inter", sans-serif; font-size: 1.1rem; line-height: 1.7; color: rgba(255, 255, 255, 0.8); margin-bottom: 2rem; font-weight: 300; }
.skills-container { margin-top: 1rem; display: flex; flex-direction: column; gap: 1.2rem; }
.skill-item { width: 100%; }
.skill-header { display: flex; justify-content: space-between; font-family: "Inter", sans-serif; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 0.6rem; color: rgba(255, 255, 255, 0.9); }
.skill-level { color: rgba(255, 255, 255, 0.5); }
.skill-track { width: 100%; height: 1px; background-color: rgba(255, 255, 255, 0.15); position: relative; overflow: hidden; }
.skill-fill { position: absolute; top: 0; left: 0; height: 100%; background-color: #fff; width: 100%; transform: scaleX(0); transform-origin: left; will-change: transform; }

.tech-container { margin-top: 1.5rem; display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; perspective: 1000px; }
.tech-category-header { display: flex; align-items: center; gap: 8px; margin-bottom: 1rem; border-bottom: 1px solid rgba(255, 255, 255, 0.1); padding-bottom: 0.5rem; }
.tech-category-header svg { color: rgba(255, 255, 255, 0.8); }
.tech-category-title { font-family: "Inter", sans-serif; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 1.5px; color: rgba(255, 255, 255, 0.6); }
.tech-tags { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.tech-tag { font-family: "Inter", sans-serif; font-size: 0.85rem; padding: 0.35rem 0.8rem; border: 1px solid rgba(255, 255, 255, 0.15); border-radius: 50px; background: rgba(255, 255, 255, 0.03); color: rgba(255, 255, 255, 0.8); transition: all 0.3s ease; will-change: transform, opacity; }
.tech-tag:hover { background: rgba(255, 255, 255, 0.9); color: #000; border-color: rgba(255, 255, 255, 0.9); }

@media (max-width: 900px) {
  .about-layout { grid-template-columns: 1fr; gap: 3rem; }
  .about-img-box { max-width: 400px; margin: 0 auto; }
  .tech-container { grid-template-columns: 1fr; gap: 1.5rem; }
}

.close-about-btn { position: absolute; top: 0; right: 0; font-size: 0.8rem; letter-spacing: 2px; font-family: "Inter", sans-serif; text-transform: uppercase; color: transparent; pointer-events: auto; display: inline-flex; align-items: center; justify-content: center; cursor: none; z-index: 10; }
.close-about-btn .layer { position: absolute; top: 0; left: 0; right: 0; bottom: 0; display: flex; align-items: center; justify-content: flex-end; gap: 8px; white-space: nowrap; transition: clip-path 0.5s cubic-bezier(0.77, 0, 0.175, 1); }
.close-about-btn .base-layer { color: rgba(255, 255, 255, 0.5); clip-path: polygon(0 0, 100% 0, 100% 100%, 0% 100%); }
.close-about-btn .hover-layer { color: #ffffff; clip-path: polygon(100% 0, 100% 0, 100% 100%, 100% 100%); }
.close-about-btn:hover .base-layer { clip-path: polygon(0 0, 0 0, 0 100%, 0% 100%); }
.close-about-btn:hover .hover-layer { clip-path: polygon(0 0, 100% 0, 100% 100%, 0% 100%); }
.about-x-icon { display: inline-block; transition: transform 0.5s cubic-bezier(0.77, 0, 0.175, 1); }
.close-about-btn:hover .about-x-icon { transform: rotate(-90deg); }

#gallery-view { position: relative; height: 100vh; z-index: 2; opacity: 1; transform-origin: center; }
.horizontal-section { height: 100vh; display: flex; align-items: center; }
.gallery-track { display: flex; align-items: center; padding: 0 50vw 0 var(--page-padding); width: max-content; height: 60vh; will-change: transform, filter, opacity; }
.gallery-item { position: relative; width: 12vw; height: 100%; flex-shrink: 0; margin-right: 2vw; filter: grayscale(100%) brightness(0.6); pointer-events: auto; will-change: width; }
.gallery-item:hover { filter: grayscale(0%) brightness(1); }
.img-wrapper { width: 100%; height: 100%; overflow: hidden; position: relative; border-radius: 4px; background-color: #0a0a0a; }

.gallery-poster { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; z-index: 2; transition: opacity 0.4s ease; }
.gallery-video { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; opacity: 0; transition: opacity 0.4s ease; pointer-events: none !important; }

.img-wrapper img, .img-wrapper video { transform: scale(1); transition: transform 0.8s ease; will-change: transform; }
.gallery-item:hover .img-wrapper img { transform: scale(1); }
.gallery-item:hover .img-wrapper video { transform: scale(1.05); }
.gallery-item[data-id="ebvghoot"]:hover .img-wrapper video { transform: scale(1); }

.item-info { position: absolute; bottom: -4rem; left: 0; width: 100%; opacity: 0; transform: translateY(20px); pointer-events: none; }
.item-category { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 2px; display: block; }
.item-title { font-size: 1.2rem; font-weight: 500; color: #fff; margin-top: 0.4rem; line-height: 1.2; }

.explore-indicator { 
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(0.5); 
  color: #333; padding: 1rem 2rem; border-radius: 50px; font-weight: 600; font-size: 0.9rem; 
  opacity: 0; pointer-events: auto; cursor: none; transition: color 0.4s ease; z-index: 10;
  border: none !important; user-select: none; overflow: hidden; 
}
.explore-indicator:hover { color: #000; }
.explore-bg { position: absolute; inset: 0; border-radius: 50px; overflow: hidden; z-index: -2; }
.explore-bg::after { content: ""; position: absolute; inset: 0; background: rgba(255, 255, 255, 0.75); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); z-index: -2; }
.explore-bg::before { content: ""; position: absolute; inset: 0; background: #ffffff; z-index: -1; transform-origin: left; transform: scaleX(0); transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1); }
.explore-indicator:hover .explore-bg::before { transform-origin: right; transform: scaleX(1); }
.explore-text { position: relative; z-index: 1; }

#detail-view { position: absolute; top: 0; left: 0; width: 100%; min-height: 100vh; z-index: 50; display: none; opacity: 0; padding: 22vh var(--page-padding) 10vh; will-change: opacity, transform; }

.close-btn-wrapper { 
  position: fixed; 
  top: 3.5rem; 
  left: 0; 
  width: 100%; 
  display: flex; 
  justify-content: center; 
  z-index: 101; 
  pointer-events: none; 
  mix-blend-mode: difference; 
}

.close-btn { font-size: 0.75rem; font-weight: 600; letter-spacing: 2px; text-transform: uppercase; pointer-events: auto; position: relative; display: inline-flex; align-items: center; justify-content: center; cursor: none; color: transparent; }
.close-btn .layer { position: absolute; top: 0; left: 0; right: 0; bottom: 0; display: flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap; transition: clip-path 0.5s cubic-bezier(0.77, 0, 0.175, 1); }
.close-btn .base-layer { color: #ffffff; clip-path: polygon(0 0, 100% 0, 100% 100%, 0% 100%); }

.close-btn .hover-layer { color: #888888; clip-path: polygon(0 0, 0 0, 0 100%, 0% 100%); }

.close-btn:hover .base-layer { clip-path: polygon(100% 0, 100% 0, 100% 100%, 100% 100%); }
.close-btn:hover .hover-layer { clip-path: polygon(0 0, 100% 0, 100% 100%, 0% 100%); }
.x-icon { display: inline-block; transition: transform 0.5s cubic-bezier(0.77, 0, 0.175, 1); }
.close-btn:hover .x-icon { transform: rotate(90deg); }

.detail-layout { display: grid; grid-template-columns: 3.8fr 5fr 1fr; gap: 5vw; width: 100%; }
.detail-left { position: relative; max-width: 100%; }
.sticky-wrapper { position: sticky; top: 22vh; color: #fff; mix-blend-mode: difference; }
.sticky-wrapper h1 { font-family: "Oswald", sans-serif; font-size: clamp(2.5rem, 5vw, 6rem); line-height: 0.9; text-transform: uppercase; margin-bottom: 1.5rem; word-wrap: break-word; }
.detail-desc { font-size: 1.1rem; line-height: 1.6; opacity: 0.8; margin-bottom: 2rem; }
.detail-actions { display: flex; gap: 15px; flex-wrap: wrap; margin-top: 2.5rem; }

.visit-link { position: relative; padding: 0.8rem 2rem; border: 1px solid rgba(255, 255, 255, 0.4); border-radius: 50px; font-family: "Inter", sans-serif; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 1.5px; text-decoration: none; display: inline-flex; align-items: center; background: transparent; overflow: hidden; cursor: none; }
.visit-link .layer { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 10px; z-index: 1; transition: clip-path 0.5s cubic-bezier(0.77, 0, 0.175, 1); white-space: nowrap; }

#det-link::before { content: ""; position: absolute; inset: 0; background: #fff; clip-path: polygon(0 0, 0 0, 0 100%, 0% 100%); transition: clip-path 0.5s cubic-bezier(0.77, 0, 0.175, 1); z-index: 0; }
#det-link:hover::before { clip-path: polygon(0 0, 100% 0, 100% 100%, 0% 100%); }
#det-link .base-layer { color: #fff; clip-path: polygon(0 0, 100% 0, 100% 100%, 0% 100%); }
#det-link .hover-layer { color: #000; clip-path: polygon(0 0, 0 0, 0 100%, 0% 100%); }
#det-link:hover .base-layer { clip-path: polygon(100% 0, 100% 0, 100% 100%, 100% 100%); }
#det-link:hover .hover-layer { clip-path: polygon(0 0, 100% 0, 100% 100%, 0% 100%); }

#det-repo::before { content: ""; position: absolute; inset: 0; background: #fff; clip-path: polygon(100% 0, 100% 0, 100% 100%, 100% 100%); transition: clip-path 0.5s cubic-bezier(0.77, 0, 0.175, 1); z-index: 0; }
#det-repo:hover::before { clip-path: polygon(0 0, 100% 0, 100% 100%, 0% 100%); }
#det-repo .base-layer { color: #fff; clip-path: polygon(0 0, 100% 0, 100% 100%, 0% 100%); }
#det-repo .hover-layer { color: #000; clip-path: polygon(100% 0, 100% 0, 100% 100%, 100% 100%); }
#det-repo:hover .base-layer { clip-path: polygon(0 0, 0 0, 0 100%, 0% 100%); }
#det-repo:hover .hover-layer { clip-path: polygon(0 0, 100% 0, 100% 100%, 0% 100%); }

/* ESTILOS DE NOTA ELEGANTE */
.demo-note {
  font-size: 0.8rem; 
  margin-top: 1.5rem; 
  line-height: 1.6;
  font-family: "Inter", sans-serif;
  color: rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.03);
  border-left: 3px solid rgba(255, 255, 255, 0.3);
  padding: 1rem 1.2rem;
  border-radius: 0 6px 6px 0;
  font-style: italic;
}
.demo-note strong {
  color: rgba(255, 255, 255, 0.9);
  font-style: normal;
}

.detail-center { display: flex; flex-direction: column; gap: 10vh; padding-bottom: 20vh; }
.detail-img-box { width: 100%; border-radius: 8px; overflow: hidden; background-color: #0a0a0a; aspect-ratio: 16 / 9; will-change: transform, opacity; }
.detail-img-box img, .detail-img-box video { width: 100%; height: 100%; display: block; object-fit: cover; }

.detail-right { position: relative; display: flex; justify-content: flex-end; }
.thumbs-container { position: sticky; top: 22vh; display: flex; flex-direction: column; gap: 15px; align-items: flex-end; height: max-content; }
.thumb-item { width: 6vw; max-width: 80px; min-width: 40px; aspect-ratio: 16/10; border-radius: 4px; overflow: hidden; opacity: 0.3; transition: all 0.3s ease; pointer-events: auto; background-color: #0a0a0a; }
.thumb-item.active { opacity: 1; transform: scale(1.05); border: 2px solid #fff; }
.thumb-item img, .thumb-item video { width: 100%; height: 100%; object-fit: cover; }