:root {
  --canvas: #f5f6f4;
  --surface: #ffffff;
  --ink: #0c0d0e;
  --muted: #6b6f72;
  --line: #dde0e1;
  --signal: #4d72ff;
  --dark: #0b0c0d;
  --dark-line: #292b2e;
  --dark-muted: #999da3;
  --display: "Songti SC", "STSong", "SimSun", "Times New Roman", serif;
  --body: Inter, "SF Pro Text", "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --rail-width: 72px;
  --page-pad: clamp(28px, 4.2vw, 80px);
  --content-max: 1500px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.7;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body.nav-open {
  overflow: hidden;
}

::selection {
  color: var(--surface);
  background: var(--signal);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  color: inherit;
}

img,
svg {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3,
p,
figure,
dl,
dd {
  margin-top: 0;
}

ul {
  margin-top: 0;
}

:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 4px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 12px;
  left: 92px;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--surface);
  transform: translateY(-160%);
  transition: transform 180ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.section-shell {
  width: min(100%, var(--content-max));
  margin-inline: auto;
  padding-inline: var(--page-pad);
}

/* Fixed chapter index */
.site-chrome {
  position: fixed;
  z-index: 100;
  inset: 0 auto 0 0;
  display: flex;
  width: var(--rail-width);
  flex-direction: column;
  align-items: stretch;
  border-right: 1px solid var(--line);
  background: color-mix(in srgb, var(--canvas) 91%, transparent);
  backdrop-filter: blur(18px);
}

.brand {
  display: grid;
  min-height: 86px;
  place-items: center;
  border-bottom: 1px solid var(--line);
}

.brand-mark {
  width: 34px;
  height: 34px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  transition: transform 550ms var(--ease-out);
}

.brand:hover .brand-mark,
.brand:focus-visible .brand-mark {
  transform: rotate(45deg);
}

.brand-type {
  display: none;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.site-nav {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: center;
}

.site-nav a {
  position: relative;
  display: grid;
  min-height: 48px;
  place-items: center;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.08em;
  transition: color 180ms ease, background-color 180ms ease;
}

.site-nav a::before {
  position: absolute;
  top: 50%;
  left: -1px;
  width: 2px;
  height: 0;
  background: var(--signal);
  content: "";
  transform: translateY(-50%);
  transition: height 250ms var(--ease-out);
}

.site-nav a:hover,
.site-nav a:focus-visible,
.site-nav a[aria-current="true"] {
  color: var(--ink);
  background: var(--surface);
}

.site-nav a[aria-current="true"]::before {
  height: 22px;
}

.rail-meta {
  display: flex;
  min-height: 108px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.1em;
}

.rail-line {
  width: 1px;
  height: 18px;
  background: var(--line);
}

.nav-toggle {
  display: none;
}

main {
  margin-left: var(--rail-width);
  overflow: hidden;
}

/* Hero */
.hero {
  position: relative;
  display: flex;
  min-height: 100svh;
  flex-direction: column;
  justify-content: center;
  padding-top: clamp(70px, 8vw, 130px);
  padding-bottom: clamp(88px, 9vw, 140px);
}

.hero-grid {
  display: grid;
  align-items: center;
  gap: clamp(46px, 5vw, 90px);
  grid-template-columns: minmax(0, 1.12fr) minmax(450px, 0.88fr);
}

.eyebrow,
.section-index {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  line-height: 1.3;
}

.hero-kicker {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: clamp(34px, 4vw, 62px);
}

.hero-kicker::before {
  width: 28px;
  height: 1px;
  background: var(--ink);
  content: "";
}

.hero h1 {
  margin-bottom: 16px;
  font-family: var(--display);
  font-size: clamp(78px, 10vw, 164px);
  font-weight: 400;
  letter-spacing: -0.09em;
  line-height: 0.88;
}

.hero h1 span {
  display: inline-block;
}

.hero-role {
  margin-bottom: 34px;
  color: var(--muted);
  font-size: clamp(13px, 1.1vw, 17px);
  letter-spacing: 0.02em;
}

.hero-role span {
  margin-inline: 7px;
  color: var(--line);
}

.hero-thesis {
  max-width: 680px;
  margin-bottom: 38px;
  font-family: var(--display);
  font-size: clamp(24px, 2.1vw, 36px);
  line-height: 1.48;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: clamp(48px, 6vw, 82px);
}

.button {
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  justify-content: space-between;
  gap: 42px;
  padding: 12px 18px;
  border: 1px solid var(--ink);
  font-size: 14px;
  transition: background-color 180ms ease, color 180ms ease, transform 180ms var(--ease-out);
}

.button:hover {
  transform: translateY(-2px);
}

.button-dark {
  background: var(--ink);
  color: var(--surface);
}

.button-dark:hover {
  background: var(--signal);
  border-color: var(--signal);
}

.button-quiet:hover {
  background: var(--surface);
}

.hero-facts {
  display: grid;
  max-width: 760px;
  margin-bottom: 0;
  border-top: 1px solid var(--line);
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.hero-facts div {
  min-height: 92px;
  padding: 18px 18px 0 0;
  border-right: 1px solid var(--line);
}

.hero-facts div + div {
  padding-left: 18px;
}

.hero-facts div:last-child {
  border-right: 0;
}

.hero-facts dt {
  margin-bottom: 6px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
}

.hero-facts dd {
  margin-bottom: 0;
  font-size: 13px;
  line-height: 1.55;
}

.capability-field {
  position: relative;
  min-height: clamp(540px, 59vw, 700px);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
  isolation: isolate;
}

.field-grid {
  position: absolute;
  z-index: -2;
  inset: 0;
  opacity: 0.72;
  background-image:
    linear-gradient(to right, var(--line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line) 1px, transparent 1px);
  background-size: 25% 25%;
}

.capability-field::after {
  position: absolute;
  z-index: -1;
  inset: 0;
  background: radial-gradient(circle at 51% 48%, transparent 0 18%, color-mix(in srgb, var(--signal) 6%, transparent) 35%, transparent 65%);
  content: "";
  opacity: 0;
  transition: opacity 500ms ease;
}

.capability-field:hover::after {
  opacity: 1;
}

.field-axis {
  position: absolute;
  background: var(--ink);
  opacity: 0.18;
}

.field-axis-x {
  top: 50%;
  right: 0;
  left: 0;
  height: 1px;
}

.field-axis-y {
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
}

.field-index {
  position: absolute;
  top: 18px;
  left: 18px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.08em;
}

.field-index::before {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--signal);
  content: "";
}

.field-origin {
  position: absolute;
  top: 50%;
  left: 50%;
  width: clamp(126px, 11vw, 174px);
  aspect-ratio: 1;
  padding: 10px;
  border: 1px solid var(--ink);
  background: var(--surface);
  transform: translate(-50%, -50%);
}

.field-origin > span {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 12px;
  height: 12px;
  border: 2px solid var(--surface);
  border-radius: 50%;
  background: var(--signal);
}

.field-origin img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.field-node {
  position: absolute;
  z-index: 2;
  display: grid;
  min-width: 128px;
  gap: 1px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  box-shadow: 0 8px 30px rgb(12 13 14 / 4%);
  transform: translate3d(var(--shift-x, 0), var(--shift-y, 0), 0);
  transition: border-color 180ms ease, background-color 180ms ease, color 180ms ease, transform 380ms var(--ease-out);
  backdrop-filter: blur(8px);
}

.field-node::after {
  position: absolute;
  top: 50%;
  width: 32px;
  height: 1px;
  background: var(--line);
  content: "";
}

.field-node:hover,
.field-node:focus-visible {
  border-color: var(--signal);
  background: var(--ink);
  color: var(--surface);
}

.field-node strong {
  font-family: var(--display);
  font-size: 17px;
  font-weight: 400;
}

.field-node small,
.node-code {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.08em;
}

.field-node:hover small,
.field-node:hover .node-code,
.field-node:focus-visible small,
.field-node:focus-visible .node-code {
  color: #c6c9ce;
}

.node-research {
  top: 15%;
  left: 7%;
}

.node-research::after,
.node-communication::after {
  left: 100%;
}

.node-data {
  top: 18%;
  right: 6%;
}

.node-data::after,
.node-product::after {
  right: 100%;
}

.node-product {
  right: 7%;
  bottom: 15%;
}

.node-communication {
  bottom: 17%;
  left: 6%;
}

.field-coordinate {
  position: absolute;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
}

.coordinate-a {
  right: 12px;
  bottom: 8px;
}

.coordinate-b {
  bottom: 8px;
  left: 12px;
}

.scroll-cue {
  position: absolute;
  bottom: 28px;
  left: var(--page-pad);
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.08em;
}

.scroll-cue i {
  position: relative;
  display: block;
  width: 72px;
  height: 1px;
  overflow: hidden;
  background: var(--line);
}

.scroll-cue i::after {
  position: absolute;
  inset: 0;
  background: var(--ink);
  content: "";
  transform: translateX(-100%);
  animation: scroll-line 2.4s var(--ease-out) infinite;
}

@keyframes scroll-line {
  0% { transform: translateX(-100%); }
  45%, 55% { transform: translateX(0); }
  100% { transform: translateX(100%); }
}

/* Shared content sections */
.content-section {
  padding-top: clamp(112px, 11vw, 180px);
  padding-bottom: clamp(112px, 11vw, 180px);
  border-top: 1px solid var(--line);
}

.section-heading {
  display: grid;
  align-items: start;
  gap: 32px;
  margin-bottom: clamp(72px, 8vw, 124px);
  grid-template-columns: repeat(12, minmax(0, 1fr));
}

.section-heading .section-index {
  grid-column: 1 / span 3;
}

.section-heading h2 {
  grid-column: 5 / -1;
  margin-bottom: 0;
  font-family: var(--display);
  font-size: clamp(43px, 5.5vw, 84px);
  font-weight: 400;
  letter-spacing: -0.055em;
  line-height: 1.13;
}

.section-heading.compact h2 {
  font-size: clamp(38px, 4.7vw, 70px);
}

.about-layout {
  display: grid;
  align-items: start;
  gap: 38px;
  grid-template-columns: repeat(12, minmax(0, 1fr));
}

.about-lead {
  grid-column: 1 / span 4;
  font-family: var(--display);
  font-size: clamp(24px, 2.1vw, 34px);
  line-height: 1.5;
}

.about-copy {
  grid-column: 5 / span 4;
  color: var(--muted);
  font-size: clamp(15px, 1.15vw, 18px);
}

.about-copy p + p {
  margin-top: 24px;
}

.profile-figure {
  grid-column: 10 / -1;
  margin-bottom: 0;
}

.profile-figure img {
  width: 100%;
  aspect-ratio: 0.82;
  border: 1px solid var(--line);
  object-fit: cover;
}

.profile-figure figcaption {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-top: 10px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.05em;
}

/* Capabilities */
.capabilities-section {
  background: var(--surface);
}

.capability-cards {
  display: grid;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.capability-card {
  min-height: 410px;
  padding: clamp(24px, 2.2vw, 38px);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  transition: color 250ms ease, background-color 250ms ease, transform 300ms var(--ease-out);
}

.capability-card:hover {
  z-index: 1;
  background: var(--ink);
  color: var(--surface);
  transform: translateY(-8px);
}

.card-top {
  display: flex;
  justify-content: space-between;
  margin-bottom: clamp(72px, 8vw, 126px);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.08em;
}

.capability-card h3 {
  margin-bottom: 14px;
  font-family: var(--display);
  font-size: 28px;
  font-weight: 400;
}

.capability-card p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.75;
}

.capability-card ul {
  margin: 26px 0 0;
  padding: 18px 0 0;
  border-top: 1px solid var(--line);
  list-style: none;
}

.capability-card li {
  position: relative;
  padding-left: 14px;
  font-size: 12px;
}

.capability-card li::before {
  position: absolute;
  top: 0.68em;
  left: 0;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--signal);
  content: "";
}

.capability-card:hover p,
.capability-card:hover .card-top {
  color: #b6bac0;
}

.capability-card:hover ul {
  border-color: #34373b;
}

/* Timeline */
.timeline {
  border-top: 1px solid var(--ink);
}

.timeline-entry {
  display: grid;
  gap: clamp(28px, 4vw, 68px);
  padding-block: clamp(38px, 4.2vw, 66px);
  border-bottom: 1px solid var(--line);
  grid-template-columns: minmax(160px, 2.6fr) minmax(0, 9.4fr);
}

.entry-date {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  padding-top: 4px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: -0.02em;
}

.entry-date span {
  color: var(--line);
}

.entry-main {
  min-width: 0;
}

.entry-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.entry-org {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 13px;
}

.entry-title-row h3 {
  margin-bottom: 0;
  font-family: var(--display);
  font-size: clamp(24px, 2.25vw, 36px);
  font-weight: 400;
  line-height: 1.3;
}

.entry-status {
  flex: 0 0 auto;
  padding: 6px 8px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.06em;
}

.entry-main > p,
.entry-details p {
  max-width: 900px;
  color: var(--muted);
}

.entry-highlights,
.entry-details ul {
  max-width: 980px;
  margin-bottom: 28px;
  padding-left: 1.2em;
}

.entry-highlights li,
.entry-details li {
  margin-bottom: 12px;
  padding-left: 6px;
}

.entry-highlights li::marker,
.entry-details li::marker {
  color: var(--signal);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 22px;
}

.tag-list span {
  padding: 5px 9px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
  line-height: 1.4;
}

.entry-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 0 0 5px;
  border: 0;
  border-bottom: 1px solid var(--ink);
  background: transparent;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 10px;
}

.js .entry-toggle {
  display: inline-flex;
}

.entry-toggle i {
  position: relative;
  width: 10px;
  height: 10px;
}

.entry-toggle i::before,
.entry-toggle i::after {
  position: absolute;
  top: 50%;
  left: 0;
  width: 10px;
  height: 1px;
  background: currentColor;
  content: "";
  transition: transform 200ms ease;
}

.entry-toggle[aria-expanded="false"] i::after {
  transform: rotate(90deg);
}

.entry-details {
  margin-top: 26px;
  padding-top: 24px;
  border-top: 1px dashed var(--line);
}

.entry-details[hidden] {
  display: none;
}

/* Projects */
.projects-section {
  background: var(--surface);
}

.project-list {
  border-top: 1px solid var(--ink);
}

.project-card {
  display: grid;
  gap: clamp(28px, 4vw, 70px);
  padding-block: clamp(54px, 6vw, 96px);
  border-bottom: 1px solid var(--line);
  grid-template-columns: minmax(90px, 2fr) minmax(0, 10fr);
}

.project-number {
  font-family: var(--display);
  font-size: clamp(58px, 6vw, 92px);
  line-height: 0.8;
}

.project-meta {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
}

.project-card h3 {
  max-width: 960px;
  margin-bottom: 24px;
  font-family: var(--display);
  font-size: clamp(34px, 4vw, 62px);
  font-weight: 400;
  letter-spacing: -0.04em;
  line-height: 1.2;
}

.project-summary {
  max-width: 880px;
  color: var(--muted);
  font-size: clamp(16px, 1.35vw, 20px);
}

.project-metrics {
  display: grid;
  max-width: 920px;
  margin: 46px 0 34px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.project-metrics div {
  padding: 18px 20px 18px 0;
  border-right: 1px solid var(--line);
}

.project-metrics div + div {
  padding-left: 20px;
}

.project-metrics div:last-child {
  border-right: 0;
}

.project-metrics dt {
  margin-bottom: 3px;
  font-family: var(--display);
  font-size: 30px;
}

.project-metrics dd {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

/* Skills */
.skills-grid {
  display: grid;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.skills-grid article {
  min-height: 240px;
  padding: clamp(24px, 2.8vw, 42px);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.skills-grid article > span {
  display: block;
  margin-bottom: 56px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
}

.skills-grid h3 {
  margin-bottom: 10px;
  font-family: var(--display);
  font-size: 24px;
  font-weight: 400;
}

.skills-grid p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 13px;
}

/* Dark conclusion */
.dark-zone {
  background: var(--dark);
  color: #f2f3f4;
}

.dark-zone .content-section {
  border-color: var(--dark-line);
}

.section-heading.inverse .section-index {
  color: var(--dark-muted);
}

.resource-placeholder {
  display: grid;
  align-items: center;
  gap: 34px;
  min-height: 210px;
  padding: clamp(28px, 4vw, 60px);
  border: 1px solid var(--dark-line);
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.resource-signal {
  display: grid;
  width: 76px;
  height: 76px;
  place-items: center;
  border: 1px solid var(--dark-line);
  grid-template-columns: repeat(2, 1fr);
}

.resource-signal span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #484b50;
}

.resource-signal span:first-child {
  background: var(--signal);
  box-shadow: 0 0 22px rgb(77 114 255 / 65%);
}

.resource-placeholder p {
  margin-bottom: 8px;
  font-family: var(--display);
  font-size: clamp(20px, 2vw, 30px);
}

.resource-placeholder div > span,
.resource-state {
  color: var(--dark-muted);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.09em;
}

.resource-state {
  padding: 8px 10px;
  border: 1px solid var(--dark-line);
}

.contact-section {
  padding-bottom: clamp(88px, 9vw, 140px);
}

.contact-grid {
  display: grid;
  align-items: end;
  gap: 48px;
  grid-template-columns: repeat(12, minmax(0, 1fr));
}

.contact-grid .section-heading {
  display: block;
  grid-column: 1 / span 7;
  margin-bottom: 0;
}

.contact-grid .section-heading h2 {
  margin-top: 46px;
  font-size: clamp(43px, 5.4vw, 82px);
}

.contact-actions {
  grid-column: 8 / -1;
  padding-bottom: 8px;
}

.contact-actions > p:first-child {
  margin-bottom: 28px;
  color: var(--dark-muted);
}

.contact-email {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding-block: 16px;
  border-top: 1px solid var(--dark-line);
  border-bottom: 1px solid var(--dark-line);
  font-size: clamp(17px, 1.7vw, 25px);
  overflow-wrap: anywhere;
  transition: color 180ms ease;
}

.contact-email:hover {
  color: #8ca3ff;
}

.contact-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 18px;
  color: var(--dark-muted);
  font-family: var(--mono);
  font-size: 10px;
}

.contact-tools button {
  padding: 8px 0;
  border: 0;
  border-bottom: 1px solid #555960;
  background: transparent;
  cursor: pointer;
}

.contact-tools button:hover {
  color: #fff;
}

.copy-status {
  min-height: 24px;
  margin: 12px 0 0;
  color: #8ca3ff;
  font-size: 12px;
}

.site-footer {
  display: flex;
  min-height: 96px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-top: 1px solid var(--dark-line);
  color: var(--dark-muted);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.06em;
}

.site-footer p {
  margin: 0;
}

.site-footer button {
  padding: 8px 0;
  border: 0;
  background: transparent;
  color: #f2f3f4;
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
}

/* Progressive motion */
.js [data-hero-item] {
  opacity: 0;
  transform: translateY(18px);
}

.js.is-ready [data-hero-item] {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out);
}

.js.is-ready [data-hero-item]:nth-child(2) { transition-delay: 70ms; }
.js.is-ready [data-hero-item]:nth-child(3) { transition-delay: 130ms; }
.js.is-ready [data-hero-item]:nth-child(4) { transition-delay: 190ms; }
.js.is-ready [data-hero-item]:nth-child(5) { transition-delay: 250ms; }
.js.is-ready [data-hero-item]:nth-child(6) { transition-delay: 310ms; }

.js [data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 650ms var(--ease-out), transform 650ms var(--ease-out);
}

.js [data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* 404 */
.error-page {
  min-height: 100svh;
}

.error-main {
  display: grid;
  min-height: 100svh;
  margin-left: var(--rail-width);
  place-items: center;
  overflow: hidden;
}

.error-panel {
  position: relative;
  display: grid;
  width: min(1080px, calc(100% - 48px));
  min-height: 620px;
  overflow: hidden;
  place-items: center;
  border: 1px solid var(--line);
  background: var(--surface);
  text-align: center;
}

.error-panel::before {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, var(--line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line) 1px, transparent 1px);
  background-size: 12.5% 25%;
  content: "";
  opacity: 0.55;
}

.error-content {
  position: relative;
  z-index: 1;
  padding: 36px;
}

.error-code {
  margin-bottom: 18px;
  color: var(--signal);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
}

.error-content h1 {
  margin-bottom: 18px;
  font-family: var(--display);
  font-size: clamp(58px, 8vw, 118px);
  font-weight: 400;
  letter-spacing: -0.07em;
  line-height: 1;
}

.error-content p {
  max-width: 480px;
  margin: 0 auto 34px;
  color: var(--muted);
}

.error-orbit {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 420px;
  height: 420px;
  border: 1px solid var(--line);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.error-orbit::before {
  position: absolute;
  top: 45px;
  right: 45px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 0 7px var(--surface);
  content: "";
}

@media (max-width: 1180px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .capability-field {
    width: min(100%, 760px);
    min-height: 620px;
  }

  .capability-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .capability-card {
    min-height: 360px;
  }

  .card-top {
    margin-bottom: 80px;
  }

  .about-lead {
    grid-column: 1 / span 5;
  }

  .about-copy {
    grid-column: 6 / span 4;
  }

  .profile-figure {
    grid-column: 10 / -1;
  }
}

@media (max-width: 900px) {
  :root {
    --rail-width: 0px;
  }

  html {
    scroll-padding-top: 76px;
  }

  body {
    padding-top: 64px;
  }

  main,
  .error-main {
    margin-left: 0;
  }

  .site-chrome {
    inset: 0 0 auto;
    width: 100%;
    height: 64px;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding-inline: 18px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .brand {
    display: flex;
    min-height: auto;
    align-items: center;
    gap: 10px;
    border: 0;
  }

  .brand-mark {
    width: 30px;
    height: 30px;
  }

  .brand-type {
    display: inline;
  }

  .nav-toggle {
    position: relative;
    z-index: 2;
    display: grid;
    width: 40px;
    height: 40px;
    padding: 0;
    place-items: center;
    border: 1px solid var(--line);
    background: var(--canvas);
  }

  .nav-toggle span:not(.sr-only) {
    position: absolute;
    width: 17px;
    height: 1px;
    background: var(--ink);
    transition: transform 220ms ease;
  }

  .nav-toggle span:nth-child(2) {
    transform: translateY(-4px);
  }

  .nav-toggle span:nth-child(3) {
    transform: translateY(4px);
  }

  .nav-toggle[aria-expanded="true"] span:nth-child(2) {
    transform: rotate(45deg);
  }

  .nav-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: rotate(-45deg);
  }

  .site-nav {
    position: fixed;
    z-index: 1;
    top: 63px;
    right: 0;
    left: 0;
    display: grid;
    max-height: 0;
    overflow: hidden;
    background: var(--canvas);
    grid-template-columns: repeat(2, 1fr);
    opacity: 0;
    visibility: hidden;
    transition: max-height 420ms var(--ease-out), opacity 220ms ease, visibility 220ms ease;
  }

  .site-nav.is-open {
    max-height: calc(100svh - 63px);
    border-bottom: 1px solid var(--line);
    opacity: 1;
    visibility: visible;
  }

  .site-nav a {
    min-height: 68px;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    font-size: 13px;
  }

  .site-nav a::before {
    top: auto;
    bottom: -1px;
    left: 50%;
    width: 0;
    height: 2px;
    transform: translateX(-50%);
    transition: width 250ms var(--ease-out);
  }

  .site-nav a[aria-current="true"]::before {
    width: 28px;
    height: 2px;
  }

  .rail-meta {
    display: none;
  }

  .hero {
    min-height: auto;
    padding-top: 76px;
  }

  .hero h1 {
    font-size: clamp(72px, 18vw, 124px);
  }

  .scroll-cue {
    display: none;
  }

  .section-heading,
  .about-layout,
  .contact-grid {
    grid-template-columns: repeat(8, minmax(0, 1fr));
  }

  .section-heading .section-index {
    grid-column: 1 / span 2;
  }

  .section-heading h2 {
    grid-column: 3 / -1;
  }

  .about-lead {
    grid-column: 1 / span 4;
  }

  .about-copy {
    grid-column: 5 / -1;
  }

  .profile-figure {
    width: min(100%, 420px);
    margin-top: 42px;
    grid-column: 5 / -1;
  }

  .timeline-entry {
    grid-template-columns: minmax(132px, 2fr) minmax(0, 6fr);
  }

  .skills-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .contact-grid .section-heading {
    grid-column: 1 / -1;
  }

  .contact-actions {
    grid-column: 3 / -1;
  }

  .error-panel {
    min-height: calc(100svh - 112px);
  }
}

@media (max-width: 640px) {
  :root {
    --page-pad: 18px;
  }

  body {
    font-size: 15px;
  }

  .hero {
    padding-top: 62px;
    padding-bottom: 78px;
  }

  .hero-kicker {
    margin-bottom: 34px;
  }

  .hero h1 {
    margin-bottom: 18px;
    font-size: clamp(68px, 24vw, 96px);
  }

  .hero-role {
    max-width: 320px;
    line-height: 1.8;
  }

  .hero-role span {
    margin-inline: 3px;
  }

  .hero-thesis {
    font-size: 25px;
  }

  .button {
    width: 100%;
  }

  .hero-facts {
    grid-template-columns: 1fr;
  }

  .hero-facts div,
  .hero-facts div + div {
    min-height: 74px;
    padding: 14px 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .capability-field {
    min-height: 470px;
  }

  .field-origin {
    width: 108px;
  }

  .field-node {
    min-width: 108px;
    padding: 8px 9px;
  }

  .field-node strong {
    font-size: 14px;
  }

  .field-node::after {
    width: 18px;
  }

  .node-research {
    top: 14%;
    left: 4%;
  }

  .node-data {
    top: 17%;
    right: 3%;
  }

  .node-product {
    right: 4%;
    bottom: 14%;
  }

  .node-communication {
    bottom: 17%;
    left: 3%;
  }

  .content-section {
    padding-block: 94px;
  }

  .section-heading,
  .about-layout {
    display: block;
  }

  .section-heading {
    margin-bottom: 62px;
  }

  .section-heading .section-index {
    margin-bottom: 24px;
  }

  .section-heading h2,
  .section-heading.compact h2 {
    font-size: clamp(40px, 12vw, 54px);
  }

  .about-lead {
    margin-bottom: 34px;
  }

  .profile-figure {
    width: 78%;
    margin-top: 52px;
    margin-left: auto;
  }

  .capability-cards,
  .skills-grid {
    grid-template-columns: 1fr;
  }

  .capability-card {
    min-height: 330px;
  }

  .card-top {
    margin-bottom: 72px;
  }

  .timeline-entry,
  .project-card {
    grid-template-columns: 1fr;
  }

  .timeline-entry {
    gap: 22px;
  }

  .entry-title-row {
    display: block;
  }

  .entry-status {
    display: inline-block;
    margin-top: 14px;
  }

  .entry-highlights {
    padding-left: 1.1em;
  }

  .project-card {
    gap: 32px;
  }

  .project-number {
    font-size: 58px;
  }

  .project-meta {
    display: grid;
    gap: 7px;
  }

  .project-card h3 {
    font-size: 38px;
  }

  .project-metrics {
    grid-template-columns: 1fr;
  }

  .project-metrics div,
  .project-metrics div + div {
    display: flex;
    align-items: baseline;
    gap: 12px;
    padding: 12px 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .project-metrics div:last-child {
    border-bottom: 0;
  }

  .skills-grid article {
    min-height: 220px;
  }

  .resource-placeholder {
    grid-template-columns: 1fr;
  }

  .resource-state {
    justify-self: start;
  }

  .contact-grid {
    display: block;
  }

  .contact-grid .section-heading {
    margin-bottom: 58px;
  }

  .contact-grid .section-heading h2 {
    margin-top: 24px;
    font-size: 42px;
  }

  .contact-email {
    font-size: 15px;
  }

  .site-footer {
    min-height: 150px;
    flex-wrap: wrap;
    align-content: center;
  }

  .site-footer p:nth-child(2) {
    width: 100%;
    order: 3;
  }

  .error-panel {
    width: calc(100% - 36px);
  }

  .error-orbit {
    width: 300px;
    height: 300px;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }

  .js [data-hero-item],
  .js [data-reveal] {
    opacity: 1;
    transform: none;
  }
}

@media print {
  :root {
    --page-pad: 0;
  }

  body {
    padding: 0;
    background: #fff;
    color: #000;
    font-size: 10pt;
  }

  .site-chrome,
  .hero-actions,
  .scroll-cue,
  .entry-toggle,
  .resource-signal,
  [data-back-to-top] {
    display: none !important;
  }

  main {
    margin: 0;
    overflow: visible;
  }

  .hero {
    min-height: auto;
    padding-block: 24pt;
  }

  .hero-grid {
    display: block;
  }

  .hero h1 {
    font-size: 52pt;
  }

  .capability-field {
    display: none;
  }

  .content-section {
    padding-block: 26pt;
    break-inside: avoid;
  }

  .section-heading {
    margin-bottom: 22pt;
  }

  .section-heading h2 {
    font-size: 28pt;
  }

  .timeline-entry,
  .project-card,
  .capability-card,
  .skills-grid article {
    break-inside: avoid;
  }

  .entry-details[hidden] {
    display: block;
  }

  .dark-zone {
    background: #fff;
    color: #000;
  }

  .resources-section {
    display: none;
  }

  .contact-email {
    color: #000;
  }
}
