/*
Theme Name: Tech Milenial
Theme URI: https://techmilenial.com
Author: Tech Milenial
Author URI: https://techmilenial.com
Description: Tema majalah teknologi editorial untuk Tech Milenial. Full-black, aksen putih, tipografi Geist (sans) + Geist Mono (mono).
Version: 1.14.9
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 8.1
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: aee-blog
Tags: blog, news, two-columns, accessibility-ready, custom-logo, featured-images, theme-options, translation-ready, rtl-language-support
*/

/* ============================================================
   Design tokens — Modern Editorial Tech
   ============================================================ */
:root {
	/* Full black */
	--aee-bg: #0A0A0A;
	--aee-surface: #111111;
	--aee-ink: #EDEDED;
	--aee-muted: #9A9A9A;
	--aee-border: #242424;
	--aee-accent: #FFFFFF;
	--aee-accent-hover: #D9D9D9;
	--aee-accent-soft: #1C1C1C;
	--aee-accent-gradient: linear-gradient(135deg, #FFFFFF 0%, #D9D9D9 100%);
	--aee-coral: #FFFFFF;
	--aee-success: #7FEE64;
	--aee-warning: #D9B45A;
	--aee-error: #E08A8A;
	--aee-header-bg: #000000;
	--aee-header-text: #F5F5F5;
	--aee-header-muted: #9A9A9A;
	--aee-header-border: rgba(255, 255, 255, 0.08);

	/* Typography — Geist */
	--aee-font-sans: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--aee-font-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	--aee-font-display: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	--aee-font-base: 0.9375rem;
	--aee-font-body: 1rem;
	--aee-line: 1.7;

	/* Spacing scale */
	--aee-s-1: 4px;
	--aee-s-2: 8px;
	--aee-s-3: 12px;
	--aee-s-4: 16px;
	--aee-s-5: 24px;
	--aee-s-6: 32px;
	--aee-s-7: 48px;
	--aee-s-8: 64px;
	--aee-s-9: 88px;

	/* Shape */
	--aee-radius: 10px;
	--aee-radius-sm: 8px;

	/* Layout */
	--aee-container: 1280px;
	--aee-content: 720px;
	--aee-wide: 960px;

	--aee-shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px -12px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] {
	/* Full black — same base, slightly deeper surface */
	--aee-bg: #0A0A0A;
	--aee-surface: #111111;
	--aee-ink: #EDEDED;
	--aee-muted: #9A9A9A;
	--aee-border: #242424;
	--aee-accent: #FFFFFF;
	--aee-accent-hover: #D9D9D9;
	--aee-accent-soft: #1C1C1C;
	--aee-coral: #FFFFFF;
	--aee-success: #7FEE64;
	--aee-warning: #D9B45A;
	--aee-error: #E08A8A;
	--aee-shadow: 0 1px 2px rgba(0, 0, 0, 0.5), 0 8px 24px -12px rgba(0, 0, 0, 0.6);
	--aee-header-bg: #000000;
	--aee-header-text: #F5F5F5;
	--aee-header-muted: #9A9A9A;
	--aee-header-border: rgba(255, 255, 255, 0.08);
}

/* ============================================================
   Reset & base
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: hidden; }

body {
	margin: 0;
	font-family: var(--aee-font-sans);
	font-size: var(--aee-font-base);
	line-height: var(--aee-line);
	color: var(--aee-ink);
	background: var(--aee-bg);
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
	overflow-x: hidden;
}

img { max-width: 100%; height: auto; }
svg { display: block; }

/* Prevent long unbreakable strings (URLs, tokens) from pushing the layout wide on mobile */
.entry-content p,
.entry-content li,
.entry-content blockquote,
.entry-content td,
.entry-content th,
.entry-content code {
	overflow-wrap: anywhere;
}

a {
	color: var(--aee-accent);
	text-decoration: none;
	transition: color 120ms ease;
}
a:hover { color: var(--aee-accent-hover); }

h1, h2, h3, h4, h5, h6 {
	color: var(--aee-ink);
	font-family: var(--aee-font-display);
	line-height: 1.18;
	font-weight: 500;
	letter-spacing: -0.02em;
	margin: 0 0 var(--aee-s-4);
	overflow-wrap: break-word;
	scroll-margin-top: 84px;
}
h1 { font-size: clamp(2.1rem, 4.8vw, 3.2rem); letter-spacing: -0.03em; font-weight: 400; }
h2 { font-size: clamp(1.5rem, 2.7vw, 1.9rem); margin-top: var(--aee-s-7); font-weight: 450; }
h3 { font-size: clamp(1.2rem, 2vw, 1.35rem); margin-top: var(--aee-s-6); font-weight: 500; }
h4 { font-size: 1.12rem; margin-top: var(--aee-s-5); font-weight: 600; }

p { margin: 0 0 var(--aee-s-4); }

ul, ol { margin: 0 0 var(--aee-s-4); padding-left: 1.4em; }
li { margin-bottom: var(--aee-s-2); }

blockquote {
	margin: var(--aee-s-6) 0;
	padding: var(--aee-s-5) var(--aee-s-6);
	border-left: 3px solid var(--aee-accent);
	background: var(--aee-accent-soft);
	border-radius: 0 var(--aee-radius-sm) var(--aee-radius-sm) 0;
	color: var(--aee-ink);
	font-size: 1.1rem;
	line-height: 1.6;
}
blockquote p:last-child { margin-bottom: 0; }

code, kbd, samp {
	font-family: var(--aee-font-mono);
	font-size: 0.9em;
	background: var(--aee-accent-soft);
	color: var(--aee-ink);
	padding: 0.1em 0.35em;
	border-radius: 4px;
}
pre {
	background: var(--aee-surface);
	border: 1px solid var(--aee-border);
	border-radius: var(--aee-radius);
	padding: var(--aee-s-4);
	overflow-x: auto;
	line-height: 1.55;
}
pre code { background: none; padding: 0; font-size: 0.875rem; }

table {
	width: 100%;
	border-collapse: collapse;
	margin: var(--aee-s-5) 0;
	font-size: 0.95rem;
}
th, td {
	border: 1px solid var(--aee-border);
	padding: var(--aee-s-3) var(--aee-s-4);
	text-align: left;
	vertical-align: top;
}
th { background: var(--aee-accent-soft); font-weight: 600; white-space: nowrap; }
tbody tr:nth-child(even) td { background: var(--aee-surface); }

/* Wide comparison tables scroll horizontally on small screens. */
@media (max-width: 720px) {
	.entry-content table {
		display: block;
		overflow-x: auto;
		white-space: nowrap;
		-webkit-overflow-scrolling: touch;
	}
	.entry-content th,
	.entry-content td {
		min-width: 132px;
	}
}

hr { border: 0; border-top: 1px solid var(--aee-border); margin: var(--aee-s-6) 0; }

figure { margin: var(--aee-s-5) 0; }
figure img { border-radius: var(--aee-radius); display: block; }
figcaption, .wp-caption-text {
	font-size: 0.85rem;
	color: var(--aee-muted);
	margin-top: var(--aee-s-2);
}

/* ============================================================
   Layout container
   ============================================================ */
.container {
	max-width: var(--aee-container);
	margin: 0 auto;
	padding: 0 var(--aee-s-5);
}

/* ============================================================
   Accessibility helpers
   ============================================================ */
.skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 100;
	background: var(--aee-accent);
	color: #000;
	padding: var(--aee-s-3) var(--aee-s-4);
	border-radius: 0 0 var(--aee-radius-sm) 0;
}
.skip-link:focus { left: 0; color: #000; }

.screen-reader-text {
	border: 0; clip: rect(1px,1px,1px,1px); clip-path: inset(50%);
	height: 1px; width: 1px; margin: -1px; overflow: hidden;
	padding: 0; position: absolute !important; word-wrap: normal !important;
}

:focus-visible {
	outline: 2px solid var(--aee-accent);
	outline-offset: 2px;
	border-radius: 2px;
}

::selection {
	background: var(--aee-accent);
	color: #000;
}

/* ============================================================
   Header
   ============================================================ */
.site-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: var(--aee-header-bg);
	border-bottom: 1px solid var(--aee-header-border);
	transition: transform 280ms cubic-bezier(0.4, 0, 0.2, 1);
}
.site-header.is-hidden { transform: translateY(-100%); }

.site-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: 48px;
}

.site-brand { display: flex; align-items: center; flex: none; }
.site-brand__link { display: inline-flex; align-items: center; gap: 10px; color: var(--aee-header-text); line-height: 1; }
.site-brand__link:hover { color: var(--aee-header-text); }
.site-brand__mark {
	display: inline-flex; align-items: center; justify-content: center;
	width: 34px; height: 34px;
	border-radius: 9px;
	background: var(--aee-accent-gradient);
	color: #000;
	font-weight: 700;
	font-size: 1.05rem;
	font-family: var(--aee-font-display);
	letter-spacing: -0.02em;
	flex: none;
}
.site-brand__name { font-weight: 600; font-size: 0.9375rem; letter-spacing: -0.01em; line-height: 1.15; white-space: nowrap; }
.custom-logo { max-height: 28px; width: auto; }

.main-nav { flex: 1; display: flex; align-items: center; margin-left: var(--aee-s-6); }
.main-nav > ul { display: flex; gap: 26px; list-style: none; margin: 0; padding: 0; align-items: center; }
.main-nav > ul > li { position: relative; white-space: nowrap; margin: 0; }
.main-nav > ul > li > a {
	display: inline-flex;
	align-items: center;
	height: 48px;
	color: var(--aee-header-muted);
	font-family: var(--aee-font-mono);
	font-size: 0.6875rem;
	font-weight: 500;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	white-space: nowrap;
	background-image: linear-gradient(currentColor, currentColor);
	background-repeat: no-repeat;
	background-position: 0 calc(100% - 11px);
	background-size: 0 1px;
	transition: color 160ms ease, background-size 200ms ease;
}
.main-nav > ul > li > a:hover { color: var(--aee-header-text); background-size: 100% 1px; }
.main-nav > ul > li.current-menu-item > a,
.main-nav > ul > li > a[aria-current="page"] { color: var(--aee-header-text); background-size: 100% 1px; }

/* Dropdown chevron — clean 2-segment SVG, rotates 180° on hover */
.main-nav li.menu-item-has-children > a::after {
	content: "";
	width: 9px;
	height: 5px;
	margin-left: 7px;
	background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
	transition: transform 180ms ease;
}
.main-nav li.menu-item-has-children:hover > a::after,
.main-nav li.menu-item-has-children:focus-within > a::after { transform: rotate(180deg); }

/* Dropdown panel — fade + slide, polished */
.main-nav .sub-menu {
	position: absolute;
	top: calc(100% + 4px);
	left: 0;
	display: block;
	min-width: 208px;
	margin: 0;
	padding: 8px;
	list-style: none;
	background: #141414;
	border: 1px solid var(--aee-border);
	border-radius: 10px;
	box-shadow: 0 24px 48px -16px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(255, 255, 255, 0.03);
	opacity: 0;
	visibility: hidden;
	transform: translateY(-6px);
	transition: opacity 160ms ease, transform 160ms ease, visibility 160ms;
}
.main-nav li.menu-item-has-children:hover > .sub-menu,
.main-nav li.menu-item-has-children:focus-within > .sub-menu {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

/* Submenu links — sans, normal case, body size */
.main-nav .sub-menu a {
	display: flex;
	align-items: center;
	height: auto;
	padding: 9px 12px;
	font-family: var(--aee-font-sans);
	font-size: 0.875rem;
	font-weight: 500;
	letter-spacing: 0;
	text-transform: none;
	border-radius: 7px;
	color: var(--aee-muted);
	transition: color 140ms ease, background 140ms ease;
}
.main-nav .sub-menu a:hover { color: #ffffff; background: rgba(255, 255, 255, 0.06); }

.header-actions { display: flex; align-items: center; gap: var(--aee-s-3); }

.header-search {
	position: relative;
}
.header-search input[type="search"] {
	border: 1px solid var(--aee-header-border);
	background: rgba(255, 255, 255, 0.06);
	color: var(--aee-header-text);
	border-radius: var(--aee-radius-sm);
	padding: 0 var(--aee-s-3);
	height: 40px;
	box-sizing: border-box;
	font-size: 0.9rem;
	width: 140px;
	transition: width 160ms ease, border-color 160ms ease;
}
.header-search input[type="search"]::placeholder { color: var(--aee-header-muted); }
.header-search input[type="search"]:focus { width: 200px; border-color: var(--aee-accent); outline: none; }

.theme-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px; height: 40px;
	border: 1px solid var(--aee-header-border);
	background: rgba(255, 255, 255, 0.06);
	color: var(--aee-header-text);
	border-radius: var(--aee-radius-sm);
	cursor: pointer;
}
.theme-toggle:hover { border-color: var(--aee-accent); color: var(--aee-accent); }

.menu-toggle {
	display: none;
	width: 40px; height: 40px;
	border: 1px solid var(--aee-header-border);
	background: transparent;
	color: var(--aee-header-text);
	border-radius: var(--aee-radius-sm);
	cursor: pointer;
	transition: border-color 160ms ease, background 160ms ease;
}
.menu-toggle:hover { background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.22); }

/* Mobile nav (tablet) */
@media (max-width: 960px) {
	.menu-toggle { display: inline-flex; align-items: center; justify-content: center; }
	.btn-subscribe { display: none; }
	.main-nav {
		display: none;
		position: absolute;
		top: 100%; left: 0; right: 0;
		margin-left: 0;
		flex: none;
		background: var(--aee-header-bg);
		border-bottom: 1px solid var(--aee-header-border);
		padding: var(--aee-s-4) var(--aee-s-5);
	}
	.main-nav.is-open { display: block; }
	.main-nav > ul { flex-direction: column; gap: var(--aee-s-2); }
	.main-nav .sub-menu {
		position: static;
		display: block;
		min-width: 0;
		margin: 0;
		padding: 0 0 0 var(--aee-s-4);
		background: transparent;
		border: none;
		box-shadow: none;
		opacity: 1;
		visibility: visible;
		transform: none;
	}
	.main-nav a { display: block; height: auto; padding: var(--aee-s-3) 0; font-size: 0.8125rem; }
	.header-search input[type="search"] { width: 120px; }
	.header-search input[type="search"]:focus { width: 150px; }
}

/* Mobile: hide the inline search box so the header stays on one line */
@media (max-width: 640px) {
	.header-search { display: none; }
	.site-header__inner { gap: var(--aee-s-3); }
}

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
	margin-top: var(--aee-s-9);
	border-top: 1px solid var(--aee-border);
	background: var(--aee-surface);
}
.site-footer__grid {
	display: grid;
	grid-template-columns: 2fr 1fr 1fr 1.4fr;
	gap: var(--aee-s-6);
	padding: var(--aee-s-7) 0 var(--aee-s-5);
}
.site-footer h2 { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--aee-muted); margin-bottom: var(--aee-s-4); font-weight: 600; }
.site-footer__desc { color: var(--aee-muted); font-size: 0.92rem; max-width: 34ch; }
.site-footer__col--cta {
	background: var(--aee-accent-soft);
	border: 1px solid var(--aee-border);
	border-radius: var(--aee-radius);
	padding: var(--aee-s-4) var(--aee-s-5);
}
.site-footer__col--cta .site-footer__desc { margin-bottom: var(--aee-s-4); }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: var(--aee-s-2); }
.site-footer a { color: var(--aee-muted); font-size: 0.92rem; }
.site-footer a:hover { color: var(--aee-accent); }
.site-footer__bottom {
	border-top: 1px solid var(--aee-border);
	padding: var(--aee-s-4) 0;
	display: flex;
	justify-content: space-between;
	gap: var(--aee-s-4);
	flex-wrap: wrap;
	color: var(--aee-muted);
	font-size: 0.85rem;
}
@media (max-width: 960px) {
	.site-footer__grid { grid-template-columns: 1fr 1fr; }
	.site-footer__col--brand { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
	.site-footer__grid { grid-template-columns: 1fr; gap: var(--aee-s-5); }
	.site-footer__col--brand { grid-column: auto; }
}

/* ============================================================
   Page hero / titles
   ============================================================ */
.page-hero { padding: var(--aee-s-7) 0 var(--aee-s-5); border-bottom: 1px solid var(--aee-border); }
.page-hero h1 { margin: 0 0 var(--aee-s-2); }
.page-hero p { color: var(--aee-muted); max-width: 60ch; margin: 0; }

/* ============================================================
   Article cards
   ============================================================ */
.card {
	display: block;
	background: var(--aee-surface);
	border: 1px solid var(--aee-border);
	border-radius: var(--aee-radius);
	overflow: hidden;
	transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
}
.card:hover { border-color: var(--aee-accent); box-shadow: var(--aee-shadow); transform: translateY(-1px); }
.card__media { position: relative; aspect-ratio: 16 / 9; background: var(--aee-accent-soft); }
.card__media > a,
.card__media > img,
.card__media .wp-post-image { display: block; width: 100%; height: 100%; object-fit: cover; }
.card__media img { transition: transform 500ms cubic-bezier(0.22, 0.61, 0.36, 1); }
.card:hover .card__media img { transform: scale(1.045); }
.card__scrim {
	position: absolute;
	inset: 0;
	background: linear-gradient(to top, rgba(13, 17, 23, 0.86) 0%, rgba(13, 17, 23, 0.42) 48%, rgba(13, 17, 23, 0) 78%);
	pointer-events: none;
}
.card__overlay {
	position: absolute;
	left: 0; right: 0; bottom: 0;
	padding: var(--aee-s-4);
	color: #fff;
}
.card__overlay .cat-label { background: rgba(255, 255, 255, 0.16); color: #fff; }
.card__title { font-size: 1.12rem; margin: var(--aee-s-2) 0; line-height: 1.32; font-weight: 700; }
.card__overlay .card__title a { color: #fff; }
.card__overlay .card__title a:hover { color: #fff; text-decoration: underline; }
.card__desc {
	color: rgba(255, 255, 255, 0.88);
	font-size: 0.85rem;
	line-height: 1.45;
	margin: 0;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.card__body { padding: var(--aee-s-3) var(--aee-s-4) var(--aee-s-4); }

.posts-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: var(--aee-s-5);
}
.posts-grid--2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 960px) { .posts-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .posts-grid { grid-template-columns: 1fr; } }

/* ============================================================
   Layout (main + sidebar)
   ============================================================ */
.layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 320px;
	gap: var(--aee-s-7);
	align-items: start;
}
.layout__side { position: sticky; top: 84px; }
@media (max-width: 960px) {
	.layout { grid-template-columns: minmax(0, 1fr); }
	.layout__side { position: static; }
}

/* ============================================================
   Story list (flat news rows)
   ============================================================ */
.story-list { display: flex; flex-direction: column; }
.story-card {
	display: grid;
	grid-template-columns: 200px minmax(0, 1fr);
	gap: var(--aee-s-5);
	padding: var(--aee-s-5) 0;
	border-bottom: 1px solid var(--aee-border);
}
.story-card:first-child { padding-top: 0; }
.story-card:last-child { border-bottom: 0; }
.story-card__media {
	aspect-ratio: 16 / 10;
	border-radius: var(--aee-radius-sm);
	overflow: hidden;
	background: var(--aee-accent-soft);
}
.story-card__media a,
.story-card__media img,
.story-card__media .wp-post-image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.story-card__media-fallback {
	display: block;
	width: 100%;
	height: 100%;
	background: var(--aee-accent-gradient);
	opacity: 0.45;
}
.story-card__content { min-width: 0; }
.story-card__title {
	font-size: 1.3rem;
	line-height: 1.3;
	margin: 0 0 var(--aee-s-2);
	letter-spacing: -0.01em;
}
.story-card__title a { color: var(--aee-ink); }
.story-card__title a:hover { color: var(--aee-accent); }
.story-card__meta {
	display: flex;
	align-items: center;
	gap: var(--aee-s-3);
	margin-bottom: var(--aee-s-3);
	font-size: 0.82rem;
}
.story-card__date { color: var(--aee-muted); }
.story-card__tag { font-weight: 600; font-size: 0.78rem; color: var(--aee-muted); }
.story-card__tag.cat-label--ai-models-api { color: #195AFE; }
.story-card__tag.cat-label--tutorials { color: #0FA958; }
.story-card__tag.cat-label--benchmarks { color: #D97706; }
.story-card__tag.cat-label--agents-automation { color: #7C3AED; }
.story-card__tag.cat-label--developer-tools-security { color: #DC2743; }
.story-card__desc {
	color: var(--aee-muted);
	font-size: 0.95rem;
	line-height: 1.6;
	margin: 0;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

@media (max-width: 640px) {
	.story-card { grid-template-columns: 1fr; gap: var(--aee-s-4); }
	.story-card__media { aspect-ratio: 16 / 9; }
}

/* ============================================================
   Sidebar
   ============================================================ */
.sidebar { display: flex; flex-direction: column; gap: var(--aee-s-5); }
.sidebar__box {
	background: var(--aee-surface);
	border: 1px solid var(--aee-border);
	border-radius: var(--aee-radius);
	padding: var(--aee-s-5);
}
.sidebar__title {
	font-size: 0.78rem;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--aee-muted);
	font-weight: 600;
	margin: 0 0 var(--aee-s-4);
	padding-bottom: var(--aee-s-3);
	border-bottom: 1px solid var(--aee-border);
}
.sidebar__desc { color: var(--aee-muted); font-size: 0.92rem; margin: 0 0 var(--aee-s-4); }
.sidebar__box--cta { background: var(--aee-accent-soft); border-color: color-mix(in srgb, var(--aee-accent) 25%, var(--aee-border)); }

.trending-list { list-style: none; margin: 0; padding: 0; }
.trending-item { margin-bottom: var(--aee-s-3); }
.trending-item:last-child { margin-bottom: 0; }
.trending-link { display: flex; align-items: center; gap: var(--aee-s-3); color: var(--aee-ink); }
.trending-link:hover { color: var(--aee-accent); }
.trending-thumb {
	flex: none;
	width: 56px;
	height: 56px;
	border-radius: var(--aee-radius-sm);
	overflow: hidden;
	background: var(--aee-accent-soft);
}
.trending-thumb img,
.trending-thumb-fallback { width: 100%; height: 100%; object-fit: cover; display: block; }
.trending-thumb-fallback { background: var(--aee-accent-gradient); opacity: 0.4; }
.trending-title {
	font-size: 0.9rem;
	line-height: 1.35;
	font-weight: 500;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.sidebar-topics { list-style: none; margin: 0; padding: 0; }
.sidebar-topics li { margin-bottom: var(--aee-s-2); }
.sidebar-topics li:last-child { margin-bottom: 0; }
.sidebar-topics a { color: var(--aee-muted); font-size: 0.92rem; }
.sidebar-topics a:hover { color: var(--aee-accent); }

/* ============================================================
   Category label
   ============================================================ */
.cat-label {
	display: inline-block;
	font-size: 0.72rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--aee-coral);
	background: color-mix(in srgb, var(--aee-coral) 13%, transparent);
	padding: var(--aee-s-1) var(--aee-s-2);
	border-radius: 999px;
}
.cat-label:hover { filter: brightness(0.92); }

/* Per-category colors (THN-style) */
.cat-label--ai-models-api { color: #195AFE; background: rgba(25, 90, 254, 0.12); }
.cat-label--tutorials { color: #0FA958; background: rgba(15, 169, 88, 0.14); }
.cat-label--benchmarks { color: #D97706; background: rgba(217, 119, 6, 0.14); }
.cat-label--agents-automation { color: #7C3AED; background: rgba(124, 58, 237, 0.12); }
.cat-label--developer-tools-security { color: #DC2743; background: rgba(220, 39, 67, 0.12); }

/* ============================================================
   Metadata
   ============================================================ */
.meta {
	display: flex;
	flex-wrap: wrap;
	gap: var(--aee-s-2) var(--aee-s-3);
	color: var(--aee-muted);
	font-size: 0.82rem;
	align-items: center;
}
.meta a { color: var(--aee-muted); }
.meta a:hover { color: var(--aee-accent); }
.meta__sep { color: var(--aee-border); }

/* ============================================================
   Featured story (homepage)
   ============================================================ */
.featured {
	display: grid;
	grid-template-columns: 1.15fr 1fr;
	gap: var(--aee-s-6);
	align-items: center;
	padding: var(--aee-s-6) 0;
	border-bottom: 1px solid var(--aee-border);
}
.featured__media { border-radius: var(--aee-radius); overflow: hidden; aspect-ratio: 16/9; background: var(--aee-accent-soft); }
.featured__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.featured__title { font-size: clamp(1.5rem, 3.4vw, 2.2rem); margin: var(--aee-s-3) 0; letter-spacing: -0.015em; }
.featured__title a { color: var(--aee-ink); }
.featured__title a:hover { color: var(--aee-accent); }
.featured__dek { color: var(--aee-muted); font-size: 1.05rem; margin: 0 0 var(--aee-s-4); }
@media (max-width: 960px) { .featured { grid-template-columns: 1fr; } }

/* ============================================================
   Section blocks
   ============================================================ */
.section { padding: var(--aee-s-6) 0; }
.section__head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: var(--aee-s-4);
	margin-bottom: var(--aee-s-4);
}
.section__title { font-size: 1.25rem; margin: 0; }
.section__link { font-size: 0.88rem; font-weight: 500; }

/* ============================================================
   Breadcrumbs
   ============================================================ */
.breadcrumbs {
	font-size: 0.82rem;
	color: var(--aee-muted);
	margin-bottom: var(--aee-s-4);
}
.breadcrumbs a { color: var(--aee-muted); }
.breadcrumbs a:hover { color: var(--aee-accent); }
.breadcrumbs .sep { margin: 0 var(--aee-s-2); color: var(--aee-border); }

/* ============================================================
   Single article
   ============================================================ */
.single-article { padding: var(--aee-s-6) 0; }
.single-article__header { max-width: 800px; margin-bottom: var(--aee-s-6); }
.single-article__title { margin: var(--aee-s-3) 0 var(--aee-s-3); }
.single-article__dek {
	font-size: 1.2rem;
	line-height: 1.55;
	color: var(--aee-muted);
	margin: 0 0 var(--aee-s-4);
}
.single-article__meta { border-top: 1px solid var(--aee-border); border-bottom: 1px solid var(--aee-border); padding: var(--aee-s-3) 0; }
.single-article__cover { margin: var(--aee-s-5) 0; border-radius: var(--aee-radius); overflow: hidden; }
.single-article__cover img { width: 100%; display: block; }

/* Share buttons */
.share {
	display: flex;
	align-items: center;
	gap: var(--aee-s-2);
	margin-top: var(--aee-s-4);
}
.share__label {
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--aee-muted);
	margin-right: var(--aee-s-2);
}
.share-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	border: 1px solid var(--aee-border);
	background: var(--aee-surface);
	color: var(--aee-muted);
	border-radius: 50%;
	cursor: pointer;
	transition: color 140ms ease, border-color 140ms ease, transform 140ms ease;
}
.share-btn:hover { color: var(--aee-accent); border-color: var(--aee-accent); transform: translateY(-2px); background: rgba(255, 255, 255, 0.04); }
.share-btn.copied { color: var(--aee-accent); border-color: var(--aee-accent); }

.entry-content { font-size: var(--aee-font-body); line-height: var(--aee-line); }
.entry-content > * { max-width: 100%; }
.entry-content > p:first-of-type {
	font-size: 1.22rem;
	line-height: 1.62;
	color: var(--aee-ink);
}

/* Table of contents */
.toc {
	background: var(--aee-accent-soft);
	border: 1px solid var(--aee-border);
	border-radius: var(--aee-radius);
	padding: var(--aee-s-4) var(--aee-s-5);
	margin: 0 0 var(--aee-s-6);
}
.toc__title { font-size: 0.95rem; margin: 0 0 var(--aee-s-2); }
.toc ol { margin: 0; padding-left: 1.2em; }
.toc li { margin-bottom: var(--aee-s-2); font-size: 0.92rem; }
.toc a { color: var(--aee-ink); }
.toc a:hover { color: var(--aee-accent); }

/* Code copy button */
.code-block { position: relative; margin: var(--aee-s-5) 0; }
.code-block pre { margin: 0; padding: var(--aee-s-5); }
.code-block__lang {
	position: absolute;
	top: var(--aee-s-3); left: var(--aee-s-4);
	font-size: 0.72rem;
	font-family: var(--aee-font-mono);
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--aee-muted);
}
.copy-btn {
	position: absolute;
	top: var(--aee-s-3); right: var(--aee-s-3);
	font-size: 0.78rem;
	border: 1px solid var(--aee-border);
	background: var(--aee-surface);
	color: var(--aee-muted);
	padding: var(--aee-s-1) var(--aee-s-3);
	border-radius: 6px;
	cursor: pointer;
}
.copy-btn:hover { color: var(--aee-accent); border-color: var(--aee-accent); background: rgba(255, 255, 255, 0.04); }
.copy-btn[data-state="copied"] { color: var(--aee-success); border-color: var(--aee-success); }

/* Callouts */
.callout {
	border: 1px solid var(--aee-border);
	border-left: 3px solid var(--aee-accent);
	background: var(--aee-surface);
	border-radius: 0 var(--aee-radius-sm) var(--aee-radius-sm) 0;
	padding: var(--aee-s-4) var(--aee-s-5);
	margin: var(--aee-s-5) 0;
}
.callout--note { border-left-color: var(--aee-accent); }
.callout--warning { border-left-color: var(--aee-warning); background: color-mix(in srgb, var(--aee-surface) 92%, var(--aee-warning)); }
.callout--danger { border-left-color: var(--aee-error); background: color-mix(in srgb, var(--aee-surface) 94%, var(--aee-error)); }
.callout--success { border-left-color: var(--aee-success); }
.callout__title { font-weight: 700; margin-bottom: var(--aee-s-2); }
.callout p:last-child { margin-bottom: 0; }

/* References / sources (rendered by AEE) */
.aee-references {
	margin-top: var(--aee-s-7);
	border-top: 1px solid var(--aee-border);
	padding-top: var(--aee-s-5);
}
.aee-references h2 { font-size: 1.2rem; }
.aee-references ol { padding-left: 1.2em; font-size: 0.9rem; }
.aee-references li { margin-bottom: var(--aee-s-2); }

/* Related + prev/next */
.related { margin-top: var(--aee-s-7); border-top: 1px solid var(--aee-border); padding-top: var(--aee-s-5); }
.post-nav {
	margin-top: var(--aee-s-7);
	border-top: 1px solid var(--aee-border);
	padding-top: var(--aee-s-5);
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: var(--aee-s-5);
}
.post-nav a { display: block; color: var(--aee-ink); }
.post-nav a:hover { color: var(--aee-accent); }
.post-nav .label { font-size: 0.78rem; color: var(--aee-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.post-nav .next { text-align: right; }

/* ============================================================
   Pagination
   ============================================================ */
.pagination { display: flex; gap: var(--aee-s-2); justify-content: center; margin-top: var(--aee-s-7); flex-wrap: wrap; }
.pagination .page-numbers {
	display: inline-flex; align-items: center; justify-content: center;
	min-width: 40px; height: 40px; padding: 0 var(--aee-s-3);
	border: 1px solid var(--aee-border);
	border-radius: var(--aee-radius-sm);
	color: var(--aee-ink);
	font-size: 0.9rem;
}
.pagination .page-numbers:hover { border-color: var(--aee-accent); color: var(--aee-accent); }
.pagination .page-numbers.current { background: var(--aee-accent); border-color: var(--aee-accent); color: #000; }

/* ============================================================
   Search form
   ============================================================ */
.searchform { display: flex; gap: var(--aee-s-2); max-width: 480px; }
.searchform input[type="search"] {
	flex: 1;
	border: 1px solid var(--aee-border);
	background: var(--aee-surface);
	color: var(--aee-ink);
	border-radius: var(--aee-radius-sm);
	padding: var(--aee-s-3) var(--aee-s-4);
	font-size: 1rem;
}
.searchform input[type="search"]:focus { border-color: var(--aee-accent); outline: none; }
.searchform button {
	border: 0;
	background: var(--aee-accent);
	color: #000;
	border-radius: var(--aee-radius-sm);
	padding: var(--aee-s-3) var(--aee-s-4);
	font-weight: 600;
	cursor: pointer;
}
.searchform button:hover { background: var(--aee-accent-hover); }

/* ============================================================
   Empty states + 404
   ============================================================ */
.empty-state {
	text-align: center;
	padding: var(--aee-s-8) 0;
	color: var(--aee-muted);
}
.empty-state h2 { color: var(--aee-ink); }

/* ============================================================
   Buttons
   ============================================================ */
.wp-block-button__link,
.button {
	display: inline-block;
	background: var(--aee-accent-gradient);
	color: #000;
	padding: var(--aee-s-3) var(--aee-s-5);
	border-radius: 999px;
	font-weight: 600;
	font-size: 0.95rem;
	border: 0;
	cursor: pointer;
	transition: filter 140ms ease, transform 140ms ease;
}
.wp-block-button__link:hover, .button:hover { filter: brightness(1.07); color: #fff; transform: translateY(-1px); }

/* ============================================================
   Gutenberg alignment
   ============================================================ */
.alignwide {
	max-width: var(--aee-wide);
	margin-left: auto;
	margin-right: auto;
}
.alignfull {
	max-width: 100%;
	margin-left: auto;
	margin-right: auto;
}
.wp-block-image.alignwide img, .wp-block-image.alignfull img { width: 100%; }

/* ============================================================
   Motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

/* ============================================================
   Icons and fallbacks
   ============================================================ */
.theme-toggle__icon { width: 18px; height: 18px; display: block; }
.theme-toggle__icon--moon { display: none; }
[data-theme="dark"] .theme-toggle__icon--sun { display: none; }
[data-theme="dark"] .theme-toggle__icon--moon { display: block; }

.menu-toggle__icon { width: 18px; height: 2px; background: currentColor; display: block; position: relative; }
.menu-toggle__icon::before, .menu-toggle__icon::after { content: ""; position: absolute; left: 0; width: 18px; height: 2px; background: currentColor; }
.menu-toggle__icon::before { top: -6px; }
.menu-toggle__icon::after { top: 6px; }

.card__media-fallback,
.featured__media-fallback {
	display: block; width: 100%; height: 100%;
	background: linear-gradient(135deg, var(--aee-accent-soft), var(--aee-border));
}
.author-avatar { border-radius: 50%; vertical-align: middle; margin-bottom: var(--aee-s-3); }
.search-query { color: var(--aee-accent); }
.site-brand a { display: inline-flex; align-items: center; gap: 2px; }
.site-footer__brand a { color: var(--aee-ink); font-weight: 800; }
.site-footer__brand a:hover { color: var(--aee-accent); }

/* ============================================================
   Announcement bar + subscribe CTA
   ============================================================ */
.announcement-bar {
	background: var(--aee-accent-gradient);
	color: #fff;
	font-size: 0.82rem;
}
.announcement-bar__inner {
	display: flex;
	justify-content: center;
	align-items: center;
	padding: 7px var(--aee-s-5);
	min-height: 34px;
	text-align: center;
}
.announcement-bar__text a { color: inherit; text-decoration: underline; }

.btn-subscribe {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 40px;
	padding: 0 18px;
	background: var(--aee-accent-gradient);
	color: #fff;
	border-radius: 999px;
	font-weight: 600;
	font-size: 0.88rem;
	white-space: nowrap;
	transition: filter 140ms ease, transform 140ms ease;
}
.btn-subscribe:hover { color: #fff; filter: brightness(1.07); transform: translateY(-1px); }

/* ============================================================
   Social links (footer)
   ============================================================ */
.social-links { display: flex; gap: var(--aee-s-2); margin-top: var(--aee-s-4); }
.social-link {
	display: inline-flex; align-items: center; justify-content: center;
	width: 38px; height: 38px;
	border: 1px solid var(--aee-border);
	border-radius: 50%;
	color: var(--aee-muted);
	transition: color 140ms ease, border-color 140ms ease, transform 140ms ease;
}
.social-link:hover { color: var(--aee-accent); border-color: var(--aee-accent); transform: translateY(-2px); }
.social-link__icon { width: 17px; height: 17px; }

/* ============================================================
   Reading progress + back to top
   ============================================================ */
.reading-progress {
	position: fixed;
	top: 0; left: 0; right: 0;
	height: 3px;
	z-index: 100;
	pointer-events: none;
}
.reading-progress__bar {
	display: block;
	height: 100%;
	width: 0;
	background: var(--aee-accent-gradient);
}

.back-to-top {
	position: fixed;
	right: var(--aee-s-5);
	bottom: var(--aee-s-5);
	width: 44px; height: 44px;
	display: inline-flex; align-items: center; justify-content: center;
	border: 1px solid var(--aee-border);
	background: var(--aee-surface);
	color: var(--aee-ink);
	border-radius: 50%;
	cursor: pointer;
	box-shadow: var(--aee-shadow);
	opacity: 0;
	transform: translateY(8px);
	pointer-events: none;
	transition: opacity 180ms ease, transform 180ms ease, border-color 180ms ease, color 180ms ease;
	z-index: 90;
}
.back-to-top.is-visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
.back-to-top:hover { border-color: var(--aee-accent); color: var(--aee-accent); }
.back-to-top__icon { width: 10px; height: 10px; border-top: 2px solid currentColor; border-left: 2px solid currentColor; transform: rotate(45deg); margin-top: 4px; }

/* ============================================================
   Reveal-on-scroll (JS adds .js to <html>; no-JS users see content immediately)
   ============================================================ */
.js .reveal {
	opacity: 0;
	transform: translateY(18px);
	transition: opacity 600ms cubic-bezier(0.22, 0.61, 0.36, 1), transform 600ms cubic-bezier(0.22, 0.61, 0.36, 1);
}
.js .reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
	.js .reveal { opacity: 1; transform: none; transition: none; }
}

/* ============================================================
   Mobile polish (consistent at ≤640px)
   ============================================================ */
@media (max-width: 640px) {
	.container { padding: 0 var(--aee-s-4); }
	.section { padding: var(--aee-s-5) 0; }
	.page-hero { padding: var(--aee-s-5) 0 var(--aee-s-4); }
	.single-article { padding: var(--aee-s-5) 0; }
	.single-article__title { font-size: 1.85rem; }
	.single-article__dek { font-size: 1.05rem; }
	.featured__title { font-size: 1.45rem; }
	.story-card__title { font-size: 1.15rem; }
	.entry-content > p:first-of-type { font-size: 1.1rem; }
	.site-footer__bottom { flex-direction: column; gap: var(--aee-s-2); }
}
