/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f9f9f9;
    padding: 20px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background-color: white;
    padding: 40px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

/* Header styles */
.header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #333;
}

.name {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 5px;
    color: #333;
}

.title {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 15px;
}

.contact-info {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    font-size: 0.9rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.contact-item i {
    color: #666;
    width: 16px;
}

.contact-item a {
    color: #333;
    text-decoration: none;
}

.contact-item a:hover {
    color: #0066cc;
    text-decoration: underline;
}

/* Section styles */
.section {
    margin-bottom: 25px;
}

.section-title {
    font-size: 1.3rem;
    font-weight: bold;
    margin-bottom: 12px;
    padding-bottom: 3px;
    border-bottom: 1px solid #333;
    color: #333;
}

/* Experience styles */
.experience-item {
    margin-bottom: 20px;
}

.experience-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 5px;
    flex-wrap: wrap;
}

.company {
    font-size: 1rem;
    font-weight: bold;
    margin: 0;
}

.company a {
    color: #333;
    text-decoration: none;
}

.company a:hover {
    color: #0066cc;
    text-decoration: underline;
}

.date {
    font-style: italic;
    color: #666;
    font-size: 0.9rem;
}

.position {
    font-style: italic;
    margin-bottom: 8px;
    color: #555;
}

.responsibilities {
    margin-left: 15px;
    margin-bottom: 10px;
}

.responsibilities li {
    margin-bottom: 3px;
    list-style-type: disc;
}

/* Education styles */
.education-item {
    margin-bottom: 18px;
}

.education-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 5px;
    flex-wrap: wrap;
}

.institution {
    font-size: 1rem;
    font-weight: bold;
    margin: 0;
}

.institution a {
    color: #333;
    text-decoration: none;
}

.institution a:hover {
    color: #0066cc;
    text-decoration: underline;
}

.degree {
    font-style: italic;
    margin-bottom: 3px;
    color: #555;
}

.grade {
    font-size: 0.9rem;
    color: #666;
}

/* Skills, Projects, Languages, Interests styles */
.skills-list,
.projects-list,
.languages-list,
.interests-list {
    margin-left: 15px;
}

.skills-list li,
.projects-list li,
.languages-list li,
.interests-list li {
    margin-bottom: 5px;
    list-style-type: disc;
}

.projects-list a,
.languages-list a,
.interests-list a {
    color: #333;
    text-decoration: none;
}

.projects-list a:hover,
.languages-list a:hover,
.interests-list a:hover {
    color: #0066cc;
    text-decoration: underline;
}

/* Languages section specific styling */
.languages-list {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    list-style: none;
    margin-left: 0;
}

.languages-list li {
    margin-bottom: 0;
}

/* Print button styles */
.print-section {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.print-btn {
    background-color: #0066cc;
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 1rem;
    border-radius: 5px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.3s ease;
}

.print-btn:hover {
    background-color: #0052a3;
}

.print-btn i {
    font-size: 0.9rem;
}

/* Responsive design */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .container {
        padding: 20px;
    }
    
    .name {
        font-size: 2rem;
    }
    
    .contact-info {
        flex-direction: column;
        gap: 8px;
    }
    
    .experience-header,
    .education-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .date {
        margin-top: 2px;
    }
    
    .languages-list {
        flex-direction: column;
        gap: 5px;
    }
}

@media (max-width: 480px) {
    .name {
        font-size: 1.8rem;
    }
    
    .contact-info {
        font-size: 0.85rem;
    }
    
    .section-title {
        font-size: 1.2rem;
    }
}

/* Print styles */
@media print {
    body {
        background-color: white;
        padding: 0;
    }
    
    .container {
        box-shadow: none;
        border-radius: 0;
        padding: 20px;
        max-width: none;
    }
    
    .print-section,
    .contact-section {
        display: none;
    }
    
    .contact-item a {
        color: #333 !important;
        text-decoration: none !important;
    }
    
    .company a,
    .institution a,
    .projects-list a {
        color: #333 !important;
        text-decoration: none !important;
    }
    
    /* Ensure proper page breaks */
    .section {
        page-break-inside: avoid;
    }
    
    .experience-item,
    .education-item {
        page-break-inside: avoid;
    }
}

/* Animation for smooth interactions */
.section {
    transition: all 0.3s ease;
}

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

/* Focus styles for accessibility */
.contact-item a:focus,
.company a:focus,
.institution a:focus,
.projects-list a:focus {
    outline: 2px solid #0066cc;
    outline-offset: 2px;
    border-radius: 2px;
}

.print-btn:focus {
    outline: 2px solid white;
    outline-offset: 2px;
}

/* Contact Form Styles */
.contact-section {
    margin-top: 30px;
    padding-top: 25px;
    border-top: 2px solid #eee;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.contact-info h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: #333;
    font-size: 1.2rem;
}

.contact-info p {
    line-height: 1.7;
    margin-bottom: 2rem;
    color: #555;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-method {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.contact-method .icon {
    font-size: 1.2rem;
    width: 2rem;
    height: 2rem;
    background: #0066cc;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    flex-shrink: 0;
}

.contact-method .icon svg {
    width: 16px;
    height: 16px;
}

.contact-method div {
    flex: 1;
}

.contact-method strong {
    display: block;
    color: #333;
    margin-bottom: 0.25rem;
    font-weight: bold;
}

.contact-method p {
    margin: 0;
    color: #666;
}

.cv-download {
    margin-top: 3rem;
    padding: 1.5rem;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.cv-download h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: #333;
}

.cv-download p {
    margin-bottom: 1.5rem;
    color: #666;
    font-size: 0.95rem;
}

.download-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.download-input-group {
    display: flex;
    gap: 0.5rem;
}

.download-input-group input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.95rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.download-input-group input:focus {
    outline: none;
    border-color: #0066cc;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.download-btn {
    background: #059669;
    color: white;
    padding: 0.75rem 1.25rem;
    border: none;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.download-btn:hover:not(:disabled) {
    background: #047857;
}

.download-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.download-btn svg {
    width: 16px;
    height: 16px;
}

.download-message {
    padding: 0.75rem;
    border-radius: 6px;
    text-align: center;
    font-size: 0.9rem;
    display: none;
}

.download-message.success {
    background: #d1fae5;
    color: #059669;
    border: 1px solid #a7f3d0;
    display: block;
}

.download-message.error {
    background: #fee2e2;
    color: #dc2626;
    border: 1px solid #fca5a5;
    display: block;
}

.contact-form {
    background: #f8fafc;
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #333;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #0066cc;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
    font-family: inherit;
}

.submit-btn {
    background: #0066cc;
    color: white;
    padding: 0.875rem 2rem;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
    width: 100%;
}

.submit-btn:hover:not(:disabled) {
    background: #0052a3;
}

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.submit-message {
    margin-top: 1rem;
    padding: 0.75rem;
    border-radius: 6px;
    text-align: center;
    display: none;
}

.submit-message.success {
    background: #d1fae5;
    color: #059669;
    border: 1px solid #a7f3d0;
    display: block;
}

.submit-message.error {
    background: #fee2e2;
    color: #dc2626;
    border: 1px solid #fca5a5;
    display: block;
}

/* Contact form responsive design */
@media (max-width: 768px) {
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .contact-form {
        padding: 1.5rem;
    }

    .download-input-group {
        flex-direction: column;
    }

    .download-btn {
        justify-content: center;
    }
}
