/* Galois Research — single-page site
   One centered column of prose on a dark ground. Typography does all the work. */

:root {
  --bg-top: #000000;
  --bg-bottom: #0e1216;
  --ink: #e4e4e1;
  --ink-bright: #f4f4f1;
  --ink-soft: rgba(255, 255, 255, 0.58);
  --ink-mute: rgba(255, 255, 255, 0.40);
  --rule: rgba(255, 255, 255, 0.22);
  --serif: "Newsreader", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --measure: 42.5rem;
  color-scheme: dark;
}

html {
  background: var(--bg-top);
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, var(--bg-top) 0%, var(--bg-bottom) 100%);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.1rem;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern", "liga", "onum";
}

::selection {
  background: rgba(255, 255, 255, 0.18);
}

.page {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 5rem 1.5rem 5rem;
}

/* Wordmark */
.brand {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.85rem;
  margin: 0 0 3.75rem;
}

.brand a {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  border: 0;
  color: var(--ink-bright);
}

.brand svg {
  width: 34px;
  height: 34px;
  flex: none;
}

.brand .name {
  font-size: 1.5rem;
  line-height: 1;
  letter-spacing: 0.015em;
  font-weight: 400;
}

/* Prose */
p {
  margin: 0;
}

p + p {
  margin-top: 2.2rem;
}

.intro p {
  font-size: 1.16rem;
}

section {
  margin-top: 5.5rem;
}

h2 {
  margin: 0 0 1.25rem;
  font-family: var(--mono);
  font-weight: 500;
  font-size: 0.84rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

em {
  font-style: italic;
}

a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  transition: border-color 0.2s ease, color 0.2s ease;
}

a:hover {
  border-color: rgba(255, 255, 255, 0.7);
}

a:focus-visible {
  outline: 1px solid var(--ink-soft);
  outline-offset: 3px;
}

/* Footer */
footer {
  margin-top: 6rem;
}

footer .contact a {
  border: 0;
}

footer .contact a:hover {
  color: var(--ink-bright);
}

footer .links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.75rem;
  margin-top: 0.5rem;
  color: var(--ink-soft);
}

footer .links a {
  color: var(--ink-soft);
  border: 0;
}

footer .links a:hover {
  color: var(--ink);
}

.colophon {
  margin-top: 7rem;
  text-align: center;
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  color: var(--ink-mute);
}

/* Motion */
@media (prefers-reduced-motion: no-preference) {
  .page {
    animation: rise 0.9s ease-out both;
  }
  @keyframes rise {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: none; }
  }
}

/* Small screens */
@media (max-width: 640px) {
  body {
    font-size: 1.04rem;
    line-height: 1.75;
  }
  .page {
    padding: 3.25rem 1.25rem 3.5rem;
  }
  .brand {
    margin-bottom: 3rem;
  }
  .brand .name {
    font-size: 1.3rem;
  }
  .intro p {
    font-size: 1.08rem;
  }
  section {
    margin-top: 4rem;
  }
  p + p {
    margin-top: 1.8rem;
  }
  footer {
    margin-top: 4.5rem;
  }
  .colophon {
    margin-top: 5rem;
  }
}
