:root {
  --bg: #f7f4ee;
  --paper: #fffefa;
  --ink: #171717;
  --muted: #5f625f;
  --rule: #d9d4ca;
  --accent: #2457c5;
  --accent-dark: #173c8d;
  --soft: #ece7dd;
  --focus: #0f62fe;
  --max: 1180px;
  --step-0: 0.95rem;
  --step-1: 1.05rem;
  --step-2: 1.22rem;
  --step-3: 1.55rem;
  --step-4: 2.15rem;
  --step-5: 2.85rem;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(23, 23, 23, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 23, 23, 0.025) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.6), transparent 42rem);
}

a {
  color: inherit;
  text-decoration-color: rgba(36, 87, 197, 0.45);
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--accent);
}

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

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

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

.skip-link {
  position: fixed;
  left: 1rem;
  top: 1rem;
  z-index: 20;
  transform: translateY(-150%);
  background: var(--ink);
  color: white;
  padding: 0.6rem 0.8rem;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem max(1.25rem, calc((100vw - var(--max)) / 2));
  border-bottom: 1px solid transparent;
  background: rgba(247, 244, 238, 0.92);
  backdrop-filter: blur(14px);
}

.site-header.has-shadow {
  border-bottom-color: var(--rule);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-weight: 700;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 2.15rem;
  height: 2.15rem;
  background: var(--ink);
  color: var(--paper);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.82rem;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.site-nav a {
  text-decoration: none;
}

.site-nav .nav-cta {
  color: var(--paper);
  background: var(--ink);
  padding: 0.55rem 0.8rem;
}

.nav-toggle {
  display: none;
  width: 2.4rem;
  height: 2.4rem;
  border: 1px solid var(--rule);
  background: transparent;
  padding: 0.58rem;
}

.nav-toggle span:not(.sr-only) {
  display: block;
  height: 2px;
  background: var(--ink);
  margin: 0.32rem 0;
}

.section {
  width: min(var(--max), calc(100vw - 2rem));
  margin-inline: auto;
  padding-block: 5.5rem;
}

.hero {
  min-height: auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 1rem;
  padding-top: 1.5rem;
  padding-bottom: 2.5rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(15rem, 0.48fr);
  gap: clamp(1.5rem, 3vw, 2.75rem);
  align-items: center;
}

.eyebrow,
.case-meta,
.tag,
.timeline-date,
.archive-domain,
.archive-role,
figcaption,
.proof-point span {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.eyebrow {
  margin: 0 0 0.75rem;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

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

h1 {
  max-width: 18ch;
  margin-bottom: 1rem;
  font-size: var(--step-5);
  line-height: 1.04;
  letter-spacing: 0;
}

h2 {
  max-width: 18ch;
  font-size: var(--step-4);
  line-height: 1.08;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 0.45rem;
  font-size: var(--step-3);
  line-height: 1.15;
  letter-spacing: 0;
}

h4 {
  margin-bottom: 0.75rem;
  font-size: 0.86rem;
  text-transform: uppercase;
}

.hero-summary,
.section-heading p,
.contact-section p,
.about-copy {
  color: var(--muted);
  font-size: var(--step-1);
}

.hero-summary {
  max-width: 42rem;
}

.hero-actions,
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.35rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.85rem;
  padding: 0.72rem 1rem;
  border: 1px solid var(--ink);
  text-decoration: none;
  font-weight: 700;
}

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

.button.secondary {
  background: transparent;
  color: var(--ink);
}

.button:hover,
.site-nav .nav-cta:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.portrait {
  margin: 0;
  width: min(100%, 300px);
  justify-self: end;
}

.portrait img {
  aspect-ratio: 4 / 5;
  width: 100%;
  object-fit: cover;
  object-position: 52% 34%;
  border: 1px solid var(--rule);
}

figcaption {
  display: grid;
  gap: 0.18rem;
  padding-top: 0.8rem;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

figcaption strong {
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.95rem;
  line-height: 1.2;
}

.proof-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--rule);
}

.proof-point {
  min-height: 5.25rem;
  padding: 0.85rem 1rem;
  border-right: 1px solid var(--rule);
}

.proof-point:last-child {
  border-right: 0;
}

.proof-point strong {
  display: block;
  margin-bottom: 0.45rem;
  font-size: var(--step-4);
  line-height: 1;
}

.proof-point span {
  color: var(--muted);
  font-size: 0.78rem;
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(20rem, 1fr);
  gap: 1.5rem 4rem;
  margin-bottom: 3rem;
  border-top: 1px solid var(--ink);
  padding-top: 1.35rem;
}

.section-heading .eyebrow {
  grid-column: 1 / -1;
  margin-bottom: -0.6rem;
}

.section-heading h2 {
  margin-bottom: 0;
}

.case-study-list {
  border-top: 1px solid var(--rule);
}

.case-study {
  display: grid;
  grid-template-columns: 5rem minmax(0, 1fr);
  gap: 1.5rem;
  padding: 2.4rem 0;
  border-bottom: 1px solid var(--rule);
}

.case-index {
  color: var(--accent);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92rem;
  font-weight: 700;
}

.case-title-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(13rem, 0.36fr);
  gap: 1rem;
  align-items: start;
}

.case-meta {
  display: grid;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.78rem;
  text-align: right;
}

.case-summary {
  max-width: 58rem;
  color: var(--muted);
  font-size: var(--step-1);
}

.case-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(16rem, 0.8fr);
  gap: 1.5rem 4rem;
  margin-top: 1.7rem;
}

ul {
  margin: 0;
  padding-left: 1.1rem;
}

li + li {
  margin-top: 0.5rem;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.42rem;
  margin-top: 1.4rem;
}

.tag {
  border: 1px solid var(--rule);
  background: rgba(255, 254, 250, 0.62);
  padding: 0.28rem 0.48rem;
  color: var(--muted);
  font-size: 0.72rem;
}

.archive-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.filter-button {
  min-height: 2.35rem;
  border: 1px solid var(--rule);
  background: transparent;
  color: var(--ink);
  padding: 0.45rem 0.7rem;
  cursor: pointer;
  font: inherit;
  font-size: 0.88rem;
}

.filter-button[aria-pressed="true"] {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}

.archive-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--rule);
  border-left: 1px solid var(--rule);
}

.archive-item {
  min-height: 18rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.4rem;
  padding: 1.1rem;
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  background: rgba(255, 254, 250, 0.34);
}

.archive-item p {
  color: var(--muted);
}

.archive-item h3,
.timeline-item h3,
.capability-group h3 {
  font-size: var(--step-2);
  line-height: 1.18;
}

.archive-domain,
.archive-role {
  margin-bottom: 0.75rem;
  font-size: 0.72rem;
}

.timeline {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--rule);
}

.timeline-item {
  display: grid;
  grid-template-columns: 14rem minmax(0, 1fr);
  gap: 2rem;
  padding: 1.55rem 0;
  border-bottom: 1px solid var(--rule);
}

.timeline-item p {
  color: var(--muted);
}

.timeline-item .company {
  margin-bottom: 0.45rem;
  color: var(--accent-dark);
  font-weight: 700;
}

.timeline-date {
  color: var(--muted);
  font-size: 0.78rem;
}

.capability-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border-top: 1px solid var(--rule);
  border-left: 1px solid var(--rule);
}

.capability-group {
  padding: 1.2rem;
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.about-section,
.contact-section {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(20rem, 1fr);
  gap: 4rem;
  border-top: 1px solid var(--ink);
}

.about-section .section-heading {
  display: block;
  margin: 0;
  border: 0;
  padding: 0;
}

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

.contact-section {
  align-items: center;
  margin-bottom: 2rem;
  background: var(--ink);
  color: var(--paper);
  padding-inline: clamp(1.2rem, 4vw, 3rem);
}

.contact-section p,
.contact-section .eyebrow {
  color: #c8d6ff;
}

.contact-section h2 {
  max-width: 20ch;
  font-size: 1.95rem;
}

.contact-actions {
  justify-content: flex-end;
}

.contact-section .button {
  border-color: rgba(255, 255, 255, 0.4);
  color: var(--paper);
}

.contact-section .button.primary {
  background: var(--paper);
  color: var(--ink);
  border-color: var(--paper);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  width: min(var(--max), calc(100vw - 2rem));
  margin: 0 auto;
  padding: 1.5rem 0 2.5rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.88rem;
}

@media (max-width: 880px) {
  .nav-toggle {
    display: block;
  }

  .site-nav {
    position: absolute;
    inset: calc(100% + 1px) 0 auto 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.75rem 1rem 1rem;
    border-bottom: 1px solid var(--rule);
    background: var(--bg);
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a {
    padding: 0.8rem 0;
  }

  .site-nav .nav-cta {
    text-align: center;
    padding: 0.8rem;
  }

  .hero-grid,
  .section-heading,
  .case-title-row,
  .case-columns,
  .about-section,
  .contact-section {
    grid-template-columns: 1fr;
  }

  .hero-grid {
    display: contents;
  }

  .hero-copy {
    order: 1;
  }

  .proof-strip {
    order: 2;
  }

  .portrait {
    order: 3;
  }

  .hero {
    min-height: auto;
    padding-top: 1.5rem;
    padding-bottom: 2.5rem;
  }

  h1 {
    max-width: 18ch;
    font-size: 2.35rem;
  }

  h2 {
    font-size: 1.95rem;
  }

  h3 {
    font-size: 1.35rem;
  }

  .portrait {
    width: min(100%, 14rem);
    justify-self: start;
  }

  .proof-strip,
  .archive-grid,
  .capability-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .case-study {
    grid-template-columns: 1fr;
  }

  .case-index {
    margin-bottom: -0.8rem;
  }

  .case-meta {
    text-align: left;
  }

  .timeline-item {
    grid-template-columns: 1fr;
    gap: 0.4rem;
  }

  .contact-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  .section {
    width: min(100% - 1rem, var(--max));
    padding-block: 4rem;
  }

  .site-header {
    padding-inline: 0.75rem;
  }

  .brand span:last-child {
    display: none;
  }

  h1 {
    font-size: 1.95rem;
    line-height: 1.08;
  }

  h2 {
    font-size: 1.75rem;
  }

  .hero-summary,
  .section-heading p,
  .contact-section p,
  .about-copy {
    font-size: 0.96rem;
  }

  .hero-actions {
    gap: 0.55rem;
    margin-top: 1rem;
  }

  .button {
    min-height: 2.5rem;
    padding: 0.58rem 0.78rem;
    font-size: 0.92rem;
  }

  .proof-point strong {
    font-size: 1.45rem;
  }

  .proof-point {
    min-height: 4.4rem;
    padding: 0.7rem 0.8rem;
  }

  .portrait {
    width: min(100%, 11rem);
  }

  .archive-item h3,
  .timeline-item h3,
  .capability-group h3 {
    font-size: 1.12rem;
  }

  .proof-strip,
  .archive-grid,
  .capability-grid {
    grid-template-columns: 1fr;
  }

  .proof-strip {
    grid-template-columns: repeat(2, 1fr);
  }

  .proof-point {
    border-right: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
  }

  .proof-point:nth-child(2n) {
    border-right: 0;
  }

  .proof-point:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  figcaption,
  .site-footer {
    flex-direction: column;
  }

  .archive-item {
    min-height: 15rem;
  }
}

@media print {
  body {
    background: white;
    color: black;
  }

  body::before,
  .site-header,
  .archive-controls,
  .portrait,
  .hero-actions,
  .contact-actions {
    display: none;
  }

  .section,
  .hero {
    width: auto;
    min-height: 0;
    padding: 1rem 0;
  }

  .case-study,
  .timeline-item,
  .section-heading,
  .about-section,
  .contact-section {
    display: block;
  }

  .contact-section {
    background: white;
    color: black;
  }
}
