/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Source+Serif+4:ital,opsz,wght@0,8..60,300..900;1,8..60,300..900&family=Inter:wght@400;500;600&display=swap');

/* Design Tokens (Wikipedia style) */
:root {
  --color-bg: #FFFFFF;
  --color-bg-subtle: #F8F9FA;
  --color-bg-infobox: #F8F9FA;
  --color-text: #202122;
  --color-text-muted: #54595D;
  --color-border: #A2A9B1;
  --color-border-light: #EAECF0;
  --color-link: #0645AD;
  --color-link-visited: #0B0080;

  --color-status-selesai-bg: #D5F5E3;
  --color-status-selesai-text: #1E8449;
  --color-status-berjalan-bg: #FCF3CF;
  --color-status-berjalan-text: #9C640C;
  --color-status-terlewat-bg: #FADBD8;
  --color-status-terlewat-text: #B03A2E;

  --font-sans: 'Inter', system-ui, sans-serif;
  --font-serif: 'Source Serif 4', Georgia, serif;
}

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

body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background-color: var(--color-bg);
  line-height: 1.6;
}

a {
  color: var(--color-link);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

a:visited {
  color: var(--color-link-visited);
}

/* Layout (Sidebar + Main) */
.layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 250px;
  background-color: var(--color-bg-subtle);
  border-right: 1px solid var(--color-border);
  padding: 1.5rem;
  flex-shrink: 0;
}

.main-content {
  flex: 1;
  padding: 2rem 3rem;
  max-width: 1000px;
}

header {
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 1rem;
  margin-bottom: 1.5rem;
}

.site-title {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--color-text);
}

.site-logo {
  width: 32px;
  height: 32px;
  border-radius: 4px;
}

/* Typography (Prose) */
h1 {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  font-weight: normal;
  border-bottom: 1px solid var(--color-border-light);
  padding-bottom: 0.25rem;
  margin-bottom: 1rem;
}

h2 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: normal;
  border-bottom: 1px solid var(--color-border-light);
  padding-bottom: 0.25rem;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

h3 {
  font-size: 1.2rem;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
}

p {
  margin-bottom: 1rem;
}

/* Infobox */
.infobox {
  float: right;
  clear: right;
  margin: 0.5rem 0 1rem 1.5rem;
  padding: 0.5rem;
  background-color: var(--color-bg-infobox);
  border: 1px solid var(--color-border);
  width: 300px;
  font-size: 0.9rem;
}

.infobox-title {
  font-family: var(--font-serif);
  font-weight: bold;
  font-size: 1.1rem;
  text-align: center;
  padding: 0.25rem;
  background-color: #E2E2E2;
  margin-bottom: 0.5rem;
}

.infobox img {
  width: 100%;
  height: auto;
  margin-bottom: 0.5rem;
}

.infobox-row {
  display: flex;
  padding: 0.25rem 0;
  border-bottom: 1px solid var(--color-border-light);
}

.infobox-row:last-child {
  border-bottom: none;
}

.infobox-label {
  font-weight: 600;
  width: 35%;
  flex-shrink: 0;
}

/* Table */
table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

th,
td {
  border: 1px solid var(--color-border);
  padding: 0.5rem;
  text-align: left;
}

th {
  background-color: var(--color-bg-subtle);
  font-weight: 600;
}

/* Sidebar Nav */
.nav-section {
  font-weight: bold;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.nav-link {
  display: block;
  padding: 0.25rem 0;
  font-size: 0.95rem;
  color: var(--color-link);
}

.nav-link.active {
  font-weight: bold;
  color: var(--color-text);
}

/* Footer */
footer {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--color-border);
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

/* Utilities */
.badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 500;
}

.badge-selesai {
  background-color: var(--color-status-selesai-bg);
  color: var(--color-status-selesai-text);
}

/* Responsif sederhana */
@media (max-width: 768px) {
  .layout {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--color-border);
  }

  .infobox {
    float: none;
    width: 100%;
    margin: 1rem 0;
  }
}