* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    background: #1a1a1a;
    color: #ffffff;
    font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-weight: 300;
    -webkit-font-smoothing: antialiased;
}

nav {
    position: fixed;
    top: 1.5rem;
    right: 2rem;
    z-index: 10;
}

nav a {
    color: #ffffff;
    text-decoration: none;
    font-family: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-weight: 300;
    font-size: 1rem;
    letter-spacing: 0.04em;
}

nav a:hover {
    text-decoration: underline;
    text-underline-offset: 4px;
    text-decoration-thickness: 1px;
    opacity: 0.85;
}

body.landing {
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
}

body.landing nav {
    left: auto;
    right: 2rem;
}

body.landing main {
    height: 100vh;
    width: 100vw;
    position: relative;
}

body.landing #h-canvas {
    display: block;
    width: 100%;
    height: 100%;
}

body.document nav {
    right: auto;
    left: 2rem;
}

body.document #grain-canvas {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 0;
}

body.document nav {
    position: fixed;
    z-index: 10;
}

body.document article {
    position: relative;
    z-index: 1;
}

body.document article {
    max-width: 42rem;
    margin: 0 auto;
    padding: 6rem 2rem 6rem;
    font-size: 1rem;
    line-height: 1.7;
}

body.document article h1 {
    font-size: 1.6rem;
    font-weight: 400;
    margin-bottom: 2rem;
}

body.document article h2 {
    font-size: 1.2rem;
    font-weight: 400;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

body.document article h3 {
    font-size: 1rem;
    font-weight: 500;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

body.document article p {
    margin-bottom: 1.25rem;
}

body.document article a {
    color: #ffffff;
    text-decoration: underline;
    text-underline-offset: 3px;
}

body.document article ul,
body.document article ol {
    margin-bottom: 1.25rem;
    padding-left: 1.5rem;
}

body.document article li {
    margin-bottom: 0.4rem;
}

body.document article code {
    font-family: ui-monospace, "SF Mono", Menlo, Monaco, Consolas, monospace;
    font-size: 0.9em;
    background: #262626;
    padding: 0.1em 0.35em;
    border-radius: 3px;
}

body.document article pre {
    background: #262626;
    padding: 1rem;
    border-radius: 4px;
    overflow-x: auto;
    margin-bottom: 1.25rem;
}

body.document article pre code {
    background: transparent;
    padding: 0;
}

body.document article blockquote {
    border-left: 2px solid #444;
    padding-left: 1rem;
    margin: 1.25rem 0;
    color: #cccccc;
}
