/************** Custom Properties **************/

:root {
  --hover-navbar: #757575;
  --black: #2c2c2c;
  --grey: #ededed;
  --white: white;
  --shadow: rgba(29, 30, 32, 0.089);
  --font-italic: "Merriwather", serif;
  --font-body: "Noto Sans", sans-serif;
  --max-width: 1200px;
  --header-height: 4rem;
}
/************** Reset **************/

html {
  box-sizing: border-box;
  font-family: var(--font-body, --font-italic);
  font-size: 16px;
  scroll-behavior: smooth;
}

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

body {
  margin: 0;
  overflow-x: hidden;
  color: var(--black);
  background-color: #f9f9f9;
}

a {
  color: var(--black);
  transition: all 0.5s ease-out;
}

a:hover {
  opacity: 0.75;
  
}

h1 {
  margin: 0;
  font-size: 2rem;
  font-family: var(--font-body);
}

h2 {
  margin: 0;
  font-size: 1.7rem;
  margin: 1rem auto;
  padding: 0.5rem 1rem;
  width: 250px;
  font-weight: bold;
}
h3 {
  margin: 0;
  font-size: 1.25rem;
}

h4 {
  margin: 0;
  font-size: 1rem;
}

h5 {
  margin: 0;
  font-size: 0.875rem;
}

h6 {
  margin: 0;
  font-size: 0.7rem;
}

img {
  max-width: 100%;
  height: auto;
}
p {
  line-height: 1.6;
}

/************** Componentes **************/

/************** Contact Form **************/
.contact-form {
  margin: 1rem auto;
  padding: 1rem;
  max-width: 800px;
}
.contact-form > .btn {
  background-color: var(--black);
  color: var(--white);
}

.contact-form > * {
  border: thin solid var(--hover-navbar);
  border-radius: 1vw;
  padding: 1rem;
  margin: 1rem auto;
  display: block;
  width: 100%;
}

.contact-form input,
.contact-form textarea {
  font-size: 1rem;
  font-family: var(--font-body);
}



.contact-form *::placeholder {
  color: var(--hover-navbar);
}

.contact-form > input[type="submit"] {
  margin: 0;
  cursor: pointer;
  transition: all 0.5s ease-out;
  border: none;
}
.contact-form > input[type="submit"]:hover {
  opacity: 0.75;
}

.contact-form-response {
  padding: 1rem;
  width: 400px;
  text-align: center;
  background-color: var(--white-color);
}
.contact-form-response svg {
  margin-top: 2rem;
  width: 4rem;
  height: 4rem;
  fill: var(--black);
}

.modal#gracias:target {
  opacity: 1;
  pointer-events: auto;
}

.contact-form-loader{
  border: none;
}

@media screen and (min-width: 1024px) {
  .contact-form {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    column-gap: 1rem;
  }

  .contact-form textarea,
  .contact-form-loader {
    grid-column: span 2;
  }


  .contact-form > input [type="submit"] {
    margin-left: 0;
  }
}

/************** Menu **************/
.menu-btn {
  outline: thin solid var(--black);
  border: 0;
  cursor: pointer;
  background-color: var(--black);
}

.menu-btn svg {
  fill: var(--white);
  width: 2.5rem;
  height: 2.5rem;
}

.menu {
  background-color: rgb(255, 255, 255);
  position: fixed;
  right: 0;
  top: var(--header-height);
  width: 100%;
  height: 100%;

  border-radius: 0 .5rem;
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transition: 250ms cubic-bezier(.2,.6,.3,1), width 250ms cubic-bezier(.2,.6,.3,1);
  
}

.menu a {
  padding: 1rem;
  font-size: 1.5rem;
  font-weight: bold;
  text-align: center;
  text-decoration: none;
  color: var(--black);
}

.menu.is-active {
  opacity: 1;
  pointer-events: auto;
}

@media screen and (min-width: 1024px) {
  .menu-btn {
    display: none;
  }

  .menu {
    background-color: var(--black);
    position: static;
    width: auto;
    flex-direction: row;
    opacity: 1;
    pointer-events: auto;
  }

  .menu a {
    padding: 1rem;
    color: var(--white);
  }

  .menu a:last-child {
    padding-right: 0;
  }
}

/* ********** Modal ********** */
.modal {
  position: fixed;
  z-index: 999;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: var(--white);
  opacity: 0;
  pointer-events: none;
  transition: all 1s;
}

.modal-content {
  position: relative;
}

/************** Utilities **************/

.btn {
  border-radius: 2rem;
  padding: 1rem;
  display: inline-block;
  width: 200px;
  font-size: 1.25rem;
  font-weight: bold;
  text-align: center;
  text-decoration: none;
  color: var(--black);
  background-color: var(--white);
}

.container {
  margin-left: auto;
  margin-right: auto;
  max-width: var(--max-width);
}

.text-left {
  text-align: left;
}

.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

@media screen and (min-width: 1024px) {
  .full-lg-screen {
    width: 100%;
    min-height: 30vh;
  }

  .text-lg-left {
    text-align: left;
  }

  .text-lg-center {
    text-align: center;
  }

  .text-lg-right {
    text-align: right;
  }
}

.section-title {
  border-top: thin solid var(--black);
  border-bottom: thin solid var(--black);
  margin: 2rem auto;
  padding: 0.5rem 1rem;
  width: 250px;
  text-align: center;
  color: var(--black);
}

.none {
  display: none;
}

.box-shadow {
  box-shadow: 0.25rem 0.25rem 1rem var(--shadow);
}

.section {
  padding: 2rem 1rem;
  border-bottom: thin solid #75757518;
}

/************** Site Styles **************/

/************** Contact **************/

.contact-card {
  margin: 1rem auto;
  padding: 1rem;
  width: 80%;
  height: 144px;
  border-radius: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  align-items: center;
}

.contact-card > h5 {
  color: var(--black);
}

.contact-card > svg {
  width: 2rem;
  height: 2rem;
  fill: var(--black);
}

.contact-card > small {
  margin-top: -0.5rem;
}

.footer {
  padding: 1rem;
  text-align: center;
  background-color: var(--black);
  color: var(--white);
}

/************** Home **************/

.container > article {
  margin-top: 5vh;
  margin-bottom: 2rem;
  text-align: center;
}
.img-home {
  border-radius: 50%;
}

.home {
  background-color: var(--black);
  color: var(--white);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.home h2 > i {
  font-family: var(--font-italic);
  font-size: 2rem;
}

.home h3 {
  font-size: 3rem;
  font-family: var(--font-italic);
}

/************** Header **************/
.header {
  position: fixed;
  left: 0;
  z-index: 999;
  padding: 1rem;
  width: 100%;
  height: var(--header-height);
  background-color: var(--black);
}

.header > .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.logo a {
  color: var(--white);
  font-weight: bold;
  font-size: 2rem;
  font-family: var(--font-body);
  text-decoration: none;
}

.portfolio-card {
  position: relative;
  width: 100%;
  padding: 1rem;
  margin: 0 auto;
  display: block;
}

.portfolio-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0.5rem;
}

.skills-text {
  color: #3b3a3a;
  margin-bottom: 18px;
  font-size: 18px;
  line-height: 32px;
}
.container-skills {
  padding: 16px;
  display: flex;
  text-align: center;
  justify-content: center;
  flex-direction: column;
}

.social-media a {
  padding: 0 0.4rem;
  text-decoration: none;
}

.social-media svg {
  width: 1.5rem;
  height: 1.5rem;
  fill: var(--black);
}

@media screen and (min-width: 768px) {
  /* .home img {
    width: 160px;
    height: 160px;
  } */

  .projects > .container {
    display: grid;
    grid-template-columns: repeat(2, 50%);
  }

  .contact-cards {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    justify-content: space-between;
  }
}

@media screen and (min-width: 1024px) and (max-width: 1280px) {
  .container > article:last-of-type {   
    padding-right: 3rem;
  }
}           

@media screen and (max-width: 1024px) {
    .container > article:last-of-type {   
        padding-inline: 2rem;
        text-align: justify;
      }
}

@media screen and (min-width: 1024px) {
  .container > article.img {
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .container > article {
    text-align: left;
  }

  .contact-cards {
    grid-template-columns: repeat(3, 35%);
  }

  .footer {
    margin-bottom: 0;
  }

  .home img {
    width: 320px;
    height: 320px;
  }

  .home > div {
    display: grid;
    grid-template-columns: repeat(2, 50%);
    text-align: center;
    justify-content: left;
    align-content: center;
  }

  .header {
    position: sticky;
    top: 0;
    padding: 1rem;
    height: calc(var(--header-height)-0.5rem);
  }

  .projects > .container {
    grid-template-columns: repeat(3, 1fr);
  }

  .container-skills > div {
    display: grid;
    grid-template-columns: repeat(3, 33.3%);
    grid-template-rows: auto;
  }

  .skills-text {
    font-size: 24px;
    grid-template-columns: repeat(3, 2fr);
  }
}
