:root {
  --hue: 222;
  --bg: #fdfefe;
  --surface: #ffffff;
  --surface-soft: #f4f7fb;
  --text: #0f172a;
  --muted: #5b6b82;
  --border: #e3e9f1;
  --border-strong: #cdd8e6;
  --accent: hsl(var(--hue) 72% 44%);
  --accent-strong: hsl(var(--hue) 78% 36%);
  --accent-soft: hsl(var(--hue) 85% 95%);
  --accent-border: hsl(var(--hue) 55% 82%);
  --accent-contrast: #ffffff;
  --shadow: 0 10px 30px rgb(15 23 42 / 0.08);
  --header-bg: rgb(253 254 254 / 0.86);
  --pre-bg: #0b1120;
  --pre-text: #dbe4f0;
  --project-image-filter: invert(1) hue-rotate(180deg);
}
/* Dark tokens — forced by the header toggle */
:root[data-theme="dark"] {
  --bg: #0a101d;
  --surface: #101a2c;
  --surface-soft: #0d1626;
  --text: #e7edf6;
  --muted: #93a4bd;
  --border: #223049;
  --border-strong: #33455f;
  --accent: hsl(var(--hue) 82% 64%);
  --accent-strong: hsl(var(--hue) 88% 72%);
  --accent-soft: hsl(var(--hue) 45% 16%);
  --accent-border: hsl(var(--hue) 45% 32%);
  --accent-contrast: #0a101d;
  --shadow: 0 12px 32px rgb(0 0 0 / 0.4);
  --header-bg: rgb(10 16 29 / 0.82);
  --project-image-filter: none;
}
/* Dark tokens — follow system preference unless the user forced light */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a101d;
    --surface: #101a2c;
    --surface-soft: #0d1626;
    --text: #e7edf6;
    --muted: #93a4bd;
    --border: #223049;
    --border-strong: #33455f;
    --accent: hsl(var(--hue) 82% 64%);
    --accent-strong: hsl(var(--hue) 88% 72%);
    --accent-soft: hsl(var(--hue) 45% 16%);
    --accent-border: hsl(var(--hue) 45% 32%);
    --accent-contrast: #0a101d;
    --shadow: 0 12px 32px rgb(0 0 0 / 0.4);
    --header-bg: rgb(10 16 29 / 0.82);
    --project-image-filter: none;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--accent-soft); }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-strong); }
a:focus-visible, .btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}
h1 {
  font-size: 40px; line-height: 1.15; margin: 0 0 16px;
  font-weight: 750; letter-spacing: -0.025em;
}
h2 { font-size: 22px; line-height: 1.3; margin: 40px 0 14px; font-weight: 650; letter-spacing: -0.01em; }
h3 { font-size: 17px; margin: 24px 0 8px; font-weight: 650; }
p { margin: 0 0 16px; }

@keyframes fade-up {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 0 hsl(142 71% 45% / 0.45); }
  50% { box-shadow: 0 0 0 6px hsl(142 71% 45% / 0); }
}
.hero > * { animation: fade-up 0.6s cubic-bezier(0.22, 0.61, 0.36, 1) both; }
.hero > *:nth-child(2) { animation-delay: 0.08s; }
.hero > *:nth-child(3) { animation-delay: 0.16s; }
.hero > *:nth-child(4) { animation-delay: 0.24s; }
.hero > *:nth-child(5) { animation-delay: 0.32s; }

/* Layout container */
.container { max-width: 1200px; margin: 0 auto; padding: 0 32px; }
main.container { padding-top: 56px; padding-bottom: 80px; min-height: 70vh; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: var(--header-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 68px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; text-decoration: none; color: var(--text); font-size: 19px; letter-spacing: -0.015em; }
.brand-avatar { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.brand:hover { color: var(--accent); }

nav a, .nav-placeholder { color: var(--muted); font-size: 15px; font-weight: 550; margin-left: 30px; transition: color 0.15s; }
nav a:hover { color: var(--text); }
.nav-placeholder { cursor: default; }
.menu-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; padding: 0; flex-shrink: 0;
  border: 1px solid var(--border); border-radius: 8px;
  background: var(--surface); color: var(--text); cursor: pointer;
}
.menu-toggle[hidden], .header-nav[hidden] { display: none; }
.menu-toggle .icon-close, .menu-toggle[aria-expanded="true"] .icon-menu { display: none; }
.menu-toggle[aria-expanded="true"] .icon-close { display: block; }
.header-icon {
  color: var(--muted);
  display: inline-flex; align-items: center;
  margin-left: 18px; padding: 4px;
  border: 0; background: none;
  transition: color 0.15s;
}
.header-icon:hover { color: var(--text); }
button.header-icon { cursor: pointer; }
/* Toggle icon shows the theme you will switch TO. Effective theme is
   data-theme when set, otherwise the system preference. */
.theme-toggle .icon-sun, .theme-toggle .icon-moon { display: none; }
:root[data-theme="light"] .theme-toggle .icon-moon { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) .theme-toggle .icon-moon { display: block; }
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .theme-toggle .icon-sun { display: block; }
}

/* Footer */
.site-footer { border-top: 1px solid var(--border); background: var(--surface-soft); color: var(--muted); font-size: 14px; }
.site-footer .container {
  display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  padding-top: 24px; padding-bottom: 24px;
}
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--accent); }

/* Buttons */
.btn {
  display: inline-block; padding: 10px 20px;
  border: 1px solid var(--border-strong); border-radius: 8px;
  text-decoration: none; color: var(--text); font-size: 15px; font-weight: 600;
  transition: border-color 0.15s, color 0.15s, background 0.15s, transform 0.15s;
}
.btn:hover { border-color: var(--accent); color: var(--accent); }
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--accent); border-color: var(--accent); color: var(--accent-contrast);
  box-shadow: 0 4px 14px hsl(var(--hue) 70% 45% / 0.28);
}
.btn-primary:hover {
  background: var(--accent-strong); border-color: var(--accent-strong);
  color: var(--accent-contrast);
}
.btn-invert { background: #fff; border-color: #fff; color: #101828; }
.btn-invert:hover { background: #e8eef7; border-color: #e8eef7; color: #101828; }
.btn-ghost-invert { border-color: rgb(255 255 255 / 0.55); color: #fff; background: transparent; }
.btn-ghost-invert:hover { background: rgb(255 255 255 / 0.14); border-color: #fff; color: #fff; }

/* Pills */
.pill {
  display: inline-block; font-size: 12.5px; font-weight: 600;
  color: var(--accent); background: var(--accent-soft);
  border-radius: 999px; padding: 2.5px 11px; margin: 0 3px;
}
a.pill { transition: border-color 0.15s, color 0.15s, transform 0.15s; }
a.pill:hover { color: var(--accent-strong); transform: translateY(-1px); }

/* Consultancy home hero */
.consultancy-hero {
  display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.75fr);
  gap: clamp(48px, 7vw, 96px); align-items: center;
  padding: 54px 0 42px;
}
.hero-kicker, .section-kicker {
  color: var(--accent); font-size: 12px; line-height: 1.4; font-weight: 750;
  letter-spacing: 0.13em; text-transform: uppercase;
}
.hero-kicker { margin: 0 0 20px; }
.hero-kicker span { color: var(--border-strong); padding: 0 8px; }
.consultancy-hero h1 {
  max-width: 780px; font-size: clamp(46px, 6.2vw, 74px);
  line-height: 1.02; letter-spacing: -0.045em; margin: 0 0 24px;
}
.tagline {
  max-width: 740px; color: var(--muted); font-size: clamp(19px, 2.2vw, 23px);
  line-height: 1.5; margin: 0 0 18px;
}
.hero-availability {
  display: flex; align-items: center; gap: 10px;
  color: var(--text); font-size: 15px; font-weight: 600; margin: 0;
}
.hero-availability .dot {
  width: 8px; height: 8px; flex: 0 0 auto; border-radius: 50%;
  background: hsl(142 71% 45%); animation: pulse-dot 2.4s ease-in-out infinite;
}
.hero-links { margin: 32px 0 0; display: flex; gap: 12px; flex-wrap: wrap; }
.btn-quiet { border-color: transparent; color: var(--muted); }
.btn-quiet:hover { border-color: var(--border); color: var(--text); }
.hero-proof {
  position: relative; overflow: hidden;
  border: 1px solid var(--accent-border); border-radius: 16px;
  padding: 30px; background: linear-gradient(145deg, var(--accent-soft), var(--surface));
}
.hero-proof::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 4px;
  background: linear-gradient(90deg, hsl(var(--hue) 75% 50%), hsl(calc(var(--hue) + 55) 68% 46%));
}
.proof-label {
  margin: 0 0 12px; color: var(--accent); font-size: 11.5px; font-weight: 750;
  letter-spacing: 0.1em; text-transform: uppercase;
}
.proof-heading { margin: 0 0 22px; font-size: 20px; font-weight: 700; line-height: 1.4; letter-spacing: -0.015em; }
.proof-list { list-style: none; margin: 0 0 22px; padding: 0; }
.proof-list li { position: relative; padding: 10px 0 10px 22px; color: var(--muted); font-size: 14px; line-height: 1.5; border-top: 1px solid var(--border); }
.proof-list li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); font-weight: 750; }
.proof-list strong { color: var(--text); }
.proof-link { font-size: 14px; font-weight: 700; }

/* Sections */
.section { margin-top: 84px; }
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 16px; margin-bottom: 22px;
}
.section-head h2 { margin: 0; font-size: 26px; letter-spacing: -0.015em; }
.section-link { font-size: 14.5px; font-weight: 650; color: var(--accent); white-space: nowrap; }
.section-link:hover { color: var(--accent-strong); }

/* Services page */
.services-page { max-width: 1080px; margin: 0 auto; }
.services-page-hero { max-width: 900px; padding: 20px 0 66px; }
.services-page-hero h1 {
  max-width: 860px; margin: 0 0 22px;
  font-size: clamp(42px, 6vw, 66px); line-height: 1.06; letter-spacing: -0.04em;
}
.services-page-lede { max-width: 780px; margin: 0; color: var(--muted); font-size: clamp(18px, 2.2vw, 22px); line-height: 1.55; }
.service-jump-nav { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 32px; }
.service-jump-nav a {
  display: inline-flex; align-items: center; gap: 9px; margin: 0; padding: 9px 14px;
  border: 1px solid var(--border); border-radius: 999px; color: var(--text);
  background: var(--surface); font-size: 13px; font-weight: 650;
}
.service-jump-nav a:hover { border-color: var(--accent-border); color: var(--accent); }
.service-jump-nav span { color: var(--accent); font: 700 11px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.services-overview {
  display: grid; grid-template-columns: minmax(240px, 0.7fr) minmax(0, 1.3fr);
  gap: clamp(40px, 8vw, 90px); margin-bottom: 88px; padding: 46px;
  border: 1px solid var(--border); border-radius: 18px; background: var(--surface-soft);
}
.services-overview h2, .engagement-start-intro h2 { margin: 0; font-size: clamp(28px, 4vw, 38px); letter-spacing: -0.025em; }
.services-overview-copy > p { color: var(--muted); font-size: 16.5px; }
.working-principles { list-style: none; margin: 28px 0 0; padding: 0; border-top: 1px solid var(--border); }
.working-principles li { display: grid; grid-template-columns: 130px 1fr; gap: 18px; padding: 14px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.working-principles span { color: var(--muted); }
.service-detail { scroll-margin-top: 92px; padding: 76px 0; border-top: 1px solid var(--border); }
.service-detail-head { display: grid; grid-template-columns: 56px minmax(0, 760px); gap: 24px; margin-bottom: 44px; }
.service-detail-number { padding-top: 9px; color: var(--accent); font: 700 13px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.service-detail-head h2 { margin: 0 0 13px; font-size: clamp(30px, 4.2vw, 44px); line-height: 1.12; letter-spacing: -0.03em; }
.service-detail-head > div > p:last-child { margin: 0; color: var(--muted); font-size: 18px; }
.service-detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: clamp(44px, 8vw, 88px); align-items: start; padding-left: 80px; }
.service-detail-main { display: flex; flex-direction: column; gap: 30px; }
.service-detail-main section h3 { margin: 0 0 8px; font-size: 13px; color: var(--text); text-transform: uppercase; letter-spacing: 0.08em; }
.service-detail-main section p { margin: 0; color: var(--muted); }
.deliverable-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 24px; list-style: none; margin: 14px 0 0; padding: 0; }
.deliverable-list li { position: relative; padding-left: 23px; color: var(--muted); font-size: 14.5px; line-height: 1.5; }
.deliverable-list li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); font-weight: 800; }
.capability-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; list-style: none; margin: 14px 0 0; padding: 0; }
.capability-grid li { padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-soft); color: var(--text); font-size: 13.5px; font-weight: 600; }
.service-engagement-card { position: sticky; top: 96px; padding: 26px; border: 1px solid var(--accent-border); border-radius: 14px; background: linear-gradient(145deg, var(--accent-soft), var(--surface)); }
.engagement-card-label { margin: 0 0 4px; color: var(--muted); font-size: 11.5px; font-weight: 750; letter-spacing: 0.08em; text-transform: uppercase; }
.engagement-card-value { margin: 0 0 20px; color: var(--text); font-size: 26px; font-weight: 750; letter-spacing: -0.02em; }
.service-engagement-card dl { margin: 0 0 18px; }
.service-engagement-card dl div { padding: 12px 0; border-top: 1px solid var(--border); }
.service-engagement-card dt { margin-bottom: 2px; color: var(--muted); font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }
.service-engagement-card dd { margin: 0; color: var(--text); font-size: 14px; font-weight: 650; line-height: 1.45; }
.engagement-boundary { color: var(--muted); font-size: 12.5px; line-height: 1.55; }
.engagement-boundary strong { color: var(--text); }
.service-engagement-card .btn { display: block; margin-top: 22px; text-align: center; }
.engagement-start { margin-top: 76px; padding: 52px; border-radius: 18px; color: var(--text); background: var(--surface-soft); border: 1px solid var(--border); }
.engagement-start-intro { max-width: 720px; margin-bottom: 38px; }
.engagement-start-intro > p:last-child { margin: 14px 0 0; color: var(--muted); font-size: 17px; }
.engagement-start-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; list-style: none; margin: 0; padding: 0; }
.engagement-start-steps li { padding: 22px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.engagement-start-steps li > span { display: block; margin-bottom: 22px; color: var(--accent); font: 700 12px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.engagement-start-steps h3 { margin: 0 0 7px; font-size: 16px; }
.engagement-start-steps p { margin: 0; color: var(--muted); font-size: 13.5px; line-height: 1.55; }
.client-inputs { display: grid; grid-template-columns: 220px 1fr; gap: 30px; margin-top: 30px; padding-top: 28px; border-top: 1px solid var(--border); }
.client-inputs h3 { margin: 0; font-size: 16px; }
.client-inputs ul { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 30px; margin: 0; padding-left: 20px; color: var(--muted); font-size: 14px; }
.service-fit-cta {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 40px; align-items: center;
  margin-top: 34px; padding: 46px 50px; border-radius: 18px;
  color: #fff;
  background:
    radial-gradient(90% 180% at 92% 0%, hsl(calc(var(--hue) + 60) 72% 46% / 0.9), transparent 55%),
    linear-gradient(120deg, hsl(var(--hue) 72% 42%), hsl(var(--hue) 68% 30%));
}
.service-fit-cta h2 { margin: 0 0 10px; color: #fff; font-size: clamp(27px, 4vw, 36px); letter-spacing: -0.025em; }
.service-fit-cta p { max-width: 720px; margin: 0; color: rgb(255 255 255 / 0.85); font-size: 16.5px; }
.service-fit-cta .btn { white-space: nowrap; }

/* Consultancy services */
.section-intro { max-width: 710px; margin-bottom: 30px; }
.section-kicker { margin: 0 0 9px; }
.section-intro h2, .engagement-copy h2 { margin: 0 0 12px; font-size: clamp(28px, 4vw, 38px); letter-spacing: -0.025em; }
.section-intro > p:last-child, .engagement-copy > p:last-child { margin: 0; color: var(--muted); font-size: 17px; }
.service-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; align-items: stretch; }
.service-card {
  display: flex; flex-direction: column; min-width: 0;
  border: 1px solid var(--border); border-radius: 14px; padding: 26px;
  background: var(--surface); transition: border-color 0.18s, box-shadow 0.18s, transform 0.18s;
}
.service-card:hover { border-color: var(--accent-border); box-shadow: var(--shadow); transform: translateY(-3px); }
.service-card-featured { border-color: var(--accent-border); box-shadow: 0 8px 24px rgb(15 23 42 / 0.05); }
.service-topline { display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; }
.service-number { color: var(--accent); font: 700 13px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.service-duration { color: var(--muted); background: var(--surface-soft); border-radius: 999px; padding: 4px 10px; font-size: 12px; font-weight: 700; }
.service-card h3 { margin: 0 0 12px; font-size: 21px; line-height: 1.25; letter-spacing: -0.02em; }
.service-card > p { color: var(--muted); font-size: 14.5px; line-height: 1.6; }
.service-card .service-for { color: var(--text); font-weight: 600; }
.service-deliverables { margin: 8px 0 24px; padding-top: 19px; border-top: 1px solid var(--border); }
.service-deliverables p { margin: 0 0 9px; font-size: 11.5px; color: var(--muted); font-weight: 750; text-transform: uppercase; letter-spacing: 0.08em; }
.service-deliverables ul { list-style: none; margin: 0; padding: 0; }
.service-deliverables li { position: relative; padding: 4px 0 4px 17px; color: var(--muted); font-size: 13.5px; line-height: 1.5; }
.service-deliverables li::before { content: "·"; position: absolute; left: 3px; color: var(--accent); font-size: 18px; font-weight: 800; line-height: 1.1; }
.service-footer { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-top: auto; padding-top: 18px; border-top: 1px solid var(--border); font-size: 13.5px; }
.service-footer > span { color: var(--text); font-weight: 750; }
.service-footer a { font-weight: 700; text-align: right; }
.services-note { margin: 18px 0 0; color: var(--muted); font-size: 13.5px; text-align: center; }

/* Selected work */
.work-section .section-head { align-items: end; }
.work-section .section-head h2 { margin-top: 0; }

/* Engagement process */
.engagement-section {
  display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(420px, 1.1fr);
  gap: clamp(48px, 8vw, 96px); align-items: start;
  padding: 48px; border: 1px solid var(--border); border-radius: 18px; background: var(--surface-soft);
}
.engagement-steps { list-style: none; margin: 0; padding: 0; }
.engagement-steps li { display: grid; grid-template-columns: 36px 1fr; gap: 15px; padding: 18px 0; border-bottom: 1px solid var(--border); }
.engagement-steps li:first-child { padding-top: 0; }
.engagement-steps li:last-child { border-bottom: 0; padding-bottom: 0; }
.engagement-steps li > span { color: var(--accent); font: 700 12px/1.8 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.engagement-steps strong { display: block; margin-bottom: 3px; font-size: 16px; }
.engagement-steps p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.55; }

/* Projects listing */
.lede { color: var(--muted); font-size: 18px; max-width: 640px; }
main > h2 {
  font-size: 13px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--muted);
  margin: 48px 0 18px; padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr));
  gap: 20px;
}
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card {
  position: relative; overflow: hidden;
  border: 1px solid var(--border); border-radius: 14px;
  padding: 26px 24px 24px; background: var(--surface);
  display: flex; flex-direction: column; gap: 10px;
  transition: box-shadow 0.18s, transform 0.18s, border-color 0.18s;
}
.card:hover {
  border-color: var(--accent-border); box-shadow: var(--shadow);
  transform: translateY(-3px);
}
.card-band {
  position: absolute; inset: 0 0 auto 0; height: 5px;
  background: linear-gradient(90deg, hsl(var(--hue) 75% 50%), hsl(calc(var(--hue) + 55) 68% 46%));
}
.card-image, .cover { filter: var(--project-image-filter); }
.card-image {
  display: block; width: 100%; height: 150px;
  object-fit: contain; background: #101a2c;
  border-radius: 9px; margin-bottom: 4px;
}
.card h2 {
  font-size: 19px; margin: 6px 0 0; padding: 0; border: 0;
  letter-spacing: -0.015em;
}
.card h2 a { color: var(--text); text-decoration: none; }
.card h2 a::after {
  content: " →"; display: inline-block;
  opacity: 0; transform: translateX(-4px);
  transition: opacity 0.15s, transform 0.15s;
}
.card:hover h2 a { color: var(--accent); }
.card:hover h2 a::after { opacity: 1; transform: none; }
.card-meta { color: var(--muted); font-size: 13.5px; margin: 0; }
.card-desc {
  color: var(--muted); font-size: 14.5px; margin: 0;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.card .tags { margin: auto 0 0; display: flex; flex-wrap: wrap; row-gap: 9px; column-gap: 9px; }
.card .tags .pill { margin: 0; }

/* Filter bar */
.filters {
  margin-top: 52px; padding-top: 26px;
  border-top: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 14px;
}
.filters div { line-height: 2.1; }
.filters-label {
  font-weight: 700; font-size: 12.5px; text-transform: uppercase;
  letter-spacing: 0.07em; color: var(--muted); margin-right: 12px;
}

/* Term pages */
.term-list {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px;
}
.term-list a {
  display: flex; justify-content: space-between; align-items: center;
  border: 1px solid var(--border); border-radius: 10px;
  padding: 12px 16px; color: var(--text); font-weight: 550;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.term-list a:hover {
  border-color: var(--accent-border); color: var(--accent);
  background: var(--accent-soft);
}
.term-list .count { color: var(--muted); font-size: 13px; }

/* Blog listing */
.post-list { list-style: none; margin: 0; padding: 0; }
.post-list li {
  padding: 22px 0; border-bottom: 1px solid var(--border);
  display: flex; gap: 24px; align-items: baseline; flex-wrap: wrap;
}
.post-list time { color: var(--muted); font-size: 14px; min-width: 110px; }
.post-list a { color: var(--text); font-weight: 650; font-size: 18px; letter-spacing: -0.01em; }
.post-list a:hover { color: var(--accent); }
.post-desc { color: var(--muted); font-size: 15px; }
.pagination { display: flex; gap: 20px; margin-top: 28px; color: var(--muted); font-size: 14px; }

/* Blog post */
.post-page { max-width: 780px; margin: 0 auto; }
.post-page h1 { font-size: 42px; letter-spacing: -0.02em; }
.post-page .card-meta {
  color: var(--muted); font-size: 14.5px; margin: 0 0 28px;
  padding-bottom: 20px; border-bottom: 1px solid var(--border);
}

/* Project case-study header */
.project-head {
  position: relative; overflow: hidden;
  display: flex; align-items: center; gap: 32px;
  border-radius: 18px;
  padding: 46px 42px 38px;
  margin-bottom: 40px;
  background:
    radial-gradient(120% 170% at 88% -30%, hsl(var(--hue) 80% 55% / 0.18), transparent 58%),
    linear-gradient(135deg, var(--accent-soft), var(--surface-soft));
  border: 1px solid var(--accent-border);
}
.project-head::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 5px;
  background: linear-gradient(90deg, hsl(var(--hue) 75% 50%), hsl(calc(var(--hue) + 55) 68% 46%));
}
.project-heading { flex: 1; min-width: 0; }
.project-head h1 {
  font-size: clamp(34px, 5vw, 48px);
  overflow-wrap: anywhere;
  letter-spacing: -0.025em; margin: 0;
}
.head-meta { color: var(--muted); margin-top: 14px; margin-bottom: 0; font-size: 15px; }
.type-chip {
  display: inline-block;
  font-size: 12px; font-weight: 750; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--accent-contrast);
  background: linear-gradient(90deg, hsl(var(--hue) 75% 50%), hsl(calc(var(--hue) + 55) 68% 46%));
  padding: 5px 13px; border-radius: 999px; margin-bottom: 18px;
}

/* Project case-study layout */
.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 64px;
  align-items: start;
}
.article .prose { max-width: 760px; }
.details {
  position: sticky; top: 96px;
  border: 1px solid var(--border); border-radius: 14px;
  background: var(--surface-soft); padding: 24px;
}
.details-title {
  font-size: 13px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.07em; color: var(--muted); margin: 0 0 6px;
}
.details dl { margin: 0; }
.details-row {
  display: grid; grid-template-columns: 64px 1fr; gap: 12px;
  padding: 10px 0; font-size: 14.5px;
}
.details-row + .details-row { border-top: 1px solid var(--border); }
.details-row dt { color: var(--muted); font-weight: 550; }
.details-row dd { margin: 0; }
.details-row .tags { margin: 0; display: flex; flex-wrap: wrap; row-gap: 9px; column-gap: 9px; }
.details-row .tags .pill { margin: 0; }
.details-links { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.details-links .btn { text-align: center; }

/* Skills */
.skills {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}
.skill-group {
  border: 1px solid var(--border); border-radius: 14px;
  padding: 24px; background: var(--surface);
  transition: border-color 0.15s;
}
.skill-group:hover { border-color: var(--accent-border); }
.skill-group h3 {
  font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.07em;
  color: var(--muted); margin: 0 0 14px; font-weight: 700;
}
.skill-items { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.skill-items li {
  font-size: 14px; font-weight: 550;
  border: 1px solid var(--border); border-radius: 8px;
  padding: 6px 12px; background: var(--surface-soft);
  transition: border-color 0.15s, color 0.15s;
}
.skill-items li:hover { border-color: var(--accent-border); color: var(--accent); }

/* Experience timeline (about page) */
.timeline {
  margin: 8px 0 8px 7px;
  padding-left: 30px;
  border-left: 2px solid var(--border-strong);
}
.tl-item { position: relative; padding-bottom: 32px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before {
  content: ""; position: absolute; left: -36.5px; top: 5px;
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.tl-date { font-size: 13px; font-weight: 700; color: var(--muted); letter-spacing: 0.05em; }
.tl-item h3 { font-size: 18.5px; margin: 6px 0 8px; font-weight: 700; letter-spacing: -0.01em; }
.tl-item p { color: var(--muted); margin: 0; }

/* CTA band */
.cta {
  padding: 78px 0;
  color: #fff;
  background:
    radial-gradient(90% 150% at 92% 0%, hsl(calc(var(--hue) + 60) 72% 46% / 0.95), transparent 55%),
    linear-gradient(120deg, hsl(var(--hue) 72% 42%), hsl(var(--hue) 68% 30%));
}
.cta h2 { color: #fff; font-size: clamp(28px, 4vw, 36px); letter-spacing: -0.02em; margin-bottom: 12px; }
.cta p {
  color: rgb(255 255 255 / 0.85); font-size: 17px;
  max-width: 560px; margin-bottom: 0;
}
.cta-actions { display: flex; gap: 12px; margin-top: 30px; flex-wrap: wrap; }

/* Prose */
.prose h2 { margin-top: 36px; }
.prose h3 { margin-top: 24px; }
.prose pre {
  background: var(--pre-bg); color: var(--pre-text);
  border-radius: 10px; padding: 16px 18px;
  overflow-x: auto; font-size: 14px; line-height: 1.6;
}
.prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.88em;
  background: var(--surface-soft); border: 1px solid var(--border);
  padding: 1px 5px; border-radius: 5px;
}
.prose pre code { background: none; border: 0; padding: 0; }
.prose blockquote {
  border-left: 3px solid var(--accent); margin: 24px 0;
  padding: 4px 0 4px 20px;
  color: var(--muted); font-size: 17px;
}
.prose img { max-width: 100%; border-radius: 10px; }
.prose ul, .prose ol { padding-left: 24px; }
.prose li { margin-bottom: 6px; }
.prose a { text-decoration: underline; text-underline-offset: 3px; }
.prose a:hover { text-decoration-thickness: 2px; }

.cover {
  display: block; width: 32%; max-width: 320px; height: auto;
  flex-shrink: 0; aspect-ratio: 2 / 1; object-fit: contain;
  border-radius: 12px;
}

main h1 { margin-bottom: 12px; }

/* Thank-you page */
.thank-you-page {
  max-width: 720px; margin: clamp(32px, 8vh, 96px) auto;
  padding: clamp(34px, 6vw, 64px); text-align: center;
  border: 1px solid var(--accent-border); border-radius: 20px;
  background: linear-gradient(145deg, var(--accent-soft), var(--surface));
}
.thank-you-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 68px; height: 68px; margin-bottom: 24px; border-radius: 50%;
  color: var(--accent-contrast); background: var(--accent);
  box-shadow: 0 8px 24px hsl(var(--hue) 70% 45% / 0.24);
}
.thank-you-page .section-kicker { margin-bottom: 12px; }
.thank-you-page h1 { margin: 0 auto 18px; font-size: clamp(34px, 5vw, 50px); letter-spacing: -0.035em; }
.thank-you-lede { max-width: 590px; margin: 0 auto; color: var(--muted); font-size: 19px; line-height: 1.6; }
.thank-you-note { margin: 22px 0 0; color: var(--text); font-size: 14px; font-weight: 650; }

/* Contact form */
.contact-page { max-width: 640px; }
.contact-form { display: flex; flex-direction: column; gap: 18px; margin-top: 28px; }
.contact-form .field { display: flex; flex-direction: column; gap: 7px; }
.contact-form label { font-size: 14px; font-weight: 650; color: var(--muted); }
.contact-form input,
.contact-form textarea {
  font: inherit; line-height: 1.5; color: var(--text);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 9px; padding: 11px 13px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.contact-form textarea { resize: vertical; min-height: 140px; }
.contact-form .form-hint { font-size: 13.5px; color: var(--muted); margin: 0; }
.contact-form .hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.contact-fallback { color: var(--muted); }

/* Responsive */
@media (max-width: 980px) {
  .services-overview { grid-template-columns: 1fr; gap: 24px; }
  .service-detail-grid { grid-template-columns: 1fr; padding-left: 80px; }
  .service-engagement-card { position: static; max-width: 520px; }
  .engagement-start-steps { grid-template-columns: 1fr; }
  .engagement-start-steps li { display: grid; grid-template-columns: 36px 1fr; gap: 14px; }
  .engagement-start-steps li > span { margin: 4px 0 0; }
  .consultancy-hero { grid-template-columns: 1fr; gap: 36px; padding-top: 38px; }
  .hero-proof { max-width: 680px; }
  .service-grid { grid-template-columns: 1fr; }
  .service-card { display: grid; grid-template-columns: minmax(220px, 0.85fr) minmax(280px, 1.15fr); column-gap: 30px; }
  .service-topline, .service-card h3, .service-card > p { grid-column: 1; }
  .service-deliverables { grid-column: 2; grid-row: 1 / span 4; margin: 0; padding: 0 0 0 30px; border-top: 0; border-left: 1px solid var(--border); }
  .service-footer { grid-column: 1 / -1; }
  .engagement-section { grid-template-columns: 1fr; gap: 36px; }
  .article-layout { grid-template-columns: 1fr; gap: 40px; }
  .details { position: static; order: -1; }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .project-head { padding: 38px 30px 32px; }
}
@media (max-width: 768px) {
  .site-header .header-inner {
    flex-wrap: wrap; gap: 12px; height: auto; min-height: 68px;
    padding-top: 12px; padding-bottom: 12px;
  }
  .header-nav {
    display: flex; flex-wrap: wrap; flex-basis: 100%; gap: 4px;
    padding: 12px 0 0; border-top: 1px solid var(--border);
    max-height: calc(100dvh - 92px); overflow-y: auto;
  }
  .header-nav a:not(.header-icon), .header-nav .nav-placeholder {
    flex-basis: 100%; margin: 0; padding: 8px 12px; min-height: 44px;
    border-radius: 8px;
  }
  .header-nav a:not(.header-icon):hover { background: var(--surface-soft); }
  .header-nav .header-icon {
    justify-content: center; width: 44px; height: 44px; margin: 0; padding: 0;
  }
}
@media (max-width: 640px) {
  .container { padding: 0 20px; }
  .thank-you-page { margin: 20px auto 44px; padding: 34px 22px; }
  .services-page-hero { padding: 6px 0 52px; }
  .services-page-hero h1 { font-size: clamp(38px, 11vw, 52px); }
  .service-jump-nav { align-items: stretch; flex-direction: column; }
  .service-jump-nav a { border-radius: 9px; }
  .services-overview { margin-bottom: 60px; padding: 28px 22px; }
  .working-principles li { grid-template-columns: 1fr; gap: 2px; }
  .service-detail { padding: 58px 0; }
  .service-detail-head { grid-template-columns: 1fr; gap: 6px; margin-bottom: 32px; }
  .service-detail-number { padding: 0; }
  .service-detail-grid { padding-left: 0; gap: 34px; }
  .deliverable-list, .capability-grid { grid-template-columns: 1fr; }
  .engagement-start { margin-top: 58px; padding: 30px 22px; }
  .engagement-start-steps li { padding: 18px; }
  .client-inputs { grid-template-columns: 1fr; gap: 14px; }
  .client-inputs ul { grid-template-columns: 1fr; }
  .service-fit-cta { grid-template-columns: 1fr; gap: 26px; padding: 32px 24px; }
  .service-fit-cta .btn { justify-self: start; }
  main:has(> .hero) { padding-top: 16px; }
  .consultancy-hero { padding: 18px 0 20px; gap: 32px; }
  .consultancy-hero h1 { font-size: clamp(40px, 12vw, 54px); }
  .hero-kicker span { padding: 0 4px; }
  .tagline { margin-bottom: 16px; }
  .hero-availability { align-items: flex-start; }
  .hero-availability .dot { margin-top: 7px; }
  .hero-links .btn { flex: 1 1 auto; text-align: center; }
  .hero-proof { padding: 25px 22px; }
  .section { margin-top: 64px; }
  .service-card { display: flex; padding: 23px 21px; }
  .service-deliverables { margin: 8px 0 24px; padding: 19px 0 0; border-left: 0; border-top: 1px solid var(--border); }
  .service-footer { width: 100%; }
  .grid-3 { grid-template-columns: 1fr; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 6px; }
  .work-section .section-head { align-items: flex-start; }
  .engagement-section { padding: 28px 22px; }
  .project-head { padding: 30px 22px 26px; margin-bottom: 28px; }
  .project-head { flex-direction: column; align-items: stretch; gap: 24px; }
  .cover { width: 100%; max-width: 320px; align-self: center; }
  .cta { padding: 56px 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
