/* ── VARIABLES & RESET ── */
:root {
  --bg:      #080b10;
  --bg2:     #0d1017;
  --bg3:     #131820;
  --bg4:     #1a2232;
  --border:  #1c2438;
  --border2: #263048;
  --accent:  #00d4ff;
  --accent2: #7c3aed;
  --accent3: #10b981;
  --accent4: #f59e0b;
  --text:    #e2e8f0;
  --text2:   #94a3b8;
  --text3:   #4a5568;
  --mono:    'JetBrains Mono', monospace;
  --display: 'Outfit', sans-serif;
  --body:    'Inter', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  overflow-x: hidden;
}
::-webkit-scrollbar { width: 3px; }
::-webkit-scrollbar-thumb { background: var(--accent2); }

/* ── NAV ── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 1.1rem 4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(8,11,16,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.logo {
  font-family: var(--mono);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  letter-spacing: 0.05em;
}
.logo span       { color: var(--accent); }
.logo span.dim   { color: var(--text3); font-weight: 400; }

.nav-back {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--text2);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transition: color 0.2s;
}
.nav-back:hover { color: var(--accent); }

/* ── ARTICLE HERO ── */
.article-hero {
  max-width: 800px;
  margin: 0 auto;
  padding: 8rem 2rem 3rem;
}

.article-tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.6rem;
  padding: 0.2rem 0.6rem;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border: 1px solid;
  margin-bottom: 1.5rem;
}
.tag-quality    { color: var(--accent3); border-color: rgba(16,185,129,0.3);  background: rgba(16,185,129,0.08); }
.tag-cicd       { color: var(--accent4); border-color: rgba(245,158,11,0.3);  background: rgba(245,158,11,0.08); }
.tag-playwright { color: var(--accent);  border-color: rgba(0,212,255,0.3);   background: rgba(0,212,255,0.08); }
.tag-testing    { color: #fb7185;        border-color: rgba(244,63,94,0.3);   background: rgba(244,63,94,0.08); }
.tag-ai         { color: #a78bfa;        border-color: rgba(124,58,237,0.3);  background: rgba(124,58,237,0.08); }

.article-hero h1 {
  font-family: var(--display);
  font-size: 2.4rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 2rem;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.meta-author {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.meta-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent2), var(--accent));
  display: flex; align-items: center; justify-content: center;
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.85rem;
  color: #fff;
}

.meta-name {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text);
}

.meta-role {
  font-family: var(--mono);
  font-size: 0.6rem;
  color: var(--text3);
}

.meta-sep  { color: var(--border2); }
.meta-author, .meta-author + .meta-sep { display: none; }
.meta-date { font-family: var(--mono); font-size: 0.65rem; color: var(--text3); }
.meta-read { font-family: var(--mono); font-size: 0.65rem; color: var(--text3); }

/* ── ARTICLE BODY ── */
.article-body {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 2rem 5rem;
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--text2);
}

.article-body h2 {
  font-family: var(--display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  margin: 3rem 0 1rem;
  letter-spacing: -0.01em;
}

.article-body h3 {
  font-family: var(--display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  margin: 2rem 0 0.75rem;
}

.article-body p { margin-bottom: 1.4rem; }

.article-body strong { color: var(--text); font-weight: 600; }

.article-body a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(0,212,255,0.3);
  transition: border-color 0.2s;
}
.article-body a:hover { border-color: var(--accent); }

.article-body ul,
.article-body ol {
  padding-left: 1.5rem;
  margin-bottom: 1.4rem;
}
.article-body li { margin-bottom: 0.5rem; }

.article-body code {
  font-family: var(--mono);
  font-size: 0.85em;
  background: var(--bg3);
  border: 1px solid var(--border);
  padding: 0.15em 0.4em;
  border-radius: 3px;
  color: var(--accent3);
}

.article-body pre {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  overflow-x: auto;
  margin: 1.75rem 0;
}
.article-body pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.875rem;
  color: var(--text);
}

/* ── CALLOUT ── */
.callout {
  border-left: 3px solid var(--accent);
  padding: 1rem 1.25rem;
  margin: 1.75rem 0;
  background: rgba(0,212,255,0.05);
  border-radius: 0 6px 6px 0;
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.7;
}
.callout.purple {
  border-color: var(--accent2);
  background: rgba(124,58,237,0.07);
}
.callout.green {
  border-color: var(--accent3);
  background: rgba(16,185,129,0.06);
}

/* ── KEY TAKEAWAYS ── */
.key-takeaways {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.5rem 1.75rem;
  margin-top: 2rem;
}
.key-takeaways h3 {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.key-takeaways ul {
  padding-left: 1.25rem;
  margin-bottom: 0;
}
.key-takeaways li {
  color: var(--text2);
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}

/* ── DIVIDER ── */
hr.article-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2.5rem 0;
}

/* ── ARTICLE NAV (prev / next) ── */
.article-nav {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 2rem 4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 1rem;
}
.article-nav a {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--text2);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: color 0.2s;
}
.article-nav a:hover { color: var(--accent); }

/* ── FOOTER ── */
footer {
  padding: 2.5rem 4rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.footer-logo    { font-family: var(--mono); font-size: 0.8rem;  color: var(--text3); }
.footer-copy    { font-family: var(--mono); font-size: 0.65rem; color: var(--text3); }
.footer-tagline { font-size: 0.78rem; color: var(--text3); font-style: italic; }

/* ── RESPONSIVE ── */
@media (max-width: 700px) {
  nav { padding: 1rem 1.25rem; }
  .article-hero { padding: 6rem 1.25rem 2.5rem; }
  .article-hero h1 { font-size: 1.7rem; }
  .article-body { padding: 0 1.25rem 4rem; font-size: 1rem; }
  .article-nav  { padding: 1.5rem 1.25rem 3rem; }
  footer { flex-direction: column; gap: 1rem; text-align: center; padding: 2rem 1.25rem; }
}
