/*
Theme Name: ADC
Theme URI: https://alphadc.net
Author: Irwan - AlphaDC
Author URI: https://alphadc.net
Description: Tema minimalis tanpa builder untuk AlphaDC. Satu file CSS, JS kurang dari 2 KB, tanpa jQuery.
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 8.0
License: GPL-2.0-or-later
Text Domain: adc
*/

/* ---------- Tokens ---------- */
:root {
	--bg: #fff;
	--bg-soft: #f6f5f2;
	--text: #1c1c1c;
	--muted: #5f5f5f;
	--line: #e6e4df;
	--accent: #dd9933;
	--accent-ink: #8a5a0c;
	--code-bg: #f3f1ec;
	--radius: 10px;
	--wrap: 1080px;
	--read: 720px;
	--font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
	:root {
		--bg: #141414;
		--bg-soft: #1c1c1c;
		--text: #ebe9e4;
		--muted: #a3a09a;
		--line: #2c2b29;
		--accent-ink: #e9ac4f;
		--code-bg: #202020;
	}
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font: 400 1.0625rem/1.7 var(--font);
	-webkit-font-smoothing: antialiased;
}
img, svg, video { max-width: 100%; height: auto; }
a { color: var(--accent-ink); text-underline-offset: .18em; }
a:hover { color: var(--text); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }
h1, h2, h3, h4 { line-height: 1.25; margin: 2em 0 .6em; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: clamp(1.9rem, 4.5vw, 2.8rem); margin-top: 0; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.1rem; }
p, ul, ol, pre, table, blockquote, figure { margin: 0 0 1.25em; }
hr, .wp-block-separator { border: 0; border-top: 1px solid var(--line); margin: 2.5em 0; }
.screen-reader-text, .skip-link:not(:focus) {
	position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
.skip-link:focus { position: fixed; top: 8px; left: 8px; z-index: 100; background: var(--bg); padding: .6em 1em; border-radius: 6px; }

.wrap { width: min(100% - 2rem, var(--wrap)); margin-inline: auto; }
.wrap--read { width: min(100% - 2rem, var(--read)); }
.wrap--tool { width: min(100% - 2rem, 860px); }

/* ---------- Header ---------- */
/* Header selalu gelap supaya logo putih terbaca di mode terang maupun gelap. */
.site-header { background: #141414; color: #fff; border-bottom: 1px solid #2c2b29; }
.site-header .menu a { color: #f2f0eb; }
.site-header .menu a:hover, .site-header .menu .current-menu-item > a, .site-header .menu .current-menu-ancestor > a { background: rgba(255, 255, 255, .12); color: #fff; }
.site-header .nav-toggle { color: #fff; border-color: #4a4945; }
.site-header .menu .sub-menu { background: #1c1c1c; border-color: #2c2b29; box-shadow: 0 10px 30px rgba(0, 0, 0, .35); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 68px; }
.brand { font-weight: 800; font-size: 1.25rem; letter-spacing: .02em; text-decoration: none; color: #fff; }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 8px; color: var(--text); padding: .45em .8em; font: inherit; cursor: pointer; }
.menu, .menu ul { list-style: none; margin: 0; padding: 0; }
.menu { display: flex; gap: .25rem; align-items: center; }
.menu li { position: relative; }
.menu a { display: block; padding: .5em .8em; border-radius: 8px; color: var(--text); text-decoration: none; font-size: .975rem; }
.menu a:hover, .menu .current-menu-item > a, .menu .current-menu-ancestor > a { background: var(--bg-soft); }
.menu .menu-item-has-children > a::after { content: ""; display: inline-block; margin-left: .4em; border: 4px solid transparent; border-top-color: currentColor; vertical-align: -2px; }
.menu .sub-menu {
	position: absolute; top: 100%; left: 0; min-width: 260px; z-index: 20; padding: .4rem;
	background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
	box-shadow: 0 10px 30px rgba(0, 0, 0, .08); display: none;
}
.menu li:hover > .sub-menu, .menu li:focus-within > .sub-menu, .menu .sub-menu.is-open { display: block; }

@media (max-width: 760px) {
	.nav-toggle { display: block; }
	.site-nav { display: none; position: absolute; left: 0; right: 0; top: 68px; z-index: 30; background: #141414; border-bottom: 1px solid #2c2b29; padding: .5rem 1rem 1rem; }
	.site-header { position: relative; }
	.site-nav.is-open { display: block; }
	.menu { flex-direction: column; align-items: stretch; }
	.menu .sub-menu { position: static; display: block; border: 0; box-shadow: none; padding: 0 0 0 1rem; }
	.menu .menu-item-has-children > a::after { display: none; }
}

/* ---------- Hero & sections ---------- */
.hero { padding: clamp(3rem, 9vw, 6.5rem) 0 clamp(2.5rem, 6vw, 4rem); }
.eyebrow { text-transform: uppercase; letter-spacing: .18em; font-size: .8rem; font-weight: 700; color: var(--accent-ink); margin: 0 0 1rem; }
.hero h1 { font-size: clamp(2.4rem, 7vw, 4.4rem); line-height: 1.05; margin-bottom: 1rem; }
.hero .lead { font-size: clamp(1.1rem, 2.4vw, 1.35rem); color: var(--muted); max-width: 36em; margin-bottom: 1.8rem; }
.btn {
	display: inline-block; padding: .7em 1.3em; border-radius: 999px; font-weight: 600; font-size: .975rem; text-decoration: none;
	border: 1px solid var(--text); color: var(--bg); background: var(--text);
}
.btn:hover { background: var(--accent-ink); border-color: var(--accent-ink); color: #fff; }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn--ghost:hover { background: var(--bg-soft); color: var(--text); border-color: var(--text); }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; }

.section { padding: clamp(2.5rem, 6vw, 4.5rem) 0; border-top: 1px solid var(--line); }
.section > .wrap > h2 { margin-top: 0; font-size: 1.05rem; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); }
.about { display: grid; grid-template-columns: 240px 1fr; gap: clamp(1.5rem, 5vw, 3.5rem); align-items: start; }
.about img { border-radius: var(--radius); width: 100%; }
.about h3 { margin-top: 0; }
.about .tag { font-weight: 700; letter-spacing: .08em; font-size: .85rem; color: var(--accent-ink); text-transform: uppercase; margin-bottom: .5rem; }
@media (max-width: 640px) { .about { grid-template-columns: 1fr; } .about figure { max-width: 220px; } }

.certs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 1rem; list-style: none; padding: 0; margin: 0; }
.certs img { border-radius: 8px; border: 1px solid var(--line); width: 100%; }
.strip { display: grid; grid-auto-flow: column; grid-auto-columns: min(78%, 320px); gap: 1rem; overflow-x: auto; scroll-snap-type: x mandatory; padding: 0 0 1rem; list-style: none; margin: 0; }
.strip li { scroll-snap-align: start; }
.strip img { border-radius: 8px; border: 1px solid var(--line); }

/* ---------- Page & article ---------- */
.page-head { padding: clamp(2rem, 5vw, 3.5rem) 0 1rem; }
.page-head .desc { color: var(--muted); max-width: 40em; }
.crumbs { font-size: .85rem; color: var(--muted); padding-top: 1.25rem; }
.crumbs a { color: var(--muted); }
.entry { padding-bottom: 4rem; }
.entry-meta { font-size: .9rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: .25rem 1rem; margin: 0 0 1.5rem; }
.entry-meta a { color: var(--accent-ink); font-weight: 600; text-decoration: none; }
.entry-thumb { margin: 0 0 2rem; }
.entry-thumb img { border-radius: var(--radius); width: 100%; }
.entry-content { overflow-wrap: anywhere; }
.entry-content > *:first-child { margin-top: 0; }
.entry-content img { border-radius: 6px; }
.entry-content figure { margin-inline: 0; }
.entry-content figcaption { font-size: .875rem; color: var(--muted); margin-top: .5em; }
.entry-content ul, .entry-content ol { padding-left: 1.4em; }
.entry-content li { margin-bottom: .35em; }
.entry-content blockquote { border-left: 3px solid var(--accent); padding: .2em 0 .2em 1.1em; color: var(--muted); font-style: italic; }
.entry-content table { width: 100%; border-collapse: collapse; font-size: .95rem; display: block; overflow-x: auto; }
.entry-content th, .entry-content td { border: 1px solid var(--line); padding: .55em .8em; text-align: left; }
.entry-content th { background: var(--bg-soft); }
code, pre { font-family: var(--mono); font-size: .9em; }
code { background: var(--code-bg); padding: .12em .38em; border-radius: 4px; }
pre { background: var(--code-bg); padding: 1em 1.2em; border-radius: var(--radius); overflow-x: auto; line-height: 1.55; }
pre code { background: none; padding: 0; overflow-wrap: normal; }
.gallery { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.gallery-item { margin: 0; }
.gallery-item img { width: 100%; border-radius: 8px; border: 1px solid var(--line); }
.gallery-columns-3 { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.gallery-columns-4 { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.adsbygoogle { max-width: 100%; }

.entry-foot { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); font-size: .9rem; color: var(--muted); }
.entry-foot a { display: inline-block; margin: 0 .5em .5em 0; padding: .1em .7em; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); text-decoration: none; }
.entry-foot a:hover { color: var(--text); border-color: var(--text); }

/* ---------- Cards & archives ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 2rem 1.75rem; }
.card { display: flex; flex-direction: column; }
.card-thumb { display: block; aspect-ratio: 16 / 9; background: var(--bg-soft); border-radius: var(--radius); overflow: hidden; margin-bottom: 1rem; }
.card-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card .cat { font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; color: var(--accent-ink); text-decoration: none; margin-bottom: .35rem; }
.card h3 { font-size: 1.2rem; margin: 0 0 .5rem; }
.card h3 a { color: var(--text); text-decoration: none; }
.card h3 a:hover { color: var(--accent-ink); }
.card p { color: var(--muted); font-size: .95rem; margin: 0 0 .6rem; }
.card time { font-size: .85rem; color: var(--muted); margin-top: auto; }
.more { margin-top: 2rem; }
.related { margin-top: 3.5rem; }
.related h2 { font-size: 1.1rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin-top: 0; }

.pagination { margin: 3rem 0 4rem; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: .4rem; justify-content: center; }
.pagination .page-numbers { padding: .45em .9em; border: 1px solid var(--line); border-radius: 8px; text-decoration: none; color: var(--text); font-size: .95rem; }
.pagination .current { background: var(--text); color: var(--bg); border-color: var(--text); }
.pagination a.page-numbers:hover { border-color: var(--text); }
.archive-body { padding-bottom: 1rem; }

/* ---------- Search form, 404 ---------- */
.search-form { display: flex; gap: .5rem; max-width: 460px; }
.search-form input[type=search] { flex: 1; padding: .65em .9em; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--text); font: inherit; }
.search-form button { padding: .65em 1.1em; border-radius: 8px; border: 1px solid var(--text); background: var(--text); color: var(--bg); font: inherit; cursor: pointer; }
.notfound { padding: 5rem 0; text-align: center; }
.notfound .search-form { margin: 1.5rem auto 0; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 2.5rem 0; font-size: .925rem; color: var(--muted); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1.25rem 2rem; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--text); text-decoration: underline; }
.site-footer .menu { flex-wrap: wrap; gap: 0 1.25rem; }
.site-footer .menu a { padding: .15em 0; font-size: inherit; border-radius: 0; background: none; }
.social { display: flex; gap: 1.25rem; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
@media print { .site-header, .site-footer, .related, .adsbygoogle { display: none !important; } }

/* ---------- Blok tombol (hasil konversi dari Pagelayer) ---------- */
.wp-block-buttons { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: center; margin: 2rem 0; }
.wp-block-button__link { display: inline-block; padding: .7em 1.4em; border-radius: 999px; background: var(--text); color: var(--bg); font-weight: 600; text-decoration: none; }
.wp-block-button__link:hover { background: var(--accent-ink); color: #fff; }
