/* ballioz.com blog (/blog/, /blog/tr/). Loaded after portfolio.css and uses its tokens. */

.nav a.link[aria-current="page"] { color: var(--ink); background: var(--sunk); }
@media (max-width: 820px) { .nav a.link[aria-current="page"] { display: inline-block; } }

.lang-switch { display: inline-flex; padding: 3px; border: 1px solid var(--line); border-radius: 10px; margin: 0 4px; }
.lang-switch button {
  font: inherit; font-size: 13px; font-weight: 600; color: var(--ink-3); background: none; border: 0;
  padding: 5px 8px; border-radius: 7px; cursor: pointer; line-height: 1;
}
.lang-switch button[aria-pressed="true"] { background: var(--sunk); color: var(--ink); }
.lang-switch button:hover { color: var(--ink); }

/* Post and index headers */
.post-head { padding-top: 56px; padding-bottom: 8px; max-width: 860px; margin-left: auto; margin-right: auto; }
.post-head.index { max-width: var(--max); padding-bottom: 24px; }
.post-head .back { margin-bottom: 28px; }
.post-head h1 { margin: 0 0 18px; font-size: clamp(34px, 5vw, 56px); letter-spacing: -0.035em; line-height: 1.04; font-weight: 650; text-wrap: balance; }
.post-head .lead { margin: 0; color: var(--ink-2); font-size: clamp(18px, 2vw, 21px); line-height: 1.5; max-width: 60ch; }
.post-head .meta { margin: 22px 0 0; color: var(--ink-3); font-size: 14px; }
.post-head .meta a { color: var(--ink-2); }
.badge { font-style: normal; font-size: 12px; font-weight: 600; color: var(--soon); border: 1px solid currentColor; border-radius: 999px; padding: 1px 8px; margin-left: 4px; }

/* Post list: .post-grid and .post-card live in portfolio.css (the home page uses them too). */
.blog-list { padding-top: 16px; }
.empty { color: var(--ink-2); }

/* Post body */
.post-layout { display: grid; gap: 32px; padding-top: 40px; max-width: 860px; margin-left: auto; margin-right: auto; }
@media (min-width: 1180px) {
  .post-layout { max-width: var(--max); grid-template-columns: 220px minmax(0, 700px); justify-content: center; gap: 64px; }
  .post-head:not(.index) { max-width: calc(220px + 64px + 700px + 2 * var(--pad)); padding-left: calc(220px + 64px + var(--pad)); }
}
.toc { display: none; }
@media (min-width: 1180px) {
  .toc { display: block; }
  .toc nav { position: sticky; top: 100px; }
  .toc b { display: block; font-size: 13px; font-weight: 600; color: var(--ink-3); letter-spacing: 0.02em; margin-bottom: 10px; }
  .toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 14px; }
  .toc a { color: var(--ink-2); text-decoration: none; }
  .toc a:hover { color: var(--ink); }
}

.prose { min-width: 0; max-width: 700px; font-size: 18px; line-height: 1.7; }
.prose > :first-child { margin-top: 0; }
.prose h2 { margin: 48px 0 12px; font-size: clamp(24px, 2.6vw, 30px); letter-spacing: -0.025em; line-height: 1.15; font-weight: 650; scroll-margin-top: 90px; }
.prose h3 { margin: 32px 0 8px; font-size: 20px; font-weight: 650; letter-spacing: -0.01em; }
.prose p, .prose ul, .prose ol { margin: 0 0 18px; color: var(--ink-2); }
.prose strong { color: var(--ink); font-weight: 650; }
.prose a { color: var(--ink); text-decoration-color: var(--ink-3); text-underline-offset: 3px; }
.prose a:hover { text-decoration-color: var(--ink); }
.prose ul, .prose ol { padding-left: 1.2em; }
.prose li { margin-bottom: 6px; }
.prose table { display: block; width: 100%; overflow-x: auto; margin: 0 0 22px; border-collapse: collapse; font-size: 15px; line-height: 1.4; font-variant-numeric: tabular-nums; }
.prose th, .prose td { padding: 8px 12px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; color: var(--ink-2); }
.prose th { color: var(--ink); font-weight: 650; }
.prose li::marker { color: var(--ink-3); }
.prose blockquote { margin: 28px 0; padding-left: 20px; border-left: 2px solid var(--line); }
.prose blockquote p { color: var(--ink); font-style: italic; font-size: 20px; line-height: 1.5; }
.prose code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .88em; background: var(--sunk); padding: 2px 6px; border-radius: 6px; }
.prose figure { margin: 32px 0; }
.prose figure img { border-radius: 16px; border: 1px solid var(--line); }
.prose figcaption { margin-top: 10px; color: var(--ink-3); font-size: 14px; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 40px 0; }

.product-card {
  display: grid; grid-template-columns: 56px 1fr; gap: 16px; align-items: center; margin: 48px 0 0;
  padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); line-height: 1.45;
}
.product-card img { width: 56px; height: 56px; border-radius: 14px; }
.product-card .k { display: block; font-size: 12px; font-weight: 600; color: var(--ink-3); letter-spacing: 0.02em; }
.product-card b { display: block; font-size: 19px; font-weight: 650; }
.product-card p { margin: 2px 0 0; color: var(--ink-2); font-size: 15px; }
.product-card .btn { grid-column: 1 / -1; justify-self: start; }
@media (min-width: 640px) { .product-card { grid-template-columns: 56px 1fr auto; } .product-card .btn { grid-column: auto; } }

.more { margin-top: 56px; padding-top: 32px; border-top: 1px solid var(--line); }
.more h2 { margin: 0 0 16px; font-size: 14px; font-weight: 600; color: var(--ink-3); letter-spacing: 0.02em; }
