:root{
    --blue: #105667;
    --light-blue: #9ad5e3;
    --light-grey: #a0a9ab;
    --white: #f6f6f6;
    --dark: #1c2224;
    --red: #aa0000;
}
*{
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

body{
    font-family:sans-serif;
    color: var(--text);
    background-color: var(--bg-color);
    scroll-behavior: smooth;
}
nav{
    background-color: var(--nav-footer-color);
    color:var(--text);
    display: flex;
    flex-direction: row;
    gap: 1em;
    & img{
        width:48px;
        height: 48px;
    }
}
ul{
    list-style: none;
}
a{
    text-decoration: none;
}

nav ul{
    display: flex;
    flex-direction: row;
    gap: 1em;
    padding: 1em;
    width: fit-content;
    margin: 0 auto;
    & li{
        font-size: 1.5em;
        border-right: 1px solid var(--white);
        padding-right: 0.3em;
        & a{
            text-decoration: none;
            color:var(--text);
        }
    }
}

nav ul li::after{
    content: "";
    background-color: var(--white);
    height: 3px;
    width:0;
    display: block;
    transition: all 300ms ease-in;
}

nav ul li:hover::after{
    width:100%;
}

main{
    position: relative;
    top: 60px;
    opacity : 0;
    transition: 550ms all ease-in;
    display: flex;
    flex-direction: row;
    min-height: 100dvh;
    & h1{
        color: var(--light-blue);
        font-size: 2.3em;
        margin:1em 0;
    }
    & h2,h3,h4,h5{
        color:var(--text);
        font-size: 2em;
        margin:0.5em 0;
    }
    & p {
        color: var(--text);
    }
}
.sidebar{
    border-right: 1px solid var(--light-grey);
    width:20%;
    margin: 1em;
    & img{
        width: 100%;
        border-radius: 50%;
        padding:0.7em 0.6em;
        position:relative;
        bottom: 0.2em;
    }
    & p{
        margin: 1em 0;
        text-align: center;
        font-size: 1.5em;
        font-weight: 600;
    }
    & p:last-of-type{
        font-weight: 100;
        font-size: 1.1em;
    }
}
.image{
    width: 150px;
    height: 150px;
    margin:  0 auto;
    border-radius: 50%;
    border: 2px solid var(--white);
    text-align: center;
}
.main-content{
    width:100%;
    min-height: 100%;
}

.about{
    text-align: left;
    & p{
        line-height: 1.6em;
    }   
}
.links{
    text-align: center;
    & a{
        text-decoration: none;
        padding: 0.5em;
        width: 52px;
        height: 52px;
        border-radius: 50%;
        border: 2px solid var(--blue);
        text-align: center;
        display: inline-block;
    }
    & img {
        width:32px;
        height: 32px;
        transition: all 200ms ease-out;
    }
}
.links img:hover,
.links img:focus{
    transform: rotate(20deg);
}
.skills {
    text-align: left;
    width:50%;
    margin: 0 auto;
    & li {
        padding: 0.6em;
        font-size: 1.1em;
    }
    & img{
        width:32px;
        height: 32px;
        position: relative;
        bottom: 0;
        transition: all 300ms ease-out;
    }
    & span{
        font-weight: 600;
        font-style: italic;
        color: var(--blue);
    }
}
.skills img:hover{
    transform: scale(1.2);
    bottom: 0.5em;
}
footer{
    text-align: center;
    font-size: 14px;
    background-color: var(--nav-footer-color);
    color: var(--text);
    height: 100px;
    & img{ 
        width:16px;
        height: 16px;
        margin:0 0.2em;
    }
    & p:nth-child(1){
        margin: 1em 0;
    }
    & a{
        color: var(--white);
        font-size: 1.2em;
        border-right: 1px solid var(--white);
        padding:0.2em 0.4em;
    }   
}

.btn{
    color: var(--text);
    border-bottom: 2px solid var(--light-blue);
    width: 100%;
    padding-bottom: 0.2em;
    transition: opacity 200ms ease-in;
}
.btn:hover{
    opacity: 0.8;
}
.articles{
    width:90%;
    margin: 1em auto;
    & h3{
        color: var(--text);
        font-family: serif;
        font-style: italic;
        font-size: 2.5em;
    }
}
.article-preview{
    width:80%;
    height: 220px;
    margin: 3em 0; 
    display: flex;
    flex-direction: row;
    & h1,h2,h3,h4,h5{
        font-style: italic;
        font-family: serif;
        color: var(--light-blue);
    }
    & .btn,p{
        margin: 3em;
    }
    & img{
        width:300px;
        height: 200px;
    }
    & div{
        margin-left: 2em;
        text-align: center;
    }
}
.work-experience p{
    text-align: left;
    margin: 1em 0;
}
.work-experience a {
    color: var(--blue);
    font-weight: 600;
}
article{
    width: 80%;
    margin:0 auto;
    & h1,h2,h3,h4,h5,h6{
        font-style: italic;
        font-family: serif;
        color: var(--light-blue);
        text-align: center;
        font-size: 2.4em;
    }
    & p{
        line-height: 1.2em;
        margin: 1em 0;
    }
    & img{
        width:60%;
        margin: 0 10em;
    }
  
}
.a-link{
    font-style: italic;
    color: var(--light-blue);
    font-weight: 600;
}
@media(prefers-color-scheme: dark){
    :root{
        --bg-color: var(--dark);
        --text: var(--white);
        --nav-footer-color: var(--blue);             
    }
}

@media(prefers-color-scheme: light){
    :root{
        --bg-color:var(--white);
        --nav-footer-color: var(--blue);
        --text: var(--dark);
    }
    nav ul li a,footer{
        color:var(--white);
    }
    .image{
        border-color: var(--light-grey);
    }
    .sidebar{
        border-color:  var(--light-grey);
    }
    .links a {
        background-color:var(--dark);
    }
    .skills li:nth-of-type(4) img{
        background-color: var(--blue);
    }
    article h1,article h2,article h3,article h4,article h5,article h6,
    .article-preview h1,.article-preview h2,.article-preview h3,.article-preview h4,
    .article-preview h5,
    .article-preview h6, .main-content h1, .main-content h2, .main-content h3,
    .main-content h4, .main-content h5, .main-content h6{
        color: var(--blue);
    }
}
@media(max-width: 629px){
    main{
       height: auto;
    }
    .main-content{
        width:95%;
        margin: 0 auto;
        text-align: center;
    }
    .sidebar{
        display: none;
    }
    nav{
        height: 3em;
    }
    nav ul {
        width: 30%;
        height: 100%;
        flex-direction: column;
        transition: all 300ms ease-in;
        position: absolute;
        padding: 3em 1em;
        background-color: var(--blue);
        opacity: 0;
        left:-100px;
        & li{
            border: none;
        }
    }
    .active-nav{
        left: 0;
        opacity: 1;
        z-index: 10;
       
    }
    .hamburger-menu{
        display: block;
        margin:0.4em;
        cursor: pointer;
        z-index: 12;
        & span{
            display: block;
            width:24px;
            height: 3px;
            background-color: var(--white);
            transition: all 300ms ease-in;
            margin: 0.2em;
            position: relative;
        }
        & span:nth-of-type(1){
            left: 0;
        }
    }
    .active{
        & span:nth-of-type(1){
            left: -30px;
            opacity: 0;
        }
        & span:nth-of-type(2){
            transform: rotate(45deg);
        }
        & span:nth-of-type(3){
            bottom: 5px;
            transform: rotate(-45deg);
        }
    }
    .article-preview{
        width:100%;
        flex-direction: column;
        height: auto;
        & img{
            width:80%;
        }
    }
    .skills{
        width: auto;
    }
    article{
        width: 100%;
        & img{
            width:100%;
            margin: 0;  
        }
    }
}
@media(max-width:1445px){
    .sidebar{
        width: 30%;
    }
    .articles{
        width: 100%;
        margin: 0;
    }
    .article-preview{
        width:100%;
        & h1,h2,h3,h4{
            margin: 1em;
        }
        & .btn, p {
            margin: 1em;
        }
    }
}