:root {
  color-scheme: light dark;
  --bg: #f7f7f2;
  --text: #1d1d1b;
  --muted: #66665f;
  --border: #d0d0c8;
  --code-bg: #ecece4;
  --link: #0645ad;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111;
    --text: #ddd;
    --muted: #999;
    --border: #333;
    --code-bg: #1b1b1b;
    --link: #8ab4f8;
  }
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  color: var(--text);
  font: 17px/1.55 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
  margin: 0;
}

a {
  color: var(--link);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.14em;
}

a:hover {
  text-decoration-thickness: 2px;
}

.site-header,
main,
.site-footer {
  max-width: 760px;
  margin: 0 auto;
  padding-inline: 1rem;
}

.site-header {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  align-items: baseline;
  padding-top: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 0.92rem;
}

.site-title {
  font-weight: 700;
}

.site-title a {
  color: var(--text);
  text-decoration: none;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

nav a {
  color: var(--muted);
}

main {
  padding-top: 2rem;
  padding-bottom: 2rem;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1rem;
  padding-bottom: 2rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 0.82rem;
}

h1,
h2,
h3 {
  line-height: 1.2;
}

h1 {
  margin: 0 0 1rem;
  font-size: 1.7rem;
}

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

h3 {
  font-size: 1.05rem;
}

p {
  margin: 0 0 1rem;
}

ul,
ol {
  padding-left: 1.35rem;
}

li + li {
  margin-top: 0.35rem;
}

code,
pre,
time,
.meta,
.status {
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
}

code {
  padding: 0.08rem 0.22rem;
  background: var(--code-bg);
}

pre {
  overflow-x: auto;
  padding: 1rem;
  border: 1px solid var(--border);
  background: var(--code-bg);
}

pre code {
  padding: 0;
  background: transparent;
}

.intro {
  margin-bottom: 2.25rem;
}

.listing {
  margin-top: 2rem;
}

.item-list,
.project-list,
.notes-list {
  list-style: none;
  padding-left: 0;
}

.item-list li {
  display: grid;
  grid-template-columns: 9.4rem 1fr;
  gap: 0.75rem;
}

time,
.meta,
.status {
  color: var(--muted);
  font-size: 0.85rem;
}

.project-list li {
  padding: 0.75rem 0;
  border-top: 1px solid var(--border);
}

.project-list li:last-child {
  border-bottom: 1px solid var(--border);
}

.project-list p {
  margin-top: 0.3rem;
  margin-bottom: 0;
  color: var(--muted);
}

.status {
  margin-left: 0.4rem;
}

.page-header {
  margin-bottom: 1.5rem;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.75rem;
}

.links {
  margin-top: 0.75rem;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 0.9rem;
}

.notes-list li {
  display: grid;
  grid-template-columns: 9.4rem 1fr;
  gap: 0.75rem;
  padding: 0.5rem 0;
  border-top: 1px solid var(--border);
}

.notes-list p {
  margin-top: 0.2rem;
  margin-bottom: 0;
  color: var(--muted);
}

@media (max-width: 560px) {
  html {
    font-size: 16px;
  }

  .site-header,
  .site-footer {
    display: block;
  }

  nav {
    margin-top: 0.5rem;
  }

  .item-list li,
  .notes-list li {
    grid-template-columns: 1fr;
    gap: 0.1rem;
  }
}
