/* ========== RESET & GLOBAL ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: #e2dcd0;  /* warna sekitar seperti kertas tua */
  font-family: var(--font-body);
  color: var(--ink-dark);
  line-height: 1.5;
  padding: 1rem;
}

/* ========== CSS CUSTOM PROPERTIES ========== */
:root {
  --paper-cream: #faf6ee;
  --ink-dark: #22252a;
  --ink-muted: #5c6370;
  --line-blue: #e3ebf5;
  --margin-red: #ff9aa2;
  --accent-soft: #f0e9dc;
  --border-binder: #ccc2b0;
  --font-title: 'Special Elite', 'Courier Prime', monospace;
  --font-body: 'Inter', 'Roboto', sans-serif;
}

/* ========== PAPER CONTAINER (efek garis) ========== */
.paper-container {
  background-color: var(--paper-cream);
  background-image: linear-gradient(var(--line-blue) 1px, transparent 1px);
  background-size: 100% 2rem;
  line-height: 2rem;
  position: relative;
  padding: 1rem 1rem 2rem 3rem;
  max-width: 800px;
  margin: 0 auto;
  border-radius: 4px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.05);
}

.paper-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 2.5rem;
  width: 2px;
  height: 100%;
  background-color: var(--margin-red);
  opacity: 0.7;
}

/* ========== TYPOGRAPHY & UTILITY ========== */
.journal-title {
  font-family: var(--font-title);
  font-size: 1.8rem;
  letter-spacing: -0.5px;
  margin-bottom: 0.25rem;
}

h1, h2, h3 {
  font-family: var(--font-title);
  font-weight: normal;
}

a {
  color: var(--ink-dark);
  text-decoration-thickness: 1px;
  text-decoration-color: var(--margin-red);
}

a:hover {
  background-color: var(--accent-soft);
}

/* ========== NAV TOP (link ke beranda) ========== */
.nav-top {
  margin-bottom: 1rem;
  text-align: left;
}
.home-link {
  font-size: 0.9rem;
  font-family: var(--font-body);
  text-decoration: none;
  border-bottom: 1px dashed var(--ink-muted);
  padding-bottom: 2px;
}

/* ========== TAB ========== */
.tab-wrapper {
  display: flex;
  gap: 0.5rem;
  border-bottom: 1px solid var(--border-binder);
  margin: 1.5rem 0 1rem 0;
}
.tab-btn {
  background: none;
  border: none;
  font-family: var(--font-title);
  font-size: 1rem;
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  color: var(--ink-muted);
  transition: all 0.1s;
}
.tab-btn.active {
  color: var(--ink-dark);
  border-bottom: 2px solid var(--margin-red);
  background-color: var(--accent-soft);
}

/* ========== SORTING ========== */
.sort-wrapper {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin: 0.5rem 0 1rem 0;
  gap: 0.5rem;
}
.sort-label {
  font-size: 0.8rem;
  color: var(--ink-muted);
}
.sort-select {
  background: transparent;
  border: 1px solid var(--border-binder);
  padding: 0.2rem 0.4rem;
  font-family: var(--font-body);
  font-size: 0.8rem;
  border-radius: 0;
}

/* ========== SEARCH BAR dengan tombol clear ========== */
.search-wrapper {
  position: relative;
  margin: 1rem 0 1.5rem 0;
}
#search-input {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 2px dashed var(--ink-dark);
  padding: 0.5rem 2rem 0.5rem 0.2rem;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink-dark);
  outline: none;
}
#search-input::placeholder {
  color: var(--ink-muted);
  font-style: italic;
}
.clear-btn {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--ink-muted);
  font-family: var(--font-title);
  padding: 0 0.25rem;
}
.clear-btn:hover {
  color: var(--ink-dark);
}

/* ========== DAFTAR LIST ========== */
.list-container {
  margin: 1rem 0;
}
.list-item {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--line-blue);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
}
.list-item strong {
  font-weight: 600;
}
.date {
  font-size: 0.75rem;
  color: var(--ink-muted);
  font-family: monospace;
}
.proyek-desc {
  font-size: 0.85rem;
  color: var(--ink-muted);
  margin-left: 0.5rem;
}
.proyek-link {
  font-size: 0.8rem;
  margin-left: 0.5rem;
}
.list-item:hover {
  background-color: var(--accent-soft);
  cursor: pointer;
}

/* ========== EMPTY STATE ========== */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  font-family: var(--font-title);
  color: var(--ink-muted);
  font-size: 1rem;
  line-height: 1.5;
}

/* ========== PAGINATION ========== */
.pagination-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  margin: 2rem 0 1rem;
  flex-wrap: wrap;
}
.page-btn {
  background: none;
  border: 1px solid var(--border-binder);
  padding: 0.3rem 1rem;
  font-family: var(--font-body);
  font-size: 0.85rem;
  cursor: pointer;
  transition: 0.1s;
}
.page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.page-btn:not(:disabled):hover {
  background-color: var(--accent-soft);
}
.page-info {
  font-size: 0.85rem;
  color: var(--ink-muted);
}

/* ========== MODE BACA ========== */
.back-btn {
  background: none;
  border: none;
  font-family: var(--font-title);
  font-size: 0.9rem;
  margin: 1rem 0;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-style: dashed;
  text-underline-offset: 4px;
  color: var(--ink-dark);
}
.konten-jurnal {
  margin-top: 1rem;
}
.konten-jurnal h2 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}
.konten-jurnal .meta-date {
  margin-bottom: 1rem;
}
.konten-jurnal pre {
  background: #f3efe5;
  padding: 0.5rem;
  overflow-x: auto;
  font-size: 0.85rem;
  margin: 1rem 0;
}
.konten-jurnal img {
  max-width: 100%;
  height: auto;
  margin: 1rem 0;
  border: 1px solid var(--border-binder);
}

/* ========== TABEL RESPONSIF (horizontal scroll) ========== */
.konten-jurnal table,
#mode-indeks table {
  display: block;
  overflow-x: auto;
  white-space: nowrap;
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
}

/* Optional: mempercantik border dan padding */
.konten-jurnal table th,
.konten-jurnal table td,
#mode-indeks table th,
#mode-indeks table td {
  border: 1px solid var(--border-binder);
  padding: 0.5rem;
  text-align: left;
  vertical-align: top;
}

.konten-jurnal table th,
#mode-indeks table th {
  background-color: var(--accent-soft);
  font-weight: 600;
}

.konten-jurnal p {
  margin-bottom: 1rem;
}

/* ========== LANDING PAGE STYLE (opsional, bisa dipisah tapi tetap di sini) ========== */
.landing-container {
  max-width: 700px;
  margin: 0 auto;
  background-color: var(--paper-cream);
  padding: 2rem 1.5rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}
.landing-header {
  margin-bottom: 2rem;
}
.subhead {
  font-family: var(--font-title);
  color: var(--ink-muted);
}
.bio-section {
  margin: 2rem 0;
  line-height: 1.6;
}
.showcase-section {
  margin: 2rem 0;
}
.section-title {
  font-size: 1.25rem;
  margin-bottom: 1rem;
}
.showcase-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.showcase-item {
  border-left: 2px solid var(--margin-red);
  padding-left: 1rem;
}
.showcase-desc {
  font-size: 0.85rem;
  color: var(--ink-muted);
}
.cta-link {
  display: inline-block;
  margin-top: 1.5rem;
  font-family: var(--font-title);
  font-size: 1rem;
  text-decoration: none;
  border-bottom: 1px solid;
}
.loading-indicator, .empty-muted {
  color: var(--ink-muted);
  font-style: italic;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 600px) {
  body {
    padding: 0.5rem;
  }
  .paper-container {
    padding: 1rem 1rem 1.5rem 2rem;
  }
  .paper-container::before {
    left: 1rem;
  }
  .list-item {
    flex-direction: column;
    gap: 0.2rem;
  }
  .tab-btn {
    font-size: 0.85rem;
    padding: 0.4rem 0.5rem;
  }
}

