body {
    font-family: Arial, sans-serif;
    background-color: #fff;
    color: #000;
    margin: 0;
    padding: 0;
}

#animation-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.9);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
}

#code-display {
    font-family: monospace;
    color: #00f;
    white-space: pre-wrap;
    font-size: 16px;
}

#cv-container {
    max-width: 800px;
    margin: 20px auto;
    padding: 20px;
    background-color: #ffffff;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

header {
    text-align: center;
    margin-bottom: 20px;
}

section {
    margin-bottom: 20px;
}

h2 {
    color: #00f;
}

.hidden {
    display: none;
}

:root {
    --primary-color: #1e293b;
    --accent-color: #2563eb;
    --text-main: #334155;
    --text-muted: #64748b;
    --bg-body: #f8fafc;
    --bg-card: #ffffff;
    --border-color: #e2e8f0;
    --badge-bg: #eff6ff;
    --badge-text: #1d4ed8;
}

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

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    padding: 2rem 1rem;
}

/* Contenedor Principal */
#cv-container {
    max-width: 850px;
    margin: 0 auto;
    background: var(--bg-card);
    border-radius: 12px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.01);
    padding: 3rem;
    border: 1px solid var(--border-color);
}

/* Encabezado */
header {
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 1.5rem;
    margin-bottom: 2rem;
}

header h1 {
    font-size: 2.25rem;
    color: var(--primary-color);
    font-weight: 700;
    letter-spacing: -0.025em;
    margin-bottom: 0.5rem;
}

.subtitle {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent-color);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    line-height: 1.4;
}

/* Botón de Acción */
.action-bar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 1.5rem;
}

#download-button {
    background-color: var(--accent-color);
    color: #ffffff;
    border: none;
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

#download-button:hover {
    background-color: #1d4ed8;
    transform: translateY(-1px);
}

/* Información de Contacto */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
    background-color: var(--bg-body);
    padding: 1.2rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    color: var(--text-main);
}

.contact-item i {
    color: var(--accent-color);
    font-size: 1.1rem;
}

.contact-item a {
    color: var(--text-main);
    text-decoration: none;
    transition: color 0.2s;
}

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

/* Secciones Generales */
section {
    margin-bottom: 2rem;
}

section h2 {
    font-size: 1.25rem;
    color: var(--primary-color);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.4rem;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Tarjetas de Experiencia y Educación */
.timeline-item {
    margin-bottom: 1.25rem;
    position: relative;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.item-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.item-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-color);
}

.item-company {
    font-size: 0.95rem;
    color: var(--text-muted);
    font-weight: 500;
}

.item-date {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
    background: var(--bg-body);
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    border: 1px solid var(--border-color);
}

/* Habilidades (Skills Badges) */
.skills-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.skills-list li {
    background-color: var(--badge-bg);
    color: var(--badge-text);
    padding: 0.4rem 0.85rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid rgba(37, 99, 235, 0.1);
}

/* Helper para ocultar elementos */
.hidden {
    display: none !important;
}

/* Reglas de Impresión / Guardado a PDF */
@media print {
    body {
        background: #ffffff;
        padding: 0;
    }
    #cv-container {
        box-shadow: none;
        border: none;
        padding: 0;
        max-width: 100%;
    }
    #animation-container, #download-button, .action-bar {
        display: none !important;
    }
    .contact-grid {
        background: transparent;
        border: 1px solid var(--border-color);
    }
}

/* Adaptabilidad a Pantallas Pequeñas */
@media (max-width: 640px) {
    #cv-container {
        padding: 1.5rem;
    }
    .item-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
}