@font-face {
  font-family: "Inter";
  src: url("fonts/inter-latin-var.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("fonts/jetbrains-mono-latin-var.woff2") format("woff2");
  font-weight: 100 800;
  font-display: swap;
}

/* The same tokens as the project sites, so this page reads as their parent. */
:root {
  --bg: #0f1523;
  --panel: #151a28;
  --panel-2: #1a2030;
  --line: #262d3d;
  --line-strong: #363e52;
  --fg: #ffffff;
  --text: #d9dde6;
  --muted: #9fa5b4;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --radius: 12px;

  /* Project accents, as on each project's own site. */
  --orange: #ef6031;
  --orange-text: #ff7a4d;
  --cyan: #2fb8d6;
  --cyan-text: #4cc6e1;
  --yellow: #f2c200;
  --yellow-text: #f5cf33;
}

/* Each project row carries its own accent and nothing else does. */
.accent-orange { --a: var(--orange); --a-text: var(--orange-text); --a-rgb: 239, 96, 49; }
.accent-cyan { --a: var(--cyan); --a-text: var(--cyan-text); --a-rgb: 47, 184, 214; }
.accent-yellow { --a: var(--yellow); --a-text: var(--yellow-text); --a-rgb: 242, 194, 0; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
.hero, .section, .footer { overflow-x: clip; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { color: var(--fg); margin: 0; }
h1, h2, .tagline { text-wrap: balance; }
p { margin: 0; }
code, pre { font-family: var(--mono); font-variant-ligatures: none; font-feature-settings: "calt" 0, "liga" 0; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; border-radius: 4px; }
.accent-orange :focus-visible, .accent-cyan :focus-visible, .accent-yellow :focus-visible { outline-color: var(--a); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 10;
  padding: 10px 14px; border-radius: 8px; background: var(--fg); color: var(--bg); font-weight: 600;
}
.skip:focus { top: 12px; }

.container { width: 100%; max-width: calc(1124px + 48px); margin: 0 auto; padding: 0 24px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 18px; border-radius: 8px;
  font-weight: 500; font-size: 17px; white-space: nowrap;
  transition: background-color .15s, border-color .15s, color .15s;
}
.btn-primary { background: var(--fg); color: var(--bg); }
.btn-primary:hover { background: #dfe3ea; }
.btn-outline { color: var(--fg); border: 1px solid #646c7e; }
.btn-outline:hover { border-color: var(--text); background: rgba(255,255,255,.04); }
.btn svg { width: 18px; height: 18px; }

/* Navigation */
.nav { position: relative; z-index: 2; }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 78px; }
.brand { display: inline-block; padding: 6px 0; color: var(--fg); font-weight: 700; font-size: 23px; letter-spacing: -0.015em; }
.nav nav { display: flex; align-items: center; gap: 30px; }
.nav nav a:not(.btn) { color: var(--muted); transition: color .15s; }
.nav nav a:not(.btn):hover { color: var(--fg); }
.nav .btn { height: 40px; padding: 0 16px; }

/* Hero */
.hero { position: relative; padding: 72px 0 88px; }
.hero-grid {
  position: absolute; inset: 0 0 auto auto; width: 50%; height: 520px; pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 51px 51px;
  -webkit-mask-image: radial-gradient(ellipse 80% 75% at 62% 45%, #000 25%, transparent 75%);
          mask-image: radial-gradient(ellipse 80% 75% at 62% 45%, #000 25%, transparent 75%);
}
.hero-inner { position: relative; display: grid; grid-template-columns: 1fr 468px; gap: 64px; align-items: center; }
.hero-eyebrow { display: block; color: var(--muted); font-size: 18.5px; font-weight: 400; line-height: 1.5; letter-spacing: normal; margin-bottom: 14px; }
.hero h1 { font-size: 56px; line-height: 1.06; font-weight: 700; letter-spacing: -0.03em; margin-bottom: 24px; }
.hero-lede { color: var(--text); font-size: 18px; line-height: 1.6; max-width: 36em; }
.actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }

/* Terminal (hero and beanstalkd-rs preview) */
.terminal {
  position: relative;
  background: linear-gradient(180deg, #1b1f2a, #181c26);
  border: 1px solid var(--line-strong); border-radius: var(--radius);
}
.terminal-title {
  height: 36px; display: grid; place-items: center;
  color: var(--text); font: 400 14px/1 var(--mono); border-bottom: 1px solid var(--line-strong);
  background: rgba(255,255,255,.03); border-radius: var(--radius) var(--radius) 0 0;
}
.terminal-body { margin: 0; padding: 24px 22px 26px; font-size: 16px; line-height: 28px; color: #e6e6ec; white-space: pre; overflow-x: auto; }
.terminal-body .dim { color: var(--muted); }

/* Hero terminal: the three accents meet behind it. */
.hero .terminal::before {
  content: ""; position: absolute; inset: -110px -90px; z-index: -1; pointer-events: none;
  background:
    radial-gradient(closest-side at 30% 65%, rgba(239, 96, 49, .16), transparent),
    radial-gradient(closest-side at 72% 38%, rgba(47, 184, 214, .20), transparent),
    radial-gradient(closest-side at 62% 82%, rgba(242, 194, 0, .10), transparent);
}
.ls a { padding: 4px 0; border-radius: 3px; text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 4px; transition: text-decoration-color .15s; }
.ls a:hover { text-decoration-color: currentColor; }
.ls .o { color: var(--orange-text); }
.ls .c { color: var(--cyan-text); }
.ls .y { color: var(--yellow-text); }
.cursor { display: inline-block; width: .6em; height: 1.1em; vertical-align: -.2em; background: var(--text); animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .cursor { animation: none; }
}

/* Sections */
.section > .container { padding-top: 96px; }
.section > .container::before { content: ""; display: block; height: 1px; margin-top: -96px; margin-bottom: 95px; background: var(--line); }
.section-head { margin-bottom: 40px; }
.eyebrow { color: var(--muted); font-weight: 500; font-size: 15px; text-transform: uppercase; letter-spacing: .12em; }
.section h2 { font-size: 44px; line-height: 1.1; font-weight: 700; letter-spacing: -0.028em; margin-top: 10px; }

/* Project rows */
.projects { list-style: none; margin: 0; padding: 0; display: grid; gap: 28px; }
.project {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: center;
  padding: 44px 44px 44px 48px;
  background: var(--panel); border: 1px solid var(--line-strong); border-radius: var(--radius);
  scroll-margin-top: 24px;
}
.project:nth-child(even) { padding: 44px 48px 44px 44px; }
.project:nth-child(even) .project-copy { order: 2; }
.project:nth-child(even) .preview { order: 1; }

.tag {
  display: inline-block; padding: 2px 10px; border-radius: 6px;
  font-size: 15px; font-weight: 500; line-height: 22px;
  color: var(--a-text); background: rgba(var(--a-rgb), .1); border: 1px solid rgba(var(--a-rgb), .55);
}
.project h3 { font-size: 40px; line-height: 1.1; font-weight: 700; letter-spacing: -0.028em; margin-top: 14px; }
.project h3 a:hover { color: var(--a-text); }
.tagline { color: var(--fg); font-size: 21px; font-weight: 500; letter-spacing: -0.01em; margin-top: 8px; }
.desc { color: var(--muted); font-size: 17px; line-height: 1.55; margin-top: 14px; max-width: 34em; }
.desc code { white-space: nowrap; }

.figures { display: grid; grid-template-columns: repeat(2, minmax(0, max-content)); justify-content: start; margin: 26px 0 0; }
.figures div { padding-right: 32px; }
.figures div + div { padding-left: 32px; padding-right: 0; border-left: 1px solid var(--line-strong); }
.figures dt { font-size: 38px; font-weight: 700; line-height: 1; letter-spacing: -0.03em; color: var(--fg); font-variant-numeric: tabular-nums; }
.figures div:first-child dt { color: var(--a); }
.figures dd { margin: 10px 0 0; color: var(--muted); font-size: 15.5px; }

.chip {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  max-width: 100%; min-height: 48px; margin-top: 28px; padding: 8px 8px 8px 16px;
  background: rgba(var(--a-rgb), .05); border: 1px solid rgba(var(--a-rgb), .55); border-radius: 8px;
}
.chip code { min-width: 0; overflow-x: auto; white-space: pre; font-size: 14.5px; color: var(--fg); scrollbar-width: none; }
.chip code::-webkit-scrollbar { display: none; }
.prompt { color: var(--a); }
.copy {
  flex: none; display: inline-grid; place-items: center; width: 32px; height: 32px; padding: 0;
  background: none; border: 0; border-radius: 6px; color: var(--muted); cursor: pointer;
  transition: color .15s, background-color .15s;
}
.copy svg { width: 20px; height: 20px; }
.copy:hover { color: var(--fg); background: rgba(255,255,255,.06); }
.copy .ok { display: none; }
.copy.done { color: var(--a); }
.copy.done .idle { display: none; }
.copy.done .ok { display: block; }

.links { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 30px; margin-top: 22px; }
.links a { display: inline-flex; align-items: center; min-height: 32px; color: var(--text); transition: color .15s; }
.links a:hover { color: var(--fg); text-decoration: underline; text-underline-offset: 4px; }
.links a.primary { color: var(--a-text); font-weight: 600; }
.links a.primary:hover { color: var(--a-text); }

/* Previews echo each project's own site. */
.preview { position: relative; isolation: isolate; }
.preview::before {
  content: ""; position: absolute; inset: -70px -60px; z-index: -1; pointer-events: none;
  background: radial-gradient(closest-side, rgba(var(--a-rgb), .3), transparent);
}
.preview .terminal, .preview .doc { border-color: rgba(var(--a-rgb), .5); }
.preview .terminal-body { font-size: 15px; line-height: 27px; }
.preview .o { color: var(--orange-text); }

.doc { background: linear-gradient(180deg, #1c2335, #19202f); border: 1px solid var(--line-strong); border-radius: var(--radius); }
.doc-title { height: 44px; padding: 0 18px; display: flex; align-items: center; font: 400 15px/1 var(--mono); color: var(--text); border-bottom: 1px solid #2b3550; }
.doc-body { margin: 0; padding: 16px 18px 18px; font-size: 15px; line-height: 27px; color: var(--text); white-space: pre; overflow-x: auto; }
.doc-body .hl { display: inline-block; margin-left: -8px; padding: 2px 8px; line-height: 23px; border-radius: 6px; background: rgba(var(--a-rgb), .2); }
.doc-body .k { color: #6fd3ea; }
.doc-body .s { color: #a5e8a0; }
.doc-body .n { color: #f0b46a; }
.doc-body.html .t { color: #8f9bb3; }
.doc-body.html .at { color: var(--yellow-text); }

/* Footer */
.footer { margin-top: 112px; border-top: 1px solid var(--line); padding: 32px 0 56px; }
.footer-inner { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px 40px; flex-wrap: wrap; }
.footer .brand { font-size: 19px; }
.footer p { color: var(--muted); font-size: 15.5px; margin-top: 8px; }
.footer nav { display: flex; gap: 8px 28px; flex-wrap: wrap; }
.footer nav a { display: inline-flex; align-items: center; min-height: 32px; color: var(--text); }
.footer nav a:hover { color: var(--fg); text-decoration: underline; text-underline-offset: 4px; }

/* Narrow screens */
@media (max-width: 1100px) {
  .hero-inner { grid-template-columns: minmax(0, 1fr); gap: 56px; }
  .hero .terminal { max-width: 520px; }
  .hero-grid { width: 100%; }
  .project, .project:nth-child(even) { grid-template-columns: minmax(0, 1fr); gap: 44px; padding: 36px; }
  .project:nth-child(even) .project-copy, .project:nth-child(even) .preview { order: 0; }
  .preview { max-width: 560px; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .nav-inner { height: 68px; }
  .brand { font-size: 20px; }
  .nav nav { gap: 20px; }
  .hero { padding: 36px 0 72px; }
  .hero-eyebrow { font-size: 16px; }
  .hero h1 { font-size: 40px; }
  .hero-lede { font-size: 17.5px; }
  .actions .btn { flex: 1 1 auto; }
  .terminal-body, .preview .terminal-body, .doc-body { font-size: 13px; line-height: 23px; padding: 16px; }
  .section > .container { padding-top: 72px; }
  .section > .container::before { margin-top: -72px; margin-bottom: 71px; }
  .section h2 { font-size: 34px; }
  .section-head { margin-bottom: 28px; }
  .project, .project:nth-child(even) { padding: 26px 20px 28px; gap: 36px; }
  .project h3 { font-size: 32px; }
  .tagline { font-size: 18.5px; }
  .desc { font-size: 16px; }
  .figures div { padding-right: 20px; }
  .figures div + div { padding-left: 20px; }
  .figures dt { font-size: 32px; }
  .figures dd { font-size: 14.5px; }
  /* Wrap the command rather than hide part of it behind a scroll. */
  .chip code { font-size: 13.5px; line-height: 1.5; white-space: normal; }
  .links { gap: 4px 22px; }
  .preview::before { inset: -40px -20px; }
  .footer { margin-top: 88px; }
}

/* 404 links */
.notfound .sub a { color: var(--text); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 4px; }
.notfound .sub a:hover { color: var(--fg); text-decoration-color: currentColor; }
