/* Modern CSS Reset */
*, *::before, *::after {
  box-sizing: border-box;
}

* {
  margin: 0;
  padding: 0;
}

/* Root variables for easy theming */
:root {
  --color-text: #1a1a1a;
  --color-text-muted: #666;
  --color-bg: #fff;
  --color-accent: #0066cc;
  --color-accent-hover: #0052a3;
  --color-border: #e5e5e5;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
  --font-mono: "SF Mono", SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;
  --max-width: 680px;
  --spacing: 1.5rem;
}

/* Base styles */
html {
  font-size: 18px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-bg);
}

/* Layout */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--spacing);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
header {
  padding: var(--spacing) 0;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--color-border);
}

nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-text);
  text-decoration: none;
}

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

/* Main content */
main {
  flex: 1;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 0.75rem;
}

h1 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

h2 {
  font-size: 1.5rem;
  margin-top: 2rem;
}

h3 {
  font-size: 1.25rem;
  margin-top: 1.5rem;
}

p {
  margin-bottom: 1rem;
}

/* Links */
a {
  color: var(--color-accent);
  text-decoration: none;
}

a:hover {
  color: var(--color-accent-hover);
  text-decoration: underline;
}

/* Lists */
ul, ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

li {
  margin-bottom: 0.25rem;
}

/* Code */
code {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  background-color: #f5f5f5;
  padding: 0.125rem 0.375rem;
  border-radius: 3px;
}

pre {
  background-color: #f5f5f5;
  padding: 1rem;
  border-radius: 6px;
  overflow-x: auto;
  margin-bottom: 1rem;
}

pre code {
  background: none;
  padding: 0;
}

/* Blockquotes */
blockquote {
  border-left: 3px solid var(--color-accent);
  padding-left: 1rem;
  margin: 1rem 0;
  color: var(--color-text-muted);
  font-style: italic;
}

/* Images */
img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
}

/* Horizontal rule */
hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 2rem 0;
}

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

.post-list li {
  display: flex;
  flex-direction: column;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--color-border);
}

.post-list li:last-child {
  border-bottom: none;
}

.post-list a {
  font-weight: 500;
  font-size: 1.1rem;
}

.post-list time {
  color: var(--color-text-muted);
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

/* Post header */
.post-header {
  margin-bottom: 2rem;
}

.post-header h1 {
  margin-bottom: 0.5rem;
}

.post-header time {
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

/* Post content */
.post-content {
  margin-top: 1.5rem;
}

/* Footer */
footer {
  margin-top: auto;
  padding: 2rem 0 var(--spacing);
  border-top: 1px solid var(--color-border);
  color: var(--color-text-muted);
  font-size: 0.875rem;
}

/* Responsive adjustments */
@media (max-width: 600px) {
  html {
    font-size: 16px;
  }

  :root {
    --spacing: 1rem;
  }

  h1 {
    font-size: 1.75rem;
  }

  h2 {
    font-size: 1.375rem;
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  :root {
    --color-text: #e5e5e5;
    --color-text-muted: #999;
    --color-bg: #1a1a1a;
    --color-accent: #5c9eff;
    --color-accent-hover: #7db3ff;
    --color-border: #333;
  }

  code, pre {
    background-color: #2a2a2a;
  }
}
