:root {
  --bg: #fafaf8;
  --text: #181818;
  --muted: #777;
  --line: #d8d8d2;
  --accent: #ef5a24;

  --sans: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* {
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header,
main,
footer {
  width: min(1200px, calc(100% - 48px));
  margin: 0 auto;
}

.site-header {
  height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.logo {
  font-family: var(--mono);
  font-size: 0.9rem;
  font-weight: 600;
}

nav {
  display: flex;
  gap: 28px;
}

nav a {
  font-size: 0.85rem;
  color: var(--muted);
}

nav a:hover {
  color: var(--text);
}

.hero {
  padding: 110px 0 90px;
  border-bottom: 1px solid var(--line);
}

.eyebrow,
.section-label {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.hero h1 {
  margin: 25px 0 32px;
  max-width: 900px;

  font-size: clamp(4rem, 9vw, 8.5rem);
  font-weight: 500;
  line-height: 0.92;
  letter-spacing: -0.065em;
}

.hero-copy {
  max-width: 580px;
  font-size: 1.35rem;
  line-height: 1.5;
  color: #444;
}

.hero-meta {
  margin-top: 70px;
  display: flex;
  justify-content: space-between;

  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
}

.section {
  padding: 72px 0;
  border-bottom: 1px solid var(--line);
}

.section-label {
  margin-bottom: 50px;
}

.two-column {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
}

.two-column h2 {
  font-size: 1rem;
  margin: 0 0 24px;
}

.two-column p {
  margin: 8px 0;
  font-size: 1.6rem;
  letter-spacing: -0.025em;
}

.notes {
  border-top: 1px solid var(--line);
}

.notes a {
  display: grid;
  grid-template-columns: 150px 1fr auto;
  align-items: center;
  gap: 30px;

  padding: 25px 0;
  border-bottom: 1px solid var(--line);
}

.notes span {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
}

.notes strong {
  font-size: 1.25rem;
  font-weight: 500;
}

.notes a:hover strong {
  color: var(--accent);
}

.diagram {
  margin: 0;
  overflow-x: auto;

  font-family: var(--mono);
  font-size: clamp(0.75rem, 1.4vw, 1rem);
  line-height: 1.5;
}

footer {
  padding: 35px 0 60px;

  display: flex;
  justify-content: space-between;

  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--muted);
}

@media (max-width: 700px) {
  .site-header,
  main,
  footer {
    width: min(100% - 28px, 1200px);
  }

  nav {
    gap: 15px;
  }

  .hero {
    padding: 75px 0 60px;
  }

  .hero h1 {
    font-size: clamp(3.5rem, 17vw, 5.5rem);
  }

  .hero-meta {
    flex-direction: column;
    gap: 10px;
  }

  .two-column {
    grid-template-columns: 1fr;
    gap: 50px;
  }

  .notes a {
    grid-template-columns: 1fr auto;
  }

  .notes a span:first-child {
    grid-column: 1 / -1;
  }
}

/* Article */

.article {
  max-width: 900px;
  margin: 0 auto;
}

.article-header {
  padding: 100px 0 70px;
  border-bottom: 1px solid var(--line);
}

.article-meta {
  display: flex;
  justify-content: space-between;

  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.article-header h1 {
  margin: 35px 0 25px;

  font-size: clamp(3.5rem, 8vw, 7rem);
  font-weight: 500;
  line-height: 0.95;
  letter-spacing: -0.055em;
}

.article-description {
  max-width: 650px;
  margin: 0;

  font-size: 1.35rem;
  line-height: 1.5;
  color: var(--muted);
}

.article-body {
  max-width: 700px;
  margin: 0 auto;
  padding: 75px 0;

  font-size: 1.15rem;
  line-height: 1.8;
}

.article-body p {
  margin: 0 0 1.6em;
}

.article-body h2 {
  margin: 2.5em 0 0.8em;

  font-size: 2rem;
  font-weight: 500;
  letter-spacing: -0.035em;
}

.article-body h3 {
  margin-top: 2.2em;
  font-size: 1.3rem;
}

.article-body a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.article-body code {
  font-family: var(--mono);
  font-size: 0.9em;
}

.article-body pre {
  margin: 2.5em 0;
  padding: 25px;
  overflow-x: auto;

  background: #181818;
  color: #fafafa;

  font-family: var(--mono);
  font-size: 0.85rem;
  line-height: 1.6;
}

.article-body blockquote {
  margin: 2.5em 0;
  padding-left: 25px;
  border-left: 2px solid var(--accent);

  font-size: 1.35rem;
  line-height: 1.5;
}

.article-end {
  padding: 30px 0 70px;
  border-top: 1px solid var(--line);

  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--muted);
}