:root {
  /* Nord Color Palette */
  --bg: #2e3440;       /* nord0: Main background */
  --card: #3b4252;     /* nord1: Post/box background */
  --border: #4c566a;   /* nord3: Borders */
  --text: #d8dee9;     /* nord4: Primary text */
  --muted: #9babbb;    /* Custom blend for readable secondary text */
  --accent: #88c0d0;   /* nord8: Links, hover states, accents */
  --green: #a3be8c;    /* nord14: Terminal logo/success */
  --red: #bf616a;      /* nord11: Aurora Red */
  --code-bg: #242933;  /* Slightly darker than bg for contrast */
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
}

.wrap {
  max-width: 820px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3rem;
}

header {
  border-bottom: 1px solid var(--border);
  padding-bottom: 1rem;
  margin-bottom: 1.75rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}

.logo {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--green);
  text-decoration: none;
}

nav a {
  color: var(--text);
  text-decoration: none;
  margin-left: 1.1rem;
  font-size: 0.95rem;
}

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

nav a.nav-bofh {
  color: var(--red);
  background: rgba(191, 97, 106, 0.14);
  border: 1px solid var(--red);
  padding: 0.12rem 0.5rem;
  border-radius: 4px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: background 0.15s ease, color 0.15s ease;
}

nav a.nav-bofh:hover,
nav a.nav-bofh.active {
  background: var(--red);
  color: #eceff4;
  text-decoration: none;
}

.section-head { margin-bottom: 1.5rem; }
.section-desc { color: var(--muted); font-size: 0.95rem; }

.post, .box {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.35rem 1.5rem;
  margin-bottom: 1.25rem;
}

h1, h2 {
  margin-top: 0;
  color: #eceff4; /* nord6 */
  line-height: 1.3;
}

h1 { font-size: 1.6rem; }
h2 { font-size: 1.2rem; }

.meta {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.75rem;
  font-family: ui-monospace, monospace;
}

.sec-label {
  color: var(--green);
  margin-right: 0.25rem;
}

.tag {
  display: inline-block;
  background: #434c5e; /* nord2 */
  border: 1px solid var(--border);
  color: var(--accent);
  padding: 0.1rem 0.5rem;
  border-radius: 4px;
  font-size: 0.8rem;
  margin-right: 0.35rem;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 a:hover, h2 a:hover { text-decoration: none; color: var(--accent); }

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  background: var(--code-bg);
  padding: 0.15rem 0.35rem;
  border-radius: 4px;
  font-size: 0.88em;
}

pre {
  background: var(--code-bg);
  border: 1px solid var(--border);
  padding: 0.9rem;
  border-radius: 6px;
  overflow-x: auto;
  font-size: 0.88rem;
}

pre code {
  background: none;
  padding: 0;
}

footer {
  margin-top: 2.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.85rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}
