/* guust.ysebie.be — hand rolled, black and orange (with a light variant) */

:root {
  --bg: #12110f;
  --bg-raised: #1c1a17;
  --text: #e6e0d6;
  --text-strong: #f4efe7;
  --muted: #a39b8f;
  --rule: #2e2a25;
  --accent: #ff8800;
  --link: #ffa040;
  --link-underline: rgba(255, 160, 64, 0.35);
  --tok-com: #8f877b;
  --tok-kw: #f0a35e;
  --tok-str: #8cc5b8;
  --tok-num: #d1a07a;
  --tok-type: #e6d3b8;
  --tok-ann: #bfa587;
  --mono: ui-monospace, "JetBrains Mono", "Fira Code", Menlo, Consolas, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #faf7f2;
    --bg-raised: #f1ece4;
    --text: #2b2620;
    --text-strong: #14110d;
    --muted: #6b6359;
    --rule: #e2dbd0;
    --accent: #c25e00;
    --link: #b35500;
    --link-underline: rgba(179, 85, 0, 0.35);
    --tok-com: #8a8178;
    --tok-kw: #b35500;
    --tok-str: #2f7d6f;
    --tok-num: #9a5b2e;
    --tok-type: #5a4630;
    --tok-ann: #7d6a52;
    color-scheme: light;
  }
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  max-width: 40rem;
  margin: 0 auto;
  padding: 2rem 1rem 3rem;
  background: var(--bg);
  color: var(--text);
  font: 1.0625rem/1.7 var(--sans);
  overflow-wrap: break-word;
}

::selection {
  background: var(--accent);
  color: var(--bg);
}

/* masthead */

.masthead {
  margin-bottom: 3rem;
  font-family: var(--mono);
  font-size: 0.9rem;
}

.masthead-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
}

.site-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}

.site-title a {
  color: var(--text-strong);
  text-decoration: none;
}

.site-title a::before {
  content: "~/ ";
  color: var(--accent);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.1rem;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
}

@media (max-width: 30rem) {
  .site-nav {
    gap: 0.25rem 0.6rem;
    font-size: 0.75rem;
  }
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--text-strong);
}

.site-tagline {
  margin: 0.4rem 0 0;
  color: var(--muted);
  font-size: 0.8rem;
}

/* text */

h1,
h2,
h3,
h4 {
  margin: 2.5rem 0 0.75rem;
  color: var(--text-strong);
  font-weight: 650;
  line-height: 1.3;
}

h1 {
  font-size: 1.6rem;
}

h2 {
  font-size: 1.3rem;
}

h3 {
  font-size: 1.1rem;
}

/* the markdown prefix (#, ##, ###) doubles as a link to the heading */
.heading-anchor {
  margin-right: 0.6ch;
  color: var(--muted);
  font-family: var(--mono);
  font-weight: 400;
  text-decoration: none;
}

.heading-anchor:hover {
  color: var(--accent);
}

main > :first-child {
  margin-top: 0;
}

p,
ul,
ol,
table,
pre,
blockquote {
  margin: 0 0 1.25rem;
}

ul,
ol {
  padding-left: 1.3rem;
}

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

li::marker {
  color: var(--muted);
}

a {
  color: var(--link);
  text-decoration: underline;
  text-decoration-color: var(--link-underline);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration-color: var(--link);
}

strong {
  color: var(--text-strong);
  font-weight: 650;
}

hr {
  margin: 2.5rem 0;
  border: 0;
  border-top: 1px solid var(--rule);
}

blockquote {
  padding: 0.9rem 1.1rem 0.1rem;
  background: var(--bg-raised);
  border-left: 3px solid var(--accent);
  border-radius: 0 4px 4px 0;
}

blockquote > :last-child {
  margin-bottom: 0.9rem;
}

img {
  max-width: 100%;
  height: auto;
}

/* code */

code,
pre {
  font-family: var(--mono);
}

:not(pre) > code {
  padding: 0.1em 0.3em;
  background: var(--bg-raised);
  border-radius: 3px;
  font-size: 0.875em;
  overflow-wrap: anywhere;
}

pre {
  padding: 1rem 1.2rem;
  overflow-x: auto;
  background: var(--bg-raised);
  border: 1px solid var(--rule);
  border-radius: 4px;
  font-size: 0.85rem;
  line-height: 1.6;
  tab-size: 4;
}

.tok-com {
  color: var(--tok-com);
  font-style: italic;
}

.tok-kw,
.tok-tag {
  color: var(--tok-kw);
}

.tok-str {
  color: var(--tok-str);
}

.tok-num {
  color: var(--tok-num);
}

.tok-type,
.tok-key,
.tok-attr {
  color: var(--tok-type);
}

.tok-ann {
  color: var(--tok-ann);
}

/* tables */

table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  font-size: 0.95rem;
}

th,
td {
  padding: 0.45rem 0.8rem 0.45rem 0;
  border-bottom: 1px solid var(--rule);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--text-strong);
}

/* blog */

.post-header {
  margin-bottom: 2rem;
}

.post-header h1 {
  margin-bottom: 0.5rem;
}

.post-meta {
  margin-bottom: 1.5rem;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.8rem;
}

.post-meta a {
  color: var(--muted);
  text-decoration: none;
}

.post-meta a:hover {
  color: var(--text-strong);
}

.post-list {
  padding: 0;
  list-style: none;
}

.post-list li + li {
  margin-top: 1.5rem;
}

.post-list time {
  display: block;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.8rem;
}

.post-list a {
  font-size: 1.1rem;
}

.post-list p {
  margin: 0.2rem 0 0;
  color: var(--muted);
}

.post-host {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.75rem;
  white-space: nowrap;
}

.post-footer {
  margin-top: 3rem;
}

.post-cta {
  padding: 1rem 1.2rem;
  background: var(--bg-raised);
  border: 1px solid var(--rule);
  border-radius: 4px;
}

.post-cta p {
  margin: 0;
}

.post-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
}

.post-nav a {
  flex: 1 1 14rem;
  text-decoration: none;
}

.post-nav span {
  display: block;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.8rem;
}

.post-nav-newer {
  margin-left: auto;
  text-align: right;
}

/* footer */

.site-footer {
  margin-top: 4rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.8rem;
}

.site-footer p {
  margin: 0 0 0.35rem;
}

.site-footer a {
  color: var(--muted);
}

.site-footer a:hover {
  color: var(--text-strong);
}
