/* tinqr.dev */

:root {
  --bg: #fff;
  --text: #141414;
  --grey: #6b6b6b;
  --faint: #808080;
  --line: #ebebeb;
  --panel: #f5f5f4;
  --link-line: #cfcfcf;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --arabic: "SF Arabic", "Geeza Pro", "Noto Naskh Arabic", "Segoe UI", Tahoma, sans-serif;
  --col: 37rem;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111;
    --text: #ececec;
    --grey: #9b9b9b;
    --faint: #7c7c7c;
    --line: #262626;
    --panel: #1b1b1b;
    --link-line: #4a4a4a;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
}
img, video { display: block; max-width: 100%; }
p { margin: 0 0 1em; }
h1, h2, h3 { font-size: inherit; font-weight: 600; margin: 0; line-height: 1.35; }
a { color: inherit; text-decoration: underline; text-decoration-color: var(--link-line); text-decoration-thickness: 1px; text-underline-offset: 3px; transition: text-decoration-color .15s; }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid #3b6cff; outline-offset: 2px; border-radius: 3px; }
[lang="ar"], .ar { font-family: var(--arabic); }

.col { max-width: calc(var(--col) + 40px); margin: 0 auto; padding: 0 20px; }
.wide { max-width: calc(60rem + 40px); margin: 0 auto; padding: 0 20px; }

header.site { padding-top: 56px; }
header.site .name { font-weight: 600; text-decoration: none; }
header.site .back { color: var(--grey); text-decoration: none; }
header.site .back:hover { color: var(--text); }

main, main.col { padding-top: 44px; }
.grey { color: var(--grey); }
.small { font-size: 13px; }

/* home */
.intro p { margin-bottom: .9em; }
.group { margin-top: 56px; }
.group > h2 { font-weight: 400; color: var(--grey); margin-bottom: 16px; }
.list { list-style: none; margin: 0; padding: 0; }
.list li { margin: 0 0 18px; }
.list .t { font-weight: 500; }
.list .y { color: var(--faint); font-variant-numeric: tabular-nums; }
.list .d { display: block; color: var(--grey); }
.list a.row { display: block; text-decoration: none; border-radius: 6px; margin: -4px -8px; padding: 4px 8px; transition: background-color .15s; }
.list a.row:hover { background: var(--panel); }
.list a.row .t { text-decoration: underline; text-decoration-color: var(--link-line); text-underline-offset: 3px; text-decoration-thickness: 1px; }
.list a.row:hover .t { text-decoration-color: currentColor; }
.after { color: var(--grey); }

footer.site { margin-top: 72px; margin-bottom: 56px; color: var(--faint); font-size: 13px; }

/* project pages */
.title h1 { font-size: 24px; letter-spacing: -.01em; }
.title p { color: var(--grey); margin: 4px 0 0; }
.title .when { color: var(--faint); font-size: 13px; margin-top: 6px; font-variant-numeric: tabular-nums; }
.prose { margin-top: 40px; }
.prose h2 { margin: 48px 0 8px; }
.prose ul { padding-left: 1.2em; margin: 0 0 1em; }
.prose li { margin-bottom: .35em; }
figure { margin: 40px 0; }
figcaption { color: var(--grey); font-size: 13px; margin-top: 10px; }

/* Tally player */
.player { margin: 40px 0 8px; }
.player .stage { background: var(--panel); border-radius: 14px; padding: 40px 20px; display: grid; place-items: center; }
.player .screen { width: min(300px, 72vw); aspect-ratio: 9 / 16; border-radius: 22px; overflow: hidden; background: #f4f1ea; }
.player .screen video, .player .screen img { width: 100%; height: 100%; object-fit: cover; }
.player .screen img { object-position: top; }
.player .controls { display: flex; justify-content: space-between; align-items: baseline; gap: 12px 24px; flex-wrap: wrap; margin-top: 14px; }
.tabs { display: flex; gap: 4px 16px; flex-wrap: wrap; }
.tabs button { font: inherit; color: var(--grey); background: none; border: 0; padding: 2px 0; cursor: pointer; border-bottom: 1px solid transparent; transition: color .15s, border-color .15s; }
.tabs button:hover { color: var(--text); }
.tabs button[aria-pressed="true"] { color: var(--text); border-bottom-color: var(--text); }
.player figcaption { margin-top: 6px; min-height: 2.9em; }

/* the decision log */
.log, .prose ul.log { list-style: none; padding: 0; margin: 16px 0 0; border-top: 1px solid var(--line); }
.log li { display: grid; grid-template-columns: 5em 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.log .d { color: var(--faint); font-variant-numeric: tabular-nums; }
.log li.pause span + span { color: var(--grey); }

/* before / after text */
.compare { width: 100%; border-collapse: collapse; margin: 20px 0 8px; }
.compare th { text-align: left; font-weight: 400; color: var(--grey); font-size: 13px; padding: 0 0 8px; }
.compare td { vertical-align: top; padding: 12px 16px 12px 0; border-top: 1px solid var(--line); width: 50%; }
.compare td [lang="ar"] { display: block; font-size: 18px; line-height: 1.5; direction: rtl; text-align: right; }
.compare td .gl { display: block; color: var(--grey); font-size: 13px; margin-top: 4px; }

.num { font-variant-numeric: tabular-nums; white-space: nowrap; }

header.site.me { display: flex; align-items: center; gap: 14px; line-height: 1.4; }
.photo { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; background: var(--panel); }

/* project pages: real artifacts */
.shots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; background: var(--panel); border-radius: 14px; padding: 28px 20px; }
.shots img { width: 100%; height: auto; border-radius: 12px; }
.shots figcaption { grid-column: 1 / -1; margin-top: 4px; }

.wide-fig .scroll { overflow-x: auto; background: var(--panel); border-radius: 12px; padding: 16px; }
.wide-fig .scroll img { min-width: 640px; width: 100%; height: auto; border-radius: 6px; }

pre.note { margin: 0; background: var(--panel); border-radius: 12px; padding: 18px 20px; overflow-x: auto; font: 13px/1.6 ui-monospace, "SF Mono", Menlo, Consolas, monospace; color: var(--text); }

ul.said { list-style: none; padding: 0; margin: 12px 0 1.2em; border-left: 2px solid var(--line); }
ul.said li { padding: 2px 0 2px 16px; margin: 0 0 6px; }

.msgs { display: grid; gap: 10px; }
.msgs .m { margin: 0; background: var(--panel); border-radius: 14px; padding: 14px 16px; line-height: 1.75; }
.msgs .m[dir="rtl"] { font-family: var(--arabic); font-size: 17px; }
.msgs .k { display: block; font: 12px/1.4 var(--font); color: var(--grey); margin-bottom: 2px; }
.msgs .m[dir="rtl"] .k { text-align: right; }
mark { color: inherit; border-radius: 4px; padding: 1px 3px; }
mark.a { background: #e4f7a1; }
mark.s { background: #ffd9e6; }
mark.c { background: #d6e6ff; }
mark.b { background: #ffe9b8; }
@media (prefers-color-scheme: dark) {
  mark.a { background: #4a5a12; }
  mark.s { background: #5c2a3c; }
  mark.c { background: #22385c; }
  mark.b { background: #5c4614; }
}
@media (max-width: 640px) {
  .shots { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; padding: 20px; flex-wrap: wrap; }
  .shots img { width: 62vw; flex: none; scroll-snap-align: center; }
  .shots { flex-wrap: nowrap; }
}

/* real screens */
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; background: var(--panel); border-radius: 14px; padding: 24px; }
.pair div { display: grid; gap: 8px; justify-items: center; }
.pair img { width: 100%; max-width: 240px; height: auto; border-radius: 12px; }
.pair span { font-size: 13px; color: var(--grey); }
.row4 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; background: var(--panel); border-radius: 14px; padding: 20px; }
.row4.six { grid-template-columns: repeat(3, 1fr); }
.row4 img { width: 100%; height: auto; border-radius: 10px; }
.row4 figcaption { grid-column: 1 / -1; margin-top: 2px; }

@media (max-width: 640px) { .row4 { grid-template-columns: 1fr 1fr; } .row4.six { grid-template-columns: 1fr 1fr 1fr; } }
img.framed { width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--line); }
.wide-fig img.framed { display: block; }

/* home: an app icon beside each job */
.list .co, .list a.row.co { display: grid; grid-template-columns: 40px 1fr; gap: 14px; align-items: start; }
.list div.co { margin: -4px -8px; padding: 4px 8px; }
.co .ic { width: 40px; height: 40px; border-radius: 10px; margin-top: 3px; outline: 1px solid rgba(0,0,0,.07); outline-offset: -1px; }
.co .ic.mono { display: grid; place-items: center; background: var(--panel); color: var(--grey); font-weight: 600; outline: 0; }

/* home: selected work, a small picture beside each line */
.work .cards { display: grid; gap: 22px; }
.work a { display: grid; grid-template-columns: 168px 1fr; gap: 18px; align-items: center; text-decoration: none; }
.work img { width: 100%; height: auto; aspect-ratio: 4 / 3; border-radius: 10px; background: var(--panel); transition: transform .25s ease; }
.work a:hover img { transform: translateY(-2px); }
.work .t { font-weight: 500; text-decoration: underline; text-decoration-color: var(--link-line); text-underline-offset: 3px; text-decoration-thickness: 1px; }
.work a:hover .t { text-decoration-color: currentColor; }
.work .y { color: var(--faint); font-variant-numeric: tabular-nums; }
.work .d { display: block; color: var(--grey); }
@media (max-width: 520px) { .work a { grid-template-columns: 120px 1fr; gap: 14px; } }
@media (prefers-reduced-motion: reduce) { .work img { transition: none; } }

/* project pages: the shot at the top */
figure.hero { margin: 32px 0 0; }
figure.hero img { width: 100%; height: auto; aspect-ratio: 4 / 3; border-radius: 14px; background: var(--panel); }

/* layout fixes, 17 Oct */
.pair { align-items: end; }
.wide-fig.narrow img.framed { max-width: 340px; margin: 0 auto; border: 0; }
@media (max-width: 420px) { .tabs { gap: 2px 12px; font-size: 15px; } }

/* click a screen to see it larger */
img.zoomable { cursor: zoom-in; }
dialog.zoom { padding: 0; border: 0; background: transparent; width: 100vw; height: 100vh; max-width: 100vw; max-height: 100vh; overflow: hidden; }
dialog.zoom::backdrop { background: rgba(0, 0, 0, .88); }
dialog.zoom img { position: absolute; inset: 0; margin: auto; max-width: calc(100vw - 32px); max-height: calc(100vh - 32px); width: auto; height: auto; border-radius: 12px; cursor: zoom-out; }
dialog.zoom .close { position: fixed; top: 14px; right: 16px; font: inherit; font-size: 14px; color: #fff; background: rgba(255, 255, 255, .12); border: 0; border-radius: 999px; padding: 6px 14px; cursor: pointer; }
