/* The Lower Middle — editorial static theme */
:root {
  --ink: #151822;
  --paper: #f4f1ea;
  --mist: #e8e4dc;
  --accent: #3d7c78;
  --accent-hot: #c45b5b;
  --violet: #2c365e;
  --radius: 14px;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Source Sans 3", system-ui, sans-serif;
  background: radial-gradient(1200px 800px at 10% -10%, rgba(61,124,120,.18), transparent),
              radial-gradient(900px 600px at 110% 20%, rgba(44,54,94,.2), transparent),
              var(--paper);
  color: var(--ink);
  line-height: 1.65;
  min-height: 100vh;
}
.grain {
  pointer-events: none;
  position: fixed;
  inset: 0;
  opacity: 0.06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
  z-index: 0;
}
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(12px);
  background: rgba(244,241,234,.82);
  border-bottom: 1px solid rgba(21,24,34,.08);
}
.site-nav {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
}
.brand {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--violet);
  text-decoration: none;
  letter-spacing: -0.02em;
}
.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  align-items: center;
}
.nav-links a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.92rem;
  padding: 0.35rem 0;
  border-bottom: 2px solid transparent;
}
.nav-links a:hover { border-bottom-color: var(--accent); color: var(--violet); }
.nav-links a.active { border-bottom-color: var(--accent-hot); color: var(--violet); }
.wrap {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
}
.hero {
  display: grid;
  gap: 1.5rem;
  padding: 2.5rem 2rem;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(44,54,94,.12), rgba(61,124,120,.12));
  border: 1px solid rgba(21,24,34,.08);
  margin-bottom: 2.5rem;
}
.hero h1 {
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(2rem, 4vw, 2.85rem);
  line-height: 1.15;
  margin: 0;
  color: var(--violet);
}
.hero .lede {
  font-size: 1.12rem;
  max-width: 58ch;
  margin: 0;
  color: #333844;
}
.tagline {
  display: inline-flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.tagline span {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: rgba(44,54,94,.1);
  color: var(--violet);
}
.projects-note {
  margin-top: 1rem;
  padding: 1rem 1.25rem;
  border-left: 4px solid var(--accent);
  background: rgba(255,255,255,.55);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.projects-note strong { color: var(--violet); }
.section-title {
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.5rem;
  color: var(--violet);
  margin: 2rem 0 1rem;
}
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}
.card {
  display: flex;
  flex-direction: column;
  background: rgba(255,255,255,.65);
  border: 1px solid rgba(21,24,34,.08);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 40px rgba(21,24,34,.12);
}
.card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
}
.card-body { padding: 1rem 1.1rem 1.15rem; flex: 1; display: flex; flex-direction: column; gap: 0.5rem; }
.card-body h2 {
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.15rem;
  margin: 0;
  line-height: 1.3;
  color: var(--violet);
}
.meta {
  font-size: 0.82rem;
  color: #5c6270;
}
.pills { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.pill {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  background: var(--mist);
  color: var(--violet);
}
.card .blurb {
  font-size: 0.92rem;
  color: #444954;
  margin: 0;
  flex: 1;
}
.article-hero {
  margin-bottom: 1.5rem;
}
.article-hero img {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid rgba(21,24,34,.08);
}
.article-head h1 {
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(1.75rem, 3.5vw, 2.4rem);
  color: var(--violet);
  margin: 0 0 0.5rem;
  line-height: 1.2;
}
.prose {
  font-size: 1.05rem;
  max-width: 72ch;
}
.prose p { margin: 0 0 1rem; }
.prose h2, .prose h3, .prose h4 {
  font-family: "Fraunces", Georgia, serif;
  color: var(--violet);
  margin: 1.75rem 0 0.75rem;
  line-height: 1.25;
}
.prose ul, .prose ol { margin: 0 0 1rem 1.25rem; padding: 0; }
.prose li { margin-bottom: 0.35rem; }
.prose a { color: var(--accent); }
.prose strong { color: #222733; }
.back-link {
  display: inline-block;
  margin-bottom: 1.25rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}
.back-link:hover { text-decoration: underline; }
.site-footer {
  position: relative;
  z-index: 1;
  padding: 2rem 1.25rem;
  text-align: center;
  font-size: 0.85rem;
  color: #6b7280;
  border-top: 1px solid rgba(21,24,34,.08);
  background: rgba(232,228,220,.6);
}
@media (max-width: 640px) {
  .hero { padding: 1.75rem 1.25rem; }
}
