/* =========
	 Variables
	 ========= */
:root {
  --bg: #0b0b10;
  --bg-2: #0f1117;
  --text: #e7e9ee;
  --muted: #aab0bd;
  --primary: #7c5cff;
  --primary-2: #00d4ff;
  --accent: #ff3d81;
  --ok: #31d0aa;
  --warning: #ffb020;

  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  --blur: 14px;

  --container: 1200px;
  --gutter: clamp(16px, 3vw, 32px);
}

/* Mobile performance: disable heavy decorative animations and filters on small screens
   Keep visuals on desktop but reduce paint cost on phones (<=700px). */
@media (max-width: 700px) {
  .layer--glow,
  .layer--glow::before,
  .layer--glow::after,
  .layer--flare,
  .portrait::after {
    animation: none !important;
    filter: none !important;
    will-change: auto !important;
    transform: none !important;
    opacity: 1 !important;
  }

  /* Stop marquee on mobile */
  .marquee__track { animation: none !important; }

  /* Reduce transitions on interactive elements to avoid extra painting */
  .card, .btn--magnetic { transition: none !important; }

  /* Remove expensive backdrop blur on mobile */
  .nav, .loader, .lightbox__backdrop { backdrop-filter: none !important; }

  /* Remove navbar overlay and ensure text remains readable on small screens */
  .nav::before { display: none !important; }
  .nav, .brand, .menu__link {
    text-shadow: none !important;
    -webkit-text-stroke: 0 !important;
    mix-blend-mode: normal !important;
    color: var(--text) !important;
  }

  /* Simpler portrait background on mobile */
  .portrait { background-image: url("/images/IMG2.jpg"); background-size: cover; background-position: center; }
}

/* Forzar tema oscuro: no modificar variables en modo claro. */

/* =======
	 Reset
	 ======= */
* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
  min-height: 100vh; /* asegurar que el fondo cubre todo el viewport */
}
/* Tema oscuro global y tipografía */
body {
  /* background removed to preserve the original main page look (restored per user request) */
  color: var(--text);
  font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial;
}
html {
  scroll-behavior: smooth;
  /* Tener en cuenta la altura de la nav fija al hacer scroll a anclas */
  scroll-padding-top: var(--nav-h, 64px);
}


img,
svg {
  display: block;
  max-width: 100%;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

/* =======
	 Loader
	 ======= */
.loader {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, var(--bg) 0%, #081018 100%);
  z-index: 9999;
  transition: opacity 0.6s ease, visibility 0.6s ease;
  backdrop-filter: blur(10px);
}
.loader.hidden {
  opacity: 0;
  visibility: hidden;
}
.loader__inner {
  display: grid;
  place-items: center;
  gap: 16px;
}
.loader__ring {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.15);
  border-top-color: var(--primary);
  border-right-color: var(--primary-2);
  animation: spin 1s linear infinite;
}
.loader__text {
  letter-spacing: 0.24em;
  text-transform: uppercase;
  font-size: 12px;
  color: var(--muted);
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ======
	 Nav
	 ====== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  backdrop-filter: blur(var(--blur));
}
.nav::before {
  content: "";
  position: absolute;
  inset: 0;
  backdrop-filter: blur(8px);
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0));
  pointer-events: none;
}
.nav__content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px var(--gutter);
}
.brand {
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--text);
  text-decoration: none;
}
.nav__toggle {
  display: none;
  background: transparent;
  border: 0;
  padding: 8px;
  margin-left: auto;
  cursor: pointer;
}
.nav__burger {
  width: 22px;
  height: 2px;
  background: var(--text);
  display: block;
  position: relative;
  border-radius: 2px;
}
.nav__burger::before,
.nav__burger::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
}
.nav__burger::before {
  top: -6px;
}
.nav__burger::after {
  top: 6px;
}
.menu {
  display: flex;
  align-items: center;
  gap: 12px;
}
.menu__link {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  opacity: 0.9;
  padding: 8px 12px;
  border-radius: 10px;
}

/* Aumentar ligeramente el tamaño de la tipografía en la nav (responsivo) */
.nav .menu__link,
.menu .menu__link {
  font-size: clamp(15px, 1.6vw, 18px);
}
.menu__link:hover {
  background: rgba(255, 255, 255, 0.06);
}

/* Asegurar que los links que también son botones primarios en la nav
   mantengan su fondo degradado al hacer hover/focus (no queden negros). */
.menu .menu__link.btn--primary,
.nav .menu__link.btn--primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #05060a;
  padding: 8px 12px;
}
.menu .menu__link.btn--primary:hover,
.nav .menu__link.btn--primary:hover,
.menu .menu__link.btn--primary:focus,
.nav .menu__link.btn--primary:focus {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #05060a;
  filter: brightness(1.05);
  box-shadow: 0 8px 18px rgba(124, 92, 255, 0.25);
}

/* Hint del disco */
.disc-hint[hidden] {
  display: none !important;
}
.disc-hint {
  position: absolute;
  z-index: 70;
  padding: 10px 12px;
  background: rgba(37, 139, 3, 0.96);
  color: black;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  gap: 10px;
}
.disc-hint__text {
  font-size: 12px;
   color: black;

}
.disc-hint__close {
  background: transparent;
  border: 0;
  color: var(--text);
  cursor: pointer;
  font-size: 14px;
  opacity: 0.8;
}
.disc-hint__close:hover {
  opacity: 1;
}
.disc-hint__arrow {
  position: absolute;
  width: 10px;
  height: 10px;
  background: rgba(10, 12, 18, 0.96);
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  transform: rotate(45deg);
}

/* Mobile nav */
@media (max-width: 860px) {
  .menu {
    position: fixed;
    inset: 64px 16px auto 16px;
    top: 60px;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    background: linear-gradient(
      180deg,
      rgba(20, 22, 30, 0.95),
      rgba(12, 14, 20, 0.95)
    );
    padding: 14px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transform-origin: top right;
    transform: scale(0.98) translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.22s ease, opacity 0.22s ease;
  }
  .menu.is-open {
    transform: scale(1) translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  .nav__toggle {
    display: inline-flex;
  }
  .btn.btn--primary.menu__link {
    width: 100%;
    justify-content: center;
  }
}

/* ======
	 Hero
	 ====== */
.main_seccion{
  margin-top: 5%;
  padding-inline: var(--gutter);
  /* allow content to grow naturally on small screens */
  min-height: auto;
}

/* Mobile-only override: aumentar espacio superior en pantallas pequeñas
   Nota: asumí mobile = max-width: 700px. Cambia el valor si prefieres otro. */
@media (max-width: 700px) {
  .main_seccion {
  margin-top: 14%;
  }
}

.sobreMi{
  padding-inline: var(--gutter);
  min-height: auto;
}
.Tecnologias_separacion{
  margin-top: 5%;
  padding-inline: var(--gutter);
  min-height: auto;
}
.proyectos_separacion{
  margin-top: 5%;
  padding-inline: var(--gutter);
  min-height: auto;
}
.Contacto_separacion{
  margin-top: 5%;
  padding-inline: var(--gutter);
}

.hero {
  /* Full-bleed: hacer que la sección cubra todo el ancho del viewport
     sin alterar el centrado interno (la .container sigue limitando el contenido). */
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  box-sizing: border-box;
  position: relative;
  min-height: calc(100vh - var(--nav-h, 64px));
  min-height: calc(100svh - var(--nav-h, 64px));
  display: grid;
  align-content: center;
}
.hero__bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: -1;
}
.layer {
  position: absolute;
  inset: -10%;
  will-change: transform, opacity;
}
.layer--glow {
  background: radial-gradient(
      800px 400px at 70% 20%,
      rgba(124, 92, 255, 0.35),
      transparent 60%
    ),
    radial-gradient(
      600px 300px at 30% 80%,
      rgba(255, 61, 129, 0.25),
      transparent 60%
    );
  filter: blur(20px);
}
.layer--grid {
  background-image: linear-gradient(
      rgba(255, 255, 255, 0.06) 1px,
      transparent 1px
    ),
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 40px 40px, 40px 40px;
  mask-image: radial-gradient(60% 60% at 50% 50%, #000 60%, transparent 80%);
}
.layer--flare {
  background: radial-gradient(
    500px 300px at 50% 50%,
    rgba(0, 212, 255, 0.25),
    transparent 60%
  );
  mix-blend-mode: screen;
  opacity: 0.7;
}

/* ======
   Subtle animations for radial gradients and decorative layers
   ====== */
@keyframes float-slow {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(12px, -10px, 0) scale(1.03); }
  100% { transform: translate3d(0, 0, 0) scale(1); }
}

@keyframes glow-pulse {
  0% { opacity: 0.65; filter: blur(20px) saturate(1); }
  50% { opacity: 0.9; filter: blur(24px) saturate(1.1); }
  100% { opacity: 0.65; filter: blur(20px) saturate(1); }
}

@keyframes flare-shift {
  0% { background-position: 40% 20%; transform: translate3d(0,0,0) scale(1); }
  50% { background-position: 28% 32%; transform: translate3d(-10px,10px,0) scale(1.04); }
  100% { background-position: 40% 20%; transform: translate3d(0,0,0) scale(1); }
}

/* ======
   Lightbox / Modal para vistas ampliadas de imágenes
   ====== */
.lightbox {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 1200;
}
.lightbox[hidden] { display: none; }
.lightbox__backdrop {
  position: absolute; inset: 0; background: rgba(0,0,0,0.7); backdrop-filter: blur(6px);
}
.lightbox__content {
  position: relative;
  max-width: min(1100px, 96vw);
  max-height: 92vh;
  width: 100%;
  padding: 18px;
  border-radius: 12px;
  box-shadow: 0 30px 60px rgba(0,0,0,0.6);
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 10px;
  z-index: 2;
  background: linear-gradient(180deg, rgba(10,12,18,0.92), rgba(6,8,12,0.85));
}
.lightbox__img {
  width: 100%;
  height: auto;
  max-height: calc(92vh - 120px);
  object-fit: contain;
  border-radius: 8px;
  margin: 0 auto;
}
.lightbox__close {
  position: absolute;
  right: 10px;
  top: 8px;
  background: transparent;
  color: var(--text);
  border: 0;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  padding: 6px 8px;
}
.lightbox__close:focus { outline: 2px solid var(--primary); border-radius: 6px; }
.lightbox__caption { color: var(--muted); font-size: 14px; text-align: center; padding-top: 6px; }

@media (max-width: 700px) {
  .lightbox__content { padding: 10px; max-height: 98vh; border-radius: 8px; }
  .lightbox__img { max-height: calc(98vh - 110px); }
  .lightbox__close { right: 8px; top: 6px; font-size: 26px; }
}

/* Apply gentle motion and breathing to decorative layers */
.layer--glow {
  animation: float-slow 20s ease-in-out infinite, glow-pulse 6s ease-in-out infinite;
  will-change: transform, opacity, filter;
}

.layer--flare {
  animation: flare-shift 18s ease-in-out infinite;
  will-change: background-position, transform, opacity;
}

/* Add a subtle animated radial overlay to portrait for depth */
.portrait {
  position: relative;
  overflow: hidden;
}
.portrait::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(600px 300px at 70% 20%, rgba(124, 92, 255, 0.06), transparent 60%);
  mix-blend-mode: screen;
  opacity: 0.6;
  animation: float-slow 40s ease-in-out infinite;
}

/* Project-specific title hierarchy
   Ensure the main project title (h1 in project gallery pages) is visually
   larger than section headings (h2). Scoped to #gallery to avoid global side-effects. */
/* Project-specific title hierarchy
   Scalable variables control project title and section title sizes.
   Adjust --pj-scale or the multipliers below to increase/decrease both.
*/
main#gallery {
  /* base font unit (rem) and a scale factor you can tweak */
  --pj-base: 1rem;
  --pj-scale: 1.05; /* ligero aumento global */
  /* multipliers (unitless) that determine relative sizes */
  --pj-h1-mult: 2.6; /* h1 = base * scale * h1-mult */
  --pj-h2-mult: 1.8; /* aumentado: h2 será claramente mayor */
  /* clamp bounds to avoid extremes */
  --pj-h1-min: 1.8rem;
  --pj-h1-max: 3.2rem;
  --pj-h2-min: 1.2rem;
  --pj-h2-max: 2.2rem;
}

main#gallery > h1 {
  font-size: clamp(var(--pj-h1-min), calc(var(--pj-base) * var(--pj-scale) * var(--pj-h1-mult)), var(--pj-h1-max));
  line-height: 1.05;
  font-weight: 800;
  margin: 0 0 0.6rem 0;
  color: var(--text);
}

/* Section headings inside project pages (scale relative to the same scale factor) */
main#gallery h2,
main#gallery .section-title,
.project-section h2 {
  font-size: clamp(var(--pj-h2-min), calc(var(--pj-base) * var(--pj-scale) * var(--pj-h2-mult)), var(--pj-h2-max));
  font-weight: 700;
  margin: 0.6rem 0 0.6rem 0;
  color: var(--text); /* color blanco según solicitud */
}

@media (max-width: 700px) {
  /* Increase heading sizes on small screens per user request */
  /* mobile scale slightly larger so section titles are more prominent */
  main#gallery { --pj-scale: 1.08; }
  /* h1 remains prominent but comfortably fits mobile */
  main#gallery > h1 { font-size: clamp(1.6rem, calc(var(--pj-base) * var(--pj-scale) * var(--pj-h1-mult)), 2.4rem); }
  /* make section headings larger on mobile */
  main#gallery h2, main#gallery .section-title, .project-section h2 {
    font-size: clamp(1.2rem, calc(var(--pj-base) * var(--pj-scale) * var(--pj-h2-mult)), 1.8rem);
  }
}

/* Soft blink for the purple and red/pink accents inside the glow layer.
   Implemented with ::before and ::after so each color can pulse independently. */
.layer--glow {
  /* keep absolute positioning from .layer so the glow fills the background area */
  position: absolute;
}
.layer--glow::before,
.layer--glow::after {
  content: "";
  position: absolute;
  inset: -10%; /* match parent's inset so the glow covers same area */
  pointer-events: none;
  border-radius: 50%;
  mix-blend-mode: screen;
  will-change: opacity, transform, filter;
  z-index: 0;
}
.layer--glow::before {
  /* purple accent */
  background: radial-gradient(800px 400px at 70% 20%, rgba(124, 92, 255, 0.45), transparent 60%);
  filter: blur(20px);
  opacity: 0.6;
  /* más visible pero suave: duración menor y ligero desfase */
  animation: blink-soft-purple 8s ease-in-out infinite;
  animation-delay: 0s;
}
.layer--glow::after {
  /* red/pink accent */
  background: radial-gradient(600px 300px at 30% 80%, rgba(255, 61, 129, 0.32), transparent 60%);
  filter: blur(18px);
  opacity: 0.55;
  animation: blink-soft-red 10s ease-in-out infinite;
  animation-delay: 1.2s; /* desincroniza respecto al morado */
}

@keyframes blink-soft-purple {
  0%   { opacity: 0.40; transform: translate3d(0,0,0) scale(1); }
  35%  { opacity: 0.95; transform: translate3d(6px,-4px,0) scale(1.02); }
  60%  { opacity: 0.65; transform: translate3d(-3px,3px,0) scale(1); }
  100% { opacity: 0.40; transform: translate3d(0,0,0) scale(1); }
}

@keyframes blink-soft-red {
  0%   { opacity: 0.35; transform: translate3d(0,0,0) scale(1); }
  30%  { opacity: 0.90; transform: translate3d(-6px,4px,0) scale(1.03); }
  65%  { opacity: 0.55; transform: translate3d(3px,-3px,0) scale(1); }
  100% { opacity: 0.35; transform: translate3d(0,0,0) scale(1); }
}

/* Respect user preference to reduce motion */
@media (prefers-reduced-motion: reduce) {
  .layer--glow::before,
  .layer--glow::after,
  .layer--glow,
  .layer--flare,
  .portrait::after {
    animation: none !important;
    transform: none !important;
    opacity: initial !important;
  }
}

.hero__content {
  padding-block: clamp(40px, 12vh, 24vh);
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.28em;
  color: var(--muted);
  font-size: 12px;
  margin: 0 0 10px;
}
.title {
  font-size: clamp(28px, 6vw, 64px);
  line-height: 1.05;
  margin: 0 0 12px;
  letter-spacing: 0.02em;
}
.title__accent {
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Texto principal de la sección de contacto: hacerlo más grande y legible */
.section--contact .contact__lead,
#contact .contact__lead {
  /* Aumentado ~20px para destacar el texto de contacto */
  font-size: clamp(18px, 4.2vw,  28px);
  line-height: 1.3;
  color: var(--muted);
  margin: 0 0 18px;
}

.cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.btn {
  --scale: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  padding: 12px 18px;
  text-decoration: none;
  font-weight: 600;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
  transform: translateZ(0) scale(var(--scale));
  will-change: transform;
}
.btn--primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #05060a;
  box-shadow: 0 10px 24px rgba(124, 92, 255, 0.35),
    0 6px 16px rgba(0, 212, 255, 0.25);
}
.btn--primary:hover {
  filter: brightness(1.05);
}
.btn--ghost {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.12);
}

.marquee {
  position: absolute;
  bottom: clamp(48px, 6vh, 88px);
  left: 0;
  right: 0;
  overflow: hidden;
  pointer-events: none;
}
.marquee__track {
  display: flex;
  gap: 40px;
  white-space: nowrap;
  animation: marquee 22s linear infinite;
  opacity: 0.7;
  font-weight: 600;
  color: var(--muted);
}
.marquee__track span {
  padding-inline: 40px;
}
@keyframes marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

/* =========
	 Sections
	 ========= */
.section {
  padding-block: clamp(64px, 14vh, 140px);
}
.section h1 {
  letter-spacing: 0.06em;
  margin-top: 5px;
}
.section h2 {
  /* Más legible: mínimo decente y escala con la pantalla */
  font-size: clamp(22px, 4.6vw, 56px);
  line-height: 1.05;
  margin: 5px 0 18px;
  letter-spacing: 0.04em; /* aumentar separación entre letras */
}

/* Ajuste específico: hacer más pequeño el título de la sección de contacto */
#contact-title {
  font-size: clamp(24px, 3.8vw, 30px);
  line-height: 1.08;
  margin: 0 0 12px;
}

.section--about .about__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  align-items: center;
}
@media (min-width: 900px) {
  .section--about .about__grid {
    grid-template-columns: 0.9fr 1.1fr;
    gap: 48px;
  }
}
.about__media {
  perspective: 1000px;
}
.portrait {
  height: clamp(340px, 52vh, 600px);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  background: radial-gradient(
      600px 300px at 70% 20%,
      /* rgba(124, 92, 255, 0.25), */
      transparent 60%
    ),
    url("/images/IMG2.jpg") center/cover no-repeat;
  border: 1px solid rgba(255, 255, 255, 0.12);
}
@media (max-width: 480px) {
  .portrait {
    height: clamp(280px, 48vh, 420px);
  }
}
.about__content p {
  color: var(--muted);
  /* Aumentar legibilidad del cuerpo de texto */
  font-size: clamp(16px, 1.8vw, 19px);
  line-height: 1.6;
  margin-bottom: 12px;
}

/* ==============================
   Projects card layout helpers
   Ensure the CTA button stays aligned at the bottom of each card
   Scoped to #projects to avoid global side-effects
   ============================== */
#projects .grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: clamp(12px, 2.4vw, 28px);
}

#projects .card {
  display: flex;
  flex-direction: column;
  min-height: 100%; /* help cards match heights inside the grid */
}

#projects .card__body {
  /* Keep the body as a flex item (child of .card) so it expands,
     but do NOT make it a flex container — leaving it as block lets
     .pill elements flow inline as previously. */
  flex: 1 1 auto; /* take available space so actions can be pushed down */
}

#projects .card__actions {
  margin-top: auto; /* push action area to the card bottom */
}

/* Small tweak: ensure images or media don't overflow when cards shrink */
#projects .card__media img,
#projects .card__media svg {
  max-height: 160px;
  width: auto;
  height: auto;
}

/* Ensure cards reserve space for the CTA and have a predictable media area
   so pills and buttons align vertically across cards */
#projects .card {
  position: relative;
  padding-bottom: 96px; /* space for the absolute CTA */
}

#projects .card__media {
  height: 160px; /* fixed media height for consistent layout */
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Place CTA consistently at the bottom of the card */
#projects .card__actions {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 18px;
  margin: 0; /* override earlier margin-top:auto */
  display: flex;
  justify-content: flex-start;
}

.quote {
  margin-top: 18px;
  padding-left: 14px;
  border-left: 3px solid rgba(124, 92, 255, 0.55);
}
.quote blockquote {
  margin: 0;
  font-style: italic;
  color: var(--text);
  font-size: clamp(15px, 1.6vw, 18px);
  line-height: 1.5;
}
.quote figcaption {
  margin-top: 8px;
  font-size: 13px;
  color: var(--muted);
}
.tags {
  display: flex;
  gap: 10px;
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
  flex-wrap: wrap;
}
.tags li {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 13px;
  color: var(--muted);
}
/* Stack ampliado */
.section--stack h2 {
  font-size: clamp(28px, 5vw, 48px);
}
.section--stack .subtitle {
  font-size: clamp(14px, 1.6vw, 18px);
}
.tech-grid {
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
@media (min-width: 700px) {
  .tech-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (min-width: 1000px) {
  .tech-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}
.tech {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: 14px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.06),
    rgba(255, 255, 255, 0.02)
  );
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: var(--shadow);
  transition: transform 0.18s ease, background 0.18s ease,
    border-color 0.18s ease;
}
.tech:hover {
  transform: translateY(-2px);
  border-color: rgba(124, 92, 255, 0.35);
}
.tech__icon {
  width: 48px;
  height: 48px;
  color: var(--primary-2);
  display: grid;
  place-items: center;
}
.tech__icon .iconify {
  width: 28px; /* tamaño del icono dentro del contenedor */
  height: 28px;
  color: var(--primary-2);
  display: inline-block;
}

/* Colores por tecnología */
.tech--react .tech__icon .iconify { color: #61dafb; }
.tech--html5 .tech__icon .iconify { color: #e34f26; }
.tech--css3 .tech__icon .iconify { color: #1572b6; }
.tech--javascript .tech__icon .iconify { color: #f7df1e; filter: drop-shadow(0 0 2px rgba(0,0,0,0.35)); }
.tech--nextjs .tech__icon .iconify { color: #000000; }
.tech--laravel .tech__icon .iconify { color: #ff2d20; }
.tech--phpmyadmin .tech__icon .iconify { color: #8892bf; }
.tech--oracle .tech__icon .iconify { color: #f80000; }
.tech--apis .tech__icon .iconify { color: #00bcd4; }
.tech--cplusplus .tech__icon .iconify { color: #00599c; }
.tech--java .tech__icon .iconify { color: #007396; }
.tech--php .tech__icon .iconify { color: #777bb4; }
.tech__label {
  font-weight: 600;
  color: var(--text);
}

/* ===== Player (disco + popover) ===== */
.about__heading {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 10px;
}
.player-disc {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 0;
  cursor: pointer;
  display: inline-grid;
  place-items: center;
  background: radial-gradient(
    circle at 50% 50%,
    rgba(255, 255, 255, 0.06),
    rgba(255, 255, 255, 0.02)
  );
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: var(--shadow);
}
.player-disc:focus-visible {
  outline: 2px solid var(--primary-2);
  outline-offset: 2px;
}
.player-disc__vinyl {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: radial-gradient(
      circle at 50% 50%,
      #111 0 30%,
      #222 31% 60%,
      #111 61% 100%
    ),
    radial-gradient(
      circle at 50% 50%,
      var(--accent) 0 18%,
      transparent 19% 100%
    );
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.08);
  animation: spin 6s linear infinite;
}

.player-popover[hidden] {
  display: none !important;
}
.player-popover {
  position: absolute;
  z-index: 60;
}
.player-card {
  position: relative;
  width: min(86vw, 320px);
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(180deg, var(--bg-2), rgba(0, 0, 0, 0.6));
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}
.player-card__media {
  height: 140px;
  background: url("https://images.unsplash.com/photo-1511379938547-c1f69419868d?q=80&w=1200&auto=format&fit=crop")
    center/cover no-repeat;
}
.player-card__info {
  padding: 12px 14px 4px;
}
.player-card__title {
  display: block;
  font-weight: 700;
}
.player-card__subtitle {
  display: block;
  color: var(--muted);
  font-size: 12px;
}
.player-card__controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 10px 12px;
}
.player-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text);
  padding: 8px 10px;
  border-radius: 10px;
  cursor: pointer;
}
.player-btn:hover {
  background: rgba(255, 255, 255, 0.12);
}
.player-btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}
.player-card__progress {
  height: 6px;
  background: rgba(255, 255, 255, 0.06);
  margin: 0 12px 14px;
  border-radius: 999px;
  overflow: hidden;
}
.player-card__bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
}
.player-card__close {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--text);
  width: 28px;
  height: 28px;
  border-radius: 8px;
  cursor: pointer;
}

/* =========
	 Grid cards
	 ========= */
.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(12px, 3vw, 18px);
}
@media (min-width: 720px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1100px) {
  .grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.card {
  position: relative;
  border-radius: var(--radius);
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.06),
    rgba(255, 255, 255, 0.02)
  );
  border: 1px solid rgba(255, 255, 255, 0.12);
  overflow: hidden;
  transform-style: preserve-3d;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: var(--shadow);
}
.card:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
.card__media {
  height: clamp(140px, 22vw, 180px);
  background: linear-gradient(
    135deg,
    rgba(124, 92, 255, 0.35),
    rgba(0, 212, 255, 0.25)
  );
}

/* Ensure project cards media area is neutral and centers icons/SVGs */
.card__media[role="img"] {
  background: transparent !important;
  display: flex;
  align-items: center;
  justify-content: center;
}
.card__media--alt {
  background: linear-gradient(
    135deg,
    rgba(255, 61, 129, 0.35),
    rgba(124, 92, 255, 0.25)
  );
}
.card__media--neo {
  background: linear-gradient(
    135deg,
    rgba(49, 208, 170, 0.35),
    rgba(0, 212, 255, 0.25)
  );
}
.card__body {
  padding: 16px;
  min-height: 220px; /* reserve vertical space so pills start consistently */
}
.card__body h3 {
  margin: 6px 0 8px;
  min-height: 48px; /* ensure title area has consistent height */
}
.card__body p {
  margin: 0 0 12px;
  color: var(--muted);
  /* Texto de tarjetas ligeramente más grande */
  font-size: clamp(14px, 1.4vw, 16px);
  min-height: 56px; /* keep description space consistent so pills align */
}
.pill {
  display: inline-block;
  margin-right: 6px;
  margin-bottom: 6px;
  padding: 6px 10px;
  font-size: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--muted);
}

/* ==============
	 Scroll reveal
	 ============== */
[data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* =======
	 Footer
	 ======= */
.footer {
	margin-top: 5%;
  padding: 18px 0 40px;
  color: var(--muted);
}
.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

/* Footer contacts */
.footer__left { flex: 1; }
.footer__center { flex: 1; display: flex; justify-content: center; }
.footer__right { flex: 1; display: flex; justify-content: flex-end; }
.footer__contacts { display: flex; gap: 12px; align-items: center; }
.contact-link { color: var(--text); display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 10px; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.04); transition: background 0.15s ease, transform 0.12s ease; }
.contact-link:hover { background: linear-gradient(90deg, var(--primary), var(--primary-2)); color: #06060a; transform: translateY(-3px); }
.contact-link svg { width: 22px; height: 22px; }

@media (max-width: 700px) {
  .footer__inner { flex-direction: column; align-items: center; gap: 12px; }
  .footer__left, .footer__center, .footer__right { justify-content: center; }
}

/* Footer icons — mobile overrides: slightly larger tappable targets */
@media (max-width: 700px) {
  .contact-link { width: 48px; height: 48px; border-radius: 12px; }
  .contact-link svg { width: 24px; height: 24px; }
  .footer__contacts { gap: 14px; }
}

/* Desktop tweaks: aumentar iconos un poco más en PC */
@media (min-width: 701px) {
  .contact-link { width: 52px; height: 52px; border-radius: 12px; }
  .contact-link svg { width: 26px; height: 26px; }
}
.back-to-top {
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.08);
  padding: 8px 12px;
  border-radius: 10px;
}

/* =======
	 Focus
	 ======= */
:focus-visible {
  outline: 2px solid var(--primary-2);
  outline-offset: 2px;
}

/* =================
	 Reduced motion
	 ================= */
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
  .layer,
  .card,
  .btn {
    transform: none !important;
  }
}

/* ------- Contact section responsive fixes ------- */
/* Ensure the contact area stays above decorative layers */
#contact { position: relative; z-index: 5; }
#contact .cta { position: relative; z-index: 6; display: flex; gap: 12px; align-items: center; }

@media (max-width: 900px) {
  /* reduce vertical padding so content doesn't overflow */
  .section--contact { padding-block: clamp(20px, 8vh, 40px); }
}

@media (max-width: 700px) {
  /* Stack CTAs and make them full width on small screens */
  #contact .cta { flex-direction: column; gap: 12px; align-items: stretch; }
  #contact .cta .btn { width: 100%; justify-content: center; }
  .section--contact { padding-block: clamp(16px, 6vh, 28px); }
  /* Keep CTA clearly visible above other page layers */
  .marquee { display: none; }
}

@media (max-width: 420px) {
  #contact .cta .btn { padding: 10px 14px; font-size: 15px; }
  .section--contact { padding-block: 18px; }
}

/* Small visual tweak to ensure CTA buttons cast subtle separation on dark background */
.cta .btn { box-shadow: 0 8px 20px rgba(2,6,23,0.45); }

/* Project-specific styles were moved to each project's CSS files */

/* ======
   Mobile: project gallery becomes horizontal scroll row
   ====== */
@media (max-width: 700px) {
  .project-gallery {
    display: flex !important;
    flex-direction: row;
    gap: 12px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 8px;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 12px;
  }

  .project-gallery .park-card {
    flex: 0 0 82%;
    width: 82%;
    max-width: 420px;
    scroll-snap-align: start;
    margin-inline: 6px;
    height: auto;
  }

  .project-gallery .park-card .park-card-img {
    height: min(52vh, 360px);
    max-height: 360px;
  }

  .project-gallery .park-card .park-card-content {
    position: relative;
    transform: none;
    padding: 14px 12px 16px;
  }

  .project-gallery {
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.12) transparent;
  }
  .project-gallery::-webkit-scrollbar { height: 8px; }
  .project-gallery::-webkit-scrollbar-track { background: transparent; }
  .project-gallery::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 999px; }
}

/* ======
   Geolocalización: mapa y controles mínimos
   ====== */
.project-geo__map-wrap { width: 100%; max-width: 100%; }
.project-geo #map { width: 100%; height: 360px; border-radius: 12px; }

@media (max-width: 700px) {
  .project-geo #map { height: min(48vh, 420px); }
}



 
