/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  color: #333;
  background: #fff;
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header */
.site-header {
  border-bottom: 1px solid #eee;
  padding: 1rem 0;
}
.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.site-title {
  font-size: 1.4rem;
  font-weight: 700;
  text-decoration: none;
  color: #111;
}
.site-nav a {
  margin-left: 1.5rem;
  text-decoration: none;
  color: #555;
}
.site-nav a:hover { color: #111; }

/* Main */
main { padding: 2rem 0; }

/* Posts */
.post-header { margin-bottom: 1.5rem; }
.post-header h1 { margin-bottom: 0.25rem; }
.post-header time { color: #777; font-size: 0.9rem; }
.post-categories { margin-top: 0.25rem; font-size: 0.85rem; color: #777; }
.post-categories a { color: #555; }
.featured-image {
  max-width: 100%;
  height: auto;
  margin-bottom: 1.5rem;
  border-radius: 4px;
}
.post-content img, .portfolio-content img, .page-content img {
  max-width: 100%;
  height: auto;
}

/* Post list */
.post-list { list-style: none; }
.post-list li { margin-bottom: 1.5rem; }
.post-list h2 { font-size: 1.2rem; margin-bottom: 0.15rem; }
.post-list h2 a { color: #111; text-decoration: none; }
.post-list h2 a:hover { text-decoration: underline; }
.post-list time { color: #777; font-size: 0.85rem; }
.post-list .excerpt { margin-top: 0.25rem; color: #555; font-size: 0.95rem; }

/* Portfolio grid */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}
.portfolio-card {
  text-decoration: none;
  color: inherit;
}
.portfolio-card img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: 4px;
}
.portfolio-card h3 {
  margin-top: 0.5rem;
  font-size: 1rem;
}

/* Pagination */
.pagination {
  margin-top: 2rem;
  display: flex;
  gap: 1rem;
  justify-content: center;
}
.pagination a {
  color: #555;
  text-decoration: none;
  padding: 0.4rem 0.8rem;
  border: 1px solid #ddd;
  border-radius: 4px;
}
.pagination a:hover { background: #f5f5f5; }

/* Category list */
.category-list { list-style: none; columns: 2; }
.category-list li { margin-bottom: 0.5rem; }
.category-list a { color: #333; text-decoration: none; }
.category-list a:hover { text-decoration: underline; }
.category-count { color: #999; font-size: 0.85rem; }

/* Footer */
.site-footer {
  border-top: 1px solid #eee;
  padding: 1.5rem 0;
  margin-top: 3rem;
  text-align: center;
  font-size: 0.85rem;
  color: #777;
}

/* Video embeds */
.video-embed {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  margin-bottom: 1.5rem;
}
.video-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* 404 */
.error-page { text-align: center; padding: 4rem 0; }
.error-page h1 { font-size: 4rem; margin-bottom: 0.5rem; }

/* Responsive */
@media (max-width: 600px) {
  .site-header .container { flex-direction: column; align-items: flex-start; }
  .site-nav a { margin-left: 0; margin-right: 1rem; }
  .category-list { columns: 1; }
}
