/* Nueva fuente elegante */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600&display=swap');

body {
    font-family: 'Poppins', sans-serif;

    background-color: #191818; /* Gris oscuro */
    overflow-x: hidden;
}

/* Contenedor de partículas para la página (sin líneas) */
#page-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
}

/* Partículas individuales */
.bg-particle {
    position: absolute;
    border-radius: 50%;
    opacity: 0.8;
    animation: floatParticle 10s infinite ease-in-out alternate, twinkle 3s infinite alternate ease-in-out;
}

/* Animación de movimiento flotante más suave */
@keyframes floatParticle {
    0% {
        transform: translate(0, 0);
    }
    50% {
        transform: translate(10px, -10px);
    }
    100% {
        transform: translate(-10px, 10px);
    }
}

/* Efecto de parpadeo suave */
@keyframes twinkle {
    from {
        opacity: 0.5;
    }
    to {
        opacity: 1;
    }
}


/* Sección About Me */
#about {
    position: relative;
    z-index: 10;
    padding: 100px 20px;
    text-align: center;
    color: white;
}

/* Contenedor de contenido de About */
.about-container {
    max-width: 800px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.05); /* Ligera transparencia */
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0px 0px 15px rgba(255, 255, 255, 0.1);
}

/* Títulos y texto */
#about h2 {
    font-size: 2.5rem;
    color: #78A6F9; /* Azul suave */
}

#about p {
    font-size: 1.2rem;
    line-height: 1.6;
    color: white;
}


/* Letras blancas para presentación */
h1, p.lead {
    color: white;
}

/* Resaltar el nombre */
.name-highlight {
    color: #78A6F9; /* Azul suave */
    font-weight: 600;
}

/* Asegurar que el texto y los botones estén por encima del fondo */
#hero {
    position: relative;
    z-index: 10;
    padding: 20px;
}

/* Estilo de botones */
.btn-custom {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 500;
    color: #78A6F9; /* Azul cósmico */
    background-color: rgba(0, 0, 0, 0.9); /* Negro sólido */
    border: 2px solid #78A6F9;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease-in-out;
    width: 230px; /* Forzar mismo tamaño */
    height: 50px; /* Forzar misma altura */
    text-align: center;
}

/* Efecto al pasar el ratón */
.btn-custom:hover {
    background-color: #78A6F9;
    color: #000;
}

/* Contenedor del CV con mismo tamaño */
.cv-dropdown {
    position: relative;
    width: 230px; /* Igual que los botones */
    height: 50px; /* Igual que los botones */
}

/* Menú desplegable del CV */
.cv-options {
    position: absolute;
    top: 100%;
    left: 0;
    background: rgba(0, 0, 0, 0.9);
    border: 2px solid #78A6F9;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    width: 100%;
    overflow: hidden;
    transform: scaleY(0);
    transform-origin: top;
    transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
    opacity: 0;
    visibility: hidden;
}

/* Opciones del CV con alineación */
.cv-option {
    padding: 10px;
    text-decoration: none;
    color: #78A6F9;
    font-weight: 500;
    text-align: left;
    transition: background 0.3s;
    width: 230px;
}

.cv-option:hover {
    background: #78A6F9;
    color: black;
}

/* Mostrar opciones cuando el dropdown está activo */
.cv-options.show {
    transform: scaleY(1);
    opacity: 1;
    visibility: visible;
}

/* Contenedor de botones */
.hero-buttons {
    display: flex;
    justify-content: space-between;
    width: 100%;
    max-width: 500px;
    gap: 20px;
}

/* Cambiar a columna en móviles */
@media (max-width: 768px) {
    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    .btn-custom, .cv-dropdown {
        max-width: 250px;
        height: 50px; /* Mantener altura uniforme */
    }
}






header {
    background: rgba(30, 30, 30, 0.9);
}
#hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    background-color: #121212;
}

.background-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.particle {
    position: absolute;
    border-radius: 50%;
    opacity: 0.9;
    animation: twinkle 3s infinite alternate ease-in-out;
}

@keyframes twinkle {
    from {
        opacity: 0.7;
    }
    to {
        opacity: 1;
    }
}

.connection-line {
    position: absolute;
    height: 0.5px; /* Líneas más finas */
    background-color: rgba(50, 150, 255, 0.2); /* Azul cósmico con transparencia */
    transform-origin: left center;
    transition: background-color 0.3s ease-in-out;
}




.btn {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn:hover {
    opacity: 0.8;
}

.skill-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    margin: 1rem;
}

.skill-box img {
    width: 50px;
}


/* Sección About Me */
#about {
    position: relative;
    z-index: 10;
    padding: 100px 20px;
    text-align: left;
    color: white;
}

/* Contenedor principal con imagen y texto */
.about-content {
    display: flex;
    align-items: center;
    justify-content: space-around;
    max-width: 90%;
    margin: 0 auto;
    gap: 40px;
    background: rgba(255, 255, 255, 0.05);
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0px 0px 15px rgba(255, 255, 255, 0.1);
}

/* Imagen de perfil */
.about-image img {
    width: 250px;
    height: auto;
}

/* Texto del About */
.about-text {
    max-width: 70%;
}

/* Estilos de los títulos */
#about h2 {
    font-size: 2.5rem;
    color: #78A6F9;
    margin-bottom: 10px;
}

/* Párrafos */
#about p {
    font-size: 1.2rem;
    line-height: 1.6;
    color: white;
}

/* Responsive: En móviles, la imagen va arriba */
@media (max-width: 768px) {
    .about-content {
        flex-direction: column;
        text-align: center;
    }

    .about-image img {
        width: 140px;
    }
}


/* Sección de experiencia y educación */
#experience-education {
    padding: 80px 20px;
    color: white;
}

/* Título */
.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 30px;
    color: #78A6F9;
}

/* Línea de tiempo */
.timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
}

/* Línea vertical con efecto de luz */
.timeline-line {
    position: absolute;
    width: 3px;
    background: linear-gradient(180deg, #ff2a6d, #78A6F9, #ff2a6d);
    top: -50px;
    bottom: 0;
    left: 20px;
    box-shadow: 0 0 15px rgba(255, 42, 109, 0.8);
    transition: background 0.3s ease-out, height 0.3s ease-out;
}

/* Efecto de subida/bajada suave */
@media (max-width: 768px) {
    .timeline-line {
        left: 10px;
    }
}

/* Item de la línea de tiempo */
.timeline-item {
    display: flex;
    align-items: center;
    justify-content: start;
    margin-bottom: 40px;
    position: relative;
    padding-left: 60px;
}

/* Icono de la empresa/institución a la izquierda */
.timeline-icon {
    width: 64px;
    height: 60px;
    background-color: #1E1E1E;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
    margin-right: 20px;
}

.timeline-icon img {
    width: 50px;
    height: auto;
    border-radius: 50%;
}

/* Contenedor del contenido a la derecha */
.timeline-content {
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 8px;
    width: 100%;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}

/* Fechas de cada trabajo/educación */
.timeline-date {
    font-style: italic;
    color: #ccc;
    font-size: 0.9rem;
    float: right;
}

/* Responsive: en móviles, la línea de tiempo se adapta */
@media (max-width: 768px) {
    .timeline-line {
        left: 10px;
    }

    .timeline-item {
        flex-direction: row;
        align-items: center;
        padding-left: 30px;
    }

    .timeline-icon {
        width: 50px;
        height: 50px;
        margin-right: 15px;
    }

    .timeline-content {
        width: 100%;
    }
}

/* Sección Skills */
#skills {
    padding: 80px 20px;
    color: white;
}

/* Cuadrícula */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    justify-items: center;
    max-width: 900px;
    margin: 0 auto;
}

/* Tarjetas */
.skill-box {
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    position: relative;
    overflow: hidden;
    width: 200px;
    height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease-in-out;
    border: 2px solid transparent;
    box-shadow: 0px 0px 10px rgba(255, 255, 255, 0.1);
}

/* Iconos y Texto */
.skill-box .skill-icon,
.skill-box .skill-text {
    transition: opacity 0.3s ease-in-out;
}

/* Ocultar nombre e icono al hacer hover */
.skill-box:hover .skill-icon,
.skill-box:hover .skill-text {
    opacity: 0;
}

/* Borde neón animado con hueco en movimiento automático */
.border-effect {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 3px solid transparent;
    border-radius: 12px;
    pointer-events: none;
    clip-path: circle(40px at 50% 100%);
    animation: rotate-border 5s linear infinite;
}

/* Animación del borde pasando por las esquinas */
@keyframes rotate-border {
    0%   { clip-path: circle(40px at 50% 100%); }  /* Abajo centro */
    25%  { clip-path: circle(40px at 100% 100%); } /* Esquina inferior derecha */
    35%  { clip-path: circle(40px at 100% 50%); }  /* Centro derecho */
    45%  { clip-path: circle(40px at 100% 0%); }   /* Esquina superior derecha */
    55%  { clip-path: circle(40px at 50% 0%); }    /* Arriba centro */
    65%  { clip-path: circle(40px at 0% 0%); }     /* Esquina superior izquierda */
    75%  { clip-path: circle(40px at 0% 50%); }    /* Centro izquierdo */
    85%  { clip-path: circle(40px at 0% 100%); }   /* Esquina inferior izquierda */
    100% { clip-path: circle(40px at 50% 100%); }  /* Vuelve abajo centro */
}

/* Descripción alineada y visible al hover */
.skill-desc {
    position: absolute;
    bottom: 50%;
    left: 50%;
    transform: translate(-50%, 50%);
    font-size: 0.9rem;
    color: white;
    opacity: 0;
    text-align: center;
    transition: opacity 0.3s ease-in-out;
}

/* Movimiento del hueco y aparición de texto */
.skill-box:hover .skill-desc {
    opacity: 1;
}

/* Cambia el color del fondo de la tarjeta al hacer hover */
.skill-box:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Transición suave al dejar de hacer hover */
.skill-box:not(:hover) .border-effect {
    transition: clip-path 0.6s ease-in-out, transform 0.6s ease-in-out;
    animation: rotate-border 0s linear infinite;
}
/* Sección de proyectos */
#projects {
    padding: 80px 20px;
    color: white;
    position: relative;
    overflow: hidden;
}

/* Contenedor general */
.projects-wrapper {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 30px; /* Espaciado más compacto */
    width: 100%;
    perspective: 2000px;
}

/* Tarjetas de los proyectos (más pequeñas) */
.project-card {
    width: 25vw; /* Reducido */
    height: 15vw; /* Reducido */
    min-width: 250px;
    min-height: 150px;
    border-radius: 12px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.6s ease, opacity 0.3s ease, z-index 0.4s ease;
    transform: rotateX(10deg) rotateY(-10deg) scale(0.85);
    transform-style: preserve-3d;
    opacity: 0.4;
    z-index: 1;
    position: relative;
}

.project-card:hover{
    opacity: 0.8;
}


/* Portada del proyecto */
.project-front {
    position: absolute;
    width: 100%;
    height: 100%;
    background: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    backface-visibility: hidden;
}

/* Imagen dentro de la portada */
.project-front img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

/* Tarjeta trasera con color personalizable */
.project-back {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transform: rotateY(180deg);
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

/* Cuando se activa, ocupa el centro (ahora más pequeño) */
.project-card.active {
    z-index: 10;
    transform: rotateY(180deg) scale(1.3) translateY(-10px);
    opacity: 1;
}

/* Mostrar el texto cuando gira */
.project-card.active .project-back {
    opacity: 1;
}
@media (max-width: 768px) {
    .projects-wrapper {
        flex-direction: column; /* Acomoda en una sola columna */
        align-items: center; /* Centra los proyectos */
        gap: 20px; /* Reduce la separación en móviles */
    }

    .project-card {
        width: 80vw; /* Ocupa casi todo el ancho en móviles */
        height: 45vw; /* Ajusta altura proporcionalmente */
        transform: rotateX(0deg) rotateY(0deg) scale(0.9); /* Reduce inclinación */
    }

    .project-card.active {
        transform: rotateY(180deg) scale(1); /* No agranda tanto en móvil */
    }
}


#posts {
    color: #eaeaea;
    padding: 60px 0;
    text-align: center;
}

.slider-container {
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: auto;
    display: flex;
    align-items: center;
}

.slider-wrapper {
    width: 100%;
    overflow: hidden;
}

.slider {
    display: flex;
    transition: transform 0.6s ease-in-out;
    gap: 20px;
}

/* Diseño de cada post */
.post {
    flex: 0 0 calc(100% / 3 - 20px); /* En desktop muestra 3 */
    background: #ffffff;
    color: #000;
    border-radius: 10px;
    padding: 20px;
    text-align: left;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
    opacity: 90%;
}

.post:hover {
    opacity: 100%;

}

.post img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 10px 10px 0 0;
}

.read-more {
    display: inline-block;
    margin-top: 10px;
    color: #2575fc;
    text-decoration: none;
    font-weight: bold;
}

.read-more:hover {
    text-decoration: underline;
}

/* Botones de navegación */
.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    border: none;
    padding: 15px 11px;
    font-size: 30px;
    cursor: pointer;
    border-radius: 30%;
    transition: background 0.3s, transform 0.2s ease;
    z-index: 10;
    opacity: 36%;
}

.slider-btn:hover {
    background: rgba(0, 0, 0, 1);
}

.left-btn {
    left: -50px;
}

.right-btn {
    right: -50px;
}

.post p{
color:rgb(74, 74, 74);
}
/* RESPONSIVE */
@media (max-width: 768px) {
    .slider-container {
        width: 95%;
    }

    .post {
        flex: 0 0 100%; /* En móvil solo 1 */
    }

    .slider-btn {
        top: 50%;
        padding: 15px 20px;
        font-size: 24px;
    }

    .left-btn {
        left: 10px;
    }

    .right-btn {
        right: 10px;
    }
}

#contact {
    background-color: #111;
    color: white;
    padding: 60px 0;
    text-align: center;
}

.contact-container {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 30px;
}

.contact-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 2px solid transparent;
    color: white;
    padding: 20px;
    width: 280px;
    text-align: center;
    border-radius: 15px;
    text-decoration: none;
    transition: all 0.3s ease-in-out;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.contact-card .icon {
    font-size: 40px;
    margin-bottom: 15px;
}

.contact-card i {
    transition: transform 0.3s ease-in-out;
}

.contact-card:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
    border-color: #2575fc;
    box-shadow: 0 0 15px rgba(37, 117, 252, 0.5);
}

.contact-card:hover i {
    transform: scale(1.2);
}

.contact-card h3 {
    margin-bottom: 10px;
    font-size: 22px;
}

.contact-card p {
    font-size: 16px;
    opacity: 0.8;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .contact-container {
        flex-direction: column;
        align-items: center;
    }
}
#footer {
    background: #000; /* Fondo negro */
    color: #ccc; /* Color de texto gris claro */
    text-align: center;
    padding: 15px;
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
    transition: background 0.3s ease-in-out;
}

/* Efecto sutil en el texto al hacer hover */
#footer p {
    display: inline-block;
    position: relative;
    transition: transform 0.3s ease, color 0.3s ease;
}

#footer:hover p {
    transform: translateY(-2px);
    color: #fff; /* Cambia a blanco al hacer hover */
}

/* Línea sutil animada en la parte superior del footer */
#footer::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, rgba(0, 98, 255, 0.8), rgba(0, 255, 200, 0.8));
    transition: width 0.5s ease-in-out, left 0.5s ease-in-out;
}

#footer:hover::before {
    width: 100%;
    left: 0;
}
/* Contenedor del menú desplegable */
.explore-dropdown {
    position: relative;
    width: 230px;
    height: 50px;
}

/* Estilos para las opciones del desplegable */
.explore-options {
    position: absolute;
    top: 100%;
    left: 0;
    background: rgba(0, 0, 0, 0.9);
    border: 2px solid #78A6F9;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    width: 100%;
    overflow: hidden;
    transform: scaleY(0);
    transform-origin: top;
    transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
    opacity: 0;
    visibility: hidden;
}

/* Estilos de cada opción */
.explore-option {
    padding: 10px;
    text-decoration: none;
    color: #78A6F9;
    font-weight: 500;
    text-align: left;
    transition: background 0.3s;
}

.explore-option:hover {
    background: #78A6F9;
    color: black;
}

/* Mostrar opciones cuando el menú está activo */
.explore-options.show {
    transform: scaleY(1);
    opacity: 1;
    visibility: visible;
}
.project-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-decoration: none;
    margin-top: 10px;
    padding: 8px 12px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.4));
    border-radius: 5px;
    transition: background-color 0.3s, transform 0.2s;
}

.project-link i {
    margin-right: 5px;
}

.project-link:hover {
    background-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.05);
}