/* ==========================================================================
   Guy Feniger — personal site
   Hebrew, RTL, no build step. Colors live in tokens; dark mode swaps them.
   ========================================================================== */

/* Fonts are served from this site (no third-party requests). IBM Plex, SIL Open Font License. */

@font-face {
  font-family: "IBM Plex Sans Hebrew";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/plex-hebrew-hebrew-400.woff2") format("woff2");
  unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F;
}

@font-face {
  font-family: "IBM Plex Sans Hebrew";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/plex-hebrew-latin-400.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "IBM Plex Sans Hebrew";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/plex-hebrew-hebrew-500.woff2") format("woff2");
  unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F;
}

@font-face {
  font-family: "IBM Plex Sans Hebrew";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/plex-hebrew-latin-500.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "IBM Plex Sans Hebrew";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/plex-hebrew-hebrew-600.woff2") format("woff2");
  unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F;
}

@font-face {
  font-family: "IBM Plex Sans Hebrew";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/plex-hebrew-latin-600.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "IBM Plex Sans Hebrew";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/plex-hebrew-hebrew-700.woff2") format("woff2");
  unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F;
}

@font-face {
  font-family: "IBM Plex Sans Hebrew";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/plex-hebrew-latin-700.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/plex-mono-latin-500.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --font: "IBM Plex Sans Hebrew", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-xl: 30px;

  --container: 1200px;
  --gutter: clamp(16px, 4vw, 32px);
  --header-h: 72px;

  /* light theme */
  --bg: #f5f7fc;
  --surface: #ffffff;
  --surface-2: #eef2f9;
  --ink: #0a1128;
  --ink-2: #353e5c;
  --muted: #646d8c;
  --line: #e2e7f1;
  --brand: #3355ff;
  --brand-strong: #2140e6;
  --brand-2: #0891b2;
  --brand-soft: #e8edff;
  /* gradient text: darker stops in light mode, so the hero's small "Full-Stack"/"AI" reach 4.5:1 */
  --grad-from: var(--brand-strong);
  --grad-to: #0e7490;
  --ok: #10b981;
  --ok-text: #047857;
  --danger-text: #b91c1c;
  --header-bg: rgba(245, 247, 252, 0.8);
  --glass: rgba(255, 255, 255, 0.78);
  --glass-line: rgba(255, 255, 255, 0.9);
  --grid-dot: rgba(10, 17, 40, 0.12);
  --visual-bg: linear-gradient(160deg, #e9eeff 0%, #f3f6fc 55%, #e6f7fb 100%);
  --shadow-sm: 0 1px 2px rgba(10, 17, 40, 0.05), 0 1px 1px rgba(10, 17, 40, 0.03);
  --shadow-md: 0 12px 32px -14px rgba(10, 17, 40, 0.2);
  --shadow-lg: 0 34px 70px -28px rgba(10, 17, 40, 0.38);
  --logo-filter: grayscale(1);
  --logo-opacity: 0.72;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #060a18;
  --surface: #0d1329;
  --surface-2: #131b36;
  --ink: #eef2ff;
  --ink-2: #c1c8de;
  --muted: #8b94b3;
  --line: #212a47;
  --brand: #7d93ff;
  --brand-strong: #9aabff;
  --brand-2: #3fd3ee;
  --brand-soft: #18214d;
  --grad-from: var(--brand);
  --grad-to: var(--brand-2);
  --ok: #34d399;
  --ok-text: #34d399;
  --danger-text: #f87171;
  --header-bg: rgba(6, 10, 24, 0.74);
  --glass: rgba(19, 27, 54, 0.72);
  --glass-line: rgba(255, 255, 255, 0.08);
  --grid-dot: rgba(200, 212, 255, 0.12);
  --visual-bg: linear-gradient(160deg, #111a3d 0%, #0d1329 55%, #0b2230 100%);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 14px 34px -14px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 36px 80px -28px rgba(0, 0, 0, 0.75);
  --logo-filter: brightness(0) invert(1);
  --logo-opacity: 0.78;
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #060a18;
    --surface: #0d1329;
    --surface-2: #131b36;
    --ink: #eef2ff;
    --ink-2: #c1c8de;
    --muted: #8b94b3;
    --line: #212a47;
    --brand: #7d93ff;
    --brand-strong: #9aabff;
    --brand-2: #3fd3ee;
    --brand-soft: #18214d;
    --grad-from: var(--brand);
    --grad-to: var(--brand-2);
    --ok: #34d399;
    --ok-text: #34d399;
    --danger-text: #f87171;
    --header-bg: rgba(6, 10, 24, 0.74);
    --glass: rgba(19, 27, 54, 0.72);
    --glass-line: rgba(255, 255, 255, 0.08);
    --grid-dot: rgba(200, 212, 255, 0.12);
    --visual-bg: linear-gradient(160deg, #111a3d 0%, #0d1329 55%, #0b2230 100%);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 14px 34px -14px rgba(0, 0, 0, 0.6);
    --shadow-lg: 0 36px 80px -28px rgba(0, 0, 0, 0.75);
    --logo-filter: brightness(0) invert(1);
    --logo-opacity: 0.78;
    color-scheme: dark;
  }
}

/* the system's "increase contrast" setting: darker secondary text, and borders at 3:1 */
@media (prefers-contrast: more) {
  :root {
    --muted: #4a5270;
    --line: #8a95ad;
  }

  :root[data-theme="dark"] {
    --muted: #b3bbd4;
    --line: #5a6690;
  }
}

@media (prefers-contrast: more) and (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --muted: #b3bbd4;
    --line: #5a6690;
  }
}

/* ---------- base ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
  /* the fixed corner buttons (accessibility, back to top) take the bottom 76px: tabbing to a
     link down there scrolls it clear of them instead of under them */
  scroll-padding-bottom: 88px;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* "hidden" always wins, so a closed menu or panel is out of both the layout and the accessibility tree,
   even when its class sets display: flex or grid */
[hidden] {
  display: none !important;
}

img,
svg {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
}

h1,
h2,
h3,
h4 {
  line-height: 1.2;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  border-radius: 6px;
}

::selection {
  background: var(--brand);
  color: #fff;
}

.container {
  width: min(100% - 2 * var(--gutter), var(--container));
  margin-inline: auto;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  inset-inline-start: 16px;
  top: 12px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--ink);
  color: var(--bg);
  font-weight: 600;
  /* hidden by its own height, not a fixed -60px, which larger text outgrew and left peeking in */
  transform: translateY(calc(-100% - 20px));
  transition: transform 0.2s;
}

.skip-link:focus {
  transform: none;
}

.icon {
  width: 20px;
  height: 20px;
  flex: none;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon--sm {
  width: 16px;
  height: 16px;
}

.icon--lg {
  width: 24px;
  height: 24px;
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.ltr {
  direction: ltr;
  unicode-bidi: isolate;
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 24px;
  border: 1px solid transparent;
  border-radius: 14px;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, border-color 0.2s ease,
    color 0.2s ease;
}

@media (hover: hover) {
  .btn:hover {
    transform: translateY(-2px);
  }
}

.btn:active {
  transform: translateY(0);
}

.btn--primary {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 14px 28px -14px var(--brand);
}

.btn--primary:hover {
  background: var(--brand-strong);
  box-shadow: 0 18px 32px -14px var(--brand);
}

:root[data-theme="dark"] .btn--primary,
:root[data-theme="dark"] .btn--primary:hover {
  color: #060a18;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .btn--primary,
  :root:not([data-theme="light"]) .btn--primary:hover {
    color: #060a18;
  }
}

.btn--ghost {
  background: var(--surface);
  border-color: var(--line);
  color: var(--ink);
}

.btn--ghost:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.btn .icon {
  transition: transform 0.2s ease;
}

.btn:hover .icon--nudge {
  transform: translateX(-4px);
}

.link-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.95rem;
  background: var(--ink);
  color: var(--bg);
  border: 1px solid var(--ink);
  transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease;
  cursor: pointer;
}

.link-btn:hover {
  transform: translateY(-2px);
}

.link-btn--line {
  background: transparent;
  border-color: var(--line);
  color: var(--ink-2);
}

.link-btn--line:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.note {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--muted);
}

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease, background-color 0.3s ease;
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: var(--header-h); /* grows with the accessibility menu's larger text instead of pushing links out of view */
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 1.08rem;
}

.brand__mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff;
  font-family: var(--mono);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: -0.04em;
  box-shadow: 0 8px 18px -10px var(--brand);
}

.brand__text small {
  display: block;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--muted);
  line-height: 1.2;
}

.brand__text span {
  display: block;
  line-height: 1.2;
}

.nav__links {
  display: flex;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav__links a {
  display: block;
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--ink-2);
  font-weight: 500;
  font-size: 0.98rem;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.nav__links a:hover {
  color: var(--ink);
  background: var(--surface-2);
}

.nav__links a.is-active {
  color: var(--brand);
  background: var(--brand-soft);
}

.nav__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-2);
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.icon-btn:hover {
  color: var(--brand);
  border-color: var(--brand);
}

.theme-toggle .icon-moon,
:root[data-theme="dark"] .theme-toggle .icon-sun {
  display: none;
}

:root[data-theme="dark"] .theme-toggle .icon-moon {
  display: block;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun {
    display: none;
  }

  :root:not([data-theme="light"]) .theme-toggle .icon-moon {
    display: block;
  }
}

.nav__cta {
  min-height: 42px;
  padding: 0 18px;
  border-radius: 12px;
  font-size: 0.95rem;
}

.menu-toggle {
  display: none;
}

.menu-toggle .icon-close,
.menu-toggle[aria-expanded="true"] .icon-menu {
  display: none;
}

.menu-toggle[aria-expanded="true"] .icon-close {
  display: block;
}

.mobile-menu {
  /* the header is sticky, so on a short (landscape) screen the menu scrolls inside itself */
  max-height: calc(100vh - var(--header-h));
  max-height: calc(100dvh - var(--header-h));
  overflow-y: auto;
  overscroll-behavior: contain;
  border-top: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.mobile-menu ul {
  display: grid;
  gap: 4px;
  margin: 0 auto;
  padding: 12px 0 18px;
  list-style: none;
}

.mobile-menu a:not(.btn) {
  display: block;
  padding: 12px 14px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 1.05rem;
}

.mobile-menu a:not(.btn):hover,
.mobile-menu a.is-active {
  background: var(--brand-soft);
  color: var(--brand);
}

.mobile-menu__cta {
  padding-top: 10px;
}

.mobile-menu__cta .btn {
  width: 100%;
  white-space: normal;
  text-align: center;
  line-height: 1.3;
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(40px, 7vw, 96px) 0 clamp(56px, 8vw, 112px);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(var(--grid-dot) 1px, transparent 1px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(ellipse 75% 65% at 35% 40%, #000 25%, transparent 75%);
  mask-image: radial-gradient(ellipse 75% 65% at 35% 40%, #000 25%, transparent 75%);
  pointer-events: none;
}

.hero__glow {
  position: absolute;
  top: -180px;
  inset-inline-end: -160px;
  width: 720px;
  height: 720px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--brand) 0%, transparent 62%);
  opacity: 0.22;
  filter: blur(40px);
  pointer-events: none;
}

.hero__glow--2 {
  top: auto;
  bottom: -320px;
  inset-inline-end: auto;
  inset-inline-start: -200px;
  background: radial-gradient(circle, var(--brand-2) 0%, transparent 62%);
  opacity: 0.14;
}

.hero__inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(32px, 6vw, 88px);
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 16px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  color: var(--ink-2);
  font-size: 0.92rem;
  font-weight: 500;
}

.pulse {
  position: relative;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--ok);
}

.pulse::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid var(--ok);
  opacity: 0;
  animation: ping 2.2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

/* in the hero it pings a few times on arrival and then rests */
.hero .pulse::after {
  animation-iteration-count: 4;
}

@keyframes ping {
  0% {
    transform: scale(0.6);
    opacity: 0.8;
  }
  100% {
    transform: scale(1.8);
    opacity: 0;
  }
}

.hero h1 {
  margin: 22px 0 6px;
  font-size: clamp(3rem, 7.2vw, 5.5rem);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.025em;
}

.hero__role {
  margin: 0 0 10px;
  font-size: clamp(1.45rem, 3vw, 2.3rem);
  font-weight: 600;
  line-height: 1.25;
  color: var(--ink-2);
  text-wrap: balance;
}

.hero__value {
  margin: 0 0 16px;
  font-size: clamp(1.15rem, 2vw, 1.5rem);
  font-weight: 600;
  line-height: 1.45;
  color: var(--ink);
  text-wrap: balance;
}

/* a highlighter stroke under the key words */
.hero__mark {
  padding-inline: 2px;
  white-space: nowrap;
  color: var(--brand-strong); /* --brand fell to 3.95:1 over the hero glow on phones */
  background: linear-gradient(var(--brand-soft), var(--brand-soft)) 0 88% / 100% 36% no-repeat;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.hero__proof {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 0;
  margin: 0 0 28px;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.35;
}

.hero__proof li {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding-inline-end: 16px;
}

.hero__proof li + li {
  padding-inline-start: 16px;
  border-inline-start: 1px solid var(--line);
}

.hero__proof li:last-child {
  padding-inline-end: 0;
}

.hero__proof b {
  color: var(--ink);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.hero__more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 52px;
  padding: 0 6px;
  color: var(--ink-2);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--ink-2) 35%, transparent);
  text-underline-offset: 5px;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.hero__more:hover {
  color: var(--brand);
  text-decoration-color: currentColor;
}

.hero__more .icon {
  transition: transform 0.2s ease;
}

/* the hero paints at once (no JS reveal, so the largest paint isn't delayed);
   the text only glides into place from slightly lower, and never starts invisible */
.hero__text > * {
  animation: hero-rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.hero__text > :nth-child(3),
.hero__text > :nth-child(4) {
  animation-delay: 0.06s;
}

.hero__text > :nth-child(5),
.hero__text > :nth-child(6) {
  animation-delay: 0.12s;
}

.hero__text > :nth-child(n + 7) {
  animation-delay: 0.18s;
}

@keyframes hero-rise {
  from {
    opacity: 0.35;
    transform: translateY(14px);
  }
}

.gradient-text {
  background: linear-gradient(90deg, var(--grad-from, var(--brand)), var(--grad-to, var(--brand-2)));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* on phones the hero glow sits right behind the role line: a darker end colour keeps 4.5:1
   (the dark themes set their own --grad-to on selectors that outrank this one) */
@media (max-width: 560px) {
  :root {
    --grad-to: #155e75;
  }
}

.hero__lead {
  max-width: 44ch;
  margin: 0 0 34px;
  font-size: clamp(1.08rem, 1.55vw, 1.24rem);
  color: var(--ink-2);
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 22px;
  margin-top: 38px;
  color: var(--muted);
  font-size: 0.95rem;
}

.hero__meta .note {
  font-size: 0.95rem;
  color: var(--ink-2); /* --muted fell to 4.3:1 over the hero glow */
}

.socials {
  display: flex;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.socials a {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-2);
  transition: color 0.2s ease, border-color 0.2s ease, translate 0.2s ease;
}

.socials a:hover {
  color: var(--brand);
  border-color: var(--brand);
}

/* portrait */

.portrait {
  position: relative;
  justify-self: center;
  width: min(100%, 430px);
}

.portrait__frame {
  position: relative;
  padding: 6px;
  border-radius: 34px;
  background: linear-gradient(150deg, var(--brand), var(--brand-2) 55%, var(--line) 100%);
  box-shadow: var(--shadow-lg);
  transform: rotate(-2deg);
}

.portrait__frame img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 28px;
  background: var(--surface-2);
}

/* My photos (here and in .about__photo) can't be saved with a right-click or a long press, or dragged
   out of the page: a clear layer lies over each one, so the menu that opens is the page's, not the
   image's. It only stops the easy ways; nothing stops a screenshot. */
.portrait__frame::after,
.about__photo::after {
  content: "";
  position: absolute;
  inset: 0;
}

.portrait__frame img,
.about__photo img {
  -webkit-user-drag: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

.float-card {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 16px;
  background: var(--glass);
  border: 1px solid var(--glass-line);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow-md);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.3;
  /* a few slow drifts, then still: endless motion next to the text is distracting */
  animation: float 7s ease-in-out 3;
}

.float-card small {
  display: block;
  font-weight: 500;
  font-size: 0.8rem;
  color: var(--ink-2);
}

.float-card__icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--brand-soft);
  color: var(--brand);
}

.float-card--a {
  top: 9%;
  inset-inline-start: -18%;
}

.float-card--b {
  bottom: 8%;
  inset-inline-end: -12%;
  animation-delay: -3.5s;
  font-family: var(--mono);
  font-size: 0.82rem;
  font-weight: 500;
  direction: ltr;
}

.float-card--b .k {
  color: var(--brand);
}

.float-card--b .s {
  color: #047857;
}

:root[data-theme="dark"] .float-card--b .s {
  color: var(--ok);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .float-card--b .s {
    color: var(--ok);
  }
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* ---------- clients strip ---------- */

.clients {
  padding: 8px 0 clamp(24px, 4vw, 40px);
}

.clients__label {
  margin: 0 0 22px;
  text-align: center;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
}

.clients__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 20px clamp(28px, 6vw, 72px);
  margin: 0;
  padding: 0;
  list-style: none;
}

/* inline-block: an inline link around a block image has no box of its own, so the focus ring
   was drawn around nothing and keyboard users couldn't see which logo was focused */
.clients__row a {
  display: inline-block;
  border-radius: 10px;
}

.clients__row img {
  width: auto;
  height: 42px;
  filter: var(--logo-filter);
  opacity: var(--logo-opacity);
  transition: filter 0.3s ease, opacity 0.3s ease, translate 0.3s ease;
}

.clients__row img.logo--tall {
  height: 64px;
}

.clients__row img.logo--wide {
  height: 34px;
}

.clients__row a:hover img,
.clients__row a:focus-visible img {
  filter: none;
  opacity: 1;
}

:root[data-theme="dark"] .clients__row a:hover img,
:root[data-theme="dark"] .clients__row a:focus-visible img {
  filter: var(--logo-filter);
  opacity: 1;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .clients__row a:hover img,
  :root:not([data-theme="light"]) .clients__row a:focus-visible img {
    filter: var(--logo-filter);
    opacity: 1;
  }
}

/* ---------- sections ---------- */

.section {
  padding: clamp(56px, 8vw, 104px) 0;
}

.section--alt {
  background: var(--surface);
  border-block: 1px solid var(--line);
}

.section__head {
  max-width: 760px;
  margin-bottom: clamp(28px, 4.5vw, 48px);
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--brand);
  font-weight: 600;
  font-size: 0.95rem;
}

.kicker::before {
  content: "";
  width: 30px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}

.section h2 {
  margin: 12px 0 14px;
  font-size: clamp(2rem, 4.2vw, 3.1rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
}

.section__sub {
  margin: 0;
  color: var(--ink-2);
  font-size: clamp(1.05rem, 1.4vw, 1.18rem);
}

/* ---------- about ---------- */

.about__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  gap: clamp(32px, 6vw, 80px);
  align-items: start;
}

.about__text p {
  margin: 0 0 18px;
  color: var(--ink-2);
  font-size: clamp(1.06rem, 1.35vw, 1.16rem);
}

.about__text p strong {
  color: var(--ink);
  font-weight: 600;
}

.about__text .lead {
  color: var(--ink);
  font-size: clamp(1.3rem, 2.2vw, 1.6rem);
  font-weight: 600;
  line-height: 1.45;
}

.about__aside {
  position: relative;
}

.about__photo {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  transform: rotate(2deg);
}

.about__photo img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.about__quote {
  position: relative;
  margin: -44px 18px 0;
  padding: 18px 20px;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
  font-weight: 600;
  line-height: 1.5;
}

.about__quote .icon {
  color: var(--brand);
  margin-bottom: 6px;
}

.stats {
  display: grid;
  /* minmax(0, …) so a big number at 150% text size can't push the page wider than the screen */
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: clamp(40px, 6vw, 64px) 0 0;
  padding: 0;
  list-style: none;
}

.stats--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stat {
  position: relative;
  padding: 24px 22px;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  transition: translate 0.3s ease, border-color 0.3s ease;
}

.section--alt .stat {
  background: var(--bg);
}

.stat__num {
  display: block;
  direction: ltr;
  text-align: right;
  font-size: clamp(1.9rem, 3.2vw, 2.6rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.stat__label {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.97rem;
  line-height: 1.45;
  text-wrap: pretty;
}

/* ---------- projects ---------- */

.projects {
  display: grid;
  gap: clamp(28px, 4vw, 44px);
}

.project {
  position: relative;
  overflow: hidden;
  /* clip, where supported, isn't a scroll container, so the sticky mock-up below still works */
  overflow: clip;
  border-radius: var(--radius-xl);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

.project--feature {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
}

/* side by side, the text column is much taller than the mock-up: keep the screenshots at the top,
   in view while reading, instead of centred in a tall empty panel */
@media (min-width: 921px) {
  .project--feature .project__visual {
    align-items: flex-start;
  }

  .project--feature .project__visual > .shot {
    position: sticky;
    top: calc(var(--header-h) + 28px);
  }
}

.project--flip .project__visual {
  order: -1;
}

.project__body {
  display: flex;
  flex-direction: column;
  padding: clamp(24px, 4vw, 48px);
}

.project__visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(24px, 4vw, 52px) clamp(20px, 3.5vw, 44px);
  background: var(--visual-bg);
}

.org {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

.org__logo {
  display: grid;
  flex-shrink: 0; /* a narrow card would otherwise squash the logo out of proportion */
  place-items: center;
  height: 48px;
  min-width: 48px;
  padding: 6px 12px;
  border-radius: 14px;
  background: #fff; /* logos are made for white, in both themes */
  border: 1px solid var(--line);
  color: #1b2a4a;
}

.org__logo img {
  width: auto;
  height: 30px;
}

.org__logo img.logo--tall {
  height: 38px;
}

.org__meta {
  display: grid;
  line-height: 1.35;
}

.org__meta strong {
  font-size: 0.98rem;
}

.org__meta span {
  color: var(--muted);
  font-size: 0.88rem;
}

/* the organisation block opens a short "about" dialog; kept quiet on purpose */
.org--btn {
  padding: 0;
  border: 0;
  border-radius: 14px;
  background: none;
  color: inherit;
  font: inherit;
  text-align: start;
  cursor: pointer;
}

.org__info {
  display: inline-block;
  width: 15px;
  height: 15px;
  margin-inline-start: 6px;
  vertical-align: -2px;
  color: var(--muted);
  opacity: 0.7;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.org--btn:hover .org__meta strong {
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--brand) 55%, transparent);
  text-underline-offset: 4px;
}

.org--btn:hover .org__info,
.org--btn:focus-visible .org__info {
  color: var(--brand);
  opacity: 1;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 0.82rem;
  font-weight: 600;
}

.project h3 {
  margin: 10px 0 12px;
  font-size: clamp(1.5rem, 2.6vw, 2.05rem);
  line-height: 1.2;
}

.project__desc {
  margin: 0 0 20px;
  color: var(--ink-2);
}

.features {
  display: grid;
  gap: 10px;
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
}

.features li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--ink-2);
  font-size: 1rem;
  line-height: 1.55;
}

.features li .icon {
  margin-top: 3px;
  color: var(--brand);
}

.kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
}

.kpis li {
  padding: 14px 14px 12px;
  border-radius: 14px;
  background: var(--surface-2);
  border: 1px solid var(--line);
}

.kpis b {
  display: block;
  direction: ltr;
  text-align: right;
  font-size: 1.35rem;
  line-height: 1.1;
}

.kpis span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 26px;
  padding: 0;
  list-style: none;
}

/* tech names are Latin: keep "C++" and friends from being reordered by the RTL flow */
.tags li,
.chips li {
  direction: ltr;
  unicode-bidi: isolate;
}

.tags li {
  padding: 5px 10px;
  border-radius: 8px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--ink-2);
  font-family: var(--mono);
  font-size: 0.76rem;
  font-weight: 500;
  line-height: 1.4;
}

.project__links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin-top: auto;
}

/* browser + phone mockups */

/* mockups are built from <span>s (they sit inside <button>s), so make them blocks */
.device,
.browser,
.browser__screen {
  display: block;
}

.device {
  position: relative;
  width: 100%;
  max-width: 640px;
}

.device--has-phone {
  padding-bottom: 7%;
  padding-inline-end: 9%;
}

.shot {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
  text-align: inherit;
}

.browser {
  overflow: hidden;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  transition: transform 0.4s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.shot:hover .browser {
  transform: translateY(-4px);
}

.browser__bar {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 34px;
  padding: 0 12px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
}

.browser__dots {
  display: flex;
  gap: 6px;
}

.browser__dots i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ff5f57;
}

.browser__dots i:nth-child(2) {
  background: #febc2e;
}

.browser__dots i:nth-child(3) {
  background: #28c840;
}

.browser__url {
  flex: 1;
  min-width: 0; /* let long URLs ellipsize instead of widening the card */
  overflow: hidden;
  max-width: 70%;
  margin-inline: auto;
  padding: 2px 10px;
  border-radius: 7px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.7rem;
  line-height: 1.5;
  text-align: center;
  white-space: nowrap;
  text-overflow: ellipsis;
  direction: ltr;
}

.browser__screen {
  position: relative;
  aspect-ratio: 16 / 10;
  background: var(--surface-2);
}

.browser__screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.phone {
  position: absolute;
  bottom: 0;
  inset-inline-end: 0;
  width: 25%;
  min-width: 108px;
  padding: 5px;
  border-radius: 24px;
  background: #0a0f1f;
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255, 255, 255, 0.06) inset;
  transition: transform 0.4s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.shot:hover .phone {
  transform: translateY(-8px);
}

.phone img {
  width: 100%;
  aspect-ratio: 390 / 844;
  object-fit: cover;
  object-position: top;
  border-radius: 19px;
  background: #fff;
}

.zoom-hint {
  position: absolute;
  top: 46px;
  inset-inline-start: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 10px;
  background: rgba(10, 17, 40, 0.72);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
}

.shot:hover .zoom-hint,
.shot:focus-visible .zoom-hint {
  opacity: 1;
  transform: none;
}

/* touch screens have no hover: the hint stays, so it's clear the screenshots open and zoom */
@media (hover: none) {
  .zoom-hint {
    opacity: 1;
    transform: none;
  }
}

/* organisation group (Belev Echad) */

.org-group {
  border-radius: var(--radius-xl);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  padding: clamp(22px, 4vw, 48px);
}

.org-group__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 32px;
  margin-bottom: clamp(24px, 3.5vw, 36px);
}

.org-group__head .org {
  margin-bottom: 12px;
}

.org-group__head h3 {
  margin: 0 0 8px;
  font-size: clamp(1.5rem, 2.6vw, 2.05rem);
}

.org-group__head p {
  max-width: 62ch;
  margin: 0;
  color: var(--ink-2);
}

.mini-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(16px, 2.4vw, 24px);
}

.mini {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 22px;
  background: var(--bg);
  border: 1px solid var(--line);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.mini:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.mini__visual {
  padding: 22px 22px 0;
  background: var(--visual-bg);
}

.mini__visual .browser {
  border-bottom: 0;
  border-end-start-radius: 0;
  border-end-end-radius: 0;
  box-shadow: var(--shadow-md);
}

.mini__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 22px 24px 24px;
}

.mini h4 {
  margin: 0 0 8px;
  font-size: 1.25rem;
}

.mini p {
  margin: 0 0 14px;
  color: var(--ink-2);
  font-size: 1rem;
}

.mini .features {
  margin-bottom: 18px;
  gap: 6px;
}

.mini .features li {
  font-size: 0.95rem;
}

.mini .tags {
  margin-bottom: 20px;
}

/* the two smaller Belev Echad builds: no screenshots, so an icon and the text, side by side */

.mini--compact {
  flex-direction: row;
  align-items: flex-start;
  gap: 16px;
  padding: 20px 22px;
}

.mini--compact .mini__body {
  padding: 0;
}

.mini__icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 46px;
  height: 46px;
  border-radius: 13px;
  background: var(--brand-soft);
  color: var(--brand);
}

.mini--compact h4 {
  margin-bottom: 6px;
  font-size: 1.12rem;
}

.mini--compact p {
  margin-bottom: 10px;
  font-size: 0.97rem;
}

/* not a link, so no lift on hover */
.mini--compact:hover {
  transform: none;
  box-shadow: none;
}

/* teaser */

.teaser {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: radial-gradient(120% 140% at 100% 0%, #1b2a6b 0%, #0a0f24 55%, #050815 100%);
  color: #eef2ff;
  isolation: isolate;
}

/* the Belev Echad website: the same card in the organisation's navy and royal blue */
.teaser--belev {
  background: radial-gradient(120% 140% at 100% 0%, #233d9e 0%, #12203f 55%, #0a1226 100%);
}

.teaser::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(rgba(255, 255, 255, 0.09) 1px, transparent 1px);
  background-size: 20px 20px;
  -webkit-mask-image: linear-gradient(90deg, #000, transparent 70%);
  mask-image: linear-gradient(90deg, #000, transparent 70%);
}

.teaser__body {
  padding: clamp(28px, 4.5vw, 56px);
}

.teaser__body h3 {
  margin: 16px 0 12px;
  font-size: clamp(1.6rem, 3vw, 2.3rem);
}

.teaser__body p {
  margin: 0 0 20px;
  color: #c3cae6;
  max-width: 46ch;
}

.teaser .badge {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.teaser .badge .pulse {
  background: #fbbf24;
}

.teaser .badge .pulse::after {
  border-color: #fbbf24;
}

.teaser .tags li {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.14);
  color: #d5dbf2;
}

.teaser__visual {
  position: relative;
  min-height: 320px;
  overflow: hidden;
}

/* the images are blurred at build time, so the unreleased UI can't be read even with devtools */
.teaser__visual img {
  position: absolute;
  top: 10%;
  inset-inline-start: 14%;
  width: 34%;
  border-radius: 22px;
  border: 5px solid #0a0f1f;
  filter: saturate(1.15);
  opacity: 0.9;
  transform: rotate(-7deg);
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.8);
}

.teaser__visual img + img {
  top: 34%;
  inset-inline-start: 42%;
  width: 50%;
  border-width: 0;
  border-radius: 16px;
  transform: rotate(5deg);
  opacity: 0.75;
}

.teaser__lock {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}

.teaser__lock span {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border-radius: 999px;
  background: rgba(5, 8, 21, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.16);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
}

/* ---------- live demo showcase (top of the projects section) ---------- */

.showcase {
  margin-bottom: clamp(28px, 4vw, 44px);
  padding: clamp(20px, 3.2vw, 36px);
  border-radius: var(--radius-xl);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

.showcase__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 40px;
  margin-bottom: clamp(20px, 3vw, 28px);
}

.showcase__intro {
  flex: 1 1 380px;
  min-width: 0;
}

.showcase__kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 0.82rem;
  font-weight: 700;
}

.showcase__kicker .icon {
  width: 11px;
  height: 11px;
  fill: currentColor;
  stroke-width: 1.5;
}

.showcase__title {
  margin: 12px 0 6px;
  font-size: clamp(1.45rem, 2.4vw, 1.9rem);
}

.showcase__sub {
  margin: 0;
  color: var(--ink-2);
}

.showcase__note {
  display: flex;
  flex: 0 1 420px;
  align-items: flex-start;
  gap: 10px;
  margin: 0;
  padding: 12px 16px;
  border-radius: 14px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 0.9rem;
  line-height: 1.55;
}

.showcase__note .icon {
  margin-top: 3px;
  color: var(--brand);
}

.showcase__grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.demo-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border-radius: 18px;
  background: var(--bg);
  border: 1px solid var(--line);
  transition: translate 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.demo-tile__shot {
  position: relative;
  isolation: isolate;
  padding: 12px 12px 0;
  background: var(--visual-bg);
}

.demo-tile__shot::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(75% 70% at 30% 30%, var(--accent-glow, transparent), transparent 72%);
}

.demo-tile__shot img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 9px 9px 0 0;
  background: var(--surface-2);
  box-shadow: var(--shadow-md);
  transform-origin: 50% 0;
  transition: scale 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.demo-tile__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 14px 16px 16px;
}

.demo-tile__org {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
}

.demo-tile__title {
  margin: 2px 0 6px;
  color: var(--ink);
  font-size: 1.06rem;
  font-weight: 700;
  line-height: 1.3;
  text-wrap: balance;
}

.demo-tile__desc {
  margin: 0 0 14px;
  color: var(--ink-2);
  font-size: 0.9rem;
  line-height: 1.5;
}

.demo-tile__cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  margin-top: auto;
  color: var(--brand);
  font-size: 0.92rem;
  font-weight: 700;
}

.demo-tile__cta .icon {
  transition: transform 0.2s ease;
}

/* the whole tile is the link's hit area, and its focus ring */
.demo-tile__cta::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: 18px;
}

.demo-tile__cta:focus-visible {
  outline: none;
}

.demo-tile__cta:focus-visible::after {
  outline: 2px solid var(--brand);
  outline-offset: -2px;
}

@media (hover: hover) and (pointer: fine) {
  .demo-tile:hover {
    border-color: color-mix(in srgb, var(--brand) 38%, var(--line));
    box-shadow: var(--shadow-md);
  }

  .demo-tile:hover .demo-tile__cta {
    text-decoration: underline;
    text-underline-offset: 4px;
  }
}

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  html:not(.a11y-nomotion) .demo-tile:hover {
    translate: 0 -3px;
  }

  html:not(.a11y-nomotion) .demo-tile:hover .demo-tile__shot img {
    scale: 1.04;
  }

  /* RTL: "forward" is to the left */
  html:not(.a11y-nomotion) .demo-tile:hover .demo-tile__cta .icon {
    transform: translateX(-3px);
  }
}

/* five in a row on wide screens; two over three in between */
@media (max-width: 1080px) {
  .showcase__grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .demo-tile {
    grid-column: span 2;
  }

  .demo-tile:nth-child(-n + 2) {
    grid-column: span 3;
  }
}

/* phones: a list of rows, the screenshot beside the text */
@media (max-width: 720px) {
  .showcase__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .demo-tile,
  .demo-tile:nth-child(-n + 2) {
    grid-column: auto;
    flex-direction: row;
  }

  .demo-tile__shot {
    display: flex;
    flex: none;
    align-items: center;
    width: clamp(104px, 32%, 168px);
    padding: 10px;
  }

  .demo-tile__shot img {
    border-bottom: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
  }

  .demo-tile__body {
    min-width: 0;
    padding: 12px 14px;
  }

  .demo-tile__title {
    font-size: 1rem;
  }

  .demo-tile__desc {
    margin-bottom: 8px;
    font-size: 0.86rem;
  }

  .demo-tile__cta {
    font-size: 0.88rem;
  }
}

/* ---------- education ---------- */

.edu {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.7fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: start;
}

.timeline {
  position: relative;
  margin: 0;
  padding: 0;
  list-style: none;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 10px;
  bottom: 10px;
  inset-inline-start: 15px;
  width: 2px;
  border-radius: 2px;
  background: linear-gradient(var(--brand), var(--line));
}

.tl-item {
  position: relative;
  padding-inline-start: 56px;
  padding-bottom: 34px;
}

.tl-item:last-child {
  padding-bottom: 0;
}

.tl-item::before {
  content: "";
  position: absolute;
  top: 6px;
  inset-inline-start: 7px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--surface);
  border: 3px solid var(--brand);
  box-shadow: 0 0 0 5px var(--bg);
}

.section--alt .tl-item::before {
  box-shadow: 0 0 0 5px var(--surface);
}

.tl-item--now::before {
  background: var(--brand);
}

.tl-card {
  padding: 22px 24px;
  border-radius: 20px;
  background: var(--bg);
  border: 1px solid var(--line);
}

.tl-date {
  display: inline-block;
  margin-bottom: 6px;
  color: var(--brand);
  font-size: 0.9rem;
  font-weight: 600;
}

.tl-card h3 {
  margin: 0 0 4px;
  font-size: 1.22rem;
}

.tl-place {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.95rem;
}

.tl-card p {
  margin: 0 0 12px;
  color: var(--ink-2);
  font-size: 1rem;
}

.tl-card .tags {
  margin: 0;
}

.aside-card {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  padding: 28px;
  border-radius: 24px;
  background: linear-gradient(160deg, var(--brand), #1f36c7 70%, #122080);
  color: #fff;
  box-shadow: var(--shadow-lg);
}

:root[data-theme="dark"] .aside-card {
  background: linear-gradient(160deg, #2b3fb8, #16217a 70%, #0d1450);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .aside-card {
    background: linear-gradient(160deg, #2b3fb8, #16217a 70%, #0d1450);
  }
}

.aside-card h3 {
  margin: 0 0 10px;
  font-size: 1.35rem;
}

.aside-card p {
  margin: 0 0 18px;
  color: #fff;
  font-size: 1rem;
}

.aside-card ul {
  display: grid;
  gap: 10px;
  margin: 0 0 22px;
  padding: 0;
  list-style: none;
}

.aside-card li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 0.98rem;
  line-height: 1.5;
}

.aside-card li .icon {
  margin-top: 3px;
  opacity: 0.9;
}

.aside-card .link-btn {
  background: #fff;
  border-color: #fff;
  color: #1a2b8f;
}

/* ---------- skills ---------- */

.skills {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.skill-card {
  position: relative;
  padding: 26px;
  border-radius: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  transition: translate 0.3s ease, border-color 0.3s ease;
}

.skill-card__icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 16px;
  border-radius: 13px;
  background: var(--brand-soft);
  color: var(--brand);
}

.skill-card h3 {
  margin: 0 0 6px;
  font-size: 1.16rem;
}

.skill-card p {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.chips li {
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 0.9rem;
  font-weight: 500;
}

/* ---------- contact ---------- */

/* intro, form, then "how it works" and the links: on phones in that order, so the consultation
   button lands right above the fields; side by side, the form takes the whole second column */
.contact {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  grid-template-rows: auto 1fr;
  grid-template-areas:
    "info form"
    "more form";
  gap: 0 clamp(24px, 5vw, 64px);
  align-items: start;
}

.contact__info {
  grid-area: info;
}

.contact > .form {
  grid-area: form;
}

.contact__more {
  grid-area: more;
}

.contact__info h2 {
  margin-top: 12px;
  font-size: clamp(1.9rem, 3.5vw, 2.6rem);
}

.contact__info > p {
  margin: 0 0 28px;
  color: var(--ink-2);
  font-size: 1.12rem;
}

.contact-links {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.contact-links a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  transition: border-color 0.2s ease, translate 0.25s ease;
}

.contact-links a:hover,
.contact-links a:focus-visible {
  border-color: var(--brand);
}

.contact-links .ico,
.contact-links .arrow {
  transition: transform 0.25s ease, color 0.2s ease;
}

.contact-links .ico {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--brand-soft);
  color: var(--brand);
}

.contact-links strong {
  display: block;
  line-height: 1.3;
}

.contact-links small {
  display: block;
  color: var(--muted);
  font-size: 0.88rem;
  direction: ltr;
  text-align: right;
}

.contact-links .arrow {
  margin-inline-start: auto;
  color: var(--muted);
}

/* "how it works": three numbered steps on a thin rail */
.how {
  margin: 0 0 28px;
  padding: 22px 22px 8px;
  border-radius: 20px;
  background: var(--bg);
  border: 1px solid var(--line);
}

.how__title {
  margin: 0 0 16px;
  font-size: 1.08rem;
}

.how__steps {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: how;
}

.how__steps li {
  position: relative;
  display: grid;
  gap: 2px;
  padding-inline-start: 46px;
  padding-bottom: 16px;
  counter-increment: how;
}

.how__steps li::before {
  content: counter(how);
  position: absolute;
  top: 0;
  inset-inline-start: 0;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand);
  font-family: var(--mono);
  font-size: 0.9rem;
  font-weight: 500;
}

/* the rail between the numbers */
.how__steps li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 34px;
  bottom: 4px;
  inset-inline-start: 14px;
  width: 2px;
  border-radius: 2px;
  background: var(--line);
}

.how__steps strong {
  color: var(--ink);
  font-weight: 600;
  line-height: 1.4;
}

.how__steps span {
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.55;
  text-wrap: pretty;
}

.form {
  position: relative;
  padding: clamp(24px, 4vw, 40px);
  border-radius: 26px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
}

.form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.field {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}

.field label {
  font-weight: 600;
  font-size: 0.95rem;
}

.field__label {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.field .opt {
  color: var(--muted);
  font-weight: 500;
  font-size: 0.95rem;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  padding: 13px 16px;
  border-radius: 13px;
  /* at least 3:1 against the form in both themes, so the fields are easy to find */
  border: 1px solid color-mix(in srgb, var(--muted) 70%, var(--line));
  background: var(--bg);
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.field input.ltr {
  text-align: right;
}

.field textarea {
  min-height: 140px;
  resize: vertical;
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--muted);
  opacity: 1; /* browsers fade placeholders by default; --muted alone is 4.7:1 */
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-color: var(--brand);
  border-radius: 13px;
  background: var(--surface);
}

/* after "קבעו שיחת ייעוץ", the topic field lights up for a moment to show it was filled in */
.field select.is-flash {
  border-color: var(--brand);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--brand) 30%, transparent);
}

.form .btn {
  width: 100%;
}

.form__foot {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  text-align: center;
}

.hp {
  position: absolute;
  inset-inline-start: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* the live region stays rendered (empty and flat) from page load, so screen readers
   are already listening when a message is written into it */
.form-status {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 0;
  padding: 0;
  border-radius: 14px;
  font-weight: 600;
  line-height: 1.5;
}

.form-status:not(.is-ok):not(.is-error) .icon {
  display: none;
}

.form-status.is-ok,
.form-status.is-error {
  margin-top: 16px;
  padding: 14px 16px;
}

.form-status.is-ok {
  background: color-mix(in srgb, var(--ok) 13%, transparent);
  color: var(--ok-text);
}

.form-status.is-error {
  background: color-mix(in srgb, #ef4444 12%, transparent);
  color: var(--danger-text);
}

.form.is-sending .btn {
  opacity: 0.7;
  pointer-events: none;
}

/* ---------- footer ---------- */

.site-footer {
  padding: 36px 0 44px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.95rem;
}

.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.site-footer p {
  margin: 0;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  font-weight: 600;
}

.footer-brand small {
  display: block;
  color: var(--muted);
  font-weight: 500;
}

/* ---------- screenshot viewer (lightbox with zoom) ---------- */

/* Full screen, so a zoomed screenshot gets the whole viewport. main.js sizes the image to fit the
   stage and zooms/pans it with CSSOM transforms (CSP-safe). The dialog's own near-opaque background
   (not only ::backdrop) keeps the text contrast measurable. */
.lightbox {
  inset: 0;
  width: auto;
  height: auto;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(4, 7, 18, 0.92);
  color: #fff;
  overflow: hidden;
  overscroll-behavior: contain;
  /* the viewer handles pinch and drag itself, and the page behind must not scroll or zoom */
  touch-action: none;
}

.lightbox[open] {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  animation: lb-in 0.2s ease;
}

.lightbox::backdrop {
  background: rgba(4, 7, 18, 0.4);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

@keyframes lb-in {
  from {
    opacity: 0;
  }
}

html.has-lightbox {
  overflow: hidden;
}

/* the organisation dialogs too: a wheel over the backdrop used to scroll the page behind */
html:has(.org-dialog[open]) {
  overflow: hidden;
}

/* a click on the image focuses the dialog itself (tabindex="-1"), so the keys keep working there */
.lightbox:focus {
  outline: none;
}

.lightbox :focus-visible {
  outline-color: #9aabff;
}

.lightbox__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 12px clamp(12px, 3vw, 28px) 6px;
}

.lightbox__head {
  min-width: 0;
  padding-top: 2px;
}

.lightbox__title {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0;
}

.lightbox__caption {
  margin: 2px 0 0;
  font-size: clamp(0.95rem, 1.5vw, 1.06rem);
  font-weight: 600;
  line-height: 1.45;
}

.lightbox__count {
  margin-inline-start: 10px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.88rem;
  font-weight: 500;
  white-space: nowrap;
}

.lightbox__stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 0;
  overflow: hidden;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

.lightbox__img {
  max-width: none;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.8);
  transform-origin: 50% 50%;
  transition: opacity 0.2s ease;
  -webkit-user-drag: none;
}

/* eased for the buttons, the keyboard and double clicks; gestures follow the pointer directly */
.lightbox__img.is-easing {
  transition: opacity 0.2s ease, transform 0.28s cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* only while a gesture runs: a permanent will-change would keep the zoomed image blurry */
.lightbox.is-moving .lightbox__img {
  will-change: transform;
}

.lightbox.is-zoomed .lightbox__img {
  cursor: grab;
}

.lightbox.is-panning .lightbox__img {
  cursor: grabbing;
}

.lightbox__img.is-loading {
  opacity: 0.35;
}

.lightbox.is-empty .lightbox__img {
  visibility: hidden;
}

/* phone screenshots keep their phone frame; the thin ring shows it against the dark background */
.lightbox__img.is-mobile {
  border: 6px solid #0a0f1f;
  border-radius: 30px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.22), 0 40px 90px -30px rgba(0, 0, 0, 0.8);
}

.lightbox__spinner {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 34px;
  height: 34px;
  margin: -17px 0 0 -17px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.2);
  border-top-color: #fff;
  opacity: 0;
  pointer-events: none;
  animation: lb-spin 0.8s linear infinite;
  transition: opacity 0.2s ease;
}

/* shown only when a screenshot takes a moment, so a cached one never flashes it */
.lightbox.is-loading .lightbox__spinner {
  opacity: 1;
  transition-delay: 0.25s;
}

@keyframes lb-spin {
  to {
    transform: rotate(360deg);
  }
}

.lightbox__bar {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 8px clamp(12px, 3vw, 28px) max(14px, env(safe-area-inset-bottom, 0px));
}

.lightbox__controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lightbox__zoom {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.lightbox__btn {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 13px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  cursor: pointer;
  transition: background-color 0.2s ease, opacity 0.2s ease;
}

.lightbox__zoom .lightbox__btn {
  width: 40px;
  height: 40px;
  border-color: transparent;
  border-radius: 11px;
  background: none;
}

.lightbox__btn:hover {
  background: rgba(255, 255, 255, 0.18);
}

/* aria-disabled rather than disabled on the zoom buttons, so focus stays put at 100% or at the maximum */
.lightbox__btn:disabled,
.lightbox__btn[aria-disabled="true"] {
  opacity: 0.38;
  cursor: default;
}

.lightbox__btn:disabled:hover,
.lightbox__btn[aria-disabled="true"]:hover {
  background: rgba(255, 255, 255, 0.08);
}

.lightbox__zoom .lightbox__btn[aria-disabled="true"]:hover {
  background: none;
}

.lightbox__level {
  min-width: 52px;
  font-size: 0.88rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-align: center;
  direction: ltr;
}

.lightbox__hint {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.82rem;
  line-height: 1.5;
  text-align: center;
}

.lightbox__hint kbd {
  display: inline-block;
  min-width: 1.7em;
  padding: 0 5px;
  border-radius: 5px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 1.5;
  text-align: center;
}

.lightbox__hint-touch {
  display: none;
}

@media (hover: none), (pointer: coarse) {
  .lightbox__hint-fine {
    display: none;
  }

  .lightbox__hint-touch {
    display: inline;
  }
}

html.a11y-contrast .lightbox {
  background: #000;
}

html.a11y-contrast .lightbox :focus-visible {
  outline-color: #ffe600;
}

/* ---------- organisation details dialog ---------- */

.org-dialog {
  width: min(460px, calc(100vw - 32px));
  max-width: none;
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-lg);
  overflow: auto;
  overscroll-behavior: contain;
}

.org-dialog[open] {
  animation: org-dialog-in 0.24s cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* the dialog itself takes focus on open, so screen readers read its title and text */
.org-dialog:focus,
.org-dialog:focus-visible {
  outline: none;
}

.org-dialog::backdrop {
  background: rgba(4, 7, 18, 0.5);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}

@keyframes org-dialog-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
}

.org-dialog__box {
  position: relative;
  padding: 24px 24px 22px;
}

.org-dialog__close {
  position: absolute;
  top: 14px;
  inset-inline-end: 14px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.org-dialog__close:hover {
  background: var(--surface-2);
  color: var(--ink);
}

.org-dialog__head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
  padding-inline-end: 44px; /* room for the close button */
}

.org-dialog__title {
  margin: 0;
  font-size: 1.2rem;
  line-height: 1.3;
}

.org-dialog__sub {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.org-dialog__text {
  margin: 0 0 20px;
  color: var(--ink-2);
  line-height: 1.75;
}

.org-dialog__links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.org-dialog__jump {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

.org-dialog__jump:hover {
  color: var(--brand);
}

.org-dialog__jump[hidden] {
  display: none;
}

@media (max-width: 480px) {
  .org-dialog__box {
    padding: 20px 20px 18px;
  }

  /* logo above the name, so long names and taglines get the full width */
  .org-dialog__head {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding-inline-end: 0;
  }
}

/* ---------- reveal on scroll ---------- */

/* The list also carries the cards' own hover transitions (translate, border, shadow, background),
   which this rule would otherwise replace; the stagger delays apply to the reveal only. */
.js .reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1), translate 0.3s ease,
    border-color 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Failsafe: main.js adds .reveal-ready when it takes over the reveals. If it never gets there
   (it failed to load, or an error stopped it first), every block still appears after a moment
   instead of the page staying blank below the hero. */
@keyframes reveal-failsafe {
  to {
    opacity: 1;
    transform: none;
  }
}

.js:not(.reveal-ready) .reveal {
  animation: reveal-failsafe 0.6s ease 3.5s forwards;
}

/* a keyboard user who tabs into a block before it has faded in sees it (and the focus ring) at once */
.js .reveal:focus-within,
.js .reveal:focus {
  opacity: 1;
  transform: none;
  transition: none;
}

.js .reveal--delay-1 {
  transition-delay: 0.08s, 0.08s, 0s, 0s, 0s, 0s;
}

.js .reveal--delay-2 {
  transition-delay: 0.16s, 0.16s, 0s, 0s, 0s, 0s;
}

.js .reveal--delay-3 {
  transition-delay: 0.24s, 0.24s, 0s, 0s, 0s, 0s;
}

/* ---------- 404 ---------- */

.notfound {
  display: grid;
  place-items: center;
  min-height: calc(100vh - var(--header-h));
  padding: 48px 0;
  text-align: center;
}

.notfound b {
  display: block;
  font-size: clamp(5rem, 18vw, 10rem);
  line-height: 1;
  letter-spacing: -0.04em;
}

.notfound p {
  margin: 12px 0 28px;
  color: var(--ink-2);
  font-size: 1.15rem;
}

.notfound h1 {
  margin: 20px 0 0;
  font-size: clamp(2rem, 5vw, 3rem);
}

/* ---------- responsive ---------- */

@media (max-width: 1080px) {
  .nav__links a {
    padding: 8px 10px;
  }

  .float-card--a {
    inset-inline-start: -10%;
  }

  .float-card--b {
    inset-inline-end: -6%;
  }

  .skills {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 920px) {
  /* one navigation landmark at a time: the phone menu replaces the whole desktop <nav> */
  .nav__main {
    display: none;
  }

  .menu-toggle {
    display: grid;
  }

  .hero__inner {
    grid-template-columns: minmax(0, 1fr);
  }

  /* text (and the consultation button) first; the portrait follows */
  .portrait {
    width: min(78%, 360px);
  }

  .about__grid,
  .edu,
  .contact {
    grid-template-columns: minmax(0, 1fr);
  }

  .contact {
    grid-template-rows: none;
    grid-template-areas:
      "info"
      "form"
      "more";
  }

  .contact__more {
    margin-top: clamp(28px, 6vw, 40px);
  }

  .about__aside {
    max-width: 440px;
  }

  .aside-card {
    position: static;
  }

  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stats--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .project--feature,
  .teaser {
    grid-template-columns: minmax(0, 1fr);
  }

  .project--feature .project__visual,
  .project--flip .project__visual {
    order: -1;
  }

  .teaser__visual {
    min-height: 240px;
  }
}

@media (max-width: 720px) {
  .mini-grid {
    grid-template-columns: 1fr;
  }

  .skills {
    grid-template-columns: 1fr;
  }

  /* one row per number, the label beside it: the same facts in about half the height */
  .stats--3 {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .stats--3 .stat {
    display: grid;
    grid-template-columns: minmax(0, 7.4rem) minmax(0, 1fr);
    align-items: center;
    gap: 14px;
  }

  .stats--3 .stat__num {
    font-size: 1.75rem;
  }

  .stats--3 .stat__label {
    margin-top: 0;
    font-size: 0.92rem;
  }

  .kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .kpis li {
    padding: 12px 10px 10px;
  }

  .kpis b {
    font-size: 1.12rem;
  }
}

@media (max-width: 560px) {
  body {
    font-size: 1rem;
  }

  .brand__text small {
    display: none;
  }

  /* the consultation button stays in the sticky header on phones too, just more compact */
  .nav {
    gap: 10px;
  }

  .nav__actions {
    gap: 6px;
  }

  .nav__cta {
    min-height: 40px;
    padding: 0 12px;
    font-size: 0.88rem;
  }

  .hero__cta .btn {
    flex: 1 1 100%;
  }

  .hero__more {
    margin-inline: auto;
    min-height: 44px;
  }

  /* three small columns: number on top, label below */
  .hero__proof {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-bottom: 24px;
  }

  .hero__proof li {
    display: grid;
    align-content: start;
    justify-items: start;
    gap: 2px;
    padding-inline: 12px;
    font-size: 0.86rem;
  }

  .hero__proof li:first-child {
    padding-inline-start: 0;
  }

  .hero__proof li:last-child {
    padding-inline-end: 0;
  }

  .portrait {
    width: min(76%, 300px);
  }

  .float-card {
    padding: 9px 12px;
    font-size: 0.85rem;
  }

  .float-card__icon {
    width: 32px;
    height: 32px;
  }

  .float-card--a {
    top: 6%;
    inset-inline-start: -14%;
  }

  .float-card--b {
    bottom: 5%;
    inset-inline-end: -10%;
    font-size: 0.72rem;
  }

  .form__row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .about__aside {
    max-width: 320px;
    margin-inline: auto;
  }

  .stat {
    padding: 18px 16px;
  }

  .phone {
    min-width: 88px;
    border-radius: 18px;
    padding: 4px;
  }

  .phone img {
    border-radius: 14px;
  }

  .lightbox__controls {
    gap: 6px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ==========================================================================
   Journey timeline, project details, accents, back-to-top
   ========================================================================== */

/* journey */

.journey-wrap {
  margin-top: clamp(44px, 6vw, 72px);
}

.journey__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 24px;
  margin-bottom: 26px;
}

.journey__title {
  margin: 0;
  font-size: clamp(1.3rem, 2.2vw, 1.6rem);
}

.journey__legend {
  display: flex;
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 0.9rem;
}

.journey__legend li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.journey__legend li::before {
  content: "";
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 3px solid var(--brand);
}

.journey__legend li.is-study::before {
  border-color: var(--brand-2);
}

.journey {
  position: relative;
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
}

/* the line runs from the oldest step (right) to the newest (left) */
.journey::before {
  content: "";
  position: absolute;
  top: 8px;
  right: 5%;
  left: 5%;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(270deg, var(--brand-2), var(--brand));
}

.jn {
  position: relative;
  padding: 30px 6px 0;
  text-align: center;
}

.jn::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 18px;
  height: 18px;
  margin-left: -9px;
  border-radius: 50%;
  background: var(--surface);
  border: 3px solid var(--brand);
  box-shadow: 0 0 0 4px var(--surface);
  transition: transform 0.25s ease;
}

.jn:hover::before {
  transform: scale(1.2);
}

.jn--study::before {
  border-color: var(--brand-2);
}

.jn--soon::before {
  border-style: dashed;
  border-color: #f59e0b;
}

.jn__date {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
}

.jn__title {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
}

a.jn__title {
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 4px;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

a.jn__title:hover {
  color: var(--brand);
  text-decoration-color: currentColor;
}

.jn__desc {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.4;
}

/* "behind the scenes" */

.deep {
  margin: 0 0 24px;
  border-radius: 14px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  transition: border-color 0.2s ease;
}

.deep[open],
.deep:hover {
  border-color: color-mix(in srgb, var(--brand) 35%, var(--line));
}

.deep summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.95rem;
  list-style: none;
  cursor: pointer;
  border-radius: 14px;
}

.deep summary::-webkit-details-marker {
  display: none;
}

.deep summary .icon {
  color: var(--brand);
}

.deep__chev {
  margin-inline-start: auto;
  transition: transform 0.25s ease;
}

.deep[open] .deep__chev {
  transform: rotate(180deg);
}

.deep ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 2px 16px 16px;
  list-style: none;
}

.deep li {
  position: relative;
  padding-inline-start: 16px;
  color: var(--ink-2);
  font-size: 0.94rem;
  line-height: 1.6;
}

.deep li::before {
  content: "";
  position: absolute;
  top: 0.65em;
  inset-inline-start: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand);
}

.mini__meta {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 500;
}

/* per-project accent glow + dot grid behind the mockups */

.project__visual,
.mini__visual {
  position: relative;
  isolation: isolate;
}

.project__visual::before,
.mini__visual::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(75% 65% at 30% 30%, var(--accent-glow, transparent), transparent 72%);
}

.project__visual::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(var(--grid-dot) 1px, transparent 1px);
  background-size: 20px 20px;
  -webkit-mask-image: radial-gradient(ellipse 75% 70% at 50% 50%, #000 15%, transparent 80%);
  mask-image: radial-gradient(ellipse 75% 70% at 50% 50%, #000 15%, transparent 80%);
}

.accent-izaki {
  --accent-glow: rgba(37, 64, 160, 0.22);
}

.accent-pp {
  --accent-glow: rgba(22, 163, 74, 0.2);
}

.accent-lib {
  --accent-glow: rgba(14, 165, 233, 0.22);
}

.accent-t4s {
  --accent-glow: rgba(124, 58, 237, 0.22);
}

.accent-belev {
  --accent-glow: rgba(61, 87, 201, 0.18);
}

.accent-rose {
  --accent-glow: rgba(190, 70, 110, 0.18);
}

/* the mock-ups name the system instead of showing its address (the systems aren't linked from the site) */
.browser__url--he {
  font-family: var(--font);
  direction: rtl;
}

.browser__url svg {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-inline-end: 5px;
  vertical-align: -1px;
  stroke-width: 2.4;
}

/* back to top */

.to-top {
  position: fixed;
  bottom: 20px;
  inset-inline-end: 20px;
  z-index: 40;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink-2);
  box-shadow: var(--shadow-md);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  /* visibility (switched after the fade) takes it out of the tab order and the accessibility tree */
  visibility: hidden;
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0s linear 0.25s, color 0.2s ease,
    border-color 0.2s ease;
}

.to-top.is-visible {
  opacity: 1;
  transform: none;
  pointer-events: auto;
  visibility: visible;
  transition-delay: 0s;
}

.to-top:hover {
  color: var(--brand);
  border-color: var(--brand);
}

/* ten steps in a row need about 1060px, or a title like "Time4Study" spills out of its column;
   below that the journey runs top to bottom */
@media (max-width: 1060px) {
  .journey {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 18px;
  }

  .journey::before {
    top: 8px;
    bottom: 8px;
    right: 8px;
    left: auto;
    width: 2px;
    height: auto;
    background: linear-gradient(180deg, var(--brand-2), var(--brand));
  }

  .jn {
    padding: 0;
    padding-inline-start: 36px;
    text-align: start;
  }

  .jn::before {
    top: 2px;
    right: 0;
    left: auto;
    margin-left: 0;
  }

  /* date and title share a line here; isolate them so "2025" never
     merges with a Latin title like "ALAN" into one reordered run */
  .jn__title {
    display: inline;
    margin-inline-start: 8px;
    unicode-bidi: isolate;
  }

  .jn__date {
    display: inline;
    unicode-bidi: isolate;
  }

  .jn__desc {
    margin-top: 2px;
  }
}

@media (max-width: 560px) {
  .to-top {
    bottom: 14px;
    inset-inline-end: 14px;
    width: 42px;
    height: 42px;
  }
}

/* ==========================================================================
   AI section (always dark, so the brand marks read the same in both themes)
   ========================================================================== */

.ai-band {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: #060a18;
  color: #e9edfb;
}

.ai-band::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(38% 48% at 88% 8%, rgba(51, 85, 255, 0.34), transparent 70%),
    radial-gradient(32% 42% at 8% 28%, rgba(217, 119, 87, 0.2), transparent 70%),
    radial-gradient(46% 50% at 50% 104%, rgba(142, 117, 178, 0.26), transparent 70%);
}

.ai-band::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(rgba(200, 212, 255, 0.1) 1px, transparent 1px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 20%, transparent 80%);
  mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 20%, transparent 80%);
}

.ai-band .kicker {
  color: #9aabff;
}

.ai-band h2 {
  color: #fff;
}

.ai-head {
  max-width: 880px;
  margin-bottom: clamp(32px, 5vw, 56px);
}

.ai-head p {
  margin: 0 0 14px;
  color: #b9c2e0;
  font-size: clamp(1.02rem, 1.3vw, 1.1rem);
}

.ai-head .ai-lead {
  color: #fff;
  font-size: clamp(1.15rem, 1.8vw, 1.38rem);
  font-weight: 500;
  line-height: 1.6;
}

.ai-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 0 0 clamp(40px, 6vw, 64px);
  padding: 0;
  list-style: none;
}

.ai-step {
  position: relative;
  padding: 24px 22px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: translate 0.3s ease, border-color 0.3s ease, background-color 0.3s ease;
}

.ai-step__num {
  display: inline-block;
  margin-bottom: 14px;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(125, 147, 255, 0.14);
  color: #9aabff;
  font-family: var(--mono);
  font-size: 0.85rem;
}

.ai-step h3 {
  margin: 0 0 8px;
  color: #fff;
  font-size: 1.15rem;
}

.ai-step p {
  margin: 0;
  color: #b9c2e0;
  font-size: 0.97rem;
  line-height: 1.6;
}

.toolbox {
  display: grid;
  gap: 30px;
}

.toolbox__title {
  margin: 0 0 14px;
  color: #c9d1ee;
  font-size: 1.05rem;
  font-weight: 600;
}

.tools {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tools--ai {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.tool {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 14px;
  row-gap: 4px;
  align-content: start;
  padding: 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: translate 0.3s ease, border-color 0.3s ease, background-color 0.3s ease;
}

.tool__logo svg,
.tool__logo img,
.skill-card__icon .icon,
.ai-step__num {
  transition: transform 0.3s ease;
}

.tool__logo {
  grid-row: 1 / span 2;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.tool__logo svg,
.tool__logo img {
  width: 30px;
  height: 30px;
  object-fit: contain;
}

.tool__logo svg.is-figma {
  width: 20px;
}

.tool__logo img.is-mono {
  filter: invert(1);
}

.tool__name {
  align-self: end;
  color: #fff;
  font-weight: 700;
  font-size: 1.08rem;
  line-height: 1.25;
}

/* isolate name and maker so "Claude" + "Anthropic" don't fuse into one LTR run */
.tool__name > span,
.tool__name small {
  unicode-bidi: isolate;
}

.tool__name small {
  margin-inline-start: 8px;
  color: #8f99bd;
  font-weight: 500;
  font-size: 0.8rem;
}

.tool__use {
  color: #b9c2e0;
  font-size: 0.92rem;
  line-height: 1.55;
}

/* College of Management logo */

.about__quote-logo {
  width: auto;
  height: 44px;
  margin-bottom: 8px;
}

.aside-card__logo {
  display: inline-grid;
  place-items: center;
  margin-bottom: 16px;
  padding: 8px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 24px -12px rgba(0, 0, 0, 0.5);
}

.aside-card__logo img {
  width: auto;
  height: 64px;
}

.tl-place {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tl-logo {
  flex: none;
  width: auto;
  height: 26px;
}

@media (max-width: 1080px) {
  .ai-steps,
  .tools {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .ai-steps,
  .tools,
  .tools--ai {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ==========================================================================
   Accessibility menu + the adjustments it applies
   ========================================================================== */

.a11y {
  position: fixed;
  bottom: 20px;
  inset-inline-start: 20px;
  z-index: 60;
}

.a11y__fab {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  padding: 0;
  border-radius: 50%;
  border: 3px solid #fff;
  background: #1d4ed8;
  color: #fff;
  box-shadow: 0 12px 28px -10px rgba(10, 17, 40, 0.55);
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.a11y__fab:hover {
  transform: scale(1.06);
  background: #1e40af;
}

.a11y__fab:focus-visible,
.a11y button:focus-visible,
.a11y a:focus-visible {
  outline: 3px solid #f59e0b;
  outline-offset: 3px;
}

.a11y__fab svg {
  width: 30px;
  height: 30px;
}

.a11y__panel {
  position: absolute;
  bottom: 68px;
  inset-inline-start: 0;
  width: min(340px, calc(100vw - 32px));
  max-height: calc(100vh - 110px);
  overflow-y: auto;
  padding: 18px;
  border-radius: 22px;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
}

.a11y__panel[hidden] {
  display: none;
}

.a11y__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.a11y__title {
  margin: 0;
  font-size: 1.15rem;
}

.a11y__title:focus {
  outline: none;
}

.a11y__close {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--ink);
  cursor: pointer;
}

.a11y__close svg {
  width: 18px;
  height: 18px;
}

.a11y__size {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--surface-2);
  font-weight: 600;
}

.a11y__size-ctrl {
  display: flex;
  align-items: center;
  gap: 8px;
}

.a11y__size button {
  width: 44px;
  height: 40px;
  padding: 0;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
}

.a11y__size button[aria-disabled="true"] {
  opacity: 0.4;
  cursor: default;
}

.a11y__size-val {
  min-width: 48px;
  text-align: center;
  direction: ltr;
}

.a11y__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.a11y__opt {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 8px;
  border-radius: 14px;
  border: 2px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.a11y__opt:hover {
  border-color: var(--brand);
}

.a11y__opt svg {
  width: 24px;
  height: 24px;
}

.a11y__opt[aria-pressed="true"] {
  border-color: var(--brand);
  background: var(--brand-soft);
  color: var(--brand);
}

.a11y__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
}

.a11y__reset {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--ink);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
}

.a11y__reset svg {
  width: 16px;
  height: 16px;
}

.a11y__statement {
  color: var(--brand);
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* accessibility contact, at the bottom of the menu */
.a11y__contact {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 14px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.a11y__contact svg {
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  color: var(--brand);
}

.a11y__contact-label {
  display: block;
}

.a11y__contact a {
  color: var(--brand);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}

/* text size */
html.a11y-font-1 {
  font-size: 115%;
}

html.a11y-font-2 {
  font-size: 130%;
}

html.a11y-font-3 {
  font-size: 150%;
}

/* with larger text the desktop links no longer fit in one row, so the phone menu takes over
   earlier: 130% up to 1200px, 150% up to 1440px */
@media (max-width: 1200px) {
  html.a11y-font-2 .nav__main,
  html.a11y-font-3 .nav__main {
    display: none;
  }

  html.a11y-font-2 .menu-toggle,
  html.a11y-font-3 .menu-toggle {
    display: grid;
  }
}

@media (max-width: 1440px) {
  html.a11y-font-3 .nav__main {
    display: none;
  }

  html.a11y-font-3 .menu-toggle {
    display: grid;
  }
}

/* a 320-400px phone with larger text: the header's booking button doesn't fit beside the logo
   and the menu (it's in the menu and in the hero too) */
@media (max-width: 400px) {
  html.a11y-font-2 .nav__cta,
  html.a11y-font-3 .nav__cta {
    display: none;
  }
}

/* the biggest text on a narrow phone: long labels wrap instead of pushing the page sideways */
html.a11y-font-3 .hero__cta .btn {
  white-space: normal;
}

html.a11y-font-3 .org__meta,
html.a11y-font-3 .contact-links a > span {
  min-width: 0;
  overflow-wrap: anywhere;
}

/* high contrast: black, white and yellow (wins over both themes) */
html:root.a11y-contrast {
  --bg: #000;
  --surface: #000;
  --surface-2: #0b0b0b;
  --ink: #fff;
  --ink-2: #fff;
  --muted: #e8e8e8;
  --line: #fff;
  --brand: #ffe600;
  --brand-strong: #fff27a;
  --brand-2: #00e5ff;
  --brand-soft: #262100;
  --ok: #3dff8b;
  --ok-text: #3dff8b;
  --danger-text: #ff8a8a;
  --header-bg: #000;
  --glass: #000;
  --glass-line: #fff;
  --grid-dot: transparent;
  --visual-bg: #000;
  --shadow-sm: none;
  --shadow-md: none;
  --shadow-lg: none;
  --logo-filter: brightness(0) invert(1);
  --logo-opacity: 1;
  --accent-glow: transparent;
  color-scheme: dark;
}

html.a11y-contrast .hero__glow,
html.a11y-contrast .hero::before,
html.a11y-contrast .ai-band::before,
html.a11y-contrast .ai-band::after,
html.a11y-contrast .teaser::before,
html.a11y-contrast .project__visual::before,
html.a11y-contrast .project__visual::after,
html.a11y-contrast .mini__visual::before {
  display: none;
}

html.a11y-contrast .float-card--b .s {
  color: var(--ok);
}

html.a11y-contrast .gradient-text {
  background: none;
  color: var(--brand);
}

html.a11y-contrast .btn--primary,
html.a11y-contrast .btn--primary:hover {
  color: #000;
}

html.a11y-contrast .aside-card,
html.a11y-contrast .teaser,
html.a11y-contrast .ai-band,
html.a11y-contrast .ai-step,
html.a11y-contrast .tool {
  background: #000;
  border: 2px solid #fff;
}

html.a11y-contrast .project,
html.a11y-contrast .org-group,
html.a11y-contrast .mini,
html.a11y-contrast .stat,
html.a11y-contrast .skill-card,
html.a11y-contrast .tl-card,
html.a11y-contrast .form,
html.a11y-contrast .org-dialog {
  border-width: 2px;
}

html.a11y-contrast a:not(.btn):not(.link-btn):not(.brand) {
  color: var(--brand);
  text-decoration: underline;
}

/* grayscale: on the root so fixed elements keep working */
html.a11y-grayscale {
  filter: grayscale(1);
}

/* open dialogs live in the top layer, outside the root's filter */
html.a11y-grayscale dialog {
  filter: grayscale(1);
}

/* highlighted links */
html.a11y-links a {
  text-decoration: underline !important;
  text-decoration-thickness: 2px !important;
  text-underline-offset: 3px;
}

html.a11y-links a:not(.btn):not(.link-btn):not(.brand) {
  background-color: rgba(255, 214, 0, 0.35);
  color: inherit;
}

html.a11y-links .btn,
html.a11y-links .link-btn {
  outline: 2px dashed currentColor;
  outline-offset: 3px;
}

/* readable font */
html.a11y-readable body,
html.a11y-readable button,
html.a11y-readable input,
html.a11y-readable select,
html.a11y-readable textarea {
  font-family: Arial, "Helvetica Neue", Helvetica, sans-serif !important;
}

/* text spacing (WCAG 1.4.12 values) */
html.a11y-spacing body {
  line-height: 1.9 !important;
  letter-spacing: 0.12em !important;
  word-spacing: 0.16em !important;
}

html.a11y-spacing p,
html.a11y-spacing li {
  line-height: 1.9 !important;
}

html.a11y-spacing p {
  margin-bottom: 2em;
}

/* stop animations */
html.a11y-nomotion,
html.a11y-nomotion *,
html.a11y-nomotion *::before,
html.a11y-nomotion *::after {
  animation: none !important;
  transition: none !important;
  scroll-behavior: auto !important;
}

html.a11y-nomotion .reveal {
  opacity: 1 !important;
  transform: none !important;
}

/* big cursor */
html.a11y-cursor,
html.a11y-cursor * {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='44' viewBox='0 0 24 24'%3E%3Cpath d='M4 2.5 20 11l-7 1.8-3.4 6.7z' fill='%23000' stroke='%23fff' stroke-width='1.4' stroke-linejoin='round'/%3E%3C/svg%3E") 7 5, auto !important;
}

@media (max-width: 560px) {
  .a11y {
    bottom: 14px;
    inset-inline-start: 14px;
  }

  .a11y__fab {
    width: 50px;
    height: 50px;
  }
}

@media print {
  .a11y,
  .to-top {
    display: none;
  }

  /* a printout (or a saved PDF) never scrolls, so nothing would ever fade in */
  .js .reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
    animation: none !important;
  }
}

/* ==========================================================================
   Legal pages
   ========================================================================== */

.legal {
  padding: clamp(40px, 7vw, 88px) 0 clamp(56px, 8vw, 104px);
}

.legal__inner {
  max-width: 820px;
}

.legal h1 {
  margin: 12px 0 8px;
  font-size: clamp(2.1rem, 5vw, 3rem);
  line-height: 1.15;
}

.legal__updated {
  margin: 0 0 32px;
  color: var(--muted);
  font-size: 0.95rem;
}

.legal__intro {
  margin: 0 0 28px;
  padding: 18px 20px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink-2);
}

.legal h2 {
  margin: 36px 0 10px;
  font-size: clamp(1.25rem, 2.4vw, 1.5rem);
}

.legal p,
.legal li {
  color: var(--ink-2);
  font-size: 1.04rem;
  line-height: 1.8;
}

.legal p {
  margin: 0 0 14px;
}

.legal ul {
  margin: 0 0 16px;
  padding-inline-start: 22px;
}

.legal li {
  margin-bottom: 6px;
}

.legal a {
  color: var(--brand);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.legal__contact {
  margin-top: 16px;
  padding: 18px 20px;
  border-radius: 16px;
  background: var(--brand-soft);
  border: 1px solid var(--line);
}

.legal__contact p {
  margin: 0 0 6px;
  color: var(--ink);
  overflow-wrap: anywhere; /* a long email address still fits a narrow screen at large text sizes */
}

.legal__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 44px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.legal__nav a {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}

.legal__nav a[aria-current="page"] {
  border-color: var(--brand);
  color: var(--brand);
}

.nav__back {
  min-height: 42px;
  padding: 0 16px;
  font-size: 0.95rem;
}

/* footer legal links */
.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-legal a {
  color: var(--ink-2);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 3px;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.footer-legal a:hover {
  color: var(--brand);
  text-decoration-color: currentColor;
}

.footer-note {
  flex-basis: 100%;
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.85rem;
}

/* consent checkbox in the contact form */
.field--check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.field--check input {
  flex: none;
  width: 20px;
  height: 20px;
  margin-top: 3px;
  padding: 0;
  accent-color: var(--brand);
}

.field--check label {
  font-weight: 500;
  font-size: 0.93rem;
  line-height: 1.6;
  color: var(--ink-2);
}

.field--check a {
  color: var(--brand);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* footer: brand + socials, then legal links + copyright, then the small print */
.site-footer .footer-grid {
  display: grid;
  gap: 18px;
}

.footer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 24px;
}

.footer-row p {
  margin: 0;
}

/* on phones the accessibility and back-to-top buttons float over the bottom corners;
   leave room so they never cover the last line of the footer */
@media (max-width: 560px) {
  .site-footer {
    padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px));
  }
}

/* ==========================================================================
   Hover micro-interactions: mouse and trackpad only, so a tap on a phone
   doesn't leave a card lifted. Movement uses translate/transform and the
   shadows fade in by opacity; with reduced motion, or the accessibility
   menu's "stop animations", only the colour change remains.
   ========================================================================== */

/* a ready-made shadow that fades in, so the shadow itself is never animated */
.skill-card::after,
.stat::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  box-shadow: var(--shadow-md);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

@media (hover: hover) and (pointer: fine) {
  .skill-card:hover,
  .stat:hover {
    border-color: color-mix(in srgb, var(--brand) 38%, var(--line));
  }

  .skill-card:hover::after,
  .stat:hover::after {
    opacity: 1;
  }

  .ai-step:hover {
    border-color: rgba(154, 171, 255, 0.5);
    background-color: rgba(255, 255, 255, 0.06);
  }

  .tool:hover {
    border-color: rgba(255, 255, 255, 0.24);
    background-color: rgba(255, 255, 255, 0.07);
  }

  .contact-links a:hover .arrow {
    color: var(--brand);
  }
}

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  html:not(.a11y-nomotion) .skill-card:hover,
  html:not(.a11y-nomotion) .stat:hover,
  html:not(.a11y-nomotion) .tool:hover {
    translate: 0 -3px;
  }

  html:not(.a11y-nomotion) .ai-step:hover {
    translate: 0 -4px;
  }

  html:not(.a11y-nomotion) .skill-card:hover .skill-card__icon .icon {
    transform: scale(1.12) rotate(-6deg);
  }

  html:not(.a11y-nomotion) .tool:hover .tool__logo svg,
  html:not(.a11y-nomotion) .tool:hover .tool__logo img {
    transform: scale(1.1);
  }

  /* RTL: "forward" is to the left */
  html:not(.a11y-nomotion) .ai-step:hover .ai-step__num {
    transform: translateX(-4px);
  }

  html:not(.a11y-nomotion) .clients__row a:hover img,
  html:not(.a11y-nomotion) .socials a:hover {
    translate: 0 -2px;
  }

  html:not(.a11y-nomotion) .contact-links a:hover {
    translate: -4px 0;
  }

  html:not(.a11y-nomotion) .contact-links a:hover .ico {
    transform: scale(1.08);
  }

  html:not(.a11y-nomotion) .hero__more:hover .icon {
    transform: translateY(3px);
  }
}

/* Windows High Contrast (forced colors) drops backgrounds and shadows, which is how the active
   nav item and the widget's pressed options were told apart; an outline survives */
@media (forced-colors: active) {
  .nav__links a.is-active,
  .mobile-menu a.is-active,
  .a11y__opt[aria-pressed="true"] {
    outline: 3px solid Highlight;
    outline-offset: -3px;
  }
}
