:root {
  --paper: #f2f0e9;
  --paper-light: #f8f7f2;
  --ink: #161813;
  --muted: #66685f;
  --line: #c9c8bf;
  --mint: #c9f1d6;
  --yellow: #f0e56a;
  --rail: 17.5rem;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--paper);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  scroll-behavior: smooth;
}

body {
  margin: 0;
}

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

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

.visually-hidden {
  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: 20;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.7rem 1rem;
  background: var(--ink);
  color: var(--paper-light);
  transform: translateY(-150%);
}

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

.site-shell {
  min-height: 100svh;
  display: grid;
  grid-template-columns: var(--rail) minmax(0, 1fr);
}

.site-nav {
  position: sticky;
  top: 0;
  align-self: start;
  min-height: 100svh;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
  background: var(--paper-light);
}

.wordmark {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.wordmark img {
  width: 2.5rem;
  height: 2.5rem;
  object-fit: cover;
  border: 1px solid var(--ink);
}

.desktop-nav {
  margin-top: 5rem;
  border-top: 1px solid var(--line);
}

.desktop-nav a {
  min-height: 3.35rem;
  display: grid;
  grid-template-columns: 2.2rem 1fr;
  align-items: center;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.93rem;
}

.desktop-nav a span {
  font-size: 0.68rem;
  font-variant-numeric: tabular-nums;
}

.desktop-nav a:hover,
.desktop-nav a:focus-visible,
.desktop-nav a[aria-current="page"] {
  color: var(--ink);
}

.desktop-nav a[aria-current="page"] {
  background: var(--mint);
  margin-inline: -1.5rem;
  padding-inline: 1.5rem;
}

.location {
  margin: auto 0 0;
  color: var(--muted);
  font-size: 0.75rem;
}

.location span {
  margin-inline: 0.25rem;
}

.mobile-menu {
  display: none;
}

.page {
  --page-pad: clamp(1.5rem, 4vw, 4.5rem);
  min-width: 0;
  min-height: 100svh;
  padding: 0 var(--page-pad) 2rem;
}

.page-process .page,
.page-fit .page {
  padding-bottom: 0;
}

.page-top {
  height: 4.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.home-intro {
  min-height: clamp(18rem, 43vh, 32rem);
  padding: clamp(3rem, 8vh, 7rem) 0 3rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(15rem, 25rem);
  align-items: end;
  gap: clamp(2rem, 7vw, 8rem);
}

.home-intro h1,
.section-heading h1,
.contact-heading {
  margin: 0;
  max-width: 16ch;
  font-size: clamp(2.5rem, 5.8vw, 6.3rem);
  font-weight: 500;
  line-height: 0.96;
  letter-spacing: -0.065em;
}

.home-intro p,
.section-heading p,
.contact-copy p {
  margin: 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.35vw, 1.25rem);
  line-height: 1.55;
}

.page-directory {
  border-top: 1px solid var(--ink);
}

.page-directory a {
  min-height: 4rem;
  display: grid;
  grid-template-columns: 3.5rem minmax(9rem, 0.55fr) minmax(14rem, 1fr) auto;
  align-items: center;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.9rem;
}

.page-directory a:hover,
.page-directory a:focus-visible {
  background: var(--yellow);
  margin-left: calc(0px - var(--page-pad));
  margin-right: calc(0px - var(--page-pad));
  padding-inline: var(--page-pad);
}

.directory-number {
  color: var(--muted);
  font-size: 0.7rem;
}

.page-directory strong {
  font-weight: 600;
}

.page-directory a > span:nth-child(3) {
  color: var(--muted);
}

.directory-open {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.section-heading {
  min-height: clamp(15rem, 35vh, 25rem);
  padding: clamp(3rem, 7vh, 6rem) 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(15rem, 24rem);
  align-items: end;
  gap: clamp(2rem, 7vw, 8rem);
  border-bottom: 1px solid var(--ink);
}

.section-heading h1 {
  max-width: 12ch;
}

.plain-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.plain-list li {
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--line);
  line-height: 1.45;
}

.work-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 20rem;
}

.work-column {
  padding: 2rem 3rem 3rem 0;
}

.work-column + .work-column {
  padding-left: 3rem;
  border-left: 1px solid var(--line);
}

.work-column h2,
.fit-column h2 {
  margin: 0 0 2rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.company-ledger {
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--ink);
}

.company-row {
  min-height: 6rem;
  display: grid;
  grid-template-columns: 4rem minmax(15rem, 0.8fr) minmax(16rem, 1fr);
  align-items: center;
  gap: 2rem;
  border-bottom: 1px solid var(--line);
}

.company-row > span:first-child {
  color: var(--muted);
  font-size: 0.72rem;
}

.company-row h2 {
  margin: 0;
  font-size: clamp(1.1rem, 1.7vw, 1.55rem);
  font-weight: 500;
  line-height: 1.25;
}

.company-row p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.process-track {
  min-height: calc(100svh - 4.5rem);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: stretch;
}

.process-step {
  padding: clamp(2rem, 3vw, 3.25rem) clamp(1.1rem, 2vw, 1.75rem) 2rem;
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--line);
}

.process-step:first-child {
  border-left: 0;
}

.process-step:nth-child(2) {
  padding-top: clamp(5rem, 12vh, 9rem);
}

.process-step:nth-child(3) {
  padding-top: clamp(8rem, 20vh, 15rem);
}

.process-step:nth-child(4) {
  padding-top: clamp(11rem, 27vh, 20rem);
}

.process-step:nth-child(5) {
  padding-top: clamp(14rem, 34vh, 25rem);
}

.process-number {
  color: var(--muted);
  font-size: 0.72rem;
}

.process-step h2 {
  margin: 1.4rem 0 1rem;
  font-size: clamp(1.35rem, 2.2vw, 2rem);
  font-weight: 500;
  letter-spacing: -0.035em;
}

.process-step p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.process-step:last-child {
  background: var(--mint);
}

.fit-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: calc(100svh - 4.5rem);
}

.fit-column {
  padding: clamp(3rem, 8vh, 7rem) clamp(2rem, 5vw, 6rem) 3rem 0;
}

.fit-column + .fit-column {
  padding-left: clamp(2rem, 5vw, 6rem);
  padding-right: 0;
  border-left: 1px solid var(--line);
}

.fit-column:first-child h2::before,
.fit-column:last-child h2::before {
  content: "";
  width: 0.7rem;
  height: 0.7rem;
  display: inline-block;
  margin-right: 0.65rem;
  background: var(--mint);
}

.fit-column:last-child h2::before {
  background: var(--yellow);
}

.fit-column .plain-list li {
  padding-block: 1.4rem;
  font-size: clamp(1.05rem, 1.5vw, 1.35rem);
}

.contact-layout {
  min-height: calc(100svh - 4.5rem);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(17rem, 28rem);
  align-items: end;
  gap: clamp(3rem, 8vw, 10rem);
  padding: clamp(3rem, 9vh, 8rem) 0 clamp(3rem, 7vh, 6rem);
}

.contact-heading {
  max-width: 12ch;
}

.contact-copy {
  display: grid;
  gap: 2rem;
}

.contact-links {
  border-top: 1px solid var(--ink);
}

.contact-links a {
  padding: 1rem 0;
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  font-size: 0.9rem;
}

.contact-links a:hover,
.contact-links a:focus-visible {
  background: var(--yellow);
  padding-inline: 0.75rem;
}

.about-layout {
  min-height: calc(100svh - 4.5rem);
  padding: clamp(3.5rem, 9vh, 8rem) 0;
  display: grid;
  grid-template-columns: minmax(13rem, 16rem) minmax(20rem, 36rem);
  justify-content: space-between;
  align-items: start;
  gap: clamp(3rem, 8vw, 8rem);
}

.about-portrait {
  margin: 0;
}

.portrait-frame {
  width: min(100%, 13rem);
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid var(--ink);
  border-radius: 50%;
  background: var(--ink);
}

.portrait-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1.04);
}

.about-meta {
  width: min(100%, 13rem);
  margin-top: 1rem;
  padding: 0.7rem 0;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.3rem 0.75rem;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--line);
  font-size: 0.72rem;
}

.about-meta strong {
  font-weight: 600;
}

.about-meta span {
  color: var(--muted);
}

.about-meta span:last-child {
  grid-column: 1 / -1;
}

.about-copy {
  max-width: 36rem;
}

.about-copy h1 {
  margin: 0 0 clamp(2rem, 5vh, 3.75rem);
  max-width: 11ch;
  font-size: clamp(2.75rem, 5vw, 5.4rem);
  font-weight: 500;
  line-height: 0.94;
  letter-spacing: -0.065em;
}

.about-copy p {
  margin: 0;
  max-width: 34rem;
  color: var(--muted);
  font-size: clamp(0.95rem, 1.15vw, 1.08rem);
  line-height: 1.6;
}

.about-copy p + p {
  margin-top: 1.25rem;
}

.linkedin-link {
  margin-top: clamp(2rem, 5vh, 3.5rem);
  padding: 0.9rem 0;
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--line);
  font-size: 0.9rem;
}

.linkedin-link:hover,
.linkedin-link:focus-visible {
  padding-inline: 0.75rem;
  background: var(--yellow);
}

@media (max-width: 900px) {
  .site-shell {
    display: block;
  }

  .site-nav {
    position: relative;
    z-index: 10;
    min-height: 0;
    padding: 1rem 1.25rem;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 1rem;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .wordmark img {
    width: 2.25rem;
    height: 2.25rem;
  }

  .desktop-nav,
  .location {
    display: none;
  }

  .mobile-menu {
    display: block;
    position: relative;
  }

  .mobile-menu summary {
    min-width: 8rem;
    padding: 0.65rem 0.75rem;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    border: 1px solid var(--line);
    cursor: pointer;
    font-size: 0.78rem;
    list-style: none;
  }

  .mobile-menu summary::-webkit-details-marker {
    display: none;
  }

  .mobile-menu summary span {
    color: var(--muted);
  }

  .mobile-menu[open] nav {
    position: absolute;
    top: calc(100% + 0.4rem);
    right: 0;
    width: min(18rem, calc(100vw - 2.5rem));
    padding: 0.35rem;
    display: grid;
    border: 1px solid var(--line);
    background: var(--paper-light);
    box-shadow: 0 1rem 2rem rgba(22, 24, 19, 0.12);
  }

  .mobile-menu nav a {
    padding: 0.8rem;
    border-bottom: 1px solid var(--line);
    font-size: 0.9rem;
  }

  .mobile-menu nav a:last-child {
    border-bottom: 0;
  }

  .mobile-menu nav a[aria-current="page"] {
    background: var(--mint);
  }

  .page {
    min-height: calc(100svh - 4.4rem);
    padding-inline: 1.25rem;
  }

  .page-top {
    height: 3.75rem;
  }

  .home-intro,
  .section-heading,
  .contact-layout,
  .about-layout {
    grid-template-columns: 1fr;
  }

  .home-intro {
    min-height: auto;
    padding-block: 3.5rem;
  }

  .home-intro p,
  .section-heading p {
    max-width: 38rem;
  }

  .page-directory a {
    grid-template-columns: 2.5rem 1fr auto;
    padding-block: 1rem;
  }

  .page-directory a > span:nth-child(3) {
    display: none;
  }

  .page-directory a:hover,
  .page-directory a:focus-visible {
    margin-inline: -1.25rem;
    padding-inline: 1.25rem;
  }

  .section-heading {
    min-height: auto;
    padding-block: 3.5rem;
  }

  .company-row {
    grid-template-columns: 2.5rem 1fr;
    gap: 1rem;
    padding-block: 1.2rem;
  }

  .company-row p {
    grid-column: 2;
  }

  .process-track {
    min-height: auto;
    grid-template-columns: 1fr 1fr;
  }

  .process-step,
  .process-step:nth-child(n) {
    min-height: 18rem;
    padding: 2rem;
    border-bottom: 1px solid var(--line);
  }

  .process-step:nth-child(odd) {
    border-left: 0;
  }

  .contact-layout {
    min-height: auto;
    align-items: start;
  }

  .about-layout {
    min-height: auto;
    padding-block: 3rem;
    align-items: start;
    gap: 3rem;
  }

  .about-portrait {
    max-width: 16rem;
  }
}

@media (max-width: 620px) {
  .wordmark span {
    font-size: 0.9rem;
  }

  .home-intro h1,
  .section-heading h1,
  .contact-heading,
  .about-copy h1 {
    font-size: clamp(2.35rem, 12vw, 4rem);
  }

  .page-top span:last-child {
    display: none;
  }

  .work-grid,
  .fit-columns,
  .process-track {
    grid-template-columns: 1fr;
  }

  .work-column,
  .work-column + .work-column,
  .fit-column,
  .fit-column + .fit-column {
    padding: 2.5rem 0;
    border-left: 0;
    border-bottom: 1px solid var(--line);
  }

  .process-step:nth-child(n) {
    min-height: 14rem;
    border-left: 0;
  }

  .portrait-frame,
  .about-meta {
    width: min(100%, 11rem);
  }

  .about-meta {
    grid-template-columns: 1fr;
  }

  .about-meta span:last-child {
    grid-column: auto;
  }
}

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