:root {
  --bg: #08090c;
  --card: #14161c;
  --card-hover: #1b1e27;
  --line: #262a36;
  --text: #f5f6f8;
  --muted: #9aa0ae;
  --blue: #0a3cff;
  --blue-soft: #3d66ff;
  --radius: 18px;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100dvh;
  background:
    radial-gradient(900px 480px at 50% -120px, rgba(10, 60, 255, 0.34), transparent 70%),
    var(--bg);
  background-repeat: no-repeat;
  color: var(--text);
  font-family: "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}

.page {
  width: min(100%, 580px);
  margin: 0 auto;
  padding: 48px 16px calc(40px + env(safe-area-inset-bottom));
}

/* Perfil */
.profile { text-align: center; }

.avatar {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--blue), 0 12px 40px rgba(10, 60, 255, 0.45);
}

h1 {
  margin: 18px 0 8px;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.bio {
  margin: 0 auto;
  max-width: 34ch;
  color: #d5d8e0;
  font-size: 0.95rem;
  white-space: pre-line;
}

.socials {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 18px;
}

.socials a {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text);
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}

.socials a:hover { background: var(--blue); border-color: var(--blue); transform: translateY(-2px); }

svg.icon { width: 22px; height: 22px; }

/* Bloques */
.links {
  display: grid;
  gap: 12px;
  margin-top: 28px;
}

.card {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 68px;
  padding: 10px 44px 10px 10px;
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  color: inherit;
  font: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}

.card:hover { background: var(--card-hover); border-color: var(--blue-soft); transform: translateY(-2px); }
.card:active { transform: scale(0.99); }

.card::after {
  content: "";
  position: absolute;
  right: 20px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-top: 2px solid var(--muted);
  border-right: 2px solid var(--muted);
  transform: translateY(-50%) rotate(45deg);
}

.thumb {
  flex: none;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  object-fit: cover;
  background: #0d0f14;
  color: var(--text);
}

.card-text { min-width: 0; }

.card-title {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  text-wrap: balance;
}

.card-sub {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.82rem;
}

.stars { color: #ffc531; letter-spacing: 1px; }

/* Bloque destacado */
.card.featured {
  display: block;
  padding: 0;
  overflow: hidden;
  border-color: var(--blue);
  box-shadow: 0 10px 40px rgba(10, 60, 255, 0.22);
}

.card.featured::after { display: none; }

.card.featured img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1200 / 630;
  object-fit: cover;
}

.card.featured .card-text {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
}

.pill {
  flex: none;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 600;
}

/* Pie */
.footer {
  display: grid;
  justify-items: center;
  gap: 8px;
  margin-top: 36px;
  color: var(--muted);
  font-size: 0.8rem;
  text-align: center;
}

.linklike {
  border: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}

/* Formulario */
dialog {
  width: min(calc(100% - 24px), 460px);
  max-height: calc(100dvh - 24px);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--card);
  color: var(--text);
}

dialog::backdrop { background: rgba(0, 0, 0, 0.7); backdrop-filter: blur(4px); }

dialog form {
  display: grid;
  gap: 14px;
  padding: 24px 20px 20px;
  position: relative;
}

dialog h2 { margin: 0 32px 0 0; font-size: 1.15rem; }

.close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: #0d0f14;
  color: var(--text);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
}

label, legend { font-size: 0.88rem; font-weight: 600; }
label { display: block; }
label > input:not([type="radio"]) { margin-top: 6px; }
.opt { color: var(--muted); font-weight: 400; }

input:not([type="radio"]) {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #0d0f14;
  color: var(--text);
  font: inherit;
  font-size: 16px;
}

fieldset { margin: 0; padding: 0; border: 0; }
legend { padding: 0; margin-bottom: 8px; }

#contact-options { display: grid; gap: 8px; }

#contact-options label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-weight: 400;
  cursor: pointer;
}

#contact-options label:has(input:checked) { border-color: var(--blue-soft); background: rgba(10, 60, 255, 0.14); }
input[type="radio"] { accent-color: var(--blue-soft); margin: 0; }

.hint { margin: 0; color: var(--muted); font-size: 0.8rem; }
.error { margin: 0; color: #ff7a7a; font-size: 0.85rem; }

button.primary {
  padding: 13px 18px;
  border: 0;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

button.primary:hover { background: var(--blue-soft); }

/* Aviso de cookies */
.consent {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom));
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 580px;
  margin: 0 auto;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  font-size: 0.85rem;
}

.consent[hidden] { display: none; }
.consent p { margin: 0; flex: 1 1 200px; }
.consent div { display: flex; gap: 8px; }

.consent button {
  padding: 9px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: none;
  color: var(--text);
  font: inherit;
  cursor: pointer;
}

.consent button.primary { border-color: var(--blue); background: var(--blue); }

:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
