@import url('https://fonts.googleapis.com/css2?family=Noto+Sans:ital,wght@0,100..900;1,100..900&display=swap');

:root {
    font-size: 16px;
    font-family: "Noto Sans", sans-serif;
    --bg-color: #bbb;
    --text-color: black;
    --accent-color: white;
    --anchor-color: blue;
    --section-hover-color: white;
    --title-color: blue;
}

[data-theme="dark"] {
    --bg-color: #333;
    --text-color: #eee;
    --accent-color: #222;
    --anchor-color: aqua;
    --section-hover-color: #111;
    --title-color: orange;
}

html {
    color: var(--text-color);
    transition: color 0.3s;
}

body {
    background-color: var(--bg-color);
    transition: background-color 0.3s;
    width: 100vw;
    display: grid;
    place-items: center;
}

main {
    margin-top: 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    grid-template-rows: auto;
    gap: 1rem;
    max-width: 600px;
}

@media(max-width:600px) {
    body {
        margin: 0;
    } 
}

@media(min-width:601px) {
    main {
        grid-template-rows: min-content min-content min-content 1fr;
        max-width: 1000px;
    }
    .key-achievements {
        grid-column: span 2;
    }

    #experience {
        grid-column: span 2;
        grid-row: span 3;
    }

    .frameworks {
        grid-row: 2;
    }
}

.job-title p {
    font-style: italic;
}

.job-title h3 {
    color: var(--title-color)
}

section {
    background-color: var(--accent-color);
    padding-inline: 2rem;
    transition: background-color 0.3s, box-shadow 0.3s;
    border-radius: 0.5rem;
    box-shadow: 0 0 0 transparent;
}

section:hover {
    box-shadow: 0 0 7px 0 var(--anchor-color);
}

img {
    width: 48px;
}

.img-with-background {
    background-color: #ddd;
}


.contact-list {
    grid-area: links;
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    align-items: flex-end;
}

p {
    max-width: 50ch;
}

#contact {
    display: grid;
    grid-template-areas: 
    "name links"
    "theme links";
    padding: 1rem;
}

#contact h2 {
    grid-area: name;
}

a {
    color: var(--anchor-color);
    transition: color 0.3s;
    display: block;
}

.languages {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    place-items: center;
    gap: 1rem;
    padding: 1rem;
}

.activity {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.project + .project {
    margin-top: 1rem;
}

.theme-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-self: center;
    font-weight: bold;
    color: var(--text-color);
    grid-area: theme;
}

.switch {
    justify-self: center;
    display: inline-block;
    position: relative;
    width: 3.5em;
    height: 2em;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background-color: #444;
    border-radius: 2em;
    transition: background-color 0.3s;
}

.slider::before {
    content: "";
    position: absolute;
    height: 1.5em;
    width: 1.5em;
    left: 0.25em;
    top: 0.25em;
    background-color: white;
    border-radius: 50%;
    transition: transform 0.3s;
}

input:checked+.slider {
    background-color: #aaa;
}

input:checked+.slider::before {
    transform: translateX(1.5em);
}

.switch {
    font-size: 1rem;
}

@media (max-width: 600px) {
    .switch {
        font-size: 0.8rem;
    }
}

