/* Pulse site. Roboto for everything; a monospace only for code. Dark only, like the object. */

@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(roboto-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: dark;
  --bg: #0e1013;
  --panel: #14171b;
  --panel-2: #1a1e24;
  --line: #23282f;
  --line-2: #30363f;
  --text: #f2f3f5;
  --soft: #c4c9d0;
  --muted: #8a919b;
  --faint: #4b525b;
  --minor: #ffb020;
  --critical: #ff5a4f;
  --accent: #f2f3f5;
  --font: 'Roboto', system-ui, sans-serif;
  --mono: 'Roboto Mono', ui-monospace, Menlo, Consolas, monospace;
  --nav-w: 240px;
}

* { box-sizing: border-box; }
html { scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 var(--font);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--text); text-decoration: underline; text-decoration-color: var(--faint); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--text); }
code, pre, kbd { font-family: var(--mono); }
:not(pre) > code { font-size: .88em; color: var(--soft); background: var(--panel-2); padding: .08em .32em; border-radius: 4px; }
:focus-visible { outline: 2px solid var(--minor); outline-offset: 3px; }
img, svg { max-width: 100%; }
img { height: auto; }

/* ─── Frame ─────────────────────────────────────────────── */

.site-head {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 18px;
  height: 60px; padding: 0 24px;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 700; font-size: 20px; letter-spacing: -.02em; }
.brand .mark { width: 28px; height: 28px; }
.site-head .links { display: flex; gap: 20px; margin-left: auto; font-size: 14px; align-items: center; }
.site-head .links a { color: var(--muted); text-decoration: none; }
.site-head .links a:hover, .site-head .links a[aria-current] { color: var(--text); }
.site-head .links a.gh { display: inline-flex; align-items: center; gap: 8px; color: var(--text); padding: 5px 12px; margin: -5px 0; border: 1px solid var(--line-2); border-radius: 999px; }
.site-head .links a.gh:hover { border-color: var(--text); }
.site-head .links a.gh svg { width: 15px; height: 15px; }
.menu-toggle { display: none; margin-left: auto; }

.site { display: grid; grid-template-columns: var(--nav-w) minmax(0, 1fr); }
.site-nav {
  position: sticky; top: 60px; align-self: start;
  height: calc(100vh - 60px); overflow: auto;
  padding: 24px 16px 40px 24px;
  border-right: 1px solid var(--line);
  font-size: 14px;
}
.site-nav h2 { margin: 22px 0 6px; font-size: 13px; font-weight: 500; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.site-nav h2:first-child { margin-top: 0; }
.site-nav ul { list-style: none; margin: 0; padding: 0; }
.site-nav a { display: block; padding: 4px 10px; margin-left: -10px; border-radius: 6px; color: var(--soft); text-decoration: none; }
.site-nav a:hover { color: var(--text); background: var(--panel-2); }
.site-nav a[aria-current] { color: var(--text); font-weight: 500; }
.site-nav .nav-foot { margin: 28px 0 0; padding-top: 16px; border-top: 1px solid var(--line); }
.site-nav .nav-foot a { display: inline; padding: 0; margin: 0; color: var(--muted); }
.home-nav { display: none; }

.page { min-width: 0; padding: 48px 56px 96px; }
.prose { max-width: 760px; }
.wide { max-width: 1120px; }

/* ─── Text ──────────────────────────────────────────────── */

.page h1 { margin: 0 0 12px; font-size: clamp(32px, 4.4vw, 44px); line-height: 1.1; letter-spacing: -.025em; font-weight: 500; }
.page h2 { margin: 56px 0 12px; font-size: 25px; line-height: 1.2; letter-spacing: -.015em; font-weight: 500; }
.page h3 { margin: 36px 0 8px; font-size: 18px; font-weight: 500; }
.page p, .page li { color: var(--soft); }
.page p { margin: 0 0 16px; }
.page ul, .page ol { padding-left: 22px; margin: 0 0 16px; }
.page li { margin: 6px 0; }
.page strong { color: var(--text); font-weight: 500; }
.lede { font-size: 19px; color: var(--soft); max-width: 680px; }
.eyebrow { margin: 0 0 8px; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }

pre {
  margin: 0 0 20px; padding: 16px 18px;
  background: #0a0c0f; color: #dbe0e6;
  border: 1px solid var(--line); border-radius: 10px;
  overflow: auto; font-size: 13.5px; line-height: 1.6;
}

table { width: 100%; border-collapse: collapse; margin: 0 0 24px; font-size: 14.5px; }
th, td { text-align: left; vertical-align: top; padding: 9px 12px; border-bottom: 1px solid var(--line); }
th { color: var(--text); font-weight: 500; }
td { color: var(--soft); }
td:first-child { white-space: nowrap; color: var(--text); }
.table-wrap { overflow-x: auto; }

.note { margin: 0 0 20px; padding: 14px 18px; border: 1px solid var(--line-2); border-left: 3px solid var(--minor); border-radius: 8px; background: var(--panel); }
.note p:last-child { margin: 0; }

/* ─── Pictures ──────────────────────────────────────────── */

.shot { margin: 8px 0 28px; }
.shot img { display: block; width: 100%; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); }
.shot figcaption { padding: 10px 2px 0; font-size: 14px; color: var(--muted); }
.shots { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; margin: 8px 0 28px; }
.shots .shot { margin: 0; }

/* ─── Cards, terms, pager ───────────────────────────────── */

.terms { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin: 24px 0 8px; padding: 0; list-style: none; }
.page .terms { padding: 0; }
.terms li { margin: 0; padding: 16px 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.terms strong { display: block; font-size: 16px; }
.terms p { margin: 6px 0 0; font-size: 15px; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; margin: 0 0 32px; padding: 0; list-style: none; }
.page .cards { padding: 0; }
.cards li { margin: 0; }
.card { display: block; height: 100%; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); color: inherit; text-decoration: none; overflow: hidden; }
.card:hover, .card:focus-visible { border-color: var(--soft); outline: none; }
.card img { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; background: var(--bg); }
.card strong { display: block; padding: 12px 14px 0; color: var(--text); font-weight: 500; }
.card span { display: block; padding: 2px 14px 14px; color: var(--muted); font-size: 14px; }

.pager { display: flex; justify-content: space-between; gap: 16px; margin-top: 72px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 15px; }
.pager a { text-decoration: none; }
.pager .next { margin-left: auto; text-align: right; }
.pager small { display: block; color: var(--muted); }

.button { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border: 1px solid var(--line-2); border-radius: 999px; color: var(--text); text-decoration: none; font-size: 15px; }
.button:hover { border-color: var(--text); }
.button.primary { background: var(--text); color: var(--bg); border-color: var(--text); }
.button.primary:hover { background: #fff; }

/* ─── Home ──────────────────────────────────────────────── */

.home { max-width: 1120px; margin: 0 auto; padding: 32px 24px 96px; }
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 48px; align-items: center; padding: 24px 0 48px; }
.hero h1 { font-size: clamp(38px, 5.4vw, 60px); margin-bottom: 16px; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero .shot { margin: 0; }
.home h2 { margin-top: 72px; }
.home .shots { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.closing { margin-top: 72px; padding-top: 24px; border-top: 1px solid var(--line); color: var(--muted); font-size: 15px; }
.closing a { color: var(--soft); }

/* ─── Small screens ─────────────────────────────────────── */

@media (max-width: 900px) {
  .site { grid-template-columns: 1fr; }
  .site-nav { display: none; position: fixed; top: 60px; left: 0; right: 0; height: calc(100vh - 60px); background: var(--bg); border-right: 0; z-index: 15; }
  body.nav-open .site-nav { display: block; }
  .site-head .links { display: none; }
  .menu-toggle { display: inline-flex; align-items: center; padding: 6px 12px; border: 1px solid var(--line-2); border-radius: 999px; background: none; color: var(--text); font: 14px var(--font); cursor: pointer; }
  .page { padding: 32px 20px 72px; }
  .hero { grid-template-columns: 1fr; gap: 28px; }
  .home { padding: 16px 16px 72px; }
  .home .shots { grid-template-columns: 1fr; }
  td:first-child { white-space: normal; }
}

/* ─── Elements ──────────────────────────────────────────── */

.elements { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; margin: 8px 0 28px; }
.elements.two { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.element { margin: 0; }
.element img { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); }
.element figcaption { padding: 10px 2px 0; font-size: 14px; color: var(--muted); line-height: 1.55; }
.element figcaption strong { color: var(--text); font-weight: 500; }
.element figcaption code { font-size: .85em; }
.prose > .element { margin: 8px 0 28px; max-width: 520px; }
