*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #333;
  max-width: 832px;
  margin: 60px auto;
  padding: 0 20px;
}

a { color: #0969da; }
a:hover { color: #0550ae; }

header {
  display: flex;
  align-items: baseline;
  gap: 20px;
  margin-bottom: 48px;
}

header a.name {
  font-weight: 600;
  text-decoration: none;
}

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

nav a {
  text-decoration: none;
  color: #999;
  font-size: 14px;
}

nav a:hover { color: #333; }

/* Index: post list */
.posts {
  list-style: none;
  padding: 0;
  margin: 0;
}

.posts li {
  display: flex;
  gap: 20px;
  align-items: baseline;
  padding: 10px 0;
  border-bottom: 1px solid #eee;
}

.posts li:first-child { border-top: 1px solid #eee; }

.date {
  color: #999;
  font-size: 14px;
  font-family: monospace;
  white-space: nowrap;
  min-width: 110px;
}

.posts a { text-decoration: none; }
.posts a:hover { text-decoration: underline; }

/* Post page */
article h1 { margin-bottom: 4px; }

article time {
  color: #999;
  font-size: 14px;
}

article .content { margin-top: 28px; }

article .content h2,
article .content h3 { margin-top: 32px; }

pre {
  background: #f5f5f5;
  padding: 16px;
  overflow-x: auto;
  font-size: 14px;
}

code { font-size: 14px; }

/* Inline code */
:not(pre) > code {
  background: #f6f8fa;
  border: 1px solid #d0d7de;
  border-radius: 4px;
  padding: 1px 5px;
}

/* Tables */
table {
  border-collapse: collapse;
  width: 100%;
  margin: 16px 0;
}

th, td {
  border: 1px solid #d0d7de;
  padding: 6px 13px;
}

th {
  background: #f6f8fa;
  font-weight: 600;
}

tr:nth-child(even) td {
  background: #f6f8fa;
}

/* Blockquote */
blockquote {
  border-left: 4px solid #d0d7de;
  color: #656d76;
  margin: 0;
  padding: 0 16px;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}
