*,
*::before,
*::after {
    box-sizing: border-box;
}

/* Custom Properties, updates these for your own design */

:root {
    /* ff: font family */
    --ff-primary: 'Source Sans Pro', sans-serif;
    --ff-secondary: 'Source Code Pro', monospace;

    /* fw: font weight */
    --fw-reg: 300;
    --fw-bold: 900;

    /* clr: color */
    --clr-light: #fff;
    --clr-dark: #303030;
    --clr-accent: #f0f0f0;
    --clr-pink: pink;

    /* fs: font size */
    --fs-h1: 3rem;
    --fs-h2: 2.25rem;
    --fs-h3: 1.25rem;
    --fs-body: 1rem;

    --boxsh: 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;
}

html, body {
    width: 100%;
    height: 100%;
    margin: 0px;
    padding: 0px;
    overflow-x: hidden;
}

section {
    padding: 5em 2em;
}

img {
    display: block;
    max-width: 100%;
}

figcaption {
    font-weight: var(--fw-reg);
    font-family: var(--ff-primary);
    font-size: var(--fs-h3);
    color: var(--clr-accent);
}

strong {
    font-weight: var(--fw-bold);
}

:focus {
    outline: 3px solid var(--clr-accent);
    outline-offset: 3px;
}

/* Buttons */

.btn {
    display: inline-block;
    padding: .5em 2.5em;
    background: var(--clr-accent);
    color: var(--clr-dark);
    text-decoration: none;
    cursor: pointer;
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: var(--fw-bold);
    transition: transfrom 200ms ease-in-out;
}

.btn:hover {
    transform: scale(1.1);
}

/* Typography */

h1,
h2,
h3 {
    line-height: 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: .25em;
}

.section__title--intro {
    font-weight: var(--fw-reg);
}

.section__title--intro strong {
    display: block;
}

.section__subtitle {
    margin: 0;
    font-size: var(--fs-h3);
}

.section__subtitle--intro,
.section__subtitle--about {
    background: var(--clr-accent);
    padding: .25em 1em;
    font-family: var(--ff-secondary);
    margin-bottom: 1em;
}

.section_subtitle--work {
    color: var(--clr-accent);
    font-weight: var(--fw-bold);
    margin-bottom: 2em;
}

/* Header */

header {
    display: flex;
    justify-content: space-between;
    padding: 1em;
}

.logo {
    max-width: 10px;
}

.nav {
    position: fixed;
    background: var(--clr-dark);
    color: var(--clr-light);
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;

    transform: translateX(100%);
    transition: transform 250ms cubic-bezier(.5, 0, .5, 1);
}

.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, .subnav__link {
    color: inherit;
    font-weight: var(--fw-bold);
    font-size: var(--fs-h2);
    text-decoration: none;
}

.nav__link:hover {
    color: var(--clr-pink);
}

.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(90deg);
}

.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-pink);
    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;
    margin: 0 auto;
}

.intro__img {
    box-shadow: var(--boxsh);
}

.section__subtitle--intro {
    display: inline-block;
}

@media (min-width: 1100px) {
    .intro {
        display: grid;
        width: min-content;
        margin: 0 auto;
        grid-column-gap: 1em;
        grid-template-areas: 
            "img title"
            "img subtitle";
        grid-template-columns: min-content max-content;
    }

    .intro__img {
        grid-area: img;
        min-width: 400px;
        position: relative;
        z-index: 2;
    }

    .section__subtitle--intro {
        align-self: start;
        grid-column: -1 / 1;
        grid-row: 2;
        text-align: right;
        position: relative;
        left: -1em;
        width: calc(100% + 1.5em);
    }
}

/* My services section */

.my-services {
    background-color: var(--clr-dark);
    background-image: url(../img/services_background.png);
    background-size: cover;
    background-blend-mode: multiply;
    color: var(--clr-light);
    text-align: center;
}

.section__title--services {
    display: block;
    color: var(--clr-accent);
    position: relative;
    text-align: center;
    margin: 0 auto;
}

.section__title--services::after,
.section__title--proj-materials::after,
.material-benefits::after {
    content: '';
    display: block;
    width: 3em;
    height: 1px;
    margin: 0.5em auto 0.5em;
    background: var(--clr-light);
    opacity: 0.25;
}

.services {
    margin-bottom: 4em;
    position: relative;
    font-size: var(--fs-h3);
}

.service, .benefit {
    max-width: 600px;
    margin: 0 auto;
}

@media (min-width: 600px) {
    .services, .benefits {
        display: flex;
        max-width: 1000px;
        margin-left: auto;
        margin-right: auto;
    }

    .service + .service,
    .benefit + .benefit {
        margin-left: 2em;
    }
}


/* About me section */

.about-me {
    max-width: 1000px;
    margin: 0 auto;
}

.about-me__img {
    box-shadow: var(--boxsh);
}

@media (min-width: 600px) {
    .about-me {
        display: grid;
        grid-template-columns: 1fr 500px;
        grid-template-areas: 
            "title img"
            "subtitle img"
            "text img";
        grid-column-gap: 2em;
    }

    .section__title--about {
        grid-area: title;
    }

    .section__subtitle--about {
        grid-column: 1 / -1;
        grid-row: 2;
        position: relative;
        left: -1em;
        width: calc(100% + 2em);
        padding-left: 1em;
        padding-right: calc(500px + 4em);
    }

    .about-me__img {
        grid-area: img;
        position: relative;
        z-index: 2;
    }
}

/* My work */

.my-work {
    background-color: var(--clr-dark);
    color: var(--clr-light);
    text-align: center;
}

.my-work-header {
    display: block;
    text-align: center;
    margin: 0 auto;
}

.projects {
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    padding-bottom: 2em;
    max-width: 900px;
    margin: 0 auto;
}

.project__link {
    text-decoration: none;
    font-size: var(--fs-body);
    font-weight: var(--fw-bold);
    color: var(--clr-light);
}

.project__link:hover {
    color: var(--clr-pink);
    transition: transform 250ms ease-in-out;
    transform: scale(1.2);
}

.portfolio {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    grid-row-gap: .5em;
    grid-column-gap: .5em;
    max-width: 900px;
    margin: 0 auto;
}

.portfolio__item {
    background: var(--clr-accent);
    overflow: hidden;
}

.portfolio__img {
    transition: 
        transform 750ms cubic-bezier(.5, 0, .5, 1),
        opacity 250ms linear;
}

.portfolio__item:focus {
    position: relative;
    z-index: 2;
}

.portfolio__img:hover,
.portfolio__item:focus .portfolio__img {
    transform: scale(1.2);
    opacity: .75;
}

/* Footer */

.footer {
    background: #111;
    color: var(--clr-accent);
    text-align: center;
    padding: 2.5em 0;
    font-size: var(--fs-h3);
}

.footer a {
    color: inherit;
    text-decoration: none;
}

.footer__link {
    font-weight: var(--fw-bold);
}

.footer__link:hover,
.social-list__link:hover {
    opacity: .7;
}

.footer__link:hover {
    text-decoration: underline;
}

.social-list {
    list-style: none;
    display: flex;
    justify-content: center;
    margin: 2em 0 0;
    padding: 0;
}

.social-list__item {
    margin: 0 0.5em;
}

.social-list__link {
    padding: 0.5em;
}

/* Project Pages Styling */

/* Project Introduction */

.intro-bike {
    background-image: url(../img/bike_shop/bike_display.png);
}

.intro-law {
    background-image: url(../img/law_office/lobby.png);
}

.intro-pulse {
    background-image: url(../img/pulse/bed_view.png);
}

.intro-studio-soul {
    background-image: url(../img/studio_soul/workstation.png);
}

.intro-form {
    background-image: url(../img/form/restaurant_view_center.png);
}

.intro-bike, .intro-law, .intro-pulse,
.intro-studio-soul, .intro-form {
    background-color: var(--clr-dark);
    background-size: cover;
    background-blend-mode: multiply;
    text-align: center;
    color: var(--clr-light);
}

.section__title--proj-name,
.section__subtitle--proj-description {
    display: relative;
    max-width: 800px;
    margin: 0 auto;
}

.introduction {
    margin: 100px auto;
}

/* Materials */

.proj-materials {
    background-color: var(--clr-dark);
    color: var(--clr-light);
    text-align: center;
}

.section__title--proj-materials {
    margin-bottom: 1em;
}

.material__name {
    margin: 0.75em;
}

.material__img {
    border-radius: 50%;
    position: relative;
    min-width: 200px;
    min-height: 200px;
    max-width: 200px;
    max-height: 200px;
    box-shadow: var(--boxsh);
}

.material__item, .benefit {
    max-width: 200px;
    margin: 0 auto;
}

@media (min-width: 950px) {
    .material-list {
        display: flex;
        margin-left: auto;
        margin-right: auto;
    }

    .material-list {
        max-width: 1200px;
    }

    .material-list--form {
        max-width: 600px;
    }
}

.material-benefits {
    margin-top: 1em;
}

@media (min-width: 900px) {
    .benefits {
        display: flex;
        margin-left: auto;
        margin-right: auto;
    }

    .benefits--form {
        max-width: 600px;
    }
}

/* Planning */

.section__title--proj-planning {
    text-align: center;
}

.planning-figures {
    display: flex;
    justify-content: center;
}

.planning__name {
    font-weight: var(--fw-bold);
    color: var(--clr-dark);
    text-align: center;
}

.planning__item {
    max-width: 400px;
    margin: 0 auto;
}

.planning__img {
    position: relative;
    width: 400px;
    height: 400px;
    object-fit: contain;
    margin-top: 2em;
}

@media (min-width: 950px) {
    .planning-figures {
        display: flex;
        max-width: 1000px;
        margin-left: auto;
        margin-right: auto;
    }
}

@media (max-width: 950px) {
    .planning-figures {
        display: block;
        margin: 0 auto;
        padding-right: 25%;
        padding-left: 25%;
    }
}


/* Gallery Image Carousel*/

.proj-gallery {
    background-color: var(--clr-dark);
    color: var(--clr-light);
    text-align: center;
}

.carousel {
    position: relative;
    height: 550px;
    width: 80%;
    margin: 0 auto;
    max-width: 1200px;
}

.carousel__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel__track-container {
    height: 100%;
    position: relative;
    overflow: hidden;
}

.carousel__track {
    padding: 0;
    margin: 0;
    list-style: none;
    position: relative;
    height: 100%;
    transition: transform 250ms ease-in;
}

.carousel__slide {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 100%;
}

.carousel__button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: 0;
    cursor: pointer;
}

.carousel__button--left {
    left: -50px;
}

.carousel__button--right {
    right: -50px;
}

.carousel__button img {
    width: 30px;
    height: 30px;
}

.carousel__nav {
    display: flex;
    justify-content: center;
    padding: 10px 0;
}

.carousel__indicator {
    border: 0;
    border-radius: 50%;
    min-width: 15px;
    max-width: 15px;
    min-height: 15px;
    max-height: 15px;
    background: var(--clr-accent);
    margin: 0 12px;
    cursor: pointer;
}

.carousel__indicator.current-slide {
    background: var(--clr-pink)
}

.is-hidden {
    display: none;
}