* {
  box-sizing: border-box;
}
/* custom css property variables */
:root {
  /* font families */
  --ff-primary: 'Source Sans Pro', sans-serif;
  --ff-secondary: 'Source Code Pro', monospace;

  /* font weights */
  --fw-reg: 300;
  --fw-bold: 900;

  /* colors */
  --clr-primary: #303030;
  --clr-secondary: #fff;
  --clr-accent: #671818;

  /* font sizes */
  --fs-h1: 3rem;
  --fs-h2: 2.25rem;
  --fs-h3: 1.25rem;
  --fs-body: 1rem;

  /* box shadow */

  --bs: 0.6em 0.6em 1em rgba(0, 0, 0, 0.45);
}

/* media query custom property variables */

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

/* styling */
html {
  scroll-behavior: smooth;
}

body {
  background: var(--clr-primary);
  color: var(--clr-secondary);
  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%;
}
/* general typography */

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

/* button (portfolio page button at end of services) */
.btn {
  display: inline-block;
  padding: 0.5em 1.5em;
  background: var(--clr-accent);
  color: var(--clr-secondary);
  text-decoration: none;
  cursor: pointer;
  /* font-size: 0.8rem; */
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: var(--fw-bold);
  transition: transform 200ms;
}
.btn:hover {
  transform: scale(1.25);
}

h1,
h2,
h3 {
  line-height: 1;
}
h1 {
  font-size: var(--fs-h1);
}

h2 {
  font-size: var(--fs-h2);
}

h3 {
  font-size: var(--fs-h3);
}

.section__title {
  margin-bottom: 0.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: 0.25em 1em;
  font-family: var(--ff-secondary);
  margin-bottom: 1em;
}
header {
  display: flex;
  justify-content: space-between;
  padding: 1em;
}

/* nav styling */
.nav {
  position: fixed;
  background: var(--clr-secondary);
  color: var(--clr-primary);
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 20;

  transform: translateX(100%);
  transition: transform 250ms ease-in-out;
}

.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 {
  text-decoration: none;
  color: inherit;
  font-weight: var(--fw-bold);
  font-size: var(--fs-h2);
}
.nav__link:hover {
  color: var(--clr-accent);
}
.nav__link:visited {
  color: var(--clr-accent);
}

/* nav  toggle button */
.nav-toggle {
  padding: 0.3em;
  background: transparent;
  border: none;
  font-size: 3rem;
  cursor: pointer;
  position: absolute;
  right: 1em;
  top: 1em;
  color: var(--clr-accent);
  z-index: 30;
  transition: transform 250ms;
  text-shadow: -1px 1px 2px rgb(255, 255, 255), 1px 1px 2px rgb(255, 255, 255),
    1px -1px 0 rgb(255, 255, 255), -1px -1px 0 rgb(255, 255, 255);
}

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

.nav-open .nav-toggle {
  position: fixed;
  transform: rotate(90deg);
}

/* intro section */

.intro {
  position: relative;
}

.intro__img {
  box-shadow: var(--bs);
  border-radius: 10px;
}

.section__subtitle--intro {
  display: inline-block;
}
/* media queries for intro section picture and title */
@media (min-width: 600px) {
  .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: 250px;
    position: relative;
    border-radius: 10px;
  }

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

/* services section */

.my-services {
  background-color: grey;
  background-image: url('../images/services-background.jpeg');
  background-size: cover;
  /* use background blend mode to blend background img with background color, make the image darker */
  background-blend-mode: multiply;
  color: var(--clr-secondary);
  text-align: center;
}

.section__title--services {
  color: var(--clr-accent);
  position: relative;
  text-shadow: -1px 1px 2px rgb(255, 255, 255), 1px 1px 2px rgb(255, 255, 255),
    1px -1px 0 rgb(255, 255, 255), -1px -1px 0 rgb(255, 255, 255);
}
/* create little line under my services title, using psuedo element */
.section__title--services::after {
  content: '';
  display: block;
  width: 3em;
  height: 1px;
  margin: 0.5em auto 1em;
  background: var(--clr-primary);
}

.service {
  max-width: 570px;
  margin: 0 auto;
}
/* media query to break services into columns on bigger screens */

@media (min-width: 800px) {
  .services {
    display: flex;
    /* max-width: 1000px; */
    margin: 0 auto;
  }

  /* create a margin between sibling service elements, to create space so the text isn't touching eachother */

  .service + .service {
    margin-left: 2em;
  }
}

/* about me section styling */

.about-me {
  max-width: 1000px;
  margin: 0 auto;
}
.about-me__img {
  box-shadow: var(--bs);
  border-radius: 10px;
}

/* media queries about me using grid */
@media (min-width: 600px) {
  .about-me {
    display: grid;
    grid-template-columns: 1fr 200px;
    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(200px + 4em);
  }
  .about-me__img {
    grid-area: img;
    position: relative;
    border-radius: 10px;
  }
}
/* portfolio section */

.my-portfolio {
  background-color: var(--clr-accent);
  color: var(--clr-primary);
  text-align: center;
}
.section__title--portfolio {
  text-shadow: -1px 1px 2px rgb(255, 255, 255), 1px 1px 2px rgb(255, 255, 255),
    1px -1px 0 rgb(255, 255, 255), -1px -1px 0 rgb(255, 255, 255);
}
.section__subtitle--portfolio {
  color: var(--clr-secondary);
  font-weight: var(--fw-bold);
  margin-bottom: 2em;
}




/* footer styling */

.footer {
  background: var(--clr-primary);
  color: var(--clr-secondary);
  text-align: center;
  padding: 2.5em 0;
}

.footer a {
  /* change footer links to inherit text color from footer parent */
  color: inherit;
}

.footer__link:hover,
.social-list__link:hover {
  /* change opacity when hovering over links */
  opacity: 0.7;
}

.footer__link {
  /* change size and weight of footer links */
  font-size: var(--fs-h3);
  font-weight: var(--fw-bold);
}

.social-list {
  /* get rid of bullet points */
  list-style: none;
  /* set to flex to display next to eachother rather than stacked */
  display: flex;
  justify-content: center;
  margin: 2em 0;
}

.social-list__item {
  margin: 0 1em;
  font-size: 2rem;
}

.social-list__link {
  padding: 1em;
}

.footer .resume-btn {
  color: var(--clr-secondary);
}

/* Card styling for portfolio */
.card {
  margin: 0 auto;
  background-color: white;
  max-width: 650px;
  padding: 0;
  transform: scale(0.85);
  box-shadow: rgba(0, 0, 0, 0.16) 0px 1px 4px, rgb(51, 51, 51) 0px 0px 0px 3px;
}
.card__img {
  display: block;
  width: 100%;
  height: 18rem;
  object-fit: cover;
}

.card__content {
  padding: 3rem 3rem;
}

.card__header {
  font-size: 3rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
}

.card__text {
  font-size: 1.5rem;
  letter-spacing: 0.1rem;
  line-height: 1.7;
  margin-bottom: 2.5rem;
}

.card__btn {
  display: inline-block;
  padding: 0.5em 1.5em;
  background: var(--clr-accent);
  color: var(--clr-secondary);
  text-decoration: none;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: var(--fw-bold);
  transition: transform 200ms;
}
span {
  margin-left: 1rem;
}
a:visited {
  color: white;
}