body {
  --color-bg: #fff;
  --color-item-bg: #f7f7f7;
  --color-text: #666666;
  --color-text-secondary: #b3b3b3;
  --color-svg: #212121;
}

body.dark-theme {
  --color-bg: #1E1E1E;
  --color-item-bg: #252525;
  --color-text: #a5a5a5;
  --color-text-secondary: #616161;
  --color-svg: #e2e2e2;
}

@media (prefers-color-scheme: dark) {

  /* defaults to dark theme */
  body {
    --color-bg: #1E1E1E;
    --color-item-bg: #252525;
    --color-text: #a5a5a5;
    --color-text-secondary: #616161;
  }

  body.light-theme {
    --color-bg: #fff;
    --color-item-bg: #f7f7f7;
    --color-text: #666666;
    --color-text-secondary: #b3b3b3;
  }
}

* {
  margin: 0;
  padding: 0;

  color: var(--color-text);
}

body {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 24px;

  background: var(--color-bg);
}

a {
  text-decoration: none;
}

h3 {
  margin-top: 36px;

  font-weight: 500;
  font-size: 18px;
  line-height: 24px;
}

ul.experience__desc {
  margin-top: 6px;

  list-style-position: inside;
  list-style-type: square;
}

ul.experience__desc li {
  text-align: left;
  color: var(--color-text-secondary);
}

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

.grid-container {
  display: grid;
  grid-template-columns: 280px 280px 280px 280px;
  grid-template-rows: 280px 280px 280px 1fr 280px;
  gap: 24px;
  margin-left: 64px;
  margin-right: 184px;
  padding-top: 64px;
}

.btn-toggle {
  grid-column: 1;

  place-self: start start;
  z-index: 10;
}

.btn-toggle path {
  fill: var(--color-svg);
}

.btn-toggle svg:hover {
  cursor: pointer;
}

.grid-item-userpic {
  grid-column: 2;
}

.grid-item-userpic img {
  width: 100%;
}

.grid-item-education {
  grid-column: 4;

  font-weight: 400;
  font-size: 24px;
  line-height: 40px;
}

.grid-item-education span {
  color: var(--color-text-secondary);
}

.grid-item-name-title {
  grid-column: 1;
  grid-row: 2;
}

.name {
  margin: 0;

  font-weight: 500;
  font-size: 36px;
  line-height: 44px;
}

.subtitle {
  font-weight: 500;
  font-size: 22px;
  line-height: 30px;
  color: var(--color-text-secondary);
}

.grid-item-stack {
  grid-column: 3 / span 2;
  grid-row: 2;
  display: grid;
  align-items: end;

  font-weight: 400;
  font-size: 24px;
  line-height: 40px;

  background-color: var(--color-item-bg);
}

.grid-item-stack p:first-child {
  font-weight: 500;
}

.grid-item-contact {
  grid-column: 4;
  grid-row: 2;
  place-self: start end;

  text-align: right;
}

.grid-item-contact p {
  font-weight: 400;
  font-size: 14px;
  line-height: 24px;
  color: var(--color-text-secondary);
}

.grid-item-contact a {
  color: var(--color-text-secondary);
}

.grid-item-projects {
  grid-column: 1;
  grid-row: 4;

  font-weight: 500;
  font-size: 24px;
  line-height: 40px;
}

.projects__list {
  list-style: none;
}

.projects__list a {
  font-weight: 400;
  color: var(--color-text-secondary);
}

.grid-item-experience {
  grid-column: 3 / span 2;
  grid-row: 4;
}

.experience {
  margin-bottom: 112px;
}

.experience__header {
  font-weight: 500;
  font-size: 24px;
  line-height: 40px;
}

.experience__header a,
.experience__header span {
  text-decoration: none;
  color: var(--color-text-secondary);
}

.experience__duration {
  font-weight: 400;
  font-size: 24px;
  line-height: 40px;
  color: var(--color-text-secondary);
}

.experience__desc {
  margin-top: 20px;

  font-weight: 400;
  font-size: 18px;
  line-height: 24px;
  text-align: justify;
  color: var(--color-text-secondary);
}

.footer {
  margin-left: 64px;
  margin-bottom: 32px;
}

/* responsive */
@media screen and (max-width: 768px) {
  .container {
    width: 768px;
  }

  .grid-container {
    grid-template-columns: 280px 280px;
    grid-template-rows: 280px 280px 280px 280px 280px 1fr 280px;

    margin-left: 48px;
    margin-right: 136px;
  }

  .grid-item-userpic {
    grid-column: 1;
    grid-row: 1;
  }

  .grid-item-name-title {
    grid-column: 2;
    grid-row: 1;
  }

  .grid-item-contact {
    grid-column: 2;
    grid-row: 1;
    place-self: end start;

    text-align: left;
  }

  .grid-item-stack {
    grid-column: 1 / span 2;
    grid-row: 2;

    background-color: unset;
  }

  .btn-toggle {
    grid-column: 2;
    grid-row: 2;
    place-self: start end;
  }

  .grid-item-education {
    grid-column: 1 / span 2;
    grid-row: 3;
    display: grid;
    place-items: end start;

    background-color: var(--color-item-bg);
  }

  .grid-item-education span {
    color: var(--color-text);
  }

  .grid-item-education p {
    color: var(--color-text-secondary);
  }

  .grid-item-projects {
    grid-column: 2;
    grid-row: 4;
  }

  .grid-item-experience {
    grid-column: 1 / span 2;
    grid-row: 6;
  }

  .footer {
    margin-left: 48px;
  }
}

@media screen and (max-width: 375px) {
  .container {
    width: 375px;
  }

  .grid-container {
    grid-template-columns: 280px;
    grid-template-rows: 280px 280px 280px 280px 1fr 280px;

    margin-left: 32px;
    margin-right: 63px;
  }

  .btn-toggle {
    grid-column: 1;
    grid-row: 1;
    place-self: start start;
  }

  .grid-item-contact {
    grid-column: 1;
    grid-row: 1;
    place-self: start end;

    text-align: right;
  }

  .grid-item-name-title {
    grid-column: 1;
    grid-row: 1;
    place-self: end start;
  }

  .name {
    font-weight: 500;
    font-size: 24px;
    line-height: 29px;
  }

  .title {
    font-weight: 500;
    font-size: 18px;
    line-height: 21px;
  }

  .grid-item-userpic {
    grid-column: 1;
    grid-row: 2;
  }

  .grid-item-stack {
    grid-column: 1;
    grid-row: 3;
    place-self: start start;

    background-color: unset;
  }

  .grid-item-stack p {
    padding-bottom: 8px;
    font-weight: 400;
    font-size: 18px;
    line-height: 22px;
  }

  .grid-item-stack p:first-child {
    font-weight: 500;
  }

  .grid-item-projects {
    grid-column: 1;
    grid-row: 3;
    place-self: end start;

    font-weight: 500;
    font-size: 18px;
    line-height: 22px;
  }

  .projects__list li {
    padding-bottom: 8px;
  }

  .projects__list a {
    font-weight: 400;
  }

  .grid-item-education {
    grid-column: 1;
    grid-row: 4;

    background-color: var(--color-item-bg);
  }

  .grid-item-education div {
    visibility: hidden;
  }

  .grid-item-experience {
    grid-column: 1;
    grid-row: 5;
  }

  .experience__header {
    font-weight: 500;
    font-size: 14px;
    line-height: 22px;
  }

  h3 {
    margin-top: 32px;
    font-weight: 400;
    font-size: 14px;
    line-height: 22px;
  }

  .experience__duration,
  .experience__desc {
    font-weight: 400;
    font-size: 14px;
    line-height: 22px;
    text-align: left;

  }

  .footer {
    margin-left: 32px;
  }
}
