/* Connection language: short distances, deliberate sequence, a quiet return to structure. */
:root {
  --connect-ease: cubic-bezier(.16, 1, .3, 1);
  --ease-out-expo: cubic-bezier(.16, 1, .3, 1);
  --ease-out-quart: cubic-bezier(.25, 1, .5, 1);
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);
  --dur-micro: 180ms;
  --dur-ui: 300ms;
  --dur-section: 650ms;
}

.hero-copy, .connection-art, .art-path, .signal { animation: none; }
.hero { position: relative; isolation: isolate; }
.hero > :not(.system-field) { position: relative; z-index: 1; }
.system-field { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }
.hero-phrase, .orange-dot { display: inline-block; }
.connection-art svg { transform: translate(var(--art-x,0px),var(--art-y,0px)); }
.signal-pointer { transform: translate(var(--signal-x,0px),var(--signal-y,0px)); }
.signal { transform-box: fill-box; transform-origin: center; }

@keyframes signal-node-pulse {
  0%, 100% { filter: drop-shadow(0 0 0 rgba(255,90,54,0)); }
  50% { filter: drop-shadow(0 0 8px rgba(255,90,54,0.4)); }
}
.signal.is-connected {
  animation: signal-node-pulse 2.8s var(--ease-in-out) infinite;
}

/* Static paper grain: one tiny repeated tile, no SVG filter or composited overlay. */
body { background-image: url('assets/paper-grain.png'); }
.skip-link:not(:focus) { clip-path:inset(100%); }

/* Header & Navigation Micro-interactions */
.header {
  transition: background-color 280ms var(--ease-out-expo), border-color 280ms var(--ease-out-expo), box-shadow 280ms var(--ease-out-expo);
}
.header.is-scrolled {
  background: rgba(243, 240, 233, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(20, 20, 26, 0.08);
  box-shadow: 0 4px 16px -4px rgba(20, 20, 26, 0.04);
}
.header nav > a:not(.button) {
  position: relative;
  transition: color 180ms var(--ease-out-expo);
}
.header nav > a:not(.button)::before {
  content: '';
  position: absolute;
  bottom: 8px;
  left: -8px;
  width: 3px;
  height: 3px;
  background: var(--orange);
  opacity: 0;
  transform: scale(0);
  transition: transform 180ms var(--ease-out-expo), opacity 180ms var(--ease-out-expo);
}
.header nav > a:not(.button):hover::before {
  opacity: 1;
  transform: scale(1);
}
.header nav > a:not(.button)::after {
  transition: width 240ms var(--ease-out-expo) !important;
}

/* Mechanical Button Transitions */
.button-dark {
  position: relative;
  overflow: hidden;
  z-index: 1;
}
.button-dark::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--blue);
  z-index: -1;
  transform: translateY(100%);
  transition: transform 260ms var(--ease-out-expo);
}
.button-dark:hover::before {
  transform: translateY(0);
}
.button-dark span {
  display: inline-block;
  transition: transform 200ms var(--ease-out-expo);
}
.button-dark:hover span {
  transform: translate(3px, -3px);
}

.button-light {
  position: relative;
  overflow: hidden;
  z-index: 1;
}
.button-light::before {
  content: '';
  position: absolute;
  inset: 0;
  background: #ffffff;
  z-index: -1;
  clip-path: inset(0 100% 0 0);
  transition: clip-path 280ms var(--ease-out-expo);
}
.button-light:hover::before {
  clip-path: inset(0 0 0 0);
}
.button-light::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--orange);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 320ms var(--ease-out-expo);
}
.button-light:hover::after {
  transform: scaleX(1);
}
.button-light span {
  display: inline-block;
  transition: transform 200ms var(--ease-out-expo);
}
.button-light:hover span {
  transform: translate(3px, -3px);
}

.text-link span {
  display: inline-block;
  transition: transform 200ms var(--ease-out-expo);
}
.text-link:hover span {
  transform: translate(3px, -3px);
}

/* Intro masked line reveal */
.line-mask {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
}
.line-inner {
  display: inline-block;
  transform: translateY(0);
  transition: transform 700ms var(--ease-out-expo), opacity 700ms var(--ease-out-expo);
}
.intro.motion-pending .line-inner {
  transform: translateY(105%);
  opacity: 0.15;
}
.intro-copy {
  transition: opacity 600ms var(--ease-out-expo) 140ms, transform 600ms var(--ease-out-expo) 140ms;
}
.intro.motion-pending .intro-copy {
  opacity: 0.25;
  transform: translateY(12px);
}

/* Workflow System Visualization */
.workflow-track li::before { border-color: var(--rule); }
.connection-line { position: absolute; left: 38px; right: 0; top: 17px; height: 1px; background: var(--blue); transform-origin: left center; pointer-events: none; }
.workflow-track li:last-child .connection-line { display: none; }
.workflow.before .connection-line { display: none; }
.workflow.before .node-number { background: var(--slate); }
.workflow.motion-pending:not(.before) .connection-line { transform:scaleX(0); }
.workflow.motion-pending:not(.before) .node-number { background:#e7e3da; color:var(--slate); }

.workflow-track li {
  transition: transform 200ms var(--ease-out-expo);
}
@media (hover: hover) and (pointer: fine) {
  .workflow-track li:hover .node-number {
    transform: scale(1.08);
    box-shadow: 0 0 0 4px rgba(27, 63, 224, 0.16);
  }
  .workflow-track li:hover h4 {
    color: var(--blue);
    transition: color 180ms var(--ease-out-expo);
  }
}

/* Services section interaction */
.service-list details { position: relative; transition: border-color 220ms var(--ease-out-expo); }
.service-list details::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 0;
  height: 1px;
  background: var(--orange);
  transition: width 340ms var(--ease-out-expo);
  pointer-events: none;
}
.service-list summary h3, .service-list .service-number, .service-list .expand { transition: transform 220ms var(--ease-out-expo), color 220ms var(--ease-out-expo); }
.service-list summary:focus-visible h3 { color: #8fa6ff; }
.service-list details[open] { border-bottom-color: #f3f0e96b; }
.service-list details[open] .service-number { color: #8fa6ff; }
@media (hover:hover) and (pointer:fine) {
  .service-list details:hover { border-bottom-color: #8fa6ff8c; }
  .service-list details:hover::after { width: 100%; }
  .service-list summary:hover h3 { transform: translateX(4px); color: #ffffff; }
  .service-list summary:hover .service-short { color: #ffffff; transition: color 200ms var(--ease-out-expo); }
  .service-list summary:hover .service-number { color: var(--orange); }
  .service-list details:not([open]) summary:hover .expand { transform: rotate(90deg); }
  .button:active { transform: translateY(1px); }
}
.service-list summary:active h3 { transform: translateX(2px); }

/* Belief Principles Horizontal Rules */
.belief-copy li {
  position: relative;
  border-top: none;
  padding: 19px 0;
}
.belief-copy li::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--rule);
  transform-origin: left;
  transform: scaleX(1);
  transition: transform 550ms var(--ease-out-expo);
}
.belief.motion-pending .belief-copy li::before {
  transform: scaleX(0);
}
.belief-copy li > span::before {
  display: inline-block;
  transition: transform 260ms var(--ease-out-expo);
}
.belief.motion-pending .belief-copy li > span::before {
  transform: translate(-4px, 4px);
  opacity: 0;
}

/* Process continuous progression track */
.process-track-bar {
  width: 100%;
  height: 2px;
  background: rgba(20, 20, 26, 0.12);
  position: relative;
  margin-bottom: -1px;
  z-index: 1;
  overflow: hidden;
}
.process-progress {
  width: 100%;
  height: 100%;
  background: var(--blue);
  transform-origin: left;
  transform: scaleX(var(--process-progress, 0.25));
  transition: transform 420ms var(--ease-out-expo);
}
.process-steps li {
  position: relative;
  transition: transform 300ms var(--ease-out-expo), opacity 300ms var(--ease-out-expo);
}
.process-steps li.is-active .step-number {
  color: var(--blue);
}
.step-number span {
  display: inline-block;
  transition: transform 220ms var(--ease-out-expo);
}
@media (hover: hover) and (pointer: fine) {
  .process-steps li:hover .step-number span {
    transform: translate(3px, -3px);
  }
}
.process-steps li.motion-pending { transform:translateY(7px); }

/* Contact Ambient Vectors & CTA Launch */
.contact {
  position: relative;
  overflow: hidden;
}
.contact-ambient {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}
.contact-ambient svg {
  width: 100%;
  height: 100%;
  display: block;
}
.contact-stream {
  stroke-dasharray: 600;
  stroke-dashoffset: 0;
  animation: stream-flow 14s linear infinite;
}
.stream-2 {
  animation-duration: 10s;
  animation-delay: -4s;
}
@keyframes stream-flow {
  0% { stroke-dashoffset: 600; }
  100% { stroke-dashoffset: 0; }
}
.contact-node {
  animation: node-pulse 3s var(--ease-in-out) infinite alternate;
}
@keyframes node-pulse {
  0% { opacity: 0.4; }
  100% { opacity: 0.9; }
}
.contact > :not(.contact-ambient) {
  position: relative;
  z-index: 1;
}

.contact-launch {
  --magnet-x: 0px;
  --magnet-y: 0px;
  position: relative;
  overflow: hidden;
  transition: border-color 200ms var(--ease-out-expo);
}
.contact-launch::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--orange);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 300ms var(--ease-out-expo);
}
.contact-launch:hover::before {
  transform: scaleX(1);
}
.contact-launch:hover .cta-label {
  color: #ffffff;
}
.contact-launch .cta-label { font: inherit; line-height: inherit; }
.contact-launch > span { transform: translate(var(--magnet-x),var(--magnet-y)); transition: transform 240ms var(--connect-ease); }
.contact-launch:hover > span { transform: translate(var(--magnet-x),var(--magnet-y)); }
.contact-launch:focus-visible > span { transform: none; }

/* Selected Work & Exhibition Presentation */
.selected-work { padding-bottom: 88px; border-bottom: 1px solid var(--rule); }
.work-showcase { display: flex; flex-direction: column; gap: clamp(64px, 7vw, 110px); margin-top: 48px; }
.work-card { display: flex; flex-direction: column; gap: 28px; }
.work-card-header { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; border-bottom: 1px solid var(--rule); padding-bottom: 16px; }
.work-header-left { display: flex; align-items: baseline; gap: 20px; }
.work-card-num { font: 14px 'IBM Plex Mono', monospace; color: var(--blue); font-weight: 600; }
.work-card-title { font-size: clamp(28px, 3.4vw, 44px); letter-spacing: -0.035em; line-height: 1.1; margin: 0; }
.work-card-sector { font: 10px 'IBM Plex Mono', monospace; color: var(--slate); text-transform: uppercase; letter-spacing: 0.05em; }
.work-disclosure-badge { font: 10px 'IBM Plex Mono', monospace; padding: 5px 12px; border: 1px solid var(--rule); color: var(--slate); background: rgba(243, 240, 233, 0.7); text-transform: uppercase; letter-spacing: 0.04em; white-space: nowrap; }

.work-composition {
  position: relative;
  background: #e7e3da;
  border: 1px solid var(--rule);
  padding: clamp(24px, 4vw, 48px);
  overflow: hidden;
  transition: border-color 260ms var(--ease-out-expo);
}
.work-card:hover .work-composition {
  border-color: #b5b1aa;
}

.work-display {
  display: grid;
  grid-template-columns: 1fr minmax(180px, 240px);
  gap: clamp(20px, 3.5vw, 48px);
  align-items: flex-end;
}
.work-card.layout-alt .work-display {
  grid-template-columns: minmax(180px, 240px) 1fr;
}
.work-card.layout-alt .desktop-frame {
  order: 2;
}
.work-card.layout-alt .mobile-frame {
  order: 1;
}

.desktop-frame {
  background: var(--bone);
  border: 1px solid #b5b1aa;
  box-shadow: 0 16px 40px -12px rgba(20,20,26,0.12);
  overflow: hidden;
  position: relative;
  z-index: 1;
}
.browser-top-bar {
  background: #ded9cd;
  border-bottom: 1px solid #b5b1aa;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font: 10px 'IBM Plex Mono', monospace;
  color: var(--slate);
}
.browser-dots { display: flex; gap: 6px; }
.browser-dots i { width: 8px; height: 8px; border-radius: 50%; background: #b5b1aa; display: inline-block; }
.browser-address { font-size: 10px; letter-spacing: 0.02em; color: var(--slate); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.desktop-img-wrap {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #ffffff;
}
.desktop-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  display: block;
  transition: transform 550ms var(--ease-out-expo);
}
.work-card:hover .desktop-img-wrap img {
  transform: scale(1.015);
}

.mobile-frame {
  background: #14141a;
  border: 2px solid #2a2a34;
  border-radius: 28px;
  padding: 12px 8px;
  box-shadow: 0 20px 48px -8px rgba(20,20,26,0.32);
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 240px;
  margin-bottom: -16px;
  transition: transform 450ms var(--ease-out-expo);
}
.work-card:hover .mobile-frame {
  transform: translateY(-6px);
}
.mobile-notch {
  width: 60px;
  height: 12px;
  background: #14141a;
  border-radius: 8px;
  margin: 0 auto 8px auto;
}
.mobile-screen {
  border-radius: 18px;
  overflow: hidden;
  aspect-ratio: 390 / 844;
  background: #ffffff;
}
.mobile-screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  display: block;
}

/* --- MacBook Pro Mockup Frame --- */
.desktop-frame.macbook-frame {
  background: #14151b;
  border: 3px solid #2a2c38;
  border-bottom: none;
  border-radius: 16px 16px 0 0;
  box-shadow: 0 24px 52px -12px rgba(10, 11, 16, 0.35), 0 2px 8px rgba(10, 11, 16, 0.15);
  overflow: visible;
  position: relative;
  z-index: 1;
}

.macbook-notch {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 52px;
  height: 10px;
  background: #0d0e12;
  border-radius: 0 0 7px 7px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

.macbook-camera {
  display: block;
  width: 4px;
  height: 4px;
  background: #09121d;
  border-radius: 50%;
  box-shadow: inset 0 0 1px #2563eb, 0 0 1px rgba(255, 255, 255, 0.3);
  position: relative;
}

.macbook-camera::after {
  content: '';
  position: absolute;
  top: 0.5px;
  left: 0.5px;
  width: 1.2px;
  height: 1.2px;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 50%;
}

.macbook-frame .browser-top-bar {
  background: #21232b;
  border-bottom: 1px solid #2e303d;
  border-radius: 13px 13px 0 0;
  padding: 8px 14px;
  color: #9295a5;
}

.macbook-frame .browser-dots i:nth-child(1) {
  background: #ff5f56;
  border: 0.5px solid #e0443e;
}
.macbook-frame .browser-dots i:nth-child(2) {
  background: #ffbd2e;
  border: 0.5px solid #dea123;
}
.macbook-frame .browser-dots i:nth-child(3) {
  background: #27c93f;
  border: 0.5px solid #1aab29;
}

.macbook-frame .browser-address {
  background: rgba(0, 0, 0, 0.28);
  border-radius: 4px;
  padding: 2px 10px;
  color: #a8abbc;
  font-size: 9.5px;
  max-width: 55%;
}

.macbook-frame .desktop-img-wrap {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #0d0e12;
}

.macbook-base {
  position: relative;
  width: calc(100% + 24px);
  margin-left: -12px;
  height: 12px;
  background: linear-gradient(180deg, #525565 0%, #3a3c48 30%, #23242e 100%);
  border-top: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 0 0 10px 10px;
  box-shadow: 0 8px 22px -4px rgba(10, 11, 15, 0.45);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  z-index: 5;
}

.macbook-indent {
  display: block;
  width: 54px;
  height: 4px;
  background: #111217;
  border-radius: 0 0 5px 5px;
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.8), 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* --- iPhone Pro Mockup Frame --- */
.mobile-frame.iphone-frame {
  background: #0b0c10;
  border: 3.5px solid #363845;
  outline: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 36px;
  padding: 10px 8px 8px;
  box-shadow: 0 22px 50px -8px rgba(10, 11, 15, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.05);
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 230px;
  margin-bottom: -16px;
  transition: transform 450ms var(--ease-out-expo), box-shadow 450ms var(--ease-out-expo);
}

.deck-card:hover .mobile-frame.iphone-frame,
.work-card:hover .mobile-frame.iphone-frame {
  transform: translateY(-8px);
  box-shadow: 0 30px 60px -10px rgba(10, 11, 15, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.1);
}

/* Left side buttons: Action Button & Volume rocker */
.mobile-frame.iphone-frame::before {
  content: '';
  position: absolute;
  left: -5.5px;
  top: 54px;
  width: 2.5px;
  height: 16px;
  background: #363845;
  border-radius: 2px 0 0 2px;
  box-shadow: 0 26px 0 #363845, 0 56px 0 #363845;
}

/* Right side button: Power button */
.mobile-frame.iphone-frame::after {
  content: '';
  position: absolute;
  right: -5.5px;
  top: 68px;
  width: 2.5px;
  height: 36px;
  background: #363845;
  border-radius: 0 2px 2px 0;
}

/* Dynamic Island pill */
.iphone-island {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 62px;
  height: 17px;
  background: #000000;
  border-radius: 20px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 9px;
  box-shadow: 0 0 1px rgba(255, 255, 255, 0.25);
  pointer-events: none;
}

.island-lens {
  display: inline-block;
  width: 6.5px;
  height: 6.5px;
  background: #091322;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 0 2px rgba(27, 63, 224, 0.85);
  position: relative;
}

.island-lens::after {
  content: '';
  position: absolute;
  top: 1px;
  left: 1px;
  width: 2px;
  height: 2px;
  background: rgba(255, 255, 255, 0.45);
  border-radius: 50%;
}

.iphone-frame .mobile-screen {
  border-radius: 26px;
  overflow: hidden;
  aspect-ratio: 390 / 844;
  background: #000000;
  position: relative;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.iphone-home-indicator {
  width: 68px;
  height: 3.5px;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 3px;
  margin: 7px auto 2px auto;
  z-index: 10;
  position: relative;
}

.work-card-info {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: clamp(24px, 4vw, 56px);
  align-items: start;
  padding-top: 8px;
}
.work-card-headline {
  font-family: Archivo, sans-serif;
  font-size: clamp(20px, 2.2vw, 26px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.25;
  margin-bottom: 12px;
}
.work-card-desc {
  font-family: Newsreader, Georgia, serif;
  font-size: 20px;
  line-height: 1.4;
  color: var(--slate);
  margin-bottom: 22px;
}
.work-card-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}
.work-disciplines {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.work-disciplines span {
  font: 10px/1.4 'IBM Plex Mono', monospace;
  padding: 6px 10px;
  border: 1px solid var(--rule);
  background: rgba(243, 240, 233, 0.75);
  color: var(--graphite);
}
.work-status-tag {
  font: 10px 'IBM Plex Mono', monospace;
  color: var(--slate);
  display: flex;
  align-items: center;
  gap: 8px;
}
.work-status-tag i {
  width: 6px;
  height: 6px;
  background: var(--orange);
  display: inline-block;
  flex-shrink: 0;
}

.work-cta-banner {
  margin-top: 72px;
  border: 1px solid var(--rule);
  background: #e7e3da;
  padding: clamp(32px, 5vw, 56px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 36px;
}
.work-banner-content h3 {
  font-size: clamp(26px, 3vw, 38px);
  letter-spacing: -0.035em;
  line-height: 1.15;
  margin: 10px 0 12px;
}
.work-banner-content p {
  font-size: 19px;
  line-height: 1.35;
  color: var(--slate);
  max-width: 580px;
}
.work-note {
  margin-top: 32px;
  font: 11px/1.6 Archivo, sans-serif;
  color: var(--slate);
  border-top: 1px solid var(--rule);
  padding-top: 16px;
}

/* ==========================================================================
   Pinned Layered Project Deck (Homepage Selected Work)
   ========================================================================== */
.pinned-deck-section {
  position: relative;
  height: 280vh;
  padding: 0!important;
  border-bottom: 1px solid var(--rule);
  background: var(--bone);
  overflow: clip;
}

.deck-sticky-container {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
  max-height: 100vh;
  max-height: 100dvh;
  box-sizing: border-box;
  padding: 24px var(--gutter);
  display: grid;
  grid-template-columns: minmax(300px, 360px) 1fr;
  gap: clamp(24px, 3.5vw, 64px);
  align-items: center;
  overflow: hidden;
}

/* Left Editorial Rail */
.deck-rail {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  max-height: min(720px, calc(100vh - 48px));
  box-sizing: border-box;
  padding: 12px 0;
  gap: 16px;
  z-index: 10;
}

.deck-rail-top .section-label {
  margin-bottom: 14px;
}

.deck-rail-top .section-heading {
  display: block;
  margin-bottom: 0;
}

.deck-rail-top .section-heading h2 {
  font-size: clamp(30px, 3.2vw, 46px);
  line-height: 1.05;
  letter-spacing: -0.045em;
  margin: 0;
}

.deck-lead {
  font-family: Newsreader, Georgia, serif;
  font-size: clamp(16px, 1.3vw, 18px);
  line-height: 1.35;
  color: var(--slate);
  margin-top: 10px;
  max-width: 340px;
}

/* Numbered Tabs */
.deck-controls {
  margin: auto 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.deck-tabs {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.deck-tab {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  background: transparent;
  border: 1px solid transparent;
  border-left: 2px solid var(--rule);
  text-align: left;
  cursor: pointer;
  outline-offset: 2px;
  transition: background 180ms var(--ease-out-expo), border-color 180ms var(--ease-out-expo);
}

.deck-tab:hover {
  background: rgba(231, 227, 218, 0.6);
  border-left-color: var(--blue);
}

.deck-tab.active {
  background: #e7e3da;
  border-color: var(--rule);
  border-left: 3px solid var(--blue);
}

.deck-tab .tab-num {
  font: 600 12px 'IBM Plex Mono', monospace;
  color: var(--slate);
}

.deck-tab.active .tab-num {
  color: var(--blue);
}

.deck-tab .tab-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.deck-tab .tab-title {
  font: 600 13px Archivo, sans-serif;
  color: var(--graphite);
  line-height: 1.2;
}

.deck-tab.active .tab-title {
  color: var(--blue);
}

.deck-tab .tab-sector {
  font: 9px 'IBM Plex Mono', monospace;
  color: var(--slate);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.deck-mobile-nav {
  display: none;
}

/* Rail Bottom CTA & Disclosure */
.deck-rail-bottom {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.deck-archive-cta {
  align-self: flex-start;
}

.deck-disclosure {
  font: 11px/1.4 Archivo, sans-serif;
  color: var(--slate);
  display: flex;
  align-items: flex-start;
  gap: 8px;
  max-width: 320px;
  margin: 0;
}

.deck-disclosure .tiny-square {
  margin-top: 4px;
}

/* Right Card Stage */
.deck-stage {
  position: relative;
  height: 100%;
  max-height: min(720px, calc(100vh - 48px));
  display: flex;
  align-items: center;
  justify-content: center;
  outline: none;
}

/* Overlapping Deck Cards */
.deck-card {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  max-width: 820px;
  height: auto;
  max-height: calc(100vh - 64px);
  background: var(--bone);
  border: 1px solid var(--rule);
  box-shadow: 0 20px 48px -12px rgba(20, 20, 26, 0.09);
  padding: clamp(16px, 2vw, 24px);
  box-sizing: border-box;
  transform-origin: center bottom;
  will-change: transform, opacity;
  transform: translate(-50%, -50%) translate3d(var(--card-offset-x, 0px), var(--card-offset-y, 0px), 0) scale(var(--card-scale, 1));
  opacity: var(--card-opacity, 1);
  z-index: var(--card-z, 1);
  pointer-events: var(--card-pointer, auto);
  transition: transform 320ms cubic-bezier(0.16, 1, 0.3, 1), opacity 320ms cubic-bezier(0.16, 1, 0.3, 1), border-color 200ms ease;
}

.deck-card:focus-within {
  border-color: var(--blue);
  box-shadow: 0 0 0 2px var(--blue), 0 24px 56px -12px rgba(20, 20, 26, 0.16);
}

.deck-card-inner {
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: 100%;
}

.deck-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 8px;
  gap: 16px;
}

.deck-header-meta {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.deck-card-num {
  font: 600 13px 'IBM Plex Mono', monospace;
  color: var(--blue);
}

.deck-card-sector {
  font: 9px 'IBM Plex Mono', monospace;
  color: var(--slate);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: block;
}

.deck-card-title {
  font-size: clamp(18px, 1.9vw, 26px);
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin: 0;
}

.deck-card-body .work-composition {
  padding: clamp(12px, 1.8vw, 20px);
  border-color: var(--rule);
}

.deck-card-body .work-display {
  grid-template-columns: 1fr minmax(140px, 190px);
  gap: clamp(16px, 2.5vw, 32px);
}

.deck-card-body .desktop-frame {
  box-shadow: 0 12px 32px -8px rgba(20,20,26,0.1);
}

.deck-card-body .browser-top-bar {
  padding: 6px 12px;
  font-size: 9px;
}

.deck-card-body .mobile-frame {
  max-width: 190px;
  margin-bottom: -10px;
  box-shadow: 0 14px 36px -6px rgba(20,20,26,0.28);
}

.deck-card-body .desktop-frame.macbook-frame {
  box-shadow: 0 16px 36px -8px rgba(10, 11, 16, 0.28);
}

.deck-card-body .macbook-notch {
  width: 44px;
  height: 8px;
}

.deck-card-body .macbook-base {
  width: calc(100% + 20px);
  margin-left: -10px;
  height: 10px;
}

.deck-card-body .macbook-indent {
  width: 46px;
  height: 3.5px;
}

.deck-card-body .mobile-frame.iphone-frame {
  max-width: 185px;
  margin-bottom: -12px;
  padding: 8px 6px 6px;
  border-radius: 30px;
}

.deck-card-body .iphone-frame .mobile-screen {
  border-radius: 22px;
}

.deck-card-body .iphone-island {
  top: 11px;
  width: 52px;
  height: 15px;
  padding-right: 7px;
}

.deck-card-body .island-lens {
  width: 5.5px;
  height: 5.5px;
}

.deck-card-body .iphone-home-indicator {
  width: 56px;
  height: 3px;
  margin: 5px auto 2px auto;
}

.deck-card-footer {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
  border-top: 1px solid var(--rule);
  padding-top: 10px;
}

.deck-card-headline {
  font-family: Archivo, sans-serif;
  font-size: clamp(13px, 1.1vw, 15px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.3;
  margin-bottom: 6px;
}

.deck-card-footer .work-disciplines {
  margin-bottom: 0;
  gap: 6px;
}

.deck-card-footer .work-disciplines span {
  font-size: 9px;
  padding: 3px 8px;
}

.deck-card-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.deck-live-btn {
  min-height: 40px;
  padding: 8px 16px;
  font-size: 12px;
}

.deck-read-link {
  font-size: 12px;
  padding: 4px 0;
  white-space: nowrap;
}

/* Tablet Media Query: 768px - 1023px */
@media (min-width: 768px) and (max-width: 1023px) {
  .pinned-deck-section {
    height: 230vh;
  }
  .deck-sticky-container {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
    gap: 16px;
    padding: 16px var(--gutter);
  }
  .deck-rail {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 16px;
    align-items: center;
    height: auto;
    max-height: none;
    padding: 0;
  }
  .deck-lead {
    display: none;
  }
  .deck-controls {
    margin: 0;
  }
  .deck-tabs {
    flex-direction: row;
    gap: 4px;
  }
  .deck-tab .tab-meta {
    display: none;
  }
  .deck-tab {
    border-left: 1px solid var(--rule);
    padding: 8px 14px;
    min-height: 44px;
  }
  .deck-card-body .work-display {
    display: grid!important;
    grid-template-columns: 1fr minmax(130px, 170px)!important;
    gap: 18px!important;
    align-items: flex-end!important;
  }
  .deck-card-body .desktop-frame {
    order: 1!important;
  }
  .deck-card-body .mobile-frame {
    max-width: 170px!important;
    margin: 0 0 -8px 0!important;
    order: 2!important;
  }
  .deck-stage {
    max-height: calc(100vh - 140px);
  }
  .deck-card {
    max-height: calc(100vh - 150px);
  }
}

/* Mobile Media Query: <= 767px */
@media (max-width: 767px) {
  .pinned-deck-section {
    height: auto!important;
    position: static!important;
    padding: 48px 0!important;
  }
  .deck-sticky-container {
    position: static!important;
    height: auto!important;
    max-height: none!important;
    overflow: visible!important;
    display: flex!important;
    flex-direction: column!important;
    padding: 0!important;
    gap: 18px!important;
  }
  .deck-rail {
    display: contents!important;
  }
  .deck-rail-top {
    order: 1;
    padding: 0 var(--gutter);
  }
  .deck-rail-top .section-label {
    margin-bottom: 10px;
  }
  .deck-lead {
    font-size: 17px;
    max-width: 100%;
  }
  .deck-controls {
    order: 2;
    padding: 0 var(--gutter);
    margin: 0;
  }
  .deck-tabs {
    display: none!important;
  }
  .deck-mobile-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 10px;
    border-top: 1px solid var(--rule);
  }
  .deck-mobile-counter {
    font: 600 13px 'IBM Plex Mono', monospace;
    color: var(--slate);
  }
  .deck-mobile-counter span {
    color: var(--blue);
  }
  .deck-arrow-group {
    display: flex;
    gap: 8px;
  }
  .deck-arrow-btn {
    width: 44px;
    height: 44px;
    border: 1px solid var(--rule);
    background: var(--bone);
    display: grid;
    place-items: center;
    font-size: 18px;
    color: var(--graphite);
    transition: background 160ms var(--ease-out-expo);
  }
  .deck-arrow-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
  }
  .deck-arrow-btn:not(:disabled):active {
    background: var(--blue);
    color: var(--bone);
  }
  .deck-stage {
    order: 3;
    position: relative;
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: stretch;
    width: 100%;
    min-width: 0;
    max-width: 100vw;
    box-sizing: border-box;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 16px;
    padding: 8px var(--gutter) 16px var(--gutter);
    scrollbar-width: none;
    max-height: none;
    height: auto;
  }
  .deck-stage::-webkit-scrollbar {
    display: none;
  }
  .deck-card {
    position: relative!important;
    top: auto!important;
    left: auto!important;
    flex: 0 0 88%;
    width: 88%;
    max-width: 360px;
    scroll-snap-align: center;
    transform: none!important;
    opacity: 1!important;
    pointer-events: auto!important;
    box-shadow: 0 12px 32px -8px rgba(20,20,26,0.12);
    padding: 16px;
    max-height: none;
  }
  .deck-card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .deck-header-meta {
    flex-direction: column;
    gap: 2px;
  }
  .deck-card-body .work-display {
    display: flex;
    flex-direction: column;
    gap: 14px;
  }
  .deck-card-body .mobile-frame {
    max-width: 170px;
    margin: -24px auto 0 auto;
    border-radius: 20px;
    padding: 8px 6px;
  }
  .deck-card-body .mobile-frame.iphone-frame {
    max-width: 165px;
    margin: -24px auto 0 auto;
    border-radius: 26px;
    padding: 7px 5px 5px;
  }
  .deck-card-body .mobile-frame.iphone-frame::before,
  .deck-card-body .mobile-frame.iphone-frame::after {
    display: none;
  }
  .deck-card-body .iphone-frame .mobile-screen {
    border-radius: 20px;
  }
  .deck-card-body .desktop-frame.macbook-frame {
    border-width: 2px;
    border-radius: 12px 12px 0 0;
  }
  .deck-card-body .macbook-notch {
    width: 38px;
    height: 7px;
  }
  .deck-card-body .macbook-base {
    width: calc(100% + 14px);
    margin-left: -7px;
    height: 8px;
    border-radius: 0 0 7px 7px;
  }
  .deck-card-body .macbook-indent {
    width: 38px;
    height: 2.5px;
  }
  .deck-card-footer {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .deck-card-actions {
    flex-direction: row;
    justify-content: space-between;
    width: 100%;
  }
  .deck-live-btn {
    flex: 1;
  }
  .deck-rail-bottom {
    order: 4;
    padding: 0 var(--gutter);
    gap: 12px;
  }
  .deck-archive-cta {
    width: 100%;
  }
}

/* Reduced Motion Override */
@media (prefers-reduced-motion: reduce) {
  .pinned-deck-section {
    height: auto!important;
    position: static!important;
  }
  .deck-sticky-container {
    position: static!important;
    height: auto!important;
    max-height: none!important;
    overflow: visible!important;
    display: flex!important;
    flex-direction: column!important;
    padding: 48px var(--gutter)!important;
    gap: 36px!important;
  }
  .deck-stage {
    position: static!important;
    display: flex!important;
    flex-direction: column!important;
    gap: 32px!important;
    max-height: none!important;
    height: auto!important;
  }
  .deck-card {
    position: static!important;
    transform: none!important;
    opacity: 1!important;
    pointer-events: auto!important;
    max-width: 100%!important;
    max-height: none!important;
    transition: none!important;
  }
  .deck-tabs {
    display: none!important;
  }
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* Dedicated Work Page (work.html) specific styles */
.work-hero {
  padding: clamp(48px, 6vw, 96px) var(--gutter) 48px;
  border-bottom: 1px solid var(--rule);
  background: var(--bone);
}
.work-hero-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}
.work-hero h1 {
  font-size: clamp(48px, 6.5vw, 92px);
  line-height: 1.0;
  letter-spacing: -0.055em;
  margin-bottom: 24px;
}
.work-hero-sub {
  font-size: clamp(20px, 2.1vw, 25px);
  max-width: 780px;
  line-height: 1.35;
  color: var(--slate);
  font-family: Newsreader, Georgia, serif;
  margin-bottom: 32px;
}
.work-provenance-callout {
  background: #e7e3da;
  border-left: 3px solid var(--orange);
  padding: 20px 24px;
  max-width: 820px;
  margin-top: 28px;
}
.work-provenance-callout .callout-title {
  font: 600 11px 'IBM Plex Mono', monospace;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--graphite);
}
.work-provenance-callout p {
  font-size: 16px;
  line-height: 1.45;
  color: var(--graphite);
  font-family: Archivo, sans-serif;
  margin: 0;
}
.work-archive-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(243, 240, 233, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
  padding: 14px var(--gutter);
  display: flex;
  gap: 12px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.work-archive-nav::-webkit-scrollbar { display: none; }
.work-archive-nav a {
  font: 600 11px 'IBM Plex Mono', monospace;
  padding: 7px 14px;
  border: 1px solid var(--rule);
  white-space: nowrap;
  transition: background 180ms var(--ease-out-expo), color 180ms var(--ease-out-expo), border-color 180ms var(--ease-out-expo);
}
.work-archive-nav a:hover {
  background: var(--blue);
  color: var(--bone);
  border-color: var(--blue);
}
.header nav > a.nav-active {
  color: var(--blue);
}
.header nav > a.nav-active::after {
  width: 100%!important;
}
.header nav > a.nav-active::before {
  opacity: 1!important;
  transform: scale(1)!important;
}

@media(max-width:960px) {
  .work-display { display: flex; flex-direction: column; gap: 24px; align-items: stretch; }
  .work-card.layout-alt .work-display { display: flex; flex-direction: column; }
  .work-card.layout-alt .desktop-frame { order: 1; }
  .work-card.layout-alt .mobile-frame { order: 2; }
  .mobile-frame { max-width: 240px; margin: -32px auto 0 auto; z-index: 2; }
  .work-card-info { display: flex; flex-direction: column; gap: 18px; }
  .work-card-header { flex-direction: column; align-items: flex-start; gap: 10px; }
  .work-header-left { flex-direction: column; gap: 4px; }
}

@media(max-width:760px) {
  .connection-line { left:17px; right:auto; top:35px; bottom:0; width:1px; height:auto; transform-origin:center top; }
  .workflow.motion-pending:not(.before) .connection-line { transform:scaleY(0); }
  .selected-work { padding-bottom: 48px; }
  .work-showcase { gap: 56px; margin-top: 36px; }
  .work-card-header { flex-direction: column; align-items: flex-start; gap: 10px; }
  .work-header-left { flex-direction: column; gap: 4px; }
  .work-composition { padding: 18px 14px 28px; }
  .work-display { display: flex; flex-direction: column; gap: 20px; align-items: stretch; }
  .work-card.layout-alt .work-display { display: flex; flex-direction: column; }
  .work-card.layout-alt .desktop-frame { order: 1; }
  .work-card.layout-alt .mobile-frame { order: 2; }
  .mobile-frame { max-width: 220px; margin: -32px auto 0 auto; z-index: 2; border-radius: 22px; padding: 10px 6px; }
  .mobile-frame.iphone-frame {
    max-width: 200px;
    margin: -28px auto 0 auto;
    border-radius: 28px;
    padding: 8px 6px 6px;
  }
  .mobile-frame.iphone-frame::before,
  .mobile-frame.iphone-frame::after {
    display: none;
  }
  .desktop-frame.macbook-frame {
    border-width: 2px;
    border-radius: 12px 12px 0 0;
  }
  .macbook-notch {
    width: 40px;
    height: 7.5px;
  }
  .macbook-base {
    width: calc(100% + 16px);
    margin-left: -8px;
    height: 9px;
    border-radius: 0 0 7px 7px;
  }
  .macbook-indent {
    width: 40px;
    height: 3px;
  }
  .mobile-notch { width: 48px; height: 10px; margin-bottom: 6px; }
  .mobile-screen { border-radius: 14px; }
  .work-card-info { display: flex; flex-direction: column; gap: 18px; }
  .work-card-headline { font-size: 20px; }
  .work-card-desc { font-size: 18px; margin-bottom: 16px; }
  .work-cta-banner { flex-direction: column; align-items: flex-start; gap: 24px; padding: 28px 20px; margin-top: 48px; }
  .work-hero { padding-top: 36px; padding-bottom: 36px; }
  .work-hero h1 { font-size: 42px; }
  .work-hero-sub { font-size: 19px; }
  .work-archive-nav { padding-inline: var(--gutter); gap: 8px; }
  .work-archive-nav a { font-size: 10px; padding: 5px 10px; }
}

@media(prefers-reduced-motion:reduce) {
  .system-field, .contact-ambient, .process-track-bar { display:none; }
  .connection-art svg, .signal-pointer, .contact-launch > span,
  .service-list summary:hover h3, .service-list summary:active h3,
  .line-inner, .intro-copy, .belief-copy li::before, .process-progress,
  .desktop-img-wrap img, .mobile-frame { transform:none!important; opacity:1!important; transition:none!important; }
  *, *::before, *::after { animation:none!important; transition:none!important; }
}
