/* ─────────────────────────────────────────────
   Notes (blog): same layout and tokens as the CV page (site.css)
   ───────────────────────────────────────────── */

/* Reading progress */
.progress { position: fixed; inset: 0 0 auto; height: 2px; z-index: 30; pointer-events: none; }
.progress span { display: block; height: 100%; background: var(--accent); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); }

.notes .item a { display: block; }
.tags { margin-top: 6px; font-size: 12px; color: var(--muted); }
.draft-badge { padding: 1px 6px; border-radius: 4px; background: #ffcc00; color: #1d1d1f; font-size: 10.5px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; vertical-align: 2px; }

/* ── Post ──────────────────────────────────── */
.post { max-width: 720px; padding-bottom: 48px; }
.post-head { padding: clamp(56px, 12vh, 112px) 0 32px; border-bottom: 1px solid var(--line); }
.post-meta { font-size: 13px; color: var(--accent); }
.post-head h1 { margin-top: 14px; font-size: clamp(32px, 5.4vw, 48px); line-height: 1.1; letter-spacing: -0.03em; font-weight: 650; }
.post-lede { margin-top: 18px; font-size: clamp(17px, 2vw, 19px); line-height: 1.6; color: var(--text-2); }
.post-head .tags { margin-top: 16px; }

.post-body { padding-top: 12px; font-size: 17px; line-height: 1.75; color: var(--text-2); }
.post-body > * + * { margin-top: 20px; }
.post-body h2 { margin-top: 48px; font-size: 23px; line-height: 1.3; letter-spacing: -0.02em; color: var(--text); scroll-margin-top: 72px; }
.post-body h3 { margin-top: 32px; font-size: 18px; color: var(--text); }
.post-body .anchor { display: none; }
.post-body strong { color: var(--text); }
.post-body a { color: var(--text); text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; }
.post-body a:hover { color: var(--accent); }
.post-body ul { padding-left: 0; }
.post-body ul li { position: relative; padding-left: 20px; }
.post-body ul li::before { content: ""; position: absolute; left: 2px; top: 0.8em; width: 8px; height: 1px; background: var(--muted); }
.post-body ol { list-style: decimal; padding-left: 22px; }
.post-body li + li { margin-top: 8px; }
.post-body :not(pre) > code { font-family: var(--mono); font-size: 0.85em; padding: 0.12em 0.38em; border-radius: 5px; background: var(--chip); color: var(--text); }
.post-body blockquote { margin-left: 0; margin-right: 0; padding-left: 18px; border-left: 2px solid var(--line-strong); }

/* Callouts: a coloured left rule, nothing more */
.callout { padding: 14px 18px; border-left: 3px solid var(--accent); border-radius: 0 8px 8px 0; background: var(--chip); }
.callout p { font-size: 15.5px; line-height: 1.65; }
.callout-h { font-family: var(--mono); font-size: 11px !important; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); margin-bottom: 4px; }
.callout-tip { border-left-color: #30a46c; } .callout-tip .callout-h { color: #30a46c; }
.callout-warning { border-left-color: #e5862b; } .callout-warning .callout-h { color: #e5862b; }

/* Code: dark panel with a file name and copy button */
.code-window { margin: 28px 0; border-radius: 10px; overflow: hidden; background: #1a2035; border: 1px solid var(--line); }
.code-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 14px; border-bottom: 1px solid rgba(255, 255, 255, 0.07); }
.dots { display: none; }
.code-title { font-size: 11.5px; color: #8e9ab5; }
.code-copy { padding: 3px 9px; border-radius: 6px; border: 1px solid rgba(255, 255, 255, 0.14); background: transparent; color: #c3cbe0; font-size: 11px; cursor: pointer; }
.code-copy:hover { color: #fff; border-color: rgba(255, 255, 255, 0.3); }
.code-window pre { margin: 0; padding: 16px 18px 18px; overflow-x: auto; font-family: var(--mono); font-size: 13.5px; line-height: 1.65; color: #dfe4f2; }
.code-window pre code { font: inherit; color: inherit; }
.t-kw { color: #f472b6; } .t-string { color: #fca5a5; } .t-comment { color: #7d89a6; font-style: italic; }
.t-number { color: #fde68a; } .t-type { color: #7dd3fc; } .t-attr { color: #fdba74; } .t-call { color: #86efac; } .t-member { color: #c4b5fd; }

/* Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }
.post-body table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.post-body th, .post-body td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.post-body th { font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.post-body tr:last-child td { border-bottom: 0; }

/* Previous / next */
.post-nav { display: grid; gap: 1px; margin-top: 48px; border-top: 1px solid var(--line); }
@media (min-width: 560px) { .post-nav { grid-template-columns: 1fr 1fr; } }
.post-nav a { display: grid; gap: 4px; padding: 18px 0; color: var(--text); font-weight: 550; line-height: 1.35; }
.post-nav a:hover { color: var(--accent); }
.post-nav a span { font-size: 11px; font-weight: 400; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
@media (min-width: 560px) { .post-nav a:last-child:not(:first-child) { text-align: right; } }
.post-back { margin-top: 8px; font-size: 13px; }
.post-back a { color: var(--muted); } .post-back a:hover { color: var(--text); }

@media print {
  .progress, .top, .post-nav, .post-back, .foot, .code-copy { display: none !important; }
}
