@import "./reset.css";
@import url("https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&family=Poppins:wght@400;700&display=swap");

/* 
font-family: "Poppins", sans-serif;
font-family: "DM Sans", sans-serif;
*/

:root {
  --blackpure: #000;
  --black: #171718;
  --black-border: #26292d;
  --white: #fff;
  --purple: #5c62ec;
  --gray-shadow: rgba(0, 0, 0, 0.25);

  --text-color: var(--black);
  --dark-bg: var(--black);
  --dark-border: var(--black-border);
  --header-text: var(--white);
  --accent: var(--purple);

  /* Light mode */
  --page-bg: var(--white);
  --text-color: var(--black);

  --project-card-bg: var(--white);
  --project-card-text: var(--black);

  --box-shadow: 0px 5px 35px 0px rgba(0, 0, 0, 0.25);
  --box-shadow-btn-githb-repo: none;
}

body.dark {
  /* Dark mode */
  --page-bg: #323233;
  --text-color: var(--white);

  --project-card-bg: var(--black);
  --project-card-text: var(--white);

  --box-shadow: 0px 5px 35px 0px rgba(82, 82, 82, 0.8);
  --box-shadow-btn-githb-repo: 0px 5px 35px 0px rgba(80, 80, 80, 0.8);
}

html,
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;

  font-family: "DM Sans", sans-serif;
  letter-spacing: -0.15px;

  /* Light mode  */
  background-color: var(--page-bg);
  color: var(--text-color);
}
main {
  flex-grow: 1;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

.none {
  display: none !important;
}

/* Nav */
nav {
  padding: 20px 0;
  border-bottom: 1px solid var(--dark-border);
  background: var(--dark-bg);
  color: var(--header-text);

  letter-spacing: normal;
}
.nav-row {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  column-gap: 40px;
  row-gap: 20px;
  flex-wrap: wrap;
}
.logo {
  margin-right: auto;
  color: var(--header-text);
  font-size: 24px;
  font-weight: 500;
  font-family: "Poppins", sans-serif;
}

.nav-list {
  display: flex;
  flex-wrap: wrap;
  row-gap: 10px;

  align-items: center;
  column-gap: 40px;
  font-size: 16px;
  font-weight: 500;
  font-family: "Poppins", sans-serif;
}
.nav-list__link {
  color: var(--header-text);
  transition: opacity 0.2s ease-in;
}
.nav-list__link:hover {
  opacity: 0.8;
}
.nav-list__link--active {
  position: relative;
}

.nav-list__link--active::before {
  content: "";

  position: absolute;
  left: 0;
  top: 100%;

  display: block;
  height: 2px;
  width: 100%;
  background-color: var(--accent);
}

/* Dark mode btn */

.dark-mode-btn {
  order: 1;
  position: relative;
  display: flex;
  justify-content: space-between;
  border-radius: 50px;
  height: 26px;
  width: 51px;
  padding: 5px;

  background: #323233;
}

.dark-mode-btn::before {
  content: "";

  position: absolute;
  top: 1px;
  left: 1px;

  display: block;
  height: 24px;
  width: 24px;
  border-radius: 50%;
  background-color: #fff;

  transition: left 0.2s ease-in;
}
.dark-mode-btn--active::before {
  left: 26px;
}

.dark-mode-btn__icon {
  z-index: 9;
}

/*  Header */
.haeder {
  display: flex;
  justify-content: center;
  align-items: center;

  padding: 40px 0;
  min-height: 695px;

  background-color: var(--dark-bg);
  background-image: url("../img/header-bg.png");
  background-repeat: no-repeat;
  background-size: auto;
  background-position: center center;

  color: var(--header-text);
  text-align: center;
}
.header__wrapper {
  max-width: 630px;
  padding: 0 15px;
}
.header__title {
  margin-bottom: 20px;
  font-size: 40px;
  font-weight: 700;
  line-height: 1.5;
}
.header__title strong {
  font-size: 60px;
  font-weight: 700;
}
.header__title em {
  font-style: normal;
  color: var(--accent);
}
.header__text {
  margin-bottom: 40px;
  font-size: 18px;
  line-height: 1.3333;
}
.header__text p + p {
  margin-top: 0.5em;
}

/* Button */
.btn {
  display: inline-block;
  height: 48px;
  padding: 12px 28px;

  border-radius: 5px;
  background-color: var(--accent);
  color: var(--white);
  letter-spacing: 0.15px;
  font-size: 16px;
  font-weight: 500;

  transition: opacity 0.2s ease-in;
}
.btn:hover {
  opacity: 0.8;
}
.btn:active {
  position: relative;
  top: 1px;
}

/* General */
.section {
  padding: 70px 0;
}

.title-1 {
  margin-bottom: 40px;

  font-size: 60px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.5px;
  text-align: center;
  color: var(--accent);
}

/* Projects */

.projects__list {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  column-gap: 30px;
  row-gap: 30px;
}

.projects__item {
  min-width: 370px;
  background-color: var(--project-card-bg);
  border-radius: 10px;

  box-shadow: var(--box-shadow);
}

.projects__img {
  border-radius: 10px;
}

.projects__title {
  padding: 15px 20px 25px;

  color: var(--project-card-text);

  font-size: 24px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.5px;
  text-align: left;
}

/* Project-details */
.project-details {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;

  margin: 0 auto;
  max-width: 865px;
}

.project-details__img {
  max-width: 100%;
  margin-bottom: 40px;

  border-radius: 10px;
  box-shadow: 0px 5px 35px 0px var(--gray-shadow);
}
.project-details__description {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.5px;
}
.project-details__description p {
  margin-bottom: 30px;
}
.btn-outline {
  display: inline-flex;
  column-gap: 10px;
  align-items: center;
  background-color: #fff;

  padding: 12px 20px;

  border: 1px solid var(--blackpure);
  border-radius: 5px;
  color: var(--blackpure);
  box-shadow: var(--box-shadow-btn-githb-repo);

  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.15px;

  transition: opacity 0.2s ease-in;
}
.btn-outline:hover {
  opacity: 0.8;
}
.btn-outline:active {
  position: relative;
  top: 1px;
}
.project-details__icon {
  width: 24px;
}

/* Content list */
.title-2 {
  margin-bottom: 20px;
  color: var(--text-color);

  font-size: 40px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.5px;
}

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

.content-list a {
  color: var(--accent);
}

.content-list__item {
  color: var(--text-color);
}
.content-list__item:not(:last-child) {
  margin-bottom: 40px;
}
.content-list__item p {
  margin: 0 auto;
  max-width: 570px;

  font-family: DM Sans;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: -0.5px;
}

/* Footer */
.footer {
  background-color: var(--dark-bg);
  padding-top: 60px;
  padding-bottom: 50px;
  color: var(--header-text);
}
.footer__wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  row-gap: 27px;
}

.social__list {
  display: flex;
  align-items: center;
  column-gap: 30px;
}

.copyright {
  font-size: 16px;
  line-height: 1.3;
}

.copyright p + p {
  margin-top: 0.5em;
}

/* Adaptation size*/

@media (max-width: 620px) {
  /* Header */

  .haeder {
    min-height: unset;
  }
  .header__title {
    font-size: 30px;
  }
  .header__title strong {
    font-size: 40px;
  }

  /* General */

  .section {
    padding: 40px 0;
  }
  .title-1 {
    font-size: 40px;
    margin-bottom: 30px;
  }
  .title-2 {
    margin-bottom: 10px;
    font-size: 30px;
  }

  /* Projects */

  .projects__title {
    font-size: 22px;
  }

  /*  Project (singal) page*/

  .project-details__description {
    font-size: 22px;
  }
  .project-details__description p {
    margin-bottom: 20px;
  }

  /* Content list */

  .content-list__item:not(:last-child) {
    margin-bottom: 20px;
  }
  .content-list__item p {
    font-size: 16px;
  }

  /* Footer */

  .footer {
    padding-top: 40px;
    padding-bottom: 30px;
  }
  .footer__wrapper {
    row-gap: 20px;
  }
  .social__list {
    column-gap: 20px;
  }
  .social__item {
    width: 28px;
  }
  .copyright {
    font-size: 14px;
  }
}

@media (max-width: 522px) {
  /* Nav */

  .nav-row {
    justify-content: space-between;
  }
  .dark-mode-btn {
    order: 0;
  }
}
