/* VARIABLES */
:root {
  --color1: #ffffff;
  --color2: #1992d3;
  --color3: #e2e8f0;
  --color4: #000000;
  --color5: #f0b329;
  --color6: #126896;
}

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

body {
  font-family: 'Montserrat', sans-serif;
}

a {
  text-decoration: none;
}

ul {
  list-style: none;
}


/* CLASS SELECTORS */
.container {
  height: 100vh;
  display: grid;
  grid-template-columns: min-content 1fr;
  grid-template-rows: 150px 4fr;
}

.bold {
  font-weight: bold;
}

.sidebar {
  background-color: var(--color2);
  color: var(--color1);
  width: 300px;
  padding: 2rem;
  grid-row: span 3;
  display: grid;
  grid-template-rows: 75px 250px 250px;
  gap: 3rem;
  z-index: 2;
  transition: all 0.1s ease;
  align-items: center;
}

.sidebar.active {
  width: 100px;
}


.sidebar.active svg {
  position: relative;
  left: 5px;
}

.sidebar.active ul li a svg:hover {
  scale: 2;
  transition: 0.25s;
  backface-visibility: hidden;
}

.sidebar.active .tooltip {
  display: block;
}

.sidebar.active .link-name,
.sidebar.active #logo {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  transition: 0s;
}

.nav-list ul,
.nav-settings ul {
  display: grid;
  gap: 1rem;
}

.nav-list ul li,
.nav-settings ul li {
  position: relative;
  cursor: pointer;
  width: fit-content;
}

.nav-link {
  color: var(--color1);
}

.highlight:hover {
  background-color: var(--color1);
  border-radius: 20px;
  padding: 7.5px;
  color: var(--color2);
}

.sidebar.active .nav-link.hover {
  pointer-events: none;

}


.nav-logo {
  position: relative;
  cursor: pointer;
}

.nav-logo:hover {
  color: var(--color3);
}

.nav-logo svg {
  margin-right: 10px;
  scale: 1.5;


}

.link-name {
  transition: all .85s ease;
}


.nav-list svg,
.nav-settings svg {
  position: relative;
  scale: 1.2;
  margin-right: 10px;
  top: 5px;
}

.tooltip {
  position: absolute;
  left: 125px;
  width: 125px;
  font-size: .75rem;
  transform: translate(-60%, -50%);
  height: 2rem;
  line-height: 2rem;
  border-radius: 20px;
  background-color: var(--color2);
  color: var(--color1);
  text-align: center;
  transition: 0s;
  opacity: 0;
  pointer-events: none;
  display: none;
}

.sidebar ul li:hover .tooltip {
  opacity: 1;
  transition: all 0.25s ease;
  top: 50%;
}

.header {
  background-color: var(--color1);
  grid-column: 2 / span 3;
  display: grid;
  align-items: center;
  padding: 0 2rem;
  grid-template-columns: 3fr 1fr;
  grid-template-rows: 60px 80px;
  z-index: 1;
  box-shadow: 0px -2px 10px 1px var(--color4);
}

.profile-icon {
  border-radius: 50%;
}


.small-icon {
  width: 2rem;
}

.big-icon {
  width: 4rem;
}

.profile-icon.small-icon,
.bell {
  transition: all 0.25s ease;
}

.profile-icon.small-icon:hover,
.bell:hover {
  cursor: pointer;
  scale: 1.25;
}

.animated {
  animation-duration: 1s;
  animation-name: ring;
}

.animated:hover {
  animation-iteration-count: infinite;
}

.search-container {
  position: relative;
}

.profile-container,
.button-container {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  justify-content: right;
}

.button-container button {
  width: 5rem;
  padding: .5rem 0;
  border: none;
  color: var(--color1);
  background-color: var(--color2);
  border-radius: 20px;
  cursor: pointer;
  transition: 0.25s;
}

.button-container button:hover{
  background-color: var(--color6);
}

.welcome-container {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.welcome-greet {
  font-size: .75rem;
}

.welcome-container a {
  color: var(--color4);
}

.welcome-text {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.welcome-name.bold a{
  color: var(--color2);
}

.welcome-name.bold a:hover{
  color: var(--color6)
}


.main-content {
  background-color: var(--color3);
  display: grid;
  grid-template-columns: minmax(300px, 3fr) minmax(250px, 1fr);
  grid-template-rows: min-content 1fr;
  gap: 1rem;
  padding: 2rem 1.5rem;
}


.projects-container {
  grid-row: span 2;
}

.project-cards {
  display: grid;
  overflow: auto;
  grid-template-rows: repeat(3, 1fr);
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
  padding: 1rem 1.5rem 1rem 0;
}

.card {
  background-color: var(--color1);
  border-left: 10px solid var(--color5);
  border-radius: 10px;
  height: fit-content;
  min-height: 350px;
  padding: 1rem 1rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  justify-content: space-between;
  position: relative;
}

.card img {
  display: block;
  border-radius: 1rem;
  margin: 0 auto;
  width: 100%;
  max-width: 600px;
  box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.75);
}

.card p{
  line-height: 1.25;
}

.icons svg {
  scale: 1.25;
  position: absolute;
  bottom: 1rem;
  transition: all .2s ease-in-out;
}

.icons a {
  color: var(--color2);
}

.view-code:hover,
.view-project:hover {
  color: var(--color6);
  transform: scale(1.25);
}

.star-off,
.star-on {
  right: 1rem;
  color: var(--color5);
  cursor: pointer;
}

.star-off:hover,
.star-on:hover{
  color: var(--color5);
  transform: scale(1.25);
}

.star-off.active {
  opacity: 0;
}

.star-on {
  opacity: 0;
  pointer-events: none;
}

.star-on.active {
  opacity: 1;
}

.view-code {
  left: 1rem;
}

.view-project {
  left: 3.5rem;
}

.about-me-container{
  margin-bottom: 1rem;
}

.about-me-container,
.announcments-container{
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.about-me,
.announcements {
  background-color: var(--color1);
  display: flex;
  flex-direction: column;
  height: min-content;
  border-radius: 10px;
  padding: 2rem;
  gap: 1rem;
}

.about-me p,
.announcements p{
  margin-top: .5rem;
  line-height: 1.5;
  font-weight: 300;
}

.about-me span,
.announcements span{
  color: var(--color2);
}

.about-me a span:hover,
.announcements a span:hover{
  color:var(--color6);
}

.card,
.about-me,
.announcements {
  box-shadow: 5px 5px 15px -5px rgba(0, 0, 0, 0.5);
}

.facts:not(:last-child),
.announce:not(:last-child){
  font-size: .95rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--color2);
}

.footer{
  display: flex;
  gap: .5rem;
  align-items: center;
  justify-content: center;
  position: relative;
  top: 1rem;
}

.footer a{
  color:var(--color2)
}

.footer p svg{
  position: absolute;
  bottom: 0;
}

/* ID SELECTORS */

#logo {
  position: absolute;
  top: -7.5px;
  right: 7.5px;
}

#search {
  min-width: 225px;
  width: 90%;
  border-radius: 50px;
  padding: .5rem 2rem;
  background-color: var(--color3);
  border: none;
}

#search:focus {
  outline: none;
}

#search-icon {
  position: absolute;
  left: 5px;
  bottom: 5px;
  color: var(--color2);
}

/* MEDIA QUERY */
@media only screen and (max-width: 780px) {
  .main-content {
    grid-template-columns: 1fr;
  }

}


@media only screen and (max-width: 650px) {
  * {
    transition: all 1s ease;
  }

  .button-container {
    gap: .5rem;
  }

  .button-container button {
    width: 4rem;
  }

}


@media only screen and (max-width: 572px) {
  * {
    transition: all 1s ease;
  }

  .container {
    grid-template-rows: 200px 4fr;
  }

  .header {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    position: relative;
  }

  .search-container {
    position: relative;
    right: 5rem;
  }

  .profile-container {
    position: absolute;
    right: 2rem;
  }

}

@media only screen and (max-width: 500px) {

  .about-me-container,
  .announcments-container{
    width: 350px;
  }

}





/* ANIMATIONS */

@keyframes ring {
  0% {
    transform: scale3d(1, 1, 1);
  }

  10%,
  20% {
    transform: scale3d(.9, .9, .9) rotate3d(0, 0, 1, -3deg);
  }

  30%,
  50%,
  70%,
  90% {
    transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, 3deg);
  }

  40%,
  60%,
  80% {
    transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, -3deg);
  }

  100% {
    transform: scale3d(1, 1, 1);
  }
}