:root {
  --ink:    #14181f;
  --paper:  #edeff3;
  --muted:  #626c79;
  --rule:   #d7dbe1;
  --signal: #2036c4;
  --fill-bg: rgba(32, 54, 196, 0.07);

  --f-display: "Space Grotesk", system-ui, sans-serif;
  --f-body: "Spectral", Georgia, serif;
  --f-mono: "IBM Plex Mono", ui-monospace, monospace;

  --measure: 62ch;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 1.15rem;
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 6rem) clamp(1.4rem, 5vw, 3.5rem) 3rem;
}

a {
  color: var(--signal);
  text-decoration: none;
  border-bottom: 1px solid rgba(32, 54, 196, 0.32);
  transition: border-color 0.15s ease;
}
a:hover { border-bottom-color: var(--signal); }
a:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ---- Site nav ------------------------------------------------ */
.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.6rem 1.2rem;
  font-family: var(--f-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  margin-bottom: clamp(2rem, 6vw, 3.4rem);
}
.site-nav .brand { color: var(--ink); border-bottom: none; font-weight: 500; }
.site-nav .nav-links {
  display: flex;
  gap: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}
.site-nav .nav-links a { color: var(--muted); border-bottom: none; }
.site-nav .nav-links a:hover { color: var(--signal); }
.site-nav .nav-links a[aria-current="page"] { color: var(--ink); }
.site-nav .brand[aria-current="page"] { color: var(--ink); }

/* ---- Masthead ------------------------------------------------ */
.masthead {
  padding-bottom: clamp(2.4rem, 5vw, 3.4rem);
  border-bottom: 1px solid var(--rule);
  margin-bottom: clamp(2.4rem, 5vw, 3.4rem);
}
/* Variant used on the Now page, where the "updated" line carries the rule. */
.masthead.no-rule {
  border-bottom: none;
  padding-bottom: clamp(1.6rem, 4vw, 2.4rem);
  margin-bottom: 1.4rem;
}
.name {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(2.6rem, 8vw, 4.8rem);
  line-height: 0.98;
  letter-spacing: -0.03em;
}
.role {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: clamp(1rem, 2.6vw, 1.3rem);
  letter-spacing: -0.01em;
  color: var(--muted);
  margin-top: 1rem;
}

.updated {
  font-family: var(--f-mono);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  padding-bottom: clamp(2rem, 5vw, 3rem);
  border-bottom: 1px solid var(--rule);
  margin-bottom: clamp(2rem, 5vw, 3rem);
}

/* ---- Record rows --------------------------------------------- */
.record {
  display: grid;
  grid-template-columns: 9rem 1fr;
  gap: 0 2.4rem;
  padding: 1.7rem 0;
  border-bottom: 1px solid var(--rule);
}
.record .tag {
  font-family: var(--f-mono);
  font-size: 0.74rem;
  line-height: 1.6;
  letter-spacing: 0.06em;
  color: var(--muted);
  text-transform: uppercase;
  padding-top: 0.55rem;
}
.record .tag span { display: block; color: var(--signal); }
.record .body { max-width: var(--measure); }
.record p { margin: 0; }
.record p + p { margin-top: 1rem; }

/* itemised list within a record */
.now-list { list-style: none; }
.now-list li { position: relative; padding-left: 1.5rem; }
.now-list li + li { margin-top: 0.8rem; }
.now-list li::before {
  content: "\2014";
  position: absolute;
  left: 0;
  color: var(--signal);
  font-family: var(--f-mono);
}
.now-list .meta {
  font-family: var(--f-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  margin-right: 0.5rem;
}

/* editable placeholder tokens (scaffold only) */
.fill {
  font-family: var(--f-mono);
  font-size: 0.82em;
  color: var(--signal);
  background: var(--fill-bg);
  padding: 0.05em 0.4em;
  border-radius: 3px;
  border-bottom: 1px dotted rgba(32, 54, 196, 0.5);
}

/* ---- Contact (home) ------------------------------------------ */
.contact-address {
  font-family: var(--f-mono);
  font-size: clamp(1.05rem, 3vw, 1.35rem);
  letter-spacing: -0.01em;
  margin: 0 0 0.6rem;
}
.contact-address a { border-bottom: none; }
.contact-note { font-style: italic; color: var(--muted); font-size: 0.98rem; }

/* ---- Find-me / Elsewhere ------------------------------------- */
.find {
  display: grid;
  grid-template-columns: 9rem 1fr;
  gap: 0 2.4rem;
  padding: 2rem 0;
}
.find .tag {
  font-family: var(--f-mono);
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  color: var(--muted);
  text-transform: uppercase;
  padding-top: 0.35rem;
}
.links {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.6rem;
  font-family: var(--f-mono);
  font-size: 0.9rem;
}
.links a { border-bottom: none; }
.links a::before { content: "\2192 "; color: var(--muted); }

/* ---- Footer -------------------------------------------------- */
footer {
  border-top: 1px solid var(--rule);
  margin-top: 1rem;
  padding-top: 1.8rem;
  font-family: var(--f-mono);
  font-size: 0.76rem;
  line-height: 1.7;
  letter-spacing: 0.02em;
  color: var(--muted);
}
footer p + p { margin-top: 0.4rem; }
footer a { border-bottom-color: rgba(32, 54, 196, 0.28); }

/* ---- Motion -------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(12px);
  animation: rise 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}
.site-nav.reveal { animation-delay: 0.02s; }
.masthead.reveal { animation-delay: 0.10s; }
.updated.reveal { animation-delay: 0.16s; }
.record:nth-of-type(1).reveal { animation-delay: 0.20s; }
.record:nth-of-type(2).reveal { animation-delay: 0.28s; }
.record:nth-of-type(3).reveal { animation-delay: 0.36s; }
.record:nth-of-type(4).reveal { animation-delay: 0.44s; }
.find.reveal { animation-delay: 0.50s; }
footer.reveal { animation-delay: 0.58s; }
@keyframes rise { to { opacity: 1; transform: none; } }

/* ---- Mobile -------------------------------------------------- */
@media (max-width: 640px) {
  body { font-size: 1.08rem; }
  .record, .find { grid-template-columns: 1fr; gap: 0.7rem; }
  .record .tag, .find .tag { padding-top: 0; }
  .record .tag span { display: inline; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; animation: none; }
}
