/* ============================================
   Upstream Faces — Terminal Reader
   Minimal, premium, monospace
   ============================================ */

:root {
  --bg: #0c0c0c;
  --fg: #cdcdcd;
  --fg-dim: #6b6b6b;
  --fg-bright: #f0f0f0;
  --accent: #4ade80;
  --accent-dim: #2d8a5e;
  --link: #60a5fa;
  --link-hover: #93c5fd;
  --warn: #fbbf24;
  --border: #1f1f1f;
  --font: "JetBrains Mono", "Fira Code", "SF Mono", "Cascadia Code", "Consolas", monospace;
  --max-width: 720px;
}

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

html {
  background: var(--bg);
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 0.9375rem;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---- Navigation bar ---- */

.nav {
  padding: 3rem 1.5rem 0;
  max-width: var(--max-width);
  margin: 0 auto;
  font-size: 0.8rem;
  color: var(--fg-dim);
  display: flex;
  gap: 2rem;
}

.nav a {
  color: var(--fg-dim);
  text-decoration: none;
}

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

.nav .prompt {
  color: var(--accent-dim);
  margin-right: 0.35em;
}

/* ---- Main content ---- */

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.5rem 5rem;
}

/* ---- Index header ---- */

.index-header {
  margin-bottom: 3rem;
}

.index-header h1 {
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--fg-bright);
  margin-bottom: 0.25rem;
}

.index-header h1 .hash {
  color: var(--fg-dim);
  margin-right: 0.35em;
  font-weight: 400;
}

.index-header .subtitle {
  color: var(--fg-dim);
  font-size: 0.85rem;
}

/* ---- Issue list (main index) ---- */

.issue-list {
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
}

.issue-entry {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.issue-entry .date {
  color: var(--fg-dim);
  font-size: 0.75rem;
}

.issue-entry h2 {
  font-size: 1rem;
  font-weight: 500;
}

.issue-entry h2 a {
  color: var(--link);
  text-decoration: none;
}

.issue-entry h2 a:hover {
  color: var(--link-hover);
  text-decoration: underline;
}

.issue-entry h2 a::before {
  content: "→ ";
  color: var(--accent-dim);
  font-weight: 400;
}

.issue-entry .count {
  color: var(--fg-dim);
  font-size: 0.75rem;
}

/* ---- Issue header (per-issue page) ---- */

.page-header {
  margin-bottom: 2.5rem;
}

.page-header h2 {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--fg-bright);
  margin-bottom: 0.15rem;
}

.page-header .date {
  color: var(--fg-dim);
  font-size: 0.8rem;
}

.page-header .desc {
  color: var(--fg-dim);
  font-size: 0.85rem;
  margin-top: 1rem;
  line-height: 1.6;
  max-width: 600px;
}

.page-header h2 .hash {
  color: var(--fg-dim);
  margin-right: 0.35em;
  font-weight: 400;
}

/* ---- Article list (per-issue page) ---- */

.article-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.article-entry {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.article-entry h3 {
  font-size: 1rem;
  font-weight: 500;
}

.article-entry h3 a {
  color: var(--link);
  text-decoration: none;
}

.article-entry h3 a:hover {
  color: var(--link-hover);
  text-decoration: underline;
}

.article-entry h3 a::before {
  content: "→ ";
  color: var(--accent-dim);
  font-weight: 400;
}

.article-entry .author {
  color: var(--fg-dim);
  font-size: 0.8rem;
}

/* ---- Article body ---- */

article {
  max-width: 100%;
}

article .dateline {
  color: var(--fg-dim);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 2rem;
}

article h1 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--fg-bright);
  line-height: 1.4;
  margin-bottom: 1.75rem;
}

article h2 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--fg-bright);
  margin-top: 2.25rem;
  margin-bottom: 0.75rem;
}

article h3 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--fg-bright);
  margin-top: 1.75rem;
  margin-bottom: 0.5rem;
}

article p {
  margin-bottom: 1.1rem;
}

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

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

article ul,
article ol {
  margin: 0 0 1.1rem 1.5rem;
}

article li {
  margin-bottom: 0.3rem;
}

article li::marker {
  color: var(--fg-dim);
}

article blockquote {
  border-left: 2px solid var(--accent-dim);
  margin: 1.25rem 0;
  padding: 0.25rem 0 0.25rem 1.25rem;
  color: var(--fg-dim);
}

article blockquote p {
  margin-bottom: 0;
}

article code {
  color: var(--warn);
  background: #1a1a1a;
  padding: 0.1em 0.4em;
  font-size: 0.9em;
}

article pre {
  background: #141414;
  padding: 1rem 1.25rem;
  overflow-x: auto;
  margin-bottom: 1.1rem;
  font-size: 0.85rem;
  line-height: 1.65;
  border-left: 2px solid var(--border);
}

article pre code {
  color: var(--fg);
  background: none;
  padding: 0;
}

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

article img {
  max-width: 100%;
}

article strong {
  color: var(--fg-bright);
  font-weight: 600;
}

article em {
  font-style: italic;
}

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

footer {
  text-align: center;
  padding: 4rem 1.5rem;
  color: var(--fg-dim);
  font-size: 0.75rem;
}

footer .sep {
  color: var(--border);
  margin: 0 0.5rem;
}

/* ---- Responsive ---- */

@media (max-width: 600px) {
  .nav {
    padding: 2rem 1rem 0;
  }

  main {
    padding: 1.5rem 1rem 3rem;
  }

  .index-header h1 {
    font-size: 1rem;
  }

  article h1 {
    font-size: 1.1rem;
  }
}

/* ---- Print ---- */

@media print {
  :root {
    --bg: #fff;
    --fg: #111;
    --fg-dim: #555;
    --fg-bright: #000;
    --link: #000;
    --link-hover: #000;
    --border: #ccc;
    --accent-dim: #555;
    --warn: #555;
  }

  body {
    font-size: 11pt;
    line-height: 1.6;
  }

  .nav,
  footer,
  .back {
    display: none;
  }

  article a {
    color: inherit;
    text-decoration: underline;
  }
}
