:root {
  color-scheme: dark;

  /* Typography */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Inter", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  /* Dark mode palette - Mentah, kontras seimbang, dingin */
  --bg-color: #101012;
  --text-color: #ededef;
  --text-muted: #71717a;
  --border-color: #242428;
  --border-subtle: #1c1c20;
  --accent-color: #e2e8f0;
  --accent-hover: #38bdf8;
  --code-bg: #161619;

  --selection-bg: rgba(255, 255, 255, 0.15);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

::selection {
  background-color: var(--selection-bg);
  color: #ffffff;
}

html {
  font-family: var(--font-sans);
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  max-width: 600px; /* Kompak & nyaman dibaca */
  margin: 0 auto;
  padding: 3rem 1.25rem 5rem;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1;
}

/* Header & Nav */
header {
  margin-bottom: 3rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-color);
}

header nav {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.brand {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text-color);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.brand:hover {
  color: var(--accent-hover);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.nav-link {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text-color);
}

.nav-back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  text-decoration: none;
  margin-bottom: 2rem;
  transition: color 0.15s ease;
}

.nav-back:hover {
  color: var(--text-color);
}

/* Raw Post List - Tanpa Deskripsi, Tanpa Card Bloat */
.post-raw-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  margin: 1rem 0 2.5rem;
}

.post-raw-item {
  display: flex;
  align-items: baseline;
  gap: 1.25rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border-subtle);
}

.post-raw-item:last-child {
  border-bottom: none;
}

.post-raw-date {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
  min-width: 90px;
}

.post-raw-title {
  font-size: 0.975rem;
  color: var(--text-color);
  text-decoration: none;
  line-height: 1.5;
  transition: color 0.15s ease;
}

.post-raw-title:hover {
  color: var(--accent-hover);
}

@media (max-width: 520px) {
  .post-raw-item {
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.75rem 0;
  }
}

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-color);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.page-link {
  color: var(--text-color);
  text-decoration: none;
}

.page-link:hover {
  color: var(--accent-hover);
}

.page-link.disabled {
  opacity: 0.25;
  pointer-events: none;
}

/* Topic Header & Bar */
.topic-header {
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.topic-title-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 1rem;
}

.topic-title {
  font-family: var(--font-mono);
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-color);
}

.topic-count {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.topic-nav-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.topic-nav-scroll {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  overflow-x: auto;
  padding: 0.2rem 0;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.topic-nav-scroll::-webkit-scrollbar {
  display: none;
}

.topic-chip {
  font-family: var(--font-mono);
  font-size: 0.775rem;
  color: var(--text-muted);
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  text-decoration: none !important;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.topic-chip:hover {
  color: var(--text-color);
  background-color: var(--code-bg);
}

.topic-chip.active {
  color: var(--text-color);
  background-color: var(--border-color);
  font-weight: 600;
}

/* Halaman Semua Topik (/tags/) */
.tag-list-simple {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.tag-item-simple {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  background-color: var(--code-bg);
  padding: 0.35rem 0.65rem;
  border-radius: 4px;
  text-decoration: none;
  border: 1px solid var(--border-color);
  transition: all 0.15s ease;
}

.tag-item-simple:hover {
  color: var(--text-color);
  border-color: var(--text-muted);
}

.tag-count {
  opacity: 0.5;
  font-size: 0.75rem;
}

/* Typography Konten Artikel */
h1, h2, h3 {
  color: var(--text-color);
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.015em;
}

h1 {
  font-size: 1.75rem;
  margin-bottom: 1.25rem;
}

h2 {
  font-size: 1.25rem;
  margin-top: 2.25rem;
  margin-bottom: 0.75rem;
}

h3 {
  font-size: 1.05rem;
  margin-top: 1.75rem;
  margin-bottom: 0.5rem;
}

p {
  margin-bottom: 1.35rem;
  color: #d4d4d8;
}

main a:not(.post-raw-title):not(.nav-back):not(.tag-link):not(.topic-chip):not(.tag-item-simple) {
  color: var(--accent-hover);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

ul, ol {
  margin: 0 0 1.5rem 1.25rem;
  color: #d4d4d8;
}

li {
  margin-bottom: 0.35rem;
}

blockquote {
  margin: 1.75rem 0;
  padding-left: 0.85rem;
  border-left: 2px solid var(--border-color);
  color: var(--text-muted);
  font-style: italic;
}

code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background-color: var(--code-bg);
  color: #e4e4e7;
  padding: 0.15em 0.35em;
  border-radius: 3px;
}

pre {
  background-color: var(--code-bg);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 0.85rem 1rem;
  overflow-x: auto;
  margin: 1.5rem 0;
  font-size: 0.85rem;
  line-height: 1.55;
}

pre code {
  background: transparent;
  padding: 0;
  border: 0;
}

/* Footer Artikel */
.post-article-footer {
  margin-top: 3.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-color);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

.post-tags-inline {
  display: inline-flex;
  gap: 0.4rem;
}

.tag-link {
  color: var(--text-muted);
  text-decoration: none;
}

.tag-link:hover {
  color: var(--text-color);
}

/* Footer Global */
footer.site-footer {
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
}
