:root {
  color-scheme: dark;
  --background: #100914;
  --surface: #1a1020;
  --text: #f1e8f5;
  --muted: #bba9c3;
  --accent: #d9b7e8;
  --rule: #3a2943;
}

* { box-sizing: border-box; }

html {
  background: var(--background);
  font-family: Helvetica, Arial, sans-serif;
  font-size: 18px;
  line-height: 1.5;
  color: var(--text);
}

body {
  width: min(100% - 2rem, 72rem);
  min-height: 100vh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}

a { color: inherit; text-decoration-color: var(--muted); text-underline-offset: .18em; }
a:hover { color: var(--accent); text-decoration-color: currentColor; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

.site-header,
footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--rule);
  font-size: .8rem;
  letter-spacing: .04em;
}

.site-name { font-weight: 700; text-decoration: none; }
.site-header nav { display: flex; gap: 1.2rem; }
.site-header nav a { text-decoration: none; color: var(--muted); }
.site-header nav a:hover { color: var(--text); }

main { flex: 1; padding: clamp(4rem, 10vw, 8rem) 0; }

.intro { max-width: 57rem; }
.eyebrow {
  margin: 0 0 1.25rem;
  color: var(--accent);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}

h1, h2, h3, p { margin-top: 0; }
h1 {
  margin-bottom: 1.5rem;
  font-size: clamp(3rem, 9vw, 7.25rem);
  font-weight: 700;
  letter-spacing: -.065em;
  line-height: .91;
}

.lede, .section-header > p:last-child {
  max-width: 44rem;
  color: var(--muted);
  font-size: clamp(1.15rem, 2.2vw, 1.6rem);
  line-height: 1.4;
}

.directory {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  margin-top: clamp(4rem, 10vw, 8rem);
  border-top: 1px solid var(--rule);
}

.directory a {
  display: grid;
  grid-template-columns: 2rem 1fr;
  gap: .2rem 1rem;
  padding: 1.5rem 1rem 1.5rem 0;
  border-bottom: 1px solid var(--rule);
  text-decoration: none;
}
.directory a:nth-child(odd) { border-right: 1px solid var(--rule); }
.directory a:nth-child(even) { padding-left: 1.5rem; }
.directory span { grid-row: span 2; color: var(--muted); font-size: .7rem; }
.directory strong { font-size: 1.35rem; }
.directory small { color: var(--muted); font-size: .85rem; }

.section-header { max-width: 48rem; margin-bottom: 4rem; }
.section-header h1, .page h1, .entry h1 { font-size: clamp(3rem, 7vw, 5.5rem); }

.post-list { margin: 0; padding: 0; border-top: 1px solid var(--rule); list-style: none; }
.post-list li { border-bottom: 1px solid var(--rule); }
.post-list a {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: .35rem 2rem;
  padding: 1.5rem 0;
  text-decoration: none;
}
.post-list strong { font-size: 1.15rem; }
.post-list time, .entry-header time { color: var(--muted); font-size: .78rem; }
.post-list span { color: var(--muted); font-size: .9rem; }
.empty { padding: 1.5rem 0; color: var(--muted); }

.page, .entry { max-width: 46rem; }
.entry-header { margin-bottom: 4rem; }
.prose { font-size: 1.08rem; }
.prose h2 { margin: 2.5rem 0 .75rem; font-size: 1.6rem; letter-spacing: -.025em; }
.prose p, .prose ul, .prose ol { margin-bottom: 1.4rem; }
.prose li + li { margin-top: .45rem; }
.prose table {
  width: 100%;
  margin-bottom: 1.4rem;
  border-collapse: collapse;
}
.prose th, .prose td {
  padding: .65rem .8rem;
  border: 1px solid var(--rule);
  text-align: left;
}
.prose th {
  background: var(--surface);
  color: var(--accent);
}

footer { margin-top: auto; border-top: 1px solid var(--rule); border-bottom: 0; color: var(--muted); }

@media (max-width: 42rem) {
  .site-header { align-items: flex-start; }
  .site-header nav { display: grid; grid-template-columns: repeat(2, auto); gap: .35rem 1rem; }
  .directory { grid-template-columns: 1fr; }
  .directory a:nth-child(odd) { border-right: 0; }
  .directory a:nth-child(even) { padding-left: 0; }
  .post-list a { grid-template-columns: 1fr; }
  .post-list time { grid-row: 1; }
}

@media (prefers-reduced-motion: no-preference) {
  a { transition: color 140ms ease; }
}
