:root {
  --bg-deep: #0a0a0a;
  --bg-slate: #0f172a;
  --bg-mid: #1e293b;
  --bg-soft: #334155;
  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --cyan: #00d4ff;
  --cyan-deep: #0099cc;
  --blue: #3b82f6;
  --line: rgba(0, 212, 255, 0.18);
  --glass: rgba(15, 23, 42, 0.72);
  --radius: 16px;
  --font-display: "Orbitron", sans-serif;
  --font-body: "Exo 2", sans-serif;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg-deep);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ========== ATMOSPHERE ========== */
.atmosphere {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 50% at 15% 20%, rgba(0, 212, 255, 0.16), transparent 55%),
    radial-gradient(ellipse 50% 40% at 85% 75%, rgba(59, 130, 246, 0.12), transparent 50%),
    linear-gradient(135deg, #0f172a 0%, #1e293b 48%, #0a0a0a 100%);
}

.atmosphere__grid {
  position: absolute;
  inset: 0;
  opacity: 0.22;
  background-image:
    linear-gradient(rgba(0, 212, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 212, 255, 0.08) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at center, black 20%, transparent 75%);
}

.atmosphere__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  animation: floatOrb 12s ease-in-out infinite;
}

.atmosphere__orb--a {
  width: 280px;
  height: 280px;
  top: 8%;
  left: 8%;
  background: rgba(0, 212, 255, 0.2);
}

.atmosphere__orb--b {
  width: 220px;
  height: 220px;
  right: 10%;
  bottom: 12%;
  background: rgba(0, 153, 204, 0.18);
  animation-delay: -4s;
}

@keyframes floatOrb {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(18px, -24px) scale(1.08); }
}

/* ========== LAYOUT SHELL ========== */
.app {
  position: relative;
  z-index: 1;
  min-height: 100vh;
}

.view-desktop {
  display: none;
}

.view-mobile {
  display: block;
}

/* ========== MOBILE VIEW ========== */
.view-mobile {
  min-height: 100vh;
  padding: 2.25rem 1.15rem 6.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.profile {
  text-align: center;
  margin-bottom: 1.75rem;
  animation: riseIn 0.7s var(--ease) both;
}

.profile__avatar {
  width: 120px;
  margin: 0 auto 1.1rem;
}

.profile__avatar img {
  width: 100%;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 10px 24px rgba(0, 212, 255, 0.18));
}

.profile__name {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 4.5vw, 1.45rem);
  font-weight: 800;
  letter-spacing: 0.04em;
  background: linear-gradient(90deg, #fff, var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.profile__tagline {
  margin-top: 0.4rem;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--cyan);
}

.profile__bio {
  margin-top: 0.55rem;
  font-size: 0.88rem;
  color: var(--text-muted);
  max-width: 28ch;
  margin-inline: auto;
}

/* ========== FILTROS ========== */
.filters {
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1.35rem;
  animation: riseIn 0.65s var(--ease) 0.05s both;
}

.filter-chip {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(15, 23, 42, 0.55);
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  cursor: pointer;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: color 0.22s var(--ease), border-color 0.22s var(--ease),
    background 0.22s var(--ease), transform 0.22s var(--ease), box-shadow 0.22s var(--ease);
}

.filter-chip:hover {
  color: var(--text);
  border-color: rgba(0, 212, 255, 0.35);
  transform: translateY(-1px);
}

.filter-chip.is-active {
  color: #031018;
  background: linear-gradient(135deg, var(--cyan), var(--cyan-deep));
  border-color: transparent;
  box-shadow: 0 8px 22px rgba(0, 212, 255, 0.3);
}

.filter-chip:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

.filter-chip__icon {
  width: 15px;
  height: 15px;
  object-fit: contain;
}

.filter-chip.is-active .filter-chip__icon {
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.25));
}

.links {
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.link-card {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  width: 100%;
  padding: 0.95rem 1.05rem;
  border-radius: 14px;
  background: var(--glass);
  border: 1px solid var(--line);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
  transition: transform 0.25s var(--ease), border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
  animation: riseIn 0.65s var(--ease) both;
}

.link-card:nth-child(1) { animation-delay: 0.05s; }
.link-card:nth-child(2) { animation-delay: 0.1s; }
.link-card:nth-child(3) { animation-delay: 0.15s; }
.link-card:nth-child(4) { animation-delay: 0.2s; }
.link-card:nth-child(5) { animation-delay: 0.25s; }
.link-card:nth-child(6) { animation-delay: 0.3s; }
.link-card:nth-child(7) { animation-delay: 0.35s; }
.link-card:nth-child(8) { animation-delay: 0.4s; }

.link-card:hover,
.link-card:focus-visible {
  transform: translateY(-3px) scale(1.01);
  border-color: rgba(0, 212, 255, 0.45);
  box-shadow: 0 16px 40px rgba(0, 212, 255, 0.12), 0 12px 28px rgba(0, 0, 0, 0.35);
  outline: none;
}

.link-card__icon {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.22), rgba(0, 153, 204, 0.12));
  border: 1px solid rgba(0, 212, 255, 0.28);
  color: var(--cyan);
}

.link-card__icon svg {
  width: 20px;
  height: 20px;
}

.link-card__icon--img {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(148, 163, 184, 0.2);
}

.link-card__icon--img img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.link-card__text {
  flex: 1;
  min-width: 0;
  text-align: left;
}

.link-card__title {
  font-weight: 700;
  font-size: 0.98rem;
  line-height: 1.25;
}

.link-card__subtitle {
  margin-top: 0.15rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.link-card__arrow {
  flex-shrink: 0;
  color: var(--cyan);
  opacity: 0.7;
  transition: transform 0.25s var(--ease), opacity 0.25s var(--ease);
}

.link-card:hover .link-card__arrow {
  transform: translateX(3px);
  opacity: 1;
}

.empty-state {
  width: 100%;
  max-width: 420px;
  padding: 1.5rem;
  text-align: center;
  border: 1px dashed rgba(0, 212, 255, 0.35);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.5);
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-mini {
  margin-top: auto;
  padding-top: 2rem;
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.footer-mini a {
  color: var(--cyan);
  font-weight: 600;
}

@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========== DESKTOP VIEW ========== */
@media (min-width: 900px) {
  .view-mobile {
    display: none;
  }

  .view-desktop {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    min-height: 100vh;
    max-width: 1280px;
    margin: 0 auto;
    padding: 2.5rem 2rem;
    gap: 2rem;
    align-items: center;
  }

  .desk-brand {
    padding: 2rem 1.5rem 2rem 2rem;
    animation: riseIn 0.75s var(--ease) both;
  }

  .desk-brand__badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(0, 212, 255, 0.08);
    color: var(--cyan);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
  }

  .desk-brand__badge-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--cyan);
    box-shadow: 0 0 10px var(--cyan);
    animation: pulseDot 2s ease-in-out infinite;
  }

  @keyframes pulseDot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.55; transform: scale(0.85); }
  }

  .desk-brand__logo {
    width: min(280px, 70%);
    margin-bottom: 1.75rem;
    filter: drop-shadow(0 12px 30px rgba(0, 212, 255, 0.2));
  }

  .desk-brand__title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 3.2vw, 2.85rem);
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: 0.02em;
    margin-bottom: 0.85rem;
  }

  .desk-brand__title span {
    display: block;
    background: linear-gradient(90deg, var(--cyan), #7dd3fc);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }

  .desk-brand__text {
    max-width: 36ch;
    font-size: 1.05rem;
    color: var(--text-muted);
    line-height: 1.65;
    margin-bottom: 1.75rem;
  }

  .desk-brand__cta {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.9rem 1.35rem;
    border-radius: 12px;
    font-weight: 700;
    color: #031018;
    background: linear-gradient(135deg, var(--cyan), var(--cyan-deep));
    box-shadow: 0 12px 32px rgba(0, 212, 255, 0.28);
    transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
  }

  .desk-brand__cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 40px rgba(0, 212, 255, 0.35);
  }

  .desk-panel {
    position: relative;
    border-radius: 24px;
    padding: 1.75rem;
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid var(--line);
    backdrop-filter: blur(24px) saturate(170%);
    -webkit-backdrop-filter: blur(24px) saturate(170%);
    box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.06);
    animation: riseIn 0.85s var(--ease) 0.08s both;
    max-height: calc(100vh - 5rem);
    overflow: auto;
  }

  .desk-panel::-webkit-scrollbar {
    width: 8px;
  }

  .desk-panel::-webkit-scrollbar-thumb {
    background: rgba(0, 212, 255, 0.28);
    border-radius: 8px;
  }

  .desk-panel__head {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    margin-bottom: 1.25rem;
    padding-bottom: 1.1rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.15);
  }

  .desk-panel__avatar {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    padding: 6px;
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid var(--line);
  }

  .desk-panel__meta h2 {
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.03em;
  }

  .desk-panel__meta p {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.15rem;
  }

  .desk-panel .filters {
    max-width: none;
    justify-content: flex-start;
    margin-bottom: 1.1rem;
  }

  .desk-panel .links {
    max-width: none;
  }

  .desk-panel .link-card {
    padding: 1.05rem 1.15rem;
  }
}

/* ========== WHATSAPP WIDGET ========== */
.wa-widget {
  position: fixed;
  right: 1.15rem;
  bottom: 1.15rem;
  z-index: 1000;
  font-family: var(--font-body);
}

.wa-fab {
  position: relative;
  width: 60px;
  height: 60px;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: grid;
  place-items: center;
  background: #25d366;
  color: #fff;
  box-shadow: 0 10px 28px rgba(37, 211, 102, 0.4);
  transition: transform 0.25s var(--ease);
}

.wa-fab:hover {
  transform: scale(1.06);
}

.wa-fab svg {
  width: 30px;
  height: 30px;
}

.wa-fab__badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 22px;
  height: 22px;
  padding: 0 5px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  display: grid;
  place-items: center;
  border: 2px solid #fff;
}

.wa-panel {
  position: absolute;
  right: 0;
  bottom: calc(100% + 12px);
  width: min(360px, calc(100vw - 2rem));
  border-radius: 18px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.35);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.28s var(--ease), transform 0.28s var(--ease), visibility 0.28s;
  pointer-events: none;
}

.wa-panel.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.wa-panel__header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  background: linear-gradient(135deg, #075e54, #128c7e);
  color: #fff;
}

.wa-panel__header-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.15);
  flex-shrink: 0;
}

.wa-panel__header-icon svg {
  width: 18px;
  height: 18px;
}

.wa-panel__header-info {
  flex: 1;
  min-width: 0;
}

.wa-panel__header-info strong {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
}

.wa-panel__status {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.15rem;
  font-size: 0.75rem;
  opacity: 0.95;
}

.wa-panel__status::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 0 2px rgba(74, 222, 128, 0.25);
}

.wa-panel__close {
  border: none;
  background: transparent;
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
  opacity: 0.85;
}

.wa-panel__close:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.12);
}

.wa-panel__body {
  padding: 1rem;
  background:
    linear-gradient(rgba(236, 229, 221, 0.95), rgba(236, 229, 221, 0.95)),
    repeating-linear-gradient(
      -12deg,
      transparent,
      transparent 8px,
      rgba(0, 0, 0, 0.015) 8px,
      rgba(0, 0, 0, 0.015) 9px
    );
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  min-height: 150px;
}

.wa-bubble {
  align-self: flex-start;
  max-width: 88%;
  background: #fff;
  color: #1f2937;
  padding: 0.7rem 0.85rem 0.45rem;
  border-radius: 0 12px 12px 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  font-size: 0.88rem;
  line-height: 1.4;
}

.wa-bubble time {
  display: block;
  text-align: right;
  margin-top: 0.3rem;
  font-size: 0.68rem;
  color: #9ca3af;
}

.wa-panel__footer {
  padding: 0.85rem 1rem 1rem;
  background: #f8fafc;
  border-top: 1px solid #e5e7eb;
}

.wa-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: 999px;
  background: #25d366;
  color: #fff;
  font-weight: 700;
  font-size: 0.92rem;
  box-shadow: 0 8px 20px rgba(37, 211, 102, 0.3);
  transition: transform 0.2s var(--ease);
}

.wa-cta:hover {
  transform: translateY(-1px);
}

.wa-cta svg {
  width: 18px;
  height: 18px;
}

.wa-microcopy {
  margin-top: 0.55rem;
  text-align: center;
  font-size: 0.72rem;
  color: #6b7280;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
