/* ─────────────────────────────────────────────────────────────────────────
   Pinguro Blog — standalone stylesheet
   Dark editorial layout, Geist body, violet accent.
   No dependency on the landing or dashboard CSS.
   ───────────────────────────────────────────────────────────────────────── */

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

:root {
  --main-bg: #09090b;
  --surface: #111113;
  --surface-2: #18181b;
  --surface-hover: #1f1f23;

  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --border-soft: rgba(255, 255, 255, 0.05);

  --text: #fafafa;
  --text-soft: #d4d4d8;
  --muted: #a1a1aa;
  --muted-soft: #71717a;

  --violet: #8b5cf6;
  --violet-hover: #7c3aed;
  --violet-soft: rgba(139, 92, 246, 0.15);
  --violet-glow: rgba(139, 92, 246, 0.35);
  --cyan: #22d3ee;
  --green: #22c55e;
  --amber: #f59e0b;
  --rose: #fb7185;

  --font: 'Geist', -apple-system, system-ui, sans-serif;
  --font-mono: 'Geist Mono', ui-monospace, monospace;

  --radius: 12px;
  --radius-sm: 8px;
  --max-w: 1180px;
  --read-w: 720px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color-scheme: dark;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--main-bg);
  color: var(--text);
  letter-spacing: -0.011em;
  font-feature-settings: 'ss01', 'cv11';
  position: relative;
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.5;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 70% 55% at 80% -10%, rgba(139, 92, 246, 0.12), transparent 60%),
    radial-gradient(ellipse 50% 40% at 0% 100%, rgba(34, 211, 238, 0.04), transparent 60%);
}

body > * { position: relative; z-index: 1; }

::selection { background: var(--violet-soft); color: var(--text); }

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

/* ───────────────────────── Nav ───────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  background: rgba(9, 9, 11, 0.65);
  border-bottom: 1px solid var(--border-soft);
}

.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 600;
  font-size: 16px;
  letter-spacing: -0.02em;
  color: var(--text);
}

.logo-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--violet);
  box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.18), 0 0 14px var(--violet-glow);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link {
  padding: 8px 12px;
  font-size: 14px;
  color: var(--muted);
  border-radius: 8px;
  transition: color 0.18s var(--ease), background 0.18s var(--ease);
}

.nav-link:hover { color: var(--text); background: var(--surface); }
.nav-link.is-active { color: var(--text); background: var(--surface); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.18s var(--ease), border-color 0.18s var(--ease),
              transform 0.12s var(--ease), box-shadow 0.18s var(--ease), color 0.18s var(--ease);
  white-space: nowrap;
}

.btn-ghost {
  background: transparent;
  color: var(--text-soft);
  border-color: var(--border);
}
.btn-ghost:hover { background: var(--surface); border-color: var(--border-strong); color: var(--text); }

.btn-primary {
  background: var(--violet);
  color: #fff;
  border-color: var(--violet);
  box-shadow: 0 4px 22px -8px var(--violet-glow);
}
.btn-primary:hover { background: var(--violet-hover); border-color: var(--violet-hover); transform: translateY(-1px); }

.btn-lg { padding: 13px 22px; font-size: 15px; }

/* ───────────────────────── Page wrapper ───────────────────────── */
.page {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 72px 24px 96px;
}

.page-narrow {
  max-width: calc(var(--read-w) + 48px);
  margin: 0 auto;
  padding: 56px 24px 96px;
}

/* ───────────────────────── Index header ───────────────────────── */
.blog-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.blog-eyebrow .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--violet);
  box-shadow: 0 0 8px var(--violet-glow);
}

.blog-title {
  margin-top: 18px;
  font-size: clamp(38px, 6vw, 64px);
  line-height: 1.04;
  letter-spacing: -0.035em;
  font-weight: 600;
  max-width: 18ch;
}

.blog-title .accent { color: var(--violet); }

.blog-sub {
  margin-top: 18px;
  max-width: 60ch;
  font-size: 17px;
  line-height: 1.6;
  color: var(--muted);
}

.blog-divider {
  margin: 56px 0 32px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-strong), transparent);
}

.blog-section-eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted-soft);
  margin-bottom: 24px;
}

/* ───────────────────────── Article cards (index) ───────────────────────── */
.articles-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

@media (min-width: 760px) {
  .articles-grid { grid-template-columns: repeat(2, 1fr); }
  .article-card.is-feature { grid-column: 1 / -1; }
}

.article-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease), transform 0.2s var(--ease);
  overflow: hidden;
}

.article-card::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse 80% 60% at 100% 0%, rgba(139, 92, 246, 0.08), transparent 60%);
  opacity: 0;
  transition: opacity 0.25s var(--ease);
}

.article-card:hover {
  border-color: var(--border-strong);
  background: var(--surface-2);
  transform: translateY(-2px);
}
.article-card:hover::after { opacity: 1; }

.article-card.is-feature {
  padding: 36px;
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
}

.article-meta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--muted-soft);
  margin-bottom: 16px;
}

.article-meta .sep {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--muted-soft);
}

.article-card h2 {
  font-size: 22px;
  line-height: 1.25;
  letter-spacing: -0.02em;
  font-weight: 600;
  color: var(--text);
}

.article-card.is-feature h2 {
  font-size: 30px;
  line-height: 1.18;
  max-width: 22ch;
}

.article-card h2 a { color: inherit; }

.article-card p {
  margin-top: 12px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

.article-tags {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.article-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  background: rgba(139, 92, 246, 0.08);
  border: 1px solid rgba(139, 92, 246, 0.22);
  color: #c4b5fd;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.article-card-link {
  margin-top: 22px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--violet);
  font-weight: 500;
}

.article-card-link::after {
  content: '→';
  transition: transform 0.18s var(--ease);
}

.article-card:hover .article-card-link::after { transform: translateX(3px); }

/* "À venir" placeholder cards */
.article-card.is-upcoming {
  background: transparent;
  border-style: dashed;
  border-color: var(--border);
}

.article-card.is-upcoming h3 {
  font-size: 17px;
  font-weight: 500;
  color: var(--text-soft);
  letter-spacing: -0.015em;
}

.article-card.is-upcoming p {
  font-size: 14px;
  color: var(--muted-soft);
}

.article-card.is-upcoming .upcoming-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

/* ───────────────────────── Article page ───────────────────────── */
.article {
  max-width: var(--read-w);
  margin: 0 auto;
}

.article-header {
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 40px;
}

.article-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--violet);
}

.article-kicker .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--violet);
  box-shadow: 0 0 8px var(--violet-glow);
}

.article-h1 {
  margin-top: 18px;
  font-size: clamp(34px, 5vw, 48px);
  line-height: 1.08;
  letter-spacing: -0.03em;
  font-weight: 600;
}

.article-lede {
  margin-top: 20px;
  font-size: 19px;
  line-height: 1.55;
  color: var(--text-soft);
  max-width: 60ch;
}

.article-byline {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  font-size: 13px;
  color: var(--muted);
}

.byline-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--violet), var(--cyan));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: -0.02em;
}

.byline-meta { display: flex; align-items: center; gap: 10px; }
.byline-meta .sep { width: 3px; height: 3px; border-radius: 50%; background: var(--muted-soft); }

/* ───────────────────────── Prose (article body) ───────────────────────── */
.prose {
  font-size: 17px;
  line-height: 1.75;
  color: var(--text-soft);
}

.prose > * + * { margin-top: 1.4em; }

.prose h2 {
  margin-top: 2.6em;
  font-size: 28px;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--text);
  font-weight: 600;
  scroll-margin-top: 80px;
}

.prose h2::before {
  content: '';
  display: block;
  width: 36px;
  height: 2px;
  background: var(--violet);
  margin-bottom: 14px;
  border-radius: 2px;
}

.prose h3 {
  margin-top: 2em;
  font-size: 20px;
  line-height: 1.3;
  letter-spacing: -0.015em;
  color: var(--text);
  font-weight: 600;
  scroll-margin-top: 80px;
}

.prose p { color: var(--text-soft); }

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

.prose a:not(.btn) {
  color: var(--violet);
  border-bottom: 1px solid rgba(139, 92, 246, 0.35);
  transition: color 0.15s var(--ease), border-color 0.15s var(--ease);
}
.prose a:not(.btn):hover { color: #a78bfa; border-bottom-color: var(--violet); }

.prose ul, .prose ol {
  padding-left: 1.4em;
  color: var(--text-soft);
}

.prose li { margin-top: 0.5em; }
.prose li::marker { color: var(--violet); }

.prose blockquote {
  margin: 1.8em 0;
  padding: 14px 22px;
  border-left: 3px solid var(--violet);
  background: var(--violet-soft);
  border-radius: 0 8px 8px 0;
  color: var(--text-soft);
  font-style: italic;
}

.prose blockquote p { color: var(--text-soft); }

.prose hr {
  margin: 3em 0;
  border: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-strong), transparent);
}

/* Inline code */
.prose code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  padding: 2px 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 5px;
  color: #e9d5ff;
  letter-spacing: -0.005em;
}

.prose a code { color: inherit; }

/* Code blocks */
.prose pre {
  margin: 1.6em 0;
  padding: 18px 20px;
  background: #0b0b0e;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-soft);
  position: relative;
}

.prose pre::before {
  content: attr(data-lang);
  position: absolute;
  top: 10px;
  right: 14px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted-soft);
  font-family: var(--font);
}

.prose pre code {
  display: block;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  color: inherit;
  font-size: inherit;
}

/* Lightweight syntax tints (no JS, just spans) */
.prose pre .tk-comment { color: var(--muted-soft); font-style: italic; }
.prose pre .tk-string { color: #86efac; }
.prose pre .tk-keyword { color: #c4b5fd; }
.prose pre .tk-fn { color: #93c5fd; }
.prose pre .tk-num { color: #fcd34d; }
.prose pre .tk-punct { color: var(--muted); }

/* ASCII diagrams */
.prose .ascii {
  margin: 1.6em 0;
  padding: 18px 20px;
  background: #0b0b0e;
  border: 1px dashed var(--border-strong);
  border-radius: 12px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
  white-space: pre;
}

/* Note box */
.prose .note {
  margin: 1.8em 0;
  padding: 16px 20px;
  background: rgba(34, 211, 238, 0.06);
  border: 1px solid rgba(34, 211, 238, 0.22);
  border-radius: 10px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.prose .note::before {
  content: 'i';
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--cyan);
  color: #0b0b0e;
  font-weight: 700;
  font-style: italic;
  font-family: var(--font);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
}

.prose .note p { margin: 0; color: var(--text-soft); font-size: 15px; }

/* Tables */
.prose .table-wrap {
  margin: 1.8em 0;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  background: var(--surface);
}

.prose th, .prose td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

.prose thead th {
  background: var(--surface-2);
  color: var(--text);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}

.prose tbody tr:last-child td { border-bottom: 0; }

/* CTA box embedded mid- and end-of-article */
.cta-box {
  margin: 2.8em 0;
  padding: 28px;
  border-radius: 14px;
  background:
    radial-gradient(ellipse 80% 60% at 0% 0%, rgba(139, 92, 246, 0.18), transparent 60%),
    linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid rgba(139, 92, 246, 0.25);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cta-box-eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--violet);
}

.cta-box h3 {
  margin: 0;
  font-size: 22px;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--text);
  font-weight: 600;
}

.cta-box p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

.cta-box .btn {
  align-self: flex-start;
}

/* End-of-article footer */
.article-end {
  margin-top: 64px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 14px;
  color: var(--muted);
}

.article-end a {
  color: var(--violet);
  border-bottom: 1px solid rgba(139, 92, 246, 0.4);
}

/* ───────────────────────── Footer ───────────────────────── */
.footer {
  border-top: 1px solid var(--border);
  margin-top: 80px;
  background: rgba(9, 9, 11, 0.5);
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 28px 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 13px;
  color: var(--muted);
}

.footer-left {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.footer-left .brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--text);
}

.footer-left .sep { color: var(--muted-soft); }

.footer-right {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.footer-right a { color: var(--muted); transition: color 0.15s var(--ease); }
.footer-right a:hover { color: var(--text); }

/* ───────────────────────── Responsive ───────────────────────── */
@media (max-width: 640px) {
  .nav-inner { padding: 12px 18px; gap: 8px; }
  .nav-actions { gap: 2px; }
  .nav-link { padding: 6px 8px; font-size: 13px; }
  .btn { padding: 8px 12px; font-size: 13px; }
  .page { padding: 48px 18px 64px; }
  .page-narrow { padding: 40px 18px 64px; }
  .blog-title { font-size: 36px; }
  .article-h1 { font-size: 32px; }
  .article-lede { font-size: 17px; }
  .prose { font-size: 16px; }
  .prose h2 { font-size: 24px; }
  .prose h3 { font-size: 18px; }
  .prose pre { font-size: 13px; padding: 14px 16px; border-radius: 10px; }
  .article-card.is-feature { padding: 24px; }
  .article-card.is-feature h2 { font-size: 24px; }
  .cta-box { padding: 22px; }
}
