.portfolio-home {
  background: #f7f8f5;
  color: #173535;
}
.portfolio-home .site-header { background: #fafbf8; }
.portfolio-home .header-inner { min-height: 72px; }
.portfolio-home .wordmark { display: flex; gap: 1.1rem; align-items: center; }
.portfolio-home .wordmark > span { margin: 0; padding-left: 1.1rem; border-left: 1px solid #c9d0ca; }
.portfolio-home .nav a { font-size: .95rem; }
.portfolio-home .nav a[aria-current] { color: #174746; border-color: #174746; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}

.feature-show { background: #112b28; }
.feature-stage { display: grid; overflow: hidden; touch-action: pan-y pinch-zoom; }
.feature-slide {
  isolation: isolate; grid-area: 1 / 1; display: grid;
  grid-template-columns: minmax(0, .82fr) minmax(0, 1.28fr);
  align-items: center; gap: clamp(1rem, 3vw, 4rem);
  min-height: clamp(26rem, 65svh, 48rem);
  padding: clamp(2.5rem, 6vw, 7rem) max(5vw, calc((100vw - 1450px)/2));
  opacity: 0; visibility: hidden; transform: translateX(2.5%);
  transition: opacity .5s ease, transform .55s ease, visibility 0s .55s;
}
.feature-slide.is-current { opacity: 1; visibility: visible; transform: none; z-index: 1; transition-delay: 0s; }
.gripper-panel { background: radial-gradient(ellipse at 70% 50%, #f4f8ef, #d6e2d9); color: #193935; }
.bridge-panel { background: radial-gradient(ellipse at 76% 44%, #809187, #374f46 52%, #1d332e); color: #faf9ef; }
.feature-type { font: 600 .82rem/1.4 var(--mono); letter-spacing: .13em; text-transform: uppercase; margin: 0 0 1rem; }
.feature-message h2 { font: 650 clamp(3rem, 5.6vw, 6.5rem)/.98 var(--sans); letter-spacing: -.06em; margin: 0 0 1.25rem; text-wrap: balance; }
.feature-summary { max-width: 43ch; margin: 0 0 1.65rem; font-size: clamp(1rem, 1.35vw, 1.28rem); line-height: 1.55; }
.show-link { display: inline-flex; align-items: center; min-height: 46px; padding: .65rem 1.65rem; border-radius: 3px; background: #163c35; color: #fff; text-decoration: none; font: 600 1rem/1.3 var(--sans); }
.show-link:hover { background: #28554e; }
.bridge-panel .show-link { background: #f4f5eb; color: #17352f; }
.bridge-panel .show-link:hover { background: #dde9de; }
.feature-media { display: grid; place-items: center; }
.feature-media > * { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: contain; }
.gripper-panel .feature-media img, .gripper-panel .card-image img { mix-blend-mode: multiply; mask-image: radial-gradient(ellipse 71% 74%, black 58%, transparent 100%); }
.bridge-panel .feature-media img { filter: drop-shadow(0 1rem 1rem rgb(9 20 16 / 30%)); }
.feature-bar { display: flex; align-items: center; gap: clamp(1rem,5vw,6rem); padding: .8rem max(5vw, calc((100vw - 1450px)/2)) 1.2rem; color: #eef5ed; }
.feature-switches { display: flex; flex: 1; gap: 1.3rem; }
.feature-bar button { background: none; border: 0; color: inherit; min-height: 44px; font: 500 1rem/1.3 var(--sans); }
.feature-select { flex: 1; text-align: start; padding: .8rem 0 0; position: relative; opacity: .78; }
.feature-select::before { content: ''; position: absolute; top: 0; inset-inline: 0; height: 3px; background: #758b80; }
.feature-select[aria-pressed=true] { opacity: 1; font-weight: 700; }
.feature-select:focus-visible,
.feature-select:hover { color: #c9e8b4; opacity: 1; text-decoration: underline; text-underline-offset: .22em; }
.slide-fill { position: absolute; top: 0; inset-inline: 0; height: 3px; background: #c9e8b4; transform: scaleX(0); transform-origin: left; }
@media (prefers-reduced-motion: reduce) { .feature-select[aria-pressed=true] .slide-fill { transform: scaleX(1); } }
.project-archive { padding-block: clamp(2.5rem,5vw,5rem); }
.project-archive > h2 { font: 600 clamp(2rem,3.6vw,3.8rem)/1.05 var(--sans); letter-spacing: -.055em; margin-bottom: 1.6rem; }
.project-cards { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: clamp(1rem,2.2vw,2rem); }
.project-card-home { display: flex; flex-direction: column; }
.card-image { padding: .7rem 8% 0; }
.card-image img { width: 100%; aspect-ratio: 2.65; object-fit: contain; }
.card-copy { display: flex; flex: 1; flex-direction: column; align-items: flex-start; padding: 1.3rem clamp(1.3rem,2.8vw,3rem) 2rem; }
.card-copy .feature-type { margin-bottom: .35rem; }
.card-copy h3 { font: 600 clamp(1.7rem,2.6vw,2.7rem)/1.05 var(--sans); letter-spacing: -.045em; margin: 0 0 .75rem; }
.card-copy > p:not(.feature-type) { max-width: 48ch; margin-bottom: 1.2rem; }
.card-copy .show-link { margin-top: auto; }
@media (max-width: 760px) {
  .portfolio-home .header-inner { min-height: auto; }
  .portfolio-home .nav { justify-content: flex-start; gap: 1.4rem; }
  .feature-slide { grid-template-columns: 1fr; align-content: center; padding: 1.8rem 5vw 1rem; gap: 1rem; min-height: auto; }
  .feature-media > * { max-height: 29svh; }
  .feature-message h2 { font-size: clamp(2.5rem,8vw,3.8rem); margin-bottom: .75rem; }
  .feature-type { margin-bottom: .55rem; }
  .feature-summary { margin-bottom: 1rem; }
  .feature-bar { flex-wrap: wrap; gap: .45rem 1rem; }
  .feature-switches { min-width: min(100%, 13rem); gap: .9rem; }
  .feature-bar button { font-size: .9rem; }
  .project-cards { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { .feature-slide { transition: none; transform: none; } }
