:root {
  --bg: #f7f7f5;
  --surface: #fff;
  --text: #161616;
  --muted: #6c6c68;
  --line: #deded8;
  --accent: #111;
  --max: 920px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.7 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a { color: inherit; }

.container {
  width: min(calc(100% - 40px), var(--max));
  margin-inline: auto;
}

.site-header {
  border-bottom: 1px solid var(--line);
  background: rgba(247,247,245,.92);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(12px);
}

.header-inner {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  font-weight: 800;
  text-decoration: none;
  letter-spacing: -.03em;
  font-size: 1.15rem;
}

.brand span { opacity: .45; }

nav { display: flex; gap: 20px; }
nav a { text-decoration: none; color: var(--muted); }
nav a:hover, nav a[aria-current="page"] { color: var(--text); }

.hero {
  padding: 84px 0 42px;
  max-width: 700px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 750;
  letter-spacing: .14em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(3rem, 9vw, 5.5rem);
  line-height: .95;
  letter-spacing: -.065em;
}

.intro {
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 1.15rem;
  max-width: 620px;
}

.toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}

.search { flex: 1 1 240px; }

.search input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  padding: 12px 16px;
  color: var(--text);
  font: inherit;
  outline: none;
}

.search input:focus { border-color: var(--text); }

.tags { display: flex; gap: 7px; flex-wrap: wrap; }

.tag {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  padding: 8px 12px;
  cursor: pointer;
  font: inherit;
}

.tag:hover, .tag.active {
  background: var(--text);
  border-color: var(--text);
  color: #fff;
}

.posts { display: grid; gap: 16px; padding: 28px 0 80px; }

.post-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 28px;
  transition: transform .18s ease, box-shadow .18s ease;
}

.post-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(0,0,0,.06);
}

.post-meta {
  display: flex;
  gap: 8px;
  color: var(--muted);
  font-size: .86rem;
}

.post-card h2 {
  margin: 8px 0 8px;
  font-size: clamp(1.4rem, 3vw, 2rem);
  line-height: 1.2;
  letter-spacing: -.035em;
}

.post-card h2 a { text-decoration: none; }
.post-card h2 a:hover { text-decoration: underline; text-underline-offset: 4px; }

.post-card p { margin: 0; color: var(--muted); max-width: 720px; }

.post-tags { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 18px; }
.post-tag { color: var(--muted); font-size: .78rem; }

.read-more {
  display: inline-block;
  margin-top: 18px;
  font-weight: 700;
  text-decoration: none;
}

.read-more:hover { text-decoration: underline; }

.empty {
  color: var(--muted);
  padding: 48px 0 100px;
  text-align: center;
}

.site-footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .9rem;
}

.site-footer .container {
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.site-footer a { text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 620px) {
  .container { width: min(calc(100% - 28px), var(--max)); }
  .hero { padding-top: 58px; }
  .post-card { padding: 22px; }
  .site-footer .container { align-items: flex-start; flex-direction: column; padding: 22px 0; }
}
