:root {
  color-scheme: light dark;
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  --font-mono: "SFMono-Regular", "SF Mono", ui-monospace, Menlo, Consolas, monospace;
  --bg: #e9eaec;
  --surface: #ffffff;
  --surface-muted: #f5f5f7;
  --surface-hover: #eceef2;
  --sidebar: rgba(245, 245, 247, 0.92);
  --toolbar: rgba(255, 255, 255, 0.9);
  --text: #1d1d1f;
  --text-secondary: #626267;
  --text-tertiary: #84848a;
  --line: rgba(29, 29, 31, 0.13);
  --line-strong: rgba(29, 29, 31, 0.22);
  --accent: #0a66d8;
  --accent-hover: #0759bd;
  --accent-soft: rgba(10, 102, 216, 0.1);
  --primary-fill: #0a66d8;
  --primary-fill-hover: #0759bd;
  --success: #198754;
  --success-soft: rgba(25, 135, 84, 0.11);
  --warning: #9a6700;
  --warning-soft: rgba(154, 103, 0, 0.12);
  --danger: #c9362b;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.12), 0 1px 3px rgba(0, 0, 0, 0.08);
  --radius: 8px;
  --control-radius: 6px;
  --sidebar-width: 248px;
  --toolbar-height: 56px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101113;
    --surface: #1b1c1f;
    --surface-muted: #222327;
    --surface-hover: #2b2d32;
    --sidebar: rgba(31, 32, 36, 0.93);
    --toolbar: rgba(27, 28, 31, 0.92);
    --text: #f5f5f7;
    --text-secondary: #b6b6bc;
    --text-tertiary: #8e8e95;
    --line: rgba(255, 255, 255, 0.11);
    --line-strong: rgba(255, 255, 255, 0.2);
    --accent: #5aa5ff;
    --accent-hover: #7ab7ff;
    --accent-soft: rgba(90, 165, 255, 0.14);
    --success: #44c17a;
    --success-soft: rgba(68, 193, 122, 0.13);
    --warning: #f0b44d;
    --warning-soft: rgba(240, 180, 77, 0.13);
    --danger: #ff6961;
    --shadow: 0 22px 60px rgba(0, 0, 0, 0.38), 0 1px 2px rgba(0, 0, 0, 0.5);
  }
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.55;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
}

body,
button,
input {
  font-family: var(--font-sans);
}

img,
video {
  display: block;
  max-width: 100%;
}

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

a.inline-link {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

button {
  color: inherit;
}

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

:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 75%, white);
  outline-offset: 2px;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: var(--control-radius);
  background: var(--text);
  color: var(--surface);
  transform: translateY(-150%);
}

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

.portfolio-app {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  width: min(1600px, calc(100vw - 32px));
  height: calc(100vh - 32px);
  min-height: 640px;
  margin: 16px auto;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.sidebar {
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: 20px 12px 16px;
  overflow: auto;
  border-right: 1px solid var(--line);
  background: var(--sidebar);
  backdrop-filter: saturate(145%) blur(24px);
  -webkit-backdrop-filter: saturate(145%) blur(24px);
}

.identity {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 0 8px 16px;
}

.avatar {
  width: 56px;
  height: 56px;
  object-fit: contain;
}

.identity-name,
.identity-role {
  display: block;
  margin: 0;
}

.identity-name {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
}

.identity-role {
  margin-top: 3px;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.35;
}

.section-nav,
.project-rail nav {
  display: grid;
  gap: 2px;
}

.nav-label,
.rail-label,
.eyebrow,
.metric-label,
.meta-label,
.media-caption,
.timeline-date {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0;
  text-transform: uppercase;
}

.nav-label,
.rail-label {
  margin: 14px 10px 6px;
  color: var(--text-tertiary);
}

.nav-link,
.project-rail a {
  display: flex;
  min-width: 0;
  min-height: 36px;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: var(--control-radius);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 550;
}

.nav-link svg,
.project-rail svg,
.icon-button svg,
.button svg,
.text-link svg,
.project-arrow svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-link:hover,
.project-rail a:hover {
  background: var(--surface-hover);
  color: var(--text);
}

.nav-link[aria-current="page"],
.nav-link[aria-current="location"],
.project-rail a[aria-current="page"] {
  background: var(--accent-soft);
  color: var(--accent);
}

.sidebar-meta {
  display: grid;
  gap: 10px;
  margin-top: auto;
  padding: 20px 8px 0;
}

.availability {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.4;
}

.status-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  margin-top: 4px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 3px var(--success-soft);
}

.sidebar-links {
  display: flex;
  gap: 12px;
  color: var(--text-tertiary);
  font-family: var(--font-mono);
  font-size: 11px;
}

.sidebar-links a:hover {
  color: var(--accent);
}

.workspace {
  display: grid;
  min-width: 0;
  min-height: 0;
  grid-template-rows: var(--toolbar-height) minmax(0, 1fr);
  background: var(--surface);
}

.toolbar {
  position: relative;
  z-index: 20;
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 16px 0 20px;
  border-bottom: 1px solid var(--line);
  background: var(--toolbar);
  backdrop-filter: saturate(145%) blur(20px);
  -webkit-backdrop-filter: saturate(145%) blur(20px);
}

.toolbar-title {
  min-width: 0;
  overflow: hidden;
  font-size: 14px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.toolbar-actions,
.hero-actions,
.case-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.button,
.icon-button {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid var(--line-strong);
  border-radius: var(--control-radius);
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  font-weight: 620;
  cursor: pointer;
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease, transform 150ms ease;
}

.button {
  padding: 8px 12px;
}

.icon-button {
  position: relative;
  width: 36px;
  padding: 0;
}

.button:hover,
.icon-button:hover {
  border-color: var(--line-strong);
  background: var(--surface-hover);
}

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

.button-primary {
  border-color: var(--primary-fill);
  background: var(--primary-fill);
  color: #ffffff;
}

.button-primary:hover {
  border-color: var(--primary-fill-hover);
  background: var(--primary-fill-hover);
}

.icon-button[data-tooltip]::after {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 30;
  padding: 5px 7px;
  border-radius: 4px;
  background: var(--text);
  color: var(--surface);
  content: attr(data-tooltip);
  font-size: 11px;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-2px);
  transition: opacity 120ms ease, transform 120ms ease;
  white-space: nowrap;
}

.icon-button[data-tooltip]:hover::after,
.icon-button[data-tooltip]:focus-visible::after {
  opacity: 1;
  transform: translateY(0);
}

.content-scroll {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
}

.content-view {
  width: min(1120px, 100%);
  min-height: 100%;
  margin: 0 auto;
  padding: clamp(36px, 6vw, 76px) clamp(24px, 6vw, 80px) 80px;
}

.js .content-view:not(.is-active) {
  display: none;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(28px, 6vw, 72px);
  align-items: start;
}

.hero-copy h1,
.section-heading h2,
.case-hero h1 {
  margin: 0;
  max-width: 19ch;
  font-size: clamp(34px, 5vw, 62px);
  font-weight: 690;
  line-height: 1.04;
  letter-spacing: 0;
}

.hero-copy .lede,
.case-hero .lede {
  max-width: 760px;
  margin: 22px 0 0;
  color: var(--text-secondary);
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.55;
}

.hero-copy .availability-line {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 20px 0 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 620;
}

.mobile-lede,
.mobile-proof {
  display: none;
}

.hero-actions {
  flex-wrap: wrap;
  margin-top: 28px;
}

.proof-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: clamp(44px, 8vw, 88px);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.proof-item {
  min-width: 0;
  padding: 18px 18px 20px 0;
}

.proof-item + .proof-item {
  padding-left: 18px;
  border-left: 1px solid var(--line);
}

.proof-value {
  display: block;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.1;
}

.proof-label {
  display: block;
  margin-top: 6px;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.4;
}

.about-note {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
  margin-top: 48px;
}

.about-note h2,
.project-card h3,
.timeline-item h3,
.case-section h2,
.case-section h3 {
  margin: 0;
  line-height: 1.25;
}

.about-note h2 {
  font-size: 17px;
}

.about-note p,
.timeline-item p,
.case-section p,
.case-section li {
  color: var(--text-secondary);
}

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

.section-heading h2 {
  font-size: clamp(30px, 4vw, 48px);
}

.section-heading p {
  max-width: 48ch;
  margin: 0;
  color: var(--text-secondary);
}

.project-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--line);
}

.project-card {
  display: grid;
  min-width: 0;
  grid-template-rows: auto 1fr auto;
  gap: 16px;
  padding: 24px 24px 28px 0;
  border-bottom: 1px solid var(--line);
}

.project-card:nth-child(even) {
  padding-right: 0;
  padding-left: 24px;
  border-left: 1px solid var(--line);
}

.project-card:hover h3 {
  color: var(--accent);
}

.project-topline,
.project-footer,
.case-kicker-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.project-type,
.project-result,
.case-tag {
  color: var(--text-tertiary);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 650;
  text-transform: uppercase;
}

.project-result {
  color: var(--success);
  text-align: right;
}

.project-card h3 {
  font-size: 23px;
}

.project-card p {
  margin: 8px 0 0;
  color: var(--text-secondary);
}

.project-stack {
  color: var(--text-tertiary);
  font-family: var(--font-mono);
  font-size: 11px;
}

.project-arrow {
  display: inline-flex;
  color: var(--accent);
}

.timeline {
  position: relative;
  border-top: 1px solid var(--line);
}

.timeline-item {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 28px;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}

.timeline-date {
  color: var(--text-tertiary);
}

.timeline-item h3 {
  font-size: 19px;
}

.timeline-role {
  margin: 4px 0 0;
  color: var(--accent);
  font-size: 13px;
  font-weight: 620;
}

.timeline-item p:last-child {
  max-width: 68ch;
  margin-bottom: 0;
}

.resume-layout,
.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.65fr);
  gap: 56px;
  align-items: start;
}

.resume-facts {
  display: grid;
  border-top: 1px solid var(--line);
}

.resume-fact {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 18px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}

.resume-fact dt {
  color: var(--text-tertiary);
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
}

.resume-fact dd {
  margin: 0;
}

.contact-address {
  display: block;
  margin-top: 18px;
  color: var(--accent);
  font-size: clamp(20px, 3vw, 30px);
  font-weight: 650;
  overflow-wrap: anywhere;
}

.contact-links {
  display: grid;
  border-top: 1px solid var(--line);
}

.contact-links a,
.contact-links button {
  display: flex;
  width: 100%;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: none;
  color: var(--text);
  font-size: 14px;
  text-align: left;
  cursor: pointer;
}

.contact-links a:hover,
.contact-links button:hover {
  color: var(--accent);
}

.live-region {
  position: fixed;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Case studies */
.case-content-scroll {
  overflow: hidden;
}

.case-layout {
  display: grid;
  height: 100%;
  min-height: 0;
  grid-template-columns: 220px minmax(0, 1fr) 252px;
}

.project-rail,
.case-inspector {
  min-width: 0;
  overflow: auto;
  background: var(--surface-muted);
}

.project-rail {
  padding: 18px 10px;
  border-right: 1px solid var(--line);
}

.project-rail a {
  align-items: flex-start;
  min-height: 48px;
  line-height: 1.35;
}

.rail-index {
  min-width: 20px;
  color: var(--text-tertiary);
  font-family: var(--font-mono);
  font-size: 10px;
}

.case-content {
  min-width: 0;
  overflow: auto;
  padding: clamp(36px, 5vw, 64px) clamp(26px, 5vw, 68px) 80px;
}

.case-article {
  width: min(820px, 100%);
  margin: 0 auto;
}

.case-hero h1 {
  max-width: 16ch;
  font-size: clamp(38px, 5vw, 64px);
}

.case-kicker-row {
  justify-content: flex-start;
  margin-bottom: 14px;
}

.case-tag {
  padding: 4px 7px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
}

.case-status {
  color: var(--success);
}

.case-status.release {
  color: var(--warning);
}

.case-actions {
  flex-wrap: wrap;
  margin-top: 24px;
}

.case-proof-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 40px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.case-proof {
  padding: 16px 14px 18px 0;
}

.case-proof + .case-proof {
  padding-left: 14px;
  border-left: 1px solid var(--line);
}

.case-proof strong {
  display: block;
  font-size: 21px;
  line-height: 1.1;
}

.case-proof span {
  display: block;
  margin-top: 5px;
  color: var(--text-secondary);
  font-size: 11px;
  line-height: 1.35;
}

.case-section {
  padding-top: 54px;
}

.case-section h2 {
  font-size: 27px;
}

.case-section h3 {
  margin-top: 28px;
  font-size: 18px;
}

.case-section p,
.case-section li {
  max-width: 70ch;
}

.case-section ul {
  margin: 14px 0 0;
  padding-left: 20px;
}

.decision-list {
  display: grid;
  margin-top: 22px;
  border-top: 1px solid var(--line);
}

.decision {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 22px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.decision h3 {
  margin: 0;
  font-size: 15px;
}

.decision p {
  margin: 0;
}

.media-frame {
  margin: 28px 0 0;
}

.media-frame picture,
.media-frame > img {
  display: block;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface-muted);
}

.media-frame img {
  width: 100%;
  height: auto;
}

.media-caption {
  margin: 9px 0 0;
  color: var(--text-tertiary);
  line-height: 1.45;
  text-transform: none;
}

.media-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 28px;
}

.media-strip .media-frame {
  margin: 0;
}

.media-strip picture {
  aspect-ratio: 0.46;
}

.media-strip img {
  height: 100%;
  object-fit: cover;
}

.evidence-note,
.limitation-note {
  margin-top: 24px;
  padding: 16px 18px;
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--control-radius) var(--control-radius) 0;
  background: var(--accent-soft);
}

.limitation-note {
  border-left-color: var(--warning);
  background: var(--warning-soft);
}

.evidence-note strong,
.limitation-note strong {
  display: block;
  margin-bottom: 4px;
}

.evidence-note p,
.limitation-note p {
  margin: 0;
}

.case-inspector {
  padding: 22px 18px;
  border-left: 1px solid var(--line);
}

.inspector-title {
  margin: 0 0 18px;
  font-size: 13px;
  font-weight: 650;
}

.meta-list {
  display: grid;
  margin: 0;
}

.meta-item {
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.meta-label {
  display: block;
  color: var(--text-tertiary);
}

.meta-value {
  display: block;
  margin-top: 4px;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.45;
}

.inline-inspector {
  display: none;
  margin-top: 32px;
}

.benchmark {
  display: grid;
  gap: 14px;
  margin-top: 26px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-muted);
}

.benchmark-row {
  display: grid;
  grid-template-columns: 170px minmax(120px, 1fr) 54px;
  gap: 12px;
  align-items: center;
}

.benchmark-label,
.benchmark-value {
  font-family: var(--font-mono);
  font-size: 11px;
}

.benchmark-value {
  color: var(--text-secondary);
  text-align: right;
}

.benchmark-track {
  height: 12px;
  overflow: hidden;
  border-radius: 3px;
  background: var(--line);
}

.benchmark-bar {
  height: 100%;
  border-radius: 3px;
  background: var(--accent);
}

.case-next {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.case-next span {
  color: var(--text-tertiary);
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
}

.case-next strong {
  display: block;
  margin-top: 4px;
}

.not-found {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
}

.not-found main {
  width: min(560px, 100%);
}

.not-found h1 {
  margin: 0;
  font-size: clamp(42px, 8vw, 76px);
}

.not-found p {
  color: var(--text-secondary);
  font-size: 18px;
}

@media (max-width: 1180px) {
  :root {
    --sidebar-width: 224px;
  }

  .portfolio-app {
    width: calc(100vw - 20px);
    height: calc(100vh - 20px);
    margin: 10px;
  }

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

  .case-inspector {
    display: none;
  }

  .inline-inspector {
    display: block;
  }
}

@media (max-width: 900px) {
  :root {
    --sidebar-width: 204px;
  }

  .proof-grid,
  .case-proof-grid {
    grid-template-columns: 1fr 1fr;
  }

  .proof-item:nth-child(3),
  .proof-item:nth-child(4),
  .case-proof:nth-child(3),
  .case-proof:nth-child(4) {
    border-top: 1px solid var(--line);
  }

  .proof-item:nth-child(3),
  .case-proof:nth-child(3) {
    padding-left: 0;
    border-left: 0;
  }

  .project-grid,
  .resume-layout,
  .contact-layout,
  .about-note {
    grid-template-columns: 1fr;
  }

  .project-card,
  .project-card:nth-child(even) {
    padding: 22px 0;
    border-left: 0;
  }

  .section-heading {
    display: grid;
  }
}

@media (max-width: 760px) {
  body {
    background: var(--surface);
  }

  .portfolio-app {
    display: block;
    width: 100%;
    height: auto;
    min-height: 100vh;
    margin: 0;
    overflow: visible;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 50;
    display: block;
    padding: 8px 12px 0;
    overflow: visible;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .identity {
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 10px;
    padding: 0 4px 8px;
  }

  .avatar {
    width: 44px;
    height: 44px;
  }

  .identity-name {
    font-size: 15px;
  }

  .identity-role {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
  }

  .nav-label,
  .sidebar-meta {
    display: none;
  }

  .section-nav {
    display: flex;
    gap: 2px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .section-nav::-webkit-scrollbar {
    display: none;
  }

  .nav-link {
    min-width: max-content;
    min-height: 44px;
    padding: 9px 11px;
  }

  .nav-link svg {
    display: none;
  }

  .workspace {
    display: block;
  }

  .home-page .toolbar {
    display: none;
  }

  .toolbar {
    position: sticky;
    top: 97px;
    height: 50px;
    padding: 0 12px 0 16px;
  }

  .toolbar-actions .icon-button {
    display: none;
  }

  .toolbar .button {
    min-height: 36px;
  }

  .content-scroll,
  .case-content-scroll {
    overflow: visible;
  }

  .content-view {
    min-height: 0;
    padding: 32px 20px 68px;
  }

  .hero-grid {
    display: block;
  }

  .hero-copy h1 {
    max-width: 18ch;
    font-size: clamp(34px, 10vw, 46px);
  }

  .hero-copy .lede {
    margin-top: 16px;
    font-size: 16px;
    line-height: 1.5;
  }

  .hero-copy .availability-line {
    margin-top: 14px;
  }

  .mobile-proof {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 7px;
    margin: 12px 0 0;
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 11px;
  }

  .hero-actions {
    margin-top: 20px;
  }

  .hero-actions .button {
    min-height: 44px;
  }

  .proof-grid {
    margin-top: 28px;
  }

  .proof-item {
    padding: 14px 12px 15px 0;
  }

  .proof-item + .proof-item {
    padding-left: 12px;
  }

  .proof-value {
    font-size: 20px;
  }

  .about-note {
    gap: 8px;
    margin-top: 30px;
  }

  .section-heading {
    margin-bottom: 24px;
  }

  .section-heading h2 {
    font-size: 34px;
  }

  .timeline-item,
  .decision {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .resume-fact {
    grid-template-columns: 92px 1fr;
  }

  .case-layout {
    display: block;
    height: auto;
  }

  .project-rail {
    position: sticky;
    top: 147px;
    z-index: 15;
    padding: 6px 12px;
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .project-rail .rail-label {
    display: none;
  }

  .project-rail nav {
    display: flex;
    gap: 4px;
    width: max-content;
  }

  .project-rail a {
    min-height: 44px;
    align-items: center;
    padding: 8px 10px;
    white-space: nowrap;
  }

  .rail-index {
    display: none;
  }

  .case-content {
    overflow: visible;
    padding: 36px 20px 70px;
  }

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

  .case-hero .lede {
    font-size: 17px;
  }

  .case-proof-grid {
    margin-top: 28px;
  }

  .media-strip {
    gap: 8px;
  }

  .benchmark {
    padding: 16px 12px;
  }

  .benchmark-row {
    grid-template-columns: 1fr 46px;
  }

  .benchmark-track {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .case-next {
    align-items: flex-start;
  }
}

@media (max-width: 420px) {
  .toolbar-title {
    max-width: 110px;
  }

  .button span.optional-label {
    display: none;
  }

  .proof-label,
  .case-proof span {
    font-size: 10px;
  }

  .project-topline {
    align-items: flex-start;
  }

  .project-result {
    max-width: 16ch;
  }
}

@media (max-width: 360px) {
  .content-view {
    padding: 24px 16px 60px;
  }

  .hero-copy h1 {
    font-size: 32px;
    line-height: 1;
  }

  .hero-copy .lede {
    display: none;
  }

  .mobile-lede {
    display: block;
    margin: 12px 0 0;
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.42;
  }

  .hero-copy .availability-line {
    margin-top: 10px;
    font-size: 13px;
  }

  .mobile-proof {
    margin-top: 8px;
  }

  .hero-actions {
    margin-top: 14px;
  }

  .hero-actions .secondary-action {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media print {
  body {
    background: #ffffff;
  }

  .portfolio-app {
    display: block;
    width: 100%;
    height: auto;
    margin: 0;
    border: 0;
    box-shadow: none;
  }

  .sidebar,
  .toolbar,
  .project-rail,
  .case-inspector {
    display: none;
  }

  .workspace,
  .case-layout {
    display: block;
  }

  .content-view,
  .case-content {
    display: block !important;
    padding: 24px;
  }
}
