@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=DM+Mono:wght@400&display=swap');

:root {
  --bg: #000000;
  --surface: #101010;
  --surface-2: #161616;
  --border: #1d1d1d;
  --border-mid: #353535;
  --text: #fbf5f3;
  --text-muted: #9c9c9c;
  --accent: #e8622a;
  --accent-dim: rgba(232, 98, 42, 0.12);
  --font-sans: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'DM Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --page-w: 42rem;
  --gutter: clamp(1.25rem, 5vw, 2rem);
}

*,
*::before,
*::after { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* ─── Nav ─── */

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px clamp(1.25rem, 5vw, 2.5rem);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  letter-spacing: 0.12em;
  color: var(--text);
  text-decoration: none;
}

.nav-back {
  font-size: 0.875rem;
  color: var(--text-muted);
  text-decoration: none;
}

.nav-back:hover,
.nav-logo:hover { color: var(--accent); }

/* ─── Page ─── */

.page {
  max-width: var(--page-w);
  margin: 0 auto;
  padding: clamp(2rem, 7vw, 4.5rem) var(--gutter) 4rem;
}

/* ─── Header ─── */

.doc-header {
  margin-bottom: 40px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
}

.post-eyebrow,
.doc-eyebrow {
  display: inline-block;
  margin: 0 0 16px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

.post-title,
.doc-title {
  margin: 0 0 20px;
  font-size: clamp(2rem, 7vw, 3.25rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.doc-header .doc-title:last-child { margin-bottom: 0; }

.post-lede {
  margin: 0 0 20px;
  font-size: clamp(1.125rem, 3vw, 1.3125rem);
  line-height: 1.55;
  color: var(--text-muted);
}

.post-meta,
.doc-meta {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.post-meta {
  margin-bottom: 40px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
}

/* ─── Body ─── */

.post-h2,
.doc-body h2 {
  margin: 48px 0 12px;
  font-size: clamp(1.375rem, 4vw, 1.75rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.post-h3,
.doc-body h3 {
  margin: 28px 0 8px;
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.3;
}

.post-p,
.doc-body p {
  margin: 0 0 18px;
  color: var(--text);
}

.post-list,
.doc-body ul,
.doc-body ol {
  margin: 0 0 18px;
  padding-left: 1.25rem;
}

.post-li,
.doc-body li {
  margin: 0 0 8px;
  padding-left: 4px;
}

.post-li::marker,
.doc-body li::marker { color: var(--accent); }

.post-strong,
.doc-body strong { font-weight: 600; }

.doc-body hr {
  margin: 40px 0;
  border: none;
  border-top: 1px solid var(--border);
}

.post-link,
.doc-body a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.post-link:hover,
.doc-body a:hover { color: var(--text); }

/* ─── Callout ─── */

.post-callout,
.info-box {
  margin: 28px 0;
  padding: 20px 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 10px;
}

.post-callout-title {
  margin: 0 0 6px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

.post-callout-text,
.info-box p {
  margin: 0;
  color: var(--text);
}

/* ─── Closing ─── */

.post-cta {
  margin-top: 56px;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.post-cta-title {
  margin: 0 0 6px;
  font-size: 1.375rem;
  font-weight: 700;
  line-height: 1.25;
}

.post-cta-sub {
  margin: 0 0 20px;
  color: var(--text-muted);
}

.post-btn {
  display: inline-block;
  padding: 12px 20px;
  background: var(--accent);
  color: var(--bg);
  border-radius: 8px;
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
}

.post-btn:hover { filter: brightness(1.08); }

/* ─── Footer ─── */

.foot {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  max-width: var(--page-w);
  margin: 0 auto;
  padding: 24px var(--gutter) 48px;
  border-top: 1px solid var(--border);
  font-size: 0.875rem;
  color: var(--text-muted);
}

.foot-link,
.doc-footer-links a {
  color: var(--text-muted);
  text-decoration: none;
}

.foot-link:hover,
.doc-footer-links a:hover { color: var(--text); }

.doc-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 20px;
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 0.875rem;
  color: var(--text-muted);
}

.doc-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}

/* ─── Focus ─── */

.nav-logo:focus-visible,
.nav-back:focus-visible,
.post-link:focus-visible,
.post-btn:focus-visible,
.foot-link:focus-visible,
.doc-body a:focus-visible,
.doc-footer-links a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}