*, *::before, *::after {
  padding: 0; margin: 0;
  box-sizing: border-box;
  background-color: transparent;
  font-family: "1", sans-serif;
  color: #141414;
  text-decoration: none;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  button {border:none; outline:none;}
  button:hover {cursor: pointer;}

  ::-webkit-scrollbar {
    width: 12px;
    background-color: rgb(60, 60, 60);
  }
  ::-webkit-scrollbar-thumb {
    background-color: rgba(221, 221, 221, 0.5);
    border-radius: 8px;
  }
  ::-webkit-scrollbar-corner {
    background-color: rgb(60, 60, 60);
  }
}

@font-face {
  font-family: "1";
  src: url("./assets/fonts/roboto.ttf") format("truetype");
}

@font-face {
  font-family: "2";
  src: url("./assets/fonts/inter.ttf") format("truetype");
}

@font-face {
  font-family: "3";
  src: url("./assets/fonts/croissant-one.ttf") format("truetype");
}

@font-face {
  font-family: "noto serif";
  src: url("./assets/fonts/noto-serif.ttf") format("truetype");
}

body, html {
  height: 100dvh; width: 100%; min-width: 320px;
  scroll-behavior: smooth;
}

body {
  background-color: #f4f4f4;
}

/*############### header ##################*/

header {
  width: 100%;
  background-color: rgb(36, 36, 35);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  outline: 3px dashed #020c1f;
}

header * {
  color: #f4f4f4;
}

.header-main-bg {
  z-index: 100;
  width: 100%;
  position: fixed; top: 0; left: 0;
  display: flex; justify-content: center; align-items: center;
  backdrop-filter: blur(10px);
  background-color: rgba(36, 36, 35, 0.3);
  outline: 1px dashed rgb(220, 220, 220);
  transition: background-color 0.2s ease-in-out;
}

.header-main-bg-2 {
  background-color: rgb(36, 36, 35);
}

.header-main {
  padding: 8px 2rem;
  display: flex; flex-direction: row; column-gap: 8px;
  justify-content: space-between; align-items: center;
  width: 1440px; max-width: 1440px;
}

.header-title {
  font-family: "3", "2";
  color: #FDFBD4;
  filter: drop-shadow(2px 2px 0 #141414);
}

nav {
  display: flex; flex-direction: row; column-gap: 2rem; align-items: center;
  * {
    font-size: 18px;
  }
}

.nav-b {
  transform: scaleX(1);
}

.header-desc-bg {
  background-image: linear-gradient(#020c1fa6), url("./assets/images/bg-header-desc.jpg");
  background-repeat: no-repeat; background-size: cover; background-position: top;
  background-attachment: fixed;
  width: 100%; display: flex; justify-content: center; align-items: center;
}

.header-desc {
  padding: 150px 2rem;
  display: flex; flex-direction: column; row-gap: 1.5rem;
  width: 1440px; max-width: 1440px;
  .header-desc-h1 {
    letter-spacing: 1px;
  }
  * {
    font-family: "2", "1"; font-weight: 300;
  }
  a {
    background-color: #2e6f40;
    color: #FDFBD4;
    box-shadow: 0 0 1rem rgba(36, 36, 35, 0.3);
    width: fit-content;
    padding: 12px 16px;
    letter-spacing: 1px;
    border-radius: 4px;
    margin-bottom: 1.5rem;
    transition: opacity 0.3s ease-in-out;
  }
  a:hover {
    opacity: 0.9;
    
  }
}

.header-profile-outer {
  height: 150px;
  width: 100%;
  display: flex; justify-content: center;
}

.header-profile {
  min-width: 250px; max-width: 250px;
  min-height: 250px; max-height: 250px;
  background-color: #f4f4f4;
  border-radius: 50%;
  outline: 6px solid #FDFBD4;
  filter: drop-shadow(0 0 8px #141414);
  transform: translateY(-50%);
  img {
    width: 250px; height: auto;
    border-radius: 50%;;
  }
}

.menu-button {
  display: none;
}

@media only screen and (max-width: 750px) {
  .menu-button {
    display: block;
  }

  nav {
    transform: scaleX(0);
    transform-origin: right;
    flex-direction: column-reverse; row-gap: 0.6rem; align-items: revert;
    position: fixed; top: 61px; right: 0;
    background-color: rgba(36, 36, 35, 0.86); padding: 12px 8px;
    border-radius: 8px 0 0 8px;
    transition: transform 0.1s linear;
    a {
      padding-bottom: 4px;
      border-bottom: 1px solid rgb(92, 92, 92);
    }
  }
}

/*############### footer ##################*/

footer {
  background-color: rgb(36, 36, 35);
  background-image: linear-gradient(#020c1fa6), url("./assets/images/bg-footer.jpg");
  background-repeat: no-repeat; background-size: cover; background-position: top;
  background-attachment: fixed;
  width: 100%;
  display: flex; justify-content: center;
  outline: 3px dashed #020c1f;
}

footer * {
  color: #f4f4f4;
  font-size: 18px;
  font-family: "2", "1";
  line-height: 1.5rem;
}

.footer-b {
  max-width: 1040px;
  padding: 50px 1.5rem 0 1.5rem;
}

.about h3 {
  margin-bottom: 1rem;
}

.contact {
  display: flex; flex-direction: column;
  h3 {
    margin: 1rem 0;
  }
  a {
    width: fit-content;
  }
  a img {
    transform: translateY(4px);
    margin-right: 4px;
  }
}

.footer-main {
  margin-top: 2rem;
  text-align: center;
}

.back-to-top {
  z-index: 99;
  display: none; justify-content: center; align-items: center;
  position: fixed; bottom: 24px; right: 24px;
  height: 36px; width: 36px;
  background-color: rgb(36, 36, 35);
  border-radius: 50%;
}

.back-to-top:hover {
  cursor: pointer;
}

/*############### main & main-top ##################*/

main {
  width: 100%;
  display: flex; justify-content: center;
}

.main-b {
  max-width: 1440px; width: 1440px;
  margin: 1.5rem;
  display: flex; flex-direction: column; justify-content: center;
}

.main-top * {
  font-size: 18px;
  font-stretch:semi-condensed;
}

.main-top {
  z-index: 99;
  width: 100%;
  display: flex; flex-direction: row; column-gap: 12px;
  justify-content: center;
  padding: 12px 0;
  background-color: #f4f4f4; box-shadow: -5rem 0px 0.1px #f4f4f4, 5rem 0px 0.1px #f4f4f4;
  position: sticky; top: 60px;
}

.search-articles-outer {
  width: 100%; max-width: 870px;  position: relative;
}

.in-search-articles {
  padding: 6px 40px 6px 8px;
  border-radius: 16px;
  outline: none; width: 100%;
  border: 1px solid rgb(120, 120, 120);
  background-color: #ffffff;
  color: rgb(120, 120, 120);
}

.in-search-articles-bt {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  display: flex; justify-content: center; align-items: center; height: 100%;
}

.filter-articles-bt {
  position: relative;
}

.category-outer {
  transform: scale(0); transform-origin: top right;
  position: absolute; top: 134%; right: 0; border-radius: 12px;
  min-width: 250px; padding: 1.5rem;
  background-color: #ffffff; border: 1px solid rgb(180, 180, 180);
  text-align: left;
  display: flex; flex-direction: column; row-gap: 12px;
  transition: transform 0.2s linear;
}

.filter-articles-bt:hover {
  .category-outer {
    transform: scale(1);
  }
}

.category-words-title {
  margin-bottom: 12px;
  color: rgb(36, 36, 35);
  font-stretch: normal;
  img {
    transform: translateY(5px);
    margin-right: 6px;
  }
}

.category-words-outer {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px;
  text-align: center;
  .category-word {
    font-size: 1rem;
    display: flex; align-items: center; justify-content: center;
    background-color: rgba(120, 120, 120, 0.15); color: rgb(60, 60, 60);
    border-radius: 8px; padding: 8px 16px; min-width: 140px; width: auto;
    transition: background-color 0.1s linear, color 0.1s linear;
  }
  .category-word:hover {
    background-color: rgb(36, 36, 35, 0.8);
    color: #f4f4f4;
  }
}

.active-category-button {
  background-color: rgb(36, 36, 35, 0.8) !important;
  color: #f4f4f4 !important;
}

@media only screen and (max-width: 400px) {
  .category-words-outer .category-word {
    width: auto; min-width: 110px; padding: 8px 8px; font-size: 15px;
  }
}

/*############### main-other ##################*/

.main-articles, .main-projects {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.in-main-heading {
  display: flex;
  margin: 1.5rem 0;
  font-size: 2.6rem;
  color: #141414;
  font-weight: 400;
  letter-spacing: -1px;
  font-family: "noto serif", serif;
  align-self: center;
}

.project-self-div {
  display: flex;
  background-color: #2e6f40;
  border-radius: 6rem 4px 6rem 4px;
  height: auto;
  padding: 2rem 1rem;
  transition: background-color 0.3s ease-in-out;
  
  * {
    text-align: center;
  }

  .projects-num {
    color: #FDFBD4; display: flex; justify-content: center; align-items: center;
    font-size: 20px; font-weight: 500;
    padding: 8px; width: 50px; height: 50px;
    border-radius: 50%; border: 2px solid #FDFBD4;
  }

  h2 {
    color: #FDFBD4; font-weight: 400; font-stretch: condensed;
  }

  a {
    width: 100%; height: 100%; display: flex; flex-direction: column; row-gap: 1rem; justify-content: center; align-items: center;
  }
}

.projects-lang {
  display: flex; flex-direction: row; column-gap: 6px;
  * {
    color: #FDFBD4b9;
  }
  div {
    border: 1px dotted #FDFBD4b9;
    border-radius: 8px; padding: 2px 8px;
    font-stretch: condensed;
  }
}

.project-self-div:hover {
  cursor: pointer;
  background-color: #275e37;
}

.articles-outer-div, .projects-outer-div {
  width: 100%; margin: 1rem 0;
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 2rem; align-items: stretch;
}

.articles-outer-div {grid-template-columns: repeat(4, 1fr);}

.article-self-div {
  background-color: #ffffff;
  box-shadow: 0 0 1rem rgba(36, 36, 35, 0.3);
  border-radius: 16px;
  display: flex; flex-direction: column;
  position: relative;
}

.article-self-div-top {
  background: #2e6f40; border-radius: 14px 14px 0 0;
  padding: 1.5rem;
  display: flex; flex-direction: column; row-gap: 1rem;
  transition: background-color 0.3s ease-in-out;
  * {
    color: #FDFBD4;
  }
  .article-self-div-tags {
    display: flex; flex-direction: row; gap: 6px; align-content: center;
    flex-wrap: wrap;
    div {
      background-color: rgba(36, 36, 35, 0.2);
      padding: 6px 10px; border-radius: 4px;
    }
  }
  .article-self-div-date {
    display: flex; flex-direction: row; column-gap: 6px;
    align-items: center;
  }
}

.article-self-div-bottom {
  padding: 1.5rem 1.5rem 4.5rem 1.5rem;
  display: flex; flex-direction: column; row-gap: 1.5rem;
  .article-self-div-title {
    font-weight: 400;
    font-stretch: semi-condensed;
  }
  .article-self-div-desc {
    color: rgb(92, 92, 92);
  }
  a {
    width: fit-content;
    color: #2e6f40;
    position: absolute; left: 1.5rem; bottom: 1.5rem;
  }
}

.article-self-div:hover {
  .article-self-div-top {
    background-color: #275e37;
  }
}

.article-not-found {
  display: none; flex-direction: column; row-gap: 20px;
  margin: 50px; text-align: center; grid-column: 1 / -1;
  p {
    font-size: 20px; font-weight: 400; font-family: "2", "1";
  }
  h1 {
    font-size: 100px;
  }
}

@media only screen and (max-width: 1320px) {
  .articles-outer-div {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media only screen and (max-width: 1010px) {
  .articles-outer-div {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media only screen and (max-width: 700px) {
  .articles-outer-div {
    grid-template-columns: repeat(1, 1fr);
  }
}


@media only screen and (max-width: 1210px) {
  .projects-outer-div {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media only screen and (max-width: 800px) {
  .projects-outer-div {
    grid-template-columns: repeat(1, 1fr);
  }
}

#about, #contact, #my-articles, #my-projects {
  scroll-margin-top: 120px;
}

/*############### loader ##################*/

.loader {
  z-index: 100000;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  -o-backdrop-filter: blur(20px);
  -moz-backdrop-filter: blur(20px);
  -ms-backdrop-filter: blur(20px);
  display: flex;
  justify-content: center;
  align-items: center;
}

.loader-scale {
  width: 100px; height: 100px;
  border-radius: 50%;
  background-color: #FDFBD4;
  animation: loader-animation 0.7s ease-in infinite;
}

@keyframes loader-animation {
  0% {
    transform: scale(0);
    opacity: 1;
  }
  100% {
    transform: scale(1);
    opacity: 0;
  }
}