/* austinlignell.com — plain text, black sky, small lights */

:root {
  --bg:        #000000;
  --ink:       #d9d9d4;
  --ink-dim:   #8a8a85;
  --ink-faint: #55554f;
  --rule:      #1e1e1c;
  --accent:    #ffffff;
  --measure:   34rem;
  --serif: ui-serif, Charter, "Iowan Old Style", Georgia, "Times New Roman", serif;
  --mono:  ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.0625rem;
  line-height: 1.75;
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* The sky sits behind everything and never intercepts a click. */
#sky {
  position: fixed;
  top: 0;
  left: 0;
  /* canvas is a replaced element: inset:0 alone leaves it at its
     intrinsic 300x150, so the size has to be stated explicitly. */
  width: 100%;
  height: 100%;
  z-index: -1;
  display: block;
  pointer-events: none;
}

.page {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 5.5rem 1.5rem 6rem;
}

/* ---------- type ---------- */

h1 {
  font-size: 1.0625rem;
  font-weight: 400;
  line-height: 1.75;
  margin: 0 0 2.25rem;
  color: var(--accent);
  letter-spacing: 0.01em;
}

h2 {
  font-size: 1.0625rem;
  font-weight: 400;
  font-style: italic;
  color: var(--accent);
  margin: 2.5rem 0 0.75rem;
}

h3 {
  font-size: 1.0625rem;
  font-weight: 400;
  color: var(--accent);
  margin: 2rem 0 0.5rem;
}

p { margin: 0 0 1.5rem; }

.lede { color: var(--accent); }

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--ink-faint);
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
  transition: text-decoration-color 140ms ease, color 140ms ease;
}
a:hover { color: var(--accent); text-decoration-color: var(--accent); }
a:focus-visible { outline: 1px solid var(--accent); outline-offset: 3px; border-radius: 1px; }

blockquote {
  margin: 0 0 1.5rem;
  padding-left: 1.125rem;
  border-left: 1px solid var(--rule);
  color: var(--ink-dim);
  font-style: italic;
}

ul, ol { margin: 0 0 1.5rem; padding-left: 1.25rem; }
li { margin-bottom: 0.4rem; }

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

code {
  font-family: var(--mono);
  font-size: 0.875em;
  color: var(--accent);
}
pre {
  font-family: var(--mono);
  font-size: 0.8125rem;
  line-height: 1.65;
  overflow-x: auto;
  padding: 1rem 1.125rem;
  border: 1px solid var(--rule);
  border-radius: 3px;
  margin: 0 0 1.5rem;
}
pre code { color: var(--ink); }

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

/* ---------- small caps labels & meta ---------- */

.label {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 1.25rem;
}

.meta {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.02em;
  color: var(--ink-dim);
}

/* ---------- nav / footer ---------- */

.topnav {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  margin: 0 0 3.5rem;
}
.topnav a { text-decoration-color: var(--ink-faint); }

.links {
  margin-top: 3.5rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 0.8125rem;
  letter-spacing: 0.02em;
}
.links a { margin-right: 1.25rem; display: inline-block; }

.sep { color: var(--ink-faint); }

/* ---------- writing index ---------- */

.posts { list-style: none; margin: 0; padding: 0; }
.posts li {
  margin: 0;
  padding: 1.125rem 0;
  border-bottom: 1px solid var(--rule);
}
.posts li:first-child { border-top: 1px solid var(--rule); }
.posts a { text-decoration: none; display: block; }
.posts a:hover .post-title { text-decoration: underline; text-underline-offset: 0.18em; }
.post-title { color: var(--accent); display: block; }
.post-date {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  display: block;
  margin-top: 0.15rem;
}
.empty { color: var(--ink-dim); font-style: italic; }

/* ---------- article header + tools ---------- */

.article-head { margin-bottom: 2.5rem; }
.article-head h1 {
  font-size: 1.5rem;
  line-height: 1.35;
  margin: 0 0 0.5rem;
}

.tools {
  margin-top: 3.5rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--rule);
  display: flex;
  gap: 0.625rem;
  flex-wrap: wrap;
}

.tool {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-dim);
  background: transparent;
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 0.5rem 0.9375rem;
  cursor: pointer;
  text-decoration: none;
  transition: color 140ms ease, border-color 140ms ease;
}
.tool:hover { color: var(--accent); border-color: var(--ink-faint); }
.tool:focus-visible { outline: 1px solid var(--accent); outline-offset: 2px; }
.tool[data-done="1"] { color: var(--accent); border-color: var(--ink-faint); }

/* ---------- bracketed micro-notation ---------- */

.bracket {
  font-family: var(--mono);
  color: var(--ink-faint);
  letter-spacing: 0.02em;
}
.tool .bracket { margin-left: 0.4em; }
.tool:hover .bracket { color: var(--ink-dim); }
.links .bracket { font-size: 0.9em; color: var(--ink-dim); }

/* Index numerals on the writing list. */
.post-num {
  font-family: var(--mono);
  font-size: 0.6875rem;
  color: var(--ink-faint);
  letter-spacing: 0.02em;
  float: left;
  width: 2.25rem;
  padding-top: 0.34rem;
}
.posts a { padding-left: 2.25rem; }
.posts a .post-num { margin-left: -2.25rem; }

@media (max-width: 34rem) {
  .page { padding: 3.5rem 1.375rem 4.5rem; }
  .article-head h1 { font-size: 1.3125rem; }
}

/* ---------- print / save-as-PDF ---------- */

@page { margin: 0.85in 0.95in; }

@media print {
  :root { --ink: #111; --ink-dim: #444; --ink-faint: #777; --rule: #ddd; --accent: #000; }
  html, body { background: #fff !important; color: #111 !important; }
  #sky, .tools, .topnav, .links, .no-print { display: none !important; }
  .bracket { display: none; }
  .page { max-width: none; padding: 0; }
  a { color: #111; text-decoration: none; }
  /* Show destinations for links so a printed page stays useful. */
  .prose a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 0.75em;
    color: #666;
    word-break: break-all;
  }
  .article-head h1 { font-size: 20pt; }
  body { font-size: 11pt; line-height: 1.55; }
  h2, h3 { break-after: avoid-page; }
  p, blockquote, li { orphans: 3; widows: 3; }
  pre, blockquote, img { break-inside: avoid; }
  .print-footer { display: block !important; }
}

.print-footer { display: none; margin-top: 2rem; font-size: 9pt; color: #777; }
