/*
Theme Name: Techie Tablet Dispatch
Theme URI: https://techietablet.com
Author: Nikhil Sharma
Author URI: https://techietablet.com/about
Description: An editorial "dispatch" theme for Techie Tablet — AI, marketing and the Indian tech scene, told straight. Built for techietablet.com.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Tested up to: 6.6
License: GNU General Public License v2 or later
License URI: LICENSE
Text Domain: techietablet
*/

:root {
	--ink: #1B1F27;
	--bg: #F1EEE4;
	--surface: #FBFAF5;
	--surface-2: #E9E5D8;
	--border: #DBD6C6;
	--muted: #6E6A5C;
	--accent: #B5691A;
	--accent-strong: #8F5313;
	--accent-soft: #EAD9B4;
	--teal: #155F5B;
	--teal-soft: #D9E6E2;
	--shadow: 0 1px 2px rgba(27,31,39,0.06);
	--radius-s: 3px;
	--radius-m: 6px;
	--font-display: "Fraunces", Georgia, "Times New Roman", serif;
	--font-body: "IBM Plex Sans", -apple-system, "Segoe UI", sans-serif;
	--font-mono: "IBM Plex Mono", "SF Mono", Menlo, monospace;
}

@media (prefers-color-scheme: dark) {
	:root {
		--ink: #EDE9DD;
		--bg: #14171D;
		--surface: #1B1F27;
		--surface-2: #232833;
		--border: #333846;
		--muted: #9B968A;
		--accent: #F2AC42;
		--accent-strong: #F6C36C;
		--accent-soft: rgba(242,172,66,0.14);
		--teal: #5CC2BA;
		--teal-soft: rgba(92,194,186,0.12);
		--shadow: 0 1px 2px rgba(0,0,0,0.3);
	}
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	background: var(--bg);
	color: var(--ink);
	font-family: var(--font-body);
	font-size: 16px;
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; }
.wrap {
	max-width: 1180px;
	margin: 0 auto;
	padding: 0 clamp(20px, 4vw, 48px);
}
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; margin: 0; text-wrap: balance; }
.eyebrow {
	font-family: var(--font-mono);
	font-size: 0.72rem;
	letter-spacing: 0.11em;
	text-transform: uppercase;
	color: var(--muted);
}
::selection { background: var(--accent-soft); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	background: var(--ink);
	color: var(--bg);
	padding: 12px 20px;
	z-index: 100;
	font-family: var(--font-mono);
	font-size: 0.8rem;
	text-decoration: none;
}
.skip-link:focus { left: 12px; top: 12px; }

@media (prefers-reduced-motion: no-preference) {
	.reveal { animation: rise 0.7s cubic-bezier(.2,.7,.3,1) both; }
	@keyframes rise {
		from { opacity: 0; transform: translateY(14px); }
		to { opacity: 1; transform: translateY(0); }
	}
}

/* ---------- header ---------- */
header.site {
	position: sticky;
	top: 0;
	z-index: 20;
	background: color-mix(in srgb, var(--bg) 88%, transparent);
	backdrop-filter: blur(10px);
	border-bottom: 1px solid var(--border);
}
.header-row {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	padding: 16px 0;
}
.wordmark {
	font-family: var(--font-display);
	font-weight: 700;
	font-size: 1.35rem;
	letter-spacing: -0.01em;
	text-decoration: none;
	display: flex;
	align-items: baseline;
	gap: 2px;
	color: var(--ink);
}
.wordmark .dot { color: var(--accent); }
.custom-logo-link { display: block; }
.custom-logo-link img { max-height: 44px; width: auto; }
nav.primary { display: flex; }
.primary-menu {
	display: flex;
	gap: 28px;
	list-style: none;
	margin: 0;
	padding: 0;
}
.primary-menu li { margin: 0; }
.primary-menu a {
	font-family: var(--font-mono);
	font-size: 0.74rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	text-decoration: none;
	color: var(--muted);
	padding: 4px 0;
	border-bottom: 1px solid transparent;
	transition: color 0.15s, border-color 0.15s;
}
.primary-menu a:hover { color: var(--ink); border-color: var(--accent); }

.menu-toggle {
	display: none;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	background: none;
	border: 1px solid var(--border);
	border-radius: var(--radius-s);
	color: var(--ink);
	cursor: pointer;
	padding: 0;
}
.menu-toggle svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; }
.menu-toggle[aria-expanded="true"] { border-color: var(--accent); color: var(--accent-strong); }

@media (max-width: 860px) {
	.menu-toggle { display: flex; }
	nav.primary {
		display: block;
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		background: var(--surface);
		border-bottom: 1px solid var(--border);
		box-shadow: var(--shadow);
		max-height: 0;
		overflow: hidden;
		transition: max-height 0.25s ease;
	}
	nav.primary.is-open { max-height: 60vh; overflow-y: auto; }
	.primary-menu { flex-direction: column; gap: 0; padding: 6px clamp(20px, 4vw, 48px) 18px; }
	.primary-menu a { display: block; padding: 12px 0; border-bottom: 1px solid var(--border); }
}

/* ---------- breadcrumbs ---------- */
.breadcrumbs { border-bottom: 1px solid var(--border); background: var(--surface); }
.breadcrumbs ol {
	list-style: none;
	margin: 0;
	padding: 14px 0;
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	font-family: var(--font-mono);
	font-size: 0.74rem;
	color: var(--muted);
}
.breadcrumbs li:not(:last-child)::after { content: "/"; margin-left: 6px; opacity: 0.5; }
.breadcrumbs a { text-decoration: none; color: var(--muted); }
.breadcrumbs a:hover { color: var(--accent-strong); }
.breadcrumbs [aria-current="page"] { color: var(--ink); }

/* ---------- hero / masthead ---------- */
.masthead { padding: 56px 0 48px; border-bottom: 1px solid var(--border); }
.masthead-grid {
	display: grid;
	grid-template-columns: 1.5fr 1fr;
	gap: 56px;
	align-items: start;
}
@media (max-width: 900px) { .masthead-grid { grid-template-columns: 1fr; gap: 36px; } }
.kicker {
	font-family: var(--font-mono);
	font-size: 0.78rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--accent);
	margin-bottom: 18px;
	display: flex;
	align-items: center;
	gap: 10px;
}
.kicker::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); display: inline-block; }
.masthead h1 { font-size: clamp(2.3rem, 4.4vw, 3.6rem); line-height: 1.06; letter-spacing: -0.015em; }
.masthead h1 em { font-style: italic; color: var(--accent); }
.masthead .dek { margin-top: 20px; max-width: 46ch; font-size: 1.1rem; color: var(--muted); }
.hero-actions { margin-top: 30px; display: flex; gap: 14px; flex-wrap: wrap; }
.btn {
	font-family: var(--font-mono);
	font-size: 0.78rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	text-decoration: none;
	padding: 12px 22px;
	border-radius: var(--radius-s);
	display: inline-flex;
	align-items: center;
	gap: 8px;
	transition: transform 0.15s, background 0.15s, color .15s;
	border: 1px solid transparent;
	cursor: pointer;
	background: none;
}
.btn-primary { background: var(--ink); color: var(--bg); }
.btn-primary:hover { transform: translateY(-1px); background: var(--accent); color: #1B1F27; }
.btn-ghost { border-color: var(--border); color: var(--ink); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- byline card ---------- */
.byline-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-m); padding: 26px; box-shadow: var(--shadow); }
.byline-top { display: flex; gap: 16px; align-items: center; }
.avatar {
	width: 64px; height: 64px;
	border-radius: 50%;
	flex-shrink: 0;
	background: var(--accent);
	display: flex; align-items: center; justify-content: center;
	position: relative;
	overflow: hidden;
	border: 1px solid var(--border);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.byline-name { font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; }
.byline-role { font-size: 0.86rem; color: var(--muted); margin-top: 2px; line-height: 1.4; }
.byline-quote { margin-top: 18px; font-size: 0.95rem; color: var(--ink); padding-top: 16px; border-top: 1px solid var(--border); }
.brand-strip { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); }
.brand-strip .eyebrow { margin-bottom: 10px; }
.brand-list { font-family: var(--font-mono); font-size: 0.8rem; color: var(--muted); line-height: 1.9; }
.brand-list span { color: var(--ink); }
.byline-link {
	margin-top: 18px;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-family: var(--font-mono);
	font-size: 0.76rem;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	text-decoration: none;
	color: var(--teal);
}
.byline-link:hover { text-decoration: underline; }

/* ---------- author box (single posts) ---------- */
.author-box {
	display: flex;
	gap: 20px;
	align-items: flex-start;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius-m);
	padding: 26px;
	margin-top: 56px;
}
.author-box .avatar { width: 56px; height: 56px; }
.author-box p { color: var(--muted); font-size: 0.92rem; margin: 8px 0 0; max-width: 60ch; }

/* ---------- section headers ---------- */
.section { padding: 64px 0; border-bottom: 1px solid var(--border); }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 34px; flex-wrap: wrap; }
.section-head h2 { font-size: clamp(1.5rem, 2.4vw, 1.9rem); }
.section-head .eyebrow { margin-bottom: 8px; }
.section-note { color: var(--muted); font-size: 0.92rem; max-width: 34ch; }

/* ---------- featured story ---------- */
.featured { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; align-items: center; }
@media (max-width: 780px) { .featured { grid-template-columns: 1fr; } }
.featured-art {
	aspect-ratio: 4/3;
	border-radius: var(--radius-m);
	background:
		radial-gradient(circle at 75% 20%, color-mix(in srgb, var(--accent) 55%, transparent), transparent 55%),
		linear-gradient(155deg, var(--surface-2), var(--surface));
	border: 1px solid var(--border);
	position: relative;
	overflow: hidden;
}
.featured-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.featured-art svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.tag {
	display: inline-block;
	font-family: var(--font-mono);
	font-size: 0.7rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	padding: 5px 10px;
	border-radius: var(--radius-s);
	background: var(--accent-soft);
	color: var(--accent-strong);
	text-decoration: none;
}
.tag.teal { background: var(--teal-soft); color: var(--teal); }
.featured-copy h3, .featured-copy h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); line-height: 1.15; margin-top: 14px; }
.featured-copy a { text-decoration: none; color: inherit; }
.featured-copy a:hover { color: var(--accent-strong); }
.featured-copy p { color: var(--muted); margin-top: 14px; max-width: 52ch; }
.byline-date { margin-top: 18px; font-family: var(--font-mono); font-size: 0.78rem; color: var(--muted); letter-spacing: 0.03em; }

/* ---------- beats ---------- */
.beats-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 1px;
	background: var(--border);
	border: 1px solid var(--border);
	border-radius: var(--radius-m);
	overflow: hidden;
}
@media (max-width: 860px) { .beats-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .beats-grid { grid-template-columns: 1fr; } }
.beat {
	background: var(--surface);
	padding: 28px 24px;
	text-decoration: none;
	color: inherit;
	display: block;
	transition: background 0.15s;
}
.beat:hover { background: var(--surface-2); }
.beat svg { width: 26px; height: 26px; stroke: var(--accent); fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 16px; }
.beat h3 { font-size: 1.05rem; font-family: var(--font-body); font-weight: 600; }
.beat p { color: var(--muted); font-size: 0.88rem; margin-top: 8px; }
.beat .go { margin-top: 14px; font-family: var(--font-mono); font-size: 0.74rem; color: var(--teal); letter-spacing: 0.04em; text-transform: uppercase; }

/* ---------- story grid ---------- */
.story-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px 28px; }
@media (max-width: 900px) { .story-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .story-grid { grid-template-columns: 1fr; } }
.story { text-decoration: none; color: inherit; display: block; }
.story-thumb {
	aspect-ratio: 16/10;
	border-radius: var(--radius-m);
	border: 1px solid var(--border);
	background: var(--surface-2);
	margin-bottom: 16px;
	position: relative;
	overflow: hidden;
}
.story-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.story-thumb svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.story h3 { font-size: 1.08rem; font-family: var(--font-body); font-weight: 600; line-height: 1.3; transition: color 0.15s; }
.story:hover h3 { color: var(--accent-strong); }
.story .tag { margin-bottom: 10px; }
.story-meta { margin-top: 10px; font-family: var(--font-mono); font-size: 0.74rem; color: var(--muted); }
.more-row { margin-top: 42px; text-align: center; display: flex; gap: 14px; justify-content: center; }

/* ---------- authority band ---------- */
.authority { background: var(--ink); color: var(--bg); padding: 64px 0; }
.authority .eyebrow { color: var(--accent); }
.authority h2 { color: var(--bg); font-size: clamp(1.5rem, 2.6vw, 2.1rem); max-width: 30ch; margin-top: 14px; }
.authority-grid { margin-top: 44px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }
@media (max-width: 780px) { .authority-grid { grid-template-columns: repeat(2, 1fr); } }
.stat-num { font-family: var(--font-display); font-size: clamp(1.7rem, 4vw, 2.6rem); color: var(--accent); line-height: 1.1; }
.stat-label { margin-top: 10px; font-size: 0.88rem; color: color-mix(in srgb, var(--bg) 70%, transparent); max-width: 22ch; }

/* ---------- newsletter/cta ---------- */
.cta { padding: 60px 0; text-align: center; }
.cta h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); max-width: 22ch; margin: 0 auto; }
.cta p { color: var(--muted); margin-top: 14px; max-width: 46ch; margin-left: auto; margin-right: auto; }
.cta-actions { margin-top: 26px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ---------- footer ---------- */
footer.site { padding: 40px 0; }
.footer-row { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 18px; }
.footer-nav { display: flex; gap: 22px; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; }
.footer-nav a { font-family: var(--font-mono); font-size: 0.76rem; letter-spacing: 0.05em; text-transform: uppercase; text-decoration: none; color: var(--muted); }
.footer-nav a:hover { color: var(--accent); }
.footer-fine { font-family: var(--font-mono); font-size: 0.74rem; color: var(--muted); }

/* ---------- article page (single / page) ---------- */
.article-head { padding: 48px 0 32px; border-bottom: 1px solid var(--border); }
.article-head .eyebrow-row { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.article-head h1 { font-size: clamp(1.9rem, 4vw, 2.9rem); line-height: 1.12; max-width: 22ch; }
.article-meta { margin-top: 20px; display: flex; align-items: center; gap: 12px; font-family: var(--font-mono); font-size: 0.8rem; color: var(--muted); flex-wrap: wrap; }
.article-meta .avatar { width: 32px; height: 32px; }
.article-body { padding: 48px 0; }
.article-body-inner { max-width: 68ch; margin: 0 auto; font-size: 1.08rem; }
.entry-content { max-width: 68ch; margin: 0 auto; }
.entry-content > *:first-child { margin-top: 0; }
.entry-content h2 { font-size: 1.6rem; margin: 2.2em 0 0.7em; line-height: 1.25; }
.entry-content h3 { font-size: 1.3rem; margin: 2em 0 0.6em; font-family: var(--font-body); font-weight: 600; }
.entry-content p { margin: 1.3em 0; color: var(--ink); }
.entry-content a { color: var(--teal); text-decoration-color: color-mix(in srgb, var(--teal) 40%, transparent); text-underline-offset: 3px; }
.entry-content a:hover { text-decoration-color: currentColor; }
.entry-content ul, .entry-content ol { margin: 1.3em 0; padding-left: 1.4em; }
.entry-content li { margin: 0.4em 0; }
.entry-content blockquote {
	margin: 1.8em 0;
	padding: 4px 0 4px 22px;
	border-left: 3px solid var(--accent);
	font-family: var(--font-display);
	font-style: italic;
	font-size: 1.2rem;
	color: var(--ink);
}
.entry-content img, .entry-content figure { border-radius: var(--radius-m); margin: 1.8em 0; }
.entry-content figcaption { font-family: var(--font-mono); font-size: 0.78rem; color: var(--muted); margin-top: 8px; }
.entry-content pre {
	background: var(--surface-2);
	border: 1px solid var(--border);
	border-radius: var(--radius-m);
	padding: 16px 18px;
	overflow-x: auto;
	font-family: var(--font-mono);
	font-size: 0.86rem;
}
.entry-content code { font-family: var(--font-mono); background: var(--surface-2); padding: 0.1em 0.35em; border-radius: 3px; font-size: 0.9em; }
.entry-content pre code { background: none; padding: 0; }
.entry-content hr { border: none; border-top: 1px solid var(--border); margin: 2.4em 0; }
.entry-content table { width: 100%; border-collapse: collapse; margin: 1.8em 0; display: block; overflow-x: auto; }
.entry-content th, .entry-content td { border: 1px solid var(--border); padding: 8px 12px; text-align: left; }
.entry-content .wp-caption { max-width: 100%; }

.post-tags { max-width: 68ch; margin: 40px auto 0; display: flex; gap: 10px; flex-wrap: wrap; }
.post-tags a { font-family: var(--font-mono); font-size: 0.74rem; text-decoration: none; color: var(--muted); border: 1px solid var(--border); border-radius: var(--radius-s); padding: 5px 10px; }
.post-tags a:hover { color: var(--accent-strong); border-color: var(--accent); }

.share-row { max-width: 68ch; margin: 32px auto 0; display: flex; gap: 12px; align-items: center; font-family: var(--font-mono); font-size: 0.76rem; color: var(--muted); }

/* ---------- comments ---------- */
.comments-area { max-width: 68ch; margin: 56px auto 0; }
.comments-title { font-size: 1.3rem; margin-bottom: 24px; }
.comment-list { list-style: none; margin: 0; padding: 0; }
.comment-list .children { list-style: none; padding-left: 28px; }
.comment-body { padding: 20px 0; border-top: 1px solid var(--border); }
.comment-author { font-weight: 600; font-size: 0.92rem; }
.comment-metadata { font-family: var(--font-mono); font-size: 0.72rem; color: var(--muted); text-decoration: none; }
.comment-content p { margin: 0.6em 0; }
.comment-respond { margin-top: 32px; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea {
	width: 100%;
	font-family: var(--font-body);
	font-size: 0.95rem;
	padding: 10px 12px;
	border: 1px solid var(--border);
	border-radius: var(--radius-s);
	background: var(--surface);
	color: var(--ink);
	margin-top: 6px;
}
.comment-form label { font-family: var(--font-mono); font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.comment-form p { margin: 16px 0; }
.comment-form .comment-form-cookies-consent { display: flex; align-items: center; gap: 8px; }
.comment-form .comment-form-cookies-consent input { width: auto; }

/* ---------- search ---------- */
.search-form { display: flex; gap: 10px; max-width: 480px; }
.search-form input[type="search"] {
	flex: 1;
	font-family: var(--font-body);
	font-size: 1rem;
	padding: 12px 14px;
	border: 1px solid var(--border);
	border-radius: var(--radius-s);
	background: var(--surface);
	color: var(--ink);
}
.search-form button {
	font-family: var(--font-mono);
	font-size: 0.78rem;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	padding: 12px 20px;
	border-radius: var(--radius-s);
	background: var(--ink);
	color: var(--bg);
	border: none;
	cursor: pointer;
}

/* ---------- pagination ---------- */
.pagination { display: flex; gap: 14px; justify-content: center; margin-top: 42px; }

/* ---------- 404 ---------- */
.error-404 { padding: 90px 0; text-align: center; }
.error-404 .kicker { justify-content: center; }
.error-404 h1 { font-size: clamp(2rem, 5vw, 3rem); }
.error-404 p { color: var(--muted); margin-top: 16px; max-width: 46ch; margin-left: auto; margin-right: auto; }

/* alignment helpers WP expects */
.alignleft { float: left; margin: 0.5em 1.5em 0.5em 0; }
.alignright { float: right; margin: 0.5em 0 0.5em 1.5em; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.screen-reader-text {
	position: absolute !important;
	clip: rect(1px, 1px, 1px, 1px);
	width: 1px; height: 1px;
	overflow: hidden;
}
