/* Published site — Northnitch-derived minimal theme */

:root {
  --green-50:  #EEF4F1;
  --green-100: #D7E4DD;
  --green-500: #1E7A5A;
  --green-700: #134A37;
  --green-800: #0F3B2E;
  --blue-600:  #224870;
  --grey-0:    #FFFFFF;
  --grey-50:   #F7F8F9;
  --grey-100:  #EEF0F2;
  --grey-150:  #E3E6EA;
  --grey-300:  #B8BEC6;
  --grey-500:  #6B7280;
  --grey-700:  #374151;
  --grey-900:  #111827;

  --font-display: 'Inter Tight', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-sans:    'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html, body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  color: var(--grey-900);
  background: var(--grey-0);
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'cv11', 'ss01';
}

.site {
  max-width: 640px;
  margin: 0 auto;
  padding: 48px 20px 96px;
}

.site-header {
  border-bottom: 1px solid var(--grey-150);
  padding-bottom: 14px;
  margin-bottom: 32px;
  display: flex;
  align-items: baseline;
  gap: 14px;
}
.site-header a.site-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 18px;
  letter-spacing: -0.01em;
  color: var(--green-700);
  text-decoration: none;
}
.site-header a.site-title:hover { color: var(--green-800); }
.site-header .feed {
  margin-left: auto;
  font-size: 12px;
  color: var(--grey-500);
}
.site-header .feed a { color: var(--grey-500); text-decoration: none; margin-left: 8px; }
.site-header .feed a:hover { color: var(--green-700); text-decoration: underline; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--grey-900);
  margin: 0;
}
h1 { font-size: 32px; line-height: 1.2; }
h2 { font-size: 22px; line-height: 1.3; margin-top: 32px; }
h3 { font-size: 17px; line-height: 1.35; margin-top: 24px; }

a {
  color: var(--blue-600);
  text-decoration: none;
  text-underline-offset: 2px;
}
a:hover { text-decoration: underline; }

time.num, .num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.005em;
}

.post-meta {
  color: var(--grey-500);
  font-size: 13px;
  margin-top: 6px;
}

.post-body {
  margin-top: 28px;
  font-size: 17px;
  line-height: 1.6;
}
.post-body p { margin: 0 0 16px; }
.post-body img { max-width: 100%; height: auto; border-radius: 6px; display: block; }
.post-body figure { margin: 20px 0; }
.post-body figcaption { color: var(--grey-500); font-size: 13px; margin-top: 6px; }
.post-body pre {
  background: var(--grey-100);
  padding: 14px 16px;
  overflow-x: auto;
  border-radius: 6px;
  font-size: 14px;
  line-height: 1.5;
}
.post-body code {
  background: var(--grey-100);
  padding: 1px 5px;
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 0.92em;
}
.post-body pre code { background: none; padding: 0; }
.post-body blockquote {
  border-left: 3px solid var(--green-500);
  margin: 16px 0;
  padding-left: 16px;
  color: var(--grey-700);
}
.post-body hr { border: 0; border-top: 1px solid var(--grey-150); margin: 28px 0; }
.post-body ul, .post-body ol { padding-left: 24px; }

.wiki-ref {
  background: var(--green-50);
  color: var(--green-800);
  padding: 0 4px;
  border-radius: 2px;
  text-decoration: none;
}
.wiki-ref:hover { background: var(--green-100); text-decoration: none; }

.memex-block { margin: 20px 0; }
.memex-table { border-collapse: collapse; width: 100%; font-size: 14px; }
.memex-table th, .memex-table td { border: 1px solid var(--grey-150); padding: 6px 10px; text-align: left; }
.memex-table th { background: var(--grey-50); font-weight: 600; }
.memex-kv {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 4px 16px;
  background: var(--grey-50);
  border: 1px solid var(--grey-150);
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 14px;
}
.memex-kv dt { font-weight: 600; color: var(--grey-700); }
.memex-kv dd { margin: 0; }
.memex-url {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 4px 10px;
  background: var(--grey-50);
  border: 1px solid var(--grey-150);
  border-radius: 6px;
  padding: 10px 14px;
}

.memex-gallery {
  display: grid;
  gap: 8px;
  margin: 20px 0;
  padding: 0;
}
.memex-gallery-cols-1 { grid-template-columns: 1fr; }
.memex-gallery-cols-2 { grid-template-columns: repeat(2, 1fr); }
.memex-gallery-cols-3 { grid-template-columns: repeat(3, 1fr); }
.memex-gallery-cols-4 { grid-template-columns: repeat(4, 1fr); }
.memex-gallery-item {
  margin: 0;
  position: relative;
  overflow: hidden;
  border-radius: 6px;
  background: var(--grey-100);
}
.memex-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  aspect-ratio: 4 / 3;
}
.memex-gallery-item figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 10px 14px;
  background: linear-gradient(to top, rgba(17, 24, 39, 0.75), rgba(17, 24, 39, 0));
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.3;
}
@media (max-width: 520px) {
  .memex-gallery-cols-2,
  .memex-gallery-cols-3,
  .memex-gallery-cols-4 {
    grid-template-columns: 1fr;
  }
}

.post-list { list-style: none; padding: 0; margin: 32px 0 0; }
.post-list li { padding: 14px 0; border-bottom: 1px solid var(--grey-150); }
.post-list li:last-child { border-bottom: 0; }
.post-list a.post-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 19px;
  color: var(--grey-900);
  letter-spacing: -0.01em;
  display: block;
}
.post-list a.post-title:hover { color: var(--green-700); text-decoration: none; }
.post-list time {
  color: var(--grey-500);
  font-size: 12px;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

footer.site-footer {
  margin-top: 64px;
  padding-top: 20px;
  border-top: 1px solid var(--grey-150);
  color: var(--grey-500);
  font-size: 13px;
}

@media (max-width: 640px) {
  .site { padding: 24px 16px 64px; }
  h1 { font-size: 28px; }
  .post-body { font-size: 16px; }
}
