* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Overlock", Arial, Helvetica, sans-serif;
  background: linear-gradient(135deg, #f5f7fa, #e4ecf7);
  color: rgba(44, 44, 44, 0.87);
}

/* NAV */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 40px;
}

.logo {
  font-size: 2.9rem;
  letter-spacing: 1.5px;
  color: rgba(45, 44, 44, 0.93);
}

.logo a {
  text-decoration: none;
  color: inherit;
  font-size: 3.9rem;
  font-family: "DM Serif Text", Arial, Helvetica, sans-serif;
  font-style: italic;
}

.logo p {
  display: flex;
  font-size: 1.2rem;
  font-family: "DM Serif Text", Arial, Helvetica, sans-serif;
}

nav ul {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 30px;
  padding: 30px 40px;
  list-style: none;
  text-shadow: 1px 1px 5px rgb(255, 255, 255);
}

nav ul a {
  background: white;
  padding: 10px 25px;
  border-radius: 10px;
  color: rgba(28, 28, 28, 0.85);
  text-decoration: none;
  transition: all 0.3s ease;
  display: inline-block;
}

nav ul a:hover {
  color: #ff3636f5;
  transform: scale(1.08);
}

/* HERO GENERAL */
.hero {
  min-height: calc(100vh - 80px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 40px 60px;
  gap: 60px;
}

/* IZQUIERDA */
.carousel-section {
  flex: 1;
}

/* CONTENEDOR DEL CARRUSEL */
.carousel-wrapper {
  display: flex;
  align-items: center;
  gap: 20px;
}

.carousel {
  position: relative;
  width: 420px;
  height: 420px;
}

/* ESTILO BASE DE TARJETAS */
.card {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 330px;
  height: 400px;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(1, 0, 0, 0.2);
  transition: all 0.5s ease;
}

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

/* TARJETA CENTRAL */
.card.center {
  transform: translate(-50%, -50%) scale(1.1);
  z-index: 2;
  opacity: 1;
  filter: grayscale(5%);
}

/* TARJETA IZQUIERDA */
.card.left {
  transform: translate(-95%, -50%) scale(0.88);
  z-index: 1;
  opacity: 0.45;
  filter: grayscale(100%);
}

/* MODOS OSCURO/CLARO */
body.dark {
  background: #121212;
  color: #f5f5f5;
}

body.dark .logo,
body.dark .logo a,
body.dark .logo p,
body.dark .about-text p,
body.dark nav ul,
body.dark .skills h2,
body.dark .contact h2
 {
  color: #ddd;
}

#theme-toggle {
  border: none;
  background: #484848e7;
  color: #fff;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: 0.3s ease;
}

#theme-toggle:hover {
  transform: scale(1.1);
}

/* BOTONES */
.nav-btn {
  border: none;
  width: 42px;
  height: 42px;
  border-radius: 75%;
  background-color: #e9e9e9;
  color: #000000;
  font-size: 1.8rem;
  cursor: pointer;
  position: relative;
  z-index: 10;
  transition: 0.5s ease;
}

.nav-btn:hover {
  background-color: #d8d8d8;
  transform: scale(1.08);
}

/* TEXTO DERECHA */
.about-text {
  flex: 1;
  max-width: 500px;
}

.about-text h2 {
  font-size: 2rem;
  margin-bottom: 12px;
  color: rgba(4, 4, 4, 0.92);
  text-shadow: 1px 1px 5px rgb(255, 255, 255);
}

.about-text p {
  font-size: 1.2rem;
  line-height: 1.6;
  color: rgba(40, 40, 40, 0.9);
}

/* SKILLS */
.skills {
  margin-top: 80px;
  padding: 40px 20px;
  text-align: center;
}

.skills h2 {
  font-size: 2.6rem;
  margin-bottom: 35px;
  color: #505050e4;
  text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.764);
}

.skills-icons {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 40px;
}

.skills-icons i {
  font-size: 45px;
  color: #424242e4;
  transition: transform 0.5s ease, color 0.1s ease;
}

.skills-icons i:hover {
  transform: scale(1.5);
  color: #ff3636f5;
  filter: drop-shadow(1px 1px 3px #ffa9a9);
}

/* CONTACTO */
.contact {
  margin-top: 100px;
  padding: 60px 25px;
  text-align: center;
}

.contact-container {
  display: flex;
  justify-content: center;
  gap: 30px;
}

.contact h2 {
  font-size: 2.4rem;
  margin-bottom: 40px;
  color: #424242e4;
  text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.764);
}

.contact-icon {
  background: white;
  border-radius: 15px;
  padding: 10px;
  display: inline-block;
  font-size: 2rem;
  color: #424242e4;
  transition: transform 0.5s ease, color 0.1s ease;
  filter: drop-shadow(1px 1px 3px #444444);
  text-decoration: none;
}

.contact-icon:hover {
  transform: scale(1.5);
  color: #3a3a3af5;
}

/* Tablet */
@media (max-width: 900px) {
  .hero {
    flex-direction: column;
    text-align: center;
    gap: 40px;
    padding: 30px 20px;
  }

  .navbar {
    padding: 15px 20px;
  }

  nav ul {
    gap: 15px;
    padding: 0;
  }

  .logo a {
    font-size: 2.5rem;
  }

  .logo p {
    font-size: 1rem;
  }

  .carousel {
    width: 320px;
    height: 360px;
  }

  .card {
    width: 250px;
    height: 300px;
  }

  .card.left {
    transform: translate(-85%, -50%) scale(0.85);
  }

  .about-text {
    max-width: 100%;
  }

  .about-text p {
    font-size: 1.1rem;
  }

  .skills-icons {
    gap: 25px;
  }

  .skills-icons i {
    font-size: 35px;
  }

  .contact-container {
    gap: 20px;
  }
}

/* MÓVIL */
@media (max-width: 768px) {
  .navbar {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1rem;
    text-align: center;
  }

  .logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
  }

  .logo a {
    font-size: clamp(1.9rem, 7vw, 2.5rem);
    line-height: 1.1;
    text-align: center;
    display: inline-block;
  }

  .logo p {
    font-size: 1rem;
    margin: 0;
    text-align: center;
    opacity: 0.8;
  }

  .navbar ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.8rem;
    padding: 0;
    margin: 0;
    list-style: none;
  }

  .navbar ul li a {
    display: inline-block;
    padding: 0.7rem 1rem;
    font-size: 1rem;
  }

  #theme-toggle {
    width: 36px;
    height: 36px;
    padding: 0.7rem 0.9rem;
    font-size: 1rem;
  }

  .hero {
    min-height: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.5rem 1rem 2rem;
    gap: 2rem;
  }

  .carousel-section {
    width: 100%;
  }

  .carousel-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    width: 100%;
  }

  .carousel {
    position: relative;
    width: 240px;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
  }

  .card {
    position: absolute;
    width: 180px;
    height: 240px;
    border-radius: 20px;
    overflow: hidden;
  }

  .card.center {
    z-index: 2;
    transform: translate(-50%, -50%) scale(1);
  }

  .card.left {
    z-index: 1;
    opacity: 0.35;
    transform: translate(-85%, -50%) scale(0.85);
  }

  .nav-btn {
    width: 38px;
    height: 38px;
    font-size: 1.5rem;
    flex-shrink: 0;
  }

  .about-text {
    width: 100%;
    max-width: 100%;
    padding: 0 0.5rem;
  }

  .about-text h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
  }

  .about-text p {
    font-size: 1rem;
    line-height: 1.7;
  }

  .skills {
    margin-top: 40px;
    padding: 2rem 1rem;
    text-align: center;
  }

  .skills h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
  }

  .skills-icons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
  }

  .skills-icons i {
    font-size: 2rem;
  }

  .contact {
    margin-top: 50px;
    padding: 2rem 1rem;
    text-align: center;
  }

  .contact h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
  }

  .contact-container {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
  }

  .contact-icon {
    font-size: 2rem;
  }
}
