/* pugmark site — black & white, monospace, deliberately minimal. */

:root {
  --fg: #111;
  --bg: #fff;
  --muted: #666;
  --rule: #ccc;
  --code-bg: #f4f4f4;
  --code-border: #ddd;
  --maxw: 760px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --fg: #e6e6e6;
    --bg: #0d0d0d;
    --muted: #999;
    --rule: #333;
    --code-bg: #1a1a1a;
    --code-border: #2c2c2c;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;
  font-size: 15px;
  line-height: 1.65;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

a { color: var(--fg); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }

/* ---- Header ---- */
.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  max-width: var(--maxw);
  width: 100%;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 1rem;
  border-bottom: 1px solid var(--rule);
}
.brand {
  font-weight: 700;
  font-size: 1.15rem;
  text-decoration: none;
}
.brand .paw { font-style: normal; }
.site-nav { display: flex; flex-wrap: wrap; gap: 0.9rem; }
.site-nav a { color: var(--muted); text-decoration: none; }
.site-nav a:hover,
.site-nav a.active { color: var(--fg); text-decoration: underline; }

/* ---- Main content column ---- */
.content {
  max-width: var(--maxw);
  width: 100%;
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
  flex: 1 0 auto;
}

.page-title {
  font-size: 1.7rem;
  line-height: 1.25;
  margin: 0 0 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--fg);
}

h2 { font-size: 1.3rem; margin-top: 2.4rem; }
h3 { font-size: 1.08rem; margin-top: 1.8rem; }
h4 { font-size: 1rem; margin-top: 1.4rem; }
h2, h3, h4 { line-height: 1.3; }

/* Anchorable headings get a subtle marker on hover. */
h2:hover::before, h3:hover::before {
  content: "#";
  position: absolute;
  margin-left: -1.1em;
  color: var(--muted);
}
h2, h3 { position: relative; }

p, ul, ol { margin: 0.9rem 0; }
li { margin: 0.25rem 0; }

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

/* ---- Code ---- */
code {
  background: var(--code-bg);
  border: 1px solid var(--code-border);
  border-radius: 3px;
  padding: 0.05em 0.35em;
  font-size: 0.9em;
}
pre {
  background: var(--code-bg);
  border: 1px solid var(--code-border);
  border-radius: 4px;
  padding: 0.85rem 1rem;
  overflow-x: auto;
  line-height: 1.5;
}
pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.86rem;
}

/* ---- Tables ---- */
table {
  border-collapse: collapse;
  width: 100%;
  margin: 1.2rem 0;
  font-size: 0.9rem;
  display: block;
  overflow-x: auto;
}
th, td {
  border: 1px solid var(--rule);
  padding: 0.4rem 0.6rem;
  text-align: left;
  vertical-align: top;
}
th { background: var(--code-bg); font-weight: 700; }

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

/* ---- List pages (sections) ---- */
.page-list { list-style: none; padding: 0; }
.page-list li { margin: 0.6rem 0; }
.page-list a { font-weight: 700; }
.page-list-desc { color: var(--muted); font-weight: 400; }

/* ---- Home hero ---- */
.home .tagline {
  font-size: 1.25rem;
  color: var(--muted);
  margin: 0 0 2rem;
}
.home h1:first-child {
  font-size: 2.2rem;
  border: none;
  margin-bottom: 0.5rem;
}

/* ---- Footer ---- */
.site-footer {
  flex-shrink: 0;
  max-width: var(--maxw);
  width: 100%;
  margin: 0 auto;
  padding: 1.25rem;
  border-top: 1px solid var(--rule);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  color: var(--muted);
  font-size: 0.82rem;
}
.site-footer a { color: var(--muted); }

@media (max-width: 600px) {
  .page-title { font-size: 1.4rem; }
  .home h1:first-child { font-size: 1.7rem; }
}
