:root {
  --bg: #f3f1ea;
  --surface: #e9e5dc;
  --ink: #171714;
  --muted: #6d6a62;
  --line: #c8c3b7;
  --accent: #cf462e;
  --accent-ink: #fff9f1;
  --inverse-line: rgba(243, 241, 234, 0.24);
  --max: 1240px;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #151513;
  --surface: #1f1f1b;
  --ink: #f1eee5;
  --muted: #aaa69c;
  --line: #3b3933;
  --accent: #ff6747;
  --accent-ink: #171714;
  --inverse-line: rgba(21, 21, 19, 0.24);
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --bg: #151513;
    --surface: #1f1f1b;
    --ink: #f1eee5;
    --muted: #aaa69c;
    --line: #3b3933;
    --accent: #ff6747;
    --accent-ink: #171714;
    --inverse-line: rgba(21, 21, 19, 0.24);
    color-scheme: dark;
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Helvetica Neue", "Arial Nova", Arial, ui-sans-serif, system-ui, sans-serif;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--accent);
  color: var(--accent-ink);
}

a {
  color: inherit;
}

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

button {
  font: inherit;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.shell {
  width: min(calc(100% - 48px), var(--max));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  transform: translateY(-160%);
  padding: 10px 14px;
  background: var(--ink);
  color: var(--bg);
  text-decoration: none;
}

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

.site-header {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  border-bottom: 1px solid var(--line);
}

.brand {
  flex: 0 0 auto;
  text-decoration: none;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 24px;
  min-width: 0;
}

.nav a,
.theme-toggle {
  position: relative;
  border: 0;
  padding: 3px 0;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
}

.nav a::after,
.theme-toggle::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -5px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 180ms ease;
}

.nav a:hover,
.theme-toggle:hover {
  color: var(--ink);
}

.nav a:hover::after,
.theme-toggle:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.hero {
  min-height: min(780px, calc(100dvh - 72px));
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding-top: 96px;
  padding-bottom: 96px;
}

.hero h1 {
  max-width: 1100px;
  margin: 0;
  font-size: clamp(62px, 9.3vw, 132px);
  font-weight: 700;
  line-height: 0.87;
  letter-spacing: -0.075em;
  text-wrap: balance;
}

.hero-copy {
  max-width: 720px;
  margin: 42px 0 0;
  color: var(--muted);
  font-size: clamp(19px, 2vw, 27px);
  line-height: 1.36;
  letter-spacing: -0.025em;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 26px;
  margin-top: 34px;
}

.text-link,
.project-cta,
.project-row-end a {
  position: relative;
  width: fit-content;
  text-decoration: none;
}

.text-link::after,
.project-cta::after,
.project-row-end a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  height: 1px;
  background: currentColor;
  transform: scaleX(1);
  transform-origin: left;
  transition: transform 180ms ease;
}

.text-link:hover::after,
.project-cta:hover::after,
.project-row-end a:hover::after {
  transform: scaleX(0.35);
}

.text-link {
  color: var(--muted);
  font-size: 14px;
}

.text-link-strong {
  color: var(--ink);
  font-weight: 700;
}

.signal-strip {
  background: var(--ink);
  color: var(--bg);
}

.signal-grid {
  min-height: 70px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: center;
}

.signal-grid span {
  min-width: 0;
  padding: 0 20px;
  border-left: 1px solid var(--inverse-line);
  font: 600 11px/1.2 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.signal-grid span:first-child {
  padding-left: 0;
  border-left: 0;
}

.section {
  padding-top: 120px;
  padding-bottom: 120px;
}

.section-intro {
  max-width: 780px;
  margin-bottom: 68px;
}

.kicker,
.project-index,
.spec-label,
.tool-group-label {
  font: 650 11px/1.25 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.kicker {
  margin: 0 0 22px;
  color: var(--accent);
}

.section-intro h2,
.approach-statement h2 {
  margin: 0;
  font-size: clamp(46px, 6.5vw, 86px);
  line-height: 0.96;
  letter-spacing: -0.06em;
  text-wrap: balance;
}

.section-intro > p:last-child {
  max-width: 620px;
  margin: 28px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.55;
}

.feature-project {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(300px, 0.65fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.feature-project-copy {
  min-width: 0;
  padding: 48px 52px 52px 0;
}

.project-index {
  color: var(--muted);
}

.feature-project h3 {
  margin: 56px 0 24px;
  font-size: clamp(62px, 9vw, 116px);
  font-weight: 700;
  line-height: 0.86;
  letter-spacing: -0.075em;
}

.project-summary {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.56;
}

.project-cta {
  display: inline-block;
  margin-top: 40px;
  font-size: 14px;
  font-weight: 700;
}

.feature-project-spec {
  display: grid;
  grid-template-rows: repeat(4, 1fr);
  border-left: 1px solid var(--line);
}

.feature-project-spec > div {
  min-height: 128px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  padding: 26px 28px;
  border-bottom: 1px solid var(--line);
}

.feature-project-spec > div:last-child {
  border-bottom: 0;
}

.spec-label {
  color: var(--accent);
}

.feature-project-spec strong {
  max-width: 270px;
  font-size: 15px;
  line-height: 1.35;
  letter-spacing: -0.015em;
}

.project-ledger {
  margin-top: 72px;
  border-top: 1px solid var(--line);
}

.project-row {
  display: grid;
  grid-template-columns: 48px minmax(180px, 0.65fr) minmax(320px, 1.35fr) 190px;
  gap: 28px;
  align-items: start;
  padding: 34px 0 38px;
  border-bottom: 1px solid var(--line);
}

.project-title-group h3 {
  margin: 0;
  font-size: clamp(27px, 3vw, 38px);
  line-height: 1;
  letter-spacing: -0.045em;
}

.project-title-group span,
.project-row-end span {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font: 550 11px/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  text-transform: uppercase;
  letter-spacing: 0.045em;
}

.project-row > p {
  max-width: 580px;
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.58;
}

.project-row-end {
  display: flex;
  min-height: 100%;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 30px;
}

.project-row-end span {
  margin-top: 0;
}

.project-row-end a {
  font-size: 13px;
  font-weight: 700;
}

.approach {
  background: var(--ink);
  color: var(--bg);
}

.approach-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 100px;
}

.approach .kicker {
  color: var(--accent);
}

.approach-statement {
  align-self: start;
  position: sticky;
  top: 112px;
}

.approach-statement h2 {
  max-width: 560px;
}

.principles {
  border-top: 1px solid var(--inverse-line);
}

.principle {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 24px;
  padding: 30px 0 34px;
  border-bottom: 1px solid var(--inverse-line);
}

.principle > span {
  padding-top: 4px;
  color: var(--accent);
  font: 650 11px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.principle h3 {
  margin: 0;
  font-size: clamp(24px, 2.6vw, 36px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.principle p {
  max-width: 560px;
  margin: 16px 0 0;
  color: color-mix(in srgb, var(--bg) 68%, transparent);
  font-size: 15px;
  line-height: 1.6;
}

.working-set {
  display: grid;
  grid-template-columns: minmax(220px, 0.55fr) minmax(0, 1.45fr);
  gap: 100px;
  border-bottom: 1px solid var(--line);
}

.working-set-head h2 {
  margin: 0;
  font-size: clamp(40px, 5vw, 68px);
  line-height: 0.95;
  letter-spacing: -0.055em;
}

.working-set-head p {
  max-width: 310px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.tool-groups {
  border-top: 1px solid var(--line);
}

.tool-groups > div {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 28px;
  align-items: baseline;
  padding: 26px 0 29px;
  border-bottom: 1px solid var(--line);
}

.tool-group-label {
  color: var(--accent);
}

.tool-groups p {
  margin: 0;
  font-size: clamp(17px, 2vw, 24px);
  line-height: 1.4;
  letter-spacing: -0.025em;
}

.contact {
  padding: 122px 0 132px;
  background: var(--accent);
  color: var(--accent-ink);
}

.contact .kicker {
  color: inherit;
  opacity: 0.68;
}

.contact-inner h2 {
  max-width: 1060px;
  margin: 0;
  font-size: clamp(60px, 9.4vw, 132px);
  line-height: 0.86;
  letter-spacing: -0.075em;
  text-wrap: balance;
}

.contact-email {
  display: inline-block;
  margin-top: 52px;
  padding-bottom: 5px;
  border-bottom: 2px solid currentColor;
  font-size: clamp(17px, 2.2vw, 28px);
  font-weight: 700;
  letter-spacing: -0.025em;
  text-decoration: none;
  transition: opacity 160ms ease;
}

.contact-email:hover {
  opacity: 0.62;
}

.site-footer {
  min-height: 86px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: center;
  gap: 24px;
  color: var(--muted);
  font: 550 11px/1.2 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.025em;
}

.site-footer span:nth-child(2) {
  text-align: center;
}

.site-footer > span:last-child {
  text-align: right;
}

.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 520ms cubic-bezier(0.2, 0.72, 0.2, 1), transform 520ms cubic-bezier(0.2, 0.72, 0.2, 1);
}

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

@media (max-width: 980px) {
  .shell {
    width: min(calc(100% - 36px), var(--max));
  }

  .hero {
    min-height: auto;
    padding-top: 80px;
    padding-bottom: 90px;
  }

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

  .feature-project-copy {
    padding: 42px 30px 46px 0;
  }

  .feature-project-spec {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: auto;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .feature-project-spec > div {
    border-right: 1px solid var(--line);
  }

  .feature-project-spec > div:nth-child(2n) {
    border-right: 0;
  }

  .feature-project-spec > div:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  .project-row {
    grid-template-columns: 40px minmax(170px, 0.7fr) minmax(0, 1.3fr);
  }

  .project-row-end {
    grid-column: 2 / -1;
    min-height: 0;
    flex-direction: row;
    align-items: baseline;
  }

  .approach-layout,
  .working-set {
    grid-template-columns: 1fr;
    gap: 64px;
  }

  .approach-statement {
    position: static;
  }

  .approach-statement h2 {
    max-width: 760px;
  }
}

@media (max-width: 720px) {
  .site-header {
    min-height: 66px;
  }

  .nav {
    gap: 17px;
  }

  .nav a[href="#approach"],
  .nav a[href="#contact"] {
    display: none;
  }

  .hero {
    padding-top: 66px;
    padding-bottom: 72px;
  }

  .hero h1 {
    font-size: clamp(54px, 15.2vw, 82px);
    line-height: 0.9;
  }

  .hero-copy {
    margin-top: 32px;
    font-size: 19px;
  }

  .signal-grid {
    grid-template-columns: 1fr 1fr;
    padding: 16px 0;
  }

  .signal-grid span {
    min-height: 38px;
    display: flex;
    align-items: center;
    padding: 0 12px;
  }

  .signal-grid span:nth-child(odd) {
    padding-left: 0;
    border-left: 0;
  }

  .section {
    padding-top: 82px;
    padding-bottom: 82px;
  }

  .section-intro {
    margin-bottom: 44px;
  }

  .section-intro h2,
  .approach-statement h2 {
    font-size: clamp(42px, 12vw, 64px);
  }

  .feature-project {
    margin-inline: -18px;
    padding-inline: 18px;
  }

  .feature-project-copy {
    padding: 34px 0 40px;
  }

  .feature-project h3 {
    margin-top: 42px;
    font-size: clamp(60px, 18vw, 92px);
  }

  .feature-project-spec {
    margin-inline: -18px;
    padding-inline: 18px;
  }

  .feature-project-spec > div {
    min-height: 118px;
    padding: 22px 16px 22px 0;
  }

  .feature-project-spec > div:nth-child(even) {
    padding-left: 16px;
  }

  .project-ledger {
    margin-top: 52px;
  }

  .project-row {
    grid-template-columns: 32px 1fr;
    gap: 18px;
    padding: 28px 0 32px;
  }

  .project-row > p,
  .project-row-end {
    grid-column: 2;
  }

  .project-row-end {
    flex-direction: column;
    gap: 20px;
  }

  .approach-layout,
  .working-set {
    gap: 46px;
  }

  .principle {
    grid-template-columns: 30px 1fr;
    gap: 16px;
  }

  .tool-groups > div {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .contact {
    padding: 86px 0 94px;
  }

  .contact-inner h2 {
    font-size: clamp(58px, 17vw, 92px);
  }

  .contact-email {
    margin-top: 38px;
  }

  .site-footer {
    grid-template-columns: 1fr auto;
  }

  .site-footer span:nth-child(2) {
    display: none;
  }
}

@media (max-width: 430px) {
  .shell {
    width: min(calc(100% - 28px), var(--max));
  }

  .brand {
    font-size: 14px;
  }

  .nav {
    gap: 14px;
  }

  .nav a[href="#work"] {
    display: none;
  }

  .hero-actions {
    gap: 20px;
  }

  .feature-project {
    margin-inline: -14px;
    padding-inline: 14px;
  }

  .feature-project-spec {
    margin-inline: -14px;
    padding-inline: 14px;
  }

  .feature-project-spec strong {
    font-size: 13px;
  }
}

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

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

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