:root {
    --primary-color: #333;
    --secondary-color: #666;
    --accent-color: #0056b3;
    --bg-color: #f4f4f4;
    --content-bg: #fff;
    --font-main: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --header-height: 150px;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    color: var(--primary-color);
    font-family: var(--font-main);
    line-height: 1.6;
}

.container {
    max-width: 960px;
    margin: 0 auto;
    background-color: var(--content-bg);
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    min-height: 100vh;
}

/* Header */
.site-header {
    height: var(--header-height);
    background-image: url('images/bornholm.jpg');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    padding: 0 2rem;
    color: white;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.8);
}

.header-content h1 {
    margin: 0;
    font-size: 2.5rem;
}

.header-content h5 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: normal;
    opacity: 0.9;
}

/* Layout */
.content-wrapper {
    display: flex;
    flex-wrap: wrap;
}

/* Navigation */
.site-nav {
    flex: 0 0 200px;
    background-color: #f9f9f9;
    padding: 2rem 1rem;
    border-right: 1px solid #eee;
}

.site-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.site-nav li {
    margin-bottom: 0.5rem;
}

.site-nav a, .site-nav span.current {
    display: block;
    padding: 0.5rem 1rem;
    text-decoration: none;
    color: var(--primary-color);
    border-radius: 4px;
    transition: background-color 0.2s;
}

.site-nav a:hover {
    background-color: #e9e9e9;
    color: var(--accent-color);
}

.site-nav span.current {
    font-weight: bold;
    background-color: #e0e0e0;
}

/* Main Content */
main {
    flex: 1;
    padding: 2rem;
    min-width: 300px;
}

h2 {
    margin-top: 0;
    color: var(--primary-color);
    border-bottom: 2px solid #eee;
    padding-bottom: 0.5rem;
}

h3 {
    color: var(--secondary-color);
    margin-top: 1.5rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 0.25rem;
}

h4 {
    margin-bottom: 0.25rem;
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--accent-color);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.profile-pic {
    float: right;
    margin: 0 0 1rem 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    max-width: 200px;
    height: auto;
}

/* Resume Specific Styles */
.resume-section {
    margin-bottom: 2rem;
}

.job {
    margin-bottom: 1.5rem;
}

.job-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
}

.job-header h4 {
    margin: 0;
    font-size: 1.1rem;
}

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

.job-title {
    margin-top: 0.25rem;
    margin-bottom: 0.5rem;
    font-style: italic;
    color: #555;
}

.resume-section ul {
    margin-top: 0.5rem;
    padding-left: 1.5rem;
}

.resume-section li {
    margin-bottom: 0.25rem;
}

/* Competence Table Styles */
.competence-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
    table-layout: fixed; /* Enforce fixed column widths */
}

.competence-table th, .competence-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #eee;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Define specific widths for columns */
.competence-table th:nth-child(1), .competence-table td:nth-child(1) {
    width: 64%; /* Specialization / Language / OS / etc. */
}

.competence-table th:nth-child(2), .competence-table td:nth-child(2) {
    width: 12%; /* Level */
}

.competence-table th:nth-child(3), .competence-table td:nth-child(3) {
    width: 12%; /* Years */
}

.competence-table th:nth-child(4), .competence-table td:nth-child(4) {
    width: 12%; /* Last */
}

.competence-table th {
    background-color: #f9f9f9;
    font-weight: bold;
    color: var(--secondary-color);
}

.competence-table tr:hover {
    background-color: #f5f5f5;
}

/* References Grid */
.references-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.reference-category {
    background-color: #fcfcfc;
    padding: 1rem;
    border: 1px solid #eee;
    border-radius: 4px;
}

.reference-category h3 {
    margin-top: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .content-wrapper {
        flex-direction: column;
    }

    .site-nav {
        flex: none;
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #eee;
        padding: 1rem;
    }

    .site-nav ul {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
        justify-content: center;
    }

    .site-nav li {
        margin-bottom: 0;
    }

    .profile-pic {
        float: none;
        display: block;
        margin: 0 auto 1rem auto;
    }

    .job-header {
        flex-direction: column;
    }

    .date {
        margin-top: 0.25rem;
    }

    .competence-table {
        display: block;
        overflow-x: auto;
        table-layout: auto; /* Allow scrolling on small screens */
    }

    .competence-table th, .competence-table td {
        width: auto; /* Reset widths for mobile */
        white-space: nowrap;
    }

    .references-grid {
        grid-template-columns: 1fr;
    }
}
