:root {
  --bg-color: #ffffff;
  --text-color: #121212;
  --link-color: #0e53a0; /* Color rojizo para los enlaces simulando el sitio original */
  --max-width: 1200px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text-color);
  background-color: var(--bg-color);
  line-height: 1.6;
  margin: 0;
  padding: 0;
}

/* Navegación */
.nav-container {
  background-color: var(--text-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.7rem 1rem;
}

.logo img{
  width: 27%;
  max-width: 220px;
  /*padding-left: 1rem;*/
}

.logo a {
  font-weight: bold;
  font-size: 1.2rem;
  color: #111;
  text-decoration: none;
}
.nav-links {
  list-style: none;
  display: flex;
  gap: 1.2rem;
  padding: 0;
  margin: 0;
}
.nav-links a {
  text-decoration: none;
  color: #fff;
  font-weight: 500;
}
.nav-links a.active, .nav-links a:hover {
  color: #ffd700;
  font-weight: bold;
}

/* Banner Superior */
.main-banner {
  width: 100%;
  height: 130px; /* Ajusta la altura según tu diseño */
  overflow: hidden;
}
.main-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Estructura de Dos Columnas (Grid) */
.layout-container {
  display: grid;
  grid-template-columns: 230px 1fr; /* Columna fija a la izquierda, resto a la derecha */
  gap: 3rem;
  max-width: var(--max-width);
  margin: 0 7%;
  padding: 0 2rem;
}

/* Columna Izquierda: Perfil */
.sidebar {
  position: relative;
  top: -60px; /* Esto hace que la foto se superponga sutilmente al banner */
}
.profile-img {
  width: 70%;
  max-width: 220px;
  border: 4px solid #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  display: block;
  margin-bottom: 1rem;
}
.sidebar h2 {
  font-size: 1.4rem;
  margin: 0.5rem 0 0.2rem 0;
  color: #111;
  line-height: 1.2;
}
.sidebar .title {
  color: #666;
  margin: 0 0 1.5rem 0;
  font-size: 0.95rem;
}
.sidebar .email a {
  color: var(--link-color);
  text-decoration: underline;
}
.sidebar .department {
  font-size: 0.9rem;
  color: #444;
  margin-top: 1.5rem;
}

/* Enlaces de Redes Académicas */
.social-links {
  list-style: none;
  padding: 0;
  margin: 2rem 0 0 0;
}
.social-links li {
  margin-bottom: 0.6rem;
  display: flex;
  align-items: center;
  font-size: 0.95rem;
}
.social-links .icon {
  margin-right: 0.5rem;
  width: 20px;
  display: inline-block;
}
.social-links a {
  color: var(--link-color);
  text-decoration: none;
}
.social-links a:hover {
  text-decoration: underline;
}

/* Columna Derecha: Contenido */
.main-content {
  padding-top: 2rem;
}
.main-content h1 {
  font-size: 2.5rem;
  margin-top: 0;
  margin-bottom: 1rem;
}

.upcoming-text {
  font-style: italic;
  color:#5c5c5c;
}

/* Footer */
footer {
  text-align: center;
  padding: 2rem;
  font-size: 0.9rem;
  color: #718096;
  border-top: 1px solid #e2e8f0;
  margin-top: 4rem;
}

/* Diseño Adaptable (Responsive para Móviles) */
@media (max-width: 768px) {
  .layout-container {
    grid-template-columns: 1fr; /* Pasa a una sola columna en pantallas chicas */
    gap: 1rem;
  }
  .sidebar {
    top: 0; /* Eliminamos el desfase en móviles */
    text-align: center;
  }
  .profile-img {
    margin: 0 auto 1rem auto;
  }
  .social-links li {
    justify-content: center;
  }
  .nav-container {
    flex-direction: column;
    gap: 1rem;
  }
}

/* Estilos para el índice del Blog */
.blog-intro {
  color: #666;
  font-style: italic;
  margin-bottom: 2.5rem;
}
.post-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.post-item {
  margin-bottom: 2.5rem;
  border-bottom: 1px solid #f0f0f0;
  padding-bottom: 1.5rem;
}
.post-date {
  font-size: 0.85rem;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.post-title {
  font-size: 1.6rem;
  margin: 0.3rem 0 0.8rem 0;
}
.post-title a {
  color: #111;
  text-decoration: none;
}
.post-title a:hover {
  color: var(--link-color);
}
.post-excerpt {
  color: #444;
  margin: 0;
}

/* Estilos para el artículo individual */
.post-header {
  margin-bottom: 2rem;
}
.post-header time {
  color: #777;
}
.post-body h2 {
  font-size: 1.8rem;
  margin-top: 2rem;
}
.back-link {
  margin-top: 3rem;
  border-top: 1px solid #eee;
  padding-top: 1.5rem;
}
.back-link a {
  color: var(--link-color);
  text-decoration: none;
}

/* Propiedades de contacto*/
.contact-container {
  max-width: 700px;
  margin: 0 auto;
  font-family: system-ui, -apple-system, sans-serif;
  color: #222;
}

.contact-container h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  font-weight: 700;
}

.contact-description {
  font-size: 1.1rem;
  line-height: 1.5;
  margin-bottom: 2rem;
  color: #333;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-size: 1rem;
  margin-bottom: 0.5rem;
  color: #444;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
  background-color: #fff;
  transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #666;
}

.btn-submit {
  background-color: #fff;
  color: #333;
  border: 1px solid #ccc;
  padding: 0.8rem 1.2rem;
  font-size: 1rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-submit:hover {
  background-color: #f5f5f5;
  border-color: #999;
}

/* Sección del CV */
.cv-actions {
  margin-bottom: 1.5rem;
}

.btn-download {
  display: flex;
  justify-content: center;
  background-color: var(--link-color); /* Color oscuro elegante */
  color: #fff !important;
  padding: 0.6rem 1.2rem;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 4px;
  transition: background-color 0.2s ease;
}

.btn-download:hover {
  background-color: var(--link-color); /* Cambia al tono rojizo al pasar el mouse */
  text-decoration: none;
}

/* Contenedor del PDF */
.pdf-container {
  width: 100%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border-radius: 4px;
  overflow: hidden;
  background-color: #f7fafc;
  margin-top: 1rem;
}

/* Ajustes adaptables para móviles muy pequeños */
@media (max-width: 480px) {
  .pdf-container iframe {
    height: 500px; /* Reducimos la altura en pantallas muy chicas para que no rompa el scroll */
  }
}