:root {
  --bg-light: #f5f5f5;
  --text-light: #111;
  --title-light: #005fdd;
  --bg-dark: #0a192f;
  --text-dark: #e6f1ff;
  --title-dark: #64ffda;
  --accent: #64ffda;
}

html {
  margin: 0;
  padding: 0;
}

body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  font-family: Arial, sans-serif;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-light);
  color: var(--text-light);
  transition: background-color 0.3s ease, color 0.3s ease;
}

body.dark-mode {
  background-color: var(--bg-dark);
  color: var(--text-dark);
}

.theme-toggle {
  position: absolute;
  top: 1rem;
  right: 1rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-left,
.icon-right {
  font-size: 1.5rem;
}

header {
  text-align: center;
  margin-top: 2rem;
}

h1 {
  font-size: 3rem;
  margin-bottom: 0.5rem;
  font-weight: bold;
}

h2 {
  font-size: 1.5rem;
  color: var(--title-light);
}

body.dark-mode h2 {
  color: var(--title-dark);
}

main {
  flex-grow: 1;
  max-width: 900px;
  margin: 1rem auto;
  padding: 1.5rem 2rem;
  background-color: rgba(255, 255, 255, 0.96);
  border-radius: 12px;
  box-shadow: 6px 6px 12px rgba(0, 0, 0, 0.1);
  color: inherit;
}

body.dark-mode main {
  background-color: rgba(10, 25, 47, 0.98);
  box-shadow: 6px 6px 12px rgba(0, 0, 0, 0.5);
  color: inherit;
}

.intro {
  text-align: justify;
  margin-bottom: 1rem;
}

.projects {
  margin-top: 1rem;
}

.projects h3 {
  margin-top: 0.5rem;
  font-size: 1.6rem;
  color: var(--title-light);
}

body.dark-mode .projects h3 {
  color: var(--title-dark);
}

.projects a {
  color: #005fdd;
  text-decoration: none;
}

.projects a:hover {
  text-decoration: underline;
}

body.dark-mode .projects a {
  color: #64ffda;
}

footer {
  text-align: center;
  padding: 1rem;
  font-size: 0.9rem;
  border-top: 1px solid #ccc;
  background-color: var(--bg-light);
  color: var(--text-light);
}

body.dark-mode footer {
  background-color: var(--bg-dark);
  color: var(--text-dark);
  border-top: 1px solid #333;
}

.switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 34px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #9a86fd;
  border-radius: 34px;
  transition: 0.4s;
}

.slider::before {
  position: absolute;
  content: '';
  height: 26px;
  width: 26px;
  left: 4px;
  bottom: 4px;
  border-radius: 50%;
  background-color: #fff;
  transition: 0.4s;
}

input:checked + .slider {
  background-color: #ffdb70;
}

input:focus + .slider {
  box-shadow: 0 0 1px #ffdb70;
}

input:checked + .slider::before {
  transform: translateX(26px);
}

.profile-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
  text-align: left;
  flex-wrap: wrap;
}

.header-pic {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.header-text h1 {
  font-size: 2.2rem;
  margin: 0;
  font-weight: bold;
}

.header-text h2 {
  margin: 0;
  font-size: 1.2rem;
  color: var(--title-light);
}

body.dark-mode .header-text h2 {
  color: var(--title-dark);
}

.footer-icon {
  display: inline-block;
  width: 24px;
  height: 24px;
  /* background-image: url('./assets/logoWDKSemoji.svg'); */
  background-size: cover;
  background-repeat: no-repeat;
  vertical-align: middle;
  margin: 0 4px;
}

/* 🔧 Ajustes responsive para pantallas pequeñas */
@media screen and (max-width: 768px) {
  .profile-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .header-pic {
    width: 120px;
    height: 120px;
    margin-bottom: 1rem;
  }

  .intro, .projects {
    padding: 1rem;
  }

  .projects ul {
    padding-left: 1rem;
  }

  .projects li {
    margin-bottom: 1rem;
    font-size: 1rem;
  }

  footer {
    font-size: 0.9rem;
    text-align: center;
    padding: 1rem;
  }

  .footer-icon {
    width: 20px;
    height: 20px;
  }
}

/* 🎯 Ajuste de texto central para evitar scroll horizontal */
.intro {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 1rem;
  line-height: 1.6;
  word-break: break-word;
}