:root {
    --bg: #050505;
    --bg-soft: #0b0b0b;
    --bg-hover: #111111;
    --text: #e8e8e8;
    --text-dim: #b8b8b8;
    --text-bright: #ffffff;
    --link: #ff3b3b;
    --link-hover: #ff6b6b;
    --divider: #1a1a1a;
    --selection: #2a1010;

    --measure: 72ch;
    --measure-wide: 80ch;
    --gutter: clamp(1.25rem, 4vw, 3.5rem);
    --radius: 0;
}

/* =========================
   Base
========================= */

html {
    font-size: 17px;
}

html,
body {
    margin: 0 !important;
    padding: 0 !important;
    background: var(--bg) !important;
    color: var(--text) !important;
    font-family: "Hack", "Courier New", Courier, monospace !important;
    line-height: 1.58;
    font-variant-ligatures: none;
    -webkit-font-smoothing: none;
    -moz-osx-font-smoothing: auto;
    text-rendering: geometricPrecision;
}

body,
p,
li,
span,
em,
strong,
small,
label,
td,
th,
input,
textarea,
select,
button {
    color: var(--text) !important;
    font-family: "Hack", "Courier New", Courier, monospace !important;
}

* {
    box-shadow: none !important;
    transition: none !important;
}

/* =========================
   Layout / Measure
========================= */

main,
article,
.post,
section,
.container {
    max-width: var(--measure-wide) !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: var(--gutter) !important;
    padding-right: var(--gutter) !important;
    background: transparent !important;
    color: var(--text) !important;
    border: 0 !important;
}

p,
ul,
ol,
blockquote,
pre,
table {
    max-width: var(--measure) !important;
}

/* =========================
   Links
========================= */

a,
nav a,
.menu a,
.dropdown a,
.dropdown-item,
article a,
.post a,
main a,
section a {
    color: var(--link) !important;
    background: transparent !important;
}

article a,
.post a,
main a,
section a {
    text-decoration: underline !important;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.12em;
}

nav a,
.menu a,
.dropdown a,
.dropdown-item {
    text-decoration: none !important;
}

a:hover,
a:focus {
    color: var(--link-hover) !important;
    background: none !important;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background: var(--bg-hover) !important;
    color: var(--link-hover) !important;
    text-decoration: none !important;
}

.dropdown-item.active,
.active {
    background: transparent !important;
    color: var(--link-hover) !important;
}

/* =========================
   Headings
========================= */

h1,
h2,
h3,
h4,
h5,
h6 {
    margin-top: 1.9em;
    margin-bottom: 0.55em;
    padding: 0 !important;
    border: 0 !important;
    color: var(--text-bright) !important;
    font-family: "Hack", "Courier New", Courier, monospace !important;
    font-weight: 500;
    letter-spacing: 0;
    line-height: 1.3;
}

h1 { font-size: 1.55rem !important; }
h2 { font-size: 1.2rem !important; }
h3 { font-size: 1.05rem !important; }

/* =========================
   Navigation / Menus
========================= */

nav,
.nav,
.menu,
.dropdown,
.dropdown-menu {
    background: var(--bg) !important;
    color: var(--text) !important;
    border: 0 !important;
    border-radius: var(--radius) !important;
}

.dropdown-menu {
    min-width: 12rem;
    padding: 0.35rem 0 !important;
}

.dropdown-item {
    display: block;
    padding: 0.45rem 0.9rem !important;
    border: 0 !important;
}

/* =========================
   Dividers
========================= */

hr,
.dropdown-divider {
    height: 0 !important;
    margin: 1.2rem 0 !important;
    border: 0 !important;
    border-top: 1px solid var(--divider) !important;
    background: none !important;
}

/* =========================
   Forms / Buttons
========================= */

button,
input,
textarea,
select,
input[type="button"],
input[type="submit"] {
    background: var(--bg-soft) !important;
    color: var(--text) !important;
    border: 0 !important;
    border-radius: var(--radius) !important;
}

button,
input[type="button"],
input[type="submit"] {
    padding: 0.45rem 0.75rem !important;
}

button:hover,
input[type="button"]:hover,
input[type="submit"]:hover {
    background: var(--bg-hover) !important;
    color: var(--text-bright) !important;
}

input:focus,
textarea:focus,
select:focus,
button:focus {
    outline: 1px solid var(--divider) !important;
    outline-offset: 0 !important;
}

/* =========================
   Code
========================= */

pre,
code,
kbd,
samp {
    font-family: "Hack", "Courier New", Courier, monospace !important;
}

code {
    background: var(--bg-soft) !important;
    color: var(--link-hover) !important;
    padding: 0.05em 0.25em !important;
    border: 0 !important;
    border-radius: var(--radius) !important;
}

pre {
    overflow-x: auto;
    margin: 1rem 0 1.25rem !important;
    padding: 0.85rem 1rem !important;
    background: var(--bg-soft) !important;
    color: var(--text) !important;
    border: 0 !important;
    border-left: 1px solid var(--divider) !important;
    border-radius: var(--radius) !important;
}

pre code {
    padding: 0 !important;
    background: transparent !important;
    color: var(--text) !important;
}

/* =========================
   Quotes
========================= */

blockquote {
    margin: 1rem 0 !important;
    padding-left: 0.9rem !important;
    color: var(--text-dim) !important;
    border-left: 1px solid var(--divider) !important;
    font-style: normal !important;
}

/* =========================
   Lists
========================= */

ul,
ol {
    margin-top: 0.5rem !important;
    margin-bottom: 0.9rem !important;
    padding-left: 1.2rem !important;
}

li + li {
    margin-top: 0.2rem;
}

/* =========================
   Tables
========================= */

table {
    width: 100%;
    display: block;
    overflow-x: auto;
    border-collapse: collapse;
    color: var(--text) !important;
    background: transparent !important;
    border: 0 !important;
    margin: 1rem 0 1.25rem !important;
}

th,
td {
    padding: 0.5rem 0.6rem !important;
    text-align: left;
    border: 0 !important;
    border-bottom: 1px solid var(--divider) !important;
}

th {
    color: var(--text-bright) !important;
    font-weight: 600;
}

/* =========================
   Images
========================= */

img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 1rem auto !important;
    border: 0 !important;
    background: transparent !important;
    padding: 0 !important;
}

/* =========================
   Selection
========================= */

::selection {
    background: var(--selection);
    color: var(--text-bright);
}

/* =========================
   Responsive
========================= */

@media (min-width: 1400px) {
    :root {
        --measure: 70ch;
        --measure-wide: 76ch;
    }
}

@media (max-width: 640px) {
    html {
        font-size: 16px;
    }

    :root {
        --gutter: 1rem;
        --measure: 100%;
        --measure-wide: 100%;
    }
}
