/* clarior — minimal terminal aesthetic */

@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/static/vendor/fonts/jetbrains-mono-400.woff2") format("woff2");
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/static/vendor/fonts/jetbrains-mono-700.woff2") format("woff2");
}

:root {
  --bg: #000;
  --fg: #e6e6e6;
  --dim: #888;
  --accent: #fff;
  --rule: #2a2a2a;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
}

body {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas,
    "Liberation Mono", monospace;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.wrap {
  max-width: 72ch;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 5rem;
}

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

/* ---------- landing ---------- */

.landing, .notfound {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-height: 80vh;
  justify-content: center;
  gap: 1.25rem;
}

/* landing SVG ring */
.ring {
  color: var(--fg);
  display: block;
}

/* ASCII glyph used on the 404 page */
.circle {
  color: var(--fg);
  font-size: 14px;
  line-height: 1.15;
  margin: 0;
  white-space: pre;
  user-select: none;
}

.name {
  position: relative;
  display: inline-block;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin: 0;
  cursor: pointer;
  outline: none;
}
.name .n-default, .name .n-alt {
  display: inline-block;
  transition: opacity 0.35s ease;
}
.name .n-alt {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  text-align: center;
  opacity: 0;
}
.name:hover .n-default,
.name:focus .n-default,
.name.swapped .n-default { opacity: 0; }
.name:hover .n-alt,
.name:focus .n-alt,
.name.swapped .n-alt { opacity: 1; }

/* ---------- menus ---------- */

.menu a { display: inline-block; }

/* terminal-style "> " cursor that appears on hover (where a .cursor span exists) */
.menu a .cursor { opacity: 0; transition: opacity 0.12s ease; }
.menu a:hover .cursor,
.menu a:focus .cursor { opacity: 1; }
.menu a:hover { text-decoration: none; }

.menu-v {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  align-items: center;
}

.menu-h {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}
.menu-h a.active { color: var(--accent); font-weight: 700; }

/* landing: menu points side by side, centered */
.landing-menu {
  justify-content: center;
  gap: 1.75rem;
}

/* ---------- inner header ---------- */

.topnav {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.75rem 1.5rem;
  padding-bottom: 1.25rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--rule);
}
.topnav .brand {
  font-weight: 700;
  letter-spacing: 0.04em;
}

/* ---------- lists ---------- */

.tagbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 1.1rem;
  margin-bottom: 3.25rem;
  font-size: 0.9rem;
}
.tagbar a { color: var(--dim); }
.tagbar a:hover { color: var(--accent); text-decoration: none; }
.tagbar a.active { color: var(--accent); }
.tagbar a.active::before { content: "> "; }

.entries { list-style: none; margin: 0; padding: 0; }
.entries li { margin: 0 0 1.5rem; }
.entry { display: flex; gap: 1rem; align-items: baseline; }
.entry .date { color: var(--dim); flex: 0 0 auto; }
.entry .etitle { color: var(--fg); }
.entry:hover .etitle { color: var(--accent); }
.blurb { color: var(--dim); margin: 0.15rem 0 0 0; padding-left: calc(10ch + 1rem); }
.empty { color: var(--dim); }

/* ---------- post ---------- */

.post-title { font-size: 1.6rem; margin: 0 0 0.25rem; line-height: 1.25; }
.post-meta { color: var(--dim); margin-bottom: 2rem; }

.body { word-wrap: break-word; }
.body h1, .body h2, .body h3 { line-height: 1.25; margin: 2rem 0 0.75rem; }
.body h1 { font-size: 1.4rem; }
.body h2 { font-size: 1.2rem; }
.body h3 { font-size: 1.05rem; }
.body p { margin: 0 0 1.1rem; }
.body a { text-decoration: underline; text-decoration-color: var(--dim); }
.body img { max-width: 100%; height: auto; display: block; margin: 1.25rem 0; }
.body ul, .body ol { padding-left: 1.5rem; }
.body li { margin: 0.25rem 0; }
.body hr { border: 0; border-top: 1px solid var(--rule); margin: 2rem 0; }

.body blockquote {
  margin: 1.25rem 0;
  padding: 0.1rem 1rem;
  border-left: 2px solid var(--rule);
  color: var(--dim);
}

.body code {
  font-family: inherit;
  font-size: 0.92em;
  background: #161616;
  padding: 0.1em 0.35em;
  border-radius: 3px;
}
.body pre {
  background: #0d0d0d;
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 1rem;
  overflow-x: auto;
  line-height: 1.45;
}
.body pre code { background: none; padding: 0; }

.body table {
  border-collapse: collapse;
  width: 100%;
  margin: 1.25rem 0;
}
.body th, .body td {
  border: 1px solid var(--rule);
  padding: 0.4rem 0.6rem;
  text-align: left;
}

.back {
  display: inline-block;
  margin-top: 3rem;
  color: var(--dim);
}
.back:hover { color: var(--accent); }

.back-top {
  margin-top: 0;
  margin-bottom: 1.5rem;
}

/* footnotes */
.footnotes { color: var(--dim); font-size: 0.9rem; border-top: 1px solid var(--rule); margin-top: 3rem; }

@media (max-width: 480px) {
  .circle { font-size: 12px; }
  .entry { flex-direction: column; gap: 0; }
  .blurb { padding-left: 0; }
}
