:root {
  color-scheme: light;
  --paper: #eeede8;
  --paper-2: #e4e2da;
  --ink: #0d0d0c;
  --muted: #5f5e59;
  --line: #c9c7bd;
  --line-strong: #161614;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    linear-gradient(90deg, rgba(13, 13, 12, 0.05) 1px, transparent 1px),
    linear-gradient(180deg, rgba(13, 13, 12, 0.05) 1px, transparent 1px),
    var(--paper);
  background-size: 80px 80px;
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 15px;
  line-height: 1.55;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease;
}

a:hover,
a:focus-visible {
  background: var(--ink);
  color: var(--paper);
  outline: none;
  text-decoration: none;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
  padding: 18px clamp(18px, 4vw, 48px);
  border-bottom: 1px solid var(--line);
  background: rgba(238, 237, 232, 0.94);
  backdrop-filter: blur(12px);
}

.wordmark {
  font-weight: 700;
  text-decoration: none;
}

.nav,
.link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
}

.nav a,
.link-row a {
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}

main,
.site-footer {
  width: min(var(--max), calc(100% - 36px));
  margin: 0 auto;
}

.section-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: clamp(32px, 5vw, 78px);
  align-items: end;
}

.hero {
  padding: clamp(42px, 6vw, 82px) 0 clamp(30px, 5vw, 56px);
  border-bottom: 2px solid var(--line-strong);
}

.hero-copy {
  display: grid;
  gap: 28px;
}

.eyebrow,
.label,
.entry-meta,
.project-row span,
figcaption {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  text-transform: uppercase;
}

.eyebrow {
  color: var(--ink);
}

h1 {
  max-width: 20ch;
  font-size: clamp(38px, 5.1vw, 66px);
  line-height: 0.98;
  font-weight: 500;
}

.lede {
  max-width: 68ch;
  font-size: clamp(16px, 2vw, 20px);
}

.signal-figure {
  display: grid;
  gap: 10px;
  position: relative;
  overflow: hidden;
}

.signal-figure img {
  width: 100%;
  aspect-ratio: 35 / 23;
  object-fit: cover;
  border: 2px solid var(--line-strong);
  filter: grayscale(1) contrast(1.05);
}

.status-band {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line-strong);
}

.status-band div,
.split-block {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 28px;
}

.section-block {
  padding: clamp(48px, 7vw, 86px) 0;
  border-bottom: 1px solid var(--line);
}

.section-heading {
  display: grid;
  gap: 8px;
  margin-bottom: 28px;
}

h2 {
  max-width: 18ch;
  font-size: clamp(26px, 4vw, 46px);
  line-height: 1.04;
  font-weight: 500;
}

.timeline,
.project-list,
.skills-list {
  display: grid;
}

.entry,
.project-row,
.skills-list div {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 28px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
  transition: background-color 220ms ease, border-color 220ms ease, transform 220ms ease;
}

.entry:first-child,
.project-row:first-child,
.skills-list div:first-child {
  border-top-color: var(--line-strong);
}

.entry-body,
.project-row div {
  display: grid;
  gap: 8px;
}

h3,
dt {
  font-size: 15px;
  line-height: 1.35;
  font-weight: 700;
}

.project-row {
  grid-template-columns: minmax(0, 1fr) minmax(180px, 0.3fr);
}

.project-row span {
  justify-self: end;
  text-align: right;
}

.research-body,
.skills-list {
  max-width: 760px;
}

.plain-list {
  display: grid;
  gap: 8px;
  margin: 22px 0 0;
  padding-left: 18px;
}

.skills-list {
  margin: 0;
}

.skills-list div {
  grid-template-columns: 160px minmax(0, 1fr);
}

.skills-list dd {
  color: var(--muted);
}

.site-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.8fr);
  gap: 28px;
  padding: 36px 0 54px;
}

.site-footer p {
  max-width: 56ch;
  margin-top: 8px;
}

@media (prefers-reduced-motion: no-preference) {
  body {
    animation: grid-drift 34s linear infinite;
  }

  .signal-figure::before {
    content: "";
    position: absolute;
    top: 2px;
    bottom: 28px;
    left: -24%;
    z-index: 2;
    width: 22%;
    background: linear-gradient(90deg, transparent, rgba(13, 13, 12, 0.18), transparent);
    mix-blend-mode: multiply;
    pointer-events: none;
    animation: signal-scan 5.8s ease-in-out infinite;
  }

  .signal-figure::after {
    content: "";
    position: absolute;
    top: 24%;
    right: 22%;
    z-index: 3;
    width: 9px;
    height: 9px;
    border: 2px solid var(--ink);
    background: var(--paper);
    box-shadow: 0 0 0 0 rgba(13, 13, 12, 0.28);
    pointer-events: none;
    animation: node-pulse 2.8s ease-out infinite;
  }

  .signal-figure img {
    animation: signal-float 9s ease-in-out infinite;
  }

  .project-row:hover,
  .entry:hover,
  .skills-list div:hover {
    border-top-color: var(--line-strong);
    background: rgba(13, 13, 12, 0.035);
    transform: translateX(6px);
  }

  .motion-enabled [data-animate] {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 700ms ease, transform 700ms cubic-bezier(0.2, 0.8, 0.2, 1);
    transition-delay: var(--motion-delay, 0ms);
  }

  .motion-enabled [data-animate].is-visible {
    opacity: 1;
    transform: translateY(0);
  }

  .motion-enabled .project-row[data-animate].is-visible:hover,
  .motion-enabled .entry[data-animate].is-visible:hover,
  .motion-enabled .skills-list div[data-animate].is-visible:hover {
    transform: translateX(6px);
  }

  @keyframes grid-drift {
    from {
      background-position: 0 0, 0 0, 0 0;
    }

    to {
      background-position: 80px 0, 0 80px, 0 0;
    }
  }

  @keyframes signal-scan {
    0%,
    18% {
      transform: translateX(0);
      opacity: 0;
    }

    28%,
    72% {
      opacity: 1;
    }

    88%,
    100% {
      transform: translateX(570%);
      opacity: 0;
    }
  }

  @keyframes node-pulse {
    0% {
      box-shadow: 0 0 0 0 rgba(13, 13, 12, 0.35);
    }

    70% {
      box-shadow: 0 0 0 18px rgba(13, 13, 12, 0);
    }

    100% {
      box-shadow: 0 0 0 0 rgba(13, 13, 12, 0);
    }
  }

  @keyframes signal-float {
    0%,
    100% {
      transform: translateY(0) scale(1);
    }

    50% {
      transform: translateY(-4px) scale(1.01);
    }
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

@media (max-width: 840px) {
  body {
    background-size: 56px 56px;
  }

  .site-header,
  .section-grid,
  .status-band,
  .status-band div,
  .split-block,
  .entry,
  .project-row,
  .skills-list div,
  .site-footer {
    grid-template-columns: 1fr;
  }

  .site-header {
    position: static;
  }

  .hero {
    min-height: 0;
  }

  h1 {
    max-width: 11ch;
  }

  .project-row span {
    justify-self: start;
    text-align: left;
  }

  .project-row:hover,
  .entry:hover,
  .skills-list div:hover,
  .motion-enabled .project-row[data-animate].is-visible:hover,
  .motion-enabled .entry[data-animate].is-visible:hover,
  .motion-enabled .skills-list div[data-animate].is-visible:hover {
    transform: none;
  }
}

@media (max-width: 560px) {
  body {
    font-size: 14px;
  }

  .site-header {
    padding: 16px 18px;
  }

  .nav {
    width: 100%;
  }

  main,
  .site-footer {
    width: min(var(--max), calc(100% - 28px));
  }

  .hero-copy {
    gap: 18px;
  }

  .hero {
    padding: 28px 0 22px;
  }

  h1 {
    max-width: 100%;
    font-size: 34px;
    line-height: 1.04;
  }

  .lede {
    font-size: 15px;
  }

  .signal-figure img {
    height: 116px;
    object-fit: cover;
  }

  .status-band div,
  .entry,
  .project-row,
  .skills-list div {
    gap: 10px;
  }
}
