/* GENERAL FORMATTING - Matching your website */
body {
    font-family: 'Courier', monospace;
    background-color: black;
    color: white;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    overflow-x: hidden; /* Prevent horizontal scrolling on body */
}

.resume-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box; /* Include padding in width calculation */
}

.header {
    text-align: center;
    padding: 2rem 0;
    border-bottom: 1px solid #00ff88;
    margin-bottom: 2rem;
}

.name {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: #00ff88;
}

.personal-info {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.contact-info {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-top: 1rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.contact-item a {
    color: #00ff88;
    text-decoration: none;
    transition: color 0.3s ease;
    word-break: break-word; /* Allow long URLs to break */
}

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

.main-content {
    padding: 1rem 0;
}

.section {
    margin-bottom: 2rem;
    background-color: #202020;
    padding: 1.5rem;
    border-radius: 4px;
    box-sizing: border-box; /* Include padding in width calculation */
    overflow: hidden; /* Prevent content from overflowing */
}

.section-title {
    color: #00ff88;
    border-bottom: 1px solid #00ff88;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.experience-item, .education-item {
    margin-bottom: 1.5rem;
    padding-left: 1rem;
    border-left: 2px solid #333;
}

.date {
    color: #00ff88;
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.company {
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.skill-category {
    background: #202020;
    padding: 1rem;
    border-radius: 4px;
    border: 1px solid #333;
    /* Improved text handling */
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
    box-sizing: border-box; /* Include padding in width calculation */
}

.skill-title {
    color: #00ff88;
    margin-bottom: 0.8rem;
    font-size: 1.2rem;
}

.skill-list {
    list-style-type: none;
    padding-left: 0;
}

.skill-list li {
    margin-bottom: 0.8rem;
    padding-left: 1.2rem;
    position: relative;
    /* Improved text wrapping */
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
}

.skill-list li:before {
    content: ">";
    color: #00ff88;
    font-weight: bold;
    position: absolute;
    left: 0;
}

.languages {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.language-item {
    background: #202020;
    padding: 0.8rem;
    border-radius: 4px;
    flex: 1;
    min-width: 200px;
    border: 1px solid #333;
    box-sizing: border-box; /* Include padding in width calculation */
}

.language-name {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #00ff88;
}

/* PDF Download Button */
.pdf-download-section {
    text-align: center;
    margin: 2rem 0;
    padding: 0 10px; /* Added padding to prevent edge issues */
    box-sizing: border-box;
}

.pdf-download-button {
    display: inline-block;
    padding: 12px 24px;
    background-color: #00ff88;
    color: black;
    text-decoration: none;
    font-weight: bold;
    border-radius: 4px;
    transition: all 0.3s ease;
    border: 1px solid #00ff88;
    max-width: 100%; /* Ensure it doesn't exceed container width */
    box-sizing: border-box; /* Include padding in width calculation */
}

.pdf-download-button:hover {
    background-color: black;
    color: #00ff88;
}

/* Improved mobile responsiveness */
@media (max-width: 768px) {
    body {
        padding: 0; /* Remove body padding on mobile */
    }
    
    .resume-container {
        padding: 10px;
        width: 100%; /* Ensure container takes full width */
    }
    
    .skills-container {
        grid-template-columns: 1fr;
    }
    
    .skill-category {
        min-width: 0; /* Remove minimum width constraint */
        width: 100%;
    }
    
    .skill-list li {
        padding-right: 0.5rem; /* Add some padding on the right */
    }
    
    .contact-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.8rem;
        padding: 0 1rem;
        width: 100%;
        box-sizing: border-box;
    }
    
    .personal-info {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
        margin-bottom: 1.5rem;
        width: 100%;
    }
    
    .contact-item {
        width: 100%;
        padding: 0.3rem 0;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.3rem;
        box-sizing: border-box;
    }
    
    .contact-item span {
        min-width: 80px;
        display: inline-block;
        font-weight: bold;
        color: white;
    }
    
    /* Fix LinkedIn text alignment */
    .contact-item a {
        text-align: left;
        width: 100%;
        display: block;
    }
    
    .languages {
        flex-direction: column;
    }
    
    .language-item {
        min-width: 0; /* Remove minimum width constraint */
        width: 100%;
    }
    
    .section {
        padding: 1rem;
        width: 100%;
        box-sizing: border-box;
        margin-left: 0;
        margin-right: 0;
    }
    
    .pdf-download-button {
        width: auto; /* Change from 100% to auto */
        padding: 12px 20px; /* Slightly reduce padding */
        margin: 0 10px; /* Add some margin */
    }
    
    /* Ensure header content doesn't overflow */
    .header {
        padding: 1.5rem 0.5rem;
        width: 100%;
        box-sizing: border-box;
    }
    
    .name {
        font-size: 2rem; /* Slightly smaller on mobile */
        padding: 0 0.5rem;
    }
}

/* Additional fix for very small screens */
@media (max-width: 480px) {
    .skill-list li {
        font-size: 0.95rem; /* Slightly reduce font size on very small screens */
    }
    
    .skill-category {
        padding: 0.8rem;
    }
    
    .pdf-download-button {
        font-size: 0.9rem; /* Slightly reduce font size */
        padding: 10px 16px; /* Adjust padding */
        white-space: nowrap; /* Prevent text wrapping */
    }
    
    .pdf-download-section {
        padding: 0 5px; /* Reduce padding on very small screens */
    }
    
    /* Ensure text doesn't overflow on very small screens */
    .section-title {
        font-size: 1.3rem;
    }
    
    .contact-item span {
        min-width: 70px; /* Slightly smaller min-width */
    }
}

/* Print styles */
@media print {
    body {
        background-color: white;
        color: black;
        padding: 0;
    }
    
    /* Hide navigation menu */
    nav {
        display: none;
    }
    
    .section {
        background-color: white;
        border: 1px solid #ddd;
    }
    
    /* Change green elements to ocean dark blue (#006994) */
    .name, .section-title, .skill-title, .language-name, .date {
        color: #006994;
    }
    
    .header {
        border-bottom: 1px solid #006994;
    }
    
    .section-title {
        border-bottom: 1px solid #006994;
    }
    
    .skill-list li:before {
        color: #006994;
    }
    
    .contact-item a {
        color: #006994;
    }
    
    .contact-item span {
        color: #000 !important;
    }
    
    footer {
        display: none;
    }
    
    .pdf-download-section {
        display: none;
    }
}