/* Tokens & defaults */
:root {
  --navy: #11192d;
  --navy-2: #1b2944;
  --ink: #182439;
  --muted: #556176;
  --cream: #f6f5ee;
  --paper: #fffefb;
  --neutral: #e9eef0;
  --line: #ccd3db;
  --lime: #d1ee86;
  --coral-text: #923d2e;
  --mono: ui-monospace, Consolas, "Liberation Mono", monospace;
  color-scheme: light;
  --shadow: 0 20px 42px rgb(10 25 45 / 0.08);
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font: 400 16px/1.65 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;
}

a {
  color: inherit;
  text-underline-offset: 4px;
}

a:hover {
  text-decoration-color: var(--coral-text);
}

a:focus-visible {
  outline: 3px solid var(--navy);
  outline-offset: 3px;
  box-shadow: 0 0 0 6px #fff;
  border-radius: 3px;
}

.hero a:focus-visible, .contact a:focus-visible {
  outline-color: #fff;
  box-shadow: 0 0 0 6px var(--navy);
}

main:focus {
  outline: none;
}

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

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

h1, h2, h3 {
  line-height: 1.08;
  letter-spacing: -0.045em;
}

h1, h2, h3, strong, b {
  font-weight: 700;
}

code {
  font: 600 .9em/1.3 var(--mono);
  background: rgb(24 36 57 /.08);
  padding: 1px 4px;
  border-radius: 4px;
}

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

.skip-link {
  position: absolute;
  z-index: 999;
  top: -100px;
  left: 12px;
  padding: 12px 16px;
  color: var(--navy);
  background: var(--lime);
  font-weight: 700;
}

.skip-link:focus {
  top: 10px;
}

.eyebrow {
  text-transform: uppercase;
  font-size: 12px;
  line-height: 1.5;
  font-weight: 700;
  letter-spacing: .11em;
}

.eyebrow.on-dark {
  color: #eff4e8;
}

.kind {
  text-transform: uppercase;
  font: 700 12px/1.4 var(--mono);
  letter-spacing: .045em;
  color: var(--coral-text);
}

.date-range {
  font: 700 12px/1.5 var(--mono);
  letter-spacing: .045em;
  color: #46566c;
}

.section {
  padding: 76px 0;
}

.section-head {
  display: grid;
  grid-template-columns: 1.35fr .65fr;
  align-items: end;
  gap: 54px;
  margin-bottom: 30px;
}

.section-head h2 {
  font-size: clamp(37px,4.8vw,58px);
  margin: 8px 0 0;
  max-width: 770px;
}

.section-head > p {
  color: var(--muted);
  margin: 0 0 7px;
  max-width: 420px;
  font-size: 16px;
  line-height: 1.6;
}

/* Header */
.site-header {
  position: relative;
  z-index: 2;
  background: var(--cream);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  display: flex;
  align-items: center;
  min-height: 78px;
  gap: 40px;
}

.identity {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex-shrink: 0;
}

.identity-mark {
  font-size: 32px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.055em;
}

.identity-mark span {
  color: var(--coral-text);
}

.identity-label {
  font-weight: 700;
  letter-spacing: -.025em;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  gap: 26px;
}

.nav-links a, .nav-contact {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.nav-links a:hover {
  text-decoration: underline;
}

.nav-contact {
  font-size: 13px;
  border: 1px solid var(--navy);
  padding: 0 16px;
  gap: 10px;
  border-radius: 4px;
  white-space: nowrap;
}

.nav-contact:hover {
  background: var(--navy);
  color: white;
  text-decoration: none;
}

/* Hero */
.hero {
  background: var(--navy);
  color: var(--paper);
  padding: 50px 0 24px;
  overflow: hidden;
}

.hero-layout {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 56px;
  align-items: center;
}

.hero-content {
  padding-bottom: 8px;
}

.hero .eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.hero h1 {
  font-size: clamp(41px,4.55vw,60px);
  font-weight: 800;
  line-height: 1.07;
  letter-spacing: -.058em;
  max-width: 690px;
  text-wrap: balance;
  margin: 19px 0 18px;
}

.hero-intro {
  font-size: clamp(19px,2vw,24px);
  font-weight: 600;
  line-height: 1.4;
  color: #fff;
  margin-bottom: 20px;
  max-width: 580px;
}

.hero-detail {
  color: #d3dae5;
  font-size: 16px;
  line-height: 1.72;
  max-width: 590px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 31px 0 30px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 50px;
  padding: 12px 20px;
  border-radius: 5px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  transition: transform .18s ease,background-color .18s ease;
}

.button:hover {
  transform: translateY(-2px);
  text-decoration: none;
}

.button:active {
  transform: translateY(0);
}

.button-lime {
  background: var(--lime);
  color: var(--navy);
}

.button-lime:hover {
  background: #e1f5b6;
}

.button-outline {
  border: 1px solid #8d9bb4;
  color: white;
}

.button-outline:hover {
  border-color: white;
}

.hero-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 22px;
  color: #c9d4e4;
  font-size: 13px;
}

.hero-links a {
  padding: 6px 0;
  min-height: 30px;
  font-weight: 700;
}

.hero-stack {
  list-style: none;
  padding: 20px 0 0;
  display: flex;
  gap: 10px 20px;
  flex-wrap: wrap;
  margin-top: 40px;
  border-top: 1px solid #3e4b63;
  color: #d1dced;
}

.hero-stack li {
  font: 600 12px/1.5 var(--mono);
  letter-spacing: .025em;
}

/* Hero system — production behavior, not a generic philosophy graphic */
.hero-system {
  background: #f0f3ee;
  color: var(--navy);
  border: 1px solid #bfccdc;
  border-radius: 10px;
  box-shadow: 22px 22px 0 #24344e;
  padding: 24px;
  min-width: 0;
}

.diagram-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #c9d3d9;
  padding-bottom: 13px;
  font: 700 11px/1.4 var(--mono);
  letter-spacing: .04em;
}

.diagram-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #2c513d;
}

.hero-system h2 {
  font-size: 24px;
  line-height: 1.2;
  letter-spacing: -.035em;
  max-width: 360px;
  margin: 24px 0 20px;
}

.lock-diagram {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.lock-node {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--paper);
  border: 1px solid #c4ced2;
  border-radius: 5px;
  padding: 12px 13px;
  min-width: 0;
}

.lock-node.hub-node {
  background: #e0ebf8;
}

.lock-node .step {
  font: 700 12px/1 var(--mono);
  color: #586982;
}

.lock-node > div {
  flex: 1;
  min-width: 0;
}

.lock-node small {
  display: block;
  color: #42546c;
  font: 700 11px/1.4 var(--mono);
  letter-spacing: .03em;
}

.lock-node strong {
  display: block;
  font-size: 15px;
  line-height: 1.3;
}

.node-pill {
  font: 600 11px/1.4 var(--mono);
  background: #ebefe7;
  padding: 5px 7px;
  border-radius: 3px;
  color: #355244;
}

.flow-down {
  display: block;
  align-self: center;
  font-size: 16px;
  color: #516880;
  line-height: 1.2;
  padding: 5px;
}

.lock-outcomes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 13px;
}

.lock-outcomes > div {
  border: 1px solid #c8d3da;
  border-radius: 4px;
  padding: 12px 10px;
  background: #fff;
  min-width: 0;
}

.lock-outcomes b {
  display: block;
  font: 700 12px/1.4 var(--mono);
}

.lock-outcomes span {
  display: block;
  font-size: 12px;
  line-height: 1.35;
  margin-top: 5px;
  color: #45566a;
}

.outcome-ok {
  color: #246846;
}

.outcome-warn {
  color: #964436;
}

.diagram-caption {
  margin: 17px 0 0;
  color: #4b5b6a;
  font-size: 12px;
  line-height: 1.55;
}

/* Experience */
.experience {
  background: var(--cream);
}

.experience-feature {
  display: grid;
  grid-template-columns: .42fr 1fr;
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 10px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.experience-side {
  background: var(--neutral);
  padding: 34px;
}

.experience-side h3 {
  font-size: 31px;
  letter-spacing: -.04em;
  margin: 24px 0 6px;
}

.experience-side p {
  color: var(--muted);
  font-size: 15px;
}

.experience-tags, .tag-list {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin-top: 26px;
}

.experience-tags span, .tag-list span {
  border: 1px solid #b5c3d0;
  font: 600 12px/1.4 var(--mono);
  padding: 6px 8px;
  border-radius: 3px;
}

.experience-main {
  padding: 35px 42px;
}

.experience-intro {
  font-weight: 600;
  font-size: 18px;
  line-height: 1.48;
  margin-bottom: 21px;
}

.achievement-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 16px;
}

.achievement-list li {
  position: relative;
  padding-left: 23px;
  color: #324257;
  font-size: 15px;
  line-height: 1.58;
}

.achievement-list li:before {
  content: "";
  position: absolute;
  left: 0;
  top: .65em;
  background: var(--coral-text);
  width: 7px;
  height: 7px;
  border-radius: 2px;
}

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

.earlier-role {
  display: grid;
  grid-template-columns: .42fr 1fr;
  gap: 36px;
  margin-top: 24px;
  padding: 26px 34px;
  border-left: 3px solid #536e7c;
  background: #fffefb;
}

.earlier-role h3 {
  font-size: 22px;
  margin: 8px 0 3px;
}

.earlier-role p {
  color: var(--muted);
  margin: 0;
  font-size: 14px;
}

.earlier-role > p {
  font-size: 15px;
  max-width: 720px;
}

.education-note {
  font-size: 14px;
  font-weight: 700;
  color: #293a50;
  margin: 17px 0 0;
}

/* Projects: four full-width rows in reading order.
   TomeStack (lead), FairTix, Hacker Tracker (copy + system diagram), PlanPal.
   Each row pairs an evidence panel with the copy; rows stack below 1001px. */
.projects {
  background: #e9eef0;
}

.project-cards {
  display: grid;
  gap: 20px;
}

.project-card, .project-feature {
  display: grid;
  background: var(--paper);
  border: 1px solid #c4cfd7;
  border-radius: 10px;
  overflow: hidden;
}

.project-card {
  grid-template-columns: 43% 1fr;
}

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

.project-card-featured {
  grid-template-columns: 41% 1fr;
  border-radius: 12px;
  box-shadow: var(--shadow);
}

/* Copy column (cards and the Hacker Tracker feature share one rhythm) */
.card-body, .featured-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 31px 34px 26px;
}

.card-body h3, .featured-copy h3 {
  font-size: 36px;
  margin: 10px 0;
}

.project-card-featured .card-body h3 {
  font-size: clamp(38px, 4.2vw, 52px);
  margin: 12px 0 14px;
}

.card-body > p {
  font-size: 14px;
  line-height: 1.57;
  color: #37475b;
}

.project-card-featured .card-body > p:first-of-type {
  font-size: 16px;
}

.card-body > .card-decision {
  border-top: 1px solid #d8dde1;
  padding-top: 15px;
  margin-top: 5px;
}

.card-decision strong {
  color: #8b3f2e;
}

.card-body > .card-fact {
  margin-top: 12px;
  padding-top: 8px;
  font-size: 12px;
  color: #596477;
}

.card-body > .card-proof {
  font-weight: 600;
  color: #324257;
}

.card-proof a {
  padding: 4px 0;
}

.card-body > .card-offline {
  font-size: 12px;
  color: #5b6677;
  font-weight: 600;
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px 16px;
  border-top: 1px solid #d8dde1;
  padding-top: 14px;
  margin-top: auto;
}

.card-actions a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 700;
  color: #234c6b;
}

.card-actions a, .text-link, .hero-links a {
  min-height: 44px;
}

/* Evidence panels: code is content, not fixed-height decoration.
   The source link and caption sit at the bottom of the panel. */
.code-art {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  padding: 22px;
  background: #151e31;
  color: #eff6ed;
}

.fair-code {
  background: #143942;
}

.plan-code {
  background: #2a2540;
}

.code-heading {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  color: #d4ecbd;
  font: 700 12px/1.4 var(--mono);
  text-transform: uppercase;
  letter-spacing: .03em;
}

.code-art pre {
  display: block;
  flex-shrink: 0;
  margin: auto 0;
  padding: 12px 0;
  overflow-x: auto;
  max-width: 100%;
  font: 500 12px/1.65 var(--mono);
  white-space: pre;
  color: #f4f5ec;
  background: none;
}

.code-art pre:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 2px;
  box-shadow: 0 0 0 5px #151e31;
}

.code-art code {
  color: inherit;
  font: inherit;
  background: none;
  padding: 0;
}

.code-art .source-proof {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 6px;
  min-height: 38px;
  font-size: 13px;
  font-weight: 700;
  color: #e0f5b7;
}

.artifact-caption {
  font-size: 12px;
  margin: 0;
  color: #d4e0e6;
  line-height: 1.55;
}

/* Hacker Tracker feature copy */
.project-label {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.team-size {
  font: 600 11px/1.5 var(--mono);
  color: #647388;
}

.project-summary {
  font-size: 17px;
  line-height: 1.46;
  font-weight: 600;
}

.featured-copy > p:not(.project-summary) {
  font-size: 14px;
  color: #43526a;
  line-height: 1.6;
}

.decision {
  display: grid;
  grid-template-columns: 105px 1fr;
  gap: 6px 14px;
  border-top: 1px solid #d2dae0;
  border-bottom: 1px solid #d2dae0;
  padding: 17px 0;
  margin: 6px 0 0;
}

.decision strong {
  font: 700 12px/1.5 var(--mono);
  color: var(--coral-text);
}

.decision p {
  font-size: 14px;
  line-height: 1.53;
  margin: 0;
  color: #344258;
}

.tag-list {
  margin: 18px 0 10px;
}

.text-link {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 12px;
  margin-top: auto;
  font-size: 14px;
  font-weight: 700;
  color: #1e4666;
}

/* Hacker Tracker system diagram, with the validation notes beneath it */
.pipeline {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 26px;
  background: var(--navy-2);
  color: #eff5f6;
}

.pipeline-top {
  font: 700 11px/1.4 var(--mono);
  letter-spacing: .055em;
  color: #c6d4e0;
  border-bottom: 1px solid #617186;
  padding-bottom: 15px;
}

.pipeline-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 365px;
  width: 100%;
  margin: 22px auto;
}

.pipeline-node {
  display: grid;
  grid-template-columns: 31px 1fr;
  column-gap: 11px;
  align-items: center;
  width: 100%;
  padding: 12px 15px;
  background: #f8fbf7;
  color: var(--navy);
  border: 1px solid #d0dbe0;
  border-radius: 5px;
  min-width: 0;
}

.pipeline-node .node-id {
  grid-row: 1/3;
  border-radius: 50%;
  background: #e8f0df;
  text-align: center;
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  font: 700 12px var(--mono);
  color: #355d43;
}

.pipeline-node > span:nth-child(2) {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
}

.pipeline-node small {
  font-size: 12px;
  color: #465769;
  line-height: 1.45;
}

.pipeline-arrow {
  display: block;
  font-weight: 700;
  color: var(--lime);
  font-size: 18px;
  line-height: 1;
  padding: 5px;
}

.pipeline-node.node-enrichment {
  background: #dce8f4;
}

.pipeline-node.node-output {
  background: var(--lime);
}

.pipeline-note {
  margin: 0;
  padding-top: 13px;
  border-top: 1px solid #617186;
  font-size: 13px;
  line-height: 1.55;
  color: #dbe5ee;
}

.pipeline-diagram + .pipeline-note {
  margin-top: auto;
}

.pipeline-note + .pipeline-note {
  margin-top: 13px;
}

.pipeline-note strong {
  color: #fff;
}

/* Contact and footer */
.contact {
  background: var(--navy);
  color: #fff;
}

.contact-layout {
  display: grid;
  grid-template-columns: 1.1fr .72fr;
  align-items: center;
  gap: 80px;
}

.contact h2 {
  font-size: clamp(44px,6vw,76px);
  margin: 10px 0 16px;
}

.contact p {
  color: #d1dbe7;
  max-width: 580px;
  font-size: 16px;
}

.contact .button {
  margin-top: 12px;
}

.contact p.contact-email {
  font-size: 15px;
  margin-top: 22px;
}

.contact-email a {
  display: inline-block;
  padding: 4px 0;
  font-weight: 700;
  color: #fff;
}

.contact-panel {
  border: 1px solid #728099;
  padding: 24px;
  border-radius: 7px;
}

.contact .contact-panel p {
  font: 700 12px/1.5 var(--mono);
  letter-spacing: .04em;
  color: #c5d1dc;
  padding-bottom: 14px;
  border-bottom: 1px solid #4e5d75;
}

.contact-panel a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 50px;
  text-decoration: none;
  font-weight: 700;
  border-bottom: 1px solid #4e5d75;
}

.contact-panel a:last-child {
  border: 0;
}

.contact-panel a:hover {
  color: var(--lime);
}

.site-footer {
  background: #0b1221;
  color: #c7d2de;
  padding: 14px 0;
}

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

.footer-inner a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  font-weight: 600;
}

/* Responsive behavior */
@media (max-width: 1100px) {
  .hero-layout {
    gap: 35px;
  }
  .hero-system {
    box-shadow: 12px 12px 0 #24344e;
  }
  .project-cards {
    gap: 16px;
  }
  .card-body, .featured-copy {
    padding: 26px 26px 22px;
  }
  .project-card-featured {
    grid-template-columns: 45% 1fr;
  }
}

/* Project rows stack: evidence panel above copy, diagram below copy. */
@media (max-width: 1000px) {
  .project-card, .project-card-featured, .project-feature {
    grid-template-columns: 1fr;
  }
  .pipeline-stack {
    max-width: 420px;
  }
}

@media (max-width: 900px) {
  .wrap {
    width: min(760px, calc(100% - 44px));
  }
  .nav-inner {
    gap: 20px;
  }
  .nav-links {
    gap: 14px;
  }
  .identity-label {
    font-size: 14px;
  }
  .hero-layout {
    grid-template-columns: 1fr;
    gap: 35px;
  }
  .hero h1 {
    max-width: 690px;
  }
  .hero-system {
    max-width: 550px;
    box-shadow: 9px 9px 0 #24344e;
  }
  .hero-stack {
    margin-top: 25px;
  }
  .section-head {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .contact-layout {
    gap: 32px;
  }
}

@media (max-width: 640px) {
  .wrap {
    width: calc(100% - 36px);
  }
  .section {
    padding: 52px 0;
  }
  .nav-inner {
    min-height: 68px;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: space-between;
    padding: 11px 0;
  }
  .nav-links {
    order: 3;
    flex-basis: 100%;
    justify-content: flex-start;
    gap: 19px;
  }
  .nav-links a {
    min-height: 40px;
  }
  .nav-contact {
    margin-left: auto;
    min-height: 40px;
    padding: 0 12px;
    font-size: 12px;
  }
  .hero {
    padding: 21px 0 20px;
  }
  .hero h1 {
    font-size: clamp(34px, 9vw, 48px);
    letter-spacing: -.045em;
    margin: 14px 0 12px;
  }
  .hero-intro {
    font-size: 18px;
    margin-bottom: 11px;
  }
  .hero-detail {
    font-size: 15px;
    line-height: 1.58;
    margin-bottom: 10px;
  }
  .hero-actions {
    margin: 10px 0 12px;
  }
  .hero-layout {
    gap: 22px;
  }
  /* Compact lock diagram: step numbers carry the order, so the arrows and
     the decorative pills are dropped to bring Experience up the page. */
  .hero-system {
    padding: 16px;
    box-shadow: none;
  }
  .hero-system h2 {
    font-size: 20px;
    margin: 14px 0 12px;
  }
  .diagram-header {
    flex-wrap: wrap;
    padding-bottom: 10px;
  }
  .lock-diagram {
    gap: 6px;
  }
  .flow-down, .node-pill {
    display: none;
  }
  .lock-node {
    padding: 8px 10px;
  }
  .lock-outcomes {
    gap: 6px;
    margin-top: 0;
  }
  .lock-outcomes > div {
    padding: 8px 10px;
  }
  .diagram-caption {
    margin-top: 12px;
  }
  .hero-stack {
    margin-top: 18px;
    padding-top: 14px;
  }
  .section-head h2 {
    font-size: clamp(35px, 8.7vw, 48px);
  }
  .experience-feature, .earlier-role {
    grid-template-columns: 1fr;
  }
  .experience-side {
    padding: 25px;
  }
  .experience-side h3 {
    font-size: 27px;
    margin: 14px 0 6px;
  }
  .experience-main {
    padding: 28px 25px;
  }
  .earlier-role {
    gap: 13px;
    padding: 22px;
  }
  .card-body, .featured-copy {
    padding: 22px;
  }
  .card-body h3, .featured-copy h3 {
    font-size: 32px;
  }
  .project-card-featured .card-body h3 {
    font-size: 38px;
  }
  .code-art pre {
    font-size: 11px;
  }
  .pipeline {
    padding: 22px;
  }
  .contact-layout {
    grid-template-columns: 1fr;
    gap: 35px;
  }
  .contact h2 {
    font-size: 53px;
  }
  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }
}

@media (max-width: 420px) {
  .identity-label {
    font-size: 13px;
  }
  .nav-inner {
    gap: 6px;
  }
  .nav-links {
    gap: 14px;
  }
  .hero .eyebrow {
    gap: 8px;
  }
  .hero h1 {
    font-size: 35px;
  }
  .hero-actions {
    flex-direction: column;
  }
  .hero-actions .button {
    width: 100%;
  }
  .hero-stack {
    gap: 6px 12px;
  }
  .lock-node {
    gap: 8px;
  }
  .lock-node strong {
    font-size: 14px;
  }
  .decision {
    grid-template-columns: 1fr;
    gap: 5px;
  }
  .decision p {
    margin-bottom: 8px;
  }
}

@media (forced-colors: active) {
  .lock-node, .pipeline-node, .code-art {
    border: 1px solid CanvasText;
  }
  .button {
    outline: 1px solid ButtonText;
  }
}

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

/* Print: text only. Navigation, buttons, diagrams and code panels are
   dropped; the validation notes and known limitations still print. */
@media print {
  body {
    color: #000;
    background: #fff;
    font-size: 11pt;
  }
  .site-header, .site-footer, .hero-system, .hero-links, .hero-stack, .button, .contact-panel, .code-art, .pipeline-diagram {
    display: none !important;
  }
  .hero, .hero * {
    color: #000 !important;
  }
  .hero {
    padding: 0 !important;
    background: #fff !important;
  }
  section, .section {
    padding: 15px 0 !important;
    background: #fff !important;
    color: #000 !important;
  }
  .hero h1, .section-head h2 {
    font-size: 24pt;
    color: #000 !important;
  }
  .wrap {
    width: 100% !important;
  }
  .experience-feature, .project-feature, .project-card {
    box-shadow: none !important;
    border: 1px solid #bbb;
    break-inside: avoid;
  }
  .project-feature, .project-card {
    display: block;
  }
  .pipeline {
    padding: 0 26px 20px;
    background: #fff !important;
    color: #000 !important;
  }
  .pipeline-note, .pipeline-note strong {
    color: #000 !important;
    border-color: #bbb;
  }
  .contact {
    background: #fff !important;
    color: #000 !important;
  }
  .contact p, .contact a {
    color: #000 !important;
  }
}


/* Order-locking case-study page */
.case-home-link { margin: 24px 0 0; display: flex; flex-wrap: wrap; gap: 5px 16px; align-items: baseline; }
.case-home-link span { color: var(--muted); font-size: 13px; }
.case-link, .hacker-gallery a { font-weight: 700; color: #24477a; text-decoration-thickness: 1px; }
.hacker-gallery { margin: 13px 0 0; font-size: 14px; }
.case-header { padding: 60px 0 58px; color: #fff; background: var(--navy); }
.case-heading { max-width: 1160px; }
.case-back { display: inline-block; margin-bottom: 32px; color: var(--lime); font-size: 14px; font-weight: 700; }
.case-header h1 { max-width: 850px; margin: 14px 0 22px; font-size: clamp(38px,5.5vw,68px); }
.case-lead { max-width: 830px; font-size: clamp(17px,2vw,21px); color: #f0f3fa; line-height: 1.58; }
.case-meta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.case-meta span { border: 1px solid #65738c; padding: 6px 12px; border-radius: 30px; font-size: 12px; font-weight: 650; color: #f3f8fa; }
.case-content { display: grid; grid-template-columns: 225px minmax(0, 1fr); gap: 65px; padding-top: 66px; padding-bottom: 100px; }
.case-toc { display: flex; flex-direction: column; gap: 10px; align-self: start; position: sticky; top: 24px; border-left: 3px solid var(--line); padding-left: 18px; font-size: 13px; }
.case-toc strong { color: var(--ink); margin-bottom: 5px; }
.case-toc a { text-decoration: none; color: #334765; }
.case-toc a:hover, .case-toc a:focus-visible { text-decoration: underline; }
.case-prose { max-width: 810px; min-width: 0; }
.case-prose section { scroll-margin-top: 22px; padding-bottom: 28px; margin-bottom: 34px; border-bottom: 1px solid var(--line); }
.case-prose h2 { font-size: clamp(26px,3vw,36px); margin-bottom: 17px; }
.case-prose p, .case-prose li { font-size: 16px; line-height: 1.8; }
.case-prose ul { padding-left: 23px; }
.case-prose li { margin-bottom: 8px; }
.case-figure { margin: 25px 0 27px; padding: 24px; background: var(--paper); border: 1px solid var(--line); border-radius: 15px; }
.case-flow { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; gap: 10px; align-items: center; }
.case-flow-item { display: flex; flex-direction: column; gap: 7px; padding: 14px; border-radius: 8px; background: #edf2f1; border: 1px solid #b5c3c7; min-width: 0; line-height: 1.4; }
.case-flow-item small { text-transform: uppercase; letter-spacing: .07em; font-size: 10px; font-weight: 750; color: #46566c; }
.case-flow-item strong { font-size: 14px; line-height: 1.4; }
.case-flow-item span { font-size: 12px; line-height: 1.5; }
.case-flow-arrow { font-size: 20px; color: #576c81; font-weight: 800; }
.case-flow-write { grid-column: 3 / span 3; background: #e9eddc; }
.case-figure figcaption { font-size: 13px; color: var(--muted); margin-top: 17px; line-height: 1.6; }
.case-disclosure { padding: 14px 18px; border-left: 4px solid var(--line); background: #fffefb; font-size: 14px !important; color: #44516b; }
.case-end-actions { display: flex; flex-wrap: wrap; gap: 20px; }
.case-header a:focus-visible { outline-color: #fff; box-shadow: 0 0 0 6px var(--navy); }
@media (max-width: 830px) { .case-content { grid-template-columns: minmax(0,1fr); gap: 24px; } .case-toc { position: static; display: flex; flex-flow: row wrap; align-items: center; gap: 8px 16px; } .case-toc strong { width: 100%; } }
@media (max-width: 610px) { .case-header { padding: 42px 0; } .case-flow { grid-template-columns: 1fr; } .case-flow-arrow { justify-self: center; transform: rotate(90deg); } .case-flow-write { grid-column: auto; } .case-figure { padding: 16px; } .case-content { padding-top: 40px; padding-bottom: 64px; } }
@media print { .case-header { background: #fff !important; color: #000 !important; } .case-header * { color: #000 !important; } .case-toc, .case-end-actions { display: none !important; } .case-content { display: block; padding-top: 15px; } .case-prose { max-width: 100%; } .case-figure { break-inside: avoid; } }

/* Keep the last diagram arrow under the registry on wide screens and point down on mobile. */
.case-flow-arrow-down { grid-column: 5; justify-self: center; }
@media (max-width: 610px) { .case-flow-arrow-down { grid-column: auto; transform: none; } }

.workflow-note { max-width: 850px; margin: 0 0 22px; color: var(--ink); line-height: 1.65; font-size: 15px; }
