:root {
  /* Serene brand palette (from entelligentsia.in) */
  --ink: #0c4a6e;        /* deep serene blue — headings */
  --body: #334155;       /* slate — body text */
  --muted: #64748b;      /* muted slate — captions */
  --hair: #e2e8f0;       /* hairline rules */
  --sky: #0ea5e9;        /* primary sky */
  --sky-deep: #0369a1;
  --sage: #86efac;       /* tools accent */
  --lavender: #a78bfa;   /* evidence accent */
  --lime: #8bc34a;       /* logo mark green — interactive accent */
  --wash: #f0f9ff;       /* serene-50 background wash */
  --paper: #ffffff;

  --serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --wrap: 940px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--body);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 1.75rem;
}

/* Masthead */
.masthead {
  border-bottom: 1px solid var(--hair);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 10;
}
.masthead-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 104px;
}
.brand-logo { height: 60px; width: auto; display: block; }
.masthead-nav { display: flex; align-items: center; gap: 0.75rem; }
.nav-link {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--muted);
  padding: 0.4rem 0.6rem;
  transition: color 0.18s;
}
.nav-link:hover { color: var(--sky-deep); }
.gh-link {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--muted);
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--hair);
  border-radius: 7px;
  transition: color 0.18s, border-color 0.18s;
}
.gh-link:hover { color: var(--sky-deep); border-color: var(--sky); }

/* Hero — serene wash, serif statement */
.hero {
  padding: 5.5rem 0 4rem;
  position: relative;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0 -50vw;
  top: -104px;
  height: calc(100% + 104px);
  background: radial-gradient(ellipse 70% 80% at 25% 0%, var(--wash), transparent 70%);
  z-index: -1;
}
.eyebrow {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  color: var(--sky-deep);
  margin-bottom: 1.5rem;
}
.hero-head {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.3rem, 5.2vw, 3.6rem);
  line-height: 1.12;
  letter-spacing: -0.015em;
  color: var(--ink);
  max-width: 15ch;
}
.hero-sub {
  margin-top: 1.75rem;
  max-width: 56ch;
  font-size: 1.12rem;
  color: var(--body);
}

/* Index groups */
.index { margin-top: 2.5rem; }
.group-head {
  display: flex;
  align-items: baseline;
  gap: 0.9rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--ink);
  margin-bottom: 0.25rem;
}
.group-title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.02rem;
  color: var(--ink);
  letter-spacing: 0.01em;
}
.group-tag {
  font-family: var(--mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.12rem 0.5rem;
  border-radius: 999px;
  color: var(--body);
}
.tag-tools { background: rgba(134, 239, 172, 0.28); }
.tag-ev { background: rgba(167, 139, 250, 0.22); }

/* Entry rows — the editorial index */
.entry {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  align-items: start;
  padding: 1.6rem 1rem 1.6rem 0.25rem;
  border-bottom: 1px solid var(--hair);
  position: relative;
  transition: background 0.18s;
}
.entry::after {
  content: '↗';
  position: absolute;
  right: 0.15rem;
  top: 1.55rem;
  font-family: var(--mono);
  color: var(--hair);
  transition: color 0.18s, transform 0.18s;
}
.entry:hover {
  background: linear-gradient(90deg, var(--wash), transparent 85%);
}
.entry:hover::after { color: var(--lime); transform: translate(2px, -2px); }

.entry-name {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.5rem;
  color: var(--ink);
  line-height: 1.2;
  transition: color 0.18s;
}
.entry:hover .entry-name { color: var(--sky-deep); }
.entry-desc {
  margin-top: 0.4rem;
  max-width: 54ch;
  color: var(--body);
  font-size: 1rem;
}
.live {
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--sky-deep);
  background: var(--wash);
  border: 1px solid rgba(14, 165, 233, 0.3);
  border-radius: 4px;
  padding: 0.1rem 0.4rem;
  vertical-align: 0.28em;
}

.entry-meta {
  text-align: right;
  padding-right: 1.5rem;
  padding-top: 0.35rem;
}
.chip {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--ink);
  white-space: nowrap;
}
.slug {
  display: block;
  margin-top: 0.5rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
}

.more {
  margin: 3rem 0 5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--hair);
  color: var(--muted);
  font-size: 0.98rem;
}
.more a { color: var(--sky-deep); border-bottom: 1px solid rgba(14, 165, 233, 0.35); }
.more a:hover { color: var(--sky); }

/* Colophon */
.colophon {
  border-top: 1px solid var(--hair);
  background: var(--wash);
  padding: 2.25rem 0;
}
.colophon-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.colophon-logo { height: 40px; width: auto; opacity: 0.85; }
.colophon p { font-family: var(--mono); font-size: 0.8rem; color: var(--muted); }
.colophon a { color: var(--sky-deep); }

@media (max-width: 680px) {
  body { font-size: 16px; }
  .entry { grid-template-columns: 1fr; gap: 0.75rem; }
  .entry-meta { text-align: left; padding-right: 0; }
  .entry::after { display: none; }
  .colophon-row { flex-direction: column; gap: 0.75rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
