/* Ed Dowding - Clean Blog Theme */

:root {
  --text: #1a1a1a;
  --text-light: #666;
  --bg: #fff;
  --border: #eee;
  --accent: #0066cc;
}

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

html {
  font-size: 17px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}

a {
  color: inherit;
  text-decoration: none;
}

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

/* Header */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 100;
}

.site-title {
  font-size: 1.25rem;
  font-weight: 600;
}

.menu-toggle,
.search-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--text);
}

/* Main */
main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

/* Posts Grid (Home) */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.post-card {
  border-bottom: 1px solid var(--border);
  padding-bottom: 2rem;
}

.post-card .post-image {
  display: block;
  margin-bottom: 1rem;
  aspect-ratio: 16/10;
  overflow: hidden;
}

.post-card .post-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.post-card:hover .post-image img {
  transform: scale(1.02);
}

.post-card h2 {
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 0.5rem;
}

.post-card h2 a:hover {
  color: var(--accent);
}

.post-card .excerpt {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 0.5rem;
}

.post-card time {
  font-size: 0.8rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Pagination */
.pagination {
  text-align: center;
  padding: 3rem 0;
}

.view-all {
  display: inline-block;
  padding: 0.75rem 2rem;
  border: 2px solid var(--text);
  font-weight: 600;
  transition: all 0.2s;
}

.view-all:hover {
  background: var(--text);
  color: var(--bg);
}

/* Single Post */
.single-post {
  max-width: 720px;
  margin: 0 auto;
}

.post-header {
  text-align: center;
  margin-bottom: 2rem;
}

.post-header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.post-meta {
  color: var(--text-light);
  font-size: 0.9rem;
}

.post-meta time {
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.post-meta .category {
  margin-left: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.featured-image {
  margin: 2rem 0;
}

.featured-image img {
  width: 100%;
}

.post-body {
  font-size: 1.1rem;
  line-height: 1.8;
}

.post-body p {
  margin-bottom: 1.5rem;
}

.post-body h2 {
  font-size: 1.5rem;
  margin: 2rem 0 1rem;
}

.post-body h3 {
  font-size: 1.25rem;
  margin: 1.5rem 0 0.75rem;
}

.post-body blockquote {
  border-left: 3px solid var(--accent);
  padding-left: 1.5rem;
  margin: 1.5rem 0;
  font-style: italic;
  color: var(--text-light);
}

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

.post-body ul, .post-body ol {
  margin: 1rem 0 1.5rem 1.5rem;
}

.post-body li {
  margin-bottom: 0.5rem;
}

.post-body img {
  margin: 1.5rem 0;
}

.post-tags {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.post-tags a {
  display: inline-block;
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
  padding: 0.25rem 0.75rem;
  background: var(--border);
  font-size: 0.85rem;
  border-radius: 3px;
}

.post-tags a:hover {
  background: var(--text);
  color: var(--bg);
}

/* Post Navigation */
.post-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
}

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

.post-nav .next {
  margin-left: auto;
}

/* List Page */
.list-header {
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--text);
}

.list-header h1 {
  font-size: 2rem;
  font-weight: 700;
}

.list-header .count {
  color: var(--text-light);
  margin-top: 0.25rem;
}

.posts-list {
  max-width: 720px;
}

.list-item {
  display: flex;
  gap: 1.5rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}

.list-item time {
  flex-shrink: 0;
  width: 80px;
  font-size: 0.85rem;
  color: var(--text-light);
}

.list-item a {
  font-weight: 500;
}

.list-item a:hover {
  color: var(--accent);
}

/* Footer */
.site-footer {
  text-align: center;
  padding: 3rem 2rem;
  color: var(--text-light);
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
}

/* Responsive */
@media (max-width: 900px) {
  .posts-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

  .site-header {
    padding: 1rem;
  }

  main {
    padding: 1.5rem;
  }

  .posts-grid {
    grid-template-columns: 1fr;
  }

  .post-header h1 {
    font-size: 1.75rem;
  }

  .list-item {
    flex-direction: column;
    gap: 0.25rem;
  }

  .list-item time {
    width: auto;
  }
}
