/* Lambda.institute — projects page. Editorial and quiet: paper, ink, thin rules. */
:root {
  --paper: #f3f0e8;
  --card: #fbfaf6;
  --ink: #141412;
  --muted: #6d6b62;
  --line: rgba(20, 20, 18, .12);
  --serif: "Lora", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Helvetica, Arial, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 15px/1.55 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip { position: absolute; left: -999px; } .skip:focus { left: 16px; top: 12px; background: var(--ink); color: #fff; padding: 8px 12px; z-index: 50; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.pp-loading { padding: 80px 24px; text-align: center; color: var(--muted); }

/* top bar */
.pp-top { max-width: 1360px; margin: 0 auto; padding: 22px clamp(16px, 4vw, 48px); display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.pp-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-size: 12px; font-weight: 600; letter-spacing: .24em; text-transform: uppercase; }
.pp-brand img { border-radius: 7px; background: #fff; }
.pp-nav { display: flex; align-items: center; gap: 22px; font-size: 14px; }
.pp-nav a { text-decoration: none; color: var(--muted); }
.pp-nav a:hover, .pp-nav a[aria-current] { color: var(--ink); }
.pp-nav a[aria-current] { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 1px; }
.pp-nav .pp-cta { color: #fff; background: var(--ink); padding: 8px 14px; border-radius: 999px; }
.pp-nav .pp-cta:hover { color: #fff; background: #333; }

/* heading */
.pp-main { max-width: 1360px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 48px) 80px; }
.pp-head { padding: clamp(36px, 8vh, 96px) 0 clamp(28px, 5vh, 56px); border-bottom: 1px solid var(--ink); }
.pp-head h1 { margin: 0; font-weight: 600; font-size: clamp(48px, 9vw, 132px); line-height: .92; letter-spacing: -.045em; }
.pp-head h1 sup { font-size: .22em; font-weight: 500; letter-spacing: 0; vertical-align: top; margin-left: .2em; color: var(--muted); }
.pp-lead { max-width: 560px; margin: 20px 0 0; font-family: var(--serif); font-style: italic; font-size: clamp(18px, 1.7vw, 22px); line-height: 1.45; color: #3c3b36; }
.pp-crumb { margin: 0 0 18px; font-size: 13px; color: var(--muted); } .pp-crumb a { color: var(--ink); } .pp-crumb span { margin: 0 6px; }
.pp-sub { display: flex; align-items: center; gap: 18px; margin-top: 20px; font-size: 14px; color: var(--muted); }

/* tools */
.pp-tools { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 0; background: var(--paper); border-bottom: 1px solid var(--line); }
.pp-search { flex: 1 1 260px; }
.pp-search input { width: 100%; height: 40px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); }
.pp-selects { display: flex; gap: 8px; flex-wrap: wrap; }
.pp-selects select { height: 40px; padding: 0 30px 0 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); appearance: none; -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position: calc(100% - 16px) 17px, calc(100% - 11px) 17px; background-size: 5px 5px; background-repeat: no-repeat; cursor: pointer; }
.pp-view { display: flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; background: var(--card); }
.pp-view button { border: 0; background: none; padding: 6px 14px; border-radius: 999px; font-size: 13px; cursor: pointer; color: var(--muted); }
.pp-view button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.pp-count { margin: 18px 0 24px; font-size: 13px; color: var(--muted); }
.pp-link, .pp-ghost { background: none; border: 0; padding: 0; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-size: inherit; }
.pp-ghost { font-size: 13px; justify-self: start; }
.pp-empty { padding: 60px 0; font-size: 16px; color: var(--muted); }

/* grid */
.pp-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 44px 28px; }
.pp-card { display: block; text-decoration: none; }
.pp-media { position: relative; overflow: hidden; background: #e7e3d8; border-radius: 3px; }
.pp-media img, .pp-media svg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
.pp-card:hover .pp-media img, .pp-card:hover .pp-media svg { transform: scale(1.035); }
.pp-card-meta { display: flex; justify-content: space-between; gap: 12px; margin: 14px 0 4px; font-size: 12px; letter-spacing: .04em; color: var(--muted); }
.pp-num { font-variant-numeric: tabular-nums; color: var(--ink); font-weight: 600; }
.pp-card h2 { margin: 0; font-size: 21px; font-weight: 600; letter-spacing: -.015em; line-height: 1.25; }
.pp-card:hover h2 { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.pp-by { margin: 6px 0 0; font-size: 14px; color: var(--muted); }
.pp-by a { color: var(--muted); text-decoration: none; } .pp-by a:hover { color: var(--ink); text-decoration: underline; }

/* index */
.pp-index { border-top: 1px solid var(--ink); }
.pp-row { display: grid; grid-template-columns: 64px minmax(0, 1fr) 180px 80px minmax(0, 220px); gap: 20px; align-items: baseline; padding: 18px 0; border-bottom: 1px solid var(--line); text-decoration: none; font-size: 14px; color: var(--muted); }
.pp-row-head { padding: 10px 0; font-size: 12px; letter-spacing: .04em; color: var(--muted); }
a.pp-row:hover { color: var(--ink); }
.pp-row-title { font-size: clamp(20px, 2.2vw, 30px); font-weight: 600; letter-spacing: -.02em; line-height: 1.15; color: var(--ink); transition: transform .3s ease; }
a.pp-row:hover .pp-row-title { transform: translateX(8px); }
.pp-row-by { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pp-preview { position: fixed; left: 0; top: 0; width: 240px; aspect-ratio: 4/3; pointer-events: none; z-index: 20; opacity: 0; overflow: hidden; border-radius: 3px;
  box-shadow: 0 18px 40px -16px rgba(0, 0, 0, .35); transition: opacity .2s ease; }
.pp-preview.on { opacity: 1; }
.pp-preview img, .pp-preview svg { width: 100%; height: 100%; object-fit: cover; display: block; }

/* detail */
.pp-sheet { position: fixed; inset: 0; z-index: 40; display: flex; justify-content: flex-end; }
.pp-scrim { position: absolute; inset: 0; border: 0; padding: 0; background: rgba(20, 20, 18, .45); cursor: pointer; animation: ppfade .25s ease; }
.pp-panel { position: relative; width: min(980px, 100%); height: 100%; overflow-y: auto; background: var(--card); display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  animation: ppslide .35s cubic-bezier(.2, .7, .2, 1); }
.pp-x { position: absolute; top: 16px; right: 16px; z-index: 2; border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 6px 14px; font-size: 13px; cursor: pointer; }
.pp-gallery { display: grid; gap: 4px; align-content: start; align-self: start; background: #e7e3d8; }
.pp-gallery img, .pp-gallery svg { width: 100%; height: auto; display: block; }
.pp-gallery svg { aspect-ratio: 4/3; }
.pp-info { padding: 64px 36px 40px; display: grid; gap: 14px; align-content: start; position: sticky; top: 0; }
.pp-info .pp-card-meta { margin: 0; }
.pp-info h2 { margin: 0; font-size: clamp(30px, 3vw, 42px); font-weight: 600; letter-spacing: -.03em; line-height: 1.05; }
.pp-desc { margin: 4px 0 8px; font-size: 16px; line-height: 1.7; color: #33322d; white-space: pre-line; }
.pp-credits { list-style: none; margin: 0; padding: 14px 0 0; border-top: 1px solid var(--line); display: grid; gap: 8px; font-size: 15px; }
.pp-credits a { text-underline-offset: 3px; }
.pp-role { display: inline-block; width: 74px; font-size: 12px; color: var(--muted); }
.pp-mail { margin-left: 8px; font-size: 13px; color: var(--muted); }
.pp-note { margin: 0; font-size: 13px; color: var(--muted); }
@keyframes ppfade { from { opacity: 0; } }
@keyframes ppslide { from { transform: translateX(40px); opacity: 0; } }

.pp-foot { max-width: 1360px; margin: 0 auto; padding: 28px clamp(16px, 4vw, 48px) 40px; display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); border-top: 1px solid var(--line); }
.pp-foot a { color: var(--muted); }

@media (max-width: 900px) {
  .pp-row { grid-template-columns: 44px minmax(0, 1fr) 70px; }
  .pp-row > :nth-child(3), .pp-row > :nth-child(5) { display: none; }
  .pp-panel { grid-template-columns: 1fr; }
  .pp-info { position: static; padding: 28px 22px 40px; }
  .pp-nav { gap: 14px; font-size: 13px; }
  .pp-nav a:not(.pp-cta):not([aria-current]) { display: none; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
