.project-view { padding-top: clamp(.4rem,.9vw,1.1rem); overflow-wrap: anywhere; }
.project-crumbs, .project-index, .project-skills { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .65rem; }
.project-crumbs { padding-block: 0 clamp(14px,1.8vw,25px); font-size: 1rem; }
.project-crumbs a, .project-index a { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink); text-decoration: none; }
.project-crumbs a:hover { text-decoration: underline; }
.project-crumbs [aria-current] { font-weight: 740; }
.project-crumbs > svg { color: var(--muted); }

.project-overview { display: grid; grid-template-columns: minmax(0,.98fr) minmax(0,1fr); gap: clamp(22px,2.8vw,40px); }
.project-gallery, .project-summary { min-width: 0; }
.project-summary { display: flex; flex-direction: column; align-self: stretch; justify-content: center; gap: clamp(10px,1.4vw,20px); }
.project-heading { display: flow-root; }
.project-mascot { float: right; margin: 0 -.25rem .2rem .5rem; width: clamp(74px,10.5vw,145px); height: auto; }
.project-category { display: table; padding: .25rem .85rem; margin-bottom: .65rem; border-radius: 1rem; background: #d3edff; color: var(--ink); font-weight: 720; }
.project-heading :is(h1,h2) { font-size: clamp(2.2rem,4.55vw,3.9rem); line-height: 1.04; font-weight: 850; letter-spacing: -.045em; text-wrap: balance; }
.project-intro { margin-top: .65rem; font-size: clamp(1.08rem,1.82vw,1.42rem); line-height: 1.27; font-weight: 500; }
.project-skills { list-style: none; margin: 0; padding: 0; gap: .5rem; }
.project-skills .device-tag { gap: .45rem; padding: .45rem .85rem; color: var(--ink); background: var(--action-tint); font-size: clamp(1rem,1.52vw,1.16rem); }
.project-skills .device-tag svg { color: var(--action); }
.project-skills .device-tag:nth-child(3n) { background: var(--sea); }
.project-skills .device-tag:nth-child(3n) svg { color: var(--ink); }

.project-photo { position: relative; display: grid; place-items: center; width: 100%; aspect-ratio: 1.24; padding: 0; overflow: hidden; border: 0; border-radius: clamp(18px,2.8vw,36px); background: var(--surface-muted); cursor: zoom-in; }
#project-photo { position: relative; display: block; width: auto; height: auto; max-width: 100%; max-height: 100%; min-width: 0; min-height: 0; object-fit: contain; }
.photo-edge { display: none; position: absolute; left: 0; right: 0; height: 50%; overflow: hidden; pointer-events: none; }
.wide-photo .photo-edge { display: block; }
.photo-edge.top { top: 0; }
.photo-edge.bottom { bottom: 0; }
.photo-edge img { display: block; width: 100%; height: 100%; transform: scaleY(12); }
.photo-edge.top img { transform-origin: center top; }
.photo-edge.bottom img { transform-origin: center bottom; }
.photo-zoom { position: absolute; bottom: .6rem; right: .6rem; display: flex; align-items: center; gap: .3rem; padding: .28rem .55rem; font-weight: 640; font-size: .88rem; color: var(--ink); background: white; border-radius: .65rem; opacity: 0; }
.project-photo:hover .photo-zoom, .project-photo:focus-visible .photo-zoom { opacity: 1; }
.photo-choices { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: clamp(6px,1vw,14px); margin-top: .8rem; padding-inline: .3rem 0; }
.photo-choice { display: block; min-width: 0; min-height: 44px; aspect-ratio: 1.43; padding: .15rem; border: 2px solid transparent; border-radius: .85rem; background: transparent; }
.photo-choice img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: .55rem; }
.photo-choice[aria-pressed='true'] { border-color: var(--action); background: var(--action-tint); }
.photo-dialog { max-width: min(96vw,90rem); max-height: 94vh; padding: .75rem; border: 0; border-radius: 1rem; color: var(--ink); background: white; }
.photo-dialog::backdrop { background: rgb(9 16 37 / 78%); }
.photo-dialog form { display: flex; justify-content: end; margin-bottom: .5rem; }
.photo-dialog img { display: block; object-fit: contain; width: auto; max-width: 100%; max-height: 76vh; }

.project-view .project-summary .project-editions { padding: 0; margin: 0; border: 0; }
.project-view .project-editions legend { padding: 0; margin: 0 0 .26rem; font-size: 1rem; line-height: 1.25; font-weight: 610; }
.project-editions > div { display: flex; flex-wrap: wrap; gap: .55rem; }
.project-editions label { position: relative; cursor: pointer; }
.project-editions input { position: absolute; clip-path: inset(50%); overflow: hidden; }
.project-editions label span, .edition-preview { display: inline-flex; justify-content: center; align-items: center; min-height: 42px; min-width: 5.75rem; border: 1.5px solid #949eac; border-radius: .8rem; padding: .35rem .85rem; font-weight: 730; font-size: 1.06rem; }
.project-editions input:checked + span, .edition-preview { background: var(--action-tint); color: var(--action); border-color: var(--action); box-shadow: inset 0 0 0 1px currentColor; }
.project-editions input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 3px; }
.edition-preview { align-self: start; }
.edition-notice:not(:empty) { margin-top: .5rem; font-size: 1rem; }
.project-actions, .project-summary .project-secondary { display: grid; grid-template-columns: minmax(0,.94fr) minmax(0,1.06fr); gap: .8rem; margin: 0; }
.project-actions .button { min-height: clamp(48px,5.1vw,65px); font-size: clamp(1.03rem,1.8vw,1.35rem); padding: .55rem .6rem; gap: .55rem; line-height: 1.18; }
.project-secondary .button { position: relative; display: inline-flex; justify-content: center; gap: .65rem; min-height: 44px; padding: .35rem .4rem; border: 0; background: transparent; color: var(--ink); font-size: clamp(1rem,1.65vw,1.23rem); }
.project-secondary .button + .button::before { content: ''; position: absolute; left: -.4rem; top: 21%; bottom: 21%; border-left: 1px solid #b4bfce; }
.project-secondary .button:hover { background: var(--sea); }
#project-add[aria-disabled='true'] { cursor: progress; }
.device-specs { position: relative; display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,10rem),1fr)); gap: 1.35rem 0; margin: .65rem 0 .9rem; padding: clamp(46px,5.5vw,75px) 0 .85rem; }
.device-specs::before { content: ''; position: absolute; inset: 0 0 auto; height: clamp(17px,2.7vw,35px); background: url('/media/piraaci/fala.svg') center / 100% 100% no-repeat; }
.device-specs > div { position: relative; padding-inline: clamp(44px,7.3vw,86px) .65rem; line-height: 1.13; }
.device-specs > div + div { border-inline-start: 1px solid #b7c5d1; }
.device-specs dt { font-size: clamp(.95rem,1.52vw,1.13rem); font-weight: 560; }
.device-specs dt svg { position: absolute; width: clamp(27px,3.7vw,44px); height: auto; left: clamp(8px,2vw,24px); top: .1rem; }
.device-specs dd { margin: .18rem 0 0; font-size: clamp(1.15rem,2.1vw,1.55rem); font-weight: 780; }
.project-index { align-items: stretch; justify-content: space-between; gap: 0; margin-top: 1.2rem; border-bottom: 2px solid var(--line); }
.project-index a { justify-content: center; gap: .55rem; padding: .6rem clamp(.35rem,.85vw,1rem); border-bottom: 4px solid transparent; margin-bottom: -2px; font-size: clamp(1rem,1.56vw,1.2rem); font-weight: 710; }
.project-index a:hover, .project-index a[aria-current] { color: var(--action); border-color: currentColor; }
.project-view [data-project-section] { scroll-margin-block-start: 1rem; }
@media (max-width: 48em) {
  .project-overview { grid-template-columns: minmax(0,1fr); gap: 1.35rem; }
  .project-photo { aspect-ratio: 1.4; max-height: 30rem; }
  .project-summary { justify-content: start; }
  .project-crumbs { gap: .15rem .4rem; line-height: 1.18; }
  .device-specs { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .device-specs > div:nth-child(odd) { border-inline-start: 0; }
  .project-index { justify-content: start; gap: .15rem .35rem; }
}
@media (max-width: 28em) {
  .project-actions { grid-template-columns: minmax(0,1fr); gap: .45rem; }
  .project-index a { justify-content: start; }
}
@media (forced-colors: active) {
  .photo-choice[aria-pressed='true'], .project-index a[aria-current], .project-editions input:checked + span { border: 3px solid Highlight; }
}
