html {
  margin: 0 auto;
}
html,
body {
  margin: 0 auto;
  padding: 0;
  min-height: 100vh;
  height: 100vh;
  max-width: 100vw;
  width: 100vw;
  /* background: #eeeff2; */
  /* color: black; */

  /* --background-block: #eee; */
  font-family: "EB Garamond", serif;
}

/* body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
} */

main {
  /* padding: 0 1rem 2rem 1rem; */
  max-width: 1000px;
  min-height: 100%;
  /* font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; */
  font-family: "EB Garamond", serif;
  display: flex;
  flex-direction: column;
  margin: 0 auto;
}

.footer {
  padding: 1em 0;
  margin-top: auto;
  width: 100%;
  text-align: left;
}

nav {
  flex-grow: 0;
  display: flex;
  justify-content: flex-end;
  padding: 2rem 0;
}

.nav-link {
  padding: 0.5rem;
}

a {
  color: #e5e7eb;
  text-decoration: underline;
}

a:hover {
  text-decoration: underline;
}
.table {
  color: #e5e7eb;
}

table {
  border-collapse: collapse;
  width: 100%;
  color: #e5e7eb;
  text-align: center;
}

td {
  border-top: 1px solid #ccc;
  border-bottom: 1px solid #ccc;
  padding: 0.6rem;
}

.letter-head {
  display: flex;
  flex-direction: row;
  justify-content: end;
  width: 100%;
}

.letter-head-address {
  display: flex;
  flex-direction: column;
  justify-content: end;
  margin-left: auto;
}

@media screen and (max-width: 450px) {
  .optional {
    display: none;
  }
}

h4 {
  font-size: 21px; /* Adjust the font size as needed */
}

h3 {
  font-size: 23px; /* Adjust the font size as needed */
}

h2 {
  font-size: 27px; /* Adjust the font size as needed */
}

h1 {
  font-size: 35px; /* Adjust the font size as needed */
}

pre,
code {
  color: var(--foreground-default);
}

img {
  max-width: 100%;
}

pre {
  display: block;
  margin: 1.5em 0;
  background: var(--background-block);
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  width: 100%;
  display: flex;
  flex-direction: row;
}

pre > code {
  line-height: 1.5em;
  flex-shrink: 0;
  display: block;
  padding: 1em;
}

code {
  background: var(--background-block);
}

p code {
  padding: 3px 5px;
}

blockquote {
  font-style: italic;
}

.katex {
  font-size: 1em !important;
}

/* Adjust the size of Feather icons in the header */
.feather {
  margin-bottom: 4px;
  align-items: flex-end; /* Align items to the bottom */
}

.tag-btn {
  align-items: center;  /* This will vertically center the contents */
  margin-bottom: 4px;
}

.header-content {
  display: flex;
  align-items: center;
  margin: 0 auto;
  width: 100%;
}

.blog-title {
  font-weight: bold;
  font-size: 1.2em;
  padding-left: 0;
}

#nav {
  flex-grow: 0;
  justify-content: flex-end;
  margin-left: auto;
}

.twitter-link {
  display: flex;
  align-items: center;
  font-size: 1.5em; /* Adjust size as needed */
  color: #1DA1F2; /* Twitter blue color */
}

/* Dark Mode */

main,
body,
textarea {
  /* background-color: #121416; */
  color: #e5e7eb;
}

h1,
h2,
h3, 
h4,
h5,
h6 {
  color: #e5e7eb;
  font-family: "EB Garamond", serif;
}

a {
  color: #e5e7eb;
}

a:hover {
  color: #0056b3;
  text-decoration: underline;
}

.navbar,
.navbar-toggler,
.dropdown-menu {
  background-color: #343a40;
}

.navbar-light .navbar-nav .nav-link,
.navbar-light .navbar-nav .nav-link:focus,
.navbar-light .navbar-nav .nav-link:hover,
.navbar-light .navbar-text {
  color: rgba(255, 255, 255, 0.5);
}

.navbar-light .navbar-nav .nav-link.active,
.navbar-light .navbar-nav .nav-link.active:focus,
.navbar-light .navbar-nav .nav-link.active:hover {
  color: #fff;
}

.navbar-light .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255, 255, 255, 0.5)' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

/* End Dark Mode */

/* Spoilers */
.spoiler {
  padding: 5px;
  background-color: #838383 !important;
  color: #838383 !important;
  border: 1px solid #ddd;
  margin: 10px 0;
  cursor: pointer;
  transition: color 0.5s ease;
  border-radius: 4px;
  padding: 15px;
  position: relative; /* Needed to position the pseudo-element */
}

.spoiler::before {
  color: #e5e7eb !important;
  content: "Click to Show";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  visibility: visible;
  font-weight: bold;
  z-index: 1; /* Display the text above the other content */
  transition: color 0.5s ease;
}

.spoiler:active::before,
.spoiler.active::before {
  visibility: hidden;
}

.spoiler .reveal {
  display: none;
}

.spoiler.active {
  color: #e5e7eb !important;
}

.spoiler.active .reveal {
  display: block;
}

.noise-layer {
  opacity: .07;
  pointer-events: none;
  mix-blend-mode: hard-light;
  background-image: url("https://i.imgur.com/r8WBkgW.jpeg");
  background-position: 0 0;
  background-size: 100px 100px;
  flex: 1 0 auto;
  width: 100vw;
  height: 100%;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1;
}

.noise-container {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 800px;
  padding: 0 2.5rem;
  margin: 0 auto;
}

@media (min-width: 600px) {
  .noise-container {
    padding: 0 5rem;
  }
}

.grid-container {
  min-height: 100%;
  height: fit-content;
  width: 100vw;
  position: relative;
  overflow: hidden;
  display: flex;
  background-color: #161616;
}

.grid-container:before {
  content: "";
  background-color: transparent;
  /* background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='110' height='110'%3E%3Crect width='40' height='40' fill='%2300000000' /%3E%3Crect x='50%' width='0.5' height='100%' fill='grey' /%3E%3Crect y='50%' width='100%' height='0.5' fill='grey' /%3E%3C/svg%3E%0A"); */
  background-repeat: repeat;
  opacity: 0.12;
  top: 0;
  left: 0;
  position: absolute;
  min-height: 100%;
  height: fit-content;
  width: 100vw;
}

.table-of-contents {
  max-width: 300px;
  overflow-y: auto;
}

/* Style the ToC nav menu items to have less spacing */
.table-of-contents nav {
  padding: 0;
}

.table-of-contents ul {
  padding-left: 1rem;
  margin: 0.25rem 0;
}

.table-of-contents li {
  margin: 0.25rem 0;
}

.recommended-post {
  text-align: center;
  margin: 1rem 0;
}

@media (min-width: 600px) {
  .recommended-post {
    margin: 0.3rem 0;
  }
}