@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap');

:root {
  --duration: .2s;
  --my-color: #C9EEFF;
  --my-color-light: #EFFAFF;
  --my-color-dark: #0f91cd;
  --my-color-dark-hover: #015e8a;
  --background: #F2F2F2;
  --black: rgb(48 48 48);
  --white: #fcfcfc;
  --white-dark: #f7f7f7;

  --dark-bg: #252525;
  --dark-card: #404040;
  --dark-text: #EAEAEA;
  --dark-border: #606060;
  --dark-links: #93d6f4;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background-color: var(--background);
  color: var(--black);
  font-family: 'Montserrat', sans-serif;
  font-size: 16px;
  overflow-x: hidden;
}

body.dark {
  background-color: var(--dark-bg);
  color: var(--dark-text);
}

.main {
  max-width: 980px;
  margin-left: auto;
  margin-right: auto;
  display: flex;
  flex-direction: column;
  gap: 40px;
  padding: 40px;
}

/* полоса прокрутки (скроллбар) */
::-webkit-scrollbar {
  width: 14px; /* ширина для вертикального скролла */
  height: 8px; /* высота для горизонтального скролла */
  background-color: var(--background);
}

/* ползунок скроллбара */
::-webkit-scrollbar-thumb {
  border: 1px solid var(--my-color);
  background-color: var(--my-color-light);
  border-radius: 9em;
  transition: background-color .2s ease-in-out;
}

::-webkit-scrollbar-thumb:hover {
  background-color: var(--my-color);
}

img {
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

p {
  margin: 0;
}

ul {
  margin: 0;
  padding: 0;
  list-style-type: none;
}

button {
  background-color: transparent;
  border: none;
  outline: none;
  cursor: pointer;
}

.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 100px;
  border: 1px solid var(--my-color);

  padding: 64px;
  background-color: var(--white);
  border-radius: 16px;
}

body.dark .container {
  border: none;
  background-color: var(--dark-card);
}

.instrument {
  color: var(--my-color);
}

/* DESCRIPTION */

.description__container {
  display: flex;
  justify-content: space-between;
  gap: 40px;
}

@media (max-width: 890px) {
  .description__container {
    flex-direction: column-reverse;
  }
}

.description__content {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 32px;
  min-height: 300px;
}

@media (max-width: 890px) {
  .description__photo {
    height: 120px;
    width: 120px;
    border-radius: 120px;
    overflow: hidden;
  }
}

.description__personal_info,
.description__contacts {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.description__contacts div {
  display: flex;
  align-items: center;
  gap: 8px;
}

body.dark .description__contacts div svg path {
  stroke: white;
  fill: var(--dark-bg);
}

.description__title {
  font-size: 48px;
  line-height: 1;
}

.description__name,
.description__text,
.description__contact {
  font-size: 20px;
}

.description__contact {
  width: fit-content;
  color: var(--my-color-dark);
  /* padding: 4px 0 4px 32px; */
  background: left no-repeat;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease-in-out;
}

body.dark .description__contact {
  color: var(--dark-links);
}

.description__contact:hover,
.description__contact:focus,
.description__contact:active {
  color: var(--my-color-dark-hover);
}

.description__image {
  position: relative;
  width: 180px;
  height: 240px;
  border: 1px solid var(--my-color-dark);
  border-radius: 24px;
  z-index: 1;
}

@media (max-width: 890px) {
  .description__image {
    height: 100%;
    width: 100%;
    object-fit: cover;
  }
}

body.dark .description__image {
  border: none;
}

.tags {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tags__item {
  flex-shrink: 0;
  padding: 5px 16px;
  border-radius: 8px;
  border: 1px solid var(--my-color);
  background-color: var(--my-color-light);
}

body.dark .tags__item {
  border: none;
  background-color: var(--dark-bg);
}

.description__visual_block {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  gap: 16px;
}

@media (max-width: 890px) {
  .description__visual_block {
    align-items: flex-start;
  }
}

/* SECTION */

.section__text {
  margin-bottom: 20px;
}

#react,
#web-layout,
#js {
  padding-top: 100px;
  padding-bottom: 100px;
}

/* SKILLS */

.skills__title {
  margin-top: 0;
  font-size: 32px;
  font-weight: 300;
}

.skills__list {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 32px;
  width: 80%;
}

.skills__item {
  padding: 4px 0 4px 32px;
  font-size: 18px;
  background: left no-repeat;
}

.skills__item_react {
  background-image: url(./img/svg/react.svg);
}

.skills__item_redux {
  background-image: url(./img/svg/redux.svg);
}

.skills__item_js {
  background-image: url(./img/svg/javascript.svg);
}

.skills__item_ts {
  background-image: url(./img/svg/typescript.svg);
}

.skills__item_git {
  background-image: url(./img/svg/git.svg);
}

.skills__item_figma {
  background-image: url(./img/svg/figma.svg);
}

.skills__item_ant {
  background-image: url(./img/svg/antdesign.svg);
}

.skills__item_html {
  background-image: url(./img/svg/html.svg);
}

.skills__item_css {
  background-image: url(./img/svg/css.svg);
}

.skills__item_scss {
  background-image: url(./img/svg/scss.svg);
}

.skills__item_styled {
  padding: 4px 0;
}

.skills__additional {
  margin-top: 32px;
  max-width: 600px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* PROJECTS */

.projects__test {
  margin-top: 32px;
  font-size: 18px;
}

.projects__container h2,
.skills__title {
  display: inline-block;
  position: relative;
  margin-top: 0;
  font-size: 32px;
  font-weight: 300;
  z-index: 1;
}

/* .projects__container h2::before,
.skills__title::before {
  content: "";
  position: absolute;
  top: calc(50%);
  left: -10px;
  width: calc(100% + 20px);
  height: 16px;
  background-color: var(--my-color-light);
  z-index: -1;
  border-radius: 4px;
} */

/* body.dark .projects__container h2::before,
body.dark .skills__title::before {
  background-color: var(--dark-bg);
} */

.projects__list {
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.projects__title {
  margin-top: 0;
  margin-bottom: 8px;
  font-weight: 300;
  font-size: 24px;
  font-weight: 400;
}

.projects__title span {
  font-size: 20px;
  font-weight: 300;
}

.projects__content {
  display: flex;
  gap: 32px;
}

@media (max-width: 980px) {
  .projects__content {
    flex-direction: column;
  }

  .projects__item_description {
    margin-top: 0;
  }
}

.projects__image {
  flex-shrink: 0;
  border: 1px solid var(--white-dark);
  border-radius: 8px;
  height: 180px;
  object-fit: cover;
}

body.dark .projects__image {
  border: 1px solid var(--dark-border);
}

.projects__image-bot {
  height: auto;
}

.projects__item_description {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
}

.projects__text {
  padding: 20px;
  border-radius: 16px;
  border: 1px solid var(--my-color);
  background-color: var(--my-color-light);
}

body.dark .projects__text {
  border: none;
  background-color: var(--dark-bg);
}

.projects__links {
  display: flex;
  gap: 8px;
}

.projects__link {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border: 1px solid var(--my-color);
  border-radius: 8px;
  min-width: 100px;
  transition: background-color 0.2s ease-in-out;
}

.projects__link:hover {
  background-color: var(--my-color-light);
}

body.dark .projects__link:hover {
  background-color: var(--dark-bg);
}


.left,
.right {
  position: absolute;
  top: 50%;
  width: 40px;
  height: 40px;
  border: 1px solid white;
  border-radius: 50%;
}

.left {
  left: 0;
  transform: rotate(-90deg);
}
.right {
  right: 0;
  transform: rotate(90deg);
}


/* FOOTER */

.footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 50px;
  color: gray;
  font-size: 12px;
}

.footer a {
  color: rgb(100, 100, 196);
}

/* BUTTON */

.button-up {
  display: none;
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid white;
  transition-property: border-color, box-shadow, transform;
  transition-duration: var(--duration);
  transition-timing-function: ease-in-out;
}

.button-up:hover {
  box-shadow: 0 0 10px var(--my-color);
  border-color: transparent;
  transform: scale(1.1);
}

.button-up svg {
  transition: fill var(--duration) ease-in-out;
}

.button-up:hover svg {
  fill: var(--my-color);
}


@media (max-width: 700px) {

  .header__container {
    flex-direction: column;
  }

  .header__logo {
    margin-bottom: 20px;
  }

  .description {
    padding-top: 60px;
  }

  .gallery__item {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .gallery__item > a {
    width: fit-content;
  }

  .gallery__item-description {
    font-size: 14px;
  }

}

@media (max-width: 450px) {

  .container {
    padding-left: 20px;
    padding-right: 20px;
  }

  .gallery__item-description {
    width: 80%;
  }

}
