/* The notes: the press kit's white desk, soft glows and glass, as a single column to read.
   The figures of each post hang from a line by clips, like photos in the app. */
:root {
  --font: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-display: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --ink: #16151d;
  --ink-2: rgba(22, 21, 29, 0.68);
  --ink-3: rgba(22, 21, 29, 0.46);
  --accent: #0a84ff;
  --wall: #ffffff;
  --glow-blue: rgba(92, 198, 255, 0.5);
  --glow-violet: rgba(169, 139, 255, 0.4);
  --glow-pink: rgba(255, 143, 208, 0.4);
  --glow-orange: rgba(255, 179, 107, 0.45);
  --grid: rgba(90, 90, 140, 0.045);
  --title: linear-gradient(90deg, #9d4bff, #e45bd0 55%, #ff8a5b);
  --glass: rgba(255, 255, 255, 0.62);
  --glass-strong: rgba(255, 255, 255, 0.86);
  --code-bg: rgba(246, 246, 250, 0.9);
  --code-ink: #1d1d2b;
  --edge: rgba(22, 21, 29, 0.1);
  --hairline: rgba(0, 0, 0, 0.08);
  --shadow: 0 1px 1px rgba(0, 0, 0, 0.04), 0 10px 30px rgba(22, 20, 60, 0.12);
  --rope: rgba(22, 21, 29, 0.42);
  --button: #16151d;
  --button-ink: #ffffff;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #f5f5f7;
    --ink-2: rgba(245, 245, 247, 0.72);
    --ink-3: rgba(245, 245, 247, 0.48);
    --wall: #0b0b10;
    --glow-blue: rgba(47, 143, 216, 0.4);
    --glow-violet: rgba(122, 82, 224, 0.34);
    --glow-pink: rgba(209, 79, 159, 0.3);
    --glow-orange: rgba(217, 128, 58, 0.32);
    --grid: rgba(255, 255, 255, 0.035);
    --title: linear-gradient(90deg, #b57bff, #f070d8 55%, #ffa070);
    --glass: rgba(36, 34, 48, 0.5);
    --glass-strong: rgba(40, 38, 52, 0.78);
    --code-bg: rgba(20, 19, 28, 0.82);
    --code-ink: #e9e9f0;
    --edge: rgba(255, 255, 255, 0.16);
    --hairline: rgba(255, 255, 255, 0.08);
    --shadow: 0 1px 1px rgba(0, 0, 0, 0.2), 0 12px 34px rgba(0, 0, 0, 0.3);
    --rope: rgba(245, 245, 247, 0.4);
    --button: #f5f5f7;
    --button-ink: #16151d;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 16px/1.65 var(--font);
  color: var(--ink);
  background: var(--wall);
  -webkit-font-smoothing: antialiased;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.wall {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(22% 38% at 6% 20%, var(--glow-blue), transparent 70%),
    radial-gradient(26% 26% at 38% 14%, var(--glow-violet), transparent 70%),
    radial-gradient(26% 26% at 62% 18%, var(--glow-pink), transparent 70%),
    radial-gradient(22% 38% at 94% 24%, var(--glow-orange), transparent 70%),
    var(--wall);
}
.wall::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 34px 34px;
  -webkit-mask-image: radial-gradient(ellipse 60% 60% at 50% 40%, transparent 30%, #000 80%);
  mask-image: radial-gradient(ellipse 60% 60% at 50% 40%, transparent 30%, #000 80%);
}

.glass {
  background: var(--glass);
  -webkit-backdrop-filter: blur(30px) saturate(1.7);
  backdrop-filter: blur(30px) saturate(1.7);
  box-shadow: inset 0 0 0 0.5px var(--edge), var(--shadow);
}

/* ---------- Top bar ---------- */

.bar {
  position: sticky;
  top: calc(10px + env(safe-area-inset-top, 0px));
  z-index: 10;
  max-width: 1080px;
  margin: 10px auto 0;
  height: 52px;
  padding: 0 10px 0 16px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.brand { display: flex; align-items: center; gap: 9px; color: var(--ink); min-width: 0; }
.brand:hover { text-decoration: none; }
.brand b { font-weight: 650; letter-spacing: -0.01em; }
.brand span { color: var(--ink-3); font-weight: 500; }
.bar nav { display: flex; align-items: center; gap: 18px; font-size: 14px; font-weight: 500; }
.bar nav a:not(.pill) { color: var(--ink-2); }
.bar nav a:not(.pill):hover { color: var(--ink); text-decoration: none; }
.pill {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 16px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  transition: transform 0.2s var(--ease), opacity 0.2s;
}
.pill:hover { text-decoration: none; opacity: 0.88; }
.pill.dark { background: var(--button); color: var(--button-ink); }

/* ---------- Article ---------- */

main { max-width: 720px; margin: 0 auto; padding-block: 0 48px; }

.hero { text-align: center; padding: 64px 0 8px; }
.hero .icon { display: block; margin: 0 auto 22px; filter: drop-shadow(0 16px 28px rgba(30, 20, 80, 0.28)); }
.eyebrow { margin: 0; font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
h1 { margin: 10px 0 0; font: 700 clamp(34px, 6vw, 56px)/1.04 var(--font-display); letter-spacing: -0.035em; text-wrap: balance; }
h1 .tint { color: transparent; background: var(--title); -webkit-background-clip: text; background-clip: text; }
.byline { margin: 18px 0 0; font-size: 14px; color: var(--ink-3); }
.byline b { color: var(--ink-2); font-weight: 600; }

/* The four figures hang from a line by clips. */
.line { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; padding-top: 26px; margin: 44px 0 12px; }
.rope { position: absolute; left: -12px; top: 0; width: calc(100% + 24px); height: 40px; overflow: visible; pointer-events: none; }
.rope path { fill: none; stroke: var(--rope); stroke-width: 1.3; vector-effect: non-scaling-stroke; }
.fig { position: relative; border-radius: 16px; padding: 18px 16px 14px; transform-origin: 50% -14px; transform: rotate(var(--tilt, 0deg)); transition: transform 0.6s var(--ease); }
.fig:nth-child(2) { --tilt: -1.4deg; }
.fig:nth-child(3) { --tilt: 0.8deg; margin-top: 6px; }
.fig:nth-child(4) { --tilt: -0.6deg; margin-top: 8px; }
.fig:nth-child(5) { --tilt: 1.2deg; margin-top: 4px; }
.fig:hover { transform: rotate(0deg) translateY(-2px); }
.fig::before {
  content: "";
  position: absolute;
  top: -18px;
  left: calc(50% - 5px);
  width: 10px;
  height: 28px;
  border-radius: 4px;
  background: linear-gradient(90deg, #a9aab2, #f2f3f6 35%, #d3d4da 65%, #96979f);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25), inset 0 0 0 0.5px rgba(0, 0, 0, 0.15);
}
.fig b { display: block; font: 700 30px/1.1 var(--font-display); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.fig span { display: block; margin-top: 4px; font-size: 13px; line-height: 1.35; color: var(--ink-2); }
.figs-note { margin: 0; font-size: 12.5px; color: var(--ink-3); text-align: center; text-wrap: balance; }

.prose { margin-top: 40px; }
.prose > * { margin: 0; }
.prose > * + * { margin-top: 1.05em; }
.prose p, .prose li { color: var(--ink); }
.prose .lede { font-size: 19px; line-height: 1.55; color: var(--ink-2); }
.prose h2 {
  margin-top: 2.4em;
  font: 700 26px/1.2 var(--font-display);
  letter-spacing: -0.025em;
  text-wrap: balance;
  display: flex;
  align-items: baseline;
  gap: 12px;
}
.prose h2 .n { flex: none; font: 600 14px/1 var(--font-mono); color: var(--ink-3); transform: translateY(-3px); }
.prose h3 { margin-top: 1.6em; font: 650 17px/1.3 var(--font-display); letter-spacing: -0.01em; }
.prose ul { padding-left: 1.2em; }
.prose li + li { margin-top: 0.45em; }
.prose li::marker { color: var(--ink-3); }
.prose strong { font-weight: 650; }
.prose code {
  font: 0.86em/1 var(--font-mono);
  padding: 0.18em 0.4em;
  border-radius: 6px;
  background: var(--code-bg);
  box-shadow: inset 0 0 0 0.5px var(--edge);
  overflow-wrap: anywhere;
}
.prose pre {
  margin-top: 1.3em;
  padding: 16px 18px;
  border-radius: 14px;
  background: var(--code-bg);
  color: var(--code-ink);
  box-shadow: inset 0 0 0 0.5px var(--edge);
  overflow-x: auto;
  font: 13.5px/1.6 var(--font-mono);
  -webkit-overflow-scrolling: touch;
}
.prose pre code { font: inherit; padding: 0; background: none; box-shadow: none; overflow-wrap: normal; }
.prose .k { color: #ad3da4; }
.prose .s { color: #c41a16; }
.prose .c { color: var(--ink-3); }
@media (prefers-color-scheme: dark) {
  .prose .k { color: #ff7ab2; }
  .prose .s { color: #ff8170; }
}

.window { margin: 36px 0 0; border-radius: 16px; overflow: hidden; }
.chrome { height: 30px; display: flex; align-items: center; gap: 6px; padding: 0 10px; border-bottom: 0.5px solid var(--hairline); }
.chrome i { width: 9px; height: 9px; border-radius: 50%; background: rgba(128, 128, 140, 0.32); flex: none; }
.chrome span { margin-left: 8px; font-size: 12px; color: var(--ink-3); }
.window img { display: block; width: 100%; height: auto; }
.window figcaption { padding: 10px 14px 12px; font-size: 13px; color: var(--ink-2); border-top: 0.5px solid var(--hairline); }

.aside { margin-top: 1.3em; padding: 16px 18px; border-radius: 14px; font-size: 15px; line-height: 1.6; }
.aside p { margin: 0; }

.end { margin-top: 56px; padding: 26px 24px; border-radius: 20px; text-align: center; }
.end p { margin: 0 auto; max-width: 480px; color: var(--ink-2); }
.end .actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 18px; }
.end .pill.glass { color: var(--ink); }

footer { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; padding-block: 10px calc(36px + env(safe-area-inset-bottom, 0px)); font-size: 12.5px; color: var(--ink-3); }

/* ---------- The list of notes ---------- */

.posts { display: grid; gap: 14px; margin-top: 40px; }
.post { display: block; padding: 22px 24px; border-radius: 20px; color: var(--ink); transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease); }
.post:hover { text-decoration: none; transform: translateY(-2px); box-shadow: inset 0 0 0 0.5px var(--edge), 0 16px 40px rgba(22, 20, 60, 0.18); }
.post time { font-size: 13px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.post h2 { margin: 6px 0 0; font: 700 22px/1.25 var(--font-display); letter-spacing: -0.02em; text-wrap: balance; }
.post p { margin: 8px 0 0; color: var(--ink-2); }
.post .read { display: inline-block; margin-top: 12px; font-size: 14px; font-weight: 600; color: var(--accent); }

@media (max-width: 640px) {
  .bar nav a:not(.pill) { display: none; }
  .line { grid-template-columns: repeat(2, 1fr); row-gap: 40px; }
  .line .rope { display: none; }
  .fig { margin-top: 0 !important; }
  .prose h2 { font-size: 23px; }
  .prose .lede { font-size: 17.5px; }
}
@media (prefers-reduced-motion: reduce) {
  .fig, .pill, .post { transition: none; }
}
