/* ===== Reset & Base ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: #05080c;
  color: #b0b8c4;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* ===== Layout ===== */
.layout {
  display: flex;
  min-height: 100vh;
}

/* ===== Sidebar ===== */
.sidebar {
  width: 260px;
  background: #0c1118;
  border-right: 1px solid #1a202c;
  padding: 1.5rem;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.sidebar-header {
  display: flex;
  flex-direction: column;
}

.logo {
  font-size: 1.25rem;
  font-weight: 600;
  color: #e6edf3;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Ikon minimal pengganti emotikon */
.logo::before {
  content: "";
  display: inline-block;
  width: 22px;
  height: 22px;
  background: currentColor;
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2'%3E%3Cpath d='M12 2L4 7v6c0 4.42 3.58 8 8 10 4.42-2 8-5.58 8-10V7l-8-5z'/%3E%3C/svg%3E");
  mask-size: contain;
  mask-repeat: no-repeat;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2'%3E%3Cpath d='M12 2L4 7v6c0 4.42 3.58 8 8 10 4.42-2 8-5.58 8-10V7l-8-5z'/%3E%3C/svg%3E");
  background-color: #58a6ff;
}

.version {
  font-size: 0.7rem;
  color: #484f58;
  margin-top: 0.2rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.nav-link {
  color: #8b949e;
  text-decoration: none;
  padding: 0.45rem 0.75rem;
  border-radius: 6px;
  font-size: 0.875rem;
  transition: all 0.15s ease;
  border-left: 2px solid transparent;
}

.nav-link:hover {
  background: #1a202c;
  color: #c9d1d9;
}

.nav-link.active {
  background: rgba(88, 166, 255, 0.1);
  color: #58a6ff;
  border-left-color: #58a6ff;
  font-weight: 500;
}

/* ===== Main Content ===== */
.content {
  flex: 1;
  padding: 3rem 4rem;
  max-width: 820px;
}

.loading {
  color: #484f58;
  font-style: italic;
}

/* ===== Typography ===== */
.content h1 {
  color: #f0f6fc;
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 1rem;
  letter-spacing: -0.03em;
}

.content h2 {
  color: #e6edf3;
  font-size: 1.5rem;
  font-weight: 600;
  margin: 2rem 0 0.8rem;
  border-bottom: 1px solid #21262d;
  padding-bottom: 0.3rem;
}

.content h3 {
  color: #c9d1d9;
  font-size: 1.15rem;
  font-weight: 500;
  margin: 1.5rem 0 0.5rem;
}

.content p {
  margin-bottom: 1rem;
}

.content ul,
.content ol {
  margin: 0.5rem 0 1rem 1.5rem;
}

.content li {
  margin-bottom: 0.3rem;
}

/* ===== Inline Code & Blok Kode ===== */
.content code {
  background: #161b22;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 0.9em;
  color: #c9d1d9;
  border: 1px solid #30363d;
}

.content pre {
  background: #0d1117;
  border: 1px solid #30363d;
  border-radius: 8px;
  padding: 1rem;
  overflow-x: auto;
  margin: 1rem 0;
}

.content pre code {
  background: transparent;
  padding: 0;
  border: none;
  font-size: 0.85rem;
}

/* ===== Tautan ===== */
.content a {
  color: #58a6ff;
  text-decoration: none;
}

.content a:hover {
  text-decoration: underline;
}

/* ===== Tabel (jika ada di markdown) ===== */
.content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.9rem;
}

.content th,
.content td {
  border: 1px solid #21262d;
  padding: 0.6rem 0.8rem;
  text-align: left;
}

.content th {
  background: #161b22;
  font-weight: 600;
}

/* ===== Blockquote ===== */
.content blockquote {
  border-left: 3px solid #30363d;
  margin: 1rem 0;
  padding: 0.5rem 1rem;
  color: #8b949e;
  background: #0d1117;
  border-radius: 0 6px 6px 0;
}

.content pre {
  position: relative;
}

.copy-btn {
  position: absolute;
  top: 10px;
  right: 10px;

  background: #161b22;
  border: 1px solid #30363d;
  color: #8b949e;

  padding: 4px 10px;
  border-radius: 6px;

  cursor: pointer;
  font-size: 0.75rem;

  transition: all 0.15s ease;
}

.copy-btn:hover {
  background: #21262d;
  color: #c9d1d9;
}

.footer {
  text-align: center;
  padding: 2rem 1rem;
  border-top: 1px solid #1a202c;
  color: #6e7681;
  font-size: 0.85rem;
}

.github-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;

  color: #8b949e;
  text-decoration: none;
  font-size: 0.875rem;
}

.github-link:hover {
  color: #c9d1d9;
}

.github-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .layout {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    height: auto;
    position: relative;
    border-right: none;
    border-bottom: 1px solid #1a202c;
    padding: 1rem;
    gap: 1rem;
  }

  .content {
    padding: 2rem 1.5rem;
    max-width: 100%;
  }
}