/* Estilo de la barra de desplazamiento */
::-webkit-scrollbar {
    width: 8px; /* Ancho de la barra */
    height: 5px; /* Altura de la barra (en caso horizontal) */
}

/* Color de fondo de la barra */
::-webkit-scrollbar-track {
    background: #1a1a2e; /* Color del fondo de la barra */
}

/* Color y diseño de la parte que se desplaza */
::-webkit-scrollbar-thumb {
    background: #3f3d56; /* Color del "pulgar" */
    border-radius: 10px; /* Bordes redondeados */
}

/* Efecto al pasar el cursor */
::-webkit-scrollbar-thumb:hover {
    background: #8B5CF6; /* Color al pasar el mouse */
}

/* Reset y estilos base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background-color: #030014;
    color: white;
    line-height: 1.6;
}

/* Navbar y Logo */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 50px;
    background-color: #030014;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.navbar .logo a {
    text-decoration: none;
    color: #8B5CF6;
    font-size: 1.5rem;
    font-weight: bold;
    transition: color 0.3s ease;
}

.navbar .logo a:hover {
    color: rgb(128, 128, 196);
}

/* Navegación principal */
.navbar nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
    margin: 0;
    padding: 0;
}

.navbar nav ul li a {
    text-decoration: none;
    color: white;
    font-size: 1rem;
    font-weight: bold;
    transition: color 0.3s ease;
}

.navbar nav ul li a.active,
.navbar nav ul li a:hover {
    color: rgb(128, 128, 196);
    text-decoration: underline;
}

/* Control de secciones */
.section {
    display: block;
    min-height: 100vh;
    background-color: black;
    padding-top: 80px; /* Espacio para el navbar fijo */
}


.section.active {
    display: block;
}

/* Sección Hero */
.hero {  
    background-color: #030014;
    padding: 150px 50px 0 50px; /* Reducido el padding inferior a 0 */
    min-height: 100vh;
    display: flex;
    align-items: center;  
}

.hero-content {
    max-width: 1200px;
    margin: 0;
    width: 100%;
    position: center;
    line-height: 1;   
    margin-bottom: -300px;
}

.hero-text {
    max-width: 700px;
}

.hero .title {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.2;
    margin: 0;
    background: linear-gradient(to right, #fff 0%, #8B5CF6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero .title2 {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.2;
    margin: 0;
    background: #8B5CF6;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}


.hero .subtitle {
    font-size: 1.5rem;
    color: #fcfcfd;
    margin: 0.5rem 0; 
    font-weight: 200;
}

.hero .description {
    color: #94A3B8;
    font-size: 1.1rem;
    line-height: 1.5;
    margin-bottom: 0.5rem;
    max-width: 600px;
}

.tech-tags {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.tech-tag {
    background: rgba(139, 92, 246, 0.1);
    color: #94A3B8;
    padding: 0.5rem 1rem;
    border-radius: 1rem;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.tech-tag:hover {
    background: rgba(139, 92, 246, 0.2);
    transform: translateY(-2px);
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.hero-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.5rem;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    background: rgba(20, 20, 40, 0.7);
    color: white;
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.hero-btn:hover {
    background: rgba(139, 92, 246, 0.2);
    transform: translateY(-2px);
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(20, 20, 40, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.social-link:hover {
    background: rgba(139, 92, 246, 0.2);
    transform: translateY(-2px);
}

.social-link img {
    width: 20px;
    height: 20px;
    filter: brightness(0) invert(1);
}

.hero-image {
    max-width: 35%; /* Ajusta el tamaño si es necesario */
    position: relative;
    top: -370px; /* Mueve el video más arriba */
    left: 720px; /* Mueve el video más a la izquierda */
    
    /*position: absolute; /* Sacar la imagen del flujo normal 
    top: 50%; /* Posicionar verticalmente en el centro 
    right: 10px; /* Posicionar a la derecha con un margen 
    transform: translateY(-50%); /* Centrar verticalmente 
    width: 310px; /* Mantener el tamaño 
    height: 310px; /* Mantener el tamaño 
    z-index: 0; /* Asegurar que la imagen esté detrás del texto */
}

/* Ajuste específico para el hero-content en móviles */
@media (max-width: 768px) {
    .hero-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }

    .hero-text {
        max-width: 100%;
        text-align: left;
        margin-bottom: 20px;
    }

    .hero-image {
        max-width: 100%;
        position: static;
        top: 0;
        left: 0;
        align-self: flex-start;
    }

    /* Mantener el mismo padding que en desktop */
    .hero {
        padding: 100px 50px 50px 50px;
    }

    /* Mantener el mismo padding en el navbar */
    .navbar {
        padding: 10px 25px;
    }
}

/* Sección About */
.about {
    min-height: 100vh;
    background-color: #030014;
    padding: 100px 50px;
    display: flex;
    flex-direction: column; /* Añadido para organizar el contenido verticalmente */
    align-items: center; /* Centrar contenido horizontalmente */
    margin-left: 0; /* Eliminado el margen negativo */
    padding-bottom: -100px; /* Reducir el espacio debajo */
}

.about h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 70px;
    color: #8B5CF6;;
    width: 100%; /* Asegurar que el título ocupe todo el ancho */
}

/* Reducir el interlineado de los párrafos */
.about-content h1 {
    line-height: 1; /* Reduce el espacio entre líneas de los títulos */
    margin-bottom: 10px; /* Reduce el espacio después de los títulos */
}

.about-content p {
    line-height: 1.3; /* Reduce el espacio entre líneas del párrafo */
    margin-bottom: 30px; /* Ajusta el espacio después del párrafo */
}

.about-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 60px;
    margin-left: 130px;
    position: relative;
    padding-right: 450px; /* Espacio para la imagen */
}

.about-text {
    flex: 1;
}

h1 {
    font-size: clamp(40px, 5vw, 70px);
    line-height: 1.2;
    margin-bottom: 30px;
}

.greeting {
    display: block;
    color: #8B5CF6;
    font-size: 0.7em;
    margin-bottom: 10px;
}

.name, .surname {
    display: block;
    color: white;
    font-weight: 600;
}

.description {
    color: #94A3B8;
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 40px;
    max-width: 600px;
}

.about-buttons {
    display: flex;
    gap: 20px;
}

.btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-primary {
    background-color: #8B5CF6;
    color: white;
}

.btn-primary:hover {
    background-color: #7C3AED;
}

.btn-secondary {
    background-color: rgba(139, 92, 246, 0.1);
    color: #8B5CF6;
}

.btn-secondary:hover {
    background-color: rgba(139, 92, 246, 0.2);
}

/* Estilo para la imagen del About */
.about-image {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    overflow: hidden;
    position: absolute;
    top: -25px;
    right: 100px;
    background: linear-gradient(145deg, rgba(139, 92, 246, 0.2), rgba(139, 92, 246, 0.1));
    box-shadow: 0 0 50px rgba(139, 92, 246, 0.3);
}

.about-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.profile-image {
    flex-shrink: 0;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    overflow: hidden;
    position: relative;
    background: linear-gradient(145deg, rgba(139, 92, 246, 0.2), rgba(139, 92, 246, 0.1));
    box-shadow: 0 0 50px rgba(139, 92, 246, 0.3);
}

.profile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Media Query para dispositivos móviles */
@media (max-width: 600px) {
    
    .about-content {
        display: flex;
        justify-content: center; /* Centra todo el contenido */
        align-items: center;
        padding: 20px;
        margin-left: 0;
    }

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

    h1 {
        margin-bottom: 20px;
    }

    .description{
        font-size: 16px;
        line-height: 1.5;
        text-align: justify; /* Justifica el texto */
        margin-bottom: 20px;
    }

    .about-buttons {
        flex-direction: column; /* Coloca los botones en una columna */
        gap: 10px; /* Ajusta el espacio entre botones */
    }

    .about-content h1{
        font-size: 4em; /* Reducir tamaño del título */
        text-align: center;
    }

    .about-image {
        position: absolute; /* O absolute dependiendo del contexto */
        top: -350px; /* Mueve la imagen 20px hacia abajo */ 
        margin-right: -110px;
        text-align: center;    
        align-self: center;
    }

    /* Título principal */
    .section.about h2 {
        font-size: 3em; /* Reducir tamaño del título */
        margin-bottom: 400px;
        text-align: center;
    }

    /* Subtítulo o descripción */
    .section.about .about-content .about-text h1 {
        font-size: 1.5em; /* Ajustar tamaño del texto */
        line-height: 1.2;
    }

    /*Mantener el mismo padding que en desktop*/ 
    .hero {
        padding: 100px 50px 50px 50px;
    }

    /* Mantener el mismo padding en el navbar*/ 
    .navbar {
        padding: 10px 25px;
    }
}

/* Sección Skills */
.skills {
    padding: 80px 50px;
    text-align: center;
    background-color: #030014;
}

.skills h2 {
    font-size: 2.5rem;
    margin-bottom: 50px;
    color: #8B5CF6;
}

.skills-category {
    margin-bottom: -80px;
}

.skills-category h3 {
    font-size: 1.8rem;
    color: #fff;
    margin-bottom: 30px;
    position: relative;
    display: inline-block;
    padding-bottom: 10px;
}

.skills-category h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 3px;
    background: linear-gradient(90deg, transparent, #8B5CF6, transparent);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr); /* Cambiado a 6 columnas */
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.skill-card {
    background: rgba(17, 17, 25, 0.9);
    border-radius: 15px;
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    overflow: hidden;
}

/* Efecto de resplandor base */
.skill-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 15px;
    background: transparent;
    transition: all 0.3s ease;
    z-index: 1;
}

/* Efecto de resplandor al hover */
.skill-card:hover::before {
    box-shadow: 
        0 0 20px rgba(139, 92, 246, 0.3),
        0 0 40px rgba(139, 92, 246, 0.2),
        0 0 60px rgba(139, 92, 246, 0.1);
}

/* Efecto de brillo en los bordes */
.skill-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(
        transparent,
        rgba(139, 92, 246, 0.1),
        transparent 30%
    );
    animation: rotate 4s linear infinite;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.skill-card:hover {
    transform: translateY(-5px);
    background: rgba(23, 23, 33, 0.95);
}

.skill-card:hover::after {
    opacity: 1;
}

@keyframes rotate {
    100% {
        transform: rotate(360deg);
    }
}

.skill-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
}

.skill-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.skill-card:hover .skill-icon img {
    transform: scale(1.1);
}

.skill-name {
    color: #fff;
    font-size: 1.1rem;
    font-weight: 500;
    margin: 0;
    position: relative;
    z-index: 2;
    transition: color 0.3s ease;
}

.skill-card:hover .skill-name {
    color: #8B5CF6;
}

/* Efecto de resplandor para los íconos */
.skill-icon::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(
        circle,
        rgba(139, 92, 246, 0.2) 0%,
        transparent 70%
    );
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.skill-card:hover .skill-icon::after {
    opacity: 1;
}

@media (max-width: 768px) {
    .skills-grid {
        grid-template-columns: repeat(3, 1fr); /* 3 columnas en tablets */
        gap: 15px;
        padding: 10px;
    }

    .skill-card {
        padding: 20px 15px;
    }

    .skill-icon {
        width: 50px;
        height: 50px;
    }

    .skill-name {
        font-size: 1rem;
    }

    .skills-category h3 {
        font-size: 1.5rem;
        margin-bottom: 20px;
    }

    .skills-category {
        margin-bottom: 40px;
    }
}

/* Menú hamburguesa */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 10px;
}

.bar {
    width: 25px;
    height: 3px;
    background-color: white;
    margin: 2px 0;
    transition: 0.4s;
}

/* Media Queries */
@media (max-width: 768px) {

    .skill-item::after {
        content: attr(data-language);
        position: absolute;
        bottom: -10px;
        left: 50%;
        transform: translateX(-50%);
        font-size: 0.9rem;
        color: white;
        padding: 8px 12px;
        border-radius: 5px;
        opacity: 0;
        transition: opacity 0.3s ease, bottom 0.3s ease;
    }
    
    .skill-item:hover::after {
        bottom: -10px;
        opacity: 1;
    }

    .navbar {
        padding: 15px 20px;
    }

    .menu-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: black;
        width: 100%;
        height: calc(100vh - 70px);
        transition: 0.3s;
        padding: 20px 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .navbar nav ul {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }

    .navbar nav ul li {
        width: 100%;
        text-align: center;
    }

    .navbar nav ul li a {
        display: block;
        padding: 10px;
    }

    .menu-toggle.active .bar:nth-child(1) {
        transform: rotate(-45deg) translate(-5px, 6px);
    }

    .menu-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.active .bar:nth-child(3) {
        transform: rotate(45deg) translate(-5px, -6px);
    }

    /* Ajustes responsive para About */
    .about-content {
        flex-direction: column;
        text-align: center;
    }

    .profile-image {
        margin: 0 auto;
    }

    /* Ajustes responsive para Hero */
    .hero {
        padding: 100px 50px;
    }

    .hero h1 {
        font-size: 2rem;
    }
}

/* Media query para pantallas muy pequeñas */
@media (max-width: 480px) {
    .navbar .logo a {
        font-size: 1.2rem;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    .about h2,
    .skills h2 {
        font-size: 2rem;
    }
}

/*Secsion de proyectos*/
.project {
    background-color: #030014;;
    min-height: 100vh;
    padding: 80px 50px;
    position: relative;
    z-index: 1;
    margin-bottom: -80px;
}

.project h1{   
    font-size: 2.5rem;
    margin-bottom: 50px;
    color: #8B5CF6;;
    text-align: center;  
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
    
}

.project-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    overflow: hidden;
    transition: transform 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    max-width: 450px;
    margin: 0 auto;
}

.project-card:hover {
    transform: translateY(-5px);
}

.project-image {
    width: 100%;
    height: 220px;
    object-fit: contain;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.02);
    
}

.project-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.project-title {
    color: #fff;
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.project-description {
    color: #a0a0a0;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.project-buttons {
    display: flex;
    gap: 1rem;
    margin-top: auto;
    
}

.project-btn {
    padding: 0.5rem 1rem;
    border-radius: 5px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    transition: background 0.3s ease;
}

.live-demo {
    background: rgba(108, 99, 255, 0.2);
    color: #6c63ff;
}

.live-demo:hover {
    background: rgba(108, 99, 255, 0.3);
}

.details {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.details:hover {
    background: rgba(255, 255, 255, 0.1);
}

@media (max-width: 767px) {
    .projects {
        padding: 1rem;
    }

    .projects-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 0;
    }

    .project-card {
        background: rgba(255, 255, 255, 0.05);
        border-radius: 15px;
        margin-bottom: 1rem;
    }

    .project-image {
        height: 180px;
    }

    .project-content {
        padding: 1.25rem;
    }

    .project-title {
        font-size: 1.2rem;
        margin-bottom: 0.5rem;
    }

    .project-description {
        font-size: 0.9rem;
        margin-bottom: 1.25rem;
        -webkit-line-clamp: 3;
    }

    .project-buttons {
        gap: 0.75rem;
    }

    .project-btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
}

/* Sección Contact */
.contact {
    padding: 80px 50px;
    background-color: #030014;
}

.contact h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: -10px;
    color: #8B5CF6;
}

.contact-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.contact-description {
    text-align: center;
    color: #94A3B8;
    margin-bottom: 30px;
    font-size: 1.1rem;
}

.contact-form {
    background: rgba(20, 20, 40, 0.7);
    padding: 30px;
    border-radius: 24px;
    margin-bottom: 40px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.form-group {
    margin-bottom: 20px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    background: rgba(30, 30, 50, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: white;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group textarea {
    height: 120px;
    resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #8B5CF6;
    box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.2);
}

.submit-btn {
    width: 100%;
    padding: 12px;
    background: #8B5CF6;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.submit-btn:hover {
    background: #7C3AED;
    transform: translateY(-2px);
}

.social-section {
    margin-top: 40px;
}

.social-section h3 {
    font-size: 1.5rem;
    color: white;
    margin-bottom: 20px;
    text-align: center;
}

.social-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.social-card {
    background: rgba(20, 20, 40, 0.7);
    padding: 16px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.social-card:hover {
    background: rgba(30, 30, 50, 0.8);
    transform: translateY(-2px);
}

.social-card img {
    width: 24px;
    height: 24px;
}

.social-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.social-item {
    background: rgba(20, 20, 40, 0.7);
    padding: 16px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.social-item:hover {
    background: rgba(30, 30, 50, 0.8);
    transform: translateY(-2px);
}

.social-item img {
    width: 24px;
    height: 24px;
}

@media (max-width: 768px) {
    .social-grid {
        grid-template-columns: 1fr;
    }
    
    .contact {
        padding: 100px 20px;
    }
    
    .contact-container {
        padding: 10px;
    }
}