/* 5tv — shared site styles */

:root {
  --bg: #0c0c0c;
  --fg: #e8e8e8;
  --body: #ccc;
  --muted: #777;
  --line: #222;
  --surface: #121212;
  --code-bg: #161616;
  --accent: #8fbc8f;
  --max: 38rem;
}

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

html {
  font-size: 17px;
}

body {
  font-family: ui-monospace, "Cascadia Code", "SF Mono", Menlo, Consolas, monospace;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.65;
  max-width: var(--max);
  margin: 0 auto;
  padding: 3.5rem 1.25rem 5rem;
  min-height: 100vh;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* —— site header / nav —— */
.site-header {
  margin-bottom: 3rem;
}

.site-header .mark {
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: lowercase;
}

.site-header .mark a {
  color: var(--fg);
}

.site-header .tagline {
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 0.35rem;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-top: 1.25rem;
  font-size: 0.85rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 1rem;
}

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

.site-nav a:hover,
.site-nav a.active {
  color: var(--fg);
  text-decoration: none;
}

/* —— post header —— */
.post-header {
  margin-bottom: 2.5rem;
}

.crumb {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.crumb a {
  color: var(--muted);
}

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

.post-header h1 {
  font-size: 1.35rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin-bottom: 0.4rem;
}

.post-header time,
time.meta {
  font-size: 0.8rem;
  color: var(--muted);
}

/* —— type —— */
.section-label,
h2.label {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1rem;
}

article {
  margin-top: 2rem;
}

article p {
  margin-bottom: 1.1rem;
  color: var(--body);
}

article h2 {
  font-size: 0.95rem;
  font-weight: 500;
  margin: 2rem 0 0.75rem;
  color: var(--fg);
}

article ul,
article ol {
  margin: 0 0 1.1rem 1.1rem;
  color: var(--body);
}

article li {
  margin-bottom: 0.35rem;
}

article code {
  font-size: 0.88em;
  background: var(--code-bg);
  padding: 0.1em 0.35em;
  border-radius: 3px;
  color: var(--accent);
}

article pre {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 0.9rem 1rem;
  overflow-x: auto;
  font-size: 0.82rem;
  margin: 0 0 1.25rem;
  border-radius: 4px;
  color: #bbb;
}

article pre code {
  background: none;
  padding: 0;
  color: inherit;
}

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

/* —— post list (index) —— */
ul.posts {
  list-style: none;
}

ul.posts li {
  border-top: 1px solid var(--line);
}

ul.posts li:last-child {
  border-bottom: 1px solid var(--line);
}

ul.posts a {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 0;
  color: var(--fg);
}

ul.posts a:hover {
  color: var(--accent);
  text-decoration: none;
}

ul.posts time {
  color: var(--muted);
  font-size: 0.8rem;
  white-space: nowrap;
  flex-shrink: 0;
}

/* —— footer —— */
.site-footer {
  margin-top: 4rem;
  font-size: 0.75rem;
  color: var(--muted);
}

.post-footer {
  font-size: 0.8rem;
  color: var(--muted);
}

/* —— 404 —— */
.page-404 {
  margin-top: 2rem;
  color: var(--body);
}

.page-404 p {
  margin-bottom: 0.75rem;
}
