:root {
  --paper: #EDE6D6;
  --paper-raised: #F5F0E4;
  --ink: #2B241C;
  --ink-soft: #4A4136;
  --muted: #7A6E5E;
  --indigo: #24444B;
  --indigo-deep: #16302F;
  --gold: #A8763E;
  --line: #D9CFBB;
  --line-strong: #C4B99E;
  --brand-green: #123027;
  --brand-green-raised: #17392E;
  --brand-green-text: #EDE6D6;
  --brand-green-muted: #9FB3A9;
  --font-display: 'Fraunces', serif;
  --font-body: 'Public Sans', sans-serif;
}

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

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

.wrap { max-width: 1160px; margin: 0 auto; padding: 0 32px; }

@media (max-width: 640px) { .wrap { padding: 0 20px; } }

/* ---------- Header ---------- */

header.site-header {
  background: var(--brand-green);
  border-bottom: 1px solid var(--brand-green-raised);
  padding: 26px 0;
}

.header-row { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; flex-wrap: wrap; }

.brand { display: flex; align-items: center; gap: 14px; }
.brand img { display: block; }

.brand-mark { font-family: var(--font-display); font-size: 26px; font-weight: 600; color: var(--brand-green-text); }

.brand-tag { font-size: 12.5px; color: var(--brand-green-muted); border-left: 1px solid var(--brand-green-raised); padding-left: 14px; }

@media (max-width: 700px) {
  .brand { flex-direction: column; align-items: flex-start; gap: 4px; }
  .brand-tag { border-left: none; padding-left: 0; }
}

nav.site-nav { display: flex; gap: 26px; font-size: 15px; }

nav.site-nav a { color: var(--brand-green-muted); padding-bottom: 2px; }

nav.site-nav a:hover { color: var(--brand-green-text); }

nav.site-nav a.active { color: var(--brand-green-text); border-bottom: 1.5px solid var(--gold); }

@media (max-width: 700px) { nav.site-nav { display: none; } }

/* ---------- Hamburger toggle (mobile) ---------- */

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--brand-green-text);
  transition: transform 0.25s ease, opacity 0.2s ease;
}

.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 700px) {
  .nav-toggle { display: flex; }
}

/* ---------- Mobile nav panel ---------- */

.mobile-nav {
  display: none;
  flex-direction: column;
  background: var(--brand-green-raised);
}

.mobile-nav.open { display: flex; }

.mobile-nav a {
  padding: 15px 32px;
  font-size: 15px;
  color: var(--brand-green-muted);
  border-top: 1px solid rgba(237, 230, 214, 0.1);
}

.mobile-nav a.active { color: var(--brand-green-text); }

@media (min-width: 701px) {
  .mobile-nav { display: none !important; }
}

/* ---------- Splash animasi pembuka (halaman beranda) ---------- */

.splash {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--brand-green);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.splash-mark {
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 600;
  color: var(--brand-green-text);
  opacity: 0;
  transform: translateY(10px) scale(0.96);
  animation: splashIn 0.7s ease forwards;
}

@keyframes splashIn {
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.splash.hide {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* ---------- Scroll reveal animation ---------- */

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Ornament ---------- */

.ornament {
  height: 12px;
  background-image: repeating-linear-gradient(45deg, var(--line-strong) 0px, var(--line-strong) 1px, transparent 1px, transparent 12px);
  opacity: 0.55;
}

/* ---------- Page header (non-home pages) ---------- */

.page-header { padding: 44px 0 32px; border-bottom: 1px solid var(--line); }

.page-header h1 { font-family: var(--font-display); font-size: 34px; font-weight: 500; margin-bottom: 8px; }

.page-header p { color: var(--muted); font-size: 15px; max-width: 60ch; }

/* ---------- Hero (homepage) ---------- */

.hero { padding: 60px 0 52px; border-bottom: 1px solid var(--line); }

.hero-grid { display: grid; grid-template-columns: 1.3fr 0.9fr; gap: 56px; align-items: start; }

@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; gap: 32px; } }

.kicker { font-size: 14px; color: var(--indigo); font-weight: 600; margin-bottom: 16px; }

.hero h1 { font-family: var(--font-display); font-size: 42px; line-height: 1.14; font-weight: 500; max-width: 15ch; margin-bottom: 20px; }

@media (max-width: 640px) { .hero h1 { font-size: 30px; } }

.hero p.dek { font-size: 16.5px; color: var(--ink-soft); max-width: 46ch; margin-bottom: 24px; }

.byline { display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--muted); }

.byline .avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--indigo); color: var(--paper-raised); display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-size: 13px; overflow: hidden; }
.byline .avatar img { width: 100%; height: 100%; object-fit: cover; }

.hero-side { border-left: 1px solid var(--line); padding-left: 36px; }

@media (max-width: 860px) { .hero-side { border-left: none; padding-left: 0; border-top: 1px solid var(--line); padding-top: 24px; } }

.hero-side h3 { font-family: var(--font-display); font-size: 14px; font-weight: 600; color: var(--muted); margin-bottom: 16px; }

.side-item { display: flex; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.side-item:last-child { border-bottom: none; }
.side-num { font-family: var(--font-display); font-style: italic; font-size: 19px; color: var(--gold); min-width: 22px; }
.side-item h4 { font-size: 14.5px; font-weight: 600; margin-bottom: 3px; }
.side-item span { font-size: 12.5px; color: var(--muted); }

/* ---------- Sections ---------- */

.section { padding: 52px 0; border-bottom: 1px solid var(--line); }

.section-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 28px; gap: 20px; flex-wrap: wrap; }

.section-head h2 { font-family: var(--font-display); font-size: 24px; font-weight: 500; }

.section-head .see-all { font-size: 14px; color: var(--indigo); border-bottom: 1px solid var(--indigo); padding-bottom: 1px; }

.empty-state { color: var(--muted); font-size: 14.5px; padding: 24px 0; }

/* ---------- Notes / catatan kuliah ---------- */

.notes-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
@media (max-width: 860px) { .notes-grid { grid-template-columns: 1fr; } }

.note-card { background: var(--paper-raised); border: 1px solid var(--line); padding: 22px; display: block; }
.note-image { aspect-ratio: 16/9; overflow: hidden; margin: -22px -22px 16px; border-bottom: 1px solid var(--line); background: repeating-linear-gradient(115deg, var(--line-strong) 0px, var(--line-strong) 1px, var(--paper-raised) 1px, var(--paper-raised) 18px); }
.note-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.note-meta { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-bottom: 12px; }
.note-card h4 { font-family: var(--font-display); font-size: 18px; font-weight: 500; margin-bottom: 8px; line-height: 1.3; }
.note-card p { font-size: 14px; color: var(--ink-soft); }

/* ---------- Books ---------- */

.books-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
@media (max-width: 860px) { .books-row { grid-template-columns: repeat(2, 1fr); } }

.book-card { display: flex; flex-direction: column; gap: 3px; }
.book-cover { aspect-ratio: 3/4; border-radius: 2px; overflow: hidden; background: linear-gradient(155deg, var(--indigo) 0%, var(--indigo-deep) 100%); display: flex; align-items: flex-end; padding: 14px; position: relative; margin-bottom: 8px; }
.book-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.book-cover span { font-family: var(--font-display); font-style: italic; color: var(--paper-raised); font-size: 13px; line-height: 1.3; position: relative; z-index: 1; }
.book-card h4 { font-size: 14px; font-weight: 600; line-height: 1.35; }
.book-card .book-author { font-size: 12.5px; color: var(--muted); }
.book-tag { display: inline-block; font-size: 11px; color: var(--gold); margin-top: 2px; }

.book-pdf-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--indigo);
  border: 1px solid var(--indigo);
  padding: 6px 12px;
  width: fit-content;
}
.book-pdf-btn:hover { background: var(--indigo); color: var(--paper); }

/* ---------- Publications ---------- */

.pub-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
@media (max-width: 860px) { .pub-grid { grid-template-columns: 1fr; } }

.pub-card { display: flex; flex-direction: column; }
.pub-image { aspect-ratio: 16/10; overflow: hidden; border: 1px solid var(--line); margin-bottom: 14px; background: repeating-linear-gradient(115deg, var(--line-strong) 0px, var(--line-strong) 1px, var(--paper-raised) 1px, var(--paper-raised) 18px); }
.pub-image img { width: 100%; height: 100%; object-fit: cover; }
.pub-cat { font-size: 12px; color: var(--indigo); font-weight: 600; margin-bottom: 8px; }
.pub-card h4 { font-family: var(--font-display); font-size: 18px; font-weight: 500; margin-bottom: 8px; line-height: 1.32; }
.pub-card p { font-size: 13.5px; color: var(--ink-soft); margin-bottom: 10px; }
.pub-foot { font-size: 12px; color: var(--muted); margin-top: auto; }

/* ---------- Filters ---------- */

.filter-bar { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 32px; }
.filter-bar select, .filter-bar input[type=text] {
  font-family: var(--font-body); font-size: 14px; padding: 9px 12px; border: 1px solid var(--line-strong);
  background: var(--paper-raised); color: var(--ink);
}
.filter-bar button {
  font-family: var(--font-body); font-size: 14px; padding: 9px 18px; border: 1px solid var(--indigo);
  background: var(--indigo); color: var(--paper); cursor: pointer;
}
.filter-bar button:hover { background: var(--indigo-deep); }

/* ---------- Single article ---------- */

.article-header { padding: 48px 0 28px; border-bottom: 1px solid var(--line); }
.article-header .kicker { margin-bottom: 14px; }
.article-header h1 { font-family: var(--font-display); font-size: 38px; font-weight: 500; line-height: 1.18; max-width: 22ch; margin-bottom: 18px; }
@media (max-width: 640px) { .article-header h1 { font-size: 28px; } }

.article-body { padding: 44px 32px; max-width: 720px; margin: 0 auto; font-size: 17px; line-height: 1.8; color: var(--ink-soft); }
@media (max-width: 640px) { .article-body { padding: 32px 20px; } }
.article-body p { margin-bottom: 20px; }
.article-body h2, .article-body h3, .article-body h4 {
  font-family: var(--font-display);
  color: var(--ink);
  font-weight: 500;
  line-height: 1.3;
  margin: 34px 0 14px;
}
.article-body h2 { font-size: 26px; }
.article-body h3 { font-size: 21px; }
.article-body h4 { font-size: 18px; }
.article-body ul, .article-body ol { margin: 0 0 20px 22px; }
.article-body li { margin-bottom: 8px; }
.article-body a { color: var(--indigo); text-decoration: underline; text-underline-offset: 2px; }
.article-body a:hover { color: var(--indigo-deep); }
.article-body blockquote {
  border-left: 3px solid var(--gold);
  padding: 4px 0 4px 20px;
  margin: 24px 0;
  font-style: italic;
  color: var(--ink-soft);
}
.article-body strong { color: var(--ink); font-weight: 600; }
.article-cover { max-width: 900px; margin: 32px auto 0; }
.article-cover img { width: 100%; border: 1px solid var(--line); }

/* ---------- Bio penulis & navigasi artikel ---------- */

.author-bio {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  border-top: 1px solid var(--line);
  padding: 28px 0;
}

.author-bio h4 { font-family: var(--font-display); font-size: 16.5px; font-weight: 500; margin-bottom: 5px; }
.author-bio p { font-size: 13.5px; color: var(--muted); }

.article-nav {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 0 8px;
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
}

.article-nav a {
  flex: 1;
  min-width: 200px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink-soft);
  border: 1px solid var(--line-strong);
  padding: 14px 18px;
}

.article-nav a:hover { border-color: var(--indigo); color: var(--indigo); }

.article-nav .nav-next { text-align: right; }

.article-nav .nav-label {
  display: block;
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
  font-weight: 600;
}

/* ---------- Pagination ---------- */

.pagination-row { display: flex; justify-content: center; gap: 10px; margin-top: 36px; }
.pagination-row a, .pagination-row span {
  padding: 8px 14px; border: 1px solid var(--line-strong); font-size: 14px;
}
.pagination-row a:hover { border-color: var(--indigo); color: var(--indigo); }
.pagination-row .current { background: var(--indigo); color: var(--paper); border-color: var(--indigo); }

/* ---------- Footer ---------- */

footer.site-footer { background: var(--brand-green); padding: 36px 0 44px; }
.footer-row { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 20px; font-size: 13px; color: var(--brand-green-muted); }
.footer-row .brand-mark { font-size: 17px; color: var(--brand-green-text); margin-bottom: 6px; }