:root {
    --bg: #0f1722;
    --surface: #17212f;
    --surface-2: #1e2b3d;
    --line: #2b3b52;
    --text: #e8edf4;
    --muted: #9aa8bb;
    --accent: #f2b134;
    --accent-ink: #2a1d00;
    --sky: #6fb7e9;
    --radius: 14px;
}

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

html { overflow-x: clip; }

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg);
    color: var(--text);
    font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
    line-height: 1.7;
    overflow-x: clip;
}

a { color: var(--sky); }
a:focus-visible { outline: 3px solid var(--sky); outline-offset: 3px; border-radius: 4px; }

.wrap {
    width: 100%;
    max-width: 760px;
    margin: 0 auto;
    padding: 0 20px;
}

main.wrap { flex: 1; padding-top: 40px; padding-bottom: 72px; }

/* ----- header dan footer ----- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(15, 23, 34, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}

.site-header .wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    height: 64px;
}

.brand {
    color: var(--text);
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    text-decoration: none;
}

.back-main {
    color: var(--muted);
    font-size: 0.9rem;
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.25s;
}

.back-main:hover { color: var(--accent); }

.site-footer {
    padding: 28px 0;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.85rem;
}

/* ----- halaman daftar ----- */
.intro { margin-bottom: 32px; }

.intro h1 {
    margin-bottom: 8px;
    font-size: clamp(1.7rem, 4vw, 2.3rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.25;
}

.intro p { color: var(--muted); }
.empty { color: var(--muted); }

.post-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    list-style: none;
}

.post-card a {
    display: block;
    padding: 20px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: inherit;
    text-decoration: none;
    transition: border-color 0.3s, transform 0.25s ease;
}

.post-card a:hover { border-color: var(--accent); transform: translateY(-3px); }
.post-card a:focus-visible { outline-offset: 4px; border-radius: var(--radius); }

.card-cover {
    display: block;
    width: 100%;
    height: auto;
    margin-bottom: 14px;
    border-radius: calc(var(--radius) - 4px);
}

.post-card h2 {
    margin-bottom: 4px;
    font-size: 1.2rem;
    line-height: 1.35;
}

.post-meta { color: var(--muted); font-size: 0.85rem; }
.post-summary { margin: 8px 0 12px; color: var(--muted); font-size: 0.95rem; line-height: 1.6; }

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
    list-style: none;
}

.tags li {
    padding: 2px 10px;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--accent);
    font-size: 0.75rem;
    font-weight: 700;
}

.post-card .tags { margin-top: 0; }

/* ----- halaman artikel ----- */
.post-header { margin-bottom: 28px; }

.post-header h1 {
    margin-bottom: 10px;
    font-size: clamp(1.7rem, 4.5vw, 2.4rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.25;
}

.post-cover {
    display: block;
    width: 100%;
    height: auto;
    margin-bottom: 28px;
    border-radius: var(--radius);
}

.post-content { font-size: 1.05rem; }

.post-content > * + * { margin-top: 1.1em; }

.post-content h2 { margin-top: 2em; font-size: 1.5rem; line-height: 1.35; }
.post-content h3 { margin-top: 1.7em; font-size: 1.25rem; line-height: 1.4; }
.post-content h4, .post-content h5, .post-content h6 { margin-top: 1.5em; font-size: 1.05rem; }

.post-content ul, .post-content ol { padding-left: 1.4em; }
.post-content li + li { margin-top: 0.35em; }

.post-content img {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: calc(var(--radius) - 4px);
}

.post-content blockquote {
    padding: 4px 18px;
    border-left: 4px solid var(--accent);
    color: var(--muted);
}

.post-content hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }

.post-content code {
    padding: 2px 6px;
    background: var(--surface-2);
    border-radius: 6px;
    font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
    font-size: 0.9em;
}

.post-content pre {
    padding: 16px;
    overflow-x: auto;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 10px;
    line-height: 1.55;
}

.post-content pre code { padding: 0; background: none; }

.post-nav { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); }
.post-nav a { font-weight: 700; text-decoration: none; }
.post-nav a:hover { text-decoration: underline; }

@media (prefers-reduced-motion: reduce) {
    * { transition-duration: 0.01ms !important; }
    .post-card a:hover { transform: none; }
}
