:root {
  --stone: #f5f3ec;
  --linen: #eae7dd;
  --paper: #fcfbf7;
  --ink: #161e27;
  --ink-soft: #384350;
  --ink-muted: #586370;
  --rule-light: rgba(22, 30, 39, 0.14);
  --accent-light: #1e3a5f;

  --slate-dark: #111923;
  --slate-elev: #182331;
  --cream: #f5f3ec;
  --cream-soft: #d5d2c8;
  --cream-muted: #9aa4b0;
  --rule-dark: rgba(203, 176, 132, 0.22);
  --brass: #cbb084;

  --max-w: 1320px;
  --gutter: clamp(1.25rem, 4vw, 3.25rem);
}

[data-theme="dark"] {
  --stone: #111923;
  --linen: #16202c;
  --paper: #182331;
  --ink: #f5f3ec;
  --ink-soft: #d5d2c8;
  --ink-muted: #9aa4b0;
  --rule-light: rgba(203, 176, 132, 0.2);
  --accent-light: #cbb084;
}

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

html {
  scroll-behavior: smooth;
  color-scheme: light;
}

[data-theme="dark"] {
  color-scheme: dark;
}

body {
  margin: 0;
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--stone);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  font-variant-numeric: tabular-nums;
}

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

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

code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.86em;
  padding: 1px 5px;
  border: 1px solid var(--rule-light);
  border-radius: 2px;
}

.band-dark code {
  border-color: var(--rule-dark);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--stone);
  font-weight: 600;
  z-index: 100;
}

.skip-link:focus {
  left: 16px;
  top: 16px;
}

.container {
  width: min(var(--max-w), calc(100% - (var(--gutter) * 2)));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--stone) 92%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rule-light);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  gap: 24px;
}

.brand {
  font-family: 'Instrument Serif', serif;
  font-size: 1.55rem;
  font-weight: 400;
  letter-spacing: -0.02em;
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
}

.brand-sub {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--ink-muted);
}

.nav-links a {
  padding: 8px 0;
  border-bottom: 1px solid transparent;
  transition: color 0.18s ease, border-color 0.18s ease;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--ink);
  border-bottom-color: var(--accent-light);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.theme-btn {
  min-width: 44px;
  min-height: 44px;
  padding: 0 12px;
  background: transparent;
  border: 1px solid var(--rule-light);
  border-radius: 2px;
  color: var(--ink-soft);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}

.theme-btn:hover {
  border-color: var(--ink);
  color: var(--ink);
}

/* Sharp Architectural Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 24px;
  border-radius: 0;
  font-family: 'Manrope', sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.12s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--ink);
  color: var(--stone);
  border-color: var(--ink);
}

.btn-primary:hover {
  background: var(--accent-light);
  border-color: var(--accent-light);
}

[data-theme="dark"] .btn-primary:hover {
  color: #111923;
}

.btn-brass {
  background: var(--brass);
  color: #111923;
  border-color: var(--brass);
}

.btn-brass:hover {
  background: #d8c098;
  border-color: #d8c098;
}

.btn-hairline {
  background: transparent;
  color: var(--ink);
  border-color: var(--rule-light);
}

.btn-hairline:hover {
  border-color: var(--ink);
}

.band-dark .btn-hairline {
  color: var(--cream);
  border-color: var(--rule-dark);
}

.band-dark .btn-hairline:hover {
  border-color: var(--brass);
  color: var(--brass);
}

.text-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink);
  border-bottom: 1px solid var(--rule-light);
  transition: border-color 0.2s, color 0.2s;
}

.text-link:hover {
  border-bottom-color: var(--accent-light);
  color: var(--accent-light);
}

/* Typography */
h1, h2, h3 {
  font-family: 'Instrument Serif', serif;
  font-weight: 400;
  margin: 0;
  line-height: 1.08;
  letter-spacing: -0.025em;
}

h1 em, h2 em {
  font-style: italic;
  color: var(--accent-light);
}

.band-dark h1 em,
.band-dark h2 em {
  color: var(--brass);
}

.eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 18px;
}

.band-dark .eyebrow {
  color: var(--brass);
}

/* Band 1: Asymmetric Editorial Hero */
.hero {
  padding: clamp(2rem, 3.8vw, 3.25rem) 0 0;
  background: var(--stone);
}

.hero-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: center;
  padding-bottom: clamp(2.25rem, 4.5vw, 3.5rem);
}

.hero-copy {
  grid-column: span 6;
}

.hero-copy h1 {
  font-size: clamp(2.65rem, 5vw, 4.35rem);
  line-height: 1.04;
  margin-bottom: 24px;
}

.hero-lead {
  font-size: 1.04rem;
  color: var(--ink-soft);
  max-width: 56ch;
  margin: 0 0 30px;
}

.hero-lead strong {
  color: var(--ink);
  font-weight: 600;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
}

.hero-media {
  grid-column: span 6;
}

.editorial-frame {
  border: 1px solid var(--rule-light);
  background: var(--linen);
  overflow: hidden;
}

.editorial-frame img {
  width: 100%;
  aspect-ratio: 16 / 10;
  max-height: 430px;
  object-fit: cover;
}

.editorial-caption {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-top: 1px solid var(--rule-light);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

/* Provenance Strip */
.provenance-strip {
  background: var(--linen);
  border-top: 1px solid var(--rule-light);
  border-bottom: 1px solid var(--rule-light);
}

.provenance-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.prov-cell {
  padding: 22px 24px 22px 0;
  border-right: 1px solid var(--rule-light);
}

.prov-cell:not(:first-child) {
  padding-left: 24px;
}

.prov-cell:last-child {
  border-right: none;
  padding-right: 0;
}

.prov-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 6px;
}

.prov-title {
  font-size: 0.96rem;
  font-weight: 600;
  color: var(--ink);
}

/* Alternating Architectural Bands */
.band {
  padding: clamp(4rem, 8vw, 6.5rem) 0;
}

.band-stone {
  background: var(--stone);
  border-bottom: 1px solid var(--rule-light);
}

.band-linen {
  background: var(--linen);
  border-bottom: 1px solid var(--rule-light);
}

.band-dark {
  background: var(--slate-dark);
  color: var(--cream);
  border-bottom: 1px solid var(--rule-dark);
}

/* Band 2: Industry Experience & Customer Delivery */
.industry-intro {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: end;
  padding-bottom: 44px;
  border-bottom: 1px solid var(--rule-dark);
}

.industry-intro-copy {
  grid-column: span 7;
}

.industry-intro-copy h2 {
  font-size: clamp(2.1rem, 3.8vw, 3.25rem);
  margin-bottom: 16px;
}

.industry-intro-copy p {
  margin: 0;
  max-width: 60ch;
  color: var(--cream-soft);
  font-size: 0.98rem;
}

.industry-intro-plate {
  grid-column: span 5;
  border: 1px solid var(--rule-dark);
}

.industry-intro-plate img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

/* Filter Underline Bar */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  padding: 20px 0;
  border-bottom: 1px solid var(--rule-dark);
}

.filter-tab {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 10px 0;
  min-height: 44px;
  font-family: 'Manrope', sans-serif;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--cream-muted);
  cursor: pointer;
  transition: color 0.18s ease, border-color 0.18s ease;
}

.filter-tab:hover {
  color: var(--cream);
}

.filter-tab.active {
  color: var(--cream);
  border-bottom-color: var(--brass);
}

/* Industry Delivery Ledger Rows */
.ledger {
  display: grid;
}

.ledger-row {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 24px;
  padding: 34px 0;
  border-bottom: 1px solid var(--rule-dark);
  transition: opacity 0.25s ease;
}

.ledger-row.hidden {
  display: none;
}

.ledger-sector {
  grid-column: span 4;
}

.ledger-index {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  color: var(--brass);
  margin-bottom: 8px;
}

.ledger-sector h3 {
  font-size: clamp(1.5rem, 2.2vw, 1.95rem);
  color: var(--cream);
  margin-bottom: 10px;
}

.ledger-context {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--cream-muted);
  line-height: 1.5;
}

.ledger-delivery {
  grid-column: span 8;
  display: grid;
  gap: 14px;
}

.ledger-lead {
  margin: 0;
  font-size: 1rem;
  color: var(--cream);
  max-width: 66ch;
}

.ledger-list {
  margin: 0;
  padding-left: 18px;
  color: var(--cream-soft);
  font-size: 0.92rem;
  display: grid;
  gap: 8px;
  max-width: 68ch;
}

.ledger-list strong {
  color: var(--cream);
  font-weight: 600;
}

.ledger-stack {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--cream-muted);
  padding-top: 6px;
}

/* Band 3: Permanent Career History */
.section-header-split {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 24px;
  align-items: end;
  padding-bottom: 36px;
  border-bottom: 1px solid var(--rule-light);
}

.section-header-split h2 {
  grid-column: span 6;
  font-size: clamp(2rem, 3.6vw, 3.1rem);
}

.section-header-split p {
  grid-column: span 6;
  margin: 0;
  color: var(--ink-soft);
  max-width: 58ch;
  font-size: 0.96rem;
}

.career-row {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 24px;
  padding: 28px 0;
  border-bottom: 1px solid var(--rule-light);
}

.career-meta {
  grid-column: span 4;
}

.career-dates {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: var(--accent-light);
  font-weight: 500;
}

.career-company {
  font-family: 'Instrument Serif', serif;
  font-size: 1.55rem;
  margin: 6px 0 4px;
  line-height: 1.15;
}

.career-type {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.73rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.career-body {
  grid-column: span 8;
}

.career-role {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 10px;
}

.career-bullets {
  margin: 0;
  padding-left: 18px;
  color: var(--ink-soft);
  font-size: 0.93rem;
  display: grid;
  gap: 7px;
  max-width: 68ch;
}

.career-bullets strong {
  color: var(--ink);
  font-weight: 600;
}

.credentials-bar {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  padding-top: 28px;
}

.cred-item {
  font-size: 0.92rem;
  color: var(--ink-soft);
}

.cred-item strong {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 4px;
}

/* Band 4: Practice / How We Work */
.practice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--rule-light);
  border-left: 1px solid var(--rule-light);
  margin-top: 36px;
}

.practice-cell {
  padding: 32px;
  background: var(--paper);
  border-right: 1px solid var(--rule-light);
  border-bottom: 1px solid var(--rule-light);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.practice-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.74rem;
  color: var(--accent-light);
  letter-spacing: 0.1em;
}

.practice-cell h3 {
  font-size: 1.55rem;
}

.practice-cell p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.93rem;
  max-width: 56ch;
}

.practice-foot {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--rule-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.76rem;
  color: var(--ink-muted);
}

.practice-foot a {
  color: var(--ink);
  border-bottom: 1px solid var(--rule-light);
}

.practice-foot a:hover {
  color: var(--accent-light);
  border-bottom-color: var(--accent-light);
}

/* Band 5: Technical Disciplines & FAQ */
.discipline-row {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 20px;
  padding: 20px 0;
  border-bottom: 1px solid var(--rule-light);
  align-items: baseline;
}

.discipline-name {
  grid-column: span 4;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink);
  font-weight: 600;
}

.discipline-items {
  grid-column: span 8;
  color: var(--ink-soft);
  font-size: 0.94rem;
}

.faq-wrap {
  margin-top: 56px;
}

.faq-item {
  border-bottom: 1px solid var(--rule-light);
}

.faq-item summary {
  cursor: pointer;
  padding: 22px 0;
  font-family: 'Instrument Serif', serif;
  font-size: 1.45rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: '+';
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.1rem;
  color: var(--accent-light);
}

.faq-item[open] summary::after {
  content: '−';
}

.faq-item p {
  margin: 0 0 22px;
  max-width: 65ch;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

/* Band 6: Contact & Footer */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(2rem, 4vw, 4rem);
  align-items: start;
}

.contact-left {
  grid-column: span 7;
}

.contact-portrait-row {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
}

.portrait {
  width: 84px;
  height: 84px;
  object-fit: cover;
  object-position: center top;
  border: 1px solid var(--rule-dark);
}

.contact-left h2 {
  font-size: clamp(2.1rem, 3.8vw, 3.2rem);
  margin-bottom: 18px;
}

.contact-left p {
  margin: 0 0 28px;
  max-width: 56ch;
  color: var(--cream-soft);
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.contact-channels {
  grid-column: span 5;
  border-top: 1px solid var(--rule-dark);
}

.channel-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 54px;
  padding: 12px 0;
  border-bottom: 1px solid var(--rule-dark);
  font-size: 0.94rem;
  transition: color 0.18s ease, padding-left 0.18s ease;
}

.channel-row:hover {
  color: var(--brass);
  padding-left: 6px;
}

.channel-row span {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.76rem;
  color: var(--cream-muted);
}

.channel-row:hover span {
  color: var(--brass);
}

footer.site-footer {
  background: var(--slate-dark);
  color: var(--cream-muted);
  padding: 28px 0 42px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.76rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

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

.footer-links a:hover {
  color: var(--brass);
}

.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 12px 18px;
  background: var(--slate-dark);
  color: var(--cream);
  border: 1px solid var(--brass);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.2s, transform 0.2s;
  z-index: 90;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 960px) {
  .hero-copy,
  .hero-media,
  .industry-intro-copy,
  .industry-intro-plate,
  .ledger-sector,
  .ledger-delivery,
  .section-header-split h2,
  .section-header-split p,
  .career-meta,
  .career-body,
  .discipline-name,
  .discipline-items,
  .contact-left,
  .contact-channels {
    grid-column: span 12;
  }

  .provenance-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .prov-cell {
    padding: 18px 0;
    border-right: none;
    border-bottom: 1px solid var(--rule-light);
  }

  .prov-cell:not(:first-child) {
    padding-left: 0;
  }

  .practice-grid,
  .credentials-bar {
    grid-template-columns: 1fr;
  }

  .nav-links {
    display: none;
  }
}

@media (max-width: 600px) {
  .provenance-grid {
    grid-template-columns: 1fr;
  }
  .practice-cell {
    padding: 24px 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
  }
}
