/* Showcase: design work and apps by Abdullah Al Fahim.
   Same design system as the main site: violet scale on brand-900 #3A10AD,
   Acid Lime #8f7eff as the only highlight, Sora and JetBrains Mono. */

@font-face {
  font-family: "Sora";
  src: url("../assets/fonts/sora.woff") format("woff");
  font-weight: 100 800;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("../assets/fonts/jetbrains-mono.woff") format("woff");
  font-weight: 100 800;
  font-display: swap;
}

:root {
  --brand-50: #f3f2ff;
  --brand-100: #e9e7ff;
  --brand-200: #d6d2ff;
  --brand-300: #b4adff;
  --brand-400: #8f7eff;
  --brand-500: #6b4aff;
  --brand-600: #5a25ff;
  --brand-700: #4d13ee;
  --brand-900: #3a10ad;
  --brand-950: #1e066f;
  --lime: #8f7eff;
  --on-lime: #1e066f;

  --canvas: #e7effd;   /* main background */
  --tint: #d9e5fb;     /* alternate sections, a shade deeper */
  --surface: #ffffff;  /* cards stay white on the blue */
  --border: #cbd9f3;
  --ink: #160a45;
  --muted: #5d5878;
  --mark: var(--brand-600);
  --chip: var(--brand-50);
  --shadow: 0 1px 2px rgb(30 6 111 / 0.05), 0 12px 32px rgb(30 6 111 / 0.08);

  --night: #0b0524;
  --deep: #1e066f;
  --deep-2: #2a0d8f;
  --deep-ink: #ffffff;
  --deep-muted: #c9c3f5;
  --deep-line: rgb(255 255 255 / 0.14);

  --display: "Sora", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Code", Consolas, monospace;
  --max: 1200px;
  --r: 20px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font: 400 16px/1.65 var(--display);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.08; letter-spacing: -0.03em; font-weight: 500; }
p { margin: 0; }
em { font-style: normal; color: var(--mark); }
.deep em, .hero em { color: var(--lime); }
svg.i { width: 18px; height: 18px; fill: currentColor; flex: none; }

.wrap { width: min(100% - 32px, var(--max)); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 99; background: var(--lime); color: var(--on-lime); padding: 8px 14px; border-radius: 999px; }
.skip:focus { left: 16px; }
:focus-visible { outline: 3px solid var(--lime); outline-offset: 3px; border-radius: 8px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 50px; padding: 0 24px; border-radius: 999px;
  font: 500 15px/1 var(--display); text-decoration: none; white-space: nowrap;
  border: 1.5px solid transparent; cursor: pointer;
  transition: transform .2s ease, background-color .2s ease, color .2s ease, border-color .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-lime { background: var(--lime); color: var(--on-lime); }
.btn-lime:hover { background: #b4adff; }
.btn-ghost { border-color: rgb(255 255 255 / 0.55); color: #fff; }
.btn-ghost:hover { background: #fff; color: var(--deep); border-color: #fff; }
.btn-dark { background: var(--ink); color: var(--canvas); }
.btn-line { border-color: var(--border); color: var(--ink); background: var(--surface); }
.btn-line:hover { border-color: var(--mark); color: var(--mark); }
.btn-violet { background: var(--brand-500); color: #fff; }
.btn-violet:hover { background: var(--brand-600); }

/* Header */
.top {
  position: sticky; top: 0; z-index: 40;
  background: var(--night); color: #fff;
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.top.scrolled { border-color: var(--deep-line); box-shadow: 0 8px 24px rgb(10 2 40 / 0.25); }
.top nav { display: flex; align-items: center; gap: 20px; min-height: 72px; }
.logo { font-weight: 600; font-size: 18px; letter-spacing: -0.02em; text-decoration: none; margin-right: auto; white-space: nowrap; flex-shrink: 0; }
.logo span { color: var(--lime); }
.links { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.links a {
  display: block; padding: 9px 16px; border-radius: 999px; border: 1px solid transparent; text-decoration: none;
  font: 500 12px/1.2 var(--display); letter-spacing: 0.08em; text-transform: uppercase; color: var(--deep-muted);
  transition: color .2s, background-color .2s, border-color .2s;
}
.links a:hover { color: #fff; }
.links a[aria-current] { color: #fff; background: rgb(107 74 255 / 0.28); border-color: rgb(143 126 255 / 0.45); box-shadow: 0 0 24px rgb(107 74 255 / 0.35); }
.icon-btn {
  display: inline-grid; place-items: center; width: 44px; height: 44px;
  border-radius: 999px; border: 1px solid var(--deep-line); background: transparent; color: #fff; cursor: pointer;
}
.icon-btn svg { width: 20px; height: 20px; }
.theme { display: none !important; }
.menu { display: none; }
.top .btn { min-height: 44px; padding: 0 20px; }

/* Hero: dark full-bleed stage, giant faded word behind a centred portrait */
.hero {
  position: relative; overflow: hidden; color: #fff;
  background:
    radial-gradient(ellipse 60% 70% at 50% 38%, rgb(77 19 238 / 0.42), transparent 70%),
    radial-gradient(ellipse 40% 50% at 85% 90%, rgb(107 74 255 / 0.18), transparent 70%),
    var(--night);
}
.hero-word {
  position: absolute; left: 50%; top: 40%; transform: translate(-50%, -50%);
  font: 700 clamp(110px, 18vw, 300px)/0.9 var(--display); letter-spacing: -0.03em;
  color: rgb(255 255 255 / 0.055); white-space: nowrap; pointer-events: none; user-select: none;
}
.hero-in {
  position: relative; display: grid; grid-template-columns: 1fr 1fr; align-items: center;
  min-height: clamp(560px, calc(100svh - 72px), 900px);
}
.hero-text { position: relative; z-index: 3; max-width: 440px; padding: 48px 0 120px; }
.hi { font-size: clamp(28px, 3.2vw, 44px); font-weight: 500; letter-spacing: -0.02em; }
.hero h1 { margin: 2px 0 20px; }
.hero h1 span { display: block; }
.hero h1 .first { font-size: clamp(60px, 7.2vw, 108px); font-weight: 700; line-height: 0.95; color: var(--lime); letter-spacing: -0.045em; }
.hero h1 .last { font-size: clamp(36px, 4.4vw, 64px); font-weight: 600; line-height: 1.1; letter-spacing: -0.03em; }
.hero-tag { margin-top: 14px; font: 500 13px/1.3 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--lime); }
.hero-tag::before { content: "// "; opacity: 0.7; }
.hero-lead { font-size: 16px; color: var(--deep-muted); max-width: 420px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero .btn-ghost { background: rgb(255 255 255 / 0.04); border-color: rgb(255 255 255 / 0.22); }
.hero .btn-ghost:hover { background: #fff; }

.hero-photo {
  position: absolute; left: 50%; bottom: 0; z-index: 2; transform: translateX(-50%);
  width: min(46vw, 640px); pointer-events: none;
}
.hero-photo img {
  width: 100%; aspect-ratio: 1; object-fit: cover;
  -webkit-mask-image: radial-gradient(ellipse 50% 56% at 50% 44%, #000 58%, transparent 100%);
  mask-image: radial-gradient(ellipse 50% 56% at 50% 44%, #000 58%, transparent 100%);
}
.hero-roles {
  position: absolute; right: 0; bottom: 12%; z-index: 3; margin: 0; text-align: right; line-height: 1;
}
.hero-roles span {
  display: block; font: 600 clamp(12px, 1.15vw, 17px)/1.2 var(--display); letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--brand-300); margin-bottom: 8px;
}
.hero-roles b {
  display: block; font: 700 clamp(26px, 2.8vw, 38px)/0.98 var(--display); letter-spacing: -0.03em; text-transform: uppercase;
  text-shadow: 0 4px 30px rgb(10 4 32 / 0.6);
}
.scroll {
  position: absolute; left: 50%; bottom: 22px; z-index: 3; transform: translateX(-50%);
  display: grid; justify-items: center; gap: 10px; text-decoration: none;
  font: 500 10px/1 var(--mono); letter-spacing: 0.22em; text-transform: uppercase; color: var(--deep-muted);
}
.scroll i { width: 22px; height: 34px; border: 1.5px solid rgb(255 255 255 / 0.5); border-radius: 12px; position: relative; }
.scroll i::after {
  content: ""; position: absolute; left: 50%; top: 7px; width: 3px; height: 7px; margin-left: -1.5px;
  border-radius: 2px; background: var(--lime); animation: wheel 1.8s ease-in-out infinite;
}
@keyframes wheel { 0% { opacity: 0; transform: translateY(-3px); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(10px); } }

/* Cover marquee */
.reel { background: var(--night); display: grid; gap: 14px; padding: 8px 0 14px; overflow: hidden; }
.reel-row { display: flex; gap: 14px; width: max-content; animation: slide 70s linear infinite; }
.reel-row.rev { animation-direction: reverse; }
.reel:hover .reel-row { animation-play-state: paused; }
.reel img { width: 260px; aspect-ratio: 808 / 632; object-fit: cover; border-radius: 14px; }
@keyframes slide { to { transform: translateX(-50%); } }

/* Ticker */
.ticker { background: var(--lime); color: var(--on-lime); overflow: hidden; padding: 18px 0; }
.ticker-row { display: flex; width: max-content; animation: slide 40s linear infinite; }
.ticker span { font: 500 18px/1 var(--display); white-space: nowrap; padding-right: 36px; display: inline-flex; align-items: center; gap: 36px; }
.ticker span::after { content: "✦"; font-size: 14px; }

/* Sections */
section { padding: 112px 0; }
section.hero { padding: 0; }
.alt { background: var(--tint); }
.deep { background: var(--deep); color: var(--deep-ink); }
.eyebrow {
  display: block; font: 500 12px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
  padding-bottom: 18px; border-bottom: 1px solid var(--border); margin-bottom: 36px;
}
.deep .eyebrow { color: var(--deep-muted); border-color: var(--deep-line); }
h2 { font-size: clamp(34px, 4.6vw, 58px); max-width: 820px; }
.sub { color: var(--muted); font-size: 18px; max-width: 640px; margin-top: 18px; }
.deep .sub { color: var(--deep-muted); }

/* About */
.about-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 56px; margin-top: 48px; align-items: start; }
.about-text p { font-size: 18px; color: var(--muted); }
.about-text p + p { margin-top: 18px; }
.about-text p:first-child { color: var(--ink); font-size: 22px; line-height: 1.5; }
.facts { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 8px 24px; box-shadow: var(--shadow); }
.facts div { display: flex; justify-content: space-between; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--border); }
.facts div:last-of-type { border-bottom: 0; }
.facts dt { font: 500 12px/1.6 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.facts dd { margin: 0; font-weight: 500; text-align: right; }
.facts a { display: flex; align-items: center; justify-content: space-between; margin: 0 -24px; padding: 16px 24px; border-top: 1px solid var(--border); color: var(--mark); font-weight: 500; text-decoration: none; }
.facts a:hover { text-decoration: underline; }

/* Why */
.why-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 56px; }
.why-card { border: 1px solid var(--deep-line); border-radius: var(--r); padding: 32px; background: rgb(255 255 255 / 0.03); }
.why-card .n { font: 500 13px/1 var(--mono); color: var(--lime); }
.why-card h3 { font-size: 24px; margin: 40px 0 12px; }
.why-card p { color: var(--deep-muted); }

/* Numbers */
.nums { padding: 88px 0; }
.num-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin-top: 44px; border-top: 1px solid var(--border); }
.num { padding: 28px 24px 0 0; }
.num + .num { padding-left: 24px; border-left: 1px solid var(--border); }
.num b { display: block; font-size: clamp(44px, 5.5vw, 72px); line-height: 1; letter-spacing: -0.04em; font-weight: 500; }
.num b sup { font-size: .5em; color: var(--mark); vertical-align: .6em; }
.num > span { display: block; margin-top: 12px; color: var(--muted); }
.note { margin-top: 32px; font: 400 13px/1.5 var(--mono); color: var(--muted); }

/* Services */
.svc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 56px; }
.svc {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 28px;
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.svc:hover { transform: translateY(-4px); border-color: var(--brand-300); box-shadow: var(--shadow); }
.svc .ico { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--chip); color: var(--mark); }
.svc .ico svg { width: 24px; height: 24px; }
.svc h3 { font-size: 21px; margin: 22px 0 8px; letter-spacing: -0.02em; }
.svc p { color: var(--muted); }
.svc.cta { background: var(--deep); border-color: var(--deep); color: #fff; display: flex; flex-direction: column; }
.svc.cta p { color: var(--deep-muted); margin-bottom: 24px; }
.svc.cta .btn { margin-top: auto; align-self: flex-start; }

/* Work */
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin: 44px 0 36px; }
.filters button {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 999px;
  border: 1.5px solid var(--border); background: var(--surface); cursor: pointer; font-size: 15px; font-weight: 500;
  transition: background-color .2s, border-color .2s, color .2s;
}
.filters button:hover { border-color: var(--mark); }
.filters button small { font: 500 12px/1 var(--mono); color: var(--muted); }
.filters button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--canvas); }
.filters button[aria-pressed="true"] small { color: inherit; opacity: .7; }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px 20px; }
.card { display: block; text-align: left; background: none; border: 0; padding: 0; cursor: pointer; }
.card[hidden] { display: none; }
.card .im { display: block; position: relative; border-radius: 16px; overflow: hidden; background: var(--chip); aspect-ratio: 808 / 632; }
.card .im img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.card:hover .im img { transform: scale(1.04); }
.card .src {
  position: absolute; top: 12px; left: 12px; padding: 6px 10px; border-radius: 999px;
  background: rgb(255 255 255 / 0.92); color: #160a45; font: 500 12px/1 var(--mono); letter-spacing: .04em;
}
.card .open {
  position: absolute; right: 12px; bottom: 12px; width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center; background: var(--lime); color: var(--on-lime);
  opacity: 0; transform: translateY(8px); transition: opacity .25s, transform .25s;
}
.card:hover .open, .card:focus-visible .open { opacity: 1; transform: none; }
.card b { display: block; margin-top: 14px; font-size: 17px; font-weight: 500; letter-spacing: -0.01em; }
.card small { display: block; margin-top: 2px; color: var(--muted); font-size: 14px; }
.work-more { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 52px; }

/* Lightbox */
dialog.lb {
  width: min(100% - 32px, 1040px); max-height: calc(100dvh - 32px); padding: 0; border: 0; border-radius: 22px;
  background: var(--surface); color: var(--ink); overflow: hidden;
}
dialog.lb::backdrop { background: rgb(12 4 48 / 0.82); backdrop-filter: blur(4px); }
.lb-body { display: flex; flex-direction: column; max-height: calc(100dvh - 32px); }
.lb-stage { position: relative; background: #0c0a1a; display: grid; place-items: center; min-height: 0; flex: 1; }
.lb-stage img { max-height: calc(100dvh - 140px); width: auto; max-width: 100%; object-fit: contain; }
.lb-nav {
  position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; border-radius: 50%;
  border: 0; background: rgb(255 255 255 / 0.92); color: #160a45; cursor: pointer; display: grid; place-items: center;
}
.lb-nav svg { width: 22px; height: 22px; }
.lb-prev { left: 14px; }
.lb-next { right: 14px; }
.lb-bar { display: flex; align-items: center; gap: 16px; padding: 16px 20px; flex-wrap: wrap; }
.lb-bar div:first-child { margin-right: auto; min-width: 0; }
.lb-bar b { display: block; font-size: 18px; }
.lb-bar small { color: var(--muted); }
.lb-bar .acts { display: flex; gap: 10px; }
.lb-bar .btn { min-height: 44px; padding: 0 18px; }

/* Apps */
.apps-list { display: grid; gap: 24px; margin-top: 56px; }
.app {
  display: grid; grid-template-columns: 1fr 1fr; border-radius: 28px; overflow: hidden;
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow);
}
.app:nth-child(even) .app-art { order: 2; }
.app-art {
  position: relative; display: flex; justify-content: center; align-items: flex-end; gap: 18px;
  padding: 44px 32px 0; min-height: 420px; overflow: hidden;
  background: linear-gradient(150deg, var(--brand-500), var(--brand-950));
}
.app-art.lime { background: linear-gradient(150deg, #d3d1ff, var(--lime)); }
.app-art.green { background: linear-gradient(150deg, #19c37d, #00513c); }
.app-art.web { align-items: center; padding: 40px 32px; }
.phone {
  width: 42%; max-width: 210px; border-radius: 26px 26px 0 0; overflow: hidden; border: 6px solid #0c0a1a; border-bottom: 0;
  background: #0c0a1a; box-shadow: 0 24px 48px rgb(0 0 0 / 0.35);
}
.phone + .phone { transform: translateY(36px); }
.phone img { width: 100%; }
.browser { width: 100%; border-radius: 14px; overflow: hidden; background: #0c0a1a; box-shadow: 0 24px 48px rgb(0 0 0 / 0.35); }
.browser .bar { display: flex; align-items: center; gap: 6px; padding: 10px 12px; background: #1f1b3a; }
.browser .bar i { width: 10px; height: 10px; border-radius: 50%; background: #4a4570; }
.browser .bar span { margin-left: 10px; font: 500 12px/1 var(--mono); color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-info { padding: 44px; display: flex; flex-direction: column; }
.app-info .tag { font: 500 12px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--mark); }
.app-info h3 { font-size: clamp(30px, 3.4vw, 42px); margin: 14px 0 6px; }
.app-info .tagline { font-size: 19px; font-weight: 500; color: var(--ink); }
.app-info p.desc { color: var(--muted); margin-top: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 22px 0 0; }
.chips li { padding: 7px 12px; border-radius: 999px; background: var(--chip); font-size: 13px; font-weight: 500; }
.app .url { margin-top: auto; padding-top: 28px; font: 500 13px/1.4 var(--mono); color: var(--muted); word-break: break-all; }
.app .acts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.app .acts .btn { min-height: 46px; }

.more-apps-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-top: 72px; }
.more-apps-head h3 { font-size: 26px; }
.more-apps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 24px; }
.mini {
  display: flex; flex-direction: column; text-decoration: none; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r); overflow: hidden; transition: transform .25s, border-color .25s, box-shadow .25s;
}
.mini:hover { transform: translateY(-4px); border-color: var(--brand-300); box-shadow: var(--shadow); }
.mini .shot { height: 220px; overflow: hidden; background: linear-gradient(160deg, var(--brand-100), var(--brand-200)); display: flex; justify-content: center; padding-top: 22px; }
.mini .shot img { width: 52%; border-radius: 16px 16px 0 0; border: 4px solid #0c0a1a; border-bottom: 0; object-fit: cover; object-position: top; }
.mini .shot.wide { padding: 22px 16px 0; }
.mini .shot.wide img { width: 100%; height: 100%; object-fit: cover; object-position: left top; border-radius: 10px 10px 0 0; }
.mini div { padding: 18px 20px 22px; }
.mini b { display: block; font-size: 18px; }
.mini small { display: block; color: var(--muted); margin-top: 4px; font-size: 14px; line-height: 1.5; }
.mini div > span { display: inline-block; margin-top: 12px; font: 500 12px/1 var(--mono); color: var(--mark); }

/* Process */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 56px; counter-reset: s; list-style: none; padding: 0; }
.steps li { border-top: 2px solid var(--deep-line); padding-top: 24px; position: relative; }
.steps li::before {
  counter-increment: s; content: "0" counter(s);
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  background: var(--lime); color: var(--on-lime); font: 600 14px/1 var(--mono); margin-bottom: 22px;
}
.steps h3 { font-size: 22px; margin-bottom: 8px; }
.steps p { color: var(--deep-muted); }

/* Contact */
/* Book a call: Cal.com inline embed */
.book { display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: 48px; align-items: start; }
.book-intro { position: sticky; top: 104px; }
.book-types { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 28px; }
.book-types button { flex: 1; display: grid; gap: 4px; text-align: left; min-width: 0; padding: 12px 12px; border: 1.5px solid var(--border); border-radius: 16px; background: var(--surface); color: var(--ink); font: inherit; cursor: pointer; transition: border-color .2s, box-shadow .2s; }
.book-types button b { font: 600 18px/1.1 var(--display); letter-spacing: -0.01em; }
.book-types button small { font: 500 10.5px/1.2 var(--mono); letter-spacing: .04em; white-space: nowrap; text-transform: uppercase; color: var(--muted); }
.book-types button:hover { border-color: var(--mark); }
.book-types button[aria-pressed="true"] { border-color: var(--mark); box-shadow: 0 0 0 3px var(--lime); }
@media (max-width: 480px) {
  .book-types button { padding: 10px 8px; }
  .book-types button b { font-size: 16px; }
  .book-types button small { font-size: 9px; letter-spacing: .02em; }
}
.book-points { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 12px; color: var(--muted); }
.book-points li { position: relative; padding-left: 28px; }
.book-points li::before { content: ""; position: absolute; left: 0; top: 4px; width: 16px; height: 16px; border-radius: 50%; background: var(--lime); box-shadow: inset 0 0 0 4px var(--surface); border: 1.5px solid var(--mark); }
.book-points a, .contact .sub a { color: var(--mark); text-decoration: underline; text-underline-offset: 3px; }
.contact .sub a { color: var(--lime); }
/* Card starts level with the headline (below the eyebrow) on wide screens */
.book-side { margin-top: 67px; min-width: 0; }
.book-cal { min-height: 452px; border: 1px solid var(--border); border-radius: 24px; background: var(--surface); overflow: hidden; }
.book-cal { position: relative; }
/* Crop Cal.com's footer strip (about 81px) off the bottom of the embed */
.book-cal iframe { display: block; margin-bottom: -81px; }
/* The spare frame stays painted (not hidden) so the browser keeps it rendered; it just sits invisible underneath */
.cal-pane { position: absolute; inset: 0 0 auto; z-index: 0; opacity: 0; pointer-events: none; }
.cal-pane.on { position: relative; z-index: 1; opacity: 1; pointer-events: auto; }
.book-cal.ready .book-wait { display: none; }
.book-wait { margin: 0; padding: 48px 24px; text-align: center; color: var(--muted); }
.book-wait a { color: var(--mark); }
@media (max-width: 960px) {
  .book { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .book-intro { position: static; }
  .book-side { margin-top: 0; }
  .book-cal { min-height: 560px; border-radius: 18px; }
  /* No footer crop on phones: Cal's mobile booking form ends with Back/Confirm, which the crop would cut off */
  .book-cal iframe { margin-bottom: 0; }
}

.contact { text-align: center; position: relative; overflow: hidden; }
.contact::before {
  content: ""; position: absolute; left: 50%; top: -260px; width: 900px; height: 900px; transform: translateX(-50%);
  border-radius: 50%; background: radial-gradient(closest-side, rgb(107 74 255 / 0.4), transparent); pointer-events: none;
}
.contact .wrap { position: relative; }
.contact h2 { margin-inline: auto; font-size: clamp(38px, 5.6vw, 72px); }
.contact .sub { margin-inline: auto; }
.contact .hero-actions { justify-content: center; }
.socials { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; list-style: none; padding: 0; margin: 40px 0 0; }
.socials a {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 999px;
  border: 1px solid var(--deep-line); text-decoration: none; color: var(--deep-muted); font-size: 14px; transition: color .2s, border-color .2s;
}
.socials a:hover { color: #fff; border-color: rgb(255 255 255 / 0.5); }
.socials svg { width: 16px; height: 16px; fill: currentColor; }

footer { background: var(--deep); color: var(--deep-muted); border-top: 1px solid var(--deep-line); padding: 28px 0; font-size: 14px; }
footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
footer a { color: #fff; }

/* Reveal */
.js .rv { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.js .rv.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .scroll i::after { animation: none; }
  .js .rv { opacity: 1; transform: none; transition: none; }
}

/* Responsive */
@media (max-width: 1020px) {
  .svc-grid, .grid { grid-template-columns: repeat(2, 1fr); }
  .more-apps { grid-template-columns: repeat(2, 1fr); }
  .app { grid-template-columns: 1fr; }
  .app:nth-child(even) .app-art { order: 0; }
  .app-art { min-height: 360px; }
}
@media (max-width: 860px) {
  .hero-in { grid-template-columns: 1fr; min-height: 0; }
  .hero-text { padding: 40px 0 0; max-width: none; }
  .hero-word { top: 66%; font-size: 30vw; }
  .hero-photo { position: relative; left: auto; transform: none; width: min(100%, 440px); margin: 8px auto 0; }
  .hero-roles { position: relative; right: auto; bottom: auto; margin-top: -96px; padding-bottom: 28px; }
  .hero-roles b { font-size: clamp(30px, 9.4vw, 44px); }
  .hero-roles span { font-size: clamp(11px, 3.5vw, 15px); letter-spacing: 0.01em; }
  .scroll { display: none; }
  .top .hire { display: none; }
  .about-grid { grid-template-columns: 1fr; gap: 36px; }
  .why-grid { grid-template-columns: 1fr; }
  .why-card h3 { margin-top: 24px; }
  .num-grid { grid-template-columns: repeat(2, 1fr); }
  .num:nth-child(3) { padding-left: 0; border-left: 0; }
  .num { padding-bottom: 28px; }
  .steps { grid-template-columns: repeat(2, 1fr); gap: 36px 20px; }
  section { padding: 84px 0; }
  section.hero { padding: 0; }
}
@media (max-width: 560px) {
  .hero-lead { font-size: 17px; }
  .hero-actions .btn { flex: 1 1 100%; }
  .reel img { width: 190px; }
  .svc-grid, .grid, .more-apps, .steps { grid-template-columns: 1fr; }
  .num b { font-size: 44px; }
  .app-info { padding: 28px 22px; }
  .app-art { padding: 32px 20px 0; min-height: 300px; gap: 12px; }
  .app-art.web { padding: 28px 16px; min-height: 0; }
  .app .acts .btn { flex: 1 1 100%; }
  .lb-bar .acts { width: 100%; }
  .lb-bar .acts .btn { flex: 1; }
  .lb-nav { width: 40px; height: 40px; }
  .facts dd { font-size: 15px; }
  footer .wrap { flex-direction: column; }
}

/* Clients: logo cards in an endless strip. Logos stay on white in both themes,
   grey until hovered. showcase.js fills the strip and adds files from /clients/. */
.clients { padding-bottom: 104px; overflow: hidden; }
.logo-strip {
  margin-top: 48px; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}
.logo-strip { display: grid; gap: 12px; }
.logo-row { display: flex; gap: 14px; width: max-content; padding: 4px 0; animation: slide 40s linear infinite; }
.logo-row.rev { animation-name: slide-rev; }   /* second row runs the other way */
@keyframes slide-rev { from { transform: translateX(-50%); } to { transform: translateX(0); } }
.logo-strip:hover .logo-row { animation-play-state: paused; }
.client {
  flex: none; display: grid; place-items: center; width: 150px; height: 80px; padding: 10px 14px;
  border-radius: 14px; background: #fff; border: 1px solid var(--border);
  transition: transform .25s ease, box-shadow .25s ease;
}
/* Logos are sized for a 144 x 64 area (tools/process_clients.py); scaled to fill the 122 x 60 inside of the tile,
   which keeps a subtle, even padding around every logo */
.client img { width: calc(var(--w, 0px) * .85); height: calc(var(--h, 0px) * .85); max-width: 100%; max-height: 54px; object-fit: contain; filter: grayscale(1); opacity: .72; transition: filter .25s, opacity .25s; }
.client:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.client:hover img { filter: none; opacity: 1; }
.client.dark { background: #151515; border-color: #151515; }
.client.dark img { opacity: .85; }
@media (max-width: 560px) {
  .logo-strip { gap: 10px; }
  .logo-row { gap: 10px; }
  .client { width: 116px; height: 62px; padding: 8px 10px; border-radius: 12px; }
  .client img { width: calc(var(--w, 0px) * .66); height: calc(var(--h, 0px) * .66); max-height: 42px; }
}

/* CV preview: the four pages as images, so it works on phones too */
dialog.cvbox {
  width: min(100% - 32px, 920px); height: calc(100dvh - 32px); max-height: none; padding: 0; border: 0;
  border-radius: 22px; background: var(--surface); color: var(--ink); overflow: hidden;
}
dialog.cvbox[open] { display: flex; flex-direction: column; }
dialog.cvbox::backdrop { background: rgb(12 4 48 / 0.82); backdrop-filter: blur(4px); }
.cv-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 14px 16px 14px 22px; border-bottom: 1px solid var(--border); }
.cv-head > div:first-child { margin-right: auto; }
.cv-head b { display: block; font-size: 18px; }
.cv-head small { color: var(--muted); font: 500 12px/1.4 var(--mono); }
.cv-head .acts { display: flex; align-items: center; gap: 10px; }
.cv-head .btn { min-height: 44px; padding: 0 18px; }
.cv-close { color: var(--ink); border-color: var(--border); background: var(--surface); }
.cv-pages { flex: 1; overflow-y: auto; overscroll-behavior: contain; background: #e9e7f5; padding: 24px; display: grid; gap: 20px; justify-items: center; }
.cv-pages img { width: 100%; max-width: 820px; background: #fff; border-radius: 6px; box-shadow: 0 6px 24px rgb(20 10 70 / 0.18); }
@media (max-width: 560px) {
  dialog.cvbox { width: 100%; max-width: none; height: 100dvh; border-radius: 0; }
  .cv-head { padding: 12px 12px 12px 16px; }
  .cv-head .acts { width: 100%; }
  .cv-head .acts .btn { flex: 1; padding: 0 12px; }
  .cv-pages { padding: 12px; gap: 12px; }
}

/* ---------- Résumé content on the home page: roles, experience, recognition, toolbox ---------- */
.panel { min-width: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 28px; }
.panel img { max-width: 100%; height: auto; }
.label { font: 500 12px/1.2 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0 0 18px; }
.panel .label + * { margin-top: 0; }
.panel * + .label { margin-top: 30px; }

.roles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 48px; }
.role { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 24px; transition: transform .25s, border-color .25s, box-shadow .25s; }
.role:hover { transform: translateY(-4px); border-color: var(--brand-300); box-shadow: var(--shadow); }
.role .ico { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: var(--chip); color: var(--mark); }
.role .ico svg { width: 23px; height: 23px; }
.role h3 { font-size: 19px; margin: 18px 0 6px; letter-spacing: -0.02em; }
.role p { color: var(--muted); font-size: 15px; }
.facts a + a { margin-top: 0; }

.jobs { display: grid; gap: 14px; margin-top: 48px; }
.job { display: grid; grid-template-columns: 168px 1fr; gap: 24px; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 18px; }
.job-logo { display: grid; place-items: center; height: 100%; min-height: 92px; border-radius: 14px; background: #fff; border: 1px solid var(--border); padding: 14px; }
.job-logo img { max-width: 100%; max-height: 56px; width: auto; height: auto; object-fit: contain; }
.job-body { padding-right: 8px; }
.job-top { display: flex; align-items: baseline; justify-content: space-between; gap: 6px 16px; flex-wrap: wrap; }
.job h3 { font-size: 20px; letter-spacing: -0.02em; }
.job time { font: 500 12px/1.4 var(--mono); color: var(--mark); white-space: nowrap; }
.job .where { color: var(--ink); font-weight: 500; font-size: 15px; margin-top: 2px; }
.job p { color: var(--muted); margin-top: 8px; font-size: 15px; }

.exp-cards { display: grid; grid-template-columns: 1.3fr 1fr; gap: 16px; margin-top: 16px; }
.list { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.list li { display: grid; grid-template-columns: 1fr auto; column-gap: 12px; }
.list b { font-weight: 500; font-size: 15px; }
.list time { font: 500 12px/1.6 var(--mono); color: var(--mark); white-space: nowrap; }
.list span { grid-column: 1 / -1; color: var(--muted); font-size: 14px; line-height: 1.5; }
.langs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.langs div { min-width: 0; overflow-wrap: anywhere; }
.langs div { background: var(--chip); border-radius: 12px; padding: 12px 14px; }
.langs b { display: block; font-size: 15px; }
.langs span { color: var(--muted); font-size: 13px; }
.panel-link { display: inline-block; margin-top: 18px; color: var(--mark); font-weight: 500; text-decoration: none; }
.panel-link:hover { text-decoration: underline; }

.rec-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 16px; margin-top: 48px; }
.honor { display: grid; grid-template-columns: 52px minmax(0, 1fr); overflow-wrap: anywhere; gap: 14px; align-items: start; padding: 14px 0; border-top: 1px solid var(--border); }
.honor:first-of-type { border-top: 0; padding-top: 0; }
.honor .mark { display: grid; place-items: center; height: 40px; border-radius: 10px; background: var(--chip); color: var(--mark); font: 600 12px/1 var(--mono); }
.honor .mark.gold { background: var(--lime); color: var(--on-lime); }
.honor b { display: block; font-weight: 500; font-size: 15px; line-height: 1.4; }
.honor span { color: var(--muted); font-size: 14px; }
.honor a { color: var(--mark); }
.sub-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 40px 0 16px; }
.sub-head .label { margin: 0; }
.sub-head a { color: var(--mark); font-weight: 500; text-decoration: none; font-size: 15px; }
.badges { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.badge { display: flex; flex-direction: column; align-items: center; text-align: center; text-decoration: none; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 24px 16px; transition: transform .25s, border-color .25s, box-shadow .25s; }
.badge:hover { transform: translateY(-4px); border-color: var(--brand-300); box-shadow: var(--shadow); }
.badge img { width: 88px; height: 88px; }
.badge b { margin-top: 12px; font-size: 16px; }
.badge small { margin-top: 8px; padding: 5px 9px; background: #6e6a86; color: #fff; font: 500 12px/1 var(--mono); letter-spacing: .06em; }
.badge small.tier { background: var(--brand-500); }

.tools { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 48px; }
.tools img { height: 48px; width: auto; max-width: 100%; }
.tools .chips { margin: 0; }

@media (max-width: 1020px) {
  .roles { grid-template-columns: repeat(2, 1fr); }
  .badges { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .exp-cards, .rec-grid, .tools { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .roles { grid-template-columns: 1fr; }
  .job { grid-template-columns: 1fr; gap: 14px; }
  .job-logo { min-height: 80px; }
  .langs { grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
  .langs div { padding: 10px; }
  .panel { padding: 22px; }
  .tools img { height: 40px; }
}

/* LinkedIn newsletter subscribe button: compact, on the newsletter's name line */
.list .li-sub {
  align-self: center; display: inline-flex; align-items: center; gap: 6px;
  height: 30px; padding: 0 12px; border-radius: 999px;
  background: #0a66c2; color: #fff; font-weight: 500; font-size: 12px; line-height: 1; text-decoration: none; white-space: nowrap;
  transition: background-color .2s, transform .2s;
}
.list .li-sub:hover { background: #004182; transform: translateY(-1px); }
.list .li-sub svg { width: 13px; height: 13px; fill: currentColor; }

/* Nav: links share the bar on wide screens; below 960px they move into the menu */
@media (max-width: 960px) {
  .menu { display: inline-grid; }
  .links {
    position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; gap: 0; padding: 8px 16px 20px;
    background: var(--night); border-bottom: 1px solid var(--deep-line); display: none;
    max-height: calc(100dvh - 72px); overflow-y: auto;
  }
  .links.open { display: flex; }
  .links a { padding: 13px 16px; font-size: 14px; margin-top: 4px; }
}
@media (min-width: 961px) {
  .links a { padding: 9px 13px; }
}
@media (min-width: 961px) and (max-width: 1120px) {
  .links a { padding: 9px 9px; }
  .top .hire { padding-inline: 16px; }
}

/* About submenu: Experience, Recognition, Toolbox */
.has-sub { position: relative; display: flex; align-items: center; }
.sub-toggle {
  display: grid; place-items: center; width: 26px; height: 26px; margin-left: -8px; padding: 0;
  border: 0; border-radius: 50%; background: none; color: var(--deep-muted); cursor: pointer;
}
.sub-toggle:hover { color: #fff; }
.sub-toggle svg { width: 14px; height: 14px; transition: transform .2s; }
.has-sub .sub {
  list-style: none; margin: 0; padding: 8px; position: absolute; top: calc(100% + 10px); left: 0; z-index: 50;
  min-width: 200px; display: none; flex-direction: column; gap: 2px;
  background: var(--night); border: 1px solid var(--deep-line); border-radius: 16px; box-shadow: 0 18px 40px rgb(0 0 0 / 0.4);
}
.has-sub::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 12px; }
.has-sub .sub a { display: block; }
.has-sub.open .sub, .has-sub:focus-within .sub { display: flex; }
.has-sub.open .sub-toggle svg { transform: rotate(180deg); }
.has-sub.child-current > a { color: #fff; background: rgb(107 74 255 / 0.16); border-color: rgb(143 126 255 / 0.3); }
@media (hover: hover) and (min-width: 961px) {
  .has-sub:hover .sub { display: flex; }
  .has-sub:hover .sub-toggle svg { transform: rotate(180deg); }
}
.links .m-book { display: none; }
@media (max-width: 960px) {
  /* In the phone menu: About plus an arrow button that opens and closes its sections */
  .has-sub { display: flex; flex-wrap: wrap; align-items: center; }
  .has-sub > a { flex: 1; }
  .has-sub::after { display: none; }
  .sub-toggle { width: 46px; height: 46px; margin: 4px 0 0 6px; border: 1px solid var(--deep-line); border-radius: 12px; color: #fff; }
  .sub-toggle svg { width: 18px; height: 18px; }
  .has-sub .sub { position: static; display: none; flex-basis: 100%; min-width: 0; padding: 0 0 0 18px; background: none; border: 0; box-shadow: none; }
  .has-sub.open .sub { display: flex; }
  .has-sub:focus-within:not(.open) .sub { display: none; }
  .has-sub .sub a { font-size: 13px; padding: 11px 16px; color: var(--deep-muted); }
  .links .m-book { display: block; margin-top: 14px; }
  .links .m-book a { justify-content: center; padding: 14px 16px; background: var(--lime); color: var(--on-lime); border-color: var(--lime); font-weight: 600; text-align: center; }
}

/* Viewer dialog: app live pages and profile previews (reuses the CV dialog frame) */
.vb-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; background: var(--tint); }
.vb-body iframe { display: block; width: 100%; height: 100%; border: 0; background: #fff; }
.vb-body [hidden] { display: none; }
.viewbox.framed .vb-body { overflow: hidden; }
.pf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 18px 16px; padding: 22px; }
.pf-item { display: block; text-decoration: none; color: var(--ink); }
.pf-item img { width: 100%; aspect-ratio: 808 / 632; object-fit: cover; border-radius: 12px; background: var(--chip); transition: transform .3s ease; }
.pf-item:hover img { transform: translateY(-3px); }
.pf-item span { display: block; margin-top: 8px; font-size: 14px; font-weight: 500; line-height: 1.35; }
@media (max-width: 560px) {
  .pf-grid { grid-template-columns: 1fr 1fr; gap: 14px 10px; padding: 12px; }
  .pf-item span { font-size: 12px; }
}

/* Experience: four cards in a row, each stacked logo, role, dates, text */
.jobs { grid-template-columns: repeat(4, 1fr); gap: 16px; align-items: stretch; }
.job { grid-template-columns: 1fr; align-items: start; align-content: start; gap: 18px; padding: 16px; }
.job-logo { height: 104px; min-height: 0; }
.job-body { padding: 0 6px 6px; }
.job-top { flex-direction: column; align-items: flex-start; gap: 6px; }
.job h3 { font-size: 18px; line-height: 1.25; }
.job time { order: -1; }
@media (max-width: 1020px) { .jobs { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .jobs { grid-template-columns: 1fr; } .job-logo { height: 88px; } }

/* Blog cards: shared by the home page "From the blog" section and /blog/ */
.post-grid { display: grid; gap: 28px 20px; margin-top: 44px; }
.post-grid.four { grid-template-columns: repeat(4, 1fr); }
.post-grid.three { grid-template-columns: repeat(3, 1fr); }
.post-card { display: flex; flex-direction: column; text-decoration: none; color: var(--ink); }
.post-card .pc-im { display: block; border-radius: 16px; overflow: hidden; aspect-ratio: 16 / 9; background: var(--chip); }
.post-card .pc-im img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.post-card:hover .pc-im img { transform: scale(1.04); }
.pc-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 14px; font: 500 12px/1.4 var(--mono); color: var(--muted); }
.pc-cat { display: inline-block; padding: 5px 10px; border-radius: 999px; background: var(--chip); color: var(--mark); font: 500 12px/1.2 var(--mono); letter-spacing: .06em; text-transform: uppercase; }
.post-card b { display: block; margin-top: 10px; font-size: 18px; line-height: 1.3; letter-spacing: -0.015em; }
.post-card:hover b { color: var(--mark); }
.post-card small { display: block; margin-top: 8px; color: var(--muted); font-size: 14px; line-height: 1.55; }
.pc-read { margin-top: 12px; font: 500 12px/1 var(--mono); color: var(--mark); }
.reads[hidden] { display: none; }
@media (max-width: 1020px) { .post-grid.four, .post-grid.three { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .post-grid.four, .post-grid.three { grid-template-columns: 1fr; } }

/* CV dialog: Copy link button */
.cv-copy.copied { border-color: var(--mark); color: var(--mark); }
@media (max-width: 560px) {
  .cv-head .acts .cv-open { display: none; }
}

/* Back to top: appears after scrolling down a screen and a half */
.to-top { position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: max(18px, env(safe-area-inset-bottom)); z-index: 60;
  width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; border: 1.5px solid var(--on-lime);
  background: var(--lime); color: var(--on-lime); cursor: pointer; box-shadow: 0 10px 28px rgb(30 6 111 / .22);
  opacity: 0; transform: translateY(14px) scale(.9); pointer-events: none; transition: opacity .25s ease, transform .25s ease; }
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { transform: translateY(-2px); }
.to-top:focus-visible { outline: 3px solid var(--mark); outline-offset: 3px; }
.to-top svg { width: 22px; height: 22px; }
@media (prefers-reduced-motion: reduce) { .to-top { transition: none; } }
@media print { .to-top { display: none; } }

/* ---------- Home hero: the media kit design (greeting, cut-out portrait in a half circle,
   floating chips, two stats, button pill), coloured for the site's light and dark themes ---------- */
.hh {
  --hh-bg: radial-gradient(60% 50% at 50% 100%, rgb(143 126 255 / .2), transparent 70%), linear-gradient(180deg, #f5f7fe 0%, var(--canvas) 100%);
  --hh-ink: var(--ink); --hh-muted: var(--muted); --hh-name: var(--brand-600); --hh-stroke: var(--brand-500);
  --hh-dot: rgb(22 10 69 / .07); --hh-word: rgb(22 10 69 / .028); --hh-line: rgb(22 10 69 / .55);
  --hh-arc: radial-gradient(120% 100% at 50% 0%, #b4adff, var(--lime) 55%, #6b4aff);
  --hh-arc-glow: 0 -10px 60px rgb(143 126 255 / .35); --hh-arc-ring: rgb(255 255 255 / .3);
  --hh-photo-shadow: rgb(22 10 69 / .18);
  position: relative; overflow: hidden; padding: 44px 0 56px; text-align: center; color: var(--hh-ink); background: var(--hh-bg);
}
.hh::before { content: ""; position: absolute; inset: 0; pointer-events: none; background-image: radial-gradient(var(--hh-dot) 1px, transparent 1px);
  background-size: 20px 20px; mask-image: linear-gradient(#000, transparent 85%); -webkit-mask-image: linear-gradient(#000, transparent 85%); }
.hh-word { position: absolute; left: 50%; top: 58%; transform: translate(-50%, -50%); font: 700 clamp(110px, 18vw, 300px)/.9 var(--display);
  letter-spacing: -0.03em; color: var(--hh-word); white-space: nowrap; pointer-events: none; user-select: none; }
.hh .mkh-in { position: relative; display: flex; flex-direction: column; align-items: center; }
.hh .mkh-pill { display: inline-block; padding: 8px 16px; border: 1.5px solid var(--hh-line); border-radius: 999px; color: var(--hh-ink);
  font: 500 13px/1 var(--mono); letter-spacing: .04em; }
.hh .mkh-title { position: relative; margin: 22px 0 0; color: var(--hh-ink); font-size: clamp(30px, 5.6vw, 66px); line-height: 1.08; letter-spacing: -0.035em; font-weight: 500; }
.hh .mkh-name { color: var(--hh-name); }
.hh .mkh-role { font-size: .8em; letter-spacing: -0.03em; }
.hh .mkh-burst { position: absolute; width: 54px; height: 54px; fill: none; stroke: var(--hh-stroke); stroke-width: 3.2; stroke-linecap: round; }
.hh .mkh-burst.b1 { right: -6px; top: -46px; }
.hh .mkh-burst.b2 { left: -34px; bottom: -6px; }
.hh .mkh-aka { margin: 14px 0 0; color: var(--hh-muted); font-size: 16px; max-width: 640px; }

.hh .mkh-stage { position: relative; width: 100%; margin-top: 18px; }
.hh .mkh-scene { position: relative; height: 480px; }
.hh .mkh-arc { position: absolute; left: 50%; bottom: 0; width: min(760px, 92%); aspect-ratio: 2 / 1; transform: translateX(-50%);
  border-radius: 999px 999px 0 0; background: var(--hh-arc); box-shadow: inset 0 0 0 10px var(--hh-arc-ring), var(--hh-arc-glow); }
.hh .mkh-photo { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); }
.hh .mkh-photo.cut { height: 100%; width: auto; max-width: 86%; object-fit: contain; object-position: bottom; filter: drop-shadow(0 18px 30px var(--hh-photo-shadow)); }
.hh .mkh-photo.arch { width: 330px; height: 420px; object-fit: cover; border-radius: 999px 999px 0 0; }

.hh .mkh-chip { position: absolute; z-index: 2; display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px 10px 12px; border-radius: 999px;
  background: var(--night); color: #fff; font: 500 15px/1 var(--display); border: 1px solid rgb(255 255 255 / .12);
  box-shadow: 0 10px 22px rgb(10 4 32 / .28); animation: hh-float 6s ease-in-out infinite; }
.hh .mkh-chip svg { width: 18px; height: 18px; color: var(--lime); }
.hh .mkh-chip.c1 { left: 22%; top: 12%; }
.hh .mkh-chip.c2 { left: 20%; top: 58%; animation-delay: -1.5s; }
.hh .mkh-chip.c3 { right: 24%; top: 26%; animation-delay: -3s; }
.hh .mkh-chip.c4 { right: 18%; top: 60%; animation-delay: -4.5s; }
@keyframes hh-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

.hh .mkh-side { position: absolute; z-index: 1; display: grid; gap: 6px; max-width: 220px; margin: 0; color: var(--hh-ink); }
.hh .mkh-side.left { left: 0; top: 30%; text-align: left; }
.hh .mkh-side.right { right: 0; top: 46%; text-align: right; }
.hh .mkh-side b { font: 500 clamp(30px, 3.4vw, 42px)/1 var(--display); letter-spacing: -0.03em; }
.hh .mkh-side span { color: var(--hh-muted); font-size: 14.5px; line-height: 1.4; }

.hh .mkh-cta { position: absolute; z-index: 3; left: 50%; bottom: 26px; transform: translateX(-50%); display: flex; gap: 4px; margin: 0; padding: 5px;
  border-radius: 999px; background: rgb(11 5 36 / .9); border: 1px solid rgb(255 255 255 / .16); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 12px 30px rgb(10 4 32 / .3); white-space: nowrap; flex-wrap: nowrap; }
.hh .mkh-btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 16px; border-radius: 999px; color: #fff; text-decoration: none; font: 500 15px/1 var(--display); }
.hh .mkh-btn:hover { background: rgb(255 255 255 / .1); }
.hh .mkh-btn.main { background: var(--lime); color: var(--on-lime); }
.hh .mkh-btn.main:hover { background: #b4adff; }
.hh .mkh-btn svg { width: 17px; height: 17px; flex: none; }

@media (prefers-reduced-motion: reduce) { .hh .mkh-chip { animation: none; } }
@media (max-width: 1000px) {
  .hh .mkh-chip.c1 { left: 8%; } .hh .mkh-chip.c2 { left: 6%; }
  .hh .mkh-chip.c3 { right: 8%; } .hh .mkh-chip.c4 { right: 6%; }
  .hh .mkh-stage { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0 24px; }
  .hh .mkh-scene { flex: 1 1 100%; }
  .hh .mkh-side { position: static; flex: 1 1 0; max-width: none; padding: 26px 0 0; }
}
@media (max-width: 760px) {
  /* Four buttons don't fit in one pill on a phone: they sit under the photo, two by two */
  .hh .mkh-scene { height: 380px; margin-bottom: 130px; }
  .hh .mkh-cta { left: 50%; top: calc(100% + 14px); bottom: auto; transform: translateX(-50%); display: grid; grid-template-columns: 1fr 1fr; gap: 6px;
    width: min(100%, 440px); border-radius: 26px; padding: 6px; white-space: normal; }
  .hh .mkh-btn { justify-content: center; padding: 13px 8px; font-size: 14px; }
}
@media (max-width: 640px) {
  .hh { padding: 32px 0 40px; }
  .hh .mkh-burst { width: 36px; height: 36px; }
  .hh .mkh-burst.b1 { right: 0; top: -30px; }
  .hh .mkh-burst.b2 { left: -10px; bottom: -24px; }
  .hh .mkh-aka { font-size: 15px; }
  .hh .mkh-scene { height: 340px; }
  .hh .mkh-arc { width: 112%; }
  .hh .mkh-photo.cut { height: 92%; }
  .hh .mkh-photo.arch { width: 230px; height: 300px; }
  .hh .mkh-chip { font-size: 12.5px; padding: 8px 12px 8px 9px; gap: 6px; }
  .hh .mkh-chip svg { width: 15px; height: 15px; }
  .hh .mkh-chip.c1 { left: 0; top: 6%; } .hh .mkh-chip.c2 { left: 0; top: 50%; }
  .hh .mkh-chip.c3 { right: 0; top: 22%; } .hh .mkh-chip.c4 { right: 0; top: 64%; }
  .hh .mkh-side b { font-size: 30px; }
  .hh .mkh-side span { font-size: 13px; }
}
@media (max-width: 380px) {
  .hh .mkh-scene { margin-bottom: 152px; }
}

/* ---------- Site footer (tools/site_footer.py): brand column, three link columns, newsletter ---------- */
.sf { padding: 64px 0 28px; }
.sf .wrap { display: block; }
.sf a { text-decoration: none; }
.sf-grid { display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap: 48px 32px; }
.sf-brand .logo { display: inline-block; margin: 0; font-size: 22px; color: #fff; }
.sf-line { margin: 18px 0 0; color: #fff; font-size: 18px; font-weight: 500; letter-spacing: -.01em; line-height: 1.35; }
.sf-brand p { margin: 10px 0 0; max-width: 34ch; line-height: 1.65; font-size: 15px; }
.sf-brand .sf-line { margin-top: 18px; max-width: none; font-size: 18px; }
.sf-place { font: 500 12px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--lime); margin-top: 18px !important; }
.sf-col h2 { margin: 4px 0 16px; font: 500 12px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--lime); }
.sf-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.sf-col a { color: var(--deep-muted); font-size: 15px; transition: color .2s; }
.sf-col a:hover, .sf-col a:focus-visible { color: #fff; text-decoration: underline; text-underline-offset: 4px; }
.sf-news { display: grid; grid-template-columns: 1fr minmax(280px, 1.1fr); gap: 20px 40px; align-items: center; margin-top: 52px; padding: 28px 32px;
  border-radius: 22px; border: 1px solid var(--deep-line); background: rgb(255 255 255 / .05); }
.sf-news h2 { margin: 0; color: #fff; font-size: 22px; letter-spacing: -.02em; line-height: 1.2; }
.sf-news p { margin: 8px 0 0; line-height: 1.55; font-size: 15px; }
.sf-news-form { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.sf-news input[type="email"] { min-width: 0; height: 48px; padding: 0 18px; border-radius: 999px; border: 1.5px solid var(--deep-line);
  background: rgb(0 0 0 / .25); color: #fff; font: inherit; font-size: 15px; }
.sf-news input[type="email"]::placeholder { color: rgb(255 255 255 / .5); }
.sf-news input[type="email"]:focus { outline: 0; border-color: var(--lime); box-shadow: 0 0 0 3px rgb(143 126 255 / .22); }
.sf-news .btn { height: 48px; gap: 8px; padding: 0 22px; }
.sf-news .btn svg { width: 16px; height: 16px; }
.sf-news .btn[disabled] { opacity: .7; cursor: wait; transform: none; }
.sf-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.sf-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.sf-msg { grid-column: 1 / -1; margin: 0 !important; min-height: 1.3em; font-size: 14px !important; }
.sf-msg.ok { color: var(--brand-700); }
.sf-msg.err { color: #ffb4b4; }
.sf-news.is-done input[type="email"], .sf-news.is-done .btn { display: none; }
.sf-news.is-done .sf-news-form { display: block; }
.sf-bar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 32px; padding-top: 22px;
  border-top: 1px solid var(--deep-line); font-size: 14px; }
.sf-top { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); font-weight: 500; }
.sf-top svg { width: 16px; height: 16px; }
.sf-top:hover { text-decoration: underline; text-underline-offset: 4px; }
@media (max-width: 960px) {
  .sf-grid { grid-template-columns: repeat(4, 1fr); }
  .sf-brand { grid-column: 1 / -1; }
  .sf-brand p { max-width: 52ch; }
}
@media (max-width: 720px) {
  .sf { padding-top: 48px; }
  .sf-grid { grid-template-columns: 1fr 1fr; gap: 36px 24px; }
  .sf-col:last-of-type { grid-column: 1 / -1; }
  .sf-col:last-of-type ul { grid-template-columns: 1fr 1fr; gap: 10px 24px; }
  .sf-news { grid-template-columns: 1fr; padding: 22px 20px; margin-top: 40px; }
}
@media (max-width: 440px) {
  .sf-news-form { grid-template-columns: 1fr; }
  .sf-news .btn { justify-content: center; }
}

/* Apps mega menu: Android apps, Windows software, Games */
@media (min-width: 961px) {
  .has-sub.mega .sub.mega-sub {
    position: fixed; top: 60px; left: 50%; translate: -50% 0; z-index: 50;
    width: min(800px, calc(100vw - 32px)); max-width: none; margin: 0; font-size: 14px; padding: 22px; gap: 8px 28px;
    grid-template-columns: repeat(3, 1fr); border-radius: 20px;
  }
  .has-sub.mega::after { height: 30px; }
  .has-sub.mega.open .sub.mega-sub, .has-sub.mega:focus-within .sub.mega-sub { display: grid; }
}
@media (hover: hover) and (min-width: 961px) {
  .has-sub.mega:hover .sub.mega-sub { display: grid; }
}
.mega-sub .mg { list-style: none; min-width: 0; }
.mega-sub .mg-h {
  white-space: nowrap; display: flex; align-items: center; gap: 9px; margin: 0 0 8px; padding: 0 12px 12px; border-bottom: 1px solid var(--deep-line);
  font: 500 12px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--lime);
}
.mega-sub .mg-h svg { width: 20px; height: 20px; flex: none; }
.mega-sub .mg-h small { margin-left: auto; padding: 3px 7px; border-radius: 99px; background: rgb(255 255 255 / .08); color: var(--deep-muted); font: 500 12px/1 var(--mono); letter-spacing: 0; }
.mega-sub .mg ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.mega-sub .mg a { display: block; }
@media (max-width: 960px) {
  .has-sub.mega .sub.mega-sub { gap: 14px; padding: 4px 0 10px 18px; }
  .has-sub.mega.open .sub.mega-sub { display: grid; grid-template-columns: 1fr; }
  .mega-sub .mg-h { padding: 4px 16px 8px; border: 0; }
  .mega-sub .mg a { padding: 8px 16px; }
  .has-sub.mega .sub.mega-sub { gap: 8px; }
}


/* ===== Fluid layout system =====
   Grids size themselves from the space available (auto-fit) instead of jumping between fixed
   1, 2, 3 and 4 column counts, and spacing scales with the screen. Keep this block last. */
:root { --gut: clamp(16px, 4vw, 40px); }
.wrap { width: min(100% - 2 * var(--gut), var(--max)); }
section { padding-block: clamp(56px, 9vw, 112px); }
section.hero { padding: 0; }
.nums { padding-block: clamp(44px, 7vw, 88px); }
.sub { max-width: 62ch; font-size: clamp(16px, 1.7vw, 18px); }
.svc-grid, .grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 270px), 1fr)); margin-top: clamp(32px, 5vw, 56px); }
.why-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); margin-top: clamp(32px, 5vw, 56px); }
.more-apps { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.steps { grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); margin-top: clamp(32px, 5vw, 56px); }
.num-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); }
.roles, .jobs { grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }
.badges { grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.tools { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.post-grid.four, .post-grid.three { grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); }
.about-grid { gap: clamp(28px, 5vw, 56px); }
@media (min-width: 861px) { .about-grid { grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); } }
/* two-column splits stay two columns down to tablet, then stack */
@media (min-width: 700px) and (max-width: 860px) { .exp-cards, .rec-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
/* phones: two across for compact cards so the screen is not one long strip */
@media (max-width: 560px) {
  .num-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Lighter emphasis: inline bold reads as semibold, not heavy */
strong, b { font-weight: 600; }
/* phones: "More apps" becomes a compact list, thumbnail left and text right */
@media (max-width: 560px) {
  .more-apps { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .mini { flex-direction: row; align-items: stretch; }
  .mini:hover { transform: none; }
  .mini .shot { flex: 0 0 104px; height: auto; min-height: 128px; padding-top: 14px; }
  .mini .shot img { width: 72%; border-width: 3px 3px 0; border-radius: 12px 12px 0 0; }
  /* landscape screenshots get a banner on top; squeezing them into the narrow thumbnail crops and distorts them */
  .mini:has(.shot.wide) { flex-direction: column; }
  .mini .shot.wide { flex: none; width: 100%; height: 150px; min-height: 0; padding: 14px 14px 0; }
  .mini div { padding: 14px 16px 16px; min-width: 0; align-self: center; }
  .mini b { font-size: 17px; }
  .mini small { font-size: 13.5px; }
  .mini div > span { margin-top: 8px; }
  .more-apps-head { flex-wrap: wrap; margin-top: 48px; }
}
/* skill icon strips: keep their own proportions when the card is narrower than the strip */
.tools img { height: auto; width: auto; max-width: 100%; }

/* ===== Touch targets: links and buttons are at least 44px tall on phones and tablets ===== */
@media (pointer: coarse), (max-width: 720px) {
  .sf-col a, .sf-line a, .sf-bar a, .sf-brand .logo { display: inline-flex; align-items: center; min-height: 44px; }
  .sf-col ul { gap: 0; }
  .logo { display: inline-flex; align-items: center; min-height: 44px; }
  .crumb, .sd-back, .ws-back, .ox-back, .gm-link, .gm-more { display: inline-flex; align-items: center; min-height: 44px; }
  summary { min-height: 44px; align-items: center; }
  .mk-jump a, .mk-toc a, .chips a { display: inline-flex; align-items: center; min-height: 40px; }
  a.pc-cat { display: inline-flex; align-items: center; min-height: 32px; }
  .topic-links a, .sub-head a { display: inline-flex; align-items: center; min-height: 44px; }
  .topic-links { gap: 0 18px; }
}
.book-types small { font-size: 12px; }

/* ===== Phone edition: shorter page. Detail that repeats elsewhere stays on the desktop site only ===== */
@media (max-width: 720px) {
  /* app cards: picture, name, one-line summary and the button are enough; details live on the app page */
  .app .desc, .app .url, .app .acts .btn-line, .app .chips { display: none; }
  .app .app-art { height: auto; }
  /* the About roles repeat the Services section */
  #about .roles { display: none; }
  /* GitHub badge wall is decoration */
  #recognition .badges, #recognition .sub-head { display: none; }
  /* service cards: the "apps" card repeats the Apps section */
  #services .svc-grid > :nth-child(8) { display: none; }
  /* tool logo strips are decoration */
  #toolbox { display: none; }
  /* blog: two newest posts, the rest sit one tap away on /blog/ */
  .post-grid.four > :nth-child(n+3) { display: none; }
  /* design filters scroll sideways in one row instead of wrapping into a block */
  #filters { flex-wrap: nowrap; overflow-x: auto; margin-inline: calc(var(--gut) * -1); padding-inline: var(--gut); scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  #filters::-webkit-scrollbar { display: none; }
  #filters button { flex: none; }
}

/* phones: a slimmer top bar, 56px instead of 72px (buttons keep their 44px tap size) */
@media (max-width: 960px) {
  .top nav { min-height: 56px; gap: 10px; }
  .logo { font-size: 17px; }
  .hero-in { min-height: clamp(520px, calc(100svh - 56px), 900px); }
}
/* tablets: app cards sit two across instead of one huge card per app */
@media (min-width: 721px) and (max-width: 1020px) {
  .apps-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
  .app-art { min-height: 300px; }
  .app-info { padding: 26px; }
  .app .url { display: none; }
  .app-info h3 { font-size: 28px; }
}

/* =====================================================================
   FRESH LIGHT (final layer): one light theme, no dark mode.
   White canvas, black pill buttons, light large headings, tiny muted labels.
   Pages that still use the violet "deep" tokens get a bright violet, not black.
   ===================================================================== */
:root {
  --canvas: #ffffff; --tint: #f6f6f8; --surface: #ffffff; --border: #e7e7ec;
  --ink: #151515; --muted: #6a6a75; --mark: var(--brand-600); --chip: #f4f2ff;
  --shadow: 0 1px 2px rgb(20 20 40 / .04), 0 10px 28px rgb(20 20 40 / .07);
  --night: #2a0d8f; --deep: #3a10ad; --deep-2: #4d13ee;
  color-scheme: light;
}
body { font-size: 16px; line-height: 1.6; }

/* Type scale: big and light for headlines, medium for card titles, small and quiet for support text */
h1, h2 { font-weight: 400; letter-spacing: -.035em; }
h2 { font-size: clamp(36px, 5vw, 64px); line-height: 1.05; }
h3 { font-weight: 600; letter-spacing: -.015em; }
.eyebrow { font-size: 11px; letter-spacing: .18em; color: var(--muted); }
.sub { font-size: 17px; line-height: 1.6; }
.about-text p:first-child { font-size: clamp(22px, 2.4vw, 30px); font-weight: 400; line-height: 1.4; letter-spacing: -.02em; }
.about-text p { font-size: 15px; }
.facts dt, .label, .pc-meta, .pc-cat, .app-info .tag, .al-body small, .job time, .list time, .pc-read, .note { font-size: 11px; }
.facts dd { font-size: 15px; font-weight: 500; }
.num b { font-size: clamp(52px, 7vw, 96px); font-weight: 300; letter-spacing: -.05em; }
.num > span { font-size: 13px; }
.svc h3, .role h3 { font-size: 19px; }
.svc p, .role p, .job p, .why-card p, .steps p { font-size: 14px; line-height: 1.6; }
.why-card h3, .steps h3 { font-size: 22px; }
.job h3 { font-size: 17px; }
.job .where, .honor b, .list b { font-size: 14.5px; }
.list span, .honor span, .langs span, .card small, .mini small, .post-card small { font-size: 13px; }
.card b, .post-card b, .mini b { font-size: 17px; font-weight: 600; }
.app-info h3 { font-weight: 500; font-size: clamp(32px, 3.6vw, 46px); }
.app-info .tagline { font-size: 17px; }
.app-info p.desc, .app .url, .chips li { font-size: 13.5px; }
.hh .mkh-title { font-weight: 400; font-size: clamp(34px, 6vw, 76px); letter-spacing: -.045em; }
.hh .mkh-aka { font-size: 15px; }
.hh .mkh-side b { font-size: clamp(34px, 4vw, 52px); font-weight: 300; }
.hh .mkh-side span { font-size: 13px; }
.hh .mkh-pill { font-size: 12px; }
.links a { font-size: 12px; font-weight: 500; }
footer, .sf-col a, .sf-brand p, .sf-news p { font-size: 14px; }
.sf-col h2 { font-size: 11px; }
.sf-line { font-size: 20px; font-weight: 400; }

/* Buttons: black pills, white pills, no glow */
.btn { font-weight: 500; }
.btn-lime { background: var(--ink); color: #fff; }
.btn-lime:hover { background: #333; }
.btn-ghost { border-color: var(--border); color: var(--ink); background: #fff; }
.btn-ghost:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.hero .btn-ghost { background: #fff; border-color: var(--border); }
.btn-violet { background: var(--ink); }
.btn-violet:hover { background: #333; }
.to-top { background: var(--ink); color: #fff; border-color: var(--ink); box-shadow: 0 10px 28px rgb(20 20 40 / .2); }
:focus-visible { outline-color: var(--brand-500); }
.skip { background: var(--ink); color: #fff; }

/* Header */
.top { background: rgb(255 255 255 / .92); color: var(--ink); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); }
.top.scrolled { box-shadow: 0 6px 20px rgb(20 20 40 / .06); border-color: var(--border); }
.logo span { color: var(--mark); }
.links a { color: var(--muted); }
.links a:hover { color: var(--ink); }
.links a[aria-current], .has-sub.child-current > a { color: var(--ink); background: var(--tint); border-color: transparent; box-shadow: none; }
.icon-btn { color: var(--ink); border-color: var(--border); }
.sub-toggle { color: var(--muted); }
.sub-toggle:hover { color: var(--ink); }
.has-sub .sub { background: #fff; border-color: var(--border); box-shadow: var(--shadow); }
@media (max-width: 960px) {
  .links { background: #fff; border-bottom: 1px solid var(--border); }
  .sub-toggle { color: var(--ink); border-color: var(--border); }
  .has-sub .sub a { color: var(--muted); }
  .links .m-book a { background: var(--ink); color: #fff; border-color: var(--ink); }
}

/* Home hero: white stage, soft violet half circle */
.hh {
  --hh-bg: radial-gradient(60% 55% at 50% 100%, rgb(107 74 255 / .10), transparent 70%), #fff;
  --hh-ink: var(--ink); --hh-muted: var(--muted); --hh-name: var(--brand-600); --hh-stroke: var(--brand-500);
  --hh-dot: rgb(21 21 21 / .06); --hh-word: rgb(21 21 21 / .03); --hh-line: rgb(21 21 21 / .25);
  --hh-arc: linear-gradient(180deg, #ece8ff, #d9d2ff); --hh-arc-glow: 0 0 0 transparent; --hh-arc-ring: rgb(255 255 255 / .7);
  --hh-photo-shadow: rgb(30 6 111 / .2);
}
.hh .mkh-chip { background: #fff; color: var(--ink); border-color: var(--border); box-shadow: var(--shadow); font-size: 14px; }
.hh .mkh-chip svg { color: var(--mark); }
.hh .mkh-cta { background: rgb(255 255 255 / .94); border-color: var(--border); box-shadow: var(--shadow); }
.hh .mkh-btn { color: var(--ink); }
.hh .mkh-btn:hover { background: var(--tint); }
.hh .mkh-btn.main { background: var(--ink); color: #fff; }
.hh .mkh-btn.main:hover { background: #333; }

/* Bands that used to be dark */
.reel { background: #fff; }
.ticker { background: #151515; color: #fff; border-block: 0; }
.ticker span { font-size: 15px; font-weight: 400; color: #fff; }
.ticker span::after { color: var(--lime); }
.deep, .svc.cta, footer { --deep-ink: var(--ink); --deep-muted: var(--muted); --deep-line: var(--border); }
.deep { background: var(--chip); color: var(--ink); }
.deep em, .hero em { color: var(--mark); }
.why-card { background: #fff; border-color: var(--border); }
.why-card .n { color: var(--mark); }
.steps li::before { background: var(--ink); color: #fff; }
.svc.cta { background: var(--chip); color: var(--ink); border-color: #e3dcff; }
.contact::before { background: radial-gradient(closest-side, rgb(107 74 255 / .14), transparent); }
.contact .sub a { color: var(--mark); }
.socials a { color: var(--muted); border-color: var(--border); background: #fff; }
.socials a:hover { color: var(--ink); border-color: var(--ink); }
footer { background: var(--tint); color: var(--muted); border-top: 1px solid var(--border); }
footer a { color: var(--ink); }
.sf-brand .logo, .sf-line, .sf-news h2 { color: var(--ink); }
.sf-place, .sf-col h2 { color: var(--mark); }
.sf-col a:hover, .sf-col a:focus-visible { color: var(--ink); }
.sf-news { background: #fff; border-color: var(--border); }
.sf-news input[type="email"] { background: #fff; color: var(--ink); border-color: var(--border); }
.sf-news input[type="email"]::placeholder { color: var(--muted); }
.sf-news input[type="email"]:focus { border-color: var(--brand-500); box-shadow: 0 0 0 3px rgb(107 74 255 / .15); }
.filters button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.card .open { background: var(--ink); color: #fff; }
dialog.lb::backdrop, dialog.cvbox::backdrop { background: rgb(21 21 21 / .45); }
.badge small { background: var(--muted); }

/* ===================== Phone: heroes and headings centred (single blog posts keep their own layout) ===================== */
@media (max-width: 720px) {
  body:not(:has(article.post)) main :is(h1, h2, .u2-big, .topic-h2) { text-align: center; margin-inline: auto; }
  body:not(:has(article.post)) main :is(.eyebrow, .kicker, .u2-eyebrow, .sp-eyebrow, .sp-pill, .al-eyebrow, .gm-tag, .u2-tag, .mkh-pill, .crumb) { display: flex; width: fit-content; max-width: 100%; margin-inline: auto; justify-content: center; text-align: center; }
  body:not(:has(article.post)) main :is(.mk-head, .sp-head, .pd-rel-head, .u2-head, .topic-head) { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; }
  body:not(:has(article.post)) main :is(.bl-head, .blog-hero, .topic-hero, .al-hero, .gm-hero, .sp-h2copy, .u2-hero-in, .book-intro, .ut-faq > div:first-child, .mk-hero > .wrap) { text-align: center; }
  body:not(:has(article.post)) main :is(.bl-head, .blog-hero, .topic-hero, .al-hero, .gm-hero, .sp-h2copy, .u2-hero-in, .book-intro, .mk-hero) :is(p, .sub, .topic-intro) { margin-inline: auto; }
  body:not(:has(article.post)) main :is(.sp-cta, .u2-cta, .al-cta, .gm-cta, .bl-top, .bl-stats, .al-stats, .sp-proof, .mk-jump) { justify-content: center; }
  body:not(:has(article.post)) main .bl-top { flex-direction: column; align-items: center; }
  body:not(:has(article.post)) main .pd-info > :is(.pd-cat, h1, .pd-price, .pd-sum) { text-align: center; justify-content: center; }
  body:not(:has(article.post)) main .pd-info > .pd-cat { display: block; }
  body:not(:has(article.post)) main .pd-look-head { justify-content: center; text-align: center; }
  body:not(:has(article.post)) main .pd-look-head .sp-primary { width: 100%; }
}

/* Footer e-mail address: break inside the address rather than overflow a narrow column */

/* Stats on phones: a tidy 2 x 2 of centred cards (the old layout left-aligned the numbers under a centred heading,
   with a divider between columns only and wide gaps between the rows). */
.num b .cnt { display: inline-block; text-align: left; font-variant-numeric: tabular-nums; }
@media (max-width: 560px) {
  .nums .num-grid { gap: 12px; margin-top: 28px; border-top: 0; }
  .nums .num-grid .num, .nums .num-grid .num + .num, .nums .num-grid .num:nth-child(3), .ut .nums .num-grid .num:nth-child(3) {
    padding: 22px 10px 20px; border: 1px solid var(--border); border-radius: 20px; background: #fff; text-align: center; }
  .nums .num-grid .num b { font-size: clamp(40px, 12.5vw, 54px); }
  .nums .num-grid .num > span { margin-top: 8px; font-size: 14px; line-height: 1.35; }
}
