* *::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-bg: #fff;
  --clr-dark: #514274;
  --clr-accent: #c1e4f4;
  --clr-accent2: #4e328f;

  --fs-h1: 3rem;
  --fs-h2: 2.25rem;
  --fs-h3: 1.25rem;
  --fs-body: 1rem;

  --bs: 0.25em 0.25em 0.75em rbga(0, 0, 0, 0.25),
    0.125em 0.125em 0.25em rbga(0, 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 {
  color: var(--clr-dark);
  margin: 0;
  font-family: var(--ff-primary);
  font-size: var(--fs-body);
  line-height: 1.6;
  background-image: linear-gradient(
      74deg,
      rgba(236, 236, 236, 0.02) 0%,
      rgba(236, 236, 236, 0.02) 13%,
      transparent 13%,
      transparent 64%,
      rgba(55, 55, 55, 0.02) 64%,
      rgba(55, 55, 55, 0.02) 71%,
      rgba(239, 239, 239, 0.02) 71%,
      rgba(239, 239, 239, 0.02) 100%
    ),
    linear-gradient(
      170deg,
      rgba(8, 8, 8, 0.02) 0%,
      rgba(8, 8, 8, 0.02) 1%,
      transparent 1%,
      transparent 60%,
      rgba(9, 9, 9, 0.02) 60%,
      rgba(9, 9, 9, 0.02) 80%,
      rgba(198, 198, 198, 0.02) 80%,
      rgba(198, 198, 198, 0.02) 100%
    ),
    linear-gradient(
      118deg,
      rgba(134, 134, 134, 0.02) 0%,
      rgba(134, 134, 134, 0.02) 30%,
      transparent 30%,
      transparent 43%,
      rgba(85, 85, 85, 0.02) 43%,
      rgba(85, 85, 85, 0.02) 47%,
      rgba(103, 103, 103, 0.02) 47%,
      rgba(103, 103, 103, 0.02) 100%
    ),
    linear-gradient(
      249deg,
      rgba(178, 178, 178, 0.02) 0%,
      rgba(178, 178, 178, 0.02) 8%,
      transparent 8%,
      transparent 47%,
      rgba(161, 161, 161, 0.02) 47%,
      rgba(161, 161, 161, 0.02) 61%,
      rgba(19, 19, 19, 0.02) 61%,
      rgba(19, 19, 19, 0.02) 100%
    ),
    linear-gradient(90deg, rgb(255, 255, 255), rgb(255, 255, 255));
}

section {
  padding: 11em 2em;
}

img {
  display: block;
  max-width: 100%;
  box-shadow: var(--bs);
  border-radius: 10px;
  box-shadow: #fff;
}

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

.btn {
  display: inline-block;
  padding: 1em 2.5em;
  background: var(--clr-accent);
  border: 1px var(--clr-accent2);
  border-radius: 20px;
  color: var(--clr-accent2);
  text-decoration: none;
  cursor: pointer;
  font-size: 0.8rem;
  text-transform: uppercase;
  text-shadow: 1px 1.5px white;
  letter-spacing: 2px;
  font-weight: var(--fw-bold);
  transition: transform 200ms ease-in-out;
  box-shadow: 0 9px 18px 0 #333333, 0 8px 24px 0 #333333;
}

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

/* Fonts */

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

h1 {
  font-size: var(--fs-h1);
  color: var(--clr-accent2);
}

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

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

.section__subtitle {
  margin: 0;
  font-size: 140%;
}

.section__subtitle--intro {
  background: var(--clr-accent);
  padding: 0.25em 1em;
  font-family: var(--ff-secondary);
  margin-bottom: 1em;
  color: var(--clr-accent2);
}

.section__subtitle--about {
  background: var(--clr-accent);
  padding: 0.25em 1em;
  font-family: var(--ff-secondary);
  color: var(--clr-accent2);
}

/* Header */

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

.nav {
  position: fixed;
  background: var(--clr-dark);
  color: var(--clr-bg);
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;

  transform: translateX(100%);
  transition: transform 250ms cubic-bezier(0.5, 0, 0.5, 1);
}

.nav__list {
  display: flex;
  list-style: none;
  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;
}

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

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

.nav-toggle::after {
  color: aliceblue;
  padding: 2em;
  background: transparent;
  border: 0;
  cursor: pointer;
  position: absolute;
  right: 2em;
  top: 2em;
  z-index: 1000;
}

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

.nav-open .hamburger {
  transform: rotate(0.625turn);
  background: white;
}
.nav-open .hamburger::before {
  transform: rotate(90deg) translateX(-6px);
  background: white;
}
.nav-open .hamburger::after {
  opacity: 100;
  visibility: hidden;
}

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

.hamburger,
.hamburger::before,
.hamburger::after {
  background: var(--clr-dark);
  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;
  /* background: white; */
}

/* Intro Section */

.intro {
  position: relative;
  display: flex;
  flex-direction: row-reverse;
  flex-wrap: wrap;
  justify-content: center;
}

.intro__img {
  display: flex;
  box-shadow: var(--bs);
  min-width: 200px;
  max-width: 20%;
  position: relative;
}

.section__title {
  margin-bottom: 0.25em;
}

.section__title--intro {
  position: relative;
  text-align: center;
  min-width: 300px;
  padding: 30px;
  width: 50%;
  font-weight: var(--fw-reg);
  align-self: center;
}

.section__subtitle--intro {
  margin-top: 0.5em;
  min-width: 300px;
  width: 100%;
  display: relative;
  text-align: center;
  align-items: center;
}

/* My services section */

.my-services {
  background-color: var(--clr-dark);
  background-image: url(https://d3f1iyfxxz8i1e.cloudfront.net/courses/course_image/1bbf3e6555b2.jpg);
  background-size: cover;
  background-blend-mode: multiply;
  color: var(--clr-bg);
  text-align: center;
}

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

.section__title--services::after {
  content: "";
  display: block;
  width: 3em;
  height: 1px;
  margin: 0.5em auto 1em;
  background: var(--clr-bg);
  opacity: 0.3;
}

.services {
  margin-bottom: 4em;
}

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

@media (min-width: 800px) {
  .services {
    display: flex;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 4em;
  }

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

.section__title--about {
  text-align: center;
  padding-bottom: 10px;
}

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

.about-me__body {
  color: var(--clr-accent2);
  max-width: 65%;
}

/* My work */

.my-work {
  background-color: var(--clr-dark);
  color: var(--clr-bg);
  min-height: 46vh;
  text-align: center;
}

.hand-wave {
  display: inline-block;
  border: none;
  width: 65px;
  height: 65px;
}

@media (max-width: 800px) {
  .hand-wave {
    display: inline-block;
    border: none;
    width: 50px;
    height: 50px;
  }
}

.section__subtitle--work {
  color: var(--clr-accent);
  font-weight: var(--fw-bold);
  margin-bottom: 2em;
}

#work .portfolio {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -ms-flex-wrap: wrap;
  flex-wrap: wrap;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  width: 75%;
  margin: auto;
  background-color: var(--clr-dark);
  color: var(--clr-bg);
  min-height: 46vh;
  text-align: center;
}

.portfolio a {
  color: white;
}

/* footer */

.footer {
  color: var(--clr-accent2);
  text-align: center;
  padding: 1em 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: 0.7;
}

.footer-link:hover {
  text-decoration: underline;
}

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

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

.social-list__link {
  padding: 0.5em;
  font-size: 30px;
}

.card_field {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-basis: 100%;
}

.card-img {
  position: relative;
  padding-top: 20px;
  min-width: fit-content;
  padding-left: 50px;
  max-width: 100%;
  width: 50%;
  box-shadow: none;
  border-radius: 0px !important;
  border: 0px;
  box-shadow: #fff;
}

@media (max-width: 800px) {
  .card-img {
    display: inline-block;
    padding-left: 0%;
    margin: auto !important;
    width: 50%;
  }
}

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

.card_field1 {
  padding-bottom: 70px;
  padding-top: 20px;
}

.card_field2 {
  padding-top: 50px;
  padding-bottom: 70px;
}

.card_field3 {
  padding-top: 40px;
}

.work-experience-title {
  text-align: center;
  margin-top: -50px;
  font-size: 30px;
  font-weight: bold;
  padding-bottom: 30px;
}

.work-title {
  font-size: 30px;
  font-weight: 600;
}

.company {
  font-size: 20px;
  font-weight: 600;
  padding-top: 10px;
}

.date {
  padding-top: 10px;
  font-weight: 600;
}

.container {
  display: flex;
  align-items: center;
  justify-content: center;
}

.about-me__img {
  width: 1000px;
  padding-top: 20px;
  padding-left: 20px;
  display: block;
  max-width: 100%;
}

@media (max-width: 800px) {
  .about-me__img {
    width: 1000px;
    padding-top: 20px;
    padding-left: 20px;
    min-width: 50%;
  }
}

/* Pop up boxes for projects! */

#work .portfolio .project-item {
  display: -ms-grid;
  display: grid;
  -ms-grid-columns: 20rem;
  grid-template-columns: 20rem;
  -ms-grid-rows: 13rem 13rem 4rem;
  grid-template-rows: 13rem 13rem 4rem;
  grid-template-areas: "image" "desc" "buttons";
  border-radius: 19px;
  background: aliceblue;
  text-align: center;
  margin: 2rem;
  -webkit-transition: 0.3s ease;
  transition: 0.3s ease;
}

#work .portfolio .project-item:hover {
  transform: translateY(-2%);
}

#work .portfolio .project-item .project-img {
  -ms-grid-rows: 1;
  -ms-grid-columns: 1;
  grid-area: image;
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
  background-size: cover;
}

#work .portfolio .project-item .project-text {
  -ms-grid-rows: 2;
  -ms-grid-columns: 1;
  grid-area: desc;
  padding: 1.5rem;
  color: #4e328f;
}

#work .portfolio .project-item .portfolio-text h3 {
  padding: 0.5rem 0 1rem 0;
  color: var(--clr-dark);
}

.technology {
  color: #00a8e1;
}

#work .portfolio .project-item .project-buttons {
  -ms-grid-rows: 3;
  -ms-grid-columns: 1;
  grid-area: buttons;
  display: block;
  padding-top: 10px;
}

#work .portfolio .project-item .project-buttons a {
  margin-left: 0.5rem;
  text-decoration: none;
  padding: 8px 24px;
  outline: none;
  border: none;
  color: black;
  -webkit-transition: 0.5s ease;
  transition: 0.5s ease;
  display: inline-block;
  font-size: 1.2rem;
}

#work .portfolio .project-item .project-buttons a:hover {
  transform: scale(1.2);
}
