body {
  background-color: var(--dark-grey);
  color: var(--white);
  font-size: 112%;
  line-height: 1.5;
  margin: 0 auto;
  margin: 0 auto 0 auto;
  padding: 0.75em;
  max-width: 700px;
  font-family: "JetBrainsMono";
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--white);
  display: inline;
  background-image: linear-gradient(
    transparent 10%, 
    var(--red) 10%, 
    var(--red) 90%, 
    transparent 90%
  );
}

h1 {
  font-size: 2em;
}

h2 {
  font-size: 1.5em;
}

h3 {
  font-size: 1.3em;
}

h4 {
  font-size: 1em;
}

h5 {
  font-size: 0.8em;
}

h6 {
  font-size: 0.7em;
}

a,
a:visited,
a:hover,
a:active {
  color: inherit;
}

a:hover {
  color: var(--green);
}

ul li {
  list-style: "⁍ ";
}

article {
  margin: 1.33em 0 1.33em 0
}

p {
  text-align: justify;
  text-justify: inter-word;
}

p img {
  max-width: 100%;
  margin: 0 auto 0 auto;
  display: block;
}

blockquote {
  border-left: solid var(--green) 0.2em;
  position: relative;
  padding: 0.1em 1.5em 0.1em 1.5em;
  color: var(--grey);
  margin: 0;
  border-radius: 0.2rem;
  font-style: italic;
}

nav a {
  text-decoration: none;
}

.nav-left {
  display: inline;
}

.nav-right {
  float: right;
}

figure {
  max-width: 100%;
  margin: 1.5em auto;
  padding: 0;
}

figure img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
}

figcaption {
  text-align: center;
  font-size: 0.9em;
  color: var(--grey);
  margin-top: 0.5em;
}

.post-link {
  text-decoration: none;
}

.post-meta {
  margin-bottom: 2rem;
}

.post-description {
  color: var(--grey);
}

.post-data {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.85em;
  color: var(--turquoise);
  text-transform: uppercase;
  letter-spacing: 0.05ch;
}

.post-data time::after {
  content: "//";
  margin-left: 0.75rem;
  color: var(--grey);
  opacity: 0.5;
}

.comment-help {
  text-align: center;
  color: var(--grey);
  margin: 1em 0 1em;
}

.comment {
  padding: 0.2em 0 0.2em 0.8em;
  border-radius: 0.2rem;
  border-left-style: solid;
  margin-bottom: 1em;
}

.comment-empty {
  margin: 2em;
  color: var(--turquoise);
}

.comment-user-info {
  display: flex;
  flex-direction: row;
  align-items: center;
}

.comment-content {
  font-size: 0.9em;
}

.comment-username {
  font-weight: bold;
  color: var(--white);
}

.comment-user-fqn {
  font-weight: lighter;
}

.comment-user-link {
  text-decoration: none;
}

.comment-avatar {
  width: 2.5em;
  height: 2.5em;
  border-radius: 0.2em;
}

.comment-name-section {
  margin-left: 0.5em;
  color: var(--grey);
  font-size: 0.8em;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.comment-actions {
  display: flex;
  align-items: center;
  font-size: 0.9em;
  gap: 0.7em;
}

.comment-reply,
.comment-boost,
.comment-star {
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.3em;
}

.copy-button {
  border: none;
  background: none;
  float: right;
}

.copy-button-icon {
  height: 1.5em;
}

.copy-button:hover {
  cursor: pointer;
}

.copy-button::selection {
  cursor: pointer;
}

.check-icon {
  height: 1.5em;
}

.hidden {
  display: none;
}

@keyframes bounce {
  0% { transform: scale(1); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

.copy-button.success {
  animation: bounce 0.7s ease-in-out;
}

.icon-reply {
  fill: var(--turquoise);
  color: var(--green);
}

#comment-loading-placeholder {
  display: flex;
  justify-content: center;
}

#comment-loading-logo {
  animation: rotate 2s linear infinite;
  width: 3em;
  height: auto;
}

@keyframes rotate {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.highlight {
  border: solid var(--grey) 0.01em;
}

.highlight pre {
  margin: 0;
  padding: 1em;
}

.img-width-70 {
  width: 70%;
  height: auto;
}

.post-separator {
  border: none;
  text-align: center;
  color: var(--grey);
  font-family: 'Space Mono', monospace;
  opacity: 0.5;
}

.post-separator::before {
  content: "--- < // > ---";
  letter-spacing: 0.5em;
  font-size: 0.8rem;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.post-link-wrapper {
  position: relative;
  transition: all 0.2s ease;
}

.post-link-wrapper::before {
  content: ">";
  position: absolute;
  left: -1rem;
  top: 0.47rem;
  color: var(--green);
  opacity: 0;
  font-family: 'Space Mono', monospace;
}

.post-link-wrapper:hover::before {
  opacity: 1;
  animation: blink 1s step-end infinite;
}

.post-link-wrapper:hover h2 {
  background-image: linear-gradient(
    transparent 10%, 
    var(--green) 10%, 
    var(--green) 90%, 
    transparent 90%
  );
}

.read-more {
  font-family: 'Space Mono', monospace;
  font-size: 0.9rem;
  margin-top: 1rem;
  display: inline-block;
  cursor: pointer;
}

.read-more:hover {
  text-decoration: underline;
  color: var(--turquoise);
}

footer {
  margin-top: 2em;
}

footer a {
  text-decoration: none;
}

footer .footer-content {
  margin: 2em 0;
  display: flex;
  justify-content: space-between;
}

.footer-content ul {
  margin: 0;
  padding: 0;
}

.footer-content ul li {
  list-style: none;
}

.rss-icon {
  height: 1.2em;
  width: auto;
  vertical-align: middle;
  position: relative;
}

.mastodon-icon {
  height: 1em;
  vertical-align: middle;
}

.green {
  color: var(--green);
}

.turquoise {
  color: var(--turquoise);
}

.grey {
  color: var(--grey);
}

.not-found-ascii>a {
  text-decoration: none;
}

pre {
  overflow: scroll;
}

:root {
  --dark-grey: #2b2724;
  --white: #ebdbb2;
  --grey: #938b81;

  --green: #89943a;
  --red: #cb4b16;
  --turquoise: #439a93;

  --comment-indentation: 1em;
}

@font-face {
  font-family: "JetBrainsMono";
  src: local("JetBrainsMono"), url("/fonts/JetBrainsMono-Regular.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@media (prefers-color-scheme: light) {
  :root {
    --dark-grey: #fdf6e3; 
    --white: #3c3836;     

    --red: #d37e5d;
  }

  body {
    background-color: var(--dark-grey);
    color: var(--white);
  }

  h1, h2, h3, h4, h5, h6 {
    color: #fdf6e3; 
  }

  blockquote {
    background-color: rgba(147, 139, 129, 0.08);
    color: #586e75;
    border-left-color: var(--green);
  }

  .highlight {
    background-color: #eee8d5;
    border-color: #e0d9c1;
  }

  .post-separator {
    color: var(--turquoise);
    opacity: 0.6;
  }
}

#post-comments {
  position: relative;
}

.comment {
  position: relative;
  padding: 0.5em 0 0.5em 1.5em; 
  border-left: none;
  margin-bottom: 0;
}

.comment::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background-color: var(--grey);
}

.comment::after {
  content: "";
  position: absolute;
  left: 0;
  top: 1.5em;
  width: calc((var(--comment-indentation) * var(--depth)) + 1em);
  height: 2px;
  background-color: var(--grey);
}

.comment:last-child::before {
  height: 1.5em;
  bottom: auto;
}

.comment-tree-branch {
  background-color: var(--branch-color) !important;
}

.katex-display {
    overflow-x: auto;
    overflow-y: hidden;
    padding: 10px 0;
    /* Optional: Custom scrollbar styling */
    -webkit-overflow-scrolling: touch;
}

.katex-display > .katex {
    max-width: 100%;
}
