/* The Weekend Tinkerer — clean, readable, fast */
:root {
  --bg: #ffffff;
  --text: #1a202c;
  --muted: #718096;
  --border: #e2e8f0;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --card-bg: #f7fafc;
  --tag-bg: #dbeafe;
  --tag-text: #1e40af;
  --max-w: 720px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 17px; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
}

.container { max-width: var(--max-w); margin: 0 auto; padding: 0 1.5rem; }

/* Header */
.site-header {
  border-bottom: 1px solid var(--border);
  padding: 1.2rem 0;
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 50;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--text);
  text-decoration: none;
}
.site-header nav { display: flex; gap: 1.5rem; }
.site-header nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
}
.site-header nav a:hover { color: var(--accent); }

/* Hero */
.hero {
  text-align: center;
  padding: 4rem 0 3rem;
}
.hero h1 {
  font-size: 2rem;
  max-width: 550px;
  margin: 0 auto 1rem;
  line-height: 1.3;
}
.hero p {
  color: var(--muted);
  max-width: 480px;
  margin: 0 auto 2rem;
  font-size: 1.05rem;
}

/* Buttons */
.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 0.6rem 1.5rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
}
.btn-lg { padding: 0.8rem 2rem; font-size: 1.05rem; }
.btn:hover { background: var(--accent-hover); }

/* Post Grid */
.recent-posts h2, .category-page h1 {
  margin-bottom: 2rem;
  font-size: 1.6rem;
}
.post-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
@media (min-width: 600px) {
  .post-grid { grid-template-columns: repeat(2, 1fr); }
}

.post-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--card-bg);
  transition: box-shadow 0.2s;
}
.post-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
.post-card-image {
  height: 120px;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 0.8rem;
}
.category-tag {
  background: var(--tag-bg);
  color: var(--tag-text);
  padding: 0.2rem 0.7rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
}
.post-card-body { padding: 1rem 1.2rem 1.2rem; }
.post-card-body time {
  font-size: 0.8rem;
  color: var(--muted);
}
.post-card-body h3 {
  margin: 0.3rem 0 0.5rem;
  font-size: 1.15rem;
  line-height: 1.4;
}
.post-card-body h3 a {
  color: var(--text);
  text-decoration: none;
}
.post-card-body h3 a:hover { color: var(--accent); }
.post-card-body p {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.5;
}
.read-more {
  display: inline-block;
  margin-top: 0.6rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--accent);
  text-decoration: none;
}
.read-more:hover { text-decoration: underline; }

/* Single post */
.single-post { padding: 2rem 0; }
.breadcrumb {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 1rem;
}
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent); }
.post-meta {
  display: flex;
  gap: 0.8rem;
  align-items: center;
  margin: 0.8rem 0 1.5rem;
  font-size: 0.9rem;
  color: var(--muted);
}
.single-post h1 { font-size: 1.8rem; line-height: 1.3; }
.post-body h2 {
  font-size: 1.3rem;
  margin: 2rem 0 0.8rem;
}
.post-body h3 { font-size: 1.1rem; margin: 1.5rem 0 0.5rem; }
.post-body p { margin-bottom: 1rem; }
.post-body ul, .post-body ol { margin: 0 0 1rem 1.5rem; }
.post-body li { margin-bottom: 0.4rem; }
.post-body strong { font-weight: 700; }
.post-body code {
  background: #edf2f7;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  font-size: 0.9rem;
}
.affiliate-note {
  font-size: 0.8rem;
  color: var(--muted);
  background: #fffbeb;
  border-left: 3px solid #f59e0b;
  padding: 0.6rem 1rem;
  border-radius: 6px;
  margin: 2rem 0;
}

/* Page content (About, Newsletter) */
.page-content, .newsletter-page {
  padding: 2rem 0;
}
.page-content h1, .newsletter-page h1 {
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
}
.page-content h2 { font-size: 1.3rem; margin: 2rem 0 0.8rem; }
.page-content p { margin-bottom: 1rem; }
.page-content ul { margin: 0 0 1rem 1.5rem; }
.page-content li { margin-bottom: 0.4rem; }
.page-content code {
  background: #edf2f7;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  font-size: 0.9rem;
}
.subtitle {
  font-size: 1.1rem;
  color: var(--muted);
  margin-bottom: 2rem;
}
.newsletter-box {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
  margin-bottom: 2rem;
}
.newsletter-box ul { margin: 1rem 0 1.5rem 1.2rem; }
.newsletter-box li { margin-bottom: 0.5rem; }
.newsletter-form {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.newsletter-form input[type="email"] {
  flex: 1;
  min-width: 200px;
  padding: 0.8rem 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
}
.newsletter-form input[type="email"]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.15);
}
.small { font-size: 0.8rem; color: var(--muted); margin-top: 0.8rem; }
.back-link { margin-top: 1.5rem; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 3rem;
  padding: 2.5rem 0 1.5rem;
  font-size: 0.9rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}
@media (min-width: 600px) {
  .footer-grid { grid-template-columns: 2fr 1fr 1fr; }
}
.footer-grid h3 { font-size: 1rem; margin-bottom: 0.8rem; }
.footer-grid p { color: var(--muted); line-height: 1.6; }
.footer-grid ul { list-style: none; }
.footer-grid li { margin-bottom: 0.4rem; }
.footer-grid a { color: var(--muted); text-decoration: none; }
.footer-grid a:hover { color: var(--accent); }
.affiliate-disclaimer {
  font-size: 0.78rem;
  color: var(--muted);
  text-align: center;
  margin-bottom: 0.8rem;
}
.copyright {
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
}