/* Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Layout */
html { height: 100%; }

body {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 16px;
  color: #1a1a1a;
  background: #fff;
}

/* Navigation */
nav {
  background: #18181b;
  color: #e4e4e7;
  padding: 1.5rem 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.site-title {
  display: block;
  padding: 0 1.25rem 1.25rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  border-bottom: 1px solid #3f3f46;
  margin-bottom: 0.75rem;
}

.site-title:hover { color: #a5b4fc; }

nav ul {
  list-style: none;
  padding: 0;
}

nav ul li a {
  display: block;
  padding: 0.45rem 1.25rem;
  color: #a1a1aa;
  text-decoration: none;
  font-size: 0.9rem;
  border-left: 3px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}

nav ul li a:hover {
  color: #e4e4e7;
  background: #27272a;
}

nav ul li a.active {
  color: #a5b4fc;
  border-left-color: #6366f1;
  background: #27272a;
}

/* Main content */
main {
  padding: 2.5rem 3rem;
  max-width: 880px;
}

article {
  line-height: 1.7;
}

/* Typography */
h1, h2, h3, h4 {
  line-height: 1.3;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  color: #111;
}

h1 { font-size: 2rem; margin-top: 0; }
h2 { font-size: 1.5rem; border-bottom: 1px solid #e4e4e7; padding-bottom: 0.3rem; }
h3 { font-size: 1.15rem; }
h4 { font-size: 1rem; }

p { margin-bottom: 1rem; }

a { color: #4f46e5; text-decoration: none; }
a:hover { text-decoration: underline; }

ul, ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

li { margin-bottom: 0.25rem; }

/* Code */
code {
  font-family: 'JetBrains Mono', 'Fira Code', Consolas, 'Courier New', monospace;
  font-size: 0.875em;
}

:not(pre) > code {
  background: #f4f4f5;
  padding: 0.15em 0.4em;
  border-radius: 3px;
  color: #be185d;
}

pre {
  background: #f8f8f8;
  border-left: 3px solid #6366f1;
  border-radius: 0 4px 4px 0;
  padding: 1.1rem 1.25rem;
  overflow-x: auto;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

pre code {
  color: inherit;
  background: none;
  padding: 0;
  font-size: 0.875rem;
}

/* Tables */
table {
  border-collapse: collapse;
  width: 100%;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}

th {
  background: #f4f4f5;
  font-weight: 600;
  text-align: left;
}

th, td {
  border: 1px solid #e4e4e7;
  padding: 0.5rem 0.75rem;
  vertical-align: top;
}

tr:nth-child(even) td { background: #fafafa; }

/* Blockquotes */
blockquote {
  border-left: 4px solid #e4e4e7;
  margin: 0 0 1rem;
  padding: 0.5rem 1rem;
  color: #52525b;
  font-style: italic;
}

/* Mobile */
@media (max-width: 700px) {
  body {
    grid-template-columns: 1fr;
  }

  nav {
    position: static;
    height: auto;
  }

  main {
    padding: 1.5rem 1.25rem;
  }
}

/* Prism syntax highlighting (default light theme) */
code[class*="language-"],
pre[class*="language-"] {
  color: #393a34;
  direction: ltr;
  text-align: left;
  white-space: pre;
  word-spacing: normal;
  word-break: normal;
  tab-size: 4;
  hyphens: none;
}

.token.comment,
.token.prolog,
.token.doctype,
.token.cdata { color: #708090; }

.token.punctuation { color: #6e6e6e; }

.token.property,
.token.tag,
.token.boolean,
.token.number,
.token.constant,
.token.symbol,
.token.deleted { color: #990055; }

.token.selector,
.token.attr-name,
.token.string,
.token.char,
.token.builtin,
.token.inserted { color: #669900; }

.token.operator,
.token.entity,
.token.url { color: #9a6e3a; }

.token.atrule,
.token.attr-value,
.token.keyword { color: #0077aa; }

.token.function,
.token.class-name { color: #dd4a68; }

.token.regex,
.token.important,
.token.variable { color: #ee9900; }

.token.important,
.token.bold { font-weight: bold; }

.token.italic { font-style: italic; }
