/*
Theme Name: Geek Decoded
Theme URI: https://geekdecoded.com/
Author: Geek on the Coast
Author URI: https://www.geekonthecoast.com/
Description: Geek Decoded — Making sense of the digital world. By Geek on the Coast. Matches the geekonthecoast.com studio site.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GPLv2 or later
Text Domain: geekonthecoast
*/

/* ============ Brand tokens (pulled from geekonthecoast.com) ============ */
:root {
	--ink: #1a1b1f;          /* headings */
	--text: #2d2e32;         /* body copy */
	--deep: #0a3540;         /* deep teal */
	--teal: #0e6a74;         /* accent teal (italic hero phrase, links) */
	--teal-2: #137e8b;
	--muted: #5a7a80;
	--muted-2: #3a6470;
	--mint: #dcede9;         /* hero + footer */
	--mint-line: #bcd9d3;    /* outline buttons / borders */
	--coral: #ff785b;        /* primary buttons, dots */
	--coral-ink: #463939;    /* text on coral */
	--paper: #fbfaf6;        /* page background */
	--sand: #f4ece1;         /* alternate section band */
	--white: #ffffff;

	--font-head: "Poppins", system-ui, sans-serif;
	--font-body: "DM Sans", system-ui, sans-serif;
	--font-mono: "Space Mono", ui-monospace, monospace;

	--radius: 18px;
	--radius-lg: 24px;
	--shadow: 0 18px 40px -18px rgba(10, 53, 64, .25);
	--wrap: 1100px;
	--read: 720px;
}

/* ============ Base ============ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
	margin: 0;
	background: var(--paper);
	color: var(--text);
	font-family: var(--font-body);
	font-size: 17px;
	line-height: 1.7;
	-webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--deep); }
h1, h2, h3, h4, h5, h6 {
	font-family: var(--font-head);
	color: var(--ink);
	line-height: 1.2;
	margin: 0 0 .5em;
}
h1 { font-size: clamp(34px, 5vw, 50px); font-weight: 400; letter-spacing: -1px; }
h2 { font-size: clamp(24px, 3vw, 30px); font-weight: 700; letter-spacing: -.6px; }
h3 { font-size: 22px; font-weight: 600; letter-spacing: -.4px; }
p { margin: 0 0 1.2em; }

.wrap { width: min(var(--wrap), 100% - 40px); margin-inline: auto; }
.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}
.skip-link:focus {
	position: fixed; top: 10px; left: 10px; z-index: 999; width: auto; height: auto; clip: auto;
	background: var(--white); padding: 10px 16px; border-radius: 999px; box-shadow: var(--shadow);
}

/* ============ Eyebrow (coral dot + Space Mono caps) ============ */
.eyebrow {
	display: inline-flex; align-items: center; gap: 8px;
	font-family: var(--font-mono); font-size: 12px; letter-spacing: 1.5px;
	text-transform: uppercase; color: var(--muted-2); margin-bottom: 14px;
}
.eyebrow::before {
	content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--coral);
}
.eyebrow a { color: inherit; text-decoration: none; }
.eyebrow a:hover { color: var(--teal); }

/* ============ Buttons ============ */
.btn, .wp-block-button__link, button, input[type="submit"] {
	display: inline-flex; align-items: center; gap: 6px;
	font-family: var(--font-head); font-weight: 600; font-size: 15px;
	padding: 14px 26px; border-radius: 999px; border: 0; cursor: pointer;
	background: var(--coral); color: var(--coral-ink); text-decoration: none;
	box-shadow: 0 10px 22px -10px rgba(255, 120, 91, .7);
	transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover, .wp-block-button__link:hover, button:hover, input[type="submit"]:hover {
	transform: translateY(-1px); color: var(--coral-ink);
	box-shadow: 0 14px 26px -10px rgba(255, 120, 91, .8);
}
.btn--ghost, .is-style-outline .wp-block-button__link {
	background: transparent; border: 1px solid var(--mint-line); box-shadow: none; color: var(--coral-ink);
}
.btn--ghost:hover { background: rgba(255, 255, 255, .6); box-shadow: none; }

/* ============ Header ============ */
.site-header { background: var(--white); position: relative; z-index: 20; }
.site-header .wrap {
	display: flex; align-items: center; gap: 48px; min-height: 120px;
}
.site-logo img, .custom-logo { width: 220px; height: auto; }
.site-title { font-family: var(--font-head); font-size: 26px; color: var(--teal); text-decoration: none; }

.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 28px; align-items: center; }
.main-nav li { position: relative; }
.main-nav a {
	font-family: var(--font-head); font-size: 16px; color: var(--text); text-decoration: none;
	padding: 10px 0; display: inline-flex; align-items: center; gap: 6px;
}
.main-nav a:hover { color: var(--teal); }
.main-nav .current-menu-item > a,
.main-nav .current_page_item > a,
.main-nav .is-current > a { color: #999; }
.main-nav .menu-item-has-children > a::after {
	content: ""; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
	transform: rotate(45deg) translateY(-2px); margin-left: 4px;
}
.main-nav .sub-menu {
	position: absolute; top: 100%; left: -16px; min-width: 210px; display: block;
	background: var(--white); border-radius: 14px; box-shadow: var(--shadow); padding: 10px 0;
	opacity: 0; visibility: hidden; transform: translateY(6px); transition: .15s ease;
}
.main-nav .sub-menu li { display: block; }
.main-nav .sub-menu a { padding: 8px 18px; display: block; font-size: 15px; }
.main-nav li:hover > .sub-menu, .main-nav li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }

.nav-toggle { display: none; margin-left: auto; background: transparent; box-shadow: none; padding: 10px; color: var(--ink); }
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
	display: block; width: 24px; height: 2px; background: currentColor; position: relative; content: "";
}
.nav-toggle span::before { position: absolute; top: -7px; }
.nav-toggle span::after { position: absolute; top: 7px; }

/* ============ Mint hero band with wave ============ */
.hero {
	position: relative; background: linear-gradient(180deg, #e6f2ef 0%, var(--mint) 100%);
	padding: 80px 0 120px; text-align: center;
}
.hero::after {
	content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 60px;
	background: var(--paper);
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 60' preserveAspectRatio='none'%3E%3Cpath d='M0 20 C 360 0, 720 0, 1080 20 S 1440 30, 1440 30 V60 H0Z'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
	        mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 60' preserveAspectRatio='none'%3E%3Cpath d='M0 20 C 360 0, 720 0, 1080 20 S 1440 30, 1440 30 V60 H0Z'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
}
.hero h1 { max-width: 820px; margin: 0 auto 18px; }
.hero h1 em, .accent {
	font-style: normal; color: var(--teal);
	background: linear-gradient(transparent 88%, rgba(255, 120, 91, .25) 88%);
}
.hero .lede { max-width: 580px; margin: 0 auto; color: var(--muted-2); font-size: 18px; }
.hero--post { text-align: left; padding: 64px 0 110px; }
.hero--post .inner { max-width: var(--read); margin: 0 auto; }
.hero--post h1 { margin: 0 0 18px; font-size: clamp(32px, 4.4vw, 46px); }

.meta-pills { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 26px; }
.hero--post .meta-pills { justify-content: flex-start; }
.pill {
	display: inline-flex; align-items: center; gap: 8px;
	background: rgba(255, 255, 255, .7); border: 1px solid var(--mint-line); border-radius: 8px;
	font-family: var(--font-mono); font-size: 12px; color: var(--ink); padding: 7px 12px;
}
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--coral); }
.pill small { color: var(--muted); text-transform: uppercase; letter-spacing: 1px; font-size: 10px; }

/* ============ Category filter ============ */
.cat-filter { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 0 0 44px; padding: 0; list-style: none; }
.cat-filter a {
	display: inline-block; padding: 8px 18px; border-radius: 999px; border: 1px solid var(--mint-line);
	font-family: var(--font-head); font-size: 14px; color: var(--text); text-decoration: none; background: var(--white);
}
.cat-filter a:hover, .cat-filter .is-active a { background: var(--deep); border-color: var(--deep); color: var(--white); }

/* ============ Post grid ============ */
.section { padding: 70px 0 90px; }
.section--sand { background: var(--sand); }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 44px; }
.section-head p { color: var(--muted-2); }

.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.card {
	background: var(--white); border: 1px solid #e3eeeb; border-radius: var(--radius);
	overflow: hidden; display: flex; flex-direction: column;
	transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card__img { text-decoration: none; aspect-ratio: 16 / 10; background: var(--mint); overflow: hidden; }
.card__img img { width: 100%; height: 100%; object-fit: cover; }
.card__img--empty {
	display: grid; place-items: center; font-family: var(--font-mono); font-size: 12px;
	letter-spacing: 2px; color: var(--teal); text-transform: uppercase;
	background: linear-gradient(135deg, var(--mint), #eef6f4);
}
.card__body { padding: 22px 24px 26px; display: flex; flex-direction: column; flex: 1; }
.card__body .eyebrow { margin-bottom: 10px; font-size: 11px; }
.card h3 { font-size: 21px; margin-bottom: 10px; }
.card h3 a { color: var(--ink); text-decoration: none; }
.card h3 a:hover { color: var(--teal); }
.card p { color: var(--muted-2); font-size: 15.5px; line-height: 1.6; margin-bottom: 18px; }
.card__foot {
	margin-top: auto; display: flex; justify-content: space-between; align-items: center;
	border-top: 1px solid #e8f0ee; padding-top: 14px;
	font-family: var(--font-mono); font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 1px;
}
.card__foot a { color: var(--teal); text-decoration: none; font-family: var(--font-head); text-transform: none; letter-spacing: 0; font-size: 14px; font-weight: 600; }

/* Featured (first) post — dark teal card like the Crew Plan */
.card--feature {
	grid-column: 1 / -1; display: grid; grid-template-columns: 1.15fr 1fr;
	background: linear-gradient(150deg, var(--deep) 0%, #10505b 60%, var(--teal-2) 140%);
	border: 0; color: #d7e9e6;
}
.card--feature .card__img { aspect-ratio: auto; min-height: 340px; }
.card--feature .card__body { padding: 40px 44px; justify-content: center; }
.card--feature h3 { font-size: clamp(24px, 2.6vw, 32px); }
.card--feature h3 a, .card--feature h3 { color: var(--white); }
.card--feature p { color: #c3dcd8; font-size: 16.5px; }
.card--feature .eyebrow { color: #a9c6ca; }
.card--feature .card__foot { border-color: rgba(255, 255, 255, .15); color: #a9c6ca; }
.card--feature .tag-hot {
	align-self: flex-start; background: var(--coral); color: var(--coral-ink); border-radius: 999px;
	font-family: var(--font-mono); font-size: 10px; letter-spacing: 1.5px; text-transform: uppercase;
	padding: 5px 12px; margin-bottom: 16px;
}
.card--feature .btn { align-self: flex-start; margin-top: 4px; }

/* ============ Pagination ============ */
.pagination { margin-top: 54px; }
.pagination .nav-links { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.pagination .page-numbers {
	min-width: 44px; height: 44px; padding: 0 16px; display: inline-grid; place-items: center;
	border-radius: 999px; border: 1px solid var(--mint-line); background: var(--white);
	font-family: var(--font-head); font-size: 14px; color: var(--text); text-decoration: none;
}
.pagination .page-numbers.current { background: var(--coral); border-color: var(--coral); color: var(--coral-ink); font-weight: 600; }
.pagination a.page-numbers:hover { border-color: var(--teal); color: var(--teal); }

/* ============ Single post ============ */
.post-feature-img {
	max-width: 980px; margin: -80px auto 0; position: relative; z-index: 2;
	border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow);
}
.entry { max-width: var(--read); margin: 0 auto; padding: 56px 0 30px; font-size: 18px; }
.entry > * { margin-top: 0; }
.entry h2 { margin-top: 1.8em; }
.entry h3 { margin-top: 1.6em; }
.entry ul, .entry ol { padding-left: 1.3em; margin: 0 0 1.3em; }
.entry li { margin-bottom: .4em; }
.entry li::marker { color: var(--coral); }
.entry blockquote, .wp-block-quote {
	margin: 1.8em 0; padding: 22px 28px; border-left: 4px solid var(--coral);
	background: var(--white); border-radius: 0 var(--radius) var(--radius) 0;
	font-family: var(--font-head); font-size: 20px; color: var(--ink); line-height: 1.5;
}
.entry blockquote cite, .wp-block-quote cite { display: block; margin-top: 10px; font-family: var(--font-mono); font-size: 12px; color: var(--muted); font-style: normal; text-transform: uppercase; letter-spacing: 1px; }
.entry img, .entry .wp-block-image img { border-radius: var(--radius); }
.entry figcaption, .wp-element-caption { font-size: 14px; color: var(--muted); text-align: center; margin-top: 8px; }
.entry code { font-family: var(--font-mono); font-size: .85em; background: var(--mint); padding: 2px 6px; border-radius: 6px; color: var(--deep); }
.entry pre { font-family: var(--font-mono); font-size: 14px; background: var(--deep); color: #e6f2ef; padding: 22px; border-radius: var(--radius); overflow-x: auto; }
.entry pre code { background: none; color: inherit; padding: 0; }
.entry hr { border: 0; border-top: 1px solid var(--mint-line); margin: 2.4em 0; }
.entry table { width: 100%; border-collapse: collapse; margin: 1.6em 0; font-size: 16px; }
.entry th, .entry td { padding: 12px 14px; border-bottom: 1px solid #e3eeeb; text-align: left; }
.entry th { font-family: var(--font-head); color: var(--ink); background: var(--mint); }
.alignwide { width: min(1000px, 100vw - 40px); margin-left: 50%; transform: translateX(-50%); }
.alignfull { width: 100vw; margin-left: 50%; transform: translateX(-50%); }
.alignleft { float: left; margin: .3em 1.5em 1em 0; }
.alignright { float: right; margin: .3em 0 1em 1.5em; }
.aligncenter { margin-inline: auto; }

.post-tags { max-width: var(--read); margin: 0 auto 30px; display: flex; flex-wrap: wrap; gap: 8px; }
.post-tags a {
	font-family: var(--font-mono); font-size: 12px; text-decoration: none; color: var(--teal);
	background: rgba(19, 126, 139, .12); padding: 6px 12px; border-radius: 999px;
}

/* Author signature (matches "Margie · Geek on the Coast" block) */
.signature {
	max-width: var(--read); margin: 10px auto 0; display: flex; align-items: center; gap: 16px;
	padding: 24px 0; border-top: 1px solid var(--mint-line);
}
.signature__avatar {
	width: 52px; height: 52px; border-radius: 50%; background: var(--mint); color: var(--teal);
	display: grid; place-items: center; font-family: var(--font-head); font-weight: 600; flex: none; overflow: hidden;
}
.signature__avatar img { width: 100%; height: 100%; object-fit: cover; }
.signature strong { font-family: var(--font-head); color: var(--ink); display: block; }
.signature span { color: var(--muted); font-size: 15px; }

.post-nav { max-width: var(--read); margin: 30px auto 0; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.post-nav a {
	display: block; background: var(--white); border: 1px solid #e3eeeb; border-radius: var(--radius);
	padding: 18px 20px; text-decoration: none; color: var(--ink); font-family: var(--font-head); font-size: 16px;
}
.post-nav a:hover { box-shadow: var(--shadow); }
.post-nav small { display: block; font-family: var(--font-mono); font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 4px; }
.post-nav .next { text-align: right; }

/* ============ CTA card (matches "Let's talk about your site.") ============ */
.cta-band { background: linear-gradient(180deg, var(--mint) 0%, var(--paper) 100%); padding: 80px 0; }
.cta-card {
	background: var(--white); border-radius: var(--radius-lg); box-shadow: var(--shadow);
	padding: 44px 48px; display: grid; grid-template-columns: 1.3fr auto; gap: 30px; align-items: center;
}
.cta-card h2 { margin-bottom: 8px; }
.cta-card p { color: var(--muted-2); margin: 0; }
.cta-card .actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ============ Newsletter strip ============ */
.newsletter { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.newsletter input[type="email"] { flex: 1; min-width: 220px; }

/* ============ Forms & comments ============ */
input[type="text"], input[type="email"], input[type="url"], input[type="search"], textarea {
	width: 100%; font: inherit; font-size: 16px; color: var(--text);
	background: var(--white); border: 1px solid var(--mint-line); border-radius: 12px; padding: 12px 16px;
}
input:focus, textarea:focus { outline: 2px solid var(--teal-2); outline-offset: 1px; border-color: transparent; }
label { font-family: var(--font-head); font-weight: 600; font-size: 14px; color: var(--ink); display: block; margin-bottom: 6px; }

.comments { max-width: var(--read); margin: 50px auto 0; }
.comment-list { list-style: none; padding: 0; margin: 0 0 40px; }
.comment-list .children { list-style: none; padding-left: 28px; }
.comment-body { background: var(--white); border: 1px solid #e3eeeb; border-radius: var(--radius); padding: 20px 22px; margin-bottom: 16px; }
.comment-author { display: flex; align-items: center; gap: 10px; font-family: var(--font-head); }
.comment-author img { border-radius: 50%; }
.comment-author .says { display: none; }
.comment-metadata { font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: 1px; margin: 4px 0 10px; }
.comment-metadata a { color: var(--muted); text-decoration: none; }
.reply a { font-family: var(--font-head); font-size: 14px; font-weight: 600; text-decoration: none; }
.comment-respond { background: var(--white); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 32px; }
.comment-form p { margin-bottom: 16px; }
.comment-form-cookies-consent { display: flex; gap: 8px; align-items: flex-start; }
.comment-form-cookies-consent label { font-weight: 400; font-family: var(--font-body); }

.search-form { display: flex; gap: 10px; max-width: 520px; margin: 26px auto 0; }

/* ============ Footer (mint band) ============ */
.site-footer { background: var(--mint); padding: 44px 0 30px; font-size: 15px; }
.site-footer .top { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; padding-bottom: 26px; border-bottom: 1px solid var(--mint-line); }
.site-footer .custom-logo, .site-footer .site-logo img { width: 160px; }
.footer-nav ul { list-style: none; display: flex; gap: 24px; margin: 0; padding: 0; flex-wrap: wrap; }
.footer-nav a { color: var(--text); text-decoration: none; }
.footer-nav a:hover { color: var(--teal); }
.site-footer .bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 22px; color: var(--muted-2); font-size: 14px; }
.site-footer .bottom a { color: var(--text); text-decoration: none; }

/* ============ Empty / 404 ============ */
.empty { text-align: center; padding: 30px 0 60px; color: var(--muted-2); }

/* ============ Responsive ============ */
@media (max-width: 960px) {
	.post-grid { grid-template-columns: repeat(2, 1fr); }
	.card--feature { grid-template-columns: 1fr; }
	.card--feature .card__img { min-height: 240px; }
	.cta-card { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
	.site-header .wrap { min-height: 84px; gap: 16px; flex-wrap: wrap; }
	.site-logo img, .custom-logo { width: 170px; }
	.nav-toggle { display: inline-flex; }
	.main-nav { display: none; width: 100%; padding-bottom: 18px; }
	.main-nav.is-open { display: block; }
	.main-nav ul { flex-direction: column; align-items: flex-start; gap: 4px; }
	.main-nav .sub-menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; padding: 0 0 0 14px; }
	.main-nav .menu-item-has-children > a::after { display: none; }
}
@media (max-width: 620px) {
	body { font-size: 16px; }
	.post-grid { grid-template-columns: 1fr; }
	.hero { padding: 56px 0 96px; }
	.card--feature .card__body { padding: 28px 26px; }
	.cta-card { padding: 30px 26px; }
	.post-nav { grid-template-columns: 1fr; }
	.post-feature-img { margin-top: -60px; border-radius: var(--radius); }
	.entry { font-size: 17px; }
}

/* ============ Geek Decoded wordmark ============ */
.brand { display: flex; flex-direction: column; gap: 2px; }
.wordmark {
	display: inline-flex; align-items: baseline; text-decoration: none; line-height: 1;
	font-size: 30px; letter-spacing: -.5px;
}
.wm-geek { font-family: var(--font-head); font-weight: 700; color: var(--deep); }
.wm-decoded { font-family: var(--font-mono); font-weight: 700; color: var(--coral); letter-spacing: 0; margin-left: 2px; }
.wordmark:hover .wm-geek { color: var(--teal); }
.brand__tag { font-family: var(--font-body); font-size: 14px; color: var(--muted-2); margin-top: 6px; }
.brand__by {
	font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 1.5px; text-transform: uppercase;
	color: var(--teal); text-decoration: none;
}
.brand__by:hover { color: var(--coral); }
.site-footer .top { align-items: center; }
.site-footer .wordmark { font-size: 24px; }
.brand__tag--foot { margin: 0; flex: 1; }
.brand__tag--foot a { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--teal); text-decoration: none; margin-left: 6px; }
@media (max-width: 820px) {
	.wordmark { font-size: 24px; }
	.brand__tag { font-size: 13px; }
	.brand__tag--foot { flex-basis: 100%; }
}
