/* ==========================================================================
   Netvora Blog
   Ditulis tangan, satu berkas. Tidak memakai framework CSS vendor.

   Arah desain mengikuti referensi yang disetujui pemilik:
   hero terang dengan panel navy, kartu putih di atas latar biru muda,
   satu aksen biru dipakai di titik keputusan saja.

   Dial: ENERGY 2 / RHYTHM 2 / MOTION 1.
   ENERGY 2  - hero berbicara paling keras, sisanya tenang dan terbaca.
   RHYTHM 2  - beberapa section memakai komposisi berbeda (split, grid 3, list), sisanya seragam.
   MOTION 1  - hanya transisi hover dan focus, tidak ada animasi yang berjalan sendiri.
   ========================================================================== */

:root {
  --navy-900: #0b2138;
  --navy-800: #102c4a;
  --navy-700: #14375c;
  --blue-700: #0b4fb4;
  --blue-600: #0e63d6;
  --blue-500: #1e7bea;
  --blue-100: #d8e9fa;

  --page: #eaf3fc;
  --page-2: #f5fafe;
  --surface: #ffffff;
  --line: #dbe7f5;
  --line-soft: #eaf1f9;

  --text: #182b45;
  --text-soft: #3d5271;
  --muted: #5b6c82;
  --on-navy: #eaf2fb;
  --on-navy-muted: #a8bed6;
  --on-navy-dim: #86a1bd;

  /* --- Token tema ---------------------------------------------------------
     Dipakai supaya mode gelap cukup menimpa nilai di bawah ini, bukan
     menulis ulang setiap aturan. Setiap token di sini punya pasangan gelap
     di blok [data-tema="gelap"]. */

  /* Warna judul. Di mode terang ini navy; di gelap menjadi hampir putih. */
  --heading: var(--navy-700);
  --heading-strong: var(--navy-900);
  /* Aksen untuk teks di atas latar terang (eyebrow hero, tautan). */
  --accent: var(--blue-600);
  /* Biru sebagai warna teks. Biru tua di mode terang tidak terbaca di latar
     gelap (kontras 2,2:1), jadi di sana diganti biru muda. */
  --accent-strong: var(--blue-700);
  /* Tautan di dalam paragraf. */
  --link: var(--blue-600);
  /* Latar hero dan panel yang lebih terang dari halaman. */
  --hero-bg: #eef7ff;
  /* Pesan hasil tindakan. */
  --ok-bg: #e8f6ee;
  --ok-line: #bfe3cd;
  --ok-text: #14663a;
  --err-bg: #fdecec;
  --err-line: #f3c9c9;
  --err-text: #96231f;
  /* Bayangan kartu ikut meredup di mode gelap supaya tidak terlihat pucat. */
  --shadow-card: 0 1px 2px rgba(16, 44, 86, 0.05), 0 8px 22px rgba(16, 44, 86, 0.06);
  --shadow-raise: 0 2px 4px rgba(16, 44, 86, 0.06), 0 14px 34px rgba(16, 44, 86, 0.12);

  --r-xs: 6px;
  --r-sm: 8px;
  --r: 12px;
  --r-lg: 16px;
  --r-pill: 999px;

  --container: 1200px;
  --gap: 24px;
  --section-y: 64px;
}

/* ==========================================================================
   Tema gelap

   Dinyalakan lewat atribut data-tema="gelap" pada <html>, yang dipasang oleh
   skrip kecil di bagian kepala halaman. Hanya token yang ditimpa di sini;
   aturan di bawahnya tetap satu, jadi tema terang dan gelap tidak pernah
   menyimpang satu dari yang lain.

   Warna dipilih supaya kontras teks terhadap latarnya tetap di atas 4,5:1,
   sesuai ambang WCAG AA untuk teks biasa.
   ========================================================================== */

[data-tema="gelap"] {
  --page: #0b1727;
  --page-2: #0f2035;
  --surface: #12263f;
  --line: #21405f;
  --line-soft: #1a3350;

  --text: #e4edf8;
  --text-soft: #bccfe4;
  --muted: #93aac6;

  /* Judul dan teks di atas kartu gelap. */
  --heading: #f1f6fc;
  --heading-strong: #ffffff;
  /* Aksen dinaikkan satu langkah supaya tetap terbaca di latar gelap. */
  --accent: #63a6ff;
  --accent-strong: #7fb8ff;
  --link: #6fb0ff;

  --blue-100: #1b3963;
  --hero-bg: #0d1e33;

  --ok-bg: #10311f;
  --ok-line: #1f5b38;
  --ok-text: #6fdc9c;
  --err-bg: #3a1418;
  --err-line: #6e2529;
  --err-text: #ff9a94;

  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 22px rgba(0, 0, 0, 0.32);
  --shadow-raise: 0 2px 4px rgba(0, 0, 0, 0.45), 0 14px 34px rgba(0, 0, 0, 0.42);

  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  overflow-x: hidden;
}

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

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

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

h1, h2, h3, h4 {
  margin: 0;
  color: var(--heading);
  line-height: 1.22;
  letter-spacing: -0.01em;
}

p {
  margin: 0 0 1em;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

button {
  font: inherit;
  cursor: pointer;
}

:focus-visible {
  outline: 3px solid var(--blue-500);
  outline-offset: 2px;
  border-radius: var(--r-xs);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 60;
  background: var(--navy-700);
  color: #fff;
  padding: 10px 16px;
  border-radius: var(--r-sm);
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: 12px;
  color: #fff;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
}

.icon {
  width: 20px;
  height: 20px;
  flex: none;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 17px;
  color: var(--heading);
  letter-spacing: -0.02em;
}

.brand:hover {
  text-decoration: none;
  color: var(--heading-strong);
}

.brand__mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--blue-600);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 17px;
  font-weight: 800;
}

.brand__sub {
  font-weight: 500;
  color: var(--muted);
  font-size: 15px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
}

.nav__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 12px;
  border-radius: var(--r-sm);
  color: var(--text-soft);
  font-weight: 600;
  font-size: 14px;
}

.nav__link:hover,
.nav__link[aria-current="page"] {
  background: var(--page-2);
  color: var(--accent-strong);
  text-decoration: none;
}

.nav__count {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  background: var(--line-soft);
  border-radius: var(--r-pill);
  padding: 1px 7px;
}

.header__actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.header__search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--page-2);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 0 12px;
  height: 44px;
  width: 230px;
}

.header__search input {
  border: 0;
  background: transparent;
  width: 100%;
  font: inherit;
  color: var(--text);
  min-width: 0;
}

.header__search input:focus {
  outline: none;
}

.header__search:focus-within {
  border-color: var(--blue-500);
  box-shadow: 0 0 0 3px rgba(30, 123, 234, 0.16);
}

.header__search .icon {
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   Tombol ganti tema
   -------------------------------------------------------------------------- */

.tombol-tema {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--page-2);
  color: var(--heading);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.tombol-tema:hover {
  border-color: var(--blue-500);
  color: var(--accent);
}

.tombol-tema:focus-visible {
  outline: 2px solid var(--blue-500);
  outline-offset: 2px;
}

/* Kedua ikon bertumpuk di sel yang sama; hanya satu yang terlihat. */
.tombol-tema__ikon {
  grid-area: 1 / 1;
  display: grid;
  place-items: center;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.tombol-tema__ikon--gelap {
  opacity: 0;
  transform: rotate(-35deg) scale(0.7);
}

[data-tema="gelap"] .tombol-tema__ikon--terang {
  opacity: 0;
  transform: rotate(35deg) scale(0.7);
}

[data-tema="gelap"] .tombol-tema__ikon--gelap {
  opacity: 1;
  transform: none;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  background: var(--page-2);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  color: var(--heading);
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
  background: var(--hero-bg);
  border-bottom: 1px solid var(--line);
  padding: 66px 0 56px;
}

.hero__grid {
  display: grid;
  /* Kolom teks sedikit lebih lebar daripada kolase supaya judul panjang tetap
     terbaca, sementara tinggi hero tidak melebihi tinggi kolase. */
  grid-template-columns: minmax(0, .94fr) minmax(0, 1.06fr);
  gap: 30px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-strong);
  margin-bottom: 14px;
}

.eyebrow__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--blue-600);
}

.hero__eyebrow { color: var(--accent); letter-spacing: .11em; }
.hero h1 span { color: var(--accent); }
.desktop-break { display: block; }
.hero h1 {
  font-size: 46px;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}

.hero__lead {
  font-size: 16px;
  color: var(--text-soft);
  max-width: 46ch;
  margin-bottom: 22px;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 28px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 20px;
  border-radius: var(--r-sm);
  border: 1px solid transparent;
  font-weight: 700;
  font-size: 14.5px;
  text-align: center;
}

.btn:hover {
  text-decoration: none;
}

.btn--primary {
  background: var(--blue-600);
  color: #fff;
}

.btn--primary:hover {
  background: var(--blue-700);
  color: #fff;
}

.btn--ghost {
  background: var(--surface);
  border-color: var(--line);
  color: var(--heading);
}

.btn--ghost:hover {
  border-color: var(--blue-500);
  color: var(--accent-strong);
}

.btn--block {
  width: 100%;
}

.stats {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.stats__value {
  display: block;
  font-size: 24px;
  font-weight: 800;
  color: var(--heading);
  letter-spacing: -0.02em;
}

.stats__label {
  font-size: 13px;
  color: var(--muted);
}

/* Ilustrasi teknologi hero dibangun dari SVG dan label HTML, bukan gambar artikel. */
.hero__visual { min-width: 0; }
.tech-scene { position: relative; min-height: 520px; isolation: isolate; }
.tech-scene__art { display: block; width: 100%; height: auto; }
.tech-label {
  position: absolute; z-index: 2; padding: 9px 12px; background: var(--surface);
  border: 1px solid var(--line); border-radius: 8px; color: var(--heading);
  box-shadow: 0 8px 24px rgba(19, 67, 113, .10); font-size: 12px; font-weight: 700;
  white-space: nowrap;
}
.tech-label--cloud { top: 9%; left: 2%; }
.tech-label--network { top: 25%; right: -1%; }
.tech-label--system { top: 47%; left: -3%; }
.tech-label--code { bottom: 14%; right: -3%; }
.tech-label--tips { bottom: 3%; left: 12%; }

/* --------------------------------------------------------------------------
   Struktur section
   -------------------------------------------------------------------------- */

.section {
  padding: var(--section-y) 0;
}

.section--tight {
  padding-top: 8px;
}

.section__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.section__head h2 {
  font-size: 27px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.section__head p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14.5px;
}

.section__more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: var(--gap);
  align-items: start;
}

.layout--featured {
  grid-template-columns: minmax(0, 1.6fr) minmax(320px, .9fr);
  align-items: stretch;
}
.layout--featured .stack { grid-template-rows: repeat(2, minmax(0, 1fr)); }
.layout--featured .stack-item { grid-template-columns: 148px minmax(0, 1fr); align-items: center; }
.layout--featured .stack-item img { height: 112px; }
.layout--featured .card--lead { height: 100%; }


/* --------------------------------------------------------------------------
   Kartu artikel
   -------------------------------------------------------------------------- */

.card {
  background: var(--surface);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.16s ease, transform 0.16s ease;
}

.card:hover {
  box-shadow: var(--shadow-raise);
  transform: translateY(-2px);
}

.card__media {
  display: block;
  background: var(--line-soft);
}

.card__media img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.card__body {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.card__title {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
}

.card__title a {
  color: var(--heading);
}

.card__title a:hover {
  color: var(--accent-strong);
  text-decoration: none;
}

.card__excerpt {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  background: var(--blue-100);
  color: var(--accent-strong);
  border-radius: var(--r-pill);
  padding: 4px 11px;
  font-size: 12px;
  font-weight: 700;
}

.chip:hover {
  text-decoration: none;
  background: var(--blue-100);
  color: var(--accent-strong);
}

.meta-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
  margin: 0;
}

.meta-line__sep {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.5;
}

.avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--navy-700);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  flex: none;
}

.avatar--lg {
  width: 52px;
  height: 52px;
  font-size: 17px;
}

.author {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-soft);
  font-weight: 600;
}

.read-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--page-2);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-soft);
}

/* Kartu utama (artikel pilihan) */
.card--lead .card__media img {
  aspect-ratio: 16 / 9;
}

.card--lead .card__title {
  font-size: 25px;
  letter-spacing: -0.02em;
}

.card--lead .card__body {
  padding: 22px 24px 24px;
  gap: 12px;
}

.card__foot {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--line-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/* Daftar artikel samping (hero + terpopuler) */
.stack {
  display: grid;
  gap: 14px;
}

.stack-item {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 14px;
  background: var(--surface);
  border-radius: var(--r);
  padding: 12px;
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.16s ease, transform 0.16s ease;
}

.stack-item:hover {
  box-shadow: var(--shadow-raise);
  transform: translateY(-2px);
}

.stack-item img {
  width: 100%;
  height: 80px;
  object-fit: cover;
  border-radius: var(--r-xs);
  background: var(--line-soft);
}

.stack-item h3 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 6px;
  line-height: 1.32;
}

.stack-item h3 a {
  color: var(--heading);
}

.stack-item h3 a:hover {
  color: var(--accent-strong);
  text-decoration: none;
}

.stack-item .meta-line {
  font-size: 12.5px;
}

.stack-item__text {
  min-width: 0;
}

/* Grid artikel terbaru */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--gap);
  align-items: start;
}

/* --------------------------------------------------------------------------
   Kategori
   -------------------------------------------------------------------------- */

.cat-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
}

.cat-card {
  background: var(--surface);
  border-radius: var(--r);
  padding: 18px 16px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: box-shadow 0.16s ease, transform 0.16s ease;
}

.cat-card:hover {
  box-shadow: var(--shadow-raise);
  transform: translateY(-2px);
  text-decoration: none;
}

.cat-card__icon {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  background: var(--page-2);
  border: 1px solid var(--line);
  color: var(--link);
  display: grid;
  place-items: center;
}

.cat-card__name {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--heading);
  line-height: 1.3;
}

.cat-card__count {
  font-size: 12.5px;
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   Sidebar
   -------------------------------------------------------------------------- */

.sidebar {
  display: grid;
  gap: 18px;
  position: sticky;
  top: 92px;
}

.widget {
  background: var(--surface);
  border-radius: var(--r);
  padding: 20px;
  box-shadow: var(--shadow-card);
}

.widget h2,
.widget h3 {
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 4px;
}

.widget__hint {
  color: var(--muted);
  font-size: 13px;
  margin: 0 0 14px;
}

.widget__form {
  display: grid;
  gap: 10px;
}

.field {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: var(--page-2);
  font: inherit;
  color: var(--text);
}

.field:focus {
  outline: none;
  border-color: var(--blue-500);
  box-shadow: 0 0 0 3px rgba(30, 123, 234, 0.16);
  background: var(--surface);
}

.pop-list {
  display: grid;
  gap: 4px;
}

.pop-item {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line-soft);
}

.pop-item:last-child {
  border-bottom: 0;
}

.pop-item__num {
  font-size: 15px;
  font-weight: 800;
  color: var(--link);
  line-height: 1.4;
}

.pop-item h3 {
  font-size: 14.5px;
  font-weight: 700;
  margin-bottom: 4px;
}

.pop-item h3 a {
  color: var(--heading);
}

.pop-item h3 a:hover {
  color: var(--accent-strong);
  text-decoration: none;
}

.pop-item .meta-line {
  font-size: 12.5px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--page-2);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-soft);
}

.tag:hover {
  border-color: var(--blue-500);
  color: var(--accent-strong);
  text-decoration: none;
}

.tag span {
  color: var(--muted);
  font-size: 12px;
}

.cat-list {
  display: grid;
}

.cat-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line-soft);
}

.cat-list li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.cat-list a {
  font-weight: 600;
  color: var(--text-soft);
  font-size: 14px;
}

.cat-list a:hover {
  color: var(--accent-strong);
  text-decoration: none;
}

.cat-list__count {
  font-size: 12.5px;
  color: var(--muted);
  background: var(--page-2);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  padding: 2px 9px;
  font-weight: 600;
}

.empty-note {
  background: var(--page-2);
  border: 1px dashed var(--line);
  border-radius: var(--r);
  padding: 20px;
  color: var(--muted);
  font-size: 14px;
}

.alert {
  border-radius: var(--r-sm);
  padding: 11px 14px;
  font-size: 13.5px;
  font-weight: 600;
  margin-bottom: 12px;
}

.alert--ok {
  background: var(--ok-bg);
  border: 1px solid var(--ok-line);
  color: var(--ok-text);
}

.alert--err {
  background: var(--err-bg);
  border: 1px solid var(--err-line);
  color: var(--err-text);
}

/* --------------------------------------------------------------------------
   Filter kategori dan pencarian
   -------------------------------------------------------------------------- */

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}

.filter-bar a {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--r-pill);
  padding: 7px 14px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-soft);
}

.filter-bar a:hover {
  border-color: var(--blue-500);
  color: var(--accent-strong);
  text-decoration: none;
}

.filter-bar a[aria-current="true"] {
  background: var(--navy-700);
  border-color: var(--heading);
  color: #fff;
}

.page-head {
  background: var(--page-2);
  border-bottom: 1px solid var(--line);
  padding: 40px 0 32px;
}

.page-head h1 {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.page-head p {
  margin: 0;
  color: var(--muted);
  max-width: 70ch;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 12px;
}

.pagination {
  margin-top: 32px;
  display: flex;
  justify-content: center;
}

.pagination nav {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.pagination a,
.pagination span {
  min-width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-soft);
}

.pagination a:hover {
  border-color: var(--blue-500);
  color: var(--accent-strong);
  text-decoration: none;
}

.pagination .is-active {
  background: var(--navy-700);
  border-color: var(--heading);
  color: #fff;
}

.pagination .is-disabled {
  opacity: 0.5;
}

/* --------------------------------------------------------------------------
   Artikel detail
   -------------------------------------------------------------------------- */

.article {
  background: var(--surface);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
  padding: 32px 36px 36px;
}

.article__title {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.025em;
  margin: 12px 0 16px;
}

.article__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line-soft);
  margin-bottom: 24px;
}

.article__cover {
  border-radius: var(--r);
  overflow: hidden;
  margin-bottom: 26px;
}

.article__cover img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.prose {
  font-size: 16px;
  color: var(--text-soft);
  max-width: 72ch;
}

.prose h2 {
  font-size: 23px;
  margin: 34px 0 12px;
  scroll-margin-top: 92px;
}

.prose h3 {
  font-size: 18px;
  margin: 26px 0 10px;
}

.prose p,
.prose li {
  margin-bottom: 14px;
}

.prose ul,
.prose ol {
  margin: 0 0 18px;
  padding-left: 22px;
  list-style: disc;
}

.prose ol {
  list-style: decimal;
}

.prose code {
  background: var(--page-2);
  border: 1px solid var(--line);
  border-radius: var(--r-xs);
  padding: 1px 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13.5px;
  color: var(--heading);
}

/* Kode sebaris panjang (nama opsi, jalur berkas) harus membungkus, bukan
   melebar keluar layar. Ditemukan lewat pemeriksaan browser: pada lebar 390px
   enam potong kode melampaui tepi kanan. Blok kode (di dalam pre) dikecualikan
   karena blok kode memang menggulung mendatar. */
.prose :not(pre) > code {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.prose pre {
  background: var(--navy-900);
  color: var(--on-navy);
  border-radius: var(--r);
  padding: 16px 18px;
  overflow-x: auto;
  margin-bottom: 18px;
}

.prose pre code {
  background: transparent;
  border: 0;
  color: inherit;
  padding: 0;
}

.prose blockquote {
  margin: 0 0 18px;
  border-left: 3px solid var(--blue-500);
  padding: 6px 0 6px 18px;
  color: var(--heading);
  font-weight: 500;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 18px;
  font-size: 14.5px;
}

.prose th,
.prose td {
  border: 1px solid var(--line);
  padding: 9px 12px;
  text-align: left;
}

.prose th {
  background: var(--page-2);
  color: var(--heading);
}

.prose img {
  border-radius: var(--r);
  margin: 0 0 18px;
}

.toc {
  display: grid;
  gap: 8px;
}

.toc a {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-soft);
  border-left: 2px solid var(--line);
  padding-left: 10px;
}

.toc a:hover {
  color: var(--accent-strong);
  border-color: var(--blue-500);
  text-decoration: none;
}

.author-box {
  display: flex;
  gap: 16px;
  align-items: center;
  background: var(--page-2);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 18px 20px;
  margin-top: 32px;
}

.author-box strong {
  display: block;
  color: var(--heading);
  font-size: 15px;
}

.author-box p {
  margin: 4px 0 0;
  font-size: 13.5px;
  color: var(--muted);
}

.article-foot {
  margin-top: 26px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
}

.pager {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 26px;
}

.pager a {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 14px 16px;
}

.pager a:hover {
  border-color: var(--blue-500);
  text-decoration: none;
}

.pager span {
  display: block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 4px;
}

.pager strong {
  color: var(--heading);
  font-size: 14.5px;
  line-height: 1.35;
  font-weight: 700;
}

/* --------------------------------------------------------------------------
   Halaman statis
   -------------------------------------------------------------------------- */

.doc {
  background: var(--surface);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
  padding: 32px 36px 36px;
}

.doc .prose {
  max-width: 78ch;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 26px 0 8px;
}

.contact-card {
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 18px;
  background: var(--page-2);
}

.contact-card strong {
  display: block;
  color: var(--heading);
  font-size: 14px;
  margin: 10px 0 4px;
}

.contact-card p {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}

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

.site-footer {
  background: var(--navy-900);
  color: var(--on-navy-muted);
  margin-top: 8px;
  padding: 52px 0 0;
}

.site-footer a {
  color: var(--on-navy-muted);
  font-size: 14px;
}

.site-footer a:hover {
  color: #fff;
  text-decoration: none;
}

.footer__grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.1fr;
  gap: 36px;
}

.footer__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 17px;
  color: #fff;
  margin-bottom: 14px;
}

.footer__about {
  font-size: 14px;
  line-height: 1.65;
  max-width: 42ch;
  margin-bottom: 16px;
}

.site-footer h2 {
  /* Selector sebelumnya `.footer h2` tidak pernah cocok karena elemen memakai
     kelas `.site-footer`; akibatnya judul mewarisi warna gelap dan kontrasnya
     hanya 1,34:1 di latar navy. */
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 14px;
}

.footer__links {
  display: grid;
  gap: 9px;
}

.footer__links span {
  font-size: 12.5px;
  color: var(--on-navy-dim);
}

.footer__contact {
  display: grid;
  gap: 12px;
}

.footer__contact li {
  display: flex;
  gap: 10px;
  font-size: 14px;
}

.footer__contact .icon {
  margin-top: 3px;
  color: var(--blue-500);
}

.footer__bottom {
  margin-top: 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 18px 0 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
}

.footer__legal {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

/* --------------------------------------------------------------------------
   Halaman error
   -------------------------------------------------------------------------- */

.error-page {
  padding: 80px 0;
}

.error-page__inner {
  background: var(--surface);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
  padding: 48px 36px;
  text-align: center;
  max-width: 640px;
  margin-inline: auto;
}

/* Nomor besar sebagai penanda visual, bukan informasi tambahan. */
.error-page__code {
  font-size: 58px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--accent);
  opacity: 0.28;
  margin-bottom: 6px;
}

/* Alamat yang diminta ditulis apa adanya supaya salah ketik terlihat. */
.error-page__path {
  background: var(--page-2);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 12px 14px;
  margin-bottom: 20px;
  text-align: left;
}

.error-page__path-label {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 5px;
}

.error-page__path code {
  display: block;
  font-size: 13.5px;
  color: var(--text);
  overflow-wrap: anywhere;
}

.error-page__search {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 20px;
  background: var(--page-2);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 7px 8px 7px 14px;
}

.error-page__search .icon {
  color: var(--muted);
  flex: none;
}

.error-page__search input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  font: inherit;
  color: var(--text);
  padding: 7px 0;
}

.error-page__search input:focus {
  outline: none;
}

.error-page__search:focus-within {
  border-color: var(--blue-500);
  box-shadow: 0 0 0 3px rgba(30, 123, 234, 0.16);
}

.error-page__hint {
  margin: 18px 0 0;
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.7;
}

@media (max-width: 640px) {
  .error-page {
    padding: 52px 0;
  }

  .error-page__inner {
    padding: 34px 20px;
  }

  .error-page__code {
    font-size: 44px;
  }

  /* Tombol pencarian turun ke baris sendiri supaya kolom isian tetap lega. */
  .error-page__search {
    flex-wrap: wrap;
    padding: 10px 12px;
  }

  .error-page__search input {
    flex-basis: calc(100% - 34px);
  }

  .error-page__search .btn {
    width: 100%;
  }
}

.error-page h1 {
  font-size: 30px;
  margin-bottom: 12px;
}

.error-page p {
  color: var(--muted);
  margin-bottom: 22px;
}

/* --------------------------------------------------------------------------
   Breakpoint
   -------------------------------------------------------------------------- */

@media (max-width: 1100px) {
  .cat-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .footer__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 32px;
  }
}

@media (max-width: 1024px) {
  .layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .sidebar {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .posts-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 34px;
  }

  .hero h1 {
    font-size: 38px;
  }
}

@media (max-width: 860px) {
  :root {
    --section-y: 46px;
  }

  .header__search {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .site-header__inner {
    flex-wrap: wrap;
    height: auto;
    padding-block: 12px;
    gap: 12px;
  }

  /* Menu utama jadi panel dropdown dari tombol Menu, bukan baris yang melipat. */
  .nav {
    order: 4;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    margin: 0;
    padding: 10px 0 4px;
    border-top: 1px solid var(--line);
  }

  .nav[hidden] {
    display: none;
  }

  .nav__link {
    justify-content: space-between;
    padding: 12px 10px;
    font-size: 15px;
  }

  .header__actions {
    margin-left: auto;
  }

  .header__actions .btn {
    display: none;
  }

  .mobile-search {
    order: 5;
    width: 100%;
  }

  .article,
  .doc {
    padding: 22px 20px 26px;
  }

  .article__title {
    font-size: 27px;
  }

  .contact-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .sidebar {
    grid-template-columns: minmax(0, 1fr);
  }

  /* Di ponsel, widget "Artikel Populer" mengulang section paling atas
     ("Artikel terbaru dan paling dibaca") dan menyumbang ~500px scroll.
     Karena itu disembunyikan di layar sempit saja. */
  .sidebar .widget--popular {
    display: none;
  }

  .pager {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 640px) {
  .container {
    padding-inline: 18px;
  }

  /* Target sentuh minimal 44px untuk kontrol yang ditekan jari: saringan
     kategori, tag, dan penomoran halaman. Teks tautan di dalam paragraf
     tidak diubah karena aturan ukuran sasaran berlaku untuk kontrol, bukan
     tautan di tengah kalimat. */
  .filter-bar a,
  .tag,
  .pagination a,
  .pagination span {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }

  .hero {
    padding: 36px 0 34px;
  }

  .hero h1 {
    font-size: 30px;
  }
  .tech-scene { min-height: 390px; margin-top: 8px; }
  .tech-label { font-size: 10px; padding: 7px 9px; }
  .tech-label--network, .tech-label--code { right: 0; }
  .tech-label--system { left: 0; }
  .desktop-break { display: none; }

  .hero__lead {
    font-size: 15px;
  }

  .stats {
    gap: 20px;
  }

  .stats__value {
    font-size: 20px;
  }

  .cat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .posts-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  /* Di layar ponsel, dua ubin kecil di samping artikel unggulan lebih baik
     tetap berdampingan: ditumpuk jadi satu kolom, bagian hero memakan 1.700px
     tinggi sendiri. Karena itu kolomnya dipertahankan di sini. */
  .stack-item {
    grid-template-columns: 88px minmax(0, 1fr);
  }

  .section__head {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .section__head h2 {
    font-size: 22px;
  }

  .article__title {
    font-size: 24px;
  }

  .page-head h1 {
    font-size: 25px;
  }

  .footer__grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

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

/* Utilitas kecil yang benar-benar dipakai, bukan kumpulan kelas serbaguna. */
.mt-6 { margin-top: 6px; }
.mt-8 { margin-top: 8px; }
.inherit { color: inherit; }
.meta-line--sm { font-size: 12.5px; }

/* --- Penyesuaian jarak dan teks yang sebelumnya inline --- */
.section--pad-lead { padding-top: 32px; }
.mb-0 { margin: 0; }
.mt-30 { margin-top: 30px; }
.mt-34 { margin-top: 34px; }
.mt-48 { margin-top: 48px; }
.h-sm { font-size: 16px; margin-bottom: 10px; }
.article__author-name { display: block; color: var(--heading); }
.article__author-role { font-size: 13px; color: var(--muted); }
.header__mobile-search { padding-bottom: 14px; }
.header__search--full { display: flex; width: 100%; }
.pager__link--end { text-align: right; }
.mt-28 { margin-top: 28px; }
.h-md { font-size: 18px; margin-bottom: 12px; }
.hero__actions--center { justify-content: center; }
