@import url("https://fonts.googleapis.com/css2?family=Space+Mono:wght@400;700&display=swap");
:root {
  --light-blue: #0079ff;
  --gray: #697c9a;
  --grayish-blue: #4b6a9b;
  --dark-grayish-blue: #2b3442;
  --light-white: #f6f8ff;
  --white: #fefefe;
}

.dark {
  --light-blue: #0079ff;
  --gray: #697c9a;
  --grayish-blue: #ffffff;
  --dark-grayish-blue: #ffffff;
  --light-white: #141d2f;
  --white: #1e2a47;
}

* {
  font-family: "Space Mono", sans-serif;
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: var(--light-white);
  color: var(--grayish-blue);
  font-size: 0.938rem;
  font-weight: 400;
}

@media (max-width: 900px) {
  html {
    font-size: 0.9rem;
  }
}

a:link {
  text-decoration: none;
  color: var(--light-blue);
  font-weight: 400;
}

h1 {
  font-size: 1.625rem;
  color: var(--dark-grayish-blue);
}

h2 {
  font-size: 1.375rem;
  color: var(--dark-grayish-blue);
}

h3 {
  font-size: 1rem;
}

h4 {
  font-size: 0.813rem;
  font-weight: 400;
  color: var(--grayish-blue);
}

.container {
  width: 730px;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.container-title {
  display: flex;
  justify-content: space-between;
}

header {
  height: 69px;
  border-radius: 1rem;
  background-color: var(--white);
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0px 16px 30px -10px rgba(70, 96, 187, 0.2);
  padding: 1rem 0.5rem 1rem 1.5rem;
}

.search {
  display: flex;
  flex-direction: row;
  flex-grow: 3;
  align-items: center;
  gap: 1rem;
}

input {
  flex-grow: 2;
  border: none;
  font-size: 1.2rem;
  margin-right: 1rem;
  background-color: var(--white);
  color: var(--grayish-blue);
}

input:focus-visible {
  outline: none;
}

::placeholder {
  color: var(--grayish-blue);
}

.moon {
  fill: var(--gray);
}

.sun {
  fill: var(--grayish-blue);
}

#btn-search {
  border-radius: 0.7rem;
  background-color: var(--light-blue);
  color: #ffffff;
  width: 106px;
  height: 50px;
  border: none;
  cursor: pointer;
  font-size: 1rem;
}

#btn-search:hover {
  background-color: #60abff;
}

.toggle {
  border: none;
  background: none;
  padding: 0;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 16px;
  text-transform: uppercase;
  color: var(--grayish-blue);
  font-family: "Space Mono", monospace;
  font-weight: 700;
  font-size: 0.8125rem;
  line-height: 19px;
  letter-spacing: 2.5px;
  cursor: pointer;
}

main {
  min-height: 419px;
  background-color: var(--white);
  display: flex;
  flex-direction: column;
  padding: 1.7rem 2.2rem;
  border-radius: 1rem;
  box-shadow: 0px 16px 30px -10px rgba(70, 96, 187, 0.2);
}

.error-search {
  color: #f74646;
  font-weight: 700;
  margin-right: 1rem;
  display: none;
}

.not-available {
  color: var(--gray);
}

.container-user {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: right;
  gap: 2rem;
}

.container-user > img {
  border-radius: 100%;
  height: 117px;
}

.container-user-info {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 21rem;
}

.container-repos {
  display: flex;
  flex-direction: row;
  justify-content: start;
  flex: 0 1 480px;
  border-radius: 10px;
  gap: 5rem;
  background: var(--light-white);
  padding: 1rem 2rem;
}

.container-links {
  display: flex;
  flex: 0 1 480px;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 1.5rem;
}
.date,
.description,
.container-repos p {
  color: var(--grayish-blue);
}

.inner-user {
  display: flex;
  justify-content: space-between;
}

.date {
  align-self: center;
}

.links {
  display: flex;
  flex: 1 1 210px;
  align-items: center;
  gap: 1rem;
}

.hidden {
  display: none;
}

.img-user {
  border-radius: 50%;
  margin-right: auto;
}

.wrapper-left {
  display: flex;
  flex-wrap: wrap;
  flex: 0 1 480px;
}

.username {
  flex: 1 1 50%;
  align-self: center;
}

.date {
  flex: 1 1 50%;
  text-align: end;
}

.description {
  flex: 0 1 480px;
}

@media only screen and (max-width: 768px) {
  header {
    padding: 1rem;
  }

  main {
    height: auto;
    padding: 1rem;
  }

  .container {
    width: 100vw;
    padding: 1rem;
  }

  .container-user > img {
    align-self: start;
  }

  .container-user-info {
    height: auto;
  }

  .container-links {
    padding: 1rem 0;
  }

  .container-repos {
    display: flex;
    flex-direction: row;
    justify-content: start;
    border-radius: 10px;
    gap: 3rem;
    background: var(--light-white);
    padding: 1rem 1rem;
  }
  .wrapper-left {
    display: block;
    flex: auto;
  }

  .date {
    text-align: start;
  }
}

@media only screen and (min-width: 768px) and (max-width: 992px) {
  .container {
    width: 738px;
    padding: 1rem;
  }

  main {
    height: auto;
  }

  .username {
    flex: 1 1 100%;
  }

  .date {
    flex: 1 1 100%;
    text-align: left;
    order: 1;
  }
}
