/* ===========================================================================
   Splitwin Blog — shared styles (used by /blog/index.html and every post)
   Brand: Outfit font, purple accent, bold black borders + hard shadows.
   =========================================================================== */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #f3f4f8;
  --panel: #ffffff;
  --ink: #121212;
  --muted: #6b6b6b;
  --accent: #7c3aed;
}

html { scroll-behavior: smooth; }
body {
  font-family: 'Outfit', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── Header ──────────────────────────────────────────────────────────────── */
.blog-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #ffffff;
  border-bottom: 4px solid var(--ink);
}
.blog-header-inner {
  max-width: 820px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.blog-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
}
.blog-logo {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  border: 2.5px solid var(--ink);
  box-shadow: 2px 2px 0 var(--ink);
  object-fit: contain;
}
.blog-brand-name {
  font-size: 19px;
  font-weight: 900;
  letter-spacing: -0.4px;
}
.blog-brand-name b { color: var(--accent); font-weight: 900; }
.blog-nav-link {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
}

.blog-language-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.blog-language-nav a {
  min-width: 34px;
  padding: 6px 8px;
  border: 2px solid var(--ink);
  border-radius: 7px;
  color: var(--ink);
  background: #ffffff;
  text-align: center;
  text-decoration: none;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}

.blog-language-nav a:hover,
.blog-language-nav a:focus-visible {
  background: var(--soft);
}

.blog-language-nav a[aria-current="page"] {
  color: #ffffff;
  background: var(--accent);
}
.blog-nav-link:hover { color: var(--ink); }

/* ── Layout ──────────────────────────────────────────────────────────────── */
.blog-wrap {
  max-width: 820px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}
.blog-title {
  font-size: clamp(34px, 7vw, 52px);
  font-weight: 900;
  letter-spacing: -1.5px;
  line-height: 1.05;
}
.blog-title b { color: var(--accent); font-weight: 900; }
.blog-intro {
  margin-top: 14px;
  font-size: 17px;
  color: var(--muted);
  font-weight: 600;
  max-width: 560px;
}

/* ── Post list (the collection) ──────────────────────────────────────────── */
.post-list {
  margin-top: 40px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.post-card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: var(--panel);
  border: 2.5px solid var(--ink);
  border-radius: 16px;
  box-shadow: 5px 5px 0 var(--ink);
  padding: 0;
  overflow: hidden;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.post-card:hover {
  transform: translate(-2px, -2px);
  box-shadow: 7px 7px 0 var(--ink);
}
.post-card-image {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: 0;
  border-bottom: 2.5px solid var(--ink);
}
.post-card-content {
  padding: 22px 24px;
}
.post-meta {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--accent);
}
.post-card-title {
  margin-top: 8px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.4px;
}
.post-excerpt {
  margin-top: 8px;
  color: var(--muted);
  font-weight: 500;
}

/* ── Empty state (shown until the first post exists) ─────────────────────── */
.blog-empty {
  margin-top: 40px;
  text-align: center;
  padding: 56px 24px;
  background: var(--panel);
  border: 2.5px dashed #cfcfcf;
  border-radius: 16px;
}
.blog-empty h2 { font-size: 22px; font-weight: 800; }
.blog-empty p { margin-top: 8px; color: var(--muted); font-weight: 600; }

/* ── Single article ──────────────────────────────────────────────────────── */
.post-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 24px;
  font-weight: 800;
  color: var(--accent);
  text-decoration: none;
}
.post-article {
  background: var(--panel);
  border: 2.5px solid var(--ink);
  border-radius: 18px;
  box-shadow: 6px 6px 0 var(--ink);
  padding: 40px clamp(22px, 5vw, 56px);
}
.post-article h1 {
  margin-top: 10px;
  font-size: clamp(28px, 6vw, 42px);
  font-weight: 900;
  letter-spacing: -1px;
  line-height: 1.1;
}
.post-hero {
  margin: 28px 0 0;
}
.post-hero img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: 2.5px solid var(--ink);
  border-radius: 14px;
}
.post-body { margin-top: 26px; font-size: 17px; }
.post-body h2 { margin: 32px 0 12px; font-size: 26px; font-weight: 800; letter-spacing: -0.5px; }
.post-body h3 { margin: 24px 0 10px; font-size: 20px; font-weight: 800; }
.post-body p { margin: 14px 0; color: #2b2b2b; }
.post-body ul, .post-body ol { margin: 14px 0 14px 22px; }
.post-body li { margin: 6px 0; }
.post-body a { color: var(--accent); font-weight: 700; }
.post-body blockquote {
  margin: 20px 0;
  padding: 12px 20px;
  border-left: 4px solid var(--accent);
  background: #faf7ff;
  color: #3b3b3b;
  font-weight: 600;
}
.post-body img {
  max-width: 100%;
  border-radius: 12px;
  border: 2px solid var(--ink);
  margin: 20px 0;
}
.post-body figure { margin: 22px 0; }
.post-body figcaption {
  margin-top: -8px;
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
  text-align: center;
}
.post-body .table-scroll { overflow-x: auto; margin: 22px 0; }
.post-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  min-width: 560px;
}
.post-body th,
.post-body td {
  border: 1.5px solid #e6e6e6;
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}
.post-body thead th {
  background: #f4f1fb;
  font-weight: 800;
  color: var(--ink);
}
.post-body tbody td:first-child { font-weight: 700; }
.post-cta-badges {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin: 26px 0 4px;
}
.post-cta-badges img { height: 48px; width: auto; border: none; border-radius: 0; margin: 0; }

/* Closing call-to-action block (sits below the article) */
.post-cta {
  margin-top: 40px;
  background: var(--accent);
  border: 2.5px solid var(--ink);
  border-radius: 18px;
  box-shadow: 6px 6px 0 var(--ink);
  padding: 44px 28px;
  text-align: center;
  color: #ffffff;
}
.post-cta h2 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(26px, 5vw, 38px);
  font-weight: 900;
  letter-spacing: -0.8px;
  text-transform: uppercase;
}
.post-cta p {
  margin: 14px auto 0;
  max-width: 540px;
  color: rgba(255, 255, 255, 0.92);
  font-weight: 600;
}
.post-cta .post-cta-badges {
  justify-content: center;
  margin: 26px 0 0;
}

/* ── Footer ──────────────────────────────────────────────────────────────── */
.blog-footer {
  border-top: 2px solid #e5e5e5;
  margin-top: 56px;
  padding: 28px 24px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}
.blog-footer a { color: var(--muted); text-decoration: none; font-weight: 700; }
.blog-footer a:hover { color: var(--ink); }

@media (max-width: 640px) {
  .blog-header-inner {
    flex-wrap: wrap;
    gap: 10px;
  }

  .blog-language-nav {
    order: 3;
    width: 100%;
    justify-content: flex-end;
  }
}
