/* ==========================================================================
   1. RESET & VARIABLE DEFINITIONS
   ========================================================================== */
:root {
  /* Color Palette */
  --bg-primary: #fcfcfd;
  --bg-surface: #ffffff;
  --text-main: #1d2939;
  --text-muted: #667085;
  --brand-primary: #2563eb;
  --brand-hover: #1d4ed8;
  --border-color: #eaecf0;
  --code-bg: #1e293b;
  --callout-bg: #eff6ff;
  --callout-border: #3b82f6;

  /* Typography */
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  
  /* Layout */
  --content-width: 45rem;
  --container-width: 1100px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

main svg{
  width: 1em;
  height: 1em;
  vertical-align: middle;
}

.help.problem {
  max-width: var(--content-width);
}

/* Header Navigasi */
.site-header {
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  padding: 1.25rem 0;
  position: sticky;
  top: 0;
  z-index: 10;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
  text-decoration: none;
}

.logo span {
  color: var(--brand-primary);
}

.site-header nav a {
  color: var(--text-muted);
  text-decoration: none;
  margin-left: 1.5rem;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s;
}

.site-header nav a:hover {
  color: var(--brand-primary);
}

/* ==========================================================================
   3. ARTICLE HEADER
   ========================================================================== */
.post-header {
  margin-bottom: 2.5rem;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.post-meta .category {
  color: var(--brand-primary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.75rem;
}

.post-title {
  font-size: 2.5rem;
  line-height: 1.25;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
  color: #0f172a;
}

.post-excerpt {
  font-size: 1.25rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1.75rem;
}

/* Author Mini Card */
.author-card-mini {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.author-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: #f1f5f9;
}

.author-info {
  display: flex;
  flex-direction: column;
}

.author-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-main);
}

.author-role {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ==========================================================================
   4. FEATURED MEDIA & TYPOGRAPHY
   ========================================================================== */
.featured-image {
  margin: 0 -1rem 2.5rem -1rem;
}

.featured-image img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  display: block;
}

.featured-image figcaption {
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
}

/* Body Content Typography */
.post-content h2 {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 2.5rem 0 1rem 0;
  color: #0f172a;
  letter-spacing: -0.01em;
}

.post-content h3 {
  font-size: 1.35rem;
  font-weight: 600;
  margin: 2rem 0 0.75rem 0;
  color: #0f172a;
}

.post-content p {
  margin-bottom: 1.5rem;
}

/* Blockquote */
blockquote {
  border-left: 4px solid var(--brand-primary);
  padding: 0.5rem 0 0.5rem 1.25rem;
  margin: 2rem 0;
  font-style: italic;
  font-size: 1.2rem;
  color: #334155;
  background: #f8fafc;
  border-radius: 0 8px 8px 0;
}

/* Callout Box */
.callout {
  display: flex;
  gap: 1rem;
  padding: 1.25rem;
  border-radius: 8px;
  margin: 2rem 0;
  background-color: var(--callout-bg);
  border-left: 4px solid var(--callout-border);
}

.callout-icon {
  font-size: 1.25rem;
}

.callout-body {
  font-size: 1rem;
  color: #1e3a8a;
}

/* Code Blocks */
pre {
  background-color: var(--code-bg);
  color: #f8fafc;
  padding: 1.25rem;
  border-radius: 8px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  line-height: 1.6;
  margin: 1.5rem 0 2rem 0;
}

.code-keyword { color: #f472b6; }
.code-func { color: #38bdf8; }
.string { color: #a3e635; }

/* ==========================================================================
   5. FOOTER & AUTHOR BOX
   ========================================================================== */
.post-footer {
  margin-top: 3.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2.5rem;
}

.tag {
  background-color: #f1f5f9;
  color: #475569;
  text-decoration: none;
  font-size: 0.85rem;
  padding: 0.35rem 0.75rem;
  border-radius: 20px;
  font-weight: 500;
  transition: background 0.2s;
}

.tag:hover {
  background-color: #e2e8f0;
  color: var(--brand-primary);
}

/* Author Bio Box */
.author-box {
  display: flex;
  gap: 1.25rem;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  padding: 1.5rem;
  border-radius: 12px;
}

.author-box-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  flex-shrink: 0;
  background-color: #f1f5f9;
}

.author-box-details h3 {
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}

.author-box-details p {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 0;
}

/* Site Footer */
.site-footer {
  border-top: 1px solid var(--border-color);
  padding: 2rem 0;
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-muted);
  background-color: var(--bg-surface);
}

/* ==========================================================================
   6. RESPONSIVE DESIGN
   ========================================================================== */
@media (max-width: 768px) {
  body {
    font-size: 1rem;
  }

  .post-title {
    font-size: 1.85rem;
  }

  .post-excerpt {
    font-size: 1.1rem;
  }

  .featured-image {
    margin-left: 0;
    margin-right: 0;
  }

  .author-box {
    flex-direction: column;
    align-items: flex-start;
  }
}