/* ====== Base ====== */
body {
  margin: 0;
  font-family: sans-serif;
  background-color: #f0f4f8; /* azul claro */
  color: #1a1a1a;
  transition: background-color 0.5s ease, color 0.5s ease;
}

.cv-body {
  width: 90%;
  max-width: 1000px;
  margin: 2% auto 5% auto;
  border: 1px solid #2563eb;
  padding: 5%;
  text-align: start;
  box-sizing: border-box;
  line-height: 25px;
  box-shadow: 4px 12px 18px rgba(0,0,0,0.25);
  background-color: #ffffff;
  border-radius: 8px;
  transition: background-color 0.5s ease, border 0.5s ease, box-shadow 0.5s ease;
}

/* hr siempre centrado */
hr {
  border: none;
  height: 8px;
  background-color: #2563eb;
  width: 90%;
  max-width: 600px;
  margin: 1rem auto; /* siempre centrado */
  border-radius: 4px;
  box-shadow: 0 5px 10px rgba(37, 99, 235, 0.5);
  transition: background-color 0.5s ease, box-shadow 0.5s ease;
}

/* ====== Responsive ====== */
@media screen and (max-width: 480px) {
  .cv-body {
    padding: 4%;
  }
  hr {
    height: 4px;
    width: 60%;
    margin: 1rem auto; /* sigue centrado */
  }
}

/* ====== Links ====== */
a:link, a:visited {
  color: #2563eb;
  text-decoration: none;
  transition: color 0.5s ease, text-shadow 0.5s ease;
}

a:hover {
  color: #3b82f6;
  text-shadow: 2px 2px 5px #2563eb;
  transform: scale(1.1);
  transition: all 0.3s ease;
}

a, address {
  font-style: normal;
}

/* ====== Headings ====== */
h3 {
  color: #22c55e;
  text-shadow: 2px 2px 5px rgba(34, 197, 94, 0.5);
  transition: color 0.5s ease, text-shadow 0.5s ease;
}

h4 {
  color: #2563eb;
  text-shadow: 2px 2px 5px rgba(59, 130, 246, 0.5);
  transition: color 0.5s ease, text-shadow 0.5s ease;
}

/* ====== Dark Mode ====== */
body.dark {
  background-color: #1a1a2e;
  color: #eaeaea;
}

body.dark .cv-body {
  background-color: #16213e;
  border: 1px solid #9d4edd;
  box-shadow: 4px 12px 18px rgba(0,0,0,0.65);
}

body.dark hr {
  background-color: #9d4edd;
  box-shadow: 0 5px 10px rgba(157, 78, 221, 0.5);
}

body.dark a:link, body.dark a:visited {
  color: #c77dff;
}

body.dark a:hover {
  color: #eaeaea;
  text-shadow: 2px 2px 5px #9d4edd;
}

body.dark h3 {
  color: #4ade80;
  text-shadow: 2px 2px 5px rgba(74, 222, 128, 0.5);
}

body.dark h4 {
  color: #9d4edd;
  text-shadow: 2px 2px 5px rgba(199, 125, 255, 0.5);
}

body.dark address {
  color: #cfcfcf;
}

/* ====== Toggle Button ====== */
.toggle-container {
  display: flex;
  justify-content: flex-end; /* botón a la derecha */
  align-items: center;
  padding-right: 10px;
  margin-top: -10px;
}

#toggle-mode {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  font-size: 20px;
  background-color: #2563eb; /* azul en modo claro */
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.5s ease, color 0.5s ease, box-shadow 0.5s ease, transform 0.3s ease;
  box-shadow: 0 4px 10px rgba(0,0,0,0.25);
}

#toggle-mode:hover {
  transform: scale(1.1) rotate(15deg);
  box-shadow: 0 6px 14px rgba(0,0,0,0.35);
}

body.dark #toggle-mode {
  background-color: #9d4edd; /* morado */
  color: #fff;
}
