:root {
  --fondo: #faf7f2;
  --superficie: #ffffff;
  --texto: #1f1d1a;
  --suave: #6b655c;
  --borde: #e8e2d8;
  --acento: #c2562b;
  --acento-suave: #fbe9df;
  --sombra: 0 1px 2px rgb(0 0 0 / .04), 0 8px 24px rgb(0 0 0 / .05);
}
@media (prefers-color-scheme: dark) {
  :root {
    --fondo: #161513;
    --superficie: #201e1b;
    --texto: #f2eee8;
    --suave: #a39c91;
    --borde: #34312c;
    --acento: #ec8a5f;
    --acento-suave: #3a2419;
    --sombra: none;
  }
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--fondo);
  color: var(--texto);
  font: 16px/1.55 Inter, system-ui, sans-serif;
}
.contenedor { max-width: 960px; margin: 0 auto; padding: 56px 16px 32px; }

.perfil { display: flex; gap: 24px; align-items: center; margin-bottom: 56px; }
.avatar {
  flex: none; width: 104px; height: 104px; border-radius: 50%;
  background: var(--acento-suave); color: var(--acento);
  display: grid; place-items: center; overflow: hidden;
  font: 600 36px Fraunces, Georgia, serif;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
h1 { font: 600 clamp(32px, 6vw, 48px)/1.1 Fraunces, Georgia, serif; margin: 0 0 8px; letter-spacing: -.01em; }
.frase { margin: 0 0 4px; font-size: 18px; }
.ciudad { margin: 0; color: var(--suave); font-size: 14px; }
.enlaces { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.enlaces a {
  color: var(--texto); text-decoration: none; font-size: 14px; font-weight: 500;
  padding: 6px 14px; border: 1px solid var(--borde); border-radius: 999px;
}
.enlaces a:hover { border-color: var(--acento); color: var(--acento); }

.barra { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 20px; }
h2 { font: 600 24px Fraunces, Georgia, serif; margin: 0; display: flex; align-items: center; gap: 10px; }
.contador {
  font: 600 13px Inter, sans-serif; color: var(--suave);
  background: var(--superficie); border: 1px solid var(--borde);
  padding: 2px 9px; border-radius: 999px;
}
.filtros { display: flex; flex-wrap: wrap; gap: 6px; }
.filtros button {
  font: 500 14px Inter, sans-serif; cursor: pointer;
  padding: 6px 14px; border-radius: 999px;
  border: 1px solid var(--borde); background: transparent; color: var(--suave);
}
.filtros button:hover { color: var(--texto); }
.filtros button[aria-pressed="true"] { background: var(--texto); color: var(--fondo); border-color: var(--texto); }

.rejilla {
  list-style: none; padding: 0; margin: 0;
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}
.tarjeta {
  background: var(--superficie); border: 1px solid var(--borde); border-radius: 16px;
  padding: 20px; box-shadow: var(--sombra);
  display: flex; flex-direction: column; gap: 6px;
  transition: transform .15s ease, border-color .15s ease;
}
.tarjeta:hover { transform: translateY(-2px); border-color: var(--acento); }
.emoji { font-size: 30px; line-height: 1; margin-bottom: 6px; }
.tarjeta h3 { margin: 0; font-size: 17px; font-weight: 600; }
.tarjeta p { margin: 0; color: var(--suave); font-size: 14px; flex: 1; }
.etiqueta {
  align-self: flex-start; margin-top: 8px;
  font-size: 12px; font-weight: 500; color: var(--acento);
  background: var(--acento-suave); padding: 2px 10px; border-radius: 999px;
}

.pie { margin-top: 64px; text-align: center; color: var(--suave); font-size: 13px; }

@media (max-width: 560px) {
  .contenedor { padding-top: 32px; }
  .perfil { flex-direction: column; align-items: flex-start; gap: 16px; margin-bottom: 40px; }
  .avatar { width: 80px; height: 80px; font-size: 28px; }
}
@media (prefers-reduced-motion: reduce) { .tarjeta { transition: none; } }
