:root {
  --paper: #f4f0e7;
  --paper-light: #fbfaf6;
  --ink: #17221f;
  --muted: #5f6b66;
  --green: #173f37;
  --green-light: #dbe9e1;
  --rust: #ad552f;
  --blue: #335e78;
  --gold: #b3832e;
  --line: rgba(23, 34, 31, 0.18);
  --shadow: 0 24px 70px rgba(36, 45, 40, 0.11);
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --serif: Iowan Old Style, Baskerville, "Times New Roman", serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 2px; }
img { display: block; max-width: 100%; }

.skip-link {
  position: fixed;
  left: 1rem;
  top: -5rem;
  z-index: 20;
  padding: 0.7rem 1rem;
  background: var(--ink);
  color: white;
}
.skip-link:focus { top: 1rem; }

.site-header {
  width: min(1180px, calc(100% - 3rem));
  margin: 0 auto;
  min-height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.wordmark {
  display: inline-flex;
  gap: 0.75rem;
  align-items: center;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
}
.wordmark span:first-child {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--ink);
  border-radius: 50%;
  font-family: var(--serif);
  font-size: 0.95rem;
}
nav { display: flex; gap: clamp(1rem, 3vw, 2.4rem); }
nav a {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 650;
  text-decoration: none;
}
nav a:hover { color: var(--ink); }

.hero {
  width: min(1180px, calc(100% - 3rem));
  min-height: 680px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 5vw;
  align-items: center;
  padding: 6rem 0 7rem;
}
.eyebrow {
  margin: 0 0 1.1rem;
  color: var(--rust);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}
h1, h2, h3 { line-height: 1.1; }
h1, h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: -0.035em;
}
h1 { max-width: 850px; font-size: clamp(3.6rem, 6.2vw, 6rem); }
h2 { font-size: clamp(2.7rem, 5vw, 4.7rem); }
.hero-intro {
  max-width: 690px;
  margin: 2rem 0 0;
  color: var(--muted);
  font-size: clamp(1.12rem, 2vw, 1.35rem);
}
.actions { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 2.2rem; }
.button {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.78rem 1.05rem;
  border: 1px solid var(--ink);
  font-size: 0.84rem;
  font-weight: 750;
  text-decoration: none;
  transition: transform 160ms ease, background-color 160ms ease;
}
.button:hover { transform: translateY(-2px); }
.button.primary { background: var(--ink); color: white; }
.button.secondary { background: transparent; }

.hero-graphic {
  position: relative;
  aspect-ratio: 1;
  min-width: 360px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: radial-gradient(circle at center, rgba(255,255,255,.85) 0 18%, transparent 19%), repeating-radial-gradient(circle at center, transparent 0 47px, rgba(23,34,31,.07) 48px 49px);
}
.orbit { position: absolute; inset: 14%; border: 1px solid rgba(23, 63, 55, .28); border-radius: 50%; transform: rotate(34deg) scaleY(.58); }
.orbit-two { inset: 24%; transform: rotate(-28deg) scaleY(.64); border-color: rgba(173, 85, 47, .33); }
.node {
  position: absolute;
  display: grid;
  place-items: center;
  min-width: 64px;
  min-height: 64px;
  padding: .5rem;
  border: 1px solid var(--ink);
  border-radius: 50%;
  background: var(--paper-light);
  box-shadow: 0 8px 24px rgba(23,34,31,.08);
  font-size: .72rem;
  font-weight: 750;
}
.node-main { inset: 50% auto auto 50%; transform: translate(-50%, -50%); width: 92px; height: 92px; background: var(--green); color: white; border: 0; font-family: var(--serif); font-size: 1.15rem; }
.node-research { top: 7%; left: 40%; }
.node-data { top: 38%; right: 2%; }
.node-systems { bottom: 5%; left: 50%; }
.node-maths { top: 53%; left: 0; }

.section { padding: 7rem max(1.5rem, calc((100% - 1180px) / 2)); }
#work { background: var(--paper-light); }
.role-fit { padding-top: 6rem; background: var(--green); color: white; }
.section-heading {
  display: grid;
  grid-template-columns: 1fr 0.75fr;
  gap: 4rem;
  align-items: end;
  margin-bottom: 4rem;
}
.section-heading > p { max-width: 580px; margin: 0 0 .4rem; color: var(--muted); }
.role-fit .section-heading > p { color: #c5d2cd; }
.role-fit .eyebrow { color: #e5a27c; }
.compact-heading { margin-bottom: 3rem; }
.role-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid rgba(255,255,255,.24); border-left: 1px solid rgba(255,255,255,.24); }
.role-card { min-height: 280px; padding: 2rem; border-right: 1px solid rgba(255,255,255,.24); border-bottom: 1px solid rgba(255,255,255,.24); }
.role-index { color: #9db2aa; font-family: var(--serif); font-size: 1.35rem; }
.role-card h3 { margin: 3rem 0 .8rem; font-family: var(--serif); font-size: 1.65rem; font-weight: 500; }
.role-card p { margin: 0; color: #c5d2cd; font-size: .9rem; }
.readiness-strip { display: flex; flex-wrap: wrap; gap: .7rem 1.4rem; align-items: center; margin-top: 2.5rem; color: #c5d2cd; font-size: .75rem; }
.readiness-strip strong { color: white; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; }
.readiness-strip span::before { content: "✓"; margin-right: .45rem; color: #e5a27c; }

.feature-grid { display: grid; gap: 2rem; }
.feature-card {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, .85fr);
  min-height: 430px;
  border: 1px solid var(--line);
  background: white;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.feature-card-reverse .project-image { order: 2; }
.project-image { display: block; min-height: 100%; overflow: hidden; background: #e6e8e5; }
.project-image img { width: 100%; height: 100%; object-fit: cover; object-position: left center; transition: transform 350ms ease; }
.project-image:hover img { transform: scale(1.012); }
.project-copy { display: flex; flex-direction: column; justify-content: center; padding: clamp(2rem, 5vw, 4rem); }
.project-topline { display: flex; justify-content: space-between; gap: 1rem; margin-bottom: 2.2rem; color: var(--muted); font-size: .68rem; font-weight: 750; letter-spacing: .09em; text-transform: uppercase; }
.project-copy h3, .project-card h3 { margin: 0 0 1rem; font-family: var(--serif); font-size: clamp(2rem, 3vw, 3rem); font-weight: 500; letter-spacing: -.025em; }
.project-copy h3 a, .project-card h3 a { text-decoration: none; }
.project-copy h3 a:hover, .project-card h3 a:hover { text-decoration: underline; }
.project-copy p, .project-card p { color: var(--muted); }
.tags { display: flex; flex-wrap: wrap; gap: .45rem; margin: 1.3rem 0 0; padding: 0; list-style: none; }
.tags li { padding: .28rem .55rem; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: .68rem; font-weight: 700; }
.architecture-panel { display: flex; min-height: 100%; padding: clamp(2rem, 5vw, 4rem); flex-direction: column; justify-content: center; align-items: center; background: #15231f; color: white; text-decoration: none; }
.architecture-panel > span { position: relative; z-index: 1; }
.architecture-label { padding: .65rem 1rem; border: 1px solid rgba(255,255,255,.48); background: rgba(255,255,255,.04); font-size: .75rem; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; }
.architecture-line { width: 1px; height: 54px; background: rgba(255,255,255,.34); }
.architecture-core { width: min(100%, 390px); padding: 1.4rem; border: 1px solid #e5a27c; background: #23483f; text-align: center; font-family: var(--serif); font-size: 1.5rem; }
.architecture-modes { display: grid; width: min(100%, 500px); grid-template-columns: repeat(4, 1fr); gap: .45rem; }
.architecture-modes b { padding: .55rem .3rem; border: 1px solid rgba(255,255,255,.35); text-align: center; font-size: .66rem; letter-spacing: .04em; }
.metrics { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin: 1.8rem 0 0; padding-top: 1.4rem; border-top: 1px solid var(--line); }
.metrics div { min-width: 0; }
.metrics dt { font-family: var(--serif); font-size: 2rem; line-height: 1; color: var(--green); }
.metrics dd { margin: .35rem 0 0; color: var(--muted); font-size: .7rem; }

.project-grid { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 5rem; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.project-card { position: relative; min-height: 390px; padding: clamp(2rem, 5vw, 3.4rem); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--paper-light); }
.project-card::before { content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 5px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform 220ms ease; }
.project-card:hover::before { transform: scaleX(1); }
.project-card.rust { --accent: var(--rust); }
.project-card.blue { --accent: var(--blue); }
.project-card.gold { --accent: var(--gold); }
.project-card.green { --accent: var(--green); }
.project-number { float: right; color: var(--accent); font-family: var(--serif); font-size: 2rem; }
.project-kind { margin: 0 0 3.7rem; color: var(--accent) !important; font-size: .7rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.project-card > p:not(.project-kind) { max-width: 500px; }
.inline-links { display: flex; flex-wrap: wrap; gap: 1.4rem; margin-top: 1.6rem; font-size: .78rem; font-weight: 750; }

.background { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(4rem, 9vw, 9rem); background: var(--green); color: white; }
.background .eyebrow { color: #e5a27c; }
.background-intro > p:not(.eyebrow) { max-width: 580px; color: #c5d2cd; }
.background-intro h2 { margin-bottom: 2rem; }
.background-link { margin-top: 2rem; color: white !important; font-size: .82rem; font-weight: 750; }
.timeline { border-top: 1px solid rgba(255,255,255,.25); }
.timeline-item { display: grid; grid-template-columns: 115px 1fr; gap: 1.2rem; padding: 1.5rem 0; border-bottom: 1px solid rgba(255,255,255,.25); }
.timeline-date { color: #9db2aa; font-size: .72rem; font-weight: 750; letter-spacing: .06em; }
.timeline h3 { margin: 0 0 .25rem; font-size: 1rem; }
.timeline p { margin: 0; color: #bdccc6; font-size: .88rem; }

.contact { background: var(--rust); color: white; text-align: center; }
.contact .eyebrow { color: #ffddca; }
.contact h2 { max-width: 780px; margin: 0 auto; }
.contact > p:not(.eyebrow) { max-width: 680px; margin: 1.5rem auto 0; color: #ffddca; }
.contact .actions { justify-content: center; }
.button.light { border-color: white; background: white; color: var(--ink); }
.button.outline-light { border-color: white; color: white; }

footer { width: min(1180px, calc(100% - 3rem)); margin: 0 auto; padding: 2rem 0; display: flex; justify-content: space-between; gap: 2rem; color: var(--muted); font-size: .72rem; }

:focus-visible { outline: 3px solid #d27b52; outline-offset: 4px; }
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding-top: 5rem; }
  .hero-graphic { width: min(560px, 92vw); min-width: 0; margin: 0 auto; }
  .section-heading, .background { grid-template-columns: 1fr; }
  .section-heading { gap: 1.5rem; }
  .role-grid { grid-template-columns: 1fr; }
  .feature-card { grid-template-columns: 1fr; }
  .feature-card-reverse .project-image { order: 0; }
  .project-image, .architecture-panel { aspect-ratio: 16 / 8.5; }
  .project-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .site-header { width: min(100% - 2rem, 1180px); min-height: 72px; }
  .wordmark span:last-child { display: none; }
  nav { gap: .78rem; }
  nav a { font-size: .78rem; }
  .hero { width: calc(100% - 2rem); min-height: auto; padding: 4rem 0; }
  h1 { font-size: clamp(3.1rem, 15vw, 4.6rem); }
  .hero-graphic { display: none; }
  .section { padding: 5rem 1rem; }
  .project-copy, .project-card { padding: 1.7rem; }
  .project-card { min-height: 340px; }
  .timeline-item { grid-template-columns: 1fr; gap: .35rem; }
  footer { width: calc(100% - 2rem); flex-direction: column; gap: .2rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}
@media print {
  .site-header, .hero-graphic, .actions, footer { display: none; }
  body, #work, .background, .contact { background: white; color: black; }
  .hero, .section { width: 100%; min-height: auto; padding: 2rem 0; }
  .feature-card, .project-card { break-inside: avoid; box-shadow: none; }
  .project-image { display: none; }
}
