:root {
  color-scheme: light dark;
  --paper: #f4f5f2;
  --surface: #ffffff;
  --ink: #121412;
  --muted: #545b54;
  --line: #c8cec7;
  --line-strong: #929c92;
  --accent: #e84721;
  --accent-ink: #a92b10;
  --accent-soft: #f8ded6;
  --grid: rgba(18, 20, 18, .075);
  --shadow: 0 24px 60px rgba(18, 20, 18, .09);
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #101210;
    --surface: #171a17;
    --ink: #f2f5f0;
    --muted: #b7c0b5;
    --line: #353b35;
    --line-strong: #626b62;
    --accent: #ff6a45;
    --accent-ink: #ff8b70;
    --accent-soft: #3d201a;
    --grid: rgba(242, 245, 240, .07);
    --shadow: 0 26px 70px rgba(0, 0, 0, .35);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { overflow-x: clip; }
body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px),
    var(--paper);
  background-size: 32px 32px;
  color: var(--ink);
  font-family: "IBM Plex Sans", sans-serif;
  line-height: 1.5;
}

::selection { background: var(--accent); color: white; }
a { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.shell {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper) 96%, transparent);
  backdrop-filter: blur(12px);
}

.nav {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.identity {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font: 500 12px/1.25 "IBM Plex Mono", monospace;
}

.signal {
  width: 9px;
  height: 9px;
  border: 2px solid var(--accent);
  box-shadow: 5px 5px 0 var(--accent-soft);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-links a {
  padding: 8px 10px;
  color: var(--muted);
  font: 500 12px/1 "IBM Plex Mono", monospace;
  text-decoration: none;
}

.nav-links a:hover,
.nav-links a:focus-visible { color: var(--accent-ink); outline: none; }

.hero {
  min-height: min(760px, calc(100svh - 58px));
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, .85fr);
  gap: clamp(42px, 8vw, 110px);
  align-items: center;
  padding: 88px 0 72px;
}

.eyebrow,
.section-index,
.project-tag,
.fact-label {
  margin: 0;
  color: var(--accent-ink);
  font: 500 12px/1.4 "IBM Plex Mono", monospace;
  letter-spacing: .045em;
  text-transform: uppercase;
}

h1 {
  max-width: 760px;
  margin: 18px 0 26px;
  font-size: clamp(48px, 7.2vw, 96px);
  line-height: .92;
  letter-spacing: -.065em;
  font-weight: 600;
}

.hero-copy {
  max-width: 650px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(18px, 2vw, 23px);
  line-height: 1.45;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 17px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  font: 500 13px/1 "IBM Plex Mono", monospace;
  text-decoration: none;
  cursor: pointer;
  transition: background .18s ease, color .18s ease, border-color .18s ease;
}

.button.secondary { background: transparent; color: var(--ink); }
.button:hover, .button:focus-visible { background: var(--accent); border-color: var(--accent); color: white; outline: none; }
.button svg { width: 15px; height: 15px; }

.system-figure {
  position: relative;
  aspect-ratio: 1 / 1.06;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.system-figure::before,
.system-figure::after {
  content: "";
  position: absolute;
  background: var(--line);
}

.system-figure::before { top: 0; bottom: 0; left: 33%; width: 1px; box-shadow: calc(33.3% * 2) 0 0 var(--line); }
.system-figure::after { left: 0; right: 0; top: 33%; height: 1px; box-shadow: 0 calc(33.3% * 2) 0 var(--line); }

.diagram-node {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 94px;
  aspect-ratio: 1;
  border: 1px solid var(--ink);
  background: var(--surface);
  font: 500 10px/1.35 "IBM Plex Mono", monospace;
  text-align: center;
  text-transform: uppercase;
}

.node-a { top: 9%; left: 9%; }
.node-b { top: 40%; left: 37%; width: 118px; background: var(--accent); color: white; border-color: var(--accent); }
.node-c { right: 8%; bottom: 9%; }

.path {
  position: absolute;
  z-index: 1;
  height: 2px;
  background: var(--accent);
  transform-origin: left center;
}

.path-a { width: 39%; top: 29%; left: 26%; transform: rotate(39deg); }
.path-b { width: 36%; top: 62%; left: 56%; transform: rotate(35deg); }
.pulse {
  position: absolute;
  right: 7%;
  top: 8%;
  width: 48px;
  height: 48px;
  border: 1px solid var(--accent);
  border-radius: 50%;
}
.pulse::before, .pulse::after {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid var(--accent);
  border-radius: 50%;
}
.pulse::after { inset: 20px; background: var(--accent); }

.figure-caption {
  position: absolute;
  z-index: 3;
  left: 14px;
  bottom: 13px;
  margin: 0;
  color: var(--muted);
  font: 400 10px/1.4 "IBM Plex Mono", monospace;
}

.section {
  padding: 104px 0;
  border-top: 1px solid var(--line-strong);
  scroll-margin-top: 58px;
}

.section-head {
  display: grid;
  grid-template-columns: minmax(160px, .36fr) minmax(0, 1fr);
  gap: 36px;
  margin-bottom: 62px;
}

h2 {
  max-width: 750px;
  margin: -8px 0 0;
  font-size: clamp(34px, 5vw, 62px);
  line-height: 1.02;
  letter-spacing: -.045em;
  font-weight: 500;
}

.about-grid {
  display: grid;
  grid-template-columns: 1.35fr .65fr;
  gap: clamp(48px, 9vw, 130px);
  margin-left: calc(36% + 10px);
}

.about-copy {
  margin: 0;
  font-size: clamp(19px, 2vw, 25px);
  line-height: 1.55;
}

.about-copy + .about-copy { margin-top: 22px; color: var(--muted); font-size: 17px; }

.facts { margin: 0; }
.fact { padding: 17px 0; border-top: 1px solid var(--line); }
.fact:last-child { border-bottom: 1px solid var(--line); }
.fact dd { margin: 6px 0 0; font-size: 16px; }

.people-intro {
  display: grid;
  grid-template-columns: minmax(160px, .36fr) minmax(0, 1fr);
  gap: 36px;
  align-items: end;
  margin-top: 78px;
  padding-top: 28px;
  border-top: 1px solid var(--line-strong);
}

.people-intro h3 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(25px, 3.2vw, 40px);
  line-height: 1.12;
  letter-spacing: -.035em;
  font-weight: 500;
}

.people-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: 34px;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
}

.people-role {
  min-height: 210px;
  padding: 25px 24px 28px;
  border-right: 1px solid var(--line);
}

.people-role:last-child { border-right: 0; }
.people-role h4 { margin: 50px 0 10px; font-size: 19px; line-height: 1.2; font-weight: 500; }
.people-role p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.55; }

.projects { display: grid; gap: 0; border-top: 1px solid var(--line-strong); }
.project {
  display: grid;
  grid-template-columns: minmax(150px, .37fr) minmax(0, 1fr) 56px;
  gap: 28px;
  align-items: start;
  padding: 34px 0 38px;
  border-bottom: 1px solid var(--line-strong);
  text-decoration: none;
}

.project h3 { margin: 0; font-size: clamp(25px, 3vw, 38px); line-height: 1.1; letter-spacing: -.03em; font-weight: 500; }
.project p { max-width: 680px; margin: 5px 0 0; color: var(--muted); font-size: 17px; line-height: 1.55; }
.project .arrow {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line-strong);
  color: var(--accent-ink);
  transition: background .18s ease, color .18s ease;
}
.project:hover .arrow { background: var(--accent); color: white; border-color: var(--accent); }
.project .arrow svg { width: 17px; height: 17px; }

.principles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  border: 1px solid var(--line-strong);
  background: var(--line-strong);
}

.principle { min-height: 270px; padding: 30px; background: var(--surface); }
.principle-number { color: var(--accent-ink); font: 500 12px/1 "IBM Plex Mono", monospace; }
.principle h3 { margin: 66px 0 13px; font-size: 23px; line-height: 1.15; font-weight: 500; }
.principle p { margin: 0; color: var(--muted); font-size: 15px; }

.contact-block {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 30px;
  align-items: end;
  padding: clamp(34px, 6vw, 68px);
  background: var(--ink);
  color: var(--paper);
}

.contact-block h2 { max-width: 800px; margin: 0; }
.contact-block p { max-width: 620px; margin: 22px 0 0; color: color-mix(in srgb, var(--paper) 72%, transparent); font-size: 17px; }
.contact-actions { display: flex; flex-direction: column; align-items: stretch; gap: 10px; }
.contact-block .button { border-color: var(--paper); background: var(--paper); color: var(--ink); white-space: nowrap; }
.contact-block .button.secondary { background: transparent; color: var(--paper); }
.contact-block .button:hover { border-color: var(--accent); background: var(--accent); color: white; }
.copy-note { min-height: 16px; margin: 0; color: color-mix(in srgb, var(--paper) 72%, transparent); font: 400 11px/1.4 "IBM Plex Mono", monospace; text-align: center; }

footer {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  padding: 28px 0 44px;
  color: var(--muted);
  font: 400 11px/1.5 "IBM Plex Mono", monospace;
}

@media (max-width: 820px) {
  .shell { width: min(100% - 28px, 680px); }
  .nav { min-height: 54px; }
  .identity span:last-child { display: none; }
  .nav-links a:nth-child(2) { display: none; }
  .hero { min-height: 0; grid-template-columns: 1fr; padding: 72px 0 58px; }
  .hero-copy { font-size: 18px; }
  .system-figure { width: min(100%, 470px); justify-self: end; }
  .section { padding: 76px 0; scroll-margin-top: 54px; }
  .section-head { grid-template-columns: 1fr; gap: 24px; margin-bottom: 44px; }
  .about-grid { grid-template-columns: 1fr; gap: 42px; margin-left: 0; }
  .people-intro { grid-template-columns: 1fr; gap: 18px; margin-top: 58px; }
  .people-grid { grid-template-columns: repeat(2, 1fr); }
  .people-role:nth-child(2) { border-right: 0; }
  .people-role:nth-child(-n + 2) { border-bottom: 1px solid var(--line); }
  .project { grid-template-columns: 1fr 42px; gap: 18px; }
  .project-tag { grid-column: 1 / -1; }
  .project .arrow { grid-column: 2; grid-row: 2; }
  .principles { grid-template-columns: 1fr; }
  .principle { min-height: 0; }
  .principle h3 { margin-top: 38px; }
  .contact-block { grid-template-columns: 1fr; align-items: start; }
  .contact-actions { align-items: stretch; }
}

@media (max-width: 500px) {
  .nav-links a { padding-inline: 7px; }
  .nav-links a:nth-child(1) { display: none; }
  h1 { font-size: clamp(44px, 15vw, 64px); }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .system-figure { aspect-ratio: .96 / 1; }
  .diagram-node { width: 76px; }
  .node-b { width: 98px; }
  .people-grid { grid-template-columns: 1fr; }
  .people-role { min-height: 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .people-role:nth-child(3) { border-bottom: 1px solid var(--line); }
  .people-role:last-child { border-bottom: 0; }
  .people-role h4 { margin-top: 30px; }
  .project { grid-template-columns: 1fr; }
  .project .arrow { grid-column: 1; grid-row: auto; }
  .contact-block { padding: 30px 22px; }
  footer { flex-direction: column; gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition-duration: .01ms !important; }
}
