@font-face { font-family: "Tajawal"; src: url("/assets/fonts/tajawal-arabic-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF, U+200C-200E, U+2010-2011, U+204F, U+2E41; }
@font-face { font-family: "Tajawal"; src: url("/assets/fonts/tajawal-arabic-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF, U+200C-200E, U+2010-2011, U+204F, U+2E41; }
@font-face { font-family: "Tajawal"; src: url("/assets/fonts/tajawal-arabic-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF, U+200C-200E, U+2010-2011, U+204F, U+2E41; }
@font-face { font-family: "Tajawal"; src: url("/assets/fonts/tajawal-arabic-800-normal.woff2") format("woff2"); font-weight: 800; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF, U+200C-200E, U+2010-2011, U+204F, U+2E41; }
/* ScoutHub Lab — site styles. Logical properties throughout so RTL/LTR share one sheet. */

@font-face { font-family: "Plex Sans"; src: url("/assets/fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Plex Sans"; src: url("/assets/fonts/ibm-plex-sans-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Plex Sans"; src: url("/assets/fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Plex Sans"; src: url("/assets/fonts/ibm-plex-sans-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url("/assets/fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url("/assets/fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }

:root {
  --bg: #0C1428;
  --bg-2: #101A33;
  --bg-3: #16223F;
  --surface: rgba(255, 255, 255, .035);
  --surface-2: rgba(255, 255, 255, .06);
  --line: rgba(255, 255, 255, .09);
  --line-2: rgba(255, 255, 255, .16);
  --text: #E9ECF4;
  --muted: #9CA3B8;
  --dim: #8089A0;
  --cyan: #22D3EE;
  --blue: #3B82F6;
  --violet: #8B5CF6;
  --amber: #F5B544;
  --green: #34D399;
  --grad: linear-gradient(135deg, var(--cyan), var(--blue) 50%, var(--violet));
  --grad-soft: linear-gradient(135deg, rgba(34, 211, 238, .16), rgba(139, 92, 246, .16));
  --radius: 18px;
  --radius-sm: 12px;
  --gutter: clamp(16px, 4vw, 40px);
  --max: 1240px;
  --header-h: 68px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --font: "Tajawal", "Plex Sans", system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;
  --mono: "Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  color-scheme: dark;
}
html[lang="en"] { --font: "Plex Sans", "Tajawal", system-ui, -apple-system, "Segoe UI", sans-serif; }

*, *::before, *::after { box-sizing: border-box; }
html { overflow-x: clip; -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body {
  margin: 0; background: var(--bg); color: var(--text); font-family: var(--font);
  font-size: 17px; line-height: 1.75; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased;
}
html[lang="en"] body { line-height: 1.65; }
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
input, textarea, select { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; font-weight: 700; letter-spacing: -.01em; }
html[lang="en"] h1, html[lang="en"] h2 { letter-spacing: -.025em; }
p { margin: 0; }
::selection { background: rgba(59, 130, 246, .45); color: #fff; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 6px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; inset-inline-start: 12px; top: -60px; z-index: 100; background: var(--text); color: var(--bg); padding: 8px 14px; border-radius: 8px; font-weight: 600; }
.skip:focus { top: 12px; }
.mono { font-family: var(--mono); }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }

/* page background: soft glow + grid */
.bg-fx { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.bg-fx::before { content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px; opacity: .75;
  mask-image: radial-gradient(ellipse 90% 75% at 50% 10%, #000 35%, transparent 85%); }
.bg-fx::after { content: ""; position: absolute; width: 900px; height: 900px; inset-inline-end: -250px; top: -380px;
  background: radial-gradient(closest-side, rgba(59, 130, 246, .20), rgba(139, 92, 246, .10) 50%, transparent 72%); filter: blur(10px); }

/* ── header ─────────────────────────────────────────────────────────── */
.site-header { position: fixed; inset-inline: 0; top: 0; z-index: 50; height: var(--header-h);
  transition: background .3s var(--ease), border-color .3s var(--ease); border-bottom: 1px solid transparent; }
.site-header.is-scrolled { background: rgba(12, 20, 40, .78); backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px); border-color: var(--line); }
.site-header .wrap { height: 100%; display: flex; align-items: center; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: "Plex Sans", var(--font); font-weight: 700; font-size: 21px; letter-spacing: -.02em; direction: ltr; }
.brand svg { width: 34px; height: 34px; transition: transform .6s var(--ease); }
.brand:hover svg { transform: rotate(45deg); }
.nav { display: flex; gap: 4px; margin-inline-start: auto; }
.nav a { padding: 8px 12px; border-radius: 10px; color: var(--muted); font-size: 15px; font-weight: 500; transition: color .2s, background .2s; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); background: var(--surface-2); }
.header-tools { display: flex; align-items: center; gap: 8px; }
.kbd-btn { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding-inline: 12px; border: 1px solid var(--line-2); border-radius: 10px; color: var(--muted); font-size: 14px; transition: border-color .2s, color .2s; }
.kbd-btn:hover { color: var(--text); border-color: rgba(34, 211, 238, .5); }
kbd { white-space: nowrap; font-family: var(--mono); font-size: 14px; padding: 2px 6px; border-radius: 6px; border: 1px solid var(--line-2); background: var(--surface); color: var(--muted); direction: ltr; }
.lang-btn { height: 38px; min-width: 42px; padding-inline: 10px; display: inline-grid; place-items: center; border-radius: 10px; border: 1px solid var(--line-2); font-weight: 600; font-size: 14px; }
.lang-btn:hover { border-color: rgba(139, 92, 246, .6); }
.menu-btn { display: none; width: 40px; height: 38px; border-radius: 10px; border: 1px solid var(--line-2); place-items: center; }
.menu-btn span, .menu-btn span::before, .menu-btn span::after { display: block; width: 16px; height: 2px; background: currentColor; border-radius: 2px; position: relative; content: ""; }
.menu-btn span::before { position: absolute; top: -5px; } .menu-btn span::after { position: absolute; top: 5px; }
.menu-btn span { transition: background .2s; }
.menu-btn span::before, .menu-btn span::after { transition: top .3s var(--ease), transform .4s var(--ease); }
.menu-btn[aria-expanded="true"] span { background: transparent; }
.menu-btn[aria-expanded="true"] span::before { top: 0; transform: rotate(45deg); }
.menu-btn[aria-expanded="true"] span::after { top: 0; transform: rotate(-45deg); }
@media (max-width: 900px) {
  .brand, .header-tools { position: relative; z-index: 2; }
  /* full-screen menu: opens as a circle growing from the button, links rise in one after another */
  .nav { position: fixed; inset: 0; z-index: 1; margin: 0; gap: 0; flex-direction: column; justify-content: center; counter-reset: n;
    padding: calc(var(--header-h) + 16px) var(--gutter) max(32px, env(safe-area-inset-bottom));
    background: radial-gradient(520px 420px at 100% 0%, rgba(59, 130, 246, .22), transparent 70%), radial-gradient(480px 380px at 0% 100%, rgba(139, 92, 246, .2), transparent 70%), #0A1022;
    clip-path: circle(0 at var(--ox, 50%) var(--oy, 34px)); visibility: hidden; pointer-events: none;
    transition: clip-path .7s cubic-bezier(.7, 0, .2, 1), visibility 0s .7s; }
  .nav.is-open { clip-path: circle(150vmax at var(--ox, 50%) var(--oy, 34px)); visibility: visible; pointer-events: auto; transition: clip-path .8s cubic-bezier(.7, 0, .2, 1), visibility 0s; }
  .nav::after { content: ""; position: absolute; inset-inline-end: -18vmin; bottom: -10vmin; width: 78vmin; aspect-ratio: 1; background: url("/assets/img/favicon.svg") center / contain no-repeat; opacity: .07; pointer-events: none; }
  .nav a { position: relative; display: flex; align-items: baseline; gap: 18px; padding: 15px 4px; border-radius: 0; border-bottom: 1px solid var(--line); background: none;
    color: var(--text); font-size: clamp(30px, 9.5vw, 46px); font-weight: 800; line-height: 1.25; letter-spacing: -.01em;
    opacity: 0; transform: translateY(42px); transition: opacity .35s, transform .35s, color .2s; }
  .nav a::before { counter-increment: n; content: "0" counter(n); flex: none; min-width: 2ch; font-family: var(--mono); font-size: 14px; font-weight: 400; letter-spacing: 0; color: var(--cyan); }
  .nav a:hover, .nav a[aria-current="page"] { background: none; color: var(--amber); }
  .nav.is-open a { opacity: 1; transform: none; transition: opacity .6s var(--ease), transform .7s var(--ease), color .2s; transition-delay: calc(.3s + var(--i, 0) * .07s), calc(.3s + var(--i, 0) * .07s), 0s; }
  .nav a:nth-child(2) { --i: 1; } .nav a:nth-child(3) { --i: 2; } .nav a:nth-child(4) { --i: 3; } .nav a:nth-child(5) { --i: 4; } .nav a:nth-child(6) { --i: 5; }
  .menu-btn { display: inline-grid; }
  .kbd-btn .label, .kbd-btn kbd { display: none; }
  .header-tools { margin-inline-start: auto; }
  /* while the menu is open the header gives up its blur (it would trap the fixed panel inside the header) and the page stops scrolling */
  html.menu-open { overflow: hidden; }
  html.menu-open .site-header { background: transparent; border-color: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }
}
@media (prefers-reduced-motion: reduce) {
  .nav, .nav.is-open { transition: none; }
  .nav a, .nav.is-open a { transition: none; transform: none; }
}

/* ── buttons & chips ────────────────────────────────────────────────── */
.btn { --b: var(--line-2); display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 50px; padding-inline: 22px; border-radius: 14px; font-weight: 600; font-size: 16px; border: 1px solid var(--b); transition: transform .2s var(--ease), background .2s, border-color .2s, box-shadow .3s; will-change: transform; }
.btn:hover { border-color: rgba(255, 255, 255, .3); background: var(--surface-2); }
.btn-primary { border: 0; color: #0B0D14; background: var(--amber); box-shadow: 0 10px 30px -10px rgba(245, 181, 68, .6); }
.btn-primary:hover { background: #FFC45C; box-shadow: 0 14px 40px -10px rgba(245, 181, 68, .75); }
.btn-ghost { background: var(--surface); }
.btn svg { width: 18px; height: 18px; }
html[dir="rtl"] .btn .arrow { transform: scaleX(-1); }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding-inline: 10px; border-radius: 99px; font-size: 14px; font-weight: 500; color: var(--muted); border: 1px solid var(--line); background: var(--surface); white-space: nowrap; }
.pill { display: inline-flex; align-items: center; height: 26px; padding-inline: 10px; border-radius: 8px; font-family: var(--mono); font-size: 14px; color: #C8D0E4; background: rgba(59, 130, 246, .10); border: 1px solid rgba(59, 130, 246, .22); direction: ltr; }
.status { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 600; color: var(--green); }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 0 currentColor; animation: pulse 2.4s infinite; }
.status[data-s="soon"] { color: var(--amber); } .status[data-s="private"] { color: var(--violet); } .status[data-s="archived"] { color: var(--dim); }
.status[data-s="archived"]::before { animation: none; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, .5); } 70% { box-shadow: 0 0 0 8px rgba(52, 211, 153, 0); } 100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); } }

/* ── sections ───────────────────────────────────────────────────────── */
section { position: relative; }
.section { padding-block: clamp(60px, 8vw, 104px); }
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 20px 40px; margin-bottom: clamp(32px, 5vw, 56px); }
.eyebrow { display: flex; width: fit-content; align-items: center; gap: 10px; font-family: var(--mono); font-size: 14px; letter-spacing: .04em; color: var(--cyan); margin-bottom: 14px; direction: ltr; }
html[dir="rtl"] .eyebrow { direction: rtl; font-family: var(--font); letter-spacing: 0; font-weight: 600; }
.eyebrow .n { font-family: var(--mono); color: var(--dim); }
.h2 { font-size: clamp(30px, 4.4vw, 50px); }
.lead { font-size: clamp(17px, 1.6vw, 20px); color: var(--muted); max-width: 62ch; }
.section-head .lead { max-width: 52ch; }

/* reveal on scroll (JS adds .in) */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

/* ── hero ───────────────────────────────────────────────────────────── */
.hero { min-height: min(100svh, 980px); display: flex; align-items: center; padding-top: calc(var(--header-h) + 24px); padding-bottom: 48px; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr 1fr; align-items: center; gap: 40px; }
.hero-copy .eyebrow { margin-bottom: 22px; }
.hero h1 { font-size: clamp(44px, 7vw, 92px); line-height: 1.08; margin-bottom: 24px; }
html[lang="ar"] .hero h1 { line-height: 1.22; }
.hero .lead { margin-bottom: 34px; }
.term-line { display: flex; width: fit-content; align-items: center; gap: 10px; font-family: var(--mono); font-size: 14px; color: var(--muted); margin-bottom: 18px; direction: ltr; }
.term-line .p { color: var(--cyan); }
.caret { display: inline-block; width: .55ch; height: 1.05em; background: var(--cyan); vertical-align: -0.12em; margin-inline-start: 4px; animation: blink 1.05s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.hero-hint { margin-top: 26px; display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--dim); }
.hero-visual { position: relative; aspect-ratio: 1; width: 100%; max-width: 620px; justify-self: center; }
@media (max-width: 980px) {
  .hero { min-height: auto; }
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-visual { max-width: 460px; order: -1; margin-top: 8px; }
}

/* ── constellation ──────────────────────────────────────────────────── */
.constellation { position: relative; width: 100%; height: 100%; }
.constellation svg { width: 100%; height: 100%; overflow: visible; }
.constellation .glow { position: absolute; inset: 18%; border-radius: 50%; background: radial-gradient(closest-side, rgba(59, 130, 246, .35), rgba(139, 92, 246, .12) 60%, transparent); filter: blur(20px); pointer-events: none; }
.c-ring { fill: none; stroke: rgba(255, 255, 255, .06); stroke-dasharray: 2 6; }
.ray { cursor: pointer; outline: none; -webkit-tap-highlight-color: transparent; }
.ray:focus, .ray:focus-visible { outline: none; }
.ray .bar { transition: opacity .3s, filter .3s, transform .45s var(--ease); transform-box: fill-box; transform-origin: 0% 50%; }
.ray .hit { fill: transparent; }
.ray[data-ring="2"] .bar { opacity: .5; }
.ray[data-status="soon"] .bar { opacity: .45; }
.ray:hover .bar, .ray:focus-visible .bar, .ray.is-active .bar { opacity: 1; filter: drop-shadow(0 0 10px rgba(34, 211, 238, .9)); }
.ray.is-new .bar { animation: born 1.6s var(--ease) both .9s; }
@keyframes born { 0% { opacity: 0; transform: scaleX(0); } 60% { opacity: 1; filter: drop-shadow(0 0 16px #22D3EE); } 100% { transform: none; } }
.c-core { pointer-events: none; }
.c-tip { position: absolute; z-index: 5; pointer-events: none; min-width: 200px; max-width: 260px; padding: 12px 14px; border-radius: 14px; background: rgba(15, 18, 27, .92); border: 1px solid var(--line-2); backdrop-filter: blur(10px); box-shadow: 0 20px 50px -20px #000; opacity: 0; transform: translateY(6px) scale(.98); transition: opacity .18s, transform .18s; }
.c-tip.on { opacity: 1; transform: none; }
.c-tip b { display: block; font-size: 15px; margin-bottom: 2px; }
.c-tip span { display: block; font-size: 14px; color: var(--muted); line-height: 1.55; }
.c-tip em { display: block; font-style: normal; font-family: var(--mono); font-size: 11px; color: var(--cyan); margin-top: 6px; }
.c-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 18px; margin-top: 8px; font-size: 14px; color: var(--muted); }
.c-legend i { display: inline-block; width: 18px; height: 4px; border-radius: 2px; background: var(--grad); margin-inline-end: 8px; vertical-align: middle; }
.c-legend i.o { opacity: .45; width: 12px; }

/* ── stats ──────────────────────────────────────────────────────────── */
.stats { border-block: 1px solid var(--line); background: linear-gradient(180deg, rgba(255, 255, 255, .015), transparent); }
.stats .wrap { display: grid; grid-template-columns: repeat(6, 1fr); }
.stat { padding: 30px 18px; border-inline-start: 1px solid var(--line); }
.stat:first-child { border-inline-start: 0; }
.stat .v { font-size: clamp(28px, 3.2vw, 40px); font-weight: 700; font-family: "Plex Sans", var(--font); direction: ltr; unicode-bidi: isolate; display: inline-block; letter-spacing: -.02em; }
.stat .v .grad-text { display: inline; }
.stat .l { display: block; font-size: 14px; color: var(--muted); line-height: 1.5; margin-top: 4px; }
.stat:first-child .v { color: var(--amber); }
@media (max-width: 1100px) { .stats .wrap { grid-template-columns: repeat(3, 1fr); } .stat:nth-child(4) { border-inline-start: 0; } .stat:nth-child(n+4) { border-top: 1px solid var(--line); } }
@media (max-width: 600px) { .stats .wrap { grid-template-columns: repeat(2, 1fr); padding: 0; } .stat { padding: 22px 16px; border-top: 1px solid var(--line); } .stat:nth-child(odd) { border-inline-start: 0; } .stat:nth-child(even) { border-inline-start: 1px solid var(--line); } .stat:nth-child(-n+2) { border-top: 0; } }

/* ── about teaser ───────────────────────────────────────────────────── */
.about-teaser .wrap { display: grid; grid-template-columns: 380px 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.portrait { position: relative; aspect-ratio: 4 / 5; border-radius: 26px; overflow: hidden; background: var(--bg-3); border: 1px solid var(--line-2); transform-style: preserve-3d; transition: transform .4s var(--ease); }
.portrait img { width: 100%; height: 100%; object-fit: cover; }
.portrait .ph { position: absolute; inset: 0; display: grid; place-items: center; background: radial-gradient(circle at 30% 20%, rgba(34, 211, 238, .25), transparent 55%), radial-gradient(circle at 80% 90%, rgba(139, 92, 246, .3), transparent 55%), var(--bg-3); }
.portrait .ph svg { width: 42%; opacity: .9; }
.portrait::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, .12), transparent 40%); pointer-events: none; }
.portrait .tag { position: absolute; inset-inline-start: 16px; bottom: 16px; padding: 10px 14px; border-radius: 12px; background: rgba(11, 13, 20, .75); backdrop-filter: blur(8px); border: 1px solid var(--line-2); font-size: 14px; }
.portrait .tag b { display: block; font-size: 16px; }
blockquote.impact { margin: 0 0 28px; font-size: clamp(22px, 2.6vw, 32px); line-height: 1.55; font-weight: 500; }
blockquote.impact::before { content: "”"; display: block; font-size: 72px; line-height: .6; font-family: Georgia, serif; margin-bottom: 8px; }
html[lang="ar"] blockquote.impact::before { content: "”"; }
.about-teaser .points { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 28px 0 34px; }
.about-teaser .points div { padding: 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); font-size: 14px; color: var(--muted); line-height: 1.6; }
.about-teaser .points b { display: block; color: var(--text); font-size: 15px; margin-bottom: 2px; }
@media (max-width: 900px) { .about-teaser .wrap { grid-template-columns: 1fr; } .portrait { max-width: 340px; } .about-teaser .points { grid-template-columns: 1fr; } }

/* ── project matrix ─────────────────────────────────────────────────── */
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.filter { height: 40px; padding-inline: 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: 14px; font-weight: 500; display: inline-flex; align-items: center; gap: 8px; transition: .2s var(--ease); }
.filter:hover { color: var(--text); border-color: var(--line-2); }
.filter[aria-pressed="true"] { color: var(--text); border-color: transparent; background: linear-gradient(var(--bg-2), var(--bg-2)) padding-box, var(--grad) border-box; border: 1px solid transparent; }
.filter .count { font-family: var(--mono); font-size: 14px; color: var(--dim); }
.view-toggle { display: inline-flex; padding: 4px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); margin-inline-start: auto; }
.view-toggle button { height: 32px; padding-inline: 10px; border-radius: 9px; color: var(--dim); display: inline-grid; place-items: center; }
.view-toggle button[aria-pressed="true"] { background: var(--surface-2); color: var(--text); }
.view-toggle svg { width: 18px; height: 18px; }
.matrix-bar { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-bottom: 28px; }

.grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 18px; }
.card { grid-column: span 4; position: relative; display: flex; flex-direction: column; border-radius: var(--radius); border: 1px solid var(--line); background: var(--bg-2); overflow: hidden; transform-style: preserve-3d; transition: border-color .3s, box-shadow .3s; isolation: isolate; }
.card.is-featured { grid-column: span 6; }
.card[hidden] { display: none; }
.card:hover { border-color: var(--line-2); box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .8); }
.card::before { content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; border-radius: inherit; opacity: 0; transition: opacity .3s;
  background: radial-gradient(520px circle at var(--mx, 50%) var(--my, 0%), rgba(34, 211, 238, .12), rgba(139, 92, 246, .06) 30%, transparent 55%); }
.card:hover::before { opacity: 1; }
.card .shot { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--bg-3); border-bottom: 1px solid var(--line); }
.card .shot img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform .8s var(--ease); }
.card:hover .shot img { transform: scale(1.04); }
.card .shot .abstract { position: absolute; inset: 0; display: grid; place-items: center; background: radial-gradient(circle at 30% 30%, rgba(34, 211, 238, .18), transparent 50%), radial-gradient(circle at 75% 70%, rgba(139, 92, 246, .22), transparent 50%), var(--bg-3); }
.card .shot .abstract span { font-size: clamp(22px, 2.4vw, 30px); font-weight: 700; opacity: .85; text-align: center; padding: 0 20px; }
.card .body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card .meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.card h3 { font-size: 21px; }
.card p { color: var(--muted); font-size: 15px; line-height: 1.65; }
.card .pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 6px; }
.card .go { position: absolute; inset: 0; z-index: 3; }
.card[data-ring="2"] { background: linear-gradient(180deg, rgba(245, 181, 68, .03), transparent 40%), var(--bg-2); }
@media (max-width: 1000px) { .card, .card.is-featured { grid-column: span 6; } }
@media (max-width: 640px) { .grid { gap: 14px; } .card, .card.is-featured { grid-column: span 12; } }

/* list view */
.matrix[data-view="list"] .grid { display: block; border-top: 1px solid var(--line); }
.matrix[data-view="list"] .card { display: grid; grid-template-columns: 64px 1.3fr 1fr 140px 40px; align-items: center; gap: 16px; padding: 22px 8px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: none; overflow: visible; transition: background .25s, padding .3s var(--ease); }
.matrix[data-view="list"] .card[hidden] { display: none; }
.matrix[data-view="list"] .card:hover { background: var(--surface); padding-inline: 18px; box-shadow: none; }
.matrix[data-view="list"] .card::before, .matrix[data-view="list"] .card .shot, .matrix[data-view="list"] .card .pills, .matrix[data-view="list"] .card p { display: none; }
.matrix[data-view="list"] .card .body { display: contents; }
.matrix[data-view="list"] .card .idx { display: block; }
.matrix[data-view="list"] .card .meta { display: contents; }
.matrix[data-view="list"] .card .cat { order: 3; }
.matrix[data-view="list"] .card .status { order: 4; }
.matrix[data-view="list"] .card h3 { order: 2; font-size: clamp(20px, 2.4vw, 30px); grid-column: 2; }
.matrix[data-view="list"] .card .arr { display: grid; order: 5; }
.card .idx, .card .arr { display: none; }
.card .idx { font-family: var(--mono); color: var(--dim); font-size: 14px; order: 1; }
.card .arr { place-items: center; color: var(--muted); }
html[dir="rtl"] .card .arr svg { transform: scaleX(-1); }
@media (max-width: 700px) { .matrix[data-view="list"] .card { grid-template-columns: 40px 1fr auto; } .matrix[data-view="list"] .card .cat, .matrix[data-view="list"] .card .arr { display: none; } }
.cursor-preview { position: fixed; top: 0; left: 0; z-index: 40; width: 340px; aspect-ratio: 16 / 10; border-radius: 14px; overflow: hidden; pointer-events: none; opacity: 0; transform: translate(-50%, -50%) scale(.8); transition: opacity .25s, transform .35s var(--ease); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .9); border: 1px solid var(--line-2); background: var(--bg-3); }
.cursor-preview.on { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.cursor-preview img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
@media (hover: none) { .cursor-preview { display: none; } }

/* ── scout case study ───────────────────────────────────────────────── */
.case { background: linear-gradient(180deg, transparent, rgba(245, 181, 68, .035) 50%, transparent); }
.flow { position: relative; display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.flow::before { content: ""; position: absolute; inset-inline: 8%; top: 27px; height: 2px; background: linear-gradient(90deg, var(--cyan), var(--violet)); opacity: .35; }
.flow-step { position: relative; text-align: center; }
.flow-step .dot { width: 56px; height: 56px; margin: 0 auto 16px; border-radius: 16px; display: grid; place-items: center; background: var(--bg-2); border: 1px solid var(--line-2); font-family: var(--mono); font-weight: 500; color: var(--cyan); position: relative; z-index: 1; transition: transform .3s var(--ease), border-color .3s; }
.flow-step:hover .dot { transform: translateY(-4px); border-color: var(--cyan); }
.flow-step b { display: block; font-size: 16px; margin-bottom: 4px; }
.flow-step span { display: block; font-size: 14px; color: var(--muted); line-height: 1.6; }
.flow-step small { display: block; margin-top: 6px; font-size: 14px; color: var(--cyan); }
@media (max-width: 900px) { .flow { grid-template-columns: 1fr 1fr; gap: 28px 16px; } .flow::before { display: none; } }

/* ── how we work ────────────────────────────────────────────────────── */
.units { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.unit { padding: 22px 18px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); transition: transform .3s var(--ease), border-color .3s; }
.unit:hover { transform: translateY(-4px); border-color: var(--line-2); }
.unit .ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--grad-soft); margin-bottom: 16px; color: var(--cyan); }
.unit .ic svg { width: 22px; height: 22px; }
.unit h3 { font-size: 17px; margin-bottom: 6px; }
.unit p { font-size: 14px; color: var(--muted); line-height: 1.65; }
@media (max-width: 1000px) { .units { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .units { grid-template-columns: 1fr; } }

/* ── marquee ────────────────────────────────────────────────────────── */
.marquee { overflow: hidden; border-block: 1px solid var(--line); padding-block: 22px; mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee-track { display: flex; gap: 14px; width: max-content; animation: marq 40s linear infinite; }
html[dir="rtl"] .marquee-track { animation-name: marq-rtl; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee a { display: inline-flex; align-items: center; gap: 10px; height: 52px; padding-inline: 20px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); font-weight: 500; color: var(--muted); white-space: nowrap; transition: color .2s, border-color .2s; }
.marquee a:hover { color: var(--text); border-color: rgba(245, 181, 68, .5); }
.marquee a::before { content: ""; width: 8px; height: 8px; border-radius: 3px; background: var(--amber); opacity: .7; }
@keyframes marq { to { transform: translateX(-50%); } }
@keyframes marq-rtl { to { transform: translateX(50%); } }

/* ── notes ──────────────────────────────────────────────────────────── */
.note-card { position: relative; display: flex; flex-direction: column; gap: 12px; padding: 26px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--bg-2); transition: border-color .3s, transform .3s var(--ease); }
.note-card:hover { border-color: var(--line-2); transform: translateY(-3px); }
.note-card .m { display: flex; gap: 12px; font-size: 14px; color: var(--dim); }
.note-card h3 { font-size: clamp(19px, 1.8vw, 23px); line-height: 1.45; }
.note-card p { color: var(--muted); font-size: 15px; }
.note-card .more { margin-top: auto; color: var(--cyan); font-size: 14px; font-weight: 600; }

/* ── terminal footer ────────────────────────────────────────────────── */
.contact { padding-bottom: 40px; }
.terminal { border-radius: 20px; border: 1px solid var(--line-2); background: #0A0C12; box-shadow: 0 40px 100px -40px rgba(59, 130, 246, .35); overflow: hidden; }
.term-bar { direction: ltr; display: flex; align-items: center; gap: 8px; height: 44px; padding-inline: 16px; border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, .02); }
.term-bar i { width: 12px; height: 12px; border-radius: 50%; background: #FF5F57; } .term-bar i:nth-child(2) { background: #FEBC2E; } .term-bar i:nth-child(3) { background: #28C840; }
.term-bar span { margin-inline: auto; font-family: var(--mono); font-size: 14px; color: var(--dim); }
.term-body { display: grid; grid-template-columns: 1.2fr .8fr; }
.term-form { padding: 26px clamp(18px, 3vw, 32px) 30px; font-family: var(--mono); font-size: 15px; }
.term-form .cmd { color: var(--muted); margin-bottom: 18px; direction: ltr; text-align: left; }
.term-form .cmd b { color: var(--green); font-weight: 500; }
.term-form .cmd em { color: var(--cyan); font-style: normal; }
.tfield { display: flex; align-items: baseline; gap: 10px; padding-block: 9px; border-bottom: 1px dashed rgba(255, 255, 255, .08); }
.tfield label { flex: none; width: 104px; color: var(--violet); font-family: var(--font); font-size: 15px; }
.tfield label::before { content: "> "; color: var(--dim); }
.tfield input, .tfield textarea, .tfield select { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: var(--text); font-family: var(--font); font-size: 16px; padding: 2px 0; resize: none; }
.tfield select option { background: var(--bg-2); }
.tfield [dir="auto"] { text-align: start; }
.tfield:focus-within label { color: var(--cyan); }
.term-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 22px; }
.term-actions .btn { font-family: var(--mono); height: 46px; }
.term-msg { font-size: 14px; color: var(--muted); }
.term-msg.ok { color: var(--green); } .term-msg.err { color: #F87171; }
.hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); opacity: 0; pointer-events: none; }
.term-flow { border-inline-start: 1px solid var(--line); padding: 26px 24px; display: flex; flex-direction: column; justify-content: center; gap: 0; font-size: 14px; }
.term-flow .t { color: var(--dim); margin-bottom: 16px; }
.node { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); transition: .4s var(--ease); }
.node .d { width: 9px; height: 9px; border-radius: 50%; background: var(--dim); transition: .4s; }
.node.on { color: var(--text); border-color: rgba(34, 211, 238, .45); background: rgba(34, 211, 238, .06); }
.node.on .d { background: var(--cyan); box-shadow: 0 0 12px var(--cyan); }
.node.done .d { background: var(--green); box-shadow: 0 0 12px var(--green); }
.edge { width: 2px; height: 18px; margin-inline-start: 18px; background: var(--line-2); position: relative; overflow: hidden; }
.edge.on::after { content: ""; position: absolute; inset: 0; background: linear-gradient(var(--cyan), var(--violet)); animation: flowdown .5s var(--ease) both; }
@keyframes flowdown { from { transform: translateY(-100%); } to { transform: none; } }
@media (max-width: 860px) { .term-body { grid-template-columns: 1fr; } .term-flow { border-inline-start: 0; border-top: 1px solid var(--line); } .tfield { flex-direction: column; gap: 2px; } .tfield label { width: auto; } }

.site-footer { padding-block: 36px 44px; border-top: 1px solid var(--line); margin-top: 60px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 18px 28px; align-items: center; justify-content: space-between; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 14px; color: var(--muted); }
.site-footer nav a:hover { color: var(--text); }
.socials { display: flex; gap: 8px; }
.socials a { width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line); display: grid; place-items: center; color: var(--muted); transition: .2s; }
.socials a:hover { color: var(--text); border-color: var(--line-2); }
.socials svg { width: 18px; height: 18px; }
.copy { font-size: 14px; color: var(--dim); }

/* ── page hero (inner pages) ────────────────────────────────────────── */
.page-hero { padding-top: calc(var(--header-h) + clamp(48px, 8vw, 96px)); padding-bottom: clamp(36px, 5vw, 56px); }
.page-hero h1 { font-size: clamp(38px, 5.6vw, 72px); margin-bottom: 18px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 14px; color: var(--dim); margin-bottom: 26px; }
.crumbs a:hover { color: var(--text); }
.crumbs li { list-style: none; display: flex; gap: 8px; } .crumbs ol { display: contents; }
.crumbs li + li::before { content: "/"; opacity: .5; }

/* projects page constellation */
.projects-hero .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.projects-hero .constellation-wrap { aspect-ratio: 1; max-width: 560px; width: 100%; justify-self: center; }
@media (max-width: 900px) { .projects-hero .wrap { grid-template-columns: 1fr; } }

/* ── project detail ─────────────────────────────────────────────────── */
.p-head { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: end; }
.p-head .tagline { font-size: clamp(20px, 2.2vw, 26px); color: var(--muted); max-width: 40ch; }
.p-head .acts { display: flex; flex-wrap: wrap; gap: 10px; }
.p-badges { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 18px; }
@media (max-width: 800px) { .p-head { grid-template-columns: 1fr; } }
.showcase { position: relative; margin-top: clamp(30px, 5vw, 56px); }
.browser { border-radius: 16px; border: 1px solid var(--line-2); background: var(--bg-3); overflow: hidden; box-shadow: 0 50px 120px -50px rgba(59, 130, 246, .45); }
.browser .bar { height: 38px; display: flex; align-items: center; gap: 7px; padding-inline: 14px; border-bottom: 1px solid var(--line); direction: ltr; }
.browser .bar i { width: 10px; height: 10px; border-radius: 50%; background: rgba(255, 255, 255, .15); }
.browser .bar span { margin-inline: auto; font-family: var(--mono); font-size: 14px; color: var(--dim); padding: 3px 14px; border-radius: 7px; background: rgba(255, 255, 255, .04); }
.browser img { width: 100%; }
.phone { position: absolute; inset-inline-end: clamp(-10px, -2vw, -30px); bottom: -40px; width: clamp(120px, 20%, 220px); border-radius: 28px; border: 6px solid #1B1F2B; overflow: hidden; box-shadow: 0 30px 80px -20px #000; background: var(--bg-3); }
.phone img { width: 100%; aspect-ratio: 390 / 844; object-fit: cover; object-position: top; }
@media (max-width: 640px) { .phone { width: 30%; bottom: -24px; inset-inline-end: -6px; border-width: 4px; border-radius: 18px; } }
.p-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(32px, 6vw, 80px); margin-top: clamp(70px, 9vw, 110px); }
.p-grid h2 { font-size: 26px; margin-bottom: 18px; }
.p-summary { font-size: 19px; line-height: 1.9; color: #D5DAE6; }
html[lang="en"] .p-summary { line-height: 1.75; }
.features { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 36px; padding: 0; }
.features li { list-style: none; display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); font-size: 15px; line-height: 1.6; }
.features li::before { content: ""; flex: none; width: 8px; height: 8px; margin-top: 9px; border-radius: 2px; background: var(--grad); transform: rotate(45deg); }
@media (max-width: 640px) { .features { grid-template-columns: 1fr; } .p-grid { grid-template-columns: 1fr; } }
.side-box { padding: 24px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--bg-2); margin-bottom: 16px; }
.side-box h3 { font-size: 14px; font-weight: 600; color: var(--dim); margin-bottom: 14px; }
.kpis { display: grid; gap: 16px; }
.kpi .v { font-size: 34px; font-weight: 700; font-family: "Plex Sans", var(--font); direction: ltr; display: inline-block; }
.kpi .l { display: block; color: var(--muted); font-size: 14px; }
.related { margin-top: clamp(70px, 9vw, 110px); }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 40px; }
.pager a { padding: 20px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); transition: border-color .2s; }
.pager a:hover { border-color: var(--line-2); }
.pager small { display: block; font-size: 14px; color: var(--dim); }
.pager b { font-size: 18px; }
.pager a.next { text-align: end; }

/* ── about page ─────────────────────────────────────────────────────── */
.about-hero .wrap { display: grid; grid-template-columns: 1fr 380px; gap: clamp(32px, 6vw, 80px); align-items: center; }
@media (max-width: 900px) { .about-hero .wrap { grid-template-columns: 1fr; } .about-hero .portrait { max-width: 320px; order: -1; } }
.principles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.principle { padding: 26px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); }
.principle .n { font-family: var(--mono); color: var(--amber); font-size: 14px; }
.principle h3 { font-size: 20px; margin: 10px 0 8px; }
.principle p { color: var(--muted); font-size: 15px; }
@media (max-width: 760px) { .principles { grid-template-columns: 1fr; } }
.timeline { position: relative; padding: 0; margin: 0; }
.timeline::before { content: ""; position: absolute; inset-block: 8px; inset-inline-start: 7px; width: 2px; background: linear-gradient(var(--cyan), var(--violet)); opacity: .4; }
.timeline li { list-style: none; position: relative; padding-inline-start: 40px; padding-bottom: 36px; }
.timeline li::before { content: ""; position: absolute; inset-inline-start: 0; top: 8px; width: 16px; height: 16px; border-radius: 50%; background: var(--bg); border: 2px solid var(--cyan); }
.timeline .yr { font-family: var(--mono); font-size: 14px; color: var(--cyan); direction: ltr; display: inline-block; }
.timeline h3 { font-size: 21px; margin: 4px 0 2px; }
.timeline .org { color: var(--amber); font-weight: 500; font-size: 15px; }
.timeline ul { margin: 10px 0 0; padding-inline-start: 18px; color: var(--muted); font-size: 15px; }

/* ── article ────────────────────────────────────────────────────────── */
.article { max-width: 760px; margin-inline: auto; }
.article-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 14px; color: var(--dim); margin-bottom: 8px; }
.prose { font-size: 19px; line-height: 2; color: #D9DEEA; }
html[lang="en"] .prose { font-size: 18px; line-height: 1.8; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { font-size: clamp(24px, 2.6vw, 30px); margin-top: 2em; color: var(--text); }
.prose h3 { font-size: 21px; margin-top: 1.6em; }
.prose a { color: var(--cyan); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.prose ul, .prose ol { padding-inline-start: 1.3em; }
.prose li + li { margin-top: .45em; }
.prose blockquote { margin: 1.6em 0; padding: 4px 22px; border-inline-start: 3px solid var(--amber); color: var(--text); font-size: 1.05em; }
.prose strong { color: var(--text); }
.prose sup a { text-decoration: none; font-family: var(--mono); font-size: .7em; padding: 0 2px; }
.prose hr { border: 0; height: 1px; background: var(--line); margin: 2.4em 0; }
.refs { margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--line); }
.refs h2 { font-size: 20px; margin-bottom: 16px; }
.refs ol { padding-inline-start: 1.4em; color: var(--muted); font-size: 15px; line-height: 1.7; }
.refs li { margin-bottom: 10px; }
.refs a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-2); word-break: break-word; }
.refs li:target { color: var(--text); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 40px; }
.share { display: flex; gap: 10px; align-items: center; margin-top: 28px; font-size: 14px; color: var(--muted); }

/* ── command palette ────────────────────────────────────────────────── */
.palette { position: fixed; inset: 0; z-index: 90; display: none; align-items: flex-start; justify-content: center; padding: 12vh 16px 16px; background: rgba(5, 6, 10, .6); backdrop-filter: blur(6px); }
.palette.open { display: flex; animation: fadein .15s ease-out; }
@keyframes fadein { from { opacity: 0; } }
.palette-box { width: 100%; max-width: 640px; border-radius: 18px; border: 1px solid var(--line-2); background: rgba(15, 18, 27, .98); box-shadow: 0 50px 120px -30px #000; overflow: hidden; animation: pop .2s var(--ease); }
@keyframes pop { from { transform: translateY(-8px) scale(.98); opacity: 0; } }
.palette-input { display: flex; align-items: center; gap: 12px; padding: 0 18px; border-bottom: 1px solid var(--line); }
.palette-input svg { width: 20px; height: 20px; color: var(--dim); flex: none; }
.palette-input input { flex: 1; height: 58px; background: none; border: 0; outline: 0; font-size: 17px; }
.palette-list { max-height: min(56vh, 460px); overflow-y: auto; padding: 8px; margin: 0; }
.palette-list .grp { padding: 10px 12px 6px; font-size: 14px; color: var(--dim); font-weight: 600; }
.palette-list a, .palette-list button { width: 100%; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; text-align: start; color: var(--muted); font-size: 15px; }
.palette-list .sel { background: var(--surface-2); color: var(--text); }
.palette-list .ico { width: 30px; height: 30px; flex: none; border-radius: 8px; display: grid; place-items: center; background: var(--surface); font-family: var(--mono); font-size: 14px; color: var(--cyan); }
.palette-list .sub { margin-inline-start: auto; font-size: 14px; color: var(--dim); }
.palette-empty { padding: 28px; text-align: center; color: var(--dim); }
.palette-foot { display: flex; gap: 16px; padding: 10px 16px; border-top: 1px solid var(--line); font-size: 14px; color: var(--dim); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .reveal { opacity: 1; transform: none; }
  .marquee-track { animation: none; flex-wrap: wrap; width: auto; }
}

/* fixes: grid children must be allowed to shrink; icon sizing; touch devices have no Ctrl+K */
.hero .wrap > *, .about-teaser .wrap > *, .projects-hero .wrap > *, .about-hero .wrap > *, .p-grid > * { min-width: 0; }
.kbd-btn svg { width: 18px; height: 18px; flex: none; }
@media (hover: none) { .hero-hint { display: none; } }

/* ── v2: pulse, spinning marks, carousel, case panel, journey ───────── */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes breathe { 0%, 100% { opacity: .55; transform: scale(1); } 50% { opacity: 1; transform: scale(1.08); } }
.bg-fx::after { animation: breathe 9s ease-in-out infinite; }
.bg-fx { background:
  radial-gradient(900px 600px at 10% 110%, rgba(139, 92, 246, .10), transparent 60%),
  radial-gradient(700px 500px at 100% 40%, rgba(34, 211, 238, .06), transparent 60%); }
.constellation .glow { animation: breathe 5s ease-in-out infinite; }

.scroll-progress { position: fixed; top: 0; inset-inline: 0; height: 2px; z-index: 60; transform-origin: 0 50%; transform: scaleX(var(--p, 0));
  background: linear-gradient(90deg, #22D3EE, #3B82F6, #8B5CF6, #EC4899, #F5B544); }
html[dir="rtl"] .scroll-progress { transform-origin: 100% 50%; }

.spin-mark { display: inline-grid; place-items: center; width: 100%; height: 100%; }
.spin-mark svg { width: 100%; height: 100%; animation: spin 14s linear infinite; filter: drop-shadow(0 0 8px color-mix(in srgb, var(--glow) 45%, transparent)); }
.spin-mark.still svg { animation: none; }
.unit:hover .spin-mark svg, .flow-step:hover .spin-mark svg { animation-duration: 2.4s; }
.unit .ic { width: 52px; height: 52px; padding: 6px; background: color-mix(in srgb, var(--glow, #3B82F6) 12%, transparent); }
.unit .ic:has(.spin-mark) { background: rgba(255, 255, 255, .04); }
.flow-step .dot { padding: 8px; }

/* stats: centered, width follows the count */
.stats .wrap { display: flex !important; flex-wrap: wrap; justify-content: center; }
.stats .stat { flex: 0 1 calc(100% / max(var(--n), 1)); max-width: 300px; min-width: 200px; text-align: center; border-top: 0 !important; }
.stats .stat:first-child { border-inline-start: 0; }
.stats .stat:nth-child(n) { border-inline-start: 1px solid var(--line); }
.stats .stat:first-child { border-inline-start: 0 !important; }
.stats .stat .v { font-size: clamp(32px, 3.6vw, 46px); }
@media (max-width: 600px) { .stats .stat { flex-basis: 50%; min-width: 0; } .stats .stat:nth-child(odd) { border-inline-start: 0 !important; } }

/* portrait: the mark sits still in the top-right corner behind the (transparent PNG) photo; whatever passes the edge is clipped */
.portrait { overflow: visible; background: radial-gradient(circle at 50% 30%, rgba(59, 130, 246, .28), transparent 60%), var(--bg-3); }
.portrait .halo { position: absolute; z-index: 0; right: -16%; top: -18%; width: 74%; aspect-ratio: 1; opacity: .9; pointer-events: none; }
.portrait.has-photo .halo { opacity: .6; }
.portrait img { position: relative; z-index: 1; object-fit: contain !important; object-position: bottom center; border-radius: 0 0 26px 26px; }
.portrait .tag { z-index: 2; }
.portrait::after { z-index: 3; }
.portrait .ph { display: none; }

/* home matrix carousel */
.car-nav { display: flex; gap: 8px; margin-inline-start: auto; }
.car-nav button { width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line-2); display: grid; place-items: center; background: var(--surface); transition: .2s; }
.car-nav button:hover { border-color: var(--cyan); background: var(--surface-2); }
.car-nav svg { width: 20px; height: 20px; }
html[dir="rtl"] .car-nav [data-car="1"] svg { transform: scaleX(-1); }
html[dir="ltr"] .car-nav [data-car="-1"] svg { transform: scaleX(-1); }
.is-carousel .view-toggle { display: none; }
.is-carousel .grid { display: flex; gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; padding: 6px 2px 18px; scrollbar-width: none; overscroll-behavior-x: contain; }
.is-carousel .grid::-webkit-scrollbar { display: none; }
.is-carousel .card, .is-carousel .card.is-featured { flex: 0 0 clamp(270px, 31%, 400px); scroll-snap-align: start; }
.car-foot { display: flex; justify-content: center; margin-top: 18px; }

/* scout case study: its own lit panel */
.case { background: none; }
.case-panel { position: relative; padding: clamp(28px, 5vw, 64px); border-radius: 32px; overflow: hidden; isolation: isolate;
  background: radial-gradient(800px 400px at 85% 0%, rgba(245, 181, 68, .16), transparent 60%), radial-gradient(700px 400px at 0% 100%, rgba(139, 92, 246, .18), transparent 60%), linear-gradient(180deg, #13203F, #0F1830);
  border: 1px solid transparent; background-clip: padding-box; box-shadow: 0 40px 120px -50px rgba(245, 181, 68, .35); }
.case-panel::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; padding: 1px; background: linear-gradient(135deg, rgba(245, 181, 68, .6), rgba(59, 130, 246, .2), rgba(139, 92, 246, .6));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.case-panel .eyebrow { color: var(--amber); }

/* about: journey scrollytelling */
.journey-grid { display: grid; grid-template-columns: minmax(260px, 420px) 1fr; gap: clamp(28px, 6vw, 80px); align-items: start; }
.journey-stage { position: sticky; top: calc(var(--header-h) + 8vh); aspect-ratio: 1; display: grid; place-items: center; }
.journey-stage::before { content: ""; position: absolute; inset: 8%; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--jc, #3B82F6) 40%, transparent), transparent); filter: blur(18px); transition: background .6s; animation: breathe 4s ease-in-out infinite; }
.journey-mark { position: relative; width: 82%; transform: rotate(var(--rot, 0deg)) scale(var(--sc, 1)); transition: transform .15s linear; }
.journey-mark svg { width: 100%; height: 100%; overflow: visible; }
.journey-mark rect[data-r] { opacity: .15; transition: opacity .5s, filter .5s; }
.journey-mark rect[data-r].lit { opacity: 1; filter: drop-shadow(0 0 6px #22D3EE); }
.journey-year { position: absolute; bottom: -8px; font-size: 15px; color: var(--cyan); direction: ltr; }
.journey .timeline::before { display: none; }
.journey .timeline li { padding: 28px 28px 28px 28px; margin-bottom: 18px; border-radius: 20px; border: 1px solid var(--line); background: var(--surface); opacity: .4; transform: scale(.97); transition: opacity .5s, transform .5s, border-color .5s, background .5s; min-height: 34vh; display: flex; flex-direction: column; justify-content: center; }
.journey .timeline li::before { display: none; }
.journey .timeline li.on { opacity: 1; transform: none; border-color: color-mix(in srgb, var(--jc, #3B82F6) 55%, transparent); background: color-mix(in srgb, var(--jc, #3B82F6) 7%, transparent); }
.journey .timeline li ul li { min-height: 0; padding: 0; margin: 0; border: 0; background: none; opacity: 1; transform: none; display: list-item; }
@media (max-width: 860px) {
  .journey-grid { grid-template-columns: 1fr; }
  .journey-stage { top: calc(var(--header-h) + 8px); width: 120px; margin-inline: auto; z-index: 5; }
  .journey-year { display: none; }
  .journey .timeline li { min-height: 0; }
}
@media (prefers-reduced-motion: reduce) { .spin-mark svg { animation: none; } .journey .timeline li { opacity: 1; transform: none; } }

/* ── v3: blog carousel, article covers ─────────────────────────────── */
.car-nav button:disabled { opacity: .35; cursor: default; border-color: var(--line); }
.note-card { padding: 0; overflow: hidden; gap: 0; }
.note-card .note-body { padding: 22px 24px 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.note-cover { aspect-ratio: 16 / 9; overflow: hidden; border-bottom: 1px solid var(--line); background: var(--bg-3); }
.note-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.note-card:hover .note-cover img { transform: scale(1.05); }
.note-card .go { position: absolute; inset: 0; z-index: 2; }
.blog-strip .section-head { align-items: end; }
.blog-track { display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; overscroll-behavior-x: contain;
  padding: 6px max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter))) 18px; scroll-padding-inline: max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter))); }
.blog-track::-webkit-scrollbar { display: none; }
.blog-track .note-card { flex: 0 0 clamp(280px, 26vw, 380px); scroll-snap-align: start; }
.article-cover { margin: 0 0 40px; border-radius: 20px; overflow: hidden; border: 1px solid var(--line-2); box-shadow: 0 40px 100px -50px rgba(59, 130, 246, .5); }
.article-cover img { width: 100%; }

/* ── v4: project showcase (rows that open into the project's color) ── */
.showcase { padding-bottom: clamp(48px, 6vw, 80px); }
.sc-filters { display: flex; flex-wrap: wrap; gap: 10px 26px; margin-bottom: 28px; }
.sc-check { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; color: var(--muted); user-select: none; transition: color .2s; }
.sc-check:hover { color: var(--text); }
.sc-check input { position: absolute; opacity: 0; pointer-events: none; }
.sc-check { --c: var(--amber); }
.sc-check .box { width: 20px; height: 20px; border-radius: 6px; border: 2px solid var(--c); background: color-mix(in srgb, var(--c) 30%, transparent); display: grid; place-items: center; transition: .2s; }
.sc-check .box::after { content: ""; width: 10px; height: 6px; margin-top: -2px; border-inline-start: 2.5px solid #0B0D14; border-bottom: 2.5px solid #0B0D14; transform: rotate(-45deg) scale(0); transition: transform .2s var(--ease); }
.sc-check:hover .box { background: color-mix(in srgb, var(--c) 50%, transparent); }
.sc-check input:checked + .box { background: var(--c); box-shadow: 0 0 14px color-mix(in srgb, var(--c) 55%, transparent); }
.sc-check input:checked + .box::after { transform: rotate(-45deg) scale(1); }
.sc-check input:focus-visible + .box { outline: 2px solid var(--cyan); outline-offset: 2px; }
.sc-check .count { font-family: var(--mono); font-size: 14px; color: var(--dim); }

.sc-list { list-style: none; margin: 0; padding: 0; border-bottom: 1px solid var(--line); }
.sc-row { border-top: 1px solid var(--line); transition: background-color .55s var(--ease), color .45s var(--ease); }
.sc-row[hidden] { display: none; }
.sc-row.open { background-color: var(--accent); color: var(--ink); border-top-color: transparent; }
.sc-row.open + .sc-row { border-top-color: transparent; }
.sc-h { margin: 0; font: inherit; }
.sc-head { width: 100%; display: grid; grid-template-columns: 1.1fr 1.5fr .8fr; gap: 28px; align-items: start; padding-block: 30px; text-align: start; cursor: pointer; color: inherit; }
.sc-name { display: flex; align-items: baseline; gap: 14px; font-size: clamp(22px, 2.3vw, 30px); font-weight: 600; line-height: 1.3; letter-spacing: -.01em; }
.sc-n { font-size: 14px; opacity: .5; font-weight: 400; }
.sc-desc { font-size: 16px; line-height: 1.7; opacity: .82; max-width: 52ch; padding-top: 6px; }
.sc-tags { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; font-size: 14px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; padding-top: 8px; }
.sc-tags span { opacity: .85; }
.sc-tags .sc-st { margin-top: 10px; opacity: .65; }
.sc-panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .65s cubic-bezier(.7, 0, .2, 1); }
.sc-row.open .sc-panel { grid-template-rows: 1fr; }
.sc-inner { min-height: 0; overflow: hidden; }
.sc-links { display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; margin-top: -6px; }
.sc-link, .sc-ext { display: inline-flex; align-items: center; gap: 40px; padding-bottom: 8px; border-bottom: 1.5px solid currentColor; font-size: 17px; font-weight: 500; }
.sc-ext { gap: 10px; font-size: 14px; opacity: .8; border-bottom-width: 1px; }
.sc-link svg, .sc-ext svg { width: 18px; height: 18px; transition: transform .3s var(--ease); }
html[dir="rtl"] .sc-link svg { transform: scaleX(-1); }
.sc-link:hover svg { transform: translateX(6px); }
html[dir="rtl"] .sc-link:hover svg { transform: scaleX(-1) translateX(6px); }
.sc-media { display: grid; grid-template-columns: 1.75fr 1fr 1fr; gap: 16px; align-items: start; padding: 30px 0 40px; }
.sc-m { position: relative; border-radius: 14px; overflow: hidden; aspect-ratio: 16 / 10; background: color-mix(in srgb, var(--ink) 10%, transparent);
  opacity: 0; transform: translateY(36px) scale(.98); transition: opacity .5s, transform .8s var(--ease); box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .55); }
.sc-m:first-child { aspect-ratio: 16 / 9.6; }
.sc-m img, .sc-m video { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.sc-m.is-phone { background: color-mix(in srgb, var(--ink) 14%, transparent); }
.sc-m.is-phone img { object-fit: contain; padding: 14px 0 0; filter: drop-shadow(0 16px 24px rgba(0, 0, 0, .35)); }
.sc-row.open .sc-m { opacity: 1; transform: translate3d(var(--px, 0), var(--py, 0), 0); }
.sc-row.open .sc-m:nth-child(2) { transition-delay: .08s; }
.sc-row.open .sc-m:nth-child(3) { transition-delay: .16s; }
@media (max-width: 860px) {
  .sc-head { grid-template-columns: 1fr; gap: 8px; padding-block: 22px; }
  .sc-tags { flex-direction: row; flex-wrap: wrap; gap: 4px 12px; padding-top: 4px; }
  .sc-tags .sc-st { margin-top: 0; }
  .sc-media { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 12px; padding: 22px 0 28px; scrollbar-width: none; }
  .sc-m { flex: 0 0 78%; scroll-snap-align: start; }
}
@media (prefers-reduced-motion: reduce) { .sc-panel { transition: none; } .sc-m { transition: none; } }

/* Tajawal (Arabic): heavier display weight, slightly larger body */
html[lang="ar"] body { font-size: 18px; }
html[lang="ar"] h1, html[lang="ar"] .h2 { font-weight: 800; }
html[lang="ar"] .hero h1 { line-height: 1.3; }

/* case study: a big spinning mark hangs off the top-right corner; the panel keeps its size and the part outside stays visible */
.case { overflow-x: clip; }
.case-panel { overflow: visible; }
.case-mark { --s: clamp(120px, 16vw, 210px); position: absolute; top: calc(var(--s) * -.26); right: calc(var(--s) * -.26); width: var(--s); aspect-ratio: 1; z-index: 1; pointer-events: none; }
.case-mark::before { content: ""; position: absolute; inset: -30%; border-radius: 50%; background: radial-gradient(closest-side, rgba(245, 181, 68, .35), transparent); animation: breathe 4s ease-in-out infinite; }
.case-mark .spin-mark svg { animation-duration: 9s; }
.case-panel .section-head { padding-top: clamp(64px, 7vw, 96px); }

/* ── v5: automation workflow ─────────────────────────────────────── */
.automation { padding-block: clamp(48px, 6vw, 80px); }
.wf { border-radius: 24px; border: 1px solid var(--line-2); overflow: hidden; background: linear-gradient(180deg, rgba(255, 255, 255, .025), transparent 40%), #0A1122; }
.wf-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.wf-btn { display: inline-flex; align-items: center; gap: 10px; height: 38px; padding-inline: 14px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface); font-size: 14px; font-weight: 600; transition: .2s; }
.wf-btn:hover { border-color: var(--cyan); }
.wf-ico { width: 12px; height: 12px; background: var(--green); clip-path: polygon(0 0, 100% 50%, 0 100%); }
html[dir="rtl"] .wf-ico { clip-path: polygon(100% 0, 0 50%, 100% 100%); }
.wf.is-playing .wf-ico { background: var(--amber); clip-path: polygon(0 0, 35% 0, 35% 100%, 0 100%, 0 0, 65% 0, 100% 0, 100% 100%, 65% 100%, 65% 0); }
.wf-status { margin: 0; font-size: 14px; color: var(--muted); direction: ltr; }
html[dir="rtl"] .wf-status { direction: rtl; font-family: var(--font); }
.wf.is-playing .wf-status { color: var(--green); }
.wf-tools { margin-inline-start: auto; font-size: 14px; color: var(--dim); }
.wf-canvas { position: relative; padding: 10px clamp(8px, 2vw, 24px) 4px;
  background-image: linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
  background-size: 40px 40px; background-position: center; }


/* ── v7: automation — simple scenario, icons with a light 3D extrusion ── */
.wf-tools { display: inline-flex; gap: 16px; }
.wf-logo { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: var(--muted); }
.wf-logo svg { width: 16px; height: 16px; color: var(--c); }
.wf-canvas { padding: clamp(14px, 2.5vw, 32px) clamp(8px, 2vw, 28px) clamp(18px, 3vw, 36px); overflow: hidden;
  background-image: radial-gradient(rgba(255, 255, 255, .09) 1.2px, transparent 1.3px); background-size: 22px 22px; }
.wf-plane { position: relative; container-type: inline-size; aspect-ratio: var(--ar); }
.wf-links.is-m { display: none; }
.wf-links { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.wf-edge { fill: none; stroke: rgba(255, 255, 255, .22); stroke-width: 2.5; stroke-dasharray: 0 9; stroke-linecap: round; }
.wf-beam { fill: none; stroke: url(#wf-beam-g); stroke-width: 3.5; stroke-linecap: round; opacity: 0; filter: drop-shadow(0 0 6px #7DD3FC); }
.wf-filter circle { fill: #16203B; stroke: rgba(255, 255, 255, .2); }
.wf-filter path { fill: #F5B544; }

.wf-n { --s: clamp(30px, 4.3cqw, 50px); position: absolute; left: var(--dx); top: var(--dy); width: 0; height: 0; }
.wf-ic { position: absolute; left: 0; top: 0; width: var(--s); height: var(--s); margin: calc(var(--s) / -2) 0 0 calc(var(--s) / -2); display: grid; place-items: center; transition: transform .35s var(--ease); }
/* soft colored floor glow + stacked drop-shadows = extruded icon */
.wf-ic::before { content: ""; position: absolute; left: 10%; right: 10%; bottom: -22%; height: 26%; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--c) 45%, transparent), transparent); filter: blur(4px); transition: opacity .35s; opacity: .7; }
.wf-ic svg { width: 100%; height: 100%; overflow: visible;
  filter: drop-shadow(0 1px 0 var(--c2)) drop-shadow(0 1px 0 var(--c2)) drop-shadow(0 1px 0 var(--c2)) drop-shadow(0 6px 6px rgba(0, 0, 0, .45)); }
.wf-n:hover .wf-ic { transform: translateY(-4px); }
.wf-label { position: absolute; left: 0; top: calc(var(--s) / 2 + 12px); width: 15cqw; min-width: 96px; transform: translateX(-50%); text-align: center; }
.wf-label b { display: block; font-size: clamp(11px, 1.3cqw, 15px); font-weight: 600; line-height: 1.35; }
.wf-label small { display: block; font-size: clamp(9px, .9cqw, 11.5px); color: var(--dim); font-family: var(--mono); direction: ltr; }
.wf-n.hit .wf-ic { transform: translateY(-6px) scale(1.15); }
.wf-n.hit .wf-ic::before { opacity: 1; }
.wf-n.hit .wf-label b { color: var(--c); }
.wf-n.done .wf-label b::after { content: " ✓"; color: var(--green); font-size: .85em; }
.wf-n.is-ai.thinking .wf-ic { animation: wf-bob .45s ease-in-out infinite alternate; }
@keyframes wf-bob { to { transform: translateY(-8px) rotate(-8deg); } }
html[dir="rtl"] .wf-n.is-flip .wf-ic svg { transform: scaleX(-1); }
@media (max-width: 700px) { .wf-tools { display: none; } }
/* phones: the scenario flows top to bottom and fits the width, no sideways scroll */
@media (max-width: 760px) {
  .wf-canvas { padding: 18px 6px 22px; }
  .wf-plane { aspect-ratio: var(--arm); }
  .wf-links.is-d { display: none; }
  .wf-links.is-m { display: block; }
  .wf-n { --s: 34px; left: var(--mx); top: var(--my); }
  .wf-label { top: calc(var(--s) / 2 + 8px); width: 25cqw; min-width: 0; }
  .wf-label b { font-size: 11px; line-height: 1.35; }
  .wf-label small { display: none; }
}

/* ── v8: stack strip under the automation section — icon + name, two slow marquee rows ── */
.tools { margin-top: clamp(44px, 5vw, 72px); }
.tools-h { display: flex; align-items: center; gap: 16px; max-width: var(--max); margin: 0 auto clamp(20px, 2.5vw, 30px); padding-inline: var(--gutter); font-size: 14px; font-weight: 600; color: var(--dim); }
.tools-h::before, .tools-h::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--line-2)); }
.tools-h::after { transform: scaleX(-1); }
.st-row { --gap: clamp(36px, 4.5vw, 60px); display: flex; overflow: hidden; padding-block: 8px;
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.st-row + .st-row { margin-top: clamp(14px, 2vw, 22px); }
.st-track { display: flex; flex-shrink: 0; gap: var(--gap); padding-inline-end: var(--gap); margin: 0; list-style: none; animation: st-run 70s linear infinite; }
.st-row.is-rev .st-track { animation-direction: reverse; animation-duration: 80s; }
.st-row:hover .st-track { animation-play-state: paused; }
@keyframes st-run { to { transform: translateX(-100%); } }
html[dir="rtl"] .st-track { animation-name: st-run-rtl; }
@keyframes st-run-rtl { to { transform: translateX(100%); } }
.st-i { display: flex; flex-direction: column; align-items: center; gap: 10px; min-width: 64px; }
.st-ic { width: 34px; height: 34px; color: var(--c); opacity: .85; transition: transform .3s var(--ease), opacity .3s, filter .3s; }
.st-ic svg { width: 100%; height: 100%; }
.st-n { font-size: 14px; font-weight: 500; color: var(--muted); white-space: nowrap; direction: ltr; transition: color .3s; }
.st-i:hover .st-ic { transform: translateY(-3px); opacity: 1; filter: drop-shadow(0 6px 14px color-mix(in srgb, var(--c) 45%, transparent)); }
.st-i:hover .st-n { color: var(--text); }
@media (max-width: 700px) { .st-ic { width: 28px; height: 28px; } .st-n { font-size: 14px; } }
@media (prefers-reduced-motion: reduce) {
  .st-row { mask-image: none; -webkit-mask-image: none; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
  .st-track { flex-wrap: wrap; justify-content: center; row-gap: 24px; padding-inline-end: 0; animation: none; }
  .st-dup { display: none; }
}

/* ── v8: tech names carry their icon (cards, showcase, project page) ── */
.pill { gap: 6px; }
.tk { display: inline-grid; place-items: center; flex: none; width: 13px; height: 13px; color: var(--c); font-style: normal; }
.tk svg { width: 100%; height: 100%; }
.sc-tech { display: inline-flex; align-items: center; gap: 7px; }
.sc-tech .tk { width: 14px; height: 14px; transition: color .45s var(--ease); }
.sc-row.open .sc-tech .tk { color: inherit; }

/* ── v9: showcase — category chip + status badge, media at one height with a real phone frame ── */
.sc-tags .sc-st { --sc: var(--green); opacity: 1; display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; height: 26px; padding-inline: 10px; border-radius: 8px; font-size: 14px; font-weight: 700; letter-spacing: 0; text-transform: none;
  color: var(--sc); background: color-mix(in srgb, var(--sc) 12%, transparent); border: 1px solid color-mix(in srgb, var(--sc) 35%, transparent); transition: .45s var(--ease); }
.sc-st::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--sc); animation: pulse 2.4s infinite; }
.sc-st[data-s="soon"] { --sc: var(--amber); } .sc-st[data-s="private"] { --sc: #A78BFA; } .sc-st[data-s="archived"] { --sc: var(--dim); }
.sc-row.open .sc-tags .sc-st { color: var(--ink); background: color-mix(in srgb, var(--ink) 12%, transparent); border-color: color-mix(in srgb, var(--ink) 30%, transparent); }
.sc-row.open .sc-st::before { box-shadow: 0 0 0 2px var(--ink); }

/* v11: every row carries its own brand color before it opens (a wash from the start edge, a colored
   top line, a colored number), so projects read as separate things and not one long list */
.sc-row { --dir: to right; position: relative; isolation: isolate; }
html[dir="rtl"] .sc-row { --dir: to left; }
.sc-row::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .8; transition: opacity .5s var(--ease);
  background: linear-gradient(var(--dir), color-mix(in srgb, var(--accent) 20%, transparent), transparent 60%); }
.sc-row::after { content: ""; position: absolute; inset-inline: 0; top: -1px; height: 2px; pointer-events: none; transition: opacity .4s var(--ease);
  background: linear-gradient(var(--dir), var(--accent), transparent 45%); }
.sc-row:hover::before { opacity: 1; }
.sc-row.open::before, .sc-row.open::after { opacity: 0; }
.sc-row .sc-n { opacity: 1; color: color-mix(in srgb, var(--accent) 62%, #fff); transition: color .45s var(--ease), opacity .45s; }
.sc-row.open .sc-n { color: inherit; opacity: .55; }

.sc-media { display: flex; align-items: flex-start; }
.sc-m, .sc-m:first-child { flex: 1.6 1 0; min-width: 0; aspect-ratio: 16 / 10; }
.sc-m.is-phone { flex: .47 1 0; aspect-ratio: 9 / 19.2; border-radius: 24px; border: 5px solid #0B0D14; background: #0B0D14; }
.sc-m.is-phone img { object-fit: cover; object-position: top; padding: 0; border-radius: 19px; filter: none; }
@media (max-width: 860px) {
  .sc-tags .sc-st { margin-top: 0; }
  .sc-m, .sc-m:first-child, .sc-m.is-phone { flex: 0 0 auto; height: 240px; width: auto; }
}

/* ── v9: project page — blur-in title, sticky zoom cloud, phones strip, large frames ── */
.pj-hero { padding-top: calc(var(--header-h) + clamp(40px, 6vw, 80px)); padding-bottom: clamp(48px, 6vw, 80px); }
.pj-title { font-size: clamp(44px, 8.4vw, 124px); line-height: 1.08; letter-spacing: -.03em; animation: pj-blur 1.3s var(--ease) both; }
@keyframes pj-blur { from { opacity: 0; filter: blur(18px); transform: translateY(14px); } }
.pj-meta { display: grid; grid-template-columns: 1fr 1.3fr; gap: clamp(28px, 5vw, 72px); margin-top: clamp(28px, 4vw, 48px); padding-top: clamp(24px, 3vw, 36px); border-top: 1px solid var(--line-2);
  animation: pj-up 1s .35s var(--ease) both; }
@keyframes pj-up { from { opacity: 0; transform: translateY(18px); } }
.pj-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 26px 20px; margin: 0; align-content: start; }
.pj-facts dt { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font-size: 14px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--dim); }
.pj-facts dt::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.pj-facts dd { margin: 0; }
.pj-cat { display: inline-flex; align-items: center; height: 32px; padding-inline: 14px; border-radius: 99px; font-size: 14px; font-weight: 700;
  background: color-mix(in srgb, var(--accent) 22%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 65%, transparent); transition: background-color .2s; }
.pj-cat:hover { background: color-mix(in srgb, var(--accent) 40%, transparent); }
.pj-st { --sc: var(--green); display: inline-flex; align-items: center; gap: 8px; height: 32px; padding-inline: 12px; border-radius: 9px; font-size: 14px; font-weight: 700;
  color: var(--sc); background: color-mix(in srgb, var(--sc) 12%, transparent); border: 1px solid color-mix(in srgb, var(--sc) 35%, transparent); }
.pj-st::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--sc); animation: pulse 2.4s infinite; }
.pj-st[data-s="soon"] { --sc: var(--amber); } .pj-st[data-s="private"] { --sc: #A78BFA; } .pj-st[data-s="archived"] { --sc: var(--dim); }
.pj-tagline { font-size: clamp(21px, 2.1vw, 28px); font-weight: 600; line-height: 1.5; }
.pj-summary { margin-top: 16px; font-size: 17px; color: var(--muted); max-width: 60ch; }
.pj-note { margin-top: 14px; font-size: 15px; color: var(--dim); }
.pj-acts { display: flex; flex-wrap: wrap; gap: 14px 32px; margin-top: 30px; }
.pj-live { display: inline-flex; align-items: center; gap: 28px; padding-bottom: 8px; border-bottom: 1.5px solid currentColor; font-size: 16px; font-weight: 600; transition: gap .3s var(--ease), color .2s; }
.pj-live:hover { gap: 40px; color: var(--accent); }
.pj-live svg { width: 16px; height: 16px; }
.pj-live.is-ghost { gap: 10px; opacity: .8; border-bottom-width: 1px; }

.pj-zoom { --zs: 1.15; position: relative; height: 150vh; background: color-mix(in srgb, var(--accent) calc(var(--bgk, 0) * 100%), var(--bg)); }
.pj-sticky { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.pj-cloud { position: absolute; inset: 0; transform: scale(calc(.9 + var(--t, 0) * var(--zs))); transform-origin: 50% 50%; }
.pj-tile { --px: var(--x); --py: var(--y); --pw: var(--w); position: absolute; left: calc(var(--px) * 1%); top: calc(var(--py) * 1%); width: calc(var(--pw) * 1vw); aspect-ratio: 16 / 10; margin: 0; overflow: hidden;
  border-radius: 12px; background: #0B0D14; box-shadow: 0 30px 70px -30px rgba(0, 0, 0, .6), 0 0 0 1px rgba(255, 255, 255, .06);
  transform: translate(-50%, -50%) translate(calc((var(--px) - 50) * var(--t, 0) * .75vw), calc((var(--py) - 50) * var(--t, 0) * .75vh));
  transition: opacity .9s var(--ease), translate .9s var(--ease), scale .9s var(--ease); }
.pj-tile img, .pj-tile video { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.pj-tile.is-phone { aspect-ratio: 9 / 19.2; border-radius: 18px; border: 4px solid #0B0D14; }
.pj-tile.is-phone img { border-radius: 14px; }
.pj-tile.is-center { z-index: 2; border-radius: 14px; box-shadow: 0 50px 120px -40px rgba(0, 0, 0, .7), 0 0 0 1px rgba(255, 255, 255, .08); }
.pj-zoom:not(.in) .pj-tile { opacity: 0; translate: 0 50px; scale: .92; }
.pj-tile:nth-child(2) { transition-delay: .08s; } .pj-tile:nth-child(3) { transition-delay: .14s; } .pj-tile:nth-child(4) { transition-delay: .2s; }
.pj-tile:nth-child(5) { transition-delay: .26s; } .pj-tile:nth-child(6) { transition-delay: .32s; } .pj-tile:nth-child(n+7) { transition-delay: .38s; }
@media (max-width: 760px) { .pj-zoom { --zs: .3; height: 125vh; } .pj-tile { --px: var(--mx); --py: var(--my); --pw: var(--mw); } }

.pj-phones { padding-block: clamp(56px, 7vw, 100px); overflow: hidden; background: var(--accent); color: var(--ink); }
.pj-kicker { margin-bottom: clamp(24px, 3vw, 36px); font-size: 14px; font-weight: 700; letter-spacing: .04em; opacity: .75; }
.pj-strip { display: flex; }
.pj-track { display: flex; flex-shrink: 0; gap: clamp(16px, 2vw, 28px); padding-inline-end: clamp(16px, 2vw, 28px); margin: 0; list-style: none; animation: st-run 55s linear infinite; }
html[dir="rtl"] .pj-track { animation-name: st-run-rtl; }
.pj-strip:hover .pj-track { animation-play-state: paused; }
.pj-phone { width: clamp(170px, 17vw, 240px); aspect-ratio: 9 / 19.2; border-radius: 28px; border: 6px solid #0B0D14; overflow: hidden; background: #0B0D14; box-shadow: 0 30px 60px -28px rgba(0, 0, 0, .55); }
.pj-phone img { width: 100%; height: 100%; object-fit: cover; object-position: top; border-radius: 22px; }

.pj-shots { padding-block: clamp(64px, 8vw, 120px) 0; }
.pj-shots .wrap { display: grid; gap: clamp(32px, 5vw, 72px); }
.pj-shot { max-width: 1120px; width: 100%; margin-inline: auto; box-shadow: 0 50px 120px -50px color-mix(in srgb, var(--accent) 70%, transparent); }
.pj-shot img { display: block; }
.pj-shot .abstract { aspect-ratio: 16 / 9; }
@supports (animation-timeline: view()) {
  .pj-shot { animation: pj-grow linear both; animation-timeline: view(); animation-range: entry 0% cover 35%; }
  @keyframes pj-grow { from { opacity: .3; transform: scale(.86) translateY(40px); } }
}
.pj-details .p-grid { margin-top: 0; padding-block: clamp(64px, 8vw, 110px) 0; }
.pj-details .features { margin-top: 0; }
.pj-details .p-grid.is-solo { grid-template-columns: 1fr; }
@media (max-width: 860px) {
  .pj-meta { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .pj-title, .pj-meta { animation: none; }
  .pj-zoom { height: auto; }
  .pj-sticky { position: relative; height: 80vh; }
  .pj-cloud { transform: none; }
  .pj-tile { transition: none; }
  .pj-track { animation: none; flex-wrap: wrap; justify-content: center; row-gap: 24px; }
  .pj-track[aria-hidden] { display: none; }
  .pj-shot { animation: none; }
}

/* ── v10: phone fixes — stable hero line, contact form, how-we-work cards ── */
/* the typed line keeps one width so the prompt does not slide while text grows */
.term-line { width: calc(33ch + 2rem); max-width: 100%; }
/* the spinning mark around the portrait is wider than a phone: clip it at the section edge */
.about-teaser, .about-hero { overflow-x: clip; }

@media (max-width: 860px) {
  .term-form { padding: 20px 16px 24px; font-size: 14px; }
  .term-form .cmd { font-size: 14px; line-height: 1.7; margin-bottom: 14px; overflow-wrap: anywhere; }
  .tfield { flex-direction: column; align-items: stretch; gap: 8px; padding: 0; margin-bottom: 14px; border-bottom: 0; }
  .tfield label { width: auto; font-size: 14px; }
  .tfield input, .tfield textarea, .tfield select { flex: none; width: 100%; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, .04); transition: border-color .2s; }
  .tfield textarea { min-height: 120px; }
  .tfield input:focus, .tfield textarea:focus, .tfield select:focus { border-color: var(--cyan); }
  .term-actions { margin-top: 8px; }
  .term-actions .btn { width: 100%; justify-content: center; }
  .term-flow { padding: 18px 16px 22px; }
  .term-flow .t { margin-bottom: 12px; }
  .node { padding: 9px 12px; font-size: 14px; }
  .edge { height: 10px; }
}

@media (max-width: 560px) {
  .unit { display: grid; grid-template-columns: 52px 1fr; column-gap: 14px; align-items: start; padding: 16px; }
  .unit .ic { grid-row: 1 / span 2; width: 48px; height: 48px; margin-bottom: 0; }
  .unit h3 { font-size: 19px; margin-bottom: 4px; }
  .unit p { font-size: 15.5px; line-height: 1.7; }
}

/* project pages: the project's own technologies, same look as the home "tools we build with" strip */
.pj-tech { padding-block: clamp(56px, 7vw, 96px) 0; overflow: hidden; }
.pj-tech .tools { margin-top: 0; }
.st-row.is-still { justify-content: center; mask-image: none; -webkit-mask-image: none; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.st-row.is-still .st-track { flex: 0 1 auto; flex-wrap: wrap; justify-content: center; gap: 28px clamp(32px, 5vw, 64px); padding-inline-end: 0; animation: none; }
.st-row.is-still .st-i { min-width: 84px; }
.st-row.is-still .st-ic { width: 40px; height: 40px; }
.st-row.is-still .st-n { white-space: normal; text-align: center; max-width: 16ch; }

/* privacy page */
.pv-date { margin-top: 36px; font-size: 14px; color: var(--dim); }

/* answer-ready blocks: summary, FAQ, author box */
.article-meta a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-2); }
.tldr { margin: 0 0 32px; padding: 18px 22px; border-radius: var(--radius-sm); border: 1px solid var(--line); border-inline-start: 3px solid var(--cyan); background: var(--surface); }
.tldr b { display: block; margin-bottom: 6px; font-size: 14px; color: var(--cyan); letter-spacing: .02em; }
.tldr p { margin: 0; font-size: 17px; line-height: 1.85; color: var(--text); }
.faq { margin-top: 56px; }
.faq h2 { font-size: clamp(22px, 2.4vw, 28px); margin-bottom: 20px; }
.faq dl { margin: 0; display: grid; gap: 14px; }
.faq-item { padding: 18px 22px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface); }
.faq-item dt { font-weight: 700; font-size: 17px; color: var(--text); line-height: 1.6; }
.faq-item dd { margin: 8px 0 0; color: var(--muted); font-size: 16px; line-height: 1.85; }
.pj-faq { padding: 24px 0 64px; }
.pj-faq .faq { margin-top: 0; max-width: 820px; }
.p-tldr { font-size: 18px; line-height: 1.9; color: var(--text); max-width: 62ch; margin-bottom: 28px; }
.author-box { display: flex; gap: 18px; align-items: flex-start; margin-top: 48px; padding: 22px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); }
.author-box img { flex: none; width: 72px; height: 90px; object-fit: contain; border-radius: 12px; background: var(--bg-3); }
.author-box h2 { font-size: 13px; letter-spacing: .04em; color: var(--dim); margin: 0 0 6px; font-weight: 600; }
.author-box p { margin: 0 0 8px; font-size: 15px; line-height: 1.8; color: var(--muted); }
.author-box .au-name { color: var(--text); font-weight: 700; font-size: 16px; }
.author-box a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-2); }
.author-box .au-more { color: var(--cyan); text-decoration: none; font-size: 14px; }
@media (max-width: 520px) { .author-box { flex-direction: column; } }

/* ── motion details (ideas from React Bits, rebuilt without React) ───────────────────────────── */

/* rolling counter: every digit is a reel that slides to its number */
.reels { --lh: 1.15em; display: inline-flex; height: var(--lh); vertical-align: top; font-variant-numeric: tabular-nums; }
.reels .dg { display: block; height: var(--lh); overflow: hidden; }
.reels .dc { display: block; height: var(--lh); line-height: var(--lh); }
.reels .reel { display: flex; flex-direction: column; transform: translateY(0); transition: transform 1.5s cubic-bezier(.16, .84, .24, 1); }
.reels .reel.go { transform: translateY(calc(var(--d) * var(--lh) * -1)); }
.reels .reel i { display: block; height: var(--lh); line-height: var(--lh); font-style: normal; }
/* line-height pinned so the suffix (+) shares the digits' baseline */
.stat .v:has(.reels) { display: inline-flex; align-items: flex-start; line-height: 1.15em; }

/* scroll reveal: words light up with scroll (opacity set from JS) */
blockquote.impact .w { transition: color .15s linear; }

/* logo badge on the portrait corner: the mark turns every 8s and takes the next palette each turn */
.logo-badge { position: absolute; z-index: 2; inset-inline-end: -26px; bottom: -26px; width: clamp(96px, 10vw, 120px); aspect-ratio: 1; border-radius: 50%; pointer-events: none;
  background: rgba(12, 20, 40, .82); border: 1px solid var(--line-2); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.rb-mark { --turn: 8s; position: absolute; inset: 17%; display: grid; place-items: center; opacity: 0;
  animation: rb-show calc(var(--turn) * 6) linear infinite backwards; animation-delay: calc(var(--k) * var(--turn)); }
.rb-mark svg { width: 100%; height: 100%; animation: spin var(--turn) linear infinite; filter: drop-shadow(0 0 8px color-mix(in srgb, var(--glow) 55%, transparent)); }
@keyframes rb-show { 0% { opacity: 0; } 1.5% { opacity: 1; } 16.67% { opacity: 1; } 18.2% { opacity: 0; } 100% { opacity: 0; } }
@media (max-width: 700px) { .logo-badge { inset-inline-end: -6px; bottom: -22px; width: 88px; } }

/* magic bento: shared pointer light on the cards (JS sets --bx / --by) */
.units[data-bento] .unit { position: relative; isolation: isolate; overflow: hidden; }
.units[data-bento] .unit::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .35s;
  background: radial-gradient(260px circle at var(--bx, 50%) var(--by, 50%), color-mix(in srgb, var(--glow, #3B82F6) 20%, transparent), transparent 70%); }
.units[data-bento] .unit::after { content: ""; position: absolute; inset: 0; padding: 1.5px; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .35s;
  background: radial-gradient(210px circle at var(--bx, 50%) var(--by, 50%), color-mix(in srgb, var(--glow, #3B82F6) 85%, #fff), transparent 65%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); mask-composite: exclude; }
.units[data-bento].bento-on .unit::after, .units[data-bento] .unit:hover::before { opacity: 1; }
.unit .bt { position: absolute; width: 4px; height: 4px; border-radius: 50%; background: var(--glow, var(--cyan)); box-shadow: 0 0 8px var(--glow, var(--cyan)); pointer-events: none; }

/* letter glitch behind the contact terminal: strongest at the edges so the form stays readable */
.terminal { position: relative; isolation: isolate; }
.term-glitch { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; opacity: .15; pointer-events: none;
  -webkit-mask-image: radial-gradient(ellipse 80% 85% at 50% 52%, transparent 45%, #000 100%); mask-image: radial-gradient(ellipse 80% 85% at 50% 52%, transparent 45%, #000 100%); }

/* gradual blur: edges of the blog carousel and the tools marquee dissolve instead of cutting */
.track-wrap { position: relative; --gb-w: clamp(28px, 4vw, 64px); --gb-blur: 5px; } /* narrow, light edge: the card peeking at the end must stay readable */
.track-wrap::before, .track-wrap::after, .tools:has(.st-row:not(.is-still))::before, .tools:has(.st-row:not(.is-still))::after {
  content: ""; position: absolute; top: 0; bottom: 0; z-index: 2; width: var(--gb-w, clamp(40px, 8vw, 110px)); pointer-events: none;
  -webkit-backdrop-filter: blur(var(--gb-blur, 7px)); backdrop-filter: blur(var(--gb-blur, 7px)); }
.track-wrap::before, .track-wrap::after { opacity: 0; transition: opacity .3s; }
.track-wrap.more-s::before, .track-wrap.more-e::after { opacity: 1; }
.track-wrap::before, .tools::before { inset-inline-start: 0; -webkit-mask-image: linear-gradient(to right, #000 15%, transparent); mask-image: linear-gradient(to right, #000 15%, transparent); }
.track-wrap::after, .tools::after { inset-inline-end: 0; -webkit-mask-image: linear-gradient(to left, #000 15%, transparent); mask-image: linear-gradient(to left, #000 15%, transparent); }
html[dir="rtl"] .track-wrap::before, html[dir="rtl"] .tools::before { -webkit-mask-image: linear-gradient(to left, #000 15%, transparent); mask-image: linear-gradient(to left, #000 15%, transparent); }
html[dir="rtl"] .track-wrap::after, html[dir="rtl"] .tools::after { -webkit-mask-image: linear-gradient(to right, #000 15%, transparent); mask-image: linear-gradient(to right, #000 15%, transparent); }
.tools { position: relative; }

/* magnet: the pull uses `translate`, so it needs its own transition next to the hover ones */
.btn[data-magnet] { transition: transform .2s var(--ease), translate .3s var(--ease), background .2s, border-color .2s, box-shadow .3s; }

/* star border: two lights travel along the top and bottom edges of the main buttons */
@property --sx { syntax: "<percentage>"; inherits: false; initial-value: 0%; }
.btn-star { position: relative; }
.btn-star::before { content: ""; position: absolute; inset: -3px; padding: 2px; border-radius: 17px; pointer-events: none;
  background: radial-gradient(circle 90px at var(--sx) 0%, #fff, var(--cyan) 22%, transparent 100%), radial-gradient(circle 90px at calc(100% - var(--sx)) 100%, #fff, var(--amber) 22%, transparent 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); mask-composite: exclude;
  animation: star-run 4.5s ease-in-out infinite alternate; }
@keyframes star-run { to { --sx: 100%; } }

/* click spark canvas */
.click-spark { position: fixed; inset: 0; z-index: 80; width: 100vw; height: 100vh; pointer-events: none; }

/* toast: status mark + swipe to dismiss */
.toasts { position: fixed; z-index: 70; inset-inline: 0; bottom: max(20px, env(safe-area-inset-bottom)); display: flex; flex-direction: column; align-items: center; gap: 10px; padding-inline: 16px; pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 12px; max-width: min(460px, 100%); padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line-2); background: rgba(16, 22, 42, .94);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); color: var(--text); font-size: 15px; line-height: 1.6; box-shadow: 0 24px 60px -24px rgba(0, 0, 0, .8); touch-action: pan-y; cursor: grab; user-select: none;
  opacity: 0; transform: translateY(16px) scale(.96); transition: transform .35s var(--ease), opacity .3s; }
.toast.is-in { opacity: 1; transform: none; }
.toast.is-leaving { transform: translateY(12px) scale(.96); }
.toast.is-drag { transition: none; cursor: grabbing; }
.toast-mark { flex: none; width: 26px; height: 26px; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.toast.is-ok .toast-mark { stroke: var(--green); } .toast.is-err .toast-mark { stroke: #F87171; }
.toast-mark circle { stroke-dasharray: 63; stroke-dashoffset: 63; }
.toast-mark path { stroke-dasharray: 24; stroke-dashoffset: 24; }
.toast.is-in .toast-mark circle { animation: toast-draw .5s var(--ease) .1s forwards; }
.toast.is-in .toast-mark path { animation: toast-draw .35s var(--ease) .45s forwards; }
@keyframes toast-draw { to { stroke-dashoffset: 0; } }
.toast-x { flex: none; display: grid; place-items: center; width: 32px; height: 32px; margin-inline-start: 4px; border-radius: 9px; border: 0; background: transparent; color: var(--muted); cursor: pointer; }
.toast-x:hover { background: var(--surface-2); color: var(--text); }
.toast-x svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

@media (prefers-reduced-motion: reduce) {
  .btn-star::before { animation: none; --sx: 50%; }
  .rb-mark, .rb-mark svg { animation: none; }
  .rb-mark:first-child { opacity: 1; }
  .tools::before, .tools::after { display: none; }
  .reels .reel { transition: none; }
}

/* blog cards assemble when they scroll into view. They ship with .asm (hidden from the first paint, so cards above the
   fold never flash); JS adds .in as each one enters the screen and drops both classes afterwards so hover works as usual.
   The failsafe animation shows them anyway after 5s if the script never runs (main.js cancels it). */
@media (prefers-reduced-motion: no-preference) {
  html:not(.no-js) .blog-track .note-card.asm { opacity: 0; transform: translate(var(--ax, 0), 80px) rotate(var(--ar, 4deg)) scale(.9); transition: none; animation: asm-failsafe .01s 5s forwards; }
  html:not(.no-js) .blog-track .note-card.asm.in { opacity: 1; transform: none; animation: none;
    transition: opacity .6s var(--ease), transform 1s cubic-bezier(.2, .9, .25, 1.12), border-color .3s; transition-delay: var(--ad, 0ms); }
}
@keyframes asm-failsafe { to { opacity: 1; transform: none; } }

/* collapsible FAQ (project pages): questions only, answer opens on click */
.faq .faq-list { display: grid; gap: 12px; }
details.faq-item { padding: 0; transition: border-color .2s, background .2s; }
details.faq-item:hover { border-color: var(--line-2); }
details.faq-item[open] { background: var(--surface-2); border-color: var(--line-2); }
details.faq-item summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 22px; cursor: pointer; list-style: none; font-weight: 700; font-size: 17px; line-height: 1.6; color: var(--text); }
details.faq-item summary::-webkit-details-marker { display: none; }
details.faq-item summary::after { content: ""; flex: none; width: 9px; height: 9px; margin-top: -4px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .25s var(--ease), margin .25s var(--ease); }
details.faq-item[open] summary::after { margin-top: 4px; transform: rotate(-135deg); border-color: var(--amber); }
details.faq-item summary:focus-visible { outline: 2px solid var(--cyan); outline-offset: -2px; border-radius: var(--radius-sm); }
details.faq-item .faq-a { margin: 0; padding: 0 22px 20px; color: var(--muted); font-size: 16px; line-height: 1.85; }

/* blog index: the same horizontal strip as the home page (cards assemble as they scroll in) */
.car-bar { display: flex; align-items: center; gap: 16px; margin-bottom: 22px; }
.car-label { font-size: 14px; color: var(--dim); }
.blog-index { padding-bottom: clamp(56px, 7vw, 96px); }

/* footer newsletter sign-up (assets/js/subscribe.js) */
.site-footer .nl-wrap { display: block; padding-bottom: 28px; margin-bottom: 28px; border-bottom: 1px solid var(--line); }
.nl-form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 10px 32px; align-items: center; }
.nl-title { font-weight: 700; color: var(--text); margin: 0 0 4px; }
.nl-lead { font-size: 14px; color: var(--muted); margin: 0; }
.nl-row { display: flex; gap: 8px; }
.nl-row input[type="email"] { flex: 1; min-width: 0; height: 44px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--bg-2); color: var(--text); font: inherit; }
.nl-row input[type="email"]:focus-visible { outline: 2px solid var(--green); outline-offset: 1px; }
.nl-msg { grid-column: 2; font-size: 13px; color: var(--muted); margin: 0; }
.nl-msg.ok { color: var(--green); } .nl-msg.err { color: #F87171; }
@media (max-width: 760px) { .nl-form { grid-template-columns: 1fr; } .nl-msg { grid-column: 1; } }
