/* ===== PALETA DE COLORES ===== */
:root {
    --primary: #0F3B66;
    --primary-light: #1a5a8f;
    --secondary: #10B981;
    --light-bg: #E8F0F8;
    --white: #FFFFFF;
    --dark: #1F2937;
    --gray: #6B7280;
    --border: #D1D5DB;
    --radius: 12px;
}

* { box-sizing: border-box; }

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--light-bg);
    color: var(--dark);
    margin: 0;
    padding: 0;
}

.container { max-width: 1000px; margin: 0 auto; padding: 0 20px; }
.text-center { text-align: center; }

/* ===== NAVBAR CON HAMBURGUESA ===== */
.site-nav {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
}

.brand {
    font-size: 24px;
    font-weight: 800;
    color: var(--primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color 0.3s;
}

.brand:hover {
    color: var(--secondary);
}

.brand i {
    font-size: 28px;
    color: var(--secondary);
}

.nav-list {
    list-style: none;
    display: flex;
    gap: 20px;
    margin: 0;
    padding: 0;
    align-items: center;
}

.nav-list a {
    color: var(--dark);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    padding: 8px 12px;
    border-radius: 6px;
}

.nav-list a:hover {
    color: var(--secondary);
    background: var(--light-bg);
}

.nav-cta {
    background: var(--secondary) !important;
    color: var(--white) !important;
    padding: 10px 16px !important;
    border-radius: 6px;
    font-weight: 600;
    transition: transform 0.3s;
}

.nav-cta:hover {
    transform: translateY(-2px);
    background: var(--secondary) !important;
}

.nav-toggle {
    display: none;
    background: transparent;
    border: none;
    color: var(--primary);
    font-size: 28px;
    cursor: pointer;
    padding: 8px;
    transition: color 0.3s;
}

.nav-toggle:hover {
    color: var(--secondary);
}

/* ===== RESPONSIVE NAVBAR ===== */
@media (max-width: 768px) {
    .nav-list {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        gap: 0;
        padding: 20px;
        border-top: 2px solid var(--secondary);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
        animation: slideDown 0.3s ease;
    }
    
    .nav-list.open { 
        display: flex; 
    }
    
    .nav-list li {
        width: 100%;
    }
    
    .nav-list a {
        display: block;
        padding: 12px 16px;
        width: 100%;
        text-align: left;
        border-bottom: 1px solid var(--border);
    }
    
    .nav-list li:last-child a {
        border-bottom: none;
    }
    
    .nav-cta {
        margin-top: 10px;
        text-align: center !important;
    }
    
    .nav-toggle { 
        display: block; 
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== CV HEADER ===== */
.cv-header {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: var(--white);
    padding: 60px 0;
    margin-top: 20px;
}

.header-content {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 40px;
    align-items: center;
}

.profile-photo {
    width: 160px;
    height: 160px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

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

.header-info h1 {
    margin: 0 0 10px;
    font-size: 36px;
    font-weight: 900;
}

.role {
    font-size: 18px;
    opacity: 0.95;
    margin: 10px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.contact-info {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 15px;
    font-size: 14px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: rgba(255, 255, 255, 0.9);
}

.contact-item a {
    color: var(--white);
    text-decoration: none;
    transition: opacity 0.3s;
}

.contact-item a:hover {
    opacity: 0.8;
}

/* ===== MAIN CONTENT ===== */
.main-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    padding: 40px 0;
}

.left { display: flex; flex-direction: column; gap: 40px; }
.right { display: flex; flex-direction: column; gap: 25px; }

/* ===== CV SECTION ===== */
.cv-section {
    background: var(--white);
    padding: 25px;
    border-radius: var(--radius);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cv-section:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.cv-section h2 {
    color: var(--primary);
    font-size: 18px;
    font-weight: 900;
    margin: 0 0 20px;
    padding-bottom: 12px;
    border-bottom: 3px solid var(--secondary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.cv-section h2 i {
    font-size: 20px;
}

/* ===== CV ITEM ===== */
.cv-item {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.cv-item:last-child {
    margin-bottom: 0;
    border-bottom: none;
}

.cv-item h3 {
    color: var(--primary);
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 5px;
}

.cv-meta {
    font-size: 12px;
    color: var(--secondary);
    font-weight: 600;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.cv-item p {
    color: var(--gray);
    margin: 8px 0;
    font-size: 14px;
    line-height: 1.6;
}

.cv-item ul {
    list-style: none;
    padding: 0;
    margin: 10px 0 0;
}

.cv-item li {
    color: var(--gray);
    font-size: 14px;
    margin-bottom: 6px;
    padding-left: 20px;
    position: relative;
    line-height: 1.5;
}

.cv-item li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--secondary);
    font-weight: bold;
}

/* ===== ESTILOS PROYECTOS DESTACADOS ===== */
.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
}

.project-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
}

.project-link:hover {
    color: var(--secondary);
    transform: translateX(3px);
}

.project-link i {
    font-size: 14px;
}

/* ===== SKILLS GRID ===== */
.skills-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.skill-badge {
    background: var(--light-bg);
    border: 1px solid var(--border);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 11px;
    color: var(--primary);
    font-weight: 600;
    display: inline-block;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.skill-badge:hover {
    background: var(--secondary);
    color: var(--white);
    border-color: var(--secondary);
    transform: translateY(-1px);
}

/* ===== DOWNLOAD BUTTON ===== */
.download-btn {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: var(--white);
    border: none;
    padding: 12px 20px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    text-decoration: none;
    width: 100%;
    font-size: 14px;
}

.download-btn:hover {
    transform: translateY(-2px);
}

/* ===== FOOTER ===== */
.footer {
    background: var(--dark);
    color: var(--white);
    padding: 50px 0 20px;
    margin-top: 40px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-col h6 {
    color: var(--secondary);
    margin-bottom: 15px;
    font-size: 16px;
}

.footer-col p, .footer-col a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.footer-col a:hover {
    color: var(--secondary);
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 8px;
}

.footer-credit {
    opacity: 0.6;
    font-size: 13px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .header-content { 
        grid-template-columns: 1fr; 
        text-align: center; 
        gap: 20px;
    }
    .profile-photo { 
        margin: 0 auto; 
        width: 140px;
        height: 140px;
    }
    .header-info h1 {
        font-size: 28px;
    }
    .main-content { 
        grid-template-columns: 1fr; 
        gap: 20px;
    }
    .contact-info {
        justify-content: center;
    }
    .cv-section {
        padding: 20px;
    }
    .skills-grid {
        gap: 6px;
    }
    .skill-badge {
        font-size: 10px;
        padding: 5px 10px;
    }
}

@media (max-width: 480px) {
    .header-info h1 {
        font-size: 24px;
    }
    .role {
        font-size: 16px;
    }
    .contact-info {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    .cv-section h2 {
        font-size: 16px;
    }
}

@media print {
    .site-nav, .download-btn { display: none; }
    body { background: var(--white); }
    .cv-section {
        box-shadow: none;
        border: 1px solid var(--border);
    }
}