:root {
  --ink: #202329;
  --muted: #6d7078;
  --paper: #f7f5f0;
  --card: #fffdf9;
  --accent: #d65a3a;
  --accent-dark: #a83d27;
  --line: #e5dfd5;
  --max-width: 1040px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.6;
}

a {
  color: inherit;
}

.site-shell {
  width: min(calc(100% - 3rem), var(--max-width));
  margin: 0 auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--line);
  font-family: Arial, Helvetica, sans-serif;
}

.brand {
  color: var(--ink);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
}

nav {
  display: flex;
  gap: 1.5rem;
}

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

nav a:hover,
.site-footer a:hover,
.text-link:hover,
.back-link:hover {
  color: var(--accent-dark);
}

.hero {
  max-width: 760px;
  padding: 8rem 0 7rem;
}

.eyebrow {
  margin: 0 0 1rem;
  color: var(--accent-dark);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  line-height: 1.1;
}

h1 {
  max-width: 700px;
  margin-bottom: 1.5rem;
  font-size: clamp(3.25rem, 9vw, 6.5rem);
  font-weight: 400;
  letter-spacing: -0.065em;
}

.hero-lead {
  max-width: 560px;
  margin-bottom: 2rem;
  color: var(--muted);
  font-size: 1.25rem;
}

.button {
  display: inline-flex;
  gap: 0.7rem;
  align-items: center;
  padding: 0.8rem 1.1rem;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: #fff;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
  transition: background 160ms ease, border-color 160ms ease;
}

.button:hover {
  border-color: var(--accent);
  background: var(--accent);
}

.blog-section {
  padding: 5rem 0 7rem;
  border-top: 1px solid var(--line);
}

.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 2rem;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(2.25rem, 5vw, 4rem);
  font-weight: 400;
  letter-spacing: -0.05em;
}

.section-heading > p:last-child {
  max-width: 300px;
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}

.post-card {
  min-height: 250px;
  padding: 1.5rem;
  border: 1px solid var(--line);
  background: var(--card);
}

.post-card h3 {
  margin-bottom: 0.75rem;
  font-size: 1.55rem;
  font-weight: 400;
}

.post-card p:not(.post-meta) {
  color: var(--muted);
  font-size: 0.95rem;
}

.post-meta {
  margin-bottom: 2rem;
  color: var(--accent-dark);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

code {
  padding: 0.15rem 0.3rem;
  background: #eee9df;
  font-size: 0.88em;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  padding: 1.5rem 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.8rem;
}

.site-footer p {
  margin: 0;
}

.post-layout {
  max-width: 760px;
  padding: 5rem 0 7rem;
}

.back-link,
.text-link {
  color: var(--accent-dark);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
}

.post-header {
  padding: 4rem 0 3rem;
  border-bottom: 1px solid var(--line);
}

.post-header h1 {
  max-width: 720px;
  margin-bottom: 1rem;
  font-size: clamp(2.75rem, 7vw, 5.5rem);
}

.post-header .post-meta {
  margin-bottom: 0;
}

.post-content {
  padding-top: 3rem;
  font-size: 1.1rem;
}

.post-content h2 {
  margin: 2.5rem 0 0.75rem;
  font-size: 2rem;
  font-weight: 400;
}

.post-content h3 {
  margin: 2rem 0 0.5rem;
  font-size: 1.4rem;
  font-weight: 400;
}

.post-content blockquote {
  margin: 2rem 0;
  padding-left: 1.25rem;
  border-left: 3px solid var(--accent);
  color: var(--muted);
  font-style: italic;
}

@media (max-width: 640px) {
  .site-shell {
    width: min(calc(100% - 2rem), var(--max-width));
  }

  .hero {
    padding: 5rem 0 5rem;
  }

  .section-heading {
    display: block;
  }

  .section-heading h2 {
    margin-bottom: 1rem;
  }

  .site-footer {
    display: block;
  }

  .site-footer a {
    display: inline-block;
    margin-top: 0.5rem;
  }
}

.site-visitor-counter {
  position: fixed;
  right: clamp(0.75rem, 2vw, 1.5rem);
  bottom: 0.65rem;
  z-index: 20;
  color: rgba(199, 229, 255, 0.48);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
  pointer-events: none;
}
