/* murrketing — light grey canvas, white rounded tiles, deep navy accents, black/white pills and glassy chips over a dark first screen.
   Breakpoints: 980 (tablet, menu collapses) and 640 (phone). */
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 200 800; font-display: swap; src: url(/fonts/manrope-cyrillic.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 200 800; font-display: swap; src: url(/fonts/manrope-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --font: 'Manrope', Arial, sans-serif;
  --bg: #eeeff0;
  --surface: #ffffff;
  --ink: #111316;
  --ink-2: #3a3f46;
  --muted: #8b9097;
  --faint: #b7bbc1;
  --line: #e1e3e6;
  --navy: #0f2239;
  --navy-2: #1b3452;
  --navy-3: #2c4a6e;
  --night: linear-gradient(180deg, #4a5663 0%, #2a333d 38%, #141a21 72%, #0b0f14 100%);
  --radius-sm: 12px;
  --radius: 20px;
  --radius-lg: 26px;
  --shadow: 0 18px 40px -22px rgba(15, 34, 57, .35);
  --container: 1240px;
  --narrow: 860px;
  --gutter: 24px;
  --topbar-h: 76px;
  --text: 17px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--topbar-h) + 12px); background: var(--bg); }
body { margin: 0; font-family: var(--font); font-size: var(--text); line-height: 1.6; color: var(--ink); background: var(--bg); overflow-x: clip; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img { max-width: 100%; display: block; }
a { color: var(--ink); text-decoration-color: var(--faint); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--navy); text-decoration-color: currentColor; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--navy-3); outline-offset: 3px; border-radius: 8px; }
.wrap { width: 100%; max-width: calc(var(--container) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.wrap.narrow { max-width: calc(var(--narrow) + 2 * var(--gutter)); }
.center { text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--surface); padding: 8px 14px; border-radius: 8px; }
.skip:focus { left: 8px; }
.img-empty { background: var(--night); }

/* ---------- pills, round arrows, glass ---------- */
.pill { display: inline-flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 16px; border-radius: 999px; background: var(--surface); color: var(--ink); font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap; transition: background .2s, color .2s, transform .15s; }
.pill:hover { color: var(--ink); transform: translateY(-1px); }
.pill--dark { background: var(--ink); color: #fff; padding-right: 5px; }
.pill--dark:hover { background: var(--navy); color: #fff; }
.pill__ico { width: 30px; height: 30px; border-radius: 50%; background: #fff; color: var(--ink); display: grid; place-items: center; }
.pill__ico svg { width: 16px; height: 16px; }
.adot { flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: #fff; transition: transform .25s; }
.adot svg { width: 16px; height: 16px; }
.adot--light { background: #fff; color: var(--ink); }
.glass { background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .22); backdrop-filter: blur(18px) saturate(1.3); -webkit-backdrop-filter: blur(18px) saturate(1.3); color: #fff; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 46px; padding: 0 24px; border-radius: 999px; font-weight: 600; font-size: 15px; text-decoration: none; border: 1px solid transparent; cursor: pointer; transition: transform .15s, background .2s, color .2s; }
.btn:hover { transform: translateY(-1px); }
.btn--primary { background: var(--ink); color: #fff; }
.btn--primary:hover { background: var(--navy); color: #fff; }

/* ---------- top bar: floating pills ---------- */
.topbar { position: fixed; top: 0; left: 0; right: 0; z-index: 50; pointer-events: none; }
.topbar__inner { pointer-events: auto; max-width: calc(var(--container) + 2 * var(--gutter)); margin: 0 auto; padding: 18px var(--gutter) 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.topbar__inner > * { pointer-events: auto; }
.topbar__left { display: flex; align-items: center; gap: 6px; }
.brand { gap: 9px; font-weight: 700; letter-spacing: -.01em; font-size: 15px; text-decoration: none; color: var(--ink); display: inline-flex; align-items: center; }
.brand:hover { color: var(--ink); }
/* logo mark = the favicon: a white "M" whose peaks are cat ears */
.brand__dot { width: 26px; height: 26px; border-radius: 7px; background: var(--navy) url(/favicon.svg) center / cover no-repeat; flex: none; transition: box-shadow .2s; }
.brand--light, .brand--light:hover { color: #fff; }
.brand--light .brand__dot { box-shadow: 0 0 0 1px rgba(255, 255, 255, .25); }
.nav__list { list-style: none; display: flex; gap: 2px; margin: 0; padding: 4px; background: var(--surface); border-radius: 999px; box-shadow: 0 6px 20px -12px rgba(0, 0, 0, .3); }
.nav__list a { display: block; padding: 7px 14px; border-radius: 999px; color: var(--ink-2); font-size: 14px; font-weight: 600; text-decoration: none; transition: background .2s, color .2s; white-space: nowrap; }
.nav__list a:hover { background: var(--bg); color: var(--ink); }
.nav__list a[aria-current="page"], .nav__list a.is-active { background: var(--navy); color: #fff; }
.topbar .brand, .topbar__cta { box-shadow: 0 6px 20px -12px rgba(0, 0, 0, .3); }
.burger { display: none; width: 40px; height: 40px; border: 0; background: var(--surface); border-radius: 50%; cursor: pointer; position: relative; flex: none; box-shadow: 0 6px 20px -12px rgba(0, 0, 0, .3); }
.burger span { position: absolute; left: 12px; right: 12px; height: 2px; border-radius: 2px; background: var(--ink); transition: transform .25s, opacity .2s, top .25s; }
.burger span:nth-child(1) { top: 14px; } .burger span:nth-child(2) { top: 19px; } .burger span:nth-child(3) { top: 24px; }
.burger[aria-expanded="true"] span:nth-child(1) { top: 19px; transform: rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { top: 19px; transform: rotate(-45deg); }
.progress { position: fixed; left: 0; right: 0; top: 0; height: 3px; pointer-events: none; }
.progress span { display: block; height: 100%; width: 0; background: var(--navy-3); transition: width .1s linear; }

/* ---------- home: dark full-bleed first screen ---------- */
.home-hero { position: relative; isolation: isolate; overflow: hidden; min-height: min(100svh, 920px); min-height: max(640px, min(100svh, 920px)); display: grid; place-items: center; padding: 104px var(--gutter) 96px; color: #fff; background: #0b0f14; }
.home-hero__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.home-hero__bg--night { background: var(--night); overflow: hidden; }
.home-hero__bg--night .glow { position: absolute; border-radius: 50%; filter: blur(70px); }
.home-hero__bg--night .g1 { width: 60vw; height: 22vw; left: 20vw; bottom: 8%; background: radial-gradient(closest-side, rgba(233, 170, 92, .55), rgba(233, 170, 92, 0)); }
.home-hero__bg--night .g2 { width: 70vw; height: 40vw; left: -10vw; top: -14vw; background: radial-gradient(closest-side, rgba(148, 168, 190, .5), rgba(148, 168, 190, 0)); }
.home-hero__bg--night .grid-lines { position: absolute; inset: 30% 6% 0; background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .07) 0 1px, transparent 1px 120px),
    linear-gradient(180deg, rgba(255, 255, 255, .06) 0 1px, transparent 1px);
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent); mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent); }
.home-hero__shade { position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(0, 0, 0, .25) 0%, rgba(0, 0, 0, 0) 30%, rgba(0, 0, 0, .1) 60%, rgba(0, 0, 0, .55) 100%); }
.home-hero__center { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 22px; max-width: 980px; }
.glass-tag { font-size: 13px; font-weight: 600; padding: 6px 14px; border-radius: 999px; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .25); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.home-hero__title { margin: 0; font-size: clamp(40px, 5.6vw, 76px); line-height: .98; font-weight: 600; letter-spacing: -.045em; text-shadow: 0 4px 40px rgba(0, 0, 0, .25); }
.home-hero__title span { display: block; margin-top: 14px; font-size: clamp(19px, 2vw, 26px); line-height: 1.2; font-weight: 500; letter-spacing: -.02em; color: rgba(255, 255, 255, .82); }
.glass-pill { display: inline-flex; align-items: center; gap: 14px; padding: 6px 6px 6px 22px; border-radius: 999px; color: #fff; font-size: 15px; font-weight: 600; text-decoration: none; background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .28); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); transition: background .2s; }
.glass-pill:hover { color: #fff; background: rgba(255, 255, 255, .26); }
.glass-pill:hover .adot { transform: rotate(45deg); }
/* big portrait in the middle of the first screen: the site is also a business card */
.home-hero__photo { position: relative; width: clamp(230px, 21vw, 300px); aspect-ratio: 4 / 5; border-radius: 30px; padding: 6px; background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .28); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .7); margin-bottom: 4px; }
.home-hero__img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; border-radius: 24px; }
.home-hero__lead { max-width: 620px; font-size: 17px; line-height: 1.55; color: rgba(255, 255, 255, .86); }
.home-hero__lead p { margin: 0; }
.home-hero__chip { position: absolute; right: var(--gutter); bottom: 24px; display: inline-flex; align-items: center; gap: 10px; padding: 6px 6px 6px 18px; border-radius: 999px; background: #fff; color: var(--ink); text-decoration: none; font-size: 14px; font-weight: 600; transition: background .2s, color .2s; }
.home-hero__chip span { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--navy); color: #fff; transition: background .2s, color .2s; }
.home-hero__chip svg { width: 16px; height: 16px; }

/* plain hero kept for 404 / loading */
.hero { padding: calc(var(--topbar-h) + 60px) 0 60px; }
.eyebrow { display: inline-flex; font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); background: var(--surface); padding: 6px 14px; border-radius: 999px; }
.hero__name { font-size: 52px; line-height: 1.05; font-weight: 600; letter-spacing: -.04em; margin: 18px 0 12px; }
.hero__role { margin: 0 0 24px; font-size: 18px; color: var(--muted); }

/* ---------- section heading ---------- */
.b-heading { padding: 96px 0 28px; }
.b-heading h2, .sec-head h2 { margin: 0; font-size: clamp(32px, 4.2vw, 54px); line-height: 1.05; font-weight: 600; letter-spacing: -.04em; color: var(--ink); max-width: 820px; }
.case-body .b-heading { padding: 64px 0 18px; }
.case-body .b-heading .wrap { max-width: calc(var(--narrow) + 2 * var(--gutter)); }
.case-body .b-heading h2 { font-size: clamp(28px, 3.2vw, 40px); }

.sec-head { padding: 104px 0 32px; }
.sec-head__row { display: flex; justify-content: space-between; align-items: flex-start; gap: 40px; }
.sec-head__lead { margin: 6px 0 0; max-width: 300px; font-size: 14px; line-height: 1.45; color: var(--ink-2); }
.sec-head .pill { margin-top: 26px; }
.sec-head .pill:hover .adot { transform: rotate(45deg); }

/* ---------- bento tiles ---------- */
.b-bento { padding: 96px 0 0; }
.b-bento__title { margin: 0 0 28px; font-size: clamp(32px, 4.2vw, 54px); line-height: 1.05; font-weight: 600; letter-spacing: -.04em; color: var(--ink); max-width: 820px; }
.bento { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: minmax(190px, auto); gap: 10px; }
.bento__item { position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 30px; padding: 20px 22px 22px; border-radius: var(--radius); background: var(--surface); color: var(--ink); cursor: default; outline: none; transition: background .25s, color .25s, transform .25s; }
.bento__num { font-size: 14px; color: var(--faint); font-weight: 500; transition: color .25s; }
.bento__txt b { display: block; font-size: 17px; line-height: 1.25; font-weight: 600; letter-spacing: -.01em; }
.bento__txt small { display: block; margin-top: 8px; font-size: 13px; line-height: 1.4; color: var(--muted); transition: color .25s; }
.bento__item:active, .bento__item:focus-visible { background: var(--navy); color: #fff; }
.bento__item:active .bento__num, .bento__item:focus-visible .bento__num { color: rgba(255, 255, 255, .5); }
.bento__item:active small, .bento__item:focus-visible small { color: rgba(255, 255, 255, .72); }
@media (hover: hover) {
  .bento__item:hover { background: var(--navy); color: #fff; transform: translateY(-2px); }
  .bento__item:hover .bento__num { color: rgba(255, 255, 255, .5); }
  .bento__item:hover small { color: rgba(255, 255, 255, .72); }
}

/* ---------- text cards (home) ---------- */
.b-text { padding: 26px 0; }
.b-text--card { padding: 5px 0; }
.tcard { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 8fr); gap: 48px; padding: 34px 36px; border-radius: var(--radius-lg); background: var(--surface); }
.tcard--solo { display: block; }
.tcard__meta { align-self: start; position: sticky; top: calc(var(--topbar-h) + 16px); }
.tcard__num { display: block; font-size: 14px; color: var(--faint); font-weight: 500; margin-bottom: 18px; }
.tcard__meta .prose { font-size: 15px; line-height: 1.65; }
.tcard__meta .prose p:first-child strong:first-child { display: inline-block; font-size: 24px; line-height: 1.2; letter-spacing: -.02em; margin-bottom: 10px; }
.tcard__main { font-size: 16px; }
.tcard--dark { background: var(--navy); color: #fff; }
.tcard--dark .prose, .tcard--dark .prose strong, .tcard--dark .prose a { color: #fff; }
.tcard--dark .prose { color: rgba(255, 255, 255, .82); }
.tcard--dark .tcard__num { color: rgba(255, 255, 255, .45); }
.tcard--dark .prose ul > li::before { background: #fff; }
.tcard--dark .prose ol > li::before { background: #fff; color: var(--navy); }
/* home cards (experience, education, skills): navy with white text on hover; on phones — after a tap */
.page-home .tcard { transition: background .25s, color .25s, transform .25s, box-shadow .25s; -webkit-tap-highlight-color: transparent; }
.page-home .tcard.is-on { background: var(--navy); color: #fff; }
@media (hover: hover) {
  .page-home .tcard:hover { background: var(--navy); color: #fff; transform: translateY(-2px); box-shadow: var(--shadow); }
}
@media (hover: none) { .page-home .tcard { cursor: pointer; } }
.page-home .tcard.is-on .prose, .page-home .tcard.is-on .prose strong, .page-home .tcard.is-on .prose a { color: #fff; }
.page-home .tcard.is-on .prose { color: rgba(255, 255, 255, .82); }
.page-home .tcard.is-on .tcard__num { color: rgba(255, 255, 255, .45); }
.page-home .tcard.is-on .prose ul > li::before { background: #fff; }
.page-home .tcard.is-on .prose ol > li::before { background: #fff; color: var(--navy); }
@media (hover: hover) {
  .page-home .tcard:hover .prose, .page-home .tcard:hover .prose strong, .page-home .tcard:hover .prose a { color: #fff; }
  .page-home .tcard:hover .prose { color: rgba(255, 255, 255, .82); }
  .page-home .tcard:hover .tcard__num { color: rgba(255, 255, 255, .45); }
  .page-home .tcard:hover .prose ul > li::before { background: #fff; }
  .page-home .tcard:hover .prose ol > li::before { background: #fff; color: var(--navy); }
}

.prose { font-size: var(--text); line-height: 1.7; color: var(--ink-2); overflow-wrap: anywhere; }
.prose > :first-child { margin-top: 0; }
.prose > :last-child { margin-bottom: 0; }
.prose p { margin: 0 0 1em; }
.prose strong { font-weight: 700; color: var(--ink); }
.prose h3 { font-size: 22px; line-height: 1.3; margin: 1.4em 0 .6em; color: var(--ink); font-weight: 600; letter-spacing: -.015em; }
.prose ul, .prose ol { margin: 0 0 1.1em; padding-left: 0; list-style: none; }
.prose li { position: relative; padding-left: 26px; margin: 0 0 .5em; }
.prose ul > li::before { content: ''; position: absolute; left: 4px; top: .68em; width: 6px; height: 6px; border-radius: 50%; background: var(--navy); }
.prose ol { counter-reset: n; }
.prose ol > li { counter-increment: n; padding-left: 34px; }
.prose ol > li::before { content: counter(n); position: absolute; left: 0; top: .2em; width: 24px; height: 24px; border-radius: 50%; background: var(--navy); color: #fff; font-size: 12px; font-weight: 700; display: grid; place-items: center; line-height: 1; }
.prose a { font-weight: 600; color: inherit; text-decoration-color: var(--faint); }
.prose mark { background: #dbe4ef; color: inherit; padding: 0 .2em; border-radius: 4px; }

.b-note { padding: 12px 0; }
.note { max-width: 640px; text-align: center; font-size: 12px; line-height: 1.5; color: var(--muted); }
.note p { margin: 0; }
.page-home .b-divider { display: none; }
.b-divider { padding: 18px 0; }
.b-divider .wrap { max-width: calc(var(--narrow) + 2 * var(--gutter)); }
.b-divider hr { margin: 0; border: 0; height: 1px; background: var(--line); }

/* ---------- images & slider ---------- */
.b-image { margin: 0; padding: 26px 0; }
.b-image.band { padding: 40px 0; }
.b-image.band .wrap { max-width: calc(var(--container) + 2 * var(--gutter)); }
.b-image.band .zoom { background: var(--surface); padding: clamp(14px, 3vw, 40px); border-radius: var(--radius-lg); }
.zoom { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: var(--radius); }
.b-image__img { width: auto; max-width: 100%; height: auto; margin: 0 auto; border-radius: var(--radius-sm); }
.b-image figcaption, .slide__cap { margin-top: 12px; text-align: center; font-size: 14px; color: var(--muted); }

.b-slider { padding: 40px 0; }
.slider { position: relative; background: var(--surface); border-radius: var(--radius-lg); padding: clamp(14px, 3vw, 36px) clamp(14px, 3vw, 36px) 20px; }
.slider__viewport { overflow: hidden; border-radius: var(--radius-sm); touch-action: pan-y; }
.slider__track { list-style: none; margin: 0; padding: 0; display: flex; transition: transform .45s cubic-bezier(.22, .8, .24, 1); will-change: transform; }
.slide { flex: 0 0 100%; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.slide .zoom { display: flex; justify-content: center; }
.slide__img { max-height: 560px; width: auto; max-width: 100%; height: auto; object-fit: contain; border-radius: var(--radius-sm); }
.slider__nav { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.slider__count { margin-right: auto; font-size: 13px; font-weight: 600; color: var(--muted); }
.slider__arrow { width: 44px; height: 44px; border-radius: 50%; border: 0; background: #a3a8ae; color: #fff; display: grid; place-items: center; cursor: pointer; transition: background .2s, transform .15s; }
.slider__arrow:hover { transform: scale(1.05); }
.slider__arrow.next { background: var(--navy); }
.slider__arrow.prev:hover { background: var(--ink-2); }
.slider__arrow.next:hover { background: var(--navy-2); }
.slider__arrow svg { width: 20px; height: 20px; }
.slider__dots { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin-top: -30px; padding: 0 140px 12px 60px; pointer-events: none; }
.slider__dots .dot { pointer-events: auto; }
.dot { width: 7px; height: 7px; padding: 0; border: 0; border-radius: 999px; background: #cfd3d8; cursor: pointer; transition: width .25s, background .25s; }
.dot.is-active { width: 22px; background: var(--navy); }

/* ---------- case cards: mosaic ---------- */
.b-cases { padding: 10px 0 40px; }
.b-cases__title { font-size: clamp(28px, 3.4vw, 44px); line-height: 1.1; letter-spacing: -.04em; font-weight: 600; color: var(--ink); margin: 0 0 28px; }
.page-case .b-cases { padding-top: 70px; }
.cards-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .82fr) minmax(0, 1.18fr); grid-auto-rows: 250px; grid-auto-flow: row dense; gap: 10px; }
.cards-grid > :nth-child(4n + 1) { grid-column: 1; grid-row: span 2; }
.cards-grid > :nth-child(4n + 2), .cards-grid > :nth-child(4n + 3) { grid-column: 2; }
.cards-grid > :nth-child(4n + 4) { grid-column: 3; grid-row: span 2; }
/* cards left over after the last full group of four: always close the grid flush */
.cards-grid > .cc-r1-1 { grid-column: 1 / -1; grid-row: span 2; }
.cards-grid > .cc-r2-1 { grid-column: 1 / 3; grid-row: span 2; }
.cards-grid > .cc-r2-2 { grid-column: 3; grid-row: span 2; }
.cards-grid > .cc-r3-1 { grid-column: 1; grid-row: span 2; }
.cards-grid > .cc-r3-2 { grid-column: 2; grid-row: span 2; }
.cards-grid > .cc-r3-3 { grid-column: 3; grid-row: span 2; }
.cc-r1-1 .case-card__title, .cc-r2-1 .case-card__title { font-size: 26px; }
.case-card { position: relative; display: block; overflow: hidden; border-radius: var(--radius); background: var(--navy); color: #fff; text-decoration: none; isolation: isolate; }
.case-card::after { content: ''; position: absolute; inset: 0; z-index: 0; background: linear-gradient(180deg, rgba(0, 0, 0, 0) 40%, rgba(6, 14, 24, .78) 100%); }
.case-card:hover { color: #fff; }
.case-card__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
.case-card:hover .case-card__img { transform: scale(1.05); }
.case-card__arrow { position: absolute; top: 14px; right: 14px; z-index: 1; width: 40px; height: 40px; background: rgba(255, 255, 255, .22); border: 1px solid rgba(255, 255, 255, .3); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.case-card:hover .case-card__arrow { background: #fff; color: var(--ink); transform: rotate(45deg); }
.case-card__body { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; padding: 18px 20px 18px; display: flex; flex-direction: column; gap: 4px; }
.case-card__title { font-size: 20px; line-height: 1.2; font-weight: 600; letter-spacing: -.02em; text-shadow: 0 2px 14px rgba(0, 0, 0, .3); }
.case-card__more { font-size: 12px; color: rgba(255, 255, 255, .72); }

/* ---------- contacts bento ---------- */
.b-contacts { padding: 100px 0 90px; }
.contacts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: minmax(190px, auto); gap: 10px; }
.contacts__main { grid-column: span 2; grid-row: span 2; display: flex; flex-direction: column; padding: 34px 36px; border-radius: var(--radius-lg); background: var(--navy); color: #fff; position: relative; overflow: hidden; }
.contacts__main::before { content: ''; position: absolute; right: -120px; top: -120px; width: 360px; height: 360px; border-radius: 50%; background: radial-gradient(closest-side, rgba(120, 160, 210, .35), rgba(120, 160, 210, 0)); }
.contacts__title { position: relative; margin: 0; font-size: clamp(34px, 4vw, 54px); line-height: 1; font-weight: 600; letter-spacing: -.04em; }
.contacts__lead { position: relative; margin: 16px 0 0; max-width: 360px; font-size: 15px; line-height: 1.5; color: rgba(255, 255, 255, .7); }
.contacts__person { position: relative; margin-top: auto; padding-top: 30px; display: flex; align-items: center; gap: 14px; }
.contacts__avatar { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; border: 2px solid rgba(255, 255, 255, .3); }
.contacts__name { font-size: 18px; font-weight: 600; }
.contacts__role { font-size: 14px; color: rgba(255, 255, 255, .62); }
.ctile { position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 20px; padding: 20px 22px; border-radius: var(--radius); background: var(--surface); color: var(--ink); text-decoration: none; transition: transform .2s, box-shadow .2s; }
.ctile:hover { color: var(--ink); transform: translateY(-2px); box-shadow: var(--shadow); }
.ctile__icon { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--bg); color: var(--navy); }
.ctile__icon svg { width: 22px; height: 22px; }
.ctile__arrow { position: absolute; top: 20px; right: 20px; }
.ctile:hover .ctile__arrow { transform: rotate(45deg); background: var(--navy); }
.ctile__txt { font-size: 17px; font-weight: 600; letter-spacing: -.01em; overflow-wrap: anywhere; }
.ctile__txt small { display: block; font-size: 13px; font-weight: 500; color: var(--muted); margin-bottom: 2px; }

/* ---------- case page ---------- */
.case-hero { padding: calc(var(--topbar-h) + 10px) 0 0; }
.case-hero__cover { position: relative; overflow: hidden; height: min(62vh, 620px); min-height: 320px; border-radius: var(--radius-lg); background: var(--night); }
.case-hero__img { width: 100%; height: 100%; object-fit: cover; }
.case-hero__shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, .15) 0%, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, .45) 100%); }
.case-hero__author { position: absolute; left: 16px; bottom: 16px; display: flex; align-items: center; gap: 12px; padding: 8px 18px 8px 8px; border-radius: 999px; }
.case-hero__avatar { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; }
.case-hero__name { font-size: 15px; font-weight: 700; line-height: 1.2; }
.case-hero__role { font-size: 13px; color: rgba(255, 255, 255, .8); }
.case-title { padding: 44px 0 18px; }
.case-title .wrap { max-width: calc(var(--narrow) + 2 * var(--gutter)); }
.case-title__tag { display: inline-block; font-size: 13px; font-weight: 600; color: var(--muted); padding: 5px 12px; border-radius: 999px; background: var(--surface); }
.case-title h1 { margin: 16px 0 0; font-size: clamp(32px, 4.6vw, 58px); line-height: 1.04; font-weight: 600; letter-spacing: -.045em; }
.toc { position: sticky; top: calc(var(--topbar-h) - 4px); z-index: 20; padding: 8px 0; }
.toc .wrap { max-width: calc(var(--narrow) + 2 * var(--gutter)); }
.toc .wrap { display: flex; gap: 4px; align-items: center; overflow-x: auto; scrollbar-width: none; }
.toc .wrap::-webkit-scrollbar { display: none; }
.toc__label { display: none; }
.toc a { flex: none; font-size: 13px; font-weight: 600; text-decoration: none; padding: 7px 14px; border-radius: 999px; background: var(--surface); color: var(--ink-2); white-space: nowrap; box-shadow: 0 6px 20px -14px rgba(0, 0, 0, .35); transition: background .2s, color .2s; }
.toc a:hover { color: var(--ink); }
.toc a.is-active { background: var(--navy); color: #fff; }
.case-body .b-text .prose { font-size: 17px; }

/* ---------- footer ---------- */
.footer { padding: 0 0 24px; }
.footer__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 22px 22px 28px; border-radius: var(--radius-lg); background: var(--ink); color: rgba(255, 255, 255, .6); font-size: 14px; }
.footer__copy { flex: 1; text-align: center; }
.to-top { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: var(--ink); flex: none; }
.to-top:hover { background: var(--bg); color: var(--ink); }
.to-top svg { width: 20px; height: 20px; }

/* ---------- lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(8, 12, 18, .9); display: none; align-items: center; justify-content: center; padding: 24px; cursor: zoom-out; }
.lightbox.is-open { display: flex; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 12px; background: #fff; }
.lightbox__close { position: absolute; top: 14px; right: 14px; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .15); color: #fff; font-size: 26px; line-height: 1; cursor: pointer; }

.preview-flag { position: fixed; left: 12px; bottom: 12px; z-index: 60; background: var(--navy); color: #fff; padding: 10px 14px; border-radius: 12px; font-size: 13px; font-weight: 600; box-shadow: var(--shadow); }
.preview-flag a { color: #c9d6e6; margin-left: 8px; }

/* ---------- colourful contact icons (brand colours, softened by rounded squares) ---------- */
.ico--tg, .ico--wa, .ico--phone, .ico--mail { color: #fff !important; }
.ico--tg { background: #2aabee !important; }
.ico--wa { background: #25d366 !important; }
.ico--phone { background: #ff9f0a !important; }
.ico--mail { background: #5e5ce6 !important; }
.ctile__icon svg { width: 24px; height: 24px; }

/* ---------- one interaction rule for everything clickable: navy fill + white text
   (on hover with a mouse, while pressed on touch screens) ---------- */
.pill, .glass-pill, .home-hero__chip, .nav__list a, .toc a, .btn, .to-top, .burger, .ctile, .slider__arrow { -webkit-tap-highlight-color: transparent; }
.pill:active, .pill--dark:active, .glass-pill:active, .home-hero__chip:active, .nav__list a:active, .toc a:active, .btn:active, .to-top:active, .ctile:active, .slider__arrow.prev:active { background: var(--navy); color: #fff; border-color: var(--navy); }
.burger:active { background: var(--navy); }
.burger:active span { background: #fff; }
.ctile:active small, .ctile:active .ctile__txt { color: #fff; }
.ctile:active small { color: rgba(255, 255, 255, .7); }
.home-hero__chip:active span { background: #fff; color: var(--navy); }
@media (hover: hover) {
  .pill:hover, .pill--dark:hover, .glass-pill:hover, .home-hero__chip:hover, .nav__list a:hover, .toc a:hover, .btn:hover, .to-top:hover, .ctile:hover, .slider__arrow.prev:hover { background: var(--navy); color: #fff; border-color: var(--navy); }
  .burger:hover { background: var(--navy); }
  .burger:hover span { background: #fff; }
  .ctile:hover .ctile__txt { color: #fff; }
  .ctile:hover small { color: rgba(255, 255, 255, .7); }
  .ctile:hover .ctile__arrow { background: #fff; color: var(--navy); }
  .home-hero__chip:hover span { background: #fff; color: var(--navy); }
  .topbar .brand:hover .brand__dot { box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .7); }
}

/* ---------- ≤1100px: menu collapses into the burger ---------- */
@media (max-width: 1100px) {
  .burger { display: block; }
  .nav { position: absolute; left: var(--gutter); right: var(--gutter); top: calc(100% + 8px); }
  .nav__list { display: none; flex-direction: column; gap: 2px; padding: 8px; border-radius: var(--radius); box-shadow: 0 24px 50px -20px rgba(0, 0, 0, .35); }
  .nav.is-open .nav__list { display: flex; animation: drop .22s ease-out; }
  .nav__list a { font-size: 16px; padding: 13px 16px; border-radius: 14px; }
  .topbar__inner { position: relative; }
}
@keyframes drop { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* ---------- ≤980px: tablet ---------- */
@media (max-width: 980px) {
  :root { --gutter: 20px; }
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: minmax(170px, auto); }
  .bento__gap, .bento__label { display: none; }
  .tcard { grid-template-columns: 1fr; gap: 20px; padding: 28px; }
  .tcard__meta { position: static; }
  .cards-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 280px; }
  .cards-grid > * { grid-column: auto !important; grid-row: auto !important; }
  .cards-grid > :nth-child(3n + 1), .cards-grid > .cc-t-wide { grid-column: span 2 !important; }
  .contacts { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: minmax(160px, auto); }
  .contacts__main { min-height: 340px; }
  .sec-head__row { flex-direction: column; gap: 14px; }
}

/* ---------- ≤640px: phone ---------- */
@media (max-width: 640px) {
  :root { --text: 16px; --gutter: 16px; --topbar-h: 66px; }
  .topbar__inner { padding-top: 12px; }
  .topbar__cta { padding-left: 14px; }
  .topbar__cta { font-size: 0; gap: 0; padding: 0 5px; }
  .home-hero { padding: 92px var(--gutter) 96px; min-height: max(620px, 100svh); }
  .home-hero__center { gap: 16px; }
  .home-hero__photo { width: min(64vw, 250px); border-radius: 26px; padding: 5px; }
  .home-hero__img { border-radius: 21px; }
  .home-hero__lead { font-size: 15px; }
  .home-hero__chip { right: 50%; transform: translateX(50%); bottom: 22px; }
  .b-heading, .sec-head, .b-bento { padding-top: 64px; }
  .bento { grid-template-columns: 1fr 1fr; grid-auto-rows: minmax(150px, auto); gap: 8px; }
  .bento__item { padding: 16px; gap: 18px; }
  .bento__txt b { font-size: 15px; }
  .bento__txt small { font-size: 12px; }
  .tcard { padding: 22px 20px; border-radius: var(--radius); }
  .tcard__meta .prose p:first-child strong:first-child { font-size: 21px; }
  .tcard__main { font-size: 15px; }
  .cards-grid { grid-template-columns: 1fr; grid-auto-rows: 280px; }
  .cards-grid > *, .cards-grid > :nth-child(3n + 1), .cards-grid > .cc-t-wide { grid-column: auto !important; }
  .contacts { grid-template-columns: 1fr; }
  .contacts__main { grid-column: auto; grid-row: auto; padding: 28px 24px; min-height: 0; }
  .ctile { min-height: 150px; }
  .case-hero__cover { height: 46vh; min-height: 240px; border-radius: var(--radius); }
  .case-hero__author { left: 10px; bottom: 10px; right: 10px; }
  .slider__dots { padding: 0 110px 12px 50px; }
  .slider__arrow { width: 40px; height: 40px; }
  .footer__inner { flex-wrap: wrap; padding: 18px; }
  .footer__copy { order: 3; flex-basis: 100%; text-align: left; font-size: 13px; }
  .hero__name { font-size: 36px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
