html,
body {
  margin: 0;
  padding: 0;
  width: 100vw;
  max-width: 100vw;
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  font-family: 'Segoe UI', 'Inter', sans-serif;
  text-decoration: none;
  overflow-x: hidden;
}

#contenido {
  overflow-x: hidden;
}

* {
  box-sizing: border-box;
}

.dark-mode {
  background:
    radial-gradient(circle at top center, rgba(37, 48, 66, 0.5) 0%, transparent 90%),
    linear-gradient(to bottom, #0f172a, #0b1120, #010614, #000000);
  color: #ffffff;
}

.light-mode {
  background:
    radial-gradient(circle at top center, rgba(153, 171, 201, 0.5) 0%, transparent 90%),
    linear-gradient(to bottom, #d8d8d8, #e1e1e1, #ededed, #ffffff);
  color: #000000;
}

body.light-mode .item {
  color: #000000;
}

body.dark-mode .item {
  color: #ffffff;
}

#preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #121212;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #fff;
  border-top: 4px solid transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.navbar {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.6rem 1.2rem;
  border-radius: 999px;
  display: flex;
  justify-content: center;
  z-index: 1000;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0.6rem 1.2rem;
  border-radius: 999px;
  list-style: none;
  margin: 0;
}

.scrolledDark {
  background: #1b2233;
}

.scrolledLight {
  background: #d3d3d3;
}

.item {
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s;
  cursor: pointer;
}

.item:hover {
  color: #565678;
}

.selected-item {
  color: #005d88 !important;
}

.perfil {
  font-family: 'Segoe UI', sans-serif;
  max-width: 805px;
  margin: 0 auto;
  margin-top: 100px;
  padding: 40px 20px;
  scroll-margin-top: 50px;
}

.estado-laboral {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.avatar {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  object-fit: cover;
  filter: brightness(75%);
}

.disponible {
  position: relative;
  overflow: hidden;
  background-color: #1f2937;
  color: #a7f3d0;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.9rem;
  border: 1px solid #10b981;
  cursor: pointer;
  text-decoration: none;
}

.disponible::before {
  content: "";
  position: absolute;
  top: 0;
  left: -75%;
  width: 50%;
  height: 100%;
  background: linear-gradient(120deg,
      rgba(255, 255, 255, 0.2) 0%,
      rgba(255, 255, 255, 0.6) 50%,
      rgba(255, 255, 255, 0.2) 100%);
  transform: skewX(-20deg);
}

.disponible:hover::before {
  animation: shine 1s ease forwards;
}

@keyframes shine {
  from {
    left: -75%;
  }

  to {
    left: 125%;
  }
}

h1 {
  font-size: 2.5rem;
  margin: 10px 0;
}

.descripcion {
  font-size: 1.2rem;
  line-height: 1.6;
}

.resaltado {
  color: #d4ad13;
  font-weight: bold;
}

.botones {
  margin-top: 20px;
  display: flex;
  gap: 15px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: 9999px;
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  transition: background 0.3s;
}

.contacto {
  background-color: #1e293b;
  color: white;
  border: 1px solid #334155;
}

body.light-mode .contacto {
  background-color: #d8d8d8;
  color: #000000;
  border: 1px solid #b9b9b9;
}

.linkedin {
  background-color: #1e293b;
  color: white;
  border: 1px solid #334155;
}

body.light-mode .linkedin {
  background-color: #d8d8d8;
  color: #000000;
  border: 1px solid #b9b9b9;
}

.btn:hover {
  background-color: #334155;
}

body.light-mode .btn:hover {
  background-color: #cdcdcd;
}

.experiencia-laboral {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 20px;
  font-family: sans-serif;
  scroll-margin-top: 50px;
}

.experiencia-laboral h2 {
  font-size: 28px;
  font-weight: bold;
  margin-bottom: 40px;
  text-align: center;
}

.linea-tiempo {
  position: relative;
  padding-left: 30px;
  border-left: 1px solid;
}

.item0 {
  margin-bottom: 40px;
  position: relative;
}

.punto {
  width: 12px;
  height: 12px;
  background-color: #d4ad13;
  border-radius: 50%;
  position: absolute;
  left: -36px;
  top: 4px;
}

.contenido .titulo {
  color: #d4ad13;
  font-weight: bold;
  font-size: 18px;
}

.empresa {
  margin: 5px 0;
  font-size: 14px;
}

.fecha {
  font-style: italic;
  font-size: 13px;
}

.experience-description {
  margin-top: 8px;
  font-size: 15px;
  line-height: 1.6;
}

.proyectos {
  margin-left: auto;
  margin-right: auto;
  max-width: 940px;
  width: 100%;
  font-family: 'Segoe UI', sans-serif;
  scroll-margin-top: 85px;
}

.proyecto {
  display: flex;
  gap: 1rem;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
  text-align: left;
  justify-content: center;
  margin-left: 45px;
}

.preview {
  width: 100%;
  max-width: 420px;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
}

.content {
  flex: 1;
  min-width: 260px;
  max-width: 420px;
}

.content h3 {
  margin-top: -4px;
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
  font-weight: bold;
}

.etiquetas {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.8rem;
  flex-wrap: wrap;
}

.tag {
  color: #fff;
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  font-size: 0.8rem;
}

.content p {
  line-height: 1.6;
  margin-bottom: 1rem;
  color: #cbd5e1;
  font-size: 0.95rem;
  margin-top: -5px;
}

body.light-mode .content p {
  color: #3c3f42;
}

.buttons {
  display: flex;
  gap: 0.8rem;
}

.btns {
  background: #1e293b;
  color: white;
  padding: 0.5rem 0.6rem;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.3s ease;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid white;
}

body.light-mode .btns {
  background-color: #d8d8d8;
  color: #000000;
  border: 1px solid #b9b9b9;
}

body.light-mode .btns:hover {
  background-color: #cdcdcd;
}

.btns:hover {
  background: #334155;
}

.title {
  font-size: 28px;
  font-weight: bold;
  margin: 0 0 40px 0;
  text-align: center;
}

.title-projects {
  font-size: 28px;
  font-weight: bold;
  margin-bottom: 40px;
  text-align: center;
}

.marco-imagen {
  background: radial-gradient(circle at top left,
      rgba(90, 73, 174, 0.3) 0%,
      rgb(56, 56, 56) 60%),
    radial-gradient(circle at bottom right,
      rgba(73, 128, 206, 0.3) 0%,
      rgb(60, 60, 60) 60%);
  width: 420px;
  height: 250px;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  background-color: #1e1e2f;
}

.imagen-ajustada {
  width: 525px;
  height: auto;
  position: absolute;
  bottom: 0;
  right: 0;
  transform: translate(28%, 15%);
  border-radius: 12px;
  transition: transform 0.4s ease;
}

.proyecto:hover .imagen-ajustada {
  transform: translate(0, 0px);
}

.fa-html5 {
  color: #e54c21;
}

.fa-css3-alt {
  color: #1a62b0;
}

.fa-js {
  color: #f7df1e;
}

.fa-node-js {
  color: #90c53f;
}

.fa-bootstrap {
  color: #7509f6;
}

.html {
  background-color: #48180b;
}

.css {
  background-color: #0c2b4d;
}

.js {
  background-color: #473f08;
}

.node {
  background-color: #3d541b;
}

.bootstrap {
  background-color: #220347;
}

.fa-envelope {
  margin-bottom: -2px;
}

.fa-linkedin {
  margin-bottom: -1px;
  color: #007fbc;
}

.tecnologias {
  text-align: center;
  padding: 2rem;
  margin: 80px 0 0 60px;
  font-family: 'Segoe UI', sans-serif;
  scroll-margin-top: 52px;
}

.titulo-tecnologias {
  font-size: 28px;
  font-weight: bold;
  margin: 0 50px 2rem 0;
}

.description {
  color: #ccc;
  max-width: 880px;
  margin: 0 auto;
  margin-bottom: 2rem;
  text-align: left;
}

body.light-mode .description {
  color: #3c3f42;
}

.contenedor {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  justify-content: center;
  max-width: 880px;
  margin: 0 auto;
}

.caja {
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 1rem;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
  user-select: none;
}

body.light-mode .caja {
  color: #3c3f42;
}

.caja:hover {
  box-shadow: 0 0 20px 4px rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

.caja h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.caja ul {
  list-style: none;
  padding: 0;
}

.caja ul li {
  margin: 0.5rem 0;
}

.herramientas {
  grid-column: span 2;
}

.iconos {
  display: flex;
  flex-wrap: wrap;
  gap: 2.5rem;
  justify-content: center;
  padding: 0;
  list-style: none;
}

.extend {
  gap: 4rem;
}

.iconos li {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.iconos i {
  margin-bottom: 0.5rem;
}

.iconos span {
  font-size: 0.9rem;
}

.eximg {
  height: 70px;
  width: auto;
  margin-bottom: 3px;
}

.vsc {
  height: 55px;
  width: auto;
  margin: 7px 0 12px 0;
}

.fa-jira {
  margin-top: 2px;
  color: #0e65df;
}

.fa-npm {
  color: #d50000;
}

.footer {
  display: flex;
  justify-content: center;
  padding: 1rem 2rem;
  color: #ccc;
  font-size: 0.9rem;
}

.footer a {
  text-decoration: none;
  margin-left: 1.5rem;
  transition: color 0.3s ease;
}

.footer a:hover {
  color: white;
}

.footer-left,
.footer-right {
  display: flex;
  align-items: center;
}

.footer-left {
  margin-left: 60px;
}

.footer-right {
  margin-left: 420px;
  user-select: none;
  cursor: pointer;
}

body.light-mode .footer {
  color: #3c3f42;
}

body.light-mode .footer a:hover {
  color: #61666a;
}

.box-title {
  font-family: 'Poppins', sans-serif;
  font-size: 2.5rem;
  font-weight: 700;
  background: linear-gradient(180deg, #ffffff, #888c96);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

body.light-mode .box-title {
  background: linear-gradient(180deg, #1a1a1a, #6b5959);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

@media (max-width: 600px) {
.navbar {
    top: 0;
    padding: 0;
    border-radius: 1px;
    left: 0;
    transform: translateX(0);
  }

  .nav-links {
    gap: 1rem;
    border-radius: 0px;
  }

  .perfil {
    margin-top: 40px;
    scroll-margin-top: 30px;
  }

  .botones {
    flex-wrap: wrap;
  }

  #iconCanvas {
    display: none;
  }

  .proyectos {
    margin-top: 80px;
  }

  .proyecto {
    margin: 0;
    padding: 0 20px;
  }

  .footer-right {
    display: none;
  }

  .marco-imagen {
    background: radial-gradient(circle at top left,
        rgba(90, 73, 174, 0.3) 0%,
        rgb(56, 56, 56) 60%),
      radial-gradient(circle at bottom right,
        rgba(73, 128, 206, 0.3) 0%,
        rgb(60, 60, 60) 60%);
    width: 420px;
    height: 200px;
    border-radius: 12px;
    overflow: hidden;
    background-color: #1e1e2f;
  }

  .imagen-ajustada {
    width: 420px;
    height: 200px;
    border-radius: 12px;
    transform: translate(0, 0px);
  }

  .tecnologias {
    margin: 0;
    margin-top: 70px;
    padding: 1rem;
    scroll-margin-top: 70px;
  }

  .titulo-tecnologias {
    margin: 0;
    margin-bottom: 35px;
  }

  .fa-4x {
    font-size: 3em !important;
  }

  .eximg {
    height: 50px;
    width: auto;
  }

  .vsc {
    height: 40px;
  }

  .ex {
    height: 53px;
  }

  .contenedor {
    display: block;
    gap: 1rem;
  }

  .caja {
    padding: 2px 0;
    margin: 20px 0;
  }

  .footer {
    padding: 0;
    margin-top: -20px;
  }

  .footer-left {
    margin-left: 0px;
  }

  .experiencia-laboral {
    padding: 0 20px;
    margin-top: 40px;
    scroll-margin-top: 90px;
  }

  body.light-mode .navbar {
    background: #d3d3d3;
  }

  body.dark-mode .navbar {
    background: #1b2233;
  }

  .iconos {
    gap: 4rem;
  }

  .li-jira {
    padding-left: 15px;
  }

  .nginx {
    margin-bottom: 10px;
  }

  .bash {
    margin-bottom: 10px;
  }

  .lang {
    margin-left: 15px;
  }
}