/* Base styles */
:root {
  --primary-color: #333;
  --secondary-color: #666;
  --accent-color: #0066cc;
  --background-color: #fff;
  --border-color: #eee;
  --card-bg: #f9f9f9;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  line-height: 1.6;
  color: var(--primary-color);
  background: var(--background-color);
}

/* Header */
header {
  background: var(--primary-color);
  color: white;
  padding: 1rem 2rem;
  position: sticky;
  top: 0;
  z-index: 100;
}

.main-nav {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.site-title {
  font-size: 1.5rem;
  font-weight: bold;
  color: white;
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.nav-links a {
  color: rgba(255,255,255,0.9);
  text-decoration: none;
  font-size: 0.95rem;
}

.nav-links a:hover {
  color: white;
  text-decoration: underline;
}

/* Main content */
main {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem;
  min-height: calc(100vh - 200px);
}

footer {
  background: var(--card-bg);
  padding: 2rem;
  text-align: center;
  color: var(--secondary-color);
  font-size: 0.875rem;
}

/* Breadcrumb */
.breadcrumb {
  font-size: 0.875rem;
  color: var(--secondary-color);
  margin-bottom: 1.5rem;
}

.breadcrumb a {
  color: var(--accent-color);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  margin: 1.5rem 0 0.5rem;
  line-height: 1.3;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }

p { margin-bottom: 1rem; }

a { color: var(--accent-color); }

img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
}

/* Home page */
.hero {
  text-align: center;
  padding: 3rem 0;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 2rem;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.hero p {
  color: var(--secondary-color);
  font-size: 1.1rem;
}

.sites-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.site-card {
  background: var(--card-bg);
  border-radius: 8px;
  padding: 1.5rem;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s, box-shadow 0.2s;
}

.site-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.site-card h2 {
  margin-top: 0;
  color: var(--accent-color);
}

.site-card p {
  color: var(--secondary-color);
  margin-bottom: 0;
}

/* Posts list */
.posts-list {
  margin-top: 2rem;
}

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

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

.post-preview h2 {
  margin-top: 0;
  font-size: 1.25rem;
}

.post-preview time {
  display: block;
  color: var(--secondary-color);
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
}

/* Post/Page styles */
.post header, .page header {
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.post h1, .page h1 {
  margin-top: 0;
}

.post time {
  display: block;
  color: var(--secondary-color);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.content {
  margin: 2rem 0;
}

.content img {
  margin: 1rem 0;
}

.categories, .tags {
  margin-top: 0.5rem;
}

.category, .tag {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  margin-right: 0.5rem;
  margin-bottom: 0.25rem;
  font-size: 0.75rem;
  border-radius: 3px;
}

.category { background: #e0e0e0; }
.tag { background: #f0f0f0; }

/* Code */
pre {
  background: #f5f5f5;
  padding: 1rem;
  border-radius: 4px;
  overflow-x: auto;
  margin: 1rem 0;
}

code {
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 0.875rem;
}

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

/* Recent posts on home */
.recent-posts {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
}

.recent-posts h2 {
  margin-bottom: 1rem;
}

/* Responsive */
@media (max-width: 600px) {
  header {
    padding: 1rem;
  }
  
  main {
    padding: 1rem;
  }
  
  .hero h1 {
    font-size: 1.75rem;
  }
}
