/* Thirdwatch blog styles. Overrides the dark site theme for readable long-form. */

html, body {
  background: #ffffff !important;
  color: #1e293b !important;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif !important;
}

/* Defeat any inherited dark-theme rules on common containers */
main, article, section, header.site-header, footer.site-footer {
  background: transparent;
  color: inherit;
}

.container { max-width: 760px; margin: 0 auto; padding: 0 24px; }

.site-header {
  border-bottom: 1px solid #e5e7eb !important;
  background: #ffffff !important;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
  padding-bottom: 18px;
  max-width: 1080px;
}
.brand { font-weight: 700; font-size: 1.15rem; color: #0f172a; text-decoration: none; }
.site-header nav a {
  margin-left: 24px;
  color: #475569;
  text-decoration: none;
  font-size: 0.95rem;
}
.site-header nav a:hover { color: #0f172a; }

.breadcrumbs {
  font-size: 0.85rem;
  color: #64748b;
  margin: 28px 0 8px;
}
.breadcrumbs a { color: #475569; text-decoration: none; }
.breadcrumbs a:hover { text-decoration: underline; }
.breadcrumbs span:last-child { color: #0f172a; }

.post {
  padding: 12px 24px 80px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: #1e293b;
  line-height: 1.7;
}
.post h1 {
  font-size: 2.25rem;
  line-height: 1.2;
  margin: 8px 0 16px;
  color: #0f172a;
  letter-spacing: -0.01em;
}
.post h2 {
  font-size: 1.5rem;
  margin: 48px 0 16px;
  color: #0f172a;
  letter-spacing: -0.01em;
}
.post h3 {
  font-size: 1.15rem;
  margin: 32px 0 12px;
  color: #0f172a;
}
.post-meta {
  color: #64748b;
  font-size: 0.9rem;
  margin: 0 0 32px;
}
.post p { margin: 16px 0; }
.post a { color: #2563eb; text-decoration: underline; text-underline-offset: 2px; }
.post a:hover { color: #1d4ed8; }
.post ul, .post ol { padding-left: 24px; margin: 16px 0; }
.post li { margin: 6px 0; }

.post blockquote {
  border-left: 4px solid #2563eb;
  background: #eff6ff;
  margin: 28px 0;
  padding: 20px 24px;
  border-radius: 4px;
  color: #1e293b;
  font-size: 1.0rem;
}
.post blockquote p:first-child { margin-top: 0; }
.post blockquote p:last-child { margin-bottom: 0; }

.post code {
  background: #f1f5f9;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.88em;
  color: #be185d;
}
.post pre {
  background: #0f172a;
  color: #e2e8f0;
  padding: 20px 24px;
  border-radius: 8px;
  overflow-x: auto;
  font-size: 0.85rem;
  margin: 24px 0;
  line-height: 1.6;
}
.post pre code {
  background: transparent;
  padding: 0;
  color: inherit;
  font-size: inherit;
}

.post table {
  border-collapse: collapse;
  width: 100%;
  margin: 24px 0;
  font-size: 0.95rem;
}
.post th, .post td {
  border: 1px solid #e2e8f0;
  padding: 10px 14px;
  text-align: left;
}
.post th { background: #f8fafc; font-weight: 600; }

.post-cta {
  margin: 64px 0 24px;
  padding: 28px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  text-align: center;
}
.post-cta h3 { margin: 0 0 8px; font-size: 1.2rem; color: #0f172a; }
.post-cta p { margin: 0 0 16px; color: #475569; }
.cta-button {
  display: inline-block;
  background: #2563eb;
  color: #fff !important;
  padding: 12px 28px;
  border-radius: 6px;
  text-decoration: none !important;
  font-weight: 600;
  font-size: 0.95rem;
}
.cta-button:hover { background: #1d4ed8; }

/* Hub */
.hub { max-width: 880px; padding: 40px 24px 80px; }
.hub-header { text-align: center; margin-bottom: 56px; }
.hub-header h1 { font-size: 2.5rem; margin: 0 0 12px; color: #0f172a; }
.hub-header .lede { font-size: 1.1rem; color: #475569; max-width: 580px; margin: 0 auto; }
.hub-category { margin-bottom: 48px; }
.hub-category h2 {
  font-size: 1.4rem;
  margin: 0 0 16px;
  color: #0f172a;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 8px;
}
.hub-posts { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.hub-posts li a {
  display: block;
  padding: 16px 20px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  color: #0f172a;
  text-decoration: none;
}
.hub-posts li a:hover { border-color: #2563eb; }
.hub-desc { color: #64748b; font-size: 0.9rem; }

.site-footer {
  border-top: 1px solid #e5e7eb;
  padding: 24px 0;
  margin-top: 48px;
  color: #64748b;
  font-size: 0.9rem;
  text-align: center;
}
.site-footer a { color: #475569; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }

/* Copy button on code blocks */
.post pre { position: relative; }
.copy-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 4px;
  padding: 4px 10px;
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s, background 0.15s, color 0.15s;
}
.post pre:hover .copy-btn { opacity: 1; }
.copy-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}
.copy-btn.copied {
  background: #22c55e;
  border-color: #22c55e;
  color: #fff;
  opacity: 1;
}
