/* RSI Blog — design wired from ResSec UI */

/* === VARIABLES === */
:root {
	--accent: #0b6bff;
	--accent-soft: rgba(11,107,255,0.2);
	--accent-line: rgba(11,107,255,0.45);
	--bg-1: #0d0d10;
	--bg-2: #080809;
	--surface: #161619;
	--surface-2: #1e1e22;
	--text: #f4f4f6;
	--text-2: #a4a4ad;
	--text-3: #6d6d76;
	--border: rgba(255,255,255,0.08);
	--border-2: rgba(255,255,255,0.15);
	--nav-bg: rgba(20,20,23,0.82);
	--code-bg: #0a0a0c;
	--shadow-sm: 0 1px 2px rgba(0,0,0,0.5);
	--shadow: 0 2px 6px rgba(0,0,0,0.4), 0 14px 34px rgba(0,0,0,0.55);
	--shadow-lg: 0 2px 8px rgba(0,0,0,0.5), 0 28px 70px rgba(0,0,0,0.6);
	--green: #30d158;
	--header-h: 64px;
}

[data-theme="light"] {
	--accent-soft: rgba(11,107,255,0.1);
	--accent-line: rgba(11,107,255,0.28);
	--bg-1: #f4f5f7;
	--bg-2: #e7e9ed;
	--surface: #ffffff;
	--surface-2: #f6f7f9;
	--text: #1d1d1f;
	--text-2: #5c5c63;
	--text-3: #9696a0;
	--border: rgba(0,0,0,0.07);
	--border-2: rgba(0,0,0,0.12);
	--nav-bg: rgba(255,255,255,0.82);
	--code-bg: #1b1b1f;
	--shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
	--shadow: 0 2px 6px rgba(0,0,0,0.05), 0 14px 34px rgba(0,0,0,0.08);
	--shadow-lg: 0 2px 8px rgba(0,0,0,0.06), 0 24px 60px rgba(0,0,0,0.12);
	--green: #1a7f37;
}

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

/* === BASE === */
html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	font-family: 'Nunito', system-ui, -apple-system, sans-serif;
	font-size: 1rem;
	font-weight: 400;
	line-height: 1.6;
	color: var(--text);
	background: linear-gradient(180deg, var(--bg-1) 0%, var(--bg-2) 100%);
	background-attachment: fixed;
	min-height: 100vh;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	word-wrap: break-word;
	overflow-wrap: break-word;
	transition: background 0.4s ease, color 0.4s ease;
}

::selection {
	background: rgba(11,107,255,0.22);
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb {
	background: rgba(130,130,140,0.35);
	border-radius: 8px;
	border: 3px solid transparent;
	background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover {
	background: rgba(130,130,140,0.55);
	background-clip: content-box;
}

/* === TYPOGRAPHY === */
h1, h2, h3, h4, h5, h6 {
	margin-top: 0;
	margin-bottom: 0.5rem;
	font-weight: 800;
	line-height: 1.15;
	color: var(--text);
}

h1 { font-size: 2rem; letter-spacing: -0.6px; }
h2 { font-size: 1.5rem; letter-spacing: -0.4px; }
h3 { font-size: 1.25rem; letter-spacing: -0.2px; }
h4 { font-size: 1.125rem; }
h5 { font-size: 1rem; }
h6 { font-size: 0.9rem; }

p { margin-top: 0; margin-bottom: 1rem; }

a {
	color: var(--accent);
	text-decoration: none;
	transition: color 0.15s;
}
a:hover { text-decoration: underline; }
a:not([href]), a:not([href]):hover { color: inherit; text-decoration: none; }

b, strong { font-weight: 700; }
small { font-size: 0.875em; }

sub, sup { position: relative; font-size: 0.75em; line-height: 0; vertical-align: baseline; }
sub { bottom: -0.25em; }
sup { top: -0.5em; }

abbr[title] { text-decoration: none; cursor: help; border-bottom: 1px dotted var(--text-3); }

blockquote {
	margin: 0 0 1rem;
	padding: 0.75rem 1rem 0.75rem 1.25rem;
	border-left: 3px solid var(--accent);
	color: var(--text-2);
	font-style: italic;
	background: var(--surface-2);
	border-radius: 0 10px 10px 0;
}

ul, ol { padding-left: 1.75rem; margin-top: 0; margin-bottom: 1rem; }
ul ul, ol ol, ul ol, ol ul { margin-bottom: 0; }
dt { font-weight: 700; }
dd { margin-bottom: 0.5rem; margin-left: 0; }

table { width: 100%; border-collapse: collapse; margin-bottom: 1rem; }
thead { border-bottom: 2px solid var(--border-2); }
td, th { padding: 0.4rem 0.75rem; border-bottom: 1px solid var(--border); text-align: left; }
th { font-weight: 700; font-size: 0.875rem; color: var(--text-3); font-family: 'JetBrains Mono', monospace; }
caption { padding: 0.5rem 0; color: var(--text-3); text-align: left; caption-side: bottom; }

hr { border: 0; border-top: 1px solid var(--border); margin: 1.5rem 0; }

figure { margin: 0 0 1rem; display: block; }
figcaption { padding: 0.5rem; font-size: 0.875rem; color: var(--text-3); text-align: center; }

img { max-width: 100%; vertical-align: middle; }
svg { overflow: hidden; vertical-align: middle; }

mark { background: var(--accent-soft); color: var(--accent); }

label { display: inline-block; margin-bottom: 0.5rem; }
button { border-radius: 0; }
input, button, select, optgroup, textarea {
	margin: 0;
	font-family: inherit;
	font-size: inherit;
	line-height: inherit;
}
textarea { overflow: auto; resize: vertical; }
summary { display: list-item; cursor: pointer; }
[hidden] { display: none !important; }

/* === CODE === */
pre, code, kbd, samp {
	font-family: 'JetBrains Mono', SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 0.875em;
}

code {
	background: var(--accent-soft);
	color: var(--accent);
	padding: 2px 7px;
	border-radius: 6px;
	word-wrap: break-word;
}

a > code { color: inherit; }

pre {
	display: block;
	margin: 1.5rem 0;
	padding: 1.25rem 1.5rem;
	overflow: auto;
	background: var(--code-bg);
	border: 1px solid rgba(255,255,255,0.06);
	border-radius: 14px;
	box-shadow: var(--shadow);
}

pre code {
	background: none;
	color: #e8e8ea;
	padding: 0;
	border-radius: 0;
	font-size: inherit;
	word-wrap: normal;
}

/* Hugo syntax highlighter wraps code in .highlight */
.highlight {
	position: relative;
	border-radius: 14px;
	overflow: hidden;
	margin: 1.5rem 0;
	box-shadow: var(--shadow);
	border: 1px solid rgba(255,255,255,0.06);
}

/* Mac header bar — in-flow, pushes pre down */
.highlight::before {
	content: attr(data-lang);
	display: flex;
	align-items: center;
	justify-content: flex-end;
	height: 38px;
	padding: 0 16px;
	background: rgba(255,255,255,0.04);
	border-bottom: 1px solid rgba(255,255,255,0.07);
	font-family: 'JetBrains Mono', monospace;
	font-size: 11.5px;
	color: #6d7178;
	letter-spacing: 0.3px;
	flex-shrink: 0;
}

/* Traffic light dots — positioned over header */
.highlight::after {
	content: '';
	position: absolute;
	top: 13.5px;
	left: 16px;
	width: 11px;
	height: 11px;
	border-radius: 50%;
	background: #ff5f57;
	box-shadow: 18px 0 0 0 #febc2e, 36px 0 0 0 #28c840;
	pointer-events: none;
	z-index: 1;
}

.highlight pre {
	margin: 0;
	border-radius: 0;
	border: 0;
	box-shadow: none;
}

/* Plain pre (terminal blocks) inside post content */
.entry__content > pre {
	position: relative;
	padding-top: calc(38px + 1.25rem);
}

.entry__content > pre::before {
	content: '';
	position: absolute;
	top: 0; left: 0; right: 0;
	height: 38px;
	background: rgba(255,255,255,0.04);
	border-bottom: 1px solid rgba(255,255,255,0.07);
}

.entry__content > pre::after {
	content: '';
	position: absolute;
	top: 13.5px;
	left: 16px;
	width: 11px;
	height: 11px;
	border-radius: 50%;
	background: #ff5f57;
	box-shadow: 18px 0 0 0 #febc2e, 36px 0 0 0 #28c840;
	z-index: 1;
}

kbd {
	padding: 0.15rem 0.35rem;
	font-size: 0.8em;
	font-weight: 700;
	color: var(--text);
	background: var(--surface-2);
	border: 1px solid var(--border-2);
	border-radius: 5px;
}

/* === LAYOUT === */
.primary {
	max-width: none;
	margin: 0;
	padding: 0;
}

.main {
	max-width: 1140px;
	margin: 0 auto;
	padding: 0 28px 60px;
}

/* === HEADER === */
.header {
	position: sticky;
	top: 0;
	z-index: 50;
	backdrop-filter: blur(22px) saturate(180%);
	-webkit-backdrop-filter: blur(22px) saturate(180%);
	background: var(--nav-bg);
	border-bottom: 1px solid var(--border);
	transition: background 0.4s ease;
}

.header__inner {
	max-width: 1140px;
	margin: 0 auto;
	padding: 0 28px;
	height: var(--header-h);
	display: flex;
	align-items: center;
	gap: 16px;
}

/* Logo */
.logo {
	display: flex;
	align-items: center;
	gap: 11px;
	text-decoration: none;
	flex-shrink: 0;
	color: inherit;
}
.logo:hover { text-decoration: none; }

.logo__icon {
	width: 34px;
	height: 34px;
	border-radius: 10px;
	background: var(--accent);
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	font-family: 'JetBrains Mono', monospace;
	font-weight: 700;
	font-size: 14px;
	box-shadow: var(--shadow-sm);
	flex-shrink: 0;
	user-select: none;
}

.logo__text-wrap {
	display: flex;
	flex-direction: column;
	line-height: 1.12;
}

.logo__name {
	font-family: 'JetBrains Mono', monospace;
	font-weight: 700;
	font-size: 15px;
	color: var(--text);
}

.logo__sub {
	font-size: 10px;
	color: var(--text-3);
	font-weight: 600;
	letter-spacing: 0.2px;
}

.header__spacer { flex: 1; }

/* Nav */
.main-nav {
	display: flex;
	align-items: center;
	position: relative;
}

.main-nav__list {
	display: flex;
	align-items: center;
	gap: 2px;
	list-style: none;
	padding: 0;
	margin: 0;
	font-size: 0;
}

.main-nav__item {
	font-size: 1rem;
	display: flex;
}

.main-nav__link {
	display: flex;
	align-items: center;
	padding: 7px 14px;
	border-radius: 9px;
	font-family: 'JetBrains Mono', monospace;
	font-size: 13px;
	font-weight: 500;
	color: var(--text-2);
	text-decoration: none;
	transition: background 0.15s, color 0.15s;
	border: 1px solid transparent;
}
.main-nav__link:hover {
	background: var(--surface-2);
	color: var(--text);
	text-decoration: none;
}

.main-nav__item--active .main-nav__link,
.main-nav__item--active > span.main-nav__text {
	background: var(--surface-2);
	color: var(--accent);
	border-color: var(--accent-line);
	padding: 7px 14px;
	border-radius: 9px;
	font-family: 'JetBrains Mono', monospace;
	font-size: 13px;
	font-weight: 500;
	display: flex;
	align-items: center;
}

/* Mobile burger */
.main-nav__btn {
	display: none;
	width: 38px;
	height: 38px;
	border-radius: 10px;
	border: 1px solid var(--border-2);
	background: var(--surface);
	color: var(--text);
	align-items: center;
	justify-content: center;
	cursor: pointer;
	fill: var(--text);
	transition: background 0.15s;
	padding: 0;
	margin-left: 6px;
}
.main-nav__btn:hover { background: var(--surface-2); }
.main-nav__btn:focus { outline: none; }

.main-nav__btn-box {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
}
:focus > .main-nav__btn-box { box-shadow: inset 0 0 0 2px var(--accent); }
button:not(:-moz-focusring):focus > .main-nav__btn-box { box-shadow: none; }

.main-nav__btn .icon-menu__burger { display: inline; }
.main-nav__btn .icon-menu__x { display: none; }
.main-nav__btn--active .icon-menu__burger { display: none; }
.main-nav__btn--active .icon-menu__x { display: inline; }

/* Theme toggle */
.theme-btn {
	width: 38px;
	height: 38px;
	border-radius: 10px;
	border: 1px solid var(--border-2);
	background: var(--surface);
	color: var(--text);
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: background 0.15s;
	flex-shrink: 0;
	padding: 0;
}
.theme-btn:hover { background: var(--surface-2); }
.theme-btn:focus { outline: none; }
.theme-btn svg { display: block; pointer-events: none; }

/* Mobile nav collapse */
@media (max-width: 767px) {
	.main-nav__btn { display: flex; }

	.js .main-nav__list {
		display: none;
		position: absolute;
		top: calc(var(--header-h) + 1px);
		right: -28px;
		min-width: 180px;
		flex-direction: column;
		align-items: stretch;
		gap: 4px;
		background: var(--nav-bg);
		backdrop-filter: blur(22px);
		border: 1px solid var(--border);
		border-top: none;
		border-radius: 0 0 14px 14px;
		padding: 12px;
		box-shadow: var(--shadow);
	}

	.js .main-nav__list.main-nav__list--active {
		display: flex;
	}

	.main-nav__link { width: 100%; }
}

@media (min-width: 768px) {
	.main-nav__btn { display: none !important; }
	.js .main-nav__list { display: flex !important; position: static; flex-direction: row; border: none; box-shadow: none; padding: 0; background: none; backdrop-filter: none; }
}

/* === HERO (home page) === */
.hero {
	padding: 60px 0 28px;
}

.hero__kicker {
	font-family: 'JetBrains Mono', monospace;
	font-size: 13px;
	color: var(--accent);
	font-weight: 500;
	margin-bottom: 16px;
}

.hero__title {
	font-size: clamp(2rem, 5vw, 3rem);
	line-height: 1.07;
	font-weight: 800;
	letter-spacing: -1.2px;
	margin: 0 0 16px;
	max-width: 760px;
	color: var(--text);
}

.hero__lead {
	font-size: 18px;
	line-height: 1.6;
	color: var(--text-2);
	max-width: 560px;
	margin: 0;
}

/* === CARD GRID === */
.cards {
	display: grid;
	grid-template-columns: 1fr;
	gap: 16px;
	padding: 24px 0 0;
}

.card {
	display: flex;
	width: 100%;
}

/* === BLOCK (generic card) === */
.block {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 18px;
	padding: 24px;
	margin: 0;
	box-shadow: var(--shadow-sm);
}

/* === ENTRY (post card) — horizontal layout === */
.entry.card__box {
	display: flex;
	flex-direction: row;
	align-items: stretch;
	width: 100%;
	cursor: pointer;
	padding: 0;
	overflow: hidden;
	transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}
.entry.card__box:hover {
	transform: translateY(-3px);
	box-shadow: var(--shadow);
	border-color: var(--accent-line);
}

.card__thumb {
	position: relative;
	flex-shrink: 0;
	width: 260px;
}
.card__thumb .entry__featured {
	position: absolute;
	inset: 0;
	margin: 0;
	overflow: hidden;
}
.card__thumb .featured__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	border-radius: 0;
}
.card__body {
	flex: 1;
	padding: 22px 28px;
	display: flex;
	flex-direction: column;
	justify-content: center;
	min-width: 0;
}

.entry__title {
	font-size: 18px;
	line-height: 1.3;
	font-weight: 700;
	margin: 0 0 10px;
	color: var(--text);
	letter-spacing: -0.2px;
}

.title-excerpt { font-size: 18px; }

.entry__title-link {
	color: var(--text);
	text-decoration: none;
	transition: color 0.15s;
}
.entry__title-link:hover {
	color: var(--accent);
	text-decoration: none;
}

.entry__content {
	flex: 1 0 auto;
	font-size: 14px;
	line-height: 1.65;
	color: var(--text-2);
	margin: 0;
	overflow: hidden;
}
.entry__content p:last-child { margin-bottom: 0; }

.entry__excerpt {
	font-size: 13.5px;
	line-height: 1.6;
	color: var(--text-2);
	margin: 6px 0 0;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.entry__meta {
	font-size: 0.8125rem;
	color: var(--text-3);
	font-family: 'JetBrains Mono', monospace;
}
.entry__meta-published, .entry__meta-lastmod { display: block; }

.card__author {
	display: flex;
	align-items: center;
	gap: 8px;
	justify-content: flex-end;
	margin-top: auto;
	padding-top: 10px;
}
.card__author-badge {
	width: 32px;
	height: 32px;
	border-radius: 8px;
	object-fit: cover;
	border: 1px solid var(--border-2);
	display: block;
	flex-shrink: 0;
}
.card__author-name {
	font-size: 0.75rem;
	font-family: 'JetBrains Mono', monospace;
	color: var(--text-3);
}

/* === SEARCH BAR === */
.search-bar {
	position: relative;
	margin: 24px 0 0;
}
.search-bar__input {
	width: 100%;
	padding: 12px 18px 12px 44px;
	font-family: 'Nunito', sans-serif;
	font-size: 0.95rem;
	color: var(--text);
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 12px;
	outline: none;
	transition: border-color 0.15s, box-shadow 0.15s;
	box-sizing: border-box;
}
.search-bar__input::placeholder { color: var(--text-3); }
.search-bar__input:focus {
	border-color: var(--accent-line);
	box-shadow: 0 0 0 3px var(--accent-soft);
}
.search-bar__icon {
	position: absolute;
	left: 14px;
	top: 50%;
	transform: translateY(-50%);
	color: var(--text-3);
	pointer-events: none;
}

.tag-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 14px 0 0;
	padding-bottom: 20px;
	border-bottom: 1px solid var(--border);
}
.tag-filter-btn {
	display: inline-flex;
	align-items: center;
	padding: 4px 13px;
	font-family: 'JetBrains Mono', monospace;
	font-size: 0.75rem;
	color: var(--text-3);
	background: var(--surface-2);
	border: 1px solid var(--border);
	border-radius: 7px;
	cursor: pointer;
	transition: color 0.15s, border-color 0.15s, background 0.15s;
	user-select: none;
}
.tag-filter-btn:hover {
	color: var(--accent);
	border-color: var(--accent-line);
	background: var(--accent-soft);
}
.tag-filter-btn.active {
	color: #fff;
	background: var(--accent);
	border-color: var(--accent);
}

#search-empty {
	display: none;
	text-align: center;
	padding: 48px 0;
	color: var(--text-3);
	font-family: 'JetBrains Mono', monospace;
	font-size: 0.9rem;
}

/* === TAGS PAGE === */
.tag-cloud {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	padding: 24px;
	margin-top: 16px;
}
.tag-pill {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 6px 16px;
	font-family: 'JetBrains Mono', monospace;
	font-size: 0.8rem;
	font-weight: 500;
	color: var(--text-2);
	background: var(--surface-2);
	border: 1px solid var(--border);
	border-radius: 8px;
	text-decoration: none;
	white-space: nowrap;
	transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.tag-pill:hover {
	color: var(--accent);
	border-color: var(--accent-line);
	background: var(--accent-soft);
	text-decoration: none;
}

/* === AUTHORS PAGE === */
.authors-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 20px;
	padding: 24px 0 0;
}
.author-card {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 16px;
	padding: 28px 24px 24px;
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	transition: border-color 0.2s, box-shadow 0.2s;
}
.author-card:hover {
	border-color: var(--border-2);
	box-shadow: var(--shadow);
}
.author-card__avatar {
	width: 80px;
	height: 80px;
	border-radius: 50%;
	object-fit: cover;
	border: 2px solid var(--accent-line);
	margin-bottom: 14px;
}
.author-card__name {
	font-size: 1rem;
	font-weight: 800;
	color: var(--text);
	margin-bottom: 4px;
}
.author-card__role {
	font-size: 0.78rem;
	font-family: 'JetBrains Mono', monospace;
	color: var(--accent);
	margin-bottom: 10px;
}
.author-card__bio {
	font-size: 0.85rem;
	color: var(--text-2);
	line-height: 1.55;
	margin-bottom: 16px;
	flex: 1;
}
.author-card__links {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
	justify-content: center;
	margin-top: 12px;
}
.author-card__link {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 5px 12px;
	border: 1px solid var(--border-2);
	border-radius: 8px;
	font-size: 0.75rem;
	font-family: 'JetBrains Mono', monospace;
	color: var(--text-2);
	text-decoration: none;
	transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.author-card__link:hover {
	color: var(--accent);
	border-color: var(--accent-line);
	background: var(--accent-soft);
	text-decoration: none;
}
.author-card__certs {
	display: flex;
	gap: 6px;
	flex-wrap: wrap;
	justify-content: center;
	margin-top: 10px;
}
.author-card__cert {
	font-size: 0.7rem;
	font-family: 'JetBrains Mono', monospace;
	color: var(--text-3);
	background: var(--surface-2);
	border: 1px solid var(--border);
	border-radius: 6px;
	padding: 2px 8px;
}

.entry__tags { margin-top: 1rem; display: flex; flex-wrap: wrap; gap: 4px; }
.entry__tag {
	display: inline-block;
	padding: 4px 10px;
	font-family: 'JetBrains Mono', monospace;
	font-size: 11.5px;
	color: var(--text-3);
	background: var(--surface-2);
	border: 1px solid var(--border);
	border-radius: 7px;
	transition: color 0.15s, border-color 0.15s;
}
.entry__tag:hover { color: var(--accent); border-color: var(--accent-line); text-decoration: none; }

.entry__footer {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 12px;
	margin-top: 1.25rem;
	padding-top: 1rem;
	border-top: 1px solid var(--border);
}

.entry__share { display: flex; flex-wrap: wrap; }

/* === SINGLE POST === */
.single.block {
	background: none;
	border: none;
	box-shadow: none;
	border-radius: 0;
	padding: 40px 0 0;
}

.single .entry {
	max-width: 780px;
}

.single .entry__title {
	font-size: clamp(1.75rem, 4vw, 2.4rem);
	line-height: 1.12;
	font-weight: 800;
	letter-spacing: -0.8px;
	margin: 0 0 18px;
}

.single .entry__content {
	font-size: 16.5px;
	line-height: 1.78;
	color: var(--text-2);
}

.single .entry__content h1,
.single .entry__content h2,
.single .entry__content h3,
.single .entry__content h4 {
	scroll-margin-top: 90px;
	color: var(--text);
	margin: 2.25rem 0 0.875rem;
}
.single .entry__content h1 { font-size: 1.5rem; }
.single .entry__content h2 { font-size: 1.3rem; }
.single .entry__content h3 { font-size: 1.1rem; }

.single .entry__content p { color: var(--text-2); }

.single .entry__content a { color: var(--accent); }
.single .entry__content a:hover { color: var(--accent); }

.single .entry__content img {
	max-width: 100%;
	border-radius: 10px;
	margin: 1rem 0;
	box-shadow: var(--shadow);
	display: block;
}

.single .entry__content blockquote {
	margin: 1.25rem 0;
}

.single .entry__tags { margin-top: 2rem; }

/* === PAGE TITLE (taxonomy/list header) === */
.page.block {
	background: none;
	border: none;
	box-shadow: none;
	border-radius: 0;
	padding: 40px 0 0;
}

.page__title {
	font-size: 1.5rem;
	font-weight: 800;
	letter-spacing: -0.4px;
	margin-bottom: 4px;
	color: var(--text);
	font-family: 'JetBrains Mono', monospace;
}
.page__title::before { content: '// '; color: var(--accent); font-size: 1rem; }

.page__content { margin-top: 1rem; }
.page__content p:last-child { margin-bottom: 0; }

/* === AUTHOR === */
.author {
	display: flex;
	align-items: flex-start;
	gap: 1rem;
}
.author__avatar { margin: 0; }
.author__img {
	width: 60px;
	height: 60px;
	border-radius: 14px;
	object-fit: cover;
}
.author__body { flex: 1; }
.author__name { font-size: 1rem; font-weight: 700; color: var(--text); margin-bottom: 0.25rem; }

img[alt=rsi-member] {
	max-width: 100%;
	width: 120px;
	height: 120px;
	border-radius: 50%;
	object-fit: cover;
	border: 3px solid var(--accent-line);
	display: block;
	margin: 0.5rem auto;
}

/* Mac-style image window frame */
.entry__content p:has(> img[alt=centralized]) {
	position: relative;
	background: var(--surface-2);
	border: 1px solid var(--border);
	border-radius: 14px;
	overflow: hidden;
	box-shadow: var(--shadow);
	margin: 1.5rem 0;
	padding: 38px 0 0;
}

.entry__content p:has(> img[alt=centralized])::before {
	content: '';
	position: absolute;
	top: 0; left: 0; right: 0;
	height: 38px;
	background: var(--surface);
	border-bottom: 1px solid var(--border);
}

.entry__content p:has(> img[alt=centralized])::after {
	content: '';
	position: absolute;
	top: 13.5px;
	left: 16px;
	width: 11px;
	height: 11px;
	border-radius: 50%;
	background: #ff5f57;
	box-shadow: 18px 0 0 0 #febc2e, 36px 0 0 0 #28c840;
}

img[alt=centralized] {
	display: block;
	margin: 0 auto;
	max-width: 100%;
	border-radius: 0;
	box-shadow: none;
}

/* Fallback for browsers without :has() */
@supports not selector(:has(*)) {
	img[alt=centralized] {
		display: block;
		margin: 1.5rem auto;
		max-width: 92%;
		border-radius: 10px;
		box-shadow: var(--shadow);
	}
}

/* === BREADCRUMB === */
.breadcrumb {
	padding: 0.75rem 0;
	margin: 0;
	color: var(--text-3);
	border: 0;
}
.breadcrumb__list { display: flex; flex-wrap: wrap; padding: 0; margin: 0; list-style: none; gap: 4px; align-items: center; }
.breadcrumb__item { display: flex; align-items: center; font-family: 'JetBrains Mono', monospace; font-size: 12.5px; }
.breadcrumb__item::after { display: block; margin: 0 4px; content: "›"; color: var(--text-3); }
.breadcrumb__item:last-child::after { display: none; }

/* === TOC === */
.toc {
	padding: 1rem;
	margin-bottom: 1.5rem;
	background: var(--surface-2);
	border: 1px solid var(--border);
	border-radius: 14px;
	list-style: none;
	font-family: 'JetBrains Mono', monospace;
	font-size: 13px;
}
.toc[open] { color: var(--text); }
.toc__title { padding: 0.25rem; font-weight: 700; color: var(--accent); cursor: pointer; }
.toc nav { padding: 0.5rem 0; }
.toc nav ul { padding-left: 20px; margin: 0; }
.toc nav ul li { list-style: none; }
.toc nav > ul { padding: 0; }

/* === 404 === */
.page404 { padding: 80px 0; text-align: center; font-family: 'JetBrains Mono', monospace; }
.page404__title { font-size: 5rem; font-weight: 800; color: var(--text-3); margin-bottom: 0.5rem; letter-spacing: -3px; line-height: 1; }
.page404__lead { font-size: 1rem; color: var(--text-3); margin-bottom: 2rem; }
.page404__link {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	background: var(--surface);
	border: 1px solid var(--border-2);
	border-radius: 10px;
	padding: 10px 20px;
	font-size: 13px;
	color: var(--text-2);
	font-family: 'JetBrains Mono', monospace;
	font-weight: 500;
	transition: all 0.2s;
}
.page404__link:hover { border-color: var(--accent-line); color: var(--accent); text-decoration: none; }
.page404__link::before { content: '← '; }

/* === PAGINATION === */
.pagination { text-align: center; padding: 1rem 0; background: none; margin: 0; }
.pagination__item {
	display: inline-block;
	padding: 6px 14px;
	margin: 2px;
	font-family: 'JetBrains Mono', monospace;
	font-size: 13px;
	font-weight: 600;
	border: 1px solid var(--border-2);
	border-radius: 8px;
	color: var(--text-2);
	transition: all 0.2s;
}
.pagination__item:hover { border-color: var(--accent-line); color: var(--accent); text-decoration: none; }
.pagination__item--gap { color: var(--text-3); cursor: default; }

/* === SHARE === */
.share__link { margin: 0.25rem; font-size: 0; }
.share__link:hover { text-decoration: none; }
.share__icon { width: 28px; height: 28px; fill: var(--text-3); stroke: var(--text-3); transition: fill 0.15s, stroke 0.15s; }
.share__icon:hover { fill: var(--accent); stroke: var(--accent); }

/* === FOOTER === */
.footer {
	border-top: 1px solid var(--border);
	background: var(--surface);
	padding: 0;
	margin: 0;
	text-align: left;
}

.footer__inner {
	max-width: 1140px;
	margin: 0 auto;
	padding: 30px 28px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 20px;
	flex-wrap: wrap;
}

.footer__brand {
	display: flex;
	align-items: center;
	gap: 11px;
}

.footer__logo-icon {
	width: 30px;
	height: 30px;
	border-radius: 9px;
	background: var(--accent);
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	font-family: 'JetBrains Mono', monospace;
	font-weight: 700;
	font-size: 12px;
	flex-shrink: 0;
}

.footer__copyright {
	font-size: 13px;
	color: var(--text-3);
}

.footer__links {
	display: flex;
	gap: 20px;
	font-family: 'JetBrains Mono', monospace;
	font-size: 12.5px;
	margin: 0;
}

.footer__link {
	color: var(--text-2);
	transition: color 0.15s;
}
.footer__link:hover { color: var(--accent); text-decoration: none; }

/* === UTILITIES === */
.mt { margin-top: 1rem; }
.mb { margin-bottom: 1rem; }
.mla { margin-left: auto; }
.tal { text-align: left; }
.tar { text-align: right; }
.center { text-align: center; }

/* === RESPONSIVE === */
@media (max-width: 860px) {
	.cards { grid-template-columns: 1fr; }
}

/* Tablet: narrow the card thumb */
@media (max-width: 700px) {
	.card__thumb { width: 200px; }
}

/* Mobile: stack cards vertically */
@media (max-width: 560px) {
	.entry.card__box {
		flex-direction: column;
	}
	.card__thumb {
		width: 100%;
		height: 180px;
		flex-shrink: 0;
	}
	.card__thumb .entry__featured {
		border-radius: 0;
	}
	.card__body {
		padding: 16px 18px 18px;
	}
	.entry__title { font-size: 1rem; }
	.entry__excerpt { font-size: 13px; }

	/* Authors grid: single column */
	.authors-grid { grid-template-columns: 1fr; }

	/* Nav dropdown: keep inside viewport */
	.js .main-nav__list {
		right: 0;
		left: 0;
		border-radius: 0 0 14px 14px;
	}
}

@media (max-width: 600px) {
	.header__inner { padding: 0 16px; gap: 10px; }
	.logo__sub { display: none; }
	.main { padding: 0 16px 40px; }
	.hero { padding: 40px 0 20px; }
	.hero__title { font-size: 1.75rem; letter-spacing: -0.5px; }
	.hero__lead { font-size: 16px; }
	.single .entry__title { font-size: 1.65rem; }
	.single .entry__content { font-size: 15px; line-height: 1.65; }
	.footer__inner { padding: 24px 16px; }

	/* Post content: keep code/tables from overflowing */
	.entry__content pre,
	.entry__content table {
		overflow-x: auto;
		display: block;
		max-width: 100%;
	}
	.entry__content img { max-width: 100%; height: auto; }
	.pagination { gap: 6px; }
}

/* === PRINT === */
@media print {
	.header, .main-nav, .footer, .theme-btn { display: none; }
	body { background: white; color: black; }
	a { color: black; text-decoration: underline; }
	.block { border: 1px solid #ccc; }
	mark { background: #e6e6e6; color: black; }
}
