body {
  font-family: Arial, sans-serif;
  margin: 0;
  background: #fafafa;
  color: #333;
}



.perfil {
  display: flex;
  align-items: center;
  padding: 20px;
  background: black;
  border-bottom: 1px solid #ddd;
}

.foto-perfil {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  margin-right: 20px;
}

.info-perfil h1 {
  margin: 0;
}

.galeria {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 10px 80px; /* arriba/abajo 10px, izquierda/derecha 20px */
}

.foto {
  position: relative;
  cursor: pointer;
}

.foto {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
}

.foto img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.pie-foto {
  font-size: 0.9em;
  color: #555;
  padding: 5px;
  text-align: left;
}

#visor {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  color: white;
  z-index: 1000;
  text-align: center;
  padding: 20px;
  box-sizing: border-box;
}

#visor img {
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
  margin-bottom: 10px;
}

#visor p {
  font-size: 1.1em;
}



.foto {
  overflow: hidden;
  position: relative;
}

.foto img {
  transition: transform 0.3s ease;
}

.foto:hover img {
  transform: scale(1.05);
}

.foto:hover {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}















.link-sobre-mi {
  text-decoration: none;
  color: inherit;
  transition: color 0.2s ease, text-shadow 0.2s ease;
}

.link-sobre-mi:hover {
  color: #0070f3;
  text-shadow: 0 0 4px rgba(0, 112, 243, 0.4);
}
















.main {
  max-width: 960px;
  margin: 0 auto;
}



@media (max-width: 600px) {
  .galeria {
    grid-template-columns: repeat(2, 1fr);
    gap: 5px;
    padding: 0; /* Eliminamos márgenes laterales */
  }

  .foto {
    aspect-ratio: 4 / 5;
    width: 100%;
    overflow: hidden;
    border-radius: 0;
  }

  .foto img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .pie-foto {
    font-size: 0.8em;
    padding: 2px;
  }
}


@media screen and (max-width: 600px) {
  .galeria {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    padding: 0 !important;
    gap: 5px !important;
  }

  .foto {
    aspect-ratio: 4 / 5;
    overflow: hidden;
  }

  .foto img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
}


