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

html {
    scroll-behavior: smooth;
}

/* Custom Properties */

:root {
    --ff-primary: 'fantasy', sans-serif;
    --ff-secondary: 'Source Code Pro', monospace;

    --fw-reg: 300;
    --fw-bold: 900;

    --clr-light: #fff;
    --clr-dark: #303030;
    --clr-accent: #16e0bd;

    --fs-h1: 3rem;
    --fs-h2: 2.25rem;
    --fs-h3: 1.25rem;
    --fs-body: 1rem;
    
    --bs: .25em .25em .75em rgba(0, 0, 0, .25),
    0 .125em .125em, .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  */

.grid {
      display: grid;
      /* auto-fit to fit as much on the screen */
        grid-template-columns: repeat(auto-fit,minmax(350px ,1fr));
        grid-template-rows: 1fr 1fr;
        justify-items: center;
        gap: 2em;
}

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

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

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

:focus {
    outline: 3px solid var(--clr-accent);
    outline-offset: 3px;
}

section {
    padding: 5em 2em;
}
/* buttons */
.btn {
    display: inline-block;
    padding: .5em 2.5em;
    color: var(--clr-dark);
    background-color: var(--clr-accent);
    text-decoration: none;
    cursor: pointer;
    font-size: .8rem;
    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: .25em;
}

.section-subtitle{
    margin: 0;
    font-size: var(--fs-h3);
}

.section__subtitle--intro {
    font-weight: var(--fw-reg);
}

.section-title strong {
    display: block;
}

.section-subtitle-intro,
.section-subtitle-about {
    background: var(--clr-accent);
    font-family: var(--ff-secondary);
    margin-bottom: 1em;    
    padding: .25em 1em;
}

/* header/Nav */
header{ 
    display: flex;
    justify-content: space-between;
    pad: 1em;
}
nav {
    position: fixed;
    background-color: var(--clr-dark);
    color: var(--clr-light);
    top: 0;
    bottom: 0;
    right: 0;
    left: 0;
    z-index: 100;
    
    /* moves it off the screen */
    transform:  translateX(100%);
    transition: transform 250ms cubic-bezier(.5, 0, .5, 1);
}

.nav-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    height: 100%;
    justify-content: space-evenly;
    align-items: center;
    margin: 0;
    padding: 0;
}
.nav-link {
    color: inherit;
    font-weight: var(--fw-bold);
    font-size: var(--fs-h2);
    text-decoration: none;
    
}

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

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

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

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

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

/* hamburger button */
.hamburger {
    display: block;
    position: relative;
}

.hamburger,
.hamburger::before,
.hamburger::after  {
    background-color:  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;
    background-color: var(--clr-accent);
}

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

.intro {
    position: relative;
}

.intro-img {
    box-shadow: var(--bs);
}

 p {
    font-weight: 500;
    font-size: 1.2rem;
 }

@media (min-width: 600px) {
    .intro {
        display: grid;
        width: min-content;
        margin: 0 auto;
        grid-column-gap: 1em;
        grid-template-areas: 
            "img title"
            "img subtitle";
            /* shrink as small as possible */
        grid-template-columns: min-content max-content;
    }

    .intro-img {
        grid-area: img;
        min-width: 250px;
        position: relative;
        z-index: 2;
    }

    .section-subtitle-intro {
        align-self: start;
        grid-column: -1 / 1;
        grid-row: 2;
        text-align: right;
        position: relative;
        left: -1.5em;
        transform: translateY(-.65em);
        width: calc(100% + 1.5em);

    }
}

/*  Services Section */

.my-services{
    background-color: var(--clr-dark);
    background-image: url(img/services-bg.jpg);
    color: var(--clr-light);
    background-blend-mode: multiply;
    background-size: cover;
    text-align: center;
}

.section-title-services {
    color: var(--clr-accent);
    position: relative;
}

.section-title-services::after {
    content: '';
    display: block;
    width: 2em;
    height: 1px;
    margin: 0.5em auto 1em;
    background: currentColor;
    opacity: 0.25;
}

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

.services {
    margin-bottom: 4em;
}

@media (min-width: 800px) {
    .services {
        display: flex;
        max-width: 1100px;
        margin-left: auto;
        margin-right: auto;
        gap: 2em;
    }

    
}

.about-me {
    max-width: 1000px;
    margin: 0 auto;
}


/* Portfolio */

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

.portfolio_item {
    background: var(--clr-accent);
    overflow: hidden;
}

.portfolio-img {
    min-width: 350px;
    height: 350px;
    object-fit: cover;
    object-position: center;
     transition: 
        transform 750ms cubic-bezier(.5, 0, .5, 1),
        opacity 250ms linear;
}

.portfolio-img:hover {
    /* transform: scale(1.1); */
    opacity: .75;
}

.portfolio-link {

    display: inline-block;
    padding: .5em 1.75em;
    text-decoration: none;
    color: var(--clr-light);
    font-size: .85rem;
    font-weight: var(--fw-bold);
    margin-top: 1em;
    margin-bottom: 1.5em;
    margin-right: .5em;
    border-radius: 1em;
    background-color: var(--clr-accent);
    text-shadow: 1px 2px 2px black;
}

.portfolio-link:hover {
    font-size: 1.05rem;
    box-shadow: 3px 5px 5px #EAF4F4;
    transition: .5s;
}


.portfolio-title {
    margin: 1em;
}
/* blog */

.blog {
    text-align: center;
    max-width: 1000px;
    margin: 0 auto;
}

.blog a {
    color: var(--clr-dark);
    font-weight: var(--fw-bold);
    text-decoration: none;
}

.blog a:hover {
    text-decoration: underline;
}

/* footer */

footer {
    background: #111;
    color: var(--clr-accent);
    text-align: center;
    padding: 2.5em 0;
}

footer a { 
    color: inherit;
    text-decoration: none;
    font-size: var(--fs-h3);
}

.social-list:hover {
    opacity: .7;
}

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

.social-item {
    margin: 0 0.5em;
}

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

.flex {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: .5em;
}
.flex-column {
    flex-direction: column;
}

textarea {
    resize: none;
    width: 400px;
}

form button {
    display: inline-block;
    padding: .5em 1.75em;
    text-decoration: none;
    color: var(--clr-light);
    font-size: .85rem;
    font-weight: var(--fw-bold);
    margin-top: 1em;
    margin-bottom: 1.5em;
    margin-right: .5em;
    border-radius: 1em;
    background-color: var(--clr-accent);
}

form button:hover {
    transition: .5s;
    transform: scale(1.2);
}