@import url("https://fonts.googleapis.com/css2?family=Comfortaa:wght@300..700&family=Montserrat+Alternates:wght@400;500&display=swap");

/* ++++++++++ VARIABLES CSS +++++++++++ */
:root {
  --header-height: 3.5rem;

  /* ======= Colors ======*/
  --white-color: hsl(0, 0%, 100%);
  --black-color: hsl(0, 0%, 0%);
  --transparent-color: hsla(0, 0%, 0%, 0.502);
  --light-grey: rgb(207, 201, 201);
  --project-btn-color: rgba(30, 70, 30, 0.783);
  --project-btn-dot-color: lightgreen;
  /* background images */
  --mobile-version: "./images/mobile-background.jpeg";
  --laptop-version: "./images/laptop-background.jpeg";

  /* ========== Font And Typography ========= */
  /* .5rem = 8px && 1rem = 16px */
  --body-font: "Montserrat Alternates", sans-serif;
  --h1-font-size: 1.5rem;
  --normal-font-size: 0.938rem;
  --large-font-size: 1rem;
  --mobile-largest-font-size: 1.8rem;
  --Laptop-largest-font-size: 3.5rem;

  /* ====Font Weight */
  --font-regular: 400;
  --font-medium: 500;

  /* ========== Z index ========*/
  --z-tooltip: 10;
  --z-fixed: 100;

  /* +++++++++ Spacing and Padding */
  --section-padding: 20px;
  --laptop-section-padding: 40px;
  --laptop-section-padding-sides: 150px;
  --btn-padding: 12px;
}

/* CSS RESET */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--body-font);
  font-size: var(--normal-font-size);
  background: url("./images/mobile-background.jpeg");
  color: var(--white-color);
}

/* Utitlities */

.red {
  background-color: red;
}

.green {
  background-color: var(--project-btn-dot-color);
}

ul {
  list-style: none;
}

a {
  text-decoration: none;
}

/* Responsive typography */
@media screen and (min-width: 1150px) {
  :root {
    --normal-font-size: 1rem;
  }
}

/* UTILITIES */
.container {
  max-width: 1120px;
  margin-inline: 1.5rem;
}

.center {
  text-align: center;
}

/* ************** HEADER AND NAV ***************** */
.header {
  position: fixed;
  width: 100%;
  top: 0;
  left: 0;
  background: var(--transparent-color);
  backdrop-filter: blur(5px);
  z-index: var(--z-fixed);
}

.nav {
  position: relative;
  height: var(--header-height);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

.nav__close,
.nav__toggle {
  display: flex;
  color: var(--white-color);
  font-size: 1.5rem;
  cursor: pointer;
}
/* Navigation for mobile devices */
@media screen and (max-width: 1150px) {
  .nav__menu {
    position: fixed;
    left: -100%;
    top: 0;
    background-color: var(--black-color);
    width: 100%;
    height: 100vh;
    padding: 6rem 3.5rem 4.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: left 0.4s;
  }

  .nav__item {
    transform: translateX(-150px);
    visibility: hidden;
    transition: transform 0.4s ease-out, visibility 0.4s;
  }

  .nav__item:nth-child(1) {
    transition-delay: 0.1s;
  }

  .nav__item:nth-child(2) {
    transition-delay: 0.2s;
  }

  .nav__item:nth-child(3) {
    transition-delay: 0.3s;
  }

  .nav__item:nth-child(4) {
    transition-delay: 0.4s;
  }

  .nav__item:nth-child(5) {
    transition-delay: 0.5s;
  }
}

.nav__list,
.nav__social {
  display: flex;
}

.nav__list {
  flex-direction: column;
  row-gap: 3rem;
}

.nav__link {
  position: relative;
  color: var(--white-color);
  font-size: var(--h1-font-size);
  font-weight: var(--font-medium);
  display: inline-flex;
  align-items: center;
  transition: opacity 0.4s;
}

.nav__link i {
  font-size: 2rem;
  position: absolute;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s, visibility 0.4s;
}

.nav__link span {
  position: relative;
  transition: margin 0.4s;
}

.nav__link span::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 100%;
  height: 2px;
  background-color: var(--white-color);
  transition: width 0.4s ease-out;
}

/* Animation link on hover */
.nav__link:hover span {
  margin-left: 2.5rem;
}

.nav__link:hover i {
  opacity: 1;
  visibility: visible;
}

.nav__link:hover span::after {
  width: 100%;
}
/* Sibling fade animation */
.nav__list:has(.nav__link:hover) .nav__link:not(:hover) {
  opacity: 0.4;
}

.nav__close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
}

.nav__social {
  column-gap: 1rem;
}

.nav__social-link {
  color: var(--white-color);
  font-size: 1.5rem;
  transition: transform 0.4s;
}

.nav__social-link:hover {
  transform: translateY(-0.25rem);
}

/* Show menu */
.show-menu {
  left: 0;
}
/* Animation link when showing the menu */

.show-menu .nav__item {
  visibility: visible;
  transform: translateX(0);
}
/* ++++++++++++ BREAKPOINTS +++++++++++ */
/* Navigation For large devices */

@media screen and (min-width: 1150px) {
  .container {
    margin-inline: auto;
  }

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

  .nav__toggle,
  .nav__close {
    display: none;
  }

  .nav__link {
    font-size: var(--normal-font-size);
  }

  .nav__link i {
    font-size: 1.5rem;
  }

  .nav__list {
    flex-direction: row;
    column-gap: 3.5rem;
  }

  .nav__menu {
    display: flex;
    align-items: center;
    column-gap: 3.5rem;
  }
}

/* ====================== MAIN ============================= */
/* ----------HERO---------- */

.hero {
  height: 90vh;
  margin-top: 50px;
  padding: var(--section-padding);
}

.hero__div-one {
  margin: 20px 0px 20px;
}

.hero__greeting {
  margin-top: 100px;
}

.hero__name,
.hero__catchphrase {
  font-size: var(--mobile-largest-font-size);
  line-height: 2.9rem;
}

.hero__catchphrase {
  color: var(--light-grey);
}

.hero__div-two {
  margin-top: 50px;
}

.hero__div-two p {
  font-size: var(--large-font-size);
  font-family: "Comfortaa", sans-serif;
  font-size: 20px;
  line-height: 30px;
  color: var(--light-grey);
}

.hero__div-three {
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  height: 50px;
  margin: 20px;
}

.hero__btn {
  height: 100%;
  margin-top: 50px;
  padding: var(--btn-padding);
  border-radius: 30px;
  font-size: var(--font-regular);
  border: 2px solid;
  display: block;
}

/* hover state */
#firstbtn:hover,
#firstbtn:focus {
  background-color: black;
  color: white;
  border: 3px solid white;
}

/* ------ */
.hero__btn:first-of-type {
  background-color: white;
  color: black;
  position: relative;
  overflow: hidden;
  box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.616);
}

#firstbtn::before {
  content: "";
  position: absolute;
  width: 0px;
  height: 0px;
  background-color: black;
  left: var(--x-pos);
  top: var(--y-pos);
  transform: translate(-50%, -50%);
  border-radius: 50%;
  transition: width 0.5s, height 0.5s;
}

#firstbtn:hover::before {
  width: 300px;
  height: 300px;
}

#firstbtn span {
  position: relative;
  z-index: 1;
}

.hero__btn:nth-of-type(2) {
  background-color: black;
  color: white;
}

/* ------About me-------- */

.aboutme {
  padding: var(--section-padding);
}

.aboutme h2 {
  margin: 100px 0;
}

.aboutme__img-container {
  margin: 20px auto;
  width: 210px;
}

.aboutme__img-container img {
  height: 200px;
  width: 200px;
  border-radius: 50%;
}

.aboutme__article {
  margin: 10px;
}

.technologies {
  width: 100%;
  height: 100px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: repeat(3, 1fr);
  padding: var(--btn-padding);
  margin: 20px auto;
}

/* --------Projects--------- */
.projects {
  padding: var(--section-padding);
}

.projects-intro {
  margin-top: 3rem;
}

.project {
  width: 80%;
  height: 350px;
  margin: 20px auto;
}

.project img {
  width: 100%;
  height: 60%;
  border-radius: 20px;
  display: block;
}

.project h5 {
  margin-top: 20px;
}

.project__btn-container {
  margin-top: 10px;
  display: flex;
  justify-content: space-evenly;
  height: 30px;
}

.project__btn-container button {
  padding: 5px;
  border-radius: 10px;
  width: 50px;
  display: flex;
  background-color: var(--project-btn-color);
  justify-content: space-between;
  align-items: center;
  border: none;
}

.project__btn-container a {
  color: white;
}

.project__btn-container button span {
  color: white;
}

.dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
}
/* --------Footer-------- */

footer {
  padding: var(--section-padding);
  margin-top: 50px;
}

/* ++++++++++ MAIN BREAKPOINTS +++++++++ */
/* For large devices */
@media screen and (min-width: 1150px) {
  body {
    /*  background: url(./images/laptop-background.jpeg); 
    background-repeat: cover;*/
    background-color: var(--black-color);
    color: var(--white-color);
  }

  .hero {
    height: 100vh;
    margin-top: 0px;
  }

  .hero__greeting {
    margin-top: 100px;
  }

  .hero__name,
  .hero__catchphrase {
    font-size: var(--Laptop-largest-font-size);
    line-height: 4rem;
  }

  .hero__div-one {
    width: 80%;
    margin: 0px auto 40px;
  }

  .hero__div-two {
    width: 80%;
    margin: 70px auto 0;
    height: 30%;
  }

  .hero__div-two p {
    font-size: var(--mobile-largest-font-size);
  }

  .hero__div-three {
    margin: 30px 0;
    justify-content: flex-start;
  }

  .hero__btn {
    width: 200px;
  }

  .hero__btn:nth-of-type(2) {
    margin-left: 50px;
  }

  .aboutme {
    padding: var(--laptop-section-padding) var(--laptop-section-padding-sides);
    height: 120vh;
  }

  .aboutme {
    height: 100vh;
  }

  .aboutme h2 {
    margin-bottom: 50px;
  }

  .aboutme-wrapper {
    display: flex;
    flex-direction: row-reverse;
    justify-items: space-between;
    height: 70vh;
  }

  .aboutme__article-container {
    width: 60%;
  }

  .aboutme__img-container {
    width: 30%;
  }

  .aboutme__img-container img {
    width: 350px;
    height: 450px;
    border-radius: 10px;
  }

  .projects {
    height: 140vh;
    padding: var(--laptop-section-padding) var(--laptop-section-padding-sides);
  }

  .projects-intro {
    margin-top: 5.5rem;
    margin-bottom: 2.5rem;
  }

  .projects-intro h3,
  .projects-intro p {
    margin-bottom: 15px;
  }

  .project-container {
    height: 100vh;
    display: grid;
    grid-template-columns: repeat(3, 1.2fr);
    grid-template-rows: 1fr 1fr;
  }
}
