:root {
  --container-w: 72rem;
}

/* Layout genérico */
.container {
  max-width: var(--container-w);
  margin-inline: auto;
  padding-inline: 1rem;
}

/* Header */
.header-bar {
  border-bottom: 1px solid var(--border-default);
  background: var(--bg-surface);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: .75rem;
}
.logo {
  font-family: var(--font-logo, inherit);
  font-size: 1.5rem;
  text-decoration: none;
  color: var(--text-color);
}
.header-actions {
  display: flex;
  gap: .5rem;
}

/* Enlaces y botones accesibles */
.link {
  color: var(--text-color);
  text-decoration: underline;
}
.btn-accessible {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  border: 1px solid var(--border-default);
  background: var(--bg-surface);
  color: var(--text-color);
  padding: .5rem .75rem;
  border-radius: .5rem;
  text-decoration: none;
}
.btn-accessible:hover {
  filter: brightness(1.02);
}

/* Utilidades tipográficas */
.muted { color: var(--text-label); }
.small { font-size: .875rem; }
.mt { margin-top: .5rem; }
.break { word-break: break-word; }
.block { display: block; }

/* CV wrapper y encabezado */
.cv-wrap {
  margin-block: 2rem;
}
.cv-header { margin-bottom: 2rem; }
.cv-header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem;
}
.cv-titlebox { min-width: 16rem; }
.cv-title {
  font-size: 1.875rem;
  font-weight: 600;
}
.avatar {
  width: 112px;
  height: 112px;
  border-radius: 9999px;
  object-fit: cover;
  border: 1px solid var(--border-default);
}

/* Grid principal estilo Europass */
.cv-grid {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 16px 28px;
}
.cv-row { display: contents; }
.cv-label {
  grid-column: 1;
  align-self: start;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--brand, #0a72ec);
  text-transform: uppercase;
  font-size: .78rem;
}
.cv-content { grid-column: 2; }

/* Items y listas */
.cv-item {
  border: 1px solid var(--border-default);
  border-radius: .75rem;
  padding: .75rem;
  break-inside: avoid;
  background: var(--bg-color);
}
.cv-item-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .5rem;
}
.cv-item-title { font-weight: 600; }
.cv-item-meta {
  font-size: .875rem;
  color: var(--text-label);
}
.cv-bullets {
  list-style: disc;
  padding-left: 1.25rem;
  color: var(--text-color);
  margin-top: .5rem;
}
.cv-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.cv-list li + li { margin-top: .35rem; }
.cv-sub {
  font-weight: 600;
  margin-bottom: .4rem;
}

/* Secciones auxiliares */
.actions {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}
.highlights { margin-top: 1rem; }

/* Pilas y grids locales */
.stack > * + * { margin-top: 1rem; }
.stack-tight > * + * { margin-top: .75rem; }
.skills-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.grid-tight {
  display: grid;
  gap: .75rem;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border-default);
  background: var(--bg-surface);
}
.footer-inner {
  padding: 1rem;
  text-align: center;
}

/* SR-only foco */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
.sr-only-focusable:focus {
  position: static !important;
  width: auto !important;
  height: auto !important;
  margin: 0 !important;
  overflow: visible !important;
  clip: auto !important;
  white-space: normal !important;
  padding: .5rem .75rem;
  border-radius: .5rem;
  background: var(--bg-surface);
  color: var(--text-color);
}

/* Responsivo */
@media (max-width: 960px) {
  .cv-grid {
    grid-template-columns: 1fr;
  }
  .cv-label {
    grid-column: 1;
    margin-top: .75rem;
  }
  .cv-content { grid-column: 1; }
  .skills-grid {
    grid-template-columns: 1fr;
  }
}

/* Impresión */
@media print {
  :root { color-scheme: light; }
  body { background: #fff; }
  .no-print { display: none !important; }
  a { color: #000; text-decoration: underline; }
  header[role="banner"], nav, .btn-theme-icon { display: none !important; }
  .cv-item { border-color: #e5e7eb; }
  .cv-bullets { page-break-inside: avoid; }
  .cv-item-head { page-break-after: auto; }
  h1, h2, h3 { orphans: 3; widows: 3; }
}
