/* RESET BÁSICO Y GENERALES */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'M PLUS Rounded 1c', sans-serif;
  color: #333;
}

body {
  background: #f9faff;
  padding: 1rem;
  max-width: 900px;
  margin: auto;
}

/* ENCABEZADO */
header {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #1a73e8;
  margin-bottom: 1rem;
}

header img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #1a73e8;
}

header div {
  flex-grow: 1;
}

header h1 {
  font-size: 2.2rem;
  color: #1a73e8;
  margin-bottom: 0.3rem;
}

header p {
  font-size: 1rem;
  color: #555;
}




/* CUERPO PRINCIPAL */
main {
  background: white;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgb(26 115 232 / 0.15);
}

section {
  margin-bottom: 2rem;
}

h2 {
  color: #1a73e8;
  margin-bottom: 0.8rem;
  border-bottom: 2px solid #1a73e8;
  padding-bottom: 0.3rem;
  font-weight: 700;
  font-size: 1.5rem;
}

h3 {
  margin-top: 1rem;
  margin-bottom: 0.6rem;
  color: #444;
  font-weight: 600;
}

p, ul {
  line-height: 1.5;
  color: #444;
}

ul {
  list-style-type: none;
  padding-left: 0;
}

ul li {
  margin-bottom: 0.5rem;
}

ul li strong {
  color: #1a73e8;
}

/* SKILLS (chips e íconos) */
.skills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.chip {
  background-color: #e5f0ff;
  color: #1a73e8;
  padding: 0.5rem 1rem;
  border-radius: 30px;
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: 0 2px 5px rgba(26,115,232,0.2);
  user-select: none;
  transition: background-color 0.3s ease;
}

.chip:hover {
  background-color: #c6dafd;
  cursor: default;
}

.skills-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-bottom: 1rem;
  justify-content: center;
}

.skill-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1 1 70px;
  min-width: 60px;
  max-width: 90px;
  font-size: 0.85rem;
  text-align: center;
}

.skill-item i {
  font-size: 2rem;
}

/* LAYOUT PRINCIPAL CON SIDEBAR */
.main-layout {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

.sidebar {
  flex: 1 1 250px;
  background: #f1f6ff;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(26, 115, 232, 0.1);
  max-width: 300px;
  height: fit-content;
}

.content {
  flex: 3 1 500px;
}

/* DIPLOMAS EN GRILLA 2x2 RESPONSIVE */
.diplomas {
  margin-top: 2rem;
  text-align: center;
}

.diplomas h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: #444;
}

.diploma-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  justify-items: center;
}

.diploma-grid img {
  width: 100%;
  max-width: 300px;
  height: auto;
  border: 2px solid #ccc;
  border-radius: 8px;
  box-shadow: 2px 2px 8px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
}

.diploma-grid img:hover {
  transform: scale(1.05);
}




.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  padding-top: 60px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.9);
}

.modal-contenido {
  margin: auto;
  display: block;
  max-width: 80%;
  max-height: 80%;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.5);
  transition: transform 0.3s ease;
}

#caption {
  margin: 10px auto;
  text-align: center;
  color: #f1f1f1;
  font-size: 1rem;
}

.cerrar {
  position: absolute;
  top: 20px;
  right: 35px;
  color: #fff;
  font-size: 2rem;
  font-weight: bold;
  transition: 0.3s;
  cursor: pointer;
}

.cerrar:hover {
  color: #1a73e8;
}





/* ICONOS SOCIALES */
.icono-social {
  display: inline-block;
  transition: transform 0.3s ease;
  margin-left: 0.5rem;
}

.icono-social:hover {
  transform: scale(1.2);
}

/* FOOTER */
footer {
  margin-top: 2rem;
  text-align: center;
  color: #777;
  font-size: 0.9rem;
}

footer a {
  margin: 0 0.5rem;
  display: inline-block;
  vertical-align: middle;
}

footer img {
  width: 28px;
  filter: grayscale(60%);
  transition: filter 0.3s ease;
}

footer img:hover {
  filter: none;
}


#btnDescargar {
  display: inline-block;
  padding: 12px 24px;
  margin: 20px 0;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #1a73e8, #1a73e8);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#btnDescargar:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
  background: linear-gradient(135deg, #1a73e8, #1a73e8);
}

#btnDescargar:active {
  transform: scale(0.97);
}



.icono-footer {
  width: 30px;
  height: 30px;
  margin: 0 0.5rem;
  filter: grayscale(60%);
  transition: transform 0.3s ease, filter 0.3s ease;
}

.icono-footer:hover {
  transform: scale(1.2);
  filter: none;
}





/* RESPONSIVE HEADER */
@media (max-width: 600px) {
  header {
    flex-direction: column;
    text-align: center;
  }

  header img {
    margin-bottom: 0.7rem;
  }
}

@media (max-width: 768px) {
  .main-layout {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    max-width: 100%;
    margin-bottom: 2rem;
  }

  .skills-container {
    justify-content: center;
  }

  .skill-item {
    flex: 1 1 100px;
    max-width: 100px;
  }
}

@media (max-width: 480px) {
  .skill-item {
    flex: 1 1 80px;
    max-width: 80px;
    font-size: 0.75rem;
  }

  .skill-item i {
    font-size: 1.7rem;
  }
}
