:root {
  --ink: #11110f;
  --paper: #f5f1e8;
  --paper-2: #ebe4d6;
  --steel: #263036;
  --muted: #69706e;
  --line: rgba(17, 17, 15, 0.16);
  --line-strong: rgba(17, 17, 15, 0.32);
  --acid: #d6ff4d;
  --teal: #1ba39c;
  --blue: #275efe;
  --oxide: #ba4a2b;
  --panel: rgba(255, 252, 244, 0.84);
  --shadow: 0 18px 50px rgba(17, 17, 15, 0.12);
  --display: "Manrope", ui-sans-serif, system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  font-family: var(--display);
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(17, 17, 15, 0.04) 1px, transparent 1px),
    linear-gradient(180deg, rgba(17, 17, 15, 0.04) 1px, transparent 1px),
    linear-gradient(135deg, #f7f3eb 0%, #eee6d8 42%, #f9f5eb 100%);
  background-size: 32px 32px, 32px 32px, auto;
}

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

button,
a,
textarea,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
  min-height: 72px;
  padding: 12px 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(245, 241, 232, 0.84);
  backdrop-filter: blur(18px);
}

.brand,
.site-nav,
.hero-actions,
.contact-actions,
.relay-presets {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  width: max-content;
  font-weight: 800;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: var(--acid);
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 600;
}

.site-nav {
  justify-self: center;
  gap: 6px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 252, 244, 0.7);
}

.site-nav a,
.header-resume {
  min-height: 36px;
  padding: 9px 12px;
  border-radius: 6px;
  color: var(--steel);
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a:focus-visible,
.header-resume:hover,
.header-resume:focus-visible {
  background: var(--ink);
  color: var(--paper);
  outline: none;
}

.header-side {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 10px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 252, 244, 0.72);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 600;
}

.status-pill b,
.status-pill small {
  display: block;
}

.status-pill b {
  font-size: 0.76rem;
}

.status-pill small {
  margin-top: 2px;
  color: inherit;
  opacity: 0.72;
  font-family: var(--display);
  font-size: 0.72rem;
  font-weight: 800;
}

.status-pill > span:first-child {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--oxide);
}

.status-pill > span:last-child {
  min-width: 0;
}

.status-pill.is-online {
  color: var(--ink);
}

.status-pill.is-online > span:first-child {
  background: var(--teal);
  box-shadow: 0 0 0 4px rgba(27, 163, 156, 0.12);
}

.status-pill.is-fallback > span:first-child {
  background: var(--oxide);
  box-shadow: 0 0 0 4px rgba(186, 74, 43, 0.12);
}

.header-resume {
  justify-self: end;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
}

main {
  overflow: hidden;
}

.hero-section {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(460px, 1.08fr);
  gap: 28px;
  min-height: calc(100svh - 72px);
  padding: 44px 28px 30px;
}

.hero-section::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(115deg, transparent 0 58%, rgba(214, 255, 77, 0.34) 58% 63%, transparent 63%),
    linear-gradient(180deg, transparent 0 76%, rgba(17, 17, 15, 0.08) 76% 100%);
}

.hero-copy,
.hero-system {
  position: relative;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding: 32px 0 18px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--oxide);
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  max-width: 860px;
  font-size: 4.7rem;
  line-height: 0.96;
  font-weight: 800;
}

h2 {
  font-size: 3rem;
  line-height: 1.02;
  font-weight: 800;
}

h3 {
  font-size: 1.35rem;
  line-height: 1.12;
  font-weight: 800;
}

.hero-lede {
  max-width: 690px;
  margin-top: 24px;
  color: var(--steel);
  font-size: 1.16rem;
  line-height: 1.65;
  font-weight: 600;
}

.credential-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 760px;
  margin-top: 18px;
}

.credential-row span {
  padding: 8px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(255, 252, 244, 0.74);
  color: var(--steel);
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 600;
}

.hero-actions {
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.primary-action,
.secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 16px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  font-weight: 800;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

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

.secondary-action {
  background: var(--paper);
  color: var(--ink);
}

.primary-action:hover,
.primary-action:focus-visible,
.secondary-action:hover,
.secondary-action:focus-visible {
  transform: translateY(-2px);
  box-shadow: 6px 6px 0 var(--acid);
  outline: none;
}

.signal-strip {
  grid-column: 1;
  grid-row: 2;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  max-width: 780px;
  margin-top: 36px;
}

.signal-strip article,
.proof-band article,
.project-detail,
.relay-panel,
.sim-panel,
.skill-detail,
.timeline-item {
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.signal-strip article {
  min-width: 0;
  min-height: 116px;
  padding: 16px;
}

.signal-strip strong {
  display: block;
  font-family: var(--mono);
  font-size: clamp(1.08rem, 1.75vw, 1.42rem);
  line-height: 1.12;
  white-space: nowrap;
}

.signal-strip span {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.hero-system {
  grid-column: 2;
  grid-row: 1 / span 2;
  height: clamp(520px, calc(100svh - 150px), 720px);
  min-height: 560px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px),
    #11110f;
  background-size: 34px 34px;
  box-shadow: 14px 14px 0 var(--acid);
}

#systemCanvas {
  display: block;
  width: 100%;
  height: 100%;
}

.system-readout {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid rgba(245, 241, 232, 0.24);
  border-radius: 8px;
  background: rgba(17, 17, 15, 0.72);
  color: var(--paper);
  backdrop-filter: blur(12px);
}

.system-readout p,
.system-readout span {
  color: rgba(245, 241, 232, 0.72);
  font-family: var(--mono);
  font-size: 0.78rem;
}

.system-readout strong {
  font-size: 1.25rem;
}

.proof-band {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  padding: 1px;
  background: var(--ink);
}

.proof-band article {
  min-height: 220px;
  padding: 22px;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: #fffaf0;
}

.proof-band span {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 30px;
  margin-bottom: 24px;
  border: 1px solid var(--ink);
  border-radius: 6px;
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 600;
}

.proof-band strong {
  display: block;
  font-size: 1.32rem;
  line-height: 1.2;
}

.proof-band p {
  margin-top: 12px;
  color: var(--muted);
  line-height: 1.6;
  font-weight: 600;
}

.fit-section {
  background:
    linear-gradient(135deg, rgba(214, 255, 77, 0.22), transparent 36%),
    #fffaf0;
}

.fit-workbench {
  display: grid;
  grid-template-columns: minmax(250px, 330px) minmax(0, 1fr) minmax(270px, 360px);
  gap: 14px;
}

.role-tabs,
.proof-matrix {
  display: grid;
  gap: 8px;
  align-content: start;
}

.role-button,
.matrix-row {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: rgba(255, 252, 244, 0.8);
  color: var(--ink);
}

.role-button {
  text-align: left;
  font-weight: 800;
}

.role-button span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 500;
}

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

.role-button[aria-selected="true"] span {
  color: rgba(245, 241, 232, 0.72);
}

.fit-card {
  min-height: 430px;
  padding: 26px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: var(--ink);
  color: var(--paper);
  box-shadow: 10px 10px 0 var(--acid);
}

.fit-card h3 {
  max-width: 760px;
  font-size: 2.25rem;
  line-height: 1;
}

.fit-card p {
  margin-top: 16px;
  color: rgba(245, 241, 232, 0.76);
  line-height: 1.62;
  font-weight: 650;
}

.fit-score {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 5px;
  margin: 26px 0;
}

.fit-score span {
  height: 18px;
  border: 1px solid rgba(245, 241, 232, 0.24);
  border-radius: 3px;
  background: rgba(245, 241, 232, 0.08);
}

.fit-score span.is-lit {
  background: var(--acid);
}

.fit-card ul {
  display: grid;
  gap: 11px;
  margin: 18px 0 0;
  padding-left: 20px;
  color: rgba(245, 241, 232, 0.84);
  line-height: 1.52;
  font-weight: 650;
}

.matrix-row {
  display: grid;
  gap: 8px;
}

.matrix-row strong {
  font-size: 0.94rem;
}

.matrix-row span {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.74rem;
}

.matrix-bar {
  height: 9px;
  overflow: hidden;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--paper-2);
}

.matrix-bar i {
  display: block;
  height: 100%;
  background: var(--teal);
}

.section-shell {
  padding: 92px 28px;
}

.section-heading {
  max-width: 860px;
  margin-bottom: 32px;
}

.section-heading p:last-child {
  max-width: 720px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 1.04rem;
  line-height: 1.65;
  font-weight: 650;
}

.project-workbench {
  display: grid;
  grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
  gap: 16px;
}

.project-list {
  display: grid;
  gap: 8px;
  align-content: start;
}

.project-button,
.skill-button,
.relay-presets button {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: rgba(255, 252, 244, 0.72);
  color: var(--ink);
  text-align: left;
  font-weight: 800;
}

.project-button span,
.skill-button span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.76rem;
  font-weight: 500;
}

.project-button[aria-selected="true"],
.skill-button[aria-selected="true"],
.role-button:focus-visible,
.relay-presets button:hover,
.relay-presets button:focus-visible {
  background: var(--acid);
  outline: none;
}

.role-button[aria-selected="true"]:focus-visible {
  background: var(--ink);
  outline: 2px solid var(--acid);
  outline-offset: 2px;
}

.project-detail {
  min-height: 560px;
  overflow: hidden;
  background: #fffaf0;
}

.project-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 0.44fr);
  gap: 18px;
  padding: 24px;
  border-bottom: 1px solid var(--line);
}

.project-kicker {
  margin-bottom: 12px;
  color: var(--oxide);
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
}

.project-hero h3 {
  font-size: 2.1rem;
  line-height: 1.02;
}

.project-hero p {
  margin-top: 14px;
  color: var(--steel);
  line-height: 1.62;
  font-weight: 650;
}

.project-impact {
  display: grid;
  place-items: center;
  min-height: 180px;
  padding: 18px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: var(--ink);
  color: var(--paper);
}

.project-impact strong {
  display: block;
  font-family: var(--mono);
  font-size: 2.2rem;
  text-align: center;
}

.project-impact span {
  display: block;
  margin-top: 8px;
  color: rgba(245, 241, 232, 0.72);
  text-align: center;
  line-height: 1.45;
}

.project-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line);
}

.project-column {
  min-height: 280px;
  padding: 22px;
  background: #fffaf0;
}

.project-column h4 {
  margin: 0 0 12px;
  font-size: 0.88rem;
  text-transform: uppercase;
}

.project-column ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 18px;
  color: var(--steel);
  line-height: 1.52;
  font-weight: 650;
}

.stack-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.stack-tags span {
  padding: 8px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--paper);
  font-family: var(--mono);
  font-size: 0.76rem;
  font-weight: 600;
}

.code-window {
  margin-top: 18px;
  border: 1px solid var(--ink);
  border-radius: 8px;
  overflow: hidden;
  background: var(--ink);
  color: var(--paper);
}

.code-window header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(245, 241, 232, 0.18);
  color: rgba(245, 241, 232, 0.72);
  font-family: var(--mono);
  font-size: 0.76rem;
}

.code-window pre {
  margin: 0;
  padding: 16px;
  overflow-x: auto;
  color: #f5f1e8;
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1.58;
}

.lab-section {
  background: var(--ink);
  color: var(--paper);
}

.lab-section .section-heading p:last-child,
.lab-section .eyebrow {
  color: rgba(245, 241, 232, 0.7);
}

.lab-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 16px;
}

.relay-panel,
.sim-panel {
  min-height: 460px;
  padding: 22px;
  background: #181816;
  color: var(--paper);
  border-color: rgba(245, 241, 232, 0.2);
  box-shadow: none;
}

.panel-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.relay-status {
  flex: 0 0 auto;
  min-width: 86px;
  max-width: none;
  align-self: flex-start;
  min-height: 34px;
  padding: 7px 10px;
  border-color: rgba(245, 241, 232, 0.24);
  background: rgba(245, 241, 232, 0.08);
  color: rgba(245, 241, 232, 0.82);
}

.relay-status b,
.relay-status small {
  white-space: nowrap;
}

.relay-status.is-online {
  color: var(--paper);
}

.relay-status.is-online > span:first-child {
  box-shadow: none;
}

.panel-copy {
  max-width: 560px;
  color: rgba(245, 241, 232, 0.72);
  line-height: 1.55;
  font-weight: 650;
}

.prompt-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

textarea {
  width: 100%;
  min-height: 128px;
  resize: vertical;
  padding: 14px;
  border: 1px solid rgba(245, 241, 232, 0.24);
  border-radius: 8px;
  background: rgba(245, 241, 232, 0.08);
  color: var(--paper);
  font-family: var(--mono);
  line-height: 1.5;
}

textarea:focus,
input:focus {
  border-color: var(--acid);
  outline: none;
  box-shadow: 0 0 0 2px rgba(214, 255, 77, 0.18);
}

.relay-panel .primary-action {
  min-width: 130px;
  border-color: var(--acid);
  background: var(--acid);
  color: var(--ink);
}

.relay-panel .primary-action:hover,
.relay-panel .primary-action:focus-visible {
  transform: translateY(-1px);
  box-shadow: none;
  background: #e1ff76;
}

.relay-presets {
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.relay-presets button {
  width: auto;
  border-color: rgba(245, 241, 232, 0.22);
  background: rgba(245, 241, 232, 0.08);
  color: var(--paper);
  font-size: 0.86rem;
}

.relay-output {
  min-height: 154px;
  margin-top: 18px;
  padding: 16px;
  border: 1px solid rgba(245, 241, 232, 0.24);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(245, 241, 232, 0.05) 1px, transparent 1px),
    linear-gradient(180deg, rgba(245, 241, 232, 0.05) 1px, transparent 1px),
    rgba(245, 241, 232, 0.05);
  background-size: 22px 22px;
  color: rgba(245, 241, 232, 0.86);
  font-family: var(--mono);
  font-size: 0.9rem;
  line-height: 1.6;
  white-space: normal;
}

.relay-output p {
  margin: 0 0 14px;
}

.relay-output p:last-child,
.relay-output ul:last-child {
  margin-bottom: 0;
}

.relay-output ul {
  display: grid;
  gap: 6px;
  margin: 0 0 14px;
  padding-left: 18px;
}

.relay-output li {
  padding-left: 2px;
}

.relay-output strong {
  color: var(--paper);
  font-weight: 800;
}

.relay-output code {
  padding: 1px 4px;
  border: 1px solid rgba(245, 241, 232, 0.18);
  border-radius: 4px;
  background: rgba(245, 241, 232, 0.08);
}

.relay-output[data-mode="loading"] {
  color: var(--acid);
  white-space: pre-wrap;
}

.relay-output[data-mode="warn"] {
  color: #ffb19d;
  white-space: pre-wrap;
}

.range-field {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  margin-top: 22px;
}

.range-field label {
  color: rgba(245, 241, 232, 0.72);
  font-weight: 800;
}

.range-field strong {
  font-family: var(--mono);
}

input[type="range"] {
  grid-column: 1 / -1;
  width: 100%;
  accent-color: var(--acid);
}

.sim-result {
  margin-top: 34px;
  padding: 22px;
  border: 2px solid var(--acid);
  border-radius: 8px;
}

.sim-result span {
  display: block;
  color: rgba(245, 241, 232, 0.72);
  font-family: var(--mono);
  font-size: 0.82rem;
}

.sim-result strong {
  display: block;
  margin-top: 10px;
  font-size: 2.4rem;
  line-height: 1;
}

.sim-result p {
  margin-top: 14px;
  color: rgba(245, 241, 232, 0.78);
  line-height: 1.55;
}

.stack-grid {
  display: grid;
  grid-template-columns: minmax(260px, 380px) minmax(0, 1fr);
  gap: 16px;
}

.skill-board {
  display: grid;
  gap: 8px;
  align-content: start;
}

.skill-detail {
  min-height: 460px;
  padding: 24px;
  background: #fffaf0;
}

.skill-detail h3 {
  font-size: 2rem;
}

.skill-meter {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 4px;
  margin: 24px 0;
}

.skill-meter span {
  height: 18px;
  border: 1px solid var(--ink);
  border-radius: 3px;
  background: var(--paper-2);
}

.skill-meter span.is-lit {
  background: var(--acid);
}

.skill-detail p,
.skill-detail li {
  color: var(--steel);
  line-height: 1.62;
  font-weight: 650;
}

.skill-detail ul {
  display: grid;
  gap: 10px;
  margin: 18px 0 0;
  padding-left: 18px;
}

.timeline {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.timeline-item {
  min-height: 260px;
  padding: 18px;
  background: #fffaf0;
}

.timeline-item time {
  display: block;
  margin-bottom: 18px;
  color: var(--oxide);
  font-family: var(--mono);
  font-weight: 600;
}

.timeline-item h3 {
  font-size: 1.24rem;
}

.timeline-item p {
  margin-top: 12px;
  color: var(--muted);
  line-height: 1.56;
  font-weight: 650;
}

.contact-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: center;
  padding: 56px 28px;
  border-top: 2px solid var(--ink);
  background: var(--acid);
}

.contact-section h2 {
  max-width: 920px;
}

.contact-actions {
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.contact-section .primary-action,
.contact-section .secondary-action {
  background: var(--ink);
  color: var(--paper);
}

.contact-section .secondary-action {
  background: var(--paper);
  color: var(--ink);
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 520ms ease, transform 520ms ease;
}

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

@media (max-width: 1180px) {
  .hero-section,
  .fit-workbench,
  .project-workbench,
  .lab-grid,
  .stack-grid,
  .contact-section {
    grid-template-columns: 1fr;
  }

  .hero-section {
    min-height: auto;
  }

  .hero-system,
  .signal-strip {
    grid-column: auto;
    grid-row: auto;
  }

  h1 {
    font-size: 3.8rem;
  }

  .hero-system,
  #systemCanvas {
    min-height: 0;
  }

  .hero-system {
    height: clamp(460px, 58svh, 580px);
  }

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

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

@media (max-width: 820px) {
  .site-header {
    position: static;
    grid-template-columns: 1fr auto;
    padding: 12px 16px;
  }

  .site-nav {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: stretch;
    overflow-x: auto;
  }

  .header-side {
    grid-column: 2;
    grid-row: 1;
  }

  .status-pill {
    display: none;
  }

  .header-resume {
    min-width: 94px;
  }

  .hero-section,
  .section-shell,
  .contact-section {
    padding-left: 16px;
    padding-right: 16px;
  }

  h1 {
    font-size: 3rem;
  }

  h2 {
    font-size: 2.2rem;
  }

  .signal-strip,
  .proof-band,
  .project-hero,
  .project-body,
  .prompt-row,
  .timeline {
    grid-template-columns: 1fr;
  }

  .panel-heading {
    flex-direction: column;
  }

  .relay-status {
    width: 100%;
    max-width: none;
  }

  .hero-system,
  #systemCanvas {
    min-height: 0;
  }

  .hero-system {
    height: 420px;
  }

  .primary-action,
  .secondary-action {
    width: 100%;
  }

  .relay-presets button {
    width: 100%;
  }
}

@media (max-width: 520px) {
  .brand span:last-child {
    display: none;
  }

  h1 {
    font-size: 2.35rem;
  }

  h2 {
    font-size: 1.85rem;
  }

  .hero-lede {
    font-size: 1rem;
  }

  .hero-system,
  #systemCanvas {
    min-height: 0;
  }

  .hero-system {
    height: 360px;
  }

  .system-readout {
    left: 10px;
    right: 10px;
    bottom: 10px;
  }
}

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