/*
Theme Name: Brett Parker Portfolio
Theme URI: https://brettparker.xyz
Author: Brett Parker
Author URI: https://brettparker.xyz
Description: Production WordPress theme for Brett Parker - AI Engineer, Data Architect, and Production Systems Specialist.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 8.0
License: Proprietary
Text Domain: brett-parker-portfolio
*/

/* Tailwind Base Properties */

:root {
  --z0: #dce0e5;
  --z1: #e6e9ed;
  --z2: #f5f6f8;
  --z3: #fcfcfd;
  --ink: #23272b;
  --body: #3c4247;
  --muted: #586067;
  --teal: #0f766e;
  --teal-deep: #0b5f59;
  --orange: #c2410c;
  --orange-text: #a8380a;
  --amber: #8d4707;
  --rule: #aeb6bd;
  --rule-strong: #6f7a85;
  --graphite: #262a2e;
  --on-graphite: var(--z1);
  --on-graphite-muted: #a7b0b8;
  --tint-teal: #eff3f2;
  --tint-amber: #f3efeb;
  --tint-orange: #f2eeea;
  --lattice-ink: 35, 39, 43;
  --lattice-alpha: 0.1;
  --lattice-spacing: 24px;
  --bg: var(--z1);
  --bg-alt: var(--z0);
  --paper: var(--z2);
  --border: var(--rule);
  --border-dark: var(--rule-strong);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  isolation: isolate;
  min-width: 320px;
  margin: 0;
  background: var(--bg);
  color: var(--body);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  transform: translateY(-160%);
  border: 1px solid var(--border-dark);
  background: var(--paper);
  font-weight: 700;
}

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

.site-header {
  position: sticky;
  z-index: 30;
  top: 0;
  border-bottom: 1px solid var(--border);
  background: rgba(230, 233, 237, 0.94);
  backdrop-filter: blur(12px);
}

.nav-shell {
  display: flex;
  width: min(1200px, calc(100% - 40px));
  min-height: 76px;
  margin: 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--graphite);
  background: var(--graphite);
  color: var(--on-graphite);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 0.96rem;
  letter-spacing: -0.015em;
}

.brand small {
  margin-top: 1px;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  color: #4d555d;
  font-size: 0.88rem;
  font-weight: 650;
}

.primary-nav a:not(.nav-cta) {
  padding-block: 10px;
  border-bottom: 1px solid transparent;
}

.primary-nav a:not(.nav-cta):hover,
.primary-nav a[aria-current="page"]:not(.nav-cta) {
  border-color: var(--teal);
  color: var(--ink);
}

.mobile-menu {
  display: none;
}

.nav-cta {
  padding: 10px 14px;
  border: 1px solid var(--teal);
  background: var(--teal);
  color: var(--z3);
}

.hero {
  position: relative;
  display: grid;
  width: min(1200px, calc(100% - 40px));
  min-height: calc(100svh - 76px);
  margin: 0 auto;
  padding: clamp(74px, 10vw, 128px) 0 38px;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-content: center;
  column-gap: 24px;
  row-gap: 54px;
}

.hero-copy {
  grid-column: 1 / span 7;
}

.kicker,
.system-label,
.stage-number {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

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

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

h1 {
  max-width: 760px;
  margin-bottom: 26px;
  color: var(--ink);
  font-size: clamp(2.65rem, 5vw, 4.55rem);
  line-height: 0.99;
  letter-spacing: -0.06em;
}

h1 span {
  color: var(--teal-deep);
}

.hero-subtitle {
  max-width: 65ch;
  margin-bottom: 34px;
  color: var(--body);
  font-size: clamp(1.02rem, 1.5vw, 1.18rem);
  line-height: 1.72;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 12px 17px;
  border: 1px solid var(--teal);
  font-size: 0.9rem;
  font-weight: 750;
}

.button-primary {
  background: var(--teal);
  color: var(--z3);
}

.button-primary:hover,
.nav-cta:hover {
  border-color: var(--teal-deep);
  background: var(--teal-deep);
}

.button-secondary {
  background: var(--paper);
  color: var(--teal-deep);
}

.button-secondary:hover {
  background: var(--tint-teal);
}

.scroll-link {
  display: inline-block;
  margin-top: 26px;
  color: var(--body);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.76rem;
  font-weight: 650;
}

.scroll-link:hover {
  color: var(--ink);
}

.hero-system {
  position: relative;
  grid-column: 9 / -1;
  align-self: center;
  min-height: 460px;
  padding: 20px;
  overflow: hidden;
  border: 1px solid var(--border-dark);
  background-color: var(--paper);
  background-image: radial-gradient(
    circle at center,
    rgba(var(--lattice-ink), var(--lattice-alpha)) 0 1px,
    transparent 1.4px
  );
  background-size: 24px 24px;
}

.system-label {
  display: inline-block;
  padding: 6px 8px;
  border: 1px solid var(--border);
  background: var(--z3);
  color: var(--muted);
}

.system-track {
  display: flex;
  height: 345px;
  flex-direction: column;
  justify-content: center;
  padding: 12px 20px;
}

.system-node {
  position: relative;
  display: grid;
  padding: 16px 16px 15px 52px;
  border: 1px solid;
  background: var(--z3);
}

.system-node > span {
  position: absolute;
  top: 16px;
  left: 16px;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.66rem;
}

.system-node strong {
  color: var(--ink);
  font-size: 0.9rem;
}

.system-node small {
  margin-top: 2px;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.68rem;
}

.deterministic {
  border-color: var(--teal);
  box-shadow: inset 4px 0 0 var(--teal);
}

.probabilistic {
  border-style: dashed;
  border-color: var(--amber);
}

.human-gate {
  border-color: var(--orange);
  box-shadow: inset 4px 0 0 var(--orange);
}

.system-connector {
  position: relative;
  height: 35px;
  margin-left: 31px;
  border-left: 1px solid var(--border-dark);
}

.system-connector::after {
  position: absolute;
  bottom: 0;
  left: -4px;
  width: 7px;
  height: 7px;
  content: '';
  transform: rotate(45deg);
  border-right: 1px solid var(--border-dark);
  border-bottom: 1px solid var(--border-dark);
}

.system-connector span {
  position: absolute;
  top: 9px;
  left: 10px;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.58rem;
  letter-spacing: 0.04em;
}

.system-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.57rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 4px;
  border-radius: 50%;
}

.dot-teal,
.proof-pulse {
  background: var(--teal);
}

.dot-orange {
  background: var(--orange);
}

.hero-proof {
  display: flex;
  grid-column: 1 / -1;
  align-items: center;
  gap: 12px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  color: var(--body);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.72rem;
}

.hero-proof p {
  margin: 0;
}

.proof-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.coord-field {
  position: absolute;
  z-index: 0;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  -webkit-mask-image: var(--lattice-mask);
  mask-image: var(--lattice-mask);
}

.coord-field::before {
  position: absolute;
  inset: 0;
  content: '';
  background-image: radial-gradient(
    circle at center,
    rgba(var(--lattice-ink), var(--lattice-alpha)) 0 1px,
    transparent 1.4px
  );
  background-size: var(--lattice-spacing) var(--lattice-spacing);
}

.coord-field[data-lattice='canvas']::before {
  opacity: 0;
}

.coord-field__canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.coord-field--site {
  position: fixed;
  z-index: -1;
  --lattice-mask: none;
}

.coord-field--hero {
  --lattice-mask: linear-gradient(
    to right,
    rgba(35, 39, 43, 0.35) 0,
    rgba(35, 39, 43, 0.06) 12%,
    rgba(35, 39, 43, 0.06) 52%,
    rgba(35, 39, 43, 0.9) 66%,
    rgba(35, 39, 43, 1) 100%
  );
}

.coord-field--cta {
  --lattice-mask: linear-gradient(
    to right,
    transparent 0 44%,
    rgba(35, 39, 43, 0.55) 62%,
    rgba(35, 39, 43, 1) 82%
  );
}

.coord-field--case-hero {
  --lattice-mask: linear-gradient(
    to bottom,
    rgba(35, 39, 43, 0.1) 0,
    rgba(35, 39, 43, 0.1) 55%,
    rgba(35, 39, 43, 0.85) 80%,
    rgba(35, 39, 43, 1) 100%
  );
}

.hero > :not(.coord-field),
.closing-cta > :not(.coord-field),
.case-hero > :not(.coord-field) {
  position: relative;
  z-index: 1;
}

.evolution {
  padding: clamp(78px, 9vw, 120px) max(20px, calc((100vw - 1200px) / 2));
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
}

.section-intro {
  display: grid;
  margin-bottom: 48px;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 24px;
}

.section-intro .kicker {
  grid-column: 1 / span 4;
  padding-top: 9px;
}

.section-intro h2 {
  grid-column: 5 / -1;
  margin: 0;
  color: var(--ink);
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.05;
  letter-spacing: -0.045em;
}

.evolution-grid {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--border-dark);
}

.evolution-grid li {
  position: relative;
  display: flex;
  min-height: 160px;
  padding: 28px 18px 24px 0;
  flex-direction: column;
  border-right: 1px solid var(--border);
}

.evolution-grid li:not(:first-child) {
  padding-left: 22px;
}

.evolution-grid li:last-child {
  border-right: 0;
}

.evolution-grid li::before {
  position: absolute;
  top: -5px;
  left: 0;
  width: 9px;
  height: 9px;
  content: '';
  border: 2px solid var(--bg-alt);
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 1px var(--teal);
}

.stage-number {
  margin-bottom: 29px;
  color: var(--muted);
}

.evolution-grid strong {
  color: var(--ink);
  font-size: 1rem;
}

.evolution-grid small {
  margin-top: 7px;
  color: var(--muted);
  font-size: 0.77rem;
}

.section-shell,
.inner-page,
.case-study {
  width: min(1200px, calc(100% - 40px));
  margin-inline: auto;
}

.section-shell {
  padding-block: clamp(82px, 9vw, 128px);
}

.section-heading {
  display: grid;
  margin-bottom: 54px;
  grid-template-columns: minmax(0, 7fr) minmax(260px, 4fr);
  align-items: end;
  gap: 8.33%;
}

.section-heading h2,
.philosophy h2,
.closing-cta h2,
.page-intro h1,
.case-hero h1,
.case-section h2,
.conversation-section h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(2rem, 4vw, 3.15rem);
  line-height: 1.06;
  letter-spacing: -0.045em;
}

.section-heading > p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.65;
}

.section-heading .kicker,
.compact-heading .kicker {
  margin-bottom: 18px;
}

.flagships {
  display: grid;
  gap: 24px;
}

.flagships > .section-heading {
  margin-bottom: 30px;
}

.flagship-panel {
  display: grid;
  min-height: 450px;
  grid-template-columns: minmax(0, 8fr) minmax(280px, 4fr);
  border: 1px solid var(--border-dark);
  background: var(--paper);
}

.flagship-inverse {
  background: var(--tint-teal);
}

.flagship-copy {
  display: flex;
  padding: clamp(34px, 5vw, 64px);
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  border-right: 1px solid var(--border);
}

.card-eyebrow {
  margin-bottom: 14px;
  color: var(--teal-deep);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.flagship-copy h3,
.project-card h3,
.foundation-card h3,
.experiment-card h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.55rem, 3vw, 2.4rem);
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.lineage-line {
  margin: 10px 0 0;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.7rem;
  font-weight: 650;
  letter-spacing: 0.025em;
}

.flagship-copy > p:not(.card-eyebrow):not(.lineage-line) {
  max-width: 67ch;
  margin: 22px 0 28px;
  line-height: 1.7;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 13px 20px;
}

.status-badge {
  display: inline-flex;
  width: fit-content;
  min-height: 28px;
  padding: 5px 8px;
  align-items: center;
  border: 1px solid;
  background: var(--z3);
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.64rem;
  font-weight: 750;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.status-verified {
  border-color: var(--teal);
  background: var(--teal);
  color: var(--z3);
}

.status-owner {
  border-color: #66788a;
}

.status-coming {
  border-color: #6654b4;
  background: rgba(102, 84, 180, 0.08);
  color: #52418f;
}

.status-no-ai {
  border: 0;
  background: var(--graphite);
  color: var(--on-graphite);
  clip-path: polygon(7px 0, 100% 0, 100% 100%, 0 100%, 0 7px);
}

.stack-line {
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.7rem;
  line-height: 1.4;
}

.text-link {
  display: inline-flex;
  width: fit-content;
  margin-top: 30px;
  align-items: center;
  gap: 13px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--teal);
  color: var(--teal-deep);
  font-size: 0.86rem;
  font-weight: 750;
}

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

.metrics-rail {
  display: flex;
  padding: clamp(30px, 4vw, 48px);
  flex-direction: column;
  justify-content: center;
  background-image: radial-gradient(
    circle at center,
    rgba(var(--lattice-ink), var(--lattice-alpha)) 0 1px,
    transparent 1.4px
  );
  background-size: 20px 20px;
}

.metrics-rail > p,
.section-number {
  margin-bottom: 26px;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.metrics-rail dl,
.metrics-rail dd {
  margin: 0;
}

.metrics-rail dl {
  display: grid;
  gap: 22px;
}

.metrics-rail dl div {
  padding-bottom: 19px;
  border-bottom: 1px solid var(--border);
}

.metrics-rail dt {
  color: var(--ink);
  font-size: clamp(1.65rem, 3vw, 2.35rem);
  font-weight: 750;
  line-height: 1;
  letter-spacing: -0.04em;
}

.metrics-rail dd {
  margin-top: 7px;
  color: var(--muted);
  font-size: 0.72rem;
}

.metrics-rail > small {
  margin-top: 24px;
  color: var(--orange-text);
  font-size: 0.66rem;
  font-weight: 650;
  line-height: 1.45;
}

.applied-section {
  border-block: 1px solid var(--border);
  background: var(--bg-alt);
}

.compact-heading {
  align-items: end;
}

.compact-heading .text-link {
  justify-self: end;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.project-card {
  position: relative;
  display: flex;
  min-height: 410px;
  padding: 30px;
  flex-direction: column;
  align-items: flex-start;
  border: 1px solid var(--border-dark);
  background: var(--paper);
  transition: transform 150ms ease, border-color 150ms ease;
}

.project-card:hover {
  transform: translateY(-2px);
  border-color: var(--graphite);
  background: var(--z3);
}

.project-card h3 {
  font-size: 1.55rem;
}

.project-card > p:not(.card-eyebrow):not(.lineage-line) {
  margin: 18px 0 26px;
  color: var(--body);
  font-size: 0.91rem;
  line-height: 1.65;
}

.project-card .card-meta {
  display: grid;
  gap: 11px;
  margin-top: auto;
}

.project-card .text-link {
  margin-top: 27px;
}

.level-up-easter-egg {
  position: absolute;
  z-index: 2;
  top: 18px;
  right: 18px;
  padding: 5px 7px;
  border: 1px dotted var(--rule-strong);
  background: transparent;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.64rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  cursor: pointer;
}

.level-up-easter-egg:hover {
  border-color: var(--teal);
  background: var(--tint-teal);
  color: var(--teal-deep);
}

.level-up-project-card .card-eyebrow {
  padding-right: 48px;
}

.level-up-gate-open {
  overflow: hidden;
}

.level-up-gate {
  position: fixed;
  z-index: 120;
  inset: 0;
  display: grid;
  padding: 24px;
  place-items: center;
  overflow-y: auto;
  background: rgba(24, 28, 31, 0.88);
  backdrop-filter: blur(8px);
}

.level-up-gate__dialog {
  position: relative;
  z-index: 1;
  width: min(560px, 100%);
  padding: clamp(30px, 6vw, 54px);
  border: 1px solid #78828b;
  background-color: var(--graphite);
  background-image: radial-gradient(
    circle at center,
    rgba(230, 233, 237, 0.12) 0 1px,
    transparent 1.4px
  );
  background-size: 24px 24px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.38);
  color: var(--on-graphite);
}

.level-up-gate__dialog h2 {
  margin: 0;
  color: var(--z3);
  font-size: clamp(2rem, 8vw, 3.5rem);
  line-height: 1;
  letter-spacing: -0.05em;
  overflow-wrap: anywhere;
}

.level-up-gate__dialog p:not(.gate-kicker):not(.gate-error) {
  margin: 20px 0 26px;
  color: var(--on-graphite-muted);
  line-height: 1.65;
}

.level-up-gate__dialog label {
  display: block;
  margin-bottom: 8px;
  color: var(--on-graphite);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.level-up-gate__dialog input {
  width: 100%;
  min-height: 52px;
  padding: 10px 13px;
  border: 1px solid #8f9aa3;
  border-radius: 0;
  background: #f5f6f8;
  color: var(--ink);
  font: 700 1rem ui-monospace, SFMono-Regular, Menlo, monospace;
}

.level-up-gate__dialog input:focus-visible {
  outline: 3px solid #44b9ad;
  outline-offset: 3px;
}

.level-up-gate__dialog .button {
  margin-top: 18px;
  cursor: pointer;
}

.level-up-gate__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 38px;
  height: 38px;
  border: 1px solid #7e8992;
  background: rgba(38, 42, 46, 0.92);
  color: var(--on-graphite);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.gate-kicker {
  margin: 0 0 17px;
  color: #75d4ca;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.67rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.gate-error {
  margin: 9px 0 0;
  color: #ffb58f;
  font-size: 0.8rem;
  font-weight: 700;
}

.gate-ready {
  display: grid;
}

.future-mount {
  display: grid;
  min-height: 74px;
  margin-top: 12px;
  padding: 13px 16px;
  align-content: center;
  gap: 5px;
  border: 1px dashed #a68367;
  background: rgba(230, 233, 237, 0.06);
}

.future-mount small {
  color: var(--on-graphite-muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.63rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.future-mount strong {
  color: var(--on-graphite);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.85rem;
}

.level-up-gate--rejected { background: #090c13; overflow: hidden; }
.level-up-gate--rejected .level-up-gate__dialog { width: min(760px, 100%); border: 0; background: transparent; box-shadow: none; text-align: center; }
.level-up-gate__close { z-index: 5; }
.gate-failure { --failure-color: #ff9c46; position: relative; isolation: isolate; padding: 30px 0; }
.gate-failure--aliens { --failure-color: #bbaaFF; }
.gate-failure--pixels { --failure-color: #5ef7a0; font-family: ui-monospace, monospace; }
.gate-failure--confetti { --failure-color: #ffa6dc; }
.gate-failure .failure-label { color: var(--failure-color) !important; font: 750 0.8rem ui-monospace, monospace; text-transform: uppercase; letter-spacing: 0.13em; }
.gate-failure #level-up-gate-description { color: #e6e9ed; }
.failure-count { min-height: 180px; display: grid; place-items: center; color: var(--failure-color); font: 800 clamp(7rem, 22vw, 11rem)/1 ui-monospace, monospace; }
.failure-reveal { font: 650 1.2rem/1.6 ui-sans-serif, system-ui; }
.gate-failure .failure-exit { font: 600 0.7rem ui-monospace, monospace; text-transform: uppercase; letter-spacing: 0.1em; }
.failure-orbit { position: absolute; z-index: -1; inset: 10% 10%; display: grid; place-items: center; border: 2px dashed var(--failure-color); border-radius: 50%; opacity: 0.17; animation: failure-orbit 3s linear both; }
.failure-orbit span { font-size: clamp(8rem, 28vw, 18rem); }
.gate-failure--aliens .failure-orbit { border-radius: 50% 50% 10% 10%; animation: failure-invasion 3s ease-in both; }
.gate-failure--pixels .failure-orbit { border-radius: 0; border-style: dotted; animation: failure-pixels 3s steps(6, end) both; }
.gate-failure--confetti .failure-orbit { border-radius: 12%; border-style: solid; animation: failure-windup 3s ease-in both; }
.failure-particles { position: absolute; inset: 50% 50%; pointer-events: none; }
.failure-particles i { position: absolute; width: 9px; height: 9px; background: var(--failure-color); opacity: 0; border-radius: 50%; }
.gate-failure--pixels .failure-particles i { border-radius: 0; }
.gate-failure--aliens .failure-particles i { width: 3px; height: 36px; }
.gate-failure--confetti .failure-particles i { width: 10px; height: 20px; border-radius: 0; background: hsl(calc(var(--particle) * 37) 80% 70%); }
.is-burst .failure-particles i { animation: failure-burst 900ms ease-out both; }
.is-burst .failure-orbit { animation: failure-shockwave 850ms ease-out both; }
.is-burst h2 { color: var(--failure-color); }
@keyframes failure-orbit { from { transform: rotate(-50deg) scale(0.8); } to { transform: rotate(110deg) scale(1.1); } }
@keyframes failure-invasion { from { transform: translateY(-90px) scaleX(0.5); } to { transform: translateY(40px) scaleX(1.2); } }
@keyframes failure-pixels { from { transform: translate(-8px, -12px) rotate(-8deg); } to { transform: translate(8px, 20px) rotate(8deg); } }
@keyframes failure-windup { from { transform: rotate(0) scale(1.1); } to { transform: rotate(-140deg) scale(0.6); } }
@keyframes failure-burst { from { opacity: 1; transform: rotate(calc(var(--particle) * 15deg)) translateX(0) scale(1.5); } to { opacity: 0; transform: rotate(calc(var(--particle) * 15deg)) translateX(var(--distance)) scale(0.3); } }
@keyframes failure-shockwave { from { opacity: 0.3; transform: scale(0.5); } to { opacity: 0; transform: scale(2.2); } }

.level-up-gate.level-up-gate--playing { padding: 0; overflow: hidden; background: #e9edf6; }
.level-up-gate--playing .level-up-gate__dialog { display: flex; flex-direction: column; width: 100%; height: 100dvh; padding: 0; border: 0; background: #e9edf6; }
.level-up-player-bar { display: flex; align-items: center; justify-content: space-between; flex: 0 0 auto; gap: 12px; padding: 12px 20px; background: var(--graphite); }
.level-up-player-bar h2 { font-size: clamp(1rem, 3vw, 1.35rem); letter-spacing: -0.02em; }
.level-up-player-bar .button { margin: 0; padding: 10px 14px; font-size: 0.8rem; }
#level-up-app-mount { flex: 1 1 auto; width: 100%; min-height: 0; border: 0; background: #e9edf6; }
.level-up-loading { color: var(--ink) !important; text-align: center; }

.level-up-drip > .site-header,
.level-up-drip > main,
.level-up-drip > .site-footer {
  transform-origin: 50% 100%;
  animation: level-up-page-drip 900ms cubic-bezier(0.64, 0, 0.78, 0) 1 both;
  pointer-events: none;
}

.level-up-drip > .skip-link {
  opacity: 0;
  pointer-events: none;
}


@keyframes level-up-page-drip {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
    clip-path: inset(0 0 0 0);
  }
  58% {
    opacity: 0.82;
    transform: translateY(20vh) scaleX(0.985) scaleY(1.08);
    filter: blur(1px);
    clip-path: inset(0 1.5% 0 1.5% round 0 0 28px 28px);
  }
  100% {
    opacity: 0;
    transform: translateY(112vh) scaleX(0.9) scaleY(1.22);
    filter: blur(8px);
    clip-path: inset(0 8% 0 8% round 0 0 80px 80px);
  }
}

.operations-section {
  border-bottom: 1px solid var(--border);
}

.operations-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--border-dark);
  background: var(--border);
  gap: 1px;
}

.operations-card {
  display: flex;
  min-height: 350px;
  padding: clamp(28px, 4vw, 44px);
  flex-direction: column;
  align-items: flex-start;
  background: var(--paper);
}

.operations-card h3 {
  margin: 42px 0 0;
  color: var(--ink);
  font-size: 1.55rem;
  line-height: 1.12;
  letter-spacing: -0.035em;
}

.operations-card > p {
  margin: 18px 0 25px;
  line-height: 1.65;
}

.operations-card > .stack-line,
.operations-card > .text-link {
  margin-top: auto;
}

.foundation-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.foundation-card {
  position: relative;
  display: flex;
  min-height: 430px;
  padding: clamp(32px, 5vw, 56px);
  flex-direction: column;
  align-items: flex-start;
  border: 1px solid var(--border-dark);
}

.no-ai-card {
  background: var(--graphite);
  color: var(--on-graphite-muted);
}

.no-ai-card h3,
.no-ai-card .card-eyebrow,
.no-ai-card .text-link {
  color: var(--on-graphite);
}

.no-ai-card .text-link {
  border-color: var(--on-graphite);
}

.prompt-card {
  background: var(--paper);
}

.foundation-icon {
  display: grid;
  width: 48px;
  height: 48px;
  margin-bottom: 70px;
  place-items: center;
  border: 1px solid currentColor;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.86rem;
}

.foundation-card > p:not(.card-eyebrow) {
  margin: 20px 0 24px;
  line-height: 1.65;
}

.foundation-card .text-link {
  margin-top: auto;
}

.philosophy {
  display: grid;
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(90px, 12vw, 160px) max(20px, calc((100vw - 1200px) / 2));
  grid-template-columns: 3fr 7fr;
  align-items: start;
  gap: 8.33%;
  border-top: 1px solid var(--border);
}

.philosophy-number {
  color: var(--teal);
  font-size: clamp(5rem, 12vw, 9rem);
  font-weight: 800;
  line-height: 0.75;
  letter-spacing: -0.08em;
}

.philosophy-path {
  display: grid;
  gap: 8px;
  color: var(--teal-deep);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: clamp(1.35rem, 3vw, 2.6rem);
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1;
}

.philosophy-path span {
  display: flex;
  align-items: center;
  gap: 8px;
}

.philosophy-path span:not(:last-child)::after {
  color: var(--orange);
  content: '↓';
}

.philosophy > div:last-child > p:not(.kicker) {
  max-width: 66ch;
  margin: 27px 0 0;
  font-size: 1.08rem;
  line-height: 1.78;
}

.closing-cta {
  position: relative;
  overflow: hidden;
  padding: clamp(82px, 10vw, 132px) max(20px, calc((100vw - 1200px) / 2));
  border-block: 1px solid var(--border-dark);
  background: var(--paper);
}

.closing-cta h2 {
  max-width: 920px;
}

.closing-cta > p:not(.kicker) {
  max-width: 66ch;
  margin: 24px 0 34px;
  line-height: 1.7;
}

.site-footer {
  display: grid;
  padding: 46px max(20px, calc((100vw - 1200px) / 2));
  grid-template-columns: 2fr 2fr 1fr;
  align-items: end;
  gap: 28px;
  background: var(--graphite);
  color: var(--on-graphite);
  font-size: 0.76rem;
}

.site-footer strong,
.site-footer span {
  display: block;
}

.site-footer strong {
  color: var(--on-graphite);
  font-size: 0.9rem;
}

.site-footer span {
  margin-top: 6px;
  color: var(--on-graphite-muted);
}

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

.footer-links a {
  padding-bottom: 3px;
  border-bottom: 1px solid #7e8891;
}

.footer-status > p {
  margin: 0;
  color: var(--on-graphite-muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.59rem;
  line-height: 1.5;
  text-align: right;
  text-transform: uppercase;
}

.footer-wordmark {
  display: flex;
  margin-bottom: 8px;
  justify-content: flex-end;
  align-items: baseline;
  color: var(--on-graphite);
  font-size: 0.88rem;
  font-weight: 700;
}

.footer-wordmark span,
.footer-wordmark b {
  display: inline;
  margin: 0;
}

.footer-wordmark b {
  color: var(--on-graphite-muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.78rem;
}

.inner-page {
  min-height: 76vh;
  padding-bottom: 120px;
}

.page-intro {
  display: grid;
  padding: clamp(86px, 10vw, 140px) 0 clamp(64px, 8vw, 104px);
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 24px;
}

.page-intro .kicker {
  grid-column: 1 / span 3;
  padding-top: 10px;
}

.page-intro h1 {
  grid-column: 4 / -1;
  font-size: clamp(2.65rem, 6vw, 5rem);
}

.page-lede {
  grid-column: 7 / -1;
  margin-top: 36px;
  font-size: 1.08rem;
  line-height: 1.75;
}

.filter-bar {
  display: flex;
  margin-bottom: 27px;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-bar button {
  min-height: 42px;
  padding: 8px 13px;
  border: 1px solid var(--border-dark);
  background: var(--paper);
  color: var(--body);
  font-family: inherit;
  font-weight: 650;
  cursor: pointer;
}

.filter-bar button:hover,
.filter-bar button.active {
  border-color: var(--teal);
  background: var(--teal);
  color: var(--z3);
}

.status-legend {
  display: grid;
  margin-top: 96px;
  padding: clamp(30px, 5vw, 58px);
  grid-template-columns: 4fr 7fr;
  gap: 8.33%;
  border: 1px solid var(--border-dark);
  background: var(--bg-alt);
}

.status-legend h2 {
  margin: 0;
  color: var(--ink);
  font-size: 2rem;
  letter-spacing: -0.035em;
}

.status-legend dl {
  display: grid;
  margin: 0;
  gap: 17px;
}

.status-legend dl div {
  display: grid;
  padding-bottom: 17px;
  grid-template-columns: 180px 1fr;
  gap: 20px;
  border-bottom: 1px solid var(--border);
}

.status-legend dd {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.6;
}

.legend-note {
  grid-column: 2;
  margin: 25px 0 0;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.55;
}

.experiment-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
}

.experiment-card {
  position: relative;
  border: 1px solid var(--border-dark);
  background: var(--paper);
  overflow: hidden;
}

.experiment-header {
  display: grid;
  padding: clamp(30px, 5vw, 55px);
  grid-template-columns: 110px minmax(0, 1fr);
  gap: clamp(24px, 5vw, 70px);
  align-items: start;
}

.experiment-number {
  margin: 0;
  color: var(--teal-deep);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 3.5rem;
  font-weight: 800;
  letter-spacing: -0.08em;
}

.experiment-header h2 {
  margin: 8px 0 0;
}

.experiment-header > div:last-child > p:not(.card-eyebrow) {
  margin: 23px 0;
  line-height: 1.72;
}

.experiment-header .card-meta {
  margin-top: 24px;
}

.experiment-architecture,
.experiment-flow {
  padding: 34px clamp(30px, 5vw, 55px);
  border-top: 1px solid var(--border-dark);
}

.experiment-architecture {
  display: grid;
  grid-template-columns: 2fr 4fr 5fr;
  gap: 28px;
  align-items: start;
  background: var(--z2);
}

.experiment-architecture h3 {
  margin: 0;
  color: var(--ink);
  font-size: 1.15rem;
  line-height: 1.35;
}

.experiment-architecture > p:last-child {
  margin: 0;
  color: var(--body);
  font-size: 0.86rem;
  line-height: 1.68;
}

.experiment-flow ol {
  display: grid;
  margin: 20px 0 0;
  padding: 0;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  border: 1px solid var(--border);
  list-style: none;
}

.experiment-flow li {
  min-height: 150px;
  padding: 18px;
  border-right: 1px solid var(--border);
  background: var(--z3);
}

.experiment-flow li:last-child {
  border-right: 0;
}

.experiment-flow li span {
  display: block;
  color: var(--teal-deep);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.65rem;
  font-weight: 780;
}

.experiment-flow li p {
  margin: 26px 0 0;
  color: var(--ink);
  font-size: 0.78rem;
  line-height: 1.45;
}

.experiment-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border-top: 1px solid var(--border-dark);
}

.experiment-detail-grid section {
  min-height: 220px;
  padding: 32px clamp(30px, 5vw, 55px);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.experiment-detail-grid section:nth-child(2n) {
  border-right: 0;
}

.experiment-detail-grid section:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.experiment-detail-grid section > p:last-child,
.experiment-lineage > p:last-child {
  margin: 16px 0 0;
  color: var(--body);
  font-size: 0.86rem;
  line-height: 1.68;
}

.experiment-lineage {
  padding: 28px clamp(30px, 5vw, 55px);
  border-top: 3px solid var(--teal);
  background: var(--tint-teal);
}

@media (max-width: 820px) {
  .experiment-header,
  .experiment-architecture {
    grid-template-columns: 1fr;
  }

  .experiment-header {
    gap: 24px;
  }

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

  .experiment-flow li,
  .experiment-flow li:last-child {
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
  }

  .experiment-flow li:nth-child(2n) {
    border-right: 0;
  }

  .experiment-flow li:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  .experiment-detail-grid {
    grid-template-columns: 1fr;
  }

  .experiment-detail-grid section,
  .experiment-detail-grid section:nth-child(2n),
  .experiment-detail-grid section:nth-last-child(-n + 2) {
    min-height: 0;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .experiment-detail-grid section:last-child {
    border-bottom: 0;
  }
}

.synthetic-frame {
  display: flex;
  min-height: 320px;
  padding: 26px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px dashed var(--amber);
  background-color: var(--tint-amber);
  background-image: radial-gradient(
    circle at center,
    rgba(var(--lattice-ink), var(--lattice-alpha)) 0 1px,
    transparent 1.4px
  );
  background-size: 20px 20px;
  text-align: center;
}

.synthetic-frame span {
  padding: 5px 8px;
  border: 1px dashed var(--amber);
  background: var(--z3);
  color: var(--amber);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.62rem;
  font-weight: 750;
}

.synthetic-frame strong {
  margin-top: 17px;
  color: var(--ink);
}

.synthetic-frame small {
  max-width: 43ch;
  margin-top: 7px;
  color: var(--muted);
  line-height: 1.5;
}

.compact-frame {
  min-height: 210px;
  margin-top: 34px;
}

.folded-note {
  margin-top: 32px;
  padding: 24px 27px;
  border-left: 4px solid var(--teal);
  background: var(--bg-alt);
}

.folded-note strong {
  color: var(--ink);
}

.folded-note p {
  margin: 8px 0 0;
  line-height: 1.6;
}

.case-study {
  padding-bottom: 120px;
}

.case-hero {
  position: relative;
  overflow: hidden;
  display: grid;
  padding: clamp(80px, 10vw, 136px) 0 70px;
  grid-template-columns: minmax(0, 8fr) minmax(260px, 4fr);
  gap: 44px;
}

.case-title > p:not(.kicker):not(.lineage-line) {
  max-width: 66ch;
  margin: 26px 0 30px;
  font-size: 1.08rem;
  line-height: 1.75;
}

.case-title h1 {
  font-size: clamp(3rem, 7vw, 6.2rem);
}

.case-metrics {
  border: 1px solid var(--border-dark);
  background-color: var(--paper);
}

.evidence-callout {
  grid-column: 1 / -1;
  margin-top: 12px;
  padding: 24px 28px;
  border-left: 4px solid var(--teal);
  background: var(--tint-teal);
}

.evidence-callout strong,
.evidence-callout summary {
  color: var(--ink);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.evidence-callout summary { cursor: pointer; line-height: 1.65; }

.evidence-callout p {
  max-width: 106ch;
  margin: 10px 0 0;
  font-size: 0.88rem;
  line-height: 1.65;
}

.case-subnav {
  position: sticky;
  z-index: 20;
  top: 76px;
  display: flex;
  width: 100%;
  margin-inline: 0;
  max-width: 100%;
  min-width: 0;
  padding: 0;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  gap: 0;
  border-block: 1px solid var(--border);
  background: rgba(230, 233, 237, 0.95);
}

.case-subnav a {
  flex: 0 0 auto;
  padding: 14px 17px;
  border-right: 1px solid var(--border);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
}

.case-section {
  padding-block: clamp(78px, 9vw, 124px);
  border-bottom: 1px solid var(--border);
  scroll-margin-top: 130px;
}

.split-section {
  display: grid;
  grid-template-columns: 4fr 7fr;
  gap: 8.33%;
}

.case-section h2,
.conversation-section h2 {
  font-size: clamp(1.9rem, 4vw, 3rem);
}

.prose {
  font-size: 1.05rem;
  line-height: 1.78;
}

.prose p + p {
  margin-top: 24px;
}

.case-timeline {
  display: grid;
  margin: 48px 0 0;
  padding: 0;
  grid-template-columns: repeat(4, 1fr);
  list-style: none;
  border-top: 1px solid var(--border-dark);
}

.case-timeline li {
  min-height: 220px;
  padding: 24px 22px;
  border-right: 1px solid var(--border);
}

.case-timeline li:last-child {
  border-right: 0;
}

.case-timeline li.stage-caution {
  border: 1px dashed var(--amber);
  border-top: 0;
  background: var(--tint-amber);
}

.case-timeline span {
  display: block;
  margin-bottom: 42px;
  color: var(--teal-deep);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.7rem;
  font-weight: 750;
}

.case-timeline strong {
  color: var(--ink);
}

.case-timeline p {
  margin: 11px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.55;
}

.build-list {
  display: grid;
  margin: 0;
  padding: 0;
  gap: 0;
  list-style: none;
}

.build-list li {
  display: grid;
  padding: 22px 0;
  grid-template-columns: 190px 1fr;
  gap: 25px;
  border-bottom: 1px solid var(--border);
}

.build-list strong {
  color: var(--ink);
}

.build-list span {
  line-height: 1.65;
}

.architecture-section .section-heading {
  align-items: start;
}

.architecture-section .status-badge {
  justify-self: end;
}

.architecture-figure {
  margin: 50px 0 0;
}

.architecture-flow {
  display: grid;
  min-height: 240px;
  padding: 38px;
  grid-template-columns: 1.1fr auto 1.1fr auto 1.1fr auto 1.1fr auto 1.1fr;
  align-items: center;
  gap: 11px;
  border: 1px solid var(--border-dark);
  background-color: var(--paper);
  background-image: radial-gradient(
    circle at center,
    rgba(var(--lattice-ink), var(--lattice-alpha)) 0 1px,
    transparent 1.4px
  );
  background-size: 24px 24px;
}

.architecture-flow div {
  display: flex;
  min-height: 104px;
  padding: 15px;
  flex-direction: column;
  justify-content: center;
  border: 1px solid var(--teal);
  background: var(--z3);
}

.architecture-flow div.dashed,
.architecture-flow div.flow-llm,
.architecture-flow div.flow-unknown {
  border-style: dashed;
  border-color: var(--amber);
}

.architecture-flow div.flow-owner-confirmed {
  border-color: #66788a;
  background: var(--z1);
}

.architecture-flow span {
  margin-bottom: 7px;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.57rem;
  text-transform: uppercase;
}

.architecture-flow strong {
  color: var(--ink);
  font-size: 0.76rem;
  line-height: 1.35;
}

.architecture-flow small {
  margin-top: 9px;
  color: var(--amber);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.52rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.architecture-flow .flow-owner-confirmed small {
  color: #526577;
}

.architecture-flow b {
  color: var(--muted);
}

.mobile-flow {
  display: none;
}

.architecture-figure figcaption {
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.72rem;
}

.architecture-figure figcaption strong {
  color: var(--amber);
}

.boundary-grid {
  display: grid;
  margin-top: 50px;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--border-dark);
}

.boundary-grid article {
  min-height: 320px;
  padding: 30px;
  border-right: 1px solid var(--border);
  background: var(--paper);
}

.boundary-grid article:last-child {
  border-right: 0;
}

.boundary-grid .llm-pane {
  background: var(--tint-amber);
}

.boundary-grid .human-pane {
  background: var(--tint-orange);
}

.boundary-chip {
  display: inline-flex;
  padding: 6px 8px;
  border: 1px solid;
  background: var(--z3);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.65rem;
  font-weight: 750;
  text-transform: uppercase;
}

.software-chip { border-color: var(--teal); color: var(--teal-deep); }
.llm-chip { border-color: var(--amber); border-style: dashed; color: var(--amber); }
.human-chip { border-color: var(--orange); color: var(--orange-text); }

.boundary-grid ul {
  display: grid;
  margin: 30px 0 0;
  padding-left: 18px;
  gap: 14px;
  font-size: 0.86rem;
  line-height: 1.5;
}

.outcomes-section {
  display: grid;
  grid-template-columns: 4fr 7fr;
  gap: 8.33%;
}

.outcome-grid {
  display: grid;
  gap: 13px;
}

.outcome-grid article {
  padding: 22px 24px;
  border-left: 3px solid var(--teal);
  background: var(--paper);
}

.outcome-grid strong {
  color: var(--ink);
}

.outcome-grid p {
  margin: 8px 0 0;
  font-size: 0.88rem;
  line-height: 1.65;
}

.conversation-section {
  padding-block: clamp(90px, 11vw, 140px);
}

.conversation-section ol {
  display: grid;
  max-width: 800px;
  margin: 38px 0 45px;
  padding: 0;
  gap: 0;
  list-style-position: inside;
}

.conversation-section li {
  padding: 17px 0;
  border-bottom: 1px solid var(--border);
}

.placeholder-study {
  display: grid;
  grid-template-columns: 4fr 7fr;
  gap: 8.33%;
}

.placeholder-study > div:first-child > p:last-child {
  line-height: 1.7;
}

.owner-confirmed-node {
  padding: 18px 20px;
  border: 1px solid var(--rule-strong);
  background: var(--z2);
}

.owner-confirmed-diagram {
  margin: 16px 0 0;
}

.owner-confirmed-diagram figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.62rem;
}

.owner-confirmed-diagram a {
  border-bottom: 1px solid var(--rule-strong);
}

.case-hero .lineage-line,
.case-hero .stack-line {
  color: var(--body);
}

.owner-confirmed-node small,
.owner-confirmed-node strong {
  display: block;
}

.owner-confirmed-node small {
  margin-bottom: 8px;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.55rem;
  text-transform: uppercase;
}

.owner-confirmed-node strong {
  color: var(--ink);
}

.owner-confirmed-node p {
  margin: 7px 0 0;
  color: var(--body);
  font-size: 0.82rem;
  line-height: 1.55;
}

.principle-grid,
.resume-scope {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--border-dark);
}

.principle-grid article,
.resume-scope > div {
  min-height: 300px;
  padding: 34px;
  border-right: 1px solid var(--border);
  background: var(--paper);
}

.principle-grid article:last-child,
.resume-scope > div:last-child {
  border-right: 0;
}

.principle-grid span {
  display: block;
  margin-bottom: 60px;
  color: var(--teal-deep);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.principle-grid h2,
.resume-scope h2,
.contact-card h2 {
  margin: 0;
  color: var(--ink);
  font-size: 1.5rem;
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.principle-grid p,
.resume-scope p,
.contact-card p {
  margin: 17px 0 0;
  line-height: 1.7;
}

.shared-infrastructure-note {
  margin: 28px 0 0;
  padding: 22px 24px;
  background: var(--z0);
  color: var(--body);
  font-size: 0.86rem;
  line-height: 1.65;
}

.shared-infrastructure-note a {
  border-bottom: 1px solid var(--teal);
  color: var(--teal-deep);
  font-weight: 700;
}

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

.resume-metrics,
.resume-ai-scope {
  margin-top: 24px;
}

.contact-card {
  display: grid;
  padding: clamp(32px, 6vw, 70px);
  grid-template-columns: 7fr 3fr;
  align-items: end;
  gap: 10%;
  border: 1px solid var(--border-dark);
  background: var(--paper);
}

.contact-card .button {
  justify-self: end;
}

.contact-actions {
  display: flex;
  align-items: stretch;
  justify-content: flex-end;
  gap: 10px;
  flex-direction: column;
}

.contact-actions .button,
.contact-actions .text-link {
  justify-self: auto;
}

.contact-panel {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 6fr);
  border: 1px solid var(--border-dark);
  background: var(--paper);
}
.contact-introduction, .contact-form { min-width: 0; padding: clamp(24px, 4vw, 48px); }
.contact-introduction { background: var(--tint-teal); border-right: 1px solid var(--border); }
.contact-panel h2 { margin: 0 0 18px; color: var(--ink); font-size: clamp(1.5rem, 2.5vw, 2rem); line-height: 1.2; letter-spacing: -0.035em; }
.contact-introduction > p:not(.section-number), .contact-form-intro { line-height: 1.7; }
.contact-form-intro { margin-bottom: 24px; }
.contact-linkedin { margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--border); }
.contact-linkedin h3 { margin: 0 0 20px; color: var(--ink); font-size: 1rem; }
.contact-linkedin-badge { width: 100%; min-width: 0; margin-bottom: 20px; }
.contact-linkedin-badge .LI-simple-link { color: var(--teal-deep); text-decoration: underline; text-underline-offset: 3px; }
.contact-linkedin-badge .LI-profile-badge:has(iframe) > .LI-simple-link { display: none; }
.contact-field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.contact-field { display: flex; flex-direction: column; gap: 9px; margin-bottom: 22px; min-width: 0; }
.contact-field label { color: var(--ink); font-size: 0.88rem; font-weight: 650; }
.contact-field label span { color: var(--muted); font-weight: 400; font-size: 0.75rem; }
.contact-field input, .contact-field textarea, .contact-field select {
  width: 100%; min-height: 48px; padding: 12px; border: 1px solid var(--border-dark);
  border-radius: 0; background: var(--z3); color: var(--ink); font: inherit;
}
.contact-field textarea { resize: vertical; line-height: 1.6; }
.contact-field input:focus-visible, .contact-field textarea:focus-visible, .contact-field select:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }
.contact-field small, .contact-privacy { color: var(--muted); font-size: 0.78rem; line-height: 1.6; }
.contact-honeypot { display: none; }
.contact-notice { margin: 16px 0; padding: 14px 16px; border-left: 3px solid var(--border-dark); background: var(--bg); font-size: 0.86rem; line-height: 1.6; }
.contact-error { border-color: var(--orange); }
.contact-success { border-color: var(--teal); background: var(--tint-teal); }
.contact-form button:disabled { background: var(--muted); border-color: var(--muted); cursor: not-allowed; }

@media (max-width: 820px) {
  .contact-panel { grid-template-columns: 1fr; }
  .contact-introduction { border-right: 0; border-bottom: 1px solid var(--border); }
}
@media (max-width: 480px) {
  .contact-field-row { grid-template-columns: 1fr; gap: 0; }
  .contact-panel .button { width: 100%; justify-content: center; }
}

.not-found {
  display: flex;
  width: min(900px, calc(100% - 40px));
  min-height: 72vh;
  margin: 0 auto;
  padding-block: 100px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
}

.not-found h1 {
  max-width: 800px;
}

.not-found > p:not(.kicker) {
  margin: 20px 0 30px;
}

.mobile-menu summary {
  display: flex;
  min-height: 44px;
  padding: 10px 14px;
  align-items: center;
  gap: 16px;
  border: 1px solid var(--border-dark);
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  list-style: none;
  font-size: 0.85rem;
  font-weight: 650;
}

.mobile-menu summary::-webkit-details-marker { display: none; }
.mobile-menu[open] summary span { transform: rotate(45deg); }
.mobile-menu nav {
  position: absolute;
  inset: 100% 0 auto;
  display: grid;
  padding: 16px 20px 24px;
  border-bottom: 1px solid var(--border-dark);
  background: var(--bg);
  box-shadow: 0 18px 28px rgb(35 39 43 / 12%);
}
.mobile-menu nav a {
  min-height: 48px;
  padding: 14px;
  border-bottom: 1px solid var(--border);
  font-size: 1rem;
}
.mobile-menu a[aria-current="page"]:not(.nav-cta) {
  color: var(--teal-deep);
  font-weight: 750;
  background: var(--paper);
}
.mobile-menu .nav-cta { margin-top: 12px; }

.project-preview {
  overflow: hidden;
  width: 100%;
  margin: 24px 0;
  border: 1px solid var(--border);
  background: var(--paper);
}
.project-preview > a { position: relative; display: block; }
.project-preview > a:focus-visible { outline-offset: -4px; }
.project-preview img { display: block; width: 100%; height: auto; }
.preview-enlarge {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 7px 10px;
  border: 1px solid var(--border);
  background: var(--paper);
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 650;
}
.project-preview figcaption { padding: 18px 22px; border-top: 1px solid var(--border); }
.preview-label { display: block; color: var(--teal-deep); font: 650 0.68rem ui-monospace, monospace; text-transform: uppercase; letter-spacing: 0.04em; }
.project-preview figcaption strong { display: block; margin-top: 10px; color: var(--ink); font-size: 1.15rem; }
.project-preview figcaption p { max-width: 80ch; margin: 8px 0 0; font-size: 0.9rem; line-height: 1.65; }
.project-preview-compact figcaption { padding: 10px 14px; }
.project-preview-compact .preview-enlarge { font-size: 0.64rem; }
.project-gallery { padding-block: 44px; }
.project-gallery > .project-preview { margin-bottom: 0; }
.preview-more { margin-top: 20px; }
.preview-more summary { min-height: 48px; padding: 14px 0; color: var(--teal-deep); font-weight: 650; cursor: pointer; }
.preview-phone { max-width: 480px; margin-inline: auto; }
.preview-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.project-count { margin: -8px 0 24px; color: var(--muted); font-size: 0.82rem; }
.case-subnav a:hover, .case-subnav a:focus-visible { color: var(--teal-deep); background: var(--paper); }
#status-legend { scroll-margin-top: 100px; }

@media (max-width: 720px) {
  .preview-pair { grid-template-columns: 1fr; gap: 0; }
  .project-preview figcaption { padding: 14px; }
}

@media (max-width: 920px) {
  .primary-nav {
    display: none;
  }

  .mobile-menu { display: block; }

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

  .hero-copy {
    grid-column: 1 / span 7;
  }

  .hero-system {
    grid-column: 8 / -1;
  }

  .system-track {
    padding-inline: 0;
  }

  .system-foot span:last-child {
    display: none;
  }

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

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

  .flagship-panel {
    grid-template-columns: minmax(0, 7fr) minmax(260px, 4fr);
  }

  .section-heading {
    grid-template-columns: 3fr 2fr;
    gap: 40px;
  }

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

  .footer-status {
    grid-column: 1 / -1;
  }

  .footer-status > p,
  .footer-wordmark {
    justify-content: flex-start;
    text-align: left;
  }

  .case-hero {
    grid-template-columns: minmax(0, 7fr) minmax(240px, 4fr);
  }

  .architecture-flow {
    padding: 24px 16px;
    gap: 6px;
  }

  .architecture-flow div {
    padding: 10px;
  }

  .status-legend {
    grid-template-columns: 1fr;
  }

  .legend-note {
    grid-column: 1;
  }
}

@media (max-width: 720px) {
  .site-header {
    backdrop-filter: none;
  }

  .nav-shell {
    min-height: 68px;
  }

  .brand small {
    display: none;
  }

  .hero {
    width: min(100% - 32px, 1200px);
    padding-top: 72px;
    grid-template-columns: 1fr;
    row-gap: 48px;
  }

  .coord-field {
    --lattice-spacing: 28px;
    --lattice-mask: linear-gradient(
      to bottom,
      transparent 0 64%,
      rgba(35, 39, 43, 0.5) 78%,
      rgba(35, 39, 43, 1) 92%
    );
  }

  .coord-field--site { --lattice-mask: none; }

  .coord-field[data-lattice='canvas']::before {
    opacity: 1;
  }

  .coord-field__canvas {
    display: none;
  }

  .hero-copy,
  .hero-system,
  .hero-proof {
    grid-column: 1;
  }

  .hero-system {
    min-height: 390px;
    padding: 15px;
  }

  .system-track {
    height: 305px;
  }

  .system-foot {
    justify-content: flex-start;
  }

  .hero-proof {
    line-height: 1.55;
  }

  .evolution {
    padding-inline: 16px;
  }

  .section-intro {
    display: block;
  }

  .section-intro .kicker {
    padding-top: 0;
  }

  .evolution-grid {
    grid-template-columns: 1fr;
    border-top: 0;
    border-left: 1px solid var(--border-dark);
  }

  .evolution-grid li,
  .evolution-grid li:not(:first-child) {
    min-height: 128px;
    padding: 3px 10px 30px 26px;
    border-right: 0;
  }

  .evolution-grid li::before {
    top: 2px;
    left: -5px;
  }

  .stage-number {
    margin-bottom: 16px;
  }

  .section-shell,
  .inner-page,
  .case-study {
    width: min(100% - 32px, 1200px);
  }

  .section-heading,
  .split-section,
  .outcomes-section,
  .placeholder-study,
  .contact-card {
    display: block;
  }

  .section-heading > p {
    margin-top: 22px;
  }

  .compact-heading .text-link {
    margin-top: 24px;
  }

  .flagship-panel {
    grid-template-columns: 1fr;
  }

  .flagship-copy {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .project-grid,
  .operations-grid,
  .foundation-grid,
  .experiment-grid,
  .principle-grid,
  .resume-scope,
  .boundary-grid {
    grid-template-columns: 1fr;
  }

  .level-up-gate {
    padding: 14px;
  }

  .level-up-gate__dialog {
    padding: 42px 24px 28px;
  }

  .project-card {
    min-height: 380px;
  }

  .foundation-card {
    min-height: 390px;
  }

  .philosophy {
    width: 100%;
    padding-inline: 16px;
    grid-template-columns: 1fr;
    gap: 55px;
  }

  .philosophy-number:not(.philosophy-path) {
    font-size: 5.5rem;
  }

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

  .footer-links {
    flex-wrap: wrap;
  }

  .page-intro {
    display: block;
    padding-top: 74px;
  }

  .page-intro h1 {
    margin-top: 20px;
  }

  .page-lede {
    margin-top: 28px;
  }

  .status-legend {
    padding: 28px 20px;
  }

  .status-legend dl {
    margin-top: 36px;
  }

  .status-legend dl div {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .experiment-number {
    margin-bottom: 44px;
  }

  .case-hero {
    grid-template-columns: 1fr;
    padding-top: 72px;
  }

  .case-title h1 {
    font-size: clamp(2.8rem, 14vw, 4.3rem);
  }

  .case-subnav {
    top: 68px;
    margin-inline: 0;
    padding-inline: 0;
  }

  .split-section .prose,
  .build-list,
  .outcome-grid,
  .placeholder-study .synthetic-frame {
    margin-top: 34px;
  }

  .case-timeline {
    grid-template-columns: 1fr;
    border-top: 0;
    border-left: 1px solid var(--border-dark);
  }

  .case-timeline li,
  .case-timeline li:last-child {
    min-height: 0;
    padding: 23px 24px;
    border: 0;
    border-bottom: 1px solid var(--border);
  }

  .case-timeline li.stage-caution {
    border: 1px dashed var(--amber);
  }

  .case-timeline span {
    margin-bottom: 15px;
  }

  .build-list li {
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .architecture-section .section-heading .status-badge {
    margin-top: 24px;
  }

  .desktop-flow {
    display: none;
  }

  .mobile-flow {
    display: grid;
    margin: 0;
    padding: 25px 25px 25px 45px;
    gap: 17px;
    border: 1px solid var(--border-dark);
    background: var(--paper);
    line-height: 1.55;
  }

  .mobile-flow-label {
    display: inline-flex;
    margin-left: 8px;
    padding: 2px 5px;
    border: 1px dashed var(--amber);
    color: var(--amber);
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.58rem;
    font-weight: 750;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }

  .mobile-flow-label.evidence-owner-confirmed {
    border-style: solid;
    border-color: #66788a;
    color: #526577;
  }

  .boundary-grid article {
    min-height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .boundary-grid article:last-child {
    border-bottom: 0;
  }

  .contact-card .button {
    margin-top: 32px;
  }
}

@media (min-width: 721px) and (max-width: 1023px) {
  .coord-field {
    --lattice-spacing: 26px;
  }
}

@media (max-width: 390px) {
  .hero-actions,
  .hero-actions .button {
    width: 100%;
  }

  .hero-actions .button {
    text-align: center;
  }

  .system-foot span:nth-child(2) {
    display: none;
  }

  .flagship-copy,
  .metrics-rail,
  .project-card,
  .foundation-card,
  .principle-grid article,
  .resume-scope > div {
    padding-inline: 22px;
  }

  .site-footer {
    padding-inline: 16px;
  }
}

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

  .coord-field[data-lattice='canvas']::before {
    opacity: 1;
  }

  .coord-field__canvas {
    display: none;
  }

  .level-up-drip > .site-header,
  .level-up-drip > main,
  .level-up-drip > .site-footer {
    opacity: 0;
    animation: none !important;
  }

  .failure-orbit, .failure-particles { display: none; }
}

@media (forced-colors: active) {
  .coord-field {
    display: none;
  }
}

/* WordPress Integration Extras */
.admin-bar .site-header {
  top: 32px;
}
@media screen and (max-width: 782px) {
  .admin-bar .site-header {
    top: 46px;
  }
}

.mobile-menu-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 8px 12px;
  color: var(--ink);
  font-weight: 600;
  cursor: pointer;
}

@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: block;
  }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(230, 233, 237, 0.98);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 20px;
    gap: 16px;
  }
  .nav-links.is-open {
    display: flex;
  }
}

.filter-btn {
  background: var(--paper);
  border: 1px solid var(--border);
  padding: 8px 16px;
  border-radius: 4px;
  color: var(--body);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}
.filter-btn:hover, .filter-btn.active {
  background: var(--ink);
  color: #ffffff;
  border-color: var(--ink);
}

.form-alert {
  padding: 12px 16px;
  border-radius: 4px;
  margin-bottom: 16px;
  font-weight: 500;
}
.form-alert-success {
  background: #ecfdf5;
  border: 1px solid #10b981;
  color: #065f46;
}
.form-alert-error {
  background: #fef2f2;
  border: 1px solid #ef4444;
  color: #991b1b;
}

/* Evidence review and fixture styles */
.review-page {
  width: min(1200px, calc(100% - 40px));
  margin: 40px auto 80px;
}
.review-header {
  margin-bottom: 40px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 24px;
}
.review-header p {
  color: var(--orange-text);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
}
.review-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 20px;
}
.review-grid article {
  background: var(--paper);
  border: 1px solid var(--border);
  padding: 24px;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
}
.review-grid article h3 {
  margin: 8px 0;
  font-size: 1.2rem;
  color: var(--ink);
}
.review-grid article p {
  flex-grow: 1;
  color: var(--muted);
  font-size: 0.95rem;
}
.evidence-gallery {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  margin: 24px 0;
}
.evidence-gallery figure {
  margin: 0;
  background: var(--paper);
  border: 1px solid var(--border);
  padding: 16px;
  border-radius: 6px;
}
.evidence-gallery img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  display: block;
}
.evidence-gallery figcaption {
  margin-top: 12px;
}
.evidence-gallery figcaption strong {
  display: block;
  color: var(--ink);
}
.evidence-gallery figcaption span {
  color: var(--muted);
  font-size: 0.9rem;
}

/* Clean Desktop Navigation Spacing */
.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--muted);
  padding: 8px 6px;
  transition: color 0.15s ease;
  position: relative;
}

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