/* ═══════════════════════════════════════════════════════════
   JULIA — PORTFOLIO
   Design system: Pure black · Syne display · DM Sans body
   Accent: #D4A843 (warm gold)
═══════════════════════════════════════════════════════════ */

/* ─── RESET ─────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: auto; } /* Lenis handles smooth scroll */
body {
  background: #000;
  color: #fff;
  font-family: 'DM Sans', system-ui, sans-serif;
  font-weight: 400;
  line-height: 1.6;
  overflow-x: hidden;
}
img, video, canvas { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ─── CSS VARIABLES ──────────────────────────────── */
:root {
  --bg: #000000;
  --bg-alt: #080808;
  --text: #ffffff;
  --muted: #888888;
  --dim: #3a3a3a;
  --border: #1a1a1a;
  --accent: #D4A843;
  --accent-dim: rgba(212, 168, 67, 0.12);
  --font-display: 'Syne', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --nav-h: 100px;
  --section-pad: clamp(80px, 12vw, 140px);
  --container: 1240px;
}

/* ─── TYPOGRAPHY ─────────────────────────────────── */
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
}

/* ─── LOADER ─────────────────────────────────────── */
#loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
}
.loader-sidekick {
  width: clamp(96px, 22vw, 160px);
  height: clamp(96px, 22vw, 160px);
  object-fit: contain;
  animation: loaderFloat 2.2s ease-in-out infinite;
}
@keyframes loaderFloat {
  0%, 100% { transform: translateY(0px) scale(1); }
  50%       { transform: translateY(-12px) scale(1.03); }
}
.loader-bar-track {
  width: 100px;
  height: 1px;
  background: var(--border);
  overflow: hidden;
}
.loader-bar-fill {
  height: 100%;
  width: 0%;
  background: var(--accent);
  transition: width 0.1s linear;
}

/* ─── NAV ────────────────────────────────────────── */
#site-nav {
  position: fixed;
  top: 20px;
  left: 0;
  right: 0;
  margin: 0 auto;
  width: calc(100% - 48px);
  max-width: 1160px;
  z-index: 100;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(18px, 3vw, 36px);
  border-radius: 100px;
  /* glass base — siempre visible, sin necesidad de scroll */
  background: rgba(12, 12, 12, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45), 0 1px 0 rgba(255, 255, 255, 0.06) inset;
  overflow: hidden; /* clip ::before al border-radius; nav-links es fixed, no se ve afectado */
  transition: background 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
}
/* backdrop-filter on ::before — avoids creating a containing block
   for position:fixed children (nav-links overlay) */
#site-nav::before {
  content: '';
  position: absolute;
  inset: 0;
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  z-index: -1;
  pointer-events: none;
}
#site-nav.scrolled {
  background: rgba(8, 8, 8, 0.75);
  border-color: rgba(255, 255, 255, 0.11);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6), 0 1px 0 rgba(255, 255, 255, 0.08) inset;
}
.nav-logo {
  display: flex;
  align-items: center;
  transition: opacity 0.2s;
}
.nav-logo:hover { opacity: 0.75; }
.nav-logo-img {
  height: clamp(40px, 7vw, 90px);
  width: auto;
  display: block;
}
.nav-links {
  display: flex;
  gap: 2.5rem;
}
.nav-links a {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.2s;
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.3s ease;
}
.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { width: 100%; }

/* ─── HERO ───────────────────────────────────────── */
#hero {
  height: 100vh;
  height: 100svh; /* iOS/Android: ignora la URL bar, evita salto de layout */
  min-height: 560px;
  padding-top: 50px; /* pill flotante no ocupa flujo; padding mínimo para clearing visual */
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  width: 100%;
  padding: 0 clamp(24px, 5vw, 64px);
}
.hero-text {
  width: 100%;
  text-align: center;
}
.hero-line {
  font-family: var(--font-display);
  font-size: clamp(0.9rem, 5.5vw, 7.5rem);
  font-weight: 800;
  line-height: 0.88;
  letter-spacing: -0.03em;
  color: var(--text);
}
.hero-line-1 {
  display: block;
  margin-bottom: 0.1em;
}
.hero-line-2 {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
}
.hero-seg {
  display: inline;
  white-space: nowrap;
}

/* ─── NAV HAMBURGER (hidden at desktop) ─────────── */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 8px;
  background: none;
  border: none;
  cursor: pointer;
  position: relative;
  z-index: 200;
  flex-shrink: 0;
}
.nav-hamburger span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--text);
  border-radius: 1px;
  transition: transform 0.3s ease, opacity 0.2s ease;
  transform-origin: center;
}
.nav-hamburger.is-open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-hamburger.is-open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-hamburger.is-open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* Sidekick canvas — replaces the "o" in "mejor" */
#sidekick-canvas {
  display: block;
  height: 1.9em;
  width: 1.9em;
  mix-blend-mode: screen;
  cursor: pointer;
  flex-shrink: 0;
}

/* Scroll hint */
.scroll-hint {
  position: absolute;
  bottom: clamp(16px, 4vh, 40px);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.scroll-hint-label {
  font-size: 0.6rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--dim);
}
.scroll-hint-line {
  width: 1px;
  height: 52px;
  background: var(--border);
  overflow: hidden;
}
.scroll-hint-progress {
  width: 100%;
  height: 50%;
  background: var(--accent);
  animation: scrollLine 2s ease-in-out infinite;
}
@keyframes scrollLine {
  0%   { transform: translateY(-100%); }
  100% { transform: translateY(220%); }
}

/* ─── SECTIONS (shared) ──────────────────────────── */
.section {
  padding: var(--section-pad) 0;
}
.section-alt {
  background: var(--bg-alt);
}
.section-container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 clamp(24px, 5vw, 64px);
}
.section-header {
  margin-bottom: clamp(48px, 8vw, 96px);
}
.graficos-header {
  position: relative;
}
.graficos-sidekick {
  position: absolute;
  top: -500px;
  left: 0;
  width: 300px;
  height: auto;
  pointer-events: none;
  opacity: 0;
  animation: floatSide 2.4s ease-in-out infinite alternate;
  animation-play-state: paused;
}
@keyframes floatSide {
  from { transform: translateX(-7px) rotate(-1.5deg); }
  to   { transform: translateX(7px)  rotate(1.5deg);  }
}
.section-label {
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.2rem;
}
.section-title {
  font-size: clamp(1.4rem, 5vw, 5rem);
  color: var(--text);
  line-height: 1;
  overflow-wrap: break-word;   /* red de seguridad: "Comunicación" nunca desborda */
}
.section-desc {
  margin-top: 1.2rem;
  font-size: 1rem;
  color: var(--muted);
  max-width: 480px;
  line-height: 1.7;
}

/* ─── SKILLS — new layout ────────────────────────── */
.skills-layout {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: center;
  overflow: visible;
}

/* Avatar column */
.skills-avatar-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  align-self: center;
  margin-top: calc(-1 * var(--section-pad) + 5px);
  margin-bottom: calc(-1 * var(--section-pad) - 5px);
}
.skills-avatar-wrap {
  position: relative;
  width: 100%;
  max-width: 360px;
  aspect-ratio: 9 / 16;
  cursor: pointer;
  background: transparent;
  /* Dos máscaras compuestas con intersect:
     1) fade radial del borde (original)
     2) hueco elíptico en la esquina inferior-derecha que oculta la marca
        blanca del video. La elipse 40%×28% está anclada en 100% 100%. */
  -webkit-mask-image:
    radial-gradient(ellipse 80% 85% at 50% 48%, black 40%, transparent 75%),
    radial-gradient(ellipse 40% 28% at 100% 100%, transparent 55%, black 100%);
  -webkit-mask-composite: source-in;
  mask-image:
    radial-gradient(ellipse 80% 85% at 50% 48%, black 40%, transparent 75%),
    radial-gradient(ellipse 40% 28% at 100% 100%, transparent 55%, black 100%);
  mask-composite: intersect;
}
#skills-sidekick-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.skills-avatar-hint {
  position: absolute;
  bottom: 66px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(212, 168, 67, 0.2);
  border-radius: 14px;
  padding: 8px 14px;
  text-align: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  white-space: nowrap;
}
.skills-avatar-wrap:hover .skills-avatar-hint { opacity: 1; }
.skills-avatar-hint span {
  font-size: 0.84rem;
  color: var(--accent);
  letter-spacing: 0.04em;
  line-height: 1.5;
}

/* Content column */
.skills-content-col {
  padding-top: 8px;
}
.skills-cat-header {
  display: flex;
  align-items: center;
  gap: clamp(10px, 2vw, 20px);
  margin-bottom: clamp(22px, 3vw, 32px);
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.skills-cat-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.25rem, 2.5vw, 2rem);
  color: var(--text);
  letter-spacing: -0.02em;
  flex: 1;
  min-width: 0;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.skills-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: clamp(30px, 4vw, 36px);
  height: clamp(30px, 4vw, 36px);
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--muted);
  transition: all 0.2s ease;
  flex-shrink: 0;
}
.skills-arrow:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Skill cards grid */
.skills-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.skill-card {
  position: relative;
  height: 110px;
  cursor: default;
}
.skill-card-front,
.skill-card-back {
  position: absolute;
  inset: 0;
  border-radius: 14px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.skill-card-front {
  border: 1px solid #222;
  border-top: 2px solid var(--accent);
  background: #050505;
}
.skill-card-back {
  background: #050505;
  border: 1px solid #222;
  opacity: 0;
  transition: opacity 0.22s ease;
  z-index: 1;
}
.skill-card:hover .skill-card-back,
.skill-card.is-flipped .skill-card-back {
  opacity: 1;
}
/* Accent border — top + sides only, bottom transparent, slides in from top */
.skill-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 2px solid var(--accent);
  border-bottom-color: transparent;
  border-radius: 14px;
  clip-path: inset(0 0 100% 0 round 14px);
  transition: clip-path 0.35s ease;
  pointer-events: none;
  z-index: 3;
}
.skill-card:hover::after,
.skill-card.is-flipped::after {
  clip-path: inset(0 0 0 0 round 14px);
}
.skill-card-pct {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.8rem;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 6px;
  letter-spacing: -0.03em;
}
.skill-card-name {
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 0.04em;
  line-height: 1.3;
}
.skill-card-years-hint {
  display: none; /* visible solo en tablet/mobile via @media */
}
.skill-card-back-name {
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 0.04em;
  line-height: 1.3;
  margin-top: 6px;
}
.skill-card-years {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--accent);
  letter-spacing: -0.02em;
  text-align: center;
}

/* ─── UX/UI CARDS ────────────────────────────────── */
.uxui-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}
.browser-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.browser-card--offset {
  margin-top: 64px;
}

/* Sidekick dock on project 04 */
.browser-card--sidekick {
  position: relative;
  z-index: 5;
}
.uxui-sidekick-dock {
  position: absolute;
  top: -55px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  pointer-events: none;
}
#sidekick-canvas-uxui {
  width: 110px;
  height: 110px;
  mix-blend-mode: screen;
  pointer-events: auto;
  cursor: pointer;
}

/* LENIS image on project 02 */
.browser-card--lenis {
  position: relative;
  z-index: 20; /* above other cards so dock can roll over them */
}
/* --lenis-w fluye entre 160px (mobile) y 300px (desktop).
   top y left se derivan de la misma variable para que el dock escale sin descuadre.
   GSAP anima x/y/rotate vía transform, no toca top/left — los valores base se respetan. */
.uxui-lenis-dock {
  --lenis-w: clamp(160px, 22vw, 300px);
  position: absolute;
  top: calc(var(--lenis-w) * -0.6);
  left: calc(50% - var(--lenis-w) / 2);
  z-index: 100;
  pointer-events: none;
}
.uxui-lenis-img {
  width: var(--lenis-w);
  height: auto;
  display: block;
  animation: lenisFloat 3.2s ease-in-out infinite;
  animation-play-state: paused;
}
@keyframes lenisFloat {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-10px); }
}

.card-wrapper {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #080808;
  transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1),
              box-shadow 0.4s cubic-bezier(0.23, 1, 0.32, 1),
              border-color 0.3s ease;
  transform-style: preserve-3d;
  will-change: transform;
}
.browser-card:hover .card-wrapper {
  border-color: rgba(212, 168, 67, 0.25);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(212, 168, 67, 0.1);
}
/* Browser chrome */
.browser-chrome {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: #111;
  border-bottom: 1px solid var(--border);
}
.browser-dots {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}
.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.dot-r { background: #ff5f57; }
.dot-y { background: #febc2e; }
.dot-g { background: #28c840; }
.browser-url {
  flex: 1;
  height: 20px;
  background: #1a1a1a;
  border-radius: 14px;
  font-size: 0.65rem;
  color: var(--dim);
  display: flex;
  align-items: center;
  padding: 0 8px;
  letter-spacing: 0.02em;
}
/* Browser content area */
.browser-content {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  position: relative;
}
.browser-content video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.browser-placeholder {
  width: 100%;
  height: 100%;
  background: #0d0d0d;
  display: flex;
  align-items: center;
  justify-content: center;
}
.browser-placeholder span {
  font-size: 0.75rem;
  color: var(--dim);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
/* ── Phone mockup variant (app projects) ── */
.card-wrapper--phone {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0;
  background: transparent;
  border: none !important;
  box-shadow: none !important;
  overflow: visible;
}
.phone-shell {
  position: relative;
  width: 180px;
  border-radius: 32px;
  border: 2px solid #2a2a2a;
  background: #000;
  overflow: hidden;
  box-shadow:
    0 0 0 1px #111,
    inset 0 0 0 1px #1e1e1e,
    0 32px 80px rgba(0,0,0,0.9),
    0 0 60px rgba(212,168,67,0.06);
}
.phone-notch {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 72px;
  height: 11px;
  background: #111;
  border-radius: 20px;
  z-index: 2;
}
.phone-screen {
  aspect-ratio: 9 / 19.5;
  overflow: hidden;
  position: relative;
}
.phone-screen video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* Side buttons (decorative) */
.phone-shell::before {
  content: '';
  position: absolute;
  right: -3px;
  top: 120px;
  width: 3px;
  height: 56px;
  background: #222;
  border-radius: 0 2px 2px 0;
}
.phone-shell::after {
  content: '';
  position: absolute;
  left: -3px;
  top: 96px;
  width: 3px;
  height: 36px;
  background: #222;
  border-radius: 2px 0 0 2px;
  box-shadow: 0 52px 0 #222;
}
/* Hover dorado va al shell, no al wrapper */
.browser-card:hover .card-wrapper--phone {
  border-color: transparent !important;
  box-shadow: none !important;
}
.browser-card:hover .phone-shell {
  border-color: rgba(212, 168, 67, 0.35);
  box-shadow:
    0 0 0 1px rgba(212,168,67,0.12),
    0 32px 80px rgba(0,0,0,0.9);
}
/* Click hint override for phone cards */
.card-wrapper--phone .card-click-hint {
  top: 0 !important;
  border-radius: 48px;
}

/* Responsive: phone-shell max-width en tablet/mobile */
@media (max-width: 1024px) {
  .phone-shell { width: 220px; }
}
@media (max-width: 768px) {
  .phone-shell { width: clamp(180px, 55vw, 260px); }
}

/* Card meta */
.card-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0 2px;
}
.card-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}
.card-tags {
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.06em;
}

/* ─── GRAPHICS FILTER ────────────────────────────── */
.filter-tabs {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-bottom: clamp(32px, 5vw, 56px);
  border-bottom: 1px solid var(--border);
  padding-bottom: 0;
}
.filter-tab {
  padding: 10px 20px 14px;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.2s, border-color 0.2s;
  cursor: pointer;
}
.filter-tab:hover { color: var(--text); }
.filter-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ─── GRAPHICS GRID ──────────────────────────────── */
.graphics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.graphic-item {
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.graphic-img-wrap {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 14px;
  background: #0a0a0a;
  border: 1px solid #222;
  transition: border-color 0.3s ease;
}
.graphic-item:hover .graphic-img-wrap {
  border-color: var(--dim);
}
.graphic-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}
.graphic-item:hover img { transform: scale(1.04); }
.graphic-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.graphic-placeholder span,
.graphic-placeholder em {
  display: none;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ─── CONTACT ────────────────────────────────────── */
/* Section never starts invisible — only child elements animate in */
#contacto { opacity: 1 !important; }

.section-contact {
  padding-bottom: clamp(80px, 14vw, 160px);
}
.contact-layout {
  max-width: 960px;
  margin: 0 auto;
  text-align: center;
}
.contact-sidekick-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}
#sidekick-canvas-contact {
  width: clamp(120px, 26vw, 300px);
  height: clamp(120px, 26vw, 300px);
  mix-blend-mode: screen;
  cursor: pointer;
  animation: float 3.5s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-14px); }
}
.contact-heading {
  display: flex;
  justify-content: center;
  font-size: clamp(1.75rem, 8vw, 7.5rem);
  margin: 0 0 20px;
  color: var(--text);
  line-height: 0.88;
}
.contact-heading > span {
  letter-spacing: -0.04em;
  margin-right: -0.04em;
}
.contact-sub {
  font-size: clamp(1.1rem, 3.2vw, 2.4rem);
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 8px;
}
.contact-hint {
  font-size: clamp(0.92rem, 2.2vw, 1.8rem);
  color: var(--dim);
  margin-bottom: clamp(28px, 5vw, 44px);
  letter-spacing: 0.02em;
}
.contact-divider {
  width: 60px;
  height: 1px;
  background: var(--border);
  margin: 0 auto 44px;
}
.contact-email-block {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}
.contact-email {
  font-family: var(--font-display);
  font-size: clamp(0.95rem, 2vw, 1.2rem);
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
  border-bottom: 1px solid var(--dim);
  padding-bottom: 2px;
  transition: color 0.2s, border-color 0.2s;
}
.contact-email:hover {
  color: var(--accent);
  border-color: var(--accent);
}
.copy-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: all 0.2s;
}
.copy-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.copy-btn.copied {
  border-color: #6B82E0;
  color: #6B82E0;
}
.contact-divider-v {
  display: inline-block;
  width: 1px;
  height: 20px;
  background: var(--border);
  flex-shrink: 0;
}
.contact-linkedin {
  display: flex;
  align-items: center;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s, transform 0.2s;
}
.contact-linkedin:hover { color: var(--accent); transform: scale(1.15); }

@media (max-width: 768px) {
  .contact-divider-v { display: none; }
  .contact-linkedin  { justify-content: center; width: 100%; margin-top: 16px; }
}

/* ─── FOOTER ─────────────────────────────────────── */
#footer {
  border-top: 1px solid var(--border);
  padding: 56px 0 36px;
}
.footer-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 clamp(24px, 5vw, 64px);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.footer-logo-wrap {
  margin-bottom: 18px;
}
.footer-logo-img {
  height: clamp(96px, 18vw, 210px);
  width: auto;
  mix-blend-mode: screen;
}
.footer-tagline {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  color: var(--muted);
  letter-spacing: -0.01em;
  margin-bottom: 28px;
  min-height: 1.4em;
}
.footer-divider {
  width: calc(50% + 50px);
  height: 1px;
  background: var(--border);
  margin-bottom: 22px;
}
.footer-legal {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 22px;
}
.footer-legal-link {
  font-size: 0.72rem;
  color: var(--dim);
  letter-spacing: 0.04em;
  transition: color 0.2s;
}
.footer-legal-link:hover { color: var(--muted); }
.footer-copy {
  font-size: 0.7rem;
  color: var(--dim);
}

/* ─── GRAPHIC HOVER OVERLAY ─────────────────────── */
.graphic-img-wrap { position: relative; }
.graphic-hover-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0.85) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 14px 16px;
  gap: 4px;
  border-radius: 14px;
}
.graphic-hover-type {
  font-size: 0.6rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}
.graphic-hover-title {
  font-size: 0.88rem;
  font-weight: 400;
  color: #fff;
  line-height: 1.2;
}
.graphic-item:hover .graphic-hover-overlay { opacity: 1; }

/* ─── CARD CLICK HINT ────────────────────────────── */
.card-click-hint {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: radial-gradient(ellipse 55% 45% at center, rgba(0,0,0,0.96) 0%, rgba(0,0,0,0) 100%);
  opacity: 0;
  transition: opacity 0.28s ease;
  pointer-events: none;
  color: #fff;
}
.card-click-hint span {
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.85);
}
.browser-card[data-uxui-id]:hover .card-click-hint { opacity: 1; }
.browser-card[data-uxui-id] { cursor: pointer; }

/* ─── HOVER A vs B — comparativa ────────────────── */

/* OPCIÓN B — overlay oscuro + flecha ↗ Syne (respeta el browser chrome) */
.browser-card[data-uxui-id] .card-click-hint {
  background: rgba(0, 0, 0, 0.81);
  top: 41px;
  border-radius: 0 0 14px 14px;
}
.browser-card[data-uxui-id] .card-click-hint svg,
.browser-card[data-uxui-id] .card-click-hint span { display: none; }
.browser-card[data-uxui-id] .card-click-hint::after {
  content: '↗';
  font-family: 'Syne', sans-serif;
  font-size: 4rem;
  font-weight: 800;
  color: #fff;
  line-height: 1;
  letter-spacing: -0.02em;
}

/* ─── UXUI LIGHTBOX ──────────────────────────────── */
.uxui-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  pointer-events: none;
}
.uxui-lb-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  opacity: 0;
  transition: opacity 0.35s ease;
}
.uxui-lb-inner {
  position: relative;
  z-index: 1;
  width: min(1180px, 94vw);
  background: #0c0c0c;
  border: 1px solid #222;
  border-radius: 14px;
  opacity: 0;
  transform: scale(0.94) translateY(20px);
  transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.23, 1, 0.32, 1);
}
.uxui-lightbox.is-open { pointer-events: auto; }
.uxui-lightbox.is-open .uxui-lb-backdrop { opacity: 1; }
.uxui-lightbox.is-open .uxui-lb-inner { opacity: 1; transform: scale(1) translateY(0); }

.uxui-lb-browser {
  overflow: hidden;
  border-radius: 14px 14px 0 0;
}
.uxui-lb-chrome {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  background: #161616;
  border-bottom: 1px solid #222;
}
.uxui-lb-dots .dot {
  width: 13px;
  height: 13px;
  transition: opacity 0.15s;
}
#uxui-dot-close {
  cursor: pointer;
  position: relative;
}
#uxui-dot-close::after {
  content: '✕';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 9px;
  line-height: 1;
  color: rgba(0, 0, 0, 0.70);
  font-weight: 900;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s;
}
#uxui-dot-close:hover::after { opacity: 1; }
.uxui-lb-url {
  flex: 1;
  font-size: 0.72rem;
  color: var(--dim);
  letter-spacing: 0.02em;
  text-align: center;
}
.uxui-lb-video-wrap {
  aspect-ratio: 80 / 41;
  background: #050505;
  overflow: hidden;
  position: relative;
}
.uxui-lb-video-wrap video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  cursor: pointer;
}

/* Video controls */
.uxui-lb-controls {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 14px 12px;
  background: linear-gradient(transparent, rgba(0,0,0,0.72));
  opacity: 0;
  transition: opacity 0.25s ease;
}
.uxui-lb-video-wrap:hover .uxui-lb-controls { opacity: 1; }
.uxui-ctrl-btn {
  flex-shrink: 0;
  color: #fff;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.2);
  transition: border-color 0.15s, background 0.15s;
}
.uxui-ctrl-btn:hover { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.5); }
.uxui-ctrl-seek {
  flex: 1;
  -webkit-appearance: none;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(to right, #fff var(--pct, 0%), rgba(255,255,255,0.25) var(--pct, 0%));
  cursor: pointer;
  outline: none;
}
.uxui-ctrl-seek::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
}
.uxui-ctrl-time {
  font-size: 0.68rem;
  color: rgba(255,255,255,0.7);
  letter-spacing: 0.04em;
  flex-shrink: 0;
  min-width: 36px;
  text-align: right;
}
.uxui-lb-info {
  padding: 14px 22px 18px;
  border-top: 1px solid #1a1a1a;
}
.uxui-lb-category {
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 6px;
}
.uxui-lb-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}
.uxui-lb-meta {
  font-size: 0.78rem;
  color: var(--dim);
  margin-bottom: 10px;
  letter-spacing: 0.02em;
}
.uxui-lb-desc {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.65;
  margin-bottom: 12px;
}
.uxui-lb-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.78rem;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: opacity 0.2s;
}
.uxui-lb-link:hover { opacity: 0.72; }
.uxui-lb-link svg { flex-shrink: 0; }

/* ─── Fullscreen button ──────────────────────────── */
#uxui-ctrl-fullscreen { margin-left: 4px; }
.uxui-lb-video-wrap:-webkit-full-screen video,
.uxui-lb-video-wrap:fullscreen video { width: 100%; height: 100%; object-fit: contain; }

/* ─── Compare button ─────────────────────────────── */
.uxui-lb-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 14px;
}
.uxui-btn-compare {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--muted);
  background: transparent;
  border: 1px solid #333;
  border-radius: 14px;
  padding: 7px 13px;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}
.uxui-btn-compare:hover { color: #fff; border-color: #555; }
.uxui-btn-compare.is-active { color: var(--accent); border-color: var(--accent); }

/* ─── Compare split view ─────────────────────────── */
.uxui-compare-wrap {
  display: none;
  aspect-ratio: 80 / 41;
  background: #050505;
  position: relative;
  overflow: hidden;
}
.uxui-compare-wrap.is-active { display: flex; }
.uxui-compare-side {
  flex: 1;
  position: relative;
  overflow: hidden;
}
.uxui-compare-side video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  cursor: pointer;
}
.uxui-compare-label {
  position: absolute;
  top: 10px;
  left: 10px;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: none;
  color: #fff;
  background: rgba(0, 0, 0, 0.58);
  padding: 4px 11px;
  border-radius: 14px;
  z-index: 2;
  pointer-events: none;
}
.cmp-state-icon {
  display: inline-flex;
  align-items: center;
  margin-left: 5px;
  vertical-align: middle;
}
.uxui-compare-play-indicator {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.7);
  width: 52px;
  height: 52px;
  background: rgba(0,0,0,0.55);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.uxui-compare-play-indicator.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* ─── UXUI LIGHTBOX — Phone variant ─────────────── */
/*
  Ancho calculado desde la altura disponible para que el teléfono
  nunca se corte: (vh - padding - info - chrome) * ratio 9/19.5
  ≈ (100vh - 310px) * 0.46   →  respeta los márgenes en cualquier pantalla
*/
.uxui-lightbox--phone .uxui-lb-inner {
  width: min(340px, calc((100vh - 310px) * 0.46));
  background: transparent;
  border: none;
  box-shadow: none;
  display: block;
}
.uxui-lightbox--phone .uxui-lb-browser {
  border-radius: 44px 44px 0 0;
  border: 2px solid #2a2a2a;
  border-bottom: none;
  overflow: hidden;
  box-shadow: 0 0 0 1px #111, inset 0 0 0 1px #1e1e1e;
  display: block;
}
/* Chrome: dot rojo flotando fuera del marco, relativo al inner */
.uxui-lightbox--phone .uxui-lb-inner { position: relative; }
.uxui-lightbox--phone .uxui-lb-chrome {
  position: absolute;
  top: -14px;
  left: -14px;
  padding: 0;
  background: transparent;
  border: none;
  z-index: 10;
}
.uxui-lightbox--phone .uxui-lb-url { display: none; }
.uxui-lightbox--phone .uxui-lb-dots .dot-y,
.uxui-lightbox--phone .uxui-lb-dots .dot-g { display: none; }
.uxui-lightbox--phone .uxui-lb-dots .dot-r {
  width: 16px;
  height: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.6);
}
/* Notch: pseudo del browser-content */
.uxui-lightbox--phone .uxui-lb-video-wrap::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 36px;
  background: #000;
  z-index: 1;
  pointer-events: none;
}
.uxui-lightbox--phone .uxui-lb-video-wrap::after {
  content: '';
  position: absolute;
  top: 11px;
  left: 50%;
  transform: translateX(-50%);
  width: 72px;
  height: 11px;
  background: #111;
  border-radius: 20px;
  z-index: 2;
  pointer-events: none;
}
/* Video con ratio portrait real */
.uxui-lightbox--phone .uxui-lb-video-wrap {
  aspect-ratio: 9 / 19.5;
  background: #000;
}
/* Ocultar compare y fullscreen (no aplican a apps) */
.uxui-lightbox--phone .uxui-btn-compare,
.uxui-lightbox--phone #uxui-ctrl-fullscreen { display: none; }
/* Info: cierra el marco del phone por abajo */
.uxui-lightbox--phone .uxui-lb-info {
  background: #0c0c0c;
  border-radius: 0 0 44px 44px;
  border: 2px solid #2a2a2a;
  border-top: 1px solid #222;
}
@media (max-width: 480px) {
  .uxui-lightbox--phone .uxui-lb-inner {
    width: min(60vw, 240px);
  }
  .uxui-lightbox.uxui-lightbox--phone {
    overflow-y: auto;
    align-items: safe center;
    padding: 24px 16px;
  }
  .uxui-lightbox.uxui-lightbox--phone .uxui-lb-backdrop {
    position: fixed;
  }
}
.uxui-compare-vs {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  pointer-events: none;
}
.uxui-compare-vs::before,
.uxui-compare-vs::after {
  content: '';
  width: 2px;
  height: 75px;
  background: #888;
}
.uxui-compare-vs span {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--accent);
  background: #111;
  padding: 6px 11px;
  border: none;
  border-radius: 14px;
}

/* ─── LIGHTBOX ───────────────────────────────────── */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  pointer-events: none;
}
.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  opacity: 0;
  transition: opacity 0.35s ease;
}
.lightbox-inner {
  position: relative;
  z-index: 1;
  width: min(620px, 92vw);
  cursor: default;
  background: #0c0c0c;
  border: 1px solid #222;
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: scale(0.94) translateY(20px);
  transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.23, 1, 0.32, 1);
}
.lightbox.is-open { pointer-events: auto; }
.lightbox.is-open .lightbox-backdrop { opacity: 1; }
.lightbox.is-open .lightbox-inner { opacity: 1; transform: scale(1) translateY(0); }

/* Top header strip with close button */
.lb-header {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 8px 29px 10px;
  min-height: 78px;
}
.lightbox-close {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  flex-shrink: 0;
  margin-right: 10px;
  transition: border-color 0.2s, color 0.2s;
}
.lightbox-close:hover { border-color: var(--accent); color: var(--accent); }

/* Carousel */
.lightbox-carousel-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: transparent;
  overflow: hidden;
}
.lb-carousel {
  width: 100%;
  height: 100%;
  position: relative;
}
.lb-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}
.lb-slide--active {
  opacity: 1;
  pointer-events: none;
}
.lightbox.is-open .lb-slide--active {
  pointer-events: auto;
}
.lb-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 28 28'%3E%3Ccircle cx='14' cy='14' r='12' fill='none' stroke='%23D4A843' stroke-width='3.5'/%3E%3Cline x1='14' y1='7' x2='14' y2='21' stroke='%23D4A843' stroke-width='3.5' stroke-linecap='round'/%3E%3Cline x1='7' y1='14' x2='21' y2='14' stroke='%23D4A843' stroke-width='3.5' stroke-linecap='round'/%3E%3C/svg%3E") 14 14, zoom-in;
}
.lb-slide video {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  margin: auto;
  cursor: default;
}
.lb-thumb--video {
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lb-thumb-play {
  font-size: 14px;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0,0,0,0.8);
  pointer-events: none;
}
.lb-video--cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: cover;
  margin: 0;
}
.lb-video--muted::-webkit-media-controls-mute-button,
.lb-video--muted::-webkit-media-controls-volume-slider,
.lb-video--muted::-webkit-media-controls-volume-control-container,
#uxui-lb-video::-webkit-media-controls-mute-button,
#uxui-lb-video::-webkit-media-controls-volume-slider,
#uxui-lb-video::-webkit-media-controls-volume-control-container { display: none !important; }
.lb-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 100%;
}
.lb-placeholder span {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  color: #444;
}
.lb-placeholder em {
  font-style: normal;
  font-size: 0.75rem;
  color: #2a2a2a;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* Nav arrows — border only */
.lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: transparent;
  border: 1px solid rgba(12, 12, 12, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(12, 12, 12, 0.6);
  transition: border-color 0.2s, color 0.2s;
}
.lb-nav:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(12,12,12,0.08);
}
.lb-prev { left: 14px; }
.lb-next { right: 14px; }
.lightbox--video .lightbox-carousel-wrap {
  aspect-ratio: 16 / 9;
}
.lightbox--light-nav .lb-nav {
  border-color: rgba(255,255,255,0.45);
  color: rgba(255,255,255,0.85);
}
.lightbox--light-nav .lb-nav:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(0,0,0,0.15);
}

/* Thumbnail strip — half on image, half on card */
.lb-thumbs {
  position: relative;
  z-index: 10;
  display: flex;
  gap: 6px;
  padding: 6px 10px;
  background: rgba(12, 12, 12, 0.72);
  backdrop-filter: blur(8px);
  border-radius: 14px;
  flex-wrap: nowrap;
  overflow-x: auto;
  width: fit-content;
  margin: -56px auto 0;
}

/* Dots — below thumbs */
.lb-dots {
  display: flex;
  justify-content: center;
  gap: 7px;
  padding: 10px 0 4px;
}
.lb-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #333;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background 0.2s, transform 0.2s;
}
.lb-dot--active {
  background: var(--accent);
  transform: scale(1.35);
}
.lb-thumb {
  width: 54px;
  height: 40px;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  opacity: 0.45;
  flex-shrink: 0;
  transition: opacity 0.2s, border-color 0.2s;
  padding: 0;
  background: #1a1a1a;
}
.lb-thumb.is-active {
  border-color: var(--accent);
  opacity: 1;
}
.lb-thumb:hover { opacity: 0.8; }
.lb-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Info panel */
.lightbox-info {
  padding: 28px 22px 46px;
}
.lb-category {
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}

/* Zoom overlay */
#lb-zoom {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.96);
  align-items: center;
  justify-content: center;
  cursor: default;
}
#lb-zoom img {
  max-width: 92vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 14px;
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 28 28'%3E%3Ccircle cx='14' cy='14' r='12' fill='none' stroke='%23D4A843' stroke-width='3.5'/%3E%3Cline x1='7' y1='14' x2='21' y2='14' stroke='%23D4A843' stroke-width='3.5' stroke-linecap='round'/%3E%3C/svg%3E") 14 14, zoom-out;
  user-select: none;
}

.lb-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--text);
  letter-spacing: -0.02em;
  margin-bottom: 6px;
  line-height: 1.1;
}
.lb-meta-row {
  margin-bottom: 16px;
}
.lb-meta {
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}
.lb-type {
  display: none;
}
.lb-desc {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.7;
  max-width: 600px;
}

/* ─── MOBILE AVATAR BREAK ───────────────────────── */
.mobile-avatar-break { display: none; }
.mobile-avatar-video-clip {
  width: clamp(170px, 58vw, 230px);
  overflow: hidden;
  flex-shrink: 0;
  -webkit-mask-image:
    radial-gradient(ellipse 80% 85% at 50% 48%, black 40%, transparent 75%),
    radial-gradient(ellipse 40% 28% at 100% 100%, transparent 55%, black 100%);
  -webkit-mask-composite: source-in;
  mask-image:
    radial-gradient(ellipse 80% 85% at 50% 48%, black 40%, transparent 75%),
    radial-gradient(ellipse 40% 28% at 100% 100%, transparent 55%, black 100%);
  mask-composite: intersect;
}
.mobile-avatar-video {
  width: calc(clamp(170px, 58vw, 230px) * (300 / 230));
  height: auto;
  display: block;
  margin-left: calc(clamp(170px, 58vw, 230px) * (-10 / 230));
  mix-blend-mode: screen;
}

/* ─── ABOUT ──────────────────────────────────────── */
#sobre-mi .section-container {
  display: flex;
  align-items: center;
  gap: clamp(48px, 7vw, 100px);
}
.about-inner {
  flex: 0 0 auto;
  max-width: 560px;
}
.about-illustration {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}
.about-svg {
  width: 100%;
  max-width: 340px;
  height: auto;
  overflow: visible;
}
.about-heading {
  font-size: clamp(1.4rem, 5vw, 5rem) !important;
  font-weight: 800;
  line-height: 1.0;
  letter-spacing: -0.03em;
  margin-top: 1.2rem;
}
.about-bio-wrap {
  max-width: 560px;
  margin-top: 2.4rem;
}
.about-bio {
  font-size: clamp(0.95rem, 1.4vw, 1.05rem);
  color: var(--text);
  line-height: 1.75;
  margin-top: 1.4rem;
}
.about-bio:first-child { margin-top: 0; }
.about-bio--muted { color: var(--muted); }
.about-bio em { font-style: italic; color: var(--text); }

/* ─── ANIMATION BASE STATES (pre-GSAP) ───────────── */
.hero-text,
.section-header,
.browser-card,
.contact-text > *,
.contact-sidekick-wrap {
  will-change: transform, opacity;
}

/* ─── RESPONSIVE ─────────────────────────────────── */

/* ── Desktop (>1024px) — override explícito ──────── */
@media (min-width: 1025px) {
  .skill-card-years-hint { display: none !important; }
  .skill-card-back-name  { display: none !important; }
}

/* ── Tablet (≤1024px) ─────────────────────────── */
@media (max-width: 1024px) {
  /* Nav pill — más compacta en tablet/mobile */
  #site-nav { width: calc(100% - 32px); height: 62px; top: 14px; padding: 0 20px; }
  .nav-hamburger { display: flex; }
  .nav-links {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.97);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2.5rem;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 100;
    pointer-events: none;
  }
  .nav-links.is-open { transform: translateX(0); pointer-events: auto; }
  .nav-links a { font-size: 1.4rem; letter-spacing: 0.08em; color: var(--muted); }
  .nav-links a:hover { color: var(--text); }

  /* Hero — tablet font + wrap 3 líneas en todos los tablets */
  .hero-line { font-size: clamp(1.8rem, 7vw, 5rem); line-height: 1.5; text-align: center; }
  .hero-line-2 { flex-wrap: wrap; justify-content: center; row-gap: 0.2em; }
  .hero-seg-a { flex-basis: 100%; text-align: center; }

  /* Skills — [título | avatar] arriba, skills-col abajo
     display:contents en skills-layout disuelve el wrapper y deja
     que avatar-col y skills-content-col sean hijos directos del grid */
  #aptitudes .section-container {
    display: grid;
    grid-template-columns: 1fr 190px;
    grid-template-rows: auto auto;
    column-gap: clamp(24px, 4vw, 48px);
    row-gap: 40px;
  }
  #aptitudes .section-header {
    grid-column: 1;
    grid-row: 1;
    align-self: center;
    margin-bottom: 0;
  }
  #aptitudes .skills-layout   { display: contents; }
  #aptitudes .skills-avatar-col {
    grid-column: 2;
    grid-row: 1;
    margin: 0;
    margin-left: clamp(-30px, -2.5vw, -18px);
    margin-top: clamp(60px, 14vw, 140px);
    align-items: flex-start;
    justify-content: flex-start;
  }
  #aptitudes .skills-content-col {
    grid-column: 1 / -1;
    grid-row: 2;
  }
  .skills-avatar-wrap {
    max-width: 190px;
    margin: 0;
  }

  /* Título — ocultar <br> forzado para que fluya sin "y" suelta */
  #aptitudes .section-title br { display: none; }

  /* Avatar — ocultar hint e interacción en tablet */
  .skills-avatar-hint { display: none; }
  .skills-avatar-wrap { cursor: default; }

  /* Skill cards — desactivar hover CSS en cards no flipadas, usar click (.is-flipped) */
  .skill-card { cursor: pointer; height: 110px; }
  .skill-card:not(.is-flipped):hover .skill-card-back { opacity: 0; }
  .skill-card:not(.is-flipped):hover::after { clip-path: inset(0 0 100% 0 round 14px); }
  .skill-card.is-flipped .skill-card-years-hint { opacity: 0; }

  /* Años visibles en front + nombre en back */
  .skill-card-years-hint {
    display: block;
    position: absolute;
    bottom: 8px;
    right: 10px;
    font-size: 1rem;
    color: var(--accent);
    opacity: 0.8;
    line-height: 1;
  }
  .skill-card-back-name { display: block; }

  /* About */
  #sobre-mi .section-container { display: block; }
  .about-inner { max-width: 100%; }
  .about-bio { font-size: 0.97rem; }
  .about-illustration {
    display: flex;
    justify-content: center;
    margin-top: 48px;
  }
  .about-illustration .about-svg { max-width: 320px; }

  /* UX/UI */
  .uxui-grid { grid-template-columns: 1fr; max-width: 100%; }
  .browser-card--offset { margin-top: 0; }
  .uxui-lenis-dock { left: auto; right: 30px; }

  /* Graficos sidekick: tamaño fijo 150px en el rango base del tablet (769-1014).
     El override para 1015-1024 está más abajo en un media query separado. */
  .graficos-sidekick { width: 150px; }
  #graficos .filter-tabs { gap: 2px; }
  #graficos .filter-tab  { padding: 10px 12px 14px; }
}

/* ── Upper tablet (1015-1024px) — isolated override ───────
   Ajustes específicos del usuario para el sidekick a 1024. Aislado en una
   media query propia para que cambios aquí NO afecten al resto del tablet.
   Si se necesita ajustar algo a 1024, solo se tocan estos valores. */
@media (min-width: 1015px) and (max-width: 1024px) {
  .graficos-sidekick { width: 225px; }
}

/* ── Small tablet / large mobile (≤768px) ─────── */
@media (max-width: 768px) {
  /* Nav — hamburger and overlay inherited from ≤1024px; logo via clamp global */

  /* About — retrato más pequeño en mobile */
  .about-illustration .about-svg { max-width: 240px; }
  .about-illustration { margin-top: 36px; }

  /* Graficos sidekick: ocultar en 320-768. La animación GSAP está pensada
     para el layout desktop donde "Diseño &" y "Comunicación" caben en
     columnas anchas; en mobile el recorrido queda forzado. */
  .graficos-sidekick { display: none; }

  /* LENIS dock: ocultar en mobile — la animación requiere la doble columna o
     la single-column con cards altas. En viewports <768 el heading consume
     el espacio necesario y el ball aterriza en el texto. */
  .uxui-lenis-dock { display: none; }

  /* Hero — mobile: font más grande para iPad Mini, wrap heredado de ≤1024px */
  #hero .hero-content { padding: 0 clamp(16px, 4.5vw, 36px); margin-top: -80px; }
  .hero-line { font-size: clamp(2.5rem, 7.5vw, 5rem); line-height: 1.5; white-space: normal; }

  /* Skills — en móvil: avatar centrado arriba → título → skills */
  #aptitudes .section-container {
    display: grid;
    grid-template-columns: 1fr;
    row-gap: 28px;
  }
  #aptitudes .section-header  { grid-row: 2; margin-bottom: 0; }
  #aptitudes .skills-avatar-col {
    grid-column: 1;
    grid-row: 1;
    justify-self: center;
    align-items: center;
    margin: 0;
  }
  #aptitudes .skills-content-col { grid-row: 3; }

  /* Ocultar avatar dentro de aptitudes en mobile — aparece entre hero y la sección */
  #aptitudes .skills-avatar-col { display: none; }

  /* Mostrar avatar móvil entre hero y aptitudes */
  .mobile-avatar-break {
    display: flex;
    justify-content: center;
    padding: 24px 0 8px;
  }

  /* Ocultar vídeo en mobile — sin interacción */
  #skills-sidekick-video { display: none; }

  .skills-cards-grid { grid-template-columns: repeat(2, 1fr); }

  /* Graphics */
  .graphics-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }

  /* Filter tabs — en narrow el wrap a 2+ filas rompía el underline base.
     Cada tab ahora es una píldora autónoma: sin línea compartida = no rompe. */
  .filter-tabs {
    gap: 6px;
    border-bottom: none;
    padding-bottom: 4px;
    justify-content: flex-start;
  }
  .filter-tab {
    padding: 8px 14px;
    border: 1px solid var(--border);
    border-radius: 14px;
    margin-bottom: 0;
  }
  .filter-tab.active {
    border-color: var(--accent);
    background: var(--accent-dim);
  }

  /* Lightbox */
  .lightbox-inner { flex-direction: column; }
  .lightbox { padding: 24px 16px; }
  .uxui-lightbox { padding: 32px 16px; }
  .uxui-lb-link--preview { display: none; }

  /* UXUI compare mode: stack vertical en mobile (dos videos en horizontal
     quedan inutilizables <500px — cada uno ~150px ancho) */
  .uxui-compare-wrap.is-active {
    aspect-ratio: auto;
    flex-direction: column;
  }
  .uxui-compare-side { aspect-ratio: 80 / 41; }
  /* Las barras verticales del VS no tienen sentido en stacked — ocultar */
  .uxui-compare-vs::before,
  .uxui-compare-vs::after { display: none; }
}

/* ── Mobile (≤480px) ─────────────────────────── */
@media (max-width: 480px) {
  /* Nav — logo fluido global */

  /* Skills */
  .skills-cards-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .skills-avatar-wrap { max-width: 170px; }

  /* Graphics — pill tabs heredan de ≤768 */
  .graphics-grid { grid-template-columns: 1fr; }
  .filter-tab { padding: 7px 11px; font-size: 0.65rem; }
  .filter-tabs { gap: 4px; }

  /* Lightbox thumbs — debajo de la imagen, deslizables */
  .lb-thumbs {
    margin: 8px 0 0;
    width: 100%;
    border-radius: 8px;
    justify-content: center;
    -webkit-overflow-scrolling: touch;
  }
}

/* ── Touch devices — desactivar hover interacciones de ratón ── */
@media (hover: none) {
  /* Avatar hint solo con click, no hover */
  .skills-avatar-wrap .skills-avatar-hint { display: none; }
  /* Skill cards: cursor pointer para indicar que son clicables */
  .skill-card { cursor: pointer; height: 110px; }
  .skill-card-years-hint { display: block; }
  .skill-card-back-name  { display: block; }

  /* Browser cards: el hint de hover nunca se dispara en touch → mostrar
     un indicador discreto permanente en la esquina superior derecha */
  .browser-card[data-uxui-id] .card-click-hint { display: none; }
  .browser-card[data-uxui-id] .card-wrapper::after {
    content: '';
    position: absolute;
    top: 10px;
    right: 10px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background:
      rgba(0, 0, 0, 0.72)
      url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><polyline points='15 3 21 3 21 9'/><polyline points='9 21 3 21 3 15'/><line x1='21' y1='3' x2='14' y2='10'/><line x1='3' y1='21' x2='10' y2='14'/></svg>")
      no-repeat center center;
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    pointer-events: none;
    z-index: 5;
  }

  /* UXUI lightbox close dot: el punto visible es 13×13, insuficiente para tap.
     Expandir hit target a 44×44 vía ::before invisible, cumpliendo WCAG. */
  #uxui-dot-close::before {
    content: '';
    position: absolute;
    inset: -16px;
  }
}

/* ─── UTILITY ────────────────────────────────────── */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
}

/* ── Asset protection ──────────────────────────────────────── */
img {
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
}
video {
  user-select: none;
  -webkit-user-select: none;
}

.abt-p { opacity: 0; }
