@import url('https://api.fontshare.com/v2/css?f[]=satoshi@900,700,500,400&display=swap');
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400&display=swap');

:root {
  --background: #fafaf9;
  --surface: #f0efeb;
  --border: #e5e5e2;
  --text: #1a1a1a;
  --text-muted: #6b6b6b;
  --accent: #ff4f00;
  --accent-dark: #d34000;
}

* {
  box-sizing: border-box;
}

body {
  font-family:
    Satoshi,
    system-ui,
    -apple-system,
    sans-serif;
  max-width: 720px;
  margin: 0 auto;
  padding: 32px 24px;
  background: var(--background);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
}

.masthead {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 48px;
}
.masthead-name {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
  text-decoration: none;
}
a.masthead-name:hover {
  color: var(--accent);
}
.parent-site {
  font-size: 14px;
  font-weight: 400;
  color: var(--text-muted);
  text-decoration: none;
  white-space: nowrap;
}
.parent-site:hover {
  color: var(--accent);
}

article header h1 {
  font-size: 32px;
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 0 0 8px;
}
article header time {
  font-size: 14px;
  color: var(--text-muted);
}
article header img.cover {
  display: block;
  width: 100%;
  height: auto;
  margin: 24px 0 0;
  border-radius: 4px;
}

article {
  margin-bottom: 64px;
}
article p {
  font-size: 18px;
  margin: 16px 0;
}
article h2 {
  font-size: 24px;
  font-weight: 700;
  margin-top: 32px;
  letter-spacing: -0.01em;
}
article h3 {
  font-size: 20px;
  font-weight: 500;
  margin-top: 24px;
}
article a {
  color: var(--accent);
}
article a:hover {
  color: var(--accent-dark);
}
article ul,
article ol {
  padding-left: 24px;
}
article li {
  margin: 8px 0;
}
article blockquote {
  border-left: 4px solid var(--accent);
  padding-left: 16px;
  color: var(--text-muted);
  margin: 24px 0;
}
article code {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 14px;
  background: var(--surface);
  padding: 2px 4px;
  border-radius: 4px;
}
article pre {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  overflow-x: auto;
}
article pre code {
  background: transparent;
  padding: 0;
}
article img {
  /* Constrain to column width; preserve aspect ratio. Without this an
     800-960px Wikimedia thumb (or any phone-camera JPEG) blows past the
     720px body width. Centering matches the inline post-flow shape and
     a small radius matches the existing <pre> block. */
  max-width: 100%;
  height: auto;
  display: block;
  margin: 24px auto;
  border-radius: 8px;
}

.tags {
  margin-top: 32px;
}
.tags span {
  display: inline-block;
  background: var(--surface);
  color: var(--text-muted);
  font-size: 14px;
  padding: 4px 8px;
  border-radius: 4px;
  margin-right: 4px;
}

main .post-item {
  border-bottom: 1px solid var(--border);
  padding: 24px 0;
}
main .post-item:last-child {
  border-bottom: none;
}
main .post-item h2 {
  font-size: 20px;
  margin: 0 0 8px;
  font-weight: 500;
}
main .post-item h2 a {
  color: var(--text);
  text-decoration: none;
}
main .post-item h2 a:hover {
  color: var(--accent);
}
main .post-item time {
  font-size: 14px;
  color: var(--text-muted);
}
main .post-item p {
  color: var(--text-muted);
  margin: 8px 0 0;
  font-size: 16px;
}

footer {
  margin-top: 64px;
  font-size: 14px;
  color: var(--text-muted);
  text-align: center;
}
footer a {
  color: var(--text-muted);
}
footer a:hover {
  color: var(--text);
}

/* Empty state — rendered into {{{postList}}} when a blog has no
   published posts yet. One motion idea, executed precisely: a blank
   page that types its own status, caret left blinking. */
.empty-state {
  text-align: center;
  padding: 72px 0 24px;
}
.empty-type-line {
  width: 26ch;
  max-width: 100%;
  margin: 0 auto 32px;
  text-align: left;
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  color: var(--text-muted);
  min-height: 1.5em;
}
.empty-type {
  display: inline-block;
  white-space: nowrap;
  overflow: hidden;
  vertical-align: bottom;
  width: 26ch;
  border-right: 0.6ch solid var(--accent);
  animation:
    empty-typing 2.6s steps(26) 0.5s backwards,
    empty-caret 1.1s step-end infinite;
}
.empty-state h2 {
  font-size: 34px;
  font-weight: 900;
  letter-spacing: -0.02em;
  margin: 0 0 10px;
  animation: empty-rise 0.55s ease 0.2s backwards;
}
.empty-sub {
  color: var(--text-muted);
  margin: 0 0 36px;
  animation: empty-rise 0.55s ease 0.35s backwards;
}
.empty-owner {
  display: inline-block;
  text-align: left;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
  background: var(--surface);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  padding: 14px 18px;
  max-width: 420px;
  margin: 0 auto;
  animation: empty-rise 0.55s ease 0.5s backwards;
}
.empty-owner strong {
  font-weight: 700;
}
@keyframes empty-typing {
  from {
    width: 0;
  }
  to {
    width: 26ch;
  }
}
@keyframes empty-caret {
  0%,
  100% {
    border-color: var(--accent);
  }
  50% {
    border-color: transparent;
  }
}
@keyframes empty-rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .empty-type,
  .empty-state h2,
  .empty-sub,
  .empty-owner {
    animation: none;
  }
}
