* {
    margin: 0 0;
    padding: 0 0;
    box-sizing: border-box;
}
@font-face {
    font-family: raleway-h1;
    src: url(raleway/Raleway-ExtraLight.ttf);
}
@font-face {
    font-family: montserrat-p;
    src: url(Montserrat/static/Montserrat-Light.ttf);
}

body {
    background-color: #ffffff;
    color: #333;
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

header {
        display: flex;
        justify-content: space-between; /* logga vänster, switch höger */
        align-items: center;            /* vertikal centrering */
        padding: 10 0px;
        height: 70px;  
        box-sizing: border-box;                  /* valfri höjd på header */
    }

    /*background-color: white;
    color: white;
    padding: 20px 0px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    position: relative;
    max-height: 70px;*/

header img {
    max-width: 150px; !important
    height: auto;
    transition: filter 0.3s ease;
}

.container {
    padding-bottom: 1rem;
    padding-top: 1rem;
}

.about {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    gap: 6rem 6rem;
}

.about-image {
    background-image: url('./Fredrik_web.jpg');
    height: auto;
    min-height: 360px;
    display: flex;
    flex: 1;
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center 20%;
    border-radius: 8px; 
}
.about-image:hover {
    filter:invert(90%);
}

.about-text {
    flex: 2;
    max-width: 500px;
    
}
.about-p {
    font-family: montserrat-p;
    font-size: 18px;
    line-height: 25px;
}
.about-h1 {
    font-family: raleway-h1;
    font-size: 26px;
    padding: 5px 0 10px 0;
}
.about-h2 {
    font-weight: 500;
    font-size: 20px;
    color:#afadad
}
.contact-info {
    margin: 2rem auto;
    display: grid;
    gap:1rem;
    grid-template-columns: repeat(2, 1fr);
}

.contact-item {
    display: flex;
    text-wrap: nowrap; 
    font-size: 15px;;
    padding: 10px;
    text-align: left;
    gap: 1rem;
}

.contact-item svg {
    width: 24px;
    height: 24px;
    fill: #3c3c3c;
}
a {
    color: inherit;
}
footer {
    text-align: left;
    font-size: 0.7em;
    padding: 1rem 2rem;
    background-color: #fff;
    border-top: 1px solid #ddd;
}

@media (max-width: 1000px) {
    .contact-info { 
        grid-template-columns: repeat(2, 1fr); 
    }
}
@media (max-width: 880px) {
    .about {
        gap: 2rem;
    }
    .contact-info {
        gap: 0px;
    }
}
@media (max-width: 650px) {
    .about {
        flex-direction: column;
        max-width: max-content;
        text-align: center;
        margin: 0 auto;
    }
    .contact-item {
        margin: auto;
        max-width:max-content;
    }
    header {
        justify-content: space-between; /* logga vänster, switch höger */
    }
}

/* Dark mode-stilar */
body.dark-mode {
    background-color: #1c1c1c;
    color: #f1f1f1;
}

/* Invert the logo in dark mode */
body.dark-mode header img {
    filter: invert(100%);
}

body.dark-mode header {
    background-color: #1c1c1c;
}

body.dark-mode footer {
    background-color: #1c1c1c;
    border-top-color: #333;
}

body.dark-mode .contact-item svg {
    fill: #f1f1f1;
}


/* ===== SWITCH (ytan runt slidern) ===== */
.switch {
    position: relative;
    display: inline-block;
    width: 48px;  /* spårets bredd */
    height: 24px; /* spårets höjd */
}

/* Göm den riktiga checkboxen */
.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

/* ===== SLIDER (spåret) ===== */
.slider {
    position: absolute;
    top: 0px; left:0px; ;
    width: 48px;
    height: 24px;
    background-color: white;
    border-radius: 24px;
    border: 1px solid black;
    box-sizing: border-box; /* inkludera kant i måtten */
    transition: background-color 0.4s;
}

/* ===== KNAPPEN (inuti slidern) ===== */
.slider:before {
    content: "\263E"; /* ikon vid ljust läge */
    color: black;
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px; /* luft från vänster */
    top: 50%;  /* mitten av spåret */
    transform: translate(-2px, -50%); /* perfekt vertikal centring */
    background-color: white;
    border-radius: 50%;
    border: 1px solid black;
    display: flex; /* centrera ikonen inuti */
    align-items: center;
    justify-content: center;*/
    font-size: 20px;
    line-height: 1;
    transition: transform 0.4s, background-color 0.4s;
    box-sizing: border-box;
}

/* ===== NÄR SLIDERN ÄR "PÅ" ===== */
.switch input:checked + .slider {
    background-color: black; /* spåret mörkare */
    border: 1px solid white;
}

.switch input:checked + .slider:before {
    content: "\2600\FE0E"; /* ikon vid mörkt läge */
    color: black; 
    transform: translate(24px, -50%); /* flytta knappen horisontellt, behåll vertikal centring */
}