:root {
  /* Colores para tema claro (estilo Dorsa Sadigh) */
  --bg-white:           #ffffff;
  --bg-sidebar-light:   #f8f9fa; /* Gris muy tenue para el menú */
  --text-dark:          #212529; /* Texto casi negro para lectura */
  --text-muted:         #6c757d; /* Gris para info secundaria */
  --link-green:         #2e7d32; /* Verde bosque profesional */
  --link-green-hover:   #1b5e20; /* Verde más oscuro al pasar el ratón */
  --border-light:       #dee2e6;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; }

body {
  /* Esta es la pila de fuentes que usa el código de referencia */
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--text-dark);
  background: var(--bg-white);
  min-height: 100vh;
}

/* Barra superior minimalista (opcional, Dorsa no la usa, pero da estructura) */
body::before {
  content: ""; display: block; height: 3px;
  background: var(--link-green);
}

#elementos {
  display: grid;
  grid-template-columns: 240px 1fr;
  grid-template-areas: "menu content" "menu footer";
  min-height: 100vh;
  max-width: 1100px; /* Centra el contenido como en sitios académicos */
  margin: 0 auto;
}

/* Menú lateral claro */
#menubar {
  grid-area: menu;
  background: var(--bg-sidebar-light);
  padding: 2rem 1.5rem;
  border-right: 1px solid var(--border-light);
}

#menubar-photo img {
  width: 100%;
  max-width: 180px;
  height: auto;
  border-radius: 4px;
  margin-bottom: 1.5rem;
}

#menubar table { width: 100%; border-collapse: collapse; }
#menubar td { display: block; padding: 0.4rem 0; }

#menubar a {
  color: var(--text-dark);
  font-size: 0.9rem;
  text-decoration: none;
  font-weight: 500;
}

#menubar a:hover { color: var(--link-green); }

/* Página activa en el menú */
.active-page {
  font-weight: bold !important;
  color: var(--link-green) !important;
  border-left: 3px solid var(--link-green);
  padding-left: 10px !important;
}

/* Área de contenido */
#content { 
  grid-area: content; 
  padding: 3rem 4rem; 
}

h1 { font-size: 2.2rem; margin-bottom: 0.5rem; color: #000; }
h2 { font-size: 1.4rem; margin-top: 2rem; margin-bottom: 1rem; border-bottom: 1px solid var(--border-light); padding-bottom: 5px; }

p { margin-bottom: 1.2rem; }

/* ENLACES VERDES */
a {
  color: var(--link-green);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  color: var(--link-green-hover);
}

/* Tablas de contacto */
.contact-table { width: 100%; margin-bottom: 2rem; }
.contact-table td { padding: 0.4rem 0; border-bottom: 1px solid #f0f0f0; }
.contact-table td:first-child { width: 120px; font-weight: bold; color: var(--text-muted); }

ul { padding-left: 1.2rem; margin-bottom: 1.5rem; }
li { margin-bottom: 0.5rem; }

#footer { 
  grid-area: footer; 
  padding: 2rem 4rem; 
  border-top: 1px solid var(--border-light);
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Ajuste móvil */
@media (max-width: 800px) {
  #elementos { grid-template-columns: 1fr; grid-template-areas: "menu" "content" "footer"; }
  #menubar { border-right: none; border-bottom: 1px solid var(--border-light); text-align: center; }
  .active-page { border-left: none; border-bottom: 2px solid var(--link-green); }
}
