@import url('https://fonts.googleapis.com/css2?family=Codystar:wght@300;400&family=Instrument+Serif:ital@0;1&family=JetBrains+Mono:ital,wght@0,100..800;1,100..800&family=Work+Sans:ital,wght@0,100..900;1,100..900&display=swap');

/* === Global variables === */
:root {
  --big-title-font: "Codystar";
  --title-font: "Instrument Serif";
  --text-font: "Work Sans", sans-serif;
  --mono-font: "Jetbrains Mono";
  --accent-color: #B0FFFA;
  --secondary-accent-color: #5C9E9A;
  --background-color: #000;
  --text-color: #ccc;
  --bold-color: #fff;
  --title-color: #fff;
  --date-color: #888;
}

body {
  font-size: 18px;
  font-weight: 400;
  font-family: var(--text-font);
  background-color: #000;
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-position: center;
  color: var(--text-color);
  padding-left: 10px;
  padding-right: 10px;
  padding-bottom: 40px;
  padding-top: 30px;
}

.container {
  max-width: 700px;
  margin: auto;
  box-sizing: border-box;
}

h2, h3, h4, h5, h6 {
  color: var(--title-color);
  font-family: var(--title-font);
  font-weight: 400;
  margin-bottom: 22px;
  margin-top: 30px;
}

h1 {
  font-family: var(--big-title-font);
  color: var(--title-color);
  font-weight: 500;
  font-size: 40px;
  margin-bottom: 10px;
}

h2 {
  font-size: 32px;
}

h3 {
  font-size: 26px;
}

h4 {
  font-size: 23px;
}

h5 {
  font-size: 20px;
}

h6 {
  font-size: 18px;
}

p, a, ul, blockquote {
  line-height: 1.3;
  font-family: var(--text-font);
  margin-top: 0px;
  word-wrap: break-word;
  overflow-wrap: break-word;
  margin-bottom: 22px !important;
}

li {
  margin-bottom: 0px;
}

p {
  margin-bottom: 30px;
}

.katex {
  font-size: 20px !important;
  color: var(--text-font);
}

.katex-display {
  margin: 0 !important;
}

code {
  font-size: 16px !important;
}

/* Preserve whitespace in pre blocks */
pre {
    white-space: pre !important;
    font-family: var(--mono-font);
    background-color: #1c1c1c;
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 20px;
    overflow-x: auto;
}

/* Block-level code inside pre */
pre code {
    display: block;
    font-family: var(--mono-font);
    color: var(--text-color);
    background-color: transparent !important; /* Inherit from pre */
    padding: 0;
    border-radius: 0;
    white-space: pre !important;
}

/* Inline code inside <p> (default inline behavior) */
p code {
    font-family: var(--mono-font);
    color: var(--text-color);
    background-color: #1c1c1c !important;
    padding: 0.1em 0.3em;
    border-radius: 6px;
    white-space: normal; /* Inline code should wrap normally */
}

b, strong {
  font-weight: 500;
  color: var(--bold-color) !important;
}

a {
  font-family: var(--text-font);
  -webkit-tap-highlight-color: transparent;
  text-decoration: none;
  color: var(--accent-color);
}

a:hover {
  font-weight: bold;
  color: var(--secondary-accent-color);
}

img {
  display: block;
  width: 100%;
  border-radius: 6px;
  object-fit: cover;
  object-position: top;
  margin-bottom: 22px;
}

.back-link {
  display: block;
  margin-bottom: 18px;
}

.date {
  font-size: 18px;
  margin-top: 12px;
  color: var(--date-color);
}

ul {list-style-type: disc;}
