/* Raedus Labs blog styles.
   Design tokens extracted from index.html so blog pages match the site
   and render correctly even if the Tailwind CDN is unavailable. */

:root {
  --bg: #06060a;
  --surface: #0c0c14;
  --raised: #12121c;
  --border: #1e1e2e;
  --border-hover: #2a2a3e;
  --text: #d0d0dc;
  --text-dim: #8a8a9e;
  --text-muted: #44445a;
  --accent: #00e8c6;
  --accent-dim: #00735f;
  --amber: #e8a420;
  --rose: #e85464;
  --max-width: 760px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection { background: rgba(0, 232, 198, 0.2); color: var(--accent); }

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-hover); }

/* Signature top gradient line */
.top-line {
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, #00e8c6 30%, #e8a420 50%, #e85464 70%, transparent 100%);
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
}

/* Noise overlay */
.noise::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 99;
  opacity: 0.4;
}

.dot-grid {
  background-image: radial-gradient(circle, #1a1a26 1px, transparent 1px);
  background-size: 24px 24px;
}

/* Layout */
.wrap { max-width: var(--max-width); margin: 0 auto; padding: 0 1.25rem; }

/* Nav */
.site-nav {
  position: fixed;
  top: 2px; left: 0; right: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  background: rgba(6, 6, 10, 0.92);
  border-bottom: 1px solid var(--border);
}
.site-nav .inner {
  max-width: var(--max-width);
  margin: 0 auto;
  height: 56px;
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.site-nav .brand { font-size: 0.875rem; color: var(--accent); font-weight: 500; letter-spacing: -0.01em; text-decoration: none; }
.site-nav .links { display: flex; align-items: center; gap: 1.5rem; }
.nav-link {
  position: relative;
  font-size: 0.75rem;
  color: var(--text-dim);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  transition: color 0.15s ease;
}
.nav-link:hover { color: var(--accent); }
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 0; height: 1px;
  background: var(--accent);
  transition: width 0.2s ease;
}
.nav-link:hover::after { width: 100%; }

/* Section label  // like-this */
.kicker {
  color: var(--text-muted);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  margin-bottom: 1.5rem;
}

/* Reveal animation */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ---- Blog index listing (reuses homepage .article-row pattern) ---- */
.post-list { border: 1px solid var(--border); border-radius: 0.5rem; overflow: hidden; }
.article-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1rem;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  transition: background 0.15s ease;
}
.article-row:last-child { border-bottom: 0; }
.article-row:hover { background: rgba(0, 232, 198, 0.04); }
.article-row .article-title { font-size: 0.95rem; color: var(--text); transition: color 0.15s ease; }
.article-row:hover .article-title { color: var(--accent); }
.article-row .article-desc { font-size: 0.78rem; color: var(--text-dim); margin-top: 0.35rem; line-height: 1.5; }
.article-row .article-meta { font-size: 0.7rem; color: var(--text-muted); margin-top: 0.5rem; text-transform: uppercase; letter-spacing: 0.08em; }
.article-row .article-date { font-size: 0.72rem; color: var(--text-muted); flex-shrink: 0; white-space: nowrap; }
.tag { display: inline-block; font-size: 0.65rem; color: var(--text-muted); border: 1px solid var(--border); border-radius: 0.25rem; padding: 0.1rem 0.45rem; margin-right: 0.35rem; }

/* ---- Article body (rendered markdown) ---- */
.post {
  padding: 7rem 0 5rem;
  position: relative;
}
.post-header { margin-bottom: 2.5rem; }
.post-header h1 {
  font-size: clamp(1.65rem, 4vw, 2.5rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
  margin-bottom: 1rem;
}
.post-byline { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.12em; }
.post-byline .sep { color: var(--border-hover); margin: 0 0.5rem; }
.post-tags { margin-top: 1rem; }

.prose { color: var(--text); font-size: 0.95rem; }
.prose h1 { font-size: 1.9rem; font-weight: 700; line-height: 1.25; color: var(--text); margin: 2.5rem 0 1rem; }
.prose h2 { font-size: 1.45rem; font-weight: 700; line-height: 1.3; color: var(--text); margin: 2.25rem 0 0.85rem; padding-bottom: 0.4rem; border-bottom: 1px solid var(--border); }
.prose h3 { font-size: 1.15rem; font-weight: 600; color: var(--text); margin: 1.75rem 0 0.6rem; }
.prose h4 { font-size: 1rem; font-weight: 600; color: var(--text-dim); margin: 1.4rem 0 0.5rem; }
.prose p { margin: 0 0 1.15rem; color: var(--text); }
.prose a { color: var(--accent); text-decoration: none; border-bottom: 1px solid rgba(0, 232, 198, 0.3); transition: border-color 0.15s ease; }
.prose a:hover { border-bottom-color: var(--accent); }
.prose strong { color: #e8e8f0; font-weight: 700; }
.prose em { color: var(--text-dim); }
.prose ul, .prose ol { margin: 0 0 1.15rem 1.4rem; }
.prose li { margin-bottom: 0.4rem; }
.prose li::marker { color: var(--accent-dim); }
.prose blockquote {
  border-left: 2px solid var(--amber);
  background: rgba(232, 164, 32, 0.05);
  padding: 0.75rem 1.1rem;
  margin: 0 0 1.15rem;
  color: var(--text-dim);
  font-style: italic;
}
.prose blockquote p:last-child { margin-bottom: 0; }
.prose code {
  font-family: inherit;
  background: var(--raised);
  border: 1px solid var(--border);
  border-radius: 0.25rem;
  padding: 0.1rem 0.35rem;
  font-size: 0.85em;
  color: var(--accent);
}
.prose pre {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 1rem 1.1rem;
  overflow-x: auto;
  margin: 0 0 1.4rem;
}
.prose pre code { background: none; border: 0; padding: 0; color: var(--text); font-size: 0.82rem; line-height: 1.6; }
.prose img { max-width: 100%; height: auto; border-radius: 0.5rem; border: 1px solid var(--border); margin: 1.4rem 0; }
.prose hr { border: 0; border-top: 1px solid var(--border); margin: 2.5rem 0; }
.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1.4rem;
  font-size: 0.85rem;
}
.prose th, .prose td { border: 1px solid var(--border); padding: 0.55rem 0.8rem; text-align: left; }
.prose th { background: var(--surface); color: var(--text); font-weight: 600; }
.prose td { color: var(--text-dim); }
.prose tr:nth-child(even) td { background: rgba(255, 255, 255, 0.012); }

/* Back / more links */
.post-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 3.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}
.txt-link {
  font-size: 0.8rem;
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.15s ease;
}
.txt-link:hover { color: var(--accent); }
.txt-link .arr { color: var(--accent); }

/* Page header for blog index */
.page-head { padding: 7rem 0 2.5rem; }
.page-head h1 { font-size: clamp(1.8rem, 5vw, 2.75rem); font-weight: 700; color: var(--text); line-height: 1.15; }
.page-head .accent { color: var(--accent); }
.page-head p { color: var(--text-dim); font-size: 0.9rem; margin-top: 0.9rem; max-width: 48ch; }

/* Footer */
.site-foot {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  margin-top: 4rem;
}
.site-foot .inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.site-foot p, .site-foot a { font-size: 0.72rem; color: var(--text-muted); text-decoration: none; }
.site-foot a:hover { color: var(--accent); }
.site-foot .foot-links { display: flex; gap: 1rem; }

@media (max-width: 640px) {
  .site-nav .links { gap: 1rem; }
  .nav-link { letter-spacing: 0.08em; }
}
