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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 18px;
  line-height: 1.6;
  color: #222;
  background: #fff;
  margin: 0;
  padding: 0;
}

.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header */
header {
  border-bottom: 1px solid #ddd;
  padding: 1.5rem 0;
  margin-bottom: 0;
}

header .container {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
}

.site-title {
  font-size: 1.4rem;
  font-weight: 700;
}

.site-title a {
  color: #222;
  text-decoration: none;
}

.site-title a:hover {
  text-decoration: underline;
}

.site-tagline {
  color: #666;
  font-size: 0.95rem;
}

/* Nav */
nav {
  border-bottom: 1px solid #eee;
  padding: 0.6rem 0;
  margin-bottom: 2.5rem;
}

nav .container {
  display: flex;
  gap: 1.5rem;
}

nav a {
  color: #444;
  text-decoration: none;
  font-size: 0.95rem;
}

nav a:hover {
  color: #000;
  text-decoration: underline;
}

/* Main content */
main {
  padding-bottom: 3rem;
}

/* Footer */
footer {
  border-top: 1px solid #ddd;
  padding: 1.5rem 0;
  color: #666;
  font-size: 0.9rem;
}

/* Typography */
h1 {
  font-size: 1.8rem;
  line-height: 1.25;
  margin: 0 0 0.5rem;
  font-weight: 700;
}

h2 {
  font-size: 1.4rem;
  margin: 2rem 0 0.75rem;
  font-weight: 700;
}

h3 {
  font-size: 1.15rem;
  margin: 1.5rem 0 0.5rem;
  font-weight: 700;
}

h4 {
  font-size: 1rem;
  margin: 1.25rem 0 0.4rem;
  font-weight: 700;
}

p {
  margin: 0 0 1rem;
}

a {
  color: #0055bb;
}

a:hover {
  color: #003388;
}

ul, ol {
  margin: 0 0 1rem;
  padding-left: 1.75rem;
}

li {
  margin-bottom: 0.25rem;
}

blockquote {
  border-left: 3px solid #ccc;
  margin: 1.5rem 0;
  padding: 0.5rem 1.25rem;
  color: #555;
  font-style: italic;
}

blockquote p:last-child {
  margin-bottom: 0;
}

/* Code */
code {
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 0.875em;
  background: #f4f4f4;
  padding: 0.15em 0.4em;
  border-radius: 3px;
}

pre {
  background: #f4f4f4;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  padding: 1rem 1.25rem;
  overflow-x: auto;
  margin: 0 0 1.5rem;
  font-size: 0.875rem;
  line-height: 1.5;
}

pre code {
  background: none;
  padding: 0;
  border-radius: 0;
  font-size: inherit;
}

/* Tables */
table {
  border-collapse: collapse;
  width: 100%;
  margin: 0 0 1.5rem;
  font-size: 0.95rem;
}

th, td {
  border: 1px solid #ddd;
  padding: 0.5rem 0.75rem;
  text-align: left;
}

th {
  background: #f4f4f4;
  font-weight: 700;
}

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

/* Post metadata */
.post-meta {
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 2rem;
}

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

.post-list li {
  border-bottom: 1px solid #eee;
  padding: 1.25rem 0;
  margin: 0;
}

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

.post-list .post-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 0.25rem;
}

.post-list .post-title a {
  text-decoration: none;
  color: #222;
}

.post-list .post-title a:hover {
  color: #0055bb;
}

.post-list .post-date {
  font-size: 0.85rem;
  color: #888;
  margin-bottom: 0.4rem;
}

.post-list .post-excerpt {
  font-size: 0.95rem;
  color: #555;
  margin: 0;
}

/* Intro section on homepage */
.intro {
  margin-bottom: 3rem;
}

.intro p {
  font-size: 1.05rem;
}

.recent-posts h2 {
  margin-top: 0;
}
