:root {
  --bg: #faf9f7;
  --text: #1a1a1a;
  --muted: #5c5c5c;
  --accent: #2563eb;
  --border: #e5e2dd;
  --card: #ffffff;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "Cascadia Code", "Source Code Pro", monospace;
  --max-width: 42rem;
  --wide: 52rem;
}

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

html {
  font-size: 18px;
  -webkit-text-size-adjust: 100%;
  /* In-page targets stay clear under sticky header (WCAG 2.2 focus not obscured) */
  scroll-padding-top: 5rem;
}

body {
  margin: 0;
  font-family: var(--font);
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}

.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--card);
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-inner {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-brand {
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
}

.site-brand:hover {
  color: var(--accent);
}

.site-nav {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
}

.site-nav a:hover {
  color: var(--accent);
}

/* WCAG 2.4.7 Focus Visible (AA) */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.site-main {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}

.site-footer {
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  padding: 1.5rem;
}

.page h1,
.blog-post h1 {
  margin-top: 0;
  line-height: 1.25;
}

.post-header {
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.post-meta time {
  font-variant-numeric: tabular-nums;
}

.tag-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tag-list a,
.tag-pill {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: #eef2ff;
  color: var(--accent);
  text-decoration: none;
  font-size: 0.8rem;
}

.tag-list a:hover,
.tag-pill:hover {
  background: #dbeafe;
}

.post-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
}

.post-list li {
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border);
}

.post-list li:last-child {
  border-bottom: none;
}

.post-list a {
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
}

.post-list a:hover {
  color: var(--accent);
}

.post-list-meta {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.post-list-meta .tag-pill {
  margin-left: 0.35rem;
}

.tag-index-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag-index-list a {
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 0.35rem;
  text-decoration: none;
  color: var(--text);
  background: var(--card);
}

.tag-index-list a:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Resume sections */
.resume-section {
  margin-bottom: 2rem;
}

.resume-section h2 {
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.35rem;
  margin-bottom: 0.75rem;
}

.resume-entry {
  margin-bottom: 1.25rem;
}

.resume-entry h3 {
  margin: 0 0 0.15rem;
  font-size: 1.05rem;
}

.resume-entry .meta {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.skill-tags li {
  padding: 0.2rem 0.6rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 0.25rem;
  font-size: 0.85rem;
}

/* Markdown body */
.post-body h2,
.page h2 {
  margin-top: 1.75rem;
}

.post-body img,
.page img {
  max-width: 100%;
  height: auto;
  border-radius: 0.25rem;
}

.post-body code,
.page code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: #f0eeea;
  padding: 0.1em 0.35em;
  border-radius: 0.2rem;
}

.post-body pre,
.page pre {
  overflow-x: auto;
  padding: 1rem;
  background: #1e1e1e;
  color: #f5f5f5;
  border-radius: 0.35rem;
}

.post-body pre code,
.page pre code {
  background: none;
  padding: 0;
}

/* Recommendations hub */
.recs-intro {
  margin-bottom: 2rem;
  color: var(--muted);
}

.recs-section {
  margin-bottom: 2rem;
}

.recs-section h2 {
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.35rem;
  margin-bottom: 0.75rem;
}

.recs-link-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.recs-link-list li {
  margin-bottom: 0.35rem;
}

.recs-link-list a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

.recs-link-list a:hover {
  text-decoration: underline;
}

/* Single recommendation page */
.rec-header {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.rec-header h1 {
  margin: 0.35rem 0 0;
}

.rec-category {
  display: inline-block;
  margin: 0;
  padding: 0.2rem 0.55rem;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: capitalize;
  letter-spacing: 0.02em;
  border-radius: 0.25rem;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--muted);
}

.rec-category--restaurant {
  border-color: #c4b5a0;
  background: #faf6ef;
}

.rec-category--location {
  border-color: #93c5fd;
  background: #eff6ff;
}

.rec-category--church {
  border-color: #c7d2fe;
  background: #eef2ff;
}

.rec-review {
  margin-top: 0.5rem;
}

.rec-review h2 {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin: 0 0 0.75rem;
}

.rec-review-body :first-child {
  margin-top: 0;
}

@media (max-width: 480px) {
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}
