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

html {
  scroll-behavior: smooth;
  font-size: 10px;
  height: 100%;
}

:root {
  /* light */
  --primary-color: #292929;
  --secondary-color: #636363;
  --divider-color: #C6C6C6;
  --background-color: #DCDCDC;
  /* dark */
  --primary-dark-color: #FFFFFF;
  --secondary-dark-color: #9A9A9A;
  --divider-dark-color: #484848;
  --background-dark-color: #2D2D2D;
}

body {
  height: 100%;
  font-family: 'Poppins', sans-serif;
  background-color: var(--background-color);
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.3s ease;
}

.main {
  position: relative;
  flex: 1 1 auto;
}

.up-btn {
  position: absolute;
  bottom: -72px;
  right: 16px;
  cursor: pointer;
}

.prompt-up-btn {
  bottom: 1.6rem;
}

.super-main-container {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.6rem;
}

.header-nav {
  transform: translateX(100%);
  width: 100%;
  height: 100%;
  overflow: hidden;
  position: fixed;
  z-index: 10;
  background-color: var(--background-color);
  transition: .3s all ease;
  top: 0;
  left: 0;
  padding: 1.6rem 4.6rem;
  display: flex;
  flex-direction: column;
}

.header-nav.open {
  transform: translateX(0%);
}

.header-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2.4rem;
  margin-top: 2.4rem;
}

.header-item {
  padding: 1.8rem 0;
}

.header-link {
  font-weight: 500;
  font-size: 1.8rem;
  line-height: 2.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--secondary-color);
  text-decoration: none;
  transition: .3s;
}

.header-link:hover {
  color: var(--primary-color);
}

.dark-mode-box {
  padding-bottom: 2.4rem;
  border-bottom: 2px solid var(--divider-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.close-icon {
  cursor: pointer;
}

.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  margin-left: 3.7rem;
}

.switch::before {
  content: url(../assets/images/light_mode.svg);
  position: absolute;
  right: 50px;
  top: -4px;
}

.switch::after {
  content: url(../assets/images/dark_mode.svg);
  position: absolute;
  left: 50px;
  top: -4px;
}

.switch input { 
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--secondary-color);
  -webkit-transition: .4s;
  transition: .4s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 4px;
  bottom: 4px;
  background-color: var(--background-color);
  -webkit-transition: .4s;
  transition: .4s;
}

input:checked + .slider {
  background-color: var(--background-color);
}

input:focus + .slider {
  box-shadow: 0 0 1px var(--background-color);
}

input:checked + .slider:before {
  -webkit-transform: translateX(20px);
  -ms-transform: translateX(20px);
  transform: translateX(20px);
  background-color: var(--secondary-color);
}

/* Rounded sliders */
.slider.round {
  border-radius: 34px;
}

.slider.round:before {
  border-radius: 50%;
}

.section-profile {
  padding: 1.6rem 0 0 0;
  position: relative;
  grid-area: a;
}

.burger-icon {
  position: absolute;
  right: 0px;
  top: 16px;
  cursor: pointer;
}

.prompt-burger-icon {
  right: 1.6rem;
}

.profile-avatar > img{
  width: 100%;
  border-radius: 0 50% 50% 50%;
}

.section-profile-title {
  margin-top: 0.8rem;
}

.main-title {
  font-size: 4.4rem;
  font-weight: 500;
  line-height: 6.6rem;
  color: var(--secondary-color);
}

.section-subtitle {
  font-weight: 500;
  font-size: 1.6rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--primary-color);
}

.section-title {
  font-weight: 400;
  font-size: 3.2rem;
  line-height: 3.2rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--secondary-color);
  border-bottom: 2px solid var(--divider-color);
  padding-bottom: 1.6rem;
}

.summary-text {
  font-weight: 400;
  font-size: 1.8rem;
  line-height: 3.2rem;
  letter-spacing: 0.04em;
  color: var(--primary-color);
  margin-top: 1.6rem;
}

.section {
  margin-bottom: 8rem;
}

.section-list {
  margin-top: 1.6rem;
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
  padding-left: 2rem;
}

.contacts-list {
  list-style: none;
  padding-left: 2.5rem;
}

.section-list.contacts-list {
  padding-left: 0;
}

.contacts-item {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

.contacts-item::before {
  content: '';
  width: 24px;
  height: 24px;
  background-size: contain;
  background-repeat: no-repeat;
  margin-right: 10px;
}

.text-bold {
  font-weight: 500;
}

.contacts-item:nth-child(1)::before {
  background-image: url(../assets/images/location_on.svg);
}

.contacts-item:nth-child(2)::before {
  background-image: url(../assets/images/mail.svg);
}
.contacts-item:nth-child(3)::before {
  background-image: url(../assets/images/Github\ -\ Negative.svg);
}
.contacts-item:nth-child(4)::before {
  background-image: url(../assets/images/Telegram\ -\ Negative.svg);
}
.contacts-item:nth-child(5)::before {
  background-image: url(../assets/images/Discord\ -\ Negative.svg);
}

.contacts-link {
  margin-left: 0.5rem;
  color: var(--secondary-color);
  transition: 0.3s;
}

.contacts-link:hover {
  color: var(--primary-color);
}

.section-item {
  font-weight: 400;
  font-size: 1.8rem;
  line-height: 3.2rem;
  letter-spacing: 0.04em;
  color: var(--primary-color);
}

.section-projects-wrapper {
  display: flex;
  flex-direction: column;
}

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

.projects-link {
  display: inline-flex;
  align-items: center;
  margin-top: 1.6rem;
  text-decoration: none;
  color: var(--primary-color);
  font-weight: 400;
  font-size: 1.8rem;
  line-height: 3.2rem;
  letter-spacing: 0.04em;  
  transition: .3s;
}

.projects-link::after {
  content: url(../assets/images/open_in_new.svg);
  width: 24px;
  height: 24px;
  background-repeat: no-repeat;
  background-size: contain;
  margin-left: 0.4rem;
}

.projects-link:hover {
  color: var(--secondary-color);
}

.footer {
  background-color: var(--primary-color);
  padding: 0.8rem 0;
}

.footer-signature {
  font-weight: 400;
  font-size: 1.8rem;
  line-height: 3.2rem;
  letter-spacing: 0.04em;
  color: var(--divider-color);
}

.footer-github-link {
  font-weight: 400;
  font-size: 1.2rem;
  line-height: 1.8rem;
  letter-spacing: 0.04em;
  color: var(--background-color);
  text-decoration: none;
}

.section-prompts {
  margin-top: 8rem;
}

.accordion {
  margin-top: 3.2rem;
}

.accordion-header {
  color: var(--secondary-color);
  font-size: 2.4rem;
  border: none;
  background: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
}


.accordion-content {
  max-height: 0;
  overflow: hidden;
  margin-top: 1.8rem;
  font-size: 1.6rem;
  display: flex;
  flex-direction: column;
  transition: max-height 0.7s ease, padding 0.7s ease;
}

.accordion-item.active .accordion-content {
  max-height: 3000px;
}

.arrow {
  margin-left: 1.6rem;
  transition: transform 0.5s ease;
  fill: var(--secondary-color);
}

.accordion-item.active .arrow {
  transform: rotate(-180deg);
}

.question {
  background-color: var(--primary-dark-color);
  width: 50%;
  padding: 2.2rem;
  border-radius: 2rem;
  align-self: flex-end;
}

.question > p:not(:last-child) {
  margin-bottom: 1rem;
}

.answer {
  margin-top: 1.8rem;
  margin-bottom: 1.8rem;
  width: 75%;
  background-color: var(--divider-color);
  padding: 2.2rem;
  border-radius: 2rem;
  align-self: flex-start;
}

.answer > p:not(:last-child) {
  margin-bottom: 1rem;
}

.prompt-list {
  padding-left: 2.8rem;
  margin-bottom: 1rem;
}

.prompt-list > li:not(:last-child) {
  margin-bottom: 0.9rem;
}

@media (min-width: 420px) {
  .container {
    padding: 0 4.6rem;
  }

  .up-btn {
    right: 46px;
  }

  .burger-icon {
    right: 0;
  }


}

@media (min-width: 576px) {
  .section-profile {
    display: flex;
    align-items: center;
    gap: 4.4rem;
  }
}

@media (min-width: 992px) {
  .burger-icon {
    display: none;
  } 

  .close-icon {
    display: none;
  }
  
  .header-nav {
    transform: none;
    position: inherit;
    overflow: auto;
    height: auto;
    width: auto;
    flex-direction: row-reverse;
    justify-content: space-between;
    padding: 0;
    background-color: none;
  }

  body.dark .header-nav {
    background-color: none;
  }

  .header-list {
    flex-direction: row;
    margin-top: 0;
    align-items: center;
  }

  .dark-mode-box {
    padding: 0;
    border-bottom: none;
  }

  .switch {
    margin-left: 0;
    margin-right: 3.7rem;
  }

  .section-profile {
    margin-top: 8.8rem;
  }

  .main-title {
    font-size: 5.6rem;
  }
}

@media (min-width: 1200px) {
  .container {
    padding: 0;
  }
  
  .main-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    grid-template-areas: 'a a' 'b c' 'b c';
    gap: 8rem;
  }

  .main-title {
    font-size: 9.6rem;
    line-height: 14.4rem;
  }

  .section-subtitle {
    font-size: 3.2rem;
  }

  .header-link {
    position: relative;
  }

  .header-link::before {
    content: '';
    position: absolute;
    left: 0;
    bottom: -18px;
    width: 0;
    height: 1px;
    background-color: var(--primary-color);
    transition: width 0.35s;
  }

  .header-link:hover::before {
    width: 100%;
  }

  body.dark .header-link::before {
    background-color: #FFFFFF;
  }

  body.dark .dark-mode-box {
    border-bottom: none;
  }

  .footer > .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .up-btn {
    bottom: 8px;
    right: 79px;
  }
}

@media (max-width: 1000px) {
  .question {
    font-size: 1.2rem;
    padding: 1rem;
    width: 75%;
  }

  .question > p:not(:last-child) {
    margin-bottom: 0.5rem;
  }

  .answer {
    font-size: 1.2rem;
    padding: 1rem;
  }
}

/* dark theme */

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

body.dark .header-nav {
  background-color: var(--background-dark-color);
}

body.dark .header-link {
  color: var(--secondary-dark-color);
}

body.dark .header-link:hover {
  color: #FFFFFF;
}

body.dark .slider {
  background-color: var(--secondary-dark-color);
}

body.dark .slider:before {
  background-color: var(--background-dark-color);
}

body.dark input:checked + .slider {
  background-color: var(--secondary-dark-color);
}

body.dark input:focus + .slider {
  box-shadow: 0 0 1px var(--background-dark-color);
}

body.dark input:checked + .slider:before {
  background-color: var(--background-dark-color);
}

body.dark .switch::before {
  content: url(../assets/images/dark_light_mode.svg);
}
body.dark .switch::after {
  content: url(../assets/images/dark_dark_mode.svg);
}

body.dark .main-title {
  color: var(--secondary-dark-color);
}

body.dark .section-subtitle {
  color: var(--primary-dark-color);
}

body.dark .section-title {
  color: var(--secondary-dark-color);
  border-bottom: 2px solid var(--divider-dark-color);
}

body.dark .summary-text {
  color: var(--primary-dark-color);
}

body.dark .contacts-item:nth-child(1)::before {
  background-image: url(../assets/images/dark_location_on.svg);
}
body.dark .contacts-item:nth-child(2)::before {
  background-image: url(../assets/images/dark_mail.svg);
}
body.dark .contacts-item:nth-child(3)::before {
  background-image: url(../assets/images/dark_Github.svg);
}
body.dark .contacts-item:nth-child(4)::before {
  background-image: url(../assets/images/dark_Telegram.svg);
}
body.dark .contacts-item:nth-child(5)::before {
  background-image: url(../assets/images/dark_Discord.svg);
}

body.dark .contacts-link {
  color: var(--secondary-dark-color);
}

body.dark .contacts-link:hover {
  color: var(--primary-dark-color);
}

body.dark .section-item {
  color: var(--primary-dark-color);
}

body.dark .projects-link {
  color: var(--primary-dark-color);
}

body.dark .projects-link::after {
  content: url(../assets/images/dark_open_in_new.svg);
}

body.dark .projects-link:hover {
  color: var(--secondary-dark-color);
}

body.dark .footer {
  background-color: var(--divider-dark-color);
}

body.dark .footer-signature {
  color: var(--secondary-dark-color);
}

body.dark .footer-github-link {
  color: var(--secondary-dark-color);
}

body.dark .close-icon rect {
  fill: var(--divider-dark-color);
}

body.dark .close-icon path {
  fill: #FFFFFF;
}

body.dark .burger-icon rect {
  fill: var(--divider-dark-color);
}

body.dark .burger-icon path {
  fill: #FFFFFF;
}

body.dark .up-btn path:first-child {
  fill: var(--divider-dark-color);
}

body.dark .up-btn path:last-child {
  fill: #FFFFFF;
}

body.dark .accordion-header {
  color: var(--secondary-dark-color);
}

body.dark .arrow {
  fill: var(--secondary-dark-color);
}