/* Matches robinsonz.me: Overpass 350, off-black on white, flush left. */
:root {
  --ink: #222;
  --muted: #4b5563;
  --paper: #fff;
  --rule: #e5e7eb;
  --link: #1e40af;
  --visited: #581c87;
  --code-bg: #f3f4f6;
  --tint: #eff6ff;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

html {
  color: var(--ink);
  background: var(--paper);
  font-family: Overpass, sans-serif;
  font-weight: 350;
  font-size: 16px;
  line-height: 1.625;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
}

::selection {
  background: var(--link);
  color: #fff;
}

/* Container: centered column, text left aligned within it */
.content {
  max-width: 48rem;
  margin: 0 auto;
  padding: 1.5rem 1rem 2rem;
  word-wrap: break-word;
}

/* Text */
p {
  margin: 0 0 1rem;
}

strong,
b {
  font-weight: 600;
}

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

h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 600;
  line-height: 1.25;
  margin: 2rem 0 0.75rem;
  text-wrap: balance;
}
h1 { font-size: 2.25rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4,
h5,
h6 { font-size: 1rem; }

ul,
ol {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
}
ul { list-style: disc outside; }
li { margin-bottom: 0.25rem; }

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

blockquote {
  border-left: 3px solid var(--rule);
  color: var(--muted);
  margin: 0 0 1rem;
  padding-left: 1rem;
}

/* Images */
img {
  max-width: 100%;
}

figure {
  box-sizing: border-box;
  display: inline-block;
  margin: 0 0 1rem;
  max-width: 100%;
}

figure img {
  max-height: 500px;
}

figure h4 {
  font-size: 0.875rem;
  font-weight: 350;
  color: var(--muted);
  margin: 0.25rem 0 1rem;
}

/* Code (block colors come from Hugo's inline Nord highlighting) */
code {
  font-family: var(--mono);
  font-size: 0.875em;
  background-color: var(--code-bg);
  padding: 0.1em 0.25em;
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
}

pre {
  background-color: #2e3440;
  color: #d8dee9;
  line-height: 1.45;
  overflow-x: auto;
  padding: 1rem;
  margin: 0 0 1rem;
}

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

.highlight {
  position: relative;
  -webkit-overflow-scrolling: touch;
}

.highlight pre ::selection {
  background: rgba(255, 255, 255, 0.2);
  color: inherit;
}

/* Site header */
header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 1.5rem;
  row-gap: 0.25rem;
  margin-bottom: 1.5rem;
}

header .main a {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
}

header nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

/* Home page */
.site-description p {
  color: var(--muted);
}

.list-item {
  margin-bottom: 2rem;
}

.list-item h1.title {
  font-size: 1.5rem;
  margin: 0 0 0.5rem;
}

.description {
  margin-bottom: 0.5rem;
}

.pagination {
  display: flex;
  justify-content: space-between;
  padding: 0;
  list-style: none;
}

/* Archive and tag pages */
.page-title {
  margin-top: 0;
}

.posts {
  padding-left: 1.25rem;
}

.posts li {
  margin-bottom: 0.5rem;
}

/* Posts */
article .title {
  margin-bottom: 1.5rem;
}

article .title h1 {
  margin: 0 0 0.5rem;
}

.meta {
  color: var(--muted);
  font-size: 0.875rem;
}

.body {
  margin-bottom: 2rem;
}

.tldr,
.toc,
.callout {
  background-color: var(--tint);
  padding: 0.75rem 1rem;
  margin-bottom: 1.5rem;
}

.toc ul {
  margin-bottom: 0;
}

.callout p {
  margin: 0;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
}

.tags li {
  margin: 0;
}

.tags li::before {
  content: "#";
  color: var(--muted);
}

.draft-label {
  color: #9a3412;
  background-color: #ffedd5;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
}

/* Tables */
.body table {
  border-spacing: 0;
  border-collapse: collapse;
  display: block;
  overflow-x: auto;
  margin-bottom: 1rem;
}

table th,
table td {
  padding: 6px 12px;
  border: 1px solid var(--rule);
}

table th {
  font-weight: 600;
  text-align: left;
}

/* Footer */
footer {
  font-size: 0.875rem;
  color: var(--muted);
  margin-top: 3rem;
}

footer p {
  margin: 0.5rem 0 0;
}

svg {
  max-height: 15px;
}
