/* fonts */
@font-face {
  font-family: "RobotoCondensed";
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url("../assets/fonts/RobotoCondensed-Regular.woff2") format("woff2");
}

@font-face {
  font-family: "RobotoCondensed-Bold";
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  src: url("assets/fonts/RobotoCondensed-Bold.woff2") format("woff2");
}

@font-face {
  font-family: "Montserrat-Bold";
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  src: url("assets/fonts/Montserrat-Bold.woff2") format("woff2");
}

:root {
  /* Цвета фона */
  --bg-header-footer: #919191;
  --bg-body: #ffffff;
  
  /* Цвета текста */
  --text-primary: #5f5f5f;
  --text-secondary: #ffffff;
  
  /* Цвета границ */
  --border-color: #919191;

  /* Цвета состояний */
  --accent: #5f5f5f;
  --accent-hover: rgba(95, 95, 95, 0.8);
  --accent-active: rgba(95, 95, 95, 0.3);
}

[data-theme="dark"] {
  --bg-header-footer: #2d2d2d;
  --bg-body: #1a1a1a;
  --text-primary: #e0e0e0;
  --text-secondary: #e0e0e0;
  --border-color: #404040;
  --accent: #60a5fa;
  --accent-hover: #3b82f6;
  --accent-active: #3b82f6;
}

* {
  box-sizing: border-box;
}

body {
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    margin: 0;
    padding: 0;
    font-family: "RobotoCondensed", "Arial", sans-serif;
    font-size: 16px;
    line-height: 1.5;
    background-color: var(--bg-body);
    transition: background-color 0.3s ease, color 0.3s ease;
  }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  white-space: nowrap;
  border: 0;
  clip: rect(0 0 0 0);
  clip-path: inset(100%);
}

.container {
  max-width: 1440px;
  margin: 0 auto;
}

@media (max-width: 768px) {
  .container {
    max-width: 768px;
    width: 100%;
  }
}

.main-container {
  display: flex;
  flex-wrap: wrap;
}

.section {
  width: 40%;
}

@media (max-width: 768px) {
  .section {
    width: 100%;
  }
}

/* list style */
.list {
  display: flex;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* title style */

.title {
    margin: 0;
    padding: 0 0 25px 0;
    width: max-content;
    font-family: "Montserrat-Bold", "Arial", sans-serif;
    font-size: 28px;
    line-height: 1.5;
    text-transform: uppercase;
    color: rgb(95, 95, 95, 1);
}

@media (max-width: 768px) {
  .title {
    margin: 0 auto;
  }
}

/* link style */

.link {
    text-decoration: none;
    color: inherit;
    border: none;
}

.link:hover,
.link:focus,
.link:focus-visible {
    color: rgba(255, 255, 255, 0.5);
    border: none;
    outline: none;
}

.link:active {
    color: rgba(255, 255, 255, 0.3);
    border: none;
    outline: none;
}

/* nav style */

.main-nav {
  width: 100%;
  margin: 0 auto;
  background-color: var(--bg-header-footer);
  color: var(--text-secondary);
  padding: 20px;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.main-nav__list {
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  flex-direction: row;
  gap: 10px;
}

.main-nav__link {
    font-family: "Montserrat-Bold", "Arial", sans-serif;
    font-size: 20px;
    line-height: 1.5;
    /* text-transform: uppercase; */
    padding:  5px 10px;
    color: rgba(255, 255, 255, 1);
}

/* section style */

.main-container .container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  flex-direction: row;
  border: 2px solid var(--border-color);
  padding: 20px;
  gap: 20px;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.name.section {
  width: 100%;
}

.name {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  flex-direction: row;
  gap: 50px;
}

.name__wrapper--img {
  width: 100px;
  height: 100px;
  display: block;
  margin: 0;
  padding: 0;
  border-radius: 50%;
  border: 3px solid var(--border-color);
  overflow: hidden;
  background-image: url("assets/img/user.svg");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 80px 80px;
}

.name__list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  flex-direction: row;
  align-items: center;
  gap: 50px;
}

.name__item {
  display: block;
  width: max-content;
  margin: 0;
  padding: 10px;
  text-align: center;
  font-family: "RobotoCondensed-Bold", "Arial", sans-serif;
  font-size: 28px;
  line-height: 1.5;
  color: var(--text-primary);
}

.name__btn {
  cursor: pointer;
  width: 30px;
  height: 30px;
  display: block;
  margin: 0;
  padding: 0;
  border-radius: 50%;
  border: 3px solid var(--border-color);
  overflow: hidden;
  background-image: url("assets/img/moon.svg");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 20px 20px;
  transition: background-color 0.3s ease, color 0.3s ease;

   &:hover,
   &:focus,
   &:active {
    opacity: 0.5;
   }
}

[data-theme="dark"] .name__btn {
  background-image: url("assets/img/sun.svg");
}

.contacts__list {
  display: flex;
  flex-wrap: wrap;
  justify-content: start;
  flex-direction: column;
  gap: 25px;
  color: var(--text-primary);
}

.contacts__item {
  position: relative;
  display: block;
  width: max-content;
  margin: 0;
  padding: 0 0 0 40px;
}

.contacts__item--phone::before {
  display: block;
  position: absolute;
  top: 0;
  left: 10px;
  content: "";
  width: 20px;
  height: 20px;
  background-image: url("assets/img/phone.svg");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 20px 20px;
  filter: brightness(1);
  transition: filter 0.3s ease;
}

[data-theme="dark"] .contacts__item--phone::before {
  filter: invert(1);
}

.contacts__item--email::before {
  display: block;
  position: absolute;
  top: 0;
  left: 10px;
  content: "";
  width: 20px;
  height: 20px;
  background-image: url("assets/img/mail.svg");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 20px 20px;
  filter: brightness(1);
  transition: filter 0.3s ease;
}

[data-theme="dark"] .contacts__item--email::before {
  filter: invert(1);
}

.contacts__item--github::before {
  display: block;
  position: absolute;
  top: 0;
  left: 10px;
  content: "";
  width: 20px;
  height: 20px;
  background-image: url("assets/img/github.svg");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 20px 20px;
  filter: brightness(1);
  transition: filter 0.3s ease;
}

[data-theme="dark"] .contacts__item--github::before {
  filter: invert(1);
}

.contacts__link:hover,
.contacts__link:focus {
  color: var(--accent-hover);
}

.contacts__link:active {
  color: var(--accent-active);
}

.skills__list {
  flex-direction: column;
  gap: 25px;
  list-style: square;
  padding: 0 0 0 40px;
  margin: 0;
  color: var(--text-primary);
}

.skills__list li::marker {
  color: var(--accent);
}

.experience__list {
  flex-direction: column;
  gap: 25px;
  list-style: none;
  padding: 0 0 0 40px;
  margin: 0;
  color: var(--text-primary);
}

.experience__list li {
  position: relative;
  width: 315px;
  display: flex;
  flex-wrap: wrap;
  justify-content: start;
  flex-direction: row;

  ::before {
    display: block;
    position: absolute;
    top: 8px;
    left: -16px;
    content: "";
    width: 5px;
    height: 5px;
    background-color: var(--accent);
  }
}

.experience__subtitle {
  display: block;
  margin: 0;
  padding: 0 0 25px 40px;
  font-size: 20px;
  line-height: 1.5;
  color: var(--text-primary);
}

.experience__link:hover,
.experience__link:focus {
    color: var(--accent-hover);
}

.experience__link:active {
    color: var(--accent-active);
}

.about__text {
  display: block;
  margin: 0;
  padding: 0;
  color: var(--text-primary);
}


.code__subtitle {
  display: block;
  margin: 0;
  padding: 0 0 10px 40px;
  font-size: 20px;
  line-height: 1.5;
  color: var(--text-primary);
}

.code__wrapper {
  display: block;
  margin: 0;
  padding: 0 40px 25px 40px;
  font-size: 16px;
  line-height: 1.5;
  color: var(--text-primary);
}

.code__text {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  font-size: 16px;
  line-height: 1.5;
  color: var(--text-primary);
  overflow: scroll;
  overflow-y: hidden;
}

.languages__list {
  flex-direction: column;
  gap: 25px;
  list-style: square;
  padding: 0 0 0 40px;
  margin: 0;
  color: var(--text-primary);
}

.languages__list li::marker {
  color: var(--accent);
}

.footer__wrapper {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  flex-direction: row;
  background-color: var(--bg-header-footer);
  color: var(--text-secondary);
  padding: 20px;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.footer__link {
  display: block;
  width: 93px;
  height: 48px;
}

.footer__link:hover,
.footer__link:focus,
.footer__link:focus-visible {
  opacity: 0.5;
  border: none;
}

.footer__link:active {
  opacity: 0.3;
  border: none;
}
