/* --- 1. BASSTILAR (Mobil) --- */
*::selection {
    background: lightskyblue;
}

html {
    scroll-behavior: smooth;
}

body {
    display: flex;
    flex-direction: column;
    font-family: 'Baloo Chettan 2', 'Roboto', sans-serif;
    margin: 0;
    min-height: 100vh;
    background-color: #191919;
    color: rgba(245, 245, 245, 0.767);
    box-sizing: border-box;
}

header {
    height: 30vh;
    background: linear-gradient(to bottom, rgba(25, 25, 25, 0.8), rgba(25, 25, 25, 0));
    width: 100%;
    overflow: hidden;
}

/* Navigering */
.content {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    background-color: #3a3838;
    padding: 0;
    margin: 0;
}

.content li {
    list-style-type: none;
    padding: .8em;
}

.content li a {
    color: inherit;
    text-decoration: none;
    font-size: calc(1rem + 1vw);
    position: relative;
    text-wrap: wrap;
}

.content li a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -5px;
    height: 2px;
    width: 0;
    background-color: lightseagreen;
    transition: width 0.3s ease;
}

.content li a:hover::after,
.h3-competence:hover::after {
    width: 100%;
}

/* Welcome Sektion - Centrerad layout */
.welcome {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: calc(100% - 4rem);
    padding: 1em;
    border-radius: 2em;
    box-shadow: 0 2px 4px 4px grey;
    max-width: 1100px;
    margin: 2rem auto;
}

.welcome h2 {
    font-size: clamp(1.5rem, 5vw, 3rem);
    font-style: italic;
    text-align: center;
}

.paragraph-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1.5em;
    width: 100%;
    align-items: center;
}

.first-paragraph,
.second-paragraph,
.third-paragraph {
    width: 100%;
    max-width: 600px;
    line-height: 1.4;
    font-size: 1.1em;
}

.img-container img {
    border-radius: 5px;
    width: clamp(150px, 20vw, 190px);
    max-width: 190px;
    height: auto;
    border: 2px solid white;
    box-shadow: 0px 0px 8px rgba(255, 255, 255, 0.7);
}

.competences {
    text-align: center;
    margin: 2em 0 1em;
}

.grid-wrapper {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2em;
    padding: 2em;
    justify-items: center;
    border-top: 2px solid #3a3838;
}

.card img {
    width: 100%;
    max-width: 80px;
    /* Begränsar storleken så de inte blir gigantiska */
    height: auto;
    transition: transform 0.3s ease;
    border-radius: 5px;
}

.card:hover img {
    transform: scale(1.1);
    filter: brightness(1.3);

}

.social-media {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5px;
}

/* Footer */
.footer-info {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 1.5em;
    border-top: 2px solid #3a3838;
    align-items: flex-end;
    padding: 1em;

}

#awsLogo {
    filter: invert(1);
}

iconify-icon {
    transition: transform 0.3s ease, filter 0.3s ease;
    cursor: pointer;
}

iconify-icon:hover {
    filter: brightness(1.3);
    animation: backNforth 0.2s ease-in-out infinite alternate;
}

/* Här definierar vi rörelsen */
@keyframes backNforth {
    from {
        transform: rotate(-5deg) scale(1.1);
    }

    to {
        transform: rotate(5deg) scale(1.1);
    }
}


/* --- 💻 DESKTOP (Från 768px) --- */
@media (min-width: 768px) {
    .content li a {
        font-size: 1.6em;
    }

    .welcome h2 {
        font-size: clamp(1.5rem, 4vw + 1rem, 2.4rem);
    }

    .paragraph-wrapper {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        align-items: flex-start;
        gap: 2em;
    }

    .first-paragraph,
    .second-paragraph,
    .third-paragraph {
        /* Räknar ut en tredjedel minus lite utrymme för gap */
        width: calc(33.33% - 1.5em);
    }

    .img-container {
        width: 100%;
        display: flex;
        justify-content: center;
        margin-top: 1em;
    }

    .grid-wrapper {
        grid-template-columns: repeat(3, 1fr);
    }
}