/* ==================================== */
/* =========== BARRA DE NAVEGACIÓN =========== */
/* ==================================== */
.main-header {
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    background-color: rgba(232, 232, 232, 0.9);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.nav-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: 600;
    text-decoration: none;
    color: #333;
    letter-spacing: 1px;
    height: 30px;
    display: flex;
    align-items: center;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

.nav-link {
    text-decoration: none;
    color: #555;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: #000;
}

.logo-image {
    height: 30px;
    width: auto;
    transition: transform 0.3s ease;
}

.logo-image:hover {
    transform: scale(1.05);
}

/* Ocultar el botón del menú en desktop */
.menu-toggle {
    display: none;
}

/* ==================================== */
/* =========== ESTILOS GENERALES =========== */
/* ==================================== */
body {
    overflow-x: hidden;
    font-family: 'Poppins', sans-serif;
    background-color: #e8e8e8;
    color: #333;
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: #333;
    text-shadow: 1px 1px 2px #c5c5c5, -1px -1px 2px #ffffff;
}

.button {
    display: inline-block;
    padding: 12px 25px;
    background-color: #e8e8e8;
    color: #333;
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    box-shadow: 6px 6px 12px #c5c5c5, -6px -6px 12px #ffffff;
}

.button:hover {
    box-shadow: 4px 4px 8px #c5c5c5, -4px -4px 8px #ffffff;
    transform: scale(0.98);
}

section {
    padding: 4rem 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* ==================================== */
/* ============ SECCIÓN HERO (LA TARJETA) ============ */
/* ==================================== */
.hero-section {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
    padding: 2rem 1rem;
    padding-top: 5rem;
}

.card {
    background-color: #e8e8e8;
    border-radius: 24px;
    box-shadow: 10px 10px 20px #c5c5c5, -10px -10px 20px #ffffff;
    padding: 3rem;
    width: 350px;
    text-align: center;
    position: relative;
    transition: all 0.4s ease;
    cursor: pointer;
    border: 1px solid #e0e0e0;
}

.card:hover {
    box-shadow: 5px 5px 10px #c5c5c5, -5px -5px 10px #ffffff;
    transform: translateY(-5px);
}

.card-image {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: inset 5px 5px 10px #c5c5c5, inset -5px -5px 10px #ffffff;
    padding: 5px;
    transition: transform 0.3s ease;
}

.card-image:hover {
    transform: scale(1.05);
}

.card-name {
    font-size: 2rem;
    margin: 1.5rem 0 0.5rem;
    font-weight: 600;
    color: #333;
}

.card-title {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 1.5rem;
}

.card-description {
    font-size: 1rem;
    color: #555;
}

/* ==================================== */
/* ============ SECCIÓN DE HABILIDADES ============ */
/* ==================================== */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.5rem;
}

.skill-card {
    background-color: #e8e8e8;
    padding: 1.5rem;
    border-radius: 16px;
    box-shadow: 6px 6px 12px #c5c5c5, -6px -6px 12px #ffffff;
    text-align: center;
    transition: all 0.3s ease;
}

.skill-card:hover {
    transform: translateY(-5px);
    box-shadow: 3px 3px 6px #c5c5c5, -3px -3px 6px #ffffff;
}

.skill-card h3 {
    font-size: 1.1rem;
    margin: 0 0 0.5rem 0;
}

.skill-card p {
    font-size: 0.9rem;
    line-height: 1.4;
    margin: 0;
    color: #555;
}

.skill-card .skill-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #333;
    transition: transform 0.3s ease;
}

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

/* ==================================== */
/* ============ SECCIÓN DE EDUCACIÓN: TIMELINE ============ */
/* ==================================== */
.education-section {
    padding: 4rem 0;
    background-color: #e0e0e0;
    width: 100%;
}

.education-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.timeline-container {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding-top: 50px;
}

.timeline-container::before {
    content: '';
    position: absolute;
    width: 4px;
    height: 100%;
    background-color: #c5c5c5;
    left: 20px;
    top: 0;
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    padding: 1rem 0;
    width: 100%;
    padding-left: 3rem;
    text-align: left;
    display: flex;
    align-items: center;
}

.timeline-dot {
    position: absolute;
    width: 16px;
    height: 16px;
    background-color: #333;
    border-radius: 50%;
    top: 50%;
    left: 12px;
    transform: translateY(-50%);
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.2);
    z-index: 1;
    transition: transform 0.3s ease;
}

.timeline-item:hover .timeline-dot {
    transform: translateY(-50%) scale(1.9);
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
}

.timeline-card {
    background-color: #e8e8e8;
    padding: 1rem;
    border-radius: 16px;
    box-shadow: 6px 6px 12px #c5c5c5, -6px -6px 12px #ffffff;
    transition: all 0.3s ease;
    width: 80%;
}

.timeline-card:hover {
    transform: translateY(-8px);
    box-shadow: 4px 4px 8px #c5c5c5, -4px -4px 8px #ffffff;
}

.timeline-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.timeline-logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: 8px;
}

.timeline-card-title {
    text-align: left;
}

.timeline-card-title h3 {
    font-size: 1rem;
    margin: 0;
    color: #333;
}

.timeline-card-title p {
    font-size: 0.8rem;
    margin: 0;
    color: #555;
}

/* ==================================== */
/* ============ SECCIÓN DE PROYECTOS ============ */
/* ==================================== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
}

.project-card {
    background-color: #e8e8e8;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 8px 8px 16px #c5c5c5, -8px -8px 16px #ffffff;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 4px 4px 8px #c5c5c5, -4px -4px 8px #ffffff;
}

.project-image {
    width: 100%;
    height: 100px;
    object-fit: cover;
    object-position: center;
    border-radius: 8px 8px 0 0;
}

.project-card h3 {
    margin: 1.5rem 1.5rem 0.5rem;
    font-size: 1.6rem;
    color: #333;
}

.project-card p {
    margin: 0 1.5rem 1.5rem;
    font-size: 1rem;
    color: #555;
    flex-grow: 1;
}

.project-links {
    padding: 0 1.5rem 1.5rem;
    display: flex;
    justify-content: center;
    margin-top: auto;
}

.project-links .button {
    width: 100%;
    text-align: center;
}

/* ==================================== */
/* ============ PIE DE PÁGINA (CONTACTO) ============ */
/* ==================================== */
.contact-section {
    text-align: center;
    padding: 4rem 1rem;
    background-color: #e0e0e0;
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.contact-links a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 60px;
    height: 60px;
    background-color: #e8e8e8;
    color: #333;
    border-radius: 12px;
    text-decoration: none;
    font-size: 24px;
    box-shadow: 6px 6px 12px #c5c5c5, -6px -6px 12px #ffffff;
    transition: all 0.3s ease;
}

.contact-links a:hover {
    box-shadow: 3px 3px 6px #c5c5c5, -3px -3px 6px #ffffff;
    transform: translateY(-3px);
}

/* ==================================== */
/* ============ ESTILOS PÁGINAS DE PROYECTOS ============ */
/* ==================================== */
.project-page-content {
    padding-top: 80px;
}

.project-cover-section {
    text-align: center;
    padding: 1rem 1rem 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.project-title {
    font-size: 1.8rem;
    margin-bottom: 0.25rem;
}

.project-subtitle {
    font-size: 1rem;
    color: #666;
    margin-top: 0;
}

.project-page-image {
    width: 100%;
    max-width: 600px;
    height: auto;
    border-radius: 16px;
    box-shadow: 8px 8px 16px #c5c5c5, -8px -8px 16px #ffffff;
    object-fit: cover;
    margin-top: 1rem;
}

.project-details {
    max-width: 800px;
    margin: 2rem auto;
    padding: 2rem;
    background-color: #e8e8e8;
    border-radius: 16px;
    box-shadow: 6px 6px 12px #c5c5c5, -6px -6px 12px #ffffff;
}

.project-details ul {
    list-style-type: none;
    padding: 0;
}

.project-details ul li {
    background-color: #f5f5f5;
    margin-bottom: 1rem;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: inset 2px 2px 4px #c5c5c5, inset -2px -2px 4px #ffffff;
}

/* ==================================== */
/* =========== DISEÑO ADAPTABLE A MÓVILES =========== */
/* ==================================== */

/* Ocultar el botón del menú en desktop */
.menu-toggle {
    display: none;
}

@media (max-width: 768px) {

    .contact-section {
        padding: 2.5rem 1rem;
    }

    .contact-links a {
        width: 50px; 
        height: 50px;
        font-size: 20px;
    }

    .contact-links {
        gap: 1rem;
    }

    .nav-bar {
        position: relative;
        padding: 1rem;
    }
    
    .nav-links {
        display: flex;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        flex-direction: column;
        background-color: #e8e8e8;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.5s ease-in-out;
    }
    
    .nav-links.active {
        max-height: 300px;
    }
    
    .nav-links li {
        text-align: center;
        width: 100%;
        padding: 0.5rem 0;
    }

    .menu-toggle {
        display: block;
        border: none;
        background: transparent;
        cursor: pointer;
        z-index: 1001;
        transition: all 0.3s ease;
    }
    
    .hamburger {
        display: block;
        width: 25px;
        height: 3px;
        background-color: #333;
        position: relative;
        transition: transform 0.3s ease;
    }
    
    .hamburger::before,
    .hamburger::after {
        content: '';
        display: block;
        width: 25px;
        height: 3px;
        background-color: #333;
        position: absolute;
        left: 0;
        transition: transform 0.3s ease, top 0.3s ease;
    }
    
    .hamburger::before {
        top: -8px;
    }
    
    .hamburger::after {
        top: 8px;
    }

    .menu-toggle.active .hamburger {
        transform: rotate(45deg);
    }
    
    .menu-toggle.active .hamburger::before {
        top: 0;
        transform: rotate(90deg);
    }

    .menu-toggle.active .hamburger::after {
        top: 0;
        transform: rotate(90deg);
        opacity: 0;
    }

    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}