/* Space News Blog — navy / dark tech editorial */
:root {
  --bg: #0b1220;
  --bg-elevated: #121a2b;
  --bg-card: #151f33;
  --border: #243049;
  --border-soft: #1c2740;
  --text: #e8eef8;
  --text-muted: #9aabC4;
  --text-dim: #6b7c96;
  --accent: #3d8bfd;
  --accent-soft: #1e3a5f;
  --gold: #c9a227;
  --breaking: #e85d4c;
  --link: #6eb1ff;
  --link-hover: #9bc8ff;
  --radius: 10px;
  --font-sans: "IBM Plex Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-serif: "Source Serif 4", "Georgia", "Times New Roman", serif;
  --font-mono: "IBM Plex Mono", "Consolas", monospace;
  --max: 720px;
  --wide: 960px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(61, 139, 253, 0.12), transparent),
    linear-gradient(180deg, #0b1220 0%, #0a101c 100%);
  min-height: 100vh;
}

a {
  color: var(--link);
  text-decoration: none;
  transition: color 0.15s ease;
}
a:hover { color: var(--link-hover); text-decoration: underline; }

img { max-width: 100%; height: auto; }

.site-header {
  border-bottom: 1px solid var(--border);
  background: rgba(11, 18, 32, 0.92);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 40;
}

.site-header-inner {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 0.9rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  text-decoration: none;
  color: var(--text);
}
.brand:hover { text-decoration: none; color: var(--text); }
.brand-logo {
  display: block;
  height: 48px;
  width: auto;
  max-width: min(240px, 55vw);
  object-fit: contain;
  object-position: left center;
}
.brand-mark {
  font-weight: 700;
  letter-spacing: 0.04em;
  font-size: 0.95rem;
  text-transform: uppercase;
  color: var(--text);
}
.brand-mark span { color: #e11d2e; }
.brand-sub {
  font-size: 0.72rem;
  color: var(--text-dim);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.footer-logo {
  display: block;
  height: 40px;
  width: auto;
  margin: 0 auto 0.75rem;
  object-fit: contain;
}

.nav {
  display: flex;
  gap: 1.25rem;
  align-items: center;
  font-size: 0.9rem;
}
.nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
}
.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--text);
  text-decoration: none;
}

.draft-banner, .example-banner {
  background: var(--accent-soft);
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.8rem;
  text-align: center;
  padding: 0.45rem 1rem;
  letter-spacing: 0.02em;
}
.draft-banner strong, .example-banner strong { color: var(--gold); font-weight: 600; }
.draft-banner { background:#3b1d08; color:#ffd7a8; }

main {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}

.page-title {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 0.35rem;
  line-height: 1.25;
}
.page-lede {
  color: var(--text-muted);
  margin: 0 0 2rem;
  max-width: 42rem;
  font-size: 1.05rem;
}

.post-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.post-card {
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 1.25rem 1.4rem;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, transform 0.15s ease, background 0.15s ease;
}
.post-card:hover {
  border-color: var(--accent);
  background: #182340;
  text-decoration: none;
  color: inherit;
  transform: translateY(-1px);
}

.post-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.85rem;
  align-items: center;
  margin-bottom: 0.55rem;
  font-size: 0.78rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.badge-brief {
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid rgba(61, 139, 253, 0.35);
}
.badge-breaking {
  background: rgba(232, 93, 76, 0.15);
  color: var(--breaking);
  border: 1px solid rgba(232, 93, 76, 0.4);
}
.badge-example {
  background: rgba(201, 162, 39, 0.12);
  color: var(--gold);
  border: 1px solid rgba(201, 162, 39, 0.4);
}

.post-card h2 {
  margin: 0 0 0.45rem;
  font-size: 1.2rem;
  font-weight: 650;
  letter-spacing: -0.015em;
  line-height: 1.35;
  color: var(--text);
}
.post-card .dek {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.5;
}
.post-card-tags {
  margin-top: 0.85rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tag {
  display: inline-block;
  font-size: 0.72rem;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-muted);
  text-decoration: none;
  letter-spacing: 0.02em;
}
.tag:hover {
  border-color: var(--accent);
  color: var(--link);
  text-decoration: none;
}

/* Post detail */
.article {
  max-width: var(--max);
  margin: 0 auto;
}
.article-header {
  margin-bottom: 1.75rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}
.article-header .page-title { margin-bottom: 0.65rem; }
.article-dek {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin: 0 0 1rem;
  line-height: 1.5;
  font-weight: 400;
}
.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  align-items: center;
  font-size: 0.8rem;
  color: var(--text-dim);
}

.prose {
  font-family: var(--font-serif);
  font-size: 1.08rem;
  line-height: 1.75;
  color: #d5deec;
}
.prose p { margin: 0 0 1.15rem; }
.prose h2, .prose h3 {
  font-family: var(--font-sans);
  color: var(--text);
  margin: 1.75rem 0 0.75rem;
  letter-spacing: -0.02em;
}
.prose h2 { font-size: 1.35rem; }
.prose h3 { font-size: 1.15rem; }
.prose ul, .prose ol {
  margin: 0 0 1.15rem;
  padding-left: 1.4rem;
}
.prose li { margin-bottom: 0.35rem; }
.prose a { text-underline-offset: 2px; }
.prose strong { color: var(--text); font-weight: 650; }
.prose blockquote {
  margin: 1.25rem 0;
  padding: 0.75rem 1rem;
  border-left: 3px solid var(--accent);
  background: var(--bg-elevated);
  color: var(--text-muted);
  font-style: italic;
}

.sources {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}
.sources h2 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  margin: 0 0 1rem;
  font-weight: 650;
}
.sources-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.sources-list li {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  padding: 0.85rem 1rem;
}
.source-outlet {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  font-weight: 650;
  margin-bottom: 0.25rem;
}
.source-headline {
  font-size: 0.95rem;
  color: var(--text);
  margin: 0 0 0.25rem;
  line-height: 1.4;
}
.source-meta {
  font-size: 0.75rem;
  color: var(--text-dim);
}
.source-meta a { color: var(--text-muted); }

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

.tags-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
}
.tags-cloud .tag {
  font-size: 0.85rem;
  padding: 0.35rem 0.75rem;
}
.tag-count {
  color: var(--text-dim);
  margin-left: 0.25rem;
  font-size: 0.8em;
}

.about-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.75rem;
  max-width: var(--max);
}
.about-card p { color: var(--text-muted); margin: 0 0 1rem; }
.about-card p:last-child { margin-bottom: 0; }
.about-card strong { color: var(--text); }

.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 1.25rem 2.5rem;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.8rem;
}
.site-footer a { color: var(--text-muted); }

.empty-state {
  padding: 2rem;
  text-align: center;
  color: var(--text-muted);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: var(--bg-elevated);
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .site-header-inner { padding: 0.75rem 1rem; }
  main { padding: 1.5rem 1rem 3rem; }
  .post-card { padding: 1.1rem 1.15rem; }
  .prose { font-size: 1.02rem; }
}
