/* -------Estilos por Defecto---------- */
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;700&display=swap");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

html {
  scroll-behavior: smooth;
}

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

ul {
  list-style: none;
}
h1,
h2,
h3,
h4 {
  line-height: 1.2;
}
input,
textarea,
button {
  border: 0;
}

img {
  display: block;
}

p {
  line-height: 1.6;
}
.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ------------Header------------ */
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 5%;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 10;
  background: transparent;
  transition: background 0.3s ease, backdrop-filter 0.3s ease;
}
header.scrolled {
  backdrop-filter: blur(16px);
  background: rgba(255, 255, 255, 0.5);
}
.logo {
  font-size: 1.75rem;
  color: #333;
  font-weight: 650;
  margin-right: -30px;
}

.logo span {
  color: #b43ece;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  background: #fff;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.15);
  padding: 0.75rem 2rem;
  border-radius: 2rem;
}
.header-buttons {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.download-btn {
  padding: 1rem 2rem;
  border-radius: 2rem;
  background: rgb(24, 118, 242);
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.dark-mode-btn {
  font-size: 1.75rem;
  background: transparent;
  cursor: pointer;
}

/* Iconos en móviles */
.menu-bars,
.close-menu {
  display: none;
}
/*Capa oscura en móviles*/
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: 100vw;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 20; /* Debe estar debajo del nav (que tiene z-index: 10) */
  opacity: 0;
  visibility: hidden;
  transition: 0.3s ease-in-out;
}
.overlay.active {
  opacity: 1;
  visibility: visible;
}
/* Barra de Navegación en Móviles */
@media (max-width: 768px) {
  .nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: min(250px, 100%);
    background-color: #fff;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 30;
    padding: 1rem 0rem;
    transition: right 0.3s ease-in-out;
  }
  nav.active {
    right: 0;
  }
  .nav-links {
    flex-direction: column;
    width: 100%;
    gap: 0;
    overflow: auto;
    scrollbar-width: thin;
    /* scrollbar-width: none; */
    padding: 0.5rem 0.1rem;
    box-shadow: none;
    border-radius: 0;
    align-items: start;
  }
  .nav-links li {
    width: 100%;
  }
  .nav-links a {
    display: flex; /* en vez de inline-flex */
    align-items: center;
    gap: 1.2rem;
    width: 100%;
    padding: 0.9rem 1rem;
    color: #333;
  }
  .nav-links li:hover a {
    background-color: #efefef;
  }
  .menu-bars,
  .close-menu {
    display: block;
    font-size: 1.75rem;
    border: 0;
    background-color: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
  }
  .close-menu {
    align-self: flex-end;
    margin-right: 10px;
  }
}
/* -------------Hero-------------- */
.hero {
  max-width: 800px;
  min-height: 100vh;
  width: 100%;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 1.5rem;
}
.hero .socials a {
  background: transparent;
  color: #1876f2;
  border: 1px solid #1876f2;
  transition: 0.3s ease-in-out;
  font-size: 1.25rem;
  width: 45px;
  height: 45px;
}
.hero .socials a:hover {
  background: #1876f2;
  color: #fff;
}

/*
.radial-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(125% 125% at 50% 90%, #fff 40%, #6366f1 100%);
}
*/
.hero-title {
  font-size: clamp(1.5rem, 2vw + 1rem, 3rem);
  font-weight: 500;
}
.hero-title span {
  color: #1876f2;
}
.hero-subtitle {
  font-size: clamp(0.9rem, 1.3vw, 1.9rem);
  font-weight: 450;
}
.hero-description {
  font-size: clamp(0.9rem, 1.2vw, 1.9rem);
}
.profile-img {
  width: 125px;
  border-radius: 50%;
}

.cta-btns {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
}
/* ------------Estilos generales de las secciones------ */
section {
  scroll-margin-top: 6rem;
}
section h2 {
  font-size: clamp(1.4rem, 1.2vw + 1rem, 3rem);
}
.sections {
  display: flex;
  flex-direction: column;
  gap: 9rem; /* Espacio uniforme */
}
/* -------------About Me---------- */
.about {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}
.section-title {
  text-align: center;
}
.section-title h4,
.section-title h2 {
  font-weight: 400;
}

.about-content {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.about-profile-img {
  width: clamp(210px, 60vw, 1200px);
  border-radius: 8px;
  overflow: hidden;
}

.about-profile-img img {
  width: 100%;
  display: block;
}

.about-info {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.about-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1.7rem;
}

.card {
  padding: 2rem;
  border-radius: 1rem;
  border: 1px solid #ccc;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  cursor: pointer;
  transition: 0.5s;
}
.card:hover {
  background: #fff;
  transform: translateY(-1px);
  box-shadow: 4px 4px 0 #000;
}

.card img {
  width: 30px;
}

.card h4 {
  color: #374151;
}

.card span {
  color: #4b5563;
}

.about-tools-images {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.about-tools-images div {
  border: 1px solid #bbb;
  padding: 0.75rem;
  border-radius: 8px;
  cursor: pointer;
}
.about-tools-images img {
  width: 30px;
}

/* ------------Mis Proyectos----------- */
.proyects {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}
.proyects p {
  font-size: clamp(0.9rem, 1.2vw, 1.9rem);
  text-align: center;
}
.proyects-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.25rem;
}
.proyect-card {
  position: relative;
  cursor: pointer;
  overflow: hidden;
  border-radius: 8px;
}
.card-image {
  width: 100%;
  height: 350px;
  display: block;
  object-fit: cover;
}

.card-icon-container {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  border: 1px solid #333;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 3px 3px #000;
}

.card-icon {
  width: 18px;
}

.proyect-details {
  background: #fff;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 10px;
  padding: 0.9rem 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
  transition: 0.3s;
  border-radius: 0.5rem;
}

.proyect-details div {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.proyect-details h4 {
  font-size: 0.9rem;
}

.proyect-details span {
  font-size: 0.85rem;
}

.proyect-card:hover .proyect-details {
  bottom: 1rem;
}

.proyect-card:hover .card-icon-container {
  background: #bef264;
}

/* En móviles, una sola columna */
@media (max-width: 768px) {
  .contact-form {
    grid-template-columns: 1fr; /* Solo una columna */
  }

  .contact-form textarea,
  .contact-form button {
    grid-column: span 1; /* Ya no necesitan ocupar 2 */
  }
}

/* -------------Footer-------------- */
.footer {
  margin-top: 6rem;
}
.footer hr {
  height: 1px;
  background: #ccc;
  width: 100%;
  border: 0;
}
.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 0;
  gap: 1rem;
}
.socials {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.socials a {
  border: 1px solid #333;
  width: 40px;
  height: 40px;
  font-size: 1rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: 0.3s;
}

.socials a:hover {
  background: #333;
  color: #fff;
}

/* ------------Responsive design----------- */
@media (max-width: 1020px) {
  .contact-btn {
    display: none;
  }
  .about-content {
    flex-direction: column;
  }
  .tools-message {
    text-align: center;
  }
  .about-tools-images {
    justify-content: center;
  }
  .logo {
    font-size: 1.25rem;
  }
}
@media (max-width: 768px) {
  .footer-content {
    flex-direction: column;
  }
  .footer-content p {
    text-align: center;
  }
  .container {
    padding: 0 15px;
  }
  header {
    padding: 0.5rem 10px;
  }
  .profile-img {
    width: 100px;
  }
}

@media (max-width: 480px) {
  .cta-btns {
    flex-direction: column;

    width: 100%;
  }

  .cta-btns a {
    width: 100%; /* para que los botones/links ocupen todo el ancho */
    justify-content: center;
  }
}

/* ----------DarkMode----------- */
/* ===== MODO OSCURO ===== */
/* ===== MODO OSCURO ===== */
/* Estado inicial (modo claro) */

/* Pseudo-elemento para animar el cambio */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-color: rgb(2, 6, 23); /* Morado oscuro */
  clip-path: circle(
    0% at 100% 0
  ); /* Comienza desde la esquina superior derecha */
  z-index: -1;
  transition: clip-path 0.8s ease;
}

/* Cuando está activo el modo oscuro */
body.dark-mode::before {
  clip-path: circle(150% at 100% 0); /* Se expande cubriendo todo */
}

/* Colores de texto y demás estilos del modo oscuro */
body.dark-mode {
  color: #f5f5f5;
}

body.dark-mode header.scrolled {
  background: rgba(2, 6, 23, 0.5);
}

body.dark-mode .logo {
  color: #fff;
}

body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3 {
  color: #fff;
}

body.dark-mode p {
  color: #ddd;
}

body.dark-mode .nav-links {
  background: rgba(255, 255, 255, 0.1);
  box-shadow: none;
}

body.dark-mode .contact-btn,
body.dark-mode .hero-contact-btn,
body.dark-mode .download-btn {
  border-color: #fff;
  color: #fff;
}

body.dark-mode .card span {
  color: #fff;
}

body.dark-mode .card h4 {
  color: #fff;
}

body.dark-mode .proyect-card h4 {
  color: #333;
}

body.dark-mode .card:hover span {
  color: #333;
}
body.dark-mode .card:hover h4 {
  color: #333;
}

body.dark-mode .card:hover {
  box-shadow: none;
  transform: translateY(0);
}

body.dark-mode #darkModeToggle i {
  color: white;
}

body.dark-mode .menu-bars {
  color: #fff;
}

body.dark-mode .download-btn {
  border: 0;
  box-shadow: none;
}
