/* Calibri where installed (Windows, Office); Carlito (open-licence, Calibri-metric) everywhere else */
@font-face {
  font-family: "Carlito";
  src: url("fonts/carlito-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Carlito";
  src: url("fonts/carlito-700.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  --paper: #ffffff;
  --ink: #111111;
  --ink-soft: #555555;
  --line: #dddddd;
  --live: #a8a8a8;
  --live-ink: #444444;
  --panel: #f2f2f2;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Calibri, "Carlito", "Segoe UI", system-ui, sans-serif;
  font-size: 1.1875rem;
  line-height: 1.6;
}

a { color: inherit; }

a:focus-visible, .button:focus-visible {
  outline: 3px solid var(--live);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap {
  max-width: 68rem;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header */
.top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding-top: 1.75rem;
  padding-bottom: 1.75rem;
  flex-wrap: wrap;
}
.top .name {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 650;
  font-size: 1.05rem;
  text-decoration: none;
}
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
section[id] { scroll-margin-top: 3.75rem; }

.site-head {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.site-head .top { padding-top: 1rem; padding-bottom: 1rem; align-items: center; }
.top .name .mark { width: 1.75rem; height: 1.75rem; flex: none; color: var(--ink); }
.top nav { display: flex; gap: 1.25rem; font-size: 0.95rem; flex-wrap: wrap; }
.top nav a.active { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
@media (max-width: 720px) {
  .site-head .top { padding-top: 0.75rem; padding-bottom: 0.5rem; row-gap: 0.4rem; }
  .top nav { width: 100%; gap: 0.35rem 1rem; padding-bottom: 0.25rem; }
  .top nav a { white-space: nowrap; }
  section[id] { scroll-margin-top: 6.75rem; }
}
.top nav a { text-decoration: none; color: var(--ink-soft); }
.top nav a:hover { color: var(--ink); text-decoration: underline; }

/* Hero: reversed band with logo */
.hero-band {
  background: #000;
  color: #fff;
}
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  padding-top: clamp(3rem, 8vw, 6rem);
  padding-bottom: clamp(3rem, 7vw, 5rem);
}
.hero h1 {
  margin: 0;
  max-width: 19ch;
  font-size: clamp(2.25rem, 5.2vw, 4rem);
  line-height: 1.04;
  font-weight: 640;
  letter-spacing: -0.015em;
}
.hero h1 .h1-sub { color: #a8acb0; }
.hero p {
  margin: 1.75rem 0 0;
  max-width: 38rem;
  font-size: 1.2rem;
  color: #cccccc;
}
.hero-logo {
  width: 100%;
  max-width: 26rem;
  height: auto;
  justify-self: end;
}
.hero-band .button { border-color: #fff; }
.hero-band .button.primary { background: #fff; color: #000; }
.hero-band .button.primary:hover { background: #e6e6e6; }
.hero-band .button.secondary { color: #fff; }
.hero-band .button.secondary:hover { background: rgba(255,255,255,0.12); }
.hero-band a:focus-visible { outline-color: #fff; }
@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; }
  .hero-logo { display: none; }
}
.actions { margin-top: 2.25rem; display: flex; gap: 0.75rem; flex-wrap: wrap; }
.button {
  display: inline-block;
  padding: 0.8rem 1.35rem;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  border: 2px solid var(--ink);
}
.button.primary { background: var(--ink); color: var(--paper); }
.button.primary:hover { background: #000000; }
.button.secondary:hover { background: var(--panel); }

/* The feeder line: career as a one-line diagram */
.feeder {
  background: #262626;
  color: #eeeeee;
  padding: clamp(3.5rem, 8vw, 6rem) 0;
}
.feeder h2 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 620;
  line-height: 1.15;
  max-width: 24ch;
}
.feeder h2 { max-width: none; text-wrap: balance; }
.wide-br { display: none; }
@media (min-width: 900px) { .wide-br { display: inline; } }
.feeder .lede {
  margin: 0 0 3rem;
  max-width: 40rem;
  color: #bbbbbb;
}
.stations {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
}
.stations::before {
  content: "";
  position: absolute;
  left: 7.5rem;
  top: 0.55rem;
  bottom: 0.55rem;
  width: 3px;
  background: #777777;
}
.station {
  display: grid;
  grid-template-columns: 6.25rem 2.5rem 1fr;
  align-items: start;
  padding-bottom: 2.5rem;
  position: relative;
}
.station:last-child { padding-bottom: 0; }
.station .years {
  font-variant-numeric: tabular-nums;
  color: #bbbbbb;
  font-size: 0.95rem;
  padding-top: 0.15rem;
  text-align: right;
  padding-right: 0.5rem;
}
.station .node {
  justify-self: center;
  width: 1.05rem;
  height: 1.05rem;
  margin-top: 0.3rem;
  background: var(--ink);
  border: 3px solid #bbbbbb;
  position: relative;
  z-index: 1;
  /* a breaker symbol: closed square */
}
.station.now .node {
  background: var(--live);
  border-color: var(--live);
  box-shadow: 0 0 0 6px rgba(168, 168, 168, 0.18);
}
.station h3 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 620;
  line-height: 1.3;
}
.station p {
  margin: 0.4rem 0 0;
  max-width: 40rem;
  color: #cccccc;
}
.station .figure {
  color: var(--live);
  font-weight: 600;
}

/* Sections */
section.block {
  padding: clamp(3.5rem, 8vw, 5.5rem) 0;
  border-bottom: 1px solid var(--line);
}
section.block h2 {
  margin: 0 0 2rem;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 620;
  line-height: 1.15;
}
.three {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
}
.three h3 {
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
  font-weight: 620;
  padding-top: 1rem;
  border-top: 3px solid var(--ink);
}
.three p { margin: 0; color: var(--ink-soft); }

.split {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 3rem;
  align-items: start;
}
.split h2 { margin-bottom: 0; }

.systems {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.25rem 2rem;
}
.systems li {
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--line);
}
.systems strong { font-weight: 620; display: block; }
.systems span { color: var(--ink-soft); font-size: 0.95rem; }

.prose p { margin: 0 0 1.1rem; max-width: 40rem; }
.prose p:last-child { margin-bottom: 0; }
.quiet { color: var(--ink-soft); }

/* Contact */
.contact {
  padding: clamp(3.5rem, 8vw, 5.5rem) 0;
}
.contact h2 {
  margin: 0 0 1rem;
  font-size: clamp(1.8rem, 3.6vw, 2.6rem);
  font-weight: 640;
  line-height: 1.1;
}
.contact p { margin: 0; max-width: 36rem; color: var(--ink-soft); }

footer {
  padding: 2rem 0 2.5rem;
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
  color: var(--ink-soft);
}
footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem 2rem; }

@media (max-width: 52rem) {
  .three { grid-template-columns: 1fr; gap: 2rem; }
  .split { grid-template-columns: 1fr; gap: 1.5rem; }
}
@media (max-width: 36rem) {
  .systems { grid-template-columns: 1fr; }
  .stations::before { left: 0.5rem; }
  .station { grid-template-columns: 1.05rem 1fr; column-gap: 1rem; }
  .station .years { grid-column: 2; grid-row: 1; text-align: left; padding: 0; }
  .station .node { grid-column: 1; grid-row: 1 / span 2; justify-self: start; }
  .station .body { grid-column: 2; }
}

@media (prefers-reduced-motion: no-preference) {
  .station.now .node { animation: energize 2.4s ease-in-out infinite; }
  @keyframes energize {
    0%, 100% { box-shadow: 0 0 0 4px rgba(168, 168, 168, 0.15); }
    50% { box-shadow: 0 0 0 9px rgba(168, 168, 168, 0.05); }
  }
}

/* Navigation current page */
.top nav a[aria-current="page"] { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }

/* Text link with arrow-free emphasis */
.more { margin-top: 2rem; }
.more a { font-weight: 600; text-underline-offset: 4px; }

/* Contact form */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 3rem;
  align-items: start;
}
form.enquiry { display: grid; gap: 1.1rem; }
.field { display: grid; gap: 0.35rem; }
.field label { font-weight: 600; font-size: 0.95rem; }
.field .hint { color: var(--ink-soft); font-weight: 400; }
.field input, .field textarea, .field select {
  font: inherit;
  color: var(--ink);
  background: #fff;
  border: 1.5px solid #aaaaaa;
  border-radius: 8px;
  padding: 0.7rem 0.85rem;
  width: 100%;
}
.field textarea { min-height: 9rem; resize: vertical; }
.field input:focus-visible, .field textarea:focus-visible, .field select:focus-visible {
  outline: 3px solid var(--live);
  outline-offset: 1px;
  border-color: var(--ink);
}
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
form.enquiry button { justify-self: start; cursor: pointer; font: inherit; font-weight: 600; }
.notice {
  border-left: 4px solid var(--live);
  background: var(--panel);
  padding: 0.9rem 1.1rem;
  border-radius: 0 8px 8px 0;
  margin: 0 0 1.5rem;
}
.notice.error { border-left-color: #b3402e; }
.small { font-size: 0.9rem; color: var(--ink-soft); }

/* Experience page */
.page-head { padding-top: clamp(2.5rem, 7vw, 5rem); padding-bottom: clamp(2rem, 5vw, 3rem); }
.page-head h1 {
  margin: 0;
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  font-weight: 640;
  line-height: 1.06;
}
.page-head p { margin: 1.25rem 0 0; max-width: 40rem; font-size: 1.15rem; color: var(--ink-soft); }
.role {
  display: grid;
  grid-template-columns: 1fr 2.2fr;
  gap: 2.5rem;
  padding: 2.5rem 0;
  border-top: 1px solid var(--line);
}
.role h3 { margin: 0; font-size: 1.25rem; font-weight: 620; line-height: 1.3; }
.role .where { margin: 0.35rem 0 0; color: var(--ink-soft); }
.role .when { margin: 0.2rem 0 0; color: var(--ink-soft); font-variant-numeric: tabular-nums; font-size: 0.95rem; }
.role ul { margin: 0; padding-left: 1.1rem; }
.role li { margin-bottom: 0.9rem; max-width: 44rem; }
.role li:last-child { margin-bottom: 0; }
.role li strong { font-weight: 620; }

@media (max-width: 52rem) {
  .contact-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .role { grid-template-columns: 1fr; gap: 1rem; }
}
@media (max-width: 36rem) {
  .two { grid-template-columns: 1fr; }
}

.group { padding: 3rem 0 1.25rem; }
.group:first-child { padding-top: 0.5rem; }
.group h2 {
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 620;
  line-height: 1.15;
}
.group .when { margin: 0.35rem 0 0; color: var(--ink-soft); }
.group p:not(.when) { margin: 0.9rem 0 0; max-width: 44rem; }
