/* ===== VARIABLES GLOBALES ===== */
:root {
    /* Colores */
    --azul-fuerte: #3c6e99; /* Azul industrial */
    --azul-oscuro: #4d9d6c; /* Verde proceso */
    --azul-claro: #536b94;  /* Azul datos */
    --azul-suave: #e8f5ff;  /* Azul muy claro */
    --black: #000000;
    --white: #ffffff;
    --gray: #f4f4f4;
    
    /* Tipografía */
    --sm: 14px;
    --md: 16px;
    --lg: 18px;
    --ex: 22px;
    
    /* Diseño */
    --border-radius: 10px;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

/* ===== RESET Y ESTILOS BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
    text-decoration: none;
    list-style: none;
}

body {
    background-color: var(--gray);
    color: var(--black);
    text-align: center;
}

/* ===== ANIMACIONES ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== HEADER Y NAVEGACIÓN ===== */
header {
    background: linear-gradient(180deg, var(--azul-claro), var(--azul-oscuro));
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    padding: 15px 0;
}

.nav-container {
    display: flex;
    justify-content: center;
}

.nav-list {
    display: flex;
    gap: 30px;
}

.nav-list li a {
    color: var(--white);
    font-size: var(--lg);
    font-weight: bold;
    padding: 5px 10px;
    transition: 0.3s;
}

.nav-list li a:hover {
    color: var(--azul-suave);
    border-bottom: 2px solid var(--white);
}

/* Menú lateral */
.side-menu {
    position: fixed;
    top: 0;
    left: -250px; /* Oculto por defecto */
    width: 250px;
    height: 100vh;
    background: linear-gradient(180deg, var(--azul-claro), var(--azul-oscuro));
    padding: 20px;
    transition: left 0.3s ease;
    z-index: 1001;
}

.side-menu.open {
    left: 0; /* Visible cuando está abierto */
}

.side-menu-list {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
}

.side-menu-list li a {
    color: var(--white);
    font-size: var(--lg);
    font-weight: bold;
    padding: 5px 10px;
}

/* Botón hamburguesa */
.hamburger-menu {
    background: none;
    border: none;
    color: var(--white);
    font-size: 24px;
    cursor: pointer;
    display: none; /* Oculto en pantallas grandes */
}

/* Overlay para menú móvil */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0,0,0,0.5);
    z-index: 1000;
    display: none;
}

.overlay.active {
    display: block;
}

/* ===== SECCIÓN HERO ===== */
.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(135deg, var(--azul-claro), var(--azul-suave));
    padding: 80px 20px;
    border-radius: 20px;
    margin-top: 60px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    animation: fadeIn 1s ease-in-out;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    width: 150px;
    height: 150px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    top: -40px;
    right: -40px;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.profile-img {
    width: 280px;
    height: 280px;
    border-radius: 50%;
    border: 4px solid var(--white);
    margin-bottom: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.hero h1 {
    color: var(--azul-fuerte);
    font-size: 48px;
}

.hero h3 {
    color: var(--azul-oscuro);
    font-size: 24px;
    font-weight: bolder;
}

.hero p {
    color: var(--black);
    max-width: 600px;
    margin: 10px auto;
    font-size: var(--md);
    font-weight: bolder;
}

/* ===== SECCIONES DE PROYECTOS ===== */
.section {
    background: var(--white);
    padding: 40px 20px;
    border-radius: 20px;
    margin: 40px auto;
    max-width: 900px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease-in-out;
}

.section:hover {
    transform: translateY(-5px);
}

.section h2 {
    color: var(--azul-fuerte);
    font-size: 48px;
    margin-bottom: 10px;
}

.section p {
    color: var(--black);
    font-size: var(--md);
}

/* Grid de proyectos */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.project-grid p {
    margin: 15px 0 0 0;
    padding: 10px;
    text-align: justify;
}

.project-card {
    background: linear-gradient(to right, var(--azul-claro), var(--azul-oscuro));
    color: var(--white);
    padding: 15px 30px;
    border-radius: var(--border-radius);
    font-size: var(--lg);
    font-weight: bold;
    display: inline-block;
    transition: var(--transition);
    box-shadow: var(--box-shadow);
    margin-bottom: 10px;
}

.project-card:hover {
    background: linear-gradient(to right, var(--azul-oscuro), var(--azul-claro));
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

/* ===== COMPONENTES REUTILIZABLES ===== */
/* Botón estándar */
.btn {
    background: var(--azul-oscuro);
    color: var(--white);
    font-size: var(--lg);
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 10px;
    transition: 0.3s;
    display: inline-block;
}

.btn:hover {
    background: var(--azul-fuerte);
}

/* Redes sociales */
.social-links {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.social-links img {
    width: 35px;
    transition: 0.3s;
}

.social-links img:hover {
    transform: scale(1.1);
}

/* Botón de WhatsApp */
.box-btn-whatsapp {
    position: fixed;
    bottom: 50px;
    right: 10px;
    z-index: 999;
}

.btn-whatsapp {
    width: 80px;
    height: auto;
    display: block;
}

.btn-whatsapp:hover {
    transform: translateY(-15px);
}

/* ===== FOOTER ===== */
footer {
    background: linear-gradient(180deg, var(--azul-oscuro), var(--azul-fuerte));
    color: var(--white);
    padding: 20px 0;
    text-align: center;
    width: 100%;
    clear: both;
    position: relative;
}

.footer-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 15px;
    box-sizing: border-box;
}

.footer-content p {
    font-size: var(--sm);
    margin-bottom: 10px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--white);
    text-decoration: none;
    font-size: var(--md);
}

.footer-links a:hover {
    text-decoration: underline;
}

/* ===== MEDIA QUERIES ===== */
/* Pantallas medianas (tablets) */
@media (max-width: 768px) {
    /* Footer */
    footer {
        padding: 20px 10px;
    }
    
    .footer-content {
        width: 100%;
    }
    
    .footer-links {
        gap: 15px;
    }
    
    /* WhatsApp */
    .box-btn-whatsapp {
        bottom: 30px;
        right: 10px;
    }
    
    .btn-whatsapp {
        width: 60px;
    }
    
    /* Contenido principal */
    main {
        margin: 0px 10px;
        padding: 0 10px;
    }
}

/* Pantallas pequeñas (móviles) */
@media (max-width: 568px) {
    .nav-list {
        display: none;
    }

    .hamburger-menu {
        display: block;
    }

    .hero {
        text-align: center;
    }

    .profile-img {
        width: 180px;
        height: 180px;
    }
}

/* Pantallas muy pequeñas */
@media (max-width: 480px) {
    .footer-links {
        gap: 10px;
        flex-direction: column;
    }
    
    .social-links {
        gap: 10px;
    }
}


/* ===== SECCIÓN ACERCA DE MÍ ===== */
.about-section {
    padding-bottom: 50px;
}

.about-container {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin-top: 30px;
    text-align: left;
}

.about-image {
    flex: 1;
    min-width: 250px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.about-profile-img {
    width: 100%;
    max-width: 300px;
    border-radius: 15px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
    transition: var(--transition);
}

.about-profile-img:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.about-content {
    flex: 2;
    min-width: 300px;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.about-text h3 {
    color: var(--azul-oscuro);
    font-size: 24px;
    margin-bottom: 10px;
    position: relative;
    display: inline-block;
}

.about-text h3::after {
    content: "";
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 50px;
    height: 3px;
    background: var(--azul-claro);
    border-radius: 3px;
}

.about-text p {
    margin-bottom: 20px;
    line-height: 1.6;
    text-align: justify;
}

/* Estilos para las habilidades */
.skills-container h3 {
    color: var(--azul-oscuro);
    font-size: 24px;
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
}

.skills-container h3::after {
    content: "";
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 50px;
    height: 3px;
    background: var(--azul-claro);
    border-radius: 3px;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.skill-item {
    margin-bottom: 15px;
}

.skill-name {
    font-weight: bold;
    margin-bottom: 5px;
    color: var(--azul-fuerte);
}

.skill-bar {
    height: 10px;
    background-color: var(--gray);
    border-radius: 5px;
    overflow: hidden;
}

.skill-level {
    height: 100%;
    background: linear-gradient(to right, var(--azul-claro), var(--azul-oscuro));
    border-radius: 5px;
}

/* Media queries para la sección Acerca de Mí */
@media (max-width: 768px) {
    .about-container {
        flex-direction: column;
        align-items: center;
    }
    
    .about-image {
        width: 100%;
        margin-bottom: 20px;
    }
    
    .about-profile-img {
        max-width: 250px;
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .about-text h3, .skills-container h3 {
        font-size: 20px;
    }
    
    .about-profile-img {
        max-width: 200px;
    }
    
    .skill-name {
        font-size: 14px;
    }
    
    .skill-bar {
        height: 8px;
    }
}


/* ===== SECCIÓN DE CONTACTO ===== */
.contact-section {
    padding-bottom: 60px;
}

.contact-intro {
    max-width: 700px;
    margin: 0 auto 40px;
    color: var(--black);
    font-size: var(--md);
}

.contact-container {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    margin-top: 30px;
}

/* Información de contacto */
.contact-info {
    flex: 1;
    min-width: 300px;
    display: flex;
    flex-direction: column;
    gap: 25px;
    padding: 30px;
    background: linear-gradient(135deg, var(--azul-claro), var(--azul-oscuro));
    border-radius: var(--border-radius);
    color: var(--white);
    box-shadow: var(--box-shadow);
}

.contact-item {
    display: flex;
    align-items:center;
    gap: 15px;
    justify-content: center;
}

.contact-icon {
    font-size: 24px;
    min-width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
}

.contact-text h3 {
    font-size: 18px;
    margin-bottom: 5px;
}

.contact-text p {
    opacity: 0.9;
}

.contact-social h3 {
    margin-bottom: 15px;
    font-size: 18px;
}

.contact-social .social-links {
    margin-top: 10px;
}

.contact-social .social-links img {
    filter: brightness(1) invert(0);
    opacity: .5;
}

.contact-social .social-links img:hover {
    opacity: 1;
}

/* Formulario de contacto */
.contact-form {
    flex: 1.5;
    min-width: 300px;
    padding: 30px;
    background-color: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: var(--azul-fuerte);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-size: var(--md);
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--azul-claro);
    outline: none;
    box-shadow: 0 0 0 3px rgba(83, 107, 148, 0.2);
}

.submit-btn {
    background: linear-gradient(to right, var(--azul-claro), var(--azul-oscuro));
    color: var(--white);
    padding: 12px 25px;
    border: none;
    border-radius: var(--border-radius);
    font-size: var(--md);
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
    width: 100%;
    margin-top: 10px;
}

.submit-btn:hover {
    background: linear-gradient(to right, var(--azul-oscuro), var(--azul-claro));
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

/* Media queries para la sección de contacto */
@media (max-width: 768px) {
    .contact-container {
        flex-direction: column;
    }
    
    .contact-info {
        order: 2;
    }
    
    .contact-form {
        order: 1;
    }
}

@media (max-width: 480px) {
    .contact-info {
        padding: 20px;
    }
    
    .contact-form {
        padding: 20px;
    }
    
    .form-group input,
    .form-group textarea {
        padding: 10px;
    }
    
    .submit-btn {
        padding: 10px 20px;
    }
}