/* =========================================================
   Base
   ========================================================= */

body {
  line-height: 1.6;
}

h1,
h2,
h3 {
  line-height: 1.15;
}

h2 {
  margin-top: 2rem;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid #e5e5e5;
}

h3 {
  margin-top: 1.2rem;
}

p {
  line-height: 1.65;
}

ul li {
  margin-bottom: 0.4rem;
}

/* =========================================================
   Cabecera de perfil
   ========================================================= */

.profile-header {
  width: 100%;
  margin-bottom: 1.5rem;
  border-collapse: collapse;
  table-layout: fixed;
}

.profile-header td {
  padding: 0;
  border: none !important;
  vertical-align: top;
}

.profile-photo {
  width: 180px;
}

.profile-sep {
  width: 28px;
}

.profile-text {
  width: auto;
}

.profile-img {
  display: block;
  width: 150px;
  height: auto;
  border-radius: 10px;
}

.profile-text h1 {
  margin-top: 0;
  margin-bottom: 0.8rem;
  font-size: 2.2rem;
  line-height: 1.1;
}

.profile-text p {
  margin: 0.5rem 0 0.8rem 0;
  line-height: 1.45;
}

/* =========================================================
   Logos e iconos
   ========================================================= */

.inline-logo {
  width: 22px;
  height: auto;
  margin-right: 6px;
  vertical-align: -3px;
}

.icon-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.6rem;
  color: inherit;
  text-decoration: none;
}

.icon-link img {
  width: 20px;
  height: 20px;
  opacity: 0.85;
}

.icon-link:hover {
  text-decoration: underline;
}

.icon-link:hover img {
  opacity: 1;
}

/* =========================================================
   Bloque ANECA / CV
   ========================================================= */

.cv-aneca,
.cv-aneca-box {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin: 0.8rem 0 1.2rem 0;
}

.cv-aneca-box {
  align-items: center;
}

.aneca-logo {
  width: 110px;
  height: auto;
  margin-right: 14px;
}

.cv-aneca span {
  line-height: 1.45;
}

.cv-aneca strong {
  font-weight: 600;
}

.cv-position {
  margin: 0.8rem 0 0.6rem 0;
  color: #c40000;
  font-weight: 600;
  line-height: 1.35;
}

.cv-position-text {
  color: #c40000;
  font-weight: 700;
}

.cv-black {
  color: #222;
  font-weight: 500;
}

.cv-divider {
  margin: 1.2rem 0;
  border: none;
  border-top: 1px solid #d9d9d9;
}

.cv-section-title {
  margin-bottom: 0.6rem;
  font-size: 1.05rem;
  font-weight: 700;
}

.cv-education p {
  margin-bottom: 0.6rem;
}

.cv-education img {
  margin-right: 6px;
  vertical-align: middle;
}

/* =========================================================
   Métricas CV
   ========================================================= */

.cv-metrics {
  margin: 1rem 0 1.2rem 0;
  border-collapse: collapse;
}

.cv-metrics td {
  padding-right: 40px;
  text-align: center;
}

.cv-metrics-block {
  display: flex;
  gap: 55px;
  margin: 1rem 0 1.2rem 0;
}

.cv-metric {
  text-align: center;
}

.cv-metric-number {
  color: #7a8a9a;
  font-size: 2rem;
}

.cv-metric-label {
  color: #c40000;
  font-size: 0.9rem;
  font-weight: 700;
}

.cv-metric-year {
  font-weight: 600;
}

/* =========================================================
   Publicaciones
   ========================================================= */

.pub-table {
  width: 100%;
  margin-bottom: 1.2rem;
  border-collapse: collapse;
}

.pub-table td {
  padding: 0;
  border: none !important;
  vertical-align: top;
}

.pub-logo {
  width: 90px;
  padding-right: 12px;
}

.pub-logo img {
  display: block;
  width: 80px;
  height: 80px;
  object-fit: contain;
}

/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 768px) {
  .profile-header,
  .profile-header tbody,
  .profile-header tr,
  .profile-header td {
    display: block;
    width: 100% !important;
  }

  .profile-sep {
    display: none;
  }

  .profile-img {
    width: 160px;
    border-radius: 10px;
  }

  .profile-text h1 {
    font-size: 1.8rem;
  }

  .cv-aneca,
  .cv-aneca-box,
  .cv-metrics-block {
    flex-direction: column;
    gap: 0.8rem;
  }

  .pub-logo {
    width: 60px;
    padding-right: 10px;
  }

  .pub-logo img {
    width: 50px;
    height: 50px;
  }
}

.urjc {
  color: #C4002F; /* rojo institucional aproximado URJC */
  font-weight: 700;
}

.dept {
  font-weight: 700;
}