/*===== GOOGLE FONTS =====*/
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@500;600;700&display=swap');

html,
body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

/*===== VARIABLES CSS =====*/
:root {
  --header-height: 3rem;
  --font-medium: 500;
}

/*===== Colores =====*/
:root {
  --first-color: #030303;
  --white-color: #fafaff;
  --dark-color: #2a3b47;
  --text-color: #697477;
  --primary-color: #000000;
  --secondary-black: #0d081a;
  --secondary-gray: #48464b;
  /* --body-bg: #efebfa; */
  --body-bg: #f1f1f1;
}

/*===== Fuente y tipografia =====*/
:root {
  --body-font: 'Montserrat', sans-serif;
  --big-font-size: 5rem;
  --h2-font-size: 1.25rem;
  --normal-font-size: 0.938rem;
  --small-font-size: 0.813rem;
}

@media screen and (min-width: 768px) {
  :root {
    --big-font-size: 10.5rem;
    --h2-font-size: 2rem;
    --normal-font-size: 1rem;
    --small-font-size: 0.875rem;
  }
}

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

/*===== z index =====*/
:root {
  --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);
  font-weight: var(--font-medium);
  color: var(--text-color);
  line-height: 1.6;
}

h1,
h2,
p {
  margin: 0;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

a {
  text-decoration: none;
  color: var(--text-color);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}
/* certificate */

/*===== CLASS CSS ===== */
.section {
  padding: 3rem 0;
}

.section-title {
  position: relative;
  font-size: var(--h2-font-size);
  color: var(--dark-color);
  margin: var(--mb-4) 0;
  text-align: center;
}

.section-title::after {
  position: absolute;
  content: '';
  width: 32px;
  height: 0.18rem;
  left: 0;
  right: 0;
  margin: auto;
  top: 2rem;
  background-color: var(--first-color);
}

.resume {
  font-size: 25px;
}

.social-title {
  position: relative;
  font-size: 35px;
  color: var(--dark-color);
  margin-bottom: auto;
  text-align: center;
}

.social-title::after {
  position: absolute;
  content: '';
  width: 130px;
  height: 0.18rem;
  left: 0;
  right: 0;
  margin: auto;
  top: 3rem;
  background-color: var(--first-color);
}

.social-title :hover {
  color: black;
}

/*===== LAYOUT =====*/
.bd-grid {
  max-width: 1024px;
  display: grid;
  grid-template-columns: 100%;
  grid-column-gap: 2rem;
  width: calc(100% - 2rem);
  margin-left: var(--mb-2);
  margin-right: var(--mb-3);
}

.l-header {
  width: 100%;
  position: fixed;
  top: 0;
  left: 0;
  z-index: var(--z-fixed);
  background-color: var(--first-color);
}

/*===== NAV =====*/
.nav {
  height: var(--header-height);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

@media screen and (max-width: 768px) {
  .nav__menu {
    position: fixed;
    top: var(--header-height);
    right: -100%;
    width: 80%;
    height: 100%;
    padding: 2rem;
    background-color: rgba(8, 8, 8, 0.712);
    transition: 0.5s;
    backdrop-filter: blur(10px);
  }
}

.nav__item {
  margin-bottom: var(--mb-4);
}

.nav__link {
  position: relative;
  color: white;
  font-size: large;
}

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

.nav__logo {
  color: var(--white-color);
}

.nav__toggle {
  color: var(--white-color);
  font-size: 1.5rem;
  cursor: pointer;
}

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

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

/*===== HOME =====*/
.home {
  position: relative;
  background-color: var(--first-color);
  overflow: hidden;
}

.home__container {
  height: calc(100vh - var(--header-height));
  row-gap: 5rem;
}

.home__title {
  align-self: flex-end;

  font-size: 5em;
  color: var(--white-color);
  line-height: 0.8;
}

.home__scroll {
  align-self: flex-end;
  padding-bottom: var(--mb-4);
}

.home__scroll-link {
  writing-mode: vertical-lr;
  transform: rotate(-180deg);
  color: var(--white-color);
}

.home__img {
  position: absolute;
  right: 5%;
  bottom: 0;
  width: 220px;
}

/* ===== ABOUT =====*/
.about__container {
  justify-items: center;
  row-gap: 2rem;
  text-align: center;
}

.about__img {
  display: flex;
  justify-content: center;
  padding-top: 1rem;
  width: 120px;
  height: 120px;
  background-color: var(--first-color);
  border-radius: 50%;
  overflow: hidden;
}

.about__img img {
  width: 100px;
}

.about__subtitle {
  font-size: var(--h2-font-size);
  color: var(--first-color);
  margin-bottom: var(--mb-1);
}

.about__text {
  margin-bottom: var(--mb-4);
}

.about__profession {
  display: block;
  margin-bottom: var(--mb-4);
}

/* ===== SKILLS =====*/

.skills__name {
  color: black;
  display: inline-block;
  font-size: var(--small-font-size);
  margin-right: var(--mb-2);
  margin-bottom: var(--mb-3);
  padding: 0.25rem 0.5rem;
  background-color: rgba(151, 146, 146, 0.3);
  border-radius: 0.25rem;
}

/* ===== PORTFOLIO =====*/
.portfolio__container {
  justify-items: center;
  row-gap: 1rem;
}

.ram {
  /* max-width: 1024px; */
  display: grid;
  grid-template-columns: 100%;
  grid-column-gap: 2rem;
  width: auto;
  margin-left: 1rem;
  margin-right: 1rem;
}

.container {
  width: 100%;
  margin: 0 auto;
  max-width: 1000000px;
}

.section-heading {
  font-size: clamp(2rem, 5vw, 4rem);
  text-transform: uppercase;
  font-family: 'Montserrat';
  letter-spacing: 0.2rem;
  text-align: center;
  position: relative;
  margin-bottom: 2rem;
}

.buttons {
  margin-top: 3rem;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 2rem;
}

.primary-btn {
  display: inline-block;
  background-color: var(--primary-color);
  color: white;
  font-size: 0.8rem;
  padding: 0.6em 1.6em;
  border-radius: 50px;
}

.buttons .primary-btn.outline {
  background-color: transparent;
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
}

.buttons svg {
  width: 50px;
  color: var(--primary-color);
}

#projects {
  padding: 4rem 0;
  background-color: var(--body-bg);
}

#projects .item {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 800px;
  margin: 0 auto;
  margin-bottom: 10rem;
  /* gap: 2rem; */
}

#projects .item:nth-of-type(even) {
  flex-direction: row-reverse;
}

#projects .item .left {
  flex: 1;
}

#projects .item .right {
  margin-left: -150px;
  flex: 1;
  width: 400px;
  background-color: var(--body-bg);
  padding: 1rem 1rem;
  border-radius: 12px;
  box-shadow: 0px 0px 20px #00000028;
  z-index: 2;
}

#projects .item:nth-of-type(even) .right {
  margin-left: 0;
}

#projects .item:nth-of-type(even) .left {
  margin-left: -150px;
}

#projects .item .left .img {
  height: 100%;
  overflow: hidden;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0px 0px 20px #4705fc33;
  position: relative;
}

#projects .item .left .img::after {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 100%;
  /* background-color: #5a24ed38; */
}

#projects .item .left .img img {
  object-fit: cover;
  transition: 0.3s ease transform;
}

#projects .item:hover .left .img img {
  transform: scale(1.1);
  z-index: 1;
}

#projects .item .right .project-title {
  font-size: 1.6rem;
  font-family: 'Montserrat';
  margin-bottom: 1rem;
  color: black;
}

#projects .item .right .project-sub-title {
  font-size: 1rem;
  margin-bottom: 2rem;
}

#projects .item .right .project-desc {
  color: var(--secondary-gray);
  margin-bottom: 3rem;
}

#projects .item .right .external-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: calc(0.6em - 4px) calc(1.6em - 4px);
}

#projects .item .right .external-link svg {
  width: 25px;
}

@media only screen and (max-width: 768px) {
  #projects .item {
    flex-direction: column;
  }

  #projects .item .left {
    width: 100%;
  }

  #projects .item .right {
    margin-left: 0;
    width: 90%;
    margin-top: -150px;
  }

  #projects .item:nth-of-type(even) {
    flex-direction: column;
  }

  #projects .item:nth-of-type(even) .left {
    margin-left: 0;
  }
}

@media only screen and (max-width: 450px) {
  #projects .item .right .buttons {
    flex-direction: column;
  }

  #projects .item .right .buttons a {
    width: 100%;
    text-align: center;
  }
}

/* codepen */
.codepen__container {
  row-gap: 2rem;
}
/* ===== CONTACT =====*/
.contact {
  background-color: var(--body-bg);
  padding: 4em 0;
}

.contact__container {
  max-width: 1200px;
  margin: 0 auto;
  width: 90%;
  text-align: center;
}

.contact__subtitle {
  font-size: 1.2em;
  color: var(--first-color);
}

.contact__text {
  display: inline-block;
  margin-bottom: var(--mb-2);
  font-size: 1.2em;
  color: var(--first-color);
}
.contact__text:hover {
  color: rgb(97, 0, 187);
}

.contact__inputs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  column-gap: 1rem;
}

.contact__input {
  width: 100%;
  padding: 0.8rem;
  outline: none;
  border: 1.5px solid var(--dark-color);
  font-size: var(--normal-font-size);
  margin-bottom: var(--mb-4);
  border-radius: 0.5rem;
}

.contact__button {
  display: block;
  background-color: var(--first-color);
  color: var(--white-color);
  padding: 0.75rem 2.5rem;
  margin-left: auto;
  border-radius: 0.5rem;
  border: none;
  outline: none;
  font-size: var(--normal-font-size);
  cursor: pointer;
}

/* ===== FOOTER=====*/
.footer {
  padding: 20px;
  background-color: var(--first-color);
}
.footer__container {
  grid-template-columns: repeat(1, 1fr);
  justify-items: center;
}
.footer__title {
  font-size: 1.4rem;
  color: var(--white-color);
  margin-bottom: var(--mb-2);
}
.footer__link {
  padding: 0.25rem 0;
}
.footer__link:hover {
  color: var(--first-color);
}
.footer__social {
  font-size: 2rem;
  margin-right: var(--mb-2);
}
.footer__social:hover {
  color: white;
}

/* ===== MEDIA QUERIES =====*/
@media screen and (min-width: 768px) {
  body {
    margin: 0;
  }

  .section {
    padding-top: 4rem;
  }
  .section {
    padding-top: 4rem;
  }

  .section-title {
    margin-bottom: 3rem;
  }

  .section-title::after {
    width: 64px;
    top: 3rem;
  }

  .social-title {
    margin-bottom: 3rem;
  }

  .social-title :hover {
    color: black;
  }

  .social-title::after {
    width: 110px;
    top: 3rem;
  }

  .nav {
    height: calc(var(--header-height) + 1rem);
  }

  .nav__list {
    display: flex;
  }

  .nav__item {
    margin-left: var(--mb-4);
    margin-bottom: 0;
  }

  .nav__toggle {
    display: none;
  }

  .nav__link {
    color: var(--white-color);
  }

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

  .active::after {
    background-color: var(--white-color);
  }

  .home__container {
    height: 100vh;
    grid-template-rows: 1.7fr 1fr;
    row-gap: 0;
  }

  .home__img {
    width: 525px;
    right: 10%;
  }

  .home__title {
    align-self: center;

    font-size: 7em;
    padding-top: 2em;
  }

  .about__container {
    grid-template-columns: repeat(2, 1fr);
    align-items: center;
    text-align: initial;
    padding-top: 4rem 0;
  }

  .about__img {
    width: auto;
    height: auto;
    border-radius: 10%;
  }

  .about__img img {
    width: 85%;
  }

  #projects .item .left .img {
    height: 500px;
    width: 500px;
  }

  .skills__container {
    grid-template-columns: repeat(1, 1fr);
    align-items: center;
  }
  .codepen__container {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(1, 1fr);
    column-gap: 5rem;
  }
  .contact__container {
    grid-template-columns: repeat(1, 1fr);
  }
  .contact__text {
    font-size: 1.5em;
  }
  .contact__subtitle {
    font-size: 1.5em;
    padding: 0 4em;
  }

  .ram {
    margin-left: 10rem;
    margin-right: 10rem;
  }
  .contact__form {
    width: 380px;
    max-width: 500px;
    margin: auto;

    padding: 10px;
  }
}

@media screen and (min-width: 1024px) {
  .bd-grid {
    margin-left: auto;
    margin-right: auto;
  }
}

@media only screen and (min-width: 1500px) {
  /* For portrait layouts only */
  .portfolio__container {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    column-gap: 2rem;
  }
}

/* (1280x720) Galaxy Note 2, WXGA */
@media only screen and (min-device-width: 720px) and (max-device-width: 1280px) {
  /* insert styles here */
  .home__title {
    font-size: 5.5em;

    padding-right: 30%;
    padding-left: 10px;
  }

  .home__img {
    height: 500px;
    width: fit-content;
    right: 10%;
  }
  .contact {
    padding: 3em 0;
  }
}

/* All phones */
@media only screen and (max-width: 600px) {
  .home__title {
    font-size: 3.5em;
  }
}
