:root {
  color-scheme: light;
  --cp-bg: #f7f4ef;
  --cp-bg-elevated: #fcfbf8;
  --cp-surface: #ffffff;
  --cp-surface-soft: #f5f5f5;
  --cp-border: #dedede;
  --cp-border-strong: #919191;
  --cp-text: #242424;
  --cp-text-muted: #5c5c5c;
  --cp-text-soft: #6f6f6f;
  --cp-accent: #b11f4b;
  --cp-accent-hover: #9a1a41;
  --cp-accent-soft: rgba(177, 31, 75, 0.08);
  --cp-accent-fg: #ffffff;
  --cp-success: #16a34a;
  --cp-danger: #dc2626;
  --cp-warning: #f59e0b;
  --cp-link: #0078d4;
  --cp-shadow: 0 18px 48px rgba(0, 0, 0, 0.12);
  --cp-overlay: rgba(255, 255, 255, 0.8);
  --cp-panel: rgba(255, 255, 255, 0.86);
  --cp-panel-strong: rgba(255, 255, 255, 0.96);
  --cp-sheen: rgba(255, 255, 255, 0.55);
  --cp-highlight: rgba(177, 31, 75, 0.12);
}

html[data-theme="dark"] {
  color-scheme: dark;
  --cp-bg: #3d3b3a;
  --cp-bg-elevated: #343231;
  --cp-surface: #292929;
  --cp-surface-soft: #2e2e2e;
  --cp-border: #474747;
  --cp-border-strong: #5f5f5f;
  --cp-text: #dedede;
  --cp-text-muted: #919191;
  --cp-text-soft: #b0b0b0;
  --cp-accent: #fd8ea1;
  --cp-accent-hover: #fb7b91;
  --cp-accent-soft: rgba(253, 142, 161, 0.14);
  --cp-accent-fg: #1a1a1a;
  --cp-success: #4ade80;
  --cp-danger: #f87171;
  --cp-warning: #fbbf24;
  --cp-link: #4da6ff;
  --cp-shadow: 0 18px 48px rgba(0, 0, 0, 0.32);
  --cp-overlay: rgba(41, 41, 41, 0.88);
  --cp-panel: rgba(41, 41, 41, 0.72);
  --cp-panel-strong: rgba(41, 41, 41, 0.96);
  --cp-sheen: rgba(255, 255, 255, 0.04);
  --cp-highlight: rgba(253, 142, 161, 0.12);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--cp-bg);
  color: var(--cp-text);
  font-family: "Segoe UI", Aptos, Calibri, -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
}

button,
a {
  font: inherit;
  -webkit-tap-highlight-color: var(--cp-highlight);
}

button {
  color: inherit;
  cursor: pointer;
}

a {
  color: var(--cp-link);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-thickness: 2px;
}

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

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

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  z-index: 300;
  top: 0;
  left: -9999px;
  padding: 0.75rem 1rem;
  background: var(--cp-link);
  color: var(--cp-surface);
  border-radius: 0 0 4px 0;
  font-weight: 700;
}

.skip-link:focus {
  left: 0;
}

.layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  align-self: flex-start;
  width: 19.5rem;
  height: 100vh;
  flex: 0 0 19.5rem;
  padding: 2rem 1.35rem;
  overflow-y: auto;
  background: var(--cp-bg-elevated);
  border-right: 1px solid var(--cp-border);
}

.brand {
  display: grid;
  grid-template-columns: 2.75rem 1fr;
  column-gap: 0.75rem;
  align-items: center;
  color: var(--cp-text);
  text-decoration: none;
}

.brand-mark {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 2px solid var(--cp-link);
  border-radius: 50%;
  color: var(--cp-link);
  font-family: Consolas, "Courier New", Courier, monospace;
  font-size: 0.8125rem;
  font-weight: 700;
}

.brand-name {
  font-family: "Palatino Linotype", "Book Antiqua", Georgia, serif;
  font-size: 1.3rem;
  line-height: 1.15;
}

.brand small {
  color: var(--cp-text-muted);
  font-size: 0.8125rem;
  line-height: 1.35;
}

.language {
  display: flex;
  gap: 0.25rem;
  margin: 1.5rem 0 0;
}

.language button {
  min-width: 2.75rem;
  height: 2.5rem;
  padding: 0;
  border: 1px solid var(--cp-border);
  border-radius: 4px;
  background: var(--cp-surface);
  color: var(--cp-text-muted);
  font-size: 0.8125rem;
  font-weight: 700;
}

.language button[aria-pressed="true"] {
  border-color: var(--cp-link);
  color: var(--cp-link);
  background: var(--cp-surface-soft);
}

.sidebar nav {
  display: grid;
  gap: 0.25rem;
  margin-top: 1.75rem;
}

.sidebar nav a {
  display: grid;
  grid-template-columns: 2rem 1fr;
  gap: 0.35rem;
  padding: 0.55rem 0.65rem;
  color: var(--cp-text-muted);
  text-decoration: none;
  border-left: 2px solid var(--cp-border);
}

.sidebar nav a:hover,
.sidebar nav a[aria-current="true"] {
  color: var(--cp-text);
  border-left-color: var(--cp-link);
  background: var(--cp-surface-soft);
}

.nav-number,
.project-number,
.method-list > li > span {
  color: var(--cp-link);
  font-family: Consolas, "Courier New", Courier, monospace;
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
}

.side-note {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--cp-border);
  color: var(--cp-text-muted);
  font-size: 0.875rem;
}

.side-links {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
  font-size: 0.875rem;
  font-weight: 700;
}

.content {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  justify-content: center;
  padding: 2.5rem 2rem 5rem;
}

.page {
  display: grid;
  grid-template-columns: [full-start text-start] minmax(0, 1fr) [text-end full-end];
  width: 100%;
  max-width: 68rem;
  padding: 3rem 3.5rem;
  background: var(--cp-surface);
  box-shadow: var(--cp-shadow);
  border-radius: 4px;
}

.page > * {
  grid-column: text;
  min-width: 0;
}

.page > .full {
  grid-column: full;
}

.hero {
  display: grid;
  align-content: center;
  min-height: calc(100vh - 8rem);
  padding: 5rem 0 6rem;
  border-bottom: 1px solid var(--cp-border);
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--cp-link);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0;
}

.eyebrow::before {
  content: "";
  width: 2rem;
  height: 2px;
  flex: none;
  background: var(--cp-link);
}

h1,
h2,
h3 {
  text-wrap: balance;
}

h1 {
  max-width: 12ch;
  margin-top: 1rem;
  font-family: "Palatino Linotype", "Book Antiqua", Georgia, serif;
  font-size: 5rem;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0;
}

h2 {
  margin-top: 0.85rem;
  font-size: 2.25rem;
  line-height: 1.18;
  letter-spacing: 0;
}

h3 {
  font-size: 1.45rem;
  line-height: 1.3;
  letter-spacing: 0;
}

.hero-line {
  max-width: 28ch;
  margin-top: 2.25rem;
  font-size: 1.65rem;
  line-height: 1.35;
}

.hero-detail {
  max-width: 48ch;
  margin-top: 1.25rem;
  color: var(--cp-text-muted);
  font-size: 1.15rem;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  width: fit-content;
  margin-top: 2.5rem;
  font-weight: 700;
}

.section-heading {
  padding: 6rem 0 2.5rem;
}

.section-heading > p:last-child {
  max-width: 50ch;
  margin-top: 1rem;
  color: var(--cp-text-muted);
}

.project {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(18rem, 0.9fr);
  gap: 3rem;
  align-items: start;
  padding: 3rem 0;
  border-top: 1px solid var(--cp-border);
}

.project-image {
  min-width: 0;
  background: var(--cp-surface-soft);
  border: 1px solid var(--cp-border);
  border-radius: 4px;
  overflow: hidden;
}

.project-image img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.project-primary .project-image img {
  aspect-ratio: 1200 / 630;
}

.project-image.map-image img {
  object-fit: cover;
  object-position: center 46%;
}

.project-copy h3 {
  margin-top: 0.6rem;
}

.project-copy > p:not(.project-number) {
  margin-top: 1rem;
}

.project-limit {
  padding-left: 1rem;
  border-left: 3px solid var(--cp-link);
  color: var(--cp-text-muted);
  font-size: 0.95rem;
}

.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-top: 1.5rem;
  font-weight: 700;
}

.project-index {
  border-top: 1px solid var(--cp-border);
}

.project-row {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr) 10.75rem;
  gap: 1rem;
  align-items: baseline;
  padding: 2rem 0;
  border-bottom: 1px solid var(--cp-border);
}

.project-row h3 {
  margin-bottom: 0.5rem;
}

.project-row p:not(.project-number) {
  max-width: 52rem;
  color: var(--cp-text-muted);
}

.project-row > a {
  font-size: 0.95rem;
  font-weight: 700;
}

.project-row > .project-links {
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
  margin-top: 0;
  font-size: 0.95rem;
}

.wide-figure {
  margin: 3rem 0;
}

.wide-figure img {
  width: 100%;
  border: 1px solid var(--cp-border);
  border-radius: 4px;
}

figcaption {
  max-width: 52rem;
  margin-top: 0.75rem;
  color: var(--cp-text-muted);
  font-size: 0.875rem;
}

.method-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--cp-border);
  border-bottom: 1px solid var(--cp-border);
}

.method-list li {
  display: grid;
  grid-template-columns: 2rem 1fr;
  gap: 0.75rem;
  padding: 2rem;
}

.method-list li + li {
  border-left: 1px solid var(--cp-border);
}

.method-list p {
  margin-top: 0.65rem;
  color: var(--cp-text-muted);
}

.experience-areas {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 1rem;
  border-top: 1px solid var(--cp-border);
  border-bottom: 1px solid var(--cp-border);
}

.experience-areas div {
  padding: 2rem 1.5rem;
}

.experience-areas div + div {
  border-left: 1px solid var(--cp-border);
}

.experience-areas h3 {
  color: var(--cp-link);
}

.experience-areas p {
  margin-top: 0.75rem;
  color: var(--cp-text-muted);
}

.career {
  padding: 2rem 0 0;
}

.career p {
  display: grid;
  grid-template-columns: 8rem 1fr;
  gap: 1rem;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--cp-border);
}

.career strong {
  color: var(--cp-link);
  font-family: Consolas, "Courier New", Courier, monospace;
  font-size: 0.875rem;
}

.contact {
  margin-top: 6rem;
  padding: 4rem 0;
  border-top: 2px solid var(--cp-link);
  border-bottom: 1px solid var(--cp-border);
}

.contact > p:not(.eyebrow) {
  max-width: 48ch;
  margin-top: 1rem;
  color: var(--cp-text-muted);
}

.contact-links {
  display: flex;
  gap: 1.5rem;
  margin-top: 2rem;
  font-size: 1.15rem;
  font-weight: 700;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  padding: 1.5rem 0 0;
  color: var(--cp-text-muted);
  font-size: 0.8rem;
}

.menu-button,
.scrim {
  display: none;
}

body:not([data-ready]) .hero > * {
  opacity: 0;
  transform: translateY(10px);
}

body[data-ready] .hero > * {
  animation: reveal 420ms ease-out both;
}

body[data-ready] .hero > :nth-child(2) { animation-delay: 60ms; }
body[data-ready] .hero > :nth-child(3) { animation-delay: 120ms; }
body[data-ready] .hero > :nth-child(4) { animation-delay: 180ms; }
body[data-ready] .hero > :nth-child(5) { animation-delay: 240ms; }

@keyframes reveal {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 72rem) {
  .sidebar {
    width: 17.5rem;
    flex-basis: 17.5rem;
  }

  .content {
    padding: 1.5rem 1rem 4rem;
  }

  .page {
    padding: 2.5rem 2rem;
  }

  h1 {
    font-size: 4rem;
  }

  .project {
    gap: 2rem;
  }

  .method-list li {
    padding: 1.5rem 1rem;
  }
}

@media (max-width: 62rem) {
  .menu-button {
    position: fixed;
    z-index: 210;
    top: 0.75rem;
    left: 0.75rem;
    display: grid;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    padding: 0;
    border: 1px solid var(--cp-border);
    border-radius: 4px;
    background: var(--cp-bg-elevated);
    color: var(--cp-link);
    box-shadow: var(--cp-shadow);
    font-size: 1.35rem;
  }

  .sidebar {
    position: fixed;
    z-index: 200;
    left: 0;
    width: 18rem;
    transform: translateX(-100%);
    transition: transform 180ms ease;
    box-shadow: var(--cp-shadow);
  }

  body.nav-open .sidebar {
    transform: none;
  }

  body.nav-open .menu-button {
    left: auto;
    right: 0.75rem;
  }

  .scrim:not([hidden]) {
    position: fixed;
    z-index: 190;
    inset: 0;
    display: block;
    background: var(--cp-overlay);
  }

  .content {
    padding: 4rem 0.75rem 3rem;
  }

  .page {
    padding: 2rem 1.25rem;
  }

  .hero {
    min-height: calc(100vh - 7rem);
  }
}

@media (max-width: 48rem) {
  h1 {
    font-size: 3.25rem;
  }

  h2 {
    font-size: 1.85rem;
  }

  .hero-line {
    font-size: 1.35rem;
  }

  .section-heading {
    padding-top: 4.5rem;
  }

  .project {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.5rem;
  }

  .project-row {
    grid-template-columns: 2rem minmax(0, 1fr);
  }

  .project-row > a,
  .project-row > .project-links {
    grid-column: 2;
  }

  .method-list,
  .experience-areas {
    grid-template-columns: minmax(0, 1fr);
  }

  .method-list li + li,
  .experience-areas div + div {
    border-left: 0;
    border-top: 1px solid var(--cp-border);
  }

  .career p {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.25rem;
  }

  .footer {
    display: grid;
    gap: 0.5rem;
  }
}

@media (max-width: 24rem) {
  .page {
    padding-right: 1rem;
    padding-left: 1rem;
  }

  h1 {
    font-size: 2.75rem;
  }

  .contact-links {
    display: grid;
  }
}

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

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

@media print {
  .sidebar,
  .menu-button,
  .scrim {
    display: none !important;
  }

  .content,
  .page {
    padding: 0;
  }

  .page {
    max-width: none;
    box-shadow: none;
  }
}