/* ---------- Colours and type ---------- */
:root {
  --paper: #F4F6F8;
  --ink: #1B2233;
  --muted: #586074;
  --line: #D8DDE5;
  --accent: #1C7C47;        /* a deep take on 532 nm laser green */
  --accent-bright: #3FAF6B;
  --accent-wash: #E2F0E7;

  --serif: "Spectral", Georgia, "Times New Roman", serif;
  --sans: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.1875rem;          /* 19px */
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--accent-bright);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

h1, h2, h3, h4 { margin: 0; font-weight: 500; }
p { margin: 0 0 1em; }

.wrap { max-width: 1100px; margin: 0 auto; padding: 0 28px; }

.skip {
  position: absolute; left: -999px; top: 8px;
  background: var(--ink); color: #fff; padding: 8px 14px; z-index: 10;
}
.skip:focus { left: 8px; }

/* ---------- Header ---------- */
.site-header { padding: 22px 0; }
.header-inner { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.wordmark {
  font-family: var(--sans); font-weight: 600; font-size: 1.05rem;
  text-decoration: none; letter-spacing: -0.01em;
}
.site-header nav { display: flex; gap: 22px; flex-wrap: wrap; font-family: var(--sans); font-size: 0.95rem; }
.site-header nav a { text-decoration: none; color: var(--muted); }
.site-header nav a:hover { color: var(--ink); }
.site-header nav a[aria-current="page"] {
  color: var(--ink);
  text-decoration: underline; text-decoration-color: var(--accent-bright);
  text-decoration-thickness: 2px; text-underline-offset: 6px;
}

/* ---------- Page titles (inner pages) ---------- */
.page-head { padding-top: 48px; padding-bottom: 44px; }
.page-head h1 {
  font-weight: 300; font-size: clamp(2.5rem, 5.5vw, 3.9rem);
  line-height: 1.05; letter-spacing: -0.02em;
}
.page-head p { margin: 0.7em 0 0; max-width: 34em; font-size: 1.3rem; line-height: 1.5; color: var(--muted); }

/* ---------- Hero ---------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.65fr);
  gap: 72px;
  align-items: center;
  padding-top: 56px;
  padding-bottom: 24px;
}
.hero h1 {
  font-weight: 300;
  font-size: clamp(3rem, 7vw, 5.4rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin-bottom: 0.45em;
}
.hero-text { max-width: 36em; }
.lede { font-size: 1.35rem; line-height: 1.5; }
.hero-text p:not(.lede):not(.actions) { color: var(--muted); }

.portrait { margin: 0; }
.portrait img { border-radius: 4px; }

.actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 1.6em; }
.btn {
  font-family: var(--sans); font-weight: 500; font-size: 0.95rem;
  display: inline-block; padding: 10px 18px; border-radius: 6px;
  background: var(--ink); color: #fff; text-decoration: none;
  border: 1.5px solid var(--ink);
}
.btn:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-quiet { background: transparent; color: var(--ink); }
.btn-quiet:hover { background: transparent; color: var(--accent); border-color: var(--accent); }

/* The spectrum trace: the one bit of drama on the page */
.trace { height: 120px; margin: 8px 0 24px; }
.trace svg { width: 100%; height: 100%; display: block; }
.trace path {
  fill: none;
  stroke: var(--accent-bright);
  stroke-width: 1.6;
  vector-effect: non-scaling-stroke;
  stroke-linejoin: round;
}
/* Drawn once, left to right, when the page opens */
.trace svg { clip-path: inset(0 100% 0 0); animation: draw 2.6s cubic-bezier(.5,.1,.25,1) .3s forwards; }
@keyframes draw { to { clip-path: inset(0 0 0 0); } }
@media (prefers-reduced-motion: reduce) {
  .trace svg { animation: none; clip-path: none; }
}

/* ---------- Sections: heading on the left, content on the right ---------- */
.block {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  column-gap: 56px;
  padding-top: 64px;
  padding-bottom: 56px;
  border-top: 1px solid var(--line);
}
.block > * { grid-column: 2; }
.block > h2 {
  grid-column: 1; grid-row: 1 / span 30;
  font-family: var(--sans); font-weight: 600; font-size: 1.45rem;
  letter-spacing: -0.01em; line-height: 1.2;
  align-self: start;
}
.block h3 {
  font-family: var(--sans); font-weight: 600; font-size: 1.05rem;
  margin: 2.6em 0 1em;
}
.block > h3:first-child, .block > h2 + h3 { margin-top: 0; }
.projects h3, .earlier h3 {
  font-family: var(--serif); font-weight: 500; font-size: 1.2rem; line-height: 1.4;
  margin: 0 0 0.3em;
}
.earlier h3 { margin-top: 1.4em; }
.earlier h3:first-child { margin-top: 0; }
.prose { max-width: 38em; }
.prose p { color: var(--muted); }
.more { margin-top: 1.2em; font-family: var(--sans); font-size: 0.95rem; }

/* Dated lists: talks, awards, service */
.dated { list-style: none; margin: 0; padding: 0; max-width: 44em; }
.dated li {
  display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 20px;
  padding: 10px 0; border-bottom: 1px solid var(--line); line-height: 1.45;
}
.dated li:first-child { padding-top: 0; }
.dated .when { padding-top: 0.2em; }

.when {
  font-family: var(--sans); font-size: 0.85rem; font-weight: 500;
  color: var(--muted); font-variant-numeric: tabular-nums;
}
.status {
  display: inline-block;
  font-family: var(--sans); font-size: 0.8rem; font-weight: 500;
  color: var(--accent); background: var(--accent-wash);
  padding: 2px 9px; border-radius: 4px; margin: 0;
}

/* Four fields */
.fields {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 36px 44px; margin: 0;
}
.fields dt {
  font-family: var(--sans); font-weight: 600; font-size: 1.05rem;
  padding-top: 14px; margin-bottom: 0.4em;
  background: linear-gradient(var(--accent-bright), var(--accent-bright)) top left / 28px 2px no-repeat;
}
.fields dd { margin: 0; color: var(--muted); font-size: 1.05rem; }

/* Projects */
.projects { list-style: none; padding: 0; margin: 0; }
.projects li { padding: 0 0 1.6em; max-width: 40em; }
.projects li p:not(.status) { margin-bottom: 0.5em; color: var(--muted); }

.earlier { max-width: 40em; }
.earlier p { color: var(--muted); }

/* Timeline: a real sequence, so it gets a line and dots */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline li {
  display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 28px;
  position: relative; padding-bottom: 1.8em;
}
.timeline li::before {
  content: ""; position: absolute; left: 136px; top: 0.55em; bottom: -0.55em;
  width: 1.5px; background: var(--line);
}
.timeline li:last-child::before { display: none; }
.timeline li::after {
  content: ""; position: absolute; left: 132px; top: 0.4em;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--paper); border: 2px solid var(--accent-bright);
}
.timeline li:first-child::after { background: var(--accent-bright); }
.timeline .when { padding-top: 0.2em; }
.timeline li > div { padding-left: 24px; }
.timeline h2 { font-family: var(--serif); font-weight: 500; font-size: 1.25rem; line-height: 1.4; margin-bottom: 0.25em; }
.timeline p { color: var(--muted); margin: 0; }
.journey, .news-page { padding-bottom: 64px; }
.journey .timeline { max-width: 52em; }

/* Publications */
.pubs { margin: 0; padding-left: 1.3em; max-width: 44em; }
.pubs li { margin-bottom: 1em; padding-left: 0.3em; }
.pubs li::marker { font-family: var(--sans); color: var(--muted); font-size: 0.9rem; }
.pubs strong { font-weight: 500; }

/* News */
.news { list-style: none; margin: 0; padding: 0; max-width: 44em; }
.news li {
  display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 20px;
  padding: 12px 0; border-bottom: 1px solid var(--line);
}
.news li:first-child { padding-top: 0; }
.news .when { padding-top: 0.25em; }
.news p { margin: 0; }

/* Gallery: photos keep their own shapes */
.photos { columns: 3 240px; column-gap: 24px; }
.photos figure { break-inside: avoid; margin: 0 0 28px; }
.photos img { width: 100%; border-radius: 4px; background: var(--line); }
.photos a { display: block; border-radius: 4px; }
.photos a:hover img { opacity: 0.92; }
.photos figcaption { font-size: 0.98rem; line-height: 1.45; color: var(--muted); margin-top: 0.55em; }

/* ---------- Footer: contact on every page ---------- */
.site-footer { background: var(--ink); color: #E8EBF0; padding: 56px 0 28px; margin-top: 24px; }
.footer-inner {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 32px 56px; align-items: start;
}
.site-footer h2 { font-family: var(--sans); font-weight: 600; font-size: 1.45rem; margin-bottom: 0.5em; color: #fff; }
.site-footer p { color: #B9C0CC; max-width: 28em; }
.site-footer a { color: #fff; text-decoration-color: var(--accent-bright); }
.site-footer a:hover { color: #9BE0B5; }
.site-footer :focus-visible { outline-color: #9BE0B5; }
.contact-links { list-style: none; margin: 0; padding: 0; }
.contact-links li {
  display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 16px;
  padding: 10px 0; border-bottom: 1px solid #34405A; overflow-wrap: anywhere;
}
.contact-links li:first-child { padding-top: 0; }
.contact-links span { font-family: var(--sans); font-size: 0.85rem; color: #B9C0CC; padding-top: 0.2em; }
.fineprint { margin-top: 48px; font-family: var(--sans); font-size: 0.8rem; }
.fineprint p { color: #8E97A8; margin: 0; }

/* ---------- Small screens ---------- */
@media (max-width: 820px) {
  body { font-size: 1.0625rem; }
  .site-header nav { gap: 6px 16px; font-size: 0.9rem; }
  .hero { grid-template-columns: 1fr; gap: 28px; padding-top: 24px; }
  .portrait { order: -1; max-width: 220px; }
  .lede { font-size: 1.2rem; }
  .trace { height: 80px; }
  .block { grid-template-columns: 1fr; padding-top: 44px; padding-bottom: 36px; }
  .block > *, .block > h2 { grid-column: 1; grid-row: auto; }
  .block > h2 { margin-bottom: 1em; }
  .fields,   .fields { gap: 24px; }
  .timeline li { grid-template-columns: 1fr; gap: 2px; padding-left: 26px; }
  .timeline li::before { left: 4px; top: 0.7em; }
  .timeline li::after { left: 0; top: 0.45em; }
  .timeline li > div { padding-left: 0; }
  .news li, .dated li { grid-template-columns: 1fr; gap: 0; }
  .page-head { padding-top: 24px; padding-bottom: 28px; }
  .page-head p { font-size: 1.15rem; }
  .footer-inner { grid-template-columns: 1fr; }
  .photos { columns: 2; column-gap: 14px; }
  .photos figure { margin-bottom: 20px; }
  .photos figcaption { font-size: 0.88rem; }
}
