:root {
  --ink: #111823;
  --muted: #586573;
  --line: #dae0e7;
  --panel: #ffffff;
  --soft: #f3f6f8;
  --dark: #0c1622;          /* hero / contact / dark media surfaces */
  --steel: #223a48;
  --accent: #0f6f88;        /* brand: deep cyan-teal */
  --accent-ink: #ffffff;
  --brand-pop: #7fd6cb;     /* luminous teal for the hero name */
  --eyebrow-dark: #8fb9c2;  /* muted steel-cyan eyebrow on dark */
  --blue: #1f6feb;
  --green: #2a8c63;         /* semantic success */
  --amber: #b56b18;         /* semantic warn */
  --red: #a6423a;           /* semantic danger */
  --shadow: 0 18px 60px rgba(17, 24, 35, 0.12);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--soft);
  color: var(--ink);
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
  padding: 0 32px;
  border-bottom: 1px solid rgba(216, 222, 228, 0.9);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 2px solid var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 0.78rem;
}

.brand-text {
  white-space: nowrap;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 600;
}

.site-nav a:hover {
  color: var(--ink);
}

.hero {
  position: relative;
  display: grid;
  min-height: calc(100svh - 72px);
  grid-template-columns: minmax(0, 1fr);
  align-items: end;
  overflow: hidden;
  background: var(--dark);
  color: #fff;
}

.hero-visual {
  position: absolute;
  inset: 0;
  background-color: var(--dark);
  background-image:
    linear-gradient(90deg, rgba(12, 22, 34, 0.94), rgba(12, 22, 34, 0.68) 48%, rgba(12, 22, 34, 0.24)),
    url("img/hero-cell.jpg");
  background-repeat: no-repeat, no-repeat;
  background-position: center center, center 42%;
  background-size: cover, cover;
}

/* On narrow screens the headline overlays the photo, so deepen the veil. */
@media (max-width: 900px) {
  .hero-visual {
    background-image:
      linear-gradient(180deg, rgba(12, 22, 34, 0.72), rgba(12, 22, 34, 0.88) 55%, rgba(12, 22, 34, 0.96)),
      url("img/hero-cell.jpg");
  }
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(760px, calc(100% - 40px));
  padding: 0 0 clamp(58px, 12vh, 120px) clamp(20px, 7vw, 96px);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero-name {
  margin: 0 0 10px;
  color: var(--brand-pop);
  font-size: clamp(1.3rem, 2.7vw, 1.75rem);
  font-weight: 800;
  letter-spacing: 0.01em;
}

.case-note {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
  font-style: italic;
  line-height: 1.45;
}

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

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

h1 {
  max-width: 720px;
  margin-bottom: 22px;
  font-size: clamp(2.3rem, 6.2vw, 5rem);
  line-height: 1.03;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 14px;
  font-size: clamp(2rem, 4vw, 3.35rem);
  line-height: 1;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.12rem;
  line-height: 1.22;
  letter-spacing: 0;
}

.hero-copy {
  max-width: 680px;
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(1rem, 2vw, 1.25rem);
  line-height: 1.6;
}

.hero-actions,
.assessment-actions,
.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button,
.icon-button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 0 18px;
  font-weight: 800;
  cursor: pointer;
}

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

.button.secondary {
  border-color: rgba(255, 255, 255, 0.36);
  color: #fff;
}

.button:hover,
.icon-button:hover {
  transform: translateY(-1px);
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.metrics div {
  min-height: 132px;
  padding: 28px 32px;
  border-right: 1px solid var(--line);
}

.metrics div:last-child {
  border-right: 0;
}

.metrics strong {
  display: block;
  margin-bottom: 8px;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1;
}

.metrics span {
  color: var(--muted);
  font-weight: 700;
}

.section {
  padding: clamp(64px, 10vw, 112px) clamp(20px, 5vw, 72px);
}

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

.section-heading p:not(.eyebrow),
.assessment-intro p,
.contact-band p,
.growth-grid p,
.skill-columns p,
.case-body p {
  color: var(--muted);
  line-height: 1.65;
}

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

.case-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 10px 32px rgba(22, 26, 29, 0.08);
}

.case-media {
  position: relative;
  display: grid;
  min-height: 210px;
  grid-template-columns: repeat(3, 1fr);
  align-items: center;
  gap: 14px;
  padding: 24px;
  overflow: hidden;
  color: #fff;
  font-weight: 800;
}

.case-media span {
  position: relative;
  z-index: 2;
  display: grid;
  min-height: 68px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.12);
  text-align: center;
}

.case-media::before {
  position: absolute;
  inset: 0;
  content: "";
  background:
    repeating-linear-gradient(90deg, transparent, transparent 24px, rgba(255, 255, 255, 0.06) 25px),
    repeating-linear-gradient(0deg, transparent, transparent 24px, rgba(255, 255, 255, 0.06) 25px);
}

.case-media.code-media {
  position: relative;
  display: block;
  padding: 0;
  height: 210px;
  min-height: 210px;
  overflow: hidden;
  background: radial-gradient(115% 105% at 50% 128%, #172c46 0%, #0a1420 66%), #0a1420;
  perspective: 210px;
  perspective-origin: 50% 4%;
}

.case-media.code-media::before {
  display: none;
}

.code-crawl {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 6px;
  transform: rotateX(50deg);
  transform-origin: 50% 100%;
  -webkit-mask-image: linear-gradient(to top, #000 6%, rgba(0, 0, 0, 0.42) 46%, transparent 78%);
  mask-image: linear-gradient(to top, #000 6%, rgba(0, 0, 0, 0.42) 46%, transparent 78%);
}

.code-crawl pre {
  margin: 0;
  padding: 0;
  text-align: center;
  color: #f4c340;
  font: 700 10.5px/1.5 "SFMono-Regular", ui-monospace, Menlo, Consolas, "Liberation Mono", monospace;
  white-space: pre;
  text-shadow: 0 0 8px rgba(244, 195, 64, 0.32);
}

.case-media.code-media .code-badge {
  position: absolute;
  left: 14px;
  bottom: 12px;
  z-index: 3;
  display: inline-block;
  min-height: 0;
  padding: 3px 9px;
  border: 0;
  border-radius: 5px;
  background: rgba(10, 20, 32, 0.82);
  color: #9fb3c8;
  font: 600 11px "SFMono-Regular", ui-monospace, monospace;
}

.case-media.has-photo {
  display: block;
  padding: 0;
}

.case-media.has-photo::before {
  display: none;
}

.case-media.has-photo img {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  min-height: 210px;
  object-fit: cover;
  object-position: center 42%;
}

/* Unified dark "blueprint" header — one scheme across all case cards. */
.cnc-media,
.dual-media,
.standards-media,
.gtforce-media,
.dbr-media {
  background: linear-gradient(135deg, var(--dark), var(--steel));
}

.case-body {
  padding: 26px;
}

/* p.case-type needed so this outranks the broad `.case-body p` muted rule. */
p.case-type {
  margin-bottom: 8px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.tag-list li {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--steel);
  font-size: 0.82rem;
  font-weight: 800;
}

.case-link {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  margin-top: 22px;
  border-bottom: 2px solid var(--accent);
  color: var(--ink);
  font-weight: 900;
}

.skill-band,
.growth-band {
  background: #fff;
}

.hardware-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.hardware-grid figure {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  box-shadow: 0 10px 32px rgba(22, 26, 29, 0.08);
}

.hardware-grid img {
  display: block;
  width: 100%;
  height: 220px;
  object-fit: cover;
  object-position: center 55%;
  background: var(--dark);
}

.hardware-grid figcaption {
  padding: 13px 16px;
  color: var(--steel);
  font-size: 0.9rem;
  font-weight: 800;
}

/* ===== About band ===== */
.about-band {
  background: #fff;
}

.about-layout {
  display: grid;
  grid-template-columns: minmax(220px, 0.42fr) minmax(0, 1fr);
  align-items: start;
  gap: clamp(24px, 5vw, 56px);
}

.about-portrait {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  box-shadow: 0 10px 32px rgba(22, 26, 29, 0.08);
}

.about-portrait img {
  display: block;
  width: 100%;
  height: auto;
}

.about-copy p {
  max-width: 720px;
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 1.03rem;
  line-height: 1.7;
}

.about-copy p:last-child {
  margin-bottom: 0;
}

.about-pair {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 28px;
}

.about-pair figure {
  flex: 0 0 auto;
  width: fit-content;
  max-width: 100%;
}

.about-pair figure img {
  display: block;
  width: auto;
  max-width: 100%;
  height: 440px;
  object-fit: cover;
}

/* Caption fills the figure but never widens it (image drives the width). */
.about-pair figcaption {
  width: 0;
  min-width: 100%;
  box-sizing: border-box;
}

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

.skill-columns div,
.tool-card,
.growth-grid div {
  min-height: 188px;
  padding: 26px;
  background: #fff;
}

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

.tool-card {
  border: 0;
}

.tool-hero {
  padding: clamp(64px, 10vw, 120px) clamp(20px, 7vw, 96px) clamp(44px, 7vw, 80px);
  background: #fff;
}

.tool-hero h1 {
  max-width: 940px;
  color: var(--ink);
}

.tool-hero p:not(.eyebrow) {
  max-width: 820px;
  color: var(--muted);
  font-size: 1.12rem;
  line-height: 1.65;
}

.dark-link {
  color: var(--ink);
  border-bottom-color: var(--accent);
}

.tool-context {
  padding-top: 0;
  padding-bottom: 32px;
  background: #fff;
}

.assessment-section {
  padding-top: 44px;
}

.assessment-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.78fr) minmax(0, 1.42fr);
  gap: 28px;
  align-items: start;
}

.assessment-intro {
  position: sticky;
  top: 96px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.progress-panel {
  margin: 26px 0 20px;
}

.progress-panel span {
  display: block;
  margin-bottom: 10px;
  color: var(--steel);
  font-weight: 800;
}

.progress-panel strong {
  display: block;
  margin-bottom: 12px;
  font-size: clamp(1.6rem, 4vw, 2.55rem);
  line-height: 1;
}

.progress-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e9eef2;
}

.progress-track span {
  display: block;
  width: 0%;
  height: 100%;
  background: var(--green);
}

.icon-button {
  background: var(--ink);
  color: #fff;
  font: inherit;
}

.checklist {
  display: grid;
  gap: 14px;
}

.assessment-workspace {
  display: grid;
  gap: 14px;
}

.project-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.project-panel label {
  display: grid;
  gap: 7px;
}

.project-panel span {
  color: var(--steel);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.project-panel input,
.project-panel textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 11px 12px;
  color: var(--ink);
  font: inherit;
}

.project-panel input:focus,
.project-panel textarea:focus {
  outline: 2px solid rgba(15, 111, 136, 0.28);
  border-color: var(--accent);
}

.wide-field {
  grid-column: 1 / -1;
}

.summary-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

.summary-strip span {
  min-height: 58px;
  display: grid;
  place-items: center;
  padding: 12px;
  background: #fff;
  color: var(--steel);
  font-weight: 900;
  text-align: center;
}

.check-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.check-section summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
  font-weight: 900;
  cursor: pointer;
}

.check-section summary::-webkit-details-marker {
  display: none;
}

.check-section summary span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.check-items {
  display: grid;
  gap: 0;
  padding: 0 22px 18px;
}

.check-item {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 12px;
  align-items: start;
  padding: 10px 0;
  border-top: 1px solid #edf1f4;
  color: var(--steel);
  line-height: 1.35;
}

.check-item input {
  width: 18px;
  height: 18px;
  margin-top: 1px;
  accent-color: var(--green);
}

.contact-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: center;
  background: var(--ink);
  color: #fff;
}

.contact-band p {
  max-width: 820px;
  color: rgba(255, 255, 255, 0.76);
}

.contact-links a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 6px;
  padding: 0 16px;
  font-weight: 800;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding: 24px 32px;
  color: var(--muted);
  background: #fff;
  font-size: 0.92rem;
  font-weight: 700;
}

.case-page {
  background: #fff;
}

.case-hero-detail {
  min-height: 64svh;
  padding: clamp(64px, 11vw, 120px) clamp(20px, 7vw, 96px);
  color: #fff;
}

.case-hero-detail h1 {
  max-width: 960px;
  margin-bottom: 22px;
}

.case-hero-detail p:not(.eyebrow) {
  max-width: 780px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.12rem;
  line-height: 1.65;
}

.cnc-detail {
  background:
    linear-gradient(90deg, rgba(12, 22, 34, 0.94), rgba(12, 22, 34, 0.58)),
    repeating-linear-gradient(90deg, transparent, transparent 44px, rgba(255, 255, 255, 0.06) 45px),
    linear-gradient(135deg, var(--dark), var(--steel));
}

.dual-detail {
  background:
    linear-gradient(90deg, rgba(12, 22, 34, 0.94), rgba(12, 22, 34, 0.58)),
    repeating-linear-gradient(90deg, transparent, transparent 44px, rgba(255, 255, 255, 0.06) 45px),
    linear-gradient(135deg, var(--dark), var(--steel));
}

.fanuc-detail {
  background:
    linear-gradient(90deg, rgba(12, 22, 34, 0.94), rgba(12, 22, 34, 0.58)),
    repeating-linear-gradient(90deg, transparent, transparent 44px, rgba(255, 255, 255, 0.06) 45px),
    linear-gradient(135deg, var(--dark), var(--steel));
}

.gtforce-detail {
  background:
    linear-gradient(90deg, rgba(12, 22, 34, 0.94), rgba(12, 22, 34, 0.58)),
    repeating-linear-gradient(90deg, transparent, transparent 44px, rgba(255, 255, 255, 0.06) 45px),
    linear-gradient(135deg, var(--dark), var(--steel));
}

.dbr-detail {
  background:
    linear-gradient(90deg, rgba(12, 22, 34, 0.94), rgba(12, 22, 34, 0.58)),
    repeating-linear-gradient(90deg, transparent, transparent 44px, rgba(255, 255, 255, 0.06) 45px),
    linear-gradient(135deg, var(--dark), var(--steel));
}

.breadcrumb {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  margin-bottom: 34px;
  border-bottom: 2px solid rgba(255, 255, 255, 0.62);
  color: #fff;
  font-weight: 900;
}

.case-detail-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.48fr) minmax(0, 1fr);
  gap: clamp(24px, 5vw, 64px);
  padding: clamp(56px, 8vw, 96px) clamp(20px, 7vw, 96px);
}

.case-facts {
  position: sticky;
  top: 96px;
  align-self: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.case-facts h2 {
  padding: 24px 24px 0;
  font-size: 1.35rem;
}

.case-facts dl {
  margin: 0;
  padding: 10px 24px 24px;
}

.case-facts div {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.case-facts div:last-child {
  border-bottom: 0;
}

.case-facts dt {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.case-facts dd {
  margin: 0;
  color: var(--ink);
  font-weight: 800;
}

.case-sections {
  display: grid;
  gap: 18px;
}

.detail-section {
  border-bottom: 1px solid var(--line);
  padding-bottom: 28px;
}

.detail-section h2 {
  font-size: clamp(1.7rem, 3vw, 2.5rem);
}

.detail-section p,
.decision-list,
.evidence-list {
  max-width: 860px;
  color: var(--muted);
  font-size: 1.03rem;
  line-height: 1.7;
}

.decision-list,
.evidence-list {
  margin: 0;
  padding-left: 20px;
}

.decision-list li,
.evidence-list li {
  margin-bottom: 10px;
}

.case-diagram {
  margin: 10px 0 0;
  padding-bottom: 6px;
  overflow-x: auto;
}

.case-diagram svg {
  display: block;
  width: 100%;
  min-width: 660px;
  height: auto;
}

/* ===== Case-study photography ===== */
.case-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin: 4px 0 0;
}

.case-figure {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  box-shadow: 0 10px 32px rgba(22, 26, 29, 0.08);
}

.case-figure img {
  display: block;
  width: 100%;
  height: 300px;
  object-fit: cover;
  object-position: center 45%;
  background: var(--dark);
}

.case-figure.tall img {
  height: 420px;
}

.case-figure.wide {
  grid-column: 1 / -1;
  background: var(--soft);
}

.case-figure.wide img {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 620px;
  margin: 0 auto;
  background: transparent;
  object-fit: contain;
}

.case-figure figcaption {
  padding: 13px 16px;
  color: var(--steel);
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.5;
}

.photo-note {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  font-style: italic;
}

/* ===== Robot-to-PLC handshake simulator ===== */
.sim-section {
  padding-top: 8px;
  background: #fff;
}

.sim-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--soft);
}

.mode-switch {
  display: inline-flex;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.mode-btn {
  min-height: 38px;
  padding: 0 18px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.mode-btn.is-active {
  background: var(--ink);
  color: #fff;
}

.sim-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.icon-button.ghost {
  background: #fff;
  border-color: var(--line);
  color: var(--ink);
}

.icon-button.warn {
  background: var(--amber);
  color: #fff;
}

.icon-button.danger {
  background: var(--red);
  color: #fff;
}

.icon-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.sim-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.sim-panel {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 8px 26px rgba(22, 26, 29, 0.05);
}

.chart-panel,
.flags-panel {
  grid-column: 1 / -1;
}

.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
  color: var(--steel);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.chart-hint {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: none;
}

/* HMI panel */
.hmi-state {
  padding: 14px 16px;
  border-radius: 8px;
  background: #eef2f5;
  color: var(--ink);
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-align: center;
}

.hmi-state[data-tone="run"] { background: rgba(42, 140, 99, 0.16); color: var(--green); }
.hmi-state[data-tone="warn"] { background: rgba(181, 107, 24, 0.16); color: var(--amber); }
.hmi-state[data-tone="danger"] { background: rgba(166, 66, 58, 0.16); color: var(--red); }
.hmi-state[data-tone="idle"] { background: #eef2f5; color: var(--steel); }

.hmi-readout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 16px 0 0;
}

.hmi-readout div {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.hmi-readout dt {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
}

.hmi-readout dd {
  margin: 4px 0 0;
  color: var(--ink);
  font-weight: 800;
}

.hmi-message {
  margin: 14px 0 0;
  padding: 12px 14px;
  border-left: 4px solid var(--blue);
  border-radius: 4px;
  background: var(--soft);
  color: var(--steel);
  font-size: 0.92rem;
  line-height: 1.5;
}

.hb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #cfd8de;
  box-shadow: 0 0 0 0 rgba(42, 140, 99, 0);
  transition: background 0.15s, box-shadow 0.15s;
}

.hb.beat {
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(42, 140, 99, 0.18);
}

/* Handshake node diagram */
.node-diagram {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
}

.node {
  display: grid;
  gap: 3px;
  padding: 16px 14px;
  border: 2px solid var(--steel);
  border-radius: 10px;
  background: var(--soft);
  text-align: center;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.node-tag {
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.node-sub {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.node.is-active {
  border-color: #d8a12a;
  background: rgba(45, 212, 191, 0.16);
  box-shadow: 0 0 0 4px rgba(45, 212, 191, 0.16);
}

.node.is-fault {
  border-color: var(--red);
  background: rgba(166, 66, 58, 0.12);
  box-shadow: 0 0 0 4px rgba(166, 66, 58, 0.14);
}

.node-wires {
  display: grid;
  gap: 8px;
}

.wire {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 6px;
  background: var(--soft);
}

.wire-label {
  min-width: 104px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.wire-arrow {
  position: relative;
  flex: 1;
  height: 3px;
  border-radius: 2px;
  background: #d3dbe1;
}

.wire-arrow::after {
  position: absolute;
  top: 50%;
  content: "";
  width: 8px;
  height: 8px;
  border-top: 3px solid #b7c2ca;
  border-right: 3px solid #b7c2ca;
}

.wire-arrow.to-robot::after { right: -1px; transform: translateY(-50%) rotate(45deg); }
.wire-arrow.to-plc::after { left: -1px; transform: translateY(-50%) rotate(-135deg); }

.wire.is-active .wire-label { color: var(--ink); }
.wire.is-active .wire-arrow { background: #e0a52a; }
.wire.is-active .wire-arrow::after { border-color: #e0a52a; }
.wire.is-active { background: rgba(45, 212, 191, 0.14); }

/* Signal LED lists */
.led-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.flags-panel .led-list {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.led-row {
  display: grid;
  grid-template-columns: 16px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--soft);
}

.led {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid #c2ccd3;
  background: #eef2f5;
}

.led-name {
  color: var(--steel);
  font-size: 0.86rem;
  font-weight: 800;
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
}

.led-val {
  color: var(--muted);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.led-row.on .led {
  border-color: var(--green);
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(42, 140, 99, 0.16);
}

.led-row.on .led-val { color: var(--green); }
.led-row[data-tone="warn"].on .led { border-color: var(--amber); background: var(--amber); box-shadow: 0 0 0 3px rgba(181, 107, 24, 0.16); }
.led-row[data-tone="warn"].on .led-val { color: var(--amber); }
.led-row[data-tone="danger"].on .led { border-color: var(--red); background: var(--red); box-shadow: 0 0 0 3px rgba(166, 66, 58, 0.16); }
.led-row[data-tone="danger"].on .led-val { color: var(--red); }

/* Timing chart */
.chart-panel canvas {
  display: block;
  width: 100%;
  height: auto;
}

.sim-note {
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
  font-style: italic;
  line-height: 1.5;
}

@media (max-width: 720px) {
  .sim-grid { grid-template-columns: 1fr; }
  .flags-panel .led-list { grid-template-columns: 1fr; }
  .hmi-readout { grid-template-columns: 1fr; }
  .node-diagram { grid-template-columns: 1fr; }
}

@media (max-width: 980px) {
  .site-header {
    position: static;
    align-items: flex-start;
    flex-direction: column;
    padding: 18px 20px;
  }

  .site-nav {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .metrics,
  .case-grid,
  .case-detail-grid,
  .skill-columns,
  .tool-grid,
  .growth-grid,
  .hardware-grid,
  .assessment-layout,
  .project-panel,
  .summary-strip,
  .contact-band {
    grid-template-columns: 1fr;
  }

  .metrics div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .assessment-intro {
    position: static;
  }

  .case-facts {
    position: static;
  }

  .about-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .about-portrait {
    max-width: 320px;
  }
}

@media (max-width: 640px) {
  .brand-text {
    white-space: normal;
  }

  .hero {
    min-height: 760px;
  }

  .hero-content {
    width: 100%;
    padding: 0 20px 52px;
  }

  .case-media {
    min-height: 180px;
    grid-template-columns: 1fr;
  }

  .case-media span {
    min-height: 44px;
  }

  .case-figure img,
  .case-figure.tall img {
    height: 240px;
  }

  .about-pair {
    flex-direction: column;
  }

  .about-pair figure {
    flex: 1 1 auto;
    width: auto;
  }

  .about-pair figure img {
    width: 100%;
    height: 300px;
  }

  .section {
    padding: 56px 18px;
  }
}

/* =====================================================================
   Interactive effects (effects.js). Everything here is scoped under
   html.fx-ready / html.fx-cursor, both added by JS only when motion is
   allowed — so the no-JS and reduced-motion experiences are untouched.
   ===================================================================== */

/* --- TCP reticle cursor (trails the native pointer, which stays visible) --- */
.fx-reticle {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999;
  width: 56px;
  height: 56px;
  pointer-events: none;
  opacity: 0;
  will-change: transform;
  transition: opacity 0.2s ease;
}

.fx-reticle.is-visible {
  opacity: 1;
}

/* Four machine-vision corner brackets that frame the hotspot (a part-locator fiducial). */
.fx-reticle-corner {
  position: absolute;
  width: 9px;
  height: 9px;
  border: 1.5px solid var(--accent);
  transition:
    top 0.2s cubic-bezier(0.22, 1, 0.36, 1),
    left 0.2s cubic-bezier(0.22, 1, 0.36, 1),
    right 0.2s cubic-bezier(0.22, 1, 0.36, 1),
    bottom 0.2s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.18s ease;
}

.fx-reticle-corner.tl { top: 5px; left: 5px; border-right: 0; border-bottom: 0; }
.fx-reticle-corner.tr { top: 5px; right: 5px; border-left: 0; border-bottom: 0; }
.fx-reticle-corner.bl { bottom: 5px; left: 5px; border-right: 0; border-top: 0; }
.fx-reticle-corner.br { bottom: 5px; right: 5px; border-left: 0; border-top: 0; }

/* Center point — a precise focal dot at the reticle's core. */
.fx-reticle-dot {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 4px;
  height: 4px;
  margin: -2px 0 0 -2px;
  border-radius: 50%;
  background: var(--accent);
  transition: transform 0.18s ease;
}

/* Target acquired: brackets clamp inward and the center dot grows — motion only, no glow. */
.fx-reticle.is-target .fx-reticle-corner.tl { top: 18px; left: 18px; }
.fx-reticle.is-target .fx-reticle-corner.tr { top: 18px; right: 18px; }
.fx-reticle.is-target .fx-reticle-corner.bl { bottom: 18px; left: 18px; }
.fx-reticle.is-target .fx-reticle-corner.br { bottom: 18px; right: 18px; }
.fx-reticle.is-target .fx-reticle-dot { transform: scale(1.6); }

.fx-reticle.is-down .fx-reticle-corner { transform: scale(0.82); }

/* Hero plate and content are transformed inline by JS; hint the compositor. */
.fx-ready .hero-visual {
  will-change: transform, filter;
}

.fx-ready .hero-content {
  will-change: transform, opacity;
}

/* --- Magnetic buttons + card tilt easing --- */
.fx-ready .hero-actions .button {
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), background 0.2s ease;
}

.fx-ready .case-card,
.fx-ready .tool-card {
  transform-style: preserve-3d;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.3s ease;
  will-change: transform;
}

.fx-ready .case-card:hover,
.fx-ready .tool-card:hover {
  box-shadow: 0 26px 60px rgba(22, 26, 29, 0.18);
}

/* --- Scroll reveal --- */
.fx-reveal {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--fx-delay, 0ms);
}

.fx-reveal.is-in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .button:hover,
  .icon-button:hover {
    transform: none;
  }

  /* Never leave reveal targets hidden if motion is disabled. */
  .fx-reveal {
    opacity: 1 !important;
    transform: none !important;
  }
}

@media print {
  .site-header,
  .hero,
  .metrics,
  .case-grid,
  .skill-band,
  .growth-band,
  .contact-band,
  .site-footer,
  .assessment-actions {
    display: none;
  }

  body {
    background: #fff;
  }

  .section {
    padding: 0;
  }

  .assessment-layout {
    display: block;
  }

  .project-panel,
  .summary-strip {
    display: none;
  }

  .assessment-intro {
    position: static;
    box-shadow: none;
  }

  .check-section {
    break-inside: avoid;
    margin: 12px 0;
  }
}
