/* ---------------------------------------------------------
   Base site styles. One file, no preprocessor, no framework.
   Edit the custom properties below to change the whole palette.
   --------------------------------------------------------- */

:root {
  --paper: #1b1b18;
  --ink: #faf9f6;
  --muted: #6b6b62;
  --accent: #2e717a;
  --line: #d9d5c9;

  --serif:
    Georgia, "Iowan Old Style", "Palatino Linotype", "Book Antiqua", serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: light;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.0625rem;
  line-height: 1.6;
}

.wrap {
  max-width: 640px;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
}

.prose p {
  margin: 1.5em;
  text-indent: 1.5em;
}

/*add this back if you want to remove the first paragraph indent after headings*/
.prose p:first-child,
.prose h2 + p,
.prose h3 + p {
  text-indent: 0;
}

/* Header + nav ------------------------------------------------ */

.site-header {
  border-bottom: 1px solid var(--line);
  padding-bottom: 1.25rem;
  margin-bottom: 2.5rem;
}

.site-header h1 {
  margin: 0 0 0.25rem;
  font-size: 1.5rem;
}

.site-header h1 a {
  color: var(--ink);
  text-decoration: none;
}

.tagline {
  margin: 0 0 1rem;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.875rem;
}

nav.site-nav {
  font-family: var(--mono);
  font-size: 0.9375rem;
}

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

nav.site-nav a:hover {
  color: var(--accent);
}

nav.site-nav .sep {
  color: var(--muted);
  padding: 0 0.4em;
}

/* Body content -------------------------------------------------- */

h1,
h2,
h3 {
  line-height: 1.25;
}

a {
  color: var(--accent);
}

a:visited {
  color: #5a3a52;
}

img {
  max-width: 100%;
  height: auto;
  border: 1px solid var(--line);
}

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

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

pre {
  overflow-x: auto;
  padding: 0.75rem 1rem;
  border: 1px solid var(--line);
  background: #000000;
}

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

/* Listing pages (games / software / blog / writing index) ------ */

.item-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.item-list li {
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}

.item-list li:first-child {
  padding-top: 0;
}

.item-list h2 {
  margin: 0 0 0.25rem;
  font-size: 1.125rem;
}

.item-list h2 a {
  text-decoration: none;
  color: var(--ink);
}

.item-list h2 a:hover {
  color: var(--accent);
}

.meta {
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--muted);
}

.excerpt {
  margin: 0.4rem 0 0;
  color: var(--ink);
}

.footnotes-sep {
  display: none; /* we'll use a border instead, to match .site-footer */
}

.footnotes {
  margin-top: 2.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.875rem;
  color: var(--muted);
}

.footnote-ref a,
.footnote-backref {
  text-decoration: none;
}

/* Embeds and downloads ------------------------------------------ */

.game-embed {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  margin: 1.5rem 0;
}

.download-list {
  list-style: none;
  margin: 1.5rem 0;
  padding: 0;
  font-family: var(--mono);
  font-size: 0.9375rem;
}

.download-list li {
  padding: 0.4rem 0;
}

.button {
  display: inline-block;
  padding: 0.4rem 0.9rem;
  border: 1px solid var(--ink);
  color: var(--ink);
  text-decoration: none;
  font-family: var(--mono);
  font-size: 0.875rem;
}

.button:hover {
  background: var(--ink);
  color: var(--paper);
}

/* Chapter navigation --------------------------------------------- */

.chapter-nav {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 0.9375rem;
  margin-top: 2.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

/* Footer ----------------------------------------------------------- */

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

/* Accessibility: respect reduced motion, visible focus ------------- */

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
  }
}
