@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;500;700&display=swap");

:root {
  /* Colors */
  --black: #000;
  --black-light: #171718;
  --black-border: #26292d;
  --dark-mode: #282828;
  --white: #fff;
  --grey: #3d3d3d;
  --grey-light: #5d5d5d;
  --purple: #5c62ec;

  /* Buttons */
  /* dark-mode-btn */
  --mode-btn-bg: var(--grey);
  --mode-btn-select: var(--white);
  /* btn */
  --btn-bg: var(--purple);
  --btn-text: var(--white);
  /* btn-outline */
  --btn-outline-bg: var(--white);
  --btn-outline-text: var(--black);
  --btn-outline-border: var(--black);
  --btn-outline-hover: var(--purple);

  /* Nav */
  --nav-bg: var(--black-light);
  --nav-border: var(--black-border);
  --nav-text: var(--white);
  --nav-select-line: var(--purple);

  /* Header */
  --header-bg: var(--black-light);
  --header-text: var(--white);

  /* Footer */
  --footer-bg: var(--black-light);
  --footer-text: var(--white);
  --footer-text-second: var(--grey-light);

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

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

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

  --project-card-bg: var(--black-light);
  --project-card-text: var(--white);
  --box-shadow: 0 5px 35px 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;

  background-color: var(--page-bg);
  color: var(--text-color);
}

/* General */

.section {
  padding: 70px 0;
}

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

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

.title-2 {
  margin-bottom: 20px;

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

.content__text {
  margin-bottom: 30px;
  font-size: 20px;
  line-height: 1.5;
}

.content__text p + p {
  margin-top: 1.5em;
}

.content__img {
  margin-bottom: 30px;
  width: 100%;
  border-radius: 10px;
}

/* Buttons */

/* btn (header button) */

.btn {
  display: inline-block;

  height: 48px;
  padding: 12px 28px;

  border-radius: 5px;
  background-color: var(--btn-bg);
  color: var(--btn-text);
  letter-spacing: 0.15px;
  font-size: 18px;
  font-weight: 500;

  transition: opacity 0.2s ease-in;
}

.btn:hover {
  opacity: 0.8;
}

.btn:active {
  position: relative;
  transform: translateY(1px);
}

/* btn with outline */

.btn-outline {
  display: flex;
  column-gap: 10px;
  align-items: center;

  height: 48px;
  padding: 12px 20px;

  border: 1px solid var(--btn-outline-border);
  border-radius: 5px;
  background-color: var(--btn-outline-bg);
  color: var(--btn-outline-text);

  transition: background-color 0.2s ease-in;
}

.btn-outline:hover {
  background-color: var(--btn-outline-hover);
}

.btn-outline:active {
  position: relative;
  transform: translateY(1px);
}

/* Dark mode btn (button mode swich) */

.dark-mode-btn {
  order: 9;

  position: relative;
  display: flex;
  justify-content: space-between;

  width: 51px;
  height: 26px;
  padding: 5px;

  border-radius: 13px;
  background-color: var(--mode-btn-bg);
}

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

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

  display: block;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background-color: var(--mode-btn-select);

  transition: transform 0.2s ease-in;
}

.dark-mode-btn--active::before {
  transform: translateX(26px);
}

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

/* Nav */

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

.nav-row {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  column-gap: 30px;
  row-gap: 20px;
  flex-wrap: wrap;
}

.logo {
  margin-right: auto;
  width: 10%;
}

.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(--nav-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(--nav-select-line);
}

/* Header */

.header {
  padding: 40px 0;
  min-height: 695px;

  display: flex;
  justify-content: center;
  align-items: center;

  background-color: var(--header-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 {
  padding: 0 15px;
  max-width: 660px;
}

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

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

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

/* Project */

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

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

/* Project page */

.project-details {
  margin: 0 auto;
  max-width: 865px;

  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.project-details a + a {
  margin-top: 1.5em;
}

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

  box-shadow: var(--box-shadow);
  border-radius: 10px;
}

.project-details__text {
  margin-bottom: 30px;

  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
}

.project-details__text p + p {
  margin-top: 1.5em;
}

/* Skills and Contact */
/* Content-list */

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

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

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

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

.mesengers {
  margin-top: 60px;
  display: flex;
  column-gap: 30px;
  justify-content: center;
  align-items: center;
}

/* Footer */

.footer {
  margin-top: auto;
  padding: 40px 0 30px;
  background-color: var(--footer-bg);
  color: var(--footer-text);
}

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

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

.copyright {
  font-size: 16px;
  text-align: center;
}

.copyright p + p {
  margin-top: 0.5em;
  color: var(--footer-text-second);
}

@media (max-width: 767px) {
  /* General */

  .section {
    padding: 40px 0;
  }

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

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

  .content__text {
    margin-bottom: 20px;
    font-size: 18px;
  }

  .content__text p + p {
    margin-top: 1.3em;
  }

  /* Nav */

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

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

  /* Header */

  .header {
    min-height: 495px;
    background-size: 428px;
  }

  .header__title {
    font-size: 30px;
  }

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

  /* Projects */

  .project__title {
    font-size: 22px;
  }

  /* Project page */

  .project-details__img {
    margin-bottom: 30px;
  }

  .project-details__text {
    font-size: 18px;
  }

  /* Skills and Contact */
  /* 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 {
    column-gap: 20px;
  }

  .social__item {
    width: 28px;
  }
}

@media (max-width: 575px) {
  /* General */

  .section {
    padding: 30px 0;
  }

  .title-1 {
    margin-bottom: 20px;
    font-size: 26px;
  }

  .title-2 {
    margin-bottom: 5px;
    font-size: 22px;
  }

  .content__text {
    font-size: 16px;
  }

  .content__img {
    margin-bottom: 20px;
    border-radius: 7px;
  }

  /* Nav */

  .nav {
    padding: 10px 0;
  }

  .logo {
    font-size: 20px;
  }

  .nav-list {
    font-size: 14px;
    column-gap: 30px;
  }

  /* Header */

  .header {
    min-height: 395px;
    background-size: 388px;
  }

  .header__title {
    font-size: 22px;
  }

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

  .header__text {
    font-size: 16px;
  }

  /* Projects */

  .project__title {
    font-size: 20px;
  }

  /* Project page */

  .project-details__img {
    margin-bottom: 20px;
  }

  .project-details__text {
    font-size: 16px;
  }

  /* Skills and Contact */
  /* Content-list */

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

  .mesengers {
    margin-top: 30px;
    flex-wrap: wrap;
    gap: 20px;
  }

  /* Footer */

  .footer {
    padding: 20px 0 20px;
  }

  .social {
    column-gap: 15px;
  }

  .social__item {
    width: 24px;
  }

  .copyright {
    font-size: 12px;
  }
}
