:root {
  color-scheme: light;
  --bg: #ffffff;
  --text: #1a1a1a;
  --text-dim: #6b6b6b;
  --line: #e8e6e1;
  --accent: #b45309;
  --accent-soft: rgba(180, 83, 9, 0.1);
  --max: 640px;
  --serif: Georgia, "Iowan Old Style", "Palatino Linotype", "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", Consolas, monospace;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.5rem;
}

a {
  color: inherit;
}

::selection {
  background: var(--accent-soft);
  color: var(--text);
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent);
}

/* Header */
.site-header {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 1.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  border-bottom: 1px solid var(--line);
}

.site-title {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 700;
  text-decoration: none;
}

.site-nav {
  font-family: var(--sans);
  font-size: 0.875rem;
  display: flex;
  gap: 1.1rem;
}

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

.site-nav a:hover {
  color: var(--accent);
}

main {
  padding: 2.5rem 1.5rem 4rem;
}

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

.post-item {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--line);
}

.post-item:first-child {
  padding-top: 0;
}

.post-item-title {
  font-size: 1.25rem;
  font-weight: 700;
  text-decoration: none;
}

.post-item-title:hover {
  color: var(--accent);
}

.post-item-meta {
  margin-top: 0.35rem;
  font-family: var(--sans);
  font-size: 0.875rem;
  color: var(--text-dim);
}

.post-item-meta time {
  color: var(--accent);
  font-weight: 600;
}

.post-item-excerpt {
  display: block;
  margin-top: 0.25rem;
}

/* Post page */
.post h1 {
  margin: 0 0 0.5rem;
  font-size: 2rem;
  line-height: 1.25;
}

.post-date {
  display: block;
  font-family: var(--sans);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 2rem;
}

.post-body p,
.post-body ul,
.post-body ol,
.post-body blockquote,
.post-body pre {
  margin: 0 0 1.25rem;
}

.post-body a {
  color: var(--accent);
  text-decoration: underline;
}

.post-body blockquote {
  margin-left: 0;
  padding-left: 1rem;
  border-left: 3px solid var(--accent);
  color: var(--text-dim);
}

.post-body code {
  font-family: var(--mono);
  font-size: 0.85em;
  background: #f5f4f1;
  padding: 0.15em 0.35em;
  border-radius: 3px;
}

.post-body pre {
  background: #f5f4f1;
  padding: 1rem;
  border-radius: 6px;
  overflow-x: auto;
}

.post-body pre code {
  background: none;
  padding: 0;
}

/* Footer */
.site-footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.5rem 1.5rem 3rem;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  font-family: var(--sans);
  font-size: 0.8125rem;
  color: var(--text-dim);
}

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

.site-footer a:hover {
  color: var(--accent);
}

@media (max-width: 480px) {
  body {
    font-size: 18px;
  }
  .post h1 {
    font-size: 1.65rem;
  }
}
