:root {
  --text: #1a1a1a;
  --muted: #6b7280;
  --border: #e5e7eb;
  --accent: #4f6eba;
  --nav-bg: #111827;
  --nav-text: #d1d5db;
  --bg: #ffffff;
  --mono: 'SF Mono', 'Fira Code', Consolas, 'Liberation Mono', monospace;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --max: 740px;
}

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

html { font-size: 16px; }

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

/* ── Navigation ─────────────────────────────────────────── */

.site-nav {
  background: var(--nav-bg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  min-height: 52px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-name {
  color: #fff;
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.04em;
  text-decoration: none;
}

.nav-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.nav-links a {
  color: var(--nav-text);
  text-decoration: none;
  font-size: 0.875rem;
}

.nav-links a:hover {
  color: #fff;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 4px;
  line-height: 0;
}

/* ── Content ────────────────────────────────────────────── */

.content {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

/* ── Typography ─────────────────────────────────────────── */

h1 { font-size: 1.875rem; font-weight: 700; line-height: 1.25; margin: 0 0 1rem; }
h2 { font-size: 1.375rem; font-weight: 600; line-height: 1.3; margin: 2.5rem 0 0.75rem; }
h3 { font-size: 1.125rem; font-weight: 600; line-height: 1.4; margin: 2rem 0 0.5rem; }
h4 { font-size: 1rem; font-weight: 600; margin: 1.5rem 0 0.4rem; }
p { margin: 0 0 1.25rem; }

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

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

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

ul, ol { padding-left: 1.5em; margin: 0 0 1.25rem; }
li { margin-bottom: 0.25rem; }

/* ── Page header ────────────────────────────────────────── */

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

.page-header h1 { margin-bottom: 0; }

/* ── Post list ──────────────────────────────────────────── */

.posts { margin-top: 0; }

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

.post:first-child { padding-top: 0; }

.post-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 0.35rem;
}

.post-title a { color: var(--text); }
.post-title a:hover { color: var(--accent); text-decoration: none; }

.post-meta {
  font-size: 0.8125rem;
  color: var(--muted);
  margin: 0 0 0.75rem;
}

.post-category {
  display: inline;
  background: var(--accent);
  color: #fff;
  font-size: 0.725rem;
  padding: 0.15em 0.55em;
  border-radius: 3px;
  text-decoration: none;
}

.post-category:hover { opacity: 0.85; text-decoration: none; }

.post-description {
  font-size: 0.9375rem;
  color: #374151;
}

.post-description p { margin-bottom: 0; }

/* ── Article ────────────────────────────────────────────── */

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

.article-header h1 { margin-bottom: 0.5rem; }

.article-body {
  font-size: 1rem;
  line-height: 1.8;
}

.article-body h1,
.article-body h2,
.article-body h3,
.article-body h4 {
  margin-top: 2.5rem;
}

.article-body img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
}

.article-body blockquote {
  border-left: 3px solid var(--accent);
  margin: 1.5rem 0;
  padding: 0.5rem 1.25rem;
  color: var(--muted);
}

.article-tags {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.875rem;
}

/* ── Code ───────────────────────────────────────────────── */

code {
  font-family: var(--mono);
  font-size: 0.85em;
  background: #f3f4f6;
  padding: 0.15em 0.4em;
  border-radius: 3px;
  color: #be123c;
}

pre {
  font-family: var(--mono);
  font-size: 0.85rem;
  background: #f8f9fa;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.25rem;
  overflow-x: auto;
  line-height: 1.6;
  margin: 1.5rem 0;
}

pre code {
  background: none;
  padding: 0;
  color: inherit;
  font-size: inherit;
}

.highlight { margin: 1.5rem 0; }
.highlight pre { margin: 0; }

/* ── Archives ───────────────────────────────────────────── */

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

.archivelist > li { margin-bottom: 2rem; }

.archivelist > li h2 {
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin: 0 0 0.5rem;
}

.archivelist ol {
  list-style: none;
  padding: 0;
  margin: 0;
}

.archivelist ol li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--border);
  gap: 1rem;
}

.archivelist ol li .date {
  font-size: 0.8125rem;
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
}

/* ── Tags / categories ──────────────────────────────────── */

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

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

/* ── Section subhead ────────────────────────────────────── */

.content-subhead {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin: 2.5rem 0 1rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border);
}

/* ── Grid utilities ─────────────────────────────────────── */

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  align-items: center;
}

.grid-4 img, .grid-2 img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ── Buttons ────────────────────────────────────────────── */

.btn {
  display: inline-block;
  padding: 0.3em 0.75em;
  background: var(--accent);
  color: #fff !important;
  border-radius: 4px;
  font-size: 0.875rem;
  text-decoration: none !important;
  margin-right: 0.25em;
}

.btn:hover { opacity: 0.85; }

/* ── Video embeds ───────────────────────────────────────── */

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

.video-list li { margin-bottom: 2.5rem; }
.video-list h4 { margin: 0 0 0.75rem; }

.video-wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  max-width: 100%;
  background: #000;
  border-radius: 4px;
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ── Citations ──────────────────────────────────────────── */

.cite {
  text-indent: -2em;
  padding-left: 2em;
  margin-bottom: 0.75rem;
  font-size: 0.9375rem;
}

.indent { padding-left: 2em; }

/* ── Profile / social grids (dillon theme) ──────────────── */

.profile-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
  align-items: center;
}

.social-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
  align-items: center;
}

.social-grid a { display: block; }
.social-grid img { max-width: 100%; height: auto; display: block; }

.positions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

/* ── Responsive ─────────────────────────────────────────── */

@media (max-width: 640px) {
  .nav-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 52px;
    left: 0;
    right: 0;
    background: var(--nav-bg);
    flex-direction: column;
    padding: 1rem 1.5rem;
    gap: 0.875rem;
    align-items: flex-start;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  }

  .nav-links.open { display: flex; }

  h1 { font-size: 1.5rem; }
  h2 { font-size: 1.25rem; }

  .grid-4,
  .profile-grid,
  .social-grid {
    grid-template-columns: 1fr 1fr;
  }

  .grid-2,
  .positions-grid {
    grid-template-columns: 1fr;
  }

  .content { padding: 1.75rem 1.25rem 3rem; }
}
