:root {
  --paper: #F5F6F1;
  --ink: #1E211D;
  --muted: #6B7269;
  --line: #DDE1D7;
  --accent: #2F5D4E;
  --accent-soft: #E4EDE8;
}

html {
  background: var(--paper);
  color: var(--ink);
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  font-size: 18px;
}

body {
  margin: 0;
}

a {
  color: inherit;
}

.site-nav {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 16px clamp(16px, 6vw, 88px);
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 12.5px;
}

.site-nav .brand {
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  font-size: 15px;
  text-decoration: none;
  color: var(--ink);
  margin-right: auto;
}

.site-nav .home-icon {
  display: inline-flex;
  align-items: center;
  color: var(--muted);
  text-decoration: none;
  padding-bottom: 3px;
  border-bottom: 1px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.site-nav .home-icon:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.site-nav .social-avatar {
  display: block;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid var(--line);
  flex-shrink: 0;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.site-nav .social-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.site-nav .social-avatar:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.site {
  width: min(720px, calc(100vw - 32px));
  margin: 32px 0 64px clamp(16px, 6vw, 88px);
}

h1,
h2,
h3,
p,
ul,
ol,
blockquote,
pre {
  margin-top: 0;
}

h1 {
  margin-bottom: 22px;
  font-size: 32px;
  font-weight: normal;
  line-height: 1.15;
  text-wrap: balance;
}

h2 {
  margin: 28px 0 10px;
  font-size: 22px;
  font-weight: normal;
}

p,
li {
  line-height: 1.45;
}

.home .nav-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 20px;
}

.home .nav-links a {
  display: block;
  text-decoration: none;
  color: var(--ink);
  font-size: 20px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.home .nav-links a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.home p,
.page-header p {
  max-width: 62ch;
  color: var(--muted);
}

.item-list,
.simple-list {
  padding-left: 22px;
}

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

.item-list li {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 12px;
  margin: 8px 0;
}

.item-list a,
.simple-list a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  transition: color 0.15s ease, border-color 0.15s ease;
}

.item-list a:hover,
.simple-list a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.item-list time {
  color: var(--muted);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}

.item-list small,
.simple-list small {
  display: block;
  color: var(--muted);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.35;
}

.page-header {
  margin-bottom: 24px;
}

.reading-header {
  margin-bottom: 28px;
}

.reading-header h1 {
  margin-bottom: 6px;
}

.reading-header p,
.empty {
  color: var(--muted);
}

.reading-body {
  max-width: 68ch;
}

.reading-body h2,
.reading-body h3 {
  font-weight: normal;
}

.reading-body blockquote {
  margin-left: 0;
  padding-left: 18px;
  border-left: 1px solid var(--line);
  color: var(--muted);
}

.reading-body pre {
  overflow-x: auto;
  padding: 12px;
  border: 1px solid var(--line);
}

.back-link {
  display: inline-block;
  margin-bottom: 20px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
}

.back-link:hover {
  color: var(--accent);
}

.group {
  margin-top: 26px;
}

.group h2 {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: normal;
}

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

  .site-nav {
    padding: 14px 16px;
  }

  .site {
    margin-top: 24px;
    margin-left: 14px;
  }

  .item-list li {
    grid-template-columns: 70px minmax(0, 1fr);
    gap: 10px;
  }

  .home .nav-links {
    grid-template-columns: 1fr;
  }
}
