* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: #f9f9f9;
  color: #333;
  line-height: 1.6;
  padding: 0 20px;
}

header {
  background-color: #1e1e2f;
  color: #fff;
  padding: 20px 0;
  text-align: center;
}

header h1 {
  font-size: 2rem;
}

header p {
  margin-top: 5px;
  font-size: 1rem;
}

nav ul {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 15px;
  list-style: none;
  margin-top: 10px;
}

nav a {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
}

main {
  max-width: 1000px;
  margin: 40px auto;
}

section {
  margin-bottom: 50px;
}

h2 {
  font-size: 1.8rem;
  margin-bottom: 15px;
  color: #222;
}

ul {
  list-style: disc inside;
}

.skills div {
  margin-bottom: 8px;
}

details summary {
  cursor: pointer;
  font-weight: 600;
  background: #eee;
  padding: 10px;
  border-radius: 5px;
}

details ul {
  margin-top: 10px;
  padding-left: 20px;
}

.sobremi-container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2rem;
  margin-top: 1rem;
}

.profile-photo {
  width: 200px;
  height: auto;
  border-radius: 1rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.sobremi-texto {
  flex: 1;
  min-width: 250px;
}

.proyecto, .project {
  border-left: 4px solid #4f46e5;
  background-color: #fff;
  padding: 15px;
  margin-bottom: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.proyecto h3, .project h3 {
  margin-bottom: 5px;
}

.proyecto a, .project a {
  color: #4f46e5;
  text-decoration: none;
  font-weight: 600;
}

.project-img {
  max-width: 600px;
  width: 100%;
  height: auto;
  border-radius: 8px;
  margin-top: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

#contacto a {
  color: #4f46e5;
  text-decoration: none;
  font-weight: 600;
}

#contacto ul li {
  margin-bottom: 8px;
}

footer {
  text-align: center;
  padding: 20px 0;
  font-size: 0.9rem;
  color: #666;
}

@media (max-width: 768px) {
  header {
    padding: 10px 10px;
  }

  header h1 {
    font-size: 1.5rem;
    margin-bottom: 5px;
  }

  header p {
    font-size: 0.85rem;
    margin-top: 0;
    margin-bottom: 8px;
  }

  nav ul {
    gap: 8px;
  }

  nav a {
    font-size: 0.9rem;
  }

  main {
    padding: 0 10px;
  }

  .sobremi-container {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .profile-photo {
    width: 150px;
  }

  .about-content {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .about-content img.profile-photo {
    margin-top: 10px;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 15px;
  }

  h2 {
    font-size: 1.4rem;
  }

  .project, .proyecto {
    padding: 12px;
  }

  footer {
    font-size: 0.8rem;
  }
}

@media (prefers-color-scheme: dark) {
  body {
    background-color: #121212;
    color: #e0e0e0;
  }

  header {
    background-color: #1a1a1a;
    color: #eee;
  }

  nav a {
    color: #bbb;
  }

  section {
    background-color: #1f1f1f;
    border-radius: 8px;
    padding: 20px;
  }

  h2 {
    color: #ccc;
  }

  .proyecto, .project {
    background-color: #292929;
    border-left-color: #8a2be2;
    box-shadow: none;
    color: #ddd;
  }

  footer {
    color: #999;
  }

  details summary {
    background: #333;
    color: #eee;
  }
}


/* --- Añadir al final de tu style.css --- */

.lang-item {
  display: flex;
  align-items: center;
}

#language-selector {
  background-color: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 4px;
  padding: 4px 8px;
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  cursor: pointer;
  outline: none;
  transition: all 0.3s ease;
}

#language-selector:hover {
  background-color: rgba(255, 255, 255, 0.2);
  border-color: #4f46e5;
}

#language-selector option {
  background-color: #1e1e2f; /* Fondo oscuro para el desplegable */
  color: #fff;
}

/* Ajuste para modo oscuro (prefers-color-scheme: dark) */
@media (prefers-color-scheme: dark) {
  #language-selector {
    background-color: #292929;
    border-color: #444;
  }
  
  #language-selector option {
    background-color: #292929;
  }
}

/* Ajuste móvil */
@media (max-width: 768px) {
  nav ul {
    align-items: center;
  }
  #language-selector {
    font-size: 0.75rem;
    padding: 2px 5px;
  }
}

#language-selector {
  background: transparent;
  color: #fff; /* O el color de tu texto en el nav */
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 6px;
  padding: 4px 6px;
  cursor: pointer;
  font-size: 1.1rem; /* Un poco más grande para que las banderas se vean bien */
  outline: none;
  appearance: none; /* Quita la flecha por defecto en algunos navegadores si quieres algo más limpio */
  -webkit-appearance: none;
}

/* Para que se vea bien en el modo oscuro que ya tienes */
@media (prefers-color-scheme: dark) {
  #language-selector {
    background-color: #292929;
    border-color: #444;
  }
}

/* Estilo para las opciones dentro del desplegable */
#language-selector option {
  background-color: #1e1e2f; 
  color: #fff;
  padding: 10px;
}

.lang-buttons img {
  width: 28px;      /* Un pelín más grandes para que se vean bien */
  height: 18px;     /* Forzamos la altura para que todas midan lo mismo */
  object-fit: cover; /* Esto evita que la imagen se deforme al forzar la altura */
  border-radius: 2px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
  display: block;
}