.pj {
  --acc: var(--sys);
  max-width: 1200px; width: 100%; margin: 0 auto; padding-top: 80px;
}
html[data-mode="dev"] .pj { --acc: var(--dev); }
.acc { color: var(--acc); transition: color .6s ease; }
.instant, .instant * { transition: none !important; }

/* ── Başlık + mod anahtarı ── */
.pj-head {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between;
  gap: 32px; margin-bottom: 56px;
}
.pj-head-copy { max-width: 620px; }
.pj-head .eyebrow { margin-bottom: 16px; }
.pj-head .page-lead { margin-top: 22px; font-size: 18px; }

.modes {
  display: flex; align-items: center; gap: 2px; min-width: 0;
  margin: 0; padding: 4px; border: 1px solid var(--border); border-radius: 10px;
}
.modes legend { float: left; padding: 0 10px; font-family: var(--font-mono); font-size: 13px; color: var(--text-4); }
.mbtn {
  min-height: 44px; min-width: 60px; padding: 0 16px;
  border: 0; border-radius: 6px; background: transparent; color: var(--text-3);
  font-family: var(--font-mono); font-size: 14px; cursor: pointer;
  transition: background .4s, color .4s;
}
.mbtn:hover { color: var(--text); }
.mbtn[aria-pressed="true"] { background: color-mix(in srgb, var(--acc) 16%, transparent); color: var(--acc); }
.no-js .modes { display: none; }

/* ── Gövde ── */
.pj-body { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 32px; }

.map-panel {
  flex: 1 1 520px; min-width: 0;
  position: sticky; top: 24px;
  display: flex; flex-direction: column; gap: 16px;
  padding: 24px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line);
}
.map-top {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px;
  font-size: 12px; color: var(--text-4);
}
.map { position: relative; width: 100%; aspect-ratio: 560 / 460; }

.node {
  position: absolute; transform: translate(-50%, -50%);
  transition: left .9s var(--ease-move), top .9s var(--ease-move), opacity .4s;
}
.node.dim { opacity: .28; }
.node.ghost { opacity: 0; pointer-events: none; }
.node-in { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.node .dot {
  display: block; width: 10px; height: 10px; border-radius: 50%;
  border: 1.5px solid var(--acc); background: var(--surface);
  transition: border-color .6s, background .6s, box-shadow .6s;
}
.node.lit .dot { background: var(--acc); box-shadow: 0 0 18px color-mix(in srgb, var(--acc) 45%, transparent); }
.nlabel {
  padding: 0 4px; background: var(--surface);
  font-family: var(--font-mono); font-size: 12px; color: var(--text-3); white-space: nowrap;
  transition: color .4s;
}
.node.lit .nlabel { color: var(--text); }

.edge {
  position: absolute; height: 1px; transform-origin: 0 50%;
  background: color-mix(in srgb, var(--acc) 45%, transparent);
  transition: left .9s var(--ease-move), top .9s var(--ease-move), width .9s var(--ease-move),
              transform .9s var(--ease-move), opacity .4s, background .6s;
}
.edge.dim { opacity: .12; }
.edge.ghost { opacity: 0; }
.packet {
  position: absolute; top: -1.5px; width: 4px; height: 4px; border-radius: 2px;
  background: var(--acc); animation: packet 3.2s linear infinite;
}
.edge.dim .packet, .edge.ghost .packet { display: none; }
@keyframes packet {
  0% { left: 0; opacity: 0; }
  12% { opacity: 1; }
  88% { opacity: 1; }
  100% { left: 100%; opacity: 0; }
}

/* ── Proje kartları ── */
.pj-side { flex: 1 1 400px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.cards { display: flex; flex-direction: column; gap: 36px; }
.cgroup { display: flex; flex-direction: column; gap: 12px; }
.cgroup-title { margin-bottom: 4px; font-size: 13px; font-weight: 400; color: var(--text-4); }
.cards.leaving .pwrap { opacity: 0; transition: opacity .2s; }
.pwrap { position: relative; }
.pwrap.has-links .pcard { padding-bottom: 64px; }
.plinks { position: absolute; left: 24px; bottom: 12px; display: flex; gap: 16px; font-size: 13px; }
.plinks a {
  display: inline-flex; align-items: center; min-height: 44px;
  color: var(--acc); text-decoration: underline; text-underline-offset: 4px;
  text-decoration-color: color-mix(in srgb, var(--acc) 45%, transparent);
  transition: color .6s;
}
.pcard {
  display: flex; flex-direction: column; gap: 10px;
  width: 100%; padding: 22px 24px; text-align: left; cursor: pointer;
  border-radius: 12px; border: 1px solid var(--border); background: var(--surface);
  color: var(--text); font-family: var(--font-sans);
  transition: border-color .3s, background .3s;
}
.pcard:hover { border-color: var(--border-3); }
.pcard[aria-pressed="true"] {
  border-color: var(--acc);
  background: color-mix(in srgb, var(--acc) 7%, var(--surface));
}
.pnum { font-size: 12px; color: var(--text-4); }
.ptitle { font-size: 20px; font-weight: 600; letter-spacing: -.01em; }
.psummary { font-size: 15px; line-height: 1.5; color: var(--text-3); }
.phl { font-size: 12px; line-height: 1.5; color: var(--acc); transition: color .6s; }
.pitem .phl { margin-top: 12px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.tag {
  padding: 4px 8px; border: 1px solid var(--border-2); border-radius: 5px;
  font-family: var(--font-mono); font-size: 12px; color: var(--text-2);
}
.all-link {
  align-self: flex-start; display: inline-flex; align-items: center; min-height: 44px;
  margin-top: 8px; font-size: 13px; color: var(--text-3);
}

/* ── Tüm projeler ── */
.plist { margin-top: 112px; }
.plist .label { margin-bottom: 0; }
.plist-group { margin-top: 40px; }
.cat-label { margin: 28px 0 0; font-size: 13px; font-weight: 400; color: var(--text-4); }
.group-label {
  display: flex; align-items: center; gap: 10px; margin-bottom: 8px;
  font-size: 13px; font-weight: 400; color: var(--text-3);
}
.pitem {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px;
  padding: 28px 0; border-top: 1px solid var(--line); scroll-margin-top: 24px;
}
.pitem-main { flex: 1 1 360px; min-width: 0; }
.pitem-title { font-size: 22px; font-weight: 600; letter-spacing: -.01em; }
.pitem-summary { margin-top: 8px; font-size: 15px; line-height: 1.55; color: var(--text-3); }
.pitem .tags { margin-top: 14px; }
.pitem-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 14px; font-size: 12px; color: var(--text-4); }
.pitem-meta a { display: inline-flex; align-items: center; min-height: 32px; color: var(--text-2); }
.pitem-diagram {
  flex: 0 1 320px; min-width: 0; height: auto; align-self: flex-start;
  border: 1px solid var(--border); border-radius: 10px; background: var(--surface);
}

@media (max-width: 900px) {
  .map-panel { position: static; }
}
@media (max-width: 768px) {
  .pj { padding-top: 56px; }
  .pj-head { margin-bottom: 40px; }
  .packet { display: none; }
  .plist { margin-top: 72px; }
}
@media (max-width: 520px) {
  .map-panel { padding: 16px; }
  .nlabel { font-size: 10px; padding: 0 2px; }
  .node-in { gap: 5px; }
  .pcard { padding: 18px 18px; }
  .pwrap.has-links .pcard { padding-bottom: 62px; }
  .plinks { left: 18px; }
}
