/* Job Baer Research Blog — clean, readable, accessible */

:root {
  --bg: #faf9f7;
  --surface: #ffffff;
  --text: #1a1a1a;
  --text-muted: #5c5c5c;
  --accent: #2c5f4a;
  --accent-hover: #1e4435;
  --border: #e4e1db;
  --blockquote-bg: #f3f1ed;
  --focus: #2563eb;
  --max-width: 42rem;
  --font-sans: "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-serif: "Georgia", "Times New Roman", serif;
  --radius: 8px;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141414;
    --surface: #1e1e1e;
    --text: #f0efe9;
    --text-muted: #a8a8a0;
    --accent: #7cb89a;
    --accent-hover: #a0d4b8;
    --border: #333330;
    --blockquote-bg: #252522;
    --focus: #60a5fa;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  }
}

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

html {
  font-size: 112.5%; /* 18px base for readability */
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Skip link for accessibility */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  background: var(--accent);
  color: #fff;
  padding: 0.5rem 1rem;
  z-index: 100;
  border-radius: var(--radius);
  text-decoration: none;
}

.skip-link:focus {
  top: 0.5rem;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}

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

a:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

/* Header / Nav */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0.85rem 1.25rem;
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: var(--shadow);
}

.header-inner {
  max-width: calc(var(--max-width) + 4rem);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
}

.site-title {
  font-size: 1.1rem;
  font-weight: 650;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
}

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

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

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

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--accent);
}

.site-nav a[aria-current="page"] {
  text-decoration: underline;
  text-underline-offset: 0.3em;
}

/* Main */
.site-main {
  flex: 1;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
}

.page-header {
  margin-bottom: 2rem;
}

.page-header h1 {
  font-family: var(--font-serif);
  font-size: 1.85rem;
  font-weight: 600;
  line-height: 1.25;
  margin: 0 0 0.5rem;
  letter-spacing: -0.02em;
}

.page-header .lede {
  color: var(--text-muted);
  margin: 0;
  font-size: 1.05rem;
}

/* Post list */
.post-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.post-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.35rem;
  box-shadow: var(--shadow);
  transition: border-color 0.15s ease;
}

.post-card:hover {
  border-color: var(--accent);
}

.post-card h2 {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 0.35rem;
  line-height: 1.3;
}

.post-card h2 a {
  color: var(--text);
  text-decoration: none;
}

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

.post-meta {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 0 0 0.65rem;
}

.post-excerpt {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Article (post page) */
.article-header {
  margin-bottom: 1.75rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}

.article-header h1 {
  font-family: var(--font-serif);
  font-size: 1.85rem;
  font-weight: 600;
  line-height: 1.25;
  margin: 0 0 0.5rem;
  letter-spacing: -0.02em;
}

.prose {
  font-family: var(--font-serif);
  font-size: 1.05rem;
}

.prose h2 {
  font-family: var(--font-sans);
  font-size: 1.3rem;
  font-weight: 650;
  margin: 2rem 0 0.75rem;
  letter-spacing: -0.01em;
}

.prose h3 {
  font-family: var(--font-sans);
  font-size: 1.1rem;
  font-weight: 650;
  margin: 1.5rem 0 0.5rem;
}

.prose p {
  margin: 0 0 1.1rem;
}

.prose ul,
.prose ol {
  margin: 0 0 1.1rem;
  padding-left: 1.4rem;
}

.prose li {
  margin-bottom: 0.35rem;
}

.prose li + li {
  margin-top: 0.25rem;
}

.prose blockquote {
  margin: 0 0 1.25rem;
  padding: 0.85rem 1.1rem;
  background: var(--blockquote-bg);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 0.95rem;
}

.prose blockquote p:last-child {
  margin-bottom: 0;
}

.prose code {
  font-family: ui-monospace, "Cascadia Code", "SF Mono", Menlo, monospace;
  font-size: 0.88em;
  background: var(--blockquote-bg);
  padding: 0.1em 0.35em;
  border-radius: 4px;
  white-space: nowrap;
}

.prose pre {
  background: var(--blockquote-bg);
  padding: 1rem;
  border-radius: var(--radius);
  overflow-x: auto;
  margin: 0 0 1.25rem;
  border: 1px solid var(--border);
}

.prose pre code {
  background: none;
  padding: 0;
}

.prose strong {
  font-weight: 700;
}

.prose em {
  font-style: italic;
}

.back-link {
  display: inline-block;
  margin-top: 2rem;
  font-family: var(--font-sans);
  font-size: 0.95rem;
}

/* About */
.about-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.5rem;
  box-shadow: var(--shadow);
}

.about-card p:last-child {
  margin-bottom: 0;
}

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

.site-footer p {
  margin: 0;
}

/* Empty state */
.empty-state {
  color: var(--text-muted);
  text-align: center;
  padding: 2rem 1rem;
}

@media (max-width: 480px) {
  html {
    font-size: 100%;
  }

  .page-header h1,
  .article-header h1 {
    font-size: 1.5rem;
  }

  .site-main {
    padding: 1.5rem 1rem 2.5rem;
  }
}
