@import "./variables.scss";

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen",
    "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue",
    sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: $light;
}

code {
  font-family: source-code-pro, Menlo, Monaco, Consolas, "Courier New",
    monospace;
}

.mobileTop {
  display: none;
}

.mobileBottom {
  display: none;
}

.container {
  display: flex;
  flex-direction: row;
  min-height: 100vh;
}

.sidebar {
  box-sizing: border-box;
  padding: 20px;
  width: 30%;
  background-color: $darkBlue;
  height: 100vh;
  position: sticky;
  top: 0;
  bottom: 0;

  &.user {
    display: flex;
    flex-direction: column;
    overflow-y: scroll;
  }
}

.footer {
  position: absolute;
  bottom: 10px;
}

.main {
  background-color: $lightBlue;
  display: flex;
  flex-direction: column;

  &.home {
    align-items: center;
    justify-content: center;
  }
  flex: 1;
  padding: 20px;
  overflow: hidden;
}

.octocat {
  position: absolute;
  width: 150%;
  left: -219px;
  top: 50%;
  z-index: 1;
  transform: translateY(-50%);
  max-width: 680px;
}

li {
  list-style-type: none;
  padding-bottom: 5px;
}

.heading {
  font-size: 5rem;
  margin-block-start: 0;
}

.inputContainer {
  margin-top: 60px;
}

a {
  text-decoration: none;
}

.button {
  display: inline-block;
  background-color: $pink;
  color: $white;
  padding: 10px 15px;
  border-radius: 5px;
  transition: all 0.3s ease-in-out;

  &:hover {
    background-color: $lightPink;
  }
}

input[type="text"] {
  width: 70%;
  display: block;
  padding: 10px 15px;
  margin: 10px 0 20px 0;
  border-radius: 5px;
  background: #f0f1f9;
  box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);
}

.avatar {
  background-color: gray;
  width: 100px;
  height: 100px;
  display: block;
  border-radius: 50px;

  img {
    height: 100%;
    width: 100%;
    border-radius: 50px;
  }
}

div.user > div:first-child {
  margin: 10px 0;
}

.skills {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
}

.skills span {
  background-color: $light;
  text-align: center;
  color: black;
  padding: 8px 10px;
  border-radius: 2px;
  margin: 0 15px 15px 0;
}

.repoContainer {
  display: grid;
  grid-template-columns: repeat(3, calc((100% - 40px) / 3));
  gap: 20px;
  position: relative;
}

.repoCard {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  border-radius: 4px;
  padding: 20px 20px 12px 20px;
  background-color: $darkBlueOpacity05;
  position: relative;
  transition: 0.2s all ease-in-out;

  span {
    font-size: 0.75rem;
    background-color: $light;
    text-align: center;
    color: black;
    border-radius: 2px;
    padding: 4px 6px;
    // position: absolute;
    // bottom: 15px;
    overflow-wrap: break-word;
    margin: 0 8px 8px 0;
    display: inline-flex;
  }

  p {
    padding-bottom: 15px;
    color: $light50;
    overflow-wrap: break-word;
    flex: 1;
  }

  .repoTitle {
    font-size: 1.25rem;
    font-weight: bold;
    color: $light;
    overflow-wrap: break-word;
  }

  &:hover {
    background-color: $darkBlue;
    transform: scale(1.05);
  }
}

.social {
  display: flex;
}

.social > span {
  margin: 20px 20px 20px 0;
}

.details > div {
  i {
    padding-right: 5px;
  }

  margin: 10px 0;
}

::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: $darkBlue;
}

::-webkit-scrollbar-thumb {
  background-color: $light20;
  border-radius: 6px;
}

@media only screen and (max-width: 1190px) {
  .repoContainer {
    grid-template-columns: repeat(2, calc((100% - 20px) / 2));
  }
}

@media only screen and (max-width: 648px) {
  .container {
    flex-direction: column;
  }

  .sidebar.user {
    width: 100vw;
    overflow-y: hidden;
    position: unset;
    height: auto;
  }

  .repoContainer {
    display: grid;
    grid-template-columns: 100%;
  }
}

.leftContainer {
  background-color: $darkBlue;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 2;
}

.rightContainer {
  background-color: $lightBlue;
  flex: 1;
  position: relative;
}

.rightContainer::before {
  content: "";
  width: 100%;
  position: absolute;
  top: 0;
  right: -47px;
  transform: skewX(-13deg) translateX(-50%);
  height: 100vh;
  background-color: $lightBlue;
}

ul {
  padding-inline-start: 0;
}

.content {
  position: absolute;
  font-size: 1.25rem;
  left: 17%;
  z-index: 2;
}

@media only screen and (max-width: 768px) {
  .leftContainer {
    display: none;
  }

  .rightContainer {
    display: none;
  }

  .sidebar.user {
    width: 100vw;
    overflow-y: hidden;
    position: unset;
    height: auto;
  }

  .container {
    flex-direction: column;
    overflow: hidden;
    background-color: $darkBlue;
  }

  .mobileTop {
    display: flex;
    flex-direction: column;
    background-color: $darkBlue;
    flex: 1;
    padding: 20px 41% 0 10%;

    p {
      font-size: 1.25rem;
    }
  }

  .mobileBottom {
    display: flex;
    background-color: transparent;
    flex: 1;
    position: relative;
  }

  .mobileBottom::before {
    content: "";
    width: 100%;
    position: absolute;
    transform: skewY(-14deg) translateY(4%);
    height: 100vh;
    background-color: $lightBlue;
  }

  .inputContainer {
    z-index: 1;
    width: 100%;
    max-width: 400px;
    padding-left: 10%;
    padding-right: 20%;
    padding-top: 10%;
  }

  input[type="text"] {
    width: 100%;
  }

  .button {
    width: 100%;
    text-align: center;
    padding: 10px 17px;
  }

  .mobileOctocat {
    position: fixed;
    width: 68%;
    max-width: 300px;
    top: 117px;
    right: -25px;
    left: unset;
    z-index: 1;
  }
}

.error {
  text-align: center;
  height: 100vh;
  width: 100vw;
  background-color: $darkBlue;
  color: $light;

  h1 {
    font-size: 3rem;
  }
}

@media screen and (min-width: 770px) and (max-width: 966px) {
  .content {
    p {
      max-width: 300px;
    }
  }
}
