:root {
  --paper: #f3f2ed;
  --paper-strong: #fbfaf6;
  --ink: #101513;
  --muted: #5d625f;
  --line: #cbcfc9;
  --blue: #2457f5;
  --blue-dark: #173bc0;
  --lime: #c7ff2f;
  --dark: #111917;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

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

html {
  scroll-behavior: smooth;
  background: var(--paper);
}

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

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

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

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

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 100;
  padding: 0.7rem 1rem;
  color: white;
  background: var(--ink);
  transform: translateY(-180%);
}

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

.section-shell,
.nav-shell {
  width: min(1180px, calc(100% - 3rem));
  margin-inline: auto;
}

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

.nav-shell {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.wordmark {
  display: inline-flex;
  align-items: baseline;
  gap: 0.8rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.wordmark small {
  color: var(--blue);
  font-family: var(--mono);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.site-header nav,
.social-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.site-header nav a,
.social-links a {
  position: relative;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.site-header nav a::after,
.social-links a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -0.35rem;
  left: 0;
  height: 2px;
  background: var(--blue);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 160ms ease;
}

.site-header nav a:hover::after,
.social-links a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.site-header nav a[aria-current="page"] {
  color: var(--ink);
}

.site-header nav a[aria-current="page"]::after {
  transform: scaleX(1);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(340px, 0.65fr);
  gap: clamp(3rem, 8vw, 8rem);
  align-items: center;
  min-height: 720px;
  padding-block: clamp(5rem, 10vw, 9rem);
}

.kicker {
  margin-bottom: 1.35rem;
  color: var(--blue);
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.hero h1,
.section-heading h2,
.section-heading h1,
.page-hero h1,
.contact-section h2 {
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: -0.055em;
}

.page-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 4rem;
  align-items: end;
  padding-block: clamp(6rem, 12vw, 11rem) clamp(4rem, 8vw, 7rem);
  border-bottom: 1px solid var(--ink);
}

.page-hero .kicker {
  grid-column: 1 / -1;
  margin-bottom: -1.5rem;
}

.page-hero h1 {
  max-width: 11ch;
  margin-bottom: 0;
  font-size: clamp(3.8rem, 8vw, 8rem);
  line-height: 0.9;
}

.page-hero > p:last-child {
  max-width: 56ch;
  margin-bottom: 0.5rem;
  color: var(--muted);
  font-size: 1.05rem;
}

.hero h1 {
  max-width: 12ch;
  margin-bottom: 2rem;
  font-size: clamp(3.6rem, 7.5vw, 7.6rem);
  line-height: 0.9;
}

.hero-lede {
  max-width: 65ch;
  margin-bottom: 2rem;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.75rem 1.15rem;
  border: 1px solid var(--ink);
  font-size: 0.82rem;
  font-weight: 800;
  transition: color 160ms ease, background 160ms ease, transform 160ms ease;
}

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

.button-primary {
  color: white;
  border-color: var(--blue);
  background: var(--blue);
}

.button-primary:hover {
  background: var(--blue-dark);
}

.control-panel {
  position: relative;
  overflow: hidden;
  min-height: 480px;
  padding: 1.25rem;
  color: #eef4f1;
  background:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    var(--dark);
  background-size: 30px 30px;
}

.control-panel::before {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  right: -70px;
  top: 84px;
  border: 1px solid rgba(199, 255, 47, 0.45);
  border-radius: 50%;
}

.panel-heading {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: #c7cec9;
}

.status i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 16px var(--lime);
}

.control-loop {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 0;
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
}

.control-loop li {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 0.85rem;
  align-items: center;
  min-height: 76px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.13);
}

.node-index {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(199, 255, 47, 0.55);
  border-radius: 50%;
  color: var(--lime);
  font-family: var(--mono);
  font-size: 0.68rem;
}

.control-loop strong,
.control-loop small {
  display: block;
}

.control-loop strong {
  font-size: 0.92rem;
}

.control-loop small {
  margin-top: 0.15rem;
  color: #9ea8a3;
  font-family: var(--mono);
  font-size: 0.68rem;
}

.signal {
  position: absolute;
  right: 1.25rem;
  bottom: 1.25rem;
  left: 1.25rem;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  align-items: end;
  height: 36px;
}

.signal span {
  height: 30%;
  background: rgba(199, 255, 47, 0.75);
}

.signal span:nth-child(2),
.signal span:nth-child(5) {
  height: 62%;
}

.signal span:nth-child(3) {
  height: 92%;
}

.signal span:nth-child(4) {
  height: 48%;
}

.signal-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.signal-strip div {
  display: grid;
  gap: 0.4rem;
  padding: 1.6rem max(1.5rem, calc((100vw - 1180px) / 6));
  border-right: 1px solid var(--line);
}

.signal-strip div:last-child {
  border-right: 0;
}

.signal-strip span {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.signal-strip strong {
  font-size: 0.88rem;
}

.section-block {
  padding-block: clamp(6rem, 11vw, 10rem);
}

.home-paths {
  padding-bottom: clamp(7rem, 12vw, 11rem);
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr);
  gap: 4rem;
  align-items: end;
  margin-bottom: clamp(3.5rem, 7vw, 6rem);
}

.section-heading h2 {
  max-width: 12ch;
  margin-bottom: 0;
  font-size: clamp(3rem, 6vw, 6rem);
  line-height: 0.96;
}

.section-heading > p:last-child,
.section-heading > div + p {
  max-width: 52ch;
  margin-bottom: 0.35rem;
  color: var(--muted);
}

.compact-heading h2 {
  max-width: 10ch;
  font-size: clamp(2.8rem, 5vw, 5rem);
}

.entry-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}

.entry-grid > a {
  min-height: 330px;
  display: flex;
  flex-direction: column;
  padding: 2rem;
  border-right: 1px solid var(--line);
  transition: color 160ms ease, background 160ms ease;
}

.entry-grid > a:first-child {
  padding-left: 0;
}

.entry-grid > a:last-child {
  padding-right: 0;
  border-right: 0;
}

.entry-grid > a:hover {
  color: white;
  background: var(--blue);
}

.entry-grid > a:hover p,
.entry-grid > a:hover span {
  color: rgba(255, 255, 255, 0.75);
}

.entry-grid span {
  color: var(--blue);
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 700;
}

.entry-grid h3 {
  margin: 3.5rem 0 1rem;
  font-family: var(--serif);
  font-size: clamp(2rem, 3.5vw, 3.2rem);
  font-weight: 500;
}

.entry-grid p {
  max-width: 32ch;
  color: var(--muted);
}

.entry-grid strong {
  margin-top: auto;
  font-size: 0.8rem;
}

.research-page-block,
.publication-page-block {
  padding-block: clamp(4rem, 8vw, 7rem) clamp(7rem, 12vw, 11rem);
}

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

.research-list article {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 2rem;
  padding-block: 2.25rem;
  border-bottom: 1px solid var(--line);
}

.large-index {
  color: var(--blue);
  font-family: var(--mono);
  font-size: 0.76rem;
  font-weight: 700;
}

.research-list article > div {
  display: grid;
  grid-template-columns: minmax(240px, 0.8fr) minmax(0, 1fr);
  gap: 3rem;
}

.research-list h3,
.research-list h2 {
  margin-bottom: 0;
  font-family: var(--serif);
  font-size: clamp(1.7rem, 3vw, 2.5rem);
  font-weight: 500;
  line-height: 1.05;
}

.research-list p {
  max-width: 58ch;
  margin-bottom: 0;
  color: var(--muted);
}

.work-section,
.profile-section {
  color: #eef2ef;
  background: var(--dark);
}

.work-section {
  padding-block: clamp(6rem, 11vw, 9rem);
}

.inverse .kicker {
  color: var(--lime);
}

.inverse > p:last-child {
  color: #aeb8b2;
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid rgba(255, 255, 255, 0.25);
}

.work-grid article {
  min-height: 410px;
  display: flex;
  flex-direction: column;
  padding: 2rem;
  border-right: 1px solid rgba(255, 255, 255, 0.2);
}

.work-grid article:first-child {
  padding-left: 0;
}

.work-grid article:last-child {
  padding-right: 0;
  border-right: 0;
}

.work-tag,
.profile-details span {
  color: var(--lime);
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.work-grid h3 {
  margin: 3.5rem 0 1rem;
  font-family: var(--serif);
  font-size: clamp(1.8rem, 3vw, 2.55rem);
  font-weight: 500;
  line-height: 1.04;
}

.work-grid p:not(.work-tag) {
  color: #aeb8b2;
}

.work-grid a {
  width: fit-content;
  margin-top: auto;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid var(--lime);
  font-size: 0.82rem;
  font-weight: 800;
}

.work-grid a span,
.publication-list a span,
.contact-email span {
  color: var(--lime);
}

.publication-heading {
  align-items: end;
}

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

.publication-list article {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr) auto;
  gap: 2rem;
  align-items: start;
  padding-block: 2rem;
  border-bottom: 1px solid var(--line);
}

.publication-list time {
  color: var(--blue);
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 700;
}

.publication-list h3,
.publication-list h2 {
  max-width: 72ch;
  margin-bottom: 0.65rem;
  font-size: clamp(1.05rem, 1.7vw, 1.3rem);
  line-height: 1.35;
}

.publication-list p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.publication-list a {
  padding-bottom: 0.2rem;
  border-bottom: 1px solid var(--blue);
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 700;
}

.publication-list a span {
  color: var(--blue);
}

.publication-links {
  display: flex;
  gap: 1rem;
}

.profile-section {
  padding-block: clamp(6rem, 11vw, 9rem);
}

.profile-page {
  min-height: 720px;
  display: grid;
  align-items: center;
}

.profile-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(380px, 1.2fr);
  gap: clamp(4rem, 9vw, 9rem);
}

.profile-grid .section-heading {
  display: block;
  margin-bottom: 0;
}

.profile-grid .section-heading h2,
.profile-grid .section-heading h1 {
  margin-bottom: 1.5rem;
}

.profile-grid .section-heading h1 {
  max-width: 12ch;
  font-family: var(--serif);
  font-size: clamp(3.5rem, 7vw, 7rem);
  font-weight: 500;
  letter-spacing: -0.055em;
  line-height: 0.95;
}

.profile-grid .section-heading > p:last-child {
  color: #aeb8b2;
}

.profile-details {
  border-top: 1px solid rgba(255, 255, 255, 0.25);
}

.profile-details article {
  padding-block: 1.6rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

.profile-details h3,
.profile-details h2 {
  margin: 0.9rem 0 0.5rem;
  font-family: var(--serif);
  font-size: 1.55rem;
  font-weight: 500;
}

.profile-details p {
  margin-bottom: 0;
  color: #aeb8b2;
  font-size: 0.9rem;
}

.contact-section {
  padding-block: clamp(6rem, 11vw, 10rem);
}

.contact-section > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2rem;
  align-items: end;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--ink);
}

.contact-section h2 {
  max-width: 10ch;
  margin-bottom: 0;
  font-size: clamp(3rem, 6vw, 6.2rem);
  line-height: 0.95;
}

.contact-email {
  padding-bottom: 0.3rem;
  border-bottom: 2px solid var(--blue);
  font-size: clamp(1rem, 1.8vw, 1.25rem);
  font-weight: 800;
}

.contact-email span {
  color: var(--blue);
}

.social-links {
  justify-content: flex-end;
  margin-top: 1.5rem;
}

.site-footer {
  color: #9facA5;
  background: var(--dark);
}

.site-footer .section-shell {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  padding-block: 1.5rem;
}

.site-footer p {
  margin-bottom: 0;
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.04em;
}

.site-footer a:hover {
  color: white;
}

.error-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem;
}

.error-card {
  max-width: 720px;
  text-align: center;
}

.error-code {
  color: var(--blue);
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
}

.error-card h1 {
  margin: 1rem 0;
  font-family: var(--serif);
  font-size: clamp(3rem, 9vw, 7rem);
  font-weight: 500;
  letter-spacing: -0.05em;
  line-height: 0.95;
}

.error-card p {
  color: var(--muted);
}

@media (max-width: 900px) {
  .section-shell,
  .nav-shell {
    width: min(100% - 2rem, 1180px);
  }

  .hero,
  .section-heading,
  .page-hero,
  .profile-grid,
  .contact-section > div {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    gap: 4rem;
    padding-block: 5rem;
  }

  .control-panel {
    min-height: 440px;
  }

  .signal-strip {
    grid-template-columns: 1fr;
  }

  .signal-strip div {
    padding: 1.35rem 1rem;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .signal-strip div:last-child {
    border-bottom: 0;
  }

  .research-list article {
    grid-template-columns: 60px 1fr;
  }

  .research-list article > div {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .work-grid {
    grid-template-columns: 1fr;
  }

  .work-grid article,
  .work-grid article:first-child,
  .work-grid article:last-child {
    min-height: 330px;
    padding: 2rem 0;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  }

  .work-grid article:last-child {
    border-bottom: 0;
  }

  .profile-grid {
    gap: 4rem;
  }

  .entry-grid {
    grid-template-columns: 1fr;
  }

  .entry-grid > a,
  .entry-grid > a:first-child,
  .entry-grid > a:last-child {
    min-height: 270px;
    padding: 2rem 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .entry-grid > a:last-child {
    border-bottom: 0;
  }
}

@media (max-width: 650px) {
  .nav-shell {
    min-height: 68px;
    align-items: flex-start;
    flex-direction: column;
    gap: 0.65rem;
    padding-block: 0.8rem;
  }

  .wordmark small {
    display: none;
  }

  .site-header nav {
    width: 100%;
    justify-content: space-between;
    gap: 0.75rem;
  }

  .hero h1 {
    font-size: clamp(3.2rem, 17vw, 5rem);
  }

  .control-panel {
    min-height: 420px;
    padding: 1rem;
  }

  .section-heading {
    gap: 1.5rem;
  }

  .section-heading h2,
  .section-heading h1,
  .page-hero h1,
  .contact-section h2 {
    font-size: clamp(2.7rem, 14vw, 4.5rem);
  }

  .research-list article {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .publication-list article {
    grid-template-columns: 1fr;
    gap: 0.9rem;
  }

  .publication-links {
    margin-top: 0.3rem;
  }

  .contact-email {
    word-break: break-word;
  }

  .social-links {
    justify-content: flex-start;
  }

  .site-footer .section-shell {
    flex-direction: column;
    gap: 0.5rem;
  }
}

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

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
