:root {
  --color-light-blue: #7f8cff;
  --color-blue: #6070ff;
  --color-dark-blue: #172b4d;
  --color-primary: #396df2;
  --color-icons: #505f79;
  --color-body: #344563;
  --color-white: #fff;
  --color-background: #e5e5e5;
}

* {
  box-sizing: border-box;
  margin: 0;
}

body {
  color: var(--color-body);
  font-family: "Poppins", sans-serif;
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.5rem;
}

h1,
h2 {
  color: var(--color-dark-blue);
  font-weight: 700;
}

h1 {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 3.25rem;
  margin: 0;
  padding-top: 9.375rem;
}

h2 {
  font-size: 2rem;
  line-height: 2.75rem;
  margin: 0.8rem 0;
}

h3 {
  color: var(--color-light-blue);
  font-size: 1rem;
  font-weight: 500;
  transition: color 0.3s;
}

h3:hover {
  color: var(--color-primary);
}

h4 {
  font-weight: 600;
  font-size: 0.813rem;
}

a {
  text-decoration: none;
}

.container {
  min-width: 375px;
  background-color: var(--color-background);
}

.headline {
  background-color: var(--color-white);
  background-image: url(images/background.png);
  background-position: 0 50px;
  background-repeat: no-repeat;
  background-size: 100%;
  border-bottom-left-radius: 5rem;
  height: 718px;
  padding: 0 1.5rem;
}

.headline__list {
  display: flex;
  list-style: none;
  gap: 2rem;
  margin: 2rem 0;
  padding-left: 0;
}

.headline__icon {
  filter: invert(35%) sepia(46%) saturate(260%) hue-rotate(178deg) brightness(95%) contrast(96%);
}

.headline__text {
  margin: 0.75rem 0;
}

@media screen and (min-width: 768px) {
  body {
    font-size: 1.25rem;
    line-height: 1.75rem;
  }

  h1 {
    font-size: 3rem;
    line-height: 3.75rem;
    padding: 0;
  }

  h2 {
    font-size: 2.5rem;
    line-height: 3.25rem;
  }

  h4 {
    font-weight: 600;
    font-size: 0.813rem;
  }

  .headline__content {
    flex: 0 1 auto;
  }

  .headline {
    align-items: center;
    background-image:
      url(images/header_bg/Ellipse3.png),
      url(images/header_bg/Rectangle4.png),
      url(images/header_bg/Rectangle7.png),
      url(images/header_bg/Ellipse5.png),
      url(images/header_bg/Rectangle6.png),
      url(images/header_bg/Ellipse11.png),
      url(images/header_bg/Ellipse12.png),
      url(images/header_bg/Ellipse13.png),
      url(images/header_bg/Rectangle5.png),
      url(images/header_bg/Ellipse4.png),
      url(images/header_bg/Ellipse6.png),
      url(images/header_bg/Ellipse7.png),
      url(images/header_bg/Ellipse8.png),
      url(images/header_bg/Ellipse14.png);
    background-position:
      99.4% 15.5%,
      95% 4.5%,
      49% 16%,
      49% 18%,
      2.4% 15.24%,
      5.5% 21.86%,
      17.63% 83.84%,
      16.5% 87.08%,
      49% 83.77%,
      52.6% 80.4%,
      81.53% 70.2%,
      67% 16.6%,
      26.3% 17.9%,
      5.07% 55.79%;
    background-size:
      224px,
      204px,
      56px,
      23px,
      108.67px,
      80.48px,
      36.9px,
      46px,
      161.41px,
      47px,
      75px,
      39px,
      15px,
      23px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 916px;
    padding: 0 16.25rem;
    padding-bottom: 5rem;
  }

  .headline__text {
    max-width: 60rem;
  }

  .headline__list {
    margin-bottom: 0;
  }

  .br2 {
    display: none;
  }
}

/* Nav */
header {
  align-items: center;
  background-color: var(--color-white);
  height: 50px;
}

nav {
  align-items: center;
  background-color: var(--color-white);
  display: flex;
  justify-content: space-between;
  height: 70px;
  position: fixed;
  padding: 0 2rem;
  width: 100%;
}

.nav__brand {
  color: var(--color-blue);
  font-size: 1.125rem;
  font-weight: 700;
  width: 100%;
}

.nav__list {
  align-items: center;
  display: flex;
  list-style: none;
  justify-content: space-between;
  padding-left: 0;
}

.nav__item {
  margin-left: 2rem;
}

.nav__link {
  color: var(--color-body);
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.25rem;
  text-decoration: none;
  transition: color 0.3s;
}

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

.icon {
  height: 1.5rem;
  width: 1.5rem;
  transition: all 0.3s;
}

.icon:hover {
  height: 1.2rem;
  filter: invert(70%) sepia(46%) saturate(260%) hue-rotate(178deg) brightness(95%) contrast(96%);
}

.page-logo {
  width: 60%;
}

.hamburger-icon {
  display: none;
}

.bar {
  background-color: var(--color-blue);
  display: block;
  height: 2px;
  margin: 5px auto;
  width: 1.5rem;
}

@media screen and (max-width: 768px) {
  .hamburger-icon {
    display: block;
  }

  .hamburger-icon.active .bar:nth-child(2) {
    opacity: 0;
  }

  .hamburger-icon.active .bar:nth-child(1) {
    background-color: var(--color-white);
    transform: translateY(0.7rem) rotate(45deg);
    position: fixed;
    z-index: 4;
  }

  .hamburger-icon.active .bar:nth-child(3) {
    background-color: var(--color-white);
    transform: translateY(-0.1rem) rotate(-45deg);
    position: fixed;
    z-index: 4;
  }

  .nav__list {
    align-items: start;
    backdrop-filter: blur(8px);
    background-color: #6070ff;
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    left: -100%;
    opacity: 95%;
    padding: 106px 0 450px;
    position: fixed;
    top: 0;
    transition: 0.4s;
    width: 100%;
    z-index: 2;
  }

  .nav__link {
    color: var(--color-white);
    font-size: 2rem;
    font-weight: 600;
    margin: 2.5rem 0;
    text-align: left;
  }

  .nav__list.active {
    left: 0;
    margin-top: 0;
  }
}

/* Buttons */
.btn--primary {
  background: #ebebff;
  border-radius: 8px;
  border-style: none;
  color: var(--color-blue);
  font-family: "Poppins", sans-serif;
  font-weight: 500;
  padding: 4px 12px;
}

.btn--secondary {
  background: var(--color-white);
  border: 1px solid var(--color-primary);
  border-radius: 8px;
  color: var(--color-primary);
  font-weight: 500;
  letter-spacing: 0.03em;
  padding: 8px 16px;
  transition: all 0.5s;
}

.btn--secondary:hover {
  background: var(--color-blue);
  color: var(--color-white);
}

.btn--secondary:focus {
  background-color: #2230d2;
  color: var(--color-white);
}

@media screen and (min-width: 768px) {
  .btn--primary {
    letter-spacing: 0.03em;
  }

  .btn--secondary {
    font-size: 0.94rem;
  }
}

/* Card */
.card {
  align-items: center;
  background: var(--color-white);
  border-radius: 1rem;
  display: flex;
  flex-direction: column;
  width: 80%;
  margin: 0 auto;
}

.card__image {
  padding: 1rem;
  width: 90%;
}

.card__image-desktop {
  display: none;
}

.card__body {
  padding: 0 1rem;
}

.card__details {
  display: flex;
}

.card__list {
  display: flex;
  flex-direction: row;
}

.card__role {
  color: #7a869a;
  font-weight: 600;
  font-size: 0.813rem;
  margin-right: 2rem;
  white-space: nowrap;
}

.card__year {
  color: #7a869a;
  font-weight: 600;
  font-size: 0.813rem;
}

.card__text {
  margin: 1.25rem 0 0.75rem;
}

.card__languages {
  margin-bottom: 2rem;
}

.card__btn-wrapper {
  margin-bottom: 3rem;
}

/* Works/Projects */
#works {
  background: var(--color-background);
  display: grid;
  gap: 5rem;
  justify-content: center;
  padding: 5rem 0;
  width: 100%;
}

@media screen and (min-width: 768px) {
  h2 {
    margin-top: 4rem;
  }

  h4 {
    font-size: 1.125rem;
    font-weight: 500;
  }

  #works {
    gap: 8.875rem;
    padding: 8.875rem 0;
  }

  .card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin: auto;
    overflow: hidden;
    width: 80%;
  }

  .card__image {
    display: none;
  }

  .card__image-desktop {
    display: block;
    padding: 1.5rem 0 1.5rem 1.5rem;
    width: 100%;
  }

  .card__heading {
    margin: 3rem 0 1.125rem;
  }

  .card__body {
    padding: 0 2.875rem 1.5rem;
  }

  .card__role {
    font-size: 1.125rem;
    font-weight: 400;
  }

  .card__year {
    font-size: 1.125rem;
    font-weight: 400;
  }

  .card__text {
    font-size: 1rem;
    line-height: 1.5rem;
    margin-bottom: 1.75rem;
  }

  .card:nth-of-type(even) .card__image-desktop {
    order: 2;
    width: 97%;
    padding: 1.5rem 1.375rem 1.5rem 0;
  }

  .card__btn-wrapper {
    margin: 3rem 0 0;
  }

  .project-br {
    display: none;
  }
}

/* About myself */
.about-myself {
  background-color: var(--color-white);
  border-top-right-radius: 5rem;
  margin-top: 5rem;
  padding: 0 1rem;
  padding-top: 5rem;
}

.about-myself__details {
  margin-top: 4rem;
}

.language__list {
  list-style-type: none;
}

.list__heading {
  list-style-type: none;
  padding-left: 0;
}

.list__heading-item {
  align-items: center;
  color: #000;
  display: flex;
  justify-content: space-between;
  font-size: 1.25rem;
  font-weight: 500;
  margin-bottom: 2rem;
  padding-bottom: 2rem;
}

.item-border {
  border-bottom: 1px solid #dfe1e6;
}

.language__item {
  align-items: center;
  background: #f7f7f9;
  display: flex;
  margin-bottom: 1.5rem;
  padding: 1rem 0;
}

.language__img {
  margin-right: 1rem;
  padding-left: 1rem;
}

.list__down-pointer {
  width: 1.2rem;
  height: 0.7rem;
  padding-right: 4rem;
}

.list__heading-pointer {
  height: 1.2rem;
  padding-right: 4rem;
}

@media screen and (min-width: 768px) {
  p {
    font-size: 1rem;
    line-height: 1.5rem;
  }

  .about-myself {
    display: grid;
    gap: 2.25rem;
    grid-template-columns: 43% 57%;
    margin: 0;
    padding: 10.375rem 11.375rem 10.375rem 9rem;
  }

  .about-myself-socials {
    margin-right: 4rem;
  }

  .about-myself--list {
    margin-bottom: 3rem;
  }

  .language__list {
    display: flex;
  }

  .language__item {
    border-radius: 0.5rem;
    display: flex;
    flex-direction: column;
    font-size: 0.9375rem;
    font-weight: 500;
    margin-right: 0.75rem;
    width: 7.625rem;
  }

  .language__img {
    margin-bottom: 1rem;
  }

  .card__languages {
    padding: 0;
  }

  .card__btn-wrapper {
    padding: 0;
  }
}

/* Contacts section */
#contacts-container {
  background: var(--color-white);
}

.contacts {
  background: var(--color-blue);
  border-top-left-radius: 5rem;
  height: 48.625rem;
  background-image: url("images/contact-background.png");
  background-size: 60%;
  background-position: 150px 30px;
  background-repeat: no-repeat;
}

.contacts__header {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 6.25rem 1.5rem 2rem 1.5rem;
}

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

.contacts__text {
  color: #ebebff;
  text-align: center;
}

form {
  display: flex;
  flex-direction: column;
  margin: 0.8rem;
}

.form__input {
  border: 1px solid #cfd8dc;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
  padding: 1rem;
}

.form__input::placeholder {
  color: #172b4d;
  font-size: 1.0625rem;
  line-height: 1.25rem;
}

.form__input:focus {
  border: 1px solid #cfd8dc;
  outline: 0;
}

.form--text {
  height: 10.625rem;
  font-family: "Poppins", sans-serif;
  font-weight: 400;
  font-size: 1rem;
}

.form__text::placeholder {
  color: #b3bac5;
}

.form__button {
  padding: 0.7rem;
  width: 6.75rem;
  text-align: center;
}

.form__button:hover {
  outline: 0.8px solid var(--color-white);
}

.hidden-label {
  display: none;
}

@media screen and (min-width: 768px) {
  .contacts {
    background-image: none;
    background-image:
      url(images/contacts_bg/Ellipse_3.png),
      url(images/contacts_bg/Rectangle_4.png),
      url(images/contacts_bg/Ellipse_13.png),
      url(images/contacts_bg/Rectangle_7.png),
      url(images/contacts_bg/Ellipse_5.png),
      url(images/contacts_bg/Rectangle_6.png),
      url(images/contacts_bg/Ellipse_11.png),
      url(images/contacts_bg/Ellipse_12.png);
    background-position:
      85.9% 15.5%,
      84.14% 9%,
      78.4% 61.58%,
      5.1% 40.5%,
      5% 44%,
      23.4% 87.59%,
      24.5% 90.15%,
      32.64% 13.48%;
    background-size:
      129px,
      107.2px,
      75px,
      90px,
      48px,
      55px,
      41px,
      27px;
    height: 55rem;
    width: 100%;
  }

  .contacts__header {
    max-width: 40%;
    margin: auto;
  }

  form {
    max-width: 30%;
    margin: auto;
  }

  .form__button {
    margin: auto;
    white-space: nowrap;
  }
}

/* Popup section */
.popup-container {
  background-color: rgba(193, 199, 208, 0.7);
  backdrop-filter: blur(8px);
  display: none;
  height: 100%;
  position: fixed;
  top: 0;
  bottom: 0;
  overflow: auto;
  width: 100%;
  z-index: 10;
}

.popup {
  background-color: var(--color-white);
  border-radius: 1rem;
  height: auto;
  margin: 0 auto;
  padding: 1.5rem;
  position: relative;
  top: 60px;
  width: 70%;
}

.popup--header {
  display: flex;
  justify-content: space-between;
}

.popup--img {
  height: 10%;
  margin: 1.25rem auto 0;
  width: 60%;
  padding: 0;
}

.popup--tags {
  margin: 0.75rem 0 2.5rem;
  padding: 0;
}

.popup--buttons {
  display: grid;
  gap: 0.5rem;
  grid-template-columns: 1fr 1fr;
  margin: 0;
  padding: 0;
  width: 90%;
}

.popup--btn {
  align-items: center;
  display: grid;
  grid-template-columns: 80% 20%;
  gap: 0.3rem;
  padding: 0.5rem 0.75rem;
  width: fit-content;
  text-align: center;
  white-space: nowrap;
}

.popup__exit {
  cursor: pointer;
}

@media screen and (min-width: 768px) {
  .popup {
    margin-bottom: 7rem;
    overflow: hidden;
  }

  .popup--heading {
    margin: 0 0 0.7rem;
  }

  .popup--body {
    padding: 0;
  }

  .popup--img {
    margin: 0 auto;
    padding: 0.7rem 0;
  }

  .popup--info {
    display: grid;
    gap: 2rem;
    grid-template-columns: 50% 50%;
  }

  .popup__text {
    margin: 0.5rem 0;
  }

  .popup--tags {
    margin-top: 0;
  }

  @media screen and (min-width: 930px) {
    .popup--info {
      grid-template-columns: 50% 50%;
    }

    .popup--buttons {
      width: 70%;
    }

    .popup--btn {
      padding: 0.5rem 1rem;
    }
  }

  @media screen and (min-width: 1080px) {
    .popup--info {
      grid-template-columns: 60% 40%;
    }

    .popup--buttons {
      width: 70%;
    }
  }

  @media screen and (min-width: 1440px) {
    .popup--info {
      grid-template-columns: 70% 30%;
    }

    .popup--buttons {
      width: 50%;
    }
  }
}
