:root {
  --ink: #0a0a0a;
  --paper: #f2eee2;
  --paper-2: #e8e2d3;
  --red: #ce241f;
  --blue: #243bb8;
  --lime: #c9e53f;
  --muted: #6f6b63;
  --rail: 72px;
  --pad: clamp(28px, 4.4vw, 84px);
  --line: 1px solid var(--ink);
  --font: "Archivo", Arial, sans-serif;
  --ease: cubic-bezier(0.2, 0, 0, 1);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--blue);
  font-family: var(--font);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
}

body {
  margin: 0;
  padding-left: var(--rail);
  color: var(--ink);
  background: var(--blue);
  font-family: inherit;
}

body.menu-open {
  overflow: hidden;
}

main {
  background: var(--paper);
}
a {
  color: inherit;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
button {
  font: inherit;
}
img {
  display: block;
  max-width: 100%;
}

::selection {
  color: var(--paper);
  background: var(--red);
}

.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;
}

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

.text-arrow,
.writing-arrow,
.hero-stamp span {
  font-family: Arial, Helvetica, sans-serif;
  font-variant-emoji: text;
}

.site-chrome {
  display: contents;
}

.rail {
  position: fixed;
  z-index: 40;
  inset: 0 auto 0 0;
  width: var(--rail);
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--paper);
  background: var(--ink);
  border-right: 1px solid #2d2d2d;
}

.rail-mark {
  width: 100%;
  height: 72px;
  display: grid;
  place-items: center;
  border-bottom: 1px solid #2d2d2d;
  font-size: 15px;
  font-weight: 900;
  font-stretch: 78%;
  letter-spacing: -0.03em;
  text-decoration: none;
}

.menu-button {
  width: 100%;
  height: 72px;
  padding: 0;
  display: grid;
  place-content: center;
  gap: 8px;
  color: inherit;
  background: transparent;
  border: 0;
  border-bottom: 1px solid #2d2d2d;
  cursor: pointer;
}

.menu-button span:not(.sr-only) {
  display: block;
  width: 27px;
  height: 2px;
  background: currentColor;
  transform-origin: center;
  transition-property: transform;
  transition-duration: 220ms;
  transition-timing-function: var(--ease);
}

.menu-button[aria-expanded="true"] span:first-child {
  transform: translateY(5px) rotate(45deg);
}

.menu-button[aria-expanded="true"] span:nth-child(2) {
  transform: translateY(-5px) rotate(-45deg);
}

.rail-index {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 9px;
  writing-mode: vertical-rl;
  font-size: 10px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.08em;
}

.rail-index i {
  width: 1px;
  height: 44px;
  background: #656565;
}

.rail-place {
  margin: 36px 0 24px;
  font-size: 9px;
  font-weight: 650;
  line-height: 1.45;
  letter-spacing: 0.13em;
  text-align: center;
}

.topbar {
  position: absolute;
  z-index: 20;
  top: 0;
  right: 0;
  left: var(--rail);
  height: 72px;
  padding: 0 var(--pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: var(--line);
}

.wordmark {
  font-size: 15px;
  font-weight: 900;
  font-stretch: 82%;
  letter-spacing: 0.04em;
  text-decoration: none;
}

.topbar nav {
  height: 100%;
  display: flex;
  align-items: center;
  gap: clamp(18px, 3vw, 48px);
}

.topbar nav a {
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.015em;
  text-decoration: none;
}

.topbar nav a:not(.topbar-contact) {
  position: relative;
  min-height: 44px;
  display: grid;
  place-items: center;
}

.topbar nav a:not(.topbar-contact)::after {
  content: "";
  position: absolute;
  inset: auto 0 3px;
  height: 2px;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 180ms var(--ease);
}

.topbar-contact {
  min-height: 44px;
  padding: 0 18px;
  display: grid;
  place-items: center;
  color: var(--paper);
  background: var(--ink);
  border: 1px solid var(--ink);
  transition-property: color, background-color, transform;
  transition-duration: 160ms, 160ms, 120ms;
  transition-timing-function: var(--ease);
}

.drawer {
  position: fixed;
  z-index: 35;
  inset: 0 auto 0 var(--rail);
  width: min(560px, calc(100vw - var(--rail)));
  padding: clamp(100px, 12vh, 144px) clamp(30px, 5vw, 72px) 40px;
  display: flex;
  flex-direction: column;
  color: var(--paper);
  background: var(--ink);
  transform: translateX(-105%);
  transition: transform 320ms var(--ease);
}

.drawer.open {
  transform: translateX(0);
}

.drawer nav {
  display: flex;
  flex-direction: column;
}

.drawer nav a {
  min-height: 68px;
  padding: 13px 0;
  display: flex;
  align-items: baseline;
  gap: 20px;
  border-bottom: 1px solid #3b3b3b;
  font-size: clamp(38px, 5vw, 68px);
  font-weight: 850;
  font-stretch: 82%;
  letter-spacing: -0.035em;
  line-height: 0.95;
  text-decoration: none;
  transition: color 180ms var(--ease);
}

.drawer nav a span {
  min-width: 18px;
  color: #8f8f8f;
  font-size: 10px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.06em;
}

.drawer nav a[aria-current="true"] {
  color: var(--lime);
}

.drawer-meta {
  margin-top: auto;
  padding-top: 32px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

.drawer-meta a,
.drawer-meta p {
  min-height: 44px;
  margin: 0;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.55;
  letter-spacing: 0.03em;
}

.drawer-meta a {
  display: flex;
  align-items: flex-end;
}

.drawer-meta p {
  color: #aaa;
  text-align: right;
}

.scrim {
  position: fixed;
  z-index: 30;
  inset: 0;
  visibility: hidden;
  background: rgb(0 0 0 / 52%);
  opacity: 0;
  backdrop-filter: blur(3px);
  transition-property: opacity, visibility;
  transition-duration: 250ms;
  transition-timing-function: var(--ease);
}

.scrim.show {
  visibility: visible;
  opacity: 1;
}

.hero {
  position: relative;
  min-height: 100svh;
  padding: clamp(118px, 14vh, 164px) var(--pad) 48px;
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.62fr);
  gap: clamp(38px, 4.5vw, 86px);
  overflow: hidden;
  border-bottom: var(--line);
}

.hero-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.eyebrow {
  margin: 0 0 clamp(42px, 7vh, 82px);
  display: flex;
  justify-content: space-between;
  gap: 18px;
}

.eyebrow span,
.kicker,
.status,
.project-order,
.writing-number,
.writing-links p {
  font-size: 10px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hero h1,
.section-heading h2,
.profile h2,
.contact h2 {
  margin: 0;
  font-weight: 900;
  font-stretch: 78%;
  letter-spacing: -0.045em;
  line-height: 0.86;
  text-wrap: balance;
}

.hero h1 {
  font-size: clamp(60px, 7.45vw, 144px);
}

.hero h1 em,
.section-heading h2 em,
.profile h2 em {
  color: var(--red);
  font-style: normal;
}

.hero-bottom {
  margin-top: auto;
  padding-top: 56px;
  display: grid;
  grid-template-columns: minmax(250px, 530px) auto;
  align-items: end;
  gap: 34px;
}

.hero-intro {
  max-width: 33em;
  margin: 0;
  font-size: clamp(17px, 1.25vw, 22px);
  line-height: 1.35;
  letter-spacing: -0.012em;
  text-wrap: pretty;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 9px;
}

.button {
  min-height: 48px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  border: 1px solid var(--ink);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition-property: transform, color, background-color, border-color;
  transition-duration: 120ms, 160ms, 160ms, 160ms;
  transition-timing-function: var(--ease);
}

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

.portrait {
  position: relative;
  align-self: stretch;
  min-height: 520px;
  margin: 0;
  overflow: visible;
  background: var(--paper-2);
  border: var(--line);
}

.portrait picture {
  display: block;
  width: 100%;
  height: 100%;
}

.portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 38%;
  filter: grayscale(1) contrast(1.08);
  outline: 1px solid rgb(0 0 0 / 10%);
  outline-offset: -1px;
}

.portrait::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 66%, rgb(0 0 0 / 24%));
  pointer-events: none;
}

.portrait figcaption {
  position: absolute;
  z-index: 2;
  inset: auto 0 0;
  padding: 12px 14px;
  display: flex;
  justify-content: space-between;
  color: white;
  font-size: 9px;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-stamp {
  position: absolute;
  z-index: 3;
  top: 24%;
  right: -1px;
  margin: 0;
  padding: 13px 16px;
  color: white;
  background: var(--blue);
  font-size: 9px;
  font-weight: 700;
  line-height: 1.55;
  letter-spacing: 0.04em;
}

.work,
.profile,
.writing,
.contact {
  padding: clamp(90px, 10vw, 170px) var(--pad);
}

.section-heading {
  margin-bottom: clamp(72px, 8vw, 124px);
  display: grid;
  grid-template-columns: 0.34fr 1.45fr 0.55fr;
  align-items: start;
  gap: clamp(24px, 3vw, 44px);
}

.section-heading .kicker {
  margin: 7px 0 0;
}

.section-heading h2,
.profile h2 {
  font-size: clamp(48px, 5.9vw, 108px);
}

.section-heading > p:last-child {
  max-width: 28em;
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
  text-wrap: pretty;
}

.project {
  position: relative;
}
.project-order {
  font-variant-numeric: tabular-nums;
}

.status {
  margin: 0 0 18px;
  display: flex;
  align-items: center;
  gap: 9px;
}

.status i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 4px rgb(206 36 31 / 14%);
}

.project h3 {
  margin: 0;
  font-size: clamp(54px, 7.8vw, 138px);
  font-weight: 900;
  font-stretch: 78%;
  letter-spacing: -0.05em;
  line-height: 0.86;
}

.project-deck {
  max-width: 28em;
  margin: 24px 0;
  font-size: clamp(20px, 1.9vw, 31px);
  font-weight: 650;
  letter-spacing: -0.025em;
  line-height: 1.12;
  text-wrap: balance;
}

.project-threshold {
  padding: 34px 0 0;
  display: grid;
  grid-template-columns: 72px minmax(0, 1.15fr) minmax(260px, 0.7fr);
  gap: clamp(26px, 3vw, 48px);
  border-top: 4px solid var(--ink);
}

.project-threshold .project-body {
  padding-top: 43px;
}

.project-body > p {
  margin: 0 0 18px;
  font-size: 14px;
  line-height: 1.55;
  text-wrap: pretty;
}

.project-body .ownership {
  font-weight: 700;
}

.project-links {
  margin-top: 26px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.project-links a,
.private-source {
  min-height: 44px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  border: 1px solid currentColor;
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
}

.project-links a {
  transition-property: transform, color, background-color;
  transition-duration: 120ms, 160ms, 160ms;
  transition-timing-function: var(--ease);
}

.private-source {
  opacity: 0.58;
  cursor: default;
}

.metrics {
  grid-column: 2 / -1;
  margin: 66px 0 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: var(--line);
}

.metrics div {
  padding: clamp(22px, 2.5vw, 34px);
}
.metrics div + div {
  border-left: var(--line);
}

.metrics dt {
  font-size: clamp(38px, 4.7vw, 76px);
  font-weight: 900;
  font-stretch: 82%;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
  line-height: 0.95;
}

.metrics dd {
  margin: 10px 0 0;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.project-grid {
  margin-top: clamp(76px, 7vw, 108px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: var(--line);
  border-bottom: var(--line);
}

.project-grid .project {
  min-height: 610px;
  padding: 30px clamp(26px, 4vw, 64px) 40px;
  display: flex;
  flex-direction: column;
}

.project-grid .project + .project {
  border-left: var(--line);
}
.project-grid .status {
  margin-top: 74px;
}
.project-grid h3 {
  font-size: clamp(56px, 5.8vw, 100px);
}

.project-grid > article > p:not(.status):not(.project-deck) {
  max-width: 37em;
  font-size: 14px;
  line-height: 1.55;
  text-wrap: pretty;
}

.project-grid .tags {
  margin-top: auto;
}

.project-elitka {
  color: white;
  background: var(--ink);
}

.project-elitka .status i {
  background: var(--blue);
  box-shadow: 0 0 0 4px rgb(36 59 184 / 28%);
}

.project-jobs {
  background: var(--paper-2);
  box-shadow: inset 0 10px 0 var(--lime);
}

.tags {
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  list-style: none;
}

.tags li {
  padding: 7px 9px;
  border: 1px solid currentColor;
  font-size: 9px;
  font-weight: 650;
  letter-spacing: 0.065em;
  text-transform: uppercase;
}

.profile {
  display: grid;
  grid-template-columns: 0.82fr 1.18fr;
  gap: clamp(54px, 8vw, 148px);
  color: var(--paper);
  background: var(--ink);
}

.profile-lead {
  position: sticky;
  top: 60px;
  align-self: start;
}

.profile .kicker {
  margin: 0 0 46px;
  color: #9c9c96;
}

.profile h2 {
  max-width: 8em;
}

.profile-lead > p:not(.kicker) {
  max-width: 38em;
  margin: 48px 0 34px;
  color: #c8c8c0;
  font-size: 16px;
  line-height: 1.58;
  text-wrap: pretty;
}

.profile .button-dark {
  color: var(--ink);
  background: var(--paper);
  border-color: var(--paper);
}

.timeline {
  border-top: 1px solid #555;
}

.timeline-row {
  padding: 28px 0;
  display: grid;
  grid-template-columns: 92px 1fr auto;
  gap: 24px;
  border-bottom: 1px solid #555;
}

.timeline-row > p,
.timeline-row > span {
  margin: 4px 0 0;
  color: #929292;
  font-size: 9px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.timeline-row h3 {
  margin: 0 0 7px;
  font-size: clamp(18px, 1.5vw, 25px);
  font-weight: 750;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.timeline-row div p {
  margin: 0;
  color: #aaa;
  font-size: 13px;
  line-height: 1.45;
}

.capabilities {
  grid-column: 2;
  padding-top: 32px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
}

.capabilities .kicker {
  margin-bottom: 20px;
}

.capabilities ul {
  margin: 0;
  padding: 0;
  border-top: 1px solid #555;
  list-style: none;
}

.capabilities li {
  min-height: 44px;
  padding: 11px 0;
  display: flex;
  justify-content: space-between;
  gap: 15px;
  border-bottom: 1px solid #333;
  font-size: 13px;
  line-height: 1.35;
}

.capabilities li span {
  color: #898989;
  text-align: right;
}

.writing {
  color: var(--ink);
  background: var(--red);
}

.writing .section-heading {
  grid-template-columns: 0.34fr 1.6fr;
}

.writing .section-heading h2 {
  color: var(--paper);
}
.writing .section-heading h2 em {
  color: var(--ink);
}

.writing-links {
  border-top: 3px solid var(--ink);
}

.writing-links > a {
  min-height: 176px;
  padding: 24px 0;
  display: grid;
  grid-template-columns: 90px 1fr auto;
  align-items: center;
  gap: 30px;
  border-bottom: var(--line);
  text-decoration: none;
  transition-property: color, background-color, padding;
  transition-duration: 180ms;
  transition-timing-function: var(--ease);
}

.writing-links p {
  margin: 0 0 8px;
}

.writing-links h3 {
  margin: 0;
  font-size: clamp(40px, 4.8vw, 78px);
  font-weight: 850;
  font-stretch: 82%;
  letter-spacing: -0.035em;
  line-height: 0.92;
}

.writing-links div > span {
  display: block;
  margin-top: 13px;
  font-size: 13px;
}

.writing-arrow {
  font-size: 30px;
  font-weight: 650;
}

.contact {
  padding-bottom: 0;
  color: var(--paper);
  background: var(--blue);
}

.contact .kicker {
  margin: 0 0 48px;
}

.contact h2 {
  max-width: 10em;
  font-size: clamp(64px, 8.5vw, 156px);
}

.contact-intro {
  max-width: 40em;
  margin: 52px 0;
  font-size: clamp(17px, 1.55vw, 25px);
  line-height: 1.4;
  text-wrap: pretty;
}

.mail-link {
  padding: 25px 0;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  border-top: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  font-size: clamp(23px, 3.8vw, 64px);
  font-weight: 850;
  font-stretch: 84%;
  letter-spacing: -0.025em;
  text-decoration: none;
  transition: color 180ms var(--ease);
}

.socials {
  padding: 36px 0 100px;
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.socials a {
  min-height: 44px;
  padding: 0 15px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid currentColor;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-decoration: none;
  transition-property: transform, color, background-color, border-color;
  transition-duration: 120ms, 160ms, 160ms, 160ms;
  transition-timing-function: var(--ease);
}

footer {
  padding: 18px 0;
  display: flex;
  justify-content: space-between;
  gap: 30px;
  border-top: 1px solid rgb(255 255 255 / 45%);
}

footer p,
footer a {
  min-height: 24px;
  margin: 0;
  color: #c9ceff;
  font-size: 9px;
  font-weight: 650;
  letter-spacing: 0.065em;
  text-decoration: none;
  text-transform: uppercase;
}

.reveal-enabled [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition-property: opacity, transform;
  transition-duration: 620ms;
  transition-delay: var(--reveal-delay, 0ms);
  transition-timing-function: var(--ease);
}

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

.topbar-contact:active,
.button:active,
.project-links a:active,
.socials a:active {
  transform: scale(0.96);
}

@media (hover: hover) {
  .menu-button:hover span:first-child {
    transform: translateX(4px);
  }
  .menu-button:hover span:nth-child(2) {
    transform: translateX(-4px);
  }
  .menu-button[aria-expanded="true"]:hover span:first-child {
    transform: translateY(5px) rotate(45deg);
  }
  .menu-button[aria-expanded="true"]:hover span:nth-child(2) {
    transform: translateY(-5px) rotate(-45deg);
  }
  .topbar nav a:not(.topbar-contact):hover::after {
    transform: scaleX(1);
    transform-origin: left;
  }
  .topbar-contact:hover {
    color: var(--ink);
    background: transparent;
  }
  .drawer nav a:hover {
    color: var(--lime);
  }
  .button-dark:hover {
    color: var(--ink);
    background: var(--lime);
    border-color: var(--lime);
  }
  .button-plain:hover {
    color: var(--paper);
    background: var(--blue);
    border-color: var(--blue);
  }
  .project-links a:hover {
    color: var(--paper);
    background: var(--ink);
  }
  .project-elitka .project-links a:hover {
    color: var(--ink);
    background: var(--lime);
  }
  .profile .button-dark:hover {
    background: var(--lime);
    border-color: var(--lime);
  }
  .writing-links > a:hover {
    padding-inline: 22px;
    color: var(--paper);
    background: var(--ink);
  }
  .mail-link:hover {
    color: var(--lime);
  }
  .socials a:hover {
    color: var(--ink);
    background: var(--lime);
    border-color: var(--lime);
  }
}

@media (max-width: 1120px) {
  .hero {
    grid-template-columns: minmax(0, 1.15fr) minmax(270px, 0.62fr);
  }

  .hero-bottom {
    grid-template-columns: 1fr;
  }
  .hero-actions {
    justify-content: flex-start;
  }

  .section-heading {
    grid-template-columns: 0.28fr 1.72fr;
  }

  .section-heading > p:last-child {
    grid-column: 2;
    max-width: 34em;
  }

  .project-threshold {
    grid-template-columns: 62px 1fr;
  }

  .project-threshold .project-body {
    grid-column: 2;
    max-width: 43em;
    padding-top: 8px;
  }

  .metrics {
    grid-column: 2;
  }

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

  .profile-lead {
    position: static;
    max-width: 860px;
  }

  .capabilities {
    grid-column: 1;
  }
}

@media (max-width: 760px) {
  :root {
    --rail: 0px;
    --pad: clamp(20px, 6vw, 30px);
  }

  body {
    padding-top: calc(60px + var(--safe-top));
    padding-left: 0;
  }

  html {
    scroll-padding-top: calc(72px + var(--safe-top));
  }

  .tracked-section {
    scroll-margin-top: calc(72px + var(--safe-top));
  }

  .site-chrome {
    position: fixed;
    z-index: 50;
    top: 0;
    right: 0;
    left: 0;
    height: calc(60px + var(--safe-top));
    padding-top: var(--safe-top);
    display: grid;
    grid-template-columns: calc(104px + var(--safe-left)) minmax(0, 1fr);
    background: rgb(242 238 226 / 98%);
    border-bottom: var(--line);
    isolation: isolate;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
  }

  .site-chrome::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: calc(104px + var(--safe-left));
    background: var(--ink);
    pointer-events: none;
  }

  .rail {
    position: static;
    z-index: auto;
    inset: auto;
    width: 100%;
    height: 60px;
    padding-left: var(--safe-left);
    flex-direction: row;
    border-right: 1px solid #2d2d2d;
    border-bottom: 0;
  }

  .rail-mark,
  .menu-button {
    width: 52px;
    height: 60px;
    flex: 0 0 52px;
    border-bottom: 0;
  }

  .rail-mark {
    border-right: 1px solid #2d2d2d;
  }
  .rail-index,
  .rail-place {
    display: none;
  }

  .topbar {
    position: static;
    z-index: auto;
    inset: auto;
    width: 100%;
    height: 60px;
    padding: 0 max(14px, var(--safe-right)) 0 14px;
    background: rgb(242 238 226 / 94%);
    border-bottom: 0;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
  }

  .wordmark {
    font-size: 11px;
    letter-spacing: 0.03em;
  }

  .topbar nav {
    gap: 0;
  }
  .topbar nav a:not(.topbar-contact) {
    display: none;
  }

  .topbar-contact {
    min-height: 44px;
    padding: 0 11px;
    font-size: 10px;
  }

  .drawer {
    inset: calc(60px + var(--safe-top)) 0 0;
    width: 100%;
    padding: 42px max(var(--pad), var(--safe-right))
      max(28px, var(--safe-bottom)) max(var(--pad), var(--safe-left));
  }

  .drawer nav a {
    min-height: 62px;
    font-size: clamp(40px, 13vw, 64px);
  }

  .drawer-meta {
    padding-top: 24px;
  }

  .scrim {
    top: calc(60px + var(--safe-top));
  }

  .hero {
    min-height: auto;
    padding-top: 46px;
    padding-bottom: 28px;
    padding-right: max(var(--pad), var(--safe-right));
    padding-left: max(var(--pad), var(--safe-left));
    grid-template-columns: 1fr;
    gap: 38px;
  }

  .eyebrow {
    margin-bottom: 42px;
  }

  .hero h1 {
    font-size: clamp(42px, 14.2vw, 78px);
    letter-spacing: -0.045em;
    line-height: 0.88;
  }

  .hero-bottom {
    margin-top: 0;
    padding-top: 42px;
    gap: 26px;
  }

  .hero-intro {
    max-width: 30em;
    font-size: 17px;
  }

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

  .button {
    width: 100%;
    gap: 16px;
  }

  .portrait {
    width: 100%;
    min-height: 0;
    aspect-ratio: 4 / 5;
  }

  .hero-stamp {
    top: 34px;
    right: -1px;
  }

  .work,
  .profile,
  .writing,
  .contact {
    padding-top: 76px;
    padding-right: max(var(--pad), var(--safe-right));
    padding-bottom: 76px;
    padding-left: max(var(--pad), var(--safe-left));
  }

  .section-heading,
  .writing .section-heading {
    grid-template-columns: 1fr;
    gap: 26px;
  }

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

  .section-heading > p:last-child {
    grid-column: auto;
    max-width: 31em;
    margin-top: 0;
  }

  .section-heading h2,
  .profile h2 {
    font-size: clamp(44px, 13.5vw, 76px);
    line-height: 0.88;
  }

  .project-threshold {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .project-threshold .project-order {
    margin-bottom: 36px;
  }

  .project-threshold .project-body,
  .metrics {
    grid-column: 1;
  }

  .project-threshold .project-body {
    padding-top: 18px;
  }

  .project h3 {
    font-size: clamp(48px, 15vw, 74px);
  }

  .project-deck {
    margin: 20px 0;
    font-size: 21px;
  }

  .metrics {
    margin-top: 42px;
  }

  .metrics div {
    padding: 20px 14px;
  }

  .metrics dd {
    font-size: 9px;
    line-height: 1.35;
  }

  .project-grid {
    margin-top: 72px;
    grid-template-columns: 1fr;
  }

  .project-grid .project {
    min-height: 0;
    padding: 30px var(--pad) 38px;
  }

  .project-grid .project + .project {
    border-top: var(--line);
    border-left: 0;
  }

  .project-grid .status {
    margin-top: 52px;
  }

  .project-grid .tags {
    margin-top: 42px;
  }

  .profile-lead > p:not(.kicker) {
    margin-top: 38px;
    font-size: 15px;
  }

  .timeline-row {
    grid-template-columns: 76px 1fr;
    gap: 18px;
  }

  .timeline-row > span {
    grid-column: 2;
    margin-top: -14px;
  }

  .capabilities {
    grid-template-columns: 1fr;
    gap: 46px;
  }

  .writing-links > a {
    min-height: 142px;
    grid-template-columns: 38px 1fr auto;
    gap: 14px;
  }

  .writing-links h3 {
    font-size: clamp(34px, 10vw, 46px);
  }

  .writing-arrow {
    font-size: 24px;
  }

  .contact {
    min-height: 100svh;
    min-height: 100dvh;
    padding-bottom: 0;
  }

  .contact h2 {
    font-size: clamp(49px, 14vw, 78px);
    line-height: 0.88;
  }

  .contact-intro {
    margin: 38px 0 48px;
  }

  .mail-link {
    font-size: clamp(22px, 7vw, 36px);
    overflow-wrap: anywhere;
  }

  .socials {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding-bottom: 76px;
  }

  .socials a {
    width: 100%;
  }

  footer {
    padding-bottom: max(18px, var(--safe-bottom));
    flex-direction: column;
    gap: 10px;
  }
}

@media (max-width: 430px) {
  .topbar {
    padding-right: max(10px, var(--safe-right));
    padding-left: 12px;
  }

  .wordmark {
    font-size: 10px;
  }
  .topbar-contact {
    padding: 0 9px;
  }
  .eyebrow span:last-child {
    display: none;
  }

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

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

  .metrics div {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 20px;
  }

  .metrics div + div {
    border-top: var(--line);
    border-left: 0;
  }

  .metrics dd {
    margin-top: 0;
    text-align: right;
  }

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

  .project-links a,
  .private-source {
    width: 100%;
  }

  .drawer-meta {
    flex-direction: column;
    align-items: flex-start;
  }

  .drawer-meta p {
    text-align: left;
  }

  .writing-links > a {
    grid-template-columns: 30px 1fr auto;
  }

  .writing-links div > span {
    max-width: 22em;
    font-size: 12px;
    line-height: 1.4;
  }
}

@media (max-width: 350px) {
  .wordmark {
    display: none;
  }
  .topbar {
    justify-content: flex-end;
  }
  .hero h1 {
    font-size: 41px;
  }
  .writing-links > a {
    grid-template-columns: 1fr auto;
  }
  .writing-number {
    display: none;
  }
}

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

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

  .reveal-enabled [data-reveal] {
    opacity: 1;
    transform: none;
  }
}
