:root {
  --bg-color: #ffffff;
  --text-color: #000000;
  --border-color: #000000;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg-color: #000000;
    --text-color: #ffffff;
    --border-color: #ffffff;
  }
}

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

body {
  font-family: ui-monospace, 'Cascadia Code', 'Source Code Pro', Menlo, Consolas, 'DejaVu Sans Mono', monospace;
  font-weight: normal;
  background: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  min-height: 100vh;
  padding: 1rem;
}

.wrapper {
  max-width: 800px;
  margin: 0 auto;
}

header {
  border-bottom: 2px solid var(--border-color);
  padding: 1.5rem 0;
  margin-bottom: 2rem;
}

.header-content {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.header-content a {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
  color: var(--text-color);
}

.site-logo {
  width: 48px;
  height: 48px;
}

header h1 {
  font-family: 'Iowan Old Style', 'Palatino Linotype', 'URW Palladio L', P052, serif;
  font-weight: normal;
  font-size: 2rem;
}

nav {
  margin-top: 1rem;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

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

nav a:hover {
  text-decoration: underline;
}

main {
  margin-bottom: 2rem;
}

article {
  margin-bottom: 2rem;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: 'Iowan Old Style', 'Palatino Linotype', 'URW Palladio L', P052, serif;
  font-weight: normal;
}

h1::before {
  content: "# ";
}

h2::before {
  content: "## ";
}

h3::before {
  content: "### ";
}

h4::before {
  content: "#### ";
}

h5::before {
  content: "##### ";
}

h6::before {
  content: "###### ";
}

h1 {
  font-size: 2.5rem;
  margin-top: 2.5rem;
  margin-bottom: 1.5rem;
}

h2 {
  font-size: 2rem;
  margin-top: 2rem;
  margin-bottom: 1.25rem;
}

h3 {
  font-size: 1.5rem;
  margin-top: 1.5rem;
  margin-bottom: 1rem;
}

h4 {
  font-size: 1.25rem;
  margin-top: 1.25rem;
  margin-bottom: 0.75rem;
}

h5 {
  font-size: 1.125rem;
  margin-top: 1.125rem;
  margin-bottom: 0.75rem;
}

h6 {
  font-size: 1rem;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
}

article>h1:first-child,
article>h2:first-child,
article>h3:first-child {
  margin-top: 0;
}

article p {
  margin-bottom: 1rem;
}

article ul {
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}

article li {
  margin-bottom: 0.5rem;
}

table {
  border-collapse: collapse;
  width: 100%;
  margin: 1rem 0;
}

th,
td {
  border: 1px solid var(--border-color);
  padding: 0.5rem;
  text-align: left;
}

th {
  border-bottom: 2px solid var(--border-color);
}

footer {
  border-top: 2px solid var(--border-color);
  padding: 1.5rem 0;
  font-size: 0.875rem;
}

a {
  color: var(--text-color);
}

a:hover {
  text-decoration: underline;
}

pre {
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  padding: 1rem;
  margin: 1rem 0;
  overflow-x: auto;
  border-radius: 4px;
}

code {
  font-family: ui-monospace, 'Cascadia Code', 'Source Code Pro', Menlo, Consolas, 'DejaVu Sans Mono', monospace;
  font-size: 0.9em;
}

pre code {
  background: none;
  padding: 0;
  border: none;
}

:not(pre)>code {
  background: rgba(128, 128, 128, 0.2);
  padding: 0.2em 0.4em;
  border-radius: 3px;
  font-size: 0.9em;
}

@media (prefers-color-scheme: dark) {
  :not(pre)>code {
    background: rgba(255, 255, 255, 0.15);
  }
}

/* Syntax highlighting */
.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
  color: #6a9955;
  font-style: italic;
}

.token.punctuation {
  color: #d4d4d4;
}

.token.namespace {
  opacity: 0.7;
}

.token.property,
.token.tag,
.token.boolean,
.token.number,
.token.constant,
.token.symbol,
.token.deleted {
  color: #b5cea8;
}

.token.selector,
.token.attr-name,
.token.string,
.token.char,
.token.builtin,
.token.inserted {
  color: #ce9178;
}

.token.operator,
.token.entity,
.token.url,
.language-css .token.string,
.style .token.string {
  color: #d4d4d4;
}

.token.atrule,
.token.attr-value,
.token.keyword {
  color: #c586c0;
}

.token.function,
.token.class-name {
  color: #dcdcaa;
}

.token.regex,
.token.important,
.token.variable {
  color: #d16969;
}

/* Dark mode syntax highlighting */
@media (prefers-color-scheme: dark) {

  .token.comment,
  .token.prolog,
  .token.doctype,
  .token.cdata {
    color: #6a9955;
  }

  .token.punctuation {
    color: #d4d4d4;
  }

  .token.property,
  .token.tag,
  .token.boolean,
  .token.number,
  .token.constant,
  .token.symbol,
  .token.deleted {
    color: #b5cea8;
  }

  .token.selector,
  .token.attr-name,
  .token.string,
  .token.char,
  .token.builtin,
  .token.inserted {
    color: #ce9178;
  }

  .token.operator,
  .token.entity,
  .token.url,
  .language-css .token.string,
  .style .token.string {
    color: #d4d4d4;
  }

  .token.atrule,
  .token.attr-value,
  .token.keyword {
    color: #c586c0;
  }

  .token.function,
  .token.class-name {
    color: #dcdcaa;
  }

  .token.regex,
  .token.important,
  .token.variable {
    color: #d16969;
  }
}