/* ==========================================================================
   Verge-Style Tech Journal — theme stylesheet
   ========================================================================== */

:root {
	--vg-black: #000000;
	--vg-white: #ffffff;
	--vg-neon: #ff2079;
	--vg-gray: #6b6b6b;
	--vg-gray-light: #a3a3a3;
	--vg-border: #e2e2e2;
	--vg-bg-soft: #f4f4f4;

	--vg-font-display: 'Archivo Black', 'Arial Black', sans-serif;
	--vg-font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;

	--vg-container: 1340px;
}

* { box-sizing: border-box; }

html { overflow-x: hidden; max-width: 100%; }

body {
	margin: 0;
	overflow-x: hidden;
	max-width: 100%;
	font-family: var(--vg-font-sans);
	color: var(--vg-black);
	background: var(--vg-white);
	line-height: 1.55;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
button { font: inherit; cursor: pointer; }

.vg-media-fallback {
	display: block;
	width: 100%;
	height: 100%;
	min-height: 140px;
	background: var(--vg-bg-soft);
}

/* Duotone-ish photo treatment: desaturate + boost contrast, echoing Verge's
   stylized image handling. */
.vg-hero-media img,
.vg-card-media img {
	filter: grayscale(0.75) contrast(1.15);
	transition: filter 0.25s ease;
}
.vg-hero-media:hover img,
.vg-card:hover .vg-card-media img { filter: grayscale(0) contrast(1.05); }

/* ---------- Masthead ---------- */

.vg-masthead { position: relative; padding: 1.25rem 1.25rem; }
.vg-masthead-inner { max-width: var(--vg-container); margin: 0 auto; display: flex; align-items: center; gap: 1rem; }
.vg-logo,
.vg-logo-wrap a {
	font-family: var(--vg-font-display);
	font-size: clamp(1.8rem, 5vw, 2.6rem);
	color: var(--vg-black);
	text-transform: uppercase;
	letter-spacing: -0.01em;
}
.vg-logo, .vg-logo-wrap { flex: 1; text-align: center; }

/* ---------- Primary nav strip ---------- */

.vg-nav {
	border-top: 4px solid var(--vg-black);
	border-bottom: 1px solid var(--vg-border);
	position: sticky;
	top: 0;
	background: #fff;
	z-index: 40;
}
.vg-nav-inner {
	max-width: var(--vg-container);
	margin: 0 auto;
	padding: 0 1.25rem;
	display: flex;
	align-items: center;
}
.vg-nav-menu-wrap {
	flex: 1;
	min-width: 0;
	overflow-x: auto;
	overflow-y: hidden;
	-ms-overflow-style: none;
	scrollbar-width: none;
}
.vg-nav-menu-wrap::-webkit-scrollbar { display: none; }
.vg-menu { display: flex; flex-wrap: nowrap; min-width: 0; width: max-content; }
.vg-menu > li { flex: 0 0 auto; }
.vg-menu li a {
	display: block;
	white-space: nowrap;
	padding: 0.9rem 0.85rem;
	color: var(--vg-black);
	font-weight: 700;
	font-size: 0.85rem;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	border-bottom: 3px solid transparent;
}
.vg-menu li a:hover,
.vg-menu li.current-menu-item a { border-color: var(--vg-neon); }

.vg-nav-toggle { display: flex; order: -1; flex-shrink: 0; flex-direction: column; gap: 4px; background: none; border: 0; padding: 0.75rem 0.25rem; }
.vg-nav-toggle span { display: block; width: 20px; height: 2px; background: var(--vg-black); }

.vg-mobile-menu-wrap {
	display: none;
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	background: #fff;
	border-bottom: 1px solid var(--vg-border);
	box-shadow: 0 12px 20px rgba(0,0,0,0.15);
	max-height: 70vh;
	overflow-y: auto;
	z-index: 50;
	padding: 0.5rem 1.25rem 0.75rem;
}
.vg-mobile-menu-wrap.is-open { display: block; }
.vg-mobile-menu { display: flex; flex-direction: column; }
.vg-mobile-menu li a {
	display: block;
	padding: 0.7rem 0;
	color: var(--vg-black);
	font-weight: 700;
	font-size: 0.9rem;
	text-transform: uppercase;
	border-bottom: 1px solid var(--vg-border);
}
.vg-mobile-menu li:last-child a { border-bottom: 0; }
.vg-mobile-menu li a:hover { color: var(--vg-neon); }

.vg-search {
	display: flex;
	align-items: center;
	background: var(--vg-bg-soft);
	padding: 0.3rem 0.4rem 0.3rem 0.75rem;
	flex-shrink: 0;
}
.vg-search input { background: none; border: 0; outline: none; width: 120px; font-size: 0.82rem; font-family: var(--vg-font-sans); }
.vg-search button { background: none; border: 0; color: var(--vg-black); display: flex; padding: 0.3rem; }

/* ---------- Shared layout ---------- */

.vg-main { max-width: var(--vg-container); margin: 0 auto; padding: 2rem 1.25rem 3.5rem; }

.vg-pill {
	display: inline-block;
	background: var(--vg-neon);
	color: #fff;
	font-weight: 700;
	font-size: 0.72rem;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	padding: 0.22rem 0.7rem;
	margin-bottom: 0.6rem;
}
.vg-pill:hover { background: var(--vg-black); }

.vg-dek { font-size: 1.05rem; color: var(--vg-gray); line-height: 1.55; margin: 0 0 0.6rem; max-width: 640px; }
.vg-dek-single { font-size: 1.2rem; margin: 0.6rem 0 1rem; }

.vg-meta { font-size: 0.8rem; color: var(--vg-gray); }
.vg-dot { margin: 0 0.35rem; color: var(--vg-gray-light); }

.vg-section-heading { border-top: 3px solid var(--vg-black); margin-bottom: 1.25rem; padding-top: 0.5rem; }
.vg-section-heading h2 { font-family: var(--vg-font-display); font-size: 1.3rem; text-transform: uppercase; margin: 0; }

/* ---------- Hero (poster style) ---------- */

.vg-hero-section { margin-bottom: 3rem; }
.vg-hero-title {
	font-family: var(--vg-font-display);
	font-size: clamp(2.2rem, 7vw, 5rem);
	line-height: 0.98;
	text-transform: uppercase;
	margin: 0 0 1.25rem;
	max-width: 900px;
}
.vg-hero-title a:hover { color: var(--vg-neon); }
.vg-hero-media { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--vg-bg-soft); }
.vg-hero-media img { width: 100%; height: 100%; object-fit: cover; }
.vg-hero-body { margin-top: 1rem; max-width: 640px; }

/* ---------- Card grid ---------- */

.vg-grid-section { margin-bottom: 2rem; }
.vg-card-grid { display: flex; flex-wrap: wrap; gap: 2rem; }
.vg-card-grid > .vg-card { flex: 1 1 220px; }
.vg-card-media { display: block; aspect-ratio: 3 / 2; overflow: hidden; margin-bottom: 0.75rem; background: var(--vg-bg-soft); }
.vg-card-media img { width: 100%; height: 100%; object-fit: cover; }
.vg-card-title { font-family: var(--vg-font-display); font-size: 1.3rem; line-height: 1.15; text-transform: uppercase; margin: 0 0 0.5rem; }
.vg-card-title a:hover { color: var(--vg-neon); }

/* Grid style variant — smaller cards, more columns, for the "Also Worth
   Reading" block so the main column reads as a distinct section. */
.vg-grid-dense { gap: 1.1rem; }
.vg-grid-dense > .vg-card { flex: 1 1 175px; }
.vg-grid-dense .vg-card-title { font-size: 1.05rem; }

.vg-home-feed { width: 100%; }
.vg-grid-standard, .vg-grid-wide2, .vg-grid-compact, .vg-grid-mosaic { display: flex; flex-wrap: wrap; }
.vg-grid-standard { gap: 2rem; }
.vg-grid-wide2    { gap: 2rem; }
.vg-grid-compact  { gap: 0.85rem; }
.vg-grid-mosaic   { gap: 1.25rem; }
.vg-grid-standard > * { flex: 1 1 220px; }
.vg-grid-wide2 > *    { flex: 1 1 300px; }
.vg-grid-compact > *  { flex: 1 1 145px; }
.vg-grid-mosaic > *   { flex: 1 1 195px; }
.vg-grid-mosaic > *:first-child { flex-basis: 400px; }
.vg-hlist { display: flex; flex-direction: column; gap: 0.9rem; }
.vg-hlist > .vg-card { display: flex; flex-direction: row; align-items: center; gap: 1.1rem; border-bottom: 1px solid var(--vg-border, rgba(0,0,0,0.1)); border-radius: 0; padding: 0 0 0.9rem; }
.vg-hlist > .vg-card .vg-card-media { width: 150px; flex-shrink: 0; aspect-ratio: 4 / 3; margin-bottom: 0; }
.vg-hlist > .vg-card .vg-card-body { flex: 1; min-width: 0; }

/* ---------- Body layout: main column + sidebar ---------- */

.vg-columns { display: grid; grid-template-columns: 1fr; gap: 2.5rem; align-items: start; }
.vg-body-main { min-width: 0; }

.vg-sidebar { display: flex; flex-direction: column; gap: 2rem; border-top: 4px solid var(--vg-black); padding-top: 1rem; align-self: start; }
.vg-widget-title { font-family: var(--vg-font-display); text-transform: uppercase; font-size: 1rem; margin: 0 0 0.6rem; }
.vg-widget-list { display: flex; flex-direction: column; gap: 0.6rem; }
.vg-widget-list li { border-bottom: 1px solid var(--vg-border); padding-bottom: 0.6rem; }
.vg-widget-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.vg-widget-item { display: flex; align-items: center; gap: 0.75rem; }
.vg-widget-thumb { flex: 0 0 56px; width: 56px; height: 56px; border-radius: 4px; overflow: hidden; background: var(--vg-bg-soft); }
.vg-widget-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vg-widget-thumb-fallback { display: block; width: 100%; height: 100%; background: var(--vg-bg-soft); }
.vg-widget-text { flex: 1; min-width: 0; }
.vg-widget-item:hover .vg-widget-text { color: var(--vg-neon); }
.vg-widget-list a { font-size: 0.92rem; line-height: 1.35; }
.vg-widget-list a:hover { color: var(--vg-neon); }
.vg-widget-pills { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.vg-widget-pill { font-size: 0.74rem; background: var(--vg-bg-soft); padding: 0.25rem 0.65rem; }
.vg-widget-pill:hover { background: var(--vg-neon); color: #fff; }
.vg-widget-pill-tag { color: var(--vg-neon); }

/* ---------- Archive / search headers ---------- */

.vg-archive-header { border-top: 4px solid var(--vg-black); margin-bottom: 1.75rem; padding-top: 0.6rem; }
.vg-archive-title { font-family: var(--vg-font-display); font-size: clamp(1.8rem, 4vw, 2.6rem); text-transform: uppercase; margin: 0; }
.vg-archive-title span { color: var(--vg-neon); }
.vg-archive-desc { color: var(--vg-gray); margin-top: 0.4rem; }
.vg-no-results { color: var(--vg-gray); }
.vg-archive { margin-bottom: 2rem; }

/* ---------- Pagination ---------- */

.pagination,
.navigation.pagination { display: flex; gap: 0.5rem; margin-top: 2rem; flex-wrap: wrap; }
.pagination .page-numbers {
	display: inline-block;
	padding: 0.5rem 0.9rem;
	border: 2px solid var(--vg-black);
	font-weight: 700;
	font-size: 0.9rem;
	color: var(--vg-black);
}
.pagination .page-numbers.current { background: var(--vg-neon); color: #fff; border-color: var(--vg-neon); }
.pagination .page-numbers:hover:not(.current) { border-color: var(--vg-neon); color: var(--vg-neon); }

/* ---------- Single article ---------- */

.vg-single { max-width: 760px; margin: 0 auto; }
.vg-single-header { margin-bottom: 1.5rem; }
.vg-single-title { font-family: var(--vg-font-display); font-size: clamp(2.2rem, 5.6vw, 3.6rem); line-height: 1.02; text-transform: uppercase; margin: 0.2rem 0 0; }
.vg-byline-row { margin-top: 1rem; padding: 0.6rem 0; border-top: 2px solid var(--vg-black); border-bottom: 1px solid var(--vg-border); font-size: 0.85rem; color: var(--vg-gray); }
.vg-byline strong { color: var(--vg-black); }

.vg-single-media { margin: 1.75rem 0; }
.vg-single-media img { width: 100%; filter: grayscale(0.6) contrast(1.1); }

.vg-single-content { font-size: 1.1rem; line-height: 1.75; }
.vg-single-content p { margin: 0 0 1.35rem; }
.vg-single-content blockquote {
	font-family: var(--vg-font-display);
	color: var(--vg-neon);
	font-size: clamp(1.5rem, 3.4vw, 2.2rem);
	line-height: 1.15;
	text-transform: uppercase;
	margin: 2rem 0;
	padding: 0;
}
.vg-single-content h2,
.vg-single-content h3 { font-family: var(--vg-font-display); text-transform: uppercase; }

.vg-single-footer { margin-top: 1.75rem; }
.vg-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.vg-tag { background: var(--vg-black); color: #fff; font-size: 0.78rem; font-weight: 700; text-transform: uppercase; padding: 0.25rem 0.7rem; }
.vg-tag:hover { background: var(--vg-neon); }

.vg-related { max-width: var(--vg-container); margin: 3.5rem auto 0; }

/* ---------- Page ---------- */

.vg-page { max-width: 760px; margin: 0 auto; }
.vg-page-title { font-family: var(--vg-font-display); font-size: clamp(2rem, 4.4vw, 2.8rem); text-transform: uppercase; border-top: 4px solid var(--vg-black); padding-top: 0.75rem; margin-bottom: 1.5rem; }

/* ---------- 404 ---------- */

.vg-404 { text-align: center; padding: 4rem 1rem; max-width: 560px; margin: 0 auto; }
.vg-404-code { display: block; font-family: var(--vg-font-display); font-size: 6rem; color: var(--vg-neon); line-height: 1; }
.vg-404 h1 { font-family: var(--vg-font-display); text-transform: uppercase; }
.vg-404-search { justify-content: center; margin: 1.5rem auto; }
.vg-404-search button { color: var(--vg-neon); font-weight: 700; padding: 0 0.75rem; }
.vg-404-home { display: inline-block; margin-top: 1rem; color: var(--vg-neon); font-weight: 700; text-decoration: underline; }

/* ---------- Comments ---------- */

.comment-respond,
.comments-area { max-width: 760px; margin: 2.5rem auto 0; }
.comment-reply-title,
.comments-title { font-family: var(--vg-font-display); text-transform: uppercase; }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
	width: 100%;
	padding: 0.6rem 0.75rem;
	border: 2px solid var(--vg-black);
	font-family: var(--vg-font-sans);
	margin-bottom: 0.75rem;
}
.comment-form input[type="submit"] {
	background: var(--vg-black);
	color: #fff;
	border: 0;
	padding: 0.65rem 1.5rem;
	font-weight: 700;
	text-transform: uppercase;
}
.comment-form input[type="submit"]:hover { background: var(--vg-neon); }

/* ---------- Footer (dense, mega-footer) ---------- */

.vg-footer { background: var(--vg-black); color: #d0d0d0; margin-top: 3rem; }

.vg-footer-nav { border-bottom: 1px solid #2c2c2c; }
.vg-footer-nav-list {
	max-width: var(--vg-container);
	margin: 0 auto;
	padding: 1rem 1.25rem;
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem 0.25rem;
}
.vg-footer-nav-list a {
	display: inline-block;
	padding: 0.3rem 0.8rem;
	font-family: var(--vg-font-display);
	font-size: 0.75rem;
	text-transform: uppercase;
	color: #d0d0d0;
	border-right: 1px solid #2c2c2c;
}
.vg-footer-nav-list li:last-child a { border-right: 0; }
.vg-footer-nav-list a:hover { color: var(--vg-neon); }

.vg-footer-rows {
	max-width: var(--vg-container);
	margin: 0 auto;
	padding: 1.5rem 1.25rem;
	display: flex;
	flex-direction: column;
}
.vg-footer-row {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.3rem 0;
	padding: 0.85rem 0;
	border-bottom: 1px solid #2c2c2c;
}
.vg-footer-row:last-child { border-bottom: 0; }
.vg-footer-row-label {
	font-family: var(--vg-font-display);
	text-transform: uppercase;
	font-size: 0.74rem;
	color: var(--vg-neon);
	flex-shrink: 0;
	margin-right: 0.9rem;
}
.vg-footer-row-links { display: flex; flex-wrap: wrap; }
.vg-footer-row-links a { color: #d0d0d0; font-size: 0.88rem; }
.vg-footer-row-links a:hover { color: var(--vg-neon); }
.vg-footer-row-links a:not(:last-child)::after { content: "|"; color: #2c2c2c; margin: 0 0.6rem; }

.vg-footer-about {
	max-width: var(--vg-container);
	margin: 0 auto;
	padding: 1.5rem 1.25rem;
	border-top: 1px solid #2c2c2c;
	text-align: center;
}
.vg-footer-logo,
.vg-footer-about-logo { font-family: var(--vg-font-display); font-size: 1.4rem; text-transform: uppercase; color: #fff; margin: 0 0 0.4rem; }
.vg-footer-about-desc { color: #8a8a8a; max-width: 640px; margin: 0 auto; font-size: 0.9rem; }

.vg-footer-compliance {
	max-width: var(--vg-container);
	margin: 0 auto;
	padding: 0 1.25rem 1.5rem;
	text-align: center;
}
.vg-footer-menu { display: flex; flex-wrap: wrap; justify-content: center; }
.vg-footer-menu li:not(:last-child)::after { content: "|"; color: #2c2c2c; margin: 0 0.7rem; }
.vg-footer-menu a { color: #d0d0d0; font-size: 0.84rem; }
.vg-footer-menu a:hover { color: var(--vg-neon); }

.vg-footer-bottom { border-top: 1px solid #2c2c2c; text-align: center; padding: 1rem; font-size: 0.78rem; color: #8a8a8a; }

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1300px) {
	.vg-footer-row { flex-direction: column; align-items: flex-start; gap: 0.4rem; }
}

@media (max-width: 480px) {
	.vg-search input { width: 90px; }
}

@media (min-width: 900px) {
	.vg-columns { grid-template-columns: 2.2fr 1fr; }
	.vg-sidebar { position: sticky; top: 90px; }
}
