/* AYD Garaj blog: built on the site's own design tokens (css/style.css) */
:root { --b-text: var(--color-text); --b-muted: var(--color-text-muted); --b-line: var(--color-border); --b-accent: var(--color-copper); --b-on-accent: #111; --b-panel: var(--color-bg-panel); --b-bg: var(--color-bg); }
.blog-main { padding: 48px 20px 72px; }
.blog-article, .blog-list, .blog-related { max-width: 780px; margin: 0 auto; }
.blog-list, .blog-related { max-width: 1100px; }
.blog-crumbs { font-size: .85rem; color: var(--color-text-muted); margin-bottom: 18px; }
.blog-crumbs a { color: var(--color-text-muted); text-decoration: none; }
.blog-crumbs a:hover { color: var(--color-copper); }
.blog-crumbs span { margin: 0 6px; opacity: .6; }
.blog-head h1, .blog-list h1 { font-family: var(--font-display); font-size: clamp(1.9rem, 4.6vw, 2.9rem); line-height: 1.15; margin: 10px 0 14px; color: var(--color-text); }
.blog-lead { font-size: 1.15rem; line-height: 1.6; color: var(--color-film); margin: 0 0 14px; }
.blog-meta { font-size: .9rem; color: var(--color-text-muted); margin: 0 0 22px; }
.blog-chip { display: inline-block; padding: 5px 12px; border: 1px solid var(--color-border); border-radius: 999px; font-size: .8rem; color: var(--color-text-muted); text-decoration: none; margin: 0 6px 6px 0; }
.blog-chip:hover, .blog-chip.is-active { border-color: var(--color-copper); color: var(--color-copper); }
.blog-cover { margin: 0 0 28px; border-radius: 10px; overflow: hidden; background: var(--color-bg-panel); aspect-ratio: 16 / 9; }
.blog-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.blog-toc { background: var(--color-bg-panel); border: 1px solid var(--color-border); border-radius: 10px; padding: 16px 20px; margin: 0 0 28px; }
.blog-toc ol { margin: 8px 0 0; padding-left: 20px; }
.blog-toc a { color: var(--color-film); text-decoration: none; line-height: 1.9; }
.blog-toc a:hover { color: var(--color-copper); }
.blog-body { font-size: 1.06rem; line-height: 1.8; color: var(--color-text); }
.blog-body h2 { font-family: var(--font-display); font-size: 1.6rem; margin: 2.2em 0 .6em; scroll-margin-top: 96px; }
.blog-body h3 { font-family: var(--font-display); font-size: 1.28rem; margin: 1.8em 0 .5em; }
.blog-body p { margin: 0 0 1.15em; }
.blog-body a { color: var(--color-copper); }
.blog-body ul, .blog-body ol { padding-left: 1.4em; margin: 0 0 1.2em; }
.blog-body li { margin-bottom: .4em; }
.blog-body blockquote { margin: 1.6em 0; padding: 4px 0 4px 18px; border-left: 3px solid var(--color-copper); color: var(--color-film); }
.blog-body img { max-width: 100%; height: auto; border-radius: 8px; margin: 1em 0; display: block; }
.blog-body iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; border-radius: 8px; margin: 1em 0; display: block; }
.blog-body table { width: 100%; border-collapse: collapse; margin: 1.4em 0; font-size: .95rem; display: block; overflow-x: auto; }
.blog-body th, .blog-body td { border: 1px solid var(--color-border); padding: 8px 12px; text-align: left; }
.blog-body th { background: var(--color-bg-panel); }
.blog-faq { margin: 40px 0 0; }
.blog-faq details { border-bottom: 1px solid var(--color-border); padding: 14px 0; }
.blog-faq summary { cursor: pointer; font-weight: 600; }
.blog-faq p { margin: 10px 0 0; color: var(--color-film); line-height: 1.7; }
.blog-tags { margin: 28px 0 0; display: flex; flex-wrap: wrap; gap: 8px; color: var(--color-text-muted); font-size: .85rem; }
.blog-cta { margin: 44px 0 0; padding: 28px; text-align: center; background: var(--color-bg-panel); border: 1px solid var(--color-border); border-radius: 12px; }
.blog-cta h2 { font-family: var(--font-display); margin: 0 0 8px; font-size: 1.4rem; }
.blog-cta p { margin: 0 0 18px; color: var(--color-text-muted); }
.blog-related { margin-top: 64px; }
.blog-related h2 { font-family: var(--font-display); }
.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; margin-top: 18px; }
.blog-card { display: flex; flex-direction: column; background: var(--color-bg-panel); border: 1px solid var(--color-border); border-radius: 10px; overflow: hidden; color: inherit; text-decoration: none; transition: border-color .2s, transform .2s; }
.blog-card:hover { border-color: var(--color-copper); transform: translateY(-2px); }
.blog-card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.blog-card-body { display: flex; flex-direction: column; gap: 8px; padding: 16px 18px 18px; }
.blog-card-body strong { font-family: var(--font-display); font-size: 1.12rem; line-height: 1.3; }
.blog-card-body em { font-style: normal; font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; color: var(--color-copper); }
.blog-card-body span { color: var(--color-text-muted); font-size: .92rem; line-height: 1.55; }
.blog-card-body small { color: var(--color-text-muted); font-size: .8rem; }
.blog-cats { margin: 18px 0 8px; }
.blog-empty { color: var(--color-text-muted); }

/* Homepage block: latest posts (included into index.html) */
.blog-home { padding: 72px 0 24px; }
.blog-home-title { font-family: var(--font-display); font-size: clamp(1.6rem, 3.6vw, 2.2rem); margin: 0 0 8px; }
.blog-home-more { margin: 22px 0 0; text-align: center; }
.blog-home-more a { color: var(--color-copper); text-decoration: none; font-weight: 600; }
.blog-home-more a:hover { text-decoration: underline; }

/* Shared layout of the blog article page. Appended after the site file, which defines the --b-* colours. */
.blog-wrap { max-width: 1160px; margin: 0 auto; }
.blog-wrap .blog-head h1 { font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1.12; margin: 6px 0 22px; }
.blog-author { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.blog-avatar { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; background: var(--b-accent); color: var(--b-on-accent); }
.blog-author strong { color: var(--b-text); font-size: 1.05rem; }
.blog-dot { width: 4px; height: 4px; border-radius: 50%; background: var(--b-muted); }
.blog-role { color: var(--b-muted); font-size: .95rem; }
.blog-meta-row { display: flex; align-items: center; gap: 10px 28px; flex-wrap: wrap; color: var(--b-muted); font-size: 1rem; }
.blog-meta-row span { display: inline-flex; align-items: center; gap: 8px; }
.blog-meta-row a { color: var(--b-text); font-weight: 600; text-decoration: none; }
.blog-meta-row a:hover { color: var(--b-accent); }
.blog-ico { flex: none; }
.blog-rule { border: 0; border-top: 1px solid var(--b-line); margin: 22px 0 30px; }

.blog-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 48px; align-items: start; }
.blog-side { position: sticky; top: 96px; max-height: calc(100vh - 116px); overflow: auto; }
.blog-content { min-width: 0; }

.blog-wrap .blog-toc { background: none; border: 0; border-radius: 0; padding: 0; margin: 0; }
.blog-toc summary { display: flex; align-items: center; gap: 10px; cursor: pointer; list-style: none; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--b-accent); font-size: 1rem; }
.blog-toc summary::-webkit-details-marker { display: none; }
.blog-toc ol { list-style: none; margin: 16px 0 0; padding: 0 0 0 0; border-left: 2px solid var(--b-line); }
.blog-toc li { margin: 0; }
.blog-toc a { display: block; padding: 10px 0 10px 22px; color: var(--b-text); text-decoration: none; line-height: 1.4; font-size: 1rem; border-left: 2px solid transparent; margin-left: -2px; }
.blog-toc li.lvl3 a { padding-left: 38px; font-size: .94rem; color: var(--b-muted); }
.blog-toc a:hover { color: var(--b-accent); border-left-color: var(--b-accent); }

.blog-share { display: flex; align-items: center; gap: 16px; margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--b-line); color: var(--b-muted); font-weight: 600; }
.blog-share a { color: var(--b-text); display: inline-flex; }
.blog-share a:hover { color: var(--b-accent); }

.blog-mask { display: inline-block; width: 22px; height: 22px; flex: none; background: currentColor; -webkit-mask: var(--ico) center / contain no-repeat; mask: var(--ico) center / contain no-repeat; }
.blog-share .blog-mask { width: 26px; height: 26px; }

.blog-content .blog-cover { margin: 0 0 26px; border-radius: 16px; overflow: hidden; aspect-ratio: 16 / 9; background: var(--b-panel); }
.blog-ai { border: 1px solid var(--b-line); border-radius: 16px; padding: 22px 24px; margin: 0 0 30px; background: var(--b-panel); }
.blog-ai p { margin: 0 0 14px; color: var(--b-text); font-size: 1.05rem; }
.blog-ai-row { display: flex; flex-wrap: wrap; gap: 12px; }
.blog-ai-row a { display: inline-flex; align-items: center; gap: 10px; padding: 12px 18px; border: 1px solid var(--b-line); border-radius: 14px; color: var(--b-text); text-decoration: none; font-weight: 600; background: var(--b-bg); transition: border-color .15s, transform .15s; }
.blog-ai-row a:hover { border-color: var(--b-accent); transform: translateY(-1px); }

.blog-content .blog-lead { font-size: 1.2rem; }
.blog-body { max-width: 780px; overflow-wrap: break-word; }
.blog-body table { display: table; table-layout: auto; }
.blog-body th, .blog-body td { vertical-align: top; overflow-wrap: anywhere; }

@media (max-width: 900px) {
	.blog-layout { grid-template-columns: minmax(0, 1fr); gap: 26px; }
	.blog-side { position: static; max-height: none; overflow: visible; }
	/* Phone: the contents list is a collapsible bar with a chevron, open by default. */
	.blog-toc summary { justify-content: space-between; padding: 16px 18px; border: 1px solid var(--b-line); border-top: 3px solid var(--b-accent); border-radius: 12px; background: var(--b-panel); color: var(--b-text); text-transform: none; letter-spacing: 0; font-size: 1.05rem; }
	.blog-toc summary .blog-ico { display: none; }
	.blog-toc summary::after { content: ""; width: 10px; height: 10px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-135deg) translate(-2px, -2px); transition: transform .2s; }
	.blog-toc:not([open]) summary::after { transform: rotate(45deg); }
	.blog-toc ol { margin-top: 14px; margin-left: 4px; }
	.blog-toc a { padding-right: 6px; }
	.blog-body table { display: block; overflow-x: auto; }
	.blog-ai { padding: 18px; }
	.blog-ai-row a { padding: 10px 14px; }
}
