:root {
  --primary: #234e70;
  --secondary: #3f72af;
  --accent: #4fa3d1;
  --background: #f7f9fc;
  --card: #ffffff;
  --text: #222;
  --muted: #666;
  --shadow: 0 4px 18px rgba(0,0,0,0.08);
  --radius: 16px;
  --header-bg: rgba(255,255,255,0.78);
  
  --body-bg:
    radial-gradient(
      ellipse at top,
      rgba(79,163,209,.10) 0%,
      rgba(79,163,209,.04) 25%,
      transparent 60%
    ),
    linear-gradient(
      to bottom,
      #fbfcfe,
      #f7f9fc
    );
  
}


* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", Roboto, Arial, sans-serif;

  background: var(--body-bg);
  color: var(--text);
  line-height: 1.7;
  transition: background .4s ease;
}

a{
    text-decoration: none;
    color: var(--secondary);
}

.container {
  width: min(1000px, 90%);
  margin: auto;
}

header {
  background: var(--header-bg);   
  backdrop-filter: blur(8px);            /* Desenfoque del fondo (Efecto Apple/Glassmorphism) */
  -webkit-backdrop-filter: blur(8px);    /* Soporte para navegadores Safari */
  box-shadow: var(--shadow);             /* Mantiene tu sombra actual */
  position: sticky;
  top: 0;
  z-index: 100;
}


nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
}


.menu-toggle{
    display:none;

    border:none;
    background:none;

    font-size:1.8rem;

    cursor:pointer;

    color:var(--primary);

    padding:.3rem;
}

.menu a {
  position: relative;
  text-decoration: none;
  color: var(--text);
  padding: 0.4rem 0;
  transition: color 0.2s ease;
  font-weight: 500;
}

.menu a:hover {
  color: var(--secondary);
}

/* Estilo para el enlace activo: cambia el color y añade un subrayado sutil animado */
.menu a.active-nav {
  color: var(--primary);
  font-weight: 600;
}

.menu a.active-nav::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--primary);
  border-radius: 2px;
}


.logo {
  font-size: 1.2rem;
  font-weight: bold;
  color: var(--primary);
}

.menu {
  display: flex;
  gap: 2rem;
   z-index:1000;
}


@keyframes fadeUp {

    from{

        opacity:0;
        transform:translateY(18px);

    }

    to{

        opacity:1;
        transform:translateY(0);

    }

}



.hero {
  text-align: center;
  padding: 5rem 0;
}

.photo {
  width: 240px;
  height: 240px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: var(--shadow);
  margin-bottom: 1.5rem;
  border:6px solid white;
   animation:fadeUp .7s ease forwards;
}

h1 {
  margin-bottom: 0.5rem;
  color: var(--primary);
}

.hero-layout{
display:flex;
gap:4rem;
align-items:center;
}



.hero-h1 {
  margin: 0;
  color: var(--primary);
  font-size: 2.6rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.hero-subtitle{

    margin:0.8rem 0 0;

    color:var(--text);

    font-size:1.2rem;

    font-weight:500;

    line-height:1.5;

}

.hero-tagline{

    margin:1rem auto 2rem;

    max-width:650px;

    color:var(--secondary);

    font-size:1.15rem;

    font-weight:500;

    line-height:1.6;

}


.summary {
    max-width:700px;
    margin:0 auto;
    color:var(--muted);
    font-size:1.05rem;
    line-height:1.8;
}

.summary p{

    margin:0 0 1.2rem;

}

.summary a{
  text-decoration: none;
  color: var(--secondary);
}


.socials {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin: 2rem 0;
  flex-wrap: wrap;
  opacity:0;
  animation:fadeUp .7s ease forwards;
  animation-delay:.45s;

}

.socials a {
  transition: transform 0.2s;
}

.socials a:hover {
  transform: translateY(-3px);
}

.socials img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.button {
  display: inline-block;
  padding: 0.9rem 1.4rem;
  background: var(--secondary);
  color: white;
  text-decoration: none;
  border-radius: 10px;
  opacity:0;
  animation:fadeUp .7s ease forwards;
  animation-delay:.35s;
}

.button:hover {
  background: var(--primary);
}

.section-title {
  margin-top: 3rem;
  margin-bottom: 2rem;
  color: var(--primary);
}


.interests-container {
  margin: 2rem 0;
  text-align: center; /* Se alinea al centro para mantener la sintonía del hero actual */
}

.interests-container h3 {
  font-size: 1.1rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}

.interests-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  max-width: 800px;
  margin: 0 auto;
}

.interest-tag {
  background: var(--card);
  color: var(--primary);
  border: 1px solid rgba(35, 78, 112, 0.15); /* Usa tu color --primary con opacidad bajita */
  padding: 0.5rem 1rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: all 0.2s ease;
}

.interest-tag:hover {
  background: var(--primary);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(35, 78, 112, 0.2);
}

.card {
  background: var(--card);
  padding: 1.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 1.5rem;
  
  /* Nuevas propiedades para la experiencia interactiva */
  border-left: 4px solid transparent;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), 
              box-shadow 0.25s ease, 
              border-left-color 0.25s ease;
}

/* Efecto al pasar el cursor sobre un artículo */
.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(35, 78, 112, 0.12); /* Sombra un poco más profunda con tu tono azul */
  border-left-color: var(--accent); /* Se ilumina el borde izquierdo en color azul claro */
}


.pub-title {
  font-weight: bold;
  color: var(--primary);
}




.pub-details {
  color: var(--muted);
  margin-top: 0.5rem;
}

.card-footer{
    /*
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-top:1rem;
    gap:1rem;
    
    */
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
  
}


.badges{
    display:flex;
    flex-wrap:wrap;
    gap:.6rem;
}

.metrics{
    display:flex;
    align-items:center;
    flex-shrink:0;
    margin-left: auto;
  
}

.metrics .altmetric-embed {
    transform: scale(0.80);
    transform-origin: center right;
}


.badge {
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  color: white;
  font-size: 0.85rem;
  text-decoration: none;
}

.data {
  background: #2a9d8f;
}

.divulgacion {
  background: #457b9d;
}

.preregistered {
  background: #e76f51;
}






.outreach-grid {
  display: grid;
  gap: 1.5rem;
}

.outreach-item {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.3rem;
}

.outreach-type {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  background: #eef4ff;
  border-radius: 999px;
  color: var(--secondary);
  font-size: 0.85rem;
  margin-bottom: 0.8rem;
}

.outreach-item a {
  color: var(--secondary);
  text-decoration: none;
}

.outreach-item a:hover {
  text-decoration: underline;
}

footer {
  text-align: center;
  padding: 3rem 0;
  color: var(--muted);
}

.email-contact {
  margin: 1.8rem 0;
  opacity:0;
  animation:fadeUp .7s ease forwards;
  animation-delay:.40s;
}

.email-contact a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--primary);
  font-size: 1.1rem;
  font-weight: 600;
  padding: 0.8rem 1.2rem;
  background: #eef4ff;
  border-radius: 999px;
  transition: all 0.2s;
}

.email-contact a:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  background: #ddeaff;
}


.postprint {
  background: #8e5ea2;
}

.year-heading {
  margin: 3rem 0 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #dde7f2;
  color: var(--primary);
  font-size: 1.8rem;
}

.pub-details a {
  color: inherit;
  text-decoration: none;
}

.pub-details a:hover {
  text-decoration: underline;
}

.card {
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}

.card:hover {
  transform: translateY(-2px);
}

.external-link {
    position: relative;
    display: inline-block;
    width: 20px;
    height: 20px;
    color: #000;
}

.external-link::before {
    content: "";
    position: absolute;
    left: 2px;
    bottom: 2px;
    width: 12px;
    height: 12px;
    border: 2px solid currentColor;
    border-top: none;
    border-right: none;
}

.external-link::after {
    content: "";
    position: absolute;
    right: 2px;
    top: 2px;
    width: 8px;
    height: 8px;
    border-top: 2px solid currentColor;
    border-right: 2px solid currentColor;
    transform: rotate(0deg);
}

.external-link {
    background:
        linear-gradient(
            135deg,
            transparent 47%,
            currentColor 47%,
            currentColor 53%,
            transparent 53%
        ) no-repeat;
    background-size: 9px 9px;
    background-position: 9px 2px;
}


/* seccion outreach */

/* ==========================
   OUTREACH PAGE
   ========================== */

.outreach-intro {
  color: var(--muted);
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.outreach-stats {
  color: var(--secondary);
  font-weight: 600;
  margin-bottom: 3rem;
}

.timeline {
  position: relative;
  padding-left: 3rem;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 18px;
  top: 0;
  bottom: 0;
  width: 3px;
  background: #dbe4ef;
}

.timeline-year {
  margin: 3rem 0 1.5rem;
  color: var(--primary);
  font-size: 1.8rem;
}

.timeline-item {
  position: relative;
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}

.timeline-item:hover {
  transform: translateY(-2px);
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -2.35rem;
  top: 1.7rem;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--secondary);
}

.timeline-item h3 {
  margin-top: 0.3rem;
  margin-bottom: 0.4rem;
  color: var(--primary);
}

.timeline-meta {
  color: var(--muted);
  margin-bottom: 0.8rem;
}

.timeline-item p {
  margin-top: 0.5rem;
}

/*.timeline-item a {
  display: inline-block;
  margin-top: 0.8rem;
  padding: 0.45rem 0.9rem;
  background: #f4f7fb;
  border-radius: 8px;
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

.timeline-item a:hover {
  background: #e8eef7;
}*/

.timeline-item a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 1rem;
  padding: 0.4rem 0.9rem;
  border-radius: 6px;
  background-color: rgba(35, 78, 112, 0.06); /* Fondo muy sutil */
  color: var(--primary);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.timeline-item a:hover {
  background-color: var(--primary);
  color: #ffffff; /* Invierte colores al hacer hover */
  transform: translateY(-1px);
}



.type-badge {
  display: inline-block;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
}

.talk {
  background: #e7f1ff;
  color: #276fbf;
}

.course {
  background: #f2eaff;
  color: #7a3db8;
}

.article {
  background: #e7f7ee;
  color: #2b8a57;
}

.tv {
  background: #ffeaea;
  color: #d64545;
}

.radio {
  background: #fff2e5;
  color: #d97706;
}

.media{
	background: #fff2e5;
	color: #d97706;
	
}

.intro {
  margin-bottom: 2.5rem;
  font-size: 1.05rem;
}

.card h2 {
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.card ul {
  padding-left: 1.25rem;
}

.card li {
  margin-bottom: .9rem;
}

/* chips para los enlaces */

.chip {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    background: #eef2ff;
    color: #3b5bdb;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background 0.2s ease, color 0.2s ease;
}

.chip:hover {
    background: #3b5bdb;
    color: white;
}

/* ===========================
   FILTROS
=========================== */

.timeline-filters{
    display:flex;
    flex-wrap:wrap;
    gap:.6rem;
    margin:1.5rem 0 2rem;
}

.filter-btn{

    border:none;
    border-radius:999px;
    padding:.45rem .95rem;
    font:inherit;
    cursor:pointer;

    background:#ececec;
    color:#555;

    transition:.2s;
}

.filter-btn:hover{
    transform:translateY(-1px);
}

/* Colores de cada categoría */

.filter-btn.media{
    background:#fde9d7;
    color:#8b4a00;
}

.filter-btn.talk{
    background:#dcefff;
    color:#0063b1;
}

.filter-btn.course{
    background:#eadfff;
    color:#5d2ca5;
}

.filter-btn.article{
    background:#dff6df;
    color:#207020;
}

/* Activo */

.filter-btn.active{
    box-shadow: none !important;
    color: #ffffff !important;
    font-weight: 600;
}

/* Colores de fondo específicos cuando el botón tiene la clase .active */
.filter-btn.media.active {
    background: #8b4a00; /* Usamos el color del texto original como fondo */
}

.filter-btn.talk.active {
    background: #0053a6; /* Un tono ligeramente más oscuro del azul original para mejorar contraste */
}

.filter-btn.course.active {
    background: #251240; /* Ajustado para legibilidad del blanco */
}

.filter-btn.article.active {
    background: #087f5b; /* Ajustado para legibilidad del blanco */
}

/* Para el botón "Todos" (all) si no tiene categoría específica */
.filter-btn[data-filter="all"].active {
    background: var(--primary);
}

.filter-btn .count{
    opacity:.75;
    font-weight:normal;
}


/* Móvil */

@media (max-width: 700px) {

  .timeline {
    padding-left: 2rem;
  }

  .timeline::before {
    left: 10px;
	background: linear-gradient(
    to bottom,
    #3f72af,
    #7aa6d8,
    #dbe4ef
  );
  }

  .timeline-item::before {
    left: -1.55rem;
  }
  
    h1{

        font-size:2rem;

    }

    .hero-subtitle{

        font-size:1.05rem;

    }

    .hero-tagline{

        font-size:1rem;

    }

}

/* ===========================
   SECCIÓN DOCENCIA (TEACHING)
=========================== */

.teaching-intro {
  color: var(--muted);
  font-size: 1.1rem;
  margin-bottom: 2.5rem;
}

.teaching-block {
  margin-bottom: 3rem;
}

.teaching-block h2 {
  font-size: 1.4rem;
  color: var(--primary);
  border-bottom: 2px solid rgba(35, 78, 112, 0.1);
  padding-bottom: 0.5rem;
  margin-bottom: 1.5rem;
}

.teaching-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.teaching-list li {
  display: flex;
  align-items: flex-start;
  gap: 1.2rem;
  background: var(--card);
  padding: 1rem 1.2rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
  border-left: 3px solid transparent;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

/* Efecto hover muy sutil */
.teaching-list li:hover {
  transform: translateX(4px);
  border-left-color: var(--accent);
}

/* Estilo para los Badges de Nivel */
.level-badge {
  font-size: 0.75rem;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  white-space: nowrap;
  margin-top: 0.2rem;
}

/* Colores personalizados según el tipo de docencia */
.level-badge.undergrad {
  background-color: #e3faf2;
  color: #0b7285;
}

.level-badge.grad {
  background-color: #edf2ff;
  color: #364fc7;
}

.level-badge.supervision {
  background-color: #f3f0ff;
  color: #6741d9;
}

.level-badge.gestion {
  background-color: #FFF5FB;
  color: #D9419F;
}

/* Detalles del curso */
.course-info h3 {
  margin: 0 0 0.2rem 0;
  font-size: 1.1rem;
  color: var(--text);
  font-weight: 600;
}

.course-meta {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}

/* Ajuste responsive para pantallas móviles muy pequeñas */
@media (max-width: 480px) {
  .teaching-list li {
    flex-direction: column;
    gap: 0.5rem;
  }
  .level-badge {
    align-self: flex-start;
  }
}

@media (max-width:768px){
  
  

    .hero-layout{
        flex-direction:column;
        gap:2rem;
    }
  
    .hero-left,
    .hero-right{
        width:100%;
        flex:none;
        animation:fadeUp .7s ease forwards;
        animation-delay:.15s;
        opacity:0;
    }
}

@media (max-width:768px){

    nav{
        position:relative;
    }
    .menu-toggle{
        display:block;
    }

/*    .menu{
        display:none;
        position:absolute;
        top:100%;
        right:0;
        width:220px;
        background:white;
        border-radius:12px;
        box-shadow:var(--shadow);
        padding:1rem;
        flex-direction:column;
        gap:1rem;
    }

    .menu.open{
        display:flex;
    }*/
  
  .menu a{

    display:block;

    width:100%;

    padding:.9rem 1.2rem;

    text-decoration:none;

    color:var(--text);

    transition:.2s;
  }
  
  .menu a:hover{

    background:#f4f7fb;

}
  
  .menu a.active-nav{

    background:#eef4ff;

}
  
  .menu{

    opacity:0;

    transform:translateY(-8px);

    transition:
        opacity .25s ease,
        transform .25s ease;

        display:none;

    position:absolute;

    top:calc(100% + .5rem);

    right:0;

    width:230px;

    background:var(--header-bg);

    border-radius:14px;

    box-shadow:0 12px 30px rgba(0,0,0,.12);

    overflow:hidden;

    padding:.4rem 0;

    flex-direction:column;

    gap:0;
    
}

.menu.open{

    opacity:1;

    transform:translateY(0);
  display:flex;

}

}

@media (prefers-reduced-motion: reduce){

    *{

        animation:none !important;

        transition:none !important;

    }

}