:root {
  --font-family: "IBM Plex Mono", sans-serif;
  --second-family: "Inter", sans-serif;
  --third-family: "Instrument Serif", sans-serif;
}

body {
  position: relative;
}

/* Header */

.header {
  position: relative;
  z-index: 5;
}

.header__container {
  padding: 8px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-r__content {
  display: flex;
  align-items: center;
  gap: 346px;
}

.header-menu__list {
  list-style-type: none;
  display: flex;
  flex-direction: row;
  gap: 46px;
}

.header-menu__link {
  font-family: var(--font-family);
  font-weight: 300;
  font-size: 18px;
  letter-spacing: -0.06em;
  color: #000;
  text-decoration: none;
}

.header-menu__link:hover {
  text-decoration: underline;
}

.black-bttn__common {
  font-family: var(--font-family);
  font-weight: 300;
  font-size: 18px;
  letter-spacing: -0.06em;
  color: #fff;
  background: #000;
  border-radius: 40px;
  padding: 10px 15px;
  width: 148px;
  height: 33px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  line-height: 100%;
  height: 40px;
}

/* Page content */

.common-portfolio__link-bottom img {
  max-width: 100%;
  height: 100%;
}

.screen {
  padding-top: 60px;
}

.screen-overall__container {
  display: flex;
  flex-wrap: wrap;
  flex-direction: column;
  margin: 0px 20px 0px 20px;
  height: 100%;
}

.screen__content {
  display: flex;
  /* justify-content: center;
    align-items: center; */
  flex-direction: column;
  height: 100%;
}

.page-bottom__line {
  display: flex;
  justify-content: space-between;
  align-items: end;
  margin-top: auto;
  flex-wrap: wrap;
}

.main-page__heading {
  font-family: var(--second-family);
  font-weight: 300;
  font-size: 208px;
  letter-spacing: -0.04em;
  color: #000;
  display: flex;
  gap: 24px;
  align-items: center;
  margin-top: -20px;
}

.mine-h1-block {
  display: flex;
  flex-direction: column;
}

.sm-prof-mine {
  color: #000;
  font-family: "IBM Plex Mono";
  font-size: 18px;
  font-style: normal;
  font-weight: 300;
  line-height: normal;
  letter-spacing: -1.08px;
  margin-bottom: -12px;
}

.main-page__heading span {
  font-family: var(--third-family);
  font-style: italic;
  font-weight: 400;
  font-size: 230px;
  letter-spacing: -0.05em;
  color: #000;
}

.bottom-logo-container {
  width: 100px;
  height: 41px;
  margin-bottom: 30px;
}

.latest-works__row {
  margin-top: 231px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.latest-works__row h3 {
  color: #000;
  font-family: "IBM Plex Mono";
  font-size: 18px;
  font-style: normal;
  font-weight: 300;
  line-height: normal;
  letter-spacing: -1.08px;
}

.conectp-block__item {
  display: flex;
  width: 228px;
  height: 228px;
  padding: 60px;
  justify-content: center;
  align-items: center;
  background: #333;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
  overflow: hidden;
}

.conectp-block__item::before {
  width: 100px;
  height: 100px;
  content: "";
  border-radius: 50%;
  background: #0057ff;
  position: absolute;
  bottom: -50px;
  left: 50%;
  transform: translateX(-50%) scale(0);
  transition: 0.5s;
  z-index: -1;
}

.behance-icon {
  position: absolute;
  bottom: -28px;
  left: 10px;
  transition: 0.3s;
}

.conectp-block__item:hover::before {
  transform: translateX(-50%) scale(7);
}

.conectp-block__item:hover .behance-icon {
  bottom: 8px;
}

.concept-icon__container {
  z-index: 5;
  position: relative;
}

.concept-icon__container img {
  max-width: 100%;
  max-height: 100%;
}

.designer-block {
  margin-left: auto;
  display: flex;
  align-items: flex-end;
  flex-direction: column;
  margin-top: 20px;
}

.bottom-quote__img {
  width: 228px;
  height: 226px;
}

.bottom-quote__img img,
.designer__photo img {
  max-width: 100%;
  width: 100%;
  height: 100%;
}

.designer__photo {
  width: 228px;
  height: 228px;
}

.designer__name {
  color: #000;
  text-align: right;
  font-family: Inter;
  font-size: 26px;
  font-style: normal;
  font-weight: 300;
  line-height: normal;
  letter-spacing: -1.3px;
  align-self: stretch;
  margin-top: 20px;
}

.designer__status {
  color: #000;
  text-align: right;
  font-family: "IBM Plex Mono";
  font-size: 18px;
  font-style: normal;
  font-weight: 300;
  line-height: normal;
  letter-spacing: -1.08px;
  align-self: stretch;
}

.bottom-quote__block {
  margin-top: auto;
  padding-bottom: 25px;
  display: flex;
  flex-direction: column;
}

.bottom-quote__text {
  margin-top: 20px;
  color: #000;
  font-family: Inter;
  font-size: 26px;
  font-style: normal;
  font-weight: 300;
  line-height: 32px; /* 123.077% */
  letter-spacing: -1.3px;
  align-self: stretch;
}

.bottom-quote__author {
  align-self: stretch;
  margin-top: 6px;
  color: #000;
  font-family: "IBM Plex Mono";
  font-size: 18px;
  font-style: normal;
  font-weight: 300;
  line-height: normal;
  letter-spacing: -1.08px;
}

.about__block {
  max-width: 700px;
  transform: translateX(calc(100% + 40px));
}

.about__block.open {
  transform: translateX(0);
}

.about-block__exit__pc {
  cursor: pointer;
}

.common-popup {
  position: fixed;
  top: 20px;
  bottom: 20px;
  right: 20px;
  margin-left: 20px;
  background: #000;
  z-index: 1000;
  padding: 20px;
  display: flex;
  flex-direction: column;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  overflow-y: auto; /* добавляем скролл если контента много */
}

.portfolio__block.open {
  transform: translateY(0);
}

.about__block.open {
  transform: translateX(0);
}

.about-block__r {
  color: #fff;
  text-align: right;
  font-family: "IBM Plex Mono";
  font-size: 18px;
  font-style: normal;
  font-weight: 300;
  line-height: normal;
  letter-spacing: -1.08px;
  display: flex;
  top: auto;
}

.popup-common-block__header-pc {
  display: flex;
  justify-content: space-between;
}

.about-block__content-text {
  margin-top: 56px;
  color: #fff;
  font-family: Inter;
  font-size: 26px;
  font-style: normal;
  font-weight: 300;
  line-height: 32px; /* 123.077% */
  letter-spacing: -1.3px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.about-block__author {
  display: flex;
  margin-top: auto;
  align-items: flex-end;
  justify-content: space-between;
}

.about-block__author-img {
  width: 200px;
  height: 200px;
}

.about-block__author-img img {
  max-width: 100%;
  max-height: 100%;
}

.popup-common-block__title {
  color: #fff;
  font-family: "IBM Plex Mono";
  font-size: 18px;
  font-style: normal;
  font-weight: 300;
  line-height: normal;
  letter-spacing: -1.08px;
}

.grid-of__works {
  /* display: flex;
  gap: 8px; */
  display: grid;
  grid-template-columns: 1fr 916 1fr 300 1fr 608; /* не то */
  /* правильный вариант: */
  grid-template-columns: 916fr 300fr 608fr;
  gap: 8px;
  width: 100%;
  height: 100%;
  margin-top: 20px;
}

.works__r-column {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 608px;
  width: 100%;
}

.big-blue-block__work {
  background: #0057ff;
  width: 100%;
  max-width: 916px;
  color: #fff;
}

.portfc-b {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.portfc-b img {
  width: 44px;
}

.portfc-b p {
  color: #fff;
  text-align: center;
  font-family: "Instrument Serif";
  font-size: 60.28px;
  font-style: italic;
  font-weight: 400;
  line-height: normal;
  letter-spacing: -3.014px;
  align-self: stretch;
}

.big-blue-block__work:hover {
  border-radius: 60px;
}

.big-grey-block__work {
  background: #424242;
  max-width: 300px;
  width: 100%;
  color: #999999;
}

.big-grey-block__work:hover {
  border-radius: 60px;
}

.dark-grey__work {
  background: #151515;
  height: 100%;
  color: #666666;
}

.dark-grey__work:hover {
  border-radius: 60px;
}

.white__work {
  color: #808080;
  background-color: #fff;
  height: 100%;
  background-image: url(../img/rock.png);
  background-repeat: no-repeat;
  background-position: bottom right;
  background-size: auto;
}

.white__work:hover {
  border-radius: 60px;
}

.portfolio__block {
  width: calc(100% - 40px);
  max-height: 831px;
  transform: translateY(calc(-120%));
}

.common-work__portflolio {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  transition: 0.3s;
}

.blur-overlay {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
  pointer-events: none;
  transition:
    backdrop-filter 0.6s ease,
    -webkit-backdrop-filter 0.6s ease;
  z-index: 999;
}

.blur-overlay.active {
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  pointer-events: auto;
}

/* Else */

.header-mobile__conntainer {
  width: 100%;
}

.header-right__mob {
  display: flex;
  padding-bottom: 5px;
  margin-left: auto;
  gap: 19px;
}

/* ADAPTIVE */

@media (max-width: 1250px) {
  .main-page__heading {
    font-size: 142.667px;
  }
  .main-page__heading span {
    font-size: 157.258px;
  }
}

@media (min-width: 834px) {
  .header-mob {
    display: none;
  }
}

@media (max-width: 834px) {
  .header-r__content {
    gap: 39px;
  }
  .main-page__heading {
    flex-direction: column;
    gap: 6px;
    margin-top: 0px;
  }
  .main-page__heading span {
    margin-top: -38px;
  }
}

@media (max-width: 822px) {
  .header__container {
    padding: 10px;
  }

  .header-mobile__conntainer {
    display: flex;
    align-items: center;
    position: relative;
    width: 100%;
  }

  .two-bttns__block {
    position: absolute;
    display: flex;
    gap: 8px;
    top: 60px;

    margin-left: auto;
    margin-right: auto;
    left: 0;
    right: 0;
    /* width: fit-content; */
    width: 100%;
    padding-left: 10px;
    padding-right: 10px;
  }

  .popup-opener {
    display: flex;
    padding: 10px;
    width: 100%;
    height: 33px;
    justify-content: center;
    align-items: center;
    gap: 10px;
    border-radius: 40px;
    border: 1px solid #000;

    color: #000;
    leading-trim: both;
    text-edge: cap;
    font-family: "IBM Plex Mono";
    font-size: 18px;
    font-style: normal;
    font-weight: 300;
    line-height: normal;
    letter-spacing: -1.08px;
    background-color: transparent;
    transition: 0.3s;
  }

  .popup-opener.active {
    border-radius: 0px;
  }

  .menu-bttn__header {
    display: flex;
    width: 57px;
    /* height: 33px; */
    padding: 10px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    border-radius: 20px;
    border: 1px solid #000;
    height: 40px;
  }

  .header-mobile__conntainer {
    position: relative;
    width: 100%;
  }

  .menu-bttn__header {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    cursor: pointer;
    z-index: 1001;
  }

  .menu-bttn__header svg {
    position: absolute;
    transition: transform 0.3s ease;
  }

  .menu-bttn__header svg:first-child {
    transform: translateY(-5px);
  }

  .menu-bttn__header svg:last-child {
    transform: translateY(5px);
  }

  .menu-bttn__header.active svg:first-child {
    transform: rotate(45deg);
  }

  .menu-bttn__header.active svg:last-child {
    transform: rotate(-45deg);
  }

  .two-bttns__block {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-30px);

    transition:
      transform 0.4s ease,
      opacity 0.3s ease,
      visibility 0s linear 0.4s;

    z-index: 1001;
  }

  .two-bttns__block.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);

    transition:
      transform 0.4s ease,
      opacity 0.3s ease,
      visibility 0s;
  }

  body.mobile-menu-open .header {
    z-index: 1001;
  }

  .portfolio__block {
    transform: translateX(calc(-100% - 40px));
  }

  .portfolio__block.open {
    transform: translateX(0);
  }

  .about__block {
    transform: translateX(calc(100% + 40px));
  }

  .about__block.open {
    transform: translateX(0);
  }

  .common-popup {
    max-height: 86vh;
    margin-top: auto;
    top: 10px;
    margin-left: 10px;
    bottom: 10px;
    padding: 10px;
  }
}

@media (max-width: 822px) {
  /* FIRST PAGE */

  .latest-works__row {
    margin-top: 77px;
  }

  .main-page__heading {
    font-size: 88px;
    display: flex;
    flex-direction: column;
    gap: 0;
    padding-bottom: 20px;
    align-items: flex-start;
  }

  .main-page__heading span {
    font-size: 97px;
    line-height: 92px;
  }

  .page-bottom__line {
    position: relative;
  }

  .bottom-logo-container {
    position: absolute;
    right: 0px;
    bottom: -16px;
  }

  /* Second page */

  .designer__photo {
    width: 200px;
    height: 200px;
  }

  .designer__name {
    font-size: 20px;
  }

  .designer__status {
    font-size: 16px;
  }

  .bottom-quote__text {
    font-size: 20px;
  }

  .bottom-quote__author {
    font-size: 16px;
  }

  .bottom-quote__img {
    width: 200px;
    height: 200px;
  }

  .conectp-block__item {
    width: 187px;
    height: 187px;
    padding: 49px;
  }

  .logo3d {
    align-items: center;
  }

  .logo3d canvas {
    width: 91vw !important;
    height: 112px !important;
    transform: scale(1.5);
  }

  /* Portfolio */

  .grid-of__works {
    margin-top: 0px;
  }

  .big-blue-block__work {
    height: 292px;
  }

  .big-grey-block__work,
  .dark-grey__work {
    height: 143px;
  }

  .white__work {
    height: 142px;
  }

  /* POPUPS */

  .about-block__content-text {
    font-size: 18px;
    margin-top: 0px;

    font-size: 18px;
    font-style: normal;
    font-weight: 300;
    line-height: 22px; /* 122.222% */
    letter-spacing: -0.72px;
  }
  .about-block__author {
    flex-direction: column;
    margin-top: 0px;
    height: 100%;
    justify-content: none;
  }
  .about-block__l {
    margin: auto;
  }
  .about-block__author-img {
    width: 120px;
    height: 120px;
  }

  .grid-of__works {
    display: flex;
    flex-direction: column;
  }

  .common-work__portflolio {
    max-width: 100%;
    padding: 8px;
    background-size: contain;
    background-position: 105% 5vh;
  }

  .white__work .common-portfolio__link-bottom img {
    filter: brightness(5);
  }

  .common-portfolio__link-bottom {
    margin-left: auto;
    width: 22px;
    height: 22px;
  }

  .common-portfolo__top-title {
    text-align: center;
  }

  .common-portfolio__center-content img.spec-img {
    width: 34px;
  }

  .big-grey-block__work .common-portfolio__center-content img,
  .portfc-b img {
    height: 28px;
  }

  .portfc-b p {
    font-size: 76px;
  }

  .screen {
    max-height: 100%;
  }

  .big-blue-block__work {
    height: 41.83%;
  } /* 248 / 863 */
  .big-grey-block__work {
    height: 18.74%;
  } /* 361 / 863 */

  .works__r-column {
    height: 36.43%;
    /* 254 / 863 */
  }

  .works__r-column .common-work__portflolio {
    height: 50%; /* по 127 */
  }
}

@media (max-width: 767px) {
  .popup-common-block__header-pc {
    display: none;
  }
  .header-pc {
    display: none;
  }
}

@media (max-width: 550px) {
  .main-page__heading span {
    margin-top: 0px;
  }
  .bottom-quote__img,
  .designer__photo {
    width: 187px;
    height: 187px;
  }
}

@media (max-width: 420px) {
  .black-bttn__common {
    font-size: 12px;
    width: 147px;
    padding: 10px 15px;
    font-size: 18px;
    font-style: normal;
  }
  .popup-opener {
    width: 100%; /*152px;*/
  }
  .about-block__content-text {
    font-size: 16px;
  }
  .about-block__r {
    font-size: 16px;
  }
  .about-block__author-img {
    width: 100px;
    height: 100px;
  }
}

@media (max-width: 360px) {
  .logo3d canvas,
  .logo3d {
    min-width: 80vw;
    max-width: 100vw;
    max-height: 60vw;
  }
  .main-page__heading {
    font-size: 18vw;
    gap: 6px;
  }
  .main-page__heading span {
    font-size: 18vw;
  }
}
