:root {
  --bg: #ffffff;
  --text: #222222;
  --muted: #6f6f6f;
  --rule: #dddddd;
  --link: #1a5aa6;
  --link-visited: #5b3f8c;
  --code-bg: #f5f5f5;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1c1c1c;
    --text: #dddddd;
    --muted: #9a9a9a;
    --rule: #3a3a3a;
    --link: #7fb0ec;
    --link-visited: #b9a2e0;
    --code-bg: #262626;
  }
}

html { color-scheme: light dark; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 19px;
  line-height: 1.6;
}

.wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 20px;
}
@media (max-width: 600px) {
  body { font-size: 17px; }
  .wrap { padding: 0 16px; }
}

a { color: var(--link); }
a:visited { color: var(--link-visited); }

h1, h2, h3 { font-weight: normal; line-height: 1.25; }
img { max-width: 100%; height: auto; }

/* Header */

.site-header {
  border-bottom: 1px solid var(--rule);
  padding: 2em 0 1em;
  margin-bottom: 2.5em;
}
.site-title {
  display: inline-block;
  font-size: 1.6em;
  color: var(--text);
  text-decoration: none;
}
.site-title:visited { color: var(--text); }
.site-nav { float: right; margin-top: 0.6em; font-size: 0.9em; }
.site-nav a { margin-left: 1em; }
@media (max-width: 600px) {
  .site-nav { float: none; margin-top: 0.3em; }
  .site-nav a { margin: 0 1em 0 0; }
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--rule);
  margin-top: 3em;
  padding: 1em 0 2.5em;
  color: var(--muted);
  font-size: 0.85em;
}

/* Home */

.intro { font-style: italic; color: var(--muted); margin: 0 0 2em; }

.post-list { list-style: none; margin: 0; padding: 0; }
.post-list li { margin: 0 0 2em; }
.post-list h2 { font-size: 1.35em; margin: 0; }
.post-list .date { color: var(--muted); font-size: 0.85em; margin: 0.2em 0 0.5em; }
.post-list p { margin: 0; }

/* Post */

.post-title { font-size: 2em; margin: 0 0 0.2em; }
.post-subtitle { font-size: 1.15em; color: var(--muted); margin: 0 0 0.4em; }
.post-date { color: var(--muted); font-size: 0.9em; margin: 0 0 2em; }

.note {
  font-style: italic;
  color: var(--muted);
  border-left: 3px solid var(--rule);
  padding-left: 1em;
  margin: 0 0 2em;
}

.post-body h2 { font-size: 1.5em; margin: 1.6em 0 0.5em; }
.post-body h3 { font-size: 1.2em; margin: 1.4em 0 0.5em; }
.post-body blockquote { margin: 1.5em 0; padding-left: 1em; border-left: 3px solid var(--rule); color: var(--muted); }
.post-body figure { margin: 2em 0; text-align: center; }
.post-body figure img { border: 1px solid var(--rule); }
.post-body figcaption { color: var(--muted); font-size: 0.85em; }

.post-body code {
  font-family: Menlo, Consolas, "Courier New", monospace;
  font-size: 0.82em;
  background: var(--code-bg);
  padding: 0.1em 0.3em;
}
.post-body pre {
  background: var(--code-bg);
  border: 1px solid var(--rule);
  padding: 0.8em 1em;
  overflow-x: auto;
  line-height: 1.45;
}
.post-body pre code { background: none; padding: 0; }

.post-body hr { border: 0; border-top: 1px solid var(--rule); margin: 2em 0; }
.post-body table { border-collapse: collapse; margin: 1.5em 0; }
.post-body th, .post-body td { border: 1px solid var(--rule); padding: 0.3em 0.6em; }

.footnotes { font-size: 0.85em; color: var(--muted); border-top: 1px solid var(--rule); margin-top: 2.5em; padding-top: 0.5em; }
.post-body td, .post-body th { font-variant-numeric: tabular-nums; }

.lang-switch { margin-left: 1.4em; color: var(--muted); }
.lang-switch a { margin: 0; }
.lang-switch .sep { margin: 0 0.35em; }
.lang-switch [aria-current] { color: var(--text); }
@media (max-width: 600px) { .lang-switch { margin-left: 0; } }
.post-body video { display: block; width: 100%; height: auto; border: 1px solid var(--rule); background: #000; }
