/* ===========================================================================
   TechAbys Blog — self-contained stylesheet (no dependency on the SPA).
   Clean, modern editorial theme (2025/26). Light "warm paper" reading surface,
   big confident serif headlines + serif body for comfort, sans-serif UI chrome.
   Edit colours/fonts here once and every blog page updates.
   Fonts: Newsreader (headlines + body)  ·  Inter (nav, tags, meta, buttons).
   =========================================================================== */

:root {
  --bg: #fbfaf8;          /* warm paper */
  --bg-soft: #f3f1ec;
  --card: #ffffff;
  --line: rgba(28, 25, 22, 0.10);
  --line-soft: rgba(28, 25, 22, 0.06);
  --ink: #1c1b19;         /* near-black, warm */
  --muted: #6b665e;
  --muted-2: #98938a;
  --accent: #c2410c;      /* burnt orange — links, eyebrow, read-more */
  --accent-ink: #9a3412;  /* darker, for hover */
  --accent-soft: rgba(194, 65, 12, 0.10);
  --maxw: 1120px;
  --readw: 700px;
  --serif: 'Newsreader', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }

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

.tx-wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---------- top bar ---------- */
.tx-bar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(251, 250, 248, 0.82);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-soft);
}
.tx-bar-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 15px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
}
.tx-logo { font-family: var(--sans); font-weight: 700; letter-spacing: -0.02em; font-size: 19px; }
.tx-logo b { color: var(--accent); }
.tx-bar-nav { display: flex; gap: 24px; font-family: var(--sans); font-size: 14.5px; font-weight: 500; color: var(--muted); }
.tx-bar-nav a:hover { color: var(--ink); }
.tx-bar-cta {
  font-family: var(--sans); padding: 9px 17px; border-radius: 999px; font-size: 13.5px; font-weight: 600;
  background: var(--ink); color: #fff; transition: transform 0.15s ease, background 0.15s ease;
}
.tx-bar-cta:hover { transform: translateY(-1px); background: #000; }

/* ---------- breadcrumb ---------- */
.tx-crumb { font-family: var(--sans); font-size: 13px; color: var(--muted-2); padding: 28px 0 0; letter-spacing: 0.01em; }
.tx-crumb a:hover { color: var(--accent); }
.tx-crumb span { color: var(--muted-2); margin: 0 8px; }

/* ---------- index hero ---------- */
.tx-blog-hero { padding: 58px 0 34px; border-bottom: 1px solid var(--line-soft); }
.tx-eyebrow {
  font-family: var(--sans);
  font-size: 12px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--accent); margin: 0 0 18px;
}
.tx-blog-hero h1 {
  font-family: var(--serif);
  font-weight: 500; font-size: clamp(38px, 6vw, 66px); line-height: 1.04;
  letter-spacing: -0.02em; margin: 0 0 20px;
}
.tx-blog-hero h1 .dim { color: var(--muted-2); font-style: italic; }
.tx-blog-hero p { color: var(--muted); font-size: clamp(17px, 1.6vw, 20px); max-width: 60ch; margin: 0; }

/* ---------- featured image / cover art (self-contained gradient art) ---------- */
.tx-fi {
  position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden;
  border-radius: 14px; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #334155, #64748b);
}
.tx-fi::after {            /* subtle dotted texture so the cover reads as "designed" */
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.16) 1px, transparent 1.4px);
  background-size: 16px 16px; opacity: 0.5; mix-blend-mode: overlay;
}
.tx-fi-label {
  position: relative; z-index: 1; text-align: center; padding: 0 22px;
  font-family: var(--serif); font-style: italic; font-weight: 500;
  color: rgba(255, 255, 255, 0.96); line-height: 1.1;
  font-size: clamp(22px, 3.4vw, 34px); letter-spacing: -0.01em;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.28);
}
.tx-fi-kicker {
  position: absolute; left: 16px; top: 14px; z-index: 1;
  font-family: var(--sans); font-size: 10.5px; font-weight: 600; letter-spacing: 0.16em;
  text-transform: uppercase; color: rgba(255, 255, 255, 0.92);
  background: rgba(0, 0, 0, 0.22); padding: 5px 10px; border-radius: 999px;
  backdrop-filter: blur(4px);
}
/* per-topic palettes */
.tx-fi--cerebras { background: linear-gradient(135deg, #0f2a4a, #2f5e9e 55%, #9fb8d6); }
.tx-fi--physical { background: linear-gradient(135deg, #0f3d2e, #1f7a5a 55%, #a7d9c4); }
.tx-fi--gemini   { background: linear-gradient(120deg, #1a73e8, #2aa198 52%, #f6a609); }
.tx-fi--startup  { background: linear-gradient(135deg, #2a1259, #6d28d9 55%, #c4b0f5); }
.tx-fi--frontier { background: linear-gradient(135deg, #0b1220, #334155 52%, #f59e0b); }
.tx-fi--claude   { background: linear-gradient(135deg, #7c2d12, #ea580c 55%, #fdba74); }
.tx-fi--photo    { background: linear-gradient(135deg, #4a2c1a, #b06a3c 52%, #e9c9a3); }

/* ---------- post grid ---------- */
.tx-grid {
  display: grid; gap: 30px; padding: 48px 0 12px;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
}
.tx-card {
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 1px 2px rgba(28, 25, 22, 0.04);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.tx-card:hover {
  transform: translateY(-4px);
  border-color: rgba(28, 25, 22, 0.18);
  box-shadow: 0 26px 50px -30px rgba(28, 25, 22, 0.30);
}
.tx-card .tx-fi { border-radius: 0; }
.tx-card-body { display: flex; flex-direction: column; flex: 1; padding: 24px 26px 22px; }
.tx-tag {
  align-self: flex-start;
  font-family: var(--sans);
  font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--accent); background: var(--accent-soft);
  padding: 5px 11px; border-radius: 999px; margin-bottom: 15px;
}
.tx-card h2 {
  font-family: var(--serif);
  font-weight: 500; font-size: 25px; line-height: 1.2; letter-spacing: -0.015em;
  margin: 0 0 11px;
}
.tx-card p { color: var(--muted); font-family: var(--sans); font-size: 14.5px; line-height: 1.6; margin: 0 0 20px; }
.tx-card-foot {
  margin-top: auto; display: flex; align-items: center; justify-content: space-between;
  font-family: var(--sans); font-size: 13px; color: var(--muted-2);
  border-top: 1px solid var(--line-soft); padding-top: 15px;
}
.tx-card-foot .read { color: var(--accent); font-weight: 600; }

/* ---------- article ---------- */
.tx-article { max-width: var(--readw); margin: 0 auto; padding: 8px 0 20px; }
.tx-article-head { padding: 22px 0 8px; }
.tx-article-head h1 {
  font-family: var(--serif);
  font-weight: 500; font-size: clamp(33px, 5.2vw, 52px); line-height: 1.08;
  letter-spacing: -0.02em; margin: 14px 0 18px;
}
.tx-meta { display: flex; flex-wrap: wrap; gap: 16px; font-family: var(--sans); font-size: 13.5px; color: var(--muted-2); }
.tx-meta strong { color: var(--ink); font-weight: 600; }

/* article hero cover — wider band above the prose */
.tx-hero-fi { margin: 26px 0 4px; aspect-ratio: 2.4 / 1; border-radius: 16px; }
.tx-hero-fi .tx-fi-label { font-size: clamp(24px, 4vw, 40px); }
.tx-figcap { font-family: var(--sans); font-size: 12.5px; color: var(--muted-2); margin: 10px 2px 0; }

.tx-prose { font-size: 19px; line-height: 1.8; color: #2a2825; padding-top: 30px; }
.tx-prose > p { margin: 0 0 24px; }
.tx-prose > p:first-of-type { font-size: 21px; line-height: 1.7; color: var(--ink); }  /* lede */
.tx-prose h2 {
  font-family: var(--serif);
  font-weight: 500; font-size: 30px; line-height: 1.22; letter-spacing: -0.015em;
  color: var(--ink); margin: 48px 0 16px;
}
.tx-prose h3 { font-family: var(--serif); font-size: 23px; font-weight: 600; color: var(--ink); margin: 34px 0 12px; }
.tx-prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(194, 65, 12, 0.35); }
.tx-prose a:hover { color: var(--accent-ink); text-decoration-color: var(--accent); }
.tx-prose ul, .tx-prose ol { margin: 0 0 24px; padding-left: 24px; }
.tx-prose li { margin: 0 0 11px; }
.tx-prose li::marker { color: var(--accent); }
.tx-prose strong { color: var(--ink); font-weight: 700; }
.tx-prose blockquote {
  margin: 32px 0; padding: 4px 0 4px 24px; border-left: 3px solid var(--accent);
  color: var(--ink); font-size: 23px; line-height: 1.5; font-style: italic; font-weight: 500;
}
.tx-prose code {
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: 0.84em;
  background: var(--bg-soft); border: 1px solid var(--line-soft); padding: 2px 7px; border-radius: 6px; color: var(--accent-ink);
}
.tx-prose pre {
  background: #1c1b19; color: #ece9e3; border-radius: 12px;
  padding: 18px 20px; overflow-x: auto; margin: 0 0 24px;
}
.tx-prose pre code { background: none; border: none; padding: 0; color: inherit; font-size: 14px; line-height: 1.6; }
.tx-prose img, .tx-prose figure { border-radius: 14px; margin: 30px 0; }
.tx-prose figcaption { font-family: var(--sans); font-size: 13px; color: var(--muted-2); text-align: center; margin-top: 9px; }
.tx-prose hr { border: none; border-top: 1px solid var(--line); margin: 44px 0; }

/* a clean "key takeaways" callout for skimmers */
.tx-callout {
  margin: 30px 0; padding: 22px 24px; background: var(--bg-soft);
  border: 1px solid var(--line); border-radius: 14px;
}
.tx-callout p { margin: 0 0 8px; font-family: var(--sans); font-size: 13px; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted-2); }
.tx-callout ul { margin: 0; padding-left: 20px; }
.tx-callout li { font-size: 17px; margin: 0 0 8px; }

/* ---------- end-of-post CTA ---------- */
.tx-cta-box {
  margin: 52px 0 8px; padding: 32px 30px;
  background: linear-gradient(135deg, var(--accent-soft), rgba(28, 25, 22, 0.04));
  border: 1px solid var(--line); border-radius: 20px;
}
.tx-cta-box h3 {
  font-family: var(--serif); font-weight: 600; font-size: 26px; margin: 0 0 10px; color: var(--ink);
}
.tx-cta-box p { color: var(--muted); font-family: var(--sans); margin: 0 0 20px; font-size: 15.5px; }
.tx-btns { display: flex; flex-wrap: wrap; gap: 12px; }
.tx-btn {
  font-family: var(--sans); display: inline-block; padding: 13px 22px; border-radius: 999px;
  font-weight: 600; font-size: 14px; transition: transform 0.15s ease;
}
.tx-btn:hover { transform: translateY(-1px); }
.tx-btn-primary { background: var(--accent); color: #fff; }
.tx-btn-ghost { color: var(--ink); border: 1px solid var(--line); }

/* ---------- author / footer ---------- */
.tx-author {
  display: flex; align-items: center; gap: 14px; margin-top: 44px;
  padding-top: 26px; border-top: 1px solid var(--line);
}
.tx-author-av {
  width: 48px; height: 48px; border-radius: 50%; flex: none;
  background: linear-gradient(135deg, var(--accent), #f59e0b);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--sans); font-weight: 700; color: #fff;
}
.tx-author-name { font-family: var(--sans); font-weight: 600; }
.tx-author-role { font-family: var(--sans); font-size: 13px; color: var(--muted-2); }

.tx-foot {
  margin-top: 72px; border-top: 1px solid var(--line);
  background: var(--bg-soft);
}
.tx-foot-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 40px 24px;
  display: flex; flex-wrap: wrap; gap: 22px; justify-content: space-between; align-items: center;
}
.tx-foot a { color: var(--muted); font-family: var(--sans); font-size: 14px; }
.tx-foot a:hover { color: var(--ink); }
.tx-foot-links { display: flex; flex-wrap: wrap; gap: 20px; }
.tx-foot-copy { font-family: var(--sans); font-size: 13px; color: var(--muted-2); }

@media (max-width: 640px) {
  body { font-size: 18px; }
  .tx-bar-nav { display: none; }
  .tx-grid { grid-template-columns: 1fr; gap: 24px; }
  .tx-prose { font-size: 18px; }
  .tx-prose > p:first-of-type { font-size: 19.5px; }
  .tx-hero-fi { aspect-ratio: 16 / 10; }
}
