@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700&family=Share+Tech+Mono&display=swap');

@font-face {
  font-family: "Nitro Break";
  src: url("Fonts/Nitro_Break.otf") format("opentype");
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: "Deltha";
  src: url("Fonts/Deltha.ttf") format("opentype");
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: "Rajdhani";
  src: url("Fonts/Rajdhani.semibold.ttf") format("opentype");
  font-weight: normal;
  font-style: normal;
}

:root {
  --fondo: #120b21;
  --neon-1: #6ef5da;
  --neon-2: #e15252;
  --texto-principal: #E0D9F6;
}

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

body {
  font-family: 'Rajdhani', sans-serif;
  font-weight: bold;
  color: var(--texto-principal);
  background: var(--fondo);
  overflow-x: hidden;
  overflow-y: auto;
  min-height: 100vh;
  position: relative; 
}

canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1; 
  pointer-events: none; 
}

/* ======================
   VERTICAL NAVBAR
   ====================== */
#navbar {
  position: fixed;
  top: 3rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  display: flex;
  flex-direction: row; 
  gap: 1.5rem;
  justify-content: center;
  align-items: center;
  width: auto;
  flex-wrap: nowrap;
  max-width: 95%;
}

.nav-item {
  position: relative;
  background: var(--fondo);
  clip-path: polygon(25px 0%, 100% 0%, calc(100% + 8px) calc(100% - 25px), calc(100% - 17px) 100%, 0% 100%, 0% 25px);
  cursor: pointer;
  transition: all 0.3s ease;
  overflow: visible;
  min-width: 180px;
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: center;
  align-items: center;
}

.nav-item::before {
  content: '';
  position: absolute;
  inset: -2px;
  background: var(--neon-1);
  clip-path: polygon(25px 0%, 100% 0%, calc(100% + 8px) calc(100% - 25px), calc(100% - 17px) 100%, 0% 100%, 0% 25px);
  z-index: -1;
  transition: all 0.3s ease;
}

.nav-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--fondo);
  clip-path: polygon(27px 2px, calc(100% - 2px) 2px, calc(100% + 6px) calc(100% - 27px), calc(100% - 19px) calc(100% - 2px), 2px calc(100% - 2px), 2px 27px);
  z-index: -1;
}

.nav-item span {
  position: relative;
  z-index: 1;
  color: var(--neon-1);
  font-family: 'Deltha', sans-serif;
  font-size: 1.1rem;
  transition: all 0.3s ease;
}

.nav-item:hover {
  transform: translateX(10px);
}

.nav-item:hover::before {
  background: var(--neon-2);
}

.nav-item:hover span {
  color: var(--neon-2);
}

.nav-item.active::before {
  background: var(--neon-2);
}

.nav-item.active span {
  color: var(--neon-2);
}

/* === LÍNEAS DE ENCUADRE === */
.bg-lines {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100%;
  min-height: 100vh;
  pointer-events: none;
  z-index: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start; 
}

.bg-shape {
  position: absolute;
  top: 1.5rem;
  left: 0;
  width: 100vw;
  height: 100%;
  min-height: 100vh;
  z-index: -1;
}

.bg-fill-shape {
  fill: #13000677;
}

.bg-stroke {
  fill: none;
  stroke: var(--neon-2);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ======================
   MAIN CONTAINER
   ====================== */
#main-container {
  width: 100%;
  min-height: 100vh;
  position: relative;
  margin-left: 0;
  padding: 6rem 4rem 2rem 4rem; 
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* ======================
   SECTIONS
   ====================== */
.section {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.9);
  pointer-events: none;
  transition: opacity 0.5s ease, transform 0.5s ease;
  padding: 8rem 2rem 2rem 2rem;
}

.section.active {
  opacity: 1;
  transform: scale(1);
  pointer-events: all;
}

.section-content {
  max-width: 1400px;
  width: 100%;
}

/* ======================
   HOME SECTION
   ====================== */
#home {
  text-align: center;
}

#home h1 {
  font-family: 'Deltha', sans-serif;
  font-size: 7rem;
  color: var(--texto-principal);
  margin-bottom: 2.5rem;
  letter-spacing: 0.05em;
}

#home p {
  font-family: 'Deltha', sans-serif;
  font-size: 3rem;
  color: var(--neon-1);
  letter-spacing: 0.02em;
}

/* ======================
   ABOUT ME SECTION
   ====================== */
#sobre-mi .section-content {
  display: flex;
  justify-content: center;
  align-items: center;
}

.sobre-mi-texto {
  position: relative;
  background: var(--fondo);
  clip-path: polygon(25px 0%, 100% 0%, calc(100% + 8px) calc(100% - 25px), calc(100% - 17px) 100%, 0% 100%, 0% 25px);
  padding: 2.5rem;
  overflow: visible;
  max-width: 900px;
  width: 100%;
}

.sobre-mi-texto::before {
  content: '';
  position: absolute;
  inset: -2px;
  background: var(--neon-1);
  clip-path: polygon(25px 0%, 100% 0%, calc(100% + 8px) calc(100% - 25px), calc(100% - 17px) 100%, 0% 100%, 0% 25px);
  z-index: -1;
}

.sobre-mi-texto::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--fondo);
  clip-path: polygon(27px 2px, calc(100% - 2px) 2px, calc(100% + 6px) calc(100% - 27px), calc(100% - 19px) calc(100% - 2px), 2px calc(100% - 2px), 2px 27px);
  z-index: -1;
}

.sobre-mi-texto > * {
  position: relative;
  z-index: 1;
}

.sobre-mi-texto h2 {
  font-family: 'Deltha', sans-serif;
  color: var(--neon-1);
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  text-align: center;
}

.sobre-mi-texto p {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--texto-principal);
  margin-bottom: 1.2em;
  text-align: center;
}

/* Ocultar CV descarga */
.cv-descarga {
  display: none;
}

/* ======================
   SKILLS SECTION
   ====================== */
#habilidades .section-content {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 3rem;
}

.habilidades-columna {
  position: relative;
  background: var(--fondo);
  clip-path: polygon(25px 0%, 100% 0%, calc(100% + 8px) calc(100% - 25px), calc(100% - 17px) 100%, 0% 100%, 0% 25px);
  padding: 2rem;
  transition: transform 0.3s ease;
  overflow: visible;
}

.habilidades-columna::before {
  content: '';
  position: absolute;
  inset: -2px;
  background: var(--neon-1);
  clip-path: polygon(25px 0%, 100% 0%, calc(100% + 8px) calc(100% - 25px), calc(100% - 17px) 100%, 0% 100%, 0% 25px);
  z-index: -1;
  transition: all 0.3s ease;
}

.habilidades-columna::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--fondo);
  clip-path: polygon(27px 2px, calc(100% - 2px) 2px, calc(100% + 6px) calc(100% - 27px), calc(100% - 19px) calc(100% - 2px), 2px calc(100% - 2px), 2px 27px);
  z-index: -1;
}

.habilidades-columna:hover {
  transform: scale(1.05);
}

.habilidades-columna:hover::before {
  background: var(--neon-2);
}

.habilidades-columna > * {
  position: relative;
  z-index: 1;
}

.habilidades-columna h3 {
  font-family: 'Deltha', sans-serif;
  color: var(--neon-1);
  font-size: 2rem;
  margin-bottom: 1.5rem;
  transition: color 0.3s ease;
}

.habilidades-columna:hover h3 {
  color: var(--neon-2);
}

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

.habilidades-columna ul li {
  font-size: 1.2rem;
  margin-bottom: 1rem;
  padding-left: 1.5rem;
  position: relative;
}

/* ======================
   PROJECTS SECTION
   ====================== */
#proyectos .section-content {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
  position: relative;
}

/* Controles del carrusel de proyectos (ocultos por defecto) */
.proyectos-carousel-controls {
  display: none;
}

.proyectos-carousel-btn {
  background: var(--fondo);
  color: var(--neon-1);
  border: 2px solid var(--neon-1);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.5rem;
  transition: all 0.3s ease;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.proyectos-carousel-btn:hover:not(:disabled) {
  background: var(--neon-2);
  color: var(--fondo);
  border-color: var(--neon-2);
  box-shadow: 0 0 15px var(--neon-2);
}

.proyectos-carousel-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  border-color: var(--texto-principal);
  color: var(--texto-principal);
}

.proyectos-carousel-indicators {
  display: none;
  justify-content: center;
  gap: 0.8rem;
  margin-top: 2rem;
}

.proyectos-indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--texto-principal);
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.proyectos-indicator:hover {
  background: var(--neon-1);
  box-shadow: 0 0 8px var(--neon-1);
}

.proyectos-indicator.active {
  background: var(--neon-2);
  box-shadow: 0 0 12px var(--neon-2);
  border-color: var(--neon-2);
}

.proyecto {
  position: relative;
  background: var(--fondo);
  clip-path: polygon(25px 0%, 100% 0%, calc(100% + 8px) calc(100% - 25px), calc(100% - 17px) 100%, 0% 100%, 0% 25px);
  cursor: pointer;
  transition: transform 0.3s ease;
  overflow: visible;
  padding: 2rem;
}

.proyecto::before {
  content: '';
  position: absolute;
  inset: -2px;
  background: var(--neon-1);
  clip-path: polygon(25px 0%, 100% 0%, calc(100% + 8px) calc(100% - 25px), calc(100% - 17px) 100%, 0% 100%, 0% 25px);
  z-index: -1;
  transition: all 0.3s ease;
}

.proyecto::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--fondo);
  clip-path: polygon(27px 2px, calc(100% - 2px) 2px, calc(100% + 6px) calc(100% - 27px), calc(100% - 19px) calc(100% - 2px), 2px calc(100% - 2px), 2px 27px);
  z-index: -1;
}

.proyecto:hover {
  transform: scale(1.05);
}

.proyecto:hover::before {
  background: var(--neon-2);
}

.proyecto-info {
  position: relative;
  z-index: 1;
}

.proyecto-info h3 {
  color: var(--neon-1);
  font-family: 'Deltha', sans-serif;
  font-size: 1.5rem;
  margin-bottom: 1rem;
  transition: all 0.3s ease;
}

.proyecto:hover .proyecto-info h3 {
  color: var(--neon-2);
}

.proyecto-info p {
  font-size: 1.1rem;
  color: var(--texto-principal);
}

/* ======================
   TOOLS SECTION
   ====================== */
#tools .section-content {
  text-align: center;
}

#tools h2 {
  font-family: 'Deltha', sans-serif;
  color: var(--neon-1);
  font-size: 4rem;
  margin-bottom: 3rem;
}

.herramientas-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 3rem;
  max-width: 1100px;
  margin: 0 auto;
}

.herramienta-item {
  text-align: center;
  transition: transform 0.3s ease;
}

.herramienta-item img {
  width: 75px;
  height: 75px;
  object-fit: contain;
  border-radius: 8px;
  transition: transform 0.3s ease;
}

.herramienta-item:hover {
  transform: scale(1.15);
}

.herramienta-item:hover img {
  transform: scale(1.1);
}

.herramienta-item p {
  margin-top: 1rem;
  color: var(--texto-principal);
  font-size: 1.25rem;
  font-weight: bold;
}

/* ======================
   CONTACT SECTION
   ====================== */
#contacto .section-content {
  text-align: center;
}

#contacto h2 {
  font-family: 'Deltha', sans-serif;
  color: var(--neon-1);
  font-size: 4rem;
  margin-bottom: 2rem;
}

.contact-description {
  font-size: 1.5rem;
  color: var(--texto-principal);
  text-align: center;
  margin-bottom: 3rem;
  font-weight: normal;
}

.contact-response-time {
  font-size: 1.3rem;
  color: var(--neon-2);
  text-align: center;
  margin-top: 2rem;
  margin-bottom: 0;
  font-style: italic;
}

.contact-icons {
  display: flex;
  justify-content: center;
  gap: 3.5rem;
  flex-wrap: wrap;
}

.contact-icons img {
  width: 70px;
  height: 70px;
}

.contact-icons a {
  transition: transform 0.3s ease;
  display: inline-block;
}

.contact-icons a:hover {
  transform: scale(1.2);
}

/* ======================
   MODAL
   ====================== */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal.show {
  opacity: 1;
}

.modal-content {
  position: relative;
  background: var(--fondo);
  margin: 3% auto;
  padding: 0;
  width: 90%;
  max-width: 1200px;
  height: 85%;
  clip-path: polygon(30px 0%, 100% 0%, calc(100% + 10px) calc(100% - 30px), calc(100% - 20px) 100%, 0% 100%, 0% 30px);
  display: flex;
  flex-direction: column;
  transform: scale(0.8);
  transition: transform 0.3s ease;
  overflow: visible;
}

.modal-content::before {
  content: '';
  position: absolute;
  inset: -3px;
  background: var(--neon-1);
  clip-path: polygon(30px 0%, 100% 0%, calc(100% + 10px) calc(100% - 30px), calc(100% - 20px) 100%, 0% 100%, 0% 30px);
  z-index: -1;
}

.modal-content::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--fondo);
  clip-path: polygon(33px 3px, calc(100% - 3px) 3px, calc(100% + 7px) calc(100% - 33px), calc(100% - 23px) calc(100% - 3px), 3px calc(100% - 3px), 3px 33px);
  z-index: -1;
}

.modal-content > * {
  position: relative;
  z-index: 1;
}

.modal.show .modal-content {
  transform: scale(1);
}
.modal-header h2 {
  color: var(--neon-1);
  margin: 0;
  font-size: 2.5rem;
  font-family: 'Deltha', sans-serif;
}

.modal-body {
  flex: 1;
  padding: 2rem;
  overflow-y: auto;
}

.modal-body::-webkit-scrollbar {
  display: none;
}

.modal-body {
  -ms-overflow-style: none;  
  scrollbar-width: none;  
}

.info-block {
  position: relative;
  background: var(--fondo);
  padding: 1.5rem;
  clip-path: polygon(20px 0%, 100% 0%, calc(100% + 6px) calc(100% - 20px), calc(100% - 14px) 100%, 0% 100%, 0% 20px);
  margin-bottom: 1.5rem;
  overflow: visible;
}

.info-block::before {
  content: '';
  position: absolute;
  inset: -2px;
  background: var(--neon-1);
  clip-path: polygon(20px 0%, 100% 0%, calc(100% + 6px) calc(100% - 20px), calc(100% - 14px) 100%, 0% 100%, 0% 20px);
  z-index: -1;
}

.info-block::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--fondo);
  clip-path: polygon(22px 2px, calc(100% - 2px) 2px, calc(100% + 4px) calc(100% - 22px), calc(100% - 16px) calc(100% - 2px), 2px calc(100% - 2px), 2px 22px);
  z-index: -1;
}

.info-block h3 {
  color: var(--neon-1);
  font-family: 'Deltha', sans-serif;
  font-size: 1.5rem;
  margin-bottom: 1rem;
  position: relative;
  z-index: 1;
}

.info-block p, .info-block ul {
  color: var(--texto-principal);
  margin: 0;
  position: relative;
  z-index: 1;
  font-size: 1.1rem;
}

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

.info-block ul li {
  margin-bottom: 0.5rem;
  padding-left: 1rem;
  position: relative;
}

.project-link {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: transparent;
  border: 2px solid var(--neon-1);
  color: var(--neon-1);
  text-decoration: none;
  border-radius: 4px;
  font-weight: bold;
  transition: all 0.3s;
  margin: 0.3rem 0.5rem 0.3rem 0;
}

.project-link:hover {
  background: var(--fondo);
  border: 2px solid var(--neon-2);
  color: var(--neon-2);
  box-shadow: 0 0 15px var(--neon-2);
  transform: translateY(-2px);
}

/* ============================================================
   MODAL STYLES
   ============================================================ */
.modal-body {
  display: flex;
  gap: 2rem;
}

.modal-info {
  flex: 1;
  max-width: 50%;
}

.modal-media {
  flex: 1;
  max-width: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.modal-media img,
.modal-media video,
.modal-media iframe {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.modal-media iframe {
  width: 100%;
  height: 250px;
  aspect-ratio: 16/9;
}

.modal-media .placeholder {
  width: 100%;
  height: 200px;
  background-color: var(--fondo);
  border: 2px dashed var(--neon-3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--neon-3);
  font-style: italic;
  border-radius: 8px;
}

.image-carousel {
  position: relative;
  width: 100%;
  margin-top: 1rem;
}

.carousel-container {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 8px;
}

.carousel-image {
  width: 100%;
  height: auto;
  display: none;
}

.carousel-image.active {
  display: block;
}

.carousel-controls {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  display: flex;
  justify-content: space-between;
  padding: 0 0.5rem;
  pointer-events: none;
}

.carousel-btn {
  background: var(--fondo);
  backdrop-filter: blur(5px);
  color: var(--neon-1);
  border: 2px solid var(--neon-1);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.2rem;
  transition: all 0.3s ease;
  pointer-events: all;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-btn:hover:not(:disabled) {
  background: var(--neon-2);
  color: var(--fondo);
  border-color: var(--neon-2);
  box-shadow: 0 0 15px var(--neon-2);
}

.carousel-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  border-color: var(--neon-3);
  color: var(--neon-3);
}

.carousel-indicators {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1rem;
}

.indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--neon-3);
  cursor: pointer;
  transition: all 0.3s ease;
}

.indicator:hover {
  background: var(--neon-1);
  box-shadow: 0 0 5px var(--neon-1);
}

.indicator.active {
  background: var(--neon-2);
  box-shadow: 0 0 8px var(--neon-2);
}

/* Project preview image styles */
.proyecto-preview-image {
  width: 100%;
  height: 200px;
  overflow: hidden;
  margin-bottom: 1rem;
  position: relative;
  clip-path: polygon(15px 0%, 100% 0%, calc(100% + 5px) calc(100% - 15px), calc(100% - 10px) 100%, 0% 100%, 0% 15px);
}

.proyecto-preview-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.proyecto:hover .proyecto-preview-image img {
  transform: scale(1.1);
}

/* ======================
   RESPONSIVE DESIGN
   ====================== */

/* Tablets grandes y portátiles pequeños (max-width: 1200px) */
@media screen and (max-width: 1200px) {
  #navbar {
    gap: 1.2rem;
  }

  .nav-item {
    min-width: 150px;
    padding: 0.8rem 1.2rem;
  }

  .nav-item span {
    font-size: 1rem;
  }

  #main-container {
    padding: 6rem 3rem 2rem 3rem;
  }

  #home h1 {
    font-size: 6.5rem;
  }

  #home p {
    font-size: 3.2rem;
  }

  .sobre-mi-texto {
    max-width: 800px;
    padding: 2rem;
  }

  .sobre-mi-texto h2 {
    font-size: 2.2rem;
  }

  .sobre-mi-texto p {
    font-size: 1.05rem;
  }

  #proyectos .section-content {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }
}

/* Tablets (max-width: 992px) */
@media screen and (max-width: 992px) {
  #navbar {
    top: 2rem;
    gap: 1rem;
  }

  .nav-item {
    min-width: 140px;
    padding: 0.75rem 1rem;
  }

  .nav-item span {
    font-size: 0.95rem;
  }

  #main-container {
    padding: 8rem 2rem 2rem 2rem;
  }

  .section {
    padding: 10rem 1.5rem 2rem 1.5rem;
  }

  #home h1 {
    font-size: 5.5rem;
  }

  #home p {
    font-size: 2.8rem;
  }

  .sobre-mi-texto {
    max-width: 700px;
    padding: 2rem;
  }

  .sobre-mi-texto h2 {
    font-size: 2rem;
  }

  .sobre-mi-texto p {
    font-size: 1rem;
  }

  #habilidades .section-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  #proyectos .section-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  #tools h2,
  #contacto h2 {
    font-size: 3.5rem;
  }

  .herramienta-item img {
    width: 68px;
    height: 68px;
  }

  .herramienta-item p {
    font-size: 1.2rem;
  }

  .contact-description {
    font-size: 1.4rem;
  }

  .contact-response-time {
    font-size: 1.2rem;
  }

  .contact-icons img {
    width: 65px;
    height: 65px;
  }

  .modal-content {
    width: 95%;
    height: 90%;
    margin: 2% auto;
  }
}

/* Móviles grandes (max-width: 768px) */
@media screen and (max-width: 768px) {
  #navbar {
    top: 3.5rem;
    gap: 0.8rem;
    flex-wrap: wrap;
    max-width: 90%;
    justify-content: center;
  }

  .nav-item {
    flex: 0 0 calc(33.333% - 0.8rem);
    min-width: 110px;
    max-width: 150px;
    padding: 0.65rem 0.9rem;
  }

  .nav-item span {
    font-size: 0.85rem;
  }

  .nav-item:hover {
    transform: scale(1.05);
  }

  #main-container {
    padding: 6rem 1.5rem 2rem 1.5rem;
  }

  .section {
    padding: 8rem 1rem 2rem 1rem;
  }

  #home {
    padding: 6rem 1rem 2rem 1rem;
  }

  #home h1 {
    font-size: 4rem;
    margin-bottom: 1.5rem;
  }

  #home p {
    font-size: 2rem;
  }

  .sobre-mi-texto {
    max-width: 100%;
    padding: 1.8rem;
  }

  .sobre-mi-texto h2 {
    font-size: 1.8rem;
  }

  .sobre-mi-texto p {
    font-size: 0.95rem;
    line-height: 1.7;
  }

  /* Carrusel de proyectos para móviles */
  #proyectos .section-content {
    display: block;
    position: relative;
    padding: 0;
    max-width: 100%;
  }

  .proyecto {
    display: none;
    padding: 2.5rem 1.5rem;
    margin: 0 auto;
    max-width: 100%;
  }

  .proyecto.active {
    display: block;
  }

  .proyectos-carousel-controls {
    display: flex;
    justify-content: center;
    gap: 2rem;
    padding: 0 1.5rem;
    margin-bottom: 1.5rem;
    align-items: center;
  }

  .proyectos-carousel-btn {
    position: static;
    transform: none;
  }

  .proyectos-carousel-indicators {
    display: flex;
    padding: 0 1.5rem;
    margin-top: 1.5rem;
  }

  .proyecto-preview-image {
    height: 300px;
    margin-bottom: 1.5rem;
  }

  .proyecto-info h3 {
    font-size: 1.6rem;
    margin-bottom: 1rem;
  }

  .proyecto-info p {
    font-size: 1.15rem;
  }

  .habilidades-columna {
    padding: 1.8rem;
  }

  .habilidades-columna h3 {
    font-size: 1.7rem;
  }

  .habilidades-columna ul li {
    font-size: 1.05rem;
  }

  #tools h2,
  #contacto h2 {
    font-size: 3.2rem;
  }

  .herramientas-container {
    gap: 2.5rem;
  }

  .herramienta-item img {
    width: 62px;
    height: 62px;
  }

  .herramienta-item p {
    font-size: 1.15rem;
  }

  .contact-description {
    font-size: 1.3rem;
  }

  .contact-response-time {
    font-size: 1.15rem;
  }

  .contact-icons {
    gap: 2.5rem;
  }

  .contact-icons img {
    width: 65px;
    height: 65px;
  }

  .modal-body {
    flex-direction: column;
    gap: 1.5rem;
  }

  .modal-info,
  .modal-media {
    max-width: 100%;
    width: 100%;
  }

  .modal-content {
    height: 90%;
  }

  .modal-header h2 {
    font-size: 2rem;
  }

  .info-block h3 {
    font-size: 1.3rem;
  }

  .info-block p,
  .info-block ul {
    font-size: 1rem;
  }
}

/* Móviles medianos (max-width: 576px) */
@media screen and (max-width: 768px) {
  #navbar {
    top: 3.5rem;
    gap: 0.8rem;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, auto);
    max-width: 90%;
    width: 90%;
  }

  .nav-item {
    min-width: auto;
    width: 100%;
    padding: 0.65rem 0.9rem;
  }

  .nav-item span {
    font-size: 0.75rem;
  }

  #main-container {
    padding: 7rem 1rem 2rem 1rem;
  }

  .section {
    padding: 9rem 0.8rem 2rem 0.8rem;
  }

  #home {
    padding: 7rem 0.8rem 2rem 0.8rem;
  }

  .proyecto-preview-image {
    height: 280px;
  }

  .proyectos-carousel-btn {
    width: 45px;
    height: 45px;
    font-size: 1.3rem;
  }

  #home h1 {
    font-size: 3.2rem;
    margin-bottom: 1.2rem;
  }

  #home p {
    font-size: 1.8rem;
  }

  .sobre-mi-texto {
    padding: 1.5rem;
    clip-path: polygon(15px 0%, 100% 0%, calc(100% + 5px) calc(100% - 15px), calc(100% - 10px) 100%, 0% 100%, 0% 15px);
  }

  .sobre-mi-texto::before {
    clip-path: polygon(15px 0%, 100% 0%, calc(100% + 5px) calc(100% - 15px), calc(100% - 10px) 100%, 0% 100%, 0% 15px);
  }

  .sobre-mi-texto::after {
    clip-path: polygon(17px 2px, calc(100% - 2px) 2px, calc(100% + 3px) calc(100% - 17px), calc(100% - 12px) calc(100% - 2px), 2px calc(100% - 2px), 2px 17px);
  }

  .sobre-mi-texto h2 {
    font-size: 1.6rem;
  }

  .sobre-mi-texto p {
    font-size: 0.9rem;
  }

  .habilidades-columna,
  .proyecto {
    padding: 1.5rem;
    clip-path: polygon(15px 0%, 100% 0%, calc(100% + 5px) calc(100% - 15px), calc(100% - 10px) 100%, 0% 100%, 0% 15px);
  }

  .habilidades-columna::before,
  .proyecto::before {
    clip-path: polygon(15px 0%, 100% 0%, calc(100% + 5px) calc(100% - 15px), calc(100% - 10px) 100%, 0% 100%, 0% 15px);
  }

  .habilidades-columna::after,
  .proyecto::after {
    clip-path: polygon(17px 2px, calc(100% - 2px) 2px, calc(100% + 3px) calc(100% - 17px), calc(100% - 12px) calc(100% - 2px), 2px calc(100% - 2px), 2px 17px);
  }

  .habilidades-columna h3 {
    font-size: 1.5rem;
  }

  .habilidades-columna ul li {
    font-size: 0.95rem;
  }

  .proyecto-info h3 {
    font-size: 1.2rem;
  }

  .proyecto-info p {
    font-size: 0.95rem;
  }

  #tools h2,
  #contacto h2 {
    font-size: 2.8rem;
    margin-bottom: 1.5rem;
  }

  .herramientas-container {
    gap: 2rem;
  }

  .herramienta-item img {
    width: 58px;
    height: 58px;
  }

  .herramienta-item p {
    font-size: 1.1rem;
  }

  .contact-description {
    font-size: 1.15rem;
  }

  .contact-response-time {
    font-size: 1.05rem;
  }

  .contact-icons img {
    width: 58px;
    height: 58px;
  }

  .contact-icons {
    gap: 1.5rem;
  }

  .contact-icons img {
    width: 45px;
    height: 45px;
  }

  .modal-content {
    height: 92%;
  }

  .modal-content::before {
    clip-path: polygon(20px 0%, 100% 0%, calc(100% + 5px) calc(100% - 20px), calc(100% - 10px) 100%, 0% 100%, 0% 20px);
  }

  .modal-content::after {
    clip-path: polygon(22px 2px, calc(100% - 2px) 2px, calc(100% + 3px) calc(100% - 22px), calc(100% - 12px) calc(100% - 2px), 2px calc(100% - 2px), 2px 22px);
  }

  .modal-header {
    padding: 1.5rem;
  }

  .modal-header h2 {
    font-size: 1.7rem;
  }

  .modal-body {
    flex-direction: column;
    gap: 1.5rem;
    padding: 1.5rem;
  }

  .modal-info,
  .modal-media {
    max-width: 100%;
    width: 100%;
  }

  .info-block {
    padding: 1.2rem;
    margin-bottom: 1.2rem;
    clip-path: polygon(12px 0%, 100% 0%, calc(100% + 4px) calc(100% - 12px), calc(100% - 8px) 100%, 0% 100%, 0% 12px);
  }

  .info-block::before {
    clip-path: polygon(12px 0%, 100% 0%, calc(100% + 4px) calc(100% - 12px), calc(100% - 8px) 100%, 0% 100%, 0% 12px);
  }

  .info-block::after {
    clip-path: polygon(14px 2px, calc(100% - 2px) 2px, calc(100% + 2px) calc(100% - 14px), calc(100% - 10px) calc(100% - 2px), 2px calc(100% - 2px), 2px 14px);
  }

  .info-block h3 {
    font-size: 1.2rem;
  }

  .info-block p,
  .info-block ul {
    font-size: 0.9rem;
  }

  .project-link {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
  }
}

/* Móviles pequeños (max-width: 380px) */
@media screen and (max-width: 576px) {
  #navbar {
    top: 3rem;
    gap: 0.6rem;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, auto);
    max-width: 92%;
    width: 92%;
  }

  .nav-item {
    min-width: auto;
    width: 100%;
    padding: 0.55rem 0.7rem;
  }

  .nav-item span {
    font-size: 0.7rem;
  }

  #home {
    padding: 6rem 0.8rem 2rem 0.8rem;
  }

  #home h1 {
    font-size: 2.6rem;
  }

  #home p {
    font-size: 1.5rem;
  }

  .sobre-mi-texto {
    padding: 1.2rem;
  }

  .sobre-mi-texto h2 {
    font-size: 1.4rem;
  }

  .sobre-mi-texto p {
    font-size: 0.85rem;
  }

  .habilidades-columna h3 {
    font-size: 1.3rem;
  }

  .habilidades-columna ul li {
    font-size: 0.85rem;
  }

  .proyecto {
    padding: 2rem 1rem;
  }

  .proyecto-preview-image {
    height: 240px;
  }

  .proyecto-info h3 {
    font-size: 1.4rem;
  }

  .proyecto-info p {
    font-size: 1.05rem;
  }

  .proyectos-carousel-controls {
    justify-content: center;
    gap: 1.5rem;
    padding: 0 1rem;
    margin-bottom: 1.2rem;
  }

  .proyectos-carousel-indicators {
    padding: 0 1rem;
    margin-top: 1.2rem;
  }

  .proyectos-carousel-btn {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }

  #tools h2,
  #contacto h2 {
    font-size: 2.4rem;
  }

  .herramienta-item img {
    width: 52px;
    height: 52px;
  }

  .herramienta-item p {
    font-size: 1.05rem;
  }

  .contact-description {
    font-size: 1.05rem;
  }

  .contact-response-time {
    font-size: 0.95rem;
  }

  .contact-icons img {
    width: 52px;
    height: 52px;
  }

    .modal-body {
    flex-direction: column;
    gap: 1.2rem;
    padding: 1.2rem;
  }

  .modal-info,
  .modal-media {
    max-width: 100%;
    width: 100%;
  }

  .modal-content {
    height: 95%;
  }

  .modal-header {
    padding: 1.2rem;
  }

  .carousel-btn {
    width: 35px;
    height: 35px;
    font-size: 1rem;
  }

  .modal-header h2 {
    font-size: 1.5rem;
  }

  .info-block h3 {
    font-size: 1.1rem;
  }

  .info-block p,
  .info-block ul {
    font-size: 0.85rem;
  }
}