/* Author: github.com/NeshHari */

/* 
 * 3 color palette
 * 60-30-10 rule
 */
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@500;700&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Bebas+Neue&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Fira+Code&display=swap");

:root {
  /* color palette */
  --primary: #eceff4; /* 60% */
  --secondary: #5e81ac; /* 30% */
  --accent: #88c0d0; /* 10% */
  --text: #2e3440;
  --text-highlight: #d8dee9;

  /* navbar */
  --navbar-height: 5vh;
}

/* box-model */
html {
  box-sizing: border-box;
  scroll-behavior: smooth;
}

*,
*::before,
*::after {
  box-sizing: inherit; /* prevent explicit box-sizing overwrites*/
}

body {
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  margin: 0;
  font-family: "Roboto";
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  background-color: var(--primary);
  color: var(--text);
}

nav {
  height: var(--navbar-height);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 2em;
  background-color: var(--text);
  color: var(--primary);
  position: sticky;
  top: 0;
  margin: 0.5em 1em;
  box-shadow: 0 0 0.8em 0.1em var(--text);
  font-family: "Bebas Neue";
  color: var(--primary);
  font-size: 1.2rem;
}

.nav-right {
  display: flex;
  gap: 2em;
}

.nav-left > a,
.nav-right > a {
  color: var(--complementary);
  text-decoration: none;
  align-self: center;
}

.nav-right > a:hover {
  color: var(--accent);
  transition: all 0.3s ease-in-out;
}

button {
  cursor: pointer;
  padding: 0.2em 1em;
  border-radius: 0.3em;
  border: none;
}

.nav-right > button {
  font-family: inherit;
  font-size: inherit;
}

.container {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
  padding: 0 1em;
}

.descriptor {
  max-width: 60vw;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.5em;
  padding: 1em;
}

.main-header {
  font-family: "Poppins";
  font-size: 2.5rem;
  background-color: var(--text-highlight);
  border-radius: 0.1em;
  padding: 0.1em 0.3em;
}

.git-stats {
  padding: 3em;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1em;
}

.git-stats > img {
  border-radius: 0.1em;
  box-shadow: 0 0 0.3em 0.1em var(--text-highlight);
}

.git-stats > img:hover {
  transform: scale(1.1);
  transition: all 0.3s ease-in-out;
}

.slogan {
  margin-top: -1em;
  font-family: "Poppins";
  font-size: 1.2rem;
}

.quickswitch > * {
  position: relative;
  color: var(--secondary);
  font-weight: bold;
}

.static-item {
  color: var(--accent);
}

.quickswitch-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--primary);
  animation: typewriter 3s steps(18) infinite;
}

@keyframes typewriter {
  40%,
  60% {
    left: 100%;
  }
  100% {
    left: 0;
  }
}

.scroll-container {
  width: fit-content;
  height: calc(100vh - var(--navbar-height) - 2em);
  scroll-snap-type: y mandatory;
  overflow-y: scroll;
  overflow-x: hidden;
}

.scroll-container::-webkit-scrollbar {
  width: 0;
}

table {
  border-collapse: collapse;
}

.scroll-container > section {
  width: 100%;
  height: 100%;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.scroll-container > section#section-home {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
}

.scroll-container > section > h2 {
  font-size: 2rem;
}

.scroll-container .section-documentation-inner {
  width: 90%;
  height: 100%;
  display: flex;
  justify-content: space-between;
  gap: 3em;
}

.hidden {
  display: none;
  visibility: hidden;
}

.active {
  background-color: var(--text-highlight);
  background-size: fit-content;
  font-size: 1.1rem;
  font-weight: bold;
}

h2 {
  font-family: "Roboto";
  text-transform: uppercase;
  background-color: var(--text-highlight);
  border-radius: 0.1em;
  padding: 0.1em 0.3em;
}

.scroll-container .section-documentation-inner .toc {
  flex: 1;
  background-color: var();
  border-radius: 0.5em;
  display: flex;
  flex-direction: column;
  max-height: 85%;
  overflow-y: auto;
  overflow-x: hidden;
}

.scroll-container .section-documentation-inner .content {
  flex: 3;
  padding: 1em;
  border-radius: 0.5em;
  height: fit-content;
  box-shadow: 0 0 0.5em 0.1em var(--text-highlight);
  text-align: justify;
  overflow-y: auto;
  max-height: 85%;
}
.scroll-container .section-documentation-inner .content a {
  text-decoration: none;
  color: var(--secondary);
  background-color: var(--text-highlight);
  border-radius: 0.5em;
  padding: 0 0.2em;
}
.scroll-container .section-documentation-inner .content a:hover {
  color: var(--text);
  background-color: var(--accent);
  transition: all 0.3s ease-in-out;
}

.scroll-container .section-documentation-inner .toc a {
  text-decoration: none;
  color: var(--text);
}

.scroll-container .section-documentation-inner .toc a:hover {
  font-size: 1.1rem;
  background-color: var(--text-highlight);
  transition: all 0.3s ease-in-out;
}

.scroll-container .section-documentation-inner .toc a.active:hover {
  color: var(--text);
}

.install-buttons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1em;
  align-items: center;
}

.install-buttons a {
  width: fit-content;
  color: var(--text) !important;
  padding: 0.2em 0.5em !important;
  text-align: center;
  box-shadow: 0 0 0.5em 0.1em var(--text-highlight);
}

.install-buttons a:hover {
  background-color: var(--hover);
  color: var(--primary);
  transition: all 0.3s ease-in-out;
}

.active-alt {
  background-color: var(--accent) !important;
}

code {
  background-color: var(--text-highlight);
  padding: 0 0.2em;
  font-family: "Fira Code", monospace;
  font-size: 0.9rem;
  text-align: left;
}

.install-render code {
  display: flex;
  justify-content: flex-start;
  padding: 0.5em;
}

.install-render {
  margin-top: 2em;
  border-top: 3px solid var(--text-highlight);
}

.theme-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3em;
  width: 50%;
  margin-top: 2em;
  max-height: 80%;
}

.theme-catppuccin,
.theme-kanagawa {
  display: flex;
  width: 100%;
  justify-content: space-between;
  box-shadow: 0 0 0.5em 0.1em var(--text-highlight);
  border-radius: 1em;
  max-height: 80%;
}

.theme-catppuccin:hover,
.theme-kanagawa:hover {
  zoom: 1.1;
  cursor: pointer;
}

.theme-catppuccin > img,
.theme-kanagawa > img {
  flex: 3;
  border-radius: 1em 0 0 1em;
}

.theme-catppuccin > div,
.theme-kanagawa > div {
  flex: 2;
  padding: 1em;
}

.popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 50%;
  max-height: 80%;
  background-color: var(--text-highlight);
  border-radius: 1em;
  max-width: 80%;
  box-shadow: 0 0 0.5em 0.1em var(--text);
}

.popup-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5em 1em;
  font-size: 1.5rem;
  font-family: "Bebas Neue";
  background-color: var(--accent);
  border-radius: 1em 1em 0 0;
  width: 100%;
}

.popup-catppuccin,
.popup-kanagawa {
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: var(--accent);
}

.popup-catppuccin img,
.popup-kanagawa img {
  border-radius: 0em 0em 1em 1em;
  overflow: hidden;
}

.popup-close-catppuccin,
.popup-close-kanagawa {
  background-color: var(--text);
  color: var(--text-highlight);
  padding: 0.5em 1em;
}

.popup-close-catppuccin:hover,
.popup-close-kanagawa:hover {
  background-color: var(--text-highlight);
  color: var(--text);
  transition: all 0.3s ease-in-out;
}

.stop-scrolling {
  height: 100%;
  overflow: hidden;
}

@media (max-width: 40em) {
  .container {
    padding: 0.2em;
  }

  nav {
    font-size: 0.9rem;
    padding: 0.1em 0.5em;
    margin: 0.3em;
  }

  .nav-right {
    gap: 1em;
  }

  .descriptor > h1 {
    font-size: 2rem;
  }

  .git-stats {
    zoom: 0.8;
    grid-template-columns: repeat(2, 1fr);
  }

  .scroll-container > section > h2 {
    font-size: 1.2rem;
  }

  .section-documentation-inner {
    padding: 0.5em;
    font-size: 0.8rem;
    flex-direction: column;
    max-height: 80%;
  }

  .content {
    max-width: 80vw;
  }

  .section-documentation-inner .content h3 {
    font-size: 0.8rem;
    text-align: center;
  }

  .section-documentation-inner .toc {
    max-height: 30%;
    font-size: 0.2rem;
  }

  .scroll-container .section-documentation-inner .toc a {
    font-size: 0.8rem;
  }

  .active {
    font-size: 0.9rem !important;
  }

  .install-buttons {
    grid-template-columns: repeat(2, 1fr);
  }

  .render {
    max-width: 100vw;
  }

  td {
    text-align: left;
  }

  code,
  text {
    font-size: 0.8rem;
    overflow-x: auto;
  }

  code.language-fish {
    padding: 0em 0.5em;
  }

  .theme-container {
    width: fit-content;
    gap: 1em;
    font-size: 0.8rem;
    max-width: 80vw;
    /* margin-left: -2em; */
  }

  .theme-catppuccin > img,
  .theme-kanagawa > img {
    border-radius: 1em 0 0 1em;
  }

  .theme-catppuccin > div,
  .theme-kanagawa > div {
    padding: 0m;
  }
}
