@font-face {
  font-family: 'Oxanium';
  src: url('/assets/fonts/Oxanium-Regular.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

:root {
  --bg: #fafafa;
  --text: #1f2937;
  --text-muted: #6b7280;
  --header: #e5e9f0;
  --accent: #2563eb;
  --border: #e5e7eb;
  --link: #5e81ac;
  --link-hover: #81a1c1;
  --code: #e5e9f0;
  --hover: #f3f4f6;

}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #2e3440;
    --text: #d8dee9;
    --text-muted: #eceff4;
    --border: #4c566a;
    --link: #81a1c1;
    --link-hover: #88c0d0;
    --code: #44475a;
    --hover: #353f4b;
  }
}

html {
  font-size: 100%;
  font-family: Oxanium, sans-serif;
  font-weight: normal;
  max-width: 65ch;
  margin: 0 auto;
  padding: 1rem;
}

body {
  background-color: var(--bg);
  color: var(--text);
  margin: 0;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.2rem; }
small { font-size: 0.8rem; }

/* HEADER */

header {
  position: sticky;
  display: flex;
  min-height: 32px;
  top: 0;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

header a.active {
  text-decoration: underline;
}

nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
}

nav ul li {
  padding: 2px 10px;
  display: inline-block;
  margin: 0;
}

main ul.post-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
main li.post-list {
  display: grid;
  grid-template-columns: 8ch 1fr;
  gap: 0.0rem;
  padding: 0.5rem 0.5rem;
  border-radius: 5px;
}

main li.post-list:hover {
  background: var(--hover);
}

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

a:hover {
  color: var(--link-hover);
  text-decoration: underline;
}

/* Code block container */
pre {
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  overflow-x: auto;
  border-radius: 8px;
  font-size: 0.9rem;
  line-height: 1.5;
  background-color: var(--code) !important;
  color: var(--text) !important;
}

/* Inline code */
code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
               "Liberation Mono", "Courier New", monospace;
  font-size: 0.9em;
  background-color: var(--code) !important;
}

/* Prevent double padding */
pre code {
  padding: 0;
  background: none;
}

.tags {
  text-decoration: none;
}
