/* Colours must match LIGHT / DARK in src/bin/field.rs. */
:root {
  --paper: #f4f2ee;
  --ink: #1a1a1a;
  --muted: #6b6862;
  --sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root { --paper: #0e0e0f; --ink: #e8e6e1; --muted: #8f8b84; }
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 100dvh;
  padding: clamp(1.25rem, 3vw, 2.5rem);
  -webkit-font-smoothing: antialiased;
}

#field {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100dvh;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.8s ease;
}
.gpu #field { opacity: 1; }
.no-gpu #field { display: none; }

.meta {
  display: flex;
  justify-content: space-between;
  font: 0.75rem/1 var(--mono);
  letter-spacing: 0.04em;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
#renderer::before { content: "● "; }
.gpu #renderer::before { color: #3a9a5b; }

.card {
  align-self: end;
  position: relative;
  max-width: 38rem;
  padding: 2rem 0 3rem;
}
/* Soft paper-coloured halo so the text stays readable over the field. */
.card::before {
  content: "";
  position: absolute;
  inset: -4rem -6rem -2rem -6rem;
  z-index: -1;
  background: radial-gradient(closest-side, var(--paper) 55%, transparent);
  pointer-events: none;
}

h1 {
  font-size: clamp(3rem, 11vw, 7.5rem);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 0.9;
}
.role {
  margin-top: 1.25rem;
  font: 0.85rem/1.4 var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.bio {
  margin-top: 1rem;
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  line-height: 1.5;
  max-width: 32rem;
}
.links {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.75rem;
  margin-top: 2rem;
  font: 0.9rem/1 var(--mono);
}
.links a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, var(--ink) 25%, transparent);
  padding-bottom: 0.2rem;
  transition: border-color 0.2s;
}
.links a:hover, .links a:focus-visible { border-color: var(--ink); }
.links a:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }
.arrow { display: inline-block; margin-left: 0.25em; transition: transform 0.2s; }
.links a:hover .arrow { transform: translate(2px, -2px); }

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