/* ═══════════════════════════════════════════════════════════════════
   MOSTAFIZUR RAHMAN: PORTFOLIO STYLESHEET
   Everything about colours, fonts and spacing lives in this one file.
   ═══════════════════════════════════════════════════════════════════ */

/* ───────── 1. WALLPAPER / BACKGROUND OPTION (edit these two blocks) ─────────
   1. Put your image in the folder  images/hero/   (for example wallpaper.jpg)
   2. Change  --hero-image: none;  to  --hero-image: url('../images/hero/wallpaper.jpg');
   3. Set  --hero-overlay  between 0 (no dark layer) and 1 (fully dark).
      0.55 to 0.75 keeps the text readable on most photos.
   The same idea works for the dark banner at the top of every inner page (--page-image). */
:root {
  --hero-image: none;
  --hero-overlay: 0;
  --page-image: none;
  --page-overlay: 0;
}

/* ───────── 2. FONTS (self-hosted, nothing is loaded from other websites) ───────── */
@font-face { font-family: "Inter Variable"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url("../fonts/inter-latin-wght-normal.woff2") format("woff2-variations"); }
@font-face { font-family: "Jakarta Variable"; font-style: normal; font-display: swap; font-weight: 200 800;
  src: url("../fonts/plus-jakarta-sans-latin-wght-normal.woff2") format("woff2-variations"); }

/* ───────── 3. COLOURS AND SIZES ───────── */
:root {
  --navy: #0a1020;            /* constant dark surface (hero, banners, footer) */
  --navy-3: #1c2848;
  --heading: var(--ink);      /* heading and strong text colour (changes in dark mode) */
  --card: #ffffff;            /* card / panel surface */
  --header-bg: rgba(255,255,255,.94);
  --code-bg: #e9ebf6;
  --ink: #0a1020;            /* near-black navy: hero, banners, footer */
  --ink-2: #111a30;
  --ink-3: #1c2848;
  --bg: #f5f6fb;            /* page background (cool off-white) */
  --white: #ffffff;
  --line: #e1e5f0;
  --line-strong: #c9d0e3;
  --text: #18213a;
  --muted: #566079;
  --accent: #4f46e5;         /* indigo: buttons, links, key marks */
  --accent-strong: #3b32c8;
  --accent-soft: #eceeff;
  --amber: #f5a524;          /* small highlight only */
  --on-dark: #eaeef8;
  --on-dark-muted: #a8b3cc;
  --accent-on-dark: #a9b6ff;
  --display: "Jakarta Variable", "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --sans: "Inter Variable", Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --radius: 10px;
  --radius-sm: 6px;
  --wrap: 1160px;
  --gap: clamp(1rem, 2.4vw, 1.75rem);
  --section: clamp(3.75rem, 8vw, 6.5rem);
  --shadow: 0 1px 2px rgba(10,16,32,.05), 0 8px 24px -12px rgba(10,16,32,.18);
  --shadow-lg: 0 2px 4px rgba(10,16,32,.06), 0 24px 48px -20px rgba(10,16,32,.35);
}

/* ───────── 4. BASE ───────── */
*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: light; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }
body { margin: 0; font-family: var(--sans); font-size: 1.0625rem; line-height: 1.65; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-strong); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 3px; }
h1, h2, h3, h4 { font-family: var(--display); color: var(--heading); line-height: 1.15; margin: 0 0 .6em; font-weight: 700; letter-spacing: -0.022em; }
h1 { font-size: clamp(2.3rem, 5.2vw, 3.9rem); font-weight: 800; letter-spacing: -0.03em; }
h2 { font-size: clamp(1.65rem, 3.1vw, 2.3rem); }
h3 { font-size: 1.2rem; letter-spacing: -0.015em; }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.2rem; margin: 0 0 1em; }
.wrap { width: min(100% - 2*var(--gap), var(--wrap)); margin-inline: auto; }
.narrow { max-width: 720px; }
.eyebrow { display: inline-flex; align-items: center; gap: .6rem; font: 700 .76rem/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin: 0 0 1rem; }
.eyebrow::before { content: ""; width: 22px; height: 2px; background: var(--amber); display: inline-block; }
.lede { font-size: clamp(1.08rem, 1.7vw, 1.25rem); color: var(--muted); max-width: 62ch; line-height: 1.6; }
.muted { color: var(--muted); }
.skip { position: absolute; left: -999px; top: 0; background: var(--navy); color: #fff; padding: .7rem 1rem; z-index: 100; }
.skip:focus { left: 0; }

/* ───────── 5. SECTIONS ───────── */
.section { padding-block: var(--section); }
.section--white { background: var(--white); border-block: 1px solid var(--line); }
.section--dark { position: relative; background: linear-gradient(135deg, var(--navy) 0%, var(--navy-3) 100%); color: var(--on-dark); overflow: hidden; }
.section--dark h2, .section--dark h3 { color: #fff; }
.section--dark .eyebrow { color: var(--accent-on-dark); }
.section--dark .lede, .section--dark p { color: var(--on-dark-muted); }
.section--dark a:not(.btn) { color: var(--accent-on-dark); }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 1rem 2rem; flex-wrap: wrap; margin-bottom: 2.25rem; }
.section-head h2 { margin: 0; max-width: 24ch; }
.section-head .lede { margin: .75rem 0 0; }
.section--tint { background: #eef0fa; }

/* ───────── 6. BUTTONS ───────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .85rem 1.35rem; font: 600 .95rem/1 var(--sans); border-radius: var(--radius-sm); border: 1.5px solid var(--accent); background: var(--accent); color: #fff; text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s, color .15s, transform .15s; min-height: 46px; }
.btn:hover { background: var(--accent-strong); border-color: var(--accent-strong); color: #fff; transform: translateY(-1px); }
.btn--ghost { background: transparent; color: var(--heading); border-color: var(--line-strong); }
.btn--ghost:hover { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn--small { padding: .6rem 1rem; min-height: 40px; font-size: .9rem; }
.hero .btn, .section--dark .btn, .page-head .btn { background: #fff; border-color: #fff; color: var(--navy); }
.hero .btn:hover, .section--dark .btn:hover, .page-head .btn:hover { background: var(--accent-on-dark); border-color: var(--accent-on-dark); color: var(--navy); }
.hero .btn--ghost, .section--dark .btn--ghost, .page-head .btn--ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.45); }
.hero .btn--ghost:hover, .section--dark .btn--ghost:hover, .page-head .btn--ghost:hover { background: #fff; color: var(--navy); border-color: #fff; }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }
.textlink { font-weight: 600; text-decoration: none; border-bottom: 2px solid var(--amber); padding-bottom: 1px; color: inherit; }
.textlink:hover { color: var(--accent); }
.hero .textlink, .section--dark .textlink, .page-head .textlink { color: #fff; }
.hero .textlink:hover, .section--dark .textlink:hover { color: var(--accent-on-dark); }

/* ───────── 7. HEADER, MENU AND FOOTER ───────── */
.icon { width: 1.25em; height: 1.25em; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.iconbtn { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line-strong); color: var(--heading); background: var(--card); transition: all .15s; text-decoration: none; }
.iconbtn:hover { background: var(--navy); color: #fff; border-color: var(--navy); transform: translateY(-2px); }
.iconbtn .icon { width: 19px; height: 19px; }
.hero .iconbtn, .section--dark .iconbtn, .site-footer .iconbtn { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.25); color: #fff; }
.hero .iconbtn:hover, .section--dark .iconbtn:hover, .site-footer .iconbtn:hover { background: #fff; color: var(--navy); border-color: #fff; }
.icon-row { display: flex; gap: .6rem; flex-wrap: wrap; }

.site-header { position: sticky; top: 0; z-index: 50; background: var(--header-bg); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 72px; gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: .7rem; font: 700 1.05rem var(--display); color: var(--heading); text-decoration: none; letter-spacing: -.02em; }
.brand__mark { display: block; width: 38px; height: 38px; border-radius: 10px; }
.brand:hover { color: var(--heading); }
.nav { display: flex; align-items: center; gap: .35rem; }
.nav > a, .nav-group__btn { color: var(--text); text-decoration: none; font: 500 .95rem var(--sans); padding: .6rem .9rem; border-radius: var(--radius-sm); border: 0; background: none; cursor: pointer; display: inline-flex; align-items: center; gap: .35rem; }
.nav > a:hover, .nav-group__btn:hover, .nav-group:focus-within .nav-group__btn { background: var(--accent-soft); color: var(--accent-strong); }
.nav > a[aria-current="page"], .nav-group__btn[aria-current="true"] { color: var(--accent); font-weight: 700; }
.nav .nav-cta { margin-left: .75rem; background: var(--navy); color: #fff; font-weight: 600; padding: .7rem 1.15rem; gap: .5rem; }
.nav .nav-cta:hover { background: var(--accent); color: #fff; }
.nav .nav-cta[aria-current="page"] { background: var(--accent); color: #fff; }
.nav-group { position: relative; }
.nav-group__btn .icon { width: 14px; height: 14px; transition: transform .15s; }
.nav-group.is-open .nav-group__btn .icon { transform: rotate(180deg); }
.nav-group.is-open > .nav-group__btn { background: var(--accent-soft); color: var(--accent-strong); }
/* The menu starts exactly at the bottom of the label and adds invisible padding on top, so there is
   no gap for the pointer to fall through while moving from the label into the menu. */
.nav-group__menu { display: none; position: absolute; top: 100%; left: -.75rem; padding-top: 12px; z-index: 60; }
.nav-group.is-open .nav-group__menu { display: block; }
html:not(.js) .nav-group:hover .nav-group__menu { display: block; }
.nav-group__panel { width: 330px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); padding: .5rem; }
.nav-group__panel--wide { width: 350px; }
.nav-group__menu a { display: flex; gap: .85rem; align-items: center; padding: .65rem .8rem; border-radius: 8px; color: var(--text); text-decoration: none; font-size: .95rem; }
.nav-group__menu a:hover, .nav-group__menu a:focus-visible { background: var(--accent-soft); }
.nav-group__menu a[aria-current="page"] { background: var(--accent-soft); }
.nav-group__menu .ico { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 9px; background: var(--accent-soft); color: var(--accent); flex: none; }
.nav-group__menu a:hover .ico { background: var(--card); }
.nav-group__menu strong { display: block; font: 600 .95rem var(--display); color: var(--heading); line-height: 1.3; }
.nav-group__menu small { display: block; font-size: .82rem; color: var(--muted); line-height: 1.4; }
.nav-group__menu a.all { justify-content: space-between; margin-top: .35rem; border-top: 1px solid var(--line); border-radius: 0 0 8px 8px; padding-top: .85rem; color: var(--accent); }
.nav-group__menu a.all strong { color: var(--accent); }
.nav-toggle { display: none; background: none; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: .55rem .9rem; font: 600 .9rem var(--sans); color: var(--heading); min-height: 44px; cursor: pointer; align-items: center; gap: .5rem; }
@media (max-width: 940px) {
  .nav-toggle { display: inline-flex; }
  .nav-group[data-kind="button"] > .nav-group__btn { width: 100%; pointer-events: none; font: 700 .72rem var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); border-bottom: 0; padding-bottom: .3rem; padding-top: 1.2rem; }
  .nav-group__btn .icon { display: none; }
  .nav-group__menu { display: block; position: static; padding: 0; }
  .nav-group__panel { width: auto; border: 0; box-shadow: none; padding: 0; background: none; }
  .nav-group__menu a { padding: .75rem .25rem; border-bottom: 1px solid var(--line); border-radius: 0; }
  .nav-group[data-kind="link"] .nav-group__menu a { padding-left: 1.1rem; font-size: .95rem; }
  .nav-group__menu small, .nav-group[data-kind="link"] .nav-group__menu .ico { display: none; }
  .nav-group__menu a.all { margin-top: 0; border-top: 0; }
  .nav-group.is-open > .nav-group__btn { background: none; }
  .nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; background: var(--card); border-bottom: 1px solid var(--line); padding: .5rem var(--gap) 1.5rem; box-shadow: 0 24px 32px -20px rgba(10,16,32,.35); max-height: calc(100vh - 72px); overflow-y: auto; }
  .nav.is-open { display: flex; }
  .nav > a, .nav-group__btn { padding: 1rem .25rem; border-bottom: 1px solid var(--line); border-radius: 0; font-size: 1.02rem; }
  .nav .nav-cta { margin: 1.25rem 0 0; justify-content: center; padding: .95rem 1rem; border-bottom: 0; border-radius: var(--radius-sm); }
}
.site-footer { background: var(--navy); color: var(--on-dark-muted); padding-block: 4rem 2rem; font-size: .95rem; }
.site-footer a { color: var(--on-dark); text-decoration: none; }
.site-footer a:hover { color: var(--accent-on-dark); }
.site-footer .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2.5rem; margin-bottom: 2.75rem; }
.site-footer h2 { font: 700 .74rem var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--accent-on-dark); margin-bottom: 1rem; }
.site-footer .brand { color: #fff; margin-bottom: 1rem; }
.site-footer p { max-width: 38ch; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .55rem; }
.site-footer .links-2 { columns: 2; column-gap: 2rem; }
.site-footer .with-icon { display: flex; align-items: center; gap: .65rem; }
.site-footer .with-icon .icon { color: var(--accent-on-dark); width: 18px; height: 18px; }
.site-footer .icon-row { margin-top: 1.25rem; }
.site-footer .legal { border-top: 1px solid rgba(255,255,255,.12); padding-top: 1.4rem; font-size: .85rem; margin: 0; max-width: none; }
@media (max-width: 820px) { .site-footer .cols { grid-template-columns: 1fr 1fr; } .site-footer .cols > div:first-child { grid-column: 1 / -1; } }
@media (max-width: 520px) { .site-footer .cols { grid-template-columns: 1fr; } }

/* ───────── 8. HERO (home page) ───────── */
.hero { position: relative; isolation: isolate; color: var(--on-dark); overflow: hidden;
  background: linear-gradient(135deg, #0a1020 0%, #0f1a38 55%, #16255a 100%);
  padding-block: clamp(3.5rem, 8vw, 6rem) clamp(6.5rem, 11vw, 8.5rem); }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -2; background-image: var(--hero-image); background-size: cover; background-position: center; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1;
  background-image: linear-gradient(rgba(10,16,32,var(--hero-overlay)), rgba(10,16,32,var(--hero-overlay))),
    linear-gradient(to right, rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(to bottom, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: auto, 64px 64px, 64px 64px; }
.hero h1 { color: #fff; margin-bottom: .45em; }
.hero h1 em { font-style: normal; background: linear-gradient(transparent 62%, rgba(245,165,36,.55) 62%); }
.hero .eyebrow { color: var(--accent-on-dark); }
.hero .lede { color: var(--on-dark-muted); margin-bottom: 1.75rem; }
.hero .icon-row { margin-top: 1.75rem; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(2.5rem, 5vw, 4.5rem); align-items: center; }
@media (max-width: 920px) { .hero-grid { grid-template-columns: 1fr; } }

.frame { margin: 0; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow-lg); overflow: hidden; border: 1px solid rgba(255,255,255,.2); }
.frame figcaption { padding: .8rem 1rem .8rem 1rem; font-size: .85rem; color: var(--muted); border-top: 1px solid var(--line); background: var(--card); }
.frame figcaption a { font-weight: 600; }

.glance-wrap { position: relative; z-index: 2; margin-top: -3.6rem; }
.glance { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); }
.glance > div { display: flex; gap: .95rem; align-items: flex-start; padding: 1.4rem 1.5rem; border-right: 1px solid var(--line); }
.glance > div:last-child { border-right: 0; }
.glance .ico { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 11px; background: var(--accent-soft); color: var(--accent); flex: none; }
.glance dt { font: 700 .7rem var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: .25rem; }
.glance dd { margin: 0; font-family: var(--display); font-weight: 600; font-size: 1rem; color: var(--heading); line-height: 1.4; }
@media (max-width: 800px) { .glance { grid-template-columns: 1fr; } .glance > div { border-right: 0; border-bottom: 1px solid var(--line); } .glance > div:last-child { border-bottom: 0; } }

/* ───────── 9. INNER-PAGE BANNER ───────── */
.page-head { position: relative; isolation: isolate; overflow: hidden; color: var(--on-dark);
  background: linear-gradient(135deg, #0a1020 0%, #111f45 100%); padding-block: clamp(3rem, 7vw, 5rem) clamp(2.5rem, 5vw, 3.75rem); }
.page-head::before { content: ""; position: absolute; inset: 0; z-index: -2; background-image: var(--page-image); background-size: cover; background-position: center; }
.page-head::after { content: ""; position: absolute; inset: 0; z-index: -1;
  background-image: linear-gradient(rgba(10,16,32,var(--page-overlay)), rgba(10,16,32,var(--page-overlay))),
    linear-gradient(to right, rgba(255,255,255,.045) 1px, transparent 1px), linear-gradient(to bottom, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: auto, 64px 64px, 64px 64px; }
.page-head h1 { color: #fff; font-size: clamp(2rem, 4.4vw, 3.1rem); margin-bottom: .35em; }
.page-head .eyebrow { color: var(--accent-on-dark); }
.page-head .lede { color: var(--on-dark-muted); margin-bottom: 0; }
.page-head a:not(.btn) { color: var(--accent-on-dark); }
.page-head .btn-row { margin-top: 1.5rem; }

/* ───────── 10. CARDS AND PROJECT GALLERY ───────── */
.cards { display: grid; grid-auto-rows: 1fr; grid-auto-rows: 1fr; grid-auto-rows: 1fr; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: var(--gap); list-style: none; padding: 0; margin: 0; }
.card { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); display: flex; flex-direction: column; overflow: hidden; height: 100%; box-shadow: var(--shadow); transition: transform .18s, border-color .18s, box-shadow .18s; }
.card:hover, .card:focus-within { transform: translateY(-3px); border-color: var(--accent); box-shadow: var(--shadow-lg); }
.card__img { aspect-ratio: 16/9; background: #eceff7; border-bottom: 1px solid var(--line); overflow: hidden; }
.card__img img { width: 100%; height: 100%; object-fit: cover; object-position: top left; }
.card__img img[src*="pareto"] { object-fit: contain; background: #fff; }
.card__body { padding: 1.3rem 1.3rem 1.5rem; display: flex; flex-direction: column; gap: .75rem; flex: 1; }
.card__meta { display: flex; justify-content: space-between; align-items: center; gap: .5rem; font: 700 .72rem var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.card h3 { margin: 0; font-size: 1.22rem; }
.card .finding { color: var(--muted); }
.card h3 a { color: var(--heading); text-decoration: none; }
.card h3 a::after { content: ""; position: absolute; inset: 0; }
.card p { margin: 0; font-size: .96rem; }
.card .finding { color: var(--muted); }
.card__tools { margin-top: auto; padding-top: .5rem; font-size: .8rem; color: var(--muted); font-family: var(--mono); }
.status { display: inline-block; padding: .22rem .6rem; border-radius: 99px; font: 700 .68rem var(--sans); letter-spacing: .06em; text-transform: uppercase; color: #146c43; background: #e3f6ec; }
.status--progress { color: #8a5300; background: #fff1d6; }

.filters { display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: end; margin-bottom: 1.75rem; padding: 1.25rem; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.filters label, .filters .lbl { display: block; font: 700 .72rem var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: .45rem; }
.filters input[type=search] { font: inherit; padding: .7rem .95rem; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--bg); min-width: min(100%, 300px); min-height: 44px; }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip { font: 600 .86rem var(--sans); padding: .55rem .95rem; border: 1px solid var(--line-strong); background: var(--card); color: var(--text); border-radius: 99px; cursor: pointer; min-height: 40px; transition: all .15s; }
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip[aria-pressed="true"] { background: var(--navy); color: #fff; border-color: var(--navy); }
.empty { padding: 2.5rem; border: 1.5px dashed var(--line-strong); border-radius: var(--radius); text-align: center; color: var(--muted); background: var(--card); }
.js-only { display: none; }
.js .js-only { display: flex; }
#count { margin-bottom: 1.25rem; font-size: .92rem; }

/* ───────── 11. SERVICES ───────── */
.mini-services { display: grid; grid-auto-rows: 1fr; grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr)); gap: var(--gap); list-style: none; margin: 0; padding: 0; }
.mini-services a { display: flex; gap: 1.1rem; align-items: flex-start; height: 100%; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow); text-decoration: none; color: inherit; transition: transform .18s, border-color .18s, box-shadow .18s; }
.mini-services a:hover { transform: translateY(-3px); border-color: var(--accent); box-shadow: var(--shadow-lg); }
.mini-services .ico { flex: none; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); }
.mini-services strong { display: block; font: 700 1.05rem var(--display); color: var(--heading); line-height: 1.3; margin-bottom: .3rem; }
.mini-services span.d { display: block; font-size: .92rem; color: var(--muted); line-height: 1.55; }
.checks { list-style: none; padding: 0; margin: 0; }
.checks li { position: relative; padding-left: 1.7rem; margin-bottom: .6rem; font-size: .94rem; line-height: 1.5; }
.checks li::before { content: ""; position: absolute; left: 0; top: .2em; width: 1.05rem; height: 1.05rem; background: var(--accent);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / contain no-repeat; }
.checks--muted li::before { background: var(--line-strong); }
.tool-chips { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; padding: 0; margin: 0; }
.tool-chips li { font: 600 .8rem var(--sans); color: var(--heading); background: var(--bg); border: 1px solid var(--line); padding: .3rem .7rem; border-radius: 99px; }
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: var(--gap); }
.steps li { counter-increment: step; position: relative; padding-top: 3.4rem; }
.steps li::before { content: counter(step, decimal-leading-zero); position: absolute; top: 0; left: 0; font: 800 2rem var(--display); color: var(--accent); }
.steps li::after { content: ""; position: absolute; top: 3rem; left: 0; width: 100%; height: 2px; background: var(--line-strong); }
.steps h3 { font-size: 1.08rem; margin: .5rem 0 .3rem; }
.steps p { font-size: .94rem; color: var(--muted); margin: 0; }
.faq { max-width: 820px; margin-inline: auto; }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: .75rem; }
.faq summary { cursor: pointer; font: 600 1.02rem var(--display); color: var(--heading); padding: 1.1rem 1.3rem; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.4rem; line-height: 1; color: var(--accent); }
.faq details[open] summary::after { content: "–"; }
.faq details p { padding: 0 1.3rem 1.2rem; margin: 0; color: var(--muted); }

/* ───────── 12. SKILLS, CERTIFICATES, TIMELINE, ABOUT ───────── */
.skills-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); gap: var(--gap); }
.skillcard { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.75rem; box-shadow: var(--shadow); }
.skillcard__head { display: flex; gap: 1rem; align-items: center; margin-bottom: 1rem; }
.skillcard__head .ico { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); flex: none; }
.skillcard h2 { font-size: 1.2rem; margin: 0; }
.skillcard .intro { color: var(--muted); font-size: .94rem; margin-bottom: 1.1rem; }
.skillcard .tool-chips li { background: var(--bg); }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: var(--gap); }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem; box-shadow: var(--shadow); }
.tile .ico { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 11px; background: var(--accent-soft); color: var(--accent); margin-bottom: 1rem; }
.tile h3 { font-size: 1.08rem; margin-bottom: .45rem; }
.tile p { margin: 0 0 1rem; font-size: .93rem; color: var(--muted); }
.cert-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr)); gap: var(--gap); }
.cert { display: flex; gap: 1.2rem; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.7rem; box-shadow: var(--shadow); }
.cert .seal { flex: none; display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; background: var(--navy); color: var(--amber); }
.cert .seal .icon { width: 26px; height: 26px; }
.cert h3 { margin-bottom: .2rem; font-size: 1.15rem; }
.cert .issuer { color: var(--accent); font-weight: 600; font-size: .9rem; margin-bottom: .6rem; }
.cert p { color: var(--muted); font-size: .95rem; }
.timeline-wrap { max-width: 860px; margin-inline: auto; }
.timeline { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line-strong); }
.timeline > li { position: relative; padding: 0 0 2.5rem 2rem; }
.timeline > li::before { content: ""; position: absolute; left: -8px; top: .45rem; width: 14px; height: 14px; background: var(--card); border: 3px solid var(--accent); border-radius: 50%; }
.timeline .when { display: inline-block; font: 700 .76rem var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--accent); background: var(--accent-soft); padding: .25rem .65rem; border-radius: 99px; margin-bottom: .6rem; }
.timeline h3 { margin-bottom: .15rem; }
.timeline .org { color: var(--muted); margin-bottom: .8rem; }
.timeline h4 { font: 700 .74rem var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 1.1rem 0 .3rem; }
.timeline ul { margin-bottom: .4rem; }
.role-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem 1.75rem; box-shadow: var(--shadow); }
.role-card .cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0 2rem; }
@media (max-width: 700px) { .role-card .cols { grid-template-columns: 1fr; } }
.role-card h4 { margin-top: .6rem; }
.role-card ul { margin-bottom: 0; font-size: .96rem; }
.principles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: var(--gap); }
.principles > div { background: var(--card); border: 1px solid var(--line); border-top: 3px solid var(--accent); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow); }
.principles .ico { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); margin-bottom: .9rem; }
.principles h3 { font-size: 1.1rem; }
.principles p { color: var(--muted); font-size: .95rem; margin: 0; }
.about-hero { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
@media (max-width: 860px) { .about-hero { grid-template-columns: 1fr; } }
.portrait { background: var(--card); border-radius: 16px; padding: 1.1rem; box-shadow: var(--shadow-lg); max-width: 340px; justify-self: center; width: 100%; }
.portrait img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; }
.portrait figcaption { padding: 1rem .4rem .3rem; }
.portrait strong { display: block; font: 700 1.1rem var(--display); color: var(--heading); }
.portrait span { color: var(--muted); font-size: .92rem; display: flex; align-items: center; gap: .4rem; margin-top: .25rem; }
.portrait .icon { width: 16px; height: 16px; color: var(--accent); }
.head-center { text-align: center; max-width: 720px; margin: 0 auto 2.75rem; }
.head-center .eyebrow { justify-content: center; }
.head-center .eyebrow::after { content: ""; width: 22px; height: 2px; background: var(--amber); display: inline-block; }
.head-center h2 { margin-bottom: .5rem; }
.head-center .lede { margin-inline: auto; }
.center-cta { text-align: center; margin-top: 2.5rem; }
.proof-quote { max-width: 780px; margin: 3rem auto 0; text-align: center; font: 600 clamp(1.25rem, 2.4vw, 1.6rem)/1.45 var(--display); color: var(--heading); letter-spacing: -.01em; }
.proof-quote::before { content: ""; display: block; width: 44px; height: 3px; background: var(--amber); margin: 0 auto 1.4rem; }

/* ───────── 13. PROSE (case-study text) ───────── */
.prose { max-width: 72ch; }
.case { max-width: 820px; margin-inline: auto; }
.jump { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; padding: 0; margin: 0 0 2.25rem; }
.jump a { display: block; font: 600 .84rem var(--sans); color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 99px; padding: .4rem .85rem; text-decoration: none; }
.jump a:hover { border-color: var(--accent); color: var(--accent); }
.prose h2 { margin-top: 2.4em; font-size: 1.65rem; padding-top: 1.4rem; border-top: 1px solid var(--line); }
.prose h2:first-child { margin-top: 0; border-top: 0; padding-top: 0; }
.prose h3 { margin-top: 1.6em; }
.prose table { border-collapse: collapse; width: 100%; font-size: .95rem; margin: 1.2rem 0; display: block; overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.prose th, .prose td { text-align: left; padding: .7rem 1rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); background: var(--bg); }
.prose code { font-family: var(--mono); font-size: .86em; background: var(--code-bg); padding: .12em .4em; border-radius: 4px; }
.prose pre { background: var(--navy); color: var(--on-dark); padding: 1rem 1.2rem; border-radius: var(--radius); overflow-x: auto; font-size: .88rem; line-height: 1.55; }
.prose pre code { background: none; padding: 0; color: inherit; }
.prose blockquote { margin: 1.6rem 0; padding: .3rem 0 .3rem 1.3rem; border-left: 4px solid var(--amber); font: 600 1.25rem/1.45 var(--display); color: var(--heading); }
.callout { border: 1px solid var(--line); border-left: 4px solid var(--accent); background: var(--card); padding: 1rem 1.25rem; margin: 1.5rem 0; border-radius: var(--radius-sm); font-size: .96rem; }
.callout strong:first-child { color: var(--heading); }

/* ───────── 14. PROJECT PAGE ───────── */
.crumbs { font-size: .88rem; color: var(--on-dark-muted); margin-bottom: 1.25rem; }
.project-head h1 { font-size: clamp(2rem, 4.4vw, 3rem); max-width: 24ch; }
.project-head .lede { max-width: 68ch; margin-bottom: 1.25rem; }
.project-head .status { margin-bottom: 1rem; }
.tool-list { display: flex; flex-wrap: wrap; gap: .4rem .5rem; list-style: none; margin: 0 0 1.5rem; padding: 0; }
.tool-list li { font: .8rem var(--mono); color: var(--on-dark); border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.07); padding: .25rem .65rem; border-radius: 99px; }
.page-head .callout { background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.2); border-left-color: var(--amber); color: var(--on-dark); }
.page-head .callout strong:first-child { color: #fff; }
.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin: 0; box-shadow: var(--shadow-lg); }
.metrics div { padding: 1.15rem 1.25rem; background: var(--card); }
.metrics dt { font: 700 .7rem var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: .3rem; }
.metrics dd { margin: 0; font: 800 1.65rem var(--display); color: var(--heading); letter-spacing: -.02em; }
.metrics small { display: block; font: 400 .78rem var(--sans); color: var(--muted); margin-top: .2rem; letter-spacing: 0; }
.metrics-wrap { position: relative; z-index: 2; margin-top: -2.2rem; }
.gallery { display: grid; gap: var(--gap); }
.gallery--lead { grid-template-columns: 1fr; }
.gallery--grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }
.shot { margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.shot button { display: block; width: 100%; padding: 0; border: 0; background: #eceff7; cursor: zoom-in; }
.shot img { width: 100%; height: auto; }
.shot figcaption { padding: .85rem 1.1rem; font-size: .9rem; color: var(--muted); border-top: 1px solid var(--line); }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--gap); margin: 0 0 2.5rem; padding: 1.25rem 1.4rem; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.facts dt { font: 700 .7rem var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.facts dd { margin: .2rem 0 0; font-size: .95rem; }
.next-prev { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 1.5rem; margin-top: 3rem; font-weight: 600; }
dialog.lightbox { border: 0; padding: 0; background: transparent; max-width: 96vw; max-height: 96vh; width: 96vw; }
dialog.lightbox::backdrop { background: rgba(10,16,32,.9); }
.lightbox__inner { display: grid; gap: .75rem; justify-items: center; }
.lightbox img { max-width: 100%; max-height: 80vh; width: auto; background: #fff; border-radius: var(--radius-sm); object-fit: contain; }
.lightbox p { color: #fff; margin: 0; text-align: center; max-width: 80ch; font-size: .95rem; }
.lightbox__bar { display: flex; gap: .5rem; }
.lightbox__bar button { background: #fff; color: var(--navy); border: 0; padding: .6rem 1.1rem; border-radius: var(--radius-sm); font: 600 .9rem var(--sans); cursor: pointer; min-height: 44px; }

/* ───────── 15. RESUME AND CONTACT ───────── */
.resume-sec { padding-block: 1.8rem; border-top: 1px solid var(--line); }
.resume-sec:first-of-type { border-top: 0; padding-top: 0; }
.resume-sec h2 { font: 700 .78rem var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin-bottom: 1.1rem; }
.entry { display: grid; grid-template-columns: 170px 1fr; gap: .25rem 1.5rem; margin-bottom: 1.3rem; }
@media (max-width: 640px) { .entry { grid-template-columns: 1fr; } }
.entry .when { color: var(--muted); font-size: .9rem; font-weight: 500; }
.entry h3 { font-size: 1.08rem; margin: 0; }
.entry p, .entry ul { margin: .3rem 0 0; font-size: .96rem; }
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: var(--gap); }
.contact-card { display: flex; gap: 1rem; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.35rem 1.4rem; box-shadow: var(--shadow); text-decoration: none; color: inherit; transition: all .18s; }
a.contact-card:hover { transform: translateY(-3px); border-color: var(--accent); box-shadow: var(--shadow-lg); }
.contact-card .ico { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); flex: none; }
.contact-card .k { display: block; font: 700 .7rem var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: .15rem; }
.contact-card .v { display: block; font: 600 1rem var(--display); color: var(--heading); overflow-wrap: anywhere; }
.meta-row { display: flex; flex-wrap: wrap; gap: .6rem 1.5rem; margin-top: 1.1rem; font-size: .95rem; color: var(--on-dark-muted); }
.meta-row span { display: inline-flex; align-items: center; gap: .5rem; }
.meta-row .icon { width: 17px; height: 17px; color: var(--accent-on-dark); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); }
@media (max-width: 760px) { .two-col { grid-template-columns: 1fr; } }
.panel { border: 1px solid var(--line); background: var(--card); padding: 1.75rem; border-radius: var(--radius); box-shadow: var(--shadow); }
.panel h3 { margin-bottom: .5rem; }
.panel .btn-row { margin-top: 1.25rem; }
.panel p { color: var(--muted); }
.section--dark .panel { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.16); box-shadow: none; }
.section--dark .panel p { color: var(--on-dark-muted); }

@media print {
  .site-header, .site-footer, .no-print, .skip { display: none !important; }
  body { background: #fff; font-size: 11pt; }
  .section, .page-head { padding-block: 1rem; background: none; color: #000; }
  .page-head h1, .page-head .lede { color: #000; }
}

/* taller banner used on project pages (leaves room for the overlapping metrics bar) */
.page-head--tall { padding-bottom: clamp(4.5rem, 8vw, 6rem); }
.section--tight-top { padding-top: calc(var(--section) * .6); }

/* ───────── HERO PROJECT CAROUSEL (fan: the focused card sits in the centre, the others fan out behind it) ───────── */
.hero-grid { grid-template-columns: minmax(0, .9fr) minmax(0, 1.2fr); }
@media (max-width: 920px) { .hero-grid { grid-template-columns: 1fr; } }
.hero-visual { min-width: 0; }
.deck { position: relative; max-width: 680px; margin-left: auto; }
.deck__stage { position: relative; aspect-ratio: 2 / 1; perspective: 1600px; touch-action: pan-y; }
.slide { position: absolute; left: 50%; top: 50%; width: 56%; background: #fff; border-radius: 14px; overflow: hidden; box-shadow: var(--shadow-lg); border: 1px solid rgba(255,255,255,.25); transition: transform .6s cubic-bezier(.2,.7,.2,1), opacity .45s ease, filter .45s ease; transform: translate(-50%, -50%); }
.slide__img { display: block; aspect-ratio: 16 / 10; background: #f1f3fa; }
.slide__img img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.slide__bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .7rem 1rem; background: #fff; border-top: 1px solid var(--line); }
.slide__kind { display: block; font: 700 .64rem var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.slide__bar strong { display: block; font: 700 .95rem var(--display); color: var(--navy); line-height: 1.3; }
.slide__link { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--navy); color: #fff; flex: none; transition: background .15s; }
.slide__link:hover { background: var(--accent); color: #fff; }
/* Without JavaScript only the first slide shows. */
.slide:not(:first-child) { display: none; }
.deck.is-ready .slide { display: block; }
.deck.is-ready .slide[data-pos="0"] { z-index: 9; opacity: 1; }
.deck.is-ready .slide[data-pos="1"] { z-index: 8; transform: translate(calc(-50% + 36%), -50%) scale(.9) rotateY(-9deg); opacity: .97; filter: brightness(.93); cursor: pointer; }
.deck.is-ready .slide[data-pos="-1"] { z-index: 8; transform: translate(calc(-50% - 36%), -50%) scale(.9) rotateY(9deg); opacity: .97; filter: brightness(.93); cursor: pointer; }
.deck.is-ready .slide[data-pos="2"] { z-index: 7; transform: translate(calc(-50% + 54%), -50%) scale(.8) rotateY(-14deg); opacity: .85; filter: brightness(.85); cursor: pointer; }
.deck.is-ready .slide[data-pos="-2"] { z-index: 7; transform: translate(calc(-50% - 54%), -50%) scale(.8) rotateY(14deg); opacity: .85; filter: brightness(.85); cursor: pointer; }
.deck.is-ready .slide[data-pos="far-r"] { z-index: 1; transform: translate(calc(-50% + 54%), -50%) scale(.7); opacity: 0; pointer-events: none; }
.deck.is-ready .slide[data-pos="far-l"] { z-index: 1; transform: translate(calc(-50% - 54%), -50%) scale(.7); opacity: 0; pointer-events: none; }
.deck.is-ready .slide:not([data-pos="0"]) .slide__bar > * { visibility: hidden; }
.deck-controls { display: none; align-items: center; justify-content: center; gap: .75rem; margin-top: 1.1rem; }
.deck.is-ready .deck-controls { display: flex; }
.deck-btn { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255,255,255,.35); background: rgba(255,255,255,.08); color: #fff; cursor: pointer; transition: all .15s; flex: none; }
.deck-btn:hover { background: #fff; color: var(--navy); }
.deck-thumbs { display: flex; gap: .5rem; list-style: none; margin: 0; padding: 0; min-width: 0; }
.thumb { display: block; width: 62px; height: 40px; padding: 0; border: 2px solid rgba(255,255,255,.2); border-radius: 6px; overflow: hidden; background: #fff; cursor: pointer; opacity: .6; transition: all .15s; }
.thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top left; }
.thumb:hover { opacity: 1; }
.thumb[aria-current="true"] { opacity: 1; border-color: var(--amber); transform: translateY(-3px); }
.deck-count { display: none; text-align: center; margin: .7rem 0 0; font: 600 .82rem var(--sans); letter-spacing: .12em; color: var(--on-dark-muted); }
.deck.is-ready .deck-count { display: block; }
@media (max-width: 920px) { .deck { margin-inline: auto; } .slide { width: 60%; } }
@media (max-width: 520px) { .deck__stage { aspect-ratio: 1.45 / 1; } .slide { width: 70%; } .thumb { width: 34px; height: 24px; border-width: 1px; } .deck-thumbs { gap: .3rem; } .deck-btn { width: 40px; height: 40px; } .slide__bar strong { font-size: .85rem; } .slide__link { width: 30px; height: 30px; } .deck.is-ready .slide[data-pos="1"] { transform: translate(calc(-50% + 30%), -50%) scale(.88) rotateY(-9deg); } .deck.is-ready .slide[data-pos="-1"] { transform: translate(calc(-50% - 30%), -50%) scale(.88) rotateY(9deg); } .deck.is-ready .slide[data-pos="2"] { transform: translate(calc(-50% + 46%), -50%) scale(.76) rotateY(-14deg); } .deck.is-ready .slide[data-pos="-2"] { transform: translate(calc(-50% - 46%), -50%) scale(.76) rotateY(14deg); } }

/* ───────── EMAIL CHOOSER ───────── */
.mail-dialog { border: 0; padding: 0; background: transparent; width: min(94vw, 460px); max-height: 94vh; overflow: visible; color: var(--text); }
.mail-dialog::backdrop { background: rgba(10,16,32,.7); backdrop-filter: blur(3px); }
.mail-dialog__box { background: var(--card); border-radius: 16px; box-shadow: var(--shadow-lg); padding: 1.5rem; max-height: 92vh; overflow-y: auto; }
.mail-dialog__head { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; margin-bottom: 1.1rem; }
.mail-dialog h2 { font-size: 1.3rem; margin-bottom: .3rem; }
.mail-dialog p { margin: 0; font-size: .9rem; color: var(--muted); overflow-wrap: anywhere; }
.mail-close { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line-strong); background: var(--card); color: var(--heading); cursor: pointer; flex: none; }
.mail-close:hover { background: var(--navy); color: #fff; }
.mail-options { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.mail-opt { display: flex; align-items: center; gap: .9rem; width: 100%; text-align: left; padding: .8rem .9rem; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: inherit; text-decoration: none; cursor: pointer; font: inherit; transition: all .15s; }
.mail-opt:hover { border-color: var(--accent); background: var(--accent-soft); color: inherit; }
.mail-opt .ico { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); flex: none; }
.mail-opt strong { display: block; font: 600 .98rem var(--display); color: var(--heading); line-height: 1.3; }
.mail-opt small { display: block; font-size: .8rem; color: var(--muted); line-height: 1.4; }

/* ───────── SERVICES: equal jump tiles and pricing ───────── */
.deck.is-ready .slide[data-pos="1"] .slide__bar > *, .deck.is-ready .slide[data-pos="2"] .slide__bar > * { visibility: hidden; }

/* ───────── SERVICES: preview cards, detail pages ───────── */
.svc-cards { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 1fr; gap: var(--gap); list-style: none; margin: 0; padding: 0; }
@media (max-width: 980px) { .svc-cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .svc-cards { grid-template-columns: 1fr; } }
.svc-card { position: relative; display: flex; flex-direction: column; gap: .6rem; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 2rem; box-shadow: var(--shadow); transition: transform .18s, border-color .18s, box-shadow .18s; }
.svc-card:hover, .svc-card:focus-within { transform: translateY(-4px); border-color: var(--accent); box-shadow: var(--shadow-lg); }
.svc-card__icon { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 18px; background: linear-gradient(135deg, var(--accent-soft), #fff); color: var(--accent); border: 1px solid var(--line); margin-bottom: .8rem; }
.svc-card h2 { font-size: 1.28rem; margin: 0; }
.svc-card h2 a { color: var(--heading); text-decoration: none; }
.svc-card h2 a::after { content: ""; position: absolute; inset: 0; border-radius: 16px; }
.svc-card p { color: var(--muted); margin: 0; font-size: .97rem; }
.svc-card__more { margin-top: auto; padding-top: 1.1rem; display: inline-flex; align-items: center; gap: .45rem; font-weight: 600; color: var(--accent); }
.svc-card:hover .svc-card__more .icon { transform: translateX(3px); }
.svc-card__more .icon { transition: transform .15s; }
.sd-hero { display: grid; grid-template-columns: auto 1fr auto; gap: 1.5rem 2.25rem; align-items: center; }
@media (max-width: 960px) { .sd-hero { grid-template-columns: 1fr; } }
.sd-hero__icon { display: grid; place-items: center; width: 80px; height: 80px; border-radius: 22px; background: rgba(255,255,255,.1); color: var(--accent-on-dark); border: 1px solid rgba(255,255,255,.2); }
.sd-hero__icon .icon { width: 36px; height: 36px; }
.sd-hero h1 { font-size: clamp(1.9rem, 3.8vw, 2.75rem); margin-bottom: .3em; }
.sd-hero .lede { margin-bottom: 0; }
.sd-hero .tool-list { margin: 1.1rem 0 0; }
.sd-hero__cta { display: flex; flex-direction: column; gap: 1rem; align-items: flex-start; padding-left: 2rem; border-left: 1px solid rgba(255,255,255,.18); }
@media (max-width: 960px) { .sd-hero__cta { padding-left: 0; border-left: 0; } }
.sd-price span { display: block; font: 700 .7rem var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--on-dark-muted); }
.sd-price strong { font: 800 2.6rem/1.1 var(--display); color: var(--amber); letter-spacing: -.02em; }
.scope-grid { list-style: none; display: grid; grid-template-columns: repeat(2, 1fr); gap: .9rem 1.25rem; margin: 0; padding: 0; }
@media (max-width: 720px) { .scope-grid { grid-template-columns: 1fr; } }
.scope-grid li { display: flex; gap: .85rem; align-items: flex-start; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 1rem 1.2rem; }
.scope-grid .icon { color: var(--accent); margin-top: .2rem; width: 1.1rem; height: 1.1rem; }
.checks--lg li { font-size: 1rem; margin-bottom: .85rem; }
.two-col h2 { font-size: 1.55rem; }
.loc-line { display: flex; align-items: center; justify-content: center; gap: .55rem; color: var(--muted); font-weight: 600; margin: -1.25rem 0 2rem; }
.loc-line .icon { color: var(--accent); }

/* ───────── PROJECT PAGE: gallery cards are all the same size (except the first, large image) ───────── */
.gallery--grid { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 1fr; }
@media (max-width: 860px) { .gallery--grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .gallery--grid { grid-template-columns: 1fr; } }
.gallery--grid .shot { display: flex; flex-direction: column; }
.gallery--grid .shot button { aspect-ratio: 16 / 10; background: #fff; }
.gallery--grid .shot img { width: 100%; height: 100%; object-fit: contain; }
.gallery--grid .shot figcaption { flex: 1; }

/* Panels: buttons line up at the bottom even when the text above is a different length */
.panel { display: flex; flex-direction: column; }
.panel > .ico { align-self: flex-start; }
.panel .btn-row { margin-top: auto; padding-top: 1.25rem; }

/* ═══════════ DARK MODE ═══════════
   Switched on by the moon/sun button in the menu (it sets data-theme="dark" on the page).
   To change the dark colours, edit the values below. */
html[data-theme="dark"] {
  color-scheme: dark;
  --heading: #f2f5fc; --bg: #0b1120; --card: #131b30; --white: #0f1628; --line: #232e4a; --line-strong: #33426a;
  --text: #cfd6e8; --muted: #97a3bf; --accent: #818cf8; --accent-strong: #a5b0ff; --accent-soft: rgba(129,140,248,.16);
  --header-bg: rgba(11,17,32,.92); --code-bg: #1d2744;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px -12px rgba(0,0,0,.6);
  --shadow-lg: 0 2px 4px rgba(0,0,0,.45), 0 24px 48px -20px rgba(0,0,0,.7);
}
html[data-theme="dark"] .btn { color: var(--navy); }
html[data-theme="dark"] .btn:hover { color: var(--navy); background: var(--accent-strong); border-color: var(--accent-strong); }
html[data-theme="dark"] .btn--ghost { background: transparent; color: var(--heading); border-color: var(--line-strong); }
html[data-theme="dark"] .btn--ghost:hover { background: var(--heading); color: var(--navy); border-color: var(--heading); }
html[data-theme="dark"] .hero .btn--ghost, html[data-theme="dark"] .section--dark .btn--ghost, html[data-theme="dark"] .page-head .btn--ghost { color: #fff; border-color: rgba(255,255,255,.45); }
html[data-theme="dark"] .hero .btn--ghost:hover, html[data-theme="dark"] .section--dark .btn--ghost:hover, html[data-theme="dark"] .page-head .btn--ghost:hover { background: #fff; color: var(--navy); }
html[data-theme="dark"] .nav .nav-cta { background: var(--card); color: var(--heading); box-shadow: inset 0 0 0 1px var(--line-strong); }
html[data-theme="dark"] .nav .nav-cta:hover { background: var(--accent); color: var(--navy); }
html[data-theme="dark"] .nav .nav-cta[aria-current="page"] { background: var(--accent); color: var(--navy); }
html[data-theme="dark"] .chip[aria-pressed="true"] { background: var(--accent); color: var(--navy); border-color: var(--accent); }
html[data-theme="dark"] .iconbtn:hover, html[data-theme="dark"] .mail-close:hover { background: var(--heading); color: var(--navy); border-color: var(--heading); }
html[data-theme="dark"] .cert .seal { box-shadow: 0 0 0 1px var(--line-strong); }
html[data-theme="dark"] .brand__mark { box-shadow: 0 0 0 1px rgba(255,255,255,.2); }
html[data-theme="dark"] .status { color: #7ee2a8; background: rgba(34,197,94,.16); }
html[data-theme="dark"] .status--progress { color: #ffcf7a; background: rgba(245,165,36,.16); }
html[data-theme="dark"] .card__img, html[data-theme="dark"] .shot button { background: #1a2340; }
html[data-theme="dark"] .nav-group__menu a:hover .ico { background: var(--card); }
html[data-theme="dark"] .mail-opt:hover { background: var(--accent-soft); }
html[data-theme="dark"] .filters input[type=search] { color: var(--text); }
html[data-theme="dark"] .scope-grid li, html[data-theme="dark"] .tool-chips li { background: rgba(255,255,255,.04); }
html[data-theme="dark"] ::selection { background: #3b3f8f; color: #fff; }
body { transition: background-color .25s, color .25s; }
@media (prefers-reduced-motion: reduce) { body { transition: none; } }

/* Theme toggle button (in the menu) */
.theme-toggle { display: inline-grid; place-items: center; width: 42px; height: 42px; margin-left: .35rem; border-radius: 50%; border: 1px solid var(--line-strong); background: var(--card); color: var(--heading); cursor: pointer; transition: all .15s; flex: none; padding: 0; }
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }
.theme-toggle .icon { width: 19px; height: 19px; }
.theme-toggle .sun { display: none; }
html[data-theme="dark"] .theme-toggle .sun { display: block; }
html[data-theme="dark"] .theme-toggle .moon { display: none; }
.theme-toggle__label { display: none; }
@media (max-width: 940px) {
  .theme-toggle { display: flex; align-items: center; gap: .75rem; width: 100%; height: auto; margin: 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: none; padding: 1rem .25rem; justify-content: flex-start; font: 500 1.02rem var(--sans); }
  .theme-toggle:hover { color: var(--heading); }
  .theme-toggle__label { display: inline; }
  .theme-toggle .icon { width: 20px; height: 20px; }
}

/* Printing always uses the light colours */
@media print {
  html[data-theme="dark"] { color-scheme: light; --heading: #0a1020; --bg: #fff; --card: #fff; --white: #fff; --line: #e1e5f0; --line-strong: #c9d0e3; --text: #18213a; --muted: #566079; --accent: #4f46e5; --accent-soft: #eceeff; --code-bg: #e9ebf6; }
  .theme-toggle { display: none !important; }
}

/* ───────── READING PROGRESS BAR and BACK-TO-TOP BUTTON ───────── */
.read-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 70; pointer-events: none; }
.read-progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--amber)); transform-origin: left center; transform: scaleX(0); will-change: transform; }
.to-top { position: fixed; right: max(1.5rem, env(safe-area-inset-right)); bottom: max(1.5rem, calc(env(safe-area-inset-bottom) + 1rem)); z-index: 55; display: grid; place-items: center; width: 48px; height: 48px; padding: 0; border-radius: 50%; border: 1px solid var(--line-strong); background: var(--card); color: var(--heading); cursor: pointer; box-shadow: var(--shadow-lg); opacity: 0; visibility: hidden; transform: translateY(10px); transition: opacity .2s, transform .2s, visibility .2s, background .15s, color .15s, border-color .15s; }
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.to-top:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
html[data-theme="dark"] .to-top:hover { color: var(--navy); }
@media (max-width: 640px) { .to-top { right: max(1rem, env(safe-area-inset-right)); bottom: max(1.5rem, calc(env(safe-area-inset-bottom) + 1.25rem)); width: 44px; height: 44px; } }
@media (prefers-reduced-motion: reduce) { .to-top { transition: none; transform: none; } }
@media print { .to-top, .read-progress { display: none !important; } }

/* ───────── FOOTER LEGAL ROW ───────── */
.site-footer .legal-row { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .75rem 1.5rem; border-top: 1px solid rgba(255,255,255,.12); padding-top: 1.4rem; }
.site-footer .legal-row .legal { border-top: 0; padding-top: 0; margin: 0; }
.legal-links { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; }
.legal-links a { font-size: .85rem; color: var(--on-dark-muted); text-decoration: none; }
.legal-links a:hover { color: var(--accent-on-dark); text-decoration: underline; }
@media (max-width: 640px) { .site-footer .legal-row { flex-direction: column; align-items: flex-start; } }

/* ───────── LEGAL PAGES ───────── */
.legal-doc { max-width: 780px; }
.legal-doc h2 { font-size: 1.35rem; margin: 2.2rem 0 .6rem; }
.legal-doc p, .legal-doc li { color: var(--text); }
.legal-doc ul { margin-bottom: 1em; }
.legal-doc li { margin-bottom: .5rem; }
.legal-doc__nav { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
mark.ph { background: #fff1d6; color: #6b4200; padding: .05em .35em; border-radius: 4px; font-weight: 600; }
html[data-theme="dark"] mark.ph { background: rgba(245,165,36,.2); color: #ffd68a; }

/* ───────── SERVICE BANNER PRICE NOTE ───────── */
.sd-note { margin: 0; max-width: 240px; font-size: .82rem; line-height: 1.5; color: var(--on-dark-muted); }

/* ───────── ENQUIRY FORM ───────── */
.enquiry { max-width: 760px; margin: 0 auto; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: clamp(1.4rem, 4vw, 2.25rem); box-shadow: var(--shadow); }
.enquiry__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 1.25rem; }
@media (max-width: 640px) { .enquiry__row { grid-template-columns: 1fr; } }
.field { margin-bottom: 1.1rem; }
.field label { display: block; font: 600 .9rem var(--sans); color: var(--heading); margin-bottom: .4rem; }
.field input, .field select, .field textarea { width: 100%; font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: .75rem .9rem; min-height: 46px; }
.field textarea { resize: vertical; min-height: 140px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 3px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.enquiry__foot { display: flex; align-items: center; gap: 1rem 1.5rem; flex-wrap: wrap; margin-top: .5rem; }
.enquiry__note { margin: 0; font-size: .85rem; color: var(--muted); flex: 1; min-width: 220px; }
.form-status { margin-top: 1rem; }
.form-status:empty { display: none; }
.form-status--ok, .form-status--error, .form-status--info { padding: .9rem 1.1rem; border-radius: var(--radius-sm); font-size: .95rem; border: 1px solid var(--line); }
.form-status--ok { background: #e3f6ec; color: #11623a; border-color: #b6e6cb; }
.form-status--error { background: #fde8e8; color: #8a1c1c; border-color: #f3bcbc; }
.form-status--info { background: var(--accent-soft); color: var(--text); }
.form-status--error a { color: inherit; font-weight: 600; }
html[data-theme="dark"] .form-status--ok { background: rgba(34,197,94,.16); color: #8ee6b2; border-color: rgba(34,197,94,.35); }
html[data-theme="dark"] .form-status--error { background: rgba(248,113,113,.16); color: #fca5a5; border-color: rgba(248,113,113,.35); }

/* ───────── DARK MODE: service icons on the Services page ───────── */
html[data-theme="dark"] .svc-card__icon { background: rgba(129,140,248,.2); border-color: rgba(165,176,255,.35); color: #c3caff; }
html[data-theme="dark"] .mini-services .ico, html[data-theme="dark"] .svc-nav .ico { color: #c3caff; }


/* ───────── PROJECT PAGE: first (large) image is never stretched beyond its real size ───────── */
.gallery--lead .shot img { width: auto; max-width: 100%; margin-inline: auto; }
.gallery--lead .shot button { background: #fff; }

/* ───────── SERVICE PAGE: hourly rates ───────── */
.sd-price small { font: 600 .95rem var(--sans); color: var(--on-dark-muted); margin-left: .4rem; letter-spacing: 0; }
