:root {
  --pd-paper: #F8F7F2;
  --pd-ink: #141414;
  --pd-accent: #F7D84A;
  --pd-blue: #3B5BF0;
  --pd-copy: #3d4352;
}

.pd-row{all:unset;box-sizing:border-box;display:flex;align-items:center;gap:14px;width:100%;padding:14px 12px;cursor:pointer;
  background:#fff;border:1.5px solid var(--pd-accent);border-radius:16px;box-shadow:0 6px 18px rgba(11,27,58,.10);color:inherit;font:inherit;
  -webkit-tap-highlight-color:transparent;transition:transform .15s ease,box-shadow .15s ease}
.pd-row:hover{box-shadow:0 10px 24px rgba(11,27,58,.16)}
.pd-row:active{transform:scale(.985)}
.pd-row:focus-visible{outline:3px solid var(--pd-blue);outline-offset:3px}
.pd-thumb{width:46px;height:46px;flex:none;border-radius:12px;object-fit:cover;object-position:left top;display:block}
.pd-meta{display:flex;flex-direction:column;min-width:0;text-align:start}
.pd-meta b{font-size:1.1rem;line-height:1.25}
.pd-meta small{opacity:.65;font-size:.82rem;font-weight:500}
.pd-plus{margin-inline-start:auto;font-size:1.4rem;opacity:.55;padding-inline:6px}

.pd-overlay{position:fixed;inset:0;z-index:9999;display:flex;align-items:flex-end;justify-content:center;
  background:rgba(10,15,31,0);backdrop-filter:blur(0);-webkit-backdrop-filter:blur(0);transition:background .4s ease,backdrop-filter .4s ease}
.pd-overlay.pd-in{background:rgba(10,15,31,.55);backdrop-filter:blur(3px);-webkit-backdrop-filter:blur(3px)}
.pd-sheet{position:relative;box-sizing:border-box;width:100%;height:calc(100% - 34px);overflow-y:auto;overscroll-behavior:contain;
  background:var(--pd-paper);color:#14171f;border-radius:30px 30px 0 0;padding:18px 18px 70px;
  transform:translateY(100%);transition:transform .4s cubic-bezier(.2,.8,.2,1);-webkit-overflow-scrolling:touch}
.pd-in .pd-sheet{transform:none}
.pd-close{position:sticky;top:0;float:right;z-index:3;width:38px;height:38px;border-radius:50%;border:0;background:var(--pd-ink);color:#fff;font-size:24px;line-height:1;cursor:pointer}
[dir=rtl] .pd-close{float:left}
.pd-close:focus-visible{outline:3px solid var(--pd-accent);outline-offset:2px}
.pd-img{display:block;width:100%;height:auto;border-radius:16px;margin-top:34px;box-shadow:0 10px 26px rgba(11,27,58,.2);transform-origin:top left}
.pd-body{opacity:0;transform:translateY(12px);transition:opacity .3s ease .25s,transform .3s ease .25s}
.pd-in .pd-body{opacity:1;transform:none}
.pd-body h3{margin:16px 0 0;font-size:1.9rem;line-height:1.15;letter-spacing:-.02em}
.pd-tags{display:flex;flex-wrap:wrap;gap:6px;margin:12px 0 0;padding:0;list-style:none}
.pd-tags li{direction:ltr;unicode-bidi:isolate;font-size:.75rem;font-weight:600;padding:5px 10px;border-radius:99px;background:#EFE9D6}
.pd-body p{margin:14px 0 0;line-height:1.55;font-size:1rem;color:var(--pd-copy)}
.pd-body ul.pd-list{margin:10px 0 0;padding-inline-start:20px;line-height:1.5;color:var(--pd-copy)}
.pd-list li{margin-top:5px}
.pd-fade{position:sticky;bottom:-70px;left:0;right:0;height:70px;margin-top:-20px;pointer-events:none;background:linear-gradient(rgba(248,247,242,0),var(--pd-paper))}
.pd-lock{overflow:hidden!important}

@media (min-width:900px){
  .pd-overlay{align-items:center}
  .pd-sheet{height:auto;max-height:86vh;width:min(980px,92vw);border-radius:28px;padding:26px;
    display:grid;grid-template-columns:1.2fr 1fr;gap:30px;align-items:start;transform:translateY(24px) scale(.97);opacity:0;transition:transform .4s cubic-bezier(.2,.8,.2,1),opacity .3s ease}
  .pd-in .pd-sheet{transform:none;opacity:1}
  .pd-close{position:absolute;top:14px;right:14px;float:none}
  [dir=rtl] .pd-close{right:auto;left:14px}
  .pd-img{margin-top:0}
  .pd-body h3{margin-top:0}
  .pd-fade{display:none}
}
@media (prefers-reduced-motion:reduce){
  .pd-overlay,.pd-sheet,.pd-body{transition:opacity .15s linear!important}
  .pd-sheet{transform:none!important}
}

/* ===== DALA blue + gold hero card (from the DALA Fuel Line style package) ===== */
.pd-row.pd-hero{position:relative;overflow:hidden;isolation:isolate;gap:clamp(10px,2.4vw,24px);padding:clamp(12px,2.6vw,26px);border:2px solid #1a70ed;border-radius:clamp(20px,3vw,32px);
  background:linear-gradient(125deg,#0b3e91,#031638 55%,#063f9c);color:#fff;box-shadow:0 14px 34px rgba(2,11,32,.45),inset 0 1px 0 rgba(255,255,255,.4)}
.ship-projects .pd-hero{grid-column:1/-1}
.pd-hero:hover{box-shadow:0 18px 40px rgba(2,11,32,.55),inset 0 1px 0 rgba(255,255,255,.4)}
.pd-hero:before,.pd-hero:after{content:"";position:absolute;z-index:-1;pointer-events:none;transform:skewX(-28deg)}
.pd-hero:before{width:34%;height:150%;top:-82%;left:-13%;border-bottom:8px solid #ffca05;background:linear-gradient(135deg,#ffd51f 0,#f7a900 40%,rgba(247,169,0,0) 85%)}
.pd-hero:after{width:43%;height:130%;right:-18%;bottom:-93%;border-top:8px solid #ffca05;background:linear-gradient(135deg,rgba(7,87,197,0) 10%,#ffb800 85%)}
.pd-hero .pd-logo{flex:none;width:clamp(58px,12vw,120px);aspect-ratio:1;display:grid;place-items:center;border:3px solid #ffca05;border-radius:clamp(14px,2.4vw,26px);padding:3px;background:#041943}
.pd-hero .pd-thumb{width:100%;height:100%;border-radius:inherit;object-fit:contain}
.pd-hero .pd-div{flex:none;width:3px;height:clamp(40px,8vw,84px);background:#ffca05}
.pd-hero .pd-meta{gap:6px;flex:1}
.pd-hero .pd-meta b{font-size:clamp(20px,3.4vw,34px);line-height:1.1;color:#fff}
.pd-hero .pd-meta small{opacity:1;color:#f3f6ff;font-size:clamp(12px,1.9vw,20px);font-weight:500}
.pd-hero .pd-go{flex:none;margin-inline-start:auto;width:clamp(42px,8vw,84px);aspect-ratio:1;display:grid;place-items:center;border:clamp(2px,.5vw,4px) solid #ffca05;border-radius:50%;color:#fff;
  background:linear-gradient(145deg,#0d4ca4,#031638);box-shadow:0 0 0 5px rgba(255,202,5,.13),0 0 20px rgba(255,202,5,.45)}
.pd-hero .pd-go svg{width:60%;height:60%}
[dir=rtl] .pd-hero .pd-go svg{transform:scaleX(-1)}
@media (prefers-reduced-motion:no-preference){.pd-hero:hover .pd-go{box-shadow:0 0 0 7px rgba(255,202,5,.2),0 0 28px rgba(255,202,5,.7)}}

/* tap hint: pulsing rings + a little hand that taps */
.pd-hero .pd-go{position:relative;overflow:visible}
.pd-hero .pd-ripple{position:absolute;inset:0;border-radius:50%;border:2px solid #ffca05;opacity:0;pointer-events:none}
.pd-hero .pd-hand{position:absolute;width:46%;height:46%;right:-14%;bottom:-18%;filter:drop-shadow(0 3px 4px rgba(0,0,0,.45));pointer-events:none;transform-origin:30% 10%}
[dir=rtl] .pd-hero .pd-hand{right:auto;left:-14%;transform:scaleX(-1)}
@media (prefers-reduced-motion:no-preference){
  .pd-hero .pd-ripple{animation:pdRipple 2.4s ease-out infinite}
  .pd-hero .pd-ripple.r2{animation-delay:1.2s}
  .pd-hero .pd-hand{animation:pdTap 2.4s ease-in-out infinite}
  .pd-hero:hover .pd-hand,.pd-hero:focus-visible .pd-hand{animation-duration:1.2s}
}
@keyframes pdRipple{0%{transform:scale(1);opacity:.85}70%,100%{transform:scale(1.7);opacity:0}}
@keyframes pdTap{0%,55%,100%{transform:translate(0,0) scale(1)}25%{transform:translate(-14%,-14%) scale(1.04)}40%{transform:translate(-4%,-4%) scale(.92)}}

/* ===== opened view fits the screen: no scrolling ===== */
@media (max-width:899px){
  .pd-sheet{display:flex;flex-direction:column;height:auto;max-height:calc(100vh - 18px);max-height:calc(100dvh - 18px);overflow:hidden;padding:14px 16px calc(14px + env(safe-area-inset-bottom,0px))}
  .pd-fade{display:none}
  .pd-close{position:absolute;top:10px;right:12px;float:none;width:34px;height:34px;font-size:22px}
  [dir=rtl] .pd-close{right:auto;left:12px}
  .pd-img{flex:0 1 auto;width:auto;max-width:100%;min-height:0;max-height:30vh;max-height:30dvh;margin:30px auto 0;object-fit:contain}
  .pd-body{flex:0 0 auto}
  .pd-body h3{margin-top:12px;font-size:clamp(1.2rem,5.4vw,1.55rem)}
  .pd-tags{margin-top:8px;gap:5px}
  .pd-tags li{font-size:.68rem;padding:4px 9px}
  .pd-body p{margin-top:9px;font-size:.88rem;line-height:1.45}
  .pd-body ul.pd-list{margin-top:7px;font-size:.86rem;line-height:1.4;padding-inline-start:18px}
  .pd-list li{margin-top:3px}
}
@media (max-width:899px) and (max-height:700px){
  .pd-img{max-height:24vh;max-height:24dvh}
  .pd-body p{font-size:.82rem;line-height:1.38}
  .pd-body ul.pd-list{font-size:.8rem}
}
@media (min-width:900px){ .pd-img{max-height:calc(86vh - 52px);width:100%;object-fit:contain} }

/* tap the picture = full screen, tap again = close */
.pd-img{cursor:zoom-in}
.pd-zoom{position:fixed;inset:0;z-index:10001;display:grid;place-items:center;padding:12px;background:rgba(4,9,24,.94);opacity:0;transition:opacity .2s ease;cursor:zoom-out;-webkit-tap-highlight-color:transparent}
.pd-zoom.pd-in{opacity:1}
.pd-zoom img{max-width:100%;max-height:100%;border-radius:12px;object-fit:contain;transform:scale(.94);transition:transform .25s cubic-bezier(.2,.8,.2,1)}
.pd-zoom.pd-in img{transform:none}
.pd-zoom-x{position:absolute;top:calc(10px + env(safe-area-inset-top,0px));right:12px;width:40px;height:40px;border-radius:50%;border:0;background:#ffca05;color:#031638;font-size:26px;line-height:1;cursor:pointer}
@media (max-width:899px) and (orientation:portrait){ .pd-zoom img{width:100%;max-height:92vh} }

/* demo video button + player */
.pd-video{position:absolute;z-index:3;top:12px;left:14px;display:inline-flex;align-items:center;gap:6px;border:0;border-radius:999px;padding:9px 16px;background:#ffca05;color:#031638;font:700 .85rem/1 inherit;font-family:inherit;cursor:pointer;box-shadow:0 6px 16px rgba(3,22,56,.28)}
[dir=rtl] .pd-video,.pd-sheet[dir=rtl] .pd-video{left:auto;right:14px}
.pd-video:hover{filter:brightness(1.06)}
@media (prefers-reduced-motion:no-preference){.pd-video{animation:pdPulse 2.4s ease-in-out infinite}}
@keyframes pdPulse{0%,100%{box-shadow:0 6px 16px rgba(3,22,56,.28),0 0 0 0 rgba(255,202,5,.55)}60%{box-shadow:0 6px 16px rgba(3,22,56,.28),0 0 0 10px rgba(255,202,5,0)}}
.pd-zoom-video video{max-width:100%;max-height:100%;border-radius:14px;background:#000;cursor:default;transform:scale(.94);transition:transform .25s cubic-bezier(.2,.8,.2,1)}
.pd-zoom-video.pd-in video{transform:none}
@media (max-width:899px) and (orientation:portrait){.pd-zoom-video video{width:auto;height:auto;max-height:90vh}}

/* ===== phones: the opened view is a full-screen page, no scrolling, bigger picture ===== */
@media (max-width:899px){
  .pd-overlay{align-items:stretch}
  .pd-sheet{position:fixed;inset:0;width:100%;height:100vh;height:100dvh;max-height:none;border-radius:0;justify-content:center;gap:0;
    padding:calc(54px + env(safe-area-inset-top,0px)) 14px calc(16px + env(safe-area-inset-bottom,0px));overflow:hidden}
  .pd-close{top:calc(10px + env(safe-area-inset-top,0px));right:14px;width:40px;height:40px}
  [dir=rtl] .pd-close{right:auto;left:14px}
  .pd-video{top:calc(12px + env(safe-area-inset-top,0px))}
  .pd-img{flex:0 1 auto;width:100%;max-width:none;height:auto;min-height:0;max-height:none;margin:0;object-fit:contain;border-radius:18px}
  .pd-body{flex:0 0 auto;padding:0 4px}
  .pd-body h3{margin-top:14px;font-size:clamp(1.3rem,6vw,1.65rem)}
  .pd-tags{margin-top:9px}
  .pd-tags li{font-size:.74rem;padding:5px 11px}
  .pd-body p{margin-top:11px;font-size:.95rem;line-height:1.5}
  .pd-body ul.pd-list{margin-top:9px;font-size:.92rem;line-height:1.45}
  .pd-list li{margin-top:4px}
}
@media (max-width:899px) and (max-height:720px){
  .pd-sheet{padding-top:calc(50px + env(safe-area-inset-top,0px));padding-bottom:calc(10px + env(safe-area-inset-bottom,0px))}
  .pd-body h3{margin-top:9px;font-size:1.25rem}
  .pd-tags{margin-top:6px}
  .pd-body p{margin-top:7px;font-size:.84rem;line-height:1.4}
  .pd-body ul.pd-list{margin-top:6px;font-size:.82rem;line-height:1.35}
  .pd-list li{margin-top:2px}
}

/* demo video: a normal full-screen player (video fills the screen, nothing in a corner) */
.pd-zoom-video{display:block;padding:0;background:#000;cursor:default}
.pd-zoom-video video{position:absolute;inset:0;width:100%;height:100%;max-width:none;max-height:none;border-radius:0;object-fit:contain;background:#000;transform:none!important;transition:none}
.pd-zoom-video .pd-zoom-x{z-index:2;background:rgba(255,255,255,.92)}
@media (max-width:899px) and (orientation:portrait){.pd-zoom-video video{width:100%;height:100%;max-height:none}}
