:root {
  --azul: #0d47a1;
  --celeste: #03a9f4;
  --blanco: #ffffff;
  --gris-100: #f5f7fb;
  --gris-200: #e9eef6;
  --gris-700: #344053;
}

* { box-sizing: border-box; }
html, body { height: 100%; }

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--gris-700);
  background: linear-gradient(180deg, #ffffff 0%, #f3f9ff 100%);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: linear-gradient(90deg, var(--azul), var(--celeste));
  color: var(--blanco);
  box-shadow: 0 2px 10px rgba(13, 71, 161, 0.25);
}
.brand-link { display: inline-flex; align-items: center; gap: .6rem; color: inherit; text-decoration: none; }
.brand-logo { width: 40px; height: 40px; object-fit: contain; border-radius: 8px; background: #fff2; padding: 4px; }
.brand-name { font-weight: 700; letter-spacing: .5px; font-size: 1.1rem; }

.menu-toggle {
  display: none;
  font-size: 1.25rem;
  padding: .4rem .6rem;
  color: var(--azul);
  background: var(--blanco);
  border: none;
  border-radius: 10px;
  cursor: pointer;
}
.menu-toggle:active { transform: scale(0.98); }

.layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: calc(100vh - 64px);
}

.sidebar {
  position: sticky;
  top: 64px;
  height: calc(100vh - 64px);
  overflow-y: auto;
  background: var(--blanco);
  border-right: 1px solid var(--gris-200);
  padding: 1rem;
}
.menu { list-style: none; margin: 0; padding: 0; display: grid; gap: .25rem; }
.menu a {
  display: block;
  padding: .6rem .75rem;
  border-radius: 10px;
  text-decoration: none;
  color: var(--gris-700);
  transition: background .2s, color .2s;
}
.menu a:hover {
  background: rgba(3, 169, 244, 0.12);
  color: var(--azul);
}
.sidebar-extra { margin-top: 1rem; padding-top: 1rem; border-top: 1px dashed var(--gris-200); font-size: .95rem; }
.sidebar h3 { margin: .25rem 0 .5rem; color: var(--azul); }

.content { padding: 1.25rem 1.25rem 3rem; }
.section { max-width: 960px; margin: 0 auto 2rem; background: var(--blanco); border: 1px solid var(--gris-200); border-radius: 16px; padding: 1.25rem; box-shadow: 0 6px 20px rgba(13,71,161,.06); }
.section h1, .section h2 { color: var(--azul); margin-top: 0; }

.bio { display: grid; grid-template-columns: 220px 1fr; gap: 1rem; align-items: start; }
.photo-frame {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 16px;
  background: linear-gradient(145deg, #eaf5ff, #ffffff);
  border: 2px dashed #b9def8;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.photo-frame.empty::after { content: "Tu fotografía"; color: #7aaed6; font-size: .95rem; }
.photo-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }

.bio-text p { line-height: 1.7; margin: 0 0 .9rem; }

.pill-list { list-style: none; padding: 0; margin: .5rem 0 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.pill-list li {
  padding: .4rem .65rem;
  border-radius: 999px;
  background: #e7f6ff;
  border: 1px solid #cdeefe;
  color: #0b5ea8;
  font-weight: 600;
  font-size: .9rem;
}

.contact { list-style: none; padding: 0; display: grid; gap: .4rem; }
.contact a { color: var(--azul); text-decoration: none; }
.contact a:hover { text-decoration: underline; }

@media (max-width: 960px) {
  .bio { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 64px; width: 280px; transform: translateX(-100%); transition: transform .25s ease; box-shadow: 12px 0 24px rgba(0,0,0,.12); }
  .sidebar.open { transform: translateX(0); }
  .menu-toggle { display: inline-block; }
  .content { padding: 1rem; }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  padding: .6rem .9rem;
  border-radius: 12px;
  border: 1px solid transparent;
  text-decoration: none;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: transform .06s ease, box-shadow .2s ease, background .2s ease, color .2s ease, border-color .2s ease;
}
.btn:active { transform: translateY(1px); }

.btn-compact { padding: .5rem .75rem; font-size: .95rem; }

.btn-celeste {
  background: var(--celeste);
  color: var(--blanco);
  box-shadow: 0 6px 14px rgba(3,169,244,.25);
}
.btn-celeste:hover { filter: brightness(0.96); }

.btn-outline {
  background: #e7f6ff;
  color: #0b5ea8;
  border-color: #cdeefe;
}
.btn-outline:hover { background: #dff1ff; }

.site-header { gap: .75rem; }
.site-header .btn { order: 2; }
.menu-toggle { order: 3; }
.brand { order: 1; }

@media (max-width: 480px) {
  .site-header { flex-wrap: wrap; }
  .site-header .btn-compact { width: 100%; order: 3; }
  .menu-toggle { order: 2; }
}
