@font-face {
  font-family: 'Geist'; font-style: normal; font-weight: 400 600; font-display: swap;
  src: url(assets/fonts/geist.woff2?v=1) format('woff2');
}
@font-face {
  font-family: 'Geist Mono'; font-style: normal; font-weight: 400 500; font-display: swap;
  src: url(assets/fonts/geist-mono.woff2?v=1) format('woff2');
}

:root {
  --bg: #fafafa;
  --ink: #18181b;
  --muted: #74747c;
  --line: #e4e4e7;
  --accent: #2b52e8;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --pad: clamp(20px, 5vw, 64px);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c0c0e;
    --ink: #ececef;
    --muted: #9a9aa2;
    --line: #232327;
    --accent: #94a8ff;
  }
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Geist', system-ui, -apple-system, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 0 clamp(40px, 6vw, 88px);
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 var(--pad);
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}
::selection { background: var(--accent); color: #fff; }
a { color: inherit; }
p { text-wrap: pretty; }
h1, h2 { text-wrap: balance; }

.skip {
  position: fixed; left: 20px; top: -100px; z-index: 10;
  padding: 10px 14px; border-radius: 6px;
  background: var(--ink); color: var(--bg);
  font-size: 14px; text-decoration: none;
}
.skip:focus { top: 20px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

.rail {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100svh;
  display: flex;
  flex-direction: column;
  padding: 38px 0 30px;
}
.brand {
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-decoration: none;
  width: max-content;
  transition: color 200ms var(--ease);
}
.brand:hover { color: var(--accent); }

h1 {
  margin-top: clamp(28px, 7vh, 60px);
  font-size: clamp(34px, 2.6vw, 38px);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -0.04em;
}
h1 .dot { color: var(--accent); }

.rnav { margin-top: 40px; display: flex; flex-direction: column; gap: 4px; }
.rnav a {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 5px 0;
  text-decoration: none;
  font-size: 15px;
  letter-spacing: -0.01em;
  transition: color 200ms var(--ease), padding-left 240ms var(--ease);
}
.rnav a .n {
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--muted);
}
.rnav a:hover, .rnav a:focus-visible { color: var(--accent); padding-left: 5px; }

.rfoot {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}
.rfoot a {
  font-size: 14px;
  padding: 5px 0;
  text-decoration: none;
  width: max-content;
  transition: color 200ms var(--ease);
}
.rfoot a:hover, .rfoot a:focus-visible { color: var(--accent); }
.rfoot .copy {
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-top: 8px;
}

main { padding: 38px 0 140px; max-width: 720px; }
main section { padding: 38px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 20px; }
main h2 {
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 18px;
}
.empty { font-size: 15px; color: var(--muted); }

.s-list { list-style: none; }
.entry {
  display: grid;
  gap: 3px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
}
.s-list li:first-child .entry { border-top: 0; padding-top: 0; }
.entry .t {
  font-size: 18px;
  line-height: 1.3;
  letter-spacing: -0.015em;
  transition: color 200ms var(--ease);
}
.entry .m {
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.entry:hover .t, .entry:focus-visible .t { color: var(--accent); }

body.solo { display: block; }
.solo .brand { display: inline-block; margin-top: 38px; }
.err { padding: clamp(80px, 18vh, 200px) 0; max-width: 720px; }
.err .code { font-size: clamp(64px, 14vw, 148px); font-weight: 500; line-height: 1; letter-spacing: -0.045em; }
.err p { margin-top: 18px; font-size: 16px; color: var(--muted); }
.err a {
  display: inline-block; margin-top: 30px;
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  padding-bottom: 4px;
  transition: color 200ms var(--ease), border-color 200ms var(--ease);
}
.err a:hover { color: var(--accent); border-color: var(--accent); }

@media (max-width: 860px) {
  body { grid-template-columns: 1fr; }
  .rail { position: static; height: auto; padding-bottom: 0; }
  h1 { margin-top: 26px; }
  .rnav { flex-direction: row; flex-wrap: wrap; gap: 0 20px; margin-top: 24px; }
  .rnav a { gap: 10px; }
  .rfoot { margin-top: 22px; }
  main { padding-top: 26px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation: none !important; }
}
