@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;500;700&family=Open+Sans:wght@300;400;600&display=swap');

/* Reset */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 62.5%;
    /* 1rem = 10px */
}

body {
    background-color: #f4f4f4;
    color: #1a1a1a;
    font-family: 'Open Sans', system-ui, sans-serif;
    font-size: 1.6rem;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* CV Styles */
.cv-body {
    background-color: #f4f4f4;
}

.cv-container {
    max-width: 1000px;
    margin: 4rem auto;
    background: white;
    /* Simplified shadow */
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    padding: 0;
    display: flex;
    flex-direction: column;
}

.cv-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 3rem 4rem;
    border-bottom: 2px solid #eee;
}

/* Fallback for flex gap */
.cv-header>* {
    margin: 0 1rem;
}

.cv-name-block {
    max-width: 60%;
}

.cv-name {
    font-size: 3.5rem;
    font-weight: 800;
    text-transform: uppercase;
    color: #000;
    margin-bottom: 0.5rem;
    line-height: 1.1;
}

.cv-title {
    font-size: 1.6rem;
    color: #666;
    font-weight: 400;
}

.cv-photo {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border: 1px solid #ddd;
}

.cv-grid {
    display: grid;
    grid-template-columns: 35% 65%;
    min-height: 1000px;
}

.cv-sidebar {
    padding: 3rem 2rem 3rem 4rem;
    border-right: 1px solid #eee;
}

.cv-main {
    padding: 3rem 4rem 3rem 2rem;
}

.cv-section-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #0044cc;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 0.5rem;
    margin-top: 2rem;
}

.cv-section-title:first-child {
    margin-top: 0;
}

.contact-item {
    display: flex;
    align-items: center;
    /* No gap */
    margin-bottom: 1rem;
    font-size: 1.4rem;
}

.contact-icon {
    font-size: 1.6rem;
    width: 20px;
    text-align: center;
    margin-right: 1rem;
}

.cv-edu-item {
    margin-bottom: 1.5rem;
}

.cv-edu-school {
    font-weight: 700;
    font-size: 1.5rem;
}

.cv-edu-degree {
    color: #555;
    font-size: 1.4rem;
}

.cv-list {
    list-style: disc;
    padding-left: 1.5rem;
    font-size: 1.4rem;
    line-height: 1.5;
}

.cv-list li {
    margin-bottom: 0.5rem;
}

.cv-summary {
    font-size: 1.4rem;
    line-height: 1.6;
    color: #444;
    text-align: justify;
    font-style: italic;
    margin-bottom: 2rem;
}

.cv-job {
    margin-bottom: 2rem;
}

.cv-job-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: #000;
}

.cv-job-company {
    font-size: 1.5rem;
    color: #0044cc;
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: block;
}

.cv-job-date {
    color: #777;
    font-size: 1.3rem;
    margin-bottom: 1rem;
    display: block;
}

.cv-link {
    color: #0044cc;
    text-decoration: underline;
}

/* Button Styles */
.btn {
    display: inline-block;
    padding: 1.2rem 3rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.6rem;
    cursor: pointer;
    transition: 0.3s ease;
    border: 2px solid transparent;
}

.btn-primary {
    background: #FF7F50;
    /* Fallback hex */
    color: white;
}

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

/* Media Queries */
@media (max-width: 768px) {
    .cv-header {
        flex-direction: column-reverse;
        text-align: center;
        padding: 2rem;
    }

    .cv-header .cv-name-block {
        margin-top: 2rem;
    }

    .cv-name-block {
        max-width: 100%;
    }

    .cv-grid {
        grid-template-columns: 1fr;
    }

    .cv-sidebar {
        border-right: none;
        border-bottom: 1px solid #eee;
        padding: 2rem;
    }

    .cv-main {
        padding: 2rem;
    }
}

/* PDF Compact Mode */
.pdf-compact .cv-container {
    width: 800px;
    max-width: 800px;
    box-shadow: none;
    margin: 0;
}

.pdf-compact .cv-header {
    padding: 1.5rem 2rem;
}

.pdf-compact .cv-name {
    font-size: 2.8rem;
    margin-bottom: 0.3rem;
}

.pdf-compact .cv-title {
    font-size: 1.2rem;
}

.pdf-compact .cv-photo {
    width: 110px;
    height: 110px;
}

.pdf-compact .cv-sidebar,
.pdf-compact .cv-main {
    padding: 1.5rem;
}

.pdf-compact .cv-section-title {
    font-size: 1.4rem;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

.pdf-compact .cv-list {
    font-size: 1.1rem;
    line-height: 1.4;
    margin-bottom: 0;
}

.pdf-compact .cv-list li {
    margin-bottom: 0.2rem;
}

.pdf-compact .contact-item {
    font-size: 1.1rem;
    margin-bottom: 0.3rem;
}

.pdf-compact .contact-icon {
    font-size: 1.2rem;
    width: 15px;
    margin-right: 0.8rem;
}

.pdf-compact .cv-summary {
    font-size: 1.1rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.pdf-compact .cv-edu-degree,
.pdf-compact .cv-job-date {
    font-size: 1rem;
    margin-bottom: 0.2rem;
}

.pdf-compact .cv-edu-item {
    margin-bottom: 0.8rem;
}

.pdf-compact .cv-edu-school,
.pdf-compact .cv-job-title {
    font-size: 1.2rem;
}

.pdf-compact .cv-job-company {
    font-size: 1.1rem;
    margin-bottom: 0.2rem;
}

.pdf-compact .cv-job {
    margin-bottom: 1rem;
}

.pdf-compact .cv-grid {
    min-height: auto;
}