/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --ink:      #1a1a1a;
  --ink-2:    #555;
  --ink-3:    #888;
  --surface:  #ffffff;
  --bg:       #f7f7f5;
  --accent:   #2563eb;
  --accent-h: #1d4ed8;
  --border:   #e5e5e5;
  --radius:   8px;
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'Inter', system-ui, sans-serif;
  --max-w: 820px;
  --transition: 0.18s ease;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg);
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; display: block; }

code {
  background: #f0f0ee;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.875rem;
}

/* ============================================================
   LAYOUT
   ============================================================ */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.site-main { min-height: 80vh; padding-bottom: 4rem; }

/* ============================================================
   HEADER & NAV
   ============================================================ */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 1rem;
}

.logo {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
  flex-shrink: 0;
}

.nav { display: flex; gap: 0.25rem; }

.nav-link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink-2);
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius);
  text-decoration: none;
  transition: background var(--transition), color var(--transition);
}
.nav-link:hover { background: var(--bg); color: var(--ink); text-decoration: none; }
.nav-link.active { background: var(--accent); color: #fff; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  color: var(--ink);
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 4.5rem 0 4rem;
}

.hero-inner { max-width: var(--max-w); }

.hero-eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 1rem;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.18;
  color: var(--ink);
  margin-bottom: 1.2rem;
}

.hero-desc {
  font-size: 1.1rem;
  color: var(--ink-2);
  max-width: 500px;
  margin-bottom: 2rem;
}

.hero-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-block;
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius);
  font-size: 0.925rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition);
}
.btn-primary  { background: var(--accent); color: #fff; }
.btn-primary:hover  { background: var(--accent-h); text-decoration: none; }
.btn-outline  { border: 1.5px solid var(--border); color: var(--ink); background: transparent; }
.btn-outline:hover  { border-color: var(--ink-3); text-decoration: none; }

/* ============================================================
   SECTIONS
   ============================================================ */
.section { padding: 3.5rem 0; }

.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 2rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--ink);
}

.section-link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--accent);
}

/* ============================================================
   POST GRID (Home)
   ============================================================ */
.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.25rem;
}

.post-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  transition: box-shadow var(--transition);
}
.post-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.07); }

.post-card-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  line-height: 1.35;
}
.post-card-title a { color: var(--ink); }
.post-card-title a:hover { color: var(--accent); text-decoration: none; }

.post-card-excerpt {
  font-size: 0.875rem;
  color: var(--ink-2);
  flex: 1;
}

.post-meta {
  font-size: 0.8rem;
  color: var(--ink-3);
  display: flex;
  gap: 0.4rem;
  align-items: center;
}

.post-kategori {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  background: #eff6ff;
  padding: 2px 8px;
  border-radius: 99px;
}

/* ============================================================
   STATS
   ============================================================ */
.stats-section {
  background: var(--ink);
  padding: 2.5rem 0;
}

.stats-grid {
  display: flex;
  justify-content: center;
  gap: 4rem;
}

.stat-item { text-align: center; }

.stat-number {
  display: block;
  font-family: var(--font-display);
  font-size: 2.5rem;
  color: #fff;
  font-weight: 700;
  line-height: 1;
}

.stat-label {
  font-size: 0.85rem;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 4px;
}

/* ============================================================
   PAGE HEADER
   ============================================================ */
.page-header {
  padding: 2.5rem 0 2rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2rem;
}

.page-title {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--ink);
}

.page-desc {
  color: var(--ink-2);
  margin-top: 0.4rem;
}

/* ============================================================
   FILTER BAR
   ============================================================ */
.filter-bar {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.filter-tag {
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.35rem 0.9rem;
  border-radius: 99px;
  border: 1.5px solid var(--border);
  color: var(--ink-2);
  text-decoration: none;
  transition: all var(--transition);
}
.filter-tag:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.filter-tag.active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ============================================================
   POST LIST
   ============================================================ */
.post-list { display: flex; flex-direction: column; gap: 0; }

.post-list-item {
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--border);
}

.post-list-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.post-list-meta time { font-size: 0.83rem; color: var(--ink-3); }

.post-list-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}
.post-list-title a { color: var(--ink); }
.post-list-title a:hover { color: var(--accent); text-decoration: none; }

.post-list-excerpt {
  color: var(--ink-2);
  font-size: 0.925rem;
  margin-bottom: 0.75rem;
}

.read-more {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent);
}

.empty-state { color: var(--ink-3); font-style: italic; padding: 2rem 0; }

/* ============================================================
   SINGLE POST
   ============================================================ */
.post-single { padding-top: 2rem; }

.back-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink-3);
  display: inline-block;
  margin-bottom: 2rem;
}
.back-link:hover { color: var(--accent); }

.single-header { margin-bottom: 2.5rem; }

.single-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  line-height: 1.25;
  margin: 0.75rem 0 0.75rem;
  color: var(--ink);
}

.single-body {
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--ink);
}
.single-body p { margin-bottom: 1.25rem; }

.single-footer { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--border); }

.post-tags { display: flex; gap: 0.5rem; flex-wrap: wrap; }

.tag {
  font-size: 0.8rem;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 99px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--ink-2);
}

/* ============================================================
   ARSIP
   ============================================================ */
.arsip-toggle {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 2.5rem;
}

.toggle-btn {
  padding: 0.45rem 1rem;
  border-radius: var(--radius);
  border: 1.5px solid var(--border);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink-2);
  text-decoration: none;
  transition: all var(--transition);
}
.toggle-btn:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.toggle-btn.active { background: var(--ink); border-color: var(--ink); color: #fff; }

.arsip-section { display: flex; flex-direction: column; gap: 2.5rem; }

.arsip-year {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--ink);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.arsip-count {
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: var(--ink-3);
  font-weight: 400;
}

.arsip-list { list-style: none; }

.arsip-item {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  padding: 0.6rem 0;
  border-bottom: 1px dashed var(--border);
}

.arsip-date {
  font-size: 0.82rem;
  color: var(--ink-3);
  min-width: 60px;
  flex-shrink: 0;
}

.arsip-separator { color: var(--border); flex-shrink: 0; }

.arsip-link {
  color: var(--ink);
  font-size: 0.95rem;
  flex: 1;
  transition: color var(--transition);
}
.arsip-link:hover { color: var(--accent); text-decoration: none; }

.arsip-kat {
  font-size: 0.75rem;
  color: var(--accent);
  background: #eff6ff;
  padding: 1px 8px;
  border-radius: 99px;
  flex-shrink: 0;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 1.5rem 0;
  margin-top: auto;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-copy { font-size: 0.85rem; color: var(--ink-3); }

.footer-nav { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.footer-nav a { font-size: 0.85rem; color: var(--ink-3); }
.footer-nav a:hover { color: var(--accent); }

.error { color: #dc2626; padding: 2rem 0; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 640px) {
  .nav { display: none; flex-direction: column; position: absolute; top: 64px; left: 0; right: 0; background: var(--surface); border-bottom: 1px solid var(--border); padding: 0.75rem 1rem; }
  .nav.open { display: flex; }
  .nav-toggle { display: block; }

  .post-grid { grid-template-columns: 1fr; }
  .stats-grid { gap: 2rem; }
  .hero { padding: 2.5rem 0; }
  .arsip-item { flex-wrap: wrap; }
  .footer-inner { flex-direction: column; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
