@import url('https://fonts.googleapis.com/css2?family=Courier+Prime:ital,wght@0,400;0,700;1,400&display=swap');

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

:root {
  --font: 'Courier Prime', 'Courier New', monospace;
  --black: #111;
  --gray: #888;
  --line: #ddd;
  --bg: #fff;
  --size: 13px;
}

html { background: var(--bg); color: var(--black); font-family: var(--font); font-size: var(--size); line-height: 1.75; }

a { color: var(--black); }
a:hover { color: var(--gray); }

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

ul { margin: 0.25rem 0 0.75rem 1.1rem; }
ul li { margin-bottom: 0.2rem; }

h1 { font-size: 20px; font-weight: 700; margin-bottom: 0.4rem; }
h2 { font-size: 14px; font-weight: 700; margin: 1.5rem 0 0.4rem; }
p  { margin-bottom: 0.6rem; }

.btn {
  display: inline-block;
  padding: 0.4rem 0.9rem;
  border: 1px solid var(--black);
  text-decoration: none;
  color: var(--black);
  font-family: var(--font);
  font-size: 12px;
  margin: 0.2rem 0.2rem 0.2rem 0;
  background: transparent;
  cursor: pointer;
}
.btn:hover { background: #f5f5f5; color: var(--black); }

.vtags { display: flex; gap: 0.5rem; flex-wrap: wrap; margin: 0.5rem 0 1rem; }
.vtag  { font-size: 11px; padding: 0.2rem 0.6rem; border: 1px solid var(--line); color: var(--gray); }

.footnote { font-size: 11px; color: var(--gray); margin-top: 2.5rem; border-top: 1px solid var(--line); padding-top: 0.75rem; }
.footnote a { color: var(--gray); }

/* ── Desktop nav ── */
.nav-desktop {
  width: 20%;
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  padding: 1.5rem 1rem 1.5rem 1.5rem;
  border-right: 1px solid var(--line);
  background: var(--bg);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  z-index: 10;
}
.nav-desktop .site-title {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 1.5rem;
  text-decoration: none;
  color: var(--black);
  display: block;
}
.nav-desktop a {
  display: block;
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  text-decoration: none;
  color: var(--black);
}
.nav-desktop a:last-child { border-bottom: none; }
.nav-desktop a.active { font-weight: 700; }

/* ── Main content ── */
.main { margin-left: 20%; padding: 2rem 2.5rem; max-width: 900px; }

/* ── Grid ── */
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-bottom: 1rem; }

/* ── Mobile header ── */
.mob-header {
  display: none;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 20;
  align-items: center;
  justify-content: space-between;
}
.mob-header span { font-size: 13px; font-weight: 700; }
.mob-toggle {
  background: none;
  border: 1px solid var(--line);
  font-family: var(--font);
  font-size: 12px;
  cursor: pointer;
  padding: 0.25rem 0.6rem;
  color: var(--black);
}
.mob-nav {
  display: none;
  flex-direction: column;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 44px;
  z-index: 19;
}
.mob-nav-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--line);
}
.mob-nav-grid a {
  padding: 0.75rem 1rem;
  font-size: 12px;
  text-decoration: none;
  color: var(--black);
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
}
.mob-nav-grid a:nth-child(even) { border-right: none; }
.mob-nav-links a {
  display: block;
  padding: 0.6rem 1rem;
  font-size: 12px;
  text-decoration: none;
  color: var(--black);
  border-bottom: 1px solid var(--line);
}
.mob-nav-links a:last-child { border-bottom: none; }

@media (max-width: 640px) {
  .nav-desktop { display: none; }
  .mob-header  { display: flex; }
  .main        { margin-left: 0; padding: 1rem; }
  .grid2       { grid-template-columns: 1fr; }
}
