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

:root {
  --font: 'Cousine', 'Courier New', monospace;
  --fg: #111;
  --muted: #888;
  --border: #e8e8e8;
  --code-bg: #f5f5f5;
  --max: 640px;
}

body {
  font-family: var(--font);
  background: #fff;
  color: var(--fg);
  font-size: 14px;
  line-height: 1.7;
  padding: 3.5rem 1.5rem 6rem;
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
}

/* ── Banner ─────────────────────────────────────────────── */
.banner {
  text-align: center;
  margin-bottom: 1.5rem;
  overflow-x: auto;
}
.banner pre {
  display: inline-block;
  font-family: var(--font);
  font-size: clamp(5.5px, 1.4vw, 11px);
  line-height: 1;
  letter-spacing: 0;
  color: var(--fg);
  text-align: left;
}

/* ── Nav ─────────────────────────────────────────────────── */
nav {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 3.5rem;
  text-align: center;
}
nav a {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s;
}
nav a:hover { color: var(--fg); }
nav span { margin: 0 0.4rem; }

/* ── Label ───────────────────────────────────────────────── */
.label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

/* ── Section spacing (replaces <hr> separators) ──────────── */
main > * + * { margin-top: 3rem; }

/* ── Headings ────────────────────────────────────────────── */
h1 {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.4rem;
}

/* ── Subtitle (playground item desc below h1) ────────────── */
.subtitle {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 1.5rem;
}

/* ── Intro block (index page) ────────────────────────────── */
.intro p { font-size: 15px; line-height: 1.75; }

/* ── Article listing ─────────────────────────────────────── */
.article-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid #f0f0f0;
  text-decoration: none;
  color: inherit;
}
.article-item:first-of-type { border-top: 1px solid #f0f0f0; }
.article-item:hover .article-title { text-decoration: underline; }
.article-title { font-size: 14px; }
.article-meta {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
}

/* ── Project grid ────────────────────────────────────────── */
.projects {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
}
.project-card {
  border: 1px solid var(--border);
  padding: 1rem;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s;
}
.project-card:hover { border-color: var(--fg); }
.project-card .name { font-weight: 700; font-size: 13px; margin-bottom: 0.3rem; }
.project-card .desc { font-size: 12px; color: var(--muted); line-height: 1.5; }

/* ── Prose ───────────────────────────────────────────────── */
.prose > * + * { margin-top: 1rem; }

.prose h2 {
  font-size: 14px;
  font-weight: 700;
  margin-top: 1.75rem;
}

.prose a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.prose a:hover { color: var(--muted); }

.prose ul {
  padding-left: 1.25rem;
  list-style: disc;
}

/* ── Code ────────────────────────────────────────────────── */
.prose pre {
  font-family: var(--font);
  font-size: 12px;
  line-height: 1.6;
  background: var(--code-bg) !important;
  padding: 1rem !important;
  overflow-x: auto;
  border-radius: 0;
  margin: 1.5rem 0;
}

.prose code {
  font-family: var(--font);
  font-size: 12px;
  background: var(--code-bg);
  padding: 0.1em 0.35em;
}

.prose pre code {
  background: none;
  padding: 0;
  font-size: inherit;
}

/* ── Images ──────────────────────────────────────────────── */
.article-img {
  margin: 1.5rem 0;
}
.article-img img,
.article-img svg {
  display: block;
  width: 100%;
  height: auto;
}
.article-img figcaption {
  font-size: 11px;
  color: var(--muted);
  margin-top: 0.4rem;
  text-align: center;
  letter-spacing: 0.04em;
}
