html.presentation-open {overflow: hidden}
#project-dialog {
  --pd-accent: #8edfff;
  --pd-tint: 82, 188, 239;
  box-sizing: border-box;
  position: fixed;
  inset: 0;
  margin: auto;
  width: min(746px, calc(100% - 32px));
  max-width: none;
  max-height: min(90dvh, 900px);
  padding: 0;
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid rgba(var(--pd-tint), .28);
  border-radius: 23px;
  background: #0b1322;
  color: #f2f6ff;
  box-shadow: 0 30px 120px #000a;
  scrollbar-width: thin;
  scrollbar-color: #536077 #0b1322;
}
#project-dialog[data-theme="oson"] {--pd-accent: #cfbaff; --pd-tint: 174, 137, 255}
#project-dialog[data-theme="xiva"] {--pd-accent: #f3c990; --pd-tint: 238, 170, 83}
#project-dialog::backdrop {background: #020610c9; backdrop-filter: blur(9px)}
#project-dialog[open] {animation: pd-enter .23s ease-out both}
.pd-panel {
  position: relative;
  padding: clamp(22px,4.5vw,38px);
  background: radial-gradient(85% 64% at 0% 0%, rgba(var(--pd-tint), .09), transparent 86%);
}
#project-dialog .pd-close {
  position: absolute;
  z-index: 2;
  right: 16px;
  top: 16px;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid #93aac633;
  border-radius: 50%;
  background: #101a2c;
  color: #e3e9f4;
  cursor: pointer;
}
#project-dialog .pd-close:hover {border-color: var(--pd-accent)}
#project-dialog .pd-intro {position: static; display: block; padding: 0; margin: 0; background: none; border: 0; box-shadow: none}
.pd-category {font-size: .78rem; font-weight: 650; letter-spacing: .09em; text-transform: uppercase; color: var(--pd-accent)}
#project-dialog h2 {
  margin: 9px 40px 12px 0;
  color: #f8faff;
  font-size: clamp(1.85rem, 5vw, 2.8rem);
  line-height: 1.05;
  letter-spacing: -.055em;
}
#project-dialog p, #project-dialog dd {margin: 0}
#project-dialog .pd-intro p, #project-dialog .pd-section p {color: #b8c6d6; font-size: 1rem; line-height: 1.6}
#project-dialog .pd-intro p {max-width: 60ch}
.pd-grid {margin-top: 23px; display: grid; grid-template-columns: minmax(0,.78fr) minmax(0,1.25fr); gap: 24px; align-items: stretch}
.pd-art {display:flex;align-items:center;overflow: hidden; border-radius: 14px; background: rgba(var(--pd-tint), .035); border: 1px solid rgba(var(--pd-tint),.14)}
.pd-art img {display: block; width: 100%; height: 100%; object-fit: cover}
#project-dialog .pd-section + .pd-section {margin-top: 18px; border-top: 1px solid #94aecd26; padding-top: 17px}
#project-dialog .pd-section h3 {margin: 0 0 4px; font-size: 1.1rem; letter-spacing: -.025em; line-height: 1.35; color: #f6f9ff}
#project-dialog .pd-section p {font-size: .98rem}
.pd-links {display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 0}
#project-dialog .pd-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 8px 15px;
  font-size: .9rem;
  font-weight: 620;
  text-decoration: none;
  line-height: 1.3;
  border: 1px solid rgba(var(--pd-tint),.36);
  border-radius: 9px;
  color: var(--pd-accent);
  background: rgba(var(--pd-tint), .055);
}
#project-dialog .pd-link.pd-primary {background: var(--pd-accent); color: #0b1422}
#project-dialog .pd-link:hover {filter: brightness(1.14); border-color: var(--pd-accent)}
#project-dialog :focus-visible {outline: 3px solid var(--pd-accent); outline-offset: 3px}
.pd-example {display: flex; flex-wrap: wrap; gap: 12px 24px; margin: 12px 0}
.pd-example dt {font-size: .8rem; color: #aab9cb}
#project-dialog .pd-example dd {font-size: 1.14rem; font-weight: 680; letter-spacing: -.035em; color: var(--pd-accent)}
.pd-screen {margin: 20px 0 0}
.pd-screen img {display: block; width: 100%; height: auto; border: 1px solid #8093ae3b; border-radius: 14px}
.pd-screen figcaption {font-size: .8rem; color: #a7b5c8; margin-top: 8px}
@keyframes pd-enter {from {opacity: 0; transform: translateY(8px)} to {opacity: 1; transform: translateY(0)}}
@media (max-width: 600px) {
  #project-dialog {max-height: 91dvh; border-radius: 18px}
  .pd-grid {display: block; margin-top: 19px}
  .pd-grid .pd-art {display: none}
  .pd-panel {padding: 24px 19px}
  .pd-category {display:block; padding-right:40px; max-width:100%}
  #project-dialog .pd-close {right: 10px; top: 10px}
  #project-dialog .pd-link {min-height: 44px}
}
@media (prefers-reduced-motion: reduce) {
  #project-dialog[open] {animation: none}
}
