/* Grundlæggende Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Farvevariabler for nem tilpasning */
:root {
    --primary-color: #273F59; /* Mørkeblå */
    --secondary-color: #495057; /* Tekstfarve */
    --background-color: #F8F9FA; /* Lys baggrund */
    --section-bg-color: #FFFFFF; /* Hvid baggrund for sektioner */
    --border-color: #DEE2E6; /* Let grå kant */
    --font-family: Arial, Helvetica, sans-serif;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--secondary-color);
    background-color: var(--background-color);
}

/* Header Styling */
.header {
    background-color: var(--primary-color);
    color: white;
    /* Justeret for at centrere teksten, da billedet er flyttet ud */
    padding: 40px 20px 40px 20px; 
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.header h1 {
    font-size: 2.8em;
    margin-bottom: 5px;
    font-weight: 700;
}

.header .subtitle {
    font-size: 1.2em;
    font-weight: 300;
    opacity: 0.9;
}

/* Main Container */
.container {
    max-width: 900px;
    margin: 30px auto;
    padding: 0 20px;
    /* Sætter denne som referencepunkt for billedet */
    position: relative; 
}

/* Styling og positionering af profilbillede */
.profile-image {
    position: absolute;
    top: 0px; 
    right: 20px;
    transform: none; /* Fjernet translateY, da det ikke længere skal lodret centreres */
    width: 150px !important; 
    height: 150px !important; 
    object-fit: cover; 
    border-radius: 50%; 
    border: 3px solid var(--section-bg-color); 
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    z-index: 10;
    display: block;
}


/* Sektioner og Overskrifter */
.section {
    background-color: var(--section-bg-color);
    padding: 30px;
    margin-bottom: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    border-left: 5px solid var(--primary-color);
}

h2 {
    color: var(--primary-color);
    font-size: 1.8em;
    margin-bottom: 15px;
    padding-bottom: 5px;
    border-bottom: 2px solid var(--border-color);
    font-weight: 700;
}

h3 {
    color: var(--secondary-color);
    font-size: 1.3em;
    margin-top: 0;
    font-weight: 500;
}

/* Kontaktinformation (Desktop fix: Skaber plads til billedet) */
.contact-info {
    /* Skaber den nødvendige plads i højre side til det absolutte billede (150px bredde + 30px luft) */
    margin-right: 180px;
}

.contact-info ul {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 15px 30px;
}

.contact-info li {
    flex: 1 1 200px;
}

/* Erfaring/Uddannelse Entries */
.job-entry {
    margin-bottom: 25px;
    padding-left: 15px;
    border-left: 2px solid var(--border-color);
}

.job-entry .meta {
    font-style: italic;
    color: #6c757d;
    margin-top: 5px;
    margin-bottom: 10px;
}

.job-entry ul {
    margin-top: 5px;
    margin-left: 20px;
}

/* Færdigheder (Skills) */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.skill-category {
    background-color: var(--background-color);
    padding: 15px;
    border-radius: 5px;
}

.skill-category p {
    margin-top: 5px;
    font-size: 0.95em;
}


/* Footer Styling */
.footer {
    text-align: center;
    padding: 20px;
    margin-top: 20px;
    font-size: 0.85em;
    color: #6c757d;
}

/* Responsivitet for mobil/mindre skærme */
@media (max-width: 600px) {
    /* Header justeret til mobil */
    .header {
        /* Øger bunden af headeren for at give plads til billedet under teksten */
        padding: 20px 20px 100px 20px; 
    }
    
    .header h1 {
        font-size: 2.2em;
    }

    .header .subtitle {
        font-size: 1em;
    }

    .container {
        margin: 20px auto;
        padding: 0 10px;
    } 

    .section {
        padding: 20px;
    }

    /* Kontaktinformation - Nulstil til normal visning på mobil */
    .contact-info {
        /* Nulstil margin for at fylde hele bredden, da billedet flyttes til bunden */
        margin-right: 0; 
    }
    
    .contact-info ul {
        /* Stak kontaktinformation lodret på mobil */
        flex-direction: column;
        gap: 10px;
    }

    /* Billede justering for mobilskærme */
    .profile-image {
        /* Flyt billedet til bunden og centrer det i stedet for i højre hjørne */
        top: auto;
        bottom: 10px; 
        left: 50%;
        right: auto;
        transform: translateX(-50%); /* Centrerer vandret */
        width: 100px !important; /* Mindre størrelse på mobil */
        height: 100px !important;
        border: 3px solid white;
    }
}