body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 20px;
    color: #333;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    background-color: #fff;
    padding: 20px;
}

.section {
    page-break-inside: avoid;
    margin-bottom: 0.7em;
}

h1 {
    font-family: 'Montserrat', Arial, sans-serif;
    font-weight: 300;
    font-size: clamp(1.5em, 6vw, 3.5em);
    color: #706665;
    text-align: center;
    margin-bottom: -0.35em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.name-first {
    font-weight: 350;
    color: #706665;
}

.name-last {
    font-weight: 400;
    color: #353436;
}

h2 {
    font-size: 1.5em;
    font-weight: normal;
    margin: 0.35em 0;
    color: #353436;
    display: inline;
}

.section h2 {
    border-bottom: 2px solid #003366;
    padding-bottom: 5px;
    margin-bottom: 5px;
    display: inline-block;
}

.section > h2 + p,
.section > h2 + ul,
.section > h2 + table,
.section > h2 + div {
    margin-top: 0.25em;
}

.section:first-of-type > h2 + p {
    margin-top: 0.62em;
}

.highlight {
    font-weight: bold;
    color: #0fb4f1;
}

h2::first-letter {
    color: #0fb4f1;
}

.contact-info {
    text-align: center;
}

.contact-info .student-info {
    color: #0fb4f1;
    font-weight: normal;
}

.contact-info .location-info {
    font-family: 'Montserrat', Arial, sans-serif;
    font-weight: 500;
    color: #616161;
}

.contact-details {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.contact-item {
    display: flex;
    align-items: center;
    text-align: center;
    margin-bottom: 10px;
}

.icon {
    width: 14px;
    height: 14px;
    margin-right: 6px;
    margin-left: 6px;
    fill: #353436;
    display: inline-block;
    vertical-align: middle;
}

.contact-details a {
    color: #353436;
    text-decoration: none;
    font-size: 14px;
}

.contact-details a:hover {
    text-decoration: underline;
}

.section {
    margin-bottom: 0.7em;
}

/* Increase separation between role blocks in Work Experience (first section). */
.section:first-of-type > p {
    margin-bottom: 0.35em;
}

.section:first-of-type > div[style*="padding-left"] {
    margin-bottom: 2.4em;
}

.section:first-of-type > div[style*="padding-left"]:last-of-type {
    margin-bottom: 0;
}

.section:first-of-type > div[style*="padding-left"] + p {
    padding-top: 0.95em;
}

.skills-list, .languages-list, .soft-skills-list {
    list-style: none;
    padding: 0;
}

.skills-list li, .languages-list li, .soft-skills-list li {
    padding: 5px 0;
}

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

.projects-list li {
    margin-bottom: 10px;
}

.projects-list li h3 {
    margin: 0;
}

.skills-list span, .languages-list span {
    font-weight: bold;
}

.certifications-list {
    list-style: none;
    padding: 0;
}

.skills-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
}

.skills-table th {
    text-align: left;
    font-size: 1.2em;
    border-bottom: 1px solid #353436;
    padding-bottom: 8px;
    color: #353436;
}

.skills-table td {
    padding: 10px 0;
    vertical-align: top;
    border-bottom: 1px solid #ddd;
}

.skills-table td:first-child {
    width: 25%;
    font-weight: bold;
}

.skills-table td:last-child {
    width: 75%;
}

@media screen {
    body {
        background-color: #f4f4f4;
    }
}

@media print, (max-width: 794px) {
    body {
        background-color: #fff;
        font-size: 12px;
        line-height: 1.4;
        padding: 0;
        margin: 0;
    }
    
    .container {
        max-width: 100%;
        padding: 15px;
        margin: 0;
    }
    
    h1 {
        font-size: 1.9em;
        font-weight: 400;
        margin-top: 0;
        margin-bottom: 0.1em;
    }
    
    h2 {
        font-size: 1.3em;
        margin: 0.45em 0 0.2em 0;
    }

    .section h2 {
        margin-bottom: 2px;
    }

    .section > h2 + p,
    .section > h2 + ul,
    .section > h2 + table,
    .section > h2 + div {
        margin-top: 0.1em;
    }

    .section:first-of-type > h2 + p {
        margin-top: 0.36em;
    }
    
    .section {
        margin-bottom: 0.35em;
        page-break-inside: avoid;
    }
    
    .section p strong {
        display: inline-block;
        margin-top: 0.3em;
    }
    
    .section div[style*="padding-left"] {
        padding-left: 1.5em !important;
    }

    .section:first-of-type > div[style*="padding-left"] {
        margin-bottom: 1.62em;
    }

    .section:first-of-type > div[style*="padding-left"]:last-of-type {
        margin-bottom: 0;
    }

    .section:first-of-type > div[style*="padding-left"] + p {
        padding-top: 0.64em;
    }
    
    .contact-details {
        gap: 10px;
        margin-bottom: 10px;
        flex-wrap: nowrap;
    }
    
    .student-info {
        margin: 0.05em 0 !important;
    }
    
    .location-info {
        margin: 0.05em 0 !important;
    }
    
    .contact-item {
        margin-bottom: 3px;
    }
    
    .contact-details a {
        font-size: 12px;
    }
    
    .icon {
        font-size: 13px;
        margin-right: 5px;
        margin-left: 5px;
    }
    
    .skills-table {
        margin-top: 8px;
    }
    
    .skills-table th, .skills-table td {
        padding: 5px 0;
        font-size: 11px;
    }
    
    ul {
        margin: 3px 0;
        padding-left: 1.5em;
        list-style-type: disc;
    }
    
    ul.certifications-list {
        margin: 10px 0;
    }
    
    ul li {
        margin-bottom: 0.2em;
    }
    
    p {
        margin: 0.3em 0;
    }
    
    .section div[style*="padding-left"] p + ul {
        margin-top: 2px;
    }
}

@media screen and (max-width: 768px) {
    .skills-section {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        min-height: 100vh;
    }

    .skills-table {
        width: 100%;
        max-width: 800px;
        table-layout: fixed;
        word-wrap: break-word;
        overflow-wrap: anywhere;
    }

    .skills-table th, .skills-table td {
        padding: 8px 12px;
        text-align: left;
        vertical-align: top;
        font-size: 14px;
        white-space: normal;
    }

    .skills-table th:nth-child(1),
    .skills-table td:nth-child(1) {
        width: 50%;
    }

    .skills-table th:nth-child(2),
    .skills-table td:nth-child(2) {
        width: 50%;
    }
}
