:root {
    --primary-color: #ffc900;
    --secondary-color: #fff9e6;
    --dark-color: #003d5c;
}

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

body {
    font-family: 'Segoe UI', 'Roboto', 'Helvetica', 'Microsoft YaHei', sans-serif;
    line-height: 1.5;
    color: #333;
    background: #f0f0f0;
}

.cv-container {
    max-width: 1000px;
    margin: 0 auto;
    background: white;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

.cv-header {
    background: linear-gradient(135deg, var(--dark-color) 0%, #00597f 100%);
    padding: 0.5rem;
    height: 20px;
}

.language-nav {
    background: white;
    padding: 0.8rem;
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    border-bottom: 1px solid #eee;
}

.lang-link {
    text-decoration: none;
    color: var(--dark-color);
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: all 0.3s;
}

.lang-link:hover {
    background: var(--primary-color);
    color: var(--dark-color);
}

.lang-link.active {
    background: var(--dark-color);
    color: white;
}

.cv-content {
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: calc(100vh - 100px);
}

.cv-left {
    background: linear-gradient(135deg, var(--dark-color) 0%, #00597f 100%);
    color: white;
    padding: 2rem 1.5rem;
    overflow-y: auto;
}

.photo-section {
    text-align: center;
    margin-bottom: 2rem;
}

.profile-photo {
    width: 140px;
    height: 140px;
    border-radius: 10px;
    border: 4px solid var(--primary-color);
    object-fit: cover;
    margin-bottom: 1rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: transform 0.2s ease;
}

.profile-photo:hover {
    transform: scale(1.05);
}

.name-section h2 {
    font-size: 1.3rem;
    margin-bottom: 0.3rem;
    font-weight: 700;
}

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

.section-block {
    margin-bottom: 2rem;
}

.section-title {
    background: var(--primary-color);
    color: var(--dark-color);
    padding: 0.8rem;
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 1rem;
    border-radius: 5px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.icon {
    font-size: 1.2rem;
}

.section-content {
    font-size: 0.85rem;
    line-height: 1.6;
}

.section-content p {
    margin-bottom: 0.8rem;
}

.section-content a {
    color: var(--primary-color);
    text-decoration: none;
}

.section-content a:hover {
    text-decoration: underline;
}

.exp-item {
    margin-bottom: 1rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

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

.exp-item p {
    margin: 0.3rem 0;
    font-size: 0.8rem;
}

.exp-item strong {
    color: var(--primary-color);
}

.cv-right {
    background: white;
    padding: 2rem;
    overflow-y: auto;
}

.section-block-right {
    margin-bottom: 2rem;
    page-break-inside: avoid;
}

.section-title-right {
    background: var(--dark-color);
    color: white;
    padding: 0.8rem 1rem;
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 1rem;
    border-left: 5px solid var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.icon-right {
    font-size: 1.1rem;
}

.section-text {
    font-size: 0.9rem;
    line-height: 1.7;
    color: #555;
    text-align: justify;
}

.education-item {
    margin-bottom: 1.2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

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

.education-item p {
    margin: 0.3rem 0;
    font-size: 0.9rem;
}

.education-item strong {
    color: var(--dark-color);
}

.skills-grid {
    display: grid;
    gap: 1rem;
}

.skill-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid #eee;
}

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

.skill-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--dark-color);
}

.skill-dots {
    display: flex;
    gap: 0.4rem;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 1px solid var(--dark-color);
}

.dot.filled {
    background: var(--primary-color);
}

.dot.empty {
    background: white;
}

.language-item {
    margin-bottom: 1.2rem;
    display: grid;
    grid-template-columns: 80px 1fr 60px;
    align-items: center;
    gap: 1rem;
}

.language-item p {
    font-size: 0.9rem;
}

.language-item strong {
    color: var(--dark-color);
}

.language-dots {
    display: flex;
    gap: 0.4rem;
}

.lang-level {
    font-size: 0.75rem;
    color: #999;
    text-align: right;
}

.color-palette {
    background: #f9f9f9;
    padding: 1rem;
    border-radius: 5px;
}

.color-palette h4 {
    color: var(--dark-color);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.select-color {
    font-size: 0.8rem;
    color: #999;
    margin-bottom: 1rem;
}

.color-options {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.8rem;
}

.color-option {
    text-align: center;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.color-option:hover,
.color-option.active {
    opacity: 1;
}

.color-box {
    width: 40px;
    height: 40px;
    border-radius: 5px;
    margin: 0 auto 0.5rem;
    border: 2px solid transparent;
}

.color-option.active .color-box {
    border-color: var(--dark-color);
}

.powder-blue { background: #b0d9e6; }
.dim-grey { background: #6b7280; }
.ferrari-red { background: #d32f2f; }
.gold-sand { background: #ffc900; }

.color-option span {
    font-size: 0.7rem;
    display: block;
    color: #666;
}

@media (max-width: 768px) {
    .cv-content {
        grid-template-columns: 1fr;
    }

    .cv-left {
        padding: 1.5rem;
    }

    .cv-right {
        padding: 1.5rem;
    }

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

    .language-item {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .language-nav {
        flex-wrap: wrap;
    }
}

/* MODAL */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-image {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.2);
}

.close {
    position: absolute;
    top: 30px;
    right: 45px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
    transition: color 0.2s ease;
}

.close:hover,
.close:focus {
    color: #bbb;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* CERTIFICACIONES */
.certification-item {
    margin-bottom: 0.8rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid #eee;
    font-size: 0.9rem;
}

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

.certification-item p {
    margin: 0;
    color: var(--dark-color);
}

.certification-item strong {
    color: var(--dark-color);
}
