
:root {
  color-scheme: dark;
  --bg: hsl(30 12% 7%);
  --fg: hsl(40 30% 95%);
  --card: hsl(30 9% 11%);
  --muted: hsl(30 8% 15%);
  --muted-fg: hsl(36 14% 72%);
  --secondary: hsl(30 8% 18%);
  --primary: hsl(43 96% 56%);
  --primary-fg: hsl(30 25% 8%);
  --cream: hsl(42 48% 92%);
  --cream-fg: hsl(30 22% 11%);
  --cream-muted: hsl(30 14% 30%);
  --border: hsl(30 8% 21%);
  --radius: 14px;
  --font-display: 'Bricolage Grotesque', Nunito, sans-serif;
  --font-body: Nunito, system-ui, sans-serif;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font-family: var(--font-body); font-size: 17px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  display: flex; flex-direction: column; min-height: 100vh;
}
main { flex: 1; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; border-radius: 6px; }
.wrap { max-width: 72rem; margin: 0 auto; padding: 0 20px; }
@media (min-width: 640px) { .wrap { padding: 0 24px; } }

.topbar { height: 3px; background: var(--primary); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 20px; padding-bottom: 20px; }
.logo { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-display); font-weight: 800; font-size: 1.25rem; letter-spacing: -0.02em; text-decoration: none; color: var(--fg); }
.logo b { color: var(--primary); font-weight: 800; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 999px; background: var(--primary); margin-left: -4px; transform: translateY(6px); }
.nav { display: flex; align-items: center; gap: 8px; }
.nav-link { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; font-weight: 700; color: var(--muted-fg); text-decoration: none; border-radius: var(--radius); transition: color 150ms var(--ease), background-color 150ms var(--ease); }
.nav-link:hover, .nav-link[aria-current="page"] { color: var(--fg); background: var(--secondary); }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 18px; border-radius: var(--radius); background: var(--primary); color: var(--primary-fg); font-weight: 800; text-decoration: none; transition: transform 150ms var(--ease), opacity 150ms var(--ease); }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: scale(0.98); }
@media (max-width: 420px) { .nav .nav-link.hide-sm { display: none; } .btn { padding: 0 14px; } }

.label { display: flex; align-items: center; gap: 8px; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.14em; color: var(--muted-fg); margin: 0; }
.label::before { content: ''; width: 6px; height: 6px; border-radius: 999px; background: var(--primary); }
.intro { padding: 40px 0 28px; }
@media (min-width: 768px) { .intro { padding: 64px 0 40px; } }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; }
.intro h1 { font-size: clamp(2.1rem, 6vw, 3.4rem); margin: 14px 0 12px; }
.intro p.lead { color: var(--muted-fg); font-size: 1.125rem; max-width: 40rem; margin: 0; }

.grid { display: grid; gap: 20px; grid-template-columns: 1fr; padding-bottom: 64px; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .grid { grid-template-columns: repeat(3, 1fr); } }
.card { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: var(--fg); transition: transform 200ms var(--ease), border-color 200ms var(--ease); }
.card:hover { transform: translateY(-2px); border-color: var(--primary); }
.card-cover { aspect-ratio: 16 / 9; width: 100%; object-fit: cover; background: var(--muted); }
.card-body { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card h2 { font-size: 1.3rem; margin: 0; }
.card p { margin: 0; color: var(--muted-fg); }
.meta { font-size: 0.875rem; color: var(--muted-fg); font-variant-numeric: tabular-nums; margin-top: auto; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.chip { display: inline-flex; align-items: center; padding: 3px 11px; border-radius: 999px; font-size: 0.78rem; font-weight: 700; background: var(--secondary); color: var(--fg); border: 1px solid var(--border); text-decoration: none; }
.chip-cat { background: var(--primary); color: var(--primary-fg); border-color: var(--primary); }

.empty { background: var(--card); border: 1px dashed var(--border); border-radius: var(--radius); padding: 40px 24px; text-align: center; margin-bottom: 64px; }
.empty h2 { margin: 0 0 8px; font-size: 1.4rem; }
.empty p { color: var(--muted-fg); margin: 0 0 20px; }

.post-head { max-width: 46rem; margin: 0 auto; padding: 32px 0 24px; }
@media (min-width: 768px) { .post-head { padding: 56px 0 32px; } }
.back { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted-fg); font-weight: 700; text-decoration: none; }
.back:hover { color: var(--fg); }
.post-head h1 { font-size: clamp(2rem, 5.5vw, 3rem); margin: 14px 0 12px; }
.post-head .lead { color: var(--muted-fg); font-size: 1.15rem; margin: 0 0 14px; }
.post-cover { max-width: 60rem; margin: 0 auto 32px; }
.post-cover img { width: 100%; border-radius: var(--radius); border: 1px solid var(--border); }
.article {
  max-width: 70ch; margin: 0 auto; background: var(--cream); color: var(--cream-fg);
  border-radius: var(--radius); padding: 28px 22px; line-height: 1.7; font-size: 1.0625rem; overflow-wrap: break-word;
}
@media (min-width: 640px) { .article { padding: 44px 48px; } }
.article > :first-child { margin-top: 0; }
.article > :last-child { margin-bottom: 0; }
.article h2 { font-size: 1.65rem; margin: 2em 0 0.6em; }
.article h3 { font-size: 1.3rem; margin: 1.7em 0 0.5em; }
.article h4 { font-size: 1.1rem; margin: 1.5em 0 0.5em; }
.article p { margin: 0 0 1.15em; }
.article ul, .article ol { margin: 0 0 1.15em; padding-left: 1.4em; }
.article li { margin: 0.35em 0; }
.article a { color: var(--cream-fg); font-weight: 700; text-decoration-color: var(--primary); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.article a:hover { text-decoration-color: currentColor; }
.article blockquote { margin: 1.5em 0; padding: 4px 0 4px 18px; border-left: 4px solid var(--primary); color: var(--cream-muted); font-style: italic; }
.article code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.9em; background: hsl(42 30% 84%); padding: 2px 6px; border-radius: 6px; }
.article pre { background: var(--card); color: var(--fg); padding: 16px 18px; border-radius: calc(var(--radius) - 4px); overflow-x: auto; line-height: 1.5; margin: 0 0 1.3em; }
.article pre code { background: none; padding: 0; color: inherit; }
.article .table-wrap { overflow-x: auto; margin: 0 0 1.3em; }
.article table { width: 100%; border-collapse: collapse; font-size: 0.95em; }
.article th, .article td { text-align: left; padding: 8px 12px; border-bottom: 1px solid hsl(30 14% 78%); }
.article th { font-weight: 800; }
.article img { border-radius: calc(var(--radius) - 4px); margin: 1.3em 0; }
.article hr { border: 0; border-top: 1px solid hsl(30 14% 78%); margin: 2em 0; }
.post-foot { max-width: 70ch; margin: 24px auto 0; display: flex; flex-direction: column; gap: 24px; padding-bottom: 64px; }
.cta { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.cta h2 { margin: 0; font-size: 1.35rem; }
.cta p { margin: 0; color: var(--muted-fg); }

.site-footer { border-top: 1px solid var(--border); margin-top: 24px; }
.foot-top { display: flex; flex-direction: column; gap: 28px; padding-top: 48px; padding-bottom: 48px; }
@media (min-width: 768px) { .foot-top { flex-direction: row; justify-content: space-between; align-items: flex-start; } }
.foot-top p { margin: 12px 0 0; color: var(--muted-fg); max-width: 24rem; }
.foot-nav { display: flex; flex-wrap: wrap; gap: 12px 24px; font-weight: 600; }
.foot-nav a { color: var(--muted-fg); text-decoration: none; transition: color 150ms var(--ease); }
.foot-nav a:hover { color: var(--fg); text-decoration: underline; text-underline-offset: 4px; }
.foot-bottom { border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 16px; padding-top: 24px; padding-bottom: 24px; font-size: 0.875rem; color: var(--muted-fg); }
@media (min-width: 640px) { .foot-bottom { flex-direction: row; align-items: center; justify-content: space-between; } }
.foot-bottom p { margin: 0; }
.badge { display: inline-flex; align-items: center; gap: 10px; border-radius: var(--radius); border: 1px solid hsl(43 96% 56% / 0.25); background: hsl(43 96% 56% / 0.1); padding: 10px 16px; font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.14em; color: var(--fg); text-decoration: none; transition: background-color 150ms var(--ease); align-self: flex-start; }
.badge:hover { background: hsl(43 96% 56% / 0.2); }
.badge svg { width: 14px; height: 14px; color: var(--primary); flex-shrink: 0; }
@media (prefers-reduced-motion: reduce) { .card, .btn { transition: none; } .card:hover, .btn:hover { transform: none; } }
