/* ============================================================
   WLJ Cloud Blog — shared styles
   Dipakai semua halaman (index, article, category).
   Tailwind handle utility; file ini buat hal yang Tailwind
   ga enak handle: cover template, prose typography, dll.
   ============================================================ */

:root { color-scheme: light; }
html.dark { color-scheme: dark; }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }

/* Label kecil ala editorial-teknis */
.label-mono {
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.68rem;
  font-weight: 500;
}

/* Cover template konsisten: gradient brand + grid halus + ikon faint */
.cover {
  position: relative;
  overflow: hidden;
  background-color: #1c317e;
  background-image:
    radial-gradient(120% 120% at 0% 0%, rgba(255,255,255,0.12) 0%, transparent 45%),
    linear-gradient(135deg, var(--c1, #1f4be0) 0%, var(--c2, #151f4d) 100%);
}
.cover::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.06) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: radial-gradient(80% 80% at 70% 30%, black, transparent 75%);
}
.cover > .cover-icon {
  position: absolute;
  right: -0.35em; bottom: -0.28em;
  font-size: 7rem; line-height: 1;
  color: rgba(255,255,255,0.14);
  transform: rotate(-8deg);
}
.cover-cat--security { --c1:#be123c; --c2:#4c0519; }
.cover-cat--cloud    { --c1:#1f4be0; --c2:#151f4d; }
.cover-cat--tutorial { --c1:#047857; --c2:#022c22; }
.cover-cat--hosting  { --c1:#b45309; --c2:#451a03; }
.cover-cat--news     { --c1:#6d28d9; --c2:#2e1065; }

/* Focus state aksesibel */
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid #3366f2; outline-offset: 2px; border-radius: 4px;
}

/* Scrollbar halus */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(120,120,140,0.4); border-radius: 99px; }
.scrollbar-none::-webkit-scrollbar { display: none; }
.scrollbar-none { scrollbar-width: none; }

.card-hover { transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; }
.card-hover:hover { transform: translateY(-3px); }
[x-cloak] { display: none; }

/* ============================================================
   Prose — reading typography untuk artikel detail.
   Target: line-length ~68ch, kontras AA, hierarki jelas.
   ============================================================ */
.prose {
  font-size: 1.075rem;
  line-height: 1.75;
  color: #2c2c34;
}
html.dark .prose { color: #d8d8de; }
.prose > * + * { margin-top: 1.4em; }
.prose h1 {
  font-family: 'Newsreader', Georgia, serif;
  font-weight: 700;
  font-size: 2.1rem;
  line-height: 1.2;
  margin-top: 1.8em;
  letter-spacing: -0.02em;
  scroll-margin-top: 6rem;
}
.prose h2 {
  font-family: 'Newsreader', Georgia, serif;
  font-weight: 700;
  font-size: 1.65rem;
  line-height: 1.25;
  margin-top: 2.2em;
  letter-spacing: -0.01em;
  scroll-margin-top: 6rem;
}
.prose h3 {
  font-family: 'Newsreader', Georgia, serif;
  font-weight: 600;
  font-size: 1.3rem;
  margin-top: 1.8em;
  scroll-margin-top: 6rem;
}
.prose h4 {
  font-family: 'Newsreader', Georgia, serif;
  font-weight: 600;
  font-size: 1.12rem;
  margin-top: 1.6em;
  scroll-margin-top: 6rem;
}
.prose h5, .prose h6 {
  font-weight: 600;
  font-size: 1rem;
  margin-top: 1.4em;
  color: #494955;
}
html.dark .prose h5, html.dark .prose h6 { color: #b6b6c1; }
.prose p { color: inherit; }
.prose a {
  color: #1f4be0;
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}
html.dark .prose a { color: #8eb5ff; }
.prose strong { font-weight: 600; color: #1a1a1f; }
html.dark .prose strong { color: #f7f7f8; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li { margin-top: 0.5em; }
.prose li::marker { color: #8e8e9e; }
.prose blockquote {
  border-left: 3px solid #1f4be0;
  padding: 0.2em 0 0.2em 1.1em;
  font-style: italic;
  color: #595969;
}
html.dark .prose blockquote { color: #b6b6c1; border-left-color: #598dff; }
.prose code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.86em;
  background: #ededf0;
  padding: 0.15em 0.4em;
  border-radius: 0.3em;
}
html.dark .prose code { background: #2c2c34; }
.prose pre {
  background: #0e0e12;
  color: #ededf0;
  border-radius: 0.75rem;
  padding: 1.1rem 1.25rem;
  overflow-x: auto;
  font-size: 0.86rem;
  line-height: 1.6;
  border: 1px solid #2c2c34;
}
.prose pre code { background: transparent; padding: 0; font-size: inherit; }
.prose img { border-radius: 0.75rem; }
/* Posisi gambar dalam artikel (via title markdown: ![alt](url "left|right|center|full")) */
.prose img.img-center { display: block; margin-left: auto; margin-right: auto; }
.prose img.img-full { display: block; width: 100%; }
.prose img.img-left { float: left; max-width: 50%; margin: 0.3em 1.4em 1em 0; }
.prose img.img-right { float: right; max-width: 50%; margin: 0.3em 0 1em 1.4em; }
.prose figure { margin: 0; }
.prose figure.img-center { text-align: center; }
.prose figcaption { font-size: 0.85em; color: #8e8e9e; text-align: center; margin-top: 0.5em; }
@media (max-width: 640px) {
  .prose img.img-left, .prose img.img-right { float: none; max-width: 100%; margin: 1em 0; }
}
.prose hr { border-color: #ededf0; margin: 2.5em 0; }
html.dark .prose hr { border-color: #2c2c34; }
