/*===============
  global styles
===============*/

* {
  padding: 0;
  margin: 0;
  border: 0;
  outline: 0;
  background-color: inherit;
  color: inherit;
  font-family: inherit;
  font-size: inherit;
  box-shadow: none;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Poppins', sans-serif;
  line-height: 1.5;
  color: var(--clr-fg);
  background-color: var(--clr-bg);
  overflow-x: hidden;
  /* dark theme */
  --clr-bg: #1e1f2c;
  --clr-bg-alt: #2a2f4c;
  --clr-fg: #b8b9c6;
  --clr-fg-alt: #d0d1dc;
  --clr-primary: #7b8fd9;
  --clr-accent: #e4544a;
  --shadow: rgba(0, 0, 0, 0.16) 0px 10px 36px 0px,
    rgba(0, 0, 0, 0.06) 0px 0px 0px 1px;
  /* more bold */
  /* --clr-bg: #1f2833;
    --clr-bg-alt: #0b0c10;
    --clr-fg: #c5c6c7;
    --clr-fg-alt: #66fcf1;
    --clr-primary: #45a29e;
    --shadow: rgba(31, 40, 51, 0.2) 0px 7px 29px 0px; */
}

.light {
  --clr-bg: #f4f1de;
  --clr-bg-alt: #f0d8b9;
  --clr-fg: #3d405b;
  --clr-fg-alt: #81b29a;
  --clr-primary: #f2cc8f;
  --shadow: rgba(61, 64, 91, 0.2) 0px 7px 29px 0px;
}

/* cherry blossom */
/* .light {
  --clr-bg: #f7f3eb;
  --clr-bg-alt: #e7c5c0;
  --clr-fg: #6f4a4d;
  --clr-fg-alt: #bea29d;
  --clr-primary: #d77e7e;
  --shadow: rgba(111, 74, 77, 0.2) 0px 7px 29px 0px;
} */

/* Matcha */
/* .light {
  --clr-bg: #f1eae4;
  --clr-bg-alt: #aab6a6;
  --clr-fg: #3e3e3e;
  --clr-fg-alt: #839995;
  --clr-primary: #d35e5a;
  --shadow: rgba(62, 62, 62, 0.2) 0px 7px 29px 0px;
} */

::-moz-selection {
  background: var(--clr-primary);
  color: var(--clr-bg);
}

::-webkit-selection,
::selection {
  background: var(--clr-primary);
  color: var(--clr-bg);
}

h1,
h2,
h3,
h4 {
  line-height: 1.2;
  color: var(--clr-fg-alt);
}

h1 {
  font-size: 4rem;
}

h2 {
  font-size: 2rem;
}

h3 {
  font-size: 1.5rem;
  color: var(--clr-fg);
}

h4 {
  font-size: 1.3rem;
}

ul {
  list-style-type: none;
}

a {
  text-decoration: none;
}

button {
  cursor: pointer;
}

@media (max-width: 900px) {
  h1 {
    font-size: 2.6rem;
  }
}

/*===================
    buttons and links
  ===================*/

.link {
  color: var(--clr-primary);
  position: relative;
}

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

.link::before {
  content: '';
  display: inline;
  width: 0%;
  height: 0.2em;
  position: absolute;
  bottom: 0;
  background-color: var(--clr-primary);
  transition: width 0.2s ease-in;
}

.link:hover::before,
.link:focus::before {
  width: 100%;
}

.link--nav {
  color: var(--clr-fg);
  font-weight: 500;
}

.link--icon {
  color: var(--clr-fg);
  font-size: 1.4rem;
}

.btn {
  display: block;
  padding: 0.8em 1.4em;
  font-weight: 500;
  font-size: 0.9rem;
  text-transform: lowercase;
  transition: transform 0.2s ease-in-out;
}

.btn--outline {
  /* color: var(--clr-primary); */
  border: 2px solid var(--clr-primary);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn--outline:focus,
.btn--outline:hover {
  color: var(--clr-bg);
}

.btn--outline:before {
  content: '';
  position: absolute;
  background-color: var(--clr-primary);
  right: 100%;
  bottom: 0;
  left: 0;
  top: 0;
  z-index: -1;
  transition: right 0.2s ease-in-out;
}

.btn--outline:hover::before,
.btn--outline:focus::before {
  right: 0;
}

.btn--plain {
  text-transform: initial;
  background-color: var(--clr-bg-alt);
  box-shadow: rgba(0, 0, 0, 0.15) 0px 3px 3px 0px;
  border: 0;
}

.btn--plain:hover {
  /* transform: translateY(-4px); */
  background-color: var(--clr-primary);
  color: var(--clr-bg);
  outline: none;
}

.btn--icon {
  padding: 0;
  font-size: 1.2rem;
}

.btn--icon:hover,
.btn--icon:focus {
  color: var(--clr-primary);
}

.btn--icon:active {
  transform: translateY(-5px);
}

.btn--selected {
  background-color: var(--clr-primary);
  color: var(--clr-bg);
  border-color: var(--clr-primary);
}
/*========
    layout
  ========*/

.center {
  display: flex;
  align-items: center;
}

.header {
  height: 8em;
  max-width: 1100px;
  width: 95%;
  margin: 0 auto;
  justify-content: space-between;
}

main {
  /* max-width: 1100px; */
  width: 95%;
  margin: 0 auto;
}

.section {
  margin-top: 3em;
}

.section__title {
  text-align: center;
  margin-bottom: 1em;
  text-transform: uppercase;
}

.nav__list {
  margin-right: 1.5em;
  display: flex;
}

.nav__list-item {
  margin-left: 1.5em;
}

.nav__hamburger {
  display: none;
  width: 1em;
}

.header-img {
  height: auto;
  width: 120px;
}

.about {
  flex-direction: column;
  margin-top: 3em;
}

.about__name {
  color: var(--clr-primary);
}

.about__role {
  margin-top: 1.2em;
}

.about__desc {
  font-size: 1.1rem;
  max-width: 500px;
  text-align: justify;
}

.about__desc,
.about__contact {
  margin-top: 2.4em;
}

.about .link--icon {
  margin-right: 0.8em;
}

.about .btn--outline {
  margin-right: 1em;
}

.projects__grid {
  max-width: 1221px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-gap: 3.5em;
}

.project {
  padding: 2em;
  margin: 0 auto;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform 0.2s linear;
  background-color: var(--clr-bg-alt);
}

.project:hover {
  transform: translateY(-7px);
}

.project__description {
  margin-top: 1em;
}

.project__stack {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin: 1.2em 0;
}

.project__stack-item {
  margin: 0.5em;
  font-weight: 500;
  font-size: 0.8rem;
  color: var(--clr-fg);
}

.project .link--icon {
  margin-left: 0.5em;
}

.project__img {
  height: 300px;
  width: 89%;
  display: block;
  margin: 5px auto;
}
/*====Skills List===*/

.skills__list {
  max-width: 800px;
  width: 95%;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

.skills__list-item {
  margin: 0.5em;
  cursor: pointer;
}

#show-all {
  margin: 0px auto;
}
/* Footer  */

.footer {
  padding: 3em 0;
  text-align: center;
}

.footer__link {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--clr-fg);
}

.scroll-top {
  display: none;
  position: fixed;
  bottom: 3em;
  right: 2em;
  background-color: transparent;
  font-size: 1.8rem;
  transition: transform 0.2s ease-in-out;
}

.gif-container {
  height: 138px;
}

.moving-gif {
  animation: move-right 15s linear infinite;
  position: absolute;
}

@keyframes move-right {
  0% {
    left: -20%;
  }
  100% {
    left: 100%;
  }
}

@media (max-width: 600px) {
  .header {
    height: 6em;
  }

  .section {
    margin-top: 4em;
  }

  .nav__list {
    flex-direction: column;
    padding: 4em 0;
    position: absolute;
    right: 0;
    left: 0;
    top: 5em;
    background-color: var(--clr-bg);
    width: 0;
    overflow: hidden;
    transition: width 0.2s ease-in-out;
  }

  .display-nav-list {
    width: 100%;
  }

  .nav__list-item {
    margin: 0.5em 0;
  }

  .nav__hamburger {
    display: flex;
    margin-left: 0.8em;
  }

  .about {
    align-items: flex-start;
    margin-top: 2em;
  }

  .footer {
    padding: 2em;
    margin-top: 3em;
  }

  .scroll-container {
    display: none;
  }
}
