/* Shared site styles — used by blog pages.
   Homepage (index.html) still has its own inline styles for now. */

:root {
  --bg: #faf7f2;
  --surface: #ffffff;
  --surface-soft: #f3efe8;
  --text: #1a1a1a;
  --muted: #6b6b6b;
  --line: rgba(26,26,26,0.10);
  --line-soft: rgba(26,26,26,0.06);
  --accent: #1f4d3a;
  --accent-hover: #163a2c;
  --accent-soft: rgba(31,77,58,0.06);
  --logo-primary: #c25420;
  --logo-secondary: #1a1a1a;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }

.page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px;
}

/* Header */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0 40px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: -0.03em;
  font-size: 22px;
}

.logo .logo-text > span { color: var(--accent); }

.logo-mark {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.logo-mark .ray-primary { stroke: var(--logo-primary); fill: var(--logo-primary); }
.logo-mark .ray-secondary { stroke: var(--logo-secondary); fill: var(--logo-secondary); }

nav {
  display: flex;
  gap: 30px;
  align-items: center;
  font-size: 14px;
  color: var(--muted);
}

nav a:hover { color: var(--text); }

.nav-cta {
  background: var(--accent);
  color: #fff;
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 500;
  font-size: 14px;
}

.nav-cta:hover { background: var(--accent-hover); color: #fff; }

/* Footer */
footer {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 13px;
  padding: 40px 0 20px;
  border-top: 1px solid var(--line-soft);
  margin-top: 80px;
}

/* Blog index — list of posts */
.blog-header {
  padding: 30px 0 60px;
  max-width: 760px;
}

.blog-header h1 {
  font-size: clamp(40px, 5vw, 60px);
  line-height: 1.05;
  letter-spacing: -0.04em;
  margin: 0 0 18px;
  font-weight: 600;
}

.blog-header p {
  color: var(--muted);
  font-size: 19px;
  margin: 0;
  line-height: 1.55;
}

.blog-list {
  display: grid;
  gap: 12px;
  padding-bottom: 40px;
}

.blog-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 32px;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.blog-card:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.blog-card .post-meta {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
  font-weight: 600;
}

.blog-card h2 {
  font-size: 26px;
  letter-spacing: -0.03em;
  margin: 0 0 12px;
  font-weight: 600;
  color: var(--text);
}

.blog-card p {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.5;
  margin: 0;
}

/* Empty state */
.blog-empty {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 60px 40px;
  text-align: center;
}

.blog-empty h2 {
  font-size: 26px;
  margin: 0 0 12px;
  letter-spacing: -0.03em;
  font-weight: 600;
}

.blog-empty p {
  color: var(--muted);
  font-size: 16px;
  margin: 0 0 24px;
  line-height: 1.5;
}

.blog-empty a {
  color: var(--accent);
  text-decoration: underline;
}

/* Individual blog post */
.blog-post {
  max-width: 720px;
  margin: 0 auto;
  padding: 20px 0 60px;
}

.back-link {
  display: inline-block;
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 30px;
}

.back-link:hover { color: var(--accent); }

.blog-post header.post-header {
  display: block;
  padding: 0 0 30px;
  margin: 0 0 40px;
  border-bottom: 1px solid var(--line-soft);
}

.blog-post .post-meta {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
  font-weight: 600;
}

.blog-post h1 {
  font-size: clamp(34px, 4.5vw, 48px);
  line-height: 1.1;
  letter-spacing: -0.035em;
  margin: 0 0 18px;
  font-weight: 600;
}

.blog-post .post-summary {
  color: var(--muted);
  font-size: 19px;
  line-height: 1.55;
  margin: 0;
}

.blog-post .post-body {
  font-size: 17px;
  line-height: 1.7;
  color: var(--text);
}

.blog-post .post-body p {
  margin: 0 0 22px;
}

.blog-post .post-body h2 {
  font-size: 26px;
  letter-spacing: -0.025em;
  margin: 44px 0 16px;
  font-weight: 600;
}

.blog-post .post-body h3 {
  font-size: 20px;
  letter-spacing: -0.02em;
  margin: 36px 0 12px;
  font-weight: 600;
}

.blog-post .post-body ul,
.blog-post .post-body ol {
  margin: 0 0 22px;
  padding-left: 24px;
}

.blog-post .post-body li {
  margin-bottom: 8px;
}

.blog-post .post-body a {
  color: var(--accent);
  text-decoration: underline;
}

.blog-post .post-body blockquote {
  margin: 22px 0;
  padding: 20px 24px;
  background: var(--surface);
  border-left: 3px solid var(--accent);
  border-radius: 4px;
  color: var(--text);
  font-style: italic;
}

.blog-post .post-body code {
  background: var(--surface-soft);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.92em;
  font-family: "SF Mono", Menlo, Monaco, Consolas, monospace;
}

.blog-post .post-body pre {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px;
  overflow-x: auto;
  font-size: 14px;
  line-height: 1.5;
  margin: 0 0 22px;
}

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

.blog-post .post-body img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  margin: 24px 0;
}

/* Comparison tables inside posts */
.blog-post .post-body .post-table {
  overflow-x: auto;
  margin: 8px 0 28px;
  -webkit-overflow-scrolling: touch;
}

.blog-post .post-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 1.45;
  min-width: 560px;
}

.blog-post .post-body table th,
.blog-post .post-body table td {
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
  color: var(--text);
}

.blog-post .post-body table thead th {
  font-weight: 600;
  background: var(--surface-soft);
  border-bottom: 2px solid var(--line);
}

.blog-post .post-body table tbody th {
  font-weight: 600;
  white-space: nowrap;
  background: transparent;
  width: 1%;
}

.blog-post .post-body table td {
  color: var(--muted);
}

.post-cta {
  margin: 50px 0 0;
  padding: 32px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
}

.post-cta h3 {
  font-size: 22px;
  letter-spacing: -0.025em;
  margin: 0 0 10px;
  font-weight: 600;
}

.post-cta p {
  color: var(--muted);
  margin: 0 0 18px;
  font-size: 16px;
}

.post-cta .button {
  display: inline-flex;
  align-items: center;
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 500;
  font-size: 15px;
  background: var(--accent);
  color: #fff;
}

.post-cta .button:hover { background: var(--accent-hover); color: #fff; }

/* Responsive */
@media (max-width: 720px) {
  .page { padding: 20px; }

  nav { gap: 16px; }
  nav a:not(.nav-cta) { display: none; }

  footer {
    flex-direction: column;
    gap: 10px;
  }

  .blog-card { padding: 24px; }
  .blog-empty { padding: 40px 24px; }
}
