/* FunShot Blog — shared stylesheet (single source of truth for all blog pages)
   Tokens mirror frontend/src/index.css. Do not inline styles in articles. */

:root {
  --bg: #faf8f5;
  --panel: #ffffff;
  --text: #1d1d1f;
  --muted: #6b7280;
  --border: #e8e5e0;
  --primary: #0d3b2e;
  --primary2: #1a6b4f;
  --accent: #ea580c;
  --radius: 12px;
  color-scheme: light;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary2); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--accent); }

/* Layout */
.site-header, .site-footer {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 20px;
}
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 24px;
  padding-bottom: 24px;
}
.site-header .brand {
  font-weight: 800;
  font-size: 18px;
  color: var(--primary);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.site-header .brand:hover { color: var(--accent); }
.site-header nav a {
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  margin-left: 16px;
}
.site-header nav a:hover { color: var(--text); }

main { max-width: 760px; margin: 0 auto; padding: 0 20px 48px; }

/* Article */
.article-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 14px;
  margin: 8px 0 8px;
}
.article-meta .avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
}
h1 {
  font-size: 34px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 4px 0 20px;
}
article h2 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 40px 0 12px;
  line-height: 1.3;
}
article h3 { font-size: 19px; font-weight: 700; margin: 28px 0 8px; }
article p { margin: 0 0 16px; }
article ul, article ol { margin: 0 0 16px; padding-left: 22px; }
article li { margin-bottom: 8px; }
article img { max-width: 100%; border-radius: var(--radius); border: 1px solid var(--border); }
article strong { font-weight: 700; }
article blockquote {
  margin: 20px 0;
  padding: 12px 20px;
  border-left: 4px solid var(--accent);
  background: var(--panel);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--muted);
}

/* Tables (spec sheets are a core content type) */
.table-wrap { overflow-x: auto; margin: 20px 0; }
article table {
  width: 100%;
  border-collapse: collapse;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14.5px;
}
article th, article td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--border); }
article th { background: #f3f1ec; font-weight: 700; }
article tr:last-child td { border-bottom: none; }

/* CTA block */
.cta {
  margin: 44px 0;
  padding: 28px;
  background: var(--primary);
  color: #ffffff;
  border-radius: var(--radius);
  text-align: center;
}
.cta h2 { color: #ffffff; margin: 0 0 8px; font-size: 22px; }
.cta p { color: rgba(255, 255, 255, 0.85); margin: 0 0 20px; font-size: 15px; }
.cta .btn {
  display: inline-block;
  background: var(--accent);
  color: #ffffff;
  font-weight: 700;
  font-size: 15px;
  padding: 12px 26px;
  border-radius: var(--radius);
  text-decoration: none;
}
.cta .btn:hover { filter: brightness(1.08); color: #ffffff; }
.cta .btn.secondary {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.4);
  margin-left: 10px;
  font-weight: 600;
}

/* Related posts */
.related { margin: 40px 0 0; }
.related h2 { font-size: 20px; margin: 0 0 14px; }
.related ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.related li a {
  display: block;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  color: var(--text);
}
.related li a:hover { border-color: var(--accent); color: var(--primary2); }
.related .empty { color: var(--muted); font-size: 14px; }

/* Author box */
.author {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin: 40px 0 0;
}
.author .avatar-lg {
  flex: 0 0 auto;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}
.author .name { font-weight: 700; font-size: 15px; }
.author .bio { color: var(--muted); font-size: 14px; margin-top: 2px; }

.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 56px;
  padding-top: 24px;
  padding-bottom: 40px;
  color: var(--muted);
  font-size: 13.5px;
}

@media (max-width: 640px) {
  h1 { font-size: 27px; }
  article h2 { font-size: 21px; }
  .cta .btn.secondary { margin-left: 0; margin-top: 10px; }
}
