/* nozomi — 100r.co inspired: parchment ground, monospace, flat, dense wiki nav */

:root {
  --bg:      #e0dfd8;   /* parchment */
  --ink:     #14191f;   /* near-black */
  --muted:   #6b6f6a;   /* captions, dates */
  --rule:    #b7b6ac;   /* hairlines */
  --link:    #1f5c56;   /* muted teal */
  --link-hi: #0f3a35;
  --measure: 68ch;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:    #14191f;
    --ink:   #d9d7cc;
    --muted: #8a8d86;
    --rule:  #333a41;
    --link:  #6fb3aa;
    --link-hi: #9bd3cb;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 15px;
  line-height: 1.65;
  font-variant-ligatures: none;
}

.wrap {
  display: flex;
  align-items: flex-start;
  gap: 3rem;
  max-width: 62rem;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
}

/* ---- sidebar / wiki nav ---- */
.sidebar {
  flex: 0 0 12rem;
  position: sticky;
  top: 2.5rem;
  font-size: 14px;
}
.sidebar .brand {
  display: block;
  font-weight: 600;
  font-size: 17px;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: var(--ink);
}
.sidebar .tagline {
  margin: 0.2rem 0 1.4rem;
  color: var(--muted);
}
.sidebar ul {
  list-style: none;
  margin: 0 0 1.4rem;
  padding: 0;
  border-top: 1px solid var(--rule);
}
.sidebar li {
  border-bottom: 1px solid var(--rule);
}
.sidebar li a {
  display: block;
  padding: 0.35rem 0;
  text-decoration: none;
  color: var(--link);
}
.sidebar li a:hover { color: var(--link-hi); }
.sidebar li a.here {
  color: var(--ink);
  font-weight: 600;
}
.sidebar .foot { color: var(--muted); font-size: 12px; }

/* ---- content ---- */
.content {
  flex: 1 1 auto;
  min-width: 0;
  max-width: var(--measure);
}
.content article > :first-child { margin-top: 0; }

h1, h2, h3, h4 {
  line-height: 1.2;
  font-weight: 600;
  margin: 2em 0 0.6em;
}
h1 { font-size: 1.5rem; }
h2 { font-size: 1.2rem; }
h3 { font-size: 1.05rem; }

p, ul, ol, blockquote, pre, table { margin: 0 0 1rem; }

a { color: var(--link); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--link-hi); }

.date { color: var(--muted); margin-top: -0.4rem; }

ul, ol { padding-left: 1.4rem; }
li { margin: 0.2rem 0; }

blockquote {
  border-left: 2px solid var(--rule);
  margin-left: 0;
  padding-left: 1rem;
  color: var(--muted);
}

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

code {
  background: color-mix(in srgb, var(--ink) 8%, transparent);
  padding: 0.05em 0.3em;
  border-radius: 2px;
  font-size: 0.9em;
}
pre {
  background: color-mix(in srgb, var(--ink) 6%, transparent);
  padding: 0.8rem 1rem;
  overflow-x: auto;
  border: 1px solid var(--rule);
}
pre code { background: none; padding: 0; }

table { border-collapse: collapse; width: 100%; font-size: 0.95em; }
th, td { border: 1px solid var(--rule); padding: 0.35rem 0.6rem; text-align: left; }

img { max-width: 100%; height: auto; }

/* ---- log entries + feed link ---- */
.entries { list-style: none; margin: 1.5rem 0 0; padding: 0; }
.entries li {
  display: flex;
  gap: 0.9rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--rule);
}
.entries .date { color: var(--muted); font-variant-numeric: tabular-nums; }
.feed { margin-top: 2rem; font-size: 0.9em; }

/* ---- responsive: stack nav on top ---- */
@media (max-width: 640px) {
  .wrap { flex-direction: column; gap: 1.5rem; padding: 1.5rem 1rem; }
  .sidebar { position: static; flex-basis: auto; width: 100%; }
  .sidebar ul { display: block; }
  body { font-size: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
