/* Variables */
:root {
    --primary: #64ffda;
    --secondary: #060924;
    --dark: #01050c;
    --light: #ccd6f6;
    --gray: #8892b0;
    --dark-bg: rgba(10, 25, 47, 0.85);
    --light-bg: rgba(255, 255, 255, 0.85);
}


/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--secondary);
    color: var(--light);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Partículas */
#particles-js {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: -1;
}

/* Efecto Matrix */
#matrix {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.15;
}

/* Navbar */
.navbar {
    position: fixed;
    width: 100%;
    padding: 1.5rem 0;
    background-color: var(--dark-bg);
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    box-shadow: 0 10px 30px -10px rgba(2, 12, 27, 0.7);
}

.logo {
    font-family: 'JetBrains Mono', monospace;
    color: var(--primary);
    font-size: 1.5rem;
    font-weight: 700;
    text-decoration: none;
}

.code-icon {
    color: var(--primary);
}

.nav-links {
    display: flex;
    list-style: none;
    align-items: center;
}

.nav-links li a {
    color: var(--light);
    text-decoration: none;
    margin-left: 2rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.nav-links li a:hover {
    color: var(--primary);
}

.nav-number {
    color: var(--primary);
    margin-right: 0.3rem;
}

.theme-btn {
    background: transparent;
    border: none;
    color: var(--light);
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.theme-btn:hover {
    color: var(--primary);
    transform: rotate(30deg);
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    padding: 0 10%;
    position: relative;
}

.hero-content {
    max-width: 800px;
}

.greeting {
    color: var(--primary);
    font-family: 'JetBrains Mono', monospace;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.typing-effect {
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--light);
}

.subtitle {
    font-size: clamp(1.5rem, 4vw, 3rem);
    color: var(--gray);
    margin-bottom: 1.5rem;
}

.highlight {
    color: var(--primary);
    position: relative;
}

.highlight::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.5s ease;
}

.highlight:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.hero-desc {
    max-width: 600px;
    margin-bottom: 2rem;
    font-size: 1.1rem;
    line-height: 1.6;
}

.hero-btns {
    display: flex;
    gap: 1.5rem;
    margin-top: 2rem;
}

.btn {
    display: inline-block;
    padding: 1rem 1.8rem;
    border-radius: 4px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: var(--primary);
    color: var(--secondary);
    border: 1px solid var(--primary);
}

.btn-primary:hover {
    background-color: transparent;
    color: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(100, 255, 218, 0.2);
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary);
    border: 1px solid var(--primary);
}

.btn-secondary:hover {
    background-color: rgba(100, 255, 218, 0.1);
    transform: translateY(-3px);
}

.scroll-down {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--light);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    animation: bounce 2s infinite;
}

.scroll-down i {
    margin-top: 0.5rem;
    font-size: 1.2rem;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0) translateX(-50%); }
    40% { transform: translateY(-20px) translateX(-50%); }
    60% { transform: translateY(-10px) translateX(-50%); }
}

/* Sections */
.section {
    padding: 6rem 0;
    position: relative;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 2rem;
    color: var(--light);
    margin-bottom: 3rem;
    position: relative;
    display: flex;
    align-items: center;
}

.section-title::after {
    content: '';
    display: block;
    width: 300px;
    height: 1px;
    background-color: var(--gray);
    margin-left: 1rem;
    opacity: 0.3;
}

/* About Section */
.about-content {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 3rem;
    align-items: center;
}

.about-text p {
    margin-bottom: 1.5rem;
    color: var(--gray);
    line-height: 1.6;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-top: 2rem;
}

.skill-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.skill-icon {
    color: var(--primary);
    font-size: 1.2rem;
}

.about-image {
    position: relative;
    max-width: 300px;
    margin: 0 auto;
}

.profile-img {
    width: 100%;
    border-radius: 20px;
    position: relative;
    z-index: 1;
    transition: all 0.3s ease;
}

.about-image:hover .profile-img {
    filter: none;
    width: 110%;
}


.about-image:hover .glow-effect {
    opacity: 0.5;
    transform: translate(10px, 10px);
}

/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.project-card {
    perspective: 1000px;
    height: 400px;
}

.project-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.8s;
    transform-style: preserve-3d;
}

.project-card:hover .project-inner {
    transform: rotateY(180deg);
}

.project-front, .project-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 10px 30px -15px rgba(2, 12, 27, 0.7);
}

.project-front {
    background-color: var(--dark);
    display: flex;
    flex-direction: column;
}

.project-front img {
    width: 100%;
    height: 70%;
    object-fit: cover;
}

.project-front h3 {
    padding: 1.5rem;
    color: var(--light);
    font-size: 1.2rem;
    text-align: center;
    background-color: rgba(10, 25, 47, 0.8);
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-back {
    background-color: var(--dark);
    padding: 2rem;
    transform: rotateY(180deg);
    display: flex;
    flex-direction: column;
}

.project-back h3 {
    color: var(--light);
    margin-bottom: 1rem;
}

.project-back p {
    color: var(--gray);
    margin-bottom: 1.5rem;
    flex: 1;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.project-tech span {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: var(--gray);
}

.project-links {
    display: flex;
    gap: 1rem;
}

.btn-link {
    color: var(--primary);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.btn-link:hover {
    color: var(--light);
}

/* Contact Section */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-top: 2rem;
}

.contact-info h3 {
    font-size: 1.5rem;
    color: var(--light);
    margin-bottom: 1.5rem;
}

.contact-info p {
    color: var(--gray);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.contact-details {
    margin-bottom: 2rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    color: var(--light);
}

.contact-item i {
    color: var(--primary);
    font-size: 1.2rem;
}

.social-links {
    display: flex;
    gap: 1.5rem;
}

.social-icon {
    color: var(--light);
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.social-icon:hover {
    color: var(--primary);
    transform: translateY(-3px);
}

.contact-form {
    background-color: var(--dark-bg);
    padding: 2rem;
    border-radius: 5px;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px -15px rgba(2, 12, 27, 0.7);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    background-color: rgba(100, 255, 218, 0.1);
    border: 1px solid var(--gray);
    border-radius: 4px;
    color: var(--light);
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(100, 255, 218, 0.2);
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

/* WhatsApp Float */
.whatsapp-float {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    background-color: #25D366;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    z-index: 100;
    transition: all 0.3s ease;
}

.whatsapp-float:hover {
    transform: scale(1.1) translateY(-5px);
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.4);
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background-color: var(--dark-bg);
        backdrop-filter: blur(10px);
        flex-direction: column;
        align-items: center;
        padding-top: 3rem;
        transition: all 0.5s ease;
    }

    .nav-links.active {
        left: 0;
    }

    .nav-links li {
        margin: 1.5rem 0;
    }

    .nav-links li a {
        margin-left: 0;
        font-size: 1.2rem;
    }

    .menu-toggle {
        display: block;
        font-size: 1.5rem;
        cursor: pointer;
    }

    .hero {
        padding: 0 5%;
        text-align: center;
    }

    .hero-btns {
        justify-content: center;
    }

    .about-content {
        grid-template-columns: 1fr;
    }

    .contact-content {
        grid-template-columns: 1fr;
    }

    .section-title::after {
        display: none;
    }
}
/* Navbar - Header */
.navbar {
    display: flex;
    align-items: center; /* Centra verticalmente todos los elementos */
    justify-content: space-between; /* Separa logo y menú */
    padding: 1.5rem 10%; /* Ajusta el padding horizontal */
    background-color: var(--dark-bg);
    position: fixed;
    width: 100%;
    z-index: 1000;
}

.logo {
    font-size: 1.8rem;
    display: flex;
    align-items: center; /* Centra verticalmente el logo */
    height: 100%;
}

.nav-links {
    display: flex;
    list-style: none;
    align-items: center; /* Centra verticalmente los enlaces */
    height: 100%;
    margin: 0;
    padding: 0;
}

.nav-links li {
    margin-left: 2rem;
}

.nav-links li a {
    display: flex;
    align-items: center;
    height: 100%;
}

/* Hero Section - Ajuste de espaciado */
.hero-content {
    padding-top: 6rem; /* Asegura espacio para el navbar */
}

.greeting {
    margin-bottom: 0.5rem; /* Reduce el espacio entre "Hola..." y tu nombre */
}

.typing-effect {
    margin-top: 0; /* Elimina cualquier margen superior */
}

/* Skills Section */
.skills-container {
    margin-top: 3rem;
    text-align: center;
}

.skills-container h3 {
    font-family: 'JetBrains Mono', monospace;
    color: var(--light);
    margin-bottom: 2rem;
    font-size: 1.2rem;
    position: relative;
    display: inline-block;
}

.skills-container h3::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 2rem;
    max-width: 600px;
    margin: 0 auto;
}

.skill-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.3s ease;
}

.skill-card:hover {
    transform: translateY(-5px);
}

.skill-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
}

.skill-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0) 60%);
}

/* Colores específicos para cada tecnología */
.skill-icon.html {
    background-color: #E34F26;
    color: white;
}

.skill-icon.css {
    background-color: #264DE4;
    color: white;
}

.skill-icon.js {
    background-color: #F7DF1E;
    color: #323330;
}

.skill-icon.php {
    background-color: #777BB3;
    color: white;
}

.skill-name {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    color: var(--light);
    font-weight: 500;
}



.form-message {
    margin-top: 1rem;
    padding: 0.5rem;
    border-radius: 4px;
    display: none;
}

.form-message.success {
    display: block;
    background-color: rgba(46, 204, 113, 0.2);
    color: #2ecc71;
    border: 1px solid #2ecc71;
}

.form-message.error {
    display: block;
    background-color: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
    border: 1px solid #e74c3c;
}

/* Mobile Menu Button and Navbar (Revised) */
@media (max-width: 768px) {
    .navbar {
        padding: 1rem 5%;
    }
    
    .menu-toggle {
        display: flex !important; /* Forzar visualización  */
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        cursor: pointer;
        z-index: 1001;
        color: var(--primary);
        font-size: 1.5rem;
        background: rgba(100, 255, 218, 0.1);
        border-radius: 4px;
        border: 1px solid var(--primary);
    }
    
    /* More Specific Targeting */
    .nav-links {
        position: fixed;
        top: 80px; /* Match Navbar height */
        left: -100%;
        width: 80%;
        height: calc(100vh - 80px); /* Match Navbar height */
        background-color: var(--secondary);
        flex-direction: column;
        justify-content: center;
        padding: 2rem;
        transition: all 0.5s ease;
        z-index: 1000;
    }
    
    .nav-links.active {
        left: 0;
        box-shadow: 10px 0 30px rgba(0,0,0,0.5);
    }
    
    .nav-links li {
        margin: 1rem 0;
    }
    
    .nav-links li a {
        font-size: 1.2rem;
        padding: 0.5rem 0;
    }
    
    /* Asegurar que el contenido no se desplace cuando el menú está abierto  */
    body.menu-open {
        overflow: hidden;
    }
}

/* Hide menu toggle on larger screens  */
.menu-toggle {
    display: none;
}







/* Skills Section */
.skills-container {
    margin-top: 3rem;
    text-align: center;
}

.skills-container h3 {
    font-family: 'JetBrains Mono', monospace;
    color: var(--light);
    margin-bottom: 2rem;
    font-size: 1.2rem;
    position: relative;
    display: inline-block;
}

.skills-container h3::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 100%;
    height: 2px; /* Default height */
    background-color: var(--primary);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 2rem;
    max-width: 600px;
    margin: 0 auto;
}

/* ... (Rest of your Skills Section CSS) */

/* Responsive Adjustment for Skills Section */
@media (max-width: 768px) {
    /* Increased Specificity! */
    #about .container .about-content .skills-container h3::after {
        height: 1px !important; /* Thinner line on smaller screens */
    }

    /* You can add other responsive adjustments here if needed, 
       like reducing font-size or padding */
}

/* About Section - Responsive Fix */
@media (max-width: 768px) {
    .about-content {
        display: flex;
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }

    .about-text {
        order: 2; /* Mueve el texto debajo de la imagen */
    }

    .about-image {
        order: 1; /* Mueve la imagen arriba del texto */
        max-width: 250px;
        margin: 0 auto 2rem;
    }

    .skills-container h3::after {
        width: 50%; /* Reduce el ancho de la línea decorativa */
        left: 25%; /* Centra la línea */
    }

    .skills-grid {
        grid-template-columns: repeat(2, 1fr); /* Mantiene 2 columnas */
        gap: 1rem;
    }

    .skill-icon {
        width: 60px;
        height: 60px;
        font-size: 2rem;
    }
}

/* Ajustes adicionales para pantallas muy pequeñas */
@media (max-width: 480px) {
    .about-image {
        max-width: 200px;
    }

    .skills-grid {
        grid-template-columns: 1fr; /* Una sola columna */
    }
}
