/* ================================================================
   ORBITAL COMMAND Blog Theme
   Design tokens matched to launchdetect.com landing page
   ================================================================ */

:root {
  --bg: #0a0e14;
  --surface: #0f1319;
  --surface2: #151b24;
  --border: #1e2630;
  --text: #e8ecf1;
  --text2: #7a8595;
  --text3: #4d5a6a;
  --accent: #4a9eff;
  --warm: #ff6b35;
  --warm-soft: #ffaa55;

  --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: 150ms;
  --transition-normal: 300ms;

  --content-width: 720px;
  --wide-width: 960px;
}

/* ================================================================
   RESET & BASE
   ================================================================ */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  font-family: var(--font-body);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

img { max-width: 100%; display: block; }

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition-fast) ease;
}
a:hover { color: var(--warm-soft); }

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ================================================================
   LAYOUT
   ================================================================ */

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

/* ================================================================
   BLOG INDEX / HERO
   ================================================================ */

.blog-hero {
  text-align: center;
  padding: 3rem 0 2.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2.5rem;
}

.blog-hero-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
  line-height: 1.15;
}

.blog-hero-subtitle {
  font-size: 1.125rem;
  color: var(--text2);
  margin-top: 0.75rem;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

/* ================================================================
   POST CARDS (Index)
   ================================================================ */

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

.post-card {
  display: flex;
  gap: 1.5rem;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: border-color var(--transition-normal) var(--ease-out),
              background var(--transition-normal) var(--ease-out);
}

.post-card:hover {
  border-color: var(--text3);
  background: var(--surface2);
}

.post-card-image-link {
  flex-shrink: 0;
  width: 240px;
}

.post-card-image {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 6px;
}

.post-card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.post-card-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: var(--text3);
  margin-bottom: 0.5rem;
}

.meta-sep { color: var(--text3); }

.post-tag {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--accent);
  background: rgba(74, 158, 255, 0.1);
  padding: 2px 8px;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-decoration: none;
}

.post-tag:hover {
  background: rgba(74, 158, 255, 0.2);
  color: var(--accent);
}

.post-card-title {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.5rem;
}

.post-card-title a {
  color: var(--text);
  text-decoration: none;
}

.post-card-title a:hover {
  color: var(--accent);
}

.post-card-excerpt {
  font-size: 0.9375rem;
  color: var(--text2);
  line-height: 1.6;
  flex: 1;
}

.post-card-read-more {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent);
  margin-top: 0.75rem;
  align-self: flex-start;
}

.post-card-read-more:hover {
  color: var(--warm);
}

/* ================================================================
   SINGLE POST
   ================================================================ */

.post-single {
  max-width: var(--content-width);
  margin: 0 auto;
}

.post-header {
  padding: 2.5rem 0 1.5rem;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text3);
  margin-bottom: 1rem;
}

.post-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.post-subtitle {
  font-size: 1.25rem;
  color: var(--text2);
  margin-top: 0.75rem;
  line-height: 1.5;
}

.post-tags {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.post-hero {
  margin: 0 -2rem 2rem;
  border-radius: 8px;
  overflow: hidden;
}

.post-hero img {
  width: 100%;
  height: auto;
}

/* ================================================================
   POST CONTENT — Prose styling
   ================================================================ */

.post-content {
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--text2);
}

.post-content h2 {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text);
  margin: 2.5rem 0 1rem;
  line-height: 1.3;
}

.post-content h3 {
  font-family: var(--font-body);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
  margin: 2rem 0 0.75rem;
}

.post-content h4 {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--text);
  margin: 1.5rem 0 0.5rem;
}

.post-content p {
  margin-bottom: 1.25rem;
  max-width: none;
}

.post-content strong {
  color: var(--text);
  font-weight: 600;
}

.post-content em {
  font-style: italic;
}

.post-content a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: rgba(74, 158, 255, 0.3);
  text-underline-offset: 3px;
}

.post-content a:hover {
  text-decoration-color: var(--accent);
}

.post-content ul,
.post-content ol {
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
}

.post-content li {
  margin-bottom: 0.4rem;
}

.post-content li::marker {
  color: var(--text3);
}

.post-content blockquote {
  border-left: 3px solid var(--accent);
  padding: 0.75rem 1.25rem;
  margin: 1.5rem 0;
  background: var(--surface);
  border-radius: 0 6px 6px 0;
}

.post-content blockquote p {
  color: var(--text);
  margin-bottom: 0;
  font-style: italic;
}

.post-content img {
  border-radius: 8px;
  margin: 1.5rem 0;
  border: 1px solid var(--border);
}

.post-content figure {
  margin: 1.5rem 0;
}

.post-content figcaption {
  font-size: 0.8125rem;
  color: var(--text3);
  text-align: center;
  margin-top: 0.5rem;
}

.post-content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}

.post-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9375rem;
}

.post-content th {
  background: var(--surface);
  font-weight: 600;
  color: var(--text);
  text-align: left;
  padding: 0.75rem 1rem;
  border-bottom: 2px solid var(--border);
}

.post-content td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
}

.post-content tr:hover td {
  background: var(--surface);
}

/* ================================================================
   CODE BLOCKS
   ================================================================ */

.post-content code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: var(--surface);
  color: var(--warm-soft);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  border: 1px solid var(--border);
}

.post-content pre {
  background: #0d1117;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  overflow-x: auto;
  margin: 1.5rem 0;
  line-height: 1.5;
}

.post-content pre code {
  background: none;
  border: none;
  padding: 0;
  color: var(--text);
  font-size: 0.875rem;
}

/* Syntax highlighting — space theme override */
.highlight pre {
  background: #0d1117;
}

.highlight .c, .highlight .c1, .highlight .cm { color: #6a737d; }  /* comments */
.highlight .k, .highlight .kd, .highlight .kn { color: #ff7b72; }  /* keywords */
.highlight .s, .highlight .s1, .highlight .s2 { color: #a5d6ff; }  /* strings */
.highlight .n, .highlight .na { color: #d2a8ff; }                   /* names/attributes */
.highlight .nf, .highlight .nb { color: #d2a8ff; }                  /* functions */
.highlight .mi, .highlight .mf { color: #79c0ff; }                  /* numbers */
.highlight .o, .highlight .p { color: var(--text); }                /* operators */
.highlight .kt { color: #ff7b72; }                                  /* types */

/* ================================================================
   POST FOOTER
   ================================================================ */

.post-footer {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.post-author {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.author-info {
  display: flex;
  flex-direction: column;
}

.author-info strong {
  font-size: 1rem;
  color: var(--text);
}

.author-title {
  font-size: 0.8125rem;
  color: var(--text3);
}

.post-nav {
  display: flex;
  gap: 1.5rem;
  margin-top: 2rem;
}

.post-nav-link {
  flex: 1;
  padding: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  text-decoration: none;
  transition: border-color var(--transition-fast) ease;
}

.post-nav-link:hover {
  border-color: var(--accent);
}

.post-nav-label {
  display: block;
  font-size: 0.75rem;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

.post-nav-title {
  display: block;
  color: var(--text);
  font-weight: 600;
  font-size: 0.9375rem;
}

.post-nav-next { text-align: right; }

/* ================================================================
   COMMENTS
   ================================================================ */

.comments {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.comments-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1.5rem;
}

/* ================================================================
   PAGINATION
   ================================================================ */

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.pagination-link {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--accent);
}

.pagination-info {
  font-size: 0.8125rem;
  color: var(--text3);
}

/* ================================================================
   FOOTER
   ================================================================ */

.blog-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 1.5rem;
  margin-top: 4rem;
}

.footer-inner {
  max-width: var(--wide-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-inner p {
  font-size: 0.8125rem;
  color: var(--text3);
}

.footer-nav {
  display: flex;
  gap: 1.5rem;
}

.footer-nav a {
  font-size: 0.8125rem;
  color: var(--text3);
}

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

/* ================================================================
   RESPONSIVE
   ================================================================ */

@media (max-width: 768px) {
  .post-card {
    flex-direction: column;
  }

  .post-card-image-link {
    width: 100%;
  }

  .post-card-image {
    height: 200px;
  }

  .post-hero {
    margin: 0 -1rem 1.5rem;
  }

  .blog-main {
    padding: 1.5rem 1rem 3rem;
  }

  .post-nav {
    flex-direction: column;
  }

  .post-nav-next { text-align: left; }

  .footer-inner {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}
