/* Estilos CSS para el portafolio personal */
/* Variables globales */
:root {
    --color-background: #1c1c1e;
    --color-container: #2c2c2e;
    --color-text: #FFFFFF;
    --color-icons: #0875e3;
    --color-navbar: #1c1c1e;
    --color-hover: #0875e3;
}

/* Reset básico */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

body {
    background-color: var(--color-background);
    color: var(--color-text);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Animaciones */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        transform: translateX(-30px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}
.top-bar {
    background-color: #333; /* Color gris oscuro */
    height: 6px;
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}
/* Estilos de layout */
.container {
    display: flex;
    min-height: 100vh;
    padding: 20px;
    max-width: 1400px;
    margin: 50px auto 20px;
    gap: 20px;
    align-items: flex-start;
    justify-content: center
}

/* Panel izquierdo */
.left-panel {
    flex: 0 0 350px;
    background-color: var(--color-container);
    border-radius: 20px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    position: sticky;
    top: 20px;
    min-height: fit-content;
    animation: fadeIn 0.8s ease-out;
    transition: all 0.3s ease;
    overflow: visible;
}

/* Panel derecho */
.right-panel {
    flex: 2;
    max-width: 900px;
    display: flex;
    flex-direction: column;
    position: relative;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

/* Barra de navegación */
.navbar {
    background-color: transparent;
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 20px;
    box-shadow: none;
    position: relative;
    top: 0;
    animation: none;
}

.navbar ul {
    display: flex;
    list-style-type: none;
    gap: 20px;
    
}

.navbar li a {
    color: var(--color-text);
    text-decoration: none;
    font-weight: 500;
    font-size: 17px;
    position: relative;
    padding: 5px 0;
    transition: all 0.3s ease;
}

.navbar li a:hover,
.navbar li a.active {
    color: var(--color-hover);
}

.navbar li a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-hover);
    transition: width 0.3s ease;
}

.navbar li a:hover::after,
.navbar li a.active::after {
    width: 100%;
}

/* Contenido principal */
.content {
    background-color: var(--color-container);
    border-radius: 20px;
    padding: 30px;
    flex: 1;
    animation: fadeIn 0.9s ease-out;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* Perfil */
.profile {
    text-align: center;
    margin-bottom: 30px;
}

.profile-photo {
    width: 180px;
    height: 180px;
    border-radius: 20px;
    object-fit: cover;
    margin: 0 auto 20px;
    border: 4px solid var(--color-background);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.profile-photo:hover {
    transform: scale(1.03);
}

.profile h2 {
    font-size: 24px;
    margin-bottom: 5px;
    font-weight: 600;
}

.profile-text {
    margin: 20px 0;
    font-size: 16px;
    color: #e0e0e0;
    line-height: 1.7;
}

/* Contacto */
.contact-info {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    gap: 10px; /* Reemplaza el margin-bottom de los items por este gap */
    flex-grow: 1; /* Ocupa el espacio disponible */
}

.contact-item {
    display: flex;
    align-items: flex-start;
    padding: 12px 15px;
    background-color: rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.contact-item:hover {
    transform: translateX(5px);
    background-color: rgba(8, 117, 227, 0.1);
}
.contact-link {
    color: var(--color-icons);
    text-decoration: none;
    transition: all 0.3s ease;
}

.contact-link:hover {
    color: var(--color-hover);
    text-decoration: none;
}

.contact-content h4 {
    margin: 0 0 5px 0;
    font-size: 14px;
    font-weight: 600;
}
.contact-icon {
    color: var(--color-icons);
    font-size: 20px;
    margin-right: 15px;
    min-width: 24px;
}
.contact-content {
    display: flex;
    flex-direction: column;
}

.contact-content h4 {
    margin: 0 0 5px 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--color-icons);
}
.contact-text {
    font-size: 15px;
    cursor: default;
}

/* Secciones */
.section {
    margin-bottom: 40px;
    animation: fadeIn 0.5s ease-out;
}

.section-title {
    position: relative;
    font-size: 26px;
    margin-bottom: 25px;
    display: inline-block;
    font-weight: 600;
}

.section-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -8px;
    height: 4px;
    width: 60px;
    background-color: var(--color-icons);
    border-radius: 2px;
}

.section-content {
    font-size: 16px;
    line-height: 1.7;
    color: #e0e0e0;
    animation: slideIn 0.5s ease-out;
}

/* Contenedor de formacion */

.timeline-section {
    margin: 40px 0;
    padding: 30px;
    background: rgba(44, 44, 46, 0.7);
    border-radius: 16px;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: default;
}

.timeline-title {
    font-size: 22px;
    margin-bottom: 30px;
    color: var(--color-icons);
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Estructura de la línea de tiempo */
.timeline-container {
    position: relative;
    padding-left: 50px;
}

.timeline-container::before {
    content: '';
    position: absolute;
    left: 19px;
    top: 0;
    height: 100%;
    width: 2px;
    background: linear-gradient(
        to bottom,
        var(--color-icons),
        rgba(8, 117, 227, 0.3)
    );
}

/* Items individuales */
.timeline-item {
    position: relative;
    margin-bottom: 40px;
    transition: all 0.4s ease;
}

.timeline-item:hover {
    transform: translateX(5px);
}

/* Marcadores */
.timeline-marker {
    position: absolute;
    left: -50px;
    top: 0;
    z-index: 2;
}

.timeline-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--color-background);
    border: 3px solid var(--color-icons);
    box-shadow: 0 0 0 4px rgba(8, 117, 227, 0.2);
    transition: all 0.3s ease;
}

.timeline-item:hover .timeline-dot {
    transform: scale(1.2);
    box-shadow: 0 0 0 6px rgba(8, 117, 227, 0.3);
}

.timeline-line {
    position: absolute;
    left: 9px;
    top: 20px;
    width: 2px;
    height: calc(100% + 40px);
    background: var(--color-icons);
    opacity: 0.3;
}

/* Contenido */
.timeline-content {
    background: rgba(255, 255, 255, 0.03);
    padding: 25px;
    border-radius: 12px;
    border-left: 3px solid var(--color-icons);
    transition: all 0.3s ease;
}

.timeline-item:hover .timeline-content {
    background: rgba(8, 117, 227, 0.05);
    border-left-width: 5px;
}

.timeline-year {
    display: inline-block;
    padding: 5px 15px;
    background: rgba(8, 117, 227, 0.2);
    color: var(--color-icons);
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 15px;
}

.timeline-content h4 {
    font-size: 18px;
    margin-bottom: 8px;
    color: #fff;
}

.institution {
    color: #aaa;
    font-style: italic;
    margin-bottom: 15px;
    font-size: 15px;
}

.timeline-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
    list-style: none;
}

.timeline-skills li {
    background: rgba(8, 117, 227, 0.1);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 13px;
    color: var(--color-icons);
}

/* Responsive */
@media (max-width: 768px) {
    .timeline-container {
        padding-left: 30px;
    }
    
    .timeline-marker {
        left: -30px;
    }
    
    .timeline-content {
        padding: 20px;
    }
}

/* Servicios */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.service-item {
    background-color: rgba(0, 0, 0, 0.15);
    padding: 25px;
    border-radius: 15px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.service-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.service-icon {
    color: var(--color-icons);
    font-size: 32px;
    margin-bottom: 15px;
}

.service-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
}

.service-description {
    font-size: 15px;
    color: #d0d0d0;
}

/* Proyectos */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.project-item {
    background-color: rgba(0, 0, 0, 0.15);
    border-radius: 15px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.project-image {
    height: 180px;
    background-color: #353538;
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-image i {
    font-size: 48px;
    color: var(--color-icons);
}

.project-info {
    padding: 20px;
}

.project-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
}

.project-description {
    font-size: 15px;
    color: #d0d0d0;
}

/* Formulario de contacto */
.contact-form {
    background-color: rgba(0, 0, 0, 0.15);
    padding: 30px;
    border-radius: 15px;
    margin-top: 20px;
    animation: fadeIn 0.5s ease-out;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    width: 80%;
}

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

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 16px;
}

.form-input {
    width: 100%;
    padding: 10px 12px;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: var(--color-text);
    font-size: 16px;
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--color-icons);
    box-shadow: 0 0 0 2px rgba(8, 117, 227, 0.2);
}

.form-textarea {
    min-height: 100px;
    resize: vertical;
}

.submit-btn {
    background-color: var(--color-icons);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: block;
    margin: 0 auto;
}

.submit-btn:hover {
    background-color: #0562c7;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(8, 117, 227, 0.3);
}


/* Utilidades */
.hidden {
    display: none;
}

/* Sección de habilidades */
.skills-section {
    margin-top: 50px;
    animation: fadeIn 1s ease-out;
}

.skills-title {
    font-size: 24px;
    margin-bottom: 30px;
    color: var(--color-text);
    position: relative;
    padding-bottom: 10px;
}

.skills-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 60px;
    height: 3px;
    background-color: var(--color-icons);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(5, 120px);
    justify-content: center; /* Centra el grid horizontalmente */
    gap: 20px;
    margin-top: 20px;
    padding: 20px 0px;

}

.skill-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center; /* Centra el contenido verticalmente */
    padding: 25px 15px;
    background-color: rgba(8, 117, 227, 0.08);
    border-radius: 15px;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94); /* Animación suave */
    animation: skillAppear 0.5s ease-out both;
    border: 1px solid rgba(8, 117, 227, 0.15);
    height: 140px;

}

.skill-card:hover {
    transform: scale(1.1) translateY(-5px);
    background-color: rgba(8, 117, 227, 0.15);
    box-shadow: 0 15px 25px rgba(8, 117, 227, 0.15);
    z-index: 10;
}

.skill-icon {
    font-size: 40px;
    margin-bottom: 15px;
    color: var(--color-icons);
    transition: transform 0.3s ease;
}

.skill-card:hover .skill-icon {
    transform: scale(1.2); /* Zoom adicional al icono */
}

.skill-name {
    font-size: 16px;
    font-weight: 500;
    color: var(--color-text);
    text-align: center;
    transition: all 0.3s ease;
}

.skill-card:hover .skill-name {
    color: var(--color-hover); /* Cambia color al hacer hover */
    font-weight: 600;
}

/* Animación de aparición */
@keyframes skillAppear {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Retrasos escalonados */
.skill-card:nth-child(1) { animation-delay: 0.1s; }
.skill-card:nth-child(2) { animation-delay: 0.2s; }
.skill-card:nth-child(3) { animation-delay: 0.3s; }
.skill-card:nth-child(4) { animation-delay: 0.4s; }
.skill-card:nth-child(5) { animation-delay: 0.5s; }
.skill-card:nth-child(6) { animation-delay: 0.6s; }

/* Animación para moviles*/
/* Tablet - 4 por fila */
@media (max-width: 900px) {
    .skills-grid {
        grid-template-columns: repeat(4, 120px);
        max-width: 640px; /* (120px * 4) + (20px gap * 3) */
    }
}

/* Tablet pequeña - 3 por fila */
@media (max-width: 700px) {
    .skills-grid {
        grid-template-columns: repeat(3, 120px);
        max-width: 480px; /* (120px * 3) + (20px gap * 2) */
    }
}

/* Móvil - 2 por fila */
@media (max-width: 480px) {
    .skills-grid {
        grid-template-columns: repeat(2, 120px);
        max-width: 280px; /* (120px * 2) + (20px gap * 1) */
    }
}

/* Responsividad */
@media (max-width: 1024px) {
    .container {
        align-items: center;
        flex-direction: column;
    }

    .left-panel {
        position: relative;
        width: 100%;
        max-width: 400px;
        margin-bottom: 20px;
    }
    .right-panel {
        width: 100%;
        max-width: 100%;
    }
    .navbar {
        position: relative;
        top: 0;
    }
}

@media (max-width: 768px) {

    .services-grid,
    .projects-grid {
        grid-template-columns: 1fr;
    }

    .navbar ul {
        gap: 15px;
    }

    .profile-photo {
        width: 150px;
        height: 150px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
    }

    .content,
    .left-panel {
        padding: 20px;
    }

    .navbar {
        padding: 10px;
    }

    .navbar ul {
        flex-wrap: wrap;
        justify-content: center;
    }

    .navbar li {
        margin-bottom: 5px;
    }
}
