/* Writing index and post pages. Shared layout lives in styles.css (.page). */

.post-list {
  list-style: none;
  display: grid;
  gap: 1.5rem;
}

.post-list li {
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.post-list a {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--heading);
  text-decoration: none;
}

.post-list a:hover {
  color: var(--primary-text);
}

.post-list time,
.post-meta {
  display: block;
  font-size: 0.9rem;
  color: var(--text-light);
}

.post-list p {
  margin-top: 0.35rem;
}

/* Single post */
.post {
  max-width: 70ch;
}

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

.post-meta {
  margin-bottom: 2.5rem;
}

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

.post-body > * + * {
  margin-top: 1.25rem;
}

.post-body h2 {
  font-size: 1.6rem;
  margin-top: 2.5rem;
}

.post-body blockquote {
  padding-left: 1.25rem;
  border-left: 3px solid var(--accent);
  color: var(--text-light);
}

.post-body ul,
.post-body ol {
  padding-left: 1.5rem;
}

.post-body code {
  font-size: 0.95em;
  background: var(--surface-2);
  padding: 0.1em 0.35em;
  border-radius: 0.25rem;
}

.post-body pre {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 1rem;
  overflow-x: auto;
}

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

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

@media (max-width: 768px) {
  .post h1 {
    font-size: 2rem;
  }
}
