/*
Theme Name: Ramrattan Blog
Theme URI: https://blog.ramrattan.com
Author: Nilesh Ramrattan
Author URI: https://ramrattan.com
Description: Blog theme for blog.ramrattan.com.  Matches the Ramrattan.com brand, mirrors the main site navigation, and presents LinkedIn articles and posts as a card grid.
Version: 1.1.0
Requires at least: 6.0
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: ramrattan-blog
*/

:root {
	--rr-navy: #0d1528;
	--rr-navy-2: #16223b;
	--rr-steel: #305872;
	--rr-accent: #4f86b0;
	--rr-accent-hover: #3c7099;
	--rr-ink: #1a2233;
	--rr-body: #3b4456;
	--rr-muted: #6b7486;
	--rr-line: #e3e7ee;
	--rr-bg: #f5f7fa;
	--rr-card: #ffffff;
	--rr-radius: 12px;
	--rr-max: 1180px;
	--rr-head: "Barlow Semi Condensed", "Arial Narrow", Arial, sans-serif;
	--rr-text: "Inter", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
	margin: 0;
	background: var(--rr-bg);
	color: var(--rr-body);
	font-family: var(--rr-text);
	font-size: 17px;
	line-height: 1.65;
}

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

a { color: var(--rr-accent); text-decoration: none; }
a:hover { color: var(--rr-accent-hover); }

.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: 8px; left: 8px; z-index: 1000;
	width: auto; height: auto; clip: auto;
	padding: 10px 16px; background: #fff; color: var(--rr-navy);
	border-radius: 6px;
}

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

/* ---------- Header ---------- */

.rr-header {
	background: var(--rr-navy);
	color: #fff;
	position: sticky;
	top: 0;
	z-index: 50;
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-bar .rr-header { top: 32px; }

.rr-header .rr-wrap {
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: 76px;
	gap: 24px;
}

.rr-brand {
	display: flex;
	align-items: center;
	gap: 12px;
	color: #fff;
}

.rr-brand:hover { color: #fff; }

.rr-brand img { width: 38px; height: auto; }

.rr-brand-name {
	font-family: var(--rr-head);
	font-weight: 600;
	font-size: 22px;
	letter-spacing: 0.02em;
	line-height: 1.1;
}

.rr-brand-name small {
	display: block;
	font-family: var(--rr-text);
	font-weight: 500;
	font-size: 11px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: #9fb4c8;
}

.rr-nav ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	gap: 6px;
}

.rr-nav a {
	display: block;
	padding: 8px 14px;
	border-radius: 6px;
	color: #d6dee8;
	font-size: 15px;
	font-weight: 500;
}

.rr-nav a:hover { color: #fff; background: rgba(255, 255, 255, 0.06); }

.rr-nav a[aria-current="page"] {
	color: #fff;
	background: var(--rr-steel);
}

.rr-nav-toggle {
	display: none;
	background: none;
	border: 1px solid rgba(255, 255, 255, 0.25);
	color: #fff;
	border-radius: 6px;
	padding: 8px 12px;
	font: inherit;
	font-size: 14px;
	cursor: pointer;
}

/* ---------- Hero band ---------- */

.rr-hero {
	background:
		radial-gradient(1200px 400px at 85% -10%, rgba(79, 134, 176, 0.35), transparent 60%),
		linear-gradient(180deg, var(--rr-navy) 0%, var(--rr-navy-2) 100%);
	color: #fff;
	padding: 64px 0 72px;
}

.rr-eyebrow {
	display: inline-block;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: #9fc2df;
	margin-bottom: 12px;
}

.rr-hero h1 {
	font-family: var(--rr-head);
	font-weight: 700;
	font-size: clamp(34px, 5vw, 52px);
	line-height: 1.05;
	margin: 0 0 16px;
	color: #fff;
	max-width: 760px;
}

.rr-hero p {
	margin: 0;
	max-width: 640px;
	color: #c4d0de;
	font-size: 18px;
}

/* ---------- Card grid ---------- */

.rr-main { padding: 48px 0 72px; }

.rr-hero + .rr-main .rr-grid { margin-top: -96px; }

.rr-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 28px;
}

.rr-card {
	background: var(--rr-card);
	border: 1px solid var(--rr-line);
	border-radius: var(--rr-radius);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: transform 0.18s ease, box-shadow 0.18s ease;
	box-shadow: 0 1px 2px rgba(13, 21, 40, 0.04);
}

.rr-card:hover {
	transform: translateY(-3px);
	box-shadow: 0 12px 28px rgba(13, 21, 40, 0.12);
}

.rr-card-media {
	display: block;
	aspect-ratio: 144 / 85;
	background: var(--rr-navy);
	overflow: hidden;
}

.rr-card-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.rr-card-fallback {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	background: linear-gradient(135deg, var(--rr-navy), var(--rr-steel));
}

.rr-card-fallback img { width: 64px; height: auto; opacity: 0.9; }

.rr-card-body {
	padding: 20px 22px 22px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	flex: 1;
}

.rr-meta {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 13px;
	color: var(--rr-muted);
}

.rr-badge {
	display: inline-block;
	padding: 2px 9px;
	border-radius: 999px;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	background: #e8f0f7;
	color: var(--rr-steel);
}

.rr-badge-article { background: var(--rr-navy); color: #fff; }

.rr-card h2 {
	font-family: var(--rr-head);
	font-weight: 700;
	font-size: 24px;
	line-height: 1.15;
	margin: 0;
}

.rr-card h2 a { color: var(--rr-ink); }
.rr-card h2 a:hover { color: var(--rr-steel); }

.rr-card-excerpt {
	margin: 0;
	font-size: 15px;
	line-height: 1.6;
	color: var(--rr-body);
	display: -webkit-box;
	-webkit-line-clamp: 4;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.rr-card-more {
	margin-top: auto;
	padding-top: 6px;
	font-size: 14px;
	font-weight: 600;
}


.rr-empty {
	background: var(--rr-card);
	border: 1px solid var(--rr-line);
	border-radius: var(--rr-radius);
	padding: 48px;
	text-align: center;
	color: var(--rr-muted);
}

.rr-pagination {
	display: flex;
	justify-content: center;
	gap: 8px;
	margin-top: 48px;
}

.rr-pagination .page-numbers {
	display: inline-block;
	min-width: 40px;
	padding: 8px 12px;
	text-align: center;
	border-radius: 8px;
	border: 1px solid var(--rr-line);
	background: #fff;
	color: var(--rr-ink);
	font-size: 15px;
}

.rr-pagination .page-numbers.current {
	background: var(--rr-navy);
	border-color: var(--rr-navy);
	color: #fff;
}

/* ---------- Single ---------- */

.rr-single {
	max-width: 820px;
	margin: 0 auto;
}

.rr-back {
	display: inline-block;
	font-size: 14px;
	font-weight: 600;
	margin-bottom: 20px;
}

.rr-single-card {
	background: var(--rr-card);
	border: 1px solid var(--rr-line);
	border-radius: var(--rr-radius);
	overflow: hidden;
}

.rr-single-media img {
	width: 100%;
	aspect-ratio: 144 / 85;
	object-fit: cover;
}

.rr-single-body { padding: 36px 44px 44px; }

.rr-single h1 {
	font-family: var(--rr-head);
	font-weight: 700;
	font-size: clamp(30px, 4.2vw, 42px);
	line-height: 1.1;
	color: var(--rr-ink);
	margin: 12px 0 20px;
}

.rr-content p { margin: 0 0 1.1em; }

.rr-cta {
	margin-top: 32px;
	padding: 24px;
	border-radius: 10px;
	background: var(--rr-bg);
	border: 1px solid var(--rr-line);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	flex-wrap: wrap;
}

.rr-cta p { margin: 0; color: var(--rr-ink); font-weight: 500; }

.rr-button {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 12px 20px;
	border-radius: 8px;
	background: var(--rr-navy);
	color: #fff;
	font-weight: 600;
	font-size: 15px;
	white-space: nowrap;
}

.rr-button:hover { background: var(--rr-steel); color: #fff; }

.rr-author {
	margin-top: 28px;
	display: flex;
	gap: 16px;
	align-items: center;
	padding-top: 24px;
	border-top: 1px solid var(--rr-line);
}

.rr-author img { width: 44px; flex: none; }

.rr-author strong { display: block; color: var(--rr-ink); }

.rr-author span { font-size: 14px; color: var(--rr-muted); }

.rr-page-body { padding: 40px 44px; }

/* ---------- Footer ---------- */

.rr-footer {
	background: var(--rr-navy);
	color: #9fb0c3;
	padding: 48px 0 32px;
	font-size: 15px;
}

.rr-footer-grid {
	display: grid;
	grid-template-columns: 1.4fr 1fr 1fr;
	gap: 32px;
}

.rr-footer h3 {
	font-family: var(--rr-head);
	font-size: 15px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: #fff;
	margin: 0 0 14px;
}

.rr-footer ul { list-style: none; margin: 0; padding: 0; }
.rr-footer li { margin-bottom: 8px; }
.rr-footer a { color: #c9d6e3; }
.rr-footer a:hover { color: #fff; }

.rr-footer-brand p { margin: 12px 0 0; max-width: 360px; }

.rr-footer-bottom {
	margin-top: 36px;
	padding-top: 20px;
	border-top: 1px solid rgba(255, 255, 255, 0.08);
	font-size: 13px;
	color: #7d8ea3;
}

/* ---------- Responsive ---------- */

@media (max-width: 980px) {
	.rr-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
	body { font-size: 16px; }
	.rr-wrap { padding: 0 16px; }
	.rr-nav-toggle { display: inline-block; }
	.rr-nav {
		display: none;
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		background: var(--rr-navy);
		border-top: 1px solid rgba(255, 255, 255, 0.08);
		padding: 8px 16px 16px;
	}
	.rr-nav.is-open { display: block; }
	.rr-nav ul { flex-direction: column; gap: 2px; }
	.rr-header .rr-wrap { position: relative; min-height: 64px; }
	.rr-brand-name { font-size: 18px; }
	.rr-brand img { width: 32px; }
	.rr-hero { padding: 40px 0 88px; }
	.rr-grid { grid-template-columns: 1fr; gap: 20px; }
	.rr-single-body, .rr-page-body { padding: 24px 20px 28px; }
	.rr-footer-grid { grid-template-columns: 1fr; gap: 24px; }
}

@media (max-width: 782px) {
	.admin-bar .rr-header { top: 46px; }
}

@media (prefers-reduced-motion: reduce) {
	.rr-card { transition: none; }
	.rr-card:hover { transform: none; }
}
