:root {
  --page: #fcfcfb;
  --surface: #ffffff;
  --ink: #111318;
  --muted: #626a76;
  --faint: #6b7280;
  --line: #e3e7ed;
  --line-strong: #cfd5de;
  --accent: #1d4ed8;
  --accent-soft: #eef3ff;
  --max-width: 1040px;
  --gutter: clamp(20px, 4vw, 48px);
  --sans: Inter, "SF Pro Text", "SF Pro Display", "PingFang SC", "Noto Sans CJK SC", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "SFMono-Regular", "Cascadia Mono", "Roboto Mono", Consolas, monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}

a:hover {
  color: var(--accent);
}

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

img {
  max-width: 100%;
}

.shell {
  width: min(var(--max-width), calc(100% - (var(--gutter) * 2)));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  z-index: 20;
  top: 12px;
  left: 12px;
  padding: 8px 12px;
  background: var(--ink);
  color: white;
  transform: translateY(-180%);
}

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

.site-header {
  position: sticky;
  z-index: 10;
  top: 0;
  background: rgba(252, 252, 251, 0.96);
  border-bottom: 1px solid var(--line);
}

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

.wordmark {
  display: inline-flex;
  align-items: baseline;
  gap: 12px;
  text-decoration: none;
}

.wordmark > span {
  font-size: 1rem;
  font-weight: 650;
  letter-spacing: 0.04em;
}

.wordmark small {
  color: var(--faint);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2.7vw, 30px);
  font-size: 0.84rem;
}

.primary-nav a {
  color: var(--muted);
  text-decoration: none;
}

.primary-nav a:hover {
  color: var(--ink);
}

.primary-nav .resume-link {
  color: var(--ink);
  font-weight: 620;
}

.hero {
  scroll-margin-top: 72px;
  min-height: 585px;
  padding-block: clamp(86px, 11vw, 132px) clamp(74px, 9vw, 112px);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
}

.kicker,
.section-index {
  margin: 0 0 18px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.13em;
}

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

h1 {
  margin-bottom: 22px;
  font-size: clamp(3rem, 7vw, 4.4rem);
  font-weight: 680;
  line-height: 1.05;
  letter-spacing: 0.055em;
}

.hero-statement {
  max-width: 680px;
  margin-bottom: 16px;
  font-size: clamp(1.35rem, 2.5vw, 1.78rem);
  font-weight: 560;
  line-height: 1.48;
  letter-spacing: 0.01em;
}

.hero-intro {
  max-width: 66ch;
  margin-bottom: 28px;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 13px 24px;
  font-size: 0.88rem;
}

.hero-actions a {
  font-weight: 610;
}

.hero-actions .action-primary {
  padding: 8px 12px;
  background: var(--ink);
  color: white;
  text-decoration: none;
  border-radius: 6px;
}

.hero-actions .action-primary:hover {
  background: var(--accent);
}

.hero-meta {
  margin: 20px 0 0;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 0.72rem;
}

.section {
  scroll-margin-top: 72px;
  padding-block: clamp(76px, 9vw, 112px);
  border-top: 1px solid var(--line);
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.72fr);
  gap: 48px;
  align-items: end;
  margin-bottom: 42px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: 0.02em;
}

.section-heading > p {
  max-width: 34ch;
  margin: 0;
  color: var(--muted);
}

.system-list {
  border-top: 1px solid var(--line-strong);
}

.system-row {
  display: grid;
  grid-template-columns: 218px minmax(0, 1fr);
  gap: clamp(34px, 7vw, 76px);
  padding-block: 38px 44px;
  border-bottom: 1px solid var(--line);
}

.system-meta p {
  margin-bottom: 5px;
  color: var(--accent);
  font-size: 0.79rem;
  font-weight: 650;
  line-height: 1.45;
}

.system-meta time,
.system-meta > span {
  color: var(--faint);
  font-family: var(--mono);
  font-size: 0.7rem;
}

.system-body h3 {
  margin-bottom: 13px;
  font-size: clamp(1.24rem, 2vw, 1.55rem);
  font-weight: 650;
  line-height: 1.35;
}

.system-body > p {
  max-width: 68ch;
  margin-bottom: 14px;
  color: var(--muted);
}

.system-body .evidence {
  margin-block: 18px 16px;
  padding-left: 15px;
  border-left: 2px solid var(--accent);
  color: var(--ink);
}

.evidence strong {
  font-weight: 700;
}

.proof-link {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 600;
}

.proof-note {
  color: var(--faint);
  font-family: var(--mono);
  font-size: 0.7rem;
}

.timeline {
  border-top: 1px solid var(--line-strong);
}

.timeline-row {
  display: grid;
  grid-template-columns: minmax(285px, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(34px, 7vw, 76px);
  padding-block: 27px 30px;
  border-bottom: 1px solid var(--line);
}

.timeline-meta h3 {
  margin-bottom: 5px;
  font-size: 0.98rem;
  font-weight: 650;
  line-height: 1.45;
}

.timeline-meta time {
  color: var(--faint);
  font-family: var(--mono);
  font-size: 0.69rem;
}

.timeline-row > p {
  max-width: 64ch;
  margin: 0;
  color: var(--muted);
}

.research-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(34px, 6vw, 64px);
  border-top: 1px solid var(--line-strong);
}

.research-item {
  padding-block: 31px 35px;
  border-bottom: 1px solid var(--line);
}

.research-item:nth-child(odd):not(.research-wide) {
  border-right: 1px solid var(--line);
  padding-right: clamp(20px, 4vw, 42px);
}

.research-item h3 {
  margin-bottom: 12px;
  font-size: 1.2rem;
  font-weight: 650;
}

.research-item > p:not(.research-meta):not(.research-result) {
  margin-bottom: 15px;
  color: var(--muted);
}

.research-meta,
.resume-label {
  margin-bottom: 9px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.research-result {
  margin: 0;
  color: var(--ink);
}

.research-result strong {
  font-weight: 700;
}

.research-wide {
  grid-column: 1 / -1;
}

.research-wide > p:not(.research-meta) {
  max-width: 76ch;
}

.link-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line-strong);
}

.link-item {
  min-height: 112px;
  padding: 23px 22px 24px 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}

.link-item:nth-child(odd) {
  padding-right: 28px;
  border-right: 1px solid var(--line);
}

.link-item:nth-child(even) {
  padding-left: 28px;
}

.link-item strong,
.link-item small {
  display: block;
}

.link-item strong {
  margin-bottom: 5px;
  color: var(--ink);
  font-size: 0.94rem;
  font-weight: 650;
}

.link-item small {
  max-width: 44ch;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.55;
}

.link-item b {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.86rem;
}

.resume-panel {
  margin-top: 44px;
  padding: clamp(26px, 4vw, 38px);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 36px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
}

.resume-panel h3 {
  margin-bottom: 7px;
  font-size: 1.35rem;
  font-weight: 650;
}

.resume-panel p:last-child {
  margin: 0;
  color: var(--muted);
}

.resume-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px 20px;
  white-space: nowrap;
  font-size: 0.82rem;
  font-weight: 650;
}

.site-footer {
  padding-block: 26px;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-family: var(--mono);
  font-size: 0.68rem;
}

.footer-row {
  display: flex;
  justify-content: space-between;
  gap: 22px;
}

@media (max-width: 760px) {
  .nav-row {
    min-height: 64px;
  }

  .wordmark small,
  .primary-nav a:not(.resume-link) {
    display: none;
  }

  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
    gap: 38px;
    padding-block: 70px 76px;
  }

  .section-heading,
  .system-row,
  .timeline-row,
  .research-grid,
  .link-list {
    grid-template-columns: 1fr;
  }

  .section-heading {
    gap: 18px;
  }

  .section-heading > p {
    max-width: 48ch;
  }

  .system-row {
    gap: 17px;
  }

  .timeline-row {
    gap: 12px;
  }

  .research-item:nth-child(odd):not(.research-wide),
  .link-item:nth-child(odd) {
    padding-right: 0;
    border-right: 0;
  }

  .link-item:nth-child(even) {
    padding-left: 0;
  }

  .resume-panel {
    align-items: flex-start;
    flex-direction: column;
  }

  .resume-actions {
    justify-content: flex-start;
    white-space: normal;
  }

  .footer-row {
    flex-direction: column;
    gap: 5px;
  }
}

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