:root {
  --primary-color: hsl(214, 84%, 56%);
  --text-color: hsl(0, 0%, 31%);
  --bg-color: hsl(0, 0%, 90%);
  --bg-card-color: hsl(0, 0%, 98%);
  --border-radius: 0.4em;
  --transition: color 0.1s, background-color 0.2s ease-in-out;
  --skill-bar-lenght: 0%;
}

* {
  box-sizing: border-box;
}

a {
  color: var(--primary-color);
  text-decoration: none;
}

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

body {
  margin: 0;
  background-color: var(--bg-color);
  color: var(--text-color);
  transition: var(--transition);
  font-family: 'Poppins', sans-serif;
  padding-top: 75px;
}

body.dark {
  --text-color: hsl(0, 0%, 83%);
  --bg-color: hsl(0, 0%, 15%);
  --bg-card-color: hsl(0, 0%, 25%);
}



.header {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 75px;
  padding: 0 1.5em;
  background-color: var(--bg-card-color);
  transition: var(--transition);
  position: fixed;
  top: 0;
  width: 100%;
  z-index:1000;
}

#smoky ul{
  margin: 0;
  padding: 0;
  display: flex;
  margin-left: 50px;
  color: var(--primary-color);
}

#smoky ul li{
  list-style: none;
  color: white;
  font-size: 20px;
  font-weight: bold;
  letter-spacing: 10px;
  transition: 2s;
  opacity: 0.8;
  color: var(--primary-color);
}

#smoky ul:hover li{
  transform: rotate(45deg) translateY(-200px);
  opacity: 0;
  filter: blur(20px);
}

#smoky ul li:nth-child(1) {
	transition-delay: 0;
}

#smoky ul li:nth-child(2) {
	transition-delay: 0.4s;
}

#smoky ul li:nth-child(3) {
	transition-delay: 0.8s;
}

#smoky ul li:nth-child(4) {
	transition-delay: 1.2s;
}

#smoky ul li:nth-child(5) {
	transition-delay: 1.6s;
}
#smoky ul li:nth-child(6) {
	transition-delay: 2.0s;
}
#smoky ul li:nth-child(7) {
	transition-delay: 2.4s;
}
#smoky ul li:nth-child(8) {
	transition-delay: 2.8s;
}
#smoky ul li:nth-child(9) {
	transition-delay: 3.2s;
}

.switches {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.toggle-theme {
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.toggle-theme__icon {
  margin-right: 0.5em;
  width: 20px;
}

.toggle-theme__text {
  font-size: 0.8rem;
}

.flags {
  width: 75px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-left: auto;
}

.flags__item {
  width: 30px;
  cursor: pointer;
  transition: box-shadow 0.3s ease-in-out;
}

.flags__item:hover {
  box-shadow: 0 0 10px 2px #3182ed;
}

.colors {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 2epx;
  width: 100px;
  margin-left: auto;
}

.colors__item {
  border-radius: 20px;
  width: 20px;
  height: 20px;
  border: 1px solid var(--text-color);
  background-color: var(--primary-color);
  cursor: pointer;
}

.colors__item--blue {
  --primary-color: hsl(214, 84%, 56%);
}

.colors__item--green {
  --primary-color: hsl(137, 74%, 30%);
}

.colors__item--red {
  --primary-color: hsl(15, 100%, 59%);
}

.colors__item--orange {
  --primary-color: hsl(46, 84%, 56%);
}
.title {
  text-align: center;
  color: var(--primary-color);
  transition: var(--transition);
}

main {
  display: grid;
  padding: 2em;
  gap: 0.5em;
  align-items: start;
}

@media screen and (min-width: 720px) {
  .main {
    grid-template-columns: min-content 1fr;
  }
}

.column {
  display: grid;
  gap: 0.5em;
  align-content: start;
}

@media screen and (min-width: 720px) {
  .column--right {
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(auto-fill, min-content);
    
  }
}

.card {
  padding: 1em;
  background-color: var(--bg-card-color);
  border-radius: var(--border-radius);
}

.card__image-container {
  flex: 1;
  min-width: 320px;
  max-height: 200px;
  border-radius: var(--border-radius);
  overflow: hidden;
  perspective: 1000px;
  transition: box-shadow 0.4s ease;
}

.card__image-container img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.5s ease; 
  transform-origin: center;
  border-radius: inherit;
}

.card__image-container:hover img {
  transform: rotateY(10deg) rotateX(10deg) scale(1.1); 
  
}

.card__image-container:hover {
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.8), 0 0 10px rgba(255, 255, 255, 0.6); 
  
}

.card__header {
  padding: 1em 0;
}

.card__title {
  margin: 1;
  margin-bottom: 1em;
  font-size: 1.2rem;
  
}

.card__subtitle {
  font-size: 0.9rem;
  opacity: 0.8;
  
}

.card__link {
  margin-bottom: 0.5em;
}

.card__text {
  font-size: 0.9rem;
  line-height: 1.6;
}

@media screen and (min-width: 760px) {
  .card--project {
    display:flex;
    flex-direction: row;
    grid-template-columns: min-content 1fr;
    grid-column: 1 / -1;
  }
}

.skills {
  padding: 1em 0;
}

.skills__header{
  display: flex;
  justify-content: space-between;
  width: 175px;
  margin-left: auto;
}


.skills__tech{
  margin: 0;
  font-size: 0.8rem;
}

.skills__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.skills__bar,
.skills__bar::after {
  position: relative;
  width: 175px;
  height: 8px;
  background-color: #888;
  border-radius: var(--border-radius);
  overflow: hidden;
}

.skills__bar::after {
  content: "";
  position: absolute;
  left: -175px;
  background-color: var(--primary-color);
  transition: var(--transition);
  animation: skills-bar-fill 2s ease-in-out forwards;
}

.skills__bar--10::after {
  --skill-bar-lenght: 10%;
}
.skills__bar--20::after {
  --skill-bar-lenght: 20%;
}
.skills__bar--30::after {
  --skill-bar-lenght: 30%;
}
.skills__bar--40::after {
  --skill-bar-lenght: 40%;
}
.skills__bar--50::after {
  --skill-bar-lenght: 50%;
}
.skills__bar--60::after {
  --skill-bar-lenght: 60%;
}

.skills__bar--70::after {
  --skill-bar-lenght: 70%;
}
.skills__bar--80::after {
  --skill-bar-lenght: 80%;
}
.skills__bar--90::after {
  --skill-bar-lenght: 90%;
}

.experiences {
  display: flex;
  align-items: start;
  margin-bottom: 1em;
  padding: 1em;
  border: 2px solid var(--primary-color);
  border-radius: var(--border-radius);
  transition: var(--transition);
}

.experience__image {
  max-width: 15%;
  margin-right: 1em;
}
.experience__time {
  font-size: 0.8rem;
  margin-bottom: 0.5em;
}

.experience__job {
  margin: 0;
  margin-bottom: 0.5em;
  color: var(--primary-color);
  transition: var(--transition);
}

.experience__description {
  font-size: 0.8rem;
  margin-bottom: 1.5em;
}

.project {
  flex: 2;
  position: relative;
}

@media screen and (min-width: 760px) {
  .project {
    margin-left: 2em;
  }
}

.project {
  margin-left: 2em;
}

@media screen and (min-width: 760px) {
  .project__tags {
    width: 325px;
    font-size: 0.8rem;
  }
}

.project__tags {
  display: flex;
  justify-content: space-between;
  margin: 0.5em 0;
  font-size: 0.6rem;
  width: 275px;
}

.project__tag {
  padding: 0.4em 0.8em;
  border-radius: var(--border-radius);
  background-color: var(--primary-color);
  color: var(--bg-color);
}

.buttons {
  display: flex;
  justify-content: space-between;
  width: 225px;
}

@media screen and (min-width: 760px) {
  .buttons {
    position: absolute;
    bottom: 1em;
  }
}

.button {
  width: 100px;
  line-height: 2.5;
  text-align: center;
  border-radius: var(--border-radius);
  transition: var(--transition);
  z-index: 1;
  
}

.button--primary {
  background-color: var(--primary-color);
  color: var(--bg-color);
  cursor: pointer;
  border: none;
  position: relative;
  
}

.button--primary::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg,rgb(49, 130, 237),rgb(20, 133, 52),rgb(255, 98, 46),rgb(237, 193, 49),rgb(49, 130, 237),rgb(20, 133, 52),rgb(255, 98, 46),rgb(237, 193, 49));
  background-size: 800%;
  border-radius: 10px;
  filter: blur(8px);
  animation: glowing 200s linear infinite;
}

@keyframes glowing{
  0%{
    background-position: 0 0;
  }
  50%{
    background-position: 400% 0;
  }
  100%{
    background-position: 0 0;
  }
}

.button--ghost {
  background-color: transparent;
  border: 1px solid var(--primary-color);
  color: var(--primary-color);
}
.icon {
  margin-right: 1em;
}

@keyframes skills-bar-fill {
  to {
    transform: translateX(var(--skill-bar-lenght));
  }
}

.section__title {
  font-size: 1em;
  margin-bottom: 1em;
  text-align: left;
  background-color: var(--primary-color); 
  padding: 0.3em;
  width: 100%;
  box-sizing: border-box;
  color: var(--bg-primary-color);
  border-radius: var(--border-radius);
  
  
  
}
.nested-card-container {
  flex: 1;
  display: flex;
  justify-content: flex;
  align-items: flex-start;
  border: 2px solid var(--primary-color);
  transition: var(--transition);
  border-radius: var(--border-radius);
  
  
}
.nested-card { 
  padding: 15px; 
  max-width: 300px; 
}

.nested-card__title {
  font-size: 1.2em;
  margin-bottom: 10px;
  
}

.nested-card__text {
  font-size: 1em;
  color: #555;
  
}

.dynamic-words-common {
  list-style-type: none;
  padding: 0;
}


.dynamic-words-common li {
  font-size: 1em;
  color: var(white);
  opacity: 0;
  transition: opacity 1s;
}

.footer {
  position: fixed;
  bottom: 20px;
  right: 20px;
}

.scroll-to-top {
  background-color: #333;
  color: #fff;
  padding: 10px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-decoration: none;
}

.scroll-to-top i {
  font-size: 24px;
}
.scroll-to-top {
  background-color: #333; 
  color: #fff;
  padding: 10px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.3s, color 0.3s; 
}

.scroll-to-top:hover {
  background-color: #ff622e; 
  color: #000; 
}

.skills-carousel,
.section__title,
.card--project {
  grid-column: 1 / -1; /* Hago que estos elementos ocupen las 4 columnas */
}
.skills-carousel {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 0.5em;
  width: 100%;
  overflow: hidden;
}

.carousel-track {
  display: flex;
  transition: transform 0.5s ease-in-out; /* Movido aquí para deslizar el track completo */
  width: 100%;
  gap: 1em;
}

.carousel-track .card {
  /* Fuerzo el tamaño de cada card */
  position: relative; /* Necesario para el pseudo-elemento del neón */
  overflow: hidden; /* Evita que el brillo se desborde hacia adentro */
  flex-shrink: 0;
  flex-grow: 0;
  /* Cada card ocupa 1/4 del espacio total, restando los 3 gaps (3em) */
  flex-basis: calc((100% - 3em) / 4);
  margin-right: 0; /* Quito el margen porque ya uso gap */
  min-width: 0; /* Reseteo min-width para que flex-basis tenga control total */
  transition: filter 0.3s ease; /* Animación suave para el oscurecimiento */
}

/* Pseudo-elemento para crear el borde de neón */
.skills-carousel .card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px; /* Grosor del borde */
  background: var(--primary-color);
  box-shadow: 0 0 5px var(--primary-color), 
              0 0 10px var(--primary-color);
  opacity: 0; /* Inicialmente invisible */
  transition: opacity 0.3s ease;
}
/* Efecto al pasar el mouse */
.skills-carousel .card:hover {
  filter: brightness(0.8); /* Oscurece la card al 80% de su brillo */
}

.skills-carousel .card:hover::before {
  opacity: 1; /* Hace visible el borde de neón */
}



.carousel-track .card:last-child {
  margin-right: 0;
}

.carousel-arrows {
  display: flex;
  justify-content: center;
  gap: 1em;
  margin-top: 1em;
}

.card--tableau {
  padding: 0; /*  el tablero ocupa todo el espacio */
  min-height: 600px; /* altura mínima para que sea visible */
}

