:root {
  --bg: #050b16;
  --bg-soft: #0a1322;
  --text: #f5f7ff;
  --muted: #b6bfd4;
  --accent: #8d2b2b;
  --accent-soft: #b34a4a;
  --line: #1b2638;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: Inter, Arial, sans-serif;
  background: radial-gradient(circle at top, #0c1830 0%, var(--bg) 55%);
  color: var(--text);
}

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

.page {
  width: min(1050px, 92vw);
  margin: 0 auto;
  padding: 28px 0 40px;
}

.perfil {
  border-bottom: 1px solid var(--line);
  padding-bottom: 28px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.topbar h1 {
  font-size: clamp(1.35rem, 1.9vw, 1.8rem);
  margin: 0;
}

.btn-pill {
  border: 1px solid #2a3348;
  background: #111b31;
  color: var(--text);
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 600;
  cursor: pointer;
}

.btn-pill:hover {
  background: #172443;
}

.perfil-info {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 24px;
}

.avatar {
  width: 170px;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 4px solid #18283f;
  background: linear-gradient(145deg, #8f2e2e, #3f130f);
  display: grid;
  place-items: center;
  font-family: "Times New Roman", serif;
  font-size: 1.55rem;
  font-style: italic;
}

.datos h2 {
  margin: 0 0 8px;
}

.stat-row {
  margin: 0 0 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px 24px;
  color: var(--muted);
}

.bio {
  margin: 0;
  line-height: 1.45;
}

.quick-actions {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(5, minmax(110px, 1fr));
  gap: 12px;
}

.quick-actions a {
  text-decoration: none;
  color: var(--text);
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  min-height: 88px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 10px 8px;
  font-size: 0.95rem;
}

.quick-actions span {
  display: block;
  width: 45px;
  height: 45px;
  line-height: 45px;
  border-radius: 50%;
  font-size: 1.1rem;
  margin-bottom: 8px;
  background: linear-gradient(130deg, var(--accent), var(--accent-soft));
}

.grid-hero {
  margin-top: 30px;
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, 1fr);
}

.card {
  min-height: 320px;
  border-radius: 18px;
  border: 1px solid #1b2c46;
  overflow: hidden;
}

.card-large,
.card-mid {
  display: grid;
  align-content: end;
  padding: 22px;
}

.card-large {
  background: linear-gradient(145deg, rgba(141, 43, 43, 0.8), rgba(14, 27, 48, 0.88));
}

.card-mid {
  background: linear-gradient(180deg, #ad6236, #2f1d1a);
}

.card h3 {
  margin: 0 0 8px;
  font-size: 1.45rem;
}

.card p {
  margin: 0;
  color: #e4e8f4;
}

.card-photo {
  background: #070f1e;
}

.card-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.content-grid {
  margin-top: 24px;
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, 1fr);
}

.panel {
  background: #0b1424;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
}

.panel h3 {
  margin: 0 0 12px;
}

.panel p {
  margin: 5px 0;
  color: #e2e8f9;
}

.panel ul {
  margin: 0;
  padding-left: 18px;
}

.panel li {
  margin-bottom: 8px;
}

.cta-link {
  color: #ffd7d7;
  font-weight: 700;
}

@media (max-width: 900px) {
  .quick-actions {
    grid-template-columns: repeat(3, 1fr);
  }

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

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

@media (max-width: 640px) {
  .perfil-info {
    grid-template-columns: 1fr;
  }

  .avatar {
    width: 130px;
    margin: 0 auto;
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .quick-actions {
    grid-template-columns: repeat(2, 1fr);
  }
}
