/* ============================================================
   Techleet — editorial theme (News + Blog)
   Re-skins the shared main.css to the new emerald brand and adds
   a content-first, high-readability publication layout.
   Loaded AFTER main.css, so it overrides tokens + components.
   ============================================================ */

:root {
  /* remap the old indigo/orange tokens to the emerald brand */
  --ink: #06100c;
  --indigo-950: #0a1712;
  --indigo-900: #0e1a15;
  --indigo-700: #1c3a30;
  --indigo-500: #2f7360;
  --indigo-300: #7fd0b4;
  --paper: #eef4f1;
  --paper-dim: rgba(255, 255, 255, 0.12);
  --signal: #10b981;
  --signal-deep: #0e9d6e;
  --muted: #9db1aa;
  --line: rgba(16, 185, 129, 0.16);

  --read: #d5e0db;          /* body reading colour — high contrast */
  --read-strong: #f2f7f5;
  --card: rgba(255, 255, 255, 0.022);
  --card-line: rgba(16, 185, 129, 0.14);
  --chip-sec: #34d399;      /* security */
  --chip-dev: #fbbf24;      /* development */
}

/* ---------- surface ---------- */
body {
  color: var(--read);
  background:
    radial-gradient(1100px 620px at 88% -12%, rgba(16, 185, 129, 0.12), transparent 60%),
    radial-gradient(900px 700px at -10% 32%, rgba(20, 184, 166, 0.10), transparent 55%),
    linear-gradient(168deg, #0c1a15 0%, #0a1712 45%, #08130f 72%, #061410 100%);
  background-attachment: fixed;
}

/* faint dot-grid texture, like the main site */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.4;
  background-image: radial-gradient(circle, rgba(16, 185, 129, 0.05) 1px, transparent 1px);
  background-size: 46px 46px;
}

::selection { background: rgba(16, 185, 129, 0.32); color: #fff; }

/* ---------- brand lockup (replaces old wordmark PNG) ---------- */
.brand-lockup {
  display: inline-flex;
  align-items: baseline;
  font-family: var(--font-sans);
  font-weight: 900;
  font-size: 1.55rem;
  letter-spacing: -0.01em;
  line-height: 1;
  white-space: nowrap;
}
.brand-lockup .bl-br {
  font-family: var(--font-mono);
  font-weight: 600;
  color: rgba(52, 211, 153, 0.85);
  font-size: 1.4rem;
}
.brand-lockup .bl-br.l { margin-right: 0.04em; }
.brand-lockup .bl-br.r { margin-left: 0.06em; }
.brand-lockup .bl-t { color: #10b981; }
.brand-lockup .bl-rest { color: #eef4f1; }
.site-footer .brand-lockup { font-size: 1.25rem; }
.site-footer .brand-lockup .bl-br { font-size: 1.15rem; }

/* ---------- nav ---------- */
.site-nav {
  background: rgba(8, 19, 15, 0.72);
  border-bottom: 1px solid rgba(16, 185, 129, 0.12);
}
.site-nav .wrap { min-height: 74px; }
.nav-links a[aria-current="page"]:not(.btn) {
  color: var(--read-strong);
  text-decoration-color: var(--signal);
}
.btn-signal { color: #04140e; }
.btn-signal:hover { box-shadow: 0 8px 24px rgba(16, 185, 129, 0.28); }

/* accent hairline under the sticky nav */
.site-nav::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(16, 185, 129, 0.5), transparent);
}
.site-nav { position: sticky; }

/* ---------- index hero ---------- */
.hero .eyebrow, .page-hero .eyebrow { color: var(--signal); }
.hero h1.display, .page-hero h1.display {
  text-transform: none;
  font-stretch: 112%;
  letter-spacing: -0.015em;
  color: var(--read-strong);
}
.hero .lede, .page-hero .lede {
  color: #b9c8c2;
  font-size: 1.2rem;
  max-width: 62ch;
}
.hero .lede a, .page-hero .lede a { color: var(--signal) !important; text-underline-offset: 3px; }

/* ---------- post grid + featured lead ---------- */
.post-grid { gap: 1.5rem; }

.post-card {
  background: var(--card);
  border: 1px solid var(--card-line);
  border-radius: 16px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.post-card:hover {
  border-color: rgba(16, 185, 129, 0.42);
  box-shadow: 0 20px 50px -26px rgba(0, 0, 0, 0.85), 0 0 34px -18px rgba(16, 185, 129, 0.35);
}
.post-thumb { border-bottom: 1px solid rgba(16, 185, 129, 0.12); }
.post-card-body { padding: 1.2rem 1.35rem 1.5rem; gap: 0.6rem; }
.post-card-body .mono-code {
  font-size: 0.64rem;
  letter-spacing: 0.16em;
  color: var(--chip-sec);
}
.post-card-body h2 {
  font-size: 1.2rem;
  line-height: 1.28;
  color: var(--read-strong);
  font-weight: 800;
}
.post-card-body p { color: var(--muted); font-size: 0.92rem; }

/* Lead story: first card spans full width, image beside the text */
@media (min-width: 760px) {
  .post-grid { grid-template-columns: repeat(2, 1fr); }
  .post-card:first-child {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: stretch;
  }
  .post-card:first-child .post-thumb {
    width: 46%;
    aspect-ratio: auto;
    border-bottom: 0;
    border-right: 1px solid rgba(16, 185, 129, 0.12);
  }
  .post-card:first-child .post-card-body {
    flex: 1;
    justify-content: center;
    padding: 2.2rem 2.4rem;
  }
  .post-card:first-child .post-card-body h2 { font-size: 1.7rem; }
  .post-card:first-child .post-card-body p { font-size: 1rem; }
  .post-card:first-child .post-card-body .mono-code { font-size: 0.7rem; }
}
@media (min-width: 1040px) {
  .post-grid { grid-template-columns: repeat(3, 1fr); }
}

/* empty state */
.post-empty { border-color: rgba(16, 185, 129, 0.25); }
.post-empty .pc-glyph { color: rgba(16, 185, 129, 0.5); }
.post-empty a { color: var(--signal); }

/* ---------- article (single post) ---------- */
.post { max-width: 720px; }
.post > .post-meta,
.post .post-meta {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--chip-sec) !important;
}
.post h1.display {
  text-transform: none;
  font-stretch: 110%;
  letter-spacing: -0.015em;
  line-height: 1.08;
  color: var(--read-strong);
  margin: 0.7rem 0 0.2rem;
}
.post-hero-img {
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 16px;
}

.post-body { margin-top: 1.8rem; }
.post-body p,
.post-body li {
  color: var(--read) !important;
  font-size: 1.12rem;
  line-height: 1.85;
  margin-bottom: 1.15rem;
}
.post-body h2 {
  font-size: 1.5rem !important;
  font-weight: 800;
  color: var(--read-strong);
  letter-spacing: -0.01em;
  line-height: 1.25;
  margin: 2.4rem 0 0.9rem !important;
  padding-left: 0.9rem;
  position: relative;
}
.post-body h2::before {
  content: "";
  position: absolute;
  left: 0; top: 0.15em; bottom: 0.15em;
  width: 3px;
  border-radius: 2px;
  background: linear-gradient(180deg, #10b981, #14b8a6);
}
.post-body h3 {
  font-size: 1.18rem;
  color: var(--read-strong);
  margin: 1.8rem 0 0.6rem;
}
.post-body strong { color: var(--read-strong); }
.post-body em { color: #c6d4cf; }
.post-body a {
  color: var(--signal) !important;
  text-decoration: underline;
  text-decoration-color: rgba(16, 185, 129, 0.5);
  text-underline-offset: 3px;
}
.post-body a:hover { text-decoration-color: var(--signal); }
.post-body blockquote {
  margin: 1.6rem 0;
  padding: 0.6rem 0 0.6rem 1.4rem;
  border-left: 3px solid rgba(16, 185, 129, 0.5);
  color: #c6d4cf;
  font-style: italic;
}

/* call-to-action callout at the end of a post */
.post-cta {
  margin-top: 2.4rem !important;
  padding: 1.3rem 1.5rem !important;
  border: 1px solid rgba(16, 185, 129, 0.28) !important;
  border-radius: 14px !important;
  background: rgba(16, 185, 129, 0.06) !important;
  color: var(--read);
}
.post-cta a { color: var(--signal); font-weight: 600; }

/* ---------- footer ---------- */
.site-footer {
  border-top: 1px solid rgba(16, 185, 129, 0.12);
  background: rgba(6, 16, 12, 0.6);
}
.footer-meta { border-top-color: rgba(16, 185, 129, 0.12); }

/* ---------- mobile nav sheet ---------- */
@media (max-width: 820px) {
  .nav-links {
    background: rgba(8, 19, 15, 0.98);
    border-bottom: 1px solid rgba(16, 185, 129, 0.18);
  }
  .post-card:first-child { flex-direction: column; }
  .post-card:first-child .post-thumb { width: 100%; border-right: 0; }
}
