/* 
© 2024 Sergio Uribe Guinard. All rights reserved.
SUG2024-AB7C9D2E-F8A1B3C5
*/

/* ==========================================================================
   1. Variables y Configuración Global
   ========================================================================== */

:root {
    /* 🎨 PALETA DE COLORES (Light Mode - Estilo Nuevo) */
    --background: #f4f7f9;
    --surface: #ffffff;
    --text-primary: #2c3e50;
    --text-secondary: #7f8c8d;
    --accent: #3498db;
    --accent-hover: #2980b9; /* Color de hover que corresponde al azul */
    --border: #ecf0f1;
    --nav-background: rgba(255, 255, 255, 0.9);

    /* ✨ Variables semánticas para sombras (ajustadas a la nueva estética) */
    --shadow-color-rgb: 0, 0, 0;
    --shadow-elevation-low: 0 2px 10px rgba(var(--shadow-color-rgb), 0.05);
    --shadow-elevation-medium: 0 10px 30px rgba(var(--shadow-color-rgb), 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Lato', sans-serif;
    background-color: var(--background);
    color: var(--text-primary);
}

/* Lucide Icon Styling */
[data-lucide] {
    display: inline-block !important;
    width: 1em !important;
    height: 1em !important;
    stroke-width: 0 !important;
    stroke: currentColor !important;
    fill: none !important;
    font-style: normal !important;
    font-weight: normal !important;
    font-size: inherit !important;
    line-height: 1 !important;
}

/* Icon container styling */
i[data-lucide] {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    vertical-align: middle !important;
}

/* ==========================================================================
   2. Layout y Contenedores Principales
   ========================================================================== */

.container {
    max-width: 900px;
    margin: 40px auto;
    padding: 50px;
    background-color: var(--surface);
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

header {
    text-align: center;
    margin-bottom: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.section {
    margin-bottom: 40px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    scroll-margin-top: 80px;
}

.section.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   3. Barra de Navegación
   ========================================================================== */

.main-nav {
    position: sticky;
    top: 0;
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 10px 30px;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

.main-nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 0;
    padding: 0;
}

.main-nav a {
    position: relative;
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 700;
    padding: 10px 15px;
    border-radius: 5px;
    transition: color 0.3s, background-color 0.3s;
}

.main-nav a:hover {
    color: var(--accent);
    transform: translateY(-2px);
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.main-nav a:hover::after {
    width: 80%;
}

.main-nav a.active {
    color: var(--accent);
}

.main-nav a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 3px;
    background-color: var(--accent);
    border-radius: 2px;
}

/* ==========================================================================
   4. Tipografía y Encabezados
   ========================================================================== */

h1 {
    font-size: 32px;
    margin: 15px 0 8px 0;
    font-weight: 700;
}

.section h2 {
    font-size: 22px;
    color: var(--accent);
    border-bottom: 2px solid var(--border);
    padding-bottom: 10px;
    margin-bottom: 20px;
    font-weight: 700;
    display: block; /* Asegura que la línea ocupe todo el ancho */
}

.job h3,
.education-item h3 {
    font-size: 18px;
    margin-bottom: 5px;
}

/* ==========================================================================
   5. Componentes Específicos
   ========================================================================== */

/* Profile Note Styling */
.profile-note {
    margin-top: 15px;
    font-style: italic;
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.5;
    padding: 12px 16px;
    background-color: var(--background);
    border-left: 4px solid var(--accent);
    border-radius: 4px;
}

@media (max-width: 768px) {
    .profile-note {
        font-size: 13px;
        padding: 10px 14px;
    }
}

@media print {
    .profile-note {
        color: #333 !important;
        background-color: transparent !important;
        border-left-color: #666 !important;
        font-size: 9pt !important;
    }
}

/* Perfil y Contacto */
.profile-img-container {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 5px solid var(--surface);
    box-shadow: var(--shadow-elevation-low);
    margin-bottom: 20px;
    overflow: hidden;
    transition: border-color 0.3s ease;
    position: relative;
    display: block;
}

.profile-img-link {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
    cursor: pointer;
}

.profile-img-link:hover {
    text-decoration: none;
}

.profile-img-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: 50%;
    transition: transform 0.4s ease;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    pointer-events: none;
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-drag: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
}

.profile-img-container:hover .profile-img-bg {
    transform: scale(1.25);
}

/* Indicador visual de que la imagen es clickeable */
.profile-img-container::after {
    content: "\f08c"; /* Código del ícono de LinkedIn en Font Awesome */
    font-family: "Font Awesome 5 Brands";
    font-weight: 900;
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.8); /* Fondo blanco transparente */
    color: rgba(0, 119, 181, 0.8); /* Color de LinkedIn transparente */
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
    z-index: 10;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.profile-img-container:hover::after {
    opacity: 0.8; /* Transparencia del elemento completo */
    transform: translateX(-50%) scale(1.1);
}

/* Botón de contacto */
.contact-button {
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
    margin: 20px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.contact-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}

.contact-button i {
    font-size: 18px;
}

/* Información de contacto para impresión */
.contact-info {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    list-style: none;
    padding: 0;
    color: var(--text-secondary);
}

.contact-info.print-only {
    display: none; /* Oculto en pantalla */
}

.contact-info a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.3s;
}

.contact-info a:hover {
    color: var(--accent-hover);
}

/* Popup de contacto */
.contact-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.contact-popup.active {
    opacity: 1;
    visibility: visible;
}

.contact-popup-content {
    background: var(--surface);
    border-radius: 15px;
    padding: 0;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.7);
    transition: transform 0.3s ease;
}

.contact-popup.active .contact-popup-content {
    transform: scale(1);
}

.contact-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid var(--border);
}

.contact-popup-header h3 {
    color: var(--text-primary);
    font-size: 20px;
    font-weight: 700;
    margin: 0;
}

.contact-popup-close {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.3s ease;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-popup-close:hover {
    background-color: var(--border);
    color: var(--text-primary);
}

.contact-popup-body {
    padding: 25px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.contact-item:last-child {
    border-bottom: none;
}

.contact-item i {
    color: var(--accent);
    font-size: 18px;
    width: 20px;
    text-align: center;
}

.contact-item span,
.contact-item a {
    color: var(--text-primary);
    font-size: 16px;
    text-decoration: none;
}

.contact-item a:hover {
    color: var(--accent);
}

/* Experiencia y Educación */
.job,
.education-item {
    margin-bottom: 25px;
}

.job-details,
.education-details {
    display: flex;
    justify-content: space-between;
    color: var(--text-secondary);
    margin-bottom: 15px;
    font-style: italic;
}

.job ul {
    font-size: 15px;
    list-style-position: inside;
    padding-left: 5px;
    color: var(--text-secondary);
}

.job ul li {
    margin-bottom: 8px;
}

/* Interactive Timeline */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px 0;
}

.timeline-line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(to bottom, var(--accent), var(--accent-hover));
    transform: translateX(-50%);
    border-radius: 2px;
    z-index: 1;
}

.timeline-item {
    position: relative;
    margin-bottom: 60px;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.timeline-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.timeline-item:nth-child(even) .timeline-content {
    margin-left: 0;
    margin-right: calc(50% + 30px);
}

.timeline-item:nth-child(odd) .timeline-content {
    margin-left: calc(50% + 30px);
    margin-right: 0;
}

.timeline-marker {
    position: absolute;
    left: 50%;
    top: 20px;
    transform: translateX(-50%);
    z-index: 2;
}

.timeline-dot {
    width: 20px;
    height: 20px;
    background: var(--accent);
    border: 4px solid var(--surface);
    border-radius: 50%;
    margin: 0 auto 10px;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
    transition: all 0.3s ease;
}

.timeline-item:hover .timeline-dot {
    transform: scale(1.2);
    box-shadow: 0 0 0 6px rgba(52, 152, 219, 0.3);
}

.timeline-year {
    background: var(--accent);
    color: white;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
}

.timeline-content {
    position: relative;
}

.timeline-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    cursor: pointer;
}

.timeline-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    border-color: var(--accent);
}

.timeline-header {
    margin-bottom: 15px;
}

.timeline-header h3 {
    color: var(--accent);
    margin-bottom: 8px;
    font-size: 18px;
    font-weight: 600;
}

.timeline-location {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 14px;
    font-style: italic;
}

.timeline-location i {
    color: var(--accent);
    font-size: 14px;
}

.timeline-body ul {
    margin: 0;
    padding-left: 20px;
    color: var(--text-secondary);
}

.timeline-body li {
    margin-bottom: 8px;
    line-height: 1.5;
}

.timeline-skills {
    margin-top: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.skill-tag {
    background: rgba(52, 152, 219, 0.1);
    color: var(--accent);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid rgba(52, 152, 219, 0.2);
    transition: all 0.2s ease;
}

.skill-tag:hover {
    background: var(--accent);
    color: white;
    transform: translateY(-1px);
}

/* Habilidades e Idiomas */
.skills-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.skill {
    background-color: var(--border);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 14px;
    transition: transform 0.2s, background-color 0.2s;
}

.skill:hover {
    transform: translateY(-3px);
    background-color: var(--accent);
    color: white;
}

/* Enhanced Skills Dashboard */
.skills-dashboard {
    margin-top: 20px;
}

.skills-category {
    margin-bottom: 30px;
}

.skills-category h3 {
    color: var(--accent);
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: 600;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
}

.skill-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.skill-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.skill-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(52, 152, 219, 0.2);
}

.skill-item:hover::before {
    opacity: 0.05;
}

.skill-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

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

.skill-content {
    flex: 1;
    min-width: 0;
}

.skill-name {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
    transition: color 0.3s ease;
}

.skill-item:hover .skill-name {
    color: var(--accent);
}

.skill-progress {
    width: 100%;
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    overflow: hidden;
    position: relative;
}

.skill-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--accent-hover));
    border-radius: 3px;
    width: 0%;
    transition: width 1.5s ease-out;
    position: relative;
}

.skill-progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Tech Skills Cloud */
.tech-skills-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.tech-skill {
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    color: white;
    padding: 10px 18px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(52, 152, 219, 0.2);
}

.tech-skill::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.tech-skill:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 5px 20px rgba(52, 152, 219, 0.3);
}

.tech-skill:hover::before {
    left: 100%;
}

.tech-skill:active {
    transform: translateY(-1px) scale(1.02);
}

/* Creative Skills Demo */
.skills-demo {
    margin-top: 40px;
    text-align: center;
}

.skills-demo h3 {
    color: var(--accent);
    margin-bottom: 20px;
    font-size: 20px;
    font-weight: 600;
}

.code-demo {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    margin: 20px auto;
    max-width: 600px;
    transition: all 0.3s ease;
}

.code-demo:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.code-header {
    background: #2d3748;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.code-title {
    color: #e2e8f0;
    font-size: 14px;
    font-weight: 500;
}

.code-buttons {
    display: flex;
    gap: 8px;
}

.code-button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.code-button.red { background: #e53e3e; }
.code-button.yellow { background: #d69e2e; }
.code-button.green { background: #38a169; }

.code-content {
    padding: 20px;
    background: #1a202c;
    overflow-x: auto;
}

.code-content pre {
    margin: 0;
    font-family: 'Fira Code', 'Monaco', 'Consolas', monospace;
    font-size: 13px;
    line-height: 1.5;
    color: #e2e8f0;
}

.code-comment { color: #68d391; }
.code-keyword { color: #63b3ed; }
.code-function { color: #fbb6ce; }
.code-builtin { color: #f6ad55; }
.code-string { color: #9f7aea; }
.code-number { color: #fbb6ce; }

.demo-caption {
    margin-top: 15px;
    color: var(--text-secondary);
    font-size: 14px;
    font-style: italic;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.languages .language {
    margin-bottom: 15px;
}

.languages .progress-bar {
    width: 100%;
    height: 8px;
    background-color: var(--border);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 5px;
}

.languages .progress {
    height: 100%;
    background-color: var(--accent);
    border-radius: 4px;
}

/* Resources and Videos Sections */
.resources,
.videos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.resource-item,
.video-item {
    background-color: var(--border);
    padding: 20px;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.resource-item:hover,
.video-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-elevation-medium);
    background-color: var(--accent);
    color: white;
}

.resource-item h3,
.video-item h3 {
    font-size: 16px;
    margin-bottom: 10px;
    color: var(--text-primary);
    font-weight: 600;
}

.resource-item:hover h3,
.video-item:hover h3 {
    color: white;
}

.resource-item a,
.video-item a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    word-break: break-all;
    transition: color 0.3s ease;
}

.resource-item:hover a,
.video-item:hover a {
    color: white;
    text-decoration: underline;
}

.resource-item a:hover,
.video-item a:hover {
    color: white;
}

/* Video Embed Styles for main section */
.video-embed {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    margin: 15px 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    background-color: #000;
}

.video-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 8px;
}

.video-link {
    display: inline-block !important;
    margin-top: 10px;
    padding: 10px 20px !important;
    background-color: var(--accent) !important;
    color: white !important;
    text-decoration: none !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3) !important;
    cursor: pointer !important;
}

.video-link:hover {
    background-color: var(--accent-hover) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.4) !important;
    color: white !important;
    text-decoration: none !important;
}

.video-link:active {
    transform: translateY(0) !important;
    box-shadow: 0 2px 6px rgba(52, 152, 219, 0.3) !important;
}

/* Dark mode adjustments for new sections */
body.dark-mode .resource-item,
body.dark-mode .video-item {
    background-color: var(--border);
}

body.dark-mode .resource-item h3,
body.dark-mode .video-item h3 {
    color: var(--text-primary);
}

body.dark-mode .resource-item a,
body.dark-mode .video-item a {
    color: var(--accent);
}

/* Botones y Selectores */
.print-button {
    background-color: var(--accent);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 700;
    font-size: 12px;
    transition: background-color 0.3s, transform 0.3s;
    white-space: nowrap;
}

.print-button:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
}

.print-button i {
    margin-right: 8px;
}

/* LinkedIn en el navbar */
.linkedin-nav-link {
    color: var(--text-secondary) !important;
    font-size: 20px !important;
    padding: 12px 16px !important;
    transition: all 0.3s ease !important;
    border-radius: 8px !important;
}

.linkedin-nav-link:hover {
    color: #0077b5 !important;
    transform: scale(1.15) !important;
    background-color: rgba(0, 119, 181, 0.1) !important;
}

.linkedin-nav-link i {
    margin-right: 0 !important;
    font-size: 20px !important;
}

/* Print button styling */
.print-button {
    background-color: var(--accent) !important;
    color: white !important;
    border: none !important;
    padding: 10px 16px !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    font-weight: 700 !important;
    font-size: 13px !important;
    transition: all 0.3s ease !important;
    white-space: nowrap !important;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3) !important;
}

.print-button:hover {
    background-color: var(--accent-hover) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.4) !important;
}

.print-button:active {
    transform: translateY(0) !important;
    box-shadow: 0 2px 6px rgba(52, 152, 219, 0.3) !important;
}

.print-button i {
    margin-right: 8px !important;
    font-size: 14px !important;
}

#language-select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background: none;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 5px 30px 5px 10px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 700;
    transition: all 0.3s;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%237f8c8d' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
}

#language-select:hover {
    border-color: var(--accent);
}

.theme-toggle-button {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background: none;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 5px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 700;
    transition: all 0.3s;
    margin-right: 10px;
    font-size: 14px;
}

.theme-toggle-button:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* ==========================================================================
   6. Accessibility & Focus Management
   ========================================================================== */

/* Focus indicators for better keyboard navigation */
.skip-link:focus,
.nav-link:focus,
.contact-button:focus,
.theme-toggle-button:focus,
.print-button:focus,
#language-select:focus {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
}

/* Enhanced focus management */
#contact-popup:focus-within {
    /* Ensure popup maintains focus when opened */
}

/* Skip links positioning */
.skip-navigation {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--accent);
    color: white;
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none;
    z-index: 9999;
    font-size: 14px;
    font-weight: 600;
    transition: top 0.3s;
}

.skip-navigation:focus {
    top: 6px;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .profile-img-bg {
        transition: none;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --accent: #0066cc;
        --border: #000000;
        --text-secondary: #000000;
    }
}

/* ==========================================================================
   10. Social Sharing Styles
   ========================================================================== */

.social-sharing {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
}

.share-button {
    background: var(--accent);
    color: white;
    border: none;
    padding: 12px 16px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
    display: flex;
    align-items: center;
    gap: 8px;
}

.share-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}

.share-dropdown {
    position: absolute;
    bottom: 50px;
    right: 0;
    background: var(--surface);
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    padding: 10px;
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.share-dropdown[aria-hidden="false"] {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.share-dropdown a,
.share-dropdown button {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border: none;
    background: none;
    color: var(--text-primary);
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.2s;
    border-radius: 5px;
    width: 100%;
    text-align: left;
    font-size: 14px;
}

.share-dropdown a:hover,
.share-dropdown button:hover {
    background-color: var(--border);
}

.share-dropdown i {
    width: 16px;
    text-align: center;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .social-sharing {
        bottom: 20px;
        right: 20px;
    }
    
    .share-button {
        padding: 10px 12px;
        font-size: 12px;
    }
    
    .share-dropdown {
        min-width: 160px;
    }
}

/* ==========================================================================
   6. Mobile-First Navigation & Touch Experience
   ========================================================================== */

/* Mobile Bottom Navigation Bar */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 8px 4px;
    z-index: 1000;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    transform: translateY(100%);
    opacity: 0;
    transition: all 0.3s ease;
    /* iOS safe area support */
    padding-bottom: calc(8px + env(safe-area-inset-bottom));
}

.mobile-bottom-nav.show {
    transform: translateY(0);
    opacity: 1;
}

.mobile-nav-item {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    transition: all 0.2s ease;
    min-width: 44px; /* iOS touch target size */
    min-height: 44px;
    position: relative;
    overflow: hidden;
}

.mobile-nav-item i {
    font-size: 18px;
    transition: transform 0.2s ease;
}

.mobile-nav-item span {
    font-size: 10px;
    line-height: 1;
}

.mobile-nav-item:hover,
.mobile-nav-item:focus {
    color: var(--accent);
    background-color: rgba(52, 152, 219, 0.1);
    transform: translateY(-2px);
}

.mobile-nav-item.active {
    color: var(--accent);
    background-color: rgba(52, 152, 219, 0.15);
}

.mobile-nav-item.active::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 3px;
    background: var(--accent);
    border-radius: 2px;
}

.mobile-nav-item:active {
    transform: scale(0.95);
}

.mobile-contact-btn {
    background: var(--accent);
    color: white;
    border-radius: 16px;
    padding: 8px 16px;
}

.mobile-contact-btn:hover,
.mobile-contact-btn:focus {
    background: var(--accent-hover);
    color: white;
}

/* Mobile Floating Action Button (FAB) */
.mobile-fab-container {
    position: fixed;
    bottom: 100px;
    right: 20px;
    z-index: 999;
}

.mobile-fab {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--accent);
    color: white;
    border: none;
    box-shadow: 0 4px 20px rgba(52, 152, 219, 0.4);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: all 0.3s ease;
    transform: scale(0);
}

.mobile-fab.show {
    transform: scale(1);
}

.mobile-fab:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(52, 152, 219, 0.5);
}

.mobile-fab:active {
    transform: scale(0.95);
}

.mobile-fab i {
    transition: transform 0.3s ease;
}

.mobile-fab.active i {
    transform: rotate(45deg);
}

/* FAB Menu */
.mobile-fab-menu {
    position: absolute;
    bottom: 70px;
    right: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px) scale(0.8);
    transition: all 0.3s ease;
}

.mobile-fab-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.fab-action {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--surface);
    color: var(--text-primary);
    border: 1px solid var(--border);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.2s ease;
    opacity: 0;
    transform: translateX(20px);
}

.mobile-fab-menu.show .fab-action {
    opacity: 1;
    transform: translateX(0);
}

.fab-action:nth-child(1) { transition-delay: 0.1s; }
.fab-action:nth-child(2) { transition-delay: 0.15s; }
.fab-action:nth-child(3) { transition-delay: 0.2s; }
.fab-action:nth-child(4) { transition-delay: 0.25s; }

.fab-action:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Swipe Indicator */
.swipe-indicator {
    position: fixed;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    z-index: 100;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.swipe-indicator.show {
    opacity: 0.7;
}

.swipe-hint {
    background: var(--accent);
    color: white;
    padding: 12px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
    animation: swipePulse 2s ease-in-out infinite;
}

.swipe-hint i {
    font-size: 14px;
    animation: swipeArrow 1.5s ease-in-out infinite;
}

@keyframes swipePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes swipeArrow {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(5px); }
}

/* Touch-friendly adjustments for existing elements */
@media (max-width: 768px) {
    /* Enhanced touch targets */
    .nav-link {
        min-height: 44px;
        min-width: 44px;
        padding: 12px 16px;
    }
    
    .contact-button {
        padding: 14px 28px;
        font-size: 16px;
        min-height: 48px;
    }
    
    .print-button,
    .theme-toggle-button {
        min-height: 44px;
        min-width: 44px;
        padding: 10px 14px;
    }
    
    .language-selector select {
        min-height: 44px;
        padding: 12px 16px;
    }
    
    /* Enhanced mobile contact popup */
    .contact-popup-content {
        width: 95%;
        max-width: none;
        margin: 20px;
    }
    
    .contact-popup-body {
        padding: 20px;
    }
    
    .contact-item {
        padding: 16px 0;
        min-height: 44px;
    }
    
    /* Better mobile typography */
    h1 {
        font-size: 24px;
        line-height: 1.2;
    }
    
    .section h2 {
        font-size: 20px;
        padding-bottom: 8px;
        margin-bottom: 16px;
    }
    
    .job h3,
    .education-item h3 {
        font-size: 16px;
    }
    
    .job ul li {
        font-size: 14px;
        line-height: 1.5;
    }
    
    /* Resources and Videos responsive design */
    .resources,
    .videos {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .resource-item,
    .video-item {
        padding: 15px;
    }
    
    .resource-item h3,
    .video-item h3 {
        font-size: 14px;
    }
    
    .resource-item a,
    .video-item a {
        font-size: 12px;
    }
    
    /* Video Embed Styles */
    .video-embed {
        position: relative;
        width: 100%;
        height: 0;
        padding-bottom: 56.25%; /* 16:9 aspect ratio */
        margin: 15px 0;
        border-radius: 8px;
        overflow: hidden;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    }
    
    .video-embed iframe {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        border: none;
    }
    
    .video-link {
        display: inline-block;
        margin-top: 10px;
        padding: 8px 16px;
        background-color: var(--accent);
        color: white;
        text-decoration: none;
        border-radius: 5px;
        font-size: 14px;
        font-weight: 600;
        transition: all 0.3s ease;
    }
    
    .video-link:hover {
        background-color: var(--accent-hover);
        transform: translateY(-2px);
    }
}

/* Landscape mobile optimizations */
@media (max-width: 768px) and (orientation: landscape) {
    .mobile-bottom-nav {
        padding: 6px 4px;
    }
    
    .mobile-nav-item {
        padding: 6px 8px;
        font-size: 10px;
    }
    
    .mobile-nav-item i {
        font-size: 16px;
    }
    
    .container {
        padding: 20px;
        margin: 10px;
    }
}

/* High-resolution mobile displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .mobile-nav-item,
    .fab-action {
        /* Crisp icons on high-DPI displays */
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

/* Accessibility for mobile */
@media (prefers-reduced-motion: reduce) {
    .mobile-nav-item,
    .mobile-fab,
    .fab-action,
    .swipe-hint {
        transition: none;
        animation: none;
    }
    
    .swipe-hint {
        animation: none;
    }
}

/* High contrast mode for mobile */
@media (prefers-contrast: high) {
    .mobile-bottom-nav {
        background: white;
        border-top: 2px solid black;
    }
    
    .mobile-nav-item {
        border: 1px solid transparent;
    }
    
    .mobile-nav-item:hover,
    .mobile-nav-item:focus {
        border-color: var(--accent);
    }
    
    .mobile-fab {
        border: 2px solid white;
    }
}

/* Dark mode mobile adjustments */
@media (prefers-color-scheme: dark) {
    .mobile-bottom-nav {
        background: rgba(42, 42, 78, 0.95);
        border-top-color: var(--border);
    }
    
    .mobile-fab-menu .fab-action {
        background: var(--surface);
        border-color: var(--border);
    }
}

/* ==========================================================================
   7. PWA (Progressive Web App) Styles
   ========================================================================== */

/* PWA Install Banner Styles */
.pwa-install-banner {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background: linear-gradient(135deg, #4a90e2, #357abd);
    color: white;
    padding: 16px 20px;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 15px;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
    font-family: 'Lato', sans-serif;
    max-width: 400px;
    margin: 0 auto;
}

.pwa-install-banner.show {
    transform: translateY(0);
    opacity: 1;
}

.pwa-install-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.pwa-install-content {
    flex: 1;
    min-width: 0;
}

.pwa-install-title {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 4px 0;
}

.pwa-install-text {
    font-size: 12px;
    opacity: 0.9;
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.pwa-install-actions {
    display: flex;
    gap: 8px;
}

.pwa-install-btn {
    background: rgba(255,255,255,0.2);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

.pwa-install-btn:hover {
    background: rgba(255,255,255,0.3);
}

.pwa-install-btn.primary {
    background: white;
    color: #4a90e2;
}

.pwa-install-btn.primary:hover {
    background: #f8f9fa;
}

.pwa-install-close {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s;
    flex-shrink: 0;
}

.pwa-install-close:hover {
    background: rgba(255,255,255,0.2);
}

/* PWA Update Notification Styles */
.pwa-update-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #4a90e2;
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    z-index: 10000;
    font-family: 'Lato', sans-serif;
    font-size: 14px;
    max-width: 300px;
    animation: slideInFromRight 0.3s ease-out;
}

@keyframes slideInFromRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Standalone mode adjustments */
@media all and (display-mode: standalone) {
    .pwa-install-banner {
        display: none !important;
    }
    
    /* Hide browser UI elements in standalone mode */
    body {
        padding-top: env(safe-area-inset-top);
        padding-bottom: env(safe-area-inset-bottom);
    }
}

/* iOS Safari specific PWA styles */
@supports (-webkit-touch-callout: none) {
    .pwa-install-banner {
        bottom: calc(20px + env(safe-area-inset-bottom));
    }
    
    .pwa-update-toast {
        top: calc(20px + env(safe-area-inset-top));
    }
}

/* High contrast mode support for PWA elements */
@media (prefers-contrast: high) {
    .pwa-install-banner {
        border: 2px solid white;
    }
    
    .pwa-install-btn {
        border: 1px solid currentColor;
    }
}

/* Reduced motion support for PWA animations */
@media (prefers-reduced-motion: reduce) {
    .pwa-install-banner,
    .pwa-update-toast {
        animation: none;
        transition: none;
    }
}

/* ==========================================================================
   7. Utilidades (Helpers)
   ========================================================================== */

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Soporte RTL */
body[dir="rtl"] .main-nav a.active::after {
    left: auto;
    right: 50%;
    transform: translateX(50%);
}

body[dir="rtl"] #language-select {
    background-position: left 10px center;
    padding: 5px 10px 5px 30px;
}

body[dir="rtl"] .print-button i {
    margin-right: 0;
    margin-left: 8px;
}

body[dir="rtl"] .job ul {
    padding-left: 0;
    padding-right: 5px;
}

/* ==========================================================================
   7. Modern CSS Features (Progressive Enhancement)
   ========================================================================== */

/* Container Queries for better responsive design */
@container (max-width: 600px) {
    .container {
        padding: 20px;
        margin: 20px;
    }
    
    h1 {
        font-size: 24px;
    }
    
    .main-nav ul {
        gap: 8px;
    }
}

/* :has() pseudo-class for parent selection (modern browsers) */
@supports selector(:has(*)) {
    nav:has(.nav-link.active) {
        border-bottom: 2px solid var(--accent);
    }
    
    .container:has(.profile-img-container:hover) .profile-img-bg {
        transform: scale(1.25);
    }
}

/* Modern CSS Grid features */
@supports (grid-template-columns: subgrid) {
    .skills-container {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 12px;
    }
}

/* View Transitions API support */
@supports (view-transition-name: none) {
    .section {
        view-transition-name: section-content;
    }
    
    ::view-transition-old(section-content) {
        animation: slide-out 0.3s ease-in-out;
    }
    
    ::view-transition-new(section-content) {
        animation: slide-in 0.3s ease-in-out;
    }
}

@keyframes slide-in {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slide-out {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-20px);
    }
}

/* ==========================================================================
   8. Modo Oscuro (Dark Mode)
   ========================================================================== */

body.dark-mode {
    --background: #1a1a2e;
    --surface: #2a2a4e;
    --text-primary: #e0e0e0;
    --text-secondary: #a0a0c0;
    --accent: #4a90e2;
    --border: #3a3a5e;
}

body.dark-mode .profile-img-container {
    border-color: var(--surface);
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
}

body.dark-mode .main-nav {
    background-color: rgba(42, 42, 78, 0.9);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

body.dark-mode #language-select {
    background-color: var(--surface);
    border-color: var(--border);
    color: var(--text-secondary);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23a0a0c0' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E");
}

body.dark-mode .theme-toggle-button {
    border-color: var(--border);
    color: var(--text-secondary);
}

body.dark-mode .theme-toggle-button:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* Theme toggle icon state */
#theme-toggle-icon {
    color: var(--text-secondary) !important;
    transition: color 0.3s ease !important;
}

body.dark-mode #theme-toggle-icon {
    color: #f1c40f !important;
}

/* LinkedIn en modo oscuro */
body.dark-mode .linkedin-nav-link {
    color: var(--text-secondary) !important;
}

body.dark-mode .linkedin-nav-link:hover {
    color: #0077b5 !important;
}

/* Mobile Timeline Adjustments */
@media (max-width: 768px) {
    .timeline {
        padding: 20px 20px;
    }

    .timeline-line {
        left: 30px;
        width: 2px;
    }

    .timeline-item {
        margin-bottom: 40px;
    }

    .timeline-item:nth-child(even) .timeline-content,
    .timeline-item:nth-child(odd) .timeline-content {
        margin-left: 60px;
        margin-right: 0;
    }

    .timeline-marker {
        left: 30px;
        top: 15px;
    }

    .timeline-dot {
        width: 16px;
        height: 16px;
        border-width: 3px;
    }

    .timeline-year {
        font-size: 11px;
        padding: 3px 8px;
    }

    .timeline-card {
        padding: 20px;
    }

    .timeline-header h3 {
        font-size: 16px;
    }

    .timeline-skills {
        justify-content: flex-start;
    }
}

/* ==========================================================================
    8. Media Queries (Responsive y Print)
    ========================================================================== */

@media (max-width: 800px) {
    .container {
        margin: 0;
        border-radius: 0;
        padding: 25px;
    }
    h1 {
        font-size: 28px;
    }
    .contact-info {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    .main-nav {
        padding: 5px 10px;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }
    .main-nav ul {
        gap: 5px;
        order: 2;
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }
    #language-select {
        order: 1;
        margin: 0 auto 5px auto;
    }
    .main-nav {
        padding: 8px 15px;
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }
    .main-nav ul {
        gap: 5px;
        order: 2;
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }
    .main-nav a {
        padding: 6px 10px;
        font-size: 13px;
        white-space: nowrap;
    }
    .linkedin-nav-link {
        font-size: 16px;
        padding: 6px 10px;
    }
    .theme-toggle-button {
        order: 1;
        margin: 0 3px 3px 3px;
        padding: 6px 10px;
        font-size: 12px;
    }
    .print-button {
        order: 1;
        margin: 0 3px 3px 3px;
        padding: 6px 10px;
        font-size: 11px;
    }
    #language-select {
        order: 1;
        margin: 0 auto 3px auto;
        padding: 6px 10px;
        font-size: 12px;
    }
}

/* ==========================================================================
   9. Enhanced Print Styles for Professional PDF Output
   ========================================================================== */

/* Template de impresión - Oculto por defecto */
.print-template {
    display: none;
}

/* Enhanced print media queries */
@media print {
    /* Enhanced page setup */
    @page {
        margin: 1.2cm;
        size: A4;
        orphans: 3;
        widows: 3;
    }
    @page {
        margin: 1.5cm;
        size: A4;
    }
    
    /* Ocultar todo el contenido normal */
    .main-nav,
    .print-button,
    .container,
    .contact-button,
    .contact-info.print-only,
    .contact-popup {
        display: none !important;
    }
    
    /* Mostrar solo el template de impresión */
    .print-template {
        display: block !important;
    }
    
    /* Estilos base para impresión */
    body {
        background-color: #fff !important;
        color: #000 !important;
        font-family: 'Arial', sans-serif;
        font-size: 10pt;
        line-height: 1.4;
        margin: 0;
        padding: 0;
    }
    
    /* Header de impresión */
    .print-header {
        text-align: center;
        margin-bottom: 20px;
        border-bottom: 2px solid #333;
        padding-bottom: 15px;
    }
    
    .print-name {
        font-size: 28pt;
        font-weight: bold;
        color: #000;
        margin-bottom: 10px;
        letter-spacing: 1px;
    }
    
    .print-contact-single-line {
        font-size: 10pt;
        color: #333;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        margin: 0 auto;
        max-width: 100%;
    }
    
    /* Contenido de impresión */
    .print-content {
        width: 100%;
    }
    
    .print-section {
        margin-bottom: 20px;
        page-break-inside: avoid;
    }
    
    .print-section-title {
        font-size: 16pt;
        font-weight: bold;
        color: #000;
        margin: 20px 0 10px 0;
        padding-bottom: 5px;
        border-bottom: 1px solid #666;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }
    
    .print-text {
        font-size: 10pt;
        line-height: 1.4;
        text-align: justify;
        margin-bottom: 10px;
    }
    
    /* Trabajos */
    .print-job {
        margin-bottom: 15px;
        page-break-inside: avoid;
    }
    
    .print-job-header {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        margin-bottom: 5px;
    }
    
    .print-job-header strong {
        font-size: 12pt;
        color: #000;
        font-weight: bold;
    }
    
    .print-date {
        font-size: 9pt;
        color: #666;
        font-weight: normal;
    }
    
    .print-job-location {
        font-size: 10pt;
        color: #333;
        margin-bottom: 8px;
        font-style: italic;
    }
    
    .print-job-details {
        margin: 0;
        padding-left: 15px;
    }
    
    .print-job-details li {
        font-size: 9pt;
        line-height: 1.3;
        margin-bottom: 3px;
        color: #000;
    }
    
    /* Educación */
    .print-education-item {
        margin-bottom: 12px;
        page-break-inside: avoid;
    }
    
    .print-education-item strong {
        font-size: 11pt;
        color: #000;
        font-weight: bold;
    }
    
    .print-education-location {
        font-size: 9pt;
        color: #333;
        margin-top: 2px;
        font-style: italic;
    }
    
    /* Habilidades */
    .print-skills {
        margin-bottom: 10px;
    }
    
    .print-skill-category {
        font-size: 10pt;
        margin-bottom: 12px;
        line-height: 1.3;
    }

    .print-skill-category strong {
        color: #000;
        font-weight: bold;
    }

    .print-skill-list {
        margin-top: 6px;
    }

    .print-skill-item {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 4px;
        padding: 2px 0;
        border-bottom: 1px solid #eee;
    }

    .print-skill-item:last-child {
        border-bottom: none;
    }

    .print-skill-level {
        color: #666;
        font-size: 9pt;
        font-weight: bold;
    }

    .print-tech-skills {
        margin-top: 6px;
        font-size: 9pt;
        line-height: 1.4;
        color: #333;
    }
    
    /* Idiomas */
    .print-languages {
        margin-bottom: 15px;
    }
    
    .print-language {
        margin-bottom: 8px;
        page-break-inside: avoid;
    }
    
    .print-language strong {
        font-size: 10pt;
        color: #000;
        font-weight: bold;
    }
    
    .print-progress-bar {
        width: 100%;
        height: 6px;
        background-color: #e0e0e0;
        border-radius: 3px;
        overflow: hidden;
        margin-top: 3px;
    }
    
    .print-progress {
        height: 100%;
        background-color: #333;
        transition: none;
    }
    
    /* Optimizaciones para impresión */
    * {
        -webkit-print-color-adjust: exact !important;
        color-adjust: exact !important;
    }
    
    /* Evitar saltos de página innecesarios */
    .print-section:last-child {
        page-break-after: avoid;
    }
    body {
        background-color: #fff !important;
        color: #000 !important;
        font-size: 9pt;
        line-height: 1.3;
    }
    .container {
        box-shadow: none !important;
        margin: 0 !important;
        padding: 0 !important;
        border-radius: 0 !important;
        max-width: 100% !important;
    }
    header {
        margin-bottom: 15px;
    }
    .profile-img-container {
        box-shadow: none;
        border: 3px solid #ddd;
        width: 100px;
        height: 100px;
        margin-bottom: 10px;
    }
    h1 {
        font-size: 24pt;
        margin: 10px 0 8px 0;
    }
    .contact-button {
        display: none !important; /* Ocultar botón en impresión */
    }
    
    .contact-info.print-only {
        display: block !important;
        text-align: center !important;
        font-size: 8pt !important;
        margin: 10px 0 !important;
        padding: 0 !important;
        line-height: 1.2 !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }
    
    .contact-popup {
        display: none !important; /* Ocultar popup en impresión */
    }
    .section {
        opacity: 1 !important;
        transform: none !important;
        margin-bottom: 12px;
        page-break-inside: avoid;
    }
    .job,
    .education-item {
        margin-bottom: 15px;
        page-break-inside: avoid;
    }
    h2,
    h3 {
        color: #000 !important;
    }
    .section h2 {
        border-bottom: 1px solid #ccc;
        padding-bottom: 4px;
        margin-bottom: 12px;
        font-size: 14pt;
    }
    .job h3,
    .education-item h3 {
        font-size: 11pt;
    }
    .skill {
        background-color: #f0f0f0 !important;
        color: #000 !important;
        border: 1px solid #ccc;
        padding: 4px 8px;
        font-size: 8.5pt;
    }
    a {
        color: #000 !important;
        text-decoration: none;
    }
    .languages .progress-bar {
        background-color: #e0e0e0 !important;
        border: 1px solid #ccc;
    }
    .languages .progress {
        background-color: #aeaeae !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    /* Professional Resources and Educational Videos */
    .print-resources,
    .print-videos {
        margin-bottom: 15px;
    }
    
    .print-resource-item,
    .print-video-item {
        font-size: 9pt;
        line-height: 1.3;
        margin-bottom: 6px;
        page-break-inside: avoid;
    }
    
    .print-resource-item strong,
    .print-video-item strong {
        color: #000;
        font-weight: bold;
        font-size: 9.5pt;
    }
    
    .print-resource-item a,
    .print-video-item a {
        color: #333 !important;
        text-decoration: none;
        font-size: 9pt;
    }
    
    .print-resource-item a:hover,
    .print-video-item a:hover {
        text-decoration: underline;
    }
}

    
