:root {
  --primary-font: poppins, sans-serif;
  --primary-box-padding: 10pt;
  --primary-border-radius: 15px;
  --accent-bg: #f34d3e;
  --accent-bg-2: #5c5ef7;
  --secondary-bg: #dddad8;
  --primary-bg: #e4e2e1;
  --primary-fg: #44403e;
  --secondary-fg: #44403e;
  /**--accent-fg:**/
}

.dark {
  --primary-bg: #13141A;
  --primary-fg: #F8F8F2;
  --secondary-bg: #1B1C24;
  --secondary-fg: #2D2F3C;
}

::selection {
  background-color: var(--accent-bg-2);
  color: var(--primary-fg);
}

* {
  box-sizing: border-box;
  
}

body {
  margin: 2rem;
  background-color: var(--primary-bg);
  font-family: var(--primary-font); 
}

body.dark #moon {
  display: none;
}

body:not(.dark) #sun {
  display:none;
}

h1#hey-there {
  -webkit-text-fill-color: transparent;
  -webkit-background-clip: text;
  background-image: linear-gradient(20deg, #89b4fa, #cba6f7, #f5c2e7 40%);
  font-weight: 900;
  font-size: 2rem;
}

div.container {
  margin: auto;
  margin-top: 7rem;
  max-width: 60rem;
}

div.columns {
  display: flex;
  flex-direction: row;
  gap: 40px;
}

@media (max-width: 800px) {
  div.columns {
    flex-direction: column;
  }
  .header-list * {
    display: inline-block;
  }
  .header-list > a > div {
    padding: 4pt 6pt!important;
  }
  div.sidebar {
    padding: 0pt!important;
    width: 100%;
  }
  div.sidebar > ul.header-list {
    margin: 0;
  }
  div.container {
    margin-top: 0rem;
  }
  body {
    margin: 1rem;
  }
}

div.main {
  width: 100%;
  padding: var(--primary-box-padding);
  border-radius: var(--primary-border-radius);
  color: var(--primary-fg); /* #EAEAE5 easier on the eyes */
  font-family: var(--primary-font);
  line-height: 1.8em;
}

div.main > p > img {
  max-width: 100%;
  height: auto;
  border-radius: 5pt;
}

div.sidebar {
  background-color: var(--primary-bg);
  padding: var(--primary-box-padding);
  padding-top: 40px;
  border-radius: var(--primary-border-radius);
  min-width: 10rem;
}

.header-list {
  padding-left: 0;
  list-style-type: none;
}

.header-list > a > div {
  padding: 4pt 10pt;
  border-radius: 5pt;
  transition: background-color 75ms ease-in;
}

.header-list > a > div:hover {
  background-color: var(--secondary-fg);
}

.header-list > a > div:hover * {
  color: var(--accent-bg);
}

.header-list > a > div:active {
  background-color: var(--accent-bg);
}
.header-list > a > div:active * {
  color: var(--secondary-bg);
}

.header-list > a > div.active {
  color: var(--accent-bg);
  font-weight: 700;
}

.header-list div.active:active {
  color: var(--primary-fg);
}

.header-list > a {
  font-weight: 500;
  color: var(--primary-fg);
  text-decoration: none;
}

.oaj-logo {
  padding-left: 10px;
  height: 30px;
}

.footer {
  margin-top: 5rem;
  height: 5rem;
  display: flex;
  flex-direction: row;
  gap: 10px;
  justify-content: space-between;
  text-align: center;
  padding: 5px;
}

.footer * {
  color: var(--secondary-fg);
  font-weight: 500;
}

.links {
  display: flex;
  flex-direction: row;
  gap: 5px;
  line-height: 1.8em;
}

.main a {
  color: var(--accent-bg);
  position: relative;
  font-weight: 600;
  text-decoration: none;
}

.main > p > a::after {
  content: "";
  position: absolute;
  z-index: -10;
  bottom: 1px;
  left: 0;
  background: var(--accent-bg);
  width: 0%;
  height: 0.1em;
  transition: width 500ms;
}

.main a:hover::after {
  width: 100%;
}

.blog-post-link-box {
  display: flex;
  flex-direction: column;
  gap: 10px; 
}

.blog-post-link-box a::after {
  height: 0;
}

.blog-post-link {
  background-color: var(--secondary-bg);
  border-radius: 10px; 
  padding: 5px 10px;
}

.blog-post-link .blog-link-date, .blog-link-title {
  color: var(--primary-fg);
}

.blog-post-link:hover {
  background-color: var(--accent-bg);
}

.blog-post-link:hover * {
  color: var(--secondary-bg);
}

.blog-link-date {
  font-weight: 300;
  font-size: 0.9em;
}

.gallery {
  display: flex;
  gap: 20px;
  flex-direction: row;
  flex-wrap: wrap;
  flex: 1;
  width: 100%;
  container-type: inline-size;
}

.image-box {
  border-radius: 16pt;
  width: 12rem;
  height: 12rem;
  transition: box-shadow 200ms, transform 250ms cubic-bezier(0.68,-0.55,0.27,1.55);
  position: relative;
  overflow: hidden;
}

.image-box img {
  border-radius: 16pt;
  max-width: 100%;
}

.image-box:hover {
  box-shadow: 0px 0px 20px 5px rgba(0, 0, 0, 0.8);
  border: solid var(--secondary-bg) 1px;
  transform: scale(1.1);
  z-index: 1000;
}
.image-box:hover .image-title {
  opacity: 1;
}


@container (max-width: 620px) {
  .image-box {
    width: 100%;
    height: auto;
  }
}

.image-title {
  background-image: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.3) 30%, rgba(0, 0, 0, 1));
  padding: 50px 20px 10px 20px;
  width: 100%;
  position: absolute;
  bottom: 0;
  font-weight: 600;
  color: var(--primary-fg);
  opacity: 0;
  font-size: 0.8rem;
  
  animation: fade;transition: opacity 200ms;
}

.highlight > pre:nth-child(1) {
  /* background should be #0F0F13 */
  padding: 10pt;
  border-radius: var(--primary-border-radius);
  overflow-x: scroll;
  line-height: 1.5em;
}

div.blog-tag-list {
  margin-bottom: 3pt;
}

a.tag {
  background-color: var(--accent-bg);
  color: var(--primary-fg);
  border-radius: 5pt;
  padding: 2pt 5pt;
  font-size: 0.8rem;
  font-weight: 500;
}

a.tag:hover {
  background-color: var(--accent-bg-2);
}

a.footnote-ref {
  font-size: 0.7rem;
}

div.footnotes p {
  margin: 0;
  font-size: 0.9rem;
  font-style: italic;
}

div.footnotes ol {
  padding-left: 20pt;
}

div.footnotes ol > li::marker {
  color: var(--primary-fg);
}

div.theme-toggle {
  box-shadow: 0px 0px 7px 2px rgba(0, 0, 0, 0.1);
  margin: 20px;
  width: fit-content;
  border-radius: 5pt;
  position: fixed;
  right: 0;
  bottom: 0;
}

div.theme-toggle button {
  background-color: var(--secondary-bg);
  cursor: pointer;
  width: 40px;
  height: 40px;
  line-height: 20px;
  border: none;
  border-radius: 5pt;
  fill: var(--primary-fg);
  padding: 10px;
  transiton: transform 250ms cubic-bezier(0.68,-0.55,0.27,1.55);
}

#sun, #moon {
  width: 20px;
}

div.theme-toggle button:hover {
  transform: scale(110%);
}
