body,
html {
  margin: 0;
  padding: 0;
  height: 100%;
  background: #0f0f0f;
  color: #fff;
  font-family: 'Fira Mono', Consolas, Monaco, monospace;
  display: flex;
}

nav {
  width: 240px;
  background: #1a1a1a;
  border-right: 1px solid #333;
  display: flex;
  flex-direction: column;
}

nav .logo {
  font-weight: 700;
  font-size: 24px;
  padding: 20px;
  border-bottom: 1px solid #333;
  user-select: none;
  letter-spacing: 1.2px;
  color: #66ccff;
  text-decoration: none;
}

nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  flex-grow: 1;
  overflow-y: auto;
}

nav ul li {
  border-bottom: 1px solid #222;
}

nav ul li a {
  display: block;
  padding: 14px 20px;
  color: #ccc;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}

nav ul li a:hover,
nav ul li a.active {
  background: #333;
  color: #66ccff;
}

main {
  flex-grow: 1;
  padding: 30px 40px;
  overflow-y: auto;
  max-width: 1200px;
}

main h1 {
  font-weight: 600;
  margin-bottom: 0.5em;
}

main p {
  line-height: 1.6;
  margin-bottom: 1em;
}

.a-link {
  color: #66ccff;
  text-decoration: none;
}

pre {
  background: #222;
  border-radius: 6px;
  padding: 16px 20px;
  font-size: 14px;
  overflow-x: auto;
  box-shadow: inset 0 0 8px #111;
  max-width: 100%;
}

code {
  font-family: 'Fira Mono', Consolas, Monaco, monospace;
  white-space: pre-wrap;
}

.keyword {
  color: #569cd6;
  font-weight: 600;
}

.string {
  color: #d69d85;
}

.number {
  color: #b5cea8;
}

.comment {
  color: #6a9955;
  font-style: italic;
}

.operator {
  color: #d4d4d4;
}

.function-name {
  color: #dcdcaa;
}

@media (max-width: 768px) {
  body, html {
    flex-direction: column;
  }

  nav {
    width: 100%;
    height: auto;
    border-right: none;
    border-bottom: 1px solid #333;
    flex-direction: row;
    overflow-x: auto;
  }

  nav ul {
    display: flex;
    flex-direction: row;
    flex-grow: 0;
    overflow-x: auto;
  }

  nav ul li {
    border-bottom: none;
    border-right: 1px solid #222;
  }

  nav ul li:last-child {
    border-right: none;
  }

  nav ul li a {
    padding: 14px 15px;
    white-space: nowrap;
  }

  main {
    padding: 20px;
    max-width: 100%;
  }
}