:root {
  --bg: #f6f4ef;
  --ink: #141414;
  --muted: #6d6a64;
  --faint: #d9d5cc;
  --accent: hsl(var(--hue, 0) 45% 42%);
  --serif: "EB Garamond", Georgia, "Times New Roman", serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e0e0f;
    --ink: #eeebe4;
    --muted: #8d8a84;
    --faint: #2a2a2c;
    --accent: hsl(var(--hue, 0) 55% 70%);
  }
}

*, *::before, *::after { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 12vh 16px 6vh;
  animation: rise 900ms cubic-bezier(.2, .7, .2, 1) both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.eyebrow {
  margin: 0;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: .08em;
  color: var(--muted);
}
.eyebrow .fn { color: var(--accent); }

.glyph, .wordmark {
  margin: .05em 0 0;
  font-weight: 400;
  font-size: clamp(140px, 30vw, 280px);
  line-height: 1;
  letter-spacing: -.02em;
}

.role {
  margin: .4em 0 0;
  font-style: italic;
  font-size: clamp(22px, 3.4vw, 30px);
  color: var(--ink);
}

.formula {
  margin: 2.2rem 0 0;
  padding: 1.1rem 0;
  width: min(640px, 100%);
  border-top: 1px solid var(--faint);
  border-bottom: 1px solid var(--faint);
  overflow-x: auto;
  overflow-y: hidden;
}
.formula .katex-display { margin: 0; }
.formula .katex { font-size: clamp(1.05em, 2.6vw, 1.35em); }
@media (max-width: 600px) {
  .formula .katex { font-size: .8em; }
}

.note {
  margin: 1.6rem 0 0;
  max-width: 34em;
  color: var(--muted);
}

.status {
  margin: 2.4rem 0 0;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}

footer {
  padding: 0 16px 32px;
  text-align: center;
}

.index {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2px 4px;
  max-width: 700px;
  margin: 0 auto;
}
@media (max-width: 600px) {
  .index { max-width: 330px; }
}
.index a {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  font-size: 20px;
  color: var(--muted);
  text-decoration: none;
  border-radius: 6px;
  transition: color .2s, background-color .2s;
}
.index a:hover, .index a:focus-visible { color: var(--ink); background: var(--faint); outline: none; }
.index a[aria-current="page"] { color: var(--accent); }

.brand {
  margin: 18px 0 0;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Hub */
.hub main { padding-top: 10vh; }
.grid {
  list-style: none;
  margin: 3rem 0 0;
  padding: 0;
  width: min(1080px, 100%);
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1px;
  background: var(--faint);
  border: 1px solid var(--faint);
}
.grid li { background: var(--bg); }
.grid a {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 20px 20px 18px;
  color: inherit;
  text-decoration: none;
  text-align: left;
  transition: background-color .2s;
}
.grid a:hover, .grid a:focus-visible { background: color-mix(in srgb, var(--faint) 45%, var(--bg)); outline: none; }
.grid .g { font-size: 44px; line-height: 1; transition: color .2s; }
.grid a:hover .g, .grid a:focus-visible .g { color: hsl(var(--hue) 50% 55%); }
.grid .n { margin-top: 14px; font-family: var(--mono); font-size: 13px; }
.grid .r { font-style: italic; color: var(--muted); }

@media (max-width: 860px) {
  .grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 480px) {
  .grid a { padding: 16px 14px; }
  .grid .g { font-size: 36px; }
  .grid .r { font-size: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  main { animation: none; }
}
