/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

@import url('https://fonts.googleapis.com/css2?family=Roboto+Mono:ital,wght@0,100..700;1,100..700&display=swap');

:root {
  --main-color: hsl(211, 29%, 74%);
  --main-background: hsl(105, 100%, 1%);
  --heading-color: hsl(211, 35%, 85%);
  --link-color: hsl(201, 47%, 50%);
  --link-hover-color: hsl(358, 100%, 68%);
  --link-visited-color: hsla(283, 35%, 50%, 1);
  --transparent: hsla(0, 0%, 0%, 0);
  --contact-image-size: 300px;

  --github-blue: rgb(64, 120, 192);
  --github-green: rgb(108, 198, 68);
  --github-red: rgb(189, 44, 0);
  --github-orange: rgb(201, 81, 12);
  --github-white: rgb(250, 250, 250);
  --github-offwhite: rgb(245, 245, 245);
  --github-darkgrey: rgb(51, 3, 0);
  
  --side-container-max-width: 300px;
  --side-container-width: max(var(--side-container-max-width), var(--infobox-image-size));
}

* {
  font-family: 'Roboto Mono', monospace;
  font-size: 12pt;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
}

html {
  box-sizing: border-box;
  height: 100%;

  /** New-style scrollbar syntax */
  scrollbar-gutter: stable;
}

body {
  background-color: var(--main-background);
  color: var(--main-color);
  height: fit-content;
  min-height: 100%;
}

a {
  color: var(--link-color);
  text-decoration: none;
  transition: all 0.3s ease-in;

  /* Hide the blue background on mobile */
  -webkit-tap-highlight-color: transparent;

  text-decoration: none;
  background-image:
    linear-gradient(var(--link-hover-color), var(--link-hover-color));
  background-size: 0px 0px;
  background-position: 0 100%;
  background-repeat: no-repeat;
}

a:hover {
  color: var(--link-hover-color);
  text-shadow: 1px 1px 0.2rem var(--link-hover-color);

  background-size: 100% 1px;
  transition-property: color, background-size;
  transition-duration: 0.1s, 0.4s;
  transition-timing-function: ease-in, linear;
}
  
a:not(:hover) {
  background-size: 0px 0px;
  background-position: 100% 100%;
  transition-property: color, background-size;
  transition-duration: 0.4s, 0.4s;
  transition-timing-function: ease-in, linear;
}

a.no-underline {
  background-image: none;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--heading-color);
}

/** Scrollbar */
::-webkit-scrollbar {
  width: 12px;
}

h1 {
  font-size: 18pt;
}

h2 {
  font-size: 16pt;
}

::-webkit-scrollbar-track {
  background: var(--main-background);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb {
  background-color: var(--link-color);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background-color: var(--link-hover-color);
}

/** New-style scrollbar syntax */
html {
  scrollbar-gutter: stable;
}

@keyframes flashing {
  0%, 100% {
    text-shadow: none;
  }
  50% {
    text-shadow: 0px 0px 1rem var(--link-hover-color);
  }
}

#page-container {
  width: 97%;
  height: 100%;
  margin-left: 3%;
  padding-bottom: 10px;
  display: flex;
  flex-direction: column;
  height: 100vh;
}

#navbar {
  padding-top: 20px;
  z-index: 50;
  background-color: var(--main-background);
  width: 100%;
  border-bottom: 1px solid var(--main-color);
  position: sticky;
  top: 0;
}

#navbar-links {
  display: flex;
  justify-content: space-evenly;
  padding-bottom: 5px;
}

#navbar-links a {
  font-size: 16pt;
}

#main-container {
  display: flex;
  justify-content: flex-start;
  padding-top: 15px;
  gap: 15px;
  overflow-y: auto;
  width: 100%;
}

#sidebar-container {
  position: fixed;
  width: var(--side-container-width);
  height: calc(100% - 70px);
}

#content {
  margin-left: var(--side-container-width);
  padding-left: 8%;
  padding-right: 8%;
  width: calc(100% - var(--side-container-width) - 20px);
  height: fit-content;
}

#infobox {
  width: 100%;
}

.icon-link {
  text-decoration: none;
  background-image: none;
}

.icon-link img {
  height: 30px;
}

@media screen and (max-width: 900px) {
  #main-container {
    display: flex;
    flex-direction: column;
  }

  #sidebar-container {
    position: static;
    margin: auto;
    width: auto;
    height: auto;
  }

  #content {
    width: 100%;
    left: 0;
    margin-left: 0;
  }
}
