:root {
  color-scheme: light dark;
  --bg: #fcfcfa;
  --text: #171717;
  --muted: #66645f;
  --line: #dedbd2;
  --link: #165f7a;
  --code-bg: #f0eee7;
  --max-width: 720px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #171716;
    --text: #eeeeea;
    --muted: #aaa69d;
    --line: #3a3832;
    --link: #8fc7d8;
    --code-bg: #24231f;
  }
}

* {
  box-sizing: border-box;
}

html {
  font-size: 18px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
  line-height: 1.65;
}

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

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

.site-header,
main,
footer {
  width: min(var(--max-width), calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 0 20px;
  border-bottom: 1px solid var(--line);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.site-title {
  color: var(--text);
  font-weight: 650;
  text-decoration: none;
}

nav {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
}

nav a[aria-current="page"],
nav a:hover {
  color: var(--text);
}

main {
  padding: 44px 0 60px;
}

.note > *:first-child {
  margin-top: 0;
}

h1,
h2,
h3,
h4 {
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.25;
}

h1 {
  margin: 0 0 28px;
  font-size: 2rem;
  letter-spacing: 0;
}

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

h3 {
  margin-top: 32px;
  font-size: 1rem;
}

p,
ul,
ol,
blockquote,
pre {
  margin: 0 0 22px;
}

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

li + li {
  margin-top: 8px;
}

blockquote {
  border-left: 2px solid var(--line);
  color: var(--muted);
  padding-left: 18px;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 28px 0;
  border: 1px solid var(--line);
}

img.portrait {
  width: 280px;
  height: 280px;
  object-fit: cover;
  border-radius: 50%;
}

code {
  background: var(--code-bg);
  border-radius: 3px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.88em;
  padding: 0.08em 0.28em;
}

pre {
  overflow-x: auto;
  background: var(--code-bg);
  padding: 16px;
}

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

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

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

.project-list a {
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 650;
}

.project-list span {
  color: var(--muted);
  float: right;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.85rem;
}

.project-list p {
  margin: 8px 0 0;
  color: var(--muted);
}

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

  .site-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .project-list span {
    display: block;
    float: none;
    margin-top: 4px;
  }
}
