@import "./reset.css";

/* импорт с гугл фонтс: */
@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;700&family=Poppins:wght@400;500;700&display=swap");

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

/* граница-помощник, чтобы видеть контейнеры, потом удалить: */
/* * { */
/* border: 1px solid red; */
/* } */

:root {
  /*Создаем переменные css:*/
  --black: #171718;
  --black-border: #26292d;
  --white: #fff;
  --purple: #5f9ea0;
  --red: #e32636;

  /*Присваиваем переменные, здесь dark-bg=black=#171718*/
  --text-color: var(--black);
  --dark-bg: var(--black);
  --dark-border: var(--black-border);
  --header-text: var(--white);
  --accent: var(--purple);
  --attention: var(--red);

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

  --project-card-bg: var(--white);
  --project-card-text: var(--black);
  --box-shadow: 0px 5px 35px 0px rgba(0, 0, 0, 0.25);
}

.dark {
  /*Dark mode*/
  --page-bg: #252526;
  --text-color: var(--white);
  --title-1: var(--white);

  --project-card-bg: var(--black);
  --project-card-text: var(--white);
  --box-shadow: 0px 5px 35px 0px rgba(0, 0, 0, 0.8);
}

html,
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  font-family: "DM Sans", sans-serif;
  letter-spacing: -0.5px;
  scroll-behavior: smooth;

  /*Light mode*/
  background-color: var(--page-bg);
  color: var(--text-color);
}

/*General*/

.container {
  /*центровка контейнера посередине:*/
  margin: 0 auto;
  padding: 0 15px;
  /*фактический размер контента контейнера 1170 (1200-15-15) при box-sizing):*/
  max-width: 1200px;
}

.section {
  padding: 70px 0;
}

.title-1 {
  margin-bottom: 60px;
  font-size: 60px;
  line-height: 1.3;
  font-weight: 700;
  color: var(--title-1);
  text-align: center;
}

.title-2 {
  margin-bottom: 20px;
  font-size: 40px;
  line-height: 1.3;
  font-weight: 700;
}

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

.nav-row {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  /*отступ между элементами, в данном слечае между лого и меню, будет всегда, и для мобильников, т.е не будут прилипать*/
  column-gap: 30px;
  /*row-gap нужно в дальнейшем, для мобильной адаптации, когда будет несколько строк*/
  row-gap: 20px;
  flex-wrap: wrap;
}

.logo {
  margin-right: auto;
  color: var(--header-text);
  font-size: 24px;
  font-family: "Poppins", sans-serif;
}

.logo strong {
  font-weight: 700;
}

.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, хотя бы пустая строка ""*/
  content: "";
  display: block;
  left: 0;
  top: 100%;
  height: 2px;
  width: 100%;
  position: absolute;
  background-color: var(--accent);
}

/*Dark mode btn*/
.dark-mode-btn {
  order: 1;
  position: relative;
  display: flex;
  justify-content: space-between;
  width: 51px;
  height: 26px;
  background-color: #272727;
  border-radius: 50px;
  padding: 5px;
}

.dark-mode-btn::before {
  position: absolute;
  top: 1px;
  left: 1px;
  content: "";
  display: block;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background-color: var(--white);
  transition: left 0.2s ease-in;
}

.dark-mode-btn--active::before {
  left: 26px;
}

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

/*Header*/
.header {
  /*мин высота шапки, если контента будет больше, шапка будет увеличиваться*/
  min-height: 695px;
  padding: 40px 0;
  background-color: var(--dark-bg);
  background-image: url("./../img/pngegg.png");
  background-repeat: no-repeat;
  background-size: auto;
  background-position: center center;
  color: var(--header-text);
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.header__wrapper {
  padding: 0 15px;
  max-width: 660px;
}

.header__title {
  font-size: 40px;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 20px;
}

.header__title strong {
  font-size: 60px;
  font-weight: 700;
}

.header__title em {
  font-style: normal;
  /* color: var(--accent); */
  color: rgb(238, 32, 77);
}

.header__text {
  margin-bottom: 40px;
  font-size: 18px;
  line-height: 1.3;
}

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

/*Btn*/

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

/*Btn online*/

.btn-outline {
  display: flex;
  column-gap: 10px;
  align-items: center;
  height: 48px;
  border-radius: 5px;
  padding: 12px 20px;
  border: 1px solid #000;
  background-color: var(--white);
  color: var(--black);
  transition: opacity 0.2s ease-in;
}

.btn-outline:hover {
  opacity: 0.8;
}

/*при клике на кнопку для эффекта прожатия:*/
.btn-outline:active {
  position: relative;
  top: 1px;
}

/*Projects*/

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

.project {
  max-width: 370px;
  background-color: var(--project-card-bg);
  box-shadow: var(--box-shadow);
  border-radius: 10px;
}

.project__img {
  border-radius: 10px;

  /* projects images`*/
  float: left;
  width: 370px;
  height: 278px;
  object-fit: cover;
}

.project__title {
  padding: 15px 20px 25px;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--project-card-text);
  text-align: center;
}

.project__subtitle {
  text-align: center;
  color: var(--black);
}

/*Projects details*/
.project-details {
  margin: 0 auto;
  max-width: 865px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.project-details__cover {
  max-width: 100%;
  margin-bottom: 40px;
  box-shadow: 0px 5px 35px rgba(0, 0, 0, 0.25);
  border-radius: 10px;
}

.project-details__desc {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 30px;
}

/*Btn link in project's details*/

.btn-link {
  /* display: flex;
  align-items: center;
  justify-content: center; */
  /* max-width: fit-content; */
  /* height: 48px; */
  border-radius: 5px;
  padding: 12px 20px;
  border: 1px solid #000;
  background-color: #612bce;
  box-shadow: 10px 5px 5px #a0a0a0;
  color: var(--white);
  transition: opacity 0.2s ease-in;
  font-size: 15px;
  /* margin-bottom: 100px; */
}

.btn-link:hover {
  opacity: 0.8;
}

/*при клике на кнопку для эффекта прожатия:*/
.btn-link:active {
  position: relative;
  top: 1px;
}

.project__text {
  margin-top: 30px;
  font-size: 22px;
  font-weight: normal;
  text-align: justify;
  text-indent: 2em;
  margin-bottom: 10px;
}

.project__text--attention {
  margin-top: 40px;
  font-size: 18px;
  font-weight: 600;
  text-align: justify;
  text-indent: 2em;
  margin-bottom: 20px;
  color: var(--attention);
}

.project__text--little {
  font-size: 18px;
  font-weight: normal;
  text-align: justify;
}

span.underlined {
  text-decoration: underline;
}

.project-details--columns--right {
  display: grid;
  align-items: center;
  grid-template-columns: 50% 1fr;
  column-gap: 35px;
  margin-bottom: 50px;
}

.project-details--columns--left {
  display: grid;
  align-items: center;
  grid-template-columns: 40% 60%;
  column-gap: 35px;
  margin-bottom: 50px;
}

.columns__img {
  border-radius: 10px;
}

.columns__text {
  text-align: justify;
  text-indent: 2rem;
  font-size: 18px;
  margin-bottom: 12px;
}

.btnBack {
  margin-top: 20px;
  color: #d7858c;
  font-size: 20px;
}

/*Content list*/
.content-list {
  margin: 0 auto;
  max-width: 570px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  row-gap: 40px;
}

.content-list a {
  color: --accent;
}

.content-list__item {
  font-size: 18px;
  line-height: 1.5;
}

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

/*Footer*/
.footer {
  margin-top: auto;
  background-color: var(--dark-bg);
  padding: 60px 0 50px;
  color: var(--white);
}

.footer__wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  row-gap: 27px;
}

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

.social__item {
  width: 48px;
}

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

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

  .header {
    min-height: unset;
  }

  .header__title {
    font-size: 30px;
  }

  .header__title strong {
    font-size: 40px;
  }

  /* Nav */

  .nav-row {
    justify-content: space-between;
  }

  .dark-mode-btn {
    order: 0;
  }

  /*General*/

  .section {
    padding: 40px 0;
  }

  .title-1 {
    margin-bottom: 30px;
    font-size: 40px;
  }

  .title-2 {
    margin-bottom: 10px;
    font-size: 30px;
  }

  /*Projects*/

  .project__title {
    font-size: 22px;
  }

  /*Project page*/

  /* .project-details__desc {
    font-size: 22px;
    margin-bottom: 20px;
  } */

  /*Content list*/

  .content-list {
    row-gap: 20px;
  }

  .content-list__item {
    font-size: 16px;
  }

  /*Footer*/

  .footer {
    padding: 40px 0 30px;
  }

  .footer__wrapper {
    row-gap: 20px;
  }

  /*Social*/

  .social {
    column-gap: 20px;
  }

  .social__item {
    width: 32px;
  }
}
