/* A project's own page (src/project-page.ts), on top of base.css. Every color
   is the maker's theme, so it matches their page under any template. */
.pp-bar {
  max-width: 720px; margin: 0 auto; padding: 20px 16px 0;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.pp-back {
  display: inline-flex; align-items: center; gap: 8px; min-width: 0; height: 40px; padding: 0 14px 0 8px;
  border-radius: 999px; color: var(--text); font-size: 14px; font-weight: 600; text-decoration: none;
  background: color-mix(in srgb, var(--card) 80%, transparent); border: 1px solid var(--line);
  transition: border-color .2s, color .2s;
}
.pp-back svg { flex-shrink: 0; color: var(--muted); }
.pp-back:hover { border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); }
.pp-back:hover svg { color: var(--accent); }

.pp { max-width: 720px; margin: 0 auto; padding: 32px 16px 112px; display: grid; gap: 20px; }

.pp-head { display: flex; align-items: center; gap: 16px; min-width: 0; }
.pp-head .logo { border-radius: 24%; box-shadow: var(--shadow), 0 0 0 1px var(--hair); }
.pp-title { flex: 1; min-width: 0; display: grid; gap: 2px; }
.pp-title h1 { font-size: clamp(26px, 5vw, 34px); line-height: 1.15; font-weight: 750; letter-spacing: -.025em; }
.pp-by { color: var(--muted); font-size: 14px; overflow-wrap: anywhere; }
/* Real links that read as the plain byline: the maker's name in semibold, the host as text. */
.pp-by a { color: inherit; font-weight: inherit; text-decoration: none; }
.pp-by a:first-child { font-weight: 600; }
.pp-by a:hover { text-decoration: underline; text-underline-offset: 3px; }
.pp-lede { font-size: 17px; line-height: 1.55; color: color-mix(in srgb, var(--text) 88%, var(--muted)); }

.pp-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.pp-visit {
  display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 20px; max-width: 100%;
  border-radius: 999px; background: var(--accent); color: var(--on-accent); font-weight: 650; text-decoration: none;
  box-shadow: 0 8px 24px -10px color-mix(in srgb, var(--accent) 80%, transparent);
  transition: transform .25s var(--ease), filter .2s;
}
.pp-visit:hover { transform: translateY(-1px); filter: brightness(1.08); }

.pp-card { padding: 22px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); min-width: 0; }
.pp-label { font-size: 12.5px; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.pp-rev { display: grid; gap: 6px; }
.pp-big { font-family: var(--mono); font-size: clamp(34px, 8vw, 46px); font-weight: 650; letter-spacing: -.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.pp-per { font-size: .45em; color: var(--muted); letter-spacing: 0; margin-left: 2px; }
.pp-source { display: flex; align-items: center; gap: 10px; font-size: 14px; margin-top: 4px; }
.pp-verified svg { flex-shrink: 0; color: var(--accent); }
.pp-verified > span { display: grid; line-height: 1.35; }
.pp-dim, .pp-note { color: var(--muted); font-size: 13px; }
.pp-self { color: var(--muted); }

.pp-chart { margin: 18px 0 0; display: grid; gap: 8px; }
.pp-chart-top { display: flex; justify-content: space-between; align-items: baseline; }
.pp-max { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.pp-chart svg { width: 100%; height: 180px; display: block; border-bottom: 1px solid var(--line); }
.pp-chart rect { fill: var(--accent); }
.pp-chart rect.is-now { fill: color-mix(in srgb, var(--accent) 45%, transparent); }
.pp-axis { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 0; font-size: 11.5px; color: var(--muted); text-align: center; }
.pp-axis span { overflow: hidden; white-space: nowrap; }

.pp-shot { margin: 0; overflow: hidden; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--raised); box-shadow: var(--shadow); }
.pp-shot img { display: block; width: 100%; height: auto; }
.pp-details p { margin-top: 10px; white-space: pre-line; color: color-mix(in srgb, var(--text) 88%, var(--muted)); }

/* ---- the case study: links, facts, highlights, write-up, gallery, video, hire ---- */
.pp-bar-end { display: flex; align-items: center; gap: 10px; min-width: 0; }
.pp-link {
  display: inline-flex; align-items: center; gap: 7px; height: 44px; padding: 0 16px; max-width: 100%;
  border-radius: 999px; color: var(--text); font-size: 14.5px; font-weight: 600; text-decoration: none;
  background: color-mix(in srgb, var(--card) 85%, transparent); box-shadow: inset 0 0 0 1px var(--line);
  transition: box-shadow .2s, color .2s, background .2s;
}
.pp-link svg { flex-shrink: 0; color: var(--muted); transition: color .2s; }
.pp-link:hover { color: var(--accent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 50%, var(--line)); }
.pp-link:hover svg { color: var(--accent); }
.pp-tags { margin-top: -6px; }

.pp-zoom { display: block; cursor: zoom-in; }
.pp-zoom img { transition: transform .5s var(--ease), filter .3s; }
@media (hover: hover) { .pp-zoom:hover img { transform: scale(1.012); } }

.pp-facts { display: grid; gap: 18px; }
.pp-dl { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 14px 24px; }
.pp-dl > div { display: grid; gap: 2px; min-width: 0; }
.pp-dl dt, .pp-stack .pp-label { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.pp-dl dt svg, .pp-stack .pp-label svg { color: var(--accent); flex-shrink: 0; }
.pp-dl dd { margin: 0; font-size: 16.5px; font-weight: 600; letter-spacing: -.01em; }
.pp-dl + .pp-stack { padding-top: 16px; border-top: 1px solid var(--hair); }
.pp-stack { display: grid; gap: 10px; }
.pp-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.pp-chips li {
  display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px; border-radius: 999px;
  font-size: 13.5px; font-weight: 600; background: var(--raised); box-shadow: inset 0 0 0 1px var(--hair);
}
.pp-chips a { display: contents; color: inherit; text-decoration: none; }
.pp-chips li:has(a:hover) { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 45%, var(--line)); }
.pp-chips img { width: 16px; height: 16px; border-radius: 4px; flex-shrink: 0; }

.pp-highlights { display: grid; gap: 10px; }
.pp-highlights ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 10px; }
.pp-highlights li {
  display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; min-width: 0;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); font-weight: 600; line-height: 1.4;
}
.pp-highlights li svg { flex-shrink: 0; margin-top: 1px; color: var(--accent); }

.pp-prose { margin-top: 12px; display: grid; gap: 14px; color: color-mix(in srgb, var(--text) 90%, var(--muted)); font-size: 16.5px; line-height: 1.65; }
.pp-prose h3 { margin-top: 10px; font-size: 19px; line-height: 1.3; font-weight: 700; letter-spacing: -.015em; color: var(--text); }
.pp-prose ul, .pp-prose ol { margin: 0; padding-left: 1.3em; display: grid; gap: 6px; }
.pp-prose li::marker { color: var(--accent); }
.pp-prose blockquote { margin: 0; padding: 4px 0 4px 16px; border-left: 3px solid var(--accent); color: var(--text); font-style: italic; }
.pp-prose code { font-family: var(--mono); font-size: .86em; background: var(--raised); border: 1px solid var(--hair); padding: 1px 5px; border-radius: 5px; }
.pp-prose a { overflow-wrap: anywhere; }

/* Screenshots: a swipeable strip on phones, a two-up grid from tablet width. */
.pp-gallery { display: grid; gap: 10px; min-width: 0; }
.pp-gallery ul {
  list-style: none; margin: 0 -16px; padding: 2px 16px 8px; display: grid; grid-auto-flow: column; grid-auto-columns: 84%;
  gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: 16px; scrollbar-width: none;
}
.pp-gallery ul::-webkit-scrollbar { display: none; }
.pp-gallery.is-one ul { grid-auto-columns: 100%; }
.pp-gallery li { scroll-snap-align: start; min-width: 0; }
.pp-gallery figure { margin: 0; display: grid; gap: 8px; }
.pp-gallery .pp-zoom { overflow: hidden; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--raised); aspect-ratio: 16 / 10; }
.pp-gallery img { display: block; width: 100%; height: 100%; object-fit: cover; }
.pp-gallery figcaption { font-size: 13.5px; color: var(--muted); line-height: 1.45; }
@media (min-width: 640px) {
  .pp-gallery ul { margin: 0; padding: 0; grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: visible; }
  .pp-gallery.is-one ul, .pp-gallery li:only-child { grid-column: 1 / -1; }
  .pp-gallery li:last-child:nth-child(odd):not(:only-child) { grid-column: 1 / -1; }
  .pp-gallery li:last-child:nth-child(odd) .pp-zoom { aspect-ratio: 16 / 8; }
}

/* The video: our own poster until play is pressed (page.js swaps in the player). */
.pp-video { display: grid; gap: 10px; }
.pp-player {
  position: relative; display: grid; place-items: center; aspect-ratio: 16 / 9; overflow: hidden; color: #fff; text-decoration: none;
  border-radius: var(--r-lg); border: 1px solid var(--line); box-shadow: var(--shadow);
  background: radial-gradient(120% 90% at 30% 20%, color-mix(in srgb, var(--accent) 70%, #000), #0b0b0c);
}
.pp-player img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: brightness(.62) saturate(1.05); transition: transform .6s var(--ease), filter .3s; }
.pp-play {
  position: relative; display: grid; place-items: center; width: 72px; height: 72px; border-radius: 50%; padding-left: 4px;
  background: rgb(255 255 255 / .16); backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / .35), 0 12px 32px rgb(0 0 0 / .3); transition: transform .3s var(--ease), background .2s;
}
.pp-play svg { fill: #fff; stroke: none; }
.pp-player-note { position: absolute; left: 16px; right: 16px; bottom: 14px; font-size: 12.5px; color: rgb(255 255 255 / .82); text-align: center; text-shadow: 0 1px 8px rgb(0 0 0 / .5); }
.pp-player:hover .pp-play { transform: scale(1.06); background: rgb(255 255 255 / .24); }
.pp-player:hover img { transform: scale(1.02); filter: brightness(.55); }
.pp-player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.pp-hire {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 9%, var(--card)), var(--card) 70%);
}
.pp-hire > div { display: grid; gap: 6px; min-width: 0; flex: 1 1 280px; }
.pp-hire h2 { font-size: 21px; line-height: 1.25; font-weight: 700; letter-spacing: -.02em; }
.pp-hire .pp-visit { gap: 9px; }
.pp-hire-btns { display: flex; flex-wrap: wrap; gap: 10px; }
.pp-bar-end .cv { height: 32px; }

/* ---- the lightbox (page.js) ---- */
.lb { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: transparent; color: #fff; }
.lb::backdrop { background: rgb(8 8 10 / .92); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.lb[open] { display: grid; grid-template-rows: auto 1fr auto; animation: lb-in .25s var(--ease); }
@keyframes lb-in { from { opacity: 0; } }
.lb-top { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; font-size: 14px; color: rgb(255 255 255 / .75); font-variant-numeric: tabular-nums; }
.lb-stage { position: relative; display: grid; place-items: center; min-height: 0; padding: 0 16px; touch-action: pan-y; }
.lb-stage img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 10px; box-shadow: 0 20px 60px rgb(0 0 0 / .5); user-select: none; }
.lb-cap { min-height: 52px; padding: 12px 20px 20px; text-align: center; font-size: 14.5px; color: rgb(255 255 255 / .85); }
.lb button {
  display: inline-grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; cursor: pointer;
  color: #fff; background: rgb(255 255 255 / .12); transition: background .2s;
}
.lb button:hover { background: rgb(255 255 255 / .22); }
.lb-btns { display: flex; gap: 8px; }
.lb-one .lb-prev, .lb-one .lb-next, .lb-one .lb-count { visibility: hidden; }
html.lb-lock { overflow: hidden; }

.pp-more { display: grid; gap: 10px; margin-top: 8px; }
.pp-more ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 8px; }
.pp-more a {
  display: flex; align-items: center; gap: 10px; min-width: 0; padding: 10px 12px;
  background: var(--card); color: var(--text); text-decoration: none; font-weight: 600; font-size: 14.5px;
  border: 1px solid var(--line); border-radius: var(--r-md); transition: border-color .2s;
}
.pp-more a:hover { border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); }
.pp-more .one-line { flex: 1; }
/* More makers building the same thing: face, name and their first project. */
.pp-peer { display: grid; flex: 1; min-width: 0; line-height: 1.3; }
.pp-peer-proj { font-size: 13px; font-weight: 500; color: var(--muted); }
.pp-all { justify-self: start; font-size: 14px; font-weight: 600; text-decoration: none; }
.pp-all:hover { text-decoration: underline; }
a.chip { text-decoration: none; }
a.chip:hover { background: var(--soft-2); }

@media (max-width: 480px) {
  .pp { padding-top: 24px; gap: 18px; }
  .pp-bar-otw { display: none; }
  .pp-visit { flex: 1 1 100%; justify-content: center; }
  .pp-link { flex: 1 1 calc(50% - 6px); justify-content: center; padding: 0 12px; }
  .pp-hire-btns { flex: 1 1 100%; }
  .pp-hire-btns > a { flex: 1 1 100%; justify-content: center; }
  .pp-head { flex-wrap: wrap; gap: 12px 14px; }
  .pp-head .pill { order: 3; }
  .pp-card { padding: 18px; }
  .pp-axis .pp-odd { visibility: hidden; }
  .pp-chart svg { height: 150px; }
}
