/*
Theme Name:   James Burnett
Theme URI:    https://rangetoc.com
Author:       James Burnett
Author URI:   https://rangetoc.com
Description:  Custom personal/portfolio theme for James Burnett — software engineer, veteran, and content creator. Light, terminal-inspired design ported from a Blogger template, rebuilt as a fully WordPress-compliant and optimized theme.
Version:      1.0.0
Requires at least: 6.4
Requires PHP: 8.0
Tested up to: 7.0
License:      GNU General Public License v2 or later
License URI:  https://www.gnu.org/licenses/gpl-2.0.html
Text Domain:  james
Tags:         light, one-column, custom-colors, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready, block-patterns

This theme, like WordPress, is licensed under the GPL.
Use it to make something cool, have fun, and share what you've learned.
*/

/* ==========================================================================
   0. RESET
   ========================================================================== */

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

/* ==========================================================================
   1. CUSTOM PROPERTIES (ported from the Blogger theme's :root skin vars)
   ========================================================================== */

:root {
	--bg: #ffffff;
	--bg2: #f1f1f1;
	--bg3: #e4e4e4;
	--border: #d5d5d5;
	--text: #000000;
	--muted: #555555;
	--accent: #000000;
	--link: #000000;
	--radius: 8px;
	--font: 'Inter', system-ui, -apple-system, sans-serif;
	--mono: 'JetBrains Mono', 'Courier New', monospace;
	--max: 860px;
}

html {
	scroll-behavior: smooth;
}

body {
	font-family: var(--font);
	background: var(--bg);
	color: var(--text);
	font-size: 15px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}

a {
	color: var(--link);
	text-decoration: none;
}
a:hover {
	text-decoration: underline;
}

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

/* WordPress core alignment classes */
.alignleft { float: left; margin: 0 20px 20px 0; }
.alignright { float: right; margin: 0 0 20px 20px; }
.aligncenter { display: block; margin: 0 auto 20px; }
.alignwide { width: 100%; }
.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute !important;
	width: 1px;
	word-wrap: normal !important;
}
.screen-reader-text:focus {
	background-color: var(--bg2);
	border-radius: var(--radius);
	box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
	clip: auto !important;
	clip-path: none;
	color: var(--text);
	display: block;
	font-size: 14px;
	height: auto;
	left: 5px;
	line-height: normal;
	padding: 12px 16px;
	text-decoration: none;
	top: 5px;
	width: auto;
	z-index: 100000;
}
.skip-link {
	position: absolute;
	top: -100px;
}
.skip-link:focus {
	top: 0;
	z-index: 100000;
}

.page-wrap {
	max-width: var(--max);
	margin: 0 auto;
	padding: 0 20px;
}

/* ==========================================================================
   2. NAV
   ========================================================================== */

.site-nav {
	border-bottom: 1px solid var(--border);
	background: rgba(255, 255, 255, 0.95);
	position: sticky;
	top: 0;
	z-index: 100;
	backdrop-filter: blur(8px);
}
.nav-inner {
	max-width: var(--max);
	margin: 0 auto;
	padding: 0 20px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 56px;
}
.nav-logo { font-family: var(--mono); font-size: 14px; color: var(--accent); font-weight: 500; display: flex; align-items: center; gap: 8px; }
.nav-logo span { color: var(--muted); }
.nav-logo img { max-height: 28px; }
.nav-logo-icon { width: 20px; height: 20px; max-height: 20px; border-radius: 4px; }
.nav-links { display: flex; gap: 24px; list-style: none; align-items: center; }
.nav-links a { font-size: 13px; font-weight: 500; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.nav-links a:hover,
.nav-links .current-menu-item > a { color: var(--text); text-decoration: none; }
.nav-toggle {
	display: none;
	background: transparent;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	color: var(--text);
	width: 36px;
	height: 36px;
	align-items: center;
	justify-content: center;
	cursor: pointer;
}

/* ==========================================================================
   3. HERO
   ========================================================================== */

.hero { padding: 32px 0; border-bottom: 1px solid var(--border); }
.hero-video-wrap {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	background: #000;
	overflow: hidden;
	margin-bottom: 24px;
}
.hero-video-wrap iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}
.hero-fallback { font-size: 16px; color: var(--muted); max-width: 520px; padding: 48px 0 0; }
.hero-slogan { font-size: 40px; font-weight: 600; color: var(--muted); text-align: center; max-width: 820px; margin: 0 auto 28px; line-height: 1.25; letter-spacing: -0.01em; }
.hero-slogan strong { color: var(--text); font-weight: 800; }
@media (max-width: 640px) { .hero-slogan { font-size: 26px; } }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }

.btn {
	display: inline-flex; align-items: center; gap: 6px;
	padding: 8px 18px; border-radius: var(--radius);
	font-size: 13px; font-weight: 600; transition: opacity 0.15s;
	border: 0; cursor: pointer; font-family: inherit;
}
.btn:hover { opacity: 0.8; text-decoration: none; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-ghost { background: transparent; border: 1px solid var(--border); color: var(--text); }

/* ==========================================================================
   5. SECTION LABEL
   ========================================================================== */

.section-label {
	font-family: var(--mono); font-size: 11px; color: var(--muted);
	text-transform: uppercase; letter-spacing: 0.12em;
	margin-bottom: 20px; display: flex; align-items: center; gap: 10px;
}
.section-label::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* ==========================================================================
   6. EXPERTISE
   ========================================================================== */

.expertise-section { padding: 56px 0; border-bottom: 1px solid var(--border); }
.cards-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.card { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; transition: border-color 0.2s; }
.card:hover { border-color: var(--accent); }
.card-icon { font-size: 22px; margin-bottom: 12px; }
.card h3 { font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.card p { font-size: 13px; color: var(--muted); line-height: 1.55; }

.tag { display: inline-block; padding: 2px 9px; border-radius: 20px; font-size: 11px; font-weight: 500; border: 1px solid var(--border); color: var(--muted); margin-right: 6px; }

/* ==========================================================================
   8. SOCIAL / CONNECT
   ========================================================================== */

.connect-section { padding: 56px 0; border-bottom: 1px solid var(--border); }
.social-links { display: flex; gap: 12px; flex-wrap: wrap; list-style: none; }
.social-link {
	display: inline-flex; align-items: center; gap: 7px;
	padding: 7px 14px; border-radius: var(--radius);
	border: 1px solid var(--border); font-size: 13px; font-weight: 500; color: var(--text);
	transition: border-color 0.15s;
}
.social-link:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }

/* ==========================================================================
   9. BLOG INDEX
   ========================================================================== */

.blog-section { padding: 56px 0; }

/* Post list — used on archive/search/home listings (see content-excerpt.php) */
.post-list { display: flex; flex-direction: column; list-style: none; }
.post-item { padding: 22px 0; border-bottom: 1px solid var(--border); display: flex; gap: 16px; align-items: flex-start; }
.post-item:last-child { border-bottom: none; }
.post-thumb { flex-shrink: 0; width: 72px; height: 56px; border-radius: 6px; object-fit: cover; background: var(--bg3); }
.post-meta-wrap { flex: 1; min-width: 0; }
.post-item h2 { font-size: 15px; font-weight: 600; margin-bottom: 5px; }
.post-item h2 a { color: var(--text); }
.post-item h2 a:hover { color: var(--accent); text-decoration: none; }
.post-item .read-more { white-space: nowrap; align-self: center; flex-shrink: 0; }
.post-item .read-more:hover { text-decoration: underline; }

/* Front-page tutorial feed — featured post + card grid */
.featured-post {
	display: grid;
	grid-template-columns: 1.1fr 1fr;
	gap: 32px;
	align-items: center;
	background: var(--bg2);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	overflow: hidden;
	margin-bottom: 32px;
	transition: border-color 0.2s;
}
.featured-post:hover { border-color: var(--accent); text-decoration: none; }
.featured-post-media { aspect-ratio: 16 / 10; overflow: hidden; }
.featured-post-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.featured-post-body { padding: 28px 32px 28px 0; }
.featured-post:not(:has(.featured-post-media)) .featured-post-body { padding-left: 32px; grid-column: 1 / -1; }
.featured-post-body h2 { font-size: clamp(20px, 2.6vw, 28px); font-weight: 700; letter-spacing: -0.01em; line-height: 1.25; color: var(--text); margin: 8px 0 12px; }
.featured-post-body .post-snippet { font-size: 14px; margin-bottom: 16px; max-width: 46ch; }

.post-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.post-card {
	display: flex;
	flex-direction: column;
	background: var(--bg2);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	overflow: hidden;
	transition: border-color 0.2s;
}
.post-card:hover { border-color: var(--accent); text-decoration: none; }
.post-card-media { aspect-ratio: 16 / 10; overflow: hidden; background: var(--bg3); }
.post-card-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.post-card-body { padding: 16px 18px 20px; flex: 1; }
.post-card-body h3 { font-size: 15px; font-weight: 600; line-height: 1.35; color: var(--text); margin: 6px 0 8px; }
.post-card .post-snippet { font-size: 13px; margin-bottom: 0; }

.post-snippet { font-size: 13px; color: var(--muted); line-height: 1.5; }
.post-date { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.read-more { font-size: 12px; font-weight: 600; color: var(--accent); }
.no-posts { color: var(--muted); font-size: 14px; }

/* ==========================================================================
   10. PAGINATION
   ========================================================================== */

.blog-pager,
.pagination {
	margin-top: 32px; display: flex; gap: 10px; flex-wrap: wrap; list-style: none;
}
.blog-pager a,
.pagination .page-numbers {
	padding: 7px 14px; border: 1px solid var(--border); border-radius: var(--radius);
	font-size: 13px; color: var(--text); display: inline-flex;
}
.blog-pager a:hover,
.pagination a.page-numbers:hover { border-color: var(--accent); text-decoration: none; }
.pagination .page-numbers.current { border-color: var(--accent); color: var(--accent); }
.pagination .page-numbers.dots { border: none; color: var(--muted); }

/* ==========================================================================
   11. SINGLE POST / PAGE
   ========================================================================== */

.single-post-wrap { padding: 48px 0 80px; }
.back-link { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); margin-bottom: 32px; }
.back-link:hover { color: var(--text); text-decoration: none; }
.single-post-wrap h1 { font-size: clamp(22px, 4vw, 34px); font-weight: 700; letter-spacing: -0.02em; margin-bottom: 12px; line-height: 1.2; }
.post-meta-bar { font-size: 12px; color: var(--muted); font-family: var(--mono); margin-bottom: 36px; padding-bottom: 24px; border-bottom: 1px solid var(--border); display: flex; gap: 14px; flex-wrap: wrap; }
.post-meta-bar a { color: var(--muted); }
.post-meta-bar a:hover { color: var(--text); }
.post-featured-image { border-radius: var(--radius); margin-bottom: 36px; overflow: hidden; border: 1px solid var(--border); }

.post-body-content { font-size: 15px; line-height: 1.75; color: var(--text); }
.post-body-content h2,
.post-body-content h3,
.post-body-content h4 { color: var(--text); margin: 32px 0 12px; font-weight: 600; }
.post-body-content p { margin-bottom: 18px; }
.post-body-content ul,
.post-body-content ol { margin: 0 0 18px 22px; }
.post-body-content a { color: var(--link); }
.post-body-content pre,
.post-body-content code { font-family: var(--mono); background: var(--bg2); border: 1px solid var(--border); border-radius: 6px; }
.post-body-content code { padding: 2px 6px; font-size: 13px; }
.post-body-content pre { padding: 16px; overflow-x: auto; margin: 20px 0; }
.post-body-content pre code { padding: 0; border: none; background: none; }
.post-body-content img { border-radius: var(--radius); margin: 20px 0; }
.post-body-content figure { margin: 20px 0; }
.post-body-content figcaption { font-size: 12px; color: var(--muted); margin-top: 8px; }
.post-body-content blockquote {
	border-left: 3px solid var(--accent); padding: 12px 20px; margin: 24px 0;
	background: var(--bg2); border-radius: 0 var(--radius) var(--radius) 0;
	font-style: italic; color: var(--muted);
}
.post-body-content table { width: 100%; border-collapse: collapse; margin: 20px 0; }
.post-body-content th,
.post-body-content td { border: 1px solid var(--border); padding: 8px 12px; text-align: left; }

.post-tags { margin-top: 32px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.wp-block-page-list,
.post-navigation-links { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.post-navigation-links .nav-subtitle { display: block; font-family: var(--mono); font-size: 11px; color: var(--muted); margin-bottom: 4px; }
.post-navigation-links .nav-title { font-size: 14px; font-weight: 600; color: var(--text); }
.post-navigation-links a:hover .nav-title { color: var(--accent); }
.post-navigation-links .nav-next { text-align: right; margin-left: auto; }

/* ==========================================================================
   12. CONTACT
   ========================================================================== */

.contact-section { padding: 56px 0; border-bottom: 1px solid var(--border); }
.contact-intro { font-size: 14px; color: var(--muted); margin-bottom: 16px; }
.contact-email {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	font-family: var(--mono);
	font-size: 16px;
	font-weight: 500;
	color: var(--accent);
	border-bottom: 1px solid var(--border);
	padding-bottom: 2px;
	transition: border-color 0.15s;
}
.contact-email:hover { border-color: var(--accent); text-decoration: none; }
.contact-email::before { content: '\f0e0'; font-family: 'Font Awesome 6 Free'; font-weight: 900; font-size: 14px; }

/* ==========================================================================
   12b. NEWSLETTER WIDGET AREA (e.g. Jetpack Subscribe)
   ========================================================================== */

.newsletter-section { padding: 56px 0; border-bottom: 1px solid var(--border); }
.newsletter-intro { font-size: 14px; color: var(--muted); }
.newsletter-section .widget { margin: 16px 0 0; }
.newsletter-section p { color: var(--muted); font-size: 13px; margin-bottom: 10px; }
.newsletter-section a { color: var(--link); }

.newsletter-section input[type="email"],
.newsletter-section input[type="text"] {
	width: 100%;
	background: var(--bg2);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	color: var(--text);
	padding: 10px 14px;
	font-family: var(--font);
	font-size: 14px;
	margin-bottom: 10px;
}

.newsletter-section button,
.newsletter-section input[type="submit"] {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 18px;
	border-radius: var(--radius);
	font-size: 13px;
	font-weight: 600;
	background: var(--accent);
	color: #fff;
	border: 0;
	cursor: pointer;
	transition: opacity 0.15s;
}
.newsletter-section button:hover,
.newsletter-section input[type="submit"]:hover { opacity: 0.8; }

/* ==========================================================================
   13. YOUTUBE VIDEOS (server-rendered)
   ========================================================================== */

.videos-section { padding: 56px 0; border-bottom: 1px solid var(--border); }
.videos-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; list-style: none; }
.video-card {
	background: var(--bg2);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	overflow: hidden;
	transition: border-color 0.2s;
	text-decoration: none;
	display: block;
}
.video-card:hover { border-color: var(--accent); text-decoration: none; }
.video-thumb {
	width: 100%;
	aspect-ratio: 16/9;
	object-fit: cover;
	display: block;
	background: var(--bg3);
}
.video-info { padding: 12px 14px 14px; }
.video-title {
	font-size: 13px;
	font-weight: 600;
	color: var(--text);
	line-height: 1.4;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.video-date { font-family: var(--mono); font-size: 11px; color: var(--muted); margin-top: 6px; }
.videos-empty { font-family: var(--mono); font-size: 13px; color: var(--muted); }

/* ==========================================================================
   14. COMMENTS
   ========================================================================== */

.comments-area { margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--border); }
.comments-title { font-size: 18px; font-weight: 700; margin-bottom: 24px; }
.comment-list { list-style: none; }
.comment-list .children { list-style: none; margin-left: 28px; }
.comment-body { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; margin-bottom: 16px; }
.comment-author { font-weight: 600; font-size: 13px; }
.comment-metadata { font-family: var(--mono); font-size: 11px; color: var(--muted); margin-bottom: 10px; }
.comment-content p { font-size: 14px; margin-bottom: 8px; color: var(--text); }
.comment-reply-link { font-size: 12px; font-weight: 600; color: var(--accent); }
.comment-respond { margin-top: 24px; }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
	width: 100%;
	background: var(--bg2);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	color: var(--text);
	padding: 10px 14px;
	font-family: var(--font);
	font-size: 14px;
	margin-bottom: 14px;
}
.comment-form label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.comment-form p.comment-form-cookies-consent { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.comment-form p.comment-form-cookies-consent input { margin: 0; }
.comment-notes { font-size: 13px; color: var(--muted); margin-bottom: 18px; }

/* ==========================================================================
   15. SEARCH / 404
   ========================================================================== */

.search-form { display: flex; gap: 10px; margin: 24px 0; }
.search-field {
	flex: 1; background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius);
	color: var(--text); padding: 10px 14px; font-family: var(--font); font-size: 14px;
}
.search-submit { background: var(--accent); color: #fff; }
.error-404 { padding: 100px 0; text-align: center; }
.error-404 h1 { font-size: clamp(40px, 8vw, 72px); font-family: var(--mono); color: var(--accent); margin-bottom: 12px; }
.error-404 p { color: var(--muted); margin-bottom: 24px; }

/* ==========================================================================
   16. FOOTER
   ========================================================================== */

.site-footer { background: var(--bg2); border-top: 1px solid var(--border); padding: 32px 0; margin-top: 40px; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.footer-copy { font-size: 12px; color: var(--muted); font-family: var(--mono); }
.footer-links { display: flex; gap: 16px; list-style: none; }
.footer-links a { font-size: 12px; color: var(--muted); }
.footer-links a:hover { color: var(--text); text-decoration: none; }
.footer-widgets { padding: 32px 0; border-bottom: 1px solid var(--border); }

/* ==========================================================================
   17. RESPONSIVE
   ========================================================================== */

@media (max-width: 600px) {
	.nav-toggle { display: flex; }
	.nav-links {
		display: none;
		position: absolute;
		top: 56px; left: 0; right: 0;
		flex-direction: column;
		background: var(--bg2);
		border-bottom: 1px solid var(--border);
		padding: 16px 20px;
		gap: 16px;
	}
	.nav-links.is-open { display: flex; }
	.post-thumb { display: none; }
	.footer-inner { flex-direction: column; align-items: flex-start; }
	.featured-post { grid-template-columns: 1fr; }
	.featured-post-body,
	.featured-post:not(:has(.featured-post-media)) .featured-post-body { padding: 24px; }
}
