/* Portfolio only. The CMS content and the shared contact delivery stay intact. */
body[data-portfolio-shell] { background: #fff; color: #17263b; font-family: 'Plus Jakarta Sans', sans-serif; }
body[data-portfolio-shell] ::selection { background: #ffe2e6; color: #17263b; }
body[data-portfolio-shell] :is(a,button,input,textarea):focus-visible { outline: 2px solid #c91f3d; outline-offset: 4px; }
body[data-portfolio-shell] #main { min-height: 0; padding-top: 80px; }
.pf-container { width: min(1200px, calc(100% - 64px)); margin-inline: auto; }
.pf-back { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-size: 13px; font-weight: 600; color: #526176; text-decoration: none; }
.pf-back:hover { color: #bd1937; }
.pf-back svg,.pf-action svg { width: 18px; height: 18px; flex: none; }
.pf-hero { padding: 30px 0 64px; background: linear-gradient(145deg, #fff 25%, #fff7f8); }
.pf-hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 48px; align-items: center; margin-top: 28px; }
.pf-hero h1 { margin: 18px 0 28px; max-width: 20ch; font-size: clamp(32px, 3.4vw, 48px); font-weight: 800; line-height: 1.15; letter-spacing: -.035em; text-wrap: balance; overflow-wrap: break-word; }
.pf-category { color: #b81935; font-size: 13px; font-weight: 600; }
.pf-meta { display: flex; flex-wrap: wrap; gap: 22px 32px; margin: 0 0 26px; }
.pf-meta > div { min-width: 0; }
.pf-meta dt { color: #526176; font-size: 12px; margin-bottom: 5px; }
.pf-meta dd { margin: 0; font-size: 14px; font-weight: 600; }
.pf-visual { margin: 0; min-width: 0; }
.pf-visual img { display: block; width: 100%; aspect-ratio: 6 / 5; object-fit: cover; border-radius: 16px; background: #eef1f5; }
.pf-visual figcaption { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 0 0; color: #526176; font-size: 12px; }
.pf-action { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 46px; padding: 12px 20px; border-radius: 10px; border: 0; background: #202c3b; color: #fff; font-size: 13px; font-weight: 700; cursor: pointer; text-decoration: none; transition: background .18s ease, transform .18s ease; }
.pf-action:hover { background: #bd1937; transform: translateY(-1px); }
.pf-action.hidden { display: none; }
.pf-story { padding: 64px 0; }
.pf-story-grid { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 80px; align-items: start; }
.pf-narrative { min-width: 0; }
.pf-narrative > div + div { margin-top: 36px; padding-top: 36px; border-top: 1px solid #e4e9f0; }
.pf-narrative h2 { margin: 0 0 14px; color: #17263b; font-size: 24px; line-height: 1.3; font-weight: 750; letter-spacing: -.025em; }
.pf-narrative p { margin: 0; max-width: 70ch; color: #526176; font-size: 16px; line-height: 1.85; white-space: pre-line; overflow-wrap: anywhere; }
.pf-aside { position: sticky; top: 108px; padding-top: 4px; }
.pf-aside h2 { font-size: 15px; font-weight: 700; margin: 0 0 16px; }
.pf-aside #tech-stack { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.pf-aside #tech-stack > * { padding: 7px 10px; background: #f3f5f8; border: 0; border-radius: 6px; color: #526176; font-size: 12px; }
.pf-aside .pf-action { width: 100%; }
.pf-aside #p-live-preview-side { display: none; }
.pf-metrics { padding-block: 0 32px; background: #fff7f8; }
.pf-metrics #metrics-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); gap: 24px; }
.pf-metrics #metrics-grid > div { min-width: 0; max-width: none; align-items: flex-start; text-align: left; }
.pf-gallery { padding: 48px 0 64px; border-top: 1px solid #e4e9f0; }
.pf-gallery h2 { font-size: 28px; font-weight: 750; margin: 0 0 28px; letter-spacing: -.025em; }
.pf-gallery #gallery-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.pf-gallery #gallery-grid > div { border-radius: 12px; overflow: hidden; }
.pf-gallery img { width: 100%; object-fit: contain; background: #f3f5f8; }
body[data-portfolio-shell] #loading,body[data-portfolio-shell] #error { min-height: 55vh; height: auto; padding: 80px 24px; }
body[data-portfolio-shell] #error h2 { font-size: 28px; }
body[data-portfolio-shell] #live-preview-modal { z-index: 200; }
body[data-portfolio-shell] .pf-language { display: flex; align-items: center; gap: 4px; margin-left: 18px; margin-right: auto; padding-inline: 8px; }
.pf-language a { display: grid; place-items: center; width: 36px; height: 44px; font-size: 12px; color: #526176; }
.pf-language a[aria-current] { color: #17263b; font-weight: 700; text-decoration: underline; text-underline-offset: 5px; }
.pf-language span { color: #c6ccd5; }
/* Listing: shorter cards; images keep their real proportions, links work by keyboard. */
body[data-portfolio-shell] #portfolio { padding-top: 42px; padding-bottom: 64px; max-width: 1264px; }
body[data-portfolio-shell] #portfolio > .text-center { max-width: 100%; }
body[data-portfolio-shell] #portfolio h1 { font-size: clamp(32px, 4vw, 50px); line-height: 1.15; letter-spacing: -.035em; }
body[data-portfolio-shell] #portfolio-filters { margin-bottom: 32px; gap: 10px; }
body[data-portfolio-shell] #portfolio-filters button { min-height: 44px; }
body[data-portfolio-shell] #full-portfolio-container { gap: 28px; }
.pf-card { display: flex; flex-direction: column; min-width: 0; overflow: hidden; border: 1px solid #dce3ec; border-radius: 14px; background: #fff; }
.pf-card-media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: #eef1f5; }
.pf-card-media img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform .3s ease; }
.pf-card:hover .pf-card-media img { transform: scale(1.025); }
.pf-card-body { padding: 22px; display: flex; flex-direction: column; flex: 1; min-width: 0; }
.pf-card-category { color: #b81935; font-size: 11px; font-weight: 600; margin: 0 0 10px; }
.pf-card h2 { margin: 0 0 12px; font-size: 20px; line-height: 1.4; font-weight: 750; letter-spacing: -.025em; }
.pf-card h2 a { color: inherit; text-decoration: none; }
.pf-card h2 a:hover { color: #b81935; text-decoration: underline; text-underline-offset: 4px; }
.pf-card-description { font-size: 14px; line-height: 1.75; color: #526176; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; margin: 0 0 20px; }
.pf-card-tech { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.pf-card-tech span { padding: 5px 8px; background: #f3f5f8; color: #526176; border-radius: 5px; font-size: 11px; }
.pf-card-link { display: flex; justify-content: space-between; gap: 10px; padding-top: 18px; margin-top: 18px; border-top: 1px solid #e4e9f0; min-height: 44px; color: #b81935; font-size: 12px; font-weight: 700; text-decoration: none; }
.pf-card-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.pf-card .pf-card-metrics { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; }
@media (max-width: 1023px) {
  .pf-hero-grid { gap: 32px; }
  .pf-story-grid { gap: 40px; grid-template-columns: minmax(0,1fr) 240px; }
}
@media (max-width: 760px) {
  .pf-container { width: calc(100% - 40px); }
  .pf-hero { padding: 20px 0 32px; }
  .pf-hero-grid { grid-template-columns: 1fr; gap: 28px; margin-top: 16px; }
  .pf-hero h1 { max-width: 100%; margin-block: 12px 22px; font-size: 32px; }
  .pf-meta { margin-bottom: 20px; gap: 18px 28px; }
  .pf-visual img { aspect-ratio: 16 / 10; border-radius: 12px; }
  .pf-story { padding: 36px 0; }
  .pf-story-grid { grid-template-columns: 1fr; gap: 32px; }
  .pf-narrative h2 { font-size: 22px; }
  .pf-narrative p { font-size: 15px; line-height: 1.8; }
  .pf-narrative > div + div { margin-top: 26px; padding-top: 26px; }
  .pf-aside { position: static; padding: 24px 0 0; border-top: 1px solid #e4e9f0; }
  .pf-aside #tech-stack { margin-bottom: 20px; }
  .pf-gallery { padding: 32px 0; }
  .pf-gallery #gallery-grid { grid-template-columns: 1fr; gap: 16px; }


  body[data-portfolio-shell] .pf-language { margin-inline: auto 10px; padding: 0; gap: 0; }
  .pf-language a { width: 32px; }
  body[data-portfolio-shell] #portfolio { padding-top: 32px; padding-bottom: 40px; }
  body[data-portfolio-shell] #full-portfolio-container { gap: 20px; }
}

@media (prefers-reduced-motion: reduce) { body[data-portfolio-shell] *,body[data-portfolio-shell] *::before,body[data-portfolio-shell] *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; } }
