:root {
  --bg: #f1ece1;
  --bg-alt: #e8e0cd;
  --text: #262420;
  --text-dim: #5f5847;
  --accent: #2f4a3c;
  --accent-bright: #45715a;
  --rule: #262420;
  --rule-soft: #b7ac8c;
  --visited: #6b5638;
  --max: 680px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background-color: var(--bg);
  background-image: repeating-linear-gradient(
    180deg,
    rgba(47, 74, 60, 0.035) 0px,
    rgba(47, 74, 60, 0.035) 1px,
    transparent 1px,
    transparent 3px
  );
  color: var(--text);
  font-family: "JetBrains Mono", "Fira Code", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 15px;
  line-height: 1.6;
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 20px;
}
.wrap-home { max-width: 920px; }

a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: var(--rule-soft);
  text-underline-offset: 3px;
}
a:visited { color: var(--visited); }
a:hover, a:focus-visible {
  background: var(--accent);
  color: var(--bg);
  text-decoration: none;
}
a:focus-visible { outline: 1px dashed var(--text); outline-offset: 2px; }

/* top nav strip, bracketed like a terminal menu */
.nav {
  display: flex;
  justify-content: center;
  gap: 4px;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--rule-soft);
  padding: 10px 0;
}
.nav-item { font-size: 0.85rem; }
.nav-item::before { content: "["; color: var(--text-dim); }
.nav-item::after { content: "]"; color: var(--text-dim); }
.nav-item a {
  color: var(--text);
  text-decoration: none;
  text-transform: lowercase;
}
.nav-item a:hover, .nav-item a:focus-visible {
  background: var(--accent);
  color: var(--bg);
}

/* the whole header is a link back home, lugo-style */
.site-link {
  display: block;
  color: inherit;
  text-decoration: none;
}
.site-link:hover, .site-link:focus-visible { background: none; }

.site-head {
  text-align: center;
  padding: 40px 0 28px;
  border-bottom: 4px double var(--rule);
  margin-bottom: 34px;
}
.brand {
  margin: 0 0 8px;
  font-size: 1.7rem;
  color: var(--text);
  text-transform: lowercase;
  letter-spacing: -0.01em;
}
.cursor {
  display: inline-block;
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.hero-tagline {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.9rem;
}

/* main */
main.wrap {
  padding-top: 0;
  padding-bottom: 56px;
  min-height: 60vh;
}

.section-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 12px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--rule);
}

/* link grid: bordered boxes, table-like */
.link-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0;
  border: 2px solid var(--rule);
  margin-bottom: 40px;
}
.link-col {
  padding: 16px 18px;
  border-right: 2px solid var(--rule);
  border-bottom: 2px solid var(--rule);
  background: var(--bg-alt);
}
.link-col:last-child { border-right: none; }
.link-col .section-label { background: var(--bg); margin: -16px -18px 12px; padding: 8px 18px 8px; border-bottom: 2px solid var(--rule); }

.links {
  list-style: none;
  margin: 0 0 10px;
  padding: 0;
}
.links li {
  padding: 5px 0;
  border-bottom: 1px solid var(--rule-soft);
  font-size: 0.93rem;
}
.links li:last-child { border-bottom: none; }
.links a { text-decoration: none; }
.links .entry-date {
  display: inline-block;
  margin-left: 8px;
  font-size: 0.74rem;
  color: var(--text-dim);
}

.more { display: inline-block; font-size: 0.88rem; }

/* entry lists (posts section pages) */
.entries {
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
  border: 2px solid var(--rule);
}
.entry {
  padding: 12px 16px;
  border-bottom: 1px solid var(--rule-soft);
  background: var(--bg-alt);
}
.entry:nth-child(even) { background: var(--bg); }
.entry:last-child { border-bottom: none; }
.entry-title { font-weight: 700; text-decoration: none; color: var(--text); }
.entry-title:hover, .entry-title:focus-visible { background: var(--accent); color: var(--bg); }
.entry-date { display: block; font-size: 0.78rem; color: var(--text-dim); margin-top: 3px; }
.entry-summary { margin: 6px 0 0; color: var(--text-dim); font-size: 0.9rem; }

/* post */
.post-title { font-size: 1.35rem; margin: 0 0 8px; line-height: 1.3; }
.post-meta { font-size: 0.8rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.03em; }

.post-body h2 { font-size: 1.05rem; margin-top: 2em; text-transform: lowercase; border-bottom: 1px solid var(--rule-soft); padding-bottom: 4px; }
.post-body h3 { font-size: 0.98rem; margin-top: 1.6em; }
.post-body p { margin: 0 0 1.1em; }
.post-body ul, .post-body ol { margin: 0 0 1.1em; padding-left: 1.3em; }
.post-body li { margin-bottom: 0.4em; }
.post-body blockquote {
  margin: 1.4em 0;
  padding: 4px 14px;
  border-left: 3px solid var(--accent);
  background: var(--bg-alt);
  color: var(--text-dim);
}
.post-body code { background: var(--bg-alt); padding: 1px 5px; border: 1px solid var(--rule-soft); font-size: 0.9em; }
.post-body pre { background: var(--bg-alt); padding: 14px; overflow-x: auto; border: 2px solid var(--rule); }
.post-body pre code { background: none; padding: 0; border: none; }
.post-body hr { border: none; border-top: 2px solid var(--rule); margin: 2em 0; }

/* taglist (lugo-style, bottom of posts) */
.taglist {
  margin-top: 32px;
  padding-top: 12px;
  border-top: 1px dashed var(--rule-soft);
  font-size: 0.85rem;
  color: var(--text-dim);
}
.taglist-label { text-transform: uppercase; letter-spacing: 0.04em; margin-right: 6px; }
.taglist a { text-decoration: none; }

/* nextprev (lugo-style, bottom of posts) */
.nextprev {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 2px solid var(--rule);
  font-size: 0.85rem;
}
.nextprev a { text-decoration: none; flex: 1; }
.nextart { text-align: right; }
.np-label { display: block; font-size: 0.72rem; text-transform: uppercase; color: var(--text-dim); margin-bottom: 2px; }

/* footer: status bar */
.site-foot {
  border-top: 4px double var(--rule);
  padding: 16px 0 36px;
  font-size: 0.76rem;
  color: var(--text-dim);
}
.site-foot .wrap {
  display: flex;
  gap: 14px;
  justify-content: center;
}
.site-foot a { color: var(--text-dim); text-decoration: none; }

@media (prefers-reduced-motion: reduce) {
  .cursor { animation: none; }
}

@media (max-width: 600px) {
  .brand { font-size: 1.4rem; }
  .link-grid { grid-template-columns: 1fr; }
  .link-col { border-right: none; }
  .nextprev { flex-direction: column; }
  .nextart { text-align: left; }
}

@media (max-width: 480px) {
  body { font-size: 14.5px; }
  .nav-item { margin: 0 4px; }
}
