/* Reset y estilos base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Open Sans', sans-serif;
    line-height: 1.6;
    background-color: #f0f0f0;
    color: #222;
    transition: background-color 0.3s, color 0.3s;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

h1, h2, h3 {
    margin-bottom: 0.5rem;
    font-family: 'Press Start 2P', monospace;
    font-size: 15px;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: auto;
}

/* Tema oscuro */
body.dark-mode {
    background-color: #121212;
    color: #e0e0e0;
}

body.dark-mode a {
    color: #90caf9;
}

/* Header */
header {
    padding: 1.5rem 0;
    border-bottom: 1px solid #ccc;
    background-color: rgb(126, 126, 136);
    font-family: 'Press Start 2P', monospace;
    
}
header h1 {
 
    font-family: 'Press Start 2P', monospace;
    font-size: 40px;
    
}

body.dark-mode header {
    background-color: #000000;
    border-color: #000000;
}

.container-h1 {
    margin-bottom: 1rem;
}

.social-links {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-top: 1rem;
}

.social-links img {
    width: 30px;
    height: 30px;
}

/* Botón de tema */
.theme-toggle-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
}

/* Hero / Sobre mí */
.hero {
    padding: 2rem 0;
}

.hero p {
    max-width: 800px;
}

/* Botón CV */
.cv-button {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    background-color: #007bff;
    color: white;
    border-radius: 5px;
    margin-top: 1rem;
    transition: background 0.3s;
}

.cv-button:hover {
    background-color: #0056b3;
}

/* Tecnologías */
.technologies {
    padding: 2rem 0;
    font-family: 'Press Start 2P', monospace;
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.tech-card {
    background: #ffffff;
    border-radius: 10px;
    padding: 1rem;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.2s;
}

.tech-card h3{
  font-size: 10px;
}

body.dark-mode .tech-card {
    background-color: #1f1f1f;
}

.tech-card:hover {
    transform: scale(1.05);
}

/* Idiomas */
.languages {
    padding: 4rem 1rem;
    background-color: var(--bg-color);
}

.languages h2 {
    text-align: left;
    
    margin-bottom: 2rem;
}

.language-card {
    display: flex;
    align-items: center;
    gap: 2rem;
    background-color: #ffffff;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    max-width: 500px;
    
    transition: background 0.3s, color 0.3s;
}

.language-card img {
    width: 100px;
    height: auto;
}

.language-card h3 {
    margin-bottom: 0.5rem;
}

body.dark-mode .language-card {
    background-color: #1f1f1f;
    color: #f1f1f1;
}

body.dark-mode .card {
    background-color: #1f1f1f;
    color: #f1f1f1;
}

body.dark-mode .card-title{
    font-style: white;
    color: #f1f1f1;
}

@media (max-width: 768px) {
    .language-card {
        flex-direction: column;
        text-align: center;
    }

    .language-card img {
        width: 80px;
    }
}


/* Contacto */
.contact-info {
    margin-top: 1rem;
    font-size: 1.1rem;
}

.contact-info a {
    color: #007bff;
}

body.dark-mode .contact-info a {
    color: #90caf9;
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem 0;
    border-top: 1px solid #ccc;
    background-color: rgb(126, 126, 136);
    margin-top: 2rem;
}

body.dark-mode footer {
    background-color: #000000;
    border-color: #000000;
}

/* Responsive layout */
@media (min-width: 768px) {
    header nav {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .hero, .technologies, .language {
        text-align: left;
    }
}

@media (max-width: 768px) {
    .language-card {
        flex-direction: column;
        text-align: center;
    }

    .tech-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    }
}


/* From Uiverse.io by Galahhad */ 
.theme-switch {
  --toggle-size: 30px;
  /* the size is adjusted using font-size,
     this is not transform scale,
     so you can choose any size */
  --container-width: 5.625em;
  --container-height: 2.5em;
  --container-radius: 6.25em;
  /* radius 0 - minecraft mode :) */
  --container-light-bg: #3D7EAE;
  --container-night-bg: #1D1F2C;
  --circle-container-diameter: 3.375em;
  --sun-moon-diameter: 2.125em;
  --sun-bg: #ECCA2F;
  --moon-bg: #C4C9D1;
  --spot-color: #959DB1;
  --circle-container-offset: calc((var(--circle-container-diameter) - var(--container-height)) / 2 * -1);
  --stars-color: #fff;
  --clouds-color: #F3FDFF;
  --back-clouds-color: #AACADF;
  --transition: .5s cubic-bezier(0, -0.02, 0.4, 1.25);
  --circle-transition: .3s cubic-bezier(0, -0.02, 0.35, 1.17);
}

.theme-switch, .theme-switch *, .theme-switch *::before, .theme-switch *::after {
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-size: var(--toggle-size);
}

.theme-switch__container {
  width: var(--container-width);
  height: var(--container-height);
  background-color: var(--container-light-bg);
  border-radius: var(--container-radius);
  overflow: hidden;
  cursor: pointer;
  -webkit-box-shadow: 0em -0.062em 0.062em rgba(0, 0, 0, 0.25), 0em 0.062em 0.125em rgba(255, 255, 255, 0.94);
  box-shadow: 0em -0.062em 0.062em rgba(0, 0, 0, 0.25), 0em 0.062em 0.125em rgba(255, 255, 255, 0.94);
  -webkit-transition: var(--transition);
  -o-transition: var(--transition);
  transition: var(--transition);
  position: relative;
}

.theme-switch__container::before {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  -webkit-box-shadow: 0em 0.05em 0.187em rgba(0, 0, 0, 0.25) inset, 0em 0.05em 0.187em rgba(0, 0, 0, 0.25) inset;
  box-shadow: 0em 0.05em 0.187em rgba(0, 0, 0, 0.25) inset, 0em 0.05em 0.187em rgba(0, 0, 0, 0.25) inset;
  border-radius: var(--container-radius)
}

.theme-switch__checkbox {
  display: none;
}

.theme-switch__circle-container {
  width: var(--circle-container-diameter);
  height: var(--circle-container-diameter);
  background-color: rgba(255, 255, 255, 0.1);
  position: absolute;
  left: var(--circle-container-offset);
  top: var(--circle-container-offset);
  border-radius: var(--container-radius);
  -webkit-box-shadow: inset 0 0 0 3.375em rgba(255, 255, 255, 0.1), inset 0 0 0 3.375em rgba(255, 255, 255, 0.1), 0 0 0 0.625em rgba(255, 255, 255, 0.1), 0 0 0 1.25em rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 0 0 3.375em rgba(255, 255, 255, 0.1), inset 0 0 0 3.375em rgba(255, 255, 255, 0.1), 0 0 0 0.625em rgba(255, 255, 255, 0.1), 0 0 0 1.25em rgba(255, 255, 255, 0.1);
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-transition: var(--circle-transition);
  -o-transition: var(--circle-transition);
  transition: var(--circle-transition);
  pointer-events: none;
}

.theme-switch__sun-moon-container {
  pointer-events: auto;
  position: relative;
  z-index: 2;
  width: var(--sun-moon-diameter);
  height: var(--sun-moon-diameter);
  margin: auto;
  border-radius: var(--container-radius);
  background-color: var(--sun-bg);
  -webkit-box-shadow: 0.062em 0.062em 0.062em 0em rgba(254, 255, 239, 0.61) inset, 0em -0.062em 0.062em 0em #a1872a inset;
  box-shadow: 0.062em 0.062em 0.062em 0em rgba(254, 255, 239, 0.61) inset, 0em -0.062em 0.062em 0em #a1872a inset;
  -webkit-filter: drop-shadow(0.062em 0.125em 0.125em rgba(0, 0, 0, 0.25)) drop-shadow(0em 0.062em 0.125em rgba(0, 0, 0, 0.25));
  filter: drop-shadow(0.062em 0.125em 0.125em rgba(0, 0, 0, 0.25)) drop-shadow(0em 0.062em 0.125em rgba(0, 0, 0, 0.25));
  overflow: hidden;
  -webkit-transition: var(--transition);
  -o-transition: var(--transition);
  transition: var(--transition);
}

.theme-switch__moon {
  -webkit-transform: translateX(100%);
  -ms-transform: translateX(100%);
  transform: translateX(100%);
  width: 100%;
  height: 100%;
  background-color: var(--moon-bg);
  border-radius: inherit;
  -webkit-box-shadow: 0.062em 0.062em 0.062em 0em rgba(254, 255, 239, 0.61) inset, 0em -0.062em 0.062em 0em #969696 inset;
  box-shadow: 0.062em 0.062em 0.062em 0em rgba(254, 255, 239, 0.61) inset, 0em -0.062em 0.062em 0em #969696 inset;
  -webkit-transition: var(--transition);
  -o-transition: var(--transition);
  transition: var(--transition);
  position: relative;
}

.theme-switch__spot {
  position: absolute;
  top: 0.75em;
  left: 0.312em;
  width: 0.75em;
  height: 0.75em;
  border-radius: var(--container-radius);
  background-color: var(--spot-color);
  -webkit-box-shadow: 0em 0.0312em 0.062em rgba(0, 0, 0, 0.25) inset;
  box-shadow: 0em 0.0312em 0.062em rgba(0, 0, 0, 0.25) inset;
}

.theme-switch__spot:nth-of-type(2) {
  width: 0.375em;
  height: 0.375em;
  top: 0.937em;
  left: 1.375em;
}

.theme-switch__spot:nth-last-of-type(3) {
  width: 0.25em;
  height: 0.25em;
  top: 0.312em;
  left: 0.812em;
}

.theme-switch__clouds {
  width: 1.25em;
  height: 1.25em;
  background-color: var(--clouds-color);
  border-radius: var(--container-radius);
  position: absolute;
  bottom: -0.625em;
  left: 0.312em;
  -webkit-box-shadow: 0.937em 0.312em var(--clouds-color), -0.312em -0.312em var(--back-clouds-color), 1.437em 0.375em var(--clouds-color), 0.5em -0.125em var(--back-clouds-color), 2.187em 0 var(--clouds-color), 1.25em -0.062em var(--back-clouds-color), 2.937em 0.312em var(--clouds-color), 2em -0.312em var(--back-clouds-color), 3.625em -0.062em var(--clouds-color), 2.625em 0em var(--back-clouds-color), 4.5em -0.312em var(--clouds-color), 3.375em -0.437em var(--back-clouds-color), 4.625em -1.75em 0 0.437em var(--clouds-color), 4em -0.625em var(--back-clouds-color), 4.125em -2.125em 0 0.437em var(--back-clouds-color);
  box-shadow: 0.937em 0.312em var(--clouds-color), -0.312em -0.312em var(--back-clouds-color), 1.437em 0.375em var(--clouds-color), 0.5em -0.125em var(--back-clouds-color), 2.187em 0 var(--clouds-color), 1.25em -0.062em var(--back-clouds-color), 2.937em 0.312em var(--clouds-color), 2em -0.312em var(--back-clouds-color), 3.625em -0.062em var(--clouds-color), 2.625em 0em var(--back-clouds-color), 4.5em -0.312em var(--clouds-color), 3.375em -0.437em var(--back-clouds-color), 4.625em -1.75em 0 0.437em var(--clouds-color), 4em -0.625em var(--back-clouds-color), 4.125em -2.125em 0 0.437em var(--back-clouds-color);
  -webkit-transition: 0.5s cubic-bezier(0, -0.02, 0.4, 1.25);
  -o-transition: 0.5s cubic-bezier(0, -0.02, 0.4, 1.25);
  transition: 0.5s cubic-bezier(0, -0.02, 0.4, 1.25);
}

.theme-switch__stars-container {
  position: absolute;
  color: var(--stars-color);
  top: -100%;
  left: 0.312em;
  width: 2.75em;
  height: auto;
  -webkit-transition: var(--transition);
  -o-transition: var(--transition);
  transition: var(--transition);
}

/* actions */

.theme-switch__checkbox:checked + .theme-switch__container {
  background-color: var(--container-night-bg);
}

.theme-switch__checkbox:checked + .theme-switch__container .theme-switch__circle-container {
  left: calc(100% - var(--circle-container-offset) - var(--circle-container-diameter));
}

.theme-switch__checkbox:checked + .theme-switch__container .theme-switch__circle-container:hover {
  left: calc(100% - var(--circle-container-offset) - var(--circle-container-diameter) - 0.187em)
}

.theme-switch__circle-container:hover {
  left: calc(var(--circle-container-offset) + 0.187em);
}

.theme-switch__checkbox:checked + .theme-switch__container .theme-switch__moon {
  -webkit-transform: translate(0);
  -ms-transform: translate(0);
  transform: translate(0);
}

.theme-switch__checkbox:checked + .theme-switch__container .theme-switch__clouds {
  bottom: -4.062em;
}

.theme-switch__checkbox:checked + .theme-switch__container .theme-switch__stars-container {
  top: 50%;
  -webkit-transform: translateY(-50%);
  -ms-transform: translateY(-50%);
  transform: translateY(-50%);
}

.theme-switch {
    transform: scale(0.4);
    transform-origin: center left; 
}


.button-cv {
  display: inline-block;
  position: relative;
  text-decoration: none;
  font-family: 'Press Start 2P', monospace;
  font-size: 10px;
  font-weight: bold;
  text-transform: uppercase;
  padding: 0;
  margin-top: 20px;
  cursor: pointer;

  background: none;
  color: #0f1923;
}

.button-cv::before,
.button-cv::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: calc(50% - 5px);
  
  transition: all 0.15s ease;
  pointer-events: none;
}

.button-cv::before {
  top: 0;
  border-bottom-width: 0;
}

.button-cv::after {
  bottom: 0;
  border-top-width: 0;
}

.button-cv:active::before,
.button-cv:active::after {
  left: 3px;
  right: 3px;
}

.button-cv:active::before {
  top: 3px;
}

.button-cv:active::after {
  bottom: 3px;
}

.button_lg {
  position: relative;
  display: inline-block;
  padding: 10px 24px;
  color: #fff;
  background-color: #0f1923;
  overflow: hidden;
  white-space: nowrap;
}

.button_lg::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 2px; height: 2px;
  background-color: #0f1923;
}

.button_lg::after {
  content: '';
  position: absolute;
  bottom: 0; right: 0;
  width: 4px; height: 4px;
  background-color: #0f1923;
  transition: all 0.2s ease;
}

.button_sl {
  position: absolute;
  top: 0;
  bottom: 0;
  left: -8px;
  width: 0;
  background-color: #ff4655;
  transform: skew(-15deg);
  transition: all 0.2s ease;
  z-index: 0;
}

.button_text {
  position: relative;
  z-index: 1;
}

.button-cv:hover {
  color: #0f1923;
}

.button-cv:hover .button_sl {
  width: calc(100% + 16px);
}


/* From Uiverse.io by andrew-demchenk0 */ 
/* before adding the photo to the div with the "card-photo" class, in the css clear the styles for .card-photo and remove .card-photo::before and .card-photo::after, then set the desired styles for .card- photo. */

.card {
  --font-color: #323232;
  --font-color-sub: #666;
  --bg-color: #fff;
  --main-color: #323232;
  width: 200px;
  height: 254px;
  background: var(--bg-color);
  border: 2px solid var(--main-color);
  box-shadow: 4px 4px var(--main-color);
  border-radius: 5px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.card-photo {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  overflow: hidden;
  margin: auto;
}

.card-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 50%;
}

.card-title {
  font-family: 'Press Start 2P', monospace;
  font-size: 4px;
  line-height: 1.6;
  text-align: center;
  margin-bottom: 0.5rem;
}

.card-title span {
  font-size: 10px;
  color: gray;
  display: block;
  margin-top: 0.5rem;
}


.card-socials {
  display: flex;
  height: 0;
  opacity: 0;
  margin-top: 20px;
  gap: 20px;
  transition: 0.5s;
}

.card-socials-btn {
  width: 25px;
  height: 25px;
  border: none;
  background: transparent;
  cursor: pointer;
}

.card-socials-btn svg {
  width: 100%;
  height: 100%;
  fill: var(--main-color);
}

.card:hover > .card-socials {
  opacity: 1;
  height: 35px;
}

.card-socials-btn:hover {
  transform: translateY(-5px);
  transition: all 0.15s;
}



.hero-container {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
  align-items: flex-start;
  margin-top: 2rem;
}

.card {
  flex: 1 1 300px;
  max-width: 350px;
  background-color: #f2f2f2;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}



.card-title {
  font-weight: bold;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.card-title span {
  font-size: 0.9rem;
  color: gray;
}

.card-socials {
  display: flex;
  gap: 10px;
  margin-top: 1rem;
}

.card-socials-btn {
  background: none;
  border: none;
  cursor: pointer;
}

.hero-description {
  flex: 1 1 300px;
  max-width: 600px;
}

.hero-description p {
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

/* Estilo para el grupo de elementos a la derecha */
.right-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap; /* Permite que en móviles se acomode en varias líneas si es necesario */
}

/* Estilo para el selector */
.language-selector select {
  padding: 6px 10px;
  font-size: 1rem;
  border-radius: 6px;
  border: 1px solid #ccc;
  background-color: var(--bg-color, white);
  color: var(--text-color, black);
  cursor: pointer;
  transition: all 0.3s ease;
}

/* Ajustes responsive */
@media (max-width: 768px) {
  .right-controls {
    flex-direction: row;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .language-selector select {
    font-size: 0.9rem;
    padding: 5px 8px;
  }
}
