:root {
  --paper: #f3f0e9;
  --paper-deep: #e8e2d8;
  --ink: #1b1b19;
  --muted: #6d6b65;
  --line: rgba(27, 27, 25, 0.18);
  --orange: #df6b3f;
  --blue: #1e4f63;
  --white: #fbfaf6;
  --header-bg: rgba(243, 240, 233, 0.94);
  --serif: "Instrument Serif", Georgia, serif;
  --sans: "DM Sans", Arial, sans-serif;
  --mono: "IBM Plex Mono", "Courier New", monospace;
}

[data-theme="dark"] {
  --paper: #131311;
  --paper-deep: #1b1b18;
  --ink: #ece7dc;
  --muted: #9c9990;
  --line: rgba(236, 231, 220, 0.13);
  --orange: #e57648;
  --blue: #3c7f99;
  --white: #ffffff;
  --header-bg: rgba(19, 19, 17, 0.94);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  overflow-x: hidden;
  transition: background-color 240ms ease, color 240ms ease;
}

body.menu-open {
  overflow: hidden;
}

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

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
  font: inherit;
}

.shell {
  width: min(1160px, calc(100% - 64px));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 12px;
  left: 12px;
  padding: 10px 16px;
  color: var(--white);
  background: var(--ink);
  transform: translateY(-150%);
  transition: transform 180ms ease;
}

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

.site-header {
  position: fixed;
  z-index: 100;
  top: 0;
  left: 0;
  width: 100%;
  padding: 23px 0;
  transition: padding 220ms ease, background-color 220ms ease, border-color 220ms ease;
}

.site-header.is-scrolled {
  padding: 14px 0;
  background: rgba(243, 240, 233, 0.94);
  background: var(--header-bg);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.header-inner,
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.wordmark-mark {
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  color: var(--paper);
  background: var(--ink);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: -0.13em;
  text-indent: -2px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 31px;
  font-size: 13px;
  font-weight: 600;
}

.site-nav > a:not(.nav-cta),
.footer-links a {
  position: relative;
}

.site-nav > a:not(.nav-cta)::after,
.footer-links a::after {
  position: absolute;
  right: 0;
  bottom: -5px;
  left: 0;
  height: 1px;
  background: currentColor;
  content: "";
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 200ms ease;
}

.site-nav > a:not(.nav-cta):hover::after,
.footer-links a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.nav-cta {
  display: inline-flex;
  gap: 9px;
  align-items: center;
  padding: 10px 14px;
  color: var(--white);
  background: var(--ink);
  transition: background-color 180ms ease, transform 180ms ease;
}

.nav-cta:hover {
  background: var(--orange);
  transform: translateY(-2px);
}

.menu-toggle {
  display: none;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
}

.menu-icon {
  display: inline-flex;
  width: 18px;
  flex-direction: column;
  gap: 5px;
  margin-left: 8px;
}

.menu-icon i {
  display: block;
  width: 100%;
  height: 1px;
  background: currentColor;
  transition: transform 180ms ease;
}

.menu-toggle[aria-expanded="true"] .menu-icon i:first-child {
  transform: translateY(3px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .menu-icon i:last-child {
  transform: translateY(-3px) rotate(-45deg);
}

.hero {
  position: relative;
  min-height: 770px;
  padding: 150px 0 37px;
  background: var(--paper);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.03fr) minmax(360px, 0.97fr);
  gap: 80px;
  align-items: center;
  min-height: 530px;
}

.eyebrow,
.section-kicker,
.mono-label,
.project-number,
.principle-index {
  margin: 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  line-height: 1.4;
  text-transform: uppercase;
}

.eyebrow {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 29px;
  color: var(--blue);
}

.eyebrow-line {
  display: inline-block;
  width: 34px;
  height: 1px;
  background: var(--orange);
}

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

h1,
h2,
h3 {
  font-weight: 600;
  letter-spacing: -0.05em;
}

h1 {
  max-width: 630px;
  margin-bottom: 29px;
  font-size: clamp(58px, 7.2vw, 104px);
  line-height: 0.94;
}

h1 em,
h2 em,
h3 em {
  color: var(--orange);
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.03em;
}

.hero-intro {
  max-width: 475px;
  margin-bottom: 31px;
  color: var(--muted);
  font-size: 16px;
}

.hero-actions,
.about-links {
  display: flex;
  align-items: center;
  gap: 25px;
}

.button {
  display: inline-flex;
  min-height: 47px;
  align-items: center;
  justify-content: center;
  gap: 23px;
  padding: 12px 17px;
  font-size: 12px;
  font-weight: 700;
  transition: transform 180ms ease, background-color 180ms ease, color 180ms ease;
}

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

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

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

.button-outline {
  border: 1px solid var(--ink);
}

.button-outline:hover {
  color: var(--white);
  background: var(--ink);
}

.text-link {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 4px;
  font-size: 12px;
  font-weight: 700;
  transition: color 180ms ease, border-color 180ms ease;
}

.text-link:hover {
  color: var(--orange);
  border-color: var(--orange);
}

.hero-meta {
  display: flex;
  gap: 27px;
  margin-top: 69px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 8px;
  border-radius: 50%;
  background: #3e9b67;
  box-shadow: 0 0 0 4px rgba(62, 155, 103, 0.12);
}

.hero-portrait {
  position: relative;
  max-width: 430px;
  margin-left: auto;
}

.portrait-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 0.79;
  overflow: hidden;
  background: var(--ink);
}

.portrait-frame::before {
  position: absolute;
  z-index: 1;
  top: 0;
  left: 0;
  width: 100%;
  height: 8px;
  background: var(--orange);
  content: "";
}

.portrait-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: grayscale(1) contrast(1.08);
  transition: transform 700ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.hero-portrait:hover .portrait-frame img {
  transform: scale(1.04);
}

.portrait-label {
  position: absolute;
  z-index: 2;
  right: 21px;
  bottom: 19px;
  color: var(--white);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  line-height: 1.5;
  text-align: right;
  text-transform: uppercase;
}

.portrait-label small {
  color: rgba(255, 255, 255, 0.6);
  font-size: 9px;
}

.portrait-note {
  position: absolute;
  right: -57px;
  bottom: 25px;
  color: var(--blue);
  font-family: var(--serif);
  font-size: 20px;
  line-height: 0.96;
  transform: rotate(-7deg);
}

.portrait-note em {
  color: var(--orange);
  font-weight: 400;
}

.hero-rule {
  width: min(1160px, calc(100% - 64px));
  height: 1px;
  margin: 0 auto;
  background: var(--line);
}

.hero-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 22px;
}

.scroll-mark {
  margin-left: 150px;
  color: var(--orange);
  font-size: 18px;
}

.section-pad {
  padding: 140px 0;
}

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

.statement-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 85px;
}

.statement .section-kicker,
.contact .section-kicker {
  color: #aaa79d;
}

h2 {
  margin-bottom: 28px;
  font-size: clamp(48px, 6.4vw, 83px);
  line-height: 0.95;
}

.large-copy {
  max-width: 610px;
  margin-bottom: 26px;
  color: #aaa79d;
  font-size: 21px;
  line-height: 1.45;
}

.statement .text-link,
.contact .contact-email {
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.65);
}

.statement .text-link:hover,
.contact .contact-email:hover {
  color: var(--orange);
  border-color: var(--orange);
}

.work {
  background: var(--paper);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 50px;
  margin-bottom: 65px;
}

.section-heading h2 {
  margin: 22px 0 0;
}

.section-aside {
  max-width: 275px;
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 14px;
}

.project-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 82px 24px;
}

.project-card {
  min-width: 0;
}

.project-card-featured {
  grid-column: 1 / -1;
}

.project-card-wide {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 32px;
  align-items: start;
}

.project-image {
  position: relative;
  display: block;
  height: 425px;
  overflow: hidden;
  background: var(--paper-deep);
}

.project-image-short {
  height: 260px;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.82);
  transition: transform 650ms cubic-bezier(0.2, 0.7, 0.2, 1), filter 350ms ease;
}

.project-card:hover .project-image img {
  filter: saturate(1);
  transform: scale(1.045);
}

.project-arrow {
  position: absolute;
  right: 18px;
  bottom: 18px;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  color: var(--ink);
  background: var(--paper);
  font-size: 20px;
  transition: background-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.project-card:hover .project-arrow {
  color: var(--white);
  background: var(--orange);
  transform: rotate(6deg);
}

.project-info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  padding-top: 23px;
  border-top: 1px solid var(--ink);
}

.project-info-compact {
  gap: 22px;
}

.project-number {
  margin-bottom: 12px;
  color: var(--orange);
}

.project-info h3 {
  margin: 0;
  font-size: clamp(28px, 3.7vw, 51px);
  line-height: 0.97;
}

.project-info-compact h3 {
  font-size: 35px;
}

.project-detail {
  max-width: 270px;
}

.project-detail p {
  margin-bottom: 21px;
  color: var(--muted);
  font-size: 13px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tag-row span {
  padding: 5px 8px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.work-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 82px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.work-footer p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.thinking {
  color: var(--white);
  background: var(--blue);
}

.thinking .section-kicker {
  color: #b2c4c9;
}

.thinking .section-aside {
  color: #b2c4c9;
}

.principles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.principle {
  min-height: 255px;
  padding: 20px 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.35);
}

.principle-index {
  color: var(--orange);
}

.principle h3 {
  max-width: 235px;
  margin: 65px 0 16px;
  color: var(--white);
  font-size: 25px;
  line-height: 1.04;
}

.principle p {
  max-width: 260px;
  margin: 0;
  color: #b2c4c9;
  font-size: 13px;
}

.about {
  background: var(--paper-deep);
}

.about-grid {
  display: grid;
  grid-template-columns: minmax(250px, 0.75fr) 1.25fr;
  gap: 110px;
  align-items: center;
}

.about-image {
  position: relative;
  max-width: 325px;
}

.about-image::after {
  position: absolute;
  z-index: 0;
  right: -21px;
  bottom: -21px;
  width: 72%;
  height: 72%;
  border: 1px solid var(--orange);
  content: "";
}

.about-image img {
  position: relative;
  z-index: 1;
  width: 100%;
  aspect-ratio: 0.73;
  object-fit: cover;
  filter: grayscale(1) contrast(1.1);
}

.about-stamp {
  position: absolute;
  z-index: 2;
  right: -14px;
  bottom: 10px;
  display: grid;
  width: 70px;
  height: 70px;
  place-items: center;
  color: var(--paper);
  background: var(--orange);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-align: center;
}

.about-copy h2 {
  margin-top: 23px;
}

.about-copy > p:not(.section-kicker) {
  max-width: 570px;
  color: var(--muted);
  font-size: 16px;
}

.about-links {
  margin-top: 34px;
}

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

.contact-inner {
  max-width: 850px;
  text-align: center;
}

.contact h2 {
  margin-top: 24px;
}

.contact-inner > p:not(.section-kicker) {
  max-width: 450px;
  margin: 0 auto 32px;
  color: #aaa79d;
  font-size: 16px;
}

.contact-email {
  display: inline-flex;
  gap: 16px;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.65);
  padding-bottom: 8px;
  font-family: var(--serif);
  font-size: clamp(23px, 3vw, 36px);
  transition: color 180ms ease, border-color 180ms ease;
}

.site-footer {
  padding: 26px 0;
  color: var(--white);
  background: var(--ink);
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.footer-inner {
  gap: 25px;
}

.site-footer .wordmark {
  color: var(--white);
}

.site-footer .wordmark-mark {
  color: var(--ink);
  background: var(--white);
}

.site-footer p,
.footer-links {
  margin: 0;
  color: #aaa79d;
  font-size: 11px;
}

.footer-links {
  display: flex;
  gap: 19px;
}

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 650ms ease, transform 650ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay {
  transition-delay: 100ms;
}

@media (max-width: 900px) {
  .shell,
  .hero-rule {
    width: min(100% - 42px, 680px);
  }

  .site-nav {
    gap: 18px;
  }

  .hero {
    min-height: auto;
    padding-top: 130px;
  }

  .hero-grid {
    grid-template-columns: 1fr 0.75fr;
    gap: 35px;
  }

  h1 {
    font-size: clamp(54px, 8vw, 78px);
  }

  .portrait-note {
    right: -15px;
    bottom: -40px;
  }

  .statement-grid {
    gap: 40px;
  }

  .about-grid {
    gap: 60px;
  }
}

@media (max-width: 680px) {
  .shell,
  .hero-rule {
    width: calc(100% - 40px);
  }

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

  .site-header.is-scrolled {
    padding: 13px 0;
  }

  .menu-toggle {
    display: inline-flex;
    align-items: center;
  }

  .site-nav {
    position: fixed;
    top: 67px;
    right: 20px;
    left: 20px;
    display: flex;
    align-items: stretch;
    flex-direction: column;
    gap: 0;
    padding: 13px 18px 18px;
    background: var(--ink);
    color: var(--white);
    box-shadow: 0 14px 35px rgba(27, 27, 25, 0.18);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    transition: opacity 180ms ease, transform 180ms ease;
  }

  .site-nav.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .site-nav > a {
    padding: 14px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  }

  .site-nav > a:last-child {
    border-bottom: 0;
  }

  .site-nav > a:not(.nav-cta)::after {
    display: none;
  }

  .nav-cta {
    justify-content: space-between;
    margin-top: 12px;
    padding: 12px;
    background: var(--orange);
  }

  .hero {
    padding-top: 115px;
  }

  .hero-grid {
    display: flex;
    flex-direction: column;
    gap: 53px;
  }

  .hero-copy {
    width: 100%;
  }

  h1 {
    max-width: 480px;
    font-size: clamp(57px, 16vw, 85px);
  }

  .hero-intro {
    max-width: 450px;
  }

  .hero-meta {
    flex-direction: column;
    gap: 10px;
    margin-top: 42px;
  }

  .hero-portrait {
    width: min(100%, 390px);
    margin-right: auto;
    margin-left: auto;
  }

  .hero-bottom {
    padding-top: 18px;
  }

  .scroll-mark {
    margin-left: 0;
  }

  .hero-index {
    display: none;
  }

  .section-pad {
    padding: 91px 0;
  }

  .statement-grid,
  .about-grid {
    grid-template-columns: 1fr;
    gap: 39px;
  }

  h2 {
    font-size: clamp(48px, 14vw, 75px);
  }

  .large-copy {
    font-size: 18px;
  }

  .section-heading {
    display: block;
    margin-bottom: 47px;
  }

  .section-aside {
    margin-top: 25px;
  }

  .project-grid {
    display: block;
  }

  .project-card,
  .project-card-wide {
    display: block;
    margin-bottom: 60px;
  }

  .project-image,
  .project-image-short {
    height: min(70vw, 330px);
  }

  .project-info,
  .project-info-compact {
    grid-template-columns: 1fr;
    gap: 21px;
  }

  .project-info h3,
  .project-info-compact h3 {
    font-size: 37px;
  }

  .project-detail {
    max-width: 340px;
  }

  .work-footer {
    display: block;
    margin-top: 15px;
  }

  .work-footer p {
    margin-bottom: 21px;
  }

  .principles-grid {
    display: block;
  }

  .principle {
    min-height: auto;
    margin-bottom: 47px;
  }

  .principle h3 {
    margin-top: 36px;
  }

  .about-image {
    width: min(72vw, 300px);
    margin-left: 10px;
  }

  .about-copy h2 {
    margin-top: 19px;
  }

  .contact-email {
    font-size: 23px;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }
}

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

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

  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* Shared styles for the supporting pages */
.inner-page {
  padding-top: 124px;
}

.inner-hero {
  padding: 92px 0 82px;
  border-bottom: 1px solid var(--line);
}

.inner-hero h1 {
  max-width: 820px;
  margin: 22px 0 25px;
  font-size: clamp(54px, 8vw, 104px);
}

.inner-hero > p:not(.section-kicker) {
  max-width: 570px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 18px;
}

.inner-hero .section-kicker {
  color: var(--orange);
}

.page-content {
  padding: 92px 0 140px;
}

.page-grid {
  display: grid;
  grid-template-columns: minmax(170px, 0.42fr) 1fr;
  gap: 100px;
}

.page-aside {
  align-self: start;
  position: sticky;
  top: 110px;
}

.page-aside p {
  max-width: 160px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.page-aside .section-kicker {
  margin-bottom: 18px;
  color: var(--orange);
}

.prose-block {
  padding-bottom: 56px;
  border-bottom: 1px solid var(--line);
}

.prose-block + .prose-block {
  padding-top: 56px;
}

.prose-block h2 {
  margin-bottom: 24px;
  font-size: clamp(36px, 5vw, 62px);
}

.prose-block h3 {
  margin: 0 0 15px;
  font-size: 24px;
  letter-spacing: -0.04em;
}

.prose-block p {
  max-width: 620px;
  margin-bottom: 19px;
  color: var(--muted);
  font-size: 16px;
}

.facts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 28px;
  max-width: 630px;
}

.fact {
  padding: 15px 0;
  border-top: 1px solid var(--line);
}

.fact span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.fact strong {
  font-size: 14px;
  font-weight: 600;
}

.tool-list {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  max-width: 630px;
}

.tool-list span {
  padding: 9px 11px;
  border: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 10px;
}

.resume-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 30px;
}

.resume-section {
  margin-bottom: 70px;
}

.resume-section:last-child {
  margin-bottom: 0;
}

.resume-section-title {
  display: flex;
  align-items: baseline;
  gap: 17px;
  margin: 0 0 25px;
  padding-bottom: 17px;
  border-bottom: 1px solid var(--ink);
  font-size: 24px;
}

.resume-section-title span {
  color: var(--orange);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.08em;
}

.timeline-item {
  display: grid;
  grid-template-columns: 145px 1fr;
  gap: 32px;
  padding: 23px 0;
  border-bottom: 1px solid var(--line);
}

.timeline-date {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1.6;
  text-transform: uppercase;
}

.timeline-item h3 {
  margin-bottom: 6px;
  font-size: 23px;
}

.timeline-item h3 em {
  color: var(--orange);
}

.timeline-item .timeline-org {
  margin-bottom: 11px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 600;
}

.timeline-item p,
.timeline-item li {
  max-width: 560px;
  color: var(--muted);
  font-size: 14px;
}

.timeline-item ul {
  margin: 0;
  padding-left: 18px;
}

.case-list {
  display: grid;
  gap: 75px;
}

.case-row {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(260px, 0.78fr);
  gap: 52px;
  align-items: center;
  padding-bottom: 75px;
  border-bottom: 1px solid var(--line);
}

.case-row:nth-child(even) {
  grid-template-columns: minmax(260px, 0.78fr) minmax(280px, 1fr);
}

.case-row:nth-child(even) .case-image {
  order: 2;
}

.case-image {
  position: relative;
  display: block;
  height: 310px;
  overflow: hidden;
  background: var(--paper-deep);
}

.case-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.83);
  transition: transform 600ms ease, filter 300ms ease;
}

.case-row:hover .case-image img {
  filter: saturate(1);
  transform: scale(1.04);
}

.case-copy .project-number {
  margin-bottom: 14px;
}

.case-copy h2 {
  margin-bottom: 18px;
  font-size: clamp(39px, 5vw, 67px);
}

.case-copy p {
  max-width: 430px;
  color: var(--muted);
  font-size: 15px;
}

.case-copy .tag-row {
  margin: 23px 0 28px;
}

.detail-hero {
  padding-bottom: 72px;
}

.detail-hero h1 {
  max-width: 930px;
}

.detail-image {
  width: 100%;
  max-height: 560px;
  object-fit: cover;
  margin-top: 56px;
}

.detail-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 0 0 70px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.detail-meta span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.detail-meta strong {
  font-size: 14px;
}

.process-grid,
.capability-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 23px;
}

.process-card,
.capability-card {
  min-height: 230px;
  padding: 21px;
  border-top: 1px solid var(--ink);
  background: var(--paper-deep);
}

.process-card .principle-index,
.capability-card .principle-index {
  color: var(--orange);
}

.process-card h3,
.capability-card h3 {
  margin: 53px 0 13px;
  font-size: 24px;
}

.process-card p,
.capability-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.contact-page {
  background: var(--ink);
  color: var(--white);
}

.contact-page .site-header {
  color: var(--white);
}

.contact-page .site-header.is-scrolled {
  color: var(--ink);
}

.contact-page .wordmark-mark {
  color: var(--ink);
  background: var(--white);
}

.contact-page .nav-cta {
  color: var(--ink);
  background: var(--white);
}

.contact-page .inner-hero {
  border-color: rgba(255, 255, 255, 0.18);
}

.contact-page .inner-hero .section-kicker {
  color: var(--orange);
}

.contact-page .inner-hero > p:not(.section-kicker),
.contact-page .contact-detail p,
.contact-page .form-note {
  color: #aaa79d;
}

.contact-page .page-content {
  padding-top: 82px;
}

.contact-grid {
  display: grid;
  grid-template-columns: 0.7fr 1.3fr;
  gap: 110px;
}

.contact-detail {
  margin-bottom: 38px;
}

.contact-detail span {
  display: block;
  margin-bottom: 8px;
  color: var(--orange);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.contact-detail a,
.contact-detail p {
  display: inline-block;
  margin: 0;
  font-family: var(--serif);
  font-size: 25px;
}

.contact-page .contact-detail a:hover {
  color: var(--orange);
}

.contact-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px 18px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.form-field-full {
  grid-column: 1 / -1;
}

.form-field label {
  color: #aaa79d;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.form-field input,
.form-field textarea {
  width: 100%;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 0;
  padding: 13px 0;
  outline: 0;
  color: var(--white);
  background: transparent;
  font: inherit;
  resize: vertical;
}

.form-field input:focus,
.form-field textarea:focus {
  border-color: var(--orange);
}

.contact-page .button-dark {
  border: 0;
  color: var(--ink);
  background: var(--white);
  cursor: pointer;
}

.contact-page .button-dark:hover {
  color: var(--white);
  background: var(--orange);
}

.form-note {
  grid-column: 1 / -1;
  margin: -7px 0 0;
  font-size: 11px;
}

.thanks {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 40px 0;
  text-align: center;
}

.thanks-inner {
  max-width: 600px;
}

.thanks h1 {
  margin: 22px auto;
  font-size: clamp(58px, 9vw, 105px);
}

.thanks p {
  margin: 0 auto 30px;
  color: var(--muted);
  font-size: 17px;
}

@media (max-width: 760px) {
  .inner-page {
    padding-top: 89px;
  }

  .inner-hero {
    padding: 67px 0 58px;
  }

  .page-content {
    padding: 67px 0 92px;
  }

  .page-grid,
  .contact-grid {
    display: block;
  }

  .page-aside {
    position: static;
    margin-bottom: 50px;
  }

  .page-aside p {
    max-width: 400px;
  }

  .facts-grid,
  .detail-meta,
  .contact-form {
    grid-template-columns: 1fr;
  }

  .timeline-item {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .case-list {
    gap: 52px;
  }

  .case-row,
  .case-row:nth-child(even) {
    display: flex;
    flex-direction: column;
    gap: 30px;
    padding-bottom: 52px;
  }

  .case-row:nth-child(even) .case-image {
    order: 0;
  }

  .case-image {
    width: 100%;
    height: min(67vw, 320px);
  }

  .process-grid,
  .capability-grid {
    display: block;
  }

  .process-card,
  .capability-card {
    min-height: 0;
    margin-bottom: 18px;
  }

  .contact-grid {
    display: flex;
    flex-direction: column;
    gap: 52px;
  }

  .contact-detail {
    margin-bottom: 24px;
  }

  .contact-page .contact-detail a,
  .contact-page .contact-detail p {
    font-size: 21px;
  }

  .detail-image {
    margin-top: 37px;
  }
}

/* ==========================================================================
   Theme Toggle Button & Dark Mode Component Overrides
   ========================================================================== */

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  padding: 8px 12px;
  color: var(--ink);
  background: transparent;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 0;
  transition: color 180ms ease, border-color 180ms ease, background-color 180ms ease;
  line-height: 1;
}

.theme-toggle:hover {
  color: var(--orange);
  border-color: var(--orange);
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

.theme-toggle-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
}

.theme-toggle-icon svg {
  width: 14px;
  height: 14px;
  display: block;
}

.theme-toggle .sun-icon {
  display: none;
}

.theme-toggle .moon-icon {
  display: block;
}

[data-theme="dark"] .theme-toggle .sun-icon {
  display: block;
}

[data-theme="dark"] .theme-toggle .moon-icon {
  display: none;
}

/* Dark Mode Specific Component Overrides */
[data-theme="dark"] .button-dark {
  background: #ece7dc;
  color: #131311;
}

[data-theme="dark"] .button-dark:hover {
  background: var(--orange);
  color: #ffffff;
}

[data-theme="dark"] .nav-cta {
  background: #ece7dc;
  color: #131311;
}

[data-theme="dark"] .nav-cta:hover {
  background: var(--orange);
  color: #ffffff;
}

[data-theme="dark"] .statement {
  background: #0a0a09;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

[data-theme="dark"] .statement .section-kicker,
[data-theme="dark"] .contact .section-kicker {
  color: #8c8980;
}

[data-theme="dark"] .large-copy {
  color: #b5b2a8;
}

[data-theme="dark"] .thinking {
  background: #132630;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .thinking .section-kicker,
[data-theme="dark"] .thinking .section-aside {
  color: #8da4ac;
}

[data-theme="dark"] .principle {
  border-top-color: rgba(255, 255, 255, 0.18);
}

[data-theme="dark"] .principle p {
  color: #a8bec6;
}

[data-theme="dark"] .contact {
  background: #0a0a09;
  border-top: 1px solid var(--line);
}

[data-theme="dark"] .contact-inner > p:not(.section-kicker) {
  color: #b5b2a8;
}

[data-theme="dark"] .site-footer {
  background: #090908;
  border-top: 1px solid var(--line);
}

[data-theme="dark"] .site-footer .wordmark-mark {
  color: #131311;
  background: #ece7dc;
}

[data-theme="dark"] .site-footer p,
[data-theme="dark"] .footer-links {
  color: #8c8980;
}

[data-theme="dark"] .contact-page {
  background: #131311;
}

[data-theme="dark"] .contact-page .site-header.is-scrolled {
  background: var(--header-bg);
  color: var(--ink);
}

[data-theme="dark"] .contact-page .wordmark-mark {
  color: #131311;
  background: #ece7dc;
}

[data-theme="dark"] .contact-page .nav-cta {
  color: #131311;
  background: #ece7dc;
}

[data-theme="dark"] .contact-page .nav-cta:hover {
  color: #ffffff;
  background: var(--orange);
}

@media (max-width: 900px) {
  .site-nav .theme-toggle {
    width: 100%;
    justify-content: space-between;
    margin: 10px 0 2px;
    padding: 12px 14px;
    font-size: 11px;
    border-color: var(--line);
  }

  [data-theme="dark"] .site-nav {
    background: #1b1b18;
    color: #ece7dc;
    border: 1px solid var(--line);
    box-shadow: 0 14px 35px rgba(0, 0, 0, 0.6);
  }

  [data-theme="dark"] .site-nav > a {
    border-bottom-color: var(--line);
  }
}