/* Syntaxoid — projects page */
  /* ---------- page overrides ---------- */
:root { --map: 0px; }
html { scroll-snap-type: none; }

.page {
  position: relative; min-height: 100vh;
  padding: calc(var(--top) + 44px) clamp(20px, 3vw, 48px) calc(var(--status) + 64px) calc(var(--gutter) + clamp(20px, 3vw, 48px));
}
.page .dotgrid { position: fixed; inset: 0; }
.layout { position: relative; z-index: 2; display: grid; grid-template-columns: 230px 1fr; gap: clamp(24px, 3vw, 44px); max-width: 1380px; margin: 0 auto; }

/* ---------- explorer ---------- */
.explorer {
  position: sticky; top: calc(var(--top) + 44px); align-self: start;
  border: 1px solid var(--line); border-radius: 10px; background: var(--bg-2); overflow: hidden; font-size: 13px;
}
.explorer .ttl { display: flex; justify-content: space-between; padding: 10px 14px; font-size: 11px; letter-spacing: .12em; color: var(--dim); border-bottom: 1px solid var(--line); }
.explorer ul { list-style: none; padding: 6px 0 10px; }
.explorer li > button {
  width: 100%; display: flex; align-items: center; gap: 8px; padding: 3px 14px; background: none; border: 0; cursor: pointer;
  font: inherit; color: var(--muted); text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.explorer li > button:hover { background: rgba(129,180,255,.06); color: var(--text); }
.explorer .dir > button { color: var(--text); }
.explorer .dir > button .chev { color: var(--dim); width: 10px; transition: transform .2s; display: inline-block; }
.explorer .dir.closed > button .chev { transform: rotate(-90deg); }
.explorer .dir.closed > ul { display: none; }
.explorer .dir > button.on { color: var(--sky); }
.explorer ul ul { padding: 0; }
.explorer ul ul button { padding-left: 32px; }
.explorer ul ul ul button { padding-left: 50px; }
.explorer .file .ic { font-size: 9px; font-weight: 700; color: var(--prop); }
.explorer .file.hit > button { color: var(--text); background: rgba(129,180,255,.08); }
.explorer .file.miss > button { opacity: .35; }

/* ---------- header ---------- */
.p-head { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: end; margin-bottom: 28px; }
.p-head h1 { font-size: clamp(28px, 3.6vw, 50px); font-stretch: 95%; margin-bottom: 14px; }
.p-head h1 .accent { color: var(--sky); }
.p-head p { max-width: 620px; }
.p-count { font-size: 12px; color: var(--dim); text-align: right; white-space: nowrap; }
.p-count b { color: var(--num); font-weight: 500; }

/* ---------- command-line toolbar ---------- */
.cmdline {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; padding: 12px 16px; margin-bottom: 26px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px; font-size: 13.5px;
}
.cmdline .pr { color: var(--str); }
.cmdline .flags { display: flex; flex-wrap: wrap; gap: 6px; }
.flag {
  font: inherit; font-size: 12.5px; padding: 4px 10px; border-radius: 5px; cursor: pointer;
  background: var(--bg-2); color: var(--muted); border: 1px solid var(--line); transition: all .2s;
}
.flag:hover { color: var(--text); border-color: var(--line-2); }
.flag.on { color: #fff; background: var(--core); border-color: var(--core); }
.flag .eq { color: var(--dim); } .flag.on .eq { color: #BFD8FF; }
.grep { display: flex; align-items: center; gap: 8px; margin-left: auto; min-width: 220px; flex: 0 1 300px; }
.grep span { color: var(--dim); white-space: nowrap; }
.grep span b { color: var(--kw); font-weight: 400; }
.grep input {
  flex: 1; min-width: 0; font: inherit; color: var(--str); background: var(--bg-2); border: 1px solid var(--line);
  border-radius: 5px; padding: 5px 10px; outline: none; caret-color: var(--sky);
}
.grep input:focus { border-color: var(--sky); }
.grep input::placeholder { color: var(--dim); }

/* ---------- grid ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.proj {
  position: relative; display: flex; flex-direction: column; text-align: left; cursor: pointer;
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; font: inherit; color: inherit;
  transition: transform .3s cubic-bezier(.2,.7,.2,1), border-color .25s, box-shadow .3s;
  animation: projIn .5s both;
}
@keyframes projIn { from { opacity: 0; transform: translateY(14px); filter: blur(3px); } to { opacity: 1; transform: none; filter: none; } }
.proj:hover, .proj:focus-visible { transform: translateY(-5px); border-color: var(--line-2); box-shadow: 0 26px 50px -28px rgba(20,89,204,.6); outline: none; }
.proj:focus-visible { border-color: var(--sky); }
.proj .head { display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px; background: var(--bg-2); border-bottom: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.proj .head .ic { font-size: 10px; font-weight: 700; }
.proj .head .yr { margin-left: auto; color: var(--dim); }
.proj .shot { position: relative; aspect-ratio: 16 / 10; background: var(--bg-2); border-bottom: 1px solid var(--line); overflow: hidden; }
.proj .shot svg, .proj .shot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.proj:hover .shot svg, .proj:hover .shot img { transform: scale(1.04); }
.proj .shot .open {
  position: absolute; right: 12px; bottom: 12px; font-size: 12px; padding: 5px 10px; border-radius: 5px;
  background: var(--core); color: #fff; opacity: 0; transform: translateY(6px); transition: all .3s;
}
.proj:hover .shot .open, .proj:focus-visible .shot .open { opacity: 1; transform: none; }
.badge { position: absolute; left: 12px; top: 12px; font-size: 10.5px; letter-spacing: .06em; padding: 2px 8px; border-radius: 4px; background: rgba(245,194,122,.14); color: var(--num); border: 1px solid rgba(245,194,122,.3); }
.proj .body { padding: 18px 18px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.proj h3 { font-size: 17px; }
.proj .kind { font-size: 12px; color: var(--dim); }
.proj .kind b { color: var(--fn); font-weight: 400; }
.proj p { font-size: 13.5px; line-height: 1.65; color: var(--com); font-style: italic; flex: 1; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.tags span { font-size: 11.5px; color: var(--str); background: rgba(159,224,184,.07); border: 1px solid rgba(159,224,184,.18); border-radius: 4px; padding: 1px 7px; }

.empty { grid-column: 1 / -1; padding: 40px; text-align: center; border: 1px dashed var(--line-2); border-radius: 10px; color: var(--muted); }
.empty code { color: var(--err, #FF9B9B); }

/* ---------- add-your-own hint ---------- */
.hint { margin-top: 28px; font-size: 13px; color: var(--dim); }
.hint b { color: var(--muted); font-weight: 400; }

/* ---------- README modal ---------- */
.modal { position: fixed; inset: 0; z-index: 80; display: none; place-items: center; padding: calc(var(--top) + 16px) 16px calc(var(--status) + 16px); }
.modal.open { display: grid; }
.modal .scrim { position: absolute; inset: 0; background: rgba(10,12,14,.72); backdrop-filter: blur(6px); animation: fade .25s; }
@keyframes fade { from { opacity: 0; } }
.readme {
  position: relative; width: min(960px, 100%); max-height: 100%; display: flex; flex-direction: column;
  background: var(--panel); border: 1px solid var(--line-2); border-radius: 12px; overflow: hidden;
  box-shadow: 0 40px 100px -30px rgba(0,0,0,.8); animation: pop2 .35s cubic-bezier(.2,.7,.2,1);
}
@keyframes pop2 { from { opacity: 0; transform: translateY(18px) scale(.98); } }
.readme .head { display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 8px 0 16px; background: var(--bg-2); border-bottom: 1px solid var(--line); font-size: 12.5px; color: var(--muted); flex-shrink: 0; }
.readme .head .ic { font-size: 10px; font-weight: 700; color: var(--muted); }
.readme .head .nav { margin-left: auto; display: flex; gap: 4px; }
.readme .head button { font: inherit; font-size: 12px; background: none; border: 1px solid transparent; color: var(--muted); border-radius: 5px; padding: 3px 9px; cursor: pointer; }
.readme .head button:hover { color: #fff; border-color: var(--line-2); }
.readme .scroll { overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.readme .hero-shot { position: relative; aspect-ratio: 21 / 9; background: var(--bg-2); border-bottom: 1px solid var(--line); overflow: hidden; }
.readme .hero-shot svg, .readme .hero-shot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.readme .doc { padding: 28px 32px 34px; display: grid; grid-template-columns: 1fr 260px; gap: 34px; }
.readme h2 { font-size: clamp(22px, 2.6vw, 32px); margin-bottom: 12px; }
.readme h2 .tok, .readme h4 .tok { color: var(--sky); font-weight: 400; }
.readme h4 { font-family: var(--display); font-size: 14px; color: #F5F7F8; margin: 24px 0 10px; }
.readme p { font-size: 14.5px; }
.readme ul.hl { list-style: none; display: grid; gap: 6px; font-size: 14px; color: var(--muted); }
.readme ul.hl li::before { content: "- "; color: var(--sky); }
.readme .front { font-size: 13px; line-height: 2; background: var(--bg-2); border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; align-self: start; }
.readme .front .sep { color: var(--dim); }
.readme .links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.readme .links .btn { padding: 10px 16px; font-size: 13px; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .layout { grid-template-columns: 1fr; }
  .explorer { display: none; }
}
@media (max-width: 760px) {
  .p-head { grid-template-columns: 1fr; }
  .p-count { text-align: left; }
  .grep { margin-left: 0; flex-basis: 100%; }
  .readme .doc { grid-template-columns: 1fr; padding: 22px 20px 26px; }
  .readme .hero-shot { aspect-ratio: 16 / 10; }
  .grid { grid-template-columns: 1fr; }
}
