*,
*::before,
*::after {
    box-sizing: border-box;
}

/* Custom Properties */

:root {
    --ff-primary: 'Source Sans Pro', sans-serif;
    --ff-secondary: 'Source Code Pro', monospace;
    
    --fw-reg: 300;
    --fw-bold: 900;
    
    --clr-light: #fff;
    --clr-mid: #e4e4e4;
    --clr-dark: #636262;
    --clr-accent: #229AE0;
    
    --fs-h1: 3rem;
    --fs-h2: 2.25rem;
    --fs-h3: 1.25rem;
    --fs-body: 1rem;

    --bs: 0.25em 0.25em 0.75em rgba(0,0,0,.25),
          0.125em 0.125em 0.25em rgba(0,0,0,.15);
}

@media (min-width: 800px) {
    :root {
        --fs-h1: 4.5rem;
        --fs-h2: 3.75rem;
        --fs-h3: 1.5rem;
        --fs-body: 1.125rem;
    }
}

/* General styles */

html {
    scroll-behavior: smooth;
}

body {
    background: var(--clr-light);
    color: var(--clr-dark);
    margin: 0;
    font-family: var(--ff-primary);
    font-size: var(--fs-body);
    line-height: 1.6;
}

section {
    padding: 5em 2em;
}

img {
    display: block;
    max-width: 100%;
}

.bullet {
    color: #229AE0;
}

/* Buttons */

.btn {
    display: inline-block;
    padding: .5em 2.5em;
    border-radius: 5px;
    background: var(--clr-accent);
    color: var(--clr-light);
    text-decoration: none;
    cursor: pointer;
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: var(--fw-bold);
    transition: transform 200ms ease-in-out;
}

.btn:hover {
    transform: scale(1.1);
}


/* Typography */

h1,
h2,
h3 {
    line-height: 1.1;
    margin: 0;
}

h1 { font-size: var(--fs-h1) }
h2 { font-size: var(--fs-h2) }
h3 { font-size: var(--fs-h3) }

.section_title {
    margin-bottom: .6em;
}

.section_title-intro {
    font-weight: var(--fw-reg);
    margin-bottom: 0;

}

.section_title-intro strong {
    font-weight: var(--fw-bold);
}

.section_subtitle {
    margin: 0;
    font-size: var(--fs-h3);
    border-radius: 5px;
}

.section_subtitle-intro,
.section_subtitle-about,
.section_subtitle-experience {
    background: var(--clr-accent);
    padding: .25em 1em;
    font-family: var(--ff-secondary);
    margin-bottom: 1em;
    color: var(--clr-light);
    text-transform: uppercase;
}

.section-subtitle-projects {
    color: var(--clr-accent);
    font-weight: var(--fw-bold);
    letter-spacing: 1.5px;
    margin-bottom: 2em;
}

.timeframe {
    font-weight: normal;
}

/* Header */

header {
    display: flex;
    justify-content: space-between;
    padding: 1em;
}

.codeIcon{
    max-width: 150px;
}

.fa-code {
    color: var(--clr-dark)
}

.fa-code:hover {
    color: var(--clr-accent)
}

.nav {
    position: fixed;
    background: var(--clr-mid);
    color: var(--clr-dark);
    top: 0;
    bottom: 0;
    left: 70%;
    right: 0;
    z-index: 100;
    
    transform: translateX(100%);
    transition: transform 250ms cubic-bezier(.5, 0, .5, 1);
}

@media (max-width: 800px) {
    .nav {
        left: 0;
    }
}

.nav_list {
    list-style: none;
    display: flex;
    height: 100%;
    flex-direction: column;
    justify-content: space-evenly;
    align-items: center;
    margin: 0;
    padding: 0;
}

.nav_link {
    color: inherit;
    font-weight: var(--fw-bold);
    font-size: var(--fs-h3);
    text-decoration: none;
    color: var(--clr-dark);
}

.nav_link:hover {
    color: var(--clr-accent);
}

.nav-toggle {
    padding: .5em;
    background: transparent;
    border: 0;
    cursor: pointer;
    position: absolute;
    right: 1em;
    top: 1em;
    z-index: 1000;
}

.nav-open .nav {
    transform: translateX(0%);
}

.nav-open .nav-toggle {
    position: fixed;
}

.nav-open .hamburger {
    transform: rotate(.625turn);
}

.nav-open .hamburger::before {
    transform: rotate(90deg) translateX(-6px);
}

.nav-open .hamburger::after {
    opacity: 0;
}

.hamburger {
    display: block;
    position: relative;
}

.hamburger,
.hamburger::before,
.hamburger::after {
    background: var(--clr-accent);
    width: 2em;
    height: 3px;
    border-radius: 1em;
    transition: transform 250ms ease-in-out;
}


.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
}

.hamburger::before { top: 6px; }
.hamburger::after { bottom: 6px; }

/*  Intro section  */

.intro {
    position: relative;
}

img.biking {
    box-shadow: var(--bs);
    border-radius: 5px;
    max-width: 350px;
    margin: 0 auto;
}

@media (min-width: 800px) {
    .intro {
        display: grid;
        width: min-content;
        margin: 0 auto;
        grid-column-gap: 2em;
        grid-template-areas: 
            "title img"
            "subtitle img";
        grid-template-columns: max-content min-content;
    }
    
    img.biking {
        grid-area: img;
        min-width: 300px;
        position: relative;
        z-index: 2;
    }    
    
    .section_subtitle-intro {
        align-self: start;
        grid-column: -1 / 1;
        grid-row: 2;
        text-align: left;
        position: relative;
        right: -1.5em;
        left: -1em;
        width: calc(100% + 3.0em);
    }
}

/*  My skills section  */

.my-skills {
    background-color: var(--clr-dark);
    background-size: cover;
    /* background-blend-mode: multiply; */
    color: var(--clr-light);
    text-align: center;
}

.section_title-skills {
    color: var(--clr-accent);
    position: relative;
}

.section__title-skills::after {
    content: '';
    display: block;
    width: 2em;
    height: 1px;
    margin: 0.5em auto 1em;
    background: var(--clr-light);
    opacity: 0.25;
}

.skills {
    margin-bottom: 3em;
}

.skill {
    max-width: 500px;
    margin: 0 auto;
}

@media (min-width: 800px) {
    .skills {
        display: flex;
        max-width: 1000px;
        margin-left: auto;
        margin-right: auto;
    }
    
    .skill + .skill {
        margin-left: 2em;
    }
}

/* Work Experience */

.work-experience {
    max-width: 1000px;
    margin: 0 auto;
}

.experience_img {
    box-shadow: var(--bs);
    border-radius: 5px;
    max-width: 350px;
    margin: 0 auto;
}

@media (min-width: 800px) {
    .work-experience {
        display: grid;
        grid-template-columns: 320px 1fr;
        grid-template-areas: 
            "img title"
            "img subtitle"
            "img text";
        grid-column-gap: 1.5em;
    }
    
    .section_title-experience {
        grid-area: title;
    }
    
    .section_subtitle-experience {
        grid-column: 1 / -1;
        grid-row: 2;
        position: relative;
        left: -1em;
        width: calc(100% + 2em);
        padding-left: 1em;
        text-align: right;
    }
    
    .experience_img {
        grid-area: img;
        position: relative;
        z-index: 2;
        max-width: 300px;
    }
}

/* Projects */

.recent-projects {
    background-color: var(--clr-dark);
    color: var(--clr-light);
    text-align: center;    
}

.section_title-projects {
    margin-bottom: 8px;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    max-width: 1000px;
    margin: 0 auto;
}

.project {
    background: var(--clr-accent);
    overflow: hidden;
    margin-bottom: 2em;
    margin-left: 1em;
    margin-right: 1em;
    border-radius: 5px;
}

.project_title {
  margin-top: 15px;
}

.project_description {
  padding-left: 10px;
  padding-right: 10px;
}

.project_img {
    width: 100%;
    transition: 
        transform 750ms cubic-bezier(.5, 0, .5, 1),
        opacity 250ms linear;
}

.project_img:hover {
    opacity: 1;
    transform: scale(1.1);
}

/* Footer */

.footer {
    background: #e4e4e4;
    color: var(--clr-accent);
    text-align: center;
    padding: 1em 0;
    margin: 0;
    font-size: var(--fs-h2);

}

.footer a {
    color: inherit;
    text-decoration: none;
} 

.footer_link:hover,
.social-list_link:hover {
    opacity: .7;
}

.social-list_link:hover {
    text-decoration: underline;
}

.social-list {
    list-style: none;
    display: flex;
    justify-content: center;
    margin: 1em 0;
    padding: 0;
}

.social-list_item {
    margin: 0 .5em;
}

.social-list_link {
    padding: .5em;
}