body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0; 
}

header {
    text-align: center;
    margin-bottom: 16px;
}

section {
    margin-bottom: 10px;
}

/* Fonts */
h1 {
    font-size: 2.2rem;
    margin: 0;
}
h2 {
    margin: 0.4rem 0;
    padding-bottom: 4px;
    font-size: 1.35rem;
}

.section-header {
    border-bottom: 2px solid #333;
}

.occupation-header {
    border: none;
    color: #4b4b4b;
}

h3 {
    padding: 0;
    padding-top: 0.45rem;
    margin: 0;
    font-size: 1.05rem;
}

p {
    margin-block: 0.3rem;
    font-size: 0.9rem;
}

ul {
    margin-block: 0.35rem;
}

p,
li {
    line-height: 1.3;
}

/* Sections */
.page {
    box-sizing: border-box;
    margin: auto;
    padding: 1.5rem;
}

.section-content {
    margin-left: 20px;
}

.profile-picture img {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
}

/* Profile table */
.profile-table tr th {
    text-align: left;
    height: 2rem;
}

.profile-table tr>* {
    padding-right: 0.5rem;
    height: 2rem;
}

/* Skills table */

.skills-container {
    width: 100%;
    justify-content: center;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.skills-left,
.skills-right
{
    display: flex;
    flex-direction: column;
    gap: inherit;
}

.skills-table {
    width: 90%;
    border-collapse: collapse;
    margin-inline: auto;
    height: 2rem;
}

.skills-table th {
    font-size: 0.9rem;
}

.skills-table tr {
    font-size: 0.8rem;
}

.skills-table th,
.skills-table td {
    border: 1px solid #ddd;
    padding: 0.35rem 0.5rem;
    text-align: left;
    height: 1rem;
}

.skills-table tbody tr:nth-child(odd) {
    background-color: #f9f9f9;
}

@media (min-width: 210mm) {

    .page {
        padding: 16mm;
        width: 210mm;
        height: 297mm;
        border: 1px solid #333;
    }

    .skills-container {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        width: 100%;
    }

    .skills-table {
        width: 100%;
        font-size: 0.8rem;
    }
}

@media print {
    @page {
        size: A4;
        margin: 0;
    }

    /* Each .page is exactly one A4 sheet, regardless of print-dialog margins. */
    .page {
        width: 210mm;
        height: 297mm;
        padding: 16mm;
        border: none;
        margin: 0;
        page-break-after: always;
    }

    .page:last-child {
        page-break-after: auto;
    }

    /* Force the two-column skills layout in print — do not depend on the
       min-width media query, which fails when the dialog adds page margins. */
    .skills-container {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        width: 100%;
    }

    .skills-table {
        width: 100%;
        font-size: 0.8rem;
    }
  }