:root {
  --bg: #070b12;
  --bg-soft: #0e1420;
  --fg: #eef3ff;
  --muted: #9eabc5;
  --brand: #6ea8ff;
  --brand-2: #8f6dff;
  --accent: #61e7d8;
  --pink: #ff6fb5;
  --glass: rgba(255, 255, 255, 0.08);
  --glass-strong: rgba(255, 255, 255, 0.12);
  --glass-border: rgba(255, 255, 255, 0.16);
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  --radius: 22px;
}

body.light {
  --bg: #eef3fb;
  --bg-soft: #f7faff;
  --fg: #0b1220;
  --muted: #50607e;
  --brand: #356cff;
  --brand-2: #7358ff;
  --accent: #00bea9;
  --pink: #ea4ca0;
  --glass: rgba(255, 255, 255, 0.58);
  --glass-strong: rgba(255, 255, 255, 0.72);
  --glass-border: rgba(14, 20, 32, 0.08);
  --shadow: 0 18px 45px rgba(44, 62, 100, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  color: var(--fg);
  background:
    radial-gradient(circle at top, rgba(110, 168, 255, 0.08), transparent 40%),
    linear-gradient(180deg, var(--bg), #05070c);
  line-height: 1.6;
  overflow-x: hidden;
}

body.light {
  background:
    radial-gradient(circle at top, rgba(53, 108, 255, 0.08), transparent 38%),
    linear-gradient(180deg, var(--bg), #e9effa);
}

body.modal-open {
  overflow: hidden;
}

.container {
  width: min(1180px, 92%);
  margin-inline: auto;
}

a {
  color: inherit;
}

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

/* Fondo */
.bg {
  position: fixed;
  inset: 0;
  z-index: -3;
  overflow: hidden;
}

.bg__gradient {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.7;
  animation: floatBlob 18s ease-in-out infinite alternate;
}

.bg__gradient--one {
  width: 520px;
  height: 520px;
  left: -120px;
  top: -100px;
  background: rgba(110, 168, 255, 0.24);
}

.bg__gradient--two {
  width: 520px;
  height: 520px;
  right: -120px;
  top: 80px;
  background: rgba(97, 231, 216, 0.18);
  animation-duration: 20s;
}

.bg__gradient--three {
  width: 460px;
  height: 460px;
  left: 30%;
  bottom: -180px;
  background: rgba(255, 111, 181, 0.14);
  animation-duration: 22s;
}

.bg__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.35), transparent 85%);
  opacity: 0.2;
}

body.light .bg__grid {
  background-image:
    linear-gradient(rgba(20, 20, 20, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20, 20, 20, 0.05) 1px, transparent 1px);
}

.bg__noise {
  position: absolute;
  inset: 0;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.4'/%3E%3C/svg%3E");
}

@keyframes floatBlob {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  100% {
    transform: translate3d(30px, -20px, 0) scale(1.08);
  }
}

/* Glass */
.glass {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
}

/* Header */
.site-header {
  position: fixed;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  width: min(1180px, 92%);
}

.site-header.glass {
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
}

.header__inner {
  min-height: 78px;
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: 0.2px;
}

.brand__logo {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: linear-gradient(135deg, var(--brand), var(--brand-2), var(--accent));
  box-shadow: 0 10px 24px rgba(110, 168, 255, 0.35);
}

.brand__name {
  font-size: 1rem;
}

.nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.nav__link {
  text-decoration: none;
  color: var(--fg);
  opacity: 0.88;
  padding: 10px 14px;
  border-radius: 14px;
  transition: 0.25s ease;
}

.nav__link:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-1px);
}

/* Toggle */
.btn-toggle {
  --w: 68px;
  --h: 36px;
  width: var(--w);
  height: var(--h);
  position: relative;
  border-radius: 999px;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.toggle-track {
  position: absolute;
  inset: 0;
}

.toggle-thumb {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  display: grid;
  place-items: center;
  transition: left 0.35s ease;
}

.icon-sun,
.icon-moon {
  width: 14px;
  height: 14px;
  fill: #fff;
  position: absolute;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.icon-sun {
  opacity: 0;
  transform: scale(0.7);
}

.icon-moon {
  opacity: 1;
  transform: scale(1);
}

body.light .toggle-thumb {
  left: 36px;
}

body.light .icon-sun {
  opacity: 1;
  transform: scale(1);
}

body.light .icon-moon {
  opacity: 0;
  transform: scale(0.6);
}

/* Main */
.site-main {
  margin-top: 140px;
}

/* Hero */
.hero {
  padding: 0 0 34px;
}

.hero__content {
  position: relative;
  overflow: hidden;
  padding: 40px;
}

.hero__content::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top right, rgba(110, 168, 255, 0.18), transparent 24%),
    radial-gradient(circle at bottom left, rgba(97, 231, 216, 0.14), transparent 22%);
  pointer-events: none;
}

.hero__badge {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  margin-bottom: 18px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--glass-border);
  color: var(--fg);
  font-size: 0.9rem;
  font-weight: 600;
}

.hero__title {
  position: relative;
  margin: 0;
  font-size: clamp(2.2rem, 4vw, 4.5rem);
  line-height: 1.03;
  letter-spacing: -0.03em;
  max-width: 900px;
}

.highlight {
  background: linear-gradient(135deg, var(--brand), var(--brand-2), var(--accent));
  -webkit-background-clip: text;
  color: transparent;
}

.hero__subtitle {
  position: relative;
  max-width: 760px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 1.04rem;
}

.hero__actions {
  position: relative;
  margin-top: 26px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero__stats {
  position: relative;
  margin-top: 34px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.stat {
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--glass-border);
}

.stat__number {
  display: block;
  font-size: 1.3rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.stat__label {
  color: var(--muted);
  font-size: 0.95rem;
}

/* Botones */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 14px;
  border: 1px solid var(--glass-border);
  color: var(--fg);
  text-decoration: none;
  font-weight: 700;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.18);
}

.btn:hover {
  transform: translateY(-2px);
}

.btn--primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-2), var(--accent));
  color: #fff;
  border: none;
}

.btn--primary:hover {
  box-shadow: 0 16px 36px rgba(110, 168, 255, 0.34);
}

.btn--ghost {
  background: rgba(255, 255, 255, 0.06);
}

.btn--sm {
  min-height: 40px;
  padding: 0 14px;
  font-size: 0.92rem;
  border-radius: 12px;
}

/* Secciones */
.section {
  padding: 54px 0;
}

.section-head {
  margin-bottom: 24px;
}

.section-kicker {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}

.section__title {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
}

.section__text {
  margin: 8px 0 0;
  color: var(--muted);
}

/* Cards */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 20px;
}

.card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  cursor: pointer;
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}

.card:hover {
  transform: translateY(-10px);
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.35);
  border-color: rgba(255, 255, 255, 0.24);
}

.card__shine {
  position: absolute;
  inset: -120%;
  background: linear-gradient(120deg, transparent 20%, rgba(255, 255, 255, 0.10) 40%, transparent 60%);
  transform: rotate(12deg);
  transition: transform 0.8s ease;
  pointer-events: none;
}

.card:hover .card__shine {
  transform: translateX(38%) rotate(12deg);
}

.card__media {
  position: relative;
  height: 190px;
  overflow: hidden;
  border-bottom: 1px solid var(--glass-border);
  background: linear-gradient(135deg, rgba(110, 168, 255, 0.22), rgba(97, 231, 216, 0.18));
}

.card__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.18), transparent 45%);
}

.card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.card:hover .card__media img {
  transform: scale(1.08);
}

.card__body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.card__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card__pill {
  display: inline-flex;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--glass-border);
}

.card__title {
  margin: 0;
  font-size: 1.18rem;
}

.card__text {
  margin: 0;
  color: var(--muted);
  min-height: 48px;
}

.tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tags li {
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--glass-border);
  font-size: 0.78rem;
  color: var(--fg);
}

.card__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: auto;
  position: relative;
  z-index: 2;
}

/* About / Contact */
.about,
.contact {
  padding: 24px;
  font-size: 1.02rem;
}

.about p,
.contact p {
  margin: 0;
  color: var(--fg);
}

.contact a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 700;
}

/* Footer */
.site-footer {
  padding: 40px 0 70px;
  text-align: center;
  color: var(--muted);
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(5, 8, 14, 0.72);
  backdrop-filter: blur(8px);
  z-index: 9999;
}

.modal.show {
  display: flex;
  animation: fadeIn 0.28s ease;
}

.modal-content {
  position: relative;
  width: min(1100px, 96%);
  max-height: 92vh;
  overflow-y: auto;
  padding: 30px;
  transform: translateY(24px) scale(0.96);
  animation: modalPop 0.35s ease forwards;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 42px;
  height: 42px;
  border: 1px solid var(--glass-border);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: var(--fg);
  font-size: 20px;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.modal-close:hover {
  transform: rotate(90deg) scale(1.06);
  background: rgba(255, 255, 255, 0.12);
}

#modalTitle {
  margin: 4px 44px 10px 0;
  font-size: 2rem;
}

#modalDesc {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
}

.modal-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.modal-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 18px;
  align-items: start;
}

.modal-gallery img {
  width: 100%;
  min-height: 220px;
  max-height: 420px;
  object-fit: cover;
  border-radius: 18px;
  border: 1px solid var(--glass-border);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.22);
  transition: transform 0.35s ease, box-shadow 0.35s ease, filter 0.35s ease;
  cursor: pointer;
}

.modal-gallery img:hover {
  transform: scale(1.03);
  box-shadow: 0 20px 42px rgba(0, 0, 0, 0.3);
  filter: brightness(1.04);
}

/* Scroll modal */
.modal-content::-webkit-scrollbar {
  width: 10px;
}

.modal-content::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 999px;
}

.modal-content::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 999px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.28);
}

/* Visor de imágenes */
.image-viewer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(6px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.image-viewer.active {
  opacity: 1;
  pointer-events: auto;
}

.image-viewer img {
  max-width: 90%;
  max-height: 85vh;
  border-radius: 16px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
  animation: zoomViewer 0.3s ease;
}

@keyframes zoomViewer {
  from {
    transform: scale(0.85);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.viewer-close {
  position: absolute;
  top: 25px;
  right: 35px;
  font-size: 38px;
  color: white;
  cursor: pointer;
  transition: 0.25s;
}

.viewer-close:hover {
  transform: scale(1.2);
  color: #60a5fa;
}

/* Animaciones */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes modalPop {
  to {
    transform: translateY(0) scale(1);
  }
}

/* Responsive */
@media (max-width: 980px) {
  .site-main {
    margin-top: 165px;
  }

  .header__inner {
    flex-wrap: wrap;
    justify-content: center;
    padding: 12px 16px;
  }

  .nav {
    justify-content: center;
  }

  .hero {
    padding-top: 0;
  }

  .hero__stats {
    grid-template-columns: 1fr;
  }

  .modal-content {
    width: 95%;
    padding: 22px;
  }

  .modal-gallery {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .modal-gallery img {
    min-height: 180px;
    max-height: 340px;
  }
}

@media (max-width: 640px) {
  .site-main {
    margin-top: 180px;
  }

  .site-header {
    top: 10px;
  }

  .hero {
    padding-top: 0;
  }

  .hero__content {
    padding: 24px;
  }

  .hero__title {
    font-size: 2.2rem;
  }

  .card__media {
    height: 170px;
  }

  .modal-content {
    padding: 18px;
  }

  #modalTitle {
    font-size: 1.5rem;
  }

  #modalDesc {
    font-size: 0.95rem;
  }

  .modal-gallery img {
    min-height: 160px;
    max-height: 280px;
    border-radius: 14px;
  }
}