@font-face {
  font-family: telegrama-render;
  src: url(/fonts/telegrama_render_osn.otf) format('opentype');
  font-weight: normal;
}

@font-face {
  font-family: telegrama-raw;
  src: url(/fonts/telegrama_raw.otf) format('opentype');
  font-weight: normal;
}

@keyframes moving-bg{
  0%{
    background-position: 0 0;
  }
  100%{
    background-position: 100px 100px;
  }
}

@keyframes moving-text{
  0%{
    transform: translateX(200vw);
  }
  100%{
    transform: translateX(-200vw);
  }
}

h1, h2, h3{
  font-family: telegrama-render;
  color: rgb(27, 139, 192);
}

ul, p{
  font-family: telegrama-raw, Arial, Helvetica, sans-serif;
  color: rgb(27, 15, 34);
}

header pre{
  font-size: 14px;
  font-family: telegrama-raw, Arial, Helvetica, sans-serif;
  color: rgb(27, 15, 34);
  text-shadow: 0 0 2px rgb(227, 233, 236);
  animation: moving-text 16s linear infinite;
  position: absolute;
  top: 0;
}

body{
  margin: 0;
  background-image: url(/images/bg.png);
  background-size: clamp(50px, 30%, 100px) auto;
  background-color: rgb(238, 226, 223);
  animation: moving-bg 12s linear infinite;
}

header{
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 160px;
  position: fixed;
  top: 0;
  /*background-configs*/
  background-image: linear-gradient(180deg, #6DA0E1 0%, #6BC0FC 40%, #eee2df 65%);
  background-color: rgb(238, 226, 223);
  /*border-config*/
  border-bottom: 1px solid rgb(47, 128, 228);
  border-radius: 0 0 30px 30px;
  box-shadow: 0 4px 9px rgb(22, 95, 184);
  z-index: 3;
}

.main-content{
  display: flex;
  flex-direction: row;
  justify-content: center;
  margin-top: 170px;
  margin-bottom: 70px;
  margin-left: 10px;
  margin-right: 10px;
  min-height: 100vh;
  z-index: 1;
}

.sidebar1, .sidebar2, .grid{
  display: flex;
  flex-flow: column nowrap;
  justify-content: center;
  align-items: center;
  height: 100%;
  overflow-y: scroll;
  padding: 1rem;
  row-gap: 10px;
  /*scroll-bar*/
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.grid{
  width: 55%;
}

.sidebar1, .sidebar2{
  width: 20%;
}

.sidebar1{
  order: 1;
}

.grid{
  order: 2;
}

.sidebar2{
  order: 3;
}

button{
  background-image: linear-gradient(180deg, #6DA0E1 0%,#eee2df 65%);
  background-color: #eee2df;
  border: 2px solid rgb(47, 128, 228);
  border-radius: 15px;
  box-shadow: 0 0 8px 1px rgb(47, 128, 228);
  font-family: telegrama-raw, Arial, Helvetica, sans-serif;
  font-size: clamp(0.9rem, 2vw, 1.3rem);
  color: rgb(27, 15, 34);
  cursor: pointer;
}

.box{
  position: relative;
  background-color: rgb(238, 226, 223);
  border: 3px solid rgb(47, 128, 228);
  border-radius: 20px;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 2px 10px;
  box-shadow: 0 0 8px 1px rgb(47, 128, 228);
  width: 90%;
  /*scroll-bar*/
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.box h1{
  font-size: clamp(1rem, 4vw, 2rem);
}

.box p, ul{
  font-size: clamp(0.9rem, 2vw, 1rem);
}

nav{
  position: absolute;
  display: flex;
  flex-flow: row nowrap;
  justify-content: center;
  align-items: center;
  row-gap: 8px;
  column-gap: 15px;
  bottom: 10px;
  margin: auto;
}

#welcome{
  order: 1;
  max-height: 400px;
}

#about-site{
  order: 2;
}

#portrait{
  display: block;
  float: none;
  top: 40px;
  clip-path: ellipse(42% 49% at 50% 50%);
  margin: auto;
  height: auto;
  width: 200px;
}

#gallery{
  order: 2;
}

#chat{
  display: flex;
  justify-content: center;
  height: 300px;
  order: 2;
}

#chat iframe{
  position: absolute;
  bottom: 0;
}

#main{
  order: 1;
}

#music{
  order: 1;
}

#misc{
  order: 3;
}

footer{
  width: 100%;
  height: 60px;
  position: fixed;
  bottom: 0;
  overflow: hidden;
  align-content: center;
  z-index: 2;
  /*background-config*/
  background-image: linear-gradient(0deg, #6DA0E1 0%, #6BC0FC 20%, #eee2df 60%);
  background-color: rgb(238, 226, 223);
  /*border-config*/
  border-bottom: 1px solid rgb(47, 128, 228);
  box-shadow: 0 -4px 9px rgb(22, 95, 184);
}

@media (max-width: 1024px){
  .main-content{
    flex-direction: column;
  }
  .sidebar1, .sidebar2, .grid{
    width: 90vw;
  }
  
  .grid{
    order: 2;
  }

  .sidebar1{
    order: 1;
  }

  .sidebar2{
    order: 3;
  }

  #portrait{
    float: right;
    margin-left: 10px;
    margin-bottom: 10px;
  }
}