@import url('https://fonts.googleapis.com/css?family=Inconsolata:wght@300&display=swap');

@font-face {
  font-family: "JetBrainsMono Semibold";
  src: local("JetBrainsMono Semibold"),
    url("fonts/JetBrainsMono-SemiBold.woff2") format("woff") tech(color-COLRv1), url("fonts/JetBrainsMono-SemiBold.woff2")
      format("woff");
}

/* light mode */
:root {
  --background: #dce0e8;
  --background2: #e6e9ef;
  --foreground: #4c4f69;
  --date: #ea76cb;
  --navbar: #e6e9ef;
  --navsel: #dd7878;
  --navhover: #dc8a78;
  --link: #179299;
  --linkhover: #40a02b;
}

/* dark mode*/
@media (prefers-color-scheme: dark) {
  :root {
    --background: #11111b;
    --background2: #181825;
    --foreground: #cdd6f4;
    --date: #f5c2e7;
    --navbar: #1e1e2e;
    --navsel: #ca9ee6;
    --navhover: #cba6f7;
    --link: #f5e0dc;
    --linkhover: #f5c2e7;
  }
}

/* basic stuff */
body {
  background-color: var(--background);
  color: var(--foreground);
  font-size: 1.5rem;
  margin: 0px;
  overflow-x: hidden;
  font-family: 'Inconsolata', sans-serif;
}

h1 {
  text-align: left;
  font-size: 3rem;
  font-family: 'JetBrainsMono Semibold', sans-serif;
}

h2 {
  text-align: left;
  font-size: 2.25rem;
  font-family: 'JetBrainsMono Semibold', sans-serif;
}

h3 {
  text-align: left;
  font-size: 1.755rem;
  font-family: 'JetBrainsMono Semibold', sans-serif;
}

p {
  word-wrap: break-word;
  width: 100%;
}
.inline {
  display: inline;
}

.inlinehighlight {
  display: inline;
  color: var(--navsel);
}

a {
  color: var(--link);
  text-decoration: underline;
  font-style: normal;
  font-family: 'Inconsolata', sans-serif;
}

a:hover {
  color: var(--linkhover);
  font-family: 'Inconsolata', sans-serif;
  transition: color .2s ease;
  transition-property: color;
  transition-duration: 0.2s;
  transition-timing-function: ease;
  transition-delay: 0s;
}

hr.style {
  border-top: 1px solid var(--foreground);
}

html {
  overflow-y: auto;
}
/*  Navbar  */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  min-height: 120vh; /* please work on iphone */
  overflow-y: auto;
  background-color: var(--navbar);
  z-index: 9999;
  font-family: 'Inconsolata', sans-serif;
}

.hidden {
  visibility: hidden;
}

.sticky.fa.fa-bars { /* navbar button floating */
  padding: 0.8rem;
  top: 4vh;
  left: 90vw;
  color: var(--foreground);
  overflow: hidden;
  background: var(--background2);
  border-radius: 50%;
  font-size: 2.5rem;
  z-index: 999;
}

.sticky {
  /* class for sticky, js applies it when scrolling/resizing and on load */
  position: fixed;
  top: 0;
}

#navbar a {
  display: block;
  color: var(--foreground);
  text-align: left;
  padding: 14px 16px 14px 16px;
  text-decoration: none;
  font-size: 1.5rem;
  font-family: 'Inconsolata', sans-serif;
}

#navbar a:hover {
  background-color: var(--navhover);
  color: var(--background);
  font-family: 'Inconsolata', sans-serif;
}

#navbar a.active {
  background-color: var(--navsel);
  color: var(--background);
  font-family: 'Inconsolata', sans-serif;
}

#navbar a.active:hover {
  background-color: var(--navhover);
  color: var(--background);
  font-family: 'Inconsolata', sans-serif;
}

#navbar .icon {
  float: right;
  display: none;
}

span {
  display: block;
  text-align: center;
}

.blank {
  display: inline;
  color: var(--foreground);
}

#navbar .navsocial a {
  display: none;
  /* display: inline-flex; */
  text-align: left;
}

#navbar .navsocial :not(a) {
  padding-right: 0px;
}

/* extra stuff */
.content {
  padding-top: 20px;
  padding-bottom: 20px;
  padding-left: 10vw;
  padding-right: 10vw;
}

.centered {
  display: flex;
  align-items: center;
  justify-content: center;
}

#indexlinks {
  overflow: hidden;
  background-color: var(--background2);
  border-radius: 10px;
  width: 17vw;
}

#indexlinks span {
  display: inline-block;
  width: 100%;
}

#indexlinks a {
  display: block;
  width: 100%;
  color: var(--foreground);
  text-align: left;
  padding: 14px 16px 14px 16px;
  text-decoration: none;
  font-size: 1.5rem;
  font-family: 'Inconsolata', sans-serif;
}
#indexlinks .fab {
  display: inline; /* index page social media icons */
}

#indexlinks p {
  display: inline;
  text-align: left;
  margin-left: 12px;
}
#indexlinks a:hover {
  background-color: var(--navhover);
  color: var(--background);
  font-family: 'Inconsolata', sans-serif;
}

/* content alignment */
.contentflexboxleft {
  /* picture on left */
  display: flex;
  flex-direction: row;
  position: relative;
}
#text {
  display: none;
}
.contentflexboxright {
  /* means that the picture IS on the right */
  display: flex;
  flex-direction: row;
  position: relative;
}

.contentleft,
.contentright {
  width: 50vw;
  height: auto;
  display: flex;
  justify-content: space-evenly;
  align-items: center;
}

.contentactuallyleft {
  display: flex;
  justify-content: start;
  align-items: center;
}

img,
iframe,
video {
  max-height: 100%;
  max-width: 100%;
  object-fit: scale-down;
  z-index: 1;
}

/* animations */
html {
  scroll-behavior: smooth;
}

p, h1, h2, h3, h4, ul, li, hr, img, video, iframe, pre, code .blogpostbox, .blogpost {
  -webkit-animation-name: fadeInUp;
  animation-name: fadeInUp;
  -webkit-animation-duration: 0.5s;
  animation-duration: 0.5s;
  -webkit-animation-fill-mode: both;
  animation-fill-mode: both;
}

@-webkit-keyframes fadeInUp {
  0% {
    opacity: 0;
    -webkit-transform: translate3d(0, 100%, 0);
    transform: translate3d(0, 100%, 0);
  }

  100% {
    opacity: 1;
    -webkit-transform: none;
    transform: none;
  }
}

@keyframes fadeInUp {
  0% {
    opacity: 0;
    -webkit-transform: translate3d(0, 100%, 0);
    transform: translate3d(0, 100%, 0);
  }

  100% {
    opacity: 1;
    -webkit-transform: none;
    transform: none;
  }
}

.bounceOutLeft {
  -webkit-animation-name: bounceOutLeft;
  animation-name: bounceOutLeft;
  -webkit-animation-duration: 1s;
  animation-duration: 1s;
  -webkit-animation-fill-mode: both;
  animation-fill-mode: both;
}

@-webkit-keyframes bounceOutLeft {
  20% {
    opacity: 1;
    -webkit-transform: translate3d(20px, 0, 0);
    transform: translate3d(20px, 0, 0);
  }

  100% {
    opacity: 0;
    -webkit-transform: translate3d(-50px, 0, 0);
    transform: translate3d(-3000px, 0, 0);
  }
}

@keyframes bounceOutLeft {
  20% {
    opacity: 1;
    -webkit-transform: translate3d(20px, 0, 0);
    transform: translate3d(20px, 0, 0);
  }

  100% {
    opacity: 0;
    -webkit-transform: translate3d(-50px, 0, 0);
    transform: translate3d(-3000px, 0, 0);
  }
}

.bounceInLeft {
  -webkit-animation-name: bounceInLeft;
  animation-name: bounceInLeft;
  -webkit-animation-duration: 1s;
  animation-duration: 1s;
  -webkit-animation-fill-mode: both;
  animation-fill-mode: both;

}

@-webkit-keyframes bounceInLeft {

  0%,
  60%,
  75%,
  90%,
  100% {
    -webkit-transition-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
    transition-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
  }

  0% {
    opacity: 0;
    -webkit-transform: translate3d(-3000px, 0, 0);
    transform: translate3d(-3000px, 0, 0);
  }

  60% {
    opacity: 1;
    -webkit-transform: translate3d(25px, 0, 0);
    transform: translate3d(25px, 0, 0);
  }

  75% {
    -webkit-transform: translate3d(-10px, 0, 0);
    transform: translate3d(-10px, 0, 0);
  }

  90% {
    -webkit-transform: translate3d(5px, 0, 0);
    transform: translate3d(5px, 0, 0);
  }

  100% {
    -webkit-transform: none;
    transform: none;
  }
}

@keyframes bounceInLeft {

  0%,
  60%,
  75%,
  90%,
  100% {
    -webkit-transition-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
    transition-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
  }

  0% {
    opacity: 0;
    -webkit-transform: translate3d(-3000px, 0, 0);
    transform: translate3d(-3000px, 0, 0);
  }

  60% {
    opacity: 1;
    -webkit-transform: translate3d(25px, 0, 0);
    transform: translate3d(25px, 0, 0);
  }

  75% {
    -webkit-transform: translate3d(-10px, 0, 0);
    transform: translate3d(-10px, 0, 0);
  }

  90% {
    -webkit-transform: translate3d(5px, 0, 0);
    transform: translate3d(5px, 0, 0);
  }

  100% {
    -webkit-transform: none;
    transform: none;
  }
}

@-webkit-keyframes rotating /* Safari and Chrome */ {
  from {
    -webkit-transform: rotate(0deg);
    -o-transform: rotate(0deg);
    transform: rotate(0deg);
  }
  to {
    -webkit-transform: rotate(360deg);
    -o-transform: rotate(360deg);
    transform: rotate(360deg);
  }
}
@keyframes rotating {
  from {
    -ms-transform: rotate(0deg);
    -moz-transform: rotate(0deg);
    -webkit-transform: rotate(0deg);
    -o-transform: rotate(0deg);
    transform: rotate(0deg);
  }
  to {
    -ms-transform: rotate(360deg);
    -moz-transform: rotate(360deg);
    -webkit-transform: rotate(360deg);
    -o-transform: rotate(360deg);
    transform: rotate(360deg);
  }
}
.rotating {
  -webkit-animation: rotating 7.5s linear infinite;
  -moz-animation: rotating 7.5s linear infinite;
  -ms-animation: rotating 7.5s linear infinite;
  -o-animation: rotating 7.5s linear infinite;
  animation: rotating 7.5s linear infinite;
}

/*  Blog  */

code { /* single line, similar to ` ` in discord */
  position: relative;
}

pre { /* block of code similar to ```...``` in discord */
  display: block;
  border: 2px solid var(--foreground);
  padding: 30px;
  white-space: pre-wrap;
}

.blogpostbox {
  border: 2px solid var(--foreground);
  margin-bottom: 10px;
}

.blogpost {
  position: relative;
  width: calc(100% - 16px);
  height: 2.5rem;
  padding: 8px;
  color: var(--navhover);
}

.blogpostbox:nth-child(even) {
  /* Alternate colors between the boxes because I think that looks cool */
  background-color: var(--navbar);
}

/* .blogpost:hover {
  background-color: var(--tablehover);
} */

.blogpost a {
  color: var(--navhover);
}

.blogpost a:hover {
  color: var(--navsel);
}

.date {
  color: var(--date);
  position: absolute;
  bottom: 8px;
  right: 8px;
}



/* Responsiveness to phone screens */
/* For really small mobile phones: */
@media only screen and (max-width:568px) {
  h1 {
    font-size: 2.2rem;
  }
  h2 {
    font-size: 1.75rem;
  }
  h3 {
    font-size: 1.5rem;
  }
}
@media only screen and (max-width:767px) {

  /* For mobile phones: */
  .content {
    font-size: 1.3rem;
    column-gap: 10px;
    row-gap: 10px;
  }

  .desktoponly {
    display: none;
  }

  .nomobile {
    display: none;
  }

  .date {
    font-size: 1rem;
  }

  .contentflexboxleft {
    flex-direction: column-reverse;
    justify-content: center;
  }

  .contentflexboxright {
    flex-direction: column;
    justify-content: center;
  }

  .contentcenter {
    width: 50vw;
    max-width: 400px;
    height: auto;
  }
  .blogpost a {
    font-size: 1.0rem;
  }
  .date {
    font-size: 0.8rem;
  }
}

@media only screen and (max-width:1024px) {
  #indexlinks {
    width: 80vw;
  }
  /* For tablets: */
  .main {
    width: 80%;
    padding: 0;
  }

  .right {
    width: 100%;
  }

  .desktoponly {
    display: none;
  }

  .sticky.fa.fa-bars {
    left: 80vw;
    padding: 0.8rem;
    font-size: 2rem;
    opacity: 0.5;
  }

  .contentflexboxleft {
    flex-direction: column-reverse;
    justify-content: center;
  }

  .contentflexboxright {
    flex-direction: column;
    justify-content: center;
  }

  .contentright,
  .contentleft,
  .contentcenter {
    width: 80vw;
    margin-bottom: 5vh;
  }
  code { /* single line, similar to ` ` in discord */
    /* border: 1px solid var(--foreground);
    padding: 5px; */
    font-size: 0.8rem;
  }

  pre { /* block of code similar to ```...``` in discord */
    display: block;
    border: 2px solid var(--foreground);
    padding: 5px;
    font-size: 0.8rem;
    white-space: pre-wrap;
  }

  #navbar .icon {
    display: none;
  }

}
