:root {
  --bg: #000;
  --card: #0a0a0a;
  --ring: rgba(255, 255, 255, 0.145);
  --chip: #1f1f1f;
  --text: #ededed;
  --sub: #e7e7e7;
  --muted: #999999;
  --blue: #52a8ff;
  --green: #62c073;
  --bar: rgba(255, 255, 255, 0.18);
  --display: "Inter Display", "Inter Tight", "Inter", system-ui, sans-serif;
  --sans: "Inter", system-ui, sans-serif;
  --num: "Geist", "Inter", system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --pad: clamp(20px, 4vw, 56px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
.mono { font-family: var(--mono); }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

/* ---------- header ---------- */
.site-header {
  position: absolute;
  top: 38px;
  left: 0;
  right: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 var(--pad);
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--sans); font-weight: 500; font-size: 20px; letter-spacing: -0.4px; }
.brand-logo { width: 30px; height: auto; image-rendering: pixelated; }
.nav { display: flex; gap: 32px; font-size: 16px; }
.nav a { color: #fff; opacity: .86; transition: opacity .15s; }
.nav a:hover { opacity: 1; }
.header-right { display: flex; justify-content: flex-end; align-items: center; gap: 12px; }

.btn-square {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 0;
  background: #fff;
  color: #121212;
  padding: 8px 12px;
  font-size: 16px;
  font-weight: 500;
  border: 0;
  cursor: pointer;
  transition: box-shadow .15s, transform .15s;
}
.btn-square:hover { box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.145); }
.btn-square .arrow { width: 10px; height: 10px; }
.btn-lg { font-size: 20px; padding: 12px 18px; }
.btn-lg .arrow { width: 12px; height: 12px; }
.btn-ghost { font-family: var(--mono); font-size: 14px; color: var(--muted); padding: 12px 4px; border-bottom: 1px solid transparent; }
.btn-ghost:hover { color: #fff; border-color: var(--ring); }

.menu-btn { display: none; width: 40px; height: 40px; border: 0; background: transparent; box-shadow: 0 0 0 1px var(--ring); cursor: pointer; position: relative; z-index: 31; }
.menu-btn span { position: absolute; left: 11px; right: 11px; height: 1.5px; background: #fff; transition: transform .2s, top .2s; }
.menu-btn span:first-child { top: 15px; }
.menu-btn span:last-child { top: 23px; }
.menu-open .menu-btn span:first-child { top: 19px; transform: rotate(45deg); }
.menu-open .menu-btn span:last-child { top: 19px; transform: rotate(-45deg); }

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: #000;
  padding: 120px var(--pad) 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.mobile-menu[hidden] { display: none; }
.mobile-menu nav { display: flex; flex-direction: column; }
.mobile-menu nav a { font-family: var(--display); font-weight: 500; font-size: 40px; letter-spacing: -1.6px; padding: 10px 0; border-bottom: 1px solid var(--ring); }
.menu-open { overflow: hidden; }
.menu-open .site-header { position: fixed; }

/* ---------- hero ---------- */
.hero { position: relative; height: 100svh; min-height: 620px; overflow: hidden; display: flex; align-items: flex-end; }
#jet { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.scrim {
  position: absolute;
  inset: 30% 0 0 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.76) 0%, rgba(0, 0, 0, 0) 93.785%);
  pointer-events: none;
}
.scrim::after { content: ""; position: absolute; inset: 40% 0 0 0; background: linear-gradient(to top, #000 0%, rgba(0, 0, 0, 0) 100%); }
.hero-inner { position: relative; z-index: 2; padding: 0 var(--pad) clamp(56px, 10vh, 112px); max-width: calc(752px + 2 * var(--pad)); }
.headline-fluid {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(32px, 5.2vw, 60px);
  line-height: 1.04;
  letter-spacing: -0.045em;
  margin: 18px 0 18px;
  color: #fff;
  max-width: 752px;
}
.hero-sub { color: var(--sub); font-size: 16px; max-width: 600px; margin: 0 0 28px; }
.hero-ctas { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; }
.hero-caption { position: absolute; right: var(--pad); bottom: 28px; z-index: 3; font-size: 12px; color: var(--muted); max-width: 46%; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; text-align: right; }
.hero { cursor: crosshair; touch-action: manipulation; }
.hero a, .hero button { cursor: pointer; }
/* let taps on empty overlay areas reach the canvas */
.hero-inner, .scrim { pointer-events: none; }
.hero-inner a, .hero-inner button, .hero-inner .hello-tag, .hero-inner h1, .hero-inner p { pointer-events: auto; }
.new-event {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 13px; color: #ededed;
  background: rgba(10, 10, 10, 0.8); backdrop-filter: blur(6px);
  border: 0; border-radius: 100px; padding: 8px 14px;
  box-shadow: 0 0 0 1px var(--ring);
  transition: box-shadow .15s, color .15s;
}
.new-event svg { width: 13px; height: 13px; color: var(--blue); transition: transform .4s; }
.new-event:hover { box-shadow: 0 0 0 1px var(--blue); }
.new-event:active svg { transform: rotate(90deg) scale(1.2); }

/* friendly hello line above the headline */
.hello { display: flex; flex-wrap: wrap; gap: 10px; }
.hello-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 15px;
  font-weight: 400;
  color: #ededed;
  background: rgba(31, 31, 31, 0.8);
  backdrop-filter: blur(6px);
  border-radius: 100px;
  padding: 6px 14px;
  letter-spacing: 0;
}
.hello-tag.soft { color: var(--muted); }
.hello-tag .dot { width: 7px; height: 7px; }

/* ---------- chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.v-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--chip);
  border-radius: 100px;
  padding: 4px 10px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  white-space: nowrap;
}
.dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; background: var(--muted); flex: none; }
.dot.pass { background: var(--green); }
.dot.warn { background: var(--muted); }
.dot.fail { background: var(--text); }
.dot.active { background: var(--blue); }

/* ---------- sections ---------- */
.section { padding: clamp(72px, 10vw, 128px) var(--pad) 0; max-width: 1280px; margin: 0 auto; position: relative; }
.section-head { max-width: 760px; margin-bottom: 36px; }
.eyebrow { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin: 0 0 14px; }
.headline { font-family: var(--display); font-weight: 500; font-size: clamp(30px, 4vw, 48px); letter-spacing: -0.04em; line-height: 1.05; margin: 0 0 14px; }
.lede { color: var(--muted); margin: 0; max-width: 620px; }

.card {
  background: var(--card);
  box-shadow: 0 0 0 1px var(--ring);
  border-radius: 12px;
  position: relative;
  overflow: hidden;
}
.glow::before {
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;
  left: var(--gx, 50%);
  top: var(--gy, -40%);
  transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, rgba(82, 168, 255, 0.12), rgba(82, 168, 255, 0) 70%);
  pointer-events: none;
  opacity: 0;
  transition: opacity .3s;
}
.glow:hover::before { opacity: 1; }
.glow:hover { box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.24); }

/* ---------- event stream ---------- */
.stream-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 18px; box-shadow: inset 0 -1px 0 var(--ring); flex-wrap: wrap; }
.trace { font-size: 13px; color: var(--muted); }
.trace b { color: #fff; font-weight: 500; }
.stream-body { display: grid; grid-template-columns: 240px 1fr; min-height: 420px; }
.stream-list { box-shadow: inset -1px 0 0 var(--ring); max-height: 460px; overflow-y: auto; padding: 8px 0; }
.stream-list button {
  all: unset;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 16px;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.stream-list button span.n { margin-left: auto; color: #555; }
.stream-list button:hover { color: #fff; background: rgba(255, 255, 255, 0.03); }
.stream-list button[aria-pressed="true"] { color: #fff; background: rgba(82, 168, 255, 0.08); box-shadow: inset 2px 0 0 var(--blue); }
.stream-table-wrap { overflow: auto; max-height: 460px; }
.stream-table, .data-table { width: 100%; border-collapse: collapse; font-family: var(--mono); font-size: 12.5px; }
.stream-table th, .data-table th { position: sticky; top: 0; background: var(--card); text-align: left; font-weight: 400; color: var(--muted); font-size: 11.5px; letter-spacing: .04em; padding: 12px 16px; box-shadow: inset 0 -1px 0 var(--ring); z-index: 1; }
.stream-table td, .data-table td { padding: 10px 16px; box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.06); color: var(--muted); vertical-align: middle; }
.stream-table td:first-child { color: var(--text); max-width: 380px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stream-table td:first-child a:hover { text-decoration: underline; text-decoration-color: var(--ring); }
.stream-table td:nth-child(2) { width: 38%; min-width: 160px; }
.r { text-align: right; }
.stream-table tr { cursor: default; }
.stream-table tr:hover td { background: rgba(255, 255, 255, 0.02); }
.sha { color: #666; margin-right: 10px; }
.timeline { position: relative; width: 100%; height: 6px; background: transparent; }
.timeline::before { content: ""; position: absolute; inset: 2.5px 0; background: rgba(255, 255, 255, 0.06); }
.timeline i { position: absolute; top: 0; height: 100%; border-radius: 2px; background: var(--bar); transition: background .15s; }
.stream-table tr:hover .timeline i, .stream-table tr.focus .timeline i { background: var(--blue); }

/* ---------- bento ---------- */
.bento { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.bento .card { padding: 24px; min-height: 420px; display: flex; flex-direction: column; }
.card-kicker { font-size: 12px; color: var(--muted); text-transform: uppercase; margin: 0 0 10px; }
.bento h3 { font-family: var(--display); font-weight: 500; font-size: 22px; letter-spacing: -0.6px; margin: 0 0 6px; }
.card-sub { color: var(--muted); font-size: 14px; margin: 0 0 20px; }
.card-sub.mono { font-size: 12px; }
.reg-list { list-style: none; margin: auto 0 0; padding: 0; font-size: 12.5px; }
.reg-list li { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center; padding: 10px 0; box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.06); color: var(--text); }
.reg-list li span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.delta { color: var(--muted); }
.delta.pos { color: var(--green); }
.stacks { display: flex; flex-direction: column; gap: 14px; margin-top: auto; }
.stack-row { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.stack-row .lab { display: flex; justify-content: space-between; margin-bottom: 6px; }
.stack-row .lab b { color: var(--text); font-weight: 400; }
.stack-bar { display: flex; height: 10px; gap: 2px; }
.stack-bar i { display: block; height: 100%; border-radius: 2px; }
.legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: 11px; color: var(--muted); margin-top: 18px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }
.diff { margin: auto 0 0; font-size: 11.5px; line-height: 1.65; background: #050505; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08); border-radius: 8px; padding: 10px 0; overflow: hidden; white-space: pre; }
.diff span { display: block; padding: 0 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; border-left: 2px solid transparent; }
.diff .add { color: var(--text); border-left-color: var(--green); background: rgba(98, 192, 115, 0.07); }
.diff .mod { color: var(--text); border-left-color: var(--blue); background: rgba(82, 168, 255, 0.07); }
.diff .del { color: #666; text-decoration: line-through; text-decoration-color: rgba(255, 255, 255, 0.15); }

/* ---------- metrics ---------- */
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); box-shadow: 0 0 0 1px var(--ring); }
.metric { padding: 32px 28px; box-shadow: 1px 0 0 var(--ring); }
.metric:last-child { box-shadow: none; }
.metric .num { font-family: var(--num); font-weight: 500; font-size: 56px; letter-spacing: -3.36px; line-height: 1; color: #fff; display: flex; align-items: baseline; gap: 8px; }
.metric .unit { font-size: 14px; letter-spacing: 0; color: var(--muted); }
.metric p { margin: 12px 0 0; color: var(--muted); font-size: 13px; }

/* ---------- projects ---------- */
.projects { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.project { padding: 22px 24px; display: flex; flex-direction: column; gap: 12px; min-height: 230px; transition: box-shadow .15s; }
.project:hover { box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.28); }
.project-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.project h3 { font-family: var(--display); font-weight: 500; font-size: 21px; letter-spacing: -0.6px; margin: 0; word-break: break-word; }
.project p { color: var(--muted); margin: 0; font-size: 14.5px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.project .libs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.project .libs span { font-family: var(--mono); font-size: 11.5px; color: var(--muted); box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1); padding: 2px 8px; border-radius: 100px; }
.project-meta { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 12px; color: var(--muted); padding-top: 12px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06); }
.project-meta .open { color: #fff; }

/* ---------- stack table ---------- */
.table-card { overflow: auto; max-height: 520px; }
.data-table td:first-child { color: var(--text); }
.usage { position: relative; height: 6px; min-width: 140px; }
.usage::before { content: ""; position: absolute; inset: 2.5px 0; background: rgba(255, 255, 255, 0.06); }
.usage i { position: absolute; left: 0; top: 0; height: 100%; border-radius: 2px; background: var(--bar); }
.data-table tr:hover .usage i { background: var(--blue); }

.contrib { margin-top: 16px; padding: 20px 24px; }
.contrib-head { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--muted); margin-bottom: 16px; }
.contrib-grid { display: grid; grid-auto-flow: column; grid-template-rows: repeat(7, 11px); grid-auto-columns: 11px; gap: 3px; overflow-x: auto; padding-bottom: 4px; }
.contrib-grid i { display: block; width: 11px; height: 11px; border-radius: 2px; background: #161616; }
.contrib-grid i[data-l="1"] { background: rgba(82, 168, 255, 0.25); }
.contrib-grid i[data-l="2"] { background: rgba(82, 168, 255, 0.45); }
.contrib-grid i[data-l="3"] { background: rgba(82, 168, 255, 0.7); }
.contrib-grid i[data-l="4"] { background: #52a8ff; }

/* ---------- support ---------- */
.support-card { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; padding: clamp(28px, 5vw, 56px); }
.support-card .lede { margin-bottom: 28px; }
.contact-list { list-style: none; margin: 0; padding: 0; align-self: end; font-size: 13px; }
.contact-list li { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.08); }
.contact-list li span { color: var(--muted); }
.contact-list a { color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.contact-list a:hover { color: var(--blue); }

.footer { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 64px var(--pad) 40px; max-width: 1280px; margin: 0 auto; font-size: 12px; color: var(--muted); }

/* ---------- responsive ---------- */
@media (max-width: 1024px) {
  .bento { grid-template-columns: 1fr 1fr; }
  .bento .card:last-child { grid-column: 1 / -1; }
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .metric:nth-child(2) { box-shadow: 0 1px 0 var(--ring); }
  .metric:nth-child(1) { box-shadow: 1px 0 0 var(--ring), 0 1px 0 var(--ring); }
  .metric:nth-child(3) { box-shadow: 1px 0 0 var(--ring); }
  /* detector sits above the text: caption moves to the top-right under the header */
  .hero-caption { top: 96px; bottom: auto; max-width: none; left: var(--pad); align-items: flex-end; }
  .hero-caption .legend-line { display: none; }
}
@media (max-width: 820px) {
  .site-header { grid-template-columns: 1fr auto; top: 22px; }
  .nav { display: none; }
  .menu-btn { display: block; }
  .header-right .btn-square { display: none; }
  .stream-body { grid-template-columns: 1fr; }
  .stream-list { display: flex; overflow-x: auto; max-height: none; box-shadow: inset 0 -1px 0 var(--ring); padding: 0; }
  .stream-list button { width: auto; flex: none; padding: 12px 14px; }
  .stream-list button[aria-pressed="true"] { box-shadow: inset 0 -2px 0 var(--blue); }
  .bento, .projects { grid-template-columns: 1fr; }
  .support-card { grid-template-columns: 1fr; }
  .stream-table td:nth-child(2) { min-width: 110px; }
  .hero-caption { top: 76px; }
  .hello-tag { font-size: 14px; padding: 5px 12px; }
  .hero-sub { font-size: 15px; }
}
@media (max-width: 520px) {
  .hero { min-height: 640px; }
  .hero-inner { padding-bottom: 40px; }
  .headline-fluid { font-size: 30px; letter-spacing: -1px; }
  .hello-tag.soft { display: none; }
  .btn-lg { font-size: 17px; padding: 11px 16px; }
  .btn-ghost { font-size: 12.5px; }
  .new-event { font-size: 12px; padding: 7px 12px; }
  .metrics { grid-template-columns: 1fr; }
  .metric, .metric:nth-child(n) { box-shadow: 0 1px 0 var(--ring); }
  .metric .num { font-size: 48px; }
  .stream-table th:nth-child(3), .stream-table td:nth-child(3) { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
/* phones in landscape: short viewport, detector on the right, compact text on the left */
@media (orientation: landscape) and (max-height: 520px) {
  .hero { min-height: 100svh; height: auto; padding-top: 80px; }
  .hero-inner { max-width: 56%; padding-bottom: 24px; }
  .headline-fluid { font-size: 24px; margin: 10px 0; }
  .hero-sub { display: none; }
  .hello-tag.soft { display: none; }
  .hero-caption { display: none; }
  .site-header { top: 16px; }
}
