/* ── Reset & base ─────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  background-color: #f9f9f7;
  color: #1a1a1a;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Site header / nav ───────────────────────────────────── */
header {
  background-color: #ffffff;
  border-bottom: 1px solid #e5e5e0;
  padding: 0 1.5rem;
}

header .inner {
  max-width: 780px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}

header .site-title {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #1a1a1a;
  text-decoration: none;
}

header .site-title:hover {
  color: #2563eb;
}

nav {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

nav a {
  color: #555;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.15s;
}

nav a:hover,
nav a[aria-current="page"] {
  color: #2563eb;
}

/* ── Main content ────────────────────────────────────────── */
main {
  flex: 1;
  max-width: 780px;
  width: 100%;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
}

/* ── Typography ──────────────────────────────────────────── */
h1 {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.3;
  margin-bottom: 0.25rem;
  color: #111;
}

h2 {
  font-size: 1.3rem;
  font-weight: 600;
  margin: 2rem 0 0.5rem;
  color: #111;
}

h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 1.75rem 0 0.4rem;
  color: #111;
}

h4 {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 1.25rem 0 0.3rem;
  color: #333;
}

p {
  margin-bottom: 1rem;
}

ul, ol {
  margin: 0.5rem 0 1rem 1.5rem;
}

li {
  margin-bottom: 0.3rem;
}

/* ── Links ───────────────────────────────────────────────── */
a {
  color: #2563eb;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ── Post meta (date line) ───────────────────────────────── */
.post-meta {
  color: #888;
  font-size: 0.85rem;
  margin-bottom: 1.75rem;
}

/* ── Project list ────────────────────────────────────────── */
.project-list {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
}

.project-list li {
  border-bottom: 1px solid #e5e5e0;
  padding: 0.75rem 0;
}

.project-list li:first-child {
  border-top: 1px solid #e5e5e0;
}

.project-list a {
  font-weight: 500;
}

/* ── Code ────────────────────────────────────────────────── */
code {
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 0.85em;
  background: #f0f0ec;
  border: 1px solid #e0e0da;
  border-radius: 3px;
  padding: 0.1em 0.35em;
  color: #c7254e;
}

pre {
  background: #1e1e2e;
  color: #cdd6f4;
  border-radius: 6px;
  padding: 1.25rem 1.5rem;
  overflow-x: auto;
  margin: 1rem 0 1.5rem;
  line-height: 1.55;
}

pre code {
  background: none;
  border: none;
  padding: 0;
  color: inherit;
  font-size: 0.875rem;
  border-radius: 0;
}

/* ── Footer ──────────────────────────────────────────────── */
footer {
  border-top: 1px solid #e5e5e0;
  background: #ffffff;
  color: #999;
  font-size: 0.8rem;
  text-align: center;
  padding: 1.25rem 1.5rem;
}

footer a {
  color: #777;
}

footer a:hover {
  color: #2563eb;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 600px) {
  h1 { font-size: 1.4rem; }
  main { padding: 1.5rem 1rem; }
  header .inner { height: 50px; }
}
