/* kevingraham.com — light, minimal, typography-led. No framework. */

:root {
	--bg: #ffffff;
	--text: #1f2937;
	--muted: #6b7280;
	--accent: #2563eb;
	--accent-hover: #1d4ed8;
	--border: #e5e7eb;
	--card: #f9fafb;
	--code-bg: #f3f4f6;
}

@media (prefers-color-scheme: dark) {
	:root {
		--bg: #111827;
		--text: #d1d5db;
		--muted: #9ca3af;
		--accent: #60a5fa;
		--accent-hover: #93c5fd;
		--border: #273449;
		--card: #1a2334;
		--code-bg: #1a2334;
	}
}

* { box-sizing: border-box; }

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

body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	font-size: 17px;
	line-height: 1.7;
}

.wrap {
	max-width: 72rem;
	margin: 0 auto;
	padding: 0 1.25rem;
}

/* ---- Header ---- */
.skip-link {
	position: absolute;
	left: -9999px;
}
.skip-link:focus {
	left: 0.5rem;
	top: 0.5rem;
	background: var(--bg);
	padding: 0.5rem 1rem;
	z-index: 10;
}

.site-header {
	border-bottom: 1px solid var(--border);
	padding: 1.1rem 0;
}
.header-inner {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 0.5rem 1.5rem;
}
.brand {
	font-size: 1.3rem;
	font-weight: 700;
	color: var(--text);
	text-decoration: none;
	letter-spacing: -0.02em;
}
.brand:hover { color: var(--accent); }
.site-nav {
	display: flex;
	gap: 1.25rem;
}
.site-nav a {
	color: var(--muted);
	text-decoration: none;
	font-size: 0.95rem;
	font-weight: 500;
}
.site-nav a:hover { color: var(--accent); }

/* ---- Main column ---- */
.site-main {
	padding: 2.5rem 1.25rem 3rem;
}

h1, h2, h3, h4 {
	line-height: 1.3;
	letter-spacing: -0.015em;
	margin: 2em 0 0.6em;
}
h1 { font-size: 2rem; margin-top: 0; }
h2 { font-size: 1.45rem; }
h3 { font-size: 1.2rem; }
h4 { font-size: 1.05rem; }

h1.entry-title { margin-bottom: 0.3rem; }

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

p { margin: 0 0 1.1em; }

ul, ol { padding-left: 1.4em; margin: 0 0 1.25em; }
li { margin-bottom: 0.5em; }

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

blockquote {
	margin: 1.5em 0;
	padding: 0.25em 0 0.25em 1.25em;
	border-left: 3px solid var(--border);
	color: var(--muted);
}

img { max-width: 100%; height: auto; border-radius: 6px; }

code, pre {
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 0.88em;
	background: var(--code-bg);
	border-radius: 4px;
}
code { padding: 0.15em 0.35em; }
pre {
	padding: 1rem 1.25rem;
	overflow-x: auto;
	line-height: 1.55;
}
pre code { padding: 0; background: none; }

table {
	border-collapse: collapse;
	width: 100%;
	margin: 0 0 1.5em;
	font-size: 0.95em;
	display: block;
	overflow-x: auto;
}
th, td {
	border: 1px solid var(--border);
	padding: 0.5em 0.75em;
	text-align: left;
}
th { background: var(--card); }

/* ---- Posts ---- */
.entry-meta {
	color: var(--muted);
	font-size: 0.88rem;
	margin-bottom: 1.5rem;
}
.entry-meta a { color: var(--muted); }

article {
	margin-bottom: 2.5rem;
}

/* Legacy WordPress content classes */
.alignright { float: right; margin: 0.25em 0 1em 1.5em; }
.alignleft { float: left; margin: 0.25em 1.5em 1em 0; }
.aligncenter, .alignnone { display: block; margin: 1em auto; }
.wp-caption { max-width: 100%; }
.wp-caption-text, figcaption {
	font-size: 0.85em;
	color: var(--muted);
	text-align: center;
}
figure { margin: 0 0 1.25em; }

/* ---- Listing pages (blog, categories) ---- */
.blog article, .archive article {
	border-bottom: 1px solid var(--border);
	padding-bottom: 1.75rem;
	margin-bottom: 1.75rem;
}
.blog article:last-of-type, .archive article:last-of-type { border-bottom: 0; }
.blog h2.entry-title, .archive h2.entry-title {
	font-size: 1.3rem;
	margin: 0 0 0.4rem;
}
.blog h2.entry-title a, .archive h2.entry-title a { color: var(--text); }
.blog h2.entry-title a:hover, .archive h2.entry-title a:hover {
	color: var(--accent);
	text-decoration: none;
}
.page-title { margin-bottom: 1.5rem; }
.understrap-read-more-link {
	font-weight: 500;
	font-size: 0.95rem;
}
.entry-footer { display: none; }

/* Table of contents box (formerly table-of-contents-plus plugin) */
#toc_container {
	background: var(--card);
	border: 1px solid var(--border);
	border-radius: 6px;
	padding: 1rem 1.25rem;
	margin: 0 0 1.5em;
	font-size: 0.92em;
	display: table;
}
#toc_container p.toc_title { font-weight: 600; margin: 0 0 0.4em; }
#toc_container ul { list-style: none; margin: 0; padding: 0; }
#toc_container ul li { margin-bottom: 0.15em; }
#toc_container ul ul { margin-left: 1.25em; }

/* ---- Forms (contact form) ---- */
.contact-form { max-width: 540px; margin-bottom: 2rem; }
.form-group { margin-bottom: 1.1rem; }
.form-group label {
	display: block;
	font-weight: 500;
	font-size: 0.92rem;
	margin-bottom: 0.3rem;
}
.form-control {
	width: 100%;
	padding: 0.6rem 0.75rem;
	font: inherit;
	font-size: 0.95rem;
	color: var(--text);
	background: var(--bg);
	border: 1px solid var(--border);
	border-radius: 6px;
	transition: border-color 0.15s;
}
.form-control:focus {
	outline: none;
	border-color: var(--accent);
}
textarea.form-control { resize: vertical; }

.btn {
	display: inline-block;
	padding: 0.55rem 1.4rem;
	font: inherit;
	font-size: 0.95rem;
	font-weight: 500;
	border-radius: 6px;
	border: 1px solid transparent;
	cursor: pointer;
	text-decoration: none;
}
.btn-primary {
	background: var(--accent);
	color: #fff;
}
.btn-primary:hover { background: var(--accent-hover); color: #fff; text-decoration: none; }
.btn-secondary {
	background: transparent;
	color: var(--accent);
	border-color: var(--border);
}
.btn-secondary:hover { border-color: var(--accent); text-decoration: none; }

.alert {
	padding: 0.9rem 1.1rem;
	border-radius: 6px;
	margin-bottom: 1.25rem;
	font-size: 0.95rem;
}
.alert-success {
	background: rgba(34, 197, 94, 0.12);
	border: 1px solid rgba(34, 197, 94, 0.35);
}
.alert-danger {
	background: rgba(239, 68, 68, 0.12);
	border: 1px solid rgba(239, 68, 68, 0.35);
}

/* ---- Footer ---- */
.site-footer {
	border-top: 1px solid var(--border);
	padding: 1.5rem 0 2rem;
	color: var(--muted);
	font-size: 0.88rem;
}
.site-footer p { margin: 0; }
.site-footer a { color: var(--muted); text-decoration: underline; }
.site-footer a:hover { color: var(--accent); }

/* ---- Page-specific bits ---- */
/* Homepage portrait */
.home .wp-image-232 { border-radius: 8px; }

@media (max-width: 500px) {
	body { font-size: 16px; }
	h1 { font-size: 1.6rem; }
}
