:root {
  color-scheme: dark;
  --bg: #08090c;
  --bg-deep: #000000;
  --surface: #101116;
  --surface-hover: rgba(10, 102, 194, 0.12);
  --surface-strong: #131419;
  --heading: #f5f6f8;
  --text: #c4c8d2;
  --muted: #9296a6;
  --faint: #6d7183;
  --line: rgba(255, 255, 255, 0.10);
  --line-strong: rgba(255, 255, 255, 0.20);
  --accent: #0a66c2;
  --accent-light: #3d94e6;
  --accent-pale: #163457;
  --accent-soft: rgba(10, 102, 194, 0.18);
  --section-grey: #16171c;
  /* Skill/tech chips are deliberately neutral: the page had too much
     blue, and the chips are labels, not actions. Numbers and hovers
     stay on --accent. */
  --chip-bg: #181a20;
  --chip-ink: #c4c8d2;
  --green: #2fbf82;
  --amber: #e0a530;
  --red: #f0607a;
  --code-bg: #0c0d12;
  --code-text: #dbe6ff;
  --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  --page: 1220px;
  --article: 760px;
  --pointer-x: 50vw;
  --pointer-y: 15vh;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body::selection,
body *::selection {
  color: #ffffff;
  background: var(--accent);
}

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

img,
svg {
  display: block;
}

h1,
h2,
h3,
h4 {
  color: var(--heading);
  font-weight: 680;
  line-height: 1.15;
  letter-spacing: -0.025em;
}

:where(a, button):focus-visible {
  border-radius: 3px;
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  top: 14px;
  left: 14px;
  z-index: 100;
  padding: 9px 14px;
  color: #ffffff;
  background: var(--accent);
  border-radius: 6px;
  font-size: 14px;
  font-weight: 700;
  transform: translateY(-160%);
  transition: transform 160ms ease;
}

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

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.page-glow {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(650px circle at var(--pointer-x) var(--pointer-y), rgba(10, 102, 194, 0.16), transparent 62%),
    linear-gradient(135deg, rgba(10, 102, 194, 0.04), transparent 42%);
}

/* Home page */
.site-shell {
  display: grid;
  grid-template-columns: minmax(330px, 0.82fr) minmax(0, 1.18fr);
  gap: clamp(54px, 7vw, 106px);
  width: min(100% - 80px, var(--page));
  min-height: 100vh;
  margin: 0 auto;
}

.profile-panel__inner {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: 88px 0 66px;
}

.profile-name {
  display: inline-block;
  color: var(--heading);
  font-size: clamp(38px, 4vw, 54px);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.055em;
  transition: color 180ms ease;
}

.profile-title {
  line-height: 1;
}

.profile-name:hover {
  color: var(--accent-light);
}

.profile-role {
  margin-top: 18px;
  color: var(--heading);
  font-size: 18px;
  font-weight: 620;
  letter-spacing: -0.012em;
}

.profile-intro {
  max-width: 36ch;
  margin-top: 15px;
  color: var(--muted);
  font-size: 16px;
}

.section-nav {
  display: grid;
  gap: 14px;
  margin-top: 62px;
}

.section-nav a {
  display: grid;
  grid-template-columns: 8px auto;
  align-items: center;
  gap: 22px;
  width: max-content;
  min-height: 48px;
  color: var(--heading);
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  transition: color 180ms ease;
}

.section-nav .nav-line {
  width: 8px;
  height: 8px;
  background: #3a3d47;
  transition: background-color 180ms ease;
}

.section-nav .nav-index {
  display: none;
}

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

.section-nav a:hover .nav-line,
.section-nav a:focus-visible .nav-line {
  width: 8px;
  background: var(--accent);
}

.profile-bottom {
  margin-top: auto;
}

.availability {
  display: flex;
  align-items: center;
  gap: 9px;
  max-width: 34ch;
  margin-bottom: 24px;
  color: var(--muted);
  font-size: 12.5px;
}

.availability > span {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  background: var(--green);
  border-radius: 50%;
  box-shadow: 0 0 0 5px rgba(47, 191, 130, 0.18);
}

.social-list {
  display: flex;
  gap: 19px;
  align-items: center;
  list-style: none;
}

.social-link {
  position: relative;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 50%;
  transition: color 180ms ease, border-color 180ms ease, background-color 180ms ease, transform 180ms ease;
}

.social-link svg {
  width: 21px;
  height: 21px;
  fill: currentColor;
}

.social-link::after {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  padding: 4px 8px;
  color: var(--heading);
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: 5px;
  content: attr(data-label);
  font-family: var(--mono);
  font-size: 10px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 4px);
  transition: opacity 150ms ease, transform 150ms ease;
  white-space: nowrap;
}

.social-link:hover,
.social-link:focus-visible {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: rgba(10, 102, 194, 0.5);
  transform: translateY(-3px);
}

.social-link:hover::after,
.social-link:focus-visible::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

.content-panel {
  min-width: 0;
  padding: 88px 0 58px;
}

.content-section {
  padding: 0 0 112px;
  scroll-margin-top: 28px;
}

.section-heading {
  display: grid;
  grid-template-columns: auto auto minmax(40px, 1fr);
  align-items: center;
  gap: 12px;
  margin-bottom: 30px;
}

.section-heading > span:first-child {
  color: var(--accent-light);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
}

.section-heading h2 {
  font-size: 17px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section-rule {
  height: 1px;
  background: var(--line);
}

.about-copy {
  display: grid;
  gap: 18px;
  color: var(--text);
  font-size: 16.5px;
}

.inline-link {
  color: var(--heading);
  font-weight: 600;
  box-shadow: inset 0 -1px 0 var(--accent);
  transition: color 160ms ease, box-shadow 160ms ease;
}

.inline-link:hover {
  color: var(--accent-light);
  box-shadow: inset 0 -6px 0 rgba(10, 102, 194, 0.12);
}

.focus-list,
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
}

.focus-list {
  margin-top: 28px;
}

.focus-list li,
.tag-list li {
  color: var(--chip-ink);
  background: var(--chip-bg);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 10.5px;
  line-height: 1.2;
  padding: 6px 10px;
}

.experience-list {
  display: grid;
  gap: 10px;
  list-style: none;
}

.experience-card {
  display: grid;
  grid-template-columns: 122px minmax(0, 1fr);
  gap: 22px;
  margin: 0 -20px;
  padding: 22px 20px;
  border: 1px solid transparent;
  border-radius: 12px;
  transition: background-color 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.experience-card:hover,
.experience-card:focus-within {
  background: var(--surface-hover);
  border-color: var(--line);
  transform: translateY(-3px);
}

.experience-date {
  padding-top: 3px;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.5;
  text-transform: uppercase;
}

.experience-card h3 {
  font-size: 16px;
  line-height: 1.35;
}

.experience-card h3 span {
  color: var(--muted);
  font-weight: 570;
}

.experience-card h3 a {
  transition: color 160ms ease;
}

.experience-card:hover h3 a,
.experience-card h3 a:hover {
  color: var(--accent-light);
}

.experience-card > div > p {
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.62;
}

.experience-card .tag-list {
  margin-top: 15px;
}

.external-icon {
  display: inline-block;
  width: 15px;
  height: 15px;
  margin-left: 4px;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  transition: transform 160ms ease;
  vertical-align: -2px;
}

a:hover > .external-icon,
.project-card:hover .external-icon {
  transform: translate(3px, -3px);
}

.project-list {
  display: grid;
  gap: 28px;
}

.project-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  align-items: start;
  margin: 0;
  padding: 0;
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  transition: background-color 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.project-card:hover,
.project-card:focus-within {
  background: var(--surface-strong);
  border-color: var(--line-strong);
  transform: translateY(-4px);
}

.project-image {
  position: relative;
  display: block;
  width: 100%;
  height: clamp(190px, 24vw, 280px);
  overflow: hidden;
  background: var(--surface);
  border: 0;
  border-radius: 0;
}

.project-image::after {
  position: absolute;
  inset: 0;
  background: rgba(10, 102, 194, 0.1);
  content: "";
  mix-blend-mode: color;
  transition: opacity 180ms ease;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(22%) contrast(0.92) brightness(0.88);
  transform: scale(1.01);
  transition: filter 220ms ease, transform 220ms ease;
}

.project-card:hover .project-image::after,
.project-image:focus-visible::after {
  opacity: 0;
}

.project-card:hover .project-image img,
.project-image:focus-visible img {
  filter: none;
  transform: scale(1.045);
}

.project-topline {
  min-height: 23px;
}

.project-status {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 3px 8px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.status-live {
  color: var(--green);
}

.status-shadow {
  color: var(--amber);
}

.project-copy h3 {
  margin-top: 10px;
  font-size: clamp(19px, 2.3vw, 24px);
  line-height: 1.25;
}

.project-copy h3 a {
  transition: color 160ms ease;
}

.project-card:hover .project-copy h3 a,
.project-copy h3 a:hover {
  color: var(--accent-light);
}

.project-copy > p {
  max-width: 64ch;
  margin-top: 16px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.72;
}

.project-copy {
  padding: clamp(24px, 3.5vw, 42px);
}

.project-copy .tag-list {
  margin-top: 22px;
}

.project-actions {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-top: 22px;
}

.project-actions > a:first-child {
  color: var(--heading);
  font-size: 12.5px;
  font-weight: 680;
  box-shadow: inset 0 -1px 0 var(--accent);
}

.project-actions > a:first-child:hover {
  color: var(--accent-light);
}

.project-actions > a:last-child {
  color: var(--muted);
  transition: color 160ms ease, transform 160ms ease;
}

.project-actions > a:last-child:hover {
  color: var(--accent);
  transform: translateY(-2px);
}

.project-actions svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.compact-projects {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 28px;
}

.compact-projects article {
  min-height: 220px;
  padding: 26px;
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: 14px;
  transition: background-color 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.compact-projects article:hover {
  background: var(--surface);
  border-color: var(--line-strong);
  transform: translateY(-3px);
}

.compact-label,
.contact-kicker {
  color: var(--accent-light);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.compact-projects h3 {
  margin-top: 12px;
  font-size: 18px;
}

.compact-projects article > p:not(.compact-label) {
  max-width: 42ch;
  margin-top: 12px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.68;
}

.compact-projects .tag-list {
  margin-top: 20px;
}

.contact-panel {
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 14px;
  color: #ffffff;
}

.contact-panel .contact-kicker,
.contact-panel h2 {
  color: #ffffff;
}

.contact-panel__inner {
  display: flex;
  flex-direction: column;
  min-height: 260px;
  padding: 34px;
}

.contact-panel h2 {
  max-width: 18ch;
  margin-top: 11px;
  font-size: clamp(26px, 3.5vw, 38px);
  font-weight: 500;
  letter-spacing: -0.015em;
}

.contact-panel__copy > p:not(.contact-kicker) {
  max-width: 52ch;
  margin-top: 15px;
  color: rgba(255, 255, 255, 0.92);
}

.contact-panel__action {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: flex-start;
  gap: 10px 24px;
  margin-top: auto;
  padding-top: 34px;
  text-align: left;
}

.contact-panel__action > p {
  color: rgba(255, 255, 255, 0.92);
  font-size: 14px;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  margin-top: 0;
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 3px;
  transition: text-decoration-color 160ms ease;
}

.contact-link:hover {
  color: #ffffff;
  text-decoration-color: currentColor;
}

.home-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 44px 0 0;
  color: var(--faint);
  font-size: 12px;
}

/* Shared case-study pages */
.wrap {
  width: min(100% - 48px, 1120px);
  margin: 0 auto;
}

.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(8, 9, 12, 0.78);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px) saturate(150%);
}

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

.nav-name {
  color: var(--heading);
  font-size: 15px;
  font-weight: 720;
  letter-spacing: -0.015em;
  transition: color 160ms ease;
}

.nav-name:hover {
  color: var(--accent-light);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-left: auto;
}

.nav-links a {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: color 160ms ease;
}

.nav-links a:hover,
.nav-links a.on {
  color: var(--accent-light);
}

.nav-links .nav-icon-link {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  transition: color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.nav-links .nav-icon-link:hover {
  border-color: rgba(10, 102, 194, 0.45);
  transform: translateY(-2px);
}

.nav-icon-link svg {
  width: 17px;
  height: 17px;
  fill: currentColor;
}

.hero {
  padding: 96px 0 62px;
}

.hero .wrap {
  max-width: 900px;
}

.hero .role {
  margin-bottom: 19px;
  color: var(--accent-light);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 18ch;
  font-size: clamp(39px, 6vw, 68px);
  letter-spacing: -0.048em;
}

.hero .blurb {
  max-width: 62ch;
  margin-top: 22px;
  color: var(--text);
  font-size: 18px;
  line-height: 1.65;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin-top: 28px;
  color: var(--muted);
  font-size: 13px;
}

.meta-row a {
  color: var(--heading);
  box-shadow: inset 0 -1px 0 var(--accent);
  transition: color 160ms ease, box-shadow 160ms ease;
}

.meta-row a:hover {
  color: var(--accent-light);
  box-shadow: inset 0 -6px 0 rgba(10, 102, 194, 0.11);
}

.status {
  display: inline-block;
  padding: 3px 8px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 9px;
  letter-spacing: 0.08em;
  line-height: 1;
  vertical-align: 1px;
}

.s-live {
  color: var(--green);
}

.s-shadow {
  color: var(--amber);
}

.s-design {
  color: var(--muted);
}

.rule {
  border-top: 1px solid var(--line);
}

.prose {
  max-width: var(--article);
  padding-top: 66px;
  padding-bottom: 96px;
}

.prose > p:first-of-type {
  color: var(--text);
  font-size: 18px;
}

.prose p {
  margin-bottom: 17px;
  color: var(--text);
}

.prose h2 {
  margin: 58px 0 17px;
  font-size: clamp(25px, 3vw, 32px);
}

.prose h3 {
  margin: 35px 0 13px;
  font-size: 19px;
}

.prose strong,
.prose b {
  color: var(--heading);
  font-weight: 650;
}

.prose em {
  color: var(--heading);
}

.prose a {
  color: var(--accent-light);
  box-shadow: inset 0 -1px 0 rgba(10, 102, 194, 0.6);
}

.prose a:hover {
  color: var(--heading);
}

.prose ul,
.prose ol {
  margin: 0 0 20px 23px;
  color: var(--text);
}

.prose li {
  margin-bottom: 8px;
  padding-left: 3px;
}

.callout {
  margin: 25px 0;
  padding: 18px 21px;
  color: var(--heading);
  background: var(--accent-soft);
  border: 1px solid rgba(10, 102, 194, 0.19);
  border-left: 3px solid var(--accent);
  border-radius: 0 9px 9px 0;
}

/* Corridor engine walkthrough */
.corridor-story {
  --story-map-bg: #101218;
  --story-grid: rgba(255, 255, 255, 0.05);
  --story-grid-strong: rgba(255, 255, 255, 0.10);
  position: relative;
  left: 50%;
  width: min(1040px, calc(100vw - 48px));
  margin: 34px 0 58px;
  transform: translateX(-50%);
}

.corridor-story__header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 17px;
}

.prose .corridor-story__kicker {
  margin: 0 0 7px;
  color: var(--accent-light);
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 750;
  letter-spacing: 0.09em;
  line-height: 1.4;
  text-transform: uppercase;
}

.prose .corridor-story__header h2 {
  max-width: 23ch;
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
}

.corridor-story__toggle {
  min-width: 152px;
  min-height: 44px;
  padding: 10px 16px;
  color: var(--heading);
  background: var(--surface-strong);
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  cursor: pointer;
  font: 680 12px/1 var(--sans);
  transition: color 160ms ease, border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.corridor-story__toggle:hover,
.corridor-story__toggle[aria-pressed="true"] {
  color: var(--accent-light);
  background: var(--accent-soft);
  border-color: rgba(10, 102, 194, 0.42);
  transform: translateY(-2px);
}

.corridor-story__frame {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 520px;
  overflow: hidden;
  background: var(--surface-strong);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
}

.corridor-story__map {
  position: relative;
  min-width: 0;
  overflow: hidden;
  background: var(--story-map-bg);
  border-right: 1px solid var(--line);
  isolation: isolate;
}

.corridor-story__map svg {
  width: 100%;
  height: 100%;
}

.corridor-story__map-topline,
.corridor-story__map-note {
  position: absolute;
  left: 17px;
  right: 17px;
  z-index: 4;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  line-height: 1.35;
  pointer-events: none;
  text-transform: uppercase;
}

.corridor-story__map-topline {
  top: 16px;
}

.corridor-story__map-topline span,
.corridor-story__map-note span {
  padding: 2px 4px;
  background: rgba(16, 18, 24, 0.82);
}

.corridor-story__map-note {
  bottom: 14px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: none;
}

.story-map-field {
  fill: var(--story-map-bg);
}

.story-grid-line {
  fill: none;
  vector-effect: non-scaling-stroke;
}

.story-grid-line--minor {
  stroke: var(--story-grid);
  stroke-width: 1;
}

.story-grid-line--major {
  stroke: var(--story-grid-strong);
  stroke-width: 1;
}

.story-observation {
  opacity: 0;
}

.story-observation__dot {
  fill: var(--accent-light);
  stroke: var(--surface-strong);
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}

.story-observation__halo {
  fill: rgba(10, 102, 194, 0.09);
  stroke: rgba(10, 102, 194, 0.12);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.story-observation--low .story-observation__dot {
  fill: #7777df;
}

.story-observation--medium .story-observation__dot {
  fill: var(--accent);
}

.story-observation--high .story-observation__dot {
  fill: var(--accent-light);
}

.story-corridor,
.story-route {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.story-corridor--near {
  stroke: rgba(10, 102, 194, 0.3);
  opacity: 0;
}

.story-corridor--primary {
  stroke: rgba(10, 102, 194, 0.48);
  opacity: 0;
}

.story-route {
  stroke: var(--heading);
  stroke-width: 4;
  opacity: 0;
}

.story-endpoint {
  color: var(--surface-strong);
  opacity: 0;
}

.story-endpoint circle,
.story-endpoint rect {
  fill: var(--heading);
  stroke: var(--surface-strong);
  stroke-width: 3;
  vector-effect: non-scaling-stroke;
}

.story-endpoint text {
  fill: currentColor;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 800;
}

.story-hit {
  opacity: 0;
}

.story-hit__marker,
.story-hit__time-ring {
  vector-effect: non-scaling-stroke;
}

.story-hit--exact .story-hit__marker {
  fill: var(--accent-light);
  stroke: var(--surface-strong);
  stroke-width: 2;
}

.story-hit--near .story-hit__marker {
  fill: var(--surface-strong);
  stroke: var(--accent-light);
  stroke-width: 3;
}

.story-hit__time-ring {
  fill: none;
  stroke: var(--accent-light);
  stroke-width: 3;
  opacity: 0;
}

.corridor-story__hit-key {
  position: absolute;
  bottom: 42px;
  left: 17px;
  z-index: 4;
  display: flex;
  flex-wrap: wrap;
  gap: 9px 14px;
  max-width: 330px;
  color: var(--heading);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
}

.corridor-story__hit-key > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.hit-symbol {
  display: inline-block;
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
}

.hit-symbol--exact {
  background: var(--accent-light);
  border-radius: 50%;
}

.hit-symbol--near {
  background: var(--surface-strong);
  border: 2px solid var(--accent-light);
  border-radius: 2px;
}

.hit-symbol--timed {
  background: transparent;
  border: 2px solid var(--accent-light);
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(10, 102, 194, 0.11);
}

.corridor-story__rules {
  position: absolute;
  right: 17px;
  bottom: 45px;
  z-index: 5;
  width: min(250px, calc(100% - 34px));
  overflow: hidden;
  background: rgba(16, 18, 24, 0.94);
  border: 1px solid rgba(224, 165, 48, 0.32);
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  opacity: 0;
  pointer-events: none;
}

.corridor-story__rules > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  color: var(--heading);
  font-size: 11px;
}

.corridor-story__rules > div + div {
  border-top: 1px solid var(--line);
}

.corridor-story__rules span {
  color: var(--muted);
}

.corridor-story__rules strong {
  color: var(--amber);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.corridor-story__rules > div:last-child strong {
  color: var(--green);
}

.corridor-story__evidence {
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: 24px 22px 20px;
}

.corridor-story__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 22px;
}

.corridor-story__badge {
  display: inline-flex;
  align-items: center;
  min-height: 21px;
  padding: 4px 7px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.06em;
  line-height: 1;
  text-transform: uppercase;
}

.corridor-story__badge--real {
  color: var(--green);
}

.corridor-story__badge--replay {
  color: var(--accent-light);
}

.corridor-story[data-stage="1"] .corridor-story__badge--replay {
  opacity: 0;
  transform: translateY(3px);
}

.prose .corridor-story__stage-label {
  margin: 24px 0 9px;
  color: var(--accent-light);
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 750;
  letter-spacing: 0.07em;
  line-height: 1.3;
  text-transform: uppercase;
}

.prose .corridor-story__evidence h3 {
  margin: 0;
  font-size: 21px;
  line-height: 1.2;
}

.prose .corridor-story__stage-copy {
  margin: 11px 0 0;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.55;
}

.corridor-story__metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 20px;
}

.corridor-story__metrics > div {
  min-width: 0;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.corridor-story__metrics strong,
.corridor-story__metrics span {
  display: block;
}

.corridor-story__metrics strong {
  color: var(--heading);
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.25;
}

.corridor-story__metrics span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.3;
}

.corridor-story__output {
  display: none;
  margin-top: 17px;
  opacity: 0;
}

.corridor-story[data-stage="6"] .corridor-story__metrics {
  display: none;
}

.corridor-story[data-stage="6"] .corridor-story__output {
  display: block;
}

.corridor-story__output-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
}

.corridor-story__output-row strong {
  color: var(--heading);
  font-family: var(--mono);
  font-size: 10.5px;
  text-align: right;
}

.corridor-story__output-row strong.tone-amber {
  color: var(--amber);
}

.corridor-story__verdict {
  margin-top: 10px;
  padding: 12px 13px;
  background: rgba(240, 96, 122, 0.10);
  border-left: 3px solid var(--red);
}

.corridor-story__verdict span,
.corridor-story__verdict strong,
.corridor-story__verdict small {
  display: block;
}

.corridor-story__verdict span {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.corridor-story__verdict strong {
  margin-top: 3px;
  color: var(--red);
  font-size: 17px;
}

.corridor-story__verdict small {
  margin-top: 5px;
  color: var(--text);
  font-size: 10.5px;
  line-height: 1.35;
}

.prose .corridor-story__shadow-note {
  margin: auto 0 0;
  padding-top: 14px;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  line-height: 1.35;
  text-transform: uppercase;
}

.prose .corridor-story__steps {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.prose .corridor-story__steps li {
  margin: 0;
  padding: 0;
}

.corridor-story__steps button {
  width: 100%;
  min-height: 48px;
  padding: 8px 6px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-top: 2px solid var(--line);
  cursor: pointer;
  font: 650 11px/1.2 var(--sans);
  transition: color 150ms ease, border-color 150ms ease, background-color 150ms ease;
}

.corridor-story__steps button span {
  display: block;
  margin-bottom: 3px;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.05em;
}

.corridor-story__steps button:hover,
.corridor-story__steps button[aria-current="step"] {
  color: var(--accent-light);
  background: var(--accent-soft);
  border-color: var(--accent);
}

.corridor-story__steps button[aria-current="step"] span {
  color: var(--accent-light);
}

.prose .corridor-story > figcaption {
  margin-top: 13px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.58;
}

.prose .corridor-story > figcaption b {
  color: var(--heading);
}

figure.shot {
  max-width: 680px;
  margin: 30px auto 38px;
}

figure.shot img {
  width: 100%;
  height: auto;
  background: #ffffff;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
}

figure.shot-video {
  position: relative;
  left: 50%;
  width: min(1040px, calc(100vw - 48px));
  max-width: none;
  margin-top: 38px;
  margin-bottom: 48px;
  transform: translateX(-50%);
}

.shot-video__stage {
  position: relative;
  display: grid;
  min-height: 620px;
  padding: clamp(38px, 5vw, 66px);
  overflow: hidden;
  place-items: center;
  background:
    radial-gradient(circle at 72% 18%, rgba(61, 148, 230, 0.22), transparent 34%),
    radial-gradient(circle at 18% 86%, rgba(10, 102, 194, 0.28), transparent 38%),
    linear-gradient(125deg, #050a13 0%, #0a2038 52%, #0a66c2 100%);
  border: 1px solid var(--line-strong);
}

.shot-video__media {
  position: relative;
  z-index: 1;
  display: block;
  width: min(100%, 300px);
  height: auto;
  aspect-ratio: 9 / 16;
  background: #05060a;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  box-shadow: 0 24px 58px rgba(0, 0, 0, 0.5);
}

figure.shot-video figcaption,
.shot-video__transcript {
  width: min(100%, var(--article));
  margin-right: auto;
  margin-left: auto;
}

.shot-video__transcript {
  margin-top: 18px;
}

.shot-video__transcript summary {
  cursor: pointer;
  font-weight: 650;
}

.shot-video__transcript[open] summary {
  margin-bottom: 12px;
}

.prose .shot-video__transcript ol {
  margin-bottom: 0;
}

.prose .shot-video__transcript li:last-child {
  margin-bottom: 0;
}

figure.shot figcaption {
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

figure.shot-video figcaption {
  margin-top: 22px;
  font-size: 16px;
  line-height: 1.65;
}

figure.shot-diagram {
  max-width: 720px;
  margin-top: 34px;
}

figure.code {
  margin: 23px 0;
  overflow: hidden;
  background: var(--code-bg);
  border: 1px solid var(--line-strong);
  border-radius: 9px;
}

figure.code figcaption {
  padding: 11px 15px;
  color: var(--heading);
  background: var(--accent-pale);
  border-bottom: 1px solid var(--line-strong);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.07em;
  overflow-wrap: anywhere;
  text-transform: uppercase;
}

figure.code pre {
  padding: 17px;
  overflow-x: auto;
}

figure.code code {
  color: var(--code-text);
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.72;
}

code.inl {
  padding: 2px 5px;
  color: var(--accent-light);
  background: var(--accent-soft);
  border: 1px solid rgba(10, 102, 194, 0.12);
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 0.82em;
}

table.t {
  width: 100%;
  margin: 24px 0;
  border-collapse: collapse;
  font-size: 14px;
}

table.t th,
table.t td {
  padding: 12px 11px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

table.t th {
  color: var(--faint);
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

table.t td {
  color: var(--text);
}

table.t td:first-child {
  color: var(--heading);
  font-weight: 620;
}

footer:not(.home-footer) {
  padding: 38px 0 52px;
  background: var(--bg-deep);
  border-top: 1px solid var(--line);
}

.foot {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: var(--faint);
  font-size: 12.5px;
}

.foot a {
  color: var(--muted);
  transition: color 160ms ease;
}

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

.project-image img[src$="corridor-map.jpg"],
.project-card:hover .project-image img[src$="corridor-map.jpg"],
.project-image:focus-visible img[src$="corridor-map.jpg"],
figure.shot img[src$="corridor-map.jpg"] {
  filter: hue-rotate(180deg) saturate(0.82) contrast(1.02) brightness(0.98);
}

/* Responsive */
@media (max-width: 960px) {
  .site-shell {
    display: block;
    width: min(100% - 56px, 760px);
  }

  .profile-panel__inner {
    position: static;
    min-height: auto;
    padding: 72px 0 50px;
  }

  .profile-intro {
    max-width: 48ch;
  }

  .section-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 24px;
    margin-top: 38px;
  }

  .section-nav a {
    display: flex;
    gap: 7px;
    min-height: 44px;
  }

  .section-nav .nav-line {
    display: block;
    flex: 0 0 auto;
  }

  .profile-bottom {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-top: 36px;
  }

  .availability {
    margin-bottom: 0;
  }

  .content-panel {
    padding: 0 0 48px;
  }

  .content-section {
    padding-bottom: 88px;
    scroll-margin-top: 58px;
  }

  .section-heading {
    position: sticky;
    top: 0;
    z-index: 12;
    margin: 0 -28px 28px;
    padding: 17px 28px;
    background: rgba(8, 9, 12, 0.9);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(14px);
  }

  .project-card,
  .experience-card {
    margin-inline: 0;
  }

}

@media (max-width: 820px) {
  .corridor-story {
    width: calc(100vw - 32px);
  }

  .corridor-story__frame {
    grid-template-columns: 1fr;
    aspect-ratio: auto;
  }

  .corridor-story__map {
    aspect-ratio: 16 / 9;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .corridor-story__evidence {
    min-height: 390px;
  }

  .corridor-story[data-stage="6"] .corridor-story__rules {
    display: none;
  }

  .prose .corridor-story__steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .corridor-story__steps button {
    min-height: 52px;
  }
}

@media (max-width: 660px) {
  .page-glow {
    display: none;
  }

  .site-shell {
    width: min(100% - 40px, 760px);
  }

  .profile-panel__inner {
    padding-top: 58px;
  }

  .profile-name {
    font-size: clamp(38px, 12vw, 48px);
  }

  .profile-role {
    font-size: 16px;
  }

  .profile-bottom {
    display: block;
  }

  .availability {
    margin-bottom: 22px;
  }

  .section-heading {
    margin-inline: -20px;
    padding-inline: 20px;
  }

  .experience-card {
    display: block;
    padding: 20px 15px;
  }

  .experience-date {
    margin-bottom: 9px;
  }

  .project-card {
    display: block;
    padding: 0;
  }

  .project-image {
    width: 100%;
    height: 190px;
    margin-bottom: 0;
  }

  .project-copy {
    padding: 24px 20px 26px;
  }

  .compact-projects {
    grid-template-columns: 1fr;
  }

  .contact-panel__inner {
    min-height: 0;
    padding: 27px 23px;
  }

  .contact-panel__action {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    text-align: left;
  }

  figure.shot-video {
    width: calc(100vw - 24px);
    margin-top: 30px;
  }

  .shot-video__stage {
    min-height: 0;
    padding: 26px;
  }

  .shot-video__media {
    width: min(100%, 260px);
  }

  .home-footer {
    display: block;
  }

  .home-footer p + p {
    margin-top: 4px;
  }

  .wrap {
    width: min(100% - 36px, 1120px);
  }

  .nav-inner {
    min-height: 58px;
  }

  .nav-links {
    gap: 13px;
  }

  .nav-links a {
    font-size: 9px;
  }

  .nav-links .nav-icon-link {
    width: 40px;
    height: 40px;
  }

  .hero {
    padding: 70px 0 48px;
  }

  .hero h1 {
    font-size: clamp(38px, 11.5vw, 54px);
  }

  .hero .blurb {
    font-size: 16.5px;
  }

  .prose {
    padding-top: 48px;
    padding-bottom: 72px;
  }

  .prose > p:first-of-type {
    font-size: 16.5px;
  }

  .prose h2 {
    margin-top: 45px;
  }

  .corridor-story {
    width: calc(100vw - 32px);
  }

  .corridor-story__header {
    align-items: flex-start;
  }

  .corridor-story__frame {
    grid-template-columns: 1fr;
    aspect-ratio: auto;
  }

  .corridor-story__map {
    aspect-ratio: 4 / 3;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .corridor-story[data-stage="6"] .corridor-story__rules {
    display: none;
  }

  .corridor-story__evidence {
    min-height: 390px;
  }

  .prose .corridor-story__steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .corridor-story__steps button {
    min-height: 52px;
  }

  .prose table.t {
    display: block;
    overflow-x: auto;
    white-space: normal;
  }

  table.t th,
  table.t td {
    min-width: 125px;
  }

  .foot {
    display: block;
  }

  .foot > div + div {
    margin-top: 7px;
  }
}

@media (max-width: 560px) {
  .nav-links a:not(.nav-icon-link):not(.on) {
    display: none;
  }

  .nav-links .nav-icon-link {
    width: 44px;
    height: 44px;
  }

  .corridor-story__header {
    display: block;
  }

  .corridor-story__toggle {
    width: 100%;
    margin-top: 14px;
  }

  .corridor-story__map-topline span:last-child {
    display: none;
  }

  .corridor-story__map-note span:first-child {
    display: none;
  }

  .corridor-story__rules {
    right: 12px;
    bottom: 40px;
    width: min(220px, calc(100% - 24px));
  }

  .corridor-story__hit-key {
    bottom: 39px;
    left: 12px;
    max-width: 180px;
  }
}

@media (max-width: 470px) {
  .nav-name {
    max-width: 120px;
    line-height: 1.15;
  }

  .nav-links a:not(.nav-icon-link):not(.on) {
    display: none;
  }
}

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

  .page-glow {
    background: linear-gradient(135deg, rgba(10, 102, 194, 0.03), transparent 45%);
  }
}

/* OnisAI editorial case-study layout. Keep the homepage card system scoped
   to the home page; project pages use the same generous reading proportions
   as the Corridor Engine case study without changing the shared palette. */
.onisai-case {
  --presentation-width: clamp(720px, 60vw, 1136px);
  --reading-column: 640px;
  --reading-surface: #101116;
  --reading-border: #262a34;
  --reading-pad: clamp(24px, 3.5vw, 48px);
}

.onisai-case .hero {
  padding: 64px 24px 0;
}

.onisai-case .hero > .wrap,
.onisai-case main > .prose,
.onisai-case footer > .foot {
  width: 100%;
  max-width: var(--presentation-width);
  margin-right: auto;
  margin-left: auto;
}

.onisai-case .hero > .wrap {
  padding: var(--reading-pad);
}

.onisai-case .hero .role {
  margin-top: 0;
}

.onisai-case .hero h1 {
  max-width: 20ch;
  font-size: clamp(36px, 4.1vw, 60px);
}

.onisai-case .hero .blurb {
  max-width: 66ch;
}

.onisai-case main.rule {
  padding-top: 64px;
  border-top: 0;
}

.onisai-case main > .prose {
  padding: var(--reading-pad);
}

.onisai-case .prose > p:first-of-type,
.onisai-case .prose > p:not(:first-of-type),
.onisai-case .prose > h2,
.onisai-case .prose > h3,
.onisai-case .prose > .callout,
.onisai-case .prose > figure.code {
  width: min(100%, var(--reading-column));
  max-width: var(--reading-column);
  margin-right: auto;
  margin-left: auto;
}

.onisai-case .prose > p:first-of-type {
  margin-top: 0;
}

.onisai-case .prose h2 {
  margin-top: 64px;
}

.onisai-case .prose h3 {
  margin-top: 38px;
}

.onisai-case .prose > .callout {
  margin-top: 32px;
  margin-bottom: 32px;
  border-left-width: 1px;
  border-radius: 12px;
}

.onisai-case figure.shot-video {
  position: relative;
  left: auto;
  width: min(100%, 760px);
  max-width: none;
  margin: 56px auto 64px;
  transform: none;
  border: 1px solid var(--reading-border);
  border-radius: 16px;
  overflow: hidden;
  background: var(--reading-surface);
}

.onisai-case .shot-video__stage {
  min-height: 0;
  padding: clamp(32px, 4vw, 48px);
  border: 0;
}

.onisai-case .shot-video__media {
  width: min(100%, 260px);
}

.onisai-case figure.shot-video figcaption,
.onisai-case .shot-video__transcript {
  width: min(100% - 48px, 66ch);
}

.onisai-case figure.shot-video figcaption {
  margin-top: 0;
  padding-top: 28px;
  padding-bottom: 4px;
}

.onisai-case .shot-video__transcript {
  margin-top: 24px;
  margin-bottom: 28px;
}

.onisai-case figure.code {
  margin-top: 28px;
  margin-bottom: 28px;
}

.onisai-case footer {
  padding: 0 24px 32px;
  background: transparent;
  border-top: 0;
}

.onisai-case footer > .foot {
  padding: 24px var(--reading-pad);
}

@media (max-width: 600px) {
  .onisai-case .hero {
    padding: 32px 16px 0;
  }

  .onisai-case .hero > .wrap {
    padding: 24px;
  }

  .onisai-case main.rule {
    padding-top: 32px;
  }

  .onisai-case main > .prose {
    width: calc(100% - 32px);
    padding: 24px 20px;
  }

  .onisai-case .hero h1 {
    font-size: clamp(31px, 8.2vw, 39px);
  }

  .onisai-case .shot-video__stage {
    min-height: 0;
    padding: 26px;
  }

  .onisai-case .shot-video__media {
    width: min(100%, 260px);
  }

  .onisai-case figure.shot-video figcaption,
  .onisai-case .shot-video__transcript {
    width: calc(100% - 40px);
  }

  .onisai-case footer {
    padding-right: 16px;
    padding-left: 16px;
  }
}
