@font-face {
  font-family: "IBM Plex Sans";
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/ibm-plex-sans-400.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Sans";
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/ibm-plex-sans-500.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Sans";
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/ibm-plex-sans-600.woff2") format("woff2");
}
@font-face {
  font-family: "JetBrains Mono";
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/jetbrains-mono-400.woff2") format("woff2");
}
@font-face {
  font-family: "JetBrains Mono";
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/jetbrains-mono-700.woff2") format("woff2");
}

:root {
  color-scheme: dark;
  --ground: #16140f;
  --panel: #1c1a14;
  --rule: #2e2a22;
  --badge-rule: #4a3f2a;
  --text: #ece6d8;
  --secondary: #c9c1b1;
  --muted: #a39b8a;
  --accent: #e0a84a;
  /* The terminal captures stay dark in both themes. */
  --term-ground: #0f0e0b;
  --term-rule: #2e2a22;
  --term-text: #d9d2c3;
  --term-muted: #a39b8a;
  --term-dim: #8a8272;
  --term-accent: #e0a84a;
  --sans: "IBM Plex Sans", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}

@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --ground: #faf8f3;
    --panel: #f2eee5;
    --rule: #ddd6c8;
    --badge-rule: #d9c49b;
    --text: #1f1c16;
    --secondary: #4a4438;
    --muted: #6b6355;
    --accent: #9a6410;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--ground);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
}

a {
  color: var(--accent);
}

code {
  font-family: var(--mono);
  font-size: 0.88em;
  color: var(--text);
}

h1,
h2,
h3,
p,
ul,
ol,
figure {
  margin: 0;
}

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 clamp(16px, 5vw, 48px);
}

/* Header */

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  padding: 28px 0;
}

.wordmark {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 22px;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.cursor {
  color: var(--accent);
}

@media (prefers-reduced-motion: no-preference) {
  .cursor {
    animation: blink 1.1s steps(1, end) infinite;
  }
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0 24px;
  font-size: 15px;
}

.site-nav a {
  color: var(--secondary);
  text-decoration: none;
  padding: 10px 0;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--text);
}

/* Shared pieces */

.badge {
  align-self: flex-start;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--accent);
  border: 1px solid var(--badge-rule);
  border-radius: 999px;
  padding: 4px 12px;
}

.label {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--accent);
}

.label-quiet {
  color: var(--muted);
}

.lead {
  color: var(--secondary);
}

.section {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding-bottom: clamp(64px, 10vw, 120px);
}

.section h2 {
  font-size: clamp(26px, 3.4vw, 34px);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.2;
}

.section-title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 12px 20px;
}

.section-title .badge {
  align-self: auto;
  padding: 2px 10px;
}

.measure {
  max-width: 40em;
}

/* Hero */

.hero {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px 48px;
  padding-top: clamp(40px, 8vw, 96px);
}

.hero h1 {
  flex: 1 1 auto;
  font-size: clamp(46px, 7vw, 84px);
  line-height: 1;
  font-weight: 600;
  letter-spacing: -0.035em;
}

.hero h1 .accent {
  color: var(--accent);
}

.hero-side {
  flex: 0 1 300px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-bottom: 10px;
}

.hero-side p {
  font-size: clamp(18px, 2vw, 19px);
  color: var(--secondary);
}

.meta {
  margin: clamp(32px, 5vw, 56px) 0 32px;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
}

/* Terminal captures */

.term {
  border: 1px solid var(--term-rule);
  border-radius: 10px;
  background: var(--term-ground);
  overflow: hidden;
  min-width: 0;
}

.term-spaced {
  margin-bottom: clamp(64px, 10vw, 120px);
}

.term-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--term-rule);
  font-family: var(--mono);
  font-size: 12px;
  color: var(--term-dim);
}

.term-body {
  overflow-x: auto;
  padding: 20px;
}

.term pre {
  margin: 0;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--term-text);
}

.term .t-accent {
  color: var(--term-accent);
}

.term .t-muted {
  color: var(--term-muted);
}

.term .t-dim {
  color: var(--term-dim);
}

.term figcaption {
  padding: 0 20px 18px;
  font-size: 14px;
  color: var(--term-muted);
}

/* Columns */

.cols {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.col {
  flex: 1 1 260px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-top: 1px solid var(--rule);
  padding-top: 20px;
}

.col h3 {
  font-size: 20px;
  font-weight: 600;
  line-height: 1.3;
}

.col p {
  color: var(--secondary);
}

.col-now {
  border-top: 2px solid var(--accent);
}

.col-later {
  border-top-width: 2px;
}

/* Panel */

.panel {
  display: flex;
  flex-wrap: wrap;
  gap: 40px 64px;
  padding: clamp(24px, 6vw, 64px);
  margin-bottom: clamp(64px, 10vw, 120px);
  border: 1px solid var(--rule);
  border-radius: 10px;
  background: var(--panel);
}

.panel-intro {
  flex: 1 1 260px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.panel-intro h2 {
  font-size: clamp(26px, 3.4vw, 34px);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.2;
}

.points {
  flex: 2 1 420px;
  min-width: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.points li {
  display: flex;
  gap: 16px;
}

.points .arrow {
  font-family: var(--mono);
  color: var(--accent);
}

.points strong {
  font-weight: 600;
}

.points .detail {
  color: var(--secondary);
}

/* Long-form pages */

.prose {
  max-width: 42em;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: clamp(32px, 6vw, 72px) 0 clamp(64px, 10vw, 120px);
}

.prose h1 {
  font-size: clamp(34px, 5vw, 48px);
  line-height: 1.1;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.prose h2 {
  margin-top: 24px;
  font-size: 24px;
  font-weight: 600;
  line-height: 1.3;
}

.prose p,
.prose li {
  color: var(--secondary);
}

.prose .intro {
  font-size: 19px;
}

.prose ul {
  padding-left: 1.2em;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.prose .date {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
}

/* Footer */

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 24px;
  padding: 28px 0 40px;
  border-top: 1px solid var(--rule);
  font-size: 14px;
  color: var(--muted);
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}

.site-footer a {
  color: var(--secondary);
}

/* Focus */

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}
