/* ==========================================================================
   Ahmed Bawazir — portfolio
   Tokens → base → layout → components → sections → motion
   ========================================================================== */

:root {
  --bg: #f3f1ec;
  --bg-2: #ebe8e1;
  --surface: #fbfaf7;
  --surface-2: #f0ede6;
  --ink: #050505;
  --ink-2: #262626;
  --muted: #5e5e63;
  --line: rgba(0, 0, 0, .12);
  --line-strong: rgba(0, 0, 0, .22);
  --accent: #ff5a1f;
  --accent-ink: #b93d0b; /* accent for text: 4.5:1 on the light page */
  --accent-soft: rgba(255, 90, 31, .12);
  --on-accent: #fff;
  --ok: #188a5c;
  --ok-soft: rgba(24, 138, 92, .12);
  --bad: #cf3434;
  --bad-soft: rgba(207, 52, 52, .1);
  --shadow: 0 1px 2px rgba(0, 0, 0, .05), 0 12px 32px -12px rgba(0, 0, 0, .18);
  --grid: rgba(0, 0, 0, .06);

  --font-display: "Plus Jakarta Sans", "IBM Plex Sans Arabic", system-ui, sans-serif;
  --font-sans: "Inter", "IBM Plex Sans Arabic", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: var(--font-sans);
  --font-code: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --radius: 18px;
  --radius-sm: 10px;
  --gutter: clamp(16px, 4vw, 40px);
  --max: 1200px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --bar-h: 0px; /* the bottom status bar is hidden */
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #000000; --bg-2: #060606; --surface: #0c0c0c; --surface-2: #151515;
    --ink: #f2f2f2; --ink-2: #cfcfcf; --muted: #8e8e93;
    --line: rgba(255, 255, 255, .09); --line-strong: rgba(255, 255, 255, .19);
    --accent: #ff6a2f; --accent-ink: #ff6a2f; --accent-soft: rgba(255, 106, 47, .14); --on-accent: #120a06;
    --ok: #3ddc97; --ok-soft: rgba(61, 220, 151, .12); --bad: #ff6b6b; --bad-soft: rgba(255, 107, 107, .12);
    --shadow: 0 1px 2px rgba(0, 0, 0, .6), 0 18px 40px -16px rgba(0, 0, 0, .9);
    --grid: rgba(255, 255, 255, .055);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #000000; --bg-2: #060606; --surface: #0c0c0c; --surface-2: #151515;
  --ink: #f2f2f2; --ink-2: #cfcfcf; --muted: #8e8e93;
  --line: rgba(255, 255, 255, .09); --line-strong: rgba(255, 255, 255, .19);
  --accent: #ff6a2f; --accent-ink: #ff6a2f; --accent-soft: rgba(255, 106, 47, .14); --on-accent: #120a06;
  --ok: #3ddc97; --ok-soft: rgba(61, 220, 151, .12); --bad: #ff6b6b; --bad-soft: rgba(255, 107, 107, .12);
  --shadow: 0 1px 2px rgba(0, 0, 0, .6), 0 18px 40px -16px rgba(0, 0, 0, .9);
  --grid: rgba(255, 255, 255, .055);
  color-scheme: dark;
}

:root[lang="ar"] {
  --font-display: "IBM Plex Sans Arabic", "Plus Jakarta Sans", system-ui, sans-serif;
  --font-sans: "IBM Plex Sans Arabic", "Inter", system-ui, sans-serif;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
html { background: var(--bg); }
body {
  margin: 0;
  background: transparent;
  color: var(--ink);
  font: 400 16px/1.6 var(--font-sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  padding-bottom: var(--bar-h);
  transition: background-color .4s var(--ease), color .4s var(--ease);
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.05; margin: 0; letter-spacing: -.02em; text-wrap: balance; }
p, li { text-wrap: pretty; }
:root[lang="ar"] h1, :root[lang="ar"] h2, :root[lang="ar"] h3 { letter-spacing: 0; line-height: 1.25; }
p { margin: 0; }
.mono { font-family: var(--font-mono); letter-spacing: 0; }
:root[lang="ar"] .mono { font-family: var(--font-sans); }
::selection { background: var(--accent); color: var(--on-accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.skip { position: fixed; inset-inline-start: 16px; top: -60px; z-index: 100; background: var(--ink); color: var(--bg); padding: 10px 14px; border-radius: 8px; text-decoration: none; }
.skip:focus { top: 12px; }

.container { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* ---------- Buttons ---------- */
.btn {
  --h: 48px;
  display: inline-flex; align-items: center; gap: 10px;
  height: var(--h); padding-inline: 22px;
  border-radius: 999px; border: 1px solid transparent;
  font-weight: 600; font-size: 15px; text-decoration: none; white-space: nowrap;
  transition: transform .35s var(--ease), background-color .25s, border-color .25s, color .25s;
  transform: translate(var(--mx, 0px), var(--my, 0px));
  position: relative; overflow: hidden; isolation: isolate;
}
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .3s var(--ease); }
[dir="rtl"] .btn svg { transform: scaleX(-1); }
.btn:hover svg { transform: translate(2px, -2px); }
[dir="rtl"] .btn:hover svg { transform: scaleX(-1) translate(2px, -2px); }
.btn:active { transform: translate(var(--mx, 0px), var(--my, 0px)) scale(.96); }
.btn-solid { background: var(--ink); color: var(--bg); }
.btn-solid:hover { background: var(--accent); color: var(--on-accent); }
.btn-ghost { border-color: var(--line-strong); background: transparent; }
.btn-ghost:hover { border-color: var(--ink); }
.btn-sm { --h: 38px; padding-inline: 16px; font-size: 14px; }

.icon-btn {
  transform: translate(var(--mx, 0px), var(--my, 0px));
  width: 38px; height: 38px; display: grid; place-items: center;
  border-radius: 999px; border: 1px solid var(--line-strong); background: transparent;
  transition: border-color .2s, background-color .2s, transform .35s var(--ease);
}
.icon-btn:hover { border-color: var(--ink); }
.icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.lang-label { font-family: "IBM Plex Sans Arabic", var(--font-sans); font-weight: 700; font-size: 15px; line-height: 1; }
:root[lang="ar"] .lang-label { font-family: var(--font-sans); }
.i-moon { display: none; }
:root[data-theme="dark"] .i-sun { display: none; }
:root[data-theme="dark"] .i-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .i-sun { display: none; }
  :root:not([data-theme="light"]) .i-moon { display: block; }
}

/* ---------- Top bar ---------- */
.topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 40;
  display: flex; align-items: center; gap: 16px;
  height: 68px; padding-inline: var(--gutter);
  transition: background-color .3s, border-color .3s, transform .4s var(--ease);
  border-bottom: 1px solid transparent;
}
.topbar.is-scrolled {
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4);
  border-bottom-color: var(--line);
}
.logo { display: inline-flex; align-items: flex-end; gap: 3px; text-decoration: none; transform: translate(var(--mx, 0px), var(--my, 0px)); transition: transform .35s var(--ease); }
.logo-mark { font: 700 24px/1 var(--font-display); letter-spacing: -.02em; font-family: "Plus Jakarta Sans", sans-serif; }
.logo-dot { width: 8px; height: 8px; border-radius: 2px; background: var(--accent); margin-bottom: 4px; transition: transform .4s var(--ease); }
.logo:hover .logo-dot { transform: rotate(45deg) scale(1.2); }
.toplinks { display: flex; gap: 4px; margin-inline: auto; }
.toplinks a {
  text-decoration: none; font-size: 14px; font-weight: 500; color: var(--muted);
  padding: 8px 12px; border-radius: 999px; transition: color .2s, background-color .2s;
}
.toplinks a:hover, .toplinks a.is-active { color: var(--ink); background: var(--surface-2); }
.top-actions { display: flex; align-items: center; gap: 8px; margin-inline-start: auto; }
.toplinks + .top-actions { margin-inline-start: 0; }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100svh;
  display: flex; align-items: center;
  padding-block: 110px 80px; overflow: hidden; isolation: isolate;
}
.hero-liquid { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; display: block; }
.hero-liquid.no-gl { background: radial-gradient(60% 70% at 75% 45%, color-mix(in srgb, var(--ink) 14%, transparent), transparent 70%); }
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.hero-inner { position: relative; pointer-events: none; }
.hero-inner a, .hero-inner button { pointer-events: auto; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 13px; color: var(--muted);
  padding: 7px 14px 7px 12px; border: 1px solid var(--line-strong); border-radius: 999px;
  background: color-mix(in srgb, var(--bg) 70%, transparent); backdrop-filter: blur(6px);
}
.pulse { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); flex: none; }
.pulse::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: inherit; animation: ping 2s var(--ease) infinite; }
@keyframes ping { 0% { transform: scale(1); opacity: .7; } 80%, 100% { transform: scale(3); opacity: 0; } }

.hero-title { margin-top: 28px; font-size: clamp(64px, 10.4vw, 160px); font-weight: 700; letter-spacing: -.055em; line-height: .86; }
:root[lang="ar"] .hero-title { letter-spacing: 0; line-height: 1.05; font-size: clamp(56px, 11vw, 150px); }
.hero-title .line { display: block; }
.hero-title .line-2 { padding-inline-start: clamp(0px, 4vw, 64px); }
.accent { color: var(--accent); }
.hero-role { margin-top: 26px; font-size: clamp(15px, 1.6vw, 19px); color: var(--ink-2); display: flex; align-items: center; gap: 8px; min-height: 1.6em; }
.prompt { color: var(--accent-ink); }
.caret { width: .55em; height: 1.15em; background: var(--accent); animation: blink 1.05s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.hero-lede { margin-top: 18px; max-width: 30ch; font-size: clamp(18px, 2vw, 22px); color: var(--muted); line-height: 1.5; }
.hero-ctas { margin-top: 34px; display: flex; flex-wrap: wrap; gap: 12px; }
.hero-hint { margin-top: 28px; font-size: 12px; color: var(--muted); opacity: .8; }
.scroll-cue {
  position: absolute; bottom: 28px; inset-inline-end: var(--gutter);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  font-size: 11px; text-decoration: none; color: var(--muted); letter-spacing: .2em; text-transform: uppercase;
}
.scroll-line { width: 1px; height: 54px; background: linear-gradient(var(--line-strong), transparent); position: relative; overflow: hidden; }
.scroll-line::after { content: ""; position: absolute; inset: 0; background: var(--accent); animation: drip 2.2s var(--ease) infinite; }
@keyframes drip { 0% { transform: translateY(-100%); } 100% { transform: translateY(100%); } }

/* Hero entrance */
.hero-inner > * { animation: rise .9s var(--ease) both; }
.hero-inner > :nth-child(2) { animation-delay: .08s; }
.hero-inner > :nth-child(3) { animation-delay: .18s; }
.hero-inner > :nth-child(4) { animation-delay: .26s; }
.hero-inner > :nth-child(5) { animation-delay: .34s; }
.hero-inner > :nth-child(6) { animation-delay: .42s; }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } }

/* ---------- Sections ---------- */
.section { padding-block: clamp(64px, 8vw, 110px); position: relative; }
.section-alt { background: var(--bg-2); }
.section-head { max-width: 720px; margin-bottom: clamp(40px, 6vw, 64px); }
.kicker { font-size: 12px; text-transform: uppercase; letter-spacing: .16em; color: var(--accent-ink); }
.section-head h2, .cred-grid h2 { margin-top: 14px; font-size: clamp(40px, 6.4vw, 80px); font-weight: 700; letter-spacing: -.045em; }
:root[lang="ar"] .section-head h2, :root[lang="ar"] .cred-grid h2 { letter-spacing: 0; }
.section-sub { margin-top: 16px; font-size: 18px; color: var(--muted); max-width: 56ch; }

/* ---------- Statement ---------- */
.statement { padding-block: clamp(90px, 14vw, 180px) clamp(60px, 8vw, 110px); }
.statement-text {
  margin-top: 22px;
  font: 600 clamp(28px, 4.6vw, 58px)/1.14 var(--font-display); letter-spacing: -.03em; max-width: 22ch;
}
:root[lang="ar"] .statement-text { letter-spacing: 0; line-height: 1.45; max-width: 26ch; }
.statement-text .w { color: var(--ink); opacity: .16; transition: opacity .2s ease, color .35s ease; }
.statement-text .w.on { opacity: 1; }
[data-split]:not(.statement-text) .w { opacity: .16; transition: opacity .25s ease; }
[data-split]:not(.statement-text) .w.on { opacity: 1; }
.statement-text .w.hl.on { color: var(--accent-ink); }
.stat { display: flex; flex-direction: column; gap: 6px; }
.stat-value { font: 700 clamp(40px, 5vw, 64px)/1 var(--font-display); letter-spacing: -.04em; font-variant-numeric: tabular-nums; font-family: "Plus Jakarta Sans", sans-serif; }
.stat-label { font-size: 14px; color: var(--muted); }

/* ---------- Git log ---------- */
.gitcmd { margin-top: 22px; font-size: 13px; color: var(--muted); }
.gitlog { list-style: none; margin: 0; padding: 0; position: relative; }
.gitlog::before {
  content: ""; position: absolute; top: 28px; bottom: 60px; inset-inline-start: 13px; width: 2px;
  background: linear-gradient(var(--accent), var(--line-strong));
  transform-origin: top; transform: scaleY(var(--draw, 0)); transition: transform .1s linear;
}
.commit { display: grid; grid-template-columns: 28px 1fr; gap: clamp(16px, 3vw, 34px); }
.commit + .commit { margin-top: 22px; }
.commit-graph { position: relative; }
.commit-dot {
  position: absolute; top: 26px; inset-inline-start: 5px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--bg); border: 3px solid var(--accent); box-shadow: 0 0 0 6px var(--bg);
}
.commit-dot--root { border-color: var(--muted); }
.commit-body { padding: clamp(22px, 3vw, 32px); transition: transform .35s var(--ease), border-color .35s; }
.commit-body:hover { transform: translateY(-3px); border-color: var(--line-strong); }
.commit-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 12.5px; color: var(--muted); }
.hash { color: var(--accent-ink); }
.ref { padding: 2px 9px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-ink); }
.ref-muted { background: var(--surface-2); color: var(--ink-2); }
.date { margin-inline-start: auto; }
.commit-body h3 { margin-top: 14px; font-size: clamp(21px, 2.4vw, 28px); font-weight: 600; line-height: 1.2; }
.type { font-size: .62em; color: var(--muted); vertical-align: .18em; margin-inline-end: 4px; font-weight: 500; }
.at { color: var(--muted); font-weight: 500; }
.commit-place { margin-top: 6px; color: var(--muted); font-size: 14.5px; }
.commit-list { margin: 18px 0 0; padding-inline-start: 18px; display: grid; gap: 8px; color: var(--ink-2); }
.commit-list li::marker { color: var(--accent-ink); }
.diffstat { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 8px; font-size: 12px; }
.plus, .minus { padding: 3px 9px; border-radius: 6px; }
.plus { color: var(--ok); background: var(--ok-soft); }
.minus { color: var(--bad); background: var(--bad-soft); }

/* ---------- Projects ---------- */
.projects { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.project { overflow: hidden; display: flex; flex-direction: column; transition: transform .4s var(--ease), border-color .3s; }
.project:hover { --lift: -6px; border-color: var(--line-strong); }
.project-visual {
  aspect-ratio: 16 / 11; background: var(--surface-2); border-bottom: 1px solid var(--line);
  display: grid; place-items: center; position: relative; overflow: hidden;
}
.project-body { padding: 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.project-tags { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.project-body h3 { font-size: 26px; font-weight: 600; display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.project-body > p:not(.project-tags) { color: var(--muted); font-size: 15px; }
.badge { font: 500 11px/1 var(--font-mono); padding: 5px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-ink); letter-spacing: 0; }
.link { margin-top: auto; padding-top: 8px; font-weight: 600; font-size: 15px; text-decoration: none; display: inline-flex; gap: 6px; width: fit-content; background: linear-gradient(currentColor, currentColor) 0 100% / 0 1.5px no-repeat; transition: background-size .35s var(--ease); }
.link:hover { background-size: 100% 1.5px; }
.link-muted { color: var(--muted); font-weight: 500; }

/* ---------- Playground ---------- */
.play-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.play { padding: clamp(22px, 3vw, 30px); display: flex; flex-direction: column; gap: 16px; }
.play-grid { align-items: start; }
.play--rules { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1.1fr; gap: 16px 32px; align-items: start; }
.play--rules .play-head, .play--rules .play-desc, .play--rules .rule-form { grid-column: 1; }
.play--rules .tests { grid-column: 2; grid-row: 1 / span 3; }
.play--rules .rule-form { grid-template-columns: 1fr; }
.play-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.play-head h3 { font-size: 24px; font-weight: 600; }
.play-desc { color: var(--muted); font-size: 15px; }
.chip { font-size: 11px; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--muted); white-space: nowrap; }

/* Bug hunt */
.bug-score { font-size: 14px; padding: 6px 12px; border-radius: 999px; background: var(--bad-soft); color: var(--bad); transition: background-color .3s, color .3s; white-space: nowrap; }
.bug-score.done { background: var(--ok-soft); color: var(--ok); }
.checkout { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 18px; background: var(--bg); display: grid; gap: 14px; direction: ltr; }
.co-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.co-event { font-weight: 600; }
.co-price { color: var(--muted); font-size: 14px; }
.bug-target { background: none; border: 0; padding: 0; text-align: start; border-radius: 4px; position: relative; }
.co-date { color: var(--muted); font-size: 13.5px; }
.bug-target:not(.btn):hover { background: var(--accent-soft); outline: 1px dashed var(--accent); outline-offset: 3px; }
.bug-target.is-found { outline: 2px solid var(--bad) !important; outline-offset: 3px; }
.bug-target.is-found::after {
  content: "BUG"; position: absolute; top: -10px; inset-inline-end: -10px;
  font: 700 9px/1 var(--font-mono); background: var(--bad); color: #fff; padding: 3px 5px; border-radius: 4px;
}
.stepper { display: flex; align-items: center; gap: 4px; border: 1px solid var(--line-strong); border-radius: 999px; padding: 3px; }
.step { width: 30px; height: 30px; border-radius: 50%; border: 0; background: var(--surface-2); font-size: 16px; }
.step:hover { background: var(--accent-soft); color: var(--accent-ink); }
.qty { min-width: 30px; text-align: center; font-size: 15px; }
.qty.is-found { color: var(--bad); font-weight: 700; }
.co-total { border-top: 1px dashed var(--line-strong); padding-top: 14px; font-weight: 600; }
.total { font-size: 17px; font-weight: 600; }
.co-cta.bug-target { width: 100%; justify-content: center; text-align: center; background: var(--ink); color: var(--bg); }
.co-cta.bug-target:hover { background: var(--accent); color: var(--on-accent); }
.co-cta.is-found::after { top: -8px; inset-inline-end: 12px; }
.bug-reports { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.bug-reports li {
  border: 1px solid var(--line); border-inline-start: 3px solid var(--bad); border-radius: 10px; padding: 12px 14px; background: var(--bg);
  font-size: 13.5px; animation: slidein .45s var(--ease) both;
}
.bug-reports li.ok { border-inline-start-color: var(--ok); }
.bug-reports .br-title { font-weight: 600; display: flex; gap: 8px; align-items: baseline; }
.bug-reports .br-id { font: 500 11px var(--font-mono); color: var(--bad); }
.bug-reports li.ok .br-id { color: var(--ok); }
.bug-reports .br-body { color: var(--muted); margin-top: 4px; }
@keyframes slidein { from { opacity: 0; transform: translateY(-8px); } }

/* Accrual */
.controls { display: grid; gap: 12px; }
.controls label { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 12px; font-size: 14px; }
.controls output { font-size: 13px; color: var(--accent-ink); }
.controls input { grid-column: 1 / -1; }
input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 22px; background: transparent; }
input[type="range"]::-webkit-slider-runnable-track { height: 4px; border-radius: 4px; background: linear-gradient(90deg, var(--accent) var(--p, 50%), var(--line-strong) var(--p, 50%)); }
[dir="rtl"] input[type="range"]::-webkit-slider-runnable-track { background: linear-gradient(-90deg, var(--accent) var(--p, 50%), var(--line-strong) var(--p, 50%)); }
input[type="range"]::-moz-range-track { height: 4px; border-radius: 4px; background: var(--line-strong); }
input[type="range"]::-moz-range-progress { height: 4px; border-radius: 4px; background: var(--accent); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; margin-top: -7px; border-radius: 50%; background: var(--surface); border: 2px solid var(--accent); box-shadow: 0 2px 6px rgba(0,0,0,.2); }
input[type="range"]::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--surface); border: 2px solid var(--accent); }
.chart { width: 100%; height: auto; overflow: visible; direction: ltr; }
.chart .bar { fill: var(--ink); opacity: .85; transition: height .35s var(--ease), y .35s var(--ease); }
.chart .bar.y2 { fill: var(--accent); opacity: .9; }
.chart .lost { fill: var(--bad); opacity: .55; transition: height .35s var(--ease), y .35s var(--ease); }
.chart .cap { stroke: var(--bad); stroke-dasharray: 4 4; stroke-width: 1.2; transition: transform .35s var(--ease); }
.chart .axis { stroke: var(--line-strong); }
.chart text { font: 9px var(--font-mono); fill: var(--muted); }
.acc-summary { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; font-size: 12.5px; color: var(--muted); }
.acc-summary strong { color: var(--ink); font-size: 14px; margin-inline-start: 6px; }
.acc-lost { color: var(--bad) !important; }

/* Rules */
.rule-form { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.rule-form label { display: grid; gap: 6px; font-size: 12.5px; color: var(--muted); min-width: 0; }
.rule-form input {
  width: 100%; min-width: 0; height: 40px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line-strong);
  background: var(--bg); color: var(--ink); font: 14px var(--font-mono);
}
.rule-form input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.rule-form input.bad { border-color: var(--bad); }
.tests { list-style: none; margin: 0; padding: 14px; border-radius: 10px; background: #000000; color: #c9cdd6; font-size: 12.5px; display: grid; gap: 6px; direction: ltr; text-align: left; }
.tests li { display: flex; gap: 10px; }
.tests .st { width: 42px; flex: none; font-weight: 600; }
.tests .pass .st { color: #3ddc97; }
.tests .fail .st { color: #ff6b6b; }
.tests .sum { border-top: 1px solid rgba(255,255,255,.1); padding-top: 8px; margin-top: 2px; color: #9198a8; }

/* ---------- Skills ---------- */
.skill-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.tab { border: 1px solid var(--line-strong); background: transparent; padding: 9px 16px; border-radius: 999px; font-size: 14px; font-weight: 500; transition: all .25s var(--ease); }
.tab:hover { border-color: var(--ink); }
.tab.is-on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.skills { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 0; border-top: 1px solid var(--line); }
.skill-group { padding: 22px 20px 22px 0; border-bottom: 1px solid var(--line); transition: opacity .35s var(--ease), filter .35s var(--ease); }
[dir="rtl"] .skill-group { padding: 22px 0 22px 20px; }
.skill-group h3 { font-size: 13px; font-family: var(--font-mono); font-weight: 500; text-transform: uppercase; letter-spacing: .1em; color: var(--accent-ink); }
:root[lang="ar"] .skill-group h3 { font-family: var(--font-sans); letter-spacing: 0; font-size: 15px; font-weight: 700; }
.skill-group p { margin-top: 8px; font-size: 17px; line-height: 1.55; }
.skill-group.dim { opacity: .18; filter: grayscale(1); }
.marquee { margin-top: clamp(60px, 8vw, 100px); overflow: hidden; border-block: 1px solid var(--line); padding-block: 18px; direction: ltr; mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee-track { display: flex; width: max-content; gap: 48px; font-size: clamp(22px, 3vw, 34px); color: var(--muted); animation: marquee 40s linear infinite; will-change: transform; }
.marquee-track span::before { content: "✦"; color: var(--accent-ink); margin-right: 48px; font-size: .6em; vertical-align: .25em; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Journey ---------- */
.map { padding: clamp(12px, 2vw, 24px); overflow: hidden; max-width: 900px; }
.map svg { width: 100%; height: auto; direction: ltr; }
.map-dot { fill: var(--line-strong); }
.route { fill: none; stroke: var(--accent); stroke-width: 2; stroke-dasharray: 700; stroke-dashoffset: 700; transition: stroke-dashoffset 2s var(--ease); }
.route-2 { stroke-dasharray: 100; stroke-dashoffset: 100; transition-delay: 1.8s; transition-duration: .8s; }
.in .route { stroke-dashoffset: 0; }
.city circle { fill: var(--ink); }
.city--home circle { fill: var(--accent); }
.city .halo { fill: none; stroke: var(--accent); stroke-width: 2; transform-box: fill-box; transform-origin: center; animation: halo 2.4s var(--ease) infinite; }
.city text { font: 600 14px var(--font-sans); fill: var(--ink); text-anchor: middle; }
.city text.yr { font: 400 11px var(--font-mono); fill: var(--muted); }
.city:nth-of-type(2) text { text-anchor: start; }
@keyframes halo { 0% { transform: scale(1); opacity: .8; } 100% { transform: scale(3.2); opacity: 0; } }

/* ---------- Credentials ---------- */
.cred-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 28px 60px; }
.certs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; grid-row: span 2; }
.certs li { padding: 18px 20px; font-weight: 500; display: grid; gap: 6px; }
.certs li:hover { --lift: -3px; }
.cert-org { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }
.langs { display: grid; gap: 14px; align-self: end; }
.lang-row { display: grid; grid-template-columns: 90px 1fr auto; align-items: center; gap: 14px; font-size: 13px; }
.lang-name { font-size: 17px; font-weight: 600; }
.meter { height: 6px; border-radius: 6px; background: var(--surface-2); overflow: hidden; }
.meter i { display: block; height: 100%; width: var(--w); background: var(--accent); border-radius: inherit; transform-origin: left; transform: scaleX(0); transition: transform 1.2s var(--ease) .2s; }
[dir="rtl"] .meter i { transform-origin: right; }
.in .meter i { transform: scaleX(1); }

/* ---------- Contact ---------- */
.contact { background: var(--ink); color: var(--bg); padding-top: clamp(90px, 13vw, 160px); position: relative; overflow: hidden; }
.contact .kicker { color: var(--accent-ink); }
.contact-title { margin-top: 18px; font-size: clamp(44px, 8vw, 120px); font-weight: 700; letter-spacing: -.05em; line-height: .95; max-width: 14ch; }
:root[lang="ar"] .contact-title { letter-spacing: 0; line-height: 1.2; }
.contact-sub { margin-top: 24px; font-size: 18px; max-width: 52ch; opacity: .7; }
.contact-actions { margin-top: 44px; display: grid; gap: 24px; }
.email-btn {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 20px;
  background: none; border: 0; border-bottom: 1px solid color-mix(in srgb, var(--bg) 25%, transparent);
  padding: 0 0 18px; text-align: start; color: inherit;
}
.email { font-size: clamp(20px, 3.8vw, 48px); word-break: break-all; transition: color .25s; }
.email-btn:hover .email { color: var(--accent-ink); }
.copy-state { font-size: 12px; opacity: .6; text-transform: uppercase; letter-spacing: .12em; }
.contact-links { display: flex; flex-wrap: wrap; gap: 10px; }
.contact .btn-solid { background: var(--accent); color: var(--on-accent); }
.contact .btn-solid:hover { background: var(--bg); color: var(--ink); }
.contact .btn-ghost { border-color: color-mix(in srgb, var(--bg) 30%, transparent); color: var(--bg); }
.contact .btn-ghost:hover { border-color: var(--bg); }
.footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: clamp(80px, 12vw, 140px); padding-block: 28px; border-top: 1px solid color-mix(in srgb, var(--bg) 15%, transparent); font-size: 12px; opacity: .65; }
.footer a { text-decoration: none; }
.footer a:hover { color: var(--accent-ink); }

/* ---------- Status bar ---------- */
.statusbar {
  position: fixed; inset: auto 0 0 0; z-index: 45; height: var(--bar-h);
  display: flex; align-items: stretch; font-size: 12px; direction: ltr;
  background: var(--surface); border-top: 1px solid var(--line); color: var(--muted);
}
.sb-item { display: inline-flex; align-items: center; gap: 7px; padding-inline: 12px; white-space: nowrap; }
.sb-item svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.sb-branch { background: var(--accent); color: var(--on-accent); }
.sb-ok .pulse { width: 6px; height: 6px; }
.sb-file { color: var(--ink); }
.sb-spacer { flex: 1; }
.sb-btn { border: 0; background: transparent; color: inherit; font: inherit; }
.sb-btn:hover { background: var(--surface-2); color: var(--ink); }
kbd { font: inherit; font-size: 11px; padding: 1px 6px; border-radius: 4px; border: 1px solid var(--line-strong); }
.sb-progress { position: absolute; top: -1px; inset-inline-start: 0; height: 2px; width: 100%; background: var(--accent); transform-origin: left; transform: scaleX(var(--p, 0)); }

/* ---------- Palette ---------- */
.palette {
  width: min(560px, calc(100vw - 32px)); max-width: none; max-height: none; margin: 14vh auto auto; padding: 0;
  border: 1px solid var(--line-strong); border-radius: 16px; background: var(--surface); color: var(--ink);
  box-shadow: 0 30px 80px -20px rgba(0,0,0,.5); overflow: hidden;
  opacity: 1; transform: none;
  transition: opacity .22s ease, transform .28s var(--ease), overlay .28s allow-discrete, display .28s allow-discrete;
}
.palette:not([open]) { opacity: 0; transform: translateY(-10px) scale(.98); }
@starting-style { .palette[open] { opacity: 0; transform: translateY(-12px) scale(.97); } }
.palette::backdrop { background: rgba(5, 6, 10, .45); backdrop-filter: blur(4px); opacity: 1; transition: opacity .25s ease, overlay .25s allow-discrete, display .25s allow-discrete; }
.palette:not([open])::backdrop { opacity: 0; }
@starting-style { .palette[open]::backdrop { opacity: 0; } }
.palette-box { position: relative; }
.palette-input { width: 100%; height: 58px; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--ink); padding: 0 20px; font-size: 16px; outline: none; }
.palette-list { list-style: none; margin: 0; padding: 8px; max-height: 50vh; overflow: auto; }
.palette-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 12px; border-radius: 9px; cursor: pointer; font-size: 15px; }
.palette-list li .hint { font: 11px var(--font-mono); color: var(--muted); }
.palette-list li[aria-selected="true"] { background: var(--accent-soft); color: var(--accent-ink); }
.palette-list li.empty { color: var(--muted); cursor: default; }
.palette-foot { display: flex; gap: 18px; padding: 10px 18px; border-top: 1px solid var(--line); font-size: 11px; color: var(--muted); }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(-10px) scale(.98); } }

/* ---------- Toast ---------- */
.toast {
  position: fixed; bottom: calc(var(--bar-h) + 18px); left: 50%; z-index: 90;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 999px; font-size: 13px;
  transition: opacity .3s, transform .3s var(--ease); max-width: calc(100vw - 32px); text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; translate: 0 28px; transition: opacity .9s var(--ease), translate .9s var(--ease), transform .5s var(--ease), border-color .3s; }
.reveal.in { opacity: 1; translate: none; }
.commit.reveal { translate: -48px 0; }
[dir="rtl"] .commit.reveal { translate: 48px 0; }
.commit.reveal.in { translate: none; }
.no-js .reveal { opacity: 1; translate: none; }

/* ---------- Responsive ---------- */

/* ==========================================================================
   Motion layer
   ========================================================================== */

/* Heading word reveal */
.wr { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .08em; margin-bottom: -.08em; }
.wr > span { display: inline-block; transform: translateY(105%) rotate(4deg); transform-origin: 0 100%; transition: transform 1s var(--ease); transition-delay: calc(var(--i) * 55ms); }
[data-words].in .wr > span { transform: none; }
:root[lang="ar"] .wr { padding-bottom: .25em; margin-bottom: -.25em; }

/* Hero letters */
.hero-title .ch { display: inline-block; animation: chIn 1s var(--ease) both; animation-delay: calc(var(--i) * 38ms + .15s); transition: transform .45s var(--ease), color .3s; white-space: pre; }
.hero-title .ch.accent { animation-name: chDot; }
@keyframes chIn { from { opacity: 0; transform: translateY(.5em) rotate(8deg); filter: blur(8px); } }
@keyframes chDot { 0% { opacity: 0; transform: translateY(-1.2em); } 60% { opacity: 1; transform: translateY(.06em); } 80% { transform: translateY(-.08em); } }
.hero-inner { will-change: transform, opacity; }
.hero-title .ch { pointer-events: auto; }

/* Hero spotlight */
.hero-spot {
  position: absolute; inset: 0; z-index: -2; pointer-events: none; opacity: 0; transition: opacity .5s;
  background:
    radial-gradient(520px circle at var(--sx, 70%) var(--sy, 40%), var(--accent-soft), transparent 60%);
}
.hero-spot::after {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(color-mix(in srgb, var(--accent) 35%, transparent) 1px, transparent 1px), linear-gradient(90deg, color-mix(in srgb, var(--accent) 35%, transparent) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(220px circle at var(--sx, 70%) var(--sy, 40%), #000, transparent 70%);
  -webkit-mask-image: radial-gradient(220px circle at var(--sx, 70%) var(--sy, 40%), #000, transparent 70%);
}
.hero.lit .hero-spot { opacity: 1; }

/* Tilt cards */
[data-tilt] {
  position: relative;
  transform: perspective(1000px) rotateX(var(--tx, 0deg)) rotateY(var(--ty, 0deg)) translateY(var(--lift, 0px));
  transition: transform .6s var(--ease), border-color .3s, opacity .9s var(--ease), translate .9s var(--ease);
  transform-style: preserve-3d;
}
[data-tilt].tilting { transition: transform .12s linear, border-color .3s, opacity .9s var(--ease), translate .9s var(--ease); }
[data-tilt]::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 2;
  background: radial-gradient(360px circle at var(--gx, 50%) var(--gy, 50%), rgba(255, 255, 255, .22), transparent 45%);
  opacity: 0; transition: opacity .35s; mix-blend-mode: soft-light;
}
[data-tilt]:hover::after { opacity: 1; }
.project-visual > * { translate: calc(var(--px, 0) * 18px) calc(var(--py, 0) * 14px); transition: translate .5s var(--ease), transform .6s var(--ease); }
.project.tilting .project-visual > * { transition: translate .12s linear, transform .6s var(--ease); }

/* Ripple */
.ripple { position: absolute; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: currentColor; opacity: .3; pointer-events: none; z-index: -1; animation: ripple .7s var(--ease) forwards; }
@keyframes ripple { to { transform: scale(40); opacity: 0; } }
.tab { position: relative; overflow: hidden; }

/* Custom cursor */
.cursor { position: fixed; inset: 0; pointer-events: none; z-index: 120; opacity: 0; transition: opacity .3s; }
.cursor.on { opacity: 1; }
.cursor-dot, .cursor-ring { position: absolute; top: 0; left: 0; border-radius: 50%; }
.cursor-dot { width: 6px; height: 6px; background: var(--accent); transform: translate(calc(var(--x) - 3px), calc(var(--y) - 3px)); }
.cursor-ring {
  width: 36px; height: 36px; margin: -18px 0 0 -18px; border: 1.5px solid var(--ink);
  transform: translate(var(--rx), var(--ry)) scale(var(--s, 1)); opacity: .45;
  transition: width .35s var(--ease), height .35s var(--ease), margin .35s var(--ease), background-color .3s, border-color .3s, opacity .3s, border-radius .3s;
  display: grid; place-items: center;
}
.cursor.link .cursor-ring { width: 60px; height: 60px; margin: -30px 0 0 -30px; background: var(--accent-soft); border-color: var(--accent); opacity: 1; }
.cursor.labeled .cursor-ring { width: 76px; height: 76px; margin: -38px 0 0 -38px; background: var(--accent); border-color: var(--accent); opacity: 1; }
.cursor.labeled .cursor-dot { opacity: 0; }
.cursor.text .cursor-ring { width: 3px; height: 26px; margin: -13px 0 0 -1.5px; border-radius: 2px; background: var(--accent); border-color: transparent; opacity: 1; }
.cursor.text .cursor-dot { opacity: 0; }
.cursor.down .cursor-ring { --s: .8; }
.cursor-label { font: 600 11px/1 var(--font-mono); color: var(--on-accent); opacity: 0; transition: opacity .2s; white-space: nowrap; }
.cursor.labeled .cursor-label { opacity: 1; }
:root[lang="ar"] .cursor-label { font-family: var(--font-sans); font-size: 12px; }
.has-cursor body, .has-cursor a, .has-cursor button, .has-cursor label, .has-cursor [data-tilt] { cursor: none; }
.has-cursor input:not([type=range]) { cursor: none; }

/* Confetti */
.confetti { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 110; display: none; }
.confetti.on { display: block; }

/* Pinned horizontal projects (desktop) */
.project-end { display: none; }
.pin-progress { display: none; }
.pin-on .projects-section { padding-block: 0; }
.pin-on .pin-sticky { position: sticky; top: 0; height: 100vh; overflow: hidden; display: flex; align-items: center; }
.pin-on .pin-track {
  max-width: none; width: max-content; display: flex; align-items: center; gap: clamp(32px, 4vw, 64px);
  padding-inline: max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter))) clamp(60px, 10vw, 160px);
  will-change: transform;
}
.pin-on .project-intro { width: clamp(320px, 30vw, 460px); flex: none; margin: 0; }
.pin-on .projects { display: flex; gap: 24px; align-items: flex-start; }
.pin-on .project { width: clamp(340px, 29vw, 430px); flex: none; }
.pin-on .project:nth-child(2) { margin-top: 70px; }
.pin-on .project:nth-child(3) { margin-top: -50px; }
.pin-on .project-end {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  width: 260px; flex: none; text-decoration: none; font: 600 22px/1.2 var(--font-display); text-align: center;
}
.project-end-ring {
  width: 150px; height: 150px; border-radius: 50%; border: 1.5px solid var(--line-strong);
  display: grid; place-items: center; font-size: 46px; transform: translate(var(--mx, 0px), var(--my, 0px));
  transition: background-color .35s, color .35s, border-color .35s, transform .35s var(--ease);
}
.project-end:hover .project-end-ring { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.pin-on .pin-progress {
  display: block; position: absolute; bottom: calc(var(--bar-h) + 30px); left: 50%; translate: -50% 0;
  width: min(240px, 40vw); height: 2px; border-radius: 2px; background: var(--line-strong); overflow: hidden;
}
.pin-progress i { display: block; height: 100%; background: var(--accent); transform-origin: left; transform: scaleX(var(--pp, 0)); }
[dir="rtl"] .pin-progress i { transform-origin: right; }

/* Staggered skills + certs */
.skills .skill-group { opacity: 0; translate: 0 18px; transition: opacity .7s var(--ease), translate .7s var(--ease), filter .35s; }
.skills.in .skill-group { opacity: 1; translate: none; }
.skills.in .skill-group.dim { opacity: .18; }
.skills .skill-group:nth-child(2) { transition-delay: .06s; } .skills .skill-group:nth-child(3) { transition-delay: .12s; }
.skills .skill-group:nth-child(4) { transition-delay: .18s; } .skills .skill-group:nth-child(5) { transition-delay: .24s; }
.skills .skill-group:nth-child(6) { transition-delay: .3s; }  .skills .skill-group:nth-child(7) { transition-delay: .36s; }
.skill-group:hover h3 { letter-spacing: .16em; }
.skill-group h3 { transition: letter-spacing .4s var(--ease); }
.certs li { opacity: 0; translate: 0 20px; }
.certs.in li { opacity: 1; translate: none; }
.certs.in li:nth-child(2) { transition-delay: .07s; } .certs.in li:nth-child(3) { transition-delay: .14s; }
.certs.in li:nth-child(4) { transition-delay: .21s; } .certs.in li:nth-child(5) { transition-delay: .28s; }

/* Stats pop */
.stat-value { display: inline-block; transition: transform .4s var(--ease), color .3s; }
.stat:hover .stat-value { transform: translateY(-4px) scale(1.04); color: var(--accent-ink); }

/* Kicker line */
.kicker { display: inline-flex; align-items: center; gap: 10px; }
.kicker::before { content: ""; width: 26px; height: 1.5px; background: currentColor; transform-origin: left; animation: line 1s var(--ease) both; }
[dir="rtl"] .kicker::before { transform-origin: right; }
@keyframes line { from { transform: scaleX(0); } }

/* Terminal */
.term {
  position: relative; border-radius: var(--radius); overflow: hidden; background: #000000; color: #d7dae2;
  border: 1px solid rgba(255,255,255,.08); box-shadow: 0 30px 80px -30px rgba(0,0,0,.55); direction: ltr; text-align: left;
}
.term-bar { display: flex; align-items: center; gap: 8px; padding: 12px 16px; background: #0f0f0f; border-bottom: 1px solid rgba(255,255,255,.06); }
.tl { width: 12px; height: 12px; border-radius: 50%; }
.tl-r { background: #ff5f57; } .tl-y { background: #febc2e; } .tl-g { background: #28c840; }
.term-title { margin-inline: auto; font-size: 12px; color: #8a90a0; transform: translateX(-24px); }
.term-out { height: clamp(260px, 38vh, 360px); overflow-y: auto; padding: 18px 20px 4px; font-size: 13.5px; line-height: 1.7; white-space: pre-wrap; word-break: break-word; scrollbar-width: thin; }
.term-out p { animation: termIn .25s ease both; }
@keyframes termIn { from { opacity: 0; transform: translateY(4px); } }
.term-out a { color: #7cc4ff; text-decoration: underline; text-underline-offset: 3px; }
.t-hl { color: #fff; font-weight: 500; } .t-dim { color: #7d8496; } .t-ok { color: #3ddc97; } .t-acc { color: #ff8a5c; } .t-err { color: #ff6b6b; }
.term-line { display: flex; align-items: center; gap: 10px; padding: 8px 20px 18px; font-size: 13.5px; }
.term-ps { color: #ff8a5c; white-space: nowrap; }
.term-in { flex: 1; min-width: 0; background: transparent; border: 0; outline: none; color: #fff; font: inherit; caret-color: #ff8a5c; padding: 4px 0; }
.term-matrix { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; transition: opacity .6s; }
.term-matrix.fade { opacity: 0; }
.term-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.term-chips .tab { font-family: var(--font-mono); font-size: 13px; }
.tab-accent { border-color: var(--accent); color: var(--accent-ink); }
.tab-accent:hover { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.section-sub code { font-family: var(--font-mono); font-size: .9em; padding: 2px 7px; border-radius: 6px; background: var(--surface-2); color: var(--accent-ink); }


/* ==========================================================================
   2026 layer: bento, view transitions, scroll-driven, grain, motion toggle
   ========================================================================== */

/* Bento grid */
.bento {
  margin-top: clamp(56px, 8vw, 96px);
  display: grid; gap: 16px;
  grid-template-columns: repeat(4, 1fr);
  grid-template-areas:
    "avail avail clock gpa"
    "focus focus focus focus"
    "nums  nums  nums  nums";
}
.bento-card {
  container-type: inline-size;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(20px, 2.4vw, 28px); display: flex; flex-direction: column; gap: 12px; min-width: 0;
  transition: border-color .3s, opacity .9s var(--ease), translate .9s var(--ease), box-shadow .4s;
}
.bento-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow); }
.bento .bento-card:nth-child(2) { transition-delay: .06s; } .bento .bento-card:nth-child(3) { transition-delay: .12s; }
.bento .bento-card:nth-child(4) { transition-delay: .18s; } .bento .bento-card:nth-child(5) { transition-delay: .24s; }
.b-label { font-size: 11.5px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); display: flex; align-items: center; gap: 8px; }
:root[lang="ar"] .b-label { letter-spacing: 0; font-size: 13px; }
.bento-card h3 { font-size: clamp(22px, 2.4vw, 30px); font-weight: 600; line-height: 1.15; }
.b-text { color: var(--muted); font-size: 15px; }
.b-avail { grid-area: avail; justify-content: space-between; background:
  radial-gradient(120% 90% at 100% 0%, var(--accent-soft), transparent 60%), var(--surface); }
.b-avail h3 { font-size: clamp(26px, 3.2vw, 42px); letter-spacing: -.03em; max-width: 16ch; }
:root[lang="ar"] .b-avail h3 { letter-spacing: 0; }
.b-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; }
.b-clock { grid-area: clock; }
.b-time { font: 600 clamp(44px, 5vw, 64px)/1 "Plus Jakarta Sans", sans-serif; letter-spacing: -.04em; font-variant-numeric: tabular-nums; direction: ltr; text-align: start; }
.b-time .colon { animation: blink 2s steps(1) infinite; color: var(--accent-ink); margin-inline: .04em; }
.b-hours { margin-top: auto; font-size: 12px; color: var(--muted); display: flex; gap: 8px; align-items: flex-start; }
.b-hours .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); margin-top: 5px; flex: none; }
.b-clock.is-open .b-hours .dot { background: var(--ok); box-shadow: 0 0 0 4px var(--ok-soft); }
.b-gpa { grid-area: gpa; align-items: flex-start; }
.gauge { position: relative; width: min(140px, 70cqi); aspect-ratio: 1; margin-block: 2px; }
.gauge svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.gauge circle { fill: none; stroke-width: 9; }
.g-bg { stroke: var(--surface-2); }
.g-fg { stroke: var(--accent); stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 100; transition: stroke-dashoffset 1.6s var(--ease) .2s; }
.b-gpa.in .g-fg { stroke-dashoffset: 9.25; } /* 3.63 / 4.00 = 90.75% */
.g-val { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; font: 700 30px/1 "Plus Jakarta Sans", sans-serif; letter-spacing: -.03em; }
.g-val small { display: block; margin-top: 4px; font: 500 11px var(--font-mono); color: var(--muted); letter-spacing: 0; }
.b-focus { grid-area: focus; }
.b-chips { list-style: none; margin: auto 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; font-size: 12px; }
.b-chips li { padding: 6px 11px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--bg); transition: background-color .25s, color .25s, border-color .25s; }
.b-chips li:hover { background: var(--accent-soft); color: var(--accent-ink); border-color: transparent; }
.b-nums { grid-area: nums; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; padding: 0; }
.b-nums .stat { padding: clamp(20px, 2.4vw, 28px); }
.b-nums .stat + .stat { border-inline-start: 1px solid var(--line); }
@container (max-width: 260px) { .b-actions .btn { width: 100%; justify-content: center; } }

@media (max-width: 1020px) {
  .bento { grid-template-columns: 1fr 1fr; grid-template-areas: "avail avail" "clock gpa" "focus focus" "nums nums"; }
  .b-nums { grid-template-columns: 1fr 1fr; }
  .b-nums .stat:nth-child(3) { border-inline-start: 0; }
  .b-nums .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 560px) {
  .bento { grid-template-columns: 1fr; grid-template-areas: "avail" "clock" "gpa" "focus" "nums"; }
}

/* Arabic: use the Arabic face for prose set in mono, keep numbers LTR */
:root[lang="ar"] .b-hours, :root[lang="ar"] .b-clock .b-text, :root[lang="ar"] .b-label span { font-family: var(--font-sans); }
.g-val, .g-val small { direction: ltr; }

/* Theme: circular reveal via View Transitions */
.vt-theme::view-transition-old(root), .vt-theme::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
.vt-theme::view-transition-old(root) { z-index: 1; }
.vt-theme::view-transition-new(root) { z-index: 2; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .35s; }

/* Native scroll-driven animations (progressive enhancement) */
@supports (animation-timeline: view()) {
  :root:not([data-motion="off"]) .project-visual > * { animation: visualIn linear both; animation-timeline: view(); animation-range: entry 10% cover 45%; }
  :root:not([data-motion="off"]) .map svg { animation: mapIn linear both; animation-timeline: view(); animation-range: entry 0% cover 50%; }
  @keyframes visualIn { from { scale: .84; opacity: .35; } to { scale: 1; opacity: 1; } }
  @keyframes mapIn { from { scale: .92; opacity: .4; } to { scale: 1; opacity: 1; } }
}
@supports (animation-timeline: scroll()) {
  :root:not([data-motion="off"]) .sb-progress { animation: grow linear both; animation-timeline: scroll(root); transform: scaleX(0); }
  @keyframes grow { to { transform: scaleX(1); } }
}

/* Hero letters: variable weight */
.hero-title .ch { font-variation-settings: 'wght' 700; }

/* Subtle film grain for tactile depth */
body::after {
  content: ""; position: fixed; inset: -50%; z-index: 130; pointer-events: none; opacity: .045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
:root[data-theme="dark"] body::after { opacity: .07; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) body::after { opacity: .07; } }

/* Motion toggle */
.sb-motion-dot { width: 22px; height: 12px; border-radius: 999px; background: var(--accent); position: relative; transition: background-color .25s; }
.sb-motion-dot::after { content: ""; position: absolute; top: 2px; left: 12px; width: 8px; height: 8px; border-radius: 50%; background: var(--surface); transition: left .25s var(--ease); }
.sb-motion[aria-pressed="false"] .sb-motion-dot { background: var(--line-strong); }
.sb-motion[aria-pressed="false"] .sb-motion-dot::after { left: 2px; }
:root[data-motion="off"] *, :root[data-motion="off"] *::before, :root[data-motion="off"] *::after {
  animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0s !important;
}
:root[data-motion="off"] .reveal, :root[data-motion="off"] .skills .skill-group, :root[data-motion="off"] .certs li { opacity: 1; translate: none; }
:root[data-motion="off"] .wr > span { transform: none !important; }
:root[data-motion="off"] .statement-text .w { opacity: 1; }
:root[data-motion="off"] { scroll-behavior: auto; }


/* ==========================================================================
   Faux-UI stages (looping product demos) + rolling digits
   ========================================================================== */
.stage { position: absolute; inset: 0; overflow: hidden; }
.stage-canvas { position: absolute; left: 0; top: 0; transform-origin: 0 0; transform: scale(var(--k, 1)); }
.win {
  position: absolute; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 12px; overflow: hidden;
  box-shadow: 0 1px 0 rgba(255,255,255,.04) inset, 0 22px 44px -22px rgba(0,0,0,.4);
  font: 12px/1.4 var(--font-sans); font-family: "Inter", system-ui, sans-serif; color: var(--ink); direction: ltr; text-align: left;
}
.win-bar { height: 30px; display: flex; align-items: center; gap: 6px; padding: 0 12px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.win-bar > i { width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); }
.win-url { margin-left: 10px; font: 10px var(--font-mono); color: var(--muted); background: var(--bg); padding: 3px 10px; border-radius: 6px; }
.win-body { padding: 14px 16px; position: relative; }
[data-stage="codai"] .win-body, [data-stage="ufc"] .win-body { padding-right: 74px; }
[data-stage="hcm"] .win-body { padding: 18px 58px 18px 20px; }
.st-btn {
  display: inline-flex; align-items: center; justify-content: center; height: 28px; padding: 0 12px; border-radius: 8px; flex: none;
  border: 1px solid var(--line-strong); font-weight: 600; font-size: 11.5px; white-space: nowrap; background: var(--surface);
  transition: transform .15s var(--ease), background-color .35s, color .35s, border-color .35s;
}
.st-primary { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.stage .pressed { transform: scale(.93); }
.ph { display: block; height: 6px; border-radius: 4px; background: var(--line-strong); width: var(--w); margin-top: 7px; opacity: .8; }

.st-cursor { position: absolute; left: 0; top: 0; z-index: 6; pointer-events: none; will-change: transform; }
.st-cursor svg { display: block; width: 19px; height: 19px; margin: -3px 0 0 -5px; fill: var(--ink); stroke: var(--surface); stroke-width: 1.4; stroke-linejoin: round;
  filter: drop-shadow(0 2px 3px rgba(0,0,0,.28)); transform-origin: 5px 3px; transition: transform .12s var(--ease); }
.st-cursor.down svg { transform: scale(.84); }
.st-tap { position: absolute; left: 0; top: 0; width: 26px; height: 26px; margin: -13px 0 0 -13px; border-radius: 50%; border: 2px solid var(--accent); pointer-events: none; z-index: 5; animation: tap .55s ease-out forwards; }
@keyframes tap { from { scale: .3; opacity: .9; } to { scale: 1.5; opacity: 0; } }

/* Codai */
.cd-prompt { display: flex; gap: 8px; align-items: center; }
.cd-field { flex: 1; min-width: 0; height: 30px; display: flex; align-items: center; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--bg); font-size: 11.5px; white-space: nowrap; overflow: hidden; }
.cd-tabs { display: flex; gap: 2px; margin-top: 12px; align-items: center; border-bottom: 1px solid var(--line); }
.cd-tab { padding: 6px 10px; font-size: 11px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; transition: color .3s, border-color .3s; }
[data-gen="1"][data-tab="diagram"] .t-diagram, [data-gen="1"][data-tab="tests"] .t-tests { color: var(--ink); border-color: var(--accent); }
.cd-reset { margin-left: auto; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 6px; color: var(--muted); font-size: 14px; transition: transform .15s, background-color .2s; }
.cd-reset.pressed { background: var(--surface-2); }
.cd-out { position: relative; height: 150px; margin-top: 14px; }
.cd-empty { transition: opacity .35s; }
.cd-empty i { display: block; height: 7px; margin: 0 0 12px; border-radius: 4px; background: var(--line-strong); width: var(--w); opacity: .6; }
[data-gen="1"] .cd-empty { opacity: 0; }
.cd-diagram, .cd-tests { position: absolute; inset: 0; pointer-events: none; }
.cd-links { position: absolute; left: 0; top: 0; width: 360px; height: 110px; overflow: visible; }
.cd-links path { fill: none; stroke: var(--accent); stroke-width: 1.5; stroke-dasharray: 220; stroke-dashoffset: 220; transition: stroke-dashoffset .3s; }
[data-gen="1"][data-tab="diagram"] .cd-links path { stroke-dashoffset: 0; transition: stroke-dashoffset .9s var(--ease) .55s; }
.umlb { position: absolute; top: 8px; width: 92px; border: 1.3px solid var(--ink); border-radius: 7px; background: var(--surface); padding-bottom: 8px; opacity: 0; translate: 0 8px; transition: opacity .25s, translate .25s; }
.umlb b { display: block; font: 600 10px var(--font-mono); padding: 6px 8px; border-bottom: 1px solid var(--line-strong); margin-bottom: 3px; }
.umlb i { display: block; height: 5px; border-radius: 3px; background: var(--line-strong); width: var(--w); margin: 5px 8px 0; }
[data-gen="1"][data-tab="diagram"] .umlb { opacity: 1; translate: none; transition: opacity .45s var(--ease), translate .45s var(--ease); transition-delay: calc(var(--i) * .14s); }
.cd-tests { list-style: none; margin: 0; padding: 0; }
.cd-tests li { display: flex; align-items: center; gap: 8px; height: 32px; border-bottom: 1px solid var(--line); font-size: 11px; opacity: 0; translate: 0 6px; transition: opacity .2s, translate .2s; }
.cd-tests li > i { display: block; height: 6px; border-radius: 3px; background: var(--line-strong); width: var(--w); }
.cd-tests em { margin-left: auto; font: 600 9.5px var(--font-mono); font-style: normal; color: var(--ok); background: var(--ok-soft); padding: 2px 6px; border-radius: 4px; }
.tick { width: 16px; height: 16px; border-radius: 50%; background: var(--ok-soft); color: var(--ok); display: grid; place-items: center; font-size: 9px; font-weight: 700; scale: 0; transition: scale .2s; }
[data-gen="1"][data-tab="tests"] .cd-tests li { opacity: 1; translate: none; transition: opacity .4s var(--ease), translate .4s var(--ease); transition-delay: calc(var(--i) * .22s); }
[data-gen="1"][data-tab="tests"] .tick { scale: 1; transition: scale .45s cubic-bezier(.3,1.7,.5,1); transition-delay: calc(var(--i) * .22s + .2s); }

/* UFC */
.uf-title { font-weight: 600; font-size: 12.5px; }
.uf-ring { margin: 14px 0 12px; width: 292px; height: 18px; border-radius: 6px; background: var(--surface-2); font: 600 8px var(--font-mono); letter-spacing: .35em; color: var(--muted); display: grid; place-items: center; }
.uf-seats { display: grid; grid-template-columns: repeat(10, 22px); gap: 8px; }
.uf-seats i { display: block; height: 15px; border-radius: 4px; border: 1.3px solid var(--line-strong); background: var(--surface); transition: background-color .3s, border-color .3s, scale .35s cubic-bezier(.3,1.6,.5,1), transform .15s; }
.uf-seats i.tk { background: var(--line-strong); border-color: transparent; opacity: .55; }
[data-sel="1"] .uf-seats .pick { background: var(--accent); border-color: var(--accent); scale: 1.15; }
.uf-bar {
  position: absolute; right: 16px; bottom: 16px; z-index: 3; display: flex; gap: 12px; align-items: center; padding: 7px 7px 7px 14px;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: 12px; box-shadow: 0 16px 30px -14px rgba(0,0,0,.4);
  font: 500 12px "Inter", sans-serif; color: var(--ink); direction: ltr;
  translate: 0 calc(100% + 24px); transition: translate .5s var(--ease);
}
[data-sel="1"] .uf-bar { translate: none; }
.uf-book { position: relative; min-width: 82px; }
.uf-book .b-done { display: none; }
[data-booked="1"] .uf-book { background: var(--ok); border-color: var(--ok); color: #fff; }
[data-booked="1"] .uf-book .b-idle { display: none; }
[data-booked="1"] .uf-book .b-done { display: inline; }
.uf-ticket {
  position: absolute; right: 16px; top: 52px; z-index: 3; display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 12px;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: 12px; box-shadow: 0 16px 30px -14px rgba(0,0,0,.4);
  font: 12px "Inter", sans-serif; color: var(--ink); direction: ltr; text-align: left;
  translate: calc(100% + 30px) 0; transition: translate .55s var(--ease);
}
[data-booked="1"] .uf-ticket { translate: none; transition-delay: .25s; }
.uf-ticket b { display: block; font-size: 12px; }
.uf-ticket small { color: var(--muted); font: 10px var(--font-mono); }
.uf-tick { width: 24px; height: 24px; border-radius: 50%; background: var(--ok-soft); color: var(--ok); display: grid; place-items: center; font-size: 11px; font-weight: 700; }
.uf-close { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; color: var(--muted); font-size: 14px; background: var(--surface-2); margin-left: 6px; transition: transform .15s; }

/* EasyCal */
.phone2 { position: absolute; width: 200px; height: 330px; border-radius: 30px; border: 6px solid var(--ink); background: var(--surface); padding: 26px 16px 0; box-shadow: 0 24px 50px -24px rgba(0,0,0,.45); font: 12px/1.4 "Inter", sans-serif; color: var(--ink); direction: ltr; text-align: left; }
.ph-notch { position: absolute; top: 7px; left: 50%; width: 52px; height: 11px; margin-left: -26px; border-radius: 8px; background: var(--ink); }
.ec-h { font-weight: 600; font-size: 13px; }
.ec-ring { position: relative; width: 116px; margin: 8px auto 10px; }
.ec-ring svg { width: 100%; transform: rotate(-90deg); }
.ec-ring circle { fill: none; stroke-width: 10; }
.ec-ring .bg { stroke: var(--surface-2); }
.ec-ring .fg { stroke: var(--accent); stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 40; transition: stroke-dashoffset .9s var(--ease); }
[data-added="1"] .ec-ring .fg { stroke-dashoffset: 25.5; }
.ec-ring p { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; font: 700 19px/1 "Plus Jakarta Sans", sans-serif; }
.ec-ring small { display: block; margin-top: 4px; font: 500 8.5px var(--font-mono); color: var(--muted); }
.ec-add { display: flex; width: 100%; }
.ec-list { list-style: none; margin: 10px 0 0; padding: 0; }
.ec-list li { display: flex; align-items: center; gap: 8px; height: 30px; border-bottom: 1px solid var(--line); font-size: 11px; }
.ec-list li > i { display: block; height: 6px; border-radius: 3px; background: var(--line-strong); width: var(--w); }
.ec-list em { margin-left: auto; font: 600 10px var(--font-mono); font-style: normal; color: var(--muted); }
.ph-n { width: 22px; height: 6px; border-radius: 3px; background: var(--line-strong); }
.ec-list .ec-new { height: 0; opacity: 0; overflow: hidden; border-bottom-width: 0; transition: height .45s var(--ease), opacity .3s; }
[data-added="1"] .ec-list .ec-new { height: 30px; opacity: 1; border-bottom-width: 1px; }
.ec-new em { color: var(--accent-ink); }
.ec-x { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); font-size: 12px; flex: none; transition: transform .15s; }
.ec-toast {
  position: absolute; left: 34px; top: 104px; z-index: 3; padding: 9px 13px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line-strong);
  box-shadow: 0 16px 30px -14px rgba(0,0,0,.4); font: 12px "Inter", sans-serif; color: var(--ink); direction: ltr;
  opacity: 0; translate: -12px 0; transition: opacity .35s, translate .45s var(--ease);
}
.ec-toast b { color: var(--accent-ink); }
[data-added="1"] .ec-toast { opacity: 1; translate: none; transition-delay: .2s; }

/* Oracle HCM (inside the focus bento card) */
.b-focus { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: clamp(20px, 3vw, 40px); align-items: center; }
.b-focus-stage { max-width: 540px; width: 100%; justify-self: end; }
.b-focus-copy { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.b-focus-stage { position: relative; inset: auto; aspect-ratio: 460 / 270; align-self: center; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.hc-req { display: flex; align-items: center; gap: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); }
.hc-av { width: 28px; height: 28px; border-radius: 50%; flex: none; background: linear-gradient(135deg, var(--accent-soft), var(--surface-2)); border: 1px solid var(--line-strong); }
.hc-who { flex: 1; min-width: 0; display: grid; gap: 6px; }
.hc-who i { display: block; height: 6px; border-radius: 3px; background: var(--line-strong); width: var(--w); }
.hc-who b { font-size: 11px; font-weight: 600; white-space: nowrap; }
.hc-pill { font: 600 9.5px var(--font-mono); padding: 3px 8px; border-radius: 999px; background: rgba(217,130,43,.15); color: #c07a1e; transition: background-color .35s, color .35s; white-space: nowrap; }
.hc-pill .p-ok { display: none; }
[data-ok="1"] .hc-pill { background: var(--ok-soft); color: var(--ok); }
[data-ok="1"] .hc-pill .p-wait { display: none; }
[data-ok="1"] .hc-pill .p-ok { display: inline; }
.hc-balance { margin-top: 18px; font-size: 11.5px; color: var(--muted); display: flex; align-items: baseline; gap: 5px; }
.hc-bal { color: var(--ink); font: 600 17px "Plus Jakarta Sans", sans-serif; }
.hc-actions { display: flex; gap: 8px; margin-top: 12px; }
.hc-undo { display: none; }
.hc-more { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.hc-ph { opacity: .6; }
.hc-chip { width: 46px; height: 16px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); }
[data-ok="1"] .hc-actions .st-btn:not(.hc-undo) { display: none; }
[data-ok="1"] .hc-undo { display: inline-flex; animation: fade .3s ease both; }
@keyframes fade { from { opacity: 0; } }
@media (max-width: 560px) { .b-focus { grid-template-columns: 1fr; } }

/* Rolling digits */
.roll { display: inline-flex; height: 1em; line-height: 1em; overflow: hidden; vertical-align: -0.12em; direction: ltr; }
.rd { display: inline-block; height: 1em; overflow: hidden; }
.rd-col { display: flex; flex-direction: column; transform: translateY(calc(var(--d, 0) * -1em)); transition: transform .8s cubic-bezier(.2,.8,.2,1); }
.rd-col > span { display: block; height: 1em; line-height: 1em; text-align: center; }
.rd:nth-child(2) .rd-col { transition-delay: .04s; } .rd:nth-child(3) .rd-col { transition-delay: .08s; }
.rd:nth-child(4) .rd-col { transition-delay: .12s; } .rd:nth-child(5) .rd-col { transition-delay: .16s; }
.no-anim .rd-col { transition: none !important; }
.stat-value.roll, .g-val .roll { height: 1em; }


/* ==========================================================================
   Loader, contact form, keyboard shortcuts
   ========================================================================== */

/* Loader */
.loader { display: none; }
.is-loading .loader {
  display: grid; position: fixed; inset: 0; z-index: 200; place-items: center;
  background: var(--bg); color: var(--ink); cursor: pointer; /* follows the site's light/dark colours */
  clip-path: inset(0 0 0 0); transition: clip-path .7s cubic-bezier(.76,0,.24,1);
}
.is-loading { overflow: hidden; }
.is-loading body { overflow: hidden; }
.loader.out { clip-path: inset(0 0 100% 0); }
.loader-top { display: flex; justify-content: space-between; gap: 16px; font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; opacity: .55; animation: lfade .6s ease both; }
:root[lang="ar"] .loader-top { letter-spacing: 0; font-family: var(--font-sans); font-size: 13px; }
@keyframes lfade { from { opacity: 0; } }
.loader-foot { display: flex; align-items: center; gap: 18px; }
.loader-bar { flex: 1; height: 2px; background: rgba(255, 255, 255, .18); overflow: hidden; border-radius: 2px; }
.loader-bar i { display: block; height: 100%; background: var(--accent); transform-origin: left; transform: scaleX(0); }
[dir="rtl"] .loader-bar i { transform-origin: right; }
.loader-pct { font-size: 28px; font-weight: 500; letter-spacing: -.02em; min-width: 3ch; text-align: end; font-variant-numeric: tabular-nums; }
.loader-pct .rd-col { transition-duration: .22s; transition-delay: 0s !important; }
.loader-skip { font-size: 11px; opacity: .35; text-align: center; animation: lfade .6s ease 1.2s both; }
:root[lang="ar"] .loader-skip { font-family: var(--font-sans); font-size: 12.5px; }
/* Hold the hero entrance until the curtain lifts */
.is-loading:not(.loader-out) .hero-inner > *, .is-loading:not(.loader-out) .hero-title .ch, .is-loading:not(.loader-out) .kicker::before { animation-play-state: paused; }
.is-loading .topbar { opacity: 0; transform: translateY(-12px); }
.topbar { transition: background-color .3s, border-color .3s, transform .6s var(--ease), opacity .6s ease; }

/* Contact layout + form */
.contact-grid { margin-top: 44px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 520px); gap: clamp(32px, 5vw, 72px); align-items: start; }
.contact-grid .contact-actions { margin-top: 0; }
.contact-grid .email { font-size: clamp(20px, 2.5vw, 34px); overflow-wrap: anywhere; word-break: normal; }
.cform {
  --f-bg: color-mix(in srgb, var(--bg) 6%, transparent); --f-line: color-mix(in srgb, var(--bg) 18%, transparent);
  padding: clamp(22px, 3vw, 30px); border-radius: var(--radius); border: 1px solid var(--f-line);
  background: color-mix(in srgb, var(--bg) 4%, transparent); display: grid; gap: 16px; color: var(--bg);
}
.cform.shake { animation: shake .45s cubic-bezier(.36,.07,.19,.97); }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.cform-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.cform-title { font: 600 22px var(--font-display); }
.cform-note { font-size: 11.5px; opacity: .55; }
:root[lang="ar"] .cform-note, :root[lang="ar"] .cform legend, :root[lang="ar"] .field-err { font-family: var(--font-sans); }
.cform-topics { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.cform-topics legend { font-size: 11px; text-transform: uppercase; letter-spacing: .12em; opacity: .55; margin-bottom: 10px; padding: 0; }
.topic { position: relative; }
.topic input { position: absolute; opacity: 0; pointer-events: none; }
.topic span { display: inline-flex; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--f-line); font-size: 13.5px; cursor: pointer; transition: background-color .25s, color .25s, border-color .25s, transform .2s var(--ease); }
.topic span:hover { border-color: color-mix(in srgb, var(--bg) 45%, transparent); }
.topic input:checked + span { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.topic input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.topic span:active { transform: scale(.96); }
.field { position: relative; }
.field input, .field textarea {
  width: 100%; border: 1px solid var(--f-line); border-radius: 12px; background: var(--f-bg); color: var(--bg);
  font: 15px var(--font-sans); padding: 22px 14px 8px; outline: none; resize: vertical; min-height: 54px;
  transition: border-color .25s, box-shadow .25s, background-color .25s;
}
.field textarea { min-height: 120px; padding-bottom: 26px; }
.field label {
  position: absolute; top: 16px; inset-inline-start: 15px; font-size: 15px; opacity: .55; pointer-events: none;
  transform-origin: left top; transition: transform .25s var(--ease), opacity .25s, color .25s;
}
[dir="rtl"] .field label { transform-origin: right top; }
.field input:focus, .field textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent); }
.field input:focus + label, .field input:not(:placeholder-shown) + label,
.field textarea:focus + label, .field textarea:not(:placeholder-shown) + label { transform: translateY(-9px) scale(.74); opacity: .8; }
.field input:focus + label, .field textarea:focus + label { color: var(--accent-ink); opacity: 1; }
.field-err { display: block; max-height: 0; overflow: hidden; font-size: 11.5px; color: #ff8a7a; transition: max-height .3s var(--ease), margin .3s; }
.field.invalid .field-err { max-height: 30px; margin-top: 6px; }
.field.invalid input, .field.invalid textarea { border-color: #ff8a7a; }
.field-count { position: absolute; bottom: 10px; inset-inline-end: 12px; font-size: 10.5px; opacity: .45; pointer-events: none; }
.field.invalid .field-count { bottom: 34px; }
.field-count.near { color: var(--accent-ink); opacity: 1; }
.cform-submit { justify-content: center; background: var(--accent); color: var(--on-accent); width: 100%; height: 52px; display: grid; }
.cform-submit > span { grid-area: 1 / 1; display: inline-flex; align-items: center; justify-content: center; gap: 10px; transition: opacity .25s, transform .35s var(--ease); }
.cform-submit .cs-busy, .cform-submit .cs-done { opacity: 0; transform: translateY(12px); }
.cform[data-state="busy"] .cs-idle, .cform[data-state="done"] .cs-idle { opacity: 0; transform: translateY(-12px); }
.cform[data-state="busy"] .cs-busy, .cform[data-state="done"] .cs-done { opacity: 1; transform: none; }
.cform[data-state="busy"] .cs-done { opacity: 0; }
.cform[data-state="done"] .cform-submit { background: var(--ok); }
.cs-done svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 24; stroke-dashoffset: 24; transform: none !important; }
.cform[data-state="done"] .cs-done svg { stroke-dashoffset: 0; transition: stroke-dashoffset .5s var(--ease) .15s; }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Keyboard shortcuts dialog */
.keys {
  width: min(440px, calc(100vw - 32px)); padding: 0; border: 1px solid var(--line-strong); border-radius: 16px;
  background: var(--surface); color: var(--ink); box-shadow: 0 30px 80px -20px rgba(0,0,0,.5);
  opacity: 1; transform: none; transition: opacity .22s ease, transform .28s var(--ease), overlay .28s allow-discrete, display .28s allow-discrete;
}
.keys:not([open]) { opacity: 0; transform: translateY(10px) scale(.98); }
@starting-style { .keys[open] { opacity: 0; transform: translateY(10px) scale(.97); } }
.keys::backdrop { background: rgba(5, 6, 10, .45); backdrop-filter: blur(4px); }
.keys-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 14px 14px 20px; border-bottom: 1px solid var(--line); font: 600 16px var(--font-display); }
.keys-list { margin: 0; padding: 10px 20px 18px; display: grid; }
.keys-list > div { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.keys-list > div:last-child { border-bottom: 0; }
.keys-list dt { display: flex; gap: 5px; align-items: center; direction: ltr; }
.keys-list dd { margin: 0; color: var(--muted); }
.keys kbd { min-width: 26px; height: 26px; display: inline-grid; place-items: center; padding: 0 7px; border-radius: 7px; border: 1px solid var(--line-strong); border-bottom-width: 2px; background: var(--bg); font: 500 12px var(--font-mono); }
.keys .or { color: var(--muted); font-size: 12px; }
.sb-keys { padding-inline: 8px; }

@media (max-width: 1020px) {
  .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .sb-keys { display: none; }
}


/* ==========================================================================
   Liquid glass: loader lens, footer signature, glass shine, floating nav
   ========================================================================== */
.loader-glass { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.loader-ui { position: absolute; inset: 0; padding: 28px var(--gutter) calc(28px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; justify-content: space-between; pointer-events: none; transition: opacity .4s ease; }
.loader.expanding .loader-ui, .loader.out .loader-ui { opacity: 0; }
.loader-foot { display: grid; grid-template-columns: 1fr minmax(120px, 280px) auto; align-items: center; gap: 18px; }
.loader-foot .loader-skip { text-align: start; animation: lfade .6s ease 1s both; }
.loader-pct { font-size: 22px; }
@media (max-width: 560px) { .loader-foot { grid-template-columns: 1fr auto; } .loader-foot .loader-skip { display: none; } }

.signature { position: relative; height: clamp(150px, 22vw, 340px); margin-top: clamp(60px, 9vw, 120px); }
.signature canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.signature + .footer { margin-top: 0; }
.cursor.hidden { opacity: 0 !important; }

/* Glass shine: a lit top edge, a faint inner floor, and a sweep of light on hover */
:root { --glass-edge: rgba(255, 255, 255, .55); --glass-shine: inset 0 1px 0 var(--glass-edge), inset 0 -1px 0 rgba(0, 0, 0, .05); }
:root[data-theme="dark"] { --glass-edge: rgba(255, 255, 255, .1); --glass-shine: inset 0 1px 0 var(--glass-edge), inset 0 -1px 0 rgba(255, 255, 255, .03); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --glass-edge: rgba(255, 255, 255, .1); --glass-shine: inset 0 1px 0 var(--glass-edge), inset 0 -1px 0 rgba(255, 255, 255, .03); } }
.card, .bento-card, .icon-btn, .tab, .chip, .eyebrow { box-shadow: var(--glass-shine), var(--shadow, none); }
.icon-btn, .tab, .eyebrow { box-shadow: var(--glass-shine); }
.btn-solid { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 8px 20px -10px rgba(0, 0, 0, .45); }
.btn-solid::before {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, .38) 48%, rgba(255, 255, 255, .08) 56%, transparent 70%);
  transform: translateX(-120%); transition: transform .8s var(--ease);
}
.btn-solid:hover::before { transform: translateX(120%); }
.bento-card, .project, .play { position: relative; }
.bento-card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 0;
  background: radial-gradient(420px circle at var(--gx, 50%) var(--gy, -20%), rgba(255, 255, 255, .5), transparent 45%);
  opacity: 0; transition: opacity .4s; mix-blend-mode: soft-light;
}
.bento-card:hover::before { opacity: 1; }
.bento-card > * { position: relative; z-index: 1; }

/* Handwritten signature, drawn like a pen: outline first, then the ink fills, then the flourish */
.signmark { position: relative; aspect-ratio: 704 / 170; }
.signmark svg { position: absolute; inset: 0; display: block; width: 100%; height: 100%; overflow: visible; }
.sig.still .sig-ink { stroke-dasharray: none; fill-opacity: 1; stroke-width: 0; }
.sig.still .sig-line { stroke-dasharray: none; }
.sig-ink { fill: currentColor; fill-opacity: 0; stroke: currentColor; stroke-width: 1.1; stroke-linejoin: round; stroke-dasharray: 0 99999; }
.sig-line { fill: none; stroke: var(--accent); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 0 99999; }
.signmark.draw .sig-ink { animation: sigStroke 2.4s cubic-bezier(.55, .1, .35, 1) forwards, sigFill .9s ease 1.7s forwards; }
.signmark.draw .sig-line { animation: sigStroke .8s cubic-bezier(.6, 0, .3, 1) 2.2s forwards; }
.signmark.drawn .sig-ink { stroke-dashoffset: 0; fill-opacity: 1; stroke-width: 0; }
.signmark.drawn .sig-line { stroke-dashoffset: 0; }
@keyframes sigStroke { to { stroke-dashoffset: 0; } }
@keyframes sigFill { to { fill-opacity: 1; stroke-width: 0; } }
.signmark--hero {
  width: clamp(220px, 26vw, 400px); color: var(--ink);
  margin: -.16em 0 -.06em; margin-inline-start: clamp(0px, 4vw, 64px);
  font-size: clamp(64px, 10.4vw, 160px); /* em units follow the title size */
}
.signmark--end { width: clamp(140px, 13vw, 180px); margin: -8px 0 -10px; color: var(--bg); }
.footer { align-items: center; }
[dir="rtl"] .signmark svg { direction: ltr; }
@media (max-width: 680px) { .signmark--hero { margin-inline-start: 0; } }

/* Voice commands */
.voice-btn.on { background: var(--accent); color: var(--on-accent); border-color: var(--accent); box-shadow: 0 0 0 6px var(--accent-soft); }
.voice-pill { position: fixed; top: 84px; left: 50%; z-index: 150; translate: -50% -16px; opacity: 0; pointer-events: none;
  display: flex; align-items: center; gap: 12px; padding: 10px 18px 10px 14px; border-radius: 999px; max-width: calc(100vw - 32px);
  background: rgba(10,10,10,.92); color: #f2f2f2; border: 1px solid rgba(255,255,255,.14); box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 20px 50px -14px rgba(0,0,0,.8);
  backdrop-filter: blur(14px); font-size: 14px; transition: translate .4s var(--ease), opacity .3s; }
.voice-pill.on { translate: -50% 0; opacity: 1; }
.voice-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.voice-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.voice-hints { font-size: 11.5px; color: #8e8e93; white-space: normal; }
.voice-hints:empty { display: none; }
.voice-pill { border-radius: 20px; }
.voice-wave { display: flex; align-items: center; gap: 3px; height: 18px; }
.voice-wave i { width: 3px; height: 100%; border-radius: 2px; background: var(--accent); animation: vw .9s ease-in-out infinite; }
.voice-wave i:nth-child(2) { animation-delay: .15s; } .voice-wave i:nth-child(3) { animation-delay: .3s; } .voice-wave i:nth-child(4) { animation-delay: .45s; }
@keyframes vw { 0%, 100% { transform: scaleY(.3); } 50% { transform: scaleY(1); } }

/* Auto theme badge on the theme button */
[data-theme-mode="auto"] [data-action="theme"] { position: relative; }
[data-theme-mode="auto"] [data-action="theme"]::after { content: "A"; position: absolute; right: -3px; bottom: -3px; width: 15px; height: 15px; border-radius: 50%; background: var(--accent); color: var(--on-accent); font: 700 9px/15px var(--font-mono); text-align: center; }

/* Presentation mode */
.sb-present svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.presenting .topbar, .presenting .statusbar, .presenting .scroll-cue, .presenting .hero-hint { opacity: 0 !important; pointer-events: none; }
.presenting body { padding-bottom: 0; }
.presenting main > [data-section] { min-height: 100vh; min-height: 100svh; scroll-margin-top: 0; }
.presenting .section { display: flex; flex-direction: column; justify-content: center; }
.presenting .section > .container { width: 100%; }
.present-hud { position: fixed; left: 50%; bottom: 22px; z-index: 160; translate: -50% 140%; opacity: 0; pointer-events: none;
  display: flex; align-items: center; gap: 12px; padding: 6px; border-radius: 999px; font-size: 12.5px;
  background: rgba(10,10,10,.88); color: #f2f2f2; border: 1px solid rgba(255,255,255,.14); box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 20px 50px -14px rgba(0,0,0,.8);
  backdrop-filter: blur(14px); transition: translate .45s var(--ease), opacity .3s; }
.presenting .present-hud { translate: -50% 0; opacity: 1; pointer-events: auto; }
.ph-btn, .ph-exit { height: 34px; min-width: 34px; padding: 0 10px; border-radius: 999px; border: 0; background: rgba(255,255,255,.1); color: inherit; font: inherit; cursor: pointer; }
.ph-btn:hover, .ph-exit:hover { background: var(--accent); color: #000; }
.ph-count { color: #8e8e93; }
.ph-name { min-width: 90px; font-weight: 600; }
.ph-bar { width: 90px; height: 2px; background: rgba(255,255,255,.15); border-radius: 2px; overflow: hidden; }
.ph-bar i { display: block; height: 100%; background: var(--accent); transform-origin: left; transition: transform .4s var(--ease); }
:root[lang="ar"] .ph-name { font-family: var(--font-sans); }
@media (max-width: 680px) { .sb-present span, .ph-bar { display: none; } }

/* Break this page */
.btn-break { border: 1px dashed color-mix(in srgb, var(--accent) 70%, transparent); color: var(--accent-ink); background: transparent; }
.btn-break:hover { background: var(--accent); color: var(--on-accent); border-style: solid; }
.btn-break svg { fill: currentColor; stroke: none; }
:root.chaos, :root.chaos body { overflow: hidden; }
.chaos-piece { will-change: transform; cursor: grab; position: relative; z-index: 60; user-select: none; -webkit-user-select: none; touch-action: none; }
.chaos-piece:active { cursor: grabbing; }
.chaos .hero-canvas { opacity: .25; transition: opacity .4s; }
.chaos-shake { animation: chaosShake .45s cubic-bezier(.36,.07,.19,.97); }
@keyframes chaosShake { 15%, 55% { transform: translate(-7px, 3px) rotate(-.4deg); } 35%, 75% { transform: translate(7px, -3px) rotate(.4deg); } }
.chaos-bar {
  position: fixed; left: 50%; bottom: calc(var(--bar-h) + 16px); z-index: 150; translate: -50% 140%; opacity: 0;
  display: flex; align-items: center; gap: 14px; padding: 8px 8px 8px 18px; border-radius: 999px; font-size: 13px;
  background: rgba(10,10,10,.92); color: #f2f2f2; border: 1px solid rgba(255,255,255,.14); box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 20px 50px -14px rgba(0,0,0,.8);
  backdrop-filter: blur(14px); transition: translate .5s var(--ease), opacity .3s; white-space: nowrap; max-width: calc(100vw - 24px);
}
.chaos-bar.on { translate: -50% 0; opacity: 1; }
.chaos-dot { width: 8px; height: 8px; border-radius: 50%; background: #ff6b6b; box-shadow: 0 0 0 4px rgba(255,107,107,.2); flex: none; }
.chaos-bar.ok .chaos-dot { background: #3ddc97; box-shadow: 0 0 0 4px rgba(61,220,151,.2); }
.chaos-msg { overflow: hidden; text-overflow: ellipsis; }
.chaos-fix { height: 36px; padding: 0 16px; border-radius: 999px; border: 0; background: #3ddc97; color: #000; font: 600 12.5px var(--font-mono); cursor: pointer; }
.chaos-fix:disabled { opacity: .6; cursor: progress; }
.chaos-bar.ok .chaos-fix { display: none; }
:root[lang="ar"] .chaos-bar { font-family: var(--font-sans); }

/* Top bar morphs into a floating glass capsule once you scroll */
.topbar {
  left: 50%; right: auto; width: 100%; translate: -50% 0; top: 0;
  transition: width .6s var(--ease), top .6s var(--ease), height .6s var(--ease), border-radius .6s var(--ease), padding .6s var(--ease),
              background-color .4s, border-color .4s, box-shadow .4s, transform .6s var(--ease), opacity .6s ease;
}
.topbar.is-scrolled {
  width: min(1080px, calc(100% - 24px)); top: 10px; height: 56px; border-radius: 999px; padding-inline: 10px 8px;
  background: color-mix(in srgb, var(--surface) 62%, transparent);
  border: 1px solid var(--line);
  box-shadow: var(--glass-shine), 0 14px 40px -18px rgba(0, 0, 0, .35);
  backdrop-filter: blur(18px) saturate(1.6); -webkit-backdrop-filter: blur(18px) saturate(1.6);
}
.topbar.is-scrolled .logo { padding-inline-start: 10px; }
@media (max-width: 680px) { .topbar.is-scrolled { height: 52px; width: calc(100% - 16px); top: 8px; } }


/* ==========================================================================
   AB assistant + Video mode
   ========================================================================== */
.btn-intro .intro-dot { width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: var(--on-accent); display: inline-grid; place-items: center; font-size: 9px; padding-left: 2px; box-sizing: border-box; }
.sb-intro span:first-child { color: var(--accent-ink); }

.abot { position: fixed; z-index: 140; right: 22px; bottom: calc(var(--bar-h) + 22px); width: min(360px, calc(100vw - 32px));
  padding: 16px 16px 14px; border-radius: 22px; background: color-mix(in srgb, var(--surface) 86%, transparent);
  border: 1px solid var(--line-strong); box-shadow: var(--glass-shine), 0 30px 70px -24px rgba(0,0,0,.6);
  backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4);
  opacity: 0; translate: 0 18px; scale: .97; pointer-events: none; transition: opacity .4s var(--ease), translate .5s var(--ease), scale .5s var(--ease); }
[dir="rtl"] .abot { right: auto; left: 22px; }
.abot.on { opacity: 1; translate: none; scale: 1; pointer-events: auto; }
.abot-snd { margin-inline-start: auto; background: none; border: 0; cursor: pointer; font-size: 15px; opacity: .8; padding: 4px; }
.abot-snd:hover { opacity: 1; }
.abot-snd + .abot-x { margin-inline-start: 0; }
.abot-tap { margin: 0 0 6px; font-size: 11.5px; color: var(--accent-ink); animation: abtap 1.6s ease-in-out infinite; }
@keyframes abtap { 50% { opacity: .45; } }
.abot-chat { margin-top: 10px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; min-width: 0; }
.abot-log { max-height: min(36vh, 300px); -webkit-mask-image: linear-gradient(transparent, #000 18px); mask-image: linear-gradient(transparent, #000 18px); padding-top: 10px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding-right: 2px; overscroll-behavior: contain; }
.abot-log:empty { display: none; }
.abot-m { margin: 0 4px; padding: 8px 12px; border-radius: 14px; font-size: 14px; line-height: 1.5; max-width: 88%; }
.abot-m.me { align-self: flex-end; background: var(--ink); color: var(--bg); border-bottom-right-radius: 4px; }
.abot-m.ab { align-self: flex-start; background: color-mix(in srgb, var(--ink) 8%, transparent); border-bottom-left-radius: 4px; }
.abot-m.thinking::after { content: '•••'; letter-spacing: 3px; animation: abtap 1s ease-in-out infinite; }
.abot-sugg { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.abot-sugg button { flex: none; font: inherit; font-size: 12.5px; padding: 6px 10px; border-radius: 999px; border: 1px solid var(--line-strong); background: transparent; color: inherit; cursor: pointer; }
.abot-sugg button:hover { border-color: var(--accent); }
.abot-form { display: flex; gap: 6px; padding-inline-end: 2px; }
.abot-form .abot-in { margin: 0; }
.abot-in { flex: 1; min-width: 0; font: inherit; font-size: 16px; padding: 9px 12px; border-radius: 999px; border: 1px solid var(--line-strong); background: transparent; color: inherit; }
.abot-in:focus { outline: none; border-color: var(--accent); }
.abot-mic, .abot-send { flex: none; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line-strong); background: transparent; color: inherit; cursor: pointer; font-size: 15px; }
.abot-send { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 700; }
.abot.chatting.typed .abot-actions, .abot.chatting .abot-msg { display: none; }
.abot-pill { position: fixed; z-index: 140; right: 22px; bottom: calc(var(--bar-h) + 22px); width: 56px; height: 56px; padding: 0; border-radius: 50%; border: 1px solid var(--line-strong);
  background: color-mix(in srgb, var(--surface) 86%, transparent); box-shadow: var(--glass-shine), 0 18px 40px -14px rgba(0,0,0,.6); backdrop-filter: blur(14px); cursor: pointer;
  display: grid; place-items: center; opacity: 0; scale: .6; pointer-events: none; transition: opacity .3s, scale .4s var(--ease); }
.abot-pill.on { opacity: 1; scale: 1; pointer-events: auto; }
.abot-pill:hover { scale: 1.06; }
.abot-pill { border: 0; background: none; box-shadow: none; backdrop-filter: none; overflow: visible; }
.abot-pill.moving .abot-face { animation: abwalk .5s ease-in-out infinite; }
@keyframes abwalk { 50% { translate: 0 -4px; rotate: -4deg; } }
.abot-pill:not(.moving) .abot-face { animation: abfloat 3.6s ease-in-out infinite; }
@keyframes abfloat { 50% { translate: 0 -3px; } }
/* the glass face: same family as the loader lens — a silver orb with a bright rim */
.abot-face { --lx: 0; --ly: 0; position: relative; display: block; width: 100%; height: 100%; border-radius: 50%;
  background: radial-gradient(circle at 32% 26%, #fff 0 8%, transparent 22%),
    radial-gradient(circle at 70% 82%, rgba(255,255,255,.55), transparent 38%),
    radial-gradient(circle at 50% 55%, #d9dade 0%, #a9abb2 55%, #5d6068 100%);
  box-shadow: inset 0 -6px 12px rgba(0,0,0,.28), inset 0 3px 6px rgba(255,255,255,.8), 0 0 0 1px rgba(255,255,255,.45), 0 12px 26px -10px rgba(0,0,0,.55); }
.abot-face::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(from 200deg, transparent, rgba(255,106,47,.18), transparent 30%, rgba(80,140,255,.16), transparent 60%); mix-blend-mode: overlay; }
.ab-eye { position: absolute; top: 34%; width: 15%; height: 24%; border-radius: 50%; background: #121214;
  translate: calc(var(--lx) * 18%) calc(var(--ly) * 14%); transition: translate .18s ease-out, scale .08s; }
.ab-eye:nth-child(1) { left: 30%; } .ab-eye:nth-child(2) { right: 30%; }
.ab-eye::after { content: ""; position: absolute; left: 22%; top: 16%; width: 38%; height: 30%; border-radius: 50%; background: #fff; }
.abot-face.blink .ab-eye { scale: 1 .12; }
.ab-mouth { position: absolute; left: 50%; top: 64%; width: 16%; height: 8%; translate: calc(-50% + var(--lx) * 10%) 0; border-radius: 0 0 50% 50% / 0 0 100% 100%; background: #121214; transition: height .15s; }
.abot-pill.talking .ab-mouth { animation: abtalk .28s ease-in-out 6 alternate; }
@keyframes abtalk { to { height: 13%; } }
.abot-av .abot-face { width: 100%; height: 100%; }
.abot-av:has(.abot-face) { background: none; }
.abot-tip { position: absolute; bottom: calc(100% + 10px); right: 0; width: max-content; max-width: min(240px, 70vw); padding: 9px 12px; border-radius: 14px 14px 4px 14px;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line-strong); box-shadow: 0 14px 30px -14px rgba(0,0,0,.5); font-size: 13.5px; line-height: 1.45; text-align: start;
  opacity: 0; translate: 0 6px; pointer-events: none; transition: opacity .3s, translate .3s var(--ease); }
[dir="rtl"] .abot-tip { right: auto; left: 0; border-radius: 14px 14px 14px 4px; }
.abot-pill.talking .abot-tip { opacity: 1; translate: none; }
[dir="rtl"] .abot-pill { right: auto; left: 22px; }
.vmode-on .abot-pill, .presenting .abot-pill, .chaos .abot-pill { display: none; }
.abot-head { display: flex; align-items: center; gap: 10px; }
.abot-av { width: 34px; height: 34px; border-radius: 50%; background: var(--ink); color: var(--bg); display: grid; place-items: center; font: 700 13px "Plus Jakarta Sans", sans-serif; position: relative; }
.abot-av::after { content: ""; position: absolute; right: -1px; bottom: -1px; width: 10px; height: 10px; border-radius: 50%; background: var(--ok); border: 2px solid var(--surface); }
.abot-name { font-size: 12px; color: var(--muted); }
:root[lang="ar"] .abot-name { font-family: var(--font-sans); }
.abot-x { margin-inline-start: auto; width: 30px; height: 30px; border-radius: 50%; border: 0; background: transparent; color: var(--muted); font-size: 14px; cursor: pointer; }
.abot-x:hover { background: var(--surface-2); color: var(--ink); }
.abot-msg { margin: 12px 2px 14px; font-size: 15.5px; line-height: 1.5; min-height: 3em; }
.abot-caret { display: inline-block; width: 2px; height: 1em; margin-inline-start: 2px; vertical-align: -2px; background: var(--accent); animation: blink 1s steps(1) infinite; }
.abot.typed .abot-caret { display: none; }
.abot-actions { display: none; flex-wrap: wrap; gap: 8px; align-items: center; }
.abot.typed .abot-actions { display: flex; animation: abin .4s ease both; }
@keyframes abin { from { opacity: 0; translate: 0 6px; } }
.abot-later { border: 0; background: none; color: var(--muted); font-size: 13px; cursor: pointer; padding: 6px 4px; }
.abot-later:hover { color: var(--ink); }

.vmode { position: fixed; inset: 0; z-index: 220; background: #000; opacity: 0; transition: opacity .3s ease; display: grid; place-items: center; }
.vmode[hidden] { display: none; }
.vmode.on { opacity: 1; }
.vmode-on, .vmode-on body { overflow: hidden; }
.vm-video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.vm-top, .vm-bar { position: absolute; left: 0; right: 0; display: flex; align-items: center; gap: 14px; padding: 18px 22px; color: #f2f2f2;
  transition: opacity .35s ease; opacity: 0; pointer-events: none; }
.vmode.ui .vm-top, .vmode.ui .vm-bar { opacity: 1; pointer-events: auto; }
.vm-top { top: 0; background: linear-gradient(rgba(0,0,0,.7), transparent); }
.vm-bar { bottom: 0; background: linear-gradient(transparent, rgba(0,0,0,.75)); }
.vm-title { font: 600 15px var(--font-display); }
.vm-btn { min-width: 40px; height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.08); color: #fff; font: 500 13px var(--font-sans); cursor: pointer; }
.vm-btn:hover { background: rgba(255,255,255,.18); }
.vm-close { margin-inline-start: auto; }
.vm-track { flex: 1; height: 4px; border-radius: 4px; background: rgba(255,255,255,.2); cursor: pointer; overflow: hidden; }
.vm-track i { display: block; height: 100%; background: var(--accent); transform-origin: left; transform: scaleX(0); }
.vm-time { font-size: 12.5px; color: #c7c7cc; min-width: 40px; }
.vm-big { position: absolute; left: 50%; top: 50%; translate: -50% -50%; width: 88px; height: 88px; border-radius: 50%; border: 0; background: var(--accent); color: #000; font-size: 28px; padding-left: 6px; cursor: pointer; opacity: 0; pointer-events: none; transition: opacity .25s, scale .25s; box-shadow: 0 0 0 12px rgba(255,106,47,.18); }
.vmode.paused .vm-big { opacity: 1; pointer-events: auto; }
.vm-sound { width: 44px; padding: 0; font-size: 18px; }
.vm-rotate { position: absolute; left: 0; right: 0; bottom: 96px; text-align: center; font-size: 13px; color: #8e8e93; display: none; }
@media (orientation: portrait) and (pointer: coarse) { .vm-rotate { display: block; } .vm-top, .vm-bar { padding: 14px 16px calc(14px + env(safe-area-inset-bottom)); } }
@media (orientation: landscape) and (pointer: coarse) { .vm-top { padding-top: max(14px, env(safe-area-inset-top)); } }
.vm-end { position: absolute; left: 50%; bottom: 110px; translate: -50% 0; display: flex; gap: 12px; }
.vm-end[hidden] { display: none; }
.vm-end .btn-ghost { color: #fff; border-color: rgba(255,255,255,.35); }
@media (max-width: 680px) { .sb-intro span:last-child { display: none; } .abot, [dir="rtl"] .abot { right: 12px; left: 12px; width: auto; } }

@media (max-width: 1020px) {
  .toplinks { display: none; }
  .toplinks + .top-actions { margin-inline-start: auto; }
  .projects { grid-template-columns: 1fr 1fr; }
  .project--easycal { grid-column: span 2; }
  .project--easycal .project-visual { aspect-ratio: 16 / 7; }
  .play-grid { grid-template-columns: 1fr; }
  .play--rules { display: flex; }
  .play--rules .rule-form { grid-template-columns: repeat(3, 1fr); }
  .cred-grid { grid-template-columns: 1fr; }
  .certs { grid-row: auto; }
}
@media (max-width: 680px) {
  .topbar { height: 60px; }
  .eyebrow { font-size: 11.5px; }
  .top-actions .btn-sm span { display: none; }
  .top-actions .btn-sm { width: 38px; padding: 0; justify-content: center; }
  .hero { padding-top: 96px; align-items: flex-start; }
  .hero-title .line-2 { padding-inline-start: 0; }
  .hero-hint { display: none; }
  .scroll-cue { display: none; }
  .projects { grid-template-columns: 1fr; }
  .project--easycal { grid-column: auto; }
  .project--easycal .project-visual { aspect-ratio: 16 / 11; }
  .date { margin-inline-start: 0; width: 100%; }
  .commit { grid-template-columns: 18px 1fr; gap: 12px; }
  .gitlog::before { inset-inline-start: 8px; }
  .commit-dot { inset-inline-start: 0; }
  .rule-form, .play--rules .rule-form { grid-template-columns: 1fr; }
  .certs { grid-template-columns: 1fr; }
  .skills { grid-template-columns: 1fr; }
  .sb-ok, .sb-label, .sb-branch span, .sb-motion span:last-child { display: none; }
  .sb-item { padding-inline: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
  .reveal { opacity: 1; translate: none; }
  .wr > span { transform: none !important; }
  .statement-text .w { opacity: 1; }
}

/* Bottom status bar removed from view (kept in the DOM for the scripts that read it). */
.statusbar { display: none !important; }

/* ───────── No "tech" fonts: labels use the normal sans; only the terminal and code keep a code font ───────── */
.term, .term *, code, kbd, .term-out { font-family: var(--font-code) !important; }
.mono { letter-spacing: .005em; }
.kicker, .eyebrow { text-transform: none; letter-spacing: .01em; font-weight: 500; }

/* ───────── Header: one calm glass bar, grouped controls ───────── */
.topbar { height: 72px; }
.topbar .logo-mark { font: 800 22px/1 "Plus Jakarta Sans", var(--font-sans); letter-spacing: -.03em; }
.toplinks a { font: 500 14.5px/1 var(--font-sans); letter-spacing: 0; padding: 9px 14px; border-radius: 999px; color: var(--muted); transition: color .2s, background-color .2s; }
.toplinks a:hover { color: var(--ink); background: color-mix(in srgb, var(--ink) 6%, transparent); }
.toplinks a.is-active { color: var(--ink); background: color-mix(in srgb, var(--ink) 8%, transparent); }
.top-actions { display: flex; align-items: center; gap: 8px; }
/* the three small controls sit together in one soft pill */
.top-tools { display: flex; align-items: center; padding: 3px; gap: 2px; border-radius: 999px;
  background: color-mix(in srgb, var(--ink) 5%, transparent); border: 1px solid var(--line); }
.top-tools .icon-btn { width: 34px; height: 34px; border: 0; background: transparent; color: var(--muted); }
.top-tools .icon-btn:hover { color: var(--ink); background: color-mix(in srgb, var(--ink) 8%, transparent); }
.top-tools .icon-btn svg { width: 17px; height: 17px; stroke-width: 1.7; }
.top-tools .icon-btn[aria-pressed="true"] { color: var(--accent-ink); }
.top-tools .lang-btn { width: auto; padding-inline: 11px; }
.lang-label { font: 600 13.5px/1 var(--font-sans) !important; letter-spacing: 0; }
.top-actions .btn-cv { --h: 40px; padding-inline: 18px; font: 600 14px/1 var(--font-sans); gap: 8px; }
.top-actions .btn-cv svg { width: 16px; height: 16px; }
@media (max-width: 560px) { .top-actions .btn-cv span { display: none; } .top-actions .btn-cv { padding-inline: 12px; } }
/* the new font sits lower: give revealed words room so descenders are not clipped */
:root:not([lang="ar"]) .wr { padding-bottom: .14em; margin-bottom: -.14em; }

/* ───────── One liquid background behind the whole site; every section follows light/dark ───────── */
.page-liquid { position: fixed; inset: 0; width: 100vw; height: 100lvh; z-index: -1; display: block; pointer-events: none; }
.page-liquid.no-gl { background: radial-gradient(60% 70% at 75% 35%, color-mix(in srgb, var(--ink) 10%, transparent), transparent 70%); }
.section-alt { background: transparent; }
.contact { background: transparent; color: var(--ink); }
.contact .btn-solid:hover { background: var(--ink); color: var(--bg); }
.contact .btn-ghost { border-color: var(--line-strong); color: var(--ink); }
.contact .btn-ghost:hover { border-color: var(--ink); }
.footer { border-top-color: var(--line); }
.hero-title, .hero-title * { color: var(--ink); }
.hero-spot { display: none; }

/* contact form follows the theme too */
.cform { --f-bg: color-mix(in srgb, var(--ink) 4%, transparent); --f-line: color-mix(in srgb, var(--ink) 16%, transparent);
  background: color-mix(in srgb, var(--surface) 72%, transparent); color: var(--ink); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.field input, .field textarea { color: var(--ink); }
.topic span:hover { border-color: color-mix(in srgb, var(--ink) 45%, transparent); }

/* ───────── AB as a liquid drop ───────── */
.abot-pill { width: 68px; height: 68px; }
.abot-face.liquid, .abot-face.liquid-flat { background: none; box-shadow: none; filter: drop-shadow(0 10px 14px rgba(0,0,0,.35)); }
.abot-face.liquid::after, .abot-face.liquid-flat::after { display: none; }
.abot-face.liquid-flat { border-radius: 58% 42% 55% 45% / 48% 56% 44% 52%; background: radial-gradient(circle at 30% 26%, #6a6b72, #0c0c10 60%); }
.ab-blob { position: absolute; inset: -14%; width: 128%; height: 128%; display: block; pointer-events: none; }
.abot-face.liquid .ab-blob { display: block; } .abot-face.liquid-flat .ab-blob { display: none; }
.abot-face.liquid .ab-eye, .abot-face.liquid-flat .ab-eye { background: #fff; top: 37%; width: 11.5%; height: 25%; border-radius: 99px; box-shadow: 0 0 6px rgba(255,255,255,.35);
  translate: calc(var(--lx) * 34%) calc(var(--ly) * 22%); transition: translate .16s ease-out, scale .08s, height .2s var(--ease), border-radius .2s, rotate .2s; }
.abot-face.liquid .ab-eye:nth-of-type(1), .abot-face.liquid-flat .ab-eye:nth-of-type(1) { left: 32.5%; }
.abot-face.liquid .ab-eye:nth-of-type(2), .abot-face.liquid-flat .ab-eye:nth-of-type(2) { right: 32.5%; }
.abot-face.liquid .ab-eye::after, .abot-face.liquid-flat .ab-eye::after, .abot-face.liquid .ab-mouth, .abot-face.liquid-flat .ab-mouth { display: none; }
/* feelings */
.abot-face.feel-happy .ab-eye { height: 13%; top: 42%; border-radius: 99px 99px 3px 3px; }
.abot-face.feel-sorry .ab-eye:nth-of-type(1) { rotate: 16deg; height: 20%; } .abot-face.feel-sorry .ab-eye:nth-of-type(2) { rotate: -16deg; height: 20%; }
.abot-face.feel-think .ab-eye { height: 18%; }
.abot-pill:hover .abot-face { scale: 1.06; transition: scale .25s var(--ease); }
.abot-av:has(.liquid), .abot-av:has(.liquid-flat) { width: 40px; height: 40px; cursor: pointer; }
.abot-av::after { display: none; }

/* "Break this page" lives in the footer now; touch screens get no cursor hint */
.foot-links { display: inline-flex; align-items: center; gap: 18px; }
.foot-break { font: inherit; color: var(--accent-ink); background: none; border: 0; padding: 0; cursor: pointer; border-bottom: 1px dashed currentColor; }
.foot-break:hover { border-bottom-style: solid; }
@media (hover: none), (pointer: coarse) { .hero-hint { display: none; } }

/* phones: keep the footer links clear of AB in the corner */
@media (max-width: 700px) { .footer { padding-bottom: 96px; } }

.cform-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* ───────── Accessibility: readable contrast everywhere (WCAG AA) ───────── */
/* white text on orange needs a deeper orange in light mode */
:root:not([data-theme="dark"]) .contact .btn-solid, :root:not([data-theme="dark"]) .cform-submit, :root:not([data-theme="dark"]) .topic input:checked + span { background: #cc4410; border-color: #cc4410; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .contact .btn-solid, :root:not([data-theme="light"]) .cform-submit, :root:not([data-theme="light"]) .topic input:checked + span { background: var(--accent); border-color: var(--accent); } }
.cform-note, .cform-topics legend { opacity: 1; color: var(--muted); }
.field label { opacity: 1; color: var(--muted); }
.field-count { opacity: 1; color: var(--muted); }
.footer { opacity: 1; color: var(--muted); }
.footer a { color: var(--ink); }

/* ───────── Mac-style cursor, drawn by the browser itself (never lags or disappears) ───────── */
:root { --cur-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 28 28'%3E%3Cdefs%3E%3Cfilter id='s' x='-30%25' y='-30%25' width='160%25' height='160%25'%3E%3CfeDropShadow dx='0' dy='1' stdDeviation='.9' flood-opacity='.35'/%3E%3C/filter%3E%3C/defs%3E%3Cg filter='url%28%23s%29'%3E%3Cpath d='M5 3 L5 22.5 L9.6 18.2 L12.9 25.6 L16.2 24.1 L13 16.9 L19.4 16.9 Z' fill='%23111' stroke='%23fff' stroke-width='1.7' stroke-linejoin='round'/%3E%3C/g%3E%3C/svg%3E") 5 3, auto; --cur-hand: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'%3E%3Cdefs%3E%3Cfilter id='s' x='-30%25' y='-30%25' width='160%25' height='160%25'%3E%3CfeDropShadow dx='0' dy='1' stdDeviation='.9' flood-opacity='.35'/%3E%3C/filter%3E%3C/defs%3E%3Cg filter='url%28%23s%29'%3E%3Cpath d='M11.2 4.2c1.3 0 2.2 1 2.2 2.3v6.2l.6-.1c.9-.1 1.7.2 2.1.9l.4-.1c1-.2 1.9.2 2.3 1l.4-.1c1.3-.2 2.6.8 2.6 2.2v4.3c0 3.9-2.7 6.6-6.5 6.6h-1.6c-2 0-3.5-.9-4.6-2.4L6.2 19.6c-.7-1-.4-2.3.6-2.9.9-.5 2-.3 2.6.5L9 18.1V6.5c0-1.3.9-2.3 2.2-2.3z' fill='%23ff5a1f' stroke='%23fff' stroke-width='1.5' stroke-linejoin='round'/%3E%3Cpath d='M13.4 13v4.6M16.4 13.6v4M19.2 14.6v3.2' stroke='%23111' stroke-width='1' stroke-linecap='round' opacity='.6'/%3E%3C/g%3E%3C/svg%3E") 11 5, pointer; --cur-text: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='28' viewBox='0 0 16 28'%3E%3Cdefs%3E%3Cfilter id='s' x='-30%25' y='-30%25' width='160%25' height='160%25'%3E%3CfeDropShadow dx='0' dy='1' stdDeviation='.9' flood-opacity='.35'/%3E%3C/filter%3E%3C/defs%3E%3Cg filter='url%28%23s%29'%3E%3Cpath d='M4 3.5h3c1 0 1.5.6 1.5.6s.5-.6 1.5-.6h3M8.5 4.1v19.8M4 24.5h3c1 0 1.5-.6 1.5-.6s.5.6 1.5.6h3' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round'/%3E%3Cpath d='M4 3.5h3c1 0 1.5.6 1.5.6s.5-.6 1.5-.6h3M8.5 4.1v19.8M4 24.5h3c1 0 1.5-.6 1.5-.6s.5.6 1.5.6h3' fill='none' stroke='%23111' stroke-width='1.4' stroke-linecap='round'/%3E%3C/g%3E%3C/svg%3E") 8 14, text; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --cur-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 28 28'%3E%3Cdefs%3E%3Cfilter id='s' x='-30%25' y='-30%25' width='160%25' height='160%25'%3E%3CfeDropShadow dx='0' dy='1' stdDeviation='.9' flood-opacity='.35'/%3E%3C/filter%3E%3C/defs%3E%3Cg filter='url%28%23s%29'%3E%3Cpath d='M5 3 L5 22.5 L9.6 18.2 L12.9 25.6 L16.2 24.1 L13 16.9 L19.4 16.9 Z' fill='%23fff' stroke='%23111' stroke-width='1.7' stroke-linejoin='round'/%3E%3C/g%3E%3C/svg%3E") 5 3, auto; --cur-text: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='28' viewBox='0 0 16 28'%3E%3Cdefs%3E%3Cfilter id='s' x='-30%25' y='-30%25' width='160%25' height='160%25'%3E%3CfeDropShadow dx='0' dy='1' stdDeviation='.9' flood-opacity='.35'/%3E%3C/filter%3E%3C/defs%3E%3Cg filter='url%28%23s%29'%3E%3Cpath d='M4 3.5h3c1 0 1.5.6 1.5.6s.5-.6 1.5-.6h3M8.5 4.1v19.8M4 24.5h3c1 0 1.5-.6 1.5-.6s.5.6 1.5.6h3' fill='none' stroke='%23111' stroke-width='3' stroke-linecap='round'/%3E%3Cpath d='M4 3.5h3c1 0 1.5.6 1.5.6s.5-.6 1.5-.6h3M8.5 4.1v19.8M4 24.5h3c1 0 1.5-.6 1.5-.6s.5.6 1.5.6h3' fill='none' stroke='%23fff' stroke-width='1.4' stroke-linecap='round'/%3E%3C/g%3E%3C/svg%3E") 8 14, text; } }
:root[data-theme="dark"] { --cur-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 28 28'%3E%3Cdefs%3E%3Cfilter id='s' x='-30%25' y='-30%25' width='160%25' height='160%25'%3E%3CfeDropShadow dx='0' dy='1' stdDeviation='.9' flood-opacity='.35'/%3E%3C/filter%3E%3C/defs%3E%3Cg filter='url%28%23s%29'%3E%3Cpath d='M5 3 L5 22.5 L9.6 18.2 L12.9 25.6 L16.2 24.1 L13 16.9 L19.4 16.9 Z' fill='%23fff' stroke='%23111' stroke-width='1.7' stroke-linejoin='round'/%3E%3C/g%3E%3C/svg%3E") 5 3, auto; --cur-text: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='28' viewBox='0 0 16 28'%3E%3Cdefs%3E%3Cfilter id='s' x='-30%25' y='-30%25' width='160%25' height='160%25'%3E%3CfeDropShadow dx='0' dy='1' stdDeviation='.9' flood-opacity='.35'/%3E%3C/filter%3E%3C/defs%3E%3Cg filter='url%28%23s%29'%3E%3Cpath d='M4 3.5h3c1 0 1.5.6 1.5.6s.5-.6 1.5-.6h3M8.5 4.1v19.8M4 24.5h3c1 0 1.5-.6 1.5-.6s.5.6 1.5.6h3' fill='none' stroke='%23111' stroke-width='3' stroke-linecap='round'/%3E%3Cpath d='M4 3.5h3c1 0 1.5.6 1.5.6s.5-.6 1.5-.6h3M8.5 4.1v19.8M4 24.5h3c1 0 1.5-.6 1.5-.6s.5.6 1.5.6h3' fill='none' stroke='%23fff' stroke-width='1.4' stroke-linecap='round'/%3E%3C/g%3E%3C/svg%3E") 8 14, text; }
@media (hover: hover) and (pointer: fine) {
  html, body { cursor: var(--cur-arrow); }
  a, button, label, summary, select, [role="button"], [data-action], .topic span, .palette-list li, .abot-pill, .abot-av { cursor: var(--cur-hand); }
  input:not([type=range]):not([type=checkbox]):not([type=radio]), textarea, [contenteditable="true"], .term { cursor: var(--cur-text); }
}
.cursor { display: none !important; }

/* bigger AB logo in the header */
.topbar .logo-mark { font-size: 30px; }
.topbar .logo-dot { width: 10px; height: 10px; margin-bottom: 5px; }
@media (max-width: 560px) { .topbar .logo-mark { font-size: 27px; } }

/* footer + contact leftovers from the old inverted (dark) contact block: follow the theme */
.signmark--end { color: var(--ink); }
.email-btn { border-bottom-color: var(--line-strong); }
