:root {
  --canvas: #0b0c10;
  --surface: #13141b;
  --surface-2: #1c1d28;
  --ink: #eeeef5;
  --ink-muted: #8a8aac;
  --accent: #8b5cf6;
  --accent-dim: #6d28d9;
  --grad-a: #8b5cf6;
  --grad-b: #06b6d4;
  --rule: #252636;
  --body-font: 'Inter', system-ui, sans-serif;
  --display-font: 'Syne', system-ui, sans-serif;
  --col: 740px;
  --shell: 1080px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 17px; scroll-behavior: smooth; }
body {
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--body-font);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
a:hover { color: var(--accent); }

.shell {
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: 24px;
}

/* ── Masthead ─────────────────────────────────────────────── */

.masthead {
  padding: 20px 0;
  border-bottom: 2px solid var(--surface-2);
}
.masthead__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.wordmark {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--display-font);
  font-weight: 700;
  font-size: 1rem;
}
.wordmark__mark {
  width: 28px;
  height: 28px;
  border-radius: 4px;
  background: linear-gradient(135deg, var(--grad-a), var(--grad-b));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
  letter-spacing: 0.02em;
}
.wordmark__name { letter-spacing: -0.01em; }

.site-nav {
  display: flex;
  gap: 28px;
  font-family: var(--display-font);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.site-nav a { text-decoration: none; color: var(--ink-muted); }
.site-nav a:hover { color: var(--accent); }

/* ── Hero ─────────────────────────────────────────────────── */

.hero { padding: 72px 0 0; }
.hero__eyebrow {
  display: block;
  font-family: var(--display-font);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
}
.hero__h1 {
  font-family: var(--display-font);
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.03em;
  max-width: 18ch;
  margin-bottom: 18px;
  background: linear-gradient(120deg, var(--ink) 60%, var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero__dek {
  font-size: 1.05rem;
  color: var(--ink-muted);
  max-width: 56ch;
  line-height: 1.6;
  margin-bottom: 0;
}
.hero__img {
  margin-top: 40px;
  line-height: 0;
}
.hero__img img {
  width: 100%;
  max-height: 480px;
  object-fit: cover;
  display: block;
}

/* ── Post plate ───────────────────────────────────────────── */

.post-plate { overflow: hidden; line-height: 0; }
.post-plate img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  display: block;
}

/* ── Inline post (homepage) ───────────────────────────────── */

.post-inline { padding: 64px 0 0; }
.post-inline__meta {
  display: flex;
  align-items: center;
  gap: 18px;
  font-family: var(--display-font);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 14px;
}
.post-inline__num { color: var(--accent); }
.post-inline__title {
  font-family: var(--display-font);
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}
.post-inline__title a { text-decoration: none; color: var(--ink); }
.post-inline__title a:hover { color: var(--accent); }
.post-inline__dek {
  font-size: 1rem;
  color: var(--ink-muted);
  max-width: 64ch;
  margin-bottom: 32px;
}
.post-inline__plate-wrap { margin-bottom: 40px; }
.post-separator { border: none; margin: 64px 0 0; }

/* ── Prose ────────────────────────────────────────────────── */

.prose { max-width: var(--col); }
.prose p { margin-bottom: 1.5em; }
.prose h2 {
  font-family: var(--display-font);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 2.5em 0 0.75em;
  color: var(--ink);
}
.prose h3 {
  font-family: var(--display-font);
  font-size: 1rem;
  font-weight: 700;
  margin: 2em 0 0.5em;
}
.prose ul, .prose ol { margin: 0 0 1.5em 1.5em; }
.prose li { margin-bottom: 0.4em; }
.prose a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}
.prose a:hover { color: var(--accent); }
.prose code {
  font-family: 'Courier New', monospace;
  font-size: 0.85em;
  background: var(--surface-2);
  color: var(--accent);
  padding: 2px 6px;
  border-radius: 3px;
}
.prose pre {
  background: var(--surface-2);
  padding: 20px;
  border-radius: 6px;
  overflow-x: auto;
  margin-bottom: 1.5em;
}
.prose pre code {
  background: none;
  padding: 0;
  font-size: 0.88rem;
  color: var(--ink);
}
.prose strong { font-weight: 600; }

/* ── Article page ─────────────────────────────────────────── */

.post-page { padding: 64px 0 80px; }
.post-page__h1 {
  font-family: var(--display-font);
  font-size: clamp(1.9rem, 4vw, 2.7rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.025em;
  margin-bottom: 14px;
}
.post-page__dek {
  font-size: 1.05rem;
  color: var(--ink-muted);
  max-width: 60ch;
  margin-bottom: 40px;
}
.post-page__plate { margin-bottom: 48px; }
.post-page__plate .post-plate img { height: 400px; border-radius: 6px; }

/* ── Articles index ───────────────────────────────────────── */

.page-head { padding: 64px 0 48px; }
.page-head__eyebrow {
  display: block;
  font-family: var(--display-font);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}
.page-head__h1 {
  font-family: var(--display-font);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  margin-bottom: 12px;
}
.page-head__dek { font-size: 1rem; color: var(--ink-muted); max-width: 56ch; }

.cards-grid { padding: 40px 0 80px; }
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}
.card {
  background: var(--surface);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.card__plate .post-plate img { height: 180px; }
.card__body { padding: 24px; flex: 1; display: flex; flex-direction: column; }
.card__meta {
  display: flex;
  gap: 12px;
  font-family: var(--display-font);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 10px;
}
.card__num { color: var(--accent); }
.card__title {
  font-family: var(--display-font);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin-bottom: 10px;
}
.card__title a { text-decoration: none; color: var(--ink); }
.card__title a:hover { color: var(--accent); }
.card__dek { font-size: 0.88rem; color: var(--ink-muted); line-height: 1.55; flex: 1; }

/* ── Footer ───────────────────────────────────────────────── */

.site-footer {
  background: var(--surface);
  padding: 48px 0;
  margin-top: 80px;
}
.site-footer__row {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  justify-content: space-between;
  align-items: center;
}
.site-footer__brand {
  font-family: var(--display-font);
  font-weight: 700;
  font-size: 0.88rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
}
.site-footer__nav {
  display: flex;
  gap: 24px;
  font-family: var(--display-font);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.site-footer__nav a { color: var(--ink-muted); text-decoration: none; }
.site-footer__nav a:hover { color: var(--accent); }

/* ── 404 ──────────────────────────────────────────────────── */

.not-found { padding: 120px 0; text-align: center; }
.not-found__code {
  font-family: var(--display-font);
  font-size: 6rem;
  font-weight: 800;
  color: var(--surface-2);
  line-height: 1;
  margin-bottom: 16px;
}
.not-found__msg { font-size: 1.05rem; color: var(--ink-muted); margin-bottom: 20px; }
.not-found a { color: var(--accent); text-decoration: underline; }

/* ── Responsive ───────────────────────────────────────────── */

@media (max-width: 640px) {
  .masthead__row { flex-wrap: wrap; }
  .site-nav { font-size: 0.8rem; gap: 18px; }
  .hero { padding: 48px 0 0; }
  .post-inline { padding: 48px 0 0; }
  .cards { grid-template-columns: 1fr; }
}
