/* heits.tech — tema portal berita teknologi (gelap, aksen lime) */

:root {
    --bg: #0b0b0f;
    --surface: #15151c;
    --surface-2: #1d1d26;
    --line: #2a2a35;
    --text: #f2f2f5;
    --muted: #9a9aa8;
    --accent: #c6ff3d;
    --accent-ink: #0b0b0f;
    --radius: 12px;
    --font-body: var(--gh-font-body, "Inter", system-ui, -apple-system, sans-serif);
    --font-head: var(--gh-font-heading, "Space Grotesk", "Inter", system-ui, sans-serif);
    --container: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.2; margin: 0; }

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

/* Tombol */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 8px 16px; border-radius: 999px; border: 0;
    font: 600 14px/1 var(--font-body); cursor: pointer; white-space: nowrap;
}
.btn-accent { background: var(--accent); color: var(--accent-ink); }
.btn-accent:hover { color: var(--accent-ink); filter: brightness(1.08); }
.btn-ghost { border: 1px solid var(--line); }
.icon-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 38px; height: 38px; border-radius: 999px;
    background: var(--surface); color: var(--text); border: 1px solid var(--line); cursor: pointer;
}
.icon-btn:hover { color: var(--accent); }

/* Masthead */
.masthead {
    position: sticky; top: 0; z-index: 50;
    background: rgba(11, 11, 15, .92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}
.masthead-inner { display: flex; align-items: center; gap: 24px; height: 64px; }
.logo img { max-height: 36px; width: auto; }
.logo-text { font: 700 24px/1 var(--font-head); letter-spacing: -.02em; }
.logo-dot { color: var(--accent); }
.main-nav { flex: 1; }
.main-nav .nav { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.main-nav .nav a {
    display: block; padding: 8px 12px; border-radius: 8px;
    font-size: 14px; font-weight: 500; color: var(--muted); white-space: nowrap;
}
.main-nav .nav a:hover, .main-nav .nav-current a { color: var(--text); background: var(--surface); }
.masthead-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.burger { display: none; }

/* Ticker trending */
.ticker { border-bottom: 1px solid var(--line); background: var(--surface); }
.ticker-inner { display: flex; align-items: center; gap: 16px; height: 44px; overflow: hidden; }
.ticker-label {
    flex: none; background: var(--accent); color: var(--accent-ink);
    font: 700 12px/1 var(--font-body); text-transform: uppercase; letter-spacing: .06em;
    padding: 6px 10px; border-radius: 6px;
}
.ticker-track { overflow: hidden; flex: 1; mask-image: linear-gradient(90deg, #000 85%, transparent); }
.ticker-items { display: flex; gap: 40px; width: max-content; animation: ticker 40s linear infinite; }
.ticker-items a { font-size: 14px; font-weight: 500; white-space: nowrap; }
.ticker-items a::before { content: "●"; color: var(--accent); font-size: 8px; margin-right: 10px; vertical-align: middle; }
.ticker:hover .ticker-items { animation-play-state: paused; }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .ticker-items { animation: none; } }

/* Hero */
.hero { display: grid; grid-template-columns: 1.7fr 1fr; gap: 24px; margin: 32px 0; }
.hero-main { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--surface); min-height: 440px; }
.hero-media, .hero-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-main::after {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(180deg, transparent 30%, rgba(11, 11, 15, .95) 100%);
}
.hero-body { position: absolute; left: 0; right: 0; bottom: 0; padding: 28px; z-index: 1; }
.hero-title { font-size: clamp(26px, 3.4vw, 40px); margin: 12px 0 10px; letter-spacing: -.02em; }
.hero-excerpt { color: #d0d0d8; margin: 0 0 10px; max-width: 640px; }
.hero-side { display: flex; flex-direction: column; gap: 16px; }

/* Item list kecil */
.list-item { display: flex; gap: 14px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.list-item:last-child { border-bottom: 0; }
.list-thumb { flex: none; width: 104px; aspect-ratio: 4 / 3; border-radius: 8px; overflow: hidden; }
.list-thumb img { width: 100%; height: 100%; object-fit: cover; }
.list-title { font-size: 16px; margin: 6px 0 4px; }

/* Badge & meta */
.tag-badge {
    display: inline-block; background: var(--accent); color: var(--accent-ink);
    font: 700 11px/1 var(--font-body); text-transform: uppercase; letter-spacing: .05em;
    padding: 5px 8px; border-radius: 4px;
}
.tag-badge:hover { color: var(--accent-ink); }
.tag-badge-sm { font-size: 10px; padding: 4px 6px; }
.meta { color: var(--muted); font-size: 13px; margin: 0; }

/* Layout utama */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 40px; margin: 40px 0; }
.section-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.section-title {
    font-size: 22px; position: relative; padding-left: 14px;
}
.section-title::before {
    content: ""; position: absolute; left: 0; top: 4px; bottom: 4px; width: 4px;
    background: var(--accent); border-radius: 2px;
}
.more-link { color: var(--accent); font-size: 14px; font-weight: 600; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
    display: inline-block; padding: 6px 12px; border-radius: 999px;
    background: var(--surface); border: 1px solid var(--line);
    font-size: 13px; font-weight: 500;
}
.pill-active { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.pill-active:hover { color: var(--accent-ink); }

/* Grid kartu */
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card { display: flex; flex-direction: column; background: var(--surface); border-radius: var(--radius); overflow: hidden; transition: transform .2s; }
.card:hover { transform: translateY(-3px); }
.card-media { aspect-ratio: 16 / 9; overflow: hidden; background: var(--surface-2); }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-placeholder {
    display: flex; align-items: center; justify-content: center; height: 100%;
    font: 700 18px var(--font-head); color: var(--accent);
    background: radial-gradient(circle at 30% 20%, #2b3a12, var(--surface-2) 70%);
}
.card-body { padding: 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-body .tag-badge { align-self: flex-start; }
.card-title { font-size: 17px; }
.card-body .meta { margin-top: auto; }

/* Rubrik */
.rubrik { margin: 48px 0; padding-top: 32px; border-top: 1px solid var(--line); }

/* Sidebar */
.sidebar { display: flex; flex-direction: column; gap: 24px; }
.widget { background: var(--surface); border-radius: var(--radius); padding: 20px; }
.widget-title { font-size: 18px; margin-bottom: 12px; }
.ranked { list-style: none; counter-reset: rank; margin: 0; padding: 0; }
.ranked li { counter-increment: rank; display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); font-weight: 600; font-size: 15px; }
.ranked li:first-child { border-top: 0; }
.ranked li::before { content: counter(rank); font: 700 24px/1 var(--font-head); color: var(--accent); min-width: 22px; }

/* Newsletter */
.newsletter {
    background: linear-gradient(135deg, #1f2a0c, var(--surface) 70%);
    border: 1px solid #3a4d14; border-radius: var(--radius); padding: 24px; margin: 24px 0;
}
.newsletter h3 { font-size: 20px; margin-bottom: 6px; }
.newsletter p { color: var(--muted); margin: 0 0 14px; font-size: 14px; }
.newsletter-form { display: flex; flex-wrap: wrap; gap: 8px; }
.newsletter-form input {
    flex: 1 1 180px; min-width: 0; padding: 10px 14px; border-radius: 999px;
    border: 1px solid var(--line); background: var(--bg); color: var(--text); font: inherit; font-size: 14px;
}
.form-msg { display: none; width: 100%; margin: 4px 0 0 !important; }
.newsletter-form.success .form-success, .newsletter-form.error .form-error { display: block; }
.newsletter-form.loading button { opacity: .6; }

/* Arsip */
.archive-head { padding: 48px 0 8px; }
.archive-kicker { color: var(--accent); font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.archive-head h1 { font-size: clamp(32px, 5vw, 52px); margin: 6px 0; }
.archive-head p { color: var(--muted); max-width: 640px; }
.avatar-lg { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; margin-bottom: 12px; }
.empty-state { padding: 96px 0; text-align: center; }
.empty-state h1 { font-size: 56px; }
.empty-state p { color: var(--muted); }

/* Artikel */
.article-head { max-width: 800px; padding-top: 48px; }
.article-title { font-size: clamp(30px, 4.6vw, 48px); letter-spacing: -.02em; margin: 14px 0 12px; }
.article-excerpt { font-size: 19px; color: #c8c8d2; margin: 0 0 16px; }
.byline { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; }
.byline a { color: var(--text); font-weight: 600; }
.avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.article-image { margin: 32px auto; max-width: 1100px; }
.article-image img { width: 100%; border-radius: var(--radius); }
.article-image figcaption, .gh-content figcaption { color: var(--muted); font-size: 13px; text-align: center; margin-top: 8px; }

.gh-content {
    display: grid;
    grid-template-columns: [full-start] minmax(16px, 1fr) [wide-start] minmax(0, 120px) [main-start] min(720px, calc(100% - 32px)) [main-end] minmax(0, 120px) [wide-end] minmax(16px, 1fr) [full-end];
    font-size: 18px; line-height: 1.75; color: #e4e4ea;
}
.gh-content > * { grid-column: main-start / main-end; margin: 0 0 1.4em; }
.gh-content > .kg-width-wide { grid-column: wide-start / wide-end; }
.gh-content > .kg-width-full { grid-column: full-start / full-end; }
.gh-content > .kg-width-full img { width: 100%; }
.gh-content h2 { font-size: 28px; margin-top: 1.6em; }
.gh-content h3 { font-size: 22px; margin-top: 1.4em; }
.gh-content a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.gh-content blockquote { border-left: 4px solid var(--accent); padding-left: 20px; font-style: italic; color: var(--text); }
.gh-content pre { background: var(--surface); padding: 16px; border-radius: 8px; overflow-x: auto; font-size: 14px; }
.gh-content code { font-size: .9em; }
.gh-content :not(pre) > code { background: var(--surface-2); padding: 2px 6px; border-radius: 4px; }
.gh-content img { border-radius: 8px; }
.gh-content hr { border: 0; border-top: 1px solid var(--line); }
.gh-content table { width: 100%; border-collapse: collapse; font-size: 15px; }
.gh-content th, .gh-content td { border: 1px solid var(--line); padding: 8px 12px; text-align: left; }

.article-foot { max-width: 720px; margin: 0 auto; padding: 0 16px; }
.share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 20px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 14px; }
.share span { color: var(--muted); margin-right: 4px; }
.share a, .share button {
    padding: 6px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line);
    color: var(--text); font: 500 13px var(--font-body); cursor: pointer;
}
.post-tags { display: flex; flex-wrap: wrap; gap: 8px; padding: 20px 0; }
.article-comments { max-width: 720px; margin: 24px auto; padding: 0 16px; }

/* Pagination */
.pagination { display: flex; align-items: center; justify-content: center; gap: 16px; margin: 40px 0 0; color: var(--muted); font-size: 14px; }
.pagination a { padding: 8px 16px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--text); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); margin-top: 64px; padding: 40px 0; }
.footer-inner { display: grid; grid-template-columns: 1fr auto; gap: 20px; align-items: start; }
.footer-brand p { color: var(--muted); margin: 8px 0 0; font-size: 14px; max-width: 420px; }
.footer-nav .nav { display: flex; flex-wrap: wrap; gap: 16px; list-style: none; margin: 0; padding: 0; font-size: 14px; color: var(--muted); }
.footer-copy { grid-column: 1 / -1; color: var(--muted); font-size: 13px; margin: 0; }

/* Error */
.error-page { min-height: 80vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.error-page h1 { font-size: 120px; color: var(--accent); }
.error-page p { color: var(--muted); margin-bottom: 24px; }

/* Responsif */
@media (max-width: 1000px) {
    .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .layout { grid-template-columns: 1fr; }
    .hero { grid-template-columns: 1fr; }
}
@media (max-width: 1100px) {
    .burger { display: inline-flex; }
    .main-nav {
        display: none; position: absolute; top: 64px; left: 0; right: 0;
        background: var(--bg); border-bottom: 1px solid var(--line); padding: 8px 16px 16px;
    }
    .main-nav.open { display: block; }
    .main-nav .nav { flex-direction: column; }
    .main-nav .nav a { padding: 12px; font-size: 16px; }
}
@media (max-width: 860px) {
    .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
    .grid, .grid-4 { grid-template-columns: 1fr; }
    .hero-main { min-height: 380px; }
    .hero-body { padding: 20px; }
    .masthead-actions .btn { display: none; }
    .footer-inner { grid-template-columns: 1fr; }
    .gh-content { font-size: 17px; }
}
