/* ═══════════════════════════════════════════════════════════════
   MINIMALIS — Komponen JS-enhanced
   ═══════════════════════════════════════════════════════════════ */

/* ── Reading Progress Bar ───────────────────────────────────────── */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--progress, 0%);
  height: 2px;
  background: var(--accent);
  z-index: 9999;
  transition: width 100ms linear;
  pointer-events: none;
}

/* ── Header Scrolled State ──────────────────────────────────────── */
.site-header.scrolled {
  padding-top: var(--space-md);
  padding-bottom: var(--space-md);
  box-shadow: var(--shadow-soft);
}

/* ── Heading Anchors ────────────────────────────────────────────── */
.heading-anchor {
  display: inline-flex;
  align-items: center;
  margin-left: 0.4em;
  opacity: 0;
  transition: opacity var(--transition);
  color: var(--ink-faint);
  text-decoration: none;
  vertical-align: middle;
}

h2:hover .heading-anchor,
h3:hover .heading-anchor,
h4:hover .heading-anchor,
.heading-anchor:focus {
  opacity: 1;
  color: var(--accent);
}

/* ── Reading Time ───────────────────────────────────────────────── */
.reading-time {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--ink-faint);
}

/* ── Lightbox ───────────────────────────────────────────────────── */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(26, 23, 20, 0.92);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
  backdrop-filter: blur(4px);
  animation: lightboxFadeIn 0.25s ease;
}

.lightbox-overlay[hidden] {
  display: none;
}

@keyframes lightboxFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.lightbox-inner {
  position: relative;
  max-width: min(90vw, 1200px);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: lightboxSlideUp 0.3s ease;
}

@keyframes lightboxSlideUp {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

.lightbox-close {
  position: absolute;
  top: calc(-1 * var(--space-xl));
  right: 0;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: white;
  transition: all var(--transition);
}

.lightbox-close:hover {
  background: rgba(255,255,255,0.2);
  transform: rotate(90deg);
}

.lightbox-figure {
  margin: 0;
  text-align: center;
}

.lightbox-img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: var(--radius-md);
  cursor: default !important;
  filter: none !important;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.lightbox-caption {
  margin-top: var(--space-md);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: rgba(255,255,255,0.5);
  letter-spacing: 0.03em;
}
