/* Trenziq Blog — shared stylesheet (theme parity with main site) */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #050c18; --bg2: #060e1c; --bg3: #0a1628;
  --primary: #00c8ff; --secondary: #00e5a0; --accent: #0055ee;
  --text: #e2eeff; --text-dim: #8899bb; --text-muted: #4a6080;
  --border: rgba(0,200,255,0.1); --border-h: rgba(0,200,255,0.28);
  --card: rgba(8,18,36,0.85);
  --nav-bg: rgba(5,12,24,.85); --nav-bg-scrolled: rgba(5,12,24,.97);
  --shadow-card: 0 24px 64px rgba(0,0,0,.45);
  --code-bg: rgba(0,200,255,.07);
  --r: 16px; --rs: 10px;
  --fb: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --fd: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
}
:root[data-theme="light"] {
  --bg: #f6f9ff; --bg2: #ffffff; --bg3: #eef3fb;
  --primary: #0066cc; --secondary: #00a070; --accent: #0044bb;
  --text: #0a1628; --text-dim: #455367; --text-muted: #6a7891;
  --border: rgba(0,85,238,0.14); --border-h: rgba(0,85,238,0.35);
  --card: rgba(255,255,255,0.92);
  --nav-bg: rgba(255,255,255,.85); --nav-bg-scrolled: rgba(255,255,255,.96);
  --shadow-card: 0 18px 48px rgba(20,40,90,.12);
  --code-bg: rgba(0,85,238,.07);
}
html { scroll-behavior: smooth; }
body {
  background: var(--bg); color: var(--text); font-family: var(--fb); line-height: 1.7;
  overflow-x: hidden; transition: background .3s, color .3s;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--secondary); }

/* NAV */
nav.tnav {
  position: sticky; top: 0; z-index: 100; height: 64px; padding: 0 24px;
  display: flex; align-items: center; gap: 20px;
  background: var(--nav-bg); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.tnav .logo { display: flex; align-items: center; gap: 10px; }
.tnav .logo img { width: 30px; height: 30px; border-radius: 8px; }
.tnav .brand {
  font-family: var(--fd); font-size: 19px; font-weight: 700;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.tnav .spacer { flex: 1; }
.tnav .links { display: flex; gap: 22px; align-items: center; }
.tnav .links a { color: var(--text-dim); font-size: 14px; font-weight: 500; }
.tnav .links a:hover { color: var(--text); }
.tnav .links a.active { color: var(--text); }
.tnav .theme-toggle {
  width: 36px; height: 36px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(0,200,255,.06); border: 1px solid var(--border); color: var(--text);
  cursor: pointer; padding: 0; transition: background .25s, border-color .25s, transform .25s;
}
.tnav .theme-toggle:hover { background: rgba(0,200,255,.12); border-color: var(--border-h); transform: rotate(15deg); }
.tnav .theme-toggle svg { width: 16px; height: 16px; }
.tnav .theme-toggle .sun { display: none; }
:root[data-theme="light"] .tnav .theme-toggle .sun { display: block; }
:root[data-theme="light"] .tnav .theme-toggle .moon { display: none; }
.tnav .cta {
  background: linear-gradient(135deg, var(--accent), var(--primary)); color: #fff !important;
  padding: 8px 18px; border-radius: 50px; font-weight: 600; font-size: 13px;
  box-shadow: 0 0 18px rgba(0,85,238,.3);
}
@media (max-width: 720px) {
  .tnav .links a:not(.cta) { display: none; }
}

/* HERO / PAGE HEADER */
.page-hero {
  padding: 64px 24px 28px; max-width: 820px; margin: 0 auto;
  position: relative;
}
.page-hero::before {
  content:''; position: absolute; top: -40px; left: 50%; transform: translateX(-50%);
  width: 600px; height: 280px; pointer-events: none; z-index: -1;
  background: radial-gradient(ellipse, rgba(0,85,238,.16), transparent 70%);
  filter: blur(40px);
}
.crumbs { font-size: 12px; color: var(--text-muted); margin-bottom: 18px; letter-spacing: .04em; }
.crumbs a { color: var(--text-dim); }
.crumbs .sep { margin: 0 8px; color: var(--text-muted); }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(0,200,255,.08); border: 1px solid rgba(0,200,255,.22);
  padding: 6px 14px; border-radius: 50px;
  font-size: 12px; color: var(--primary); font-weight: 600; letter-spacing: .04em;
  margin-bottom: 18px; text-transform: uppercase;
}
h1.title {
  font-family: var(--fd); font-size: clamp(30px, 5vw, 46px);
  font-weight: 800; line-height: 1.15; letter-spacing: -.02em;
  margin-bottom: 20px;
}
h1.title .gt {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.dek { font-size: 18px; color: var(--text-dim); line-height: 1.65; margin-bottom: 28px; }

.byline {
  display: flex; align-items: center; gap: 14px; padding: 16px 0;
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  margin-bottom: 8px; flex-wrap: wrap;
}
.byline .avatar {
  width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--accent), var(--secondary));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-family: var(--fd); font-weight: 700; font-size: 16px;
}
.byline .meta { display: flex; flex-direction: column; min-width: 0; }
.byline .name { font-size: 14px; font-weight: 700; color: var(--text); }
.byline .name a { color: inherit; border-bottom: 1px dotted var(--text-muted); }
.byline .name a:hover { color: var(--primary); border-color: var(--primary); }
.byline .info { font-size: 12px; color: var(--text-muted); }
.byline .info span + span::before { content: '·'; margin: 0 8px; color: var(--text-muted); }

/* ARTICLE BODY */
article.post {
  max-width: 760px; margin: 0 auto; padding: 28px 24px 56px;
  font-size: 17px;
}
article.post h2 {
  font-family: var(--fd); font-size: clamp(22px, 3vw, 28px); font-weight: 700;
  line-height: 1.25; margin: 48px 0 14px; letter-spacing: -.015em;
  scroll-margin-top: 80px;
}
article.post h3 {
  font-family: var(--fd); font-size: 19px; font-weight: 700;
  margin: 32px 0 10px; color: var(--text);
}
article.post p { margin-bottom: 18px; color: var(--text); }
article.post ul, article.post ol { margin: 8px 0 22px 22px; }
article.post li { margin-bottom: 8px; color: var(--text); }
article.post strong { color: var(--text); font-weight: 700; }
article.post em { color: var(--text-dim); }
article.post a { border-bottom: 1px solid rgba(0,200,255,.3); padding-bottom: 1px; }
article.post a:hover { border-color: var(--secondary); }
article.post code {
  background: var(--code-bg); padding: 2px 7px; border-radius: 5px;
  font-size: 14px; color: var(--primary);
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  border: 1px solid var(--border);
}
article.post blockquote {
  margin: 24px 0; padding: 18px 22px;
  background: var(--card); border-left: 3px solid var(--primary); border-radius: 0 10px 10px 0;
  font-size: 16px; color: var(--text-dim); font-style: italic;
}
article.post .callout {
  margin: 28px 0; padding: 20px 24px; border-radius: var(--r);
  background: var(--card); border: 1px solid var(--border);
  display: flex; gap: 16px; align-items: flex-start;
}
article.post .callout .ico { font-size: 22px; flex-shrink: 0; }
article.post .callout h4 {
  font-family: var(--fd); font-size: 15px; font-weight: 700;
  color: var(--primary); margin-bottom: 6px;
}
article.post .callout p:last-child { margin-bottom: 0; font-size: 15px; color: var(--text-dim); }
article.post hr {
  border: none; border-top: 1px solid var(--border); margin: 40px 0;
}
article.post table {
  width: 100%; border-collapse: collapse; margin: 18px 0 26px;
  font-size: 14px; border: 1px solid var(--border); border-radius: 10px; overflow: hidden;
}
article.post th, article.post td {
  padding: 10px 14px; text-align: left;
  border-bottom: 1px solid var(--border);
}
article.post th {
  background: rgba(0,200,255,.05); font-weight: 700; color: var(--primary);
  font-size: 13px; letter-spacing: .03em; text-transform: uppercase;
}
article.post tr:last-child td { border-bottom: none; }

/* RELATED / NETWORK */
.related {
  max-width: 1000px; margin: 0 auto; padding: 16px 24px 64px;
}
.related h3 {
  font-family: var(--fd); font-size: 13px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .14em;
  color: var(--primary); margin-bottom: 16px;
}
.rel-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
}
@media (max-width: 820px) { .rel-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .rel-grid { grid-template-columns: 1fr; } }
.rel-card {
  display: block; padding: 22px; border-radius: var(--r);
  background: var(--card); border: 1px solid var(--border); color: var(--text);
  transition: transform .3s, border-color .3s, box-shadow .3s;
}
.rel-card:hover {
  transform: translateY(-4px); border-color: var(--border-h);
  box-shadow: var(--shadow-card); color: var(--text);
}
.rel-card .tag {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .1em; color: var(--secondary); margin-bottom: 8px; display: block;
}
.rel-card .t {
  font-family: var(--fd); font-size: 16px; font-weight: 700;
  line-height: 1.3; margin-bottom: 8px; color: var(--text);
}
.rel-card .d { font-size: 13px; color: var(--text-muted); line-height: 1.55; }

/* NETWORK / PARTNERS STRIP */
.network {
  max-width: 1000px; margin: 0 auto 32px; padding: 28px 24px;
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.network h4 {
  font-family: var(--fd); font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .14em;
  color: var(--text-dim); margin-bottom: 16px; text-align: center;
}
.partner-grid {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px;
}
@media (max-width: 820px) { .partner-grid { grid-template-columns: repeat(2, 1fr); } }
.partner {
  display: block; padding: 14px 16px; border-radius: 12px;
  background: var(--card); border: 1px solid var(--border);
  text-align: center; transition: border-color .25s, transform .25s;
}
.partner:hover { border-color: var(--border-h); transform: translateY(-2px); }
.partner .ph {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .1em; color: var(--primary); margin-bottom: 4px;
}
.partner .pn { font-size: 14px; font-weight: 600; color: var(--text); }

/* FOOTER */
footer.tfoot {
  background: var(--bg2); border-top: 1px solid var(--border);
  padding: 48px 24px 28px; margin-top: 32px;
}
.tfoot-inner { max-width: 1000px; margin: 0 auto; }
.tfoot-row {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 28px; flex-wrap: wrap; margin-bottom: 32px;
}
.tfoot-brand { max-width: 280px; }
.tfoot-brand .logo { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.tfoot-brand .logo img { width: 30px; height: 30px; border-radius: 7px; }
.tfoot-brand .logo span {
  font-family: var(--fd); font-size: 17px; font-weight: 700;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.tfoot-brand p { font-size: 13px; color: var(--text-muted); line-height: 1.65; }
.tfoot-cols { display: flex; gap: 56px; flex-wrap: wrap; }
.tfoot-col h5 {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .1em; color: var(--text-dim); margin-bottom: 14px;
}
.tfoot-col ul { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.tfoot-col a { color: var(--text-muted); font-size: 13px; }
.tfoot-col a:hover { color: var(--text); }
.tfoot-bottom {
  border-top: 1px solid var(--border); padding-top: 20px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  font-size: 12px; color: var(--text-muted);
}
.tfoot-bottom a { color: var(--text-muted); }
.tfoot-bottom a:hover { color: var(--text); }

/* BLOG INDEX */
.blog-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 22px; max-width: 1100px; margin: 0 auto; padding: 28px 24px 64px;
}
@media (max-width: 920px) { .blog-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .blog-grid { grid-template-columns: 1fr; } }
.blog-card {
  display: flex; flex-direction: column; padding: 26px;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--r);
  color: var(--text); transition: transform .3s, border-color .3s, box-shadow .3s;
  position: relative; overflow: hidden;
}
.blog-card::after {
  content:''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent); opacity: 0; transition: opacity .3s;
}
.blog-card:hover {
  transform: translateY(-5px); border-color: var(--border-h);
  box-shadow: var(--shadow-card); color: var(--text);
}
.blog-card:hover::after { opacity: 1; }
.blog-card .cat {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .1em; color: var(--secondary); margin-bottom: 12px;
}
.blog-card .t {
  font-family: var(--fd); font-size: 19px; font-weight: 700;
  line-height: 1.3; margin-bottom: 10px; color: var(--text);
}
.blog-card .d {
  font-size: 14px; color: var(--text-muted); line-height: 1.6; flex: 1;
}
.blog-card .read {
  margin-top: 18px; font-size: 13px; font-weight: 600; color: var(--primary);
  display: inline-flex; align-items: center; gap: 6px;
}

/* REVEAL */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }

/* SCROLLBAR */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: rgba(0,200,255,.18); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0,200,255,.36); }
