:root {
    --main: #f21717;
    --main-dark: #c90f0f;
    --text: #0a0a0a;
    --body: #4a4a4a;
    --muted: #767676;
    --line: #e9ecef;
    --soft: #f7f7f6;
    --bg: #fff;
    --footer-bg: #111;
    --footer-text: #a8a8aa;
    --radius: 6px;
    --width: 1200px;
    --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --font-title: 'Inter Tight', 'Inter', system-ui, sans-serif;
}

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

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

body {
    margin: 0;
    background: var(--bg);
    color: var(--body);
    font: 400 15px/1.6 var(--font-body);
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--main); }
h1, h2, h3, h4, h5, h6 { font-family: var(--font-title); color: var(--text); line-height: 1.2; margin: 0; }
button, input { font: inherit; }

.container { width: 100%; max-width: var(--width); margin: 0 auto; padding: 0 16px; }
.section { padding: 32px 16px; }
.sr-only, .skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link:focus { position: fixed; top: 8px; left: 8px; z-index: 100; background: var(--text); color: #fff; padding: 8px 12px; border-radius: var(--radius); }
:focus-visible { outline: 2px solid var(--main); outline-offset: 2px; }

.btn {
    display: inline-flex; align-items: center; justify-content: center;
    height: 42px; padding: 0 20px; border: 0; border-radius: 4px;
    background: var(--text); color: #fff; cursor: pointer;
    font: 700 12px/1 var(--font-body); letter-spacing: .1em; text-transform: uppercase;
    transition: background .15s;
}
.btn:hover { background: var(--main); color: #fff; }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: #fff; border-bottom: 1px solid #eeedeb; }
.header-inner { display: flex; align-items: center; gap: 24px; height: 70px; }
.brand img { width: 150px; height: auto; }
.brand-text { font: 800 24px var(--font-title); color: var(--text); }
.main-nav { margin-left: auto; }
.main-nav ul { display: flex; gap: 26px; list-style: none; margin: 0; padding: 0; }
.main-nav a { font: 700 15px var(--font-title); color: var(--text); position: relative; padding: 6px 0; }
.main-nav a.active, .main-nav a:hover { color: var(--main); }
.main-nav a.active::after { content: ''; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; background: var(--main); }
.header-actions { display: flex; gap: 4px; }
.icon-btn { display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 50%; background: transparent; color: var(--text); cursor: pointer; }
.icon-btn:hover { background: var(--soft); color: var(--main); }
.menu-btn { display: none; }
.search-panel { border-top: 1px solid #eeedeb; background: var(--soft); padding: 14px 0; }

.search-form { display: flex; gap: 8px; max-width: 640px; }
.search-form input {
    flex: 1; min-width: 0; height: 42px; padding: 0 14px;
    border: 1px solid #ddd; border-radius: 4px; background: #fff; color: var(--text);
}
.search-form input:focus { outline: none; border-color: var(--text); }

/* ---------- blok umum ---------- */
.section-title {
    display: flex; align-items: center; gap: 14px; margin-bottom: 24px;
    font-size: 26px; font-weight: 800;
}
.section-title::after { content: ''; flex: 1; height: 1px; background: var(--line); }

.cat-label {
    display: inline-block; margin-bottom: 8px;
    color: var(--main); font: 700 13px var(--font-title); text-transform: capitalize;
}
.cat-label:hover { color: var(--main-dark); }

.post-meta {
    display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 10px;
    color: var(--muted); font-size: 11px; letter-spacing: .04em; text-transform: uppercase;
}
.post-meta > * + *::before { content: '•'; margin-right: 14px; color: #ccc; }
.post-meta span:first-child { color: var(--text); font-weight: 600; }

.img-placeholder { aspect-ratio: 16 / 10; background: linear-gradient(135deg, #f2f2f2, #e6e6e6); }

/* ---------- hero (Top Insights) ---------- */
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 32px; }
.hero-media { display: block; overflow: hidden; border-radius: var(--radius); }
.hero-media img, .card-media img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; transition: transform .4s; }
.hero-lead:hover img, .card:hover .card-media img { transform: scale(1.03); }
.hero-body { padding-top: 18px; }
.hero-title { font-size: 32px; font-weight: 800; }
.hero-side { display: flex; flex-direction: column; gap: 20px; }

.card-small { display: grid; grid-template-columns: 100px minmax(0, 1fr); gap: 14px; align-items: start; }
.card-small-media { display: block; overflow: hidden; border-radius: 4px; }
.card-small-media img, .card-small-media .img-placeholder { width: 100px; height: 80px; object-fit: cover; aspect-ratio: auto; }
.card-small .cat-label { margin-bottom: 4px; font-size: 12px; }
.card-small-title { font-size: 15px; font-weight: 700; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-small .post-meta { margin-top: 6px; }

/* ---------- kartu ---------- */
.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 36px 28px; }
.card-grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card-media { display: block; overflow: hidden; border-radius: var(--radius); }
.card-body { padding-top: 16px; }
.card-title { font-size: 20px; font-weight: 800; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-excerpt { margin: 10px 0 0; color: #666; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 44px; }
.pagination a, .pagination span {
    display: inline-grid; place-items: center; min-width: 42px; height: 42px; padding: 0 14px;
    border: 1px solid var(--line); border-radius: 4px; font-weight: 600; color: var(--text);
}
.pagination a:hover { border-color: var(--text); color: var(--text); }
.pagination [aria-current] { background: var(--text); border-color: var(--text); color: #fff; }
.pagination .dots { border: 0; min-width: 20px; padding: 0; }

/* ---------- layout dengan sidebar ---------- */
.layout-sidebar { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 48px; padding-top: 32px; padding-bottom: 48px; }

.sidebar { display: flex; flex-direction: column; gap: 36px; }
.widget-title {
    margin-bottom: 18px; padding-bottom: 10px; border-bottom: 2px solid var(--text);
    font-size: 16px; font-weight: 800; letter-spacing: 0; text-transform: uppercase;
}
.stack { display: flex; flex-direction: column; gap: 18px; }
.popular { margin: 0; padding: 0; list-style: none; counter-reset: pop; }
.popular li { counter-increment: pop; display: grid; grid-template-columns: 34px minmax(0, 1fr); padding: 10px 0; border-bottom: 1px solid var(--line); }
.popular li::before { content: counter(pop, decimal-leading-zero); color: var(--main); font: 800 18px var(--font-title); }
.popular a { color: var(--text); font: 700 14px/1.35 var(--font-title); }
.cat-list { margin: 0; padding: 0; list-style: none; }
.cat-list a { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--line); color: var(--text); font-weight: 600; }
.cat-list .count { min-width: 28px; height: 22px; padding: 0 8px; border-radius: 11px; background: var(--soft); color: var(--muted); font-size: 12px; line-height: 22px; text-align: center; }
.widget-about { padding: 24px; border-radius: var(--radius); background: var(--soft); }
.widget-about p { margin: 0 0 16px; }

/* ---------- artikel ---------- */
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 20px; padding: 0; list-style: none; font-size: 13px; color: var(--muted); }
.breadcrumbs li + li::before { content: '/'; margin-right: 6px; color: #ccc; }
.breadcrumbs a { color: var(--text); }
.breadcrumbs li:last-child { flex: 1; min-width: 0; display: flex; }
.breadcrumbs [aria-current] { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

.single-title { font-size: 40px; font-weight: 800; letter-spacing: -.01em; }
.single-header .post-meta { font-size: 12px; margin-top: 14px; }
.single-media { margin: 28px 0; }
.single-media img { width: 100%; border-radius: var(--radius); }
.notice { padding: 10px 14px; border-radius: var(--radius); background: #fff4e5; color: #8a5300; font-weight: 600; }

.prose { color: #333; font-size: 17px; line-height: 1.75; overflow-wrap: break-word; }
.prose > * { margin: 0 0 1.2em; }
.prose h2, .prose h3, .prose h4, .prose h5 { margin: 1.8em 0 .6em; }
.prose h2 { font-size: 28px; }
.prose h3 { font-size: 23px; }
.prose h4 { font-size: 20px; }
.prose h5 { font-size: 17px; }
.prose a { color: var(--main); text-decoration: underline; text-underline-offset: 3px; }
.prose img { border-radius: var(--radius); margin: 1.5em auto; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li { margin-bottom: .4em; }
.prose blockquote { margin: 1.8em 0; padding: 4px 0 4px 20px; border-left: 4px solid var(--main); color: var(--text); font: 600 19px/1.6 var(--font-title); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; display: block; overflow-x: auto; }
.prose th, .prose td { padding: 10px 12px; border: 1px solid var(--line); text-align: left; }
.prose thead, .prose tr:first-child td { background: var(--soft); font-weight: 600; }
.prose strong { color: var(--text); }

.single-footer { display: flex; flex-direction: column; gap: 16px; margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--line); }
.tags, .share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.tags > span, .share > span { font: 800 14px var(--font-title); color: var(--text); margin-right: 4px; }
.tags a, .share a, .share button {
    padding: 6px 12px; border: 1px solid var(--line); border-radius: 4px; background: #fff;
    color: var(--text); font-size: 13px; cursor: pointer;
}
.tags a:hover, .share a:hover, .share button:hover { border-color: var(--main); color: var(--main); }

.post-nav { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; margin-top: 36px; }
.post-nav a { display: flex; flex-direction: column; gap: 4px; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); color: var(--text); font: 700 15px/1.35 var(--font-title); }
.post-nav a.next { text-align: right; }
.post-nav small { color: var(--muted); font: 400 11px var(--font-body); letter-spacing: .04em; text-transform: uppercase; }
.post-nav a:hover { border-color: var(--main); }
.related { margin-top: 48px; }
.related .card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.related .card-title { font-size: 17px; }

/* ---------- arsip ---------- */
.archive-header { margin-bottom: 32px; padding: 32px; border-radius: var(--radius); background: var(--soft); }
.archive-label { color: var(--main); font: 700 12px var(--font-body); letter-spacing: .1em; text-transform: uppercase; }
.archive-title { margin: 6px 0 0; font-size: 36px; font-weight: 800; }
.archive-desc { margin-top: 10px; }
.archive-header .search-form { margin-top: 16px; }
.error-page { text-align: center; }
.error-page .search-form { margin: 24px auto 48px; }
.error-page .card-grid { text-align: left; }

/* ---------- footer ---------- */
.site-footer { margin-top: 48px; background: var(--footer-bg); color: var(--footer-text); }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr); gap: 40px; padding-top: 56px; padding-bottom: 40px; }
.footer-title { margin-bottom: 16px; color: #fff; font-size: 16px; font-weight: 800; text-transform: uppercase; }
.site-footer p { margin: 0; }
.footer-links { margin: 0; padding: 0; list-style: none; columns: 2; column-gap: 20px; }
.footer-links li { margin-bottom: 10px; break-inside: avoid; }
.footer-links a { color: #dcdcdc; }
.footer-links a:hover, .social a:hover { color: var(--main); }
.footer-links span { color: var(--footer-text); }
.social { display: flex; flex-wrap: wrap; gap: 14px; margin: 16px 0 0; padding: 0; list-style: none; }
.social a { color: #fff; font-weight: 600; }
.footer-bottom { padding-top: 20px; padding-bottom: 20px; border-top: 1px solid #49494b; font-size: 14px; }

/* ---------- responsif ---------- */
@media (max-width: 1024px) {
    .layout-sidebar { grid-template-columns: minmax(0, 1fr); }
    .sidebar { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; }
    .hero-grid { grid-template-columns: minmax(0, 1fr); }
    .hero-side { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
    .menu-btn { display: grid; }
    .main-nav { position: absolute; top: 100%; left: 0; right: 0; display: none; background: #fff; border-bottom: 1px solid #eeedeb; box-shadow: 0 12px 24px rgb(0 0 0 / .06); }
    .main-nav.open { display: block; }
    .main-nav ul { flex-direction: column; gap: 0; padding: 8px 16px 16px; }
    .main-nav a { display: block; padding: 12px 0; border-bottom: 1px solid var(--line); }
    .main-nav a.active::after { display: none; }
    .header-actions { margin-left: auto; }
    .footer-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
}

@media (max-width: 640px) {
    .post-meta { gap: 4px 12px; }
    .post-meta > * + *::before { display: none; }
    body { font-size: 15px; }
    .header-inner { height: 60px; }
    .brand img { width: 120px; }
    .section { padding: 24px 16px; }
    .section-title { font-size: 22px; }
    .hero-title { font-size: 24px; }
    .hero-side, .card-grid, .card-grid.cols-2, .related .card-grid, .sidebar, .post-nav { grid-template-columns: minmax(0, 1fr); }
    .single-title { font-size: 28px; }
    .prose { font-size: 16px; }
    .prose h2 { font-size: 23px; }
    .prose h3 { font-size: 20px; }
    .archive-header { padding: 22px; }
    .archive-title { font-size: 28px; }
    .post-nav a.next { text-align: left; }
}

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