:root {
  --bg: #ededed;
  --text: #222;
  --muted: #666;
  --line: #d7d7d7;
  --white: #fff;
  --code-bg: #e2e2e2;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: Inter, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.4;
}

a {
  color: var(--text);
}

.container {
  width: min(680px, 92%);
  margin: 0 auto;
}

.muted {
  color: var(--muted);
}

.center {
  text-align: center;
}

/* Nav (same look as philipmchugh.com) */
.topbar {
  position: sticky;
  top: 0;
  z-index: 99;
  background: rgba(237, 237, 237, 0.95);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(6px);
}

.nav-wrap {
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  text-decoration: none;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}

.menu {
  display: flex;
  gap: 1rem;
}

.menu a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s ease;
}

.menu a:hover,
.menu a.active {
  color: var(--text);
}

.page {
  padding: 2.5rem 0 4rem;
}

/* Headings */
h1 {
  font-size: clamp(1.35rem, 2.2vw, 1.75rem);
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: center;
  line-height: 1.35;
}

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

.post-header time,
.post-list time {
  display: block;
  color: var(--muted);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
}

.post-header time {
  margin-top: 0.6rem;
}

/* Post list */
.post-list {
  list-style: none;
}

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

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

.post-list h2 {
  font-size: 1.2rem;
  font-weight: 500;
  margin: 0.25rem 0 0.4rem;
}

.post-list h2 a {
  text-decoration: none;
}

.post-list h2 a:hover {
  text-decoration: underline;
}

.post-list p {
  color: var(--muted);
  line-height: 1.6;
}

.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 2rem;
  font-size: 0.9rem;
}

/* Post body */
.prose {
  font-size: 1.05rem;
  line-height: 1.75;
}

.prose > * + * {
  margin-top: 1.1rem;
}

.prose h2,
.prose h3,
.prose h4 {
  font-weight: 500;
  line-height: 1.3;
  margin-top: 2.2rem;
}

.prose h2 { font-size: 1.35rem; }
.prose h3 { font-size: 1.15rem; }

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

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

.prose img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 1.75rem auto;
}

.prose figure img {
  margin-bottom: 0.5rem;
}

.prose figure {
  margin: 1.75rem 0;
}

.prose figcaption {
  text-align: center;
  color: var(--muted);
  font-size: 0.88rem;
}

.prose blockquote {
  border-left: 3px solid var(--line);
  padding-left: 1rem;
  color: var(--muted);
}

.prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
  background: var(--code-bg);
  padding: 0.1em 0.35em;
  border-radius: 3px;
}

.prose pre {
  background: var(--code-bg);
  padding: 1rem;
  overflow-x: auto;
  line-height: 1.5;
  border-radius: 4px;
}

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

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

.prose table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.95rem;
}

.prose th,
.prose td {
  border-bottom: 1px solid var(--line);
  padding: 0.5rem;
  text-align: left;
}

.back {
  margin-top: 3rem;
  font-size: 0.9rem;
}

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

.site-footer a {
  color: var(--muted);
}

@media (max-width: 480px) {
  .page {
    padding-top: 1.75rem;
  }

  .prose {
    font-size: 1rem;
  }
}
