* { box-sizing: border-box; }
body { font-family: system-ui, -apple-system, sans-serif; max-width: 860px; margin: 0 auto; padding: 1.5rem; line-height: 1.6; color: #222; background: #fafafa; }
header { border-bottom: 2px solid #333; margin-bottom: 1.5rem; padding-bottom: .5rem; }
header a { text-decoration: none; color: #111; }
nav a { margin-right: 1rem; }
h1, h2, h3 { line-height: 1.25; }
article { background: #fff; padding: 1.2rem; margin-bottom: 1.2rem; border-radius: 6px; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
article h2 { margin-top: 0; }
.meta { color: #777; font-size: .85rem; margin-bottom: .5rem; }
input, textarea, button { font: inherit; padding: .6rem; width: 100%; border: 1px solid #ccc; border-radius: 4px; }
textarea { min-height: 240px; font-family: monospace; }
button, .btn { background: #222; color: #fff; border: none; padding: .6rem 1.2rem; cursor: pointer; width: auto; border-radius: 4px; text-decoration: none; display: inline-block; }
.btn-danger { background: #c0392b; }
.preview { background: #f4f4f4; padding: 1rem; border-radius: 4px; min-height: 240px; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 700px) { .grid { grid-template-columns: 1fr; } }
.search-form { display: flex; gap: .5rem; margin-bottom: 1rem; }
.search-form input { flex: 1; }
.prose h2 { margin-top: 1.2rem; }
.prose code { background: #eee; padding: .1rem .3rem; border-radius: 3px; }
.prose pre { background: #222; color: #eee; padding: 1rem; overflow-x: auto; border-radius: 4px; }
.prose pre code { background: none; color: inherit; }

/* Markdown toolbar */
.editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: .3rem;
  padding: .5rem;
  background: #f0f0f0;
  border: 1px solid #ccc;
  border-bottom: none;
  border-radius: 4px 4px 0 0;
}
.editor-toolbar button {
  background: #fff;
  color: #222;
  border: 1px solid #ccc;
  padding: .35rem .65rem;
  font-size: .85rem;
  cursor: pointer;
  border-radius: 3px;
  min-width: 2.2rem;
  width: auto;
  line-height: 1.1;
}
.editor-toolbar button:hover { background: #222; color: #fff; border-color: #222; }
.editor-toolbar button b { font-weight: 700; }
.editor-toolbar button i { font-style: italic; }
.editor-toolbar .sep {
  width: 1px; background: #ccc; margin: .2rem .3rem;
}
.editor-wrapper textarea {
  border-radius: 0 0 4px 4px;
}
/* Preview box lebih besar */
.preview {
  background: #f4f4f4;
  padding: 1rem;
  border-radius: 4px;
  min-height: 400px;
  max-height: 600px;
  overflow-y: auto;
  border: 1px solid #ddd;
}
.preview:empty::before {
  content: "Preview akan tampil di sini…";
  color: #999;
  font-style: italic;
}

a,
a:link,
a:visited,
a:hover,
a:active,
a:focus {
  color: #111;
  text-decoration: none;
}

/* hover sedikit beda biar ada feedback, tapi tidak pucat */
a:hover {
  text-decoration: underline;
}

/* Khusus judul artikel di index */
article h2 a,
article h2 a:link,
article h2 a:visited,
article h2 a:hover,
article h2 a:active {
  color: #111;
}

article h2 a:hover {
  color: #0055aa;
}

/* Pagination ala WordPress */
.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  align-items: center;
  margin: 2rem 0 1rem;
  font-size: .95rem;
}
.pagination a,
.pagination span {
  display: inline-block;
  padding: .45rem .75rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: #fff;
  color: #222;
  text-decoration: none;
  line-height: 1;
}
.pagination a:hover {
  background: #222;
  color: #fff;
  border-color: #222;
  text-decoration: none;
}
.pagination .page-current {
  background: #222;
  color: #fff;
  border-color: #222;
  font-weight: 600;
}
.pagination .page-dots {
  border: none;
  background: none;
  color: #999;
  padding: .45rem .25rem;
}
.pagination .page-prev,
.pagination .page-next {
  font-weight: 600;
}

/* Footer */
.site-footer {
  margin-top: 3rem;
  padding: 1.5rem 0;
  border-top: 1px solid #ddd;
  text-align: center;
  color: #666;
  font-size: .9rem;
}
.site-footer a {
  color: #222;
  text-decoration: underline;
}
.site-footer .heart {
  color: #e0245e;
  display: inline-block;
  animation: heartbeat 1.4s ease-in-out infinite;
}
@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  25% { transform: scale(1.2); }
  50% { transform: scale(1); }
  75% { transform: scale(1.15); }
}
