/* ====================================================================================================================================================
    Estilos CSS Globales para toda la pagina
   ==================================================================================================================================================== */

/* Imports de los demas CSS */

@import "var.css";
@import "hero.css";
@import "about.css";
@import "skills.css";
@import "projects.css";
@import "contact.css";
@import  "footer.css";

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    transition: var(--transition);
}

html, body {
    max-width: 100%;
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

/* ====================================================================================================================================================
   Secciones de la pagina
   ==================================================================================================================================================== */

section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 60px;
    position: relative;
    color: var(--primary-color);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

/* ====================================================================================================================================================
    Botones Generales de la pagina
   ==================================================================================================================================================== */

/* Botones Generales */

.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Boton para repositorio (modal proyectos) */

.btn-repository {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: var(--primary-color);
    color: white;
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    margin-top: 20px;
    transition: var(--transition);
}

.btn-repository:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
}

.btn-repository-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: var(--primary-color);
    color: white;
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    margin-top: 20px;
    transition: var(--transition);
}

.btn-repository-secondary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
}

/* Boton de enviar mensaje (Contacto) */

.btn-submit {
    width: 100%;
    background-color: var(--primary-color);
    color: white;
    font-weight: 600;
    padding: 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
}

.btn-submit:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Botón Ver Proyectos (Header) */

.btn-ver-proyectos {
    position: relative;
    padding: 15px 30px;
    border-radius: 8px;
    border: none;
    color: #fff;
    cursor: pointer;
    background: linear-gradient(45deg, #7d2ae8, #a45deb);
    transition: all 0.3s ease;
    text-decoration: none;
    font-weight: 600;
    font-size: 1em;
    text-align: center;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(125, 42, 232, 0.3);
    min-width: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 50px;
}

.btn-ver-proyectos:hover {
    background: linear-gradient(45deg, #a45deb, #7d2ae8);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(125, 42, 232, 0.4);
}

.btn-ver-proyectos:active {
    transform: translateY(1px);
}

.btn-ver-proyectos::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transition: 0.5s;
}

.btn-ver-proyectos:hover::before {
    left: 100%;
}

/* Botón Mi CV (Header) */

.btn-cv {
    position: relative;
    padding: 15px 30px;
    border-radius: 8px;
    border: none;
    color: #fff;
    cursor: pointer;
    background: linear-gradient(45deg, #51469A, #6a5fb8);
    transition: all 0.3s ease;
    text-decoration: none;
    font-weight: 600;
    font-size: 1em;
    text-align: center;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(81, 70, 154, 0.3);
    min-width: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    height: 50px;
}

.btn-cv:hover {
    background: linear-gradient(45deg, #6a5fb8, #51469A);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(81, 70, 154, 0.4);
}

.btn-cv:active {
    transform: translateY(1px);
}

.btn-cv:hover .filePage {
    transform: translateY(-5px);
}

.btn-cv:hover .fileFront {
    transform: rotateX(30deg) translateY(-2px);
}

.btn-cv::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transition: 0.5s;
}

.btn-cv:hover::before {
    left: 100%;
}

/* Estilos para el botón de mockup (Modal proyectos) */

.btn-mockup {
    background: linear-gradient(135deg, #6e8efb, #a777e3);
}

.btn-mockup i {
    margin-right: 8px;
}

.btn-mockup:hover {
    background: linear-gradient(135deg,#a777e3 , #6e8efb);
}

/* Botones del project Modal (conjunto) */

.modal-project-buttons {
    display: flex;
    gap: 25px;
    margin-top: auto;
}

/* ====================================================================================================================================================
     Barra de navegacion
   ==================================================================================================================================================== */

/* Navbar general */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--bg-color);
    box-shadow: var(--shadow);
    z-index: 1000;
    transition: var(--transition);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px; 
}

/* Navbar Links */

.nav-links {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-links a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    position: relative;
}

.nav-links a:hover {
    color: var(--primary-color);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-image: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    transition: var(--transition);
}

.nav-links a:hover::after {
    width: 100%;
}

/* Enlaces activos de la navbar */

.nav-links a.active {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: #fff;
  padding: 6px 12px;
  border-radius: 4px;
  transition: var(--transition);
}

/* linea debajo de los enlaces de la navbar */

.nav-links a.active::after {
  background-image: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}


/* Hamburger Menu - navbar responsive */

.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    padding: 0;
}

.hamburger span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--text-color);
    transition: var(--transition);
}

/* ====================================================================================================================================================
    Logotipo
   ====================================================================================================================================================*/

/* Logo en el Header */

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--primary-color);
}

.logo-img {
    display: inline-block;
    width: 40px; 
    height: 40px;
    background-image: url('../img/profile/profile.jpg');
    background-size: cover;
    background-position: center;
    border-radius: 50%;
    flex-shrink: 0;
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.logo-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.logo-subtitle {
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--text-light);
    margin-top: 2px;
}

/* Logo en el footer */

.footer-brand .logo {
    font-size: 2rem;
    margin-bottom: 15px;
}

/* ====================================================================================================================================================
     Folder de ver mi CV From: universe.io
   ==================================================================================================================================================== */
   
        .folderContainer {
            width: 24px;
            height: 24px;
            position: relative;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .fileBack, .filePage, .fileFront {
            position: absolute;
            transition: all 0.3s ease;
        }

        .fileBack {
            width: 24px;
            height: auto;
            z-index: 1;
        }

        .filePage {
            width: 14px;
            height: auto;
            z-index: 2;
            bottom: 2px;
        }

        .fileFront {
            width: 20px;
            height: auto;
            z-index: 3;
            bottom: 1px;
        }

/* ====================================================================================================================================================
    Linea divisora entre secciones
   ==================================================================================================================================================== */

/* Divisor entre secciones */

.section-divider {
  position: relative;
  height: 80px; 
  background: transparent; 
  margin: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Línea degradada extendida */

.section-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 5%;
    width: 90%;
    height: 5px;
    background: linear-gradient(
        to right,
        transparent 0%,
        var(--primary-color) 50%,
        transparent 100%
    );
    transform: translateY(-50%);
}

.section-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 12px;
    height: 12px;
    background: linear-gradient(
        135deg,
        var(--primary-color),
        var(--secondary-color)
    );
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.2);
    transform: translate(-50%, -50%);
}

/* ====================================================================================================================================================
     Boton Claro oscuro From: Universe.io
   ==================================================================================================================================================== */

.switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 34px;
}

.switch #theme-toggle {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #2196f3;
  -webkit-transition: 0.4s;
  transition: 0.4s;
  z-index: 0;
  overflow: hidden;
}

.sun-moon {
  position: absolute;
  content: "";
  height: 26px;
  width: 26px;
  left: 4px;
  bottom: 4px;
  background-color: yellow;
  -webkit-transition: 0.4s;
  transition: 0.4s;
}

#theme-toggle:checked + .slider {
  background-color: black;
}

#theme-toggle:focus + .slider {
  box-shadow: 0 0 1px #2196f3;
}

#theme-toggle:checked + .slider .sun-moon {
  -webkit-transform: translateX(26px);
  -ms-transform: translateX(26px);
  transform: translateX(26px);
  background-color: white;
  -webkit-animation: rotate-center 0.6s ease-in-out both;
  animation: rotate-center 0.6s ease-in-out both;
}

.moon-dot {
  opacity: 0;
  transition: 0.4s;
  fill: gray;
}

#theme-toggle:checked + .slider .sun-moon .moon-dot {
  opacity: 1;
}

.slider.round {
  border-radius: 34px;
}

.slider.round .sun-moon {
  border-radius: 50%;
}

#moon-dot-1 {
  left: 10px;
  top: 3px;
  position: absolute;
  width: 6px;
  height: 6px;
  z-index: 4;
}

#moon-dot-2 {
  left: 2px;
  top: 10px;
  position: absolute;
  width: 10px;
  height: 10px;
  z-index: 4;
}

#moon-dot-3 {
  left: 16px;
  top: 18px;
  position: absolute;
  width: 3px;
  height: 3px;
  z-index: 4;
}

#light-ray-1 {
  left: -8px;
  top: -8px;
  position: absolute;
  width: 43px;
  height: 43px;
  z-index: -1;
  fill: white;
  opacity: 10%;
}

#light-ray-2 {
  left: -50%;
  top: -50%;
  position: absolute;
  width: 55px;
  height: 55px;
  z-index: -1;
  fill: white;
  opacity: 10%;
}

#light-ray-3 {
  left: -18px;
  top: -18px;
  position: absolute;
  width: 60px;
  height: 60px;
  z-index: -1;
  fill: white;
  opacity: 10%;
}

.cloud-light {
  position: absolute;
  fill: #eee;
  animation-name: cloud-move;
  animation-duration: 6s;
  animation-iteration-count: infinite;
}

.cloud-dark {
  position: absolute;
  fill: #ccc;
  animation-name: cloud-move;
  animation-duration: 6s;
  animation-iteration-count: infinite;
  animation-delay: 1s;
}

#cloud-1 {
  left: 30px;
  top: 15px;
  width: 40px;
}

#cloud-2 {
  left: 44px;
  top: 10px;
  width: 20px;
}

#cloud-3 {
  left: 18px;
  top: 24px;
  width: 30px;
}

#cloud-4 {
  left: 36px;
  top: 18px;
  width: 40px;
}

#cloud-5 {
  left: 48px;
  top: 14px;
  width: 20px;
}

#cloud-6 {
  left: 22px;
  top: 26px;
  width: 30px;
}

.stars {
  transform: translateY(-32px);
  opacity: 0;
  transition: 0.4s;
}

.star {
  fill: white;
  position: absolute;
  -webkit-transition: 0.4s;
  transition: 0.4s;
  animation-name: star-twinkle;
  animation-duration: 2s;
  animation-iteration-count: infinite;
}

#theme-toggle:checked + .slider .stars {
  -webkit-transform: translateY(0);
  -ms-transform: translateY(0);
  transform: translateY(0);
  opacity: 1;
}

#star-1 {
  width: 20px;
  top: 2px;
  left: 3px;
  animation-delay: 0.3s;
}

#star-2 {
  width: 6px;
  top: 16px;
  left: 3px;
}

#star-3 {
  width: 12px;
  top: 20px;
  left: 10px;
  animation-delay: 0.6s;
}

#star-4 {
  width: 18px;
  top: 0px;
  left: 18px;
  animation-delay: 1.3s;
}

/* ====================================================================================================================================================
     Animaciones generales
   ==================================================================================================================================================== */

/* Animacion de parpadeo de estrellas para claro-oscuro boton */

@keyframes star-twinkle {
  0% {
    transform: scale(1);
  }

  40% {
    transform: scale(1.2);
  }

  80% {
    transform: scale(0.8);
  }

  100% {
    transform: scale(1);
  }
}

/* Animacion de movimiento de las nubes para claro-oscuro boton */

@keyframes cloud-move {
  0% {
    transform: translateX(0px);
  }

  40% {
    transform: translateX(4px);
  }

  80% {
    transform: translateX(-4px);
  }

  100% {
    transform: translateX(0px);
  }
}

/* ====================================================================================================================================================
   Reponsive Desing
   ==================================================================================================================================================== */

@media (max-width: 1200px) {
    .projects-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 30px;
    }
    
    .modal-body {
        gap: 30px;
    }
    
    .contact-container {
        max-width: 90%;
        gap: 50px;
    }
}

@media (max-width: 992px) {
    .hero .container {
        flex-direction: column;
    }
    
    .hero-content {
        text-align: center;
        flex: 1;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .contact-container {
        grid-template-columns: 1fr;
        gap: 40px;
        max-width: 95%;
        padding: 35px 30px;
    }
    
    .whatsapp-buttons {
        align-items: stretch;
    }
    
    .whatsapp-btn {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background-color: var(--bg-color);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 30px;
        transition: var(--transition);
    }
    
    .nav-links.active {
        left: 0;
    }
    
    .hamburger {
        display: flex;
    }
    
    .hamburger.active span:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }
    
    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active span:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }
    
    .hero-title, .section-title, .animated-title h2 {
        font-size: 2.5rem ;
    }
    
    .animated-title h2 span:nth-child(3) {
        font-size: 0.25em;
        letter-spacing: 0.3em;
    }
    
    .animated-border-card {
        width: 100%;
        max-width: 350px;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 15px;
    }
    
    .btn-ver-proyectos, .btn-cv {
        width: 100%;
        max-width: 250px;
        margin: 0 auto;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .modal-content {
        padding: 30px 20px;
        max-height: 95vh;
    }
    
    .modal-title {
        font-size: 1.8rem;
    }
    
    .modal-images {
        height: 350px;
    }
    
    .modal-images-section {
        padding: 20px;
    }
    
    .modal-project-buttons {
        flex-direction: column;
    }
    
    .btn-repository {
        width: 180px;
    }
    
    .filter-btn span {
        display: none;
    }
    
    .filter-btn {
        padding: 12px;
        width: 50px;
        height: 50px;
        justify-content: center;
    }
    
    .project-tech span {
        font-size: 0.7rem;
        padding: 5px 10px;
    }
    
    .tech-logo-card {
        width: 12px;
        height: 12px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }
    
    .footer-brand {
        align-items: center;
    }
    
    .social-links {
        justify-content: center;
    }
    
    .footer-nav a {
        justify-content: center;
    }
    
    .contact-container {
        padding: 30px 25px;
        gap: 35px;
        max-width: 95%;
    }
    
    .whatsapp-btn {
        max-width: 100%;
    }
    
    .tech-info {
        opacity: 0;
        pointer-events: none;
        transform: translateX(-50%);
    }
    
    .floating-tech-info {
        position: fixed;
        z-index: 9999;
        max-width: 90%;
        width: auto;
        left: 50%;
        transform: translateX(-50%);
        background: var(--bg-secondary);
        color: var(--text-color);
        padding: 12px;
        border-radius: 10px;
        box-shadow: 0 8px 30px rgba(0,0,0,0.25);
        transition: opacity 0.18s ease, transform 0.18s ease, top 0.18s ease;
        pointer-events: auto;
    }
    
    .card {
        width: 280px;
        height: 360px;
    }
    
    .heading {
        font-size: 22px;
    }
    
    .tech-tag.active .tech-info {
        opacity: 1;
        transform: translateX(-50%) translateY(-5px);
        pointer-events: auto;
    }
    
    .main-content {
        flex: 1;
        overflow-y: auto;
        overflow-x: hidden;
        max-height: calc(100% - 10px);
    }
    
    .card-footer {
        flex-shrink: 0;
        margin-top: auto;
    }
    
    .modal-content {
        display: flex;
        flex-direction: column;
        padding: 15px;
        max-height: 90vh;
    }
    
    .modal-body {
        display: flex;
        flex-direction: column;
    }
    
    .modal-images {
        width: 100%;
        max-width: 100%;
        margin-right: 0;
        float: none;
    }
    
    .modal-description {
        order: 2;
        flex: 1;
    }
    
    .modal-project-buttons {
        order: 3;
        display: flex;
        flex-direction: column;
        gap: 15px;
        margin-top: auto;
        padding-top: 15px;
        border-top: 1px solid var(--border-color);
    }
    
    .modal-images img {
        width: 100%;
        height: auto;
        max-height: 100%;
        object-fit: contain;
    }

        .projects-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .project-card {
        height: 200px;
    }

     .project-card.show-hover::before {
        opacity: 0.85;
    }

    .project-card.show-hover .project-image img {
        filter: blur(5px) brightness(0.7);
    }

    .project-card.show-hover .project-content {
        opacity: 1;
        transform: translateY(0);
    }

    .project-image {
        padding: 0;
    }

    .project-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    
    .project-content {
        padding: 20px;
    }

    .project-content h3 {
        font-size: 1.1rem;
    }

    .project-description {
        font-size: 0.85rem;
    }

    .project-tech .tech-logo-card {
        width: 24px;
        height: 24px;
    }
    
    .modal-content {
        padding: 25px;
    }
    
    .modal-title {
        font-size: 1.6rem;
    }
    
    .modal-images {
        height: 300px;
    }
}

@media (max-width: 576px) {
    section {
        padding: 60px 0;
    }
    
    .hero {
        padding: 120px 0 80px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .btn {
        width: 100%;
    }
    
    .contact-container {
        padding: 25px 20px;
        max-width: 95%;
        gap: 30px;
    }
    
    .whatsapp-btn {
        padding: 12px 15px;
        font-size: 0.9rem;
    }
    
    .contact-info h3 {
        font-size: 1.5rem;
    }
    
    .whatsapp-options h3 {
        font-size: 1.3rem;
    }
    
    .typing {
        width: 100%;
        max-width: 100%;
        white-space: normal;
        overflow: visible;
        text-align: center;
        font-size: 1.5rem;
        margin: 0 auto;
    }
}

@media (max-width: 480px) {
    .animated-title h2 {
        font-size: 2em;
    }
    
    .btn-ver-proyectos, .btn-cv {
        font-size: 0.9em;
        padding: 12px 20px;
        height: 46px;
    }
    
    .project-image {
        height: 200px;
    }
    
    .modal-images {
        height: 280px;
    }
    
    .carousel-btn {
        width: 40px;
        height: 40px;
    }
    
    .project-tech {
        gap: 6px;
    }
    
    .project-tech span {
        font-size: 0.65rem;
        padding: 4px 8px;
    }

    .project-card {
        height: 200px;
    }

    .project-image {
        padding: 12px;
    }

    .project-content {
        padding: 15px;
    }

    .project-content h3 {
        font-size: 1rem;
    }

    .project-description {
        font-size: 0.8rem;
    }

    .project-tech .tech-logo-card {
        width: 22px;
        height: 22px;
    }

    .btn-view-more {
        font-size: 0.85rem;
    }
}