/* Lato font — body text */
@font-face {
  font-family: 'Lato';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(/fonts/lato-latin-400-normal.woff2) format('woff2');
}

@font-face {
  font-family: 'Lato';
  font-style: normal;
  font-display: swap;
  font-weight: 700;
  src: url(/fonts/lato-latin-700-normal.woff2) format('woff2');
}

/* Iosevka font — code blocks */
@font-face {
  font-family: 'Iosevka';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(/fonts/iosevka-latin-400-normal.woff2) format('woff2');
}

/* Catppuccin Macchiato */
:root {
  --ctp-base: #24273a;
  --ctp-mantle: #1e2030;
  --ctp-crust: #181926;
  --ctp-surface0: #363a4f;
  --ctp-surface1: #494d64;
  --ctp-surface2: #5b6078;
  --ctp-overlay0: #6e738d;
  --ctp-overlay1: #8087a2;
  --ctp-text: #cad3f5;
  --ctp-subtext0: #a5adcb;
  --ctp-subtext1: #b8c0e0;
  --ctp-blue: #8aadf4;
  --ctp-lavender: #b7bdf8;
  --ctp-sapphire: #7dc4e4;
  --ctp-teal: #8bd5ca;
  --ctp-green: #a6da95;
  --ctp-yellow: #eed49f;
  --ctp-peach: #f5a97f;
  --ctp-mauve: #c6a0f6;
  --ctp-pink: #f5bde6;
  --ctp-red: #ed8796;
}

::selection {
  background: var(--ctp-surface2);
  color: var(--ctp-text);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Lato', sans-serif;
  font-size: 1.125rem;
  line-height: 1.7;
  letter-spacing: 0.01em;
  color: var(--ctp-subtext1);
  background: var(--ctp-base);
  max-width: 640px;
  margin: 0 auto;
  padding: 2rem 1rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

header {
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--ctp-surface1);
}

header nav a {
  color: var(--ctp-lavender);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.1rem;
}

main {
  flex: 1;
}

h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: var(--ctp-mauve);
}

h2 {
  font-size: 1.4rem;
  margin-bottom: 0.25rem;
  color: var(--ctp-lavender);
}

time {
  color: var(--ctp-subtext0);
  font-size: 0.9rem;
}

.tagline {
  color: var(--ctp-subtext1);
  font-size: 1.1rem;
  margin-bottom: 2rem;
}

a {
  color: var(--ctp-blue);
  text-decoration: none;
}

a:hover {
  color: var(--ctp-sapphire);
}

.post-list {
  list-style: none;
}

.post-list li {
  margin-bottom: 2rem;
}

.post-list h2 {
  margin-bottom: 0.1rem;
}

.post-list a {
  color: inherit;
}

.post-list p {
  color: var(--ctp-subtext1);
}

article {
  line-height: 1.9;
}

article h1 {
  margin-bottom: 0.25rem;
}

article time {
  display: block;
  margin-bottom: 2rem;
}

article p {
  margin-bottom: 1.25rem;
}

article img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
}

article code {
  background: var(--ctp-surface0);
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
  font-family: 'Iosevka', monospace;
  font-size: 0.9em;
  color: var(--ctp-green);
}

article pre {
  background: var(--ctp-mantle);
  padding: 1rem;
  border-radius: 6px;
  overflow-x: auto;
  margin-bottom: 1rem;
  border: 1px solid var(--ctp-surface0);
}

article pre code {
  background: none;
  padding: 0;
  color: var(--ctp-text);
}

article blockquote {
  border-left: 3px solid var(--ctp-mauve);
  padding-left: 1rem;
  color: var(--ctp-subtext1);
  margin-bottom: 1rem;
}

/* Chapter headings */
.chapter {
  margin-top: 2.5rem;
}

.chapter-link {
  color: var(--ctp-lavender);
  text-decoration: none;
  position: relative;
}

.chapter-link:hover {
  color: var(--ctp-blue);
}

.chapter-link:hover::before {
  content: '#';
  color: var(--ctp-overlay0);
  position: absolute;
  right: 100%;
  margin-right: 0.4rem;
}

/* Quill alignment classes */
.ql-align-center {
  text-align: center;
}

.ql-align-right {
  text-align: right;
}

.ql-align-justify {
  text-align: justify;
}

footer {
  margin-top: 3rem;
  padding-top: 1rem;
  border-top: 1px solid var(--ctp-surface1);
  color: var(--ctp-overlay0);
  font-size: 0.85rem;
}
