/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
    padding: 20px;
}

/* CV Container */
.cv-container {
    max-width: 1000px;
    margin: 0 auto;
    background: white;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    overflow: hidden;
}

/* Personal Info in Sidebar */
.personal-info {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    padding: 20px 15px;
    margin: -20px -15px 15px -15px;
    text-align: center;
}

.personal-info h1 {
    font-size: 1.4rem;
    font-weight: 300;
    margin-bottom: 5px;
    letter-spacing: 1px;
}

.personal-info h2 {
    font-size: 0.9rem;
    font-weight: 400;
    margin-bottom: 15px;
    opacity: 0.9;
}

/* Contact Section - consistent with sidebar */
.contact-section {
    margin: 0;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
}

.contact-section h3 {
    margin-bottom: 10px;
}

.contact-section .contact-info {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: flex-start;
}

.contact-section .contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.9rem;
    padding: 6px 0;
    line-height: 1.5;
}

.contact-section .contact-item i {
    width: 20px;
    text-align: center;
    color: #2c3e50;
    font-size: 1rem;
}

.contact-section .contact-item span {
    color: #2c3e50;
    font-weight: 600;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    letter-spacing: 0.3px;
}

/* Main Content */
.cv-main {
    display: grid;
    grid-template-columns: 1.3fr 1.7fr;
    gap: 0;
    min-height: 400px;
}

/* Left Column */
.left-column {
    background-color: #f8f9fa;
    padding: 20px 15px;
    border-right: 1px solid #e9ecef;
}

/* Right Column */
.right-column {
    padding: 20px 15px;
}

/* Section Styles */
.cv-section {
    margin-bottom: 12px;
}

.cv-section:first-child {
    margin-bottom: 15px;
}

.cv-section h3 {
    color: #2c3e50;
    font-size: 1rem;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 2px solid #2c3e50;
    padding-bottom: 5px;
}

.cv-section h3 i {
    font-size: 1.1rem;
}

/* Skills Styles */
.skills-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.skill-category h4 {
    color: #495057;
    font-size: 0.9rem;
    margin-bottom: 6px;
    font-weight: 600;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.skill-tag {
    background: #2c3e50;
    color: white;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 500;
}

/* Languages Styles */
.language-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
    border-bottom: 1px solid #e9ecef;
}

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

.language-name {
    font-weight: 500;
}

.language-level {
    color: #2c3e50;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Experience Styles */
.experience-item {
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e9ecef;
}

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

.experience-header {
    margin-bottom: 5px;
}

.experience-header h4 {
    color: #495057;
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 3px;
}

.company {
    color: #2c3e50;
    font-weight: 500;
    margin-right: 15px;
}

.period {
    color: #6c757d;
    font-size: 0.8rem;
    font-style: italic;
}

.experience-details {
    list-style: none;
    padding-left: 0;
}

.experience-details li {
    position: relative;
    padding-left: 15px;
    margin-bottom: 2px;
    color: #495057;
    font-size: 0.8rem;
    line-height: 1.2;
}

.experience-details li::before {
    content: "▸";
    position: absolute;
    left: 0;
    color: #2c3e50;
    font-weight: bold;
}

/* Education Styles */
.education-item {
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid #e9ecef;
}

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

.education-header {
    margin-bottom: 2px;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 10px;
}

.education-header h4 {
    color: #495057;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0;
}

.school {
    color: #2c3e50;
    font-weight: 500;
    font-size: 0.85rem;
}

.period {
    color: #6c757d;
    font-size: 0.75rem;
    font-style: italic;
}

.education-item p {
    color: #6c757d;
    font-size: 0.75rem;
    margin-top: 3px;
}

/* Projects Styles */
.project-item {
    margin-bottom: 25px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #2c3e50;
}

.project-item h4 {
    color: #495057;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.project-item p {
    color: #6c757d;
    margin-bottom: 15px;
    line-height: 1.5;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tech-tag {
    background: #e9ecef;
    color: #495057;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Stages Styles */
.stage-item {
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid #e9ecef;
}

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

.stage-header {
    margin-bottom: 2px;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 10px;
}

.stage-header h4 {
    color: #495057;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0;
}

.stage-item p {
    color: #6c757d;
    font-size: 0.75rem;
    margin-top: 3px;
    line-height: 1.2;
}

/* Certifications Styles */
.certification-item {
    padding: 8px 0;
    border-bottom: 1px solid #e9ecef;
}

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

.certification-name {
    font-weight: 500;
    color: #495057;
}

/* Sidebar Projects Styles */
.project-item-sidebar {
    margin-bottom: 12px;
    padding: 12px;
    background-color: #ffffff;
    border-radius: 6px;
    border-left: 3px solid #2c3e50;
}

.project-item-sidebar h4 {
    color: #495057;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.project-item-sidebar p {
    color: #6c757d;
    font-size: 0.75rem;
    margin-bottom: 8px;
    line-height: 1.3;
}

.project-tech-sidebar {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

/* Teaching Styles */
.teaching-item {
    margin-bottom: 10px;
}

.teaching-item h4 {
    color: #495057;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.teaching-item p {
    color: #6c757d;
    font-size: 0.75rem;
    margin-bottom: 8px;
    line-height: 1.3;
}

.teaching-details {
    list-style: none;
    padding-left: 0;
}

.teaching-details li {
    position: relative;
    padding-left: 12px;
    margin-bottom: 3px;
    color: #495057;
    font-size: 0.7rem;
    line-height: 1.2;
}

.teaching-details li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: #2c3e50;
    font-weight: bold;
}

/* Interests Styles */
.interest-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 0;
    border-bottom: 1px solid #e9ecef;
}

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

.interest-item i {
    color: #2c3e50;
    width: 16px;
    text-align: center;
}

.interest-item span {
    color: #495057;
    font-size: 0.8rem;
}

/* PDF Button Styles */
.pdf-button-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
}

.pdf-button {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    border: none;
    padding: 15px 25px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(44, 62, 80, 0.4);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.pdf-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(44, 62, 80, 0.6);
}

.pdf-button:active {
    transform: translateY(0);
}

.pdf-button i {
    font-size: 1.1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .cv-main {
        grid-template-columns: 1fr;
    }
    
    .left-column {
        border-right: none;
        border-bottom: 1px solid #e9ecef;
    }
    
    .personal-info {
        margin: -30px -20px 20px -20px;
        padding: 20px;
    }
    
    .personal-info h1 {
        font-size: 1.6rem;
    }
    
    .personal-info .contact-info {
        align-items: center;
    }
    
    .left-column,
    .right-column {
        padding: 30px 20px;
    }
    
    .pdf-button-container {
        bottom: 20px;
        right: 20px;
    }
    
    .pdf-button {
        padding: 12px 20px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .personal-info {
        margin: -20px -15px 15px -15px;
        padding: 15px;
    }
    
    .personal-info h1 {
        font-size: 1.4rem;
    }
    
    .personal-info h2 {
        font-size: 0.95rem;
    }
    
    .left-column,
    .right-column {
        padding: 20px 15px;
    }
    
    .skills-grid {
        gap: 15px;
    }
    
    .skill-tags {
        gap: 6px;
    }
    
    .skill-tag {
        padding: 3px 10px;
        font-size: 0.75rem;
    }
}

/* Print Styles */
@media print {
    body {
        background: white;
        padding: 0;
        font-size: 12px;
        line-height: 1.2;
    }
    
    .cv-container {
        box-shadow: none;
        border-radius: 0;
        max-width: 100%;
        margin: 0;
    }
    
    .pdf-button-container {
        display: none;
    }
    
    .personal-info {
        margin: -10px -10px 10px -10px;
        padding: 8px;
    }
    
    .personal-info h1 {
        font-size: 1.2rem;
        margin-bottom: 3px;
    }
    
    .personal-info h2 {
        font-size: 0.8rem;
        margin-bottom: 8px;
    }
    
    .personal-info .contact-info {
        gap: 6px;
    }
    
    .personal-info .contact-item {
        font-size: 0.65rem;
    }
    
    .cv-main {
        grid-template-columns: 1.3fr 1.7fr;
        min-height: auto;
    }
    
    .left-column,
    .right-column {
        padding: 10px;
    }
    
    .cv-section {
        margin-bottom: 10px;
    }
    
    .cv-section h3 {
        font-size: 0.9rem;
        margin-bottom: 8px;
        padding-bottom: 3px;
    }
    
    .experience-item {
        margin-bottom: 8px;
        padding-bottom: 6px;
        break-inside: avoid;
    }
    
    .experience-header h4 {
        font-size: 0.85rem;
    }
    
    .experience-details li {
        font-size: 0.7rem;
        margin-bottom: 1px;
        line-height: 1.1;
    }
    
    .education-item,
    .stage-item {
        margin-bottom: 5px;
        padding-bottom: 4px;
        break-inside: avoid;
    }
    
    .education-header,
    .stage-header {
        margin-bottom: 1px;
    }
    
    .education-header h4,
    .stage-header h4 {
        font-size: 0.8rem;
    }
    
    .education-item p,
    .stage-item p {
        font-size: 0.7rem;
        margin-top: 2px;
    }
    
    .skill-category h4 {
        font-size: 0.8rem;
        margin-bottom: 4px;
    }
    
    .skill-tag {
        font-size: 0.65rem;
        padding: 2px 6px;
    }
    
    .language-item,
    .interest-item {
        padding: 3px 0;
    }
    
    .language-level,
    .interest-item span {
        font-size: 0.75rem;
    }
    
    .company,
    .school {
        font-size: 0.8rem;
    }
    
    .period {
        font-size: 0.7rem;
    }
}
