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

/******************************
 * CSS VARIABLES
 ******************************/

/* Define custom properties on the :root pseudo-class, so that it can be applied globally across HTML document */
:root {
  --header-height: 3rem;
  --font-medium: 500;
}

/* Colours */
:root {
  --first-color: #922724;
  --second-color: #944b48;
  --third-color: #debebd;
  --white-color: #f7eded;
  --dark-color: #373737;
  --text-color: #6d6d6d;
}

/* Font */
:root {
  --body-font: 'Roboto', 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;
  }
}

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

/* Z Index */
:root {
  --z-fixed: 100;
}

/******************************
 * BASE
 ******************************/

/* Include the padding and border in an element's total width and height. */
*,
::before,
::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

/* Use the custom property value by specifying custom property name inside the var() function */
body {
  margin: 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,
h3,
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;
}

/******************************
 * CSS CLASSES
 ******************************/
.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: 40px;
  height: 0.18rem;
  left: 0;
  right: 0;
  margin: auto;
  top: 2rem;
  background-color: var(--first-color);
}

/******************************
 * LAYOUT
 ******************************/
.bd-grid {
  max-width: 1500px;
  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: rgb(146, 39, 36, 0.6);
  backdrop-filter: blur(2px);
}

/******************************
 * NAVBAR
 ******************************/
.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: calc(100vh - var(--header-height));
    padding: 2rem;
    background-color: rgba(247, 237, 237, 0.8);
    transition: 0.5s;
    backdrop-filter: blur(2px);
  }
}

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

.nav__link {
  position: relative;
  color: var(--dark-color);
}

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

.nav__link .resume {
  border: 1px solid;
  display: inline-block;
  padding: 0.4rem;
  border-radius: 4px;
}

.nav__link .resume:hover {
  background-color: rgb(146, 39, 36, 0.3);
}

.nav__logo {
  color: var(--white-color);
  display: flex;
  align-items: center;
}

.nav__logo img {
  width: 35px;
  height: auto;
}

.nav__name {
  margin-left: var(--mb-2);
}

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

/* Show Navbar 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: 100vh;
  row-gap: 5rem;
}

.home__title {
  align-self: flex-end;
  font-size: var(--big-font-size);
  color: var(--white-color);
  line-height: 0.8;
}

.home__title span {
  text-shadow: 0 20px 25px rgba(0, 0, 0, 0.5);
}

.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: 0;
  bottom: 0;
  width: 350px;
}

/******************************
 * ABOUT
 ******************************/
.about {
  background-color: var(--white-color);
}

.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: 105px;
}

.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);
}

.about__social-icon {
  font-size: 1.4rem;
  margin: 0 var(--mb-1);
}
.about__social-icon:hover {
  color: var(--first-color);
}

/******************************
 * SKILLS
 ******************************/
.skills__container {
  row-gap: 2rem;
  justify-items: center;
}

.skills__subtitle {
  color: var(--first-color);
  margin-bottom: var(--mb-3);
}

.skills__name {
  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: var(--white-color);
  border-radius: 0.25rem;
}

.skills__name:hover {
  background-color: var(--first-color);
  color: var(--white-color);
}

.skills__img img {
  border-radius: 0.5rem;
  width: 250px;
}

/******************************
 * PROJECTS
 ******************************/
.projects {
  background-color: var(--white-color);
}

.projects__container {
  justify-items: center;
  row-gap: 2rem;
}

.project__img {
  position: relative;
  overflow: hidden;
}

.project__img img {
  border-radius: 0.5rem;
}

.project__link {
  position: absolute;
  bottom: -100%;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: rgba(255, 255, 255, 0.4);
  border-radius: 0.5rem;
  cursor: pointer;
  backdrop-filter: blur(10px);
  transition: 0.4s;
}

.project__img:hover .project__link {
  bottom: 0;
}
.project__link-name {
  color: var(--dark-color);
  display: flex;
  flex-direction: column;
  align-items: center;
}

/******************************
 * CONTACT
 ******************************/
.contact__container {
  row-gap: 2rem;
}

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

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

.contact__text {
  display: inline-block;
}

.contact__info {
  display: flex;
  align-items: center;
  margin-bottom: var(--mb-2);
}

.contact__social {
  display: flex;
  justify-content: center;
  font-size: 2.5rem;
  width: 50px;
  margin-right: var(--mb-3);
}

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

/******************************
 * FOOTER
 ******************************/
.footer {
  background-color: var(--dark-color);
}

.footer__container {
  row-gap: 2rem;
  justify-items: center;
}

.footer__title {
  font-size: var(--normal-font-size);
  /* color: var(--white-color); */
}

.footer__social {
  font-size: 1.4rem;
  margin-right: var(--mb-1);
}

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

/******************************
 * MEDIA QUERIES
 ******************************/
/* For small devices */
@media screen and (max-width: 320px) {
  .home__img {
    width: 230px;
  }
}

/* For medium devices */
@media screen and (min-width: 768px) {
  body {
    margin: 0;
  }

  /* Sections */
  .section {
    padding-top: 4rem;
  }

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

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

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

  .nav__list {
    display: flex;
    align-items: center;
  }

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

  .nav__toggle {
    display: none;
  }

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

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

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

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

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

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

  /* Home */
  .home__container {
    height: 100vh;
  }

  .home__img {
    width: 375px;
  }

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

  .about__img {
    width: 300px;
    height: 300px;
  }

  .about__img img {
    width: 280px;
  }

  /* Skills */
  .skills__container {
    grid-template-columns: repeat(2, 1fr);
    align-items: center;
  }

  /* Projects */
  .projects__container {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(3, 1fr);
    column-gap: 2rem;
  }

  /* Contact */
  .contact__container {
    /* grid-template-columns: repeat(2, 1fr); */
    /* justify-items: center; */
    max-width: 37rem;
  }
}

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

  /* Home */
  .home__container {
    grid-template-rows: 1.7fr 1fr;
    row-gap: 0;
  }

  .home__img {
    width: 450px;
  }

  /* Projects */
  .projects__container {
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 1fr);
    column-gap: 2rem;
  }
}

@media screen and (min-width: 1200px) {
  .home__img {
    width: 600px;
    right: 8%;
  }
}
