/* nikhildadhich.si/work - index of work (uses the colours, type, menu, viewfinder and curtain from si.css) */
.wk body { background: var(--bg); }
.wk.canvas, .wk.canvas body { height: 100%; overflow: hidden; overscroll-behavior: none; }

/* a soft light that follows the pointer (a circle moved with transform: no repaint) */
.spot { position: fixed; left: -520px; top: -520px; z-index: 0; width: 1040px; height: 1040px; pointer-events: none; will-change: transform; background: radial-gradient(circle, rgba(201, 184, 255, .09), transparent 62%); }

/* ---------- canvas ---------- */
.board { position: fixed; inset: 0; z-index: 1; overflow: hidden; cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; }
.board .grid { position: absolute; left: 0; top: 0; width: calc(100% + 60px); height: calc(100% + 60px); pointer-events: none; will-change: transform; background-image: radial-gradient(circle, rgba(255, 255, 255, .085) 1px, transparent 1.6px); background-size: 30px 30px; }
/* while dragging or gliding: no hover effects (they repaint), and no blur behind the floating bars */
.moving .card img { filter: grayscale(1) brightness(.7) contrast(1.05); transform: none; }
.moving .card .ph { transform: none; border-color: var(--line); box-shadow: 0 30px 60px rgba(0, 0, 0, .55); }
.moving .card .cap em { opacity: 0; }
.wk .top nav, .wk .pills { backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(8, 9, 12, .88); }
.grabbing .board, .grabbing .board .card { cursor: grabbing; }
/* calm edges: cards fade out under the menu at the top and the read-out at the bottom (a still layer, nothing repaints) */
.board::before, .board::after { content: ""; position: absolute; left: 0; right: 0; z-index: 2; pointer-events: none; }
.board::before { top: 0; height: 150px; background: linear-gradient(180deg, var(--bg) 20%, transparent); }
.board::after { bottom: 0; height: 90px; background: linear-gradient(0deg, var(--bg) 25%, transparent); }
.list .board { display: none; }
.card { position: absolute; left: 0; top: 0; display: block; color: var(--text); text-decoration: none; will-change: transform; -webkit-user-drag: none; transition: opacity .45s, filter .45s; }
.card .ph { display: block; aspect-ratio: 1.28; overflow: hidden; border-radius: 14px; border: 1px solid var(--line); background: #111318; box-shadow: 0 30px 60px rgba(0, 0, 0, .55); transition: transform .5s cubic-bezier(.2, .8, .2, 1), border-color .3s, box-shadow .4s; }
.intro .card .ph { transition: none; }
/* grey until pointed at: only the card you look at gets its colour */
.card img { display: block; width: 100%; height: 100%; object-fit: cover; pointer-events: none; filter: grayscale(1) brightness(.7) contrast(1.05); transition: filter .5s, transform .8s cubic-bezier(.2, .8, .2, 1); }
.card:hover img, .card:focus-visible img { filter: none; transform: scale(1.06); }
.card:hover .ph, .card:focus-visible .ph { transform: translateY(-6px); border-color: var(--ac); box-shadow: 0 0 0 1px var(--ac), 0 40px 80px rgba(0, 0, 0, .6), 0 0 70px color-mix(in srgb, var(--ac) 35%, transparent); }
.card .cap { display: flex; align-items: baseline; gap: 10px; margin-top: 10px; font: 500 11px var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.card .cap b { font-weight: 500; color: var(--muted); }
.card .cap span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: var(--text); }
.card .cap em { margin-left: auto; font-style: normal; white-space: nowrap; opacity: 0; transition: opacity .3s; }
.card:hover .cap em, .card:focus-visible .cap em { opacity: 1; }
.card:hover .cap b { color: var(--ac); }
.card.off { opacity: .08; filter: blur(2px); pointer-events: none; }
.card:focus-visible { outline: none; }

/* ---------- header block (sits over the table in canvas view) ---------- */
.wk-head { position: relative; z-index: 3; display: block; min-height: 0; padding: 104px clamp(18px, 5vw, 72px) 0; pointer-events: none; }
.canvas .wk-head { position: fixed; left: 0; right: 0; top: 0; }
.wk-head > .mono { color: var(--cyan); }
.wk-title { margin: 10px 0 0; font: 900 clamp(84px, min(16vw, 27vh), 260px)/.82 var(--f-display); text-transform: uppercase; color: #fff; text-shadow: 0 6px 40px rgba(0, 0, 0, .6); }
.wk-title sup { margin-left: .15em; font: 500 .11em var(--f-mono); letter-spacing: .1em; vertical-align: top; position: relative; top: .4em; }
.wk-sub { max-width: 46ch; margin: 16px 0 0; color: var(--muted); font-size: 16px; text-shadow: 0 2px 16px rgba(0, 0, 0, .95); }
.list .hint-canvas { display: none; }
.wk-bar { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; pointer-events: auto; }
.pills { display: inline-flex; gap: 2px; padding: 4px; border-radius: 999px; border: 1px solid var(--line); background: rgba(8, 9, 12, .7); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.pills button { padding: 8px 14px; border: 0; border-radius: 999px; background: transparent; color: var(--text); font: 500 11.5px var(--f-mono); letter-spacing: .12em; text-transform: uppercase; cursor: pointer; transition: background .25s, color .25s; }
.pills button i { margin-left: 4px; font-style: normal; color: var(--muted); }
.pills button:hover { background: rgba(255, 255, 255, .08); }
.pills button.on { background: var(--text); color: var(--bg); }
.pills button.on i { color: var(--bg); opacity: .6; }

/* ---------- list ---------- */
.rows { display: none; position: relative; z-index: 2; margin: 7vh 0 0; padding: 0 clamp(18px, 5vw, 72px) 16vh; list-style: none; }
.list .rows { display: block; }
.rows li.off { display: none; }
.rows li:last-child .row { border-bottom: 1px solid var(--line); }
.row { position: relative; isolation: isolate; overflow: hidden; display: grid; grid-template-columns: 64px minmax(0, 1fr) minmax(0, 28ch) 170px; align-items: center; gap: 20px; padding: 14px 8px; border-top: 1px solid var(--line); color: var(--text); text-decoration: none; }
.row::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, color-mix(in srgb, var(--ac) 30%, transparent), transparent 70%); transform: scaleX(0); transform-origin: left; transition: transform .6s cubic-bezier(.2, .8, .2, 1); }
.row:hover::before, .row:focus-visible::before { transform: scaleX(1); }
.row .num { color: var(--muted); }
.row b { display: block; font: 900 clamp(34px, 5.4vw, 88px)/.9 var(--f-display); text-transform: uppercase; transition: transform .5s cubic-bezier(.2, .8, .2, 1); }
.row:hover b { transform: translateX(14px); }
.row .what { color: var(--muted); font-size: 15px; }
.row .cat { justify-self: end; color: var(--cyan); font-size: 11px; }
.row .thumb { display: none; }
.peek { position: fixed; left: 0; top: 0; z-index: 4; width: 320px; aspect-ratio: 1.28; object-fit: cover; border-radius: 14px; pointer-events: none; opacity: 0; box-shadow: 0 0 0 1px var(--ac, var(--line)), 0 40px 90px rgba(0, 0, 0, .7); transition: opacity .3s; }
.peek.on { opacity: 1; }
.peek:not([src]) { display: none; }
.canvas .peek { display: none; }

/* phones and touch screens: a small cover inside each row instead of the floating one */
@media (hover: none), (max-width: 760px) {
  .row { grid-template-columns: 92px minmax(0, 1fr); gap: 2px 14px; padding: 12px 4px; }
  .row .num { display: none; }
  .row .thumb { display: block; grid-row: 1 / span 3; width: 92px; aspect-ratio: 1.28; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
  .row b, .row .what, .row .cat { grid-column: 2; justify-self: start; }
  .row b { font-size: 30px; }
  .row .what { font-size: 13.5px; }
}
@media (max-width: 760px) {
  .wk-head { padding-top: 88px; }
  .wk-sub { font-size: 14.5px; }
  .canvas .wk-sub { display: none; } /* keep the table visible on a small screen */
  .pills button { padding: 7px 10px; font-size: 10.5px; letter-spacing: .08em; }
  .card .cap { font-size: 9.5px; gap: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  .card, .card .ph, .card img, .row::before, .row b { transition: none; }
}
