@import url('theme.css');

body { background: var(--paper); }

.site-topbar {
  max-width: 1080px;
  margin: 0 auto;
  padding: 1.25rem 1.25rem 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.topbar-brand {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  font-size: 1.05rem;
}
.theme-toggle {
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink-soft);
  cursor: pointer;
  font-size: 1rem;
}

.back-link {
  display: inline-block;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.88rem;
  margin-bottom: 1rem;
}
.back-link:hover { color: var(--accent); }

/* ---------- Hero ---------- */
.hero {
  max-width: 720px;
  margin: 0 auto;
  padding: 3.5rem 1.25rem 2.5rem;
  text-align: center;
}
.hero-eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.75rem;
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 2.9rem);
  margin: 0 0 0.75rem;
  text-wrap: balance;
}
.hero-tagline {
  font-size: 1.1rem;
  color: var(--ink-soft);
  margin: 0;
}

/* ---------- Sections ---------- */
.section { max-width: 1080px; margin: 0 auto; padding: 2.5rem 1.25rem; }
.section h2 { font-size: 1.5rem; margin: 0 0 1.25rem; }
.section-header-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 1.25rem;
}
.section-header-row h2 { margin: 0; }
.see-all-link { color: var(--accent); text-decoration: none; font-size: 0.9rem; font-weight: 600; }

.start-here { background: var(--panel); border-radius: 16px; max-width: 1080px; }

.empty-state { color: var(--muted); }

/* ---------- Post grid & cards ---------- */
.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}
.post-card {
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.post-card-image { display: block; aspect-ratio: 4/3; overflow: hidden; }
.post-card-image img { width: 100%; height: 100%; object-fit: cover; }
.post-card-body { padding: 1.1rem 1.2rem 1.3rem; display: flex; flex-direction: column; gap: 0.5rem; }
.post-card-body h3 { margin: 0; font-size: 1.15rem; }
.post-card-body h3 a { color: var(--ink); text-decoration: none; }
.post-card-body h3 a:hover { color: var(--accent); }
.post-card-excerpt { color: var(--ink-soft); font-size: 0.92rem; margin: 0; }
.post-card-meta { color: var(--muted); font-size: 0.8rem; display: flex; gap: 0.4rem; }
.post-type-badge {
  align-self: flex-start;
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--panel);
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
}
.post-card-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.tag-pill {
  font-size: 0.76rem;
  color: var(--ink-soft);
  background: var(--panel);
  border-radius: 999px;
  padding: 0.15rem 0.6rem;
  text-decoration: none;
}
.tag-pill:hover { color: var(--accent); }

/* ---------- Page header (blog index, static pages) ---------- */
.page-header { max-width: 1080px; margin: 0 auto; padding: 2.5rem 1.25rem 1rem; }
.page-header h1 { font-size: 2rem; margin: 0 0 1.25rem; }
.search-form { display: flex; gap: 0.5rem; max-width: 420px; }
.search-form input {
  flex: 1;
  padding: 0.55rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
}

/* ---------- Post article ---------- */
.post-article { max-width: 680px; margin: 0 auto; padding: 2.5rem 1.25rem 4rem; }
.post-header h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); margin: 0.4rem 0 0.75rem; text-wrap: balance; }
.post-meta { color: var(--muted); font-size: 0.85rem; display: flex; gap: 0.4rem; margin-bottom: 0.75rem; }

.content-warning {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.8rem 1.1rem;
  margin: 1.25rem 0;
}
.content-warning summary { cursor: pointer; font-weight: 600; color: var(--warn); }
.content-warning p { margin: 0.6rem 0 0; color: var(--ink-soft); font-size: 0.9rem; }

.post-featured-image { margin: 1.5rem -1.25rem; }
.post-featured-image img { width: 100%; height: auto; display: block; }
.post-featured-image figcaption { font-size: 0.78rem; color: var(--muted); padding: 0.4rem 1.25rem 0; }

.post-body { font-size: 1.08rem; line-height: 1.75; color: var(--ink); }
.post-body p { margin: 0 0 1.2rem; max-width: 65ch; }
.post-body img { max-width: 100%; border-radius: 8px; margin: 1.5rem 0; }
.post-body blockquote {
  border-left: 3px solid var(--accent);
  margin: 1.5rem 0;
  padding: 0.2rem 0 0.2rem 1.2rem;
  color: var(--ink-soft);
  font-style: italic;
}

.share-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; margin: 2rem 0; }
.share-label { font-size: 0.85rem; color: var(--muted); }
.share-btn {
  font-size: 0.82rem;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
}
.share-btn:hover { border-color: var(--accent); color: var(--accent); }

.next-post-link {
  display: block;
  margin: 2rem 0;
  padding: 1.1rem 1.3rem;
  background: var(--panel);
  border-radius: 10px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
}

.related-posts { margin: 2.5rem 0; }
.related-posts h2 { font-size: 1.15rem; }
.related-posts ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.related-posts a { color: var(--accent); text-decoration: none; }

/* ---------- Comments ---------- */
.comments-section { margin: 3rem 0; padding-top: 2rem; border-top: 1px solid var(--line); }
.comments-list { display: flex; flex-direction: column; gap: 1rem; margin-bottom: 1.5rem; }
.comment-item { background: var(--panel); border-radius: 10px; padding: 0.9rem 1.1rem; }
.comment-author { font-weight: 600; font-size: 0.9rem; }
.comment-date { color: var(--muted); font-size: 0.78rem; margin-left: 0.5rem; }
.comment-body { margin: 0.4rem 0 0; font-size: 0.92rem; color: var(--ink-soft); }
.comment-report { font-size: 0.75rem; color: var(--muted); background: none; border: none; cursor: pointer; padding: 0; margin-top: 0.4rem; }

.comment-form, .contact-form { display: flex; flex-direction: column; gap: 1rem; }
.comment-form label, .contact-form label { font-size: 0.85rem; color: var(--ink-soft); display: flex; flex-direction: column; gap: 0.3rem; }
.comment-form input, .comment-form textarea,
.contact-form input, .contact-form textarea {
  font-family: var(--font-body);
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
}
.honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.comment-feedback, .contact-feedback, .newsletter-feedback { font-size: 0.85rem; min-height: 1.2rem; color: var(--good); }

/* ---------- Newsletter ---------- */
.newsletter-section { max-width: 680px; margin: 0 auto; padding: 2rem 1.25rem; }
.newsletter-form { background: var(--panel); border-radius: 12px; padding: 1.5rem; }
.newsletter-heading { margin: 0 0 0.9rem; font-weight: 600; }
.newsletter-row { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.newsletter-row input { flex: 1; min-width: 200px; padding: 0.6rem 0.8rem; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); color: var(--ink); }

/* ---------- Static pages ---------- */
.static-page { max-width: 620px; margin: 0 auto; padding: 2.5rem 1.25rem 4rem; }
.static-page h1 { font-size: 2rem; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); margin-top: 3rem; }
.footer-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 2.5rem 1.25rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}
.footer-title { font-family: var(--font-display); font-size: 1.2rem; margin: 0 0 0.75rem; }
.footer-nav { display: flex; flex-direction: column; gap: 0.5rem; }
.footer-nav a { color: var(--ink-soft); text-decoration: none; font-size: 0.92rem; }
.footer-nav a:hover { color: var(--accent); }
.rss-link { display: inline-block; margin-top: 0.75rem; font-size: 0.82rem; color: var(--muted); }
.footer-legal { text-align: center; color: var(--muted); font-size: 0.8rem; padding: 0 1.25rem 2rem; }

@media (max-width: 640px) {
  .footer-inner { grid-template-columns: 1fr; }
  .post-featured-image { margin-left: -1.25rem; margin-right: -1.25rem; }
}
