html {
  scroll-behavior: smooth;
}
body {
  background-color: #2c3139;
  /* overflow: hidden; - чтобы страница не прокручивалась вертикально */
}
#particles-js {
  position: absolute;
  width: 100%;
  height: 70%;
}
/* убираю лишнее пространство сверху и по бокам */
* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

/* HEADER */
header {
  /* width: 100vw; */
  position: fixed;
  background-color: #393f4a;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100; /* чтобы был поверх остального контента */
}
/* Navigation */
#navigation {
  min-height: 110px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-left: 50px;
  margin-right: 50px;
}
#main-title {
  margin-top: -15px;
}
h1 {
  color: #0060FD;
  font-size: 48px;
  margin-bottom: 0;
  font-family: "Antic Didone", serif;
}
.head {
  color: #0060FD;
  font-size: 24px;
  font-family: "Antic Didone", serif;
  margin-top: 1px;
  display: inline-block;
  position: absolute;
  padding-bottom: 3px;
}
@keyframes border {
  from {width: 50px;}
  to {width: 320px}
}
.head:after {
  content: '';
  display: block;
  margin: 0px;
  height: 2px;
  width: 0px;
  background: black;  
  -webkit-animation-name: border; /* Safari 4.0 - 8.0 */
  -webkit-animation-duration: 4s; /* Safari 4.0 - 8.0 */
  -webkit-animation-fill-mode:var(322px);  /* Safari 4.0 - 8.0 */
  animation-name: border;
  animation-duration: 1s;
  animation-delay: 1s;
  animation-fill-mode: forwards;
}
/* Hamburger menu */
.hamburger {
  display: none;
}
.bar {
  display: block;
  width: 25px;
  height: 3px;
  margin: 5px auto;
  -webkit-transition: all 0.3s ease-in-out;
  transition: all 0.3s ease-in-out;
  background: black;
}
@media (max-width: 853px){
  .hamburger {
    display: block;
  }
  /* X after opening menu */
  .hamburger.active .bar:nth-child(2){
    opacity: 0;
  }
  .hamburger.active .bar:nth-child(1){
    transform: translateY(8px) rotate(45deg);
  }
  .hamburger.active .bar:nth-child(3){
    transform: translateY(-8px) rotate(-45deg);
  }
  #container {
    position: fixed;
    left: auto;
    right: -100%;
    top: 70px;
    gap: 0;
    flex-direction: column;
    background-color: #404652;
    width: 100%;
    text-align: center;
    transition: 0.3s;
  }
  .menu {
    margin: 16px 0;
  }
  #container.active {
    right: 0;
  }
}
#containerAbout::before,
#containerProjects::before,
#containerContacts::before {
  content: "";
  display: block;
  height: 110px; /* примерно высота header */
  margin-top: -110px; /* компенсируем высоту header */
  visibility: hidden;
}
/* links container */
#container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.menu {
  color: #FBFBFB;
  font-size: 34px;
  font-family: "Raleway", serif;
  text-shadow: 2px 4px 4px #000000;
  text-decoration: none;
  padding: 5px;
  border: transparent;
  transition: 0.2s ease;
}
.title-page {
  color: #0060FD;
  font-size: 36px;
  font-family: "Raleway", serif;
  text-shadow: 2px 4px 4px #000000;
  text-decoration: none;
  padding: 5px;
  border: transparent;
  transition: 0.2s ease;
}
.menu:hover {
  font-weight: 600;
  border: 1.5px solid black;
  border-radius: 20px;
}

/* ABOUT */
#containerAbout {
  margin-top: 200px;
  margin-left: 180px;
}
.text {
  color: #FBFBFB;
  font-size: 22px;
  font-family: "Hind Siliguri", serif;
  max-width: 40em;
  line-height: 1.5;
  margin-left: 156px;
  margin-top: 69px;
}
.flight {
  margin-top: 50px;
}
p div {
	display: inline-block;
}

/* PROJECTS */
#containerProjects {
  margin-top: 100px;
  margin-left: 180px;
}
.projects {
    width: 80vw;
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    align-content: flex-start;
    margin-bottom: 40px;
}
.pic {
    width: 470px;
    transition: transform 0.6s ease;
    display: block;
    cursor: pointer;
    /* пробую: */
    height: auto;
    max-height: 340px;
    object-fit: cover;
}
.pic:hover {
  transform: scale(1.3);
}
#project {
    text-decoration: none;
    margin-right: 6vw;
    margin-bottom: 5vw;
    /* max-width: 250px; */
    display: flex;
    flex-direction: row;
    /* пробую: */
    align-items: stretch;
    gap: 30px;
}
.description {
  max-height: 340px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.description .link {
  overflow: hidden;
}
.description p.link:not(.title) {
  flex-grow: 1;
  overflow: hidden;
}
.description p.link:not(.title) {
  display: -webkit-box;
  line-clamp: 6; /* количество строк */
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.description.expanded {
  max-height: none;
  overflow: visible;
}
.description.expanded p.link:not(.title) {
  line-clamp: unset;
  display: block;
  overflow: visible;
  cursor: default;
}
.description p.link:not(.title) {
  cursor: pointer;
}
.link {
    color: #FBFBFB;
    font-size: 16px;
    font-family: "Hind Siliguri", serif;
    margin-bottom: 0;
    margin-top: 20px;
}
.title {
    color: #0363ff;
    font-size: 20px;
    margin-top: 30px;
    font-family: "Hind Siliguri", serif;
    font-weight: 800;
}
.used {
  margin-top: 20px;
  margin-right: 5px;
  display: flex;
  flex-direction: row;
  justify-content: flex-end;
}
.used p {
  margin-left: 10px;
  font-family: "Raleway", serif;
  color: #8794ae;
  font-weight: 900;
}
.more-content {
  display: none;
}
#button {
  text-align: center;
}
#toggleButton {
  font-family: "Raleway", serif;
  color: #8794ae;
  font-size: 20px;
  padding: 5px 20px;
  border: none;
  width: 10rem;
  border-radius: 5px;
  position: relative;
  background: transparent;
  cursor: pointer;
  overflow: hidden;
}
.border-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.border-svg rect {
  fill: none;
  stroke: #0363ff;
  stroke-width: 1;
  stroke-dasharray: 300;
  stroke-dashoffset: 300;
}
#toggleButton:hover .border-svg rect {
  animation: drawBorder 1s linear forwards;
}
@keyframes drawBorder {
  to {
    stroke-dashoffset: 0;
  }
}
.show-more {
  display: block;
}
.project-links {
  margin-top: 20px;
  margin-right: 5px;
  display: flex;
  gap: 15px;
  justify-content: end;
}
.live-demo {
  display: inline-flex;
  padding: 6px 18px;
  border: 1px solid #0363ff;
  border-radius: 5px;
  color: #8794ae;
  font-family: "Raleway", serif;
  font-size: 16px;
  text-decoration: none;
  transition: 0.3s ease;
  align-items: center;
  height: auto;
}
.live-demo:hover {
  background-color: #0363ff;
  color: #fff;
}
.github-link:hover {
  transform: scale(1.1);
}

/* CONTACTS */
#containerContacts {
  margin: 100px 0 70px 219px;
}
.contact {
  margin-left: 156px;
  margin-top: 30px;
  color: #FBFBFB;
  font-size: 20px;
  font-family: "Hind Siliguri", serif;
}
.phone {
  font-size: 18px;
}
#form {
    display: flex;
    width: 50%;
    align-items: center;
    margin: 10px;
    flex-wrap: wrap;
}
.field {
    color: #A9AFBD;
    background-color: #282C34;
    flex: 1;
    height: 55px;
    font-size: 24px;
    font-family: "Hind Siliguri", serif;
    border: none;
    padding: 10px;
    outline: none;
}
.message {
    height: 200px;
    align-self: flex-start;
    width: block;
}
#btn {
  color: #A9AFBD;
  font-size: 24px;
  font-family: "Hind Siliguri", serif;
  text-decoration: inherit;
  background: #282C34;
  box-shadow: 2px 3px 3px #000000;
  border: solid 2px #FBFBFB;
  border-radius: 5px;
  padding: 5px 30px;
  width: 13rem;
  display: inline-block;
}
.btn {
  text-align: center;
}
#containerContacts a[href^="tel"] {
    color: #FBFBFB;
    text-decoration: none;
}
/* for IOS Safari */
#containerContacts a[href^="tel"] {
    color: #FBFBFB !important;
    text-decoration: none !important;
}

/* FOOTER */
.image {
  margin: 20px;
}
#footer {
    display: flex;
    justify-content: center;
    margin-top: 70px;
}
span {
    color: #0060FD;
    font-size: 16px;
    font-family: "Hind Siliguri", serif;
}
#phrase {
    display: flex;
    justify-content: center;
    font-size: 16px;
    font-family: "Hind Siliguri", serif;
    color: #FBFBFB;
    text-shadow: 2px 4px 4px #000000;
}

/* MOBILE ADAPTATION */
@media all and (max-width: 1300px){
    #container {
      padding: 60px 0;
    }
    #particles-js, .particles-js-canvas-el {
        max-height: 700px;
    }
}
@media all and (max-width: 1030px){
    #particles-js, .particles-js-canvas-el {
        max-height: 500px;
    }
    #navigation-title {
      min-height: 90px;
    }
    #container {
      margin-top: 0px;
    }
    #containerAbout {
      margin-top: 200px;
      margin-left: 120px;
      margin-right: 20px;
    }
    .text {
      margin-left: 120px;
      margin-top: 40px;
      max-width: 30em;
    }
    #containerProjects {
      margin-top: 90px;
      margin-left: 120px;
      margin-right: 20px;
    }
    #containerContacts {
      margin-top: 60px;
      margin-left: 120px;
      margin-right: 20px;
    }
    #container {
      padding: 60px 0;
    }
    #container.active {
      padding: 20px 0;
    }
    .menu {
      margin: 10px 0;
    }
    #footer {
      margin-top: 50px;
    }
}
@media all and (max-width: 860px){
  .pic {
    width: 100%;
    max-width: 470px;
  }
   .description p.link:not(.title) {
    line-clamp: 4;
  }
  .projects {
    width: auto;
  }
  .used {
    margin-top: 15px;
  }
  .project-links {
    margin-top: 15px;
  }
  #containerAbout, #containerProjects, #containerContacts {
    margin-left: 90px;
  }
}
@media all and (max-width: 820px){
  #containerAbout, #containerProjects, #containerContacts {
    margin-left: 4vw;
    margin-right: 4vw;
  }
}
@media all and (max-width: 720px){
  .title {
    margin-top: 20px;
  }
  .text {
    margin-top: 20px;
    font-size: 20px;
  }
  #containerProjects {
    margin-top: 70px;
  }
  #project {
    margin-right: 4vw;
  }
  .link {
    font-size: 15px;
  }
  .pic {
    width: 100%;
    max-width: 350px;
  }
  .used {
    margin-top: 22px;
  }
  .used p {
    font-size: 14px;
  }
  .image {
    margin-bottom: 10px;
}
}
@media all and (max-width: 650px) and (min-height: 360px){
  #navigation {
    min-height: 70px;
    margin-left: 3vw;
    margin-right: 3vw;
  }
  h1 {
    margin-top: 1vw;
    margin-left: 31px;
    font-size: 32px;
  }
  .head {
      margin-left: 31px;
      font-size: 16px;
  }
  @keyframes border {
    to {
      transform: scaleX(1);
    }
  }
  .head::after {
    width: 220px;
    transform: scaleX(0);
    transform-origin: left;
  }
  #container.active {
    width: 40%;
  }
  .menu {
    margin: 5px 0;
    font-size: 28px;
  }
  #containerAbout {
    margin-top: 100px;
  }
  #particles-js, .particles-js-canvas-el {
      max-height: 300px;
  }
  .title-page {
    font-size: 24px;
  }
  .text {
    font-size: 16px;
  }
  #containerProjects, #containerContacts {
    margin-top: 50px;
  }
  #project {
    margin-right: 3vw;
    margin-bottom: 3vw;
  }
  .pic {
    width: 100%;
    max-width: 300px;
  }
  .used {
    margin-top: 2vw;
  }
  .live-demo {
    padding: 4px 15px;
    font-size: 12px;
  }
  .github-link img {
    width: 30px;
  }
  #toggleButton {
    font-size: 18px;
  }
  .text {
    font-size: 16px;
  }
  .contact {
    font-size: 18px;
  }
  .phone {
    font-size: 16px;
  }
  #btn {
    font-size: 18px;
    width: 10rem;
    padding: 3px 15px;
  }
  #footer {
    margin-top: 5vw;
  }
  .image {
    width: 30px;
    margin: 2vw;
  }
  #phrase {
    font-size: 12px;
    margin-top: -3vw;
  }
}
@media all and (max-width: 540px){
  #container.active {
    width: 100%;
  }
  .title-page {
        font-size: 20px;
    }
  .text {
        font-size: 14px;
    }
  .title {
    font-size: 18px;
  }
  .pic {
    width: 100%;
    max-width: 250px;
    object-fit: contain;
  }
  .link {
    font-size: 14px;
  }
  .used p {
    font-size: 11px;
  }
  #toggleButton {
    font-size: 16px;
  }
  .contact {
    font-size: 16px;
  }
  #btn {
    font-size: 16px;
    width: 8rem;
    padding: 3px 15px;
  }
}
@media all and (max-width: 500px){
  .text {
    margin-left: 5vw;
    margin-right: 6vw;
  }
  #project {
    flex-direction: column-reverse;
  }
  .pic {
    margin-top: -28vw;
  }
  #containerProjects, #containerContacts {
    margin-top: 30px;
  }
  h1, .head {
    margin-left: 2vw;
  }
  .title, .link {
    margin-left: 5vw;
  }
  .contact {
    margin-left: 23vw;
  }
}
@media all and (max-width: 450px){
  .hamburger {
    display: block;
  }
  h1 {
    font-size: 24px;
  }
  .head::after {
    width: 170px;
  }
  #container {
    margin-left: 60px;
  }
  .menu {
    font-size: 15px;
    margin-bottom: 13px;
  }
  .pic {
    max-width: 200px;
  }
}
@media all and (max-width: 400px){
  .pic {
    max-width: 180px;
  }
}
@media all and (max-width: 380px){
  .used p {
        font-size: 10px;
    }
}
@media all and (max-width: 360px){
  #container.active {
    padding: 0;
  }
  .menu {
    font-size: 15px;
    margin-bottom: 5px;
  }
  .text, .link {
    font-size: 12px;
  }
  .contact {
    font-size: 14px;
  }
  .used {
    flex-direction: column;
    align-items: end;
  }
  .used p {
    margin-bottom: 1vw;
    margin-right: 2vw;
  }
  .pic {
    margin-top: -47vw;
  }
  .pic.des {
    margin-top: -43vw;
  }
  #containerContacts {
    height: 300px;
    margin-bottom: 30px;
  }
  .image {
    width: 25px;
    margin-bottom: -1vw;
  }
  .live-demo {
    padding: 3px 10px;
    font-size: 11px;
  }
  .project-links {
    margin-right: 2vw;
  }
}
@media all and (max-width: 320px){
  .text, .link {
    font-size: 10px;
  }
  .pic {
    max-width: 160px;
    margin-top: -50vw;
  }
  .pic.des {
    margin-top: -46vw;
  }
  .used {
    margin-top: 3vw;
  }
}
@media all and (max-width: 300px){
  h1 {
    font-size: 14px;
  }
  .head {
    font-size: 7px;
    padding-bottom: 0;
  }
  #main-title {
    margin-top: -5px;
  }
  @keyframes border {
    to {
      transform: scaleX(1);
    }
  }
  #container {
    margin-top: -30px;
    gap: 5px;
  }
  .menu {
    font-size: 12px;
    margin: 0;
  }
  .head::after {
    transform: scaleX(0);
    transform-origin: left;
    width: 100px;
    height: 1.2px;
  }
  #navigation {
    min-height: 40px;
    margin: 0 10px;
  }
  .bar {
    height: 1.5px;
    width: 20px;
  }
  .hamburger.active .bar:nth-child(1) {
    transform: translateY(5px) rotate(45deg);
  }
  .menu {
    font-size: 9px;
    margin-bottom: 7px;
  }
  #containerAbout {
    margin-top: 25vw;
  }
  .title-page {
    font-size: 13px;
  }
  .text, .link {
    font-size: 9px;
    margin-top: 10px;
  }
  #containerProjects {
    margin-top: 7vw;
  }
  #project {
    margin-bottom: 20px;
    gap: 60px;
  }
  .title {
    font-size: 11px;
    margin-top: 10px;
  }
  .description p.link:not(.title) {
    margin-top: 7px;
  }
  .used {
    min-height: 70px;
    justify-content: flex-start;
  }
  .used p {
    margin-bottom: 2vw;
    margin-right: 3vw;
  }
  .project-links {
    margin: 4vw;
    margin-left: 0px;
    margin-bottom: 10vw;
  }
  .live-demo {
    padding: 2px 7px;
    font-size: 8px;
  }
  img {
    width: 25px;
  }
  .pic {
    max-width: 130px;
    margin-top: -100vw;
    margin-bottom: 10vw;
  }
  .pic.des {
    margin-top: -100vw;
  }
  .description {
    margin-bottom: 10vw;
  }
  #button {
    margin-top: 10px;
  }
  #containerContacts::before {
    height: 80px;
  }
  #containerContacts {
    margin-bottom: 0px;
    height: 240px;
  }
  .contact {
    margin-top: 10px;
    margin-left: 19vw;
    font-size: 10px;
  }
  .phone {
    font-size: 11px;
  }
  #btn {
    font-size: 10px;
    width: 6rem;
    padding: 2px 10px;
  }
  #footer {
    margin-top: 15px;
    margin-bottom: -8vw;
  }
  .image {
    width: 15px;
    margin: 5px;
  }
  span {
    font-size: 7px;
    /* text-decoration: none;
    color: #FBFBFB; */
  }
  a[href^="tel"] {
    color: #FBFBFB !important;
    text-decoration: none !important;
  }
  a[href^="tel"]:link,
  a[href^="tel"]:visited,
  a[href^="tel"]:hover,
  a[href^="tel"]:active {
      color: #FBFBFB;
      text-decoration: none;
    }
  #phrase {
    font-size: 7px;
  }
}