:root {
  --bg: #fafaf8;
  --surface: #ffffff;
  --ink: #171717;
  --muted: #5c5c57;
  --border: #e6e5df;
  --accent: #2c4c3b;
  --accent-soft: #eef3f0;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, sans-serif;
  --serif: "Iowan Old Style", "Georgia", "Times New Roman", serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration-color: var(--border);
  text-underline-offset: 3px;
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

a:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
}

.wrap {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 24px;
}

header {
  border-bottom: 1px solid var(--border);
  background: rgba(250, 250, 248, 0.9);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.brand-mark {
  width: 22px;
  height: 22px;
  border-radius: 50% 44% 52% 46% / 46% 52% 48% 54%;
  background: var(--accent);
  display: inline-block;
}

.nav-links {
  display: flex;
  gap: 24px;
  font-size: 14px;
  color: var(--muted);
}

.nav-links a {
  text-decoration: none;
}

.nav-links a.active,
.nav-links a:hover {
  color: var(--ink);
}

main {
  padding: 56px 0 80px;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}

h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(32px, 5vw, 44px);
  line-height: 1.18;
  letter-spacing: -0.02em;
  margin: 0 0 20px;
}

h2 {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 48px 0 18px;
}

h3 {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 6px;
}

.lead {
  font-size: 18px;
  color: var(--muted);
  max-width: 620px;
  margin: 0 0 36px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.card:hover {
  border-color: #c9c7be;
  transform: translateY(-1px);
}

.card p {
  font-size: 14px;
  color: var(--muted);
  margin: 0 0 14px;
}

.tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 2px 8px;
  border-radius: 999px;
}

.note-list {
  list-style: none;
  padding: 0;
  margin: 0;
  border-top: 1px solid var(--border);
}

.note-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.note-list a {
  text-decoration: none;
  font-weight: 500;
}

.note-date {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

.prose p {
  margin: 0 0 18px;
  color: #2b2b28;
}

.prose pre {
  background: #f3f2ed;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.55;
}

.prose code {
  font-family: var(--mono);
  font-size: 0.9em;
  background: #f1f0ea;
  padding: 1px 5px;
  border-radius: 4px;
}

.prose pre code {
  background: transparent;
  padding: 0;
}

footer {
  border-top: 1px solid var(--border);
  padding: 28px 0 44px;
  font-size: 13px;
  color: var(--muted);
}

.footer-row {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

@media (max-width: 560px) {
  .note-list li {
    flex-direction: column;
    gap: 4px;
  }
}
