html {
  background-color:  #fbf9f3 ;
}

html.sr {
  width: 100%;
}

/*===== GOOGLE FONTS =====*/
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap");
/*===== VARIABLES CSS =====*/
:root {
  --header-height: 3rem;
  --font-semi: 600;
}

/*===== Colores =====*/
:root {
  --first-color: #4070f4;
  --second-color: #0e2431;
}

/*===== Fuente y tipografia =====*/
:root {
  --body-font: "Poppins", sans-serif;
  --big-font-size: 2rem;
  --h2-font-size: 1.25rem;
  --normal-font-size: 0.938rem;
}
@media screen and (min-width: 768px) {
  :root {
    --big-font-size: 4rem;
    --h2-font-size: 2rem;
    --normal-font-size: 1.2rem;
  }
}

/*===== Margenes =====*/
:root {
  --mb-1: 0.5rem;
  --mb-2: 1rem;
  --mb-3: 1.5rem;
  --mb-4: 2rem;
  --mb-5: 2.5rem;
  --mb-6: 3rem;
}

/*===== z index =====*/
:root {
  --z-back: -10;
  --z-normal: 1;
  --z-tooltip: 10;
  --z-fixed: 100;
}

/*===== BASE =====*/
*,
::before,
::after {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: var(--header-height) 0 0 0;
  font-family: var(--body-font);
  font-size: var(--normal-font-size);
  color: var(--second-color);
}
h1,
h2,
p {
  margin: 0;
}
ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
a {
  text-decoration: none;
}
img.cover {
  width: 100%;
  height: 110%;
  display: block;
  border: none;
  border-radius: 25px;
  position: relative;
  right: 18rem;
  top: 5rem;
}

/*===== CLASS CSS ===== */
.section-title {
  position: relative;
  font-size: var(--h2-font-size);
  color: var(--first-color);
  margin-top: var(--mb-2);
  margin-bottom: var(--mb-4);
  text-align: center;
}
.section-title::after {
  position: absolute;
  content: "";
  width: 64px;
  height: 0.18rem;
  left: 0;
  right: 0;
  margin: auto;
  top: 2rem;
  background-color: var(--first-color);
}
.section {
  padding-top: 3rem;
  padding-bottom: 2rem;
}

/*===== LAYOUT =====*/
.bd-grid {
  max-width: 80%;
  display: grid;
  grid-template-columns: 100%;
  grid-column-gap: 2rem;
  width: calc(100% - 2rem);
  margin-left: var(--mb-2);
  margin-right: var(--mb-2);
}
.l-header {
  width: 100%;
  position: fixed;
  top: 0;
  left: 0;
  z-index: var(--z-fixed);
  background-color: #faf9f6;
  box-shadow: 0 1px 4px rgba(146, 161, 176, 0.15);
}

/*===== NAV =====*/
.nav {
  height: var(--header-height);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: var(--font-semi);
}
@media screen and (max-width: 768px) {
  .nav__menu {
    position: fixed;
    top: var(--header-height);
    right: -100%;
    width: 100%;
    height: max-content;
    padding: 2rem;
    background-color: var(--second-color);
    -webkit-transition: all 0.5s ease-in-out;
    text-align-last: center;
    font-size: x-large;
  }
}
.nav__item {
  margin-bottom: var(--mb-4);
}
.nav__link {
  position: relative;
  color: #fff;
}
.nav__link:hover {
  position: relative;
}
.nav__link:hover::after {
  position: absolute;
  content: "";
  width: 100%;
  height: 0.18rem;
  left: 0;
  top: 2rem;
  background-color: var(--first-color);
}
.nav__logo {
  color: var(--second-color);
  font-size: 1x-large;
}
.nav__toggle {
  color: var(--second-color);
  font-size: 3rem;
  cursor: pointer;
}

/*Active menu*/
.active::after {
  position: absolute;
  content: "";
  width: 100%;
  height: 0.18rem;
  left: 0;
  top: 2rem;
  background-color: var(--first-color);
}

/*=== Show menu ===*/
.show {
  right: 0;
}

/*===== HOME =====*/
.home {
  /* height: calc(100vh - 3rem); */
  row-gap: 1rem;
}
.home__data {
  align-self: center;
}
.home__title {
  font-size: var(--big-font-size);
  margin-bottom: var(--mb-5);
}
.home__title-color {
  color: var(--first-color);
}
.home__social {
  display: flex;
  flex-direction: column;
}
.home__social-icon {
  width: max-content;
  margin-bottom: var(--mb-2);
  font-size: 3rem;
  color: var(--second-color);
}
.home__social-icon:hover {
  color: var(--first-color);
}
.home__img {
  position: relative;
  right: 0;
  bottom: 0;
  width: 295px;
  float: right;
}
div.contact-btn {
  display: inline-block;
}
div.submit-icons {
  display: flex;
  justify-content: center;
  align-items: center;
}

div.title-icons {
  margin-top: 5rem;
}

/*BUTTONS*/
.button {
  display: inline-block;
  background-color: var(--first-color);
  color: #fff;
  padding: 0.75rem 2.5rem;
  font-weight: var(--font-semi);
  border-radius: 0.5rem;
}
.button:hover {
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.15);
}

/* ===== ABOUT =====*/
.about__container {
  row-gap: 2rem;
  text-align: center;
}
.about__subtitle {
  margin-bottom: var(--mb-2);
}
.about__img {
  justify-self: center;
}
.about__img img {
  width: 400px;
  border-radius: 0.5rem;
}

/* ===== SKILLS =====*/
.skills__container {
  /* row-gap: 2rem; */
  text-align: center;
}
.skills__subtitle {
  margin-bottom: var(--mb-2);
}
.skills__text {
  margin-bottom: var(--mb-4);
}
div.skills__data {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  font-weight: var(--font-semi);
  padding: 0.5rem 1rem;
  margin-bottom: var(--mb-4);
  border-radius: 0.5rem;
  box-shadow: 0 4px 25px rgba(14, 36, 49, 0.15);
  transition: all 200ms ease-in-out;
}
div.skills__data:hover{
  transform: scale(1.02);
}
.skills__icon {
  font-size: 2rem;
  margin-right: var(--mb-2);
  color: var(--first-color);
}
.skills__names {
  display: flex;
  align-items: center;
}
.skills__bar {
  position: absolute;
  left: 0;
  bottom: 0;
  background-color: var(--first-color);
  height: 0.25rem;
  border-radius: 0.5rem;
  z-index: var(--z-back);
}
.skills__html {
  width: 95%;
}
.skills__css {
  width: 85%;
}
.skills__js {
  width: 65%;
}
.skills__ux {
  width: 85%;
}
.skills__img {
  border-radius: 0.5rem;
}

/* ===== WORK =====*/

.description{
  text-align: left;
}

span {
  font-weight: bold;
}

div.solve-des.work__img {
  align-self: center;
}

div.grace-des.work__img{
  align-self: center;
}

img.solveit {
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 20px;
}
img.grace {
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 20px;
}

div.solve-container {
  max-width: 90vw;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-gap: 20px;
  border-radius: 20px;
  margin-bottom: 1rem;
  transition: all 200ms ease-in-out;
  box-shadow: 5px 5px 5px 5px #e1e0dd;
  padding: 1rem;
}

div.solve-container:hover {
  transform: scale(1.02);
}

div.grace-container {
  margin-left: 10%;
  margin-right: 20%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-gap: 20px;
}
a.button {
  margin-right: 20px;
}

/* ===== CONTACT =====*/
.contact__input {
  width: 100%;
  font-size: var(--normal-font-size);
  font-weight: var(--font-semi);
  padding: 1rem;
  border-radius: 0.5rem;
  border: 1.5px solid white;
  outline: none;
  margin-bottom: var(--mb-4);
}
.contact__button {
  display: block;
  border: none;
  outline: none;
  font-size: var(--normal-font-size);
  cursor: pointer;
  margin-left: auto;
}

/* ===== FOOTER =====*/
.footer {
  background-color: #faf9f6;
  color: #0e2431;
  text-align: center;
  font-weight: var(--font-semi);
  padding: 2rem 0;
}
.footer__title {
  font-size: 2rem;
  margin-bottom: var(--mb-4);
}
.footer__social {
  margin-bottom: var(--mb-4);
}
.footer__icon {
  font-size: 1.5rem;
  color: #faf9f6;
  margin: 0 var(--mb-2);
}

/* ===== MEDIA QUERIES=====*/
@media screen and (min-width: 768px) {
  body {
    margin: 0;
  }
  .section {
    /* padding-top: 2rem; */
    padding-bottom: 1rem;
    text-align: -webkit-center;
  }
  .section-title {
    margin-bottom: var(--mb-6);
  }
  .section-title::after {
    width: 80px;
    top: 3rem;
  }

  section#work.work.section{
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .nav {
    height: 4rem;
  }
  .nav__list {
    display: flex;
    padding-top: 0;
    margin-top: 1.5rem;
  }
  .nav__item {
    margin-left: var(--mb-6);

  }
  .nav__toggle {
    display: none;
  }
  .nav__link {
    color: var(--second-color);
  }

  .home {
    height: 50vh;
  }
  .home__data {
    /* display: flex; */
    text-align: center;
  }
  .home__social {
    padding: 2rem;
    flex-direction: row;
    /* align-self: auto; */
    display: inline-block;
  }
  .home__social-icon {
    margin-bottom: 0;
    margin-right: var(--mb-4);
  }
  .home__img {
    width: 500px;
    bottom: 25%;
  }
  /* h1.home__title {
    justify-content: center;
    align-items: center;
  }
  div.home__data {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  div.submit-icons {
    display: contents;
  } */

  .about__container,
  .skills__container {
    grid-template-columns: repeat(2, 1fr);
    align-items: center;
    text-align: initial;
  }
  .about__img img {
    width: 400px;
  }
  .work__container {
    /* grid-template-columns: repeat(3, 1fr); */
    grid-template-rows: repeat(2, 1fr);
    column-gap: 2rem;
  }
  .contact__form {
    width: 360px;
  }
  .contact__container {
    justify-items: center;
  }
}

/* @media screen and (min-width: 1024px) {
  .bd-grid {
    margin-left: 20%;
    margin-right: auto;
    margin-top: 0;
  }
  .home__img {
    right: 10%;
  }
} */

/* SCROLL BACK TO TOP BUTTON */

#myBtn {
  display: none; /* Hidden by default */
  position: fixed; /* Fixed/sticky position */
  bottom: 20px; /* Place the button at the bottom of the page */
  right: 30px; /* Place the button 30px from the right */
  z-index: 99; /* Make sure it does not overlap */
  border: none; /* Remove borders */
  outline: none; /* Remove outline */
  background-color: royalblue; /* Set a background color */
  color: white; /* Text color */
  cursor: pointer; /* Add a mouse pointer on hover */
  padding: 15px; /* Some padding */
  border-radius: 10px; /* Rounded corners */
  font-size: 18px; /* Increase font size */
}

#myBtn:hover {
  background-color: #555; /* Add a dark-grey background on hover */
}

/* ===== WORK =====*/

img.omd {
  object-fit: contain;
  width: 100%;
  height: 100%;
}
img.sombra {
  /* object-fit: cover; */
  width: 20rem;
  height: 20rem;
}
div.work__img.sombra {
  align-self: center;
}
/* div.work__img.grace {
  justify-self: center;
} */
div.work__img.solveit {
  align-self: center;
}

section#home.home.bd-grid {
  min-width: 100%;
}
section#about.about.section{
  padding-top: 0;
  margin-top: 10rem;
}

@media screen and (max-width: 768px) {
  .home__data {
    text-align-last: center;
  }
  div.submit-icons {
    flex-direction: column;
  }
  .home__title {
    margin-top: 4rem;
    margin-bottom: 1rem;
  }
  .home__social {
    margin-top: 1rem;
  }
  img.cover {
    opacity: 0;
  }
  .section {
    padding-top: 0;
  }
  p.about__text{
    padding-right:1rem;
    padding-left:1rem;
    font-size: medium;
    margin-bottom: 2rem;
  }
  .bd-grid {
    margin-right: 0;
    max-width: 100%;
  }
  a.button {
    margin-right: 0;
    margin-bottom: .5rem;
  }
  main.l-main{
    text-align: -webkit-center;
    width: 94.5%;
  }
  section#work.work.section{
    width: 107%;
  }
  img.sombra {
    height: auto;
    width: auto;
  }
  div.solve-container{
    display: flex;
    flex-direction: column;
    margin: 2rem;
    margin-top: 0;
    margin-bottom: 30px;
  }
  .section {
    padding-bottom: 0;
  }
  .about__img img {
    width: 21rem;
  }
  h2.section-title.aboutme{
    display: none;
  }
  .about__container{
    row-gap: 1rem;
  }
  .second-4-skills {
    margin-bottom: 1rem;
  }
  div.title-icons {
    margin-left: 0;
    /* margin-bottom: 4rem; */
  }
  section#about.about.section{
    margin-top: 0rem;
  }
  .div.about__img {
    margin-left: 13px;
  }
}
