/* Shared styles for all WebPossum blog posts */
/* Save as: public/blog/blog.css */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'IBM Plex Sans', sans-serif; background: #f9f9f7; color: #111; }
a { text-decoration: none; color: inherit; }

nav { background: #0f0f0f; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; height: 56px; }
.nav-logo { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 600; font-size: 15px; }
.nav-logo img { width: 28px; height: 28px; }
.nav-links { display: flex; gap: 24px; }
.nav-links a { color: #aaa; font-size: 13px; transition: color 0.15s; }
.nav-links a:hover { color: #fff; }
.nav-cta { background: #7c3aed; color: #fff !important; font-size: 12px; font-weight: 500; padding: 7px 14px; border-radius: 3px; }

.page-wrap { max-width: 1040px; margin: 0 auto; padding: 40px 24px 80px; display: grid; grid-template-columns: 1fr 260px; gap: 56px; align-items: start; }
.back-link { grid-column: 1 / -1; font-family: 'IBM Plex Mono', monospace; font-size: 12px; color: #7c3aed; letter-spacing: 0.05em; display: inline-block; margin-bottom: 8px; }
.back-link:hover { text-decoration: underline; }

article { grid-column: 1; }
.post-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; flex-wrap: wrap; }
.badge { font-family: 'IBM Plex Mono', monospace; font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; background: #f0ebff; color: #7c3aed; padding: 3px 8px; border-radius: 2px; }
.read-time, .post-date { font-family: 'IBM Plex Mono', monospace; font-size: 11px; color: #999; }

h1 { font-size: clamp(24px, 4vw, 34px); font-weight: 600; line-height: 1.18; letter-spacing: -0.02em; color: #0f0f0f; margin-bottom: 16px; }
.post-lede { font-family: 'Lora', Georgia, serif; font-size: 18px; font-style: italic; color: #555; line-height: 1.65; margin-bottom: 32px; }
.divider { height: 2px; background: linear-gradient(90deg, #7c3aed, transparent); margin-bottom: 40px; }

.post-body { font-family: 'Lora', Georgia, serif; font-size: 17px; line-height: 1.82; color: #1a1a1a; }
.post-body p { margin-bottom: 22px; }
.post-body h2 { font-family: 'IBM Plex Sans', sans-serif; font-size: 22px; font-weight: 600; letter-spacing: -0.01em; color: #0f0f0f; margin: 48px 0 16px; padding-top: 48px; border-top: 1px solid #e5e5e5; }
.post-body strong { font-weight: 600; color: #0f0f0f; }
.post-body a { color: #7c3aed; text-decoration: underline; text-underline-offset: 3px; }
.post-body a:hover { color: #6d28d9; }
.post-body ul, .post-body ol { margin: 0 0 24px 24px; }
.post-body li { margin-bottom: 10px; }
.post-body code { font-family: 'IBM Plex Mono', monospace; font-size: 14px; background: #f0ebff; color: #7c3aed; padding: 2px 6px; border-radius: 3px; }
.post-body .callout { background: #fff; border-left: 3px solid #7c3aed; padding: 16px 20px; border-radius: 0 4px 4px 0; margin: 32px 0; font-family: 'IBM Plex Sans', sans-serif; font-size: 15px; color: #333; line-height: 1.6; }
.post-body .callout strong { color: #7c3aed; }
.post-body .warning { background: #fff8e1; border-left: 3px solid #f59e0b; padding: 16px 20px; border-radius: 0 4px 4px 0; margin: 32px 0; font-family: 'IBM Plex Sans', sans-serif; font-size: 15px; color: #333; line-height: 1.6; }
.post-body table { width: 100%; border-collapse: collapse; margin: 24px 0; font-family: 'IBM Plex Sans', sans-serif; font-size: 14px; }
.post-body th { background: #0f0f0f; color: #fff; padding: 10px 14px; text-align: left; font-weight: 500; }
.post-body td { padding: 10px 14px; border-bottom: 1px solid #e5e5e5; color: #333; }
.post-body tr:nth-child(even) td { background: #f9f9f7; }

aside { grid-column: 2; display: flex; flex-direction: column; gap: 20px; position: sticky; top: 32px; }
.sidebar-box { background: #fff; border: 1px solid #e5e5e5; border-radius: 4px; padding: 22px; }
.sidebar-box.primary { border-top: 3px solid #7c3aed; }
.sidebar-icon { font-size: 22px; margin-bottom: 10px; }
.sidebar-box h4 { font-size: 14px; font-weight: 600; color: #0f0f0f; margin-bottom: 8px; }
.sidebar-box p { font-size: 13px; color: #666; line-height: 1.5; margin-bottom: 14px; }
.sidebar-btn { display: block; text-align: center; padding: 9px 14px; border-radius: 3px; font-size: 13px; font-weight: 500; transition: background 0.15s; }
.sidebar-btn.filled { background: #7c3aed; color: #fff; }
.sidebar-btn.filled:hover { background: #6d28d9; }
.sidebar-btn.outline { border: 1.5px solid #7c3aed; color: #7c3aed; }
.sidebar-btn.outline:hover { background: #f0ebff; }

.related { grid-column: 1 / -1; margin-top: 56px; padding-top: 40px; border-top: 1px solid #e5e5e5; }
.related-label { font-family: 'IBM Plex Mono', monospace; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: #999; margin-bottom: 20px; }
.related-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.related-card { display: block; background: #fff; border: 1px solid #e5e5e5; border-radius: 4px; padding: 22px; transition: border-color 0.15s; }
.related-card:hover { border-color: #7c3aed; }
.related-card h4 { font-size: 15px; font-weight: 600; line-height: 1.3; color: #0f0f0f; margin: 10px 0 8px; }
.related-card p { font-size: 13px; color: #666; line-height: 1.5; margin-bottom: 14px; }
.read-link { font-size: 13px; font-weight: 500; color: #7c3aed; }

footer { background: #0f0f0f; padding: 32px 24px; text-align: center; }
footer p { font-size: 12px; color: #555; }
footer a { color: #7c3aed; }

@media (max-width: 720px) {
  .page-wrap { grid-template-columns: 1fr; gap: 32px; }
  aside { grid-column: 1; position: static; }
  .related { grid-column: 1; }
}
