@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500&family=Instrument+Serif:ital@0;1&family=Lora:ital@0;1&family=Manrope:wght@400..800&display=swap');

:root {
  color-scheme: light;
  --paper: #f4f1e9;
  --ink: #222222;
  --blue: #2447c5;
  --aqua: #8edbd7;
  --stone: #a59d91;
  --line: #c7c0b5;
  --muted: #51504b;
  --panel: #faf8f2;
  --sans: Manrope, system-ui, sans-serif;
  --serif: 'Instrument Serif', Georgia, serif;
  --mono: 'IBM Plex Mono', monospace;
  --section: clamp(3.75rem, 8vw, 8rem);
}
:lang(ru) { --serif: Lora, Georgia, serif; }
* { box-sizing: border-box; }
html { scroll-padding-top: 7rem; scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 500 1rem/1.65 var(--sans); }
h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3 { line-height: 1.05; letter-spacing: -.055em; text-wrap: balance; }
h2 { font-size: clamp(2.85rem, 6vw, 6.4rem); font-weight: 800; }
h3 { font-size: clamp(1.5rem, 3vw, 2.65rem); font-weight: 800; }
a { color: inherit; text-underline-offset: .23em; }
a:hover { text-decoration-thickness: 2px; }
button, input { font: inherit; }
button { cursor: pointer; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 4px; }
.wrap { width: min(1320px, calc(100% - clamp(2rem, 8vw, 7rem))); margin-inline: auto; }
.skip { position: fixed; z-index: 5; left: 1rem; top: .5rem; padding: .65rem; background: var(--ink); color: white; transform: translateY(-150%); }
.skip:focus { transform: none; }
.visually-hidden { position: absolute; inline-size: 1px; block-size: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

.site-header { position: sticky; top: 0; z-index: 3; background: var(--paper); border-bottom: 1px solid var(--line); }
.top { display: flex; align-items: center; justify-content: space-between; gap: 1.3rem; min-height: 70px; }
.brand { font-weight: 800; font-size: 1.07rem; letter-spacing: -.045em; text-decoration: none; white-space: nowrap; }
.top nav, .header-tools, .languages { display: flex; align-items: center; gap: clamp(.65rem, 1.6vw, 1.5rem); }
.top nav a, .languages a { font-size: .875rem; font-weight: 750; text-decoration: none; white-space: nowrap; }
.top nav a:hover, .languages a:hover { color: var(--blue); text-decoration: underline; }
.languages { gap: .45rem; }
.languages a { display: grid; place-items: center; min-width: 29px; min-height: 32px; }
.languages [aria-current] { box-shadow: inset 0 -2px var(--blue); color: var(--blue); }
.search-button { display: inline-flex; align-items: center; gap: .55rem; padding: .4rem .55rem; border: 1px solid var(--line); color: var(--ink); background: transparent; white-space: nowrap; }
.search-button:hover { border-color: var(--blue); color: var(--blue); }
.search-button kbd { font: 500 .76rem var(--mono); }
.search-icon { position: relative; width: 11px; height: 11px; margin-right: 2px; border: 1.4px solid currentColor; border-radius: 50%; }
.search-icon::after { content: ''; position: absolute; width: 5px; height: 1.4px; background: currentColor; inset: 8px 0 auto 8px; rotate: 45deg; transform-origin: left; }

.hero { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); border-inline: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.hero-copy { padding: clamp(1.5rem, 4.2vw, 4.5rem); align-self: center; }
.eyebrow, .case-meta, .cost-chart figcaption { font: 500 .82rem/1.45 var(--mono); letter-spacing: .025em; }
.eyebrow { color: var(--blue); text-transform: uppercase; margin-bottom: .9rem; }
.hero h1 { font-size: clamp(3.45rem, 8.6vw, 8.7rem); font-weight: 800; letter-spacing: -.087em; line-height: .84; margin-bottom: .27em; }
.hero h1 span { display: block; }
.hero .statement { font: italic 400 clamp(1.85rem, 3.45vw, 3.9rem)/1.01 var(--serif); letter-spacing: -.026em; color: var(--blue); max-width: 20ch; text-wrap: balance; }
html[lang=ru] .hero .statement { font-size: clamp(1.42rem, 2.85vw, 3rem); line-height: 1.13; }
.hero .lead { max-width: 51ch; margin-top: 1.05rem; color: var(--muted); font-size: clamp(.99rem, 1.25vw, 1.14rem); }
.portrait { min-width: 0; min-height: 100%; border-left: 1px solid var(--line); position: relative; background: #d1ccc1; }
.portrait img { position: absolute; width: 100%; height: 100%; object-fit: cover; object-position: 49% 37%; filter: grayscale(1); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem 1rem; margin-top: 1.45rem; }
.button, .quiet { display: inline-flex; justify-content: center; align-items: center; min-height: 44px; padding: .55rem .8rem; font-size: .9rem; font-weight: 800; text-decoration: none; transition: color .18s ease, background .18s ease, border-color .18s ease; }
.button { background: var(--blue); border: 1px solid var(--blue); color: #fff; }
.button:hover { background: var(--ink); border-color: var(--ink); }
.quiet { padding-inline: .1rem; border-bottom: 1px solid currentColor; }
.quiet:hover { color: var(--blue); }
.engagement { display: grid; grid-template-columns: 1fr 1fr; border-inline: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: var(--section); }
.engagement article { min-width: 0; padding: clamp(1.25rem, 3.2vw, 3rem); transition: background .25s ease, box-shadow .25s ease; overflow-wrap: break-word; }
.engagement article + article { border-left: 1px solid var(--line); }
.engagement article:target, .engagement article[data-selected] { background: var(--panel); box-shadow: inset 0 3px var(--blue); }
.engagement h2 { font-size: clamp(1.6rem, 3.05vw, 3.15rem); margin-bottom: .7rem; }
.engagement p, .section-head p, .skill p, .market-grid p, .about-text p, .reflection p, .personal-section p, .faq p { color: var(--muted); }
.engagement p { max-width: 62ch; }
.case-links { display: flex; flex-wrap: wrap; gap: .4rem 1rem; margin-top: .85rem; }
.case-links a, .about-text a, .source { color: var(--blue); font-weight: 750; font-size: .9rem; }

.block { padding-block: var(--section); }
.section-head { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); align-items: end; gap: 1.35rem; margin-bottom: clamp(1.5rem, 4vw, 3.2rem); }
.section-head p { max-width: 43ch; padding-left: 1rem; border-left: 1px solid var(--blue); }
.skills-section { border-block: 1px solid var(--line); background: var(--panel); }
.skill-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.skill { min-width: 0; padding: clamp(1rem, 2.65vw, 2rem); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.skill h3 { font-size: clamp(1.45rem, 2.65vw, 2.3rem); margin-bottom: .75rem; }
.skill .question { color: var(--ink); font-weight: 800; margin-bottom: .45rem; }
.skill .deliverable { border-top: 1px solid var(--line); margin-top: .85rem; padding-top: .65rem; }
.skill .deliverable strong { color: var(--ink); }
.skill:target { box-shadow: inset 0 3px var(--blue); }

#markets { display: grid; grid-template-columns: minmax(0,.75fr) minmax(0,1.25fr); gap: clamp(1.5rem, 5vw, 5rem); }
#markets .section-head { display: block; }
#markets h2 { font-family: var(--serif); font-weight: 400; font-style: italic; letter-spacing: -.025em; color: var(--blue); }
#markets .section-head p { border: 0; padding: 0; margin-top: 1rem; }
.market-grid { list-style: none; padding: 0; margin: 0; border-bottom: 1px solid var(--line); }
.market-grid li { display: grid; grid-template-columns: minmax(0,.75fr) minmax(0,1.25fr); gap: .75rem; padding: .85rem 0; border-top: 1px solid var(--line); }
.market-grid h3 { font-size: clamp(1.16rem, 2.15vw, 1.7rem); margin-top: .13rem; }
.market-grid h3 a { color: var(--blue); }
.market-grid p { font-size: .94rem; }

.career-section { padding-block: clamp(2.5rem, 5vw, 5.5rem); background: var(--aqua); }
.about-grid, .personal-section, .faq { display: grid; grid-template-columns: minmax(0,.75fr) minmax(0,1.25fr); gap: clamp(1.4rem, 5vw, 5rem); }
.about-text p + p, .reflection p + p, .personal-section p + p, .faq p { margin-top: .65rem; }
.career-section .about-text p { color: #253432; }
.career-section .about-text a { color: #12224f; }
.filter-row { display: flex; flex-wrap: wrap; gap: .3rem 1.25rem; margin-bottom: 1rem; border-bottom: 1px solid var(--line); }
.filter-row button { display: inline-flex; min-height: 44px; align-items: center; background: none; padding: .35rem .12rem; border: 0; border-bottom: 2px solid transparent; color: var(--muted); font-weight: 750; font-size: .9rem; }
.filter-row button[aria-pressed=true] { color: var(--blue); border-bottom-color: var(--blue); }
.filter-row button:hover { color: var(--blue); }
.case-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: .75rem; }
.case { grid-column: span 6; min-width: 0; display: flex; flex-direction: column; padding: clamp(1.15rem, 2.8vw, 2.5rem); background: var(--panel); border: 1px solid var(--line); }
.case:target { outline: 2px solid var(--blue); outline-offset: -2px; }
.case#zila { grid-column: span 7; background: var(--blue); border-color: var(--blue); color: white; }
.case#zila:target { outline-color: var(--aqua); }
.case#a3-medical { grid-column: span 5; }
.case-top { display: flex; gap: 1rem; align-items: flex-start; justify-content: space-between; margin-bottom: 1rem; }
.case-name { font-weight: 800; margin-bottom: .2rem; }
.case-meta { color: var(--muted); }
.case h3 { margin-bottom: .65rem; }
.case p { color: var(--muted); }
.case .outcome { color: var(--ink); margin-top: .6rem; }
.case .metric-big { font: 400 clamp(1.7rem, 3.6vw, 4rem)/.9 var(--serif); letter-spacing: -.04em; color: var(--blue); white-space: nowrap; }
.case details { margin-top: auto; padding-top: 1.15rem; }
.case summary, .faq summary { cursor: pointer; color: var(--blue); font-weight: 800; }
.case details p { margin-block: .5rem; }
#zila :is(.case-meta, p, .outcome, summary) { color: #f4f3fd; }
#zila .metric-big { color: var(--aqua); }
#zila :focus-visible, .fit :focus-visible { outline-color: var(--aqua); }
.cost-chart { border-top: 1px solid #bccef3; margin-top: 1.15rem; padding-top: .8rem; }
.cost-chart figcaption { margin-bottom: .65rem; }
.chart-points { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; max-width: 25rem; }
.chart-point { display: grid; grid-template-rows: auto 72px auto; align-items: end; gap: .32rem; padding: .3rem .5rem; border: 1px solid transparent; text-align: left; background: transparent; color: white; }
.chart-point:hover, .chart-point[aria-pressed=true] { border-color: var(--aqua); }
.chart-point b { font-size: 1.42rem; line-height: 1; }
.chart-point span:last-child { font-size: .8rem; }
.chart-bar { align-self: end; height: var(--value); background: var(--aqua); transform-origin: bottom; }
.cost-chart[data-reveal] .chart-bar { animation: chart-in .65s ease both; }
@keyframes chart-in { from { transform: scaleY(.12); } to { transform: scaleY(1); } }
.cost-chart .chart-readout { font-size: .8rem; min-height: 1.4em; margin-top: .5rem; }

.notes-section { background: var(--panel); border-block: 1px solid var(--line); }
.reflection-grid { display: grid; grid-template-columns: minmax(0,1.18fr) minmax(0,.82fr); gap: clamp(1rem, 3vw, 3rem); margin-top: 2rem; }
.reflection { display: flow-root; border-top: 1px solid var(--line); padding-top: 1.25rem; }
.reflection h3, .personal-section h3 { margin-bottom: .7rem; }
.reflection-photo { float: right; width: clamp(115px,34%,210px); height: auto; margin: 0 0 .65rem 1rem; filter: grayscale(.82); }
.reflection .case-links { clear: both; }
.personal-section { align-items: center; }
.personal-section h2 { font-family: var(--serif); font-weight: 400; font-style: italic; color: var(--blue); margin-bottom: 1rem; }
.personal-photos { display: grid; grid-template-columns: repeat(2,minmax(0, 1fr)); gap: .6rem; }
.personal-photos img { width: 100%; height: auto; aspect-ratio: 2/3; object-fit: cover; filter: grayscale(1); }
.personal-photos .run-photo img { object-position: 50% 58%; }
.personal-photos figcaption { color: var(--muted); font-size: .82rem; margin-top: .25rem; }
.faq { border-top: 1px solid var(--line); padding-top: 1.75rem; margin-bottom: var(--section); }
.faq h2 { font-size: clamp(2rem, 4vw, 4rem); }
.faq details { border-bottom: 1px solid var(--line); padding: .65rem 0; }
.contact { padding-bottom: clamp(2.5rem, 6vw, 6rem); }
.fit { padding: clamp(1.4rem, 5vw, 5.2rem); background: var(--blue); color: #fff; }
.fit h2 { font: italic 400 clamp(2.8rem, 7vw, 7rem)/.98 var(--serif); letter-spacing: -.032em; max-width: 19ch; }
.fit p { max-width: 63ch; margin-top: 1rem; }
.fit .quiet:hover { color: var(--aqua); }
.foot { display: flex; justify-content: space-between; gap: .75rem; border-top: 1px solid var(--line); padding-block: .9rem 1.75rem; color: var(--muted); font-size: .875rem; }

.search-dialog { width: min(100% - 2rem, 39rem); max-height: min(35rem, 84vh); padding: 1.25rem; border: 1px solid var(--ink); background: var(--paper); color: var(--ink); }
.search-dialog::backdrop { background: #2222228c; }
.search-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .8rem; }
.search-dialog h2 { font-size: 1.45rem; }
.search-dialog form button { padding: .1rem .7rem; background: transparent; border: 1px solid var(--line); font-size: 1.35rem; color: var(--ink); }
.search-dialog input { width: 100%; padding: .68rem; background: var(--panel); border: 1px solid var(--line); color: var(--ink); }
.search-results { list-style: none; padding: 0; margin: .8rem 0 0; }
.search-results a { display: block; padding: .55rem .35rem; border-bottom: 1px solid var(--line); text-decoration: none; }
.search-results a:hover { background: var(--panel); color: var(--blue); }
.search-empty { margin-top: .75rem; color: var(--muted); }

@media(max-width:1050px) {
  .top { gap: .85rem; }
  .top nav { gap: .7rem; }
  .hero h1 { font-size: clamp(3.45rem,9.35vw,7.1rem); }
}
@media(max-width:890px) {
  .top { display: grid; grid-template-columns: 1fr auto; padding-block: .55rem .4rem; gap: .18rem .8rem; }
  .top nav { grid-column: 1/-1; grid-row: 2; flex-wrap: wrap; gap: .12rem 1rem; }
  .top nav a { display: inline-flex; align-items: center; min-height: 35px; }
  .header-tools { grid-column: 2; grid-row: 1; }
  .skill-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media(max-width:640px) {
  html { scroll-padding-top: 8rem; }
  .hero, .engagement, .section-head, #markets, .about-grid, .personal-section, .faq, .reflection-grid { grid-template-columns: 1fr; }
  .hero-copy { padding: 1.3rem 1rem 1.6rem; }
  .hero h1 { font-size: clamp(3.15rem,12.4vw,5.7rem); }
  .hero .lead { margin-top: .85rem; }
  .portrait { border-left: 0; border-top: 1px solid var(--line); min-height: 0; aspect-ratio: 1.2; }
  .portrait img { object-position: 50% 37%; }
  .engagement article + article { border-left: 0; border-top: 1px solid var(--line); }
  .top nav { column-gap: .8rem; }
  .top nav a { font-size: .81rem; }
  .skill-grid { grid-template-columns: 1fr; }
  .market-grid li { grid-template-columns: 1fr; gap: .35rem; }
  #markets .section-head { margin-bottom: 0; }
  .case-grid { grid-template-columns: 1fr; }
  .case, .case#zila, .case#a3-medical { grid-column: 1; }
  .faq { gap: .75rem; }
  .foot { flex-wrap: wrap; }
}
@media(max-width:380px) {
  .top nav { column-gap: .55rem; }
  .search-button kbd { display: none; }
  .hero-copy { padding-inline: .8rem; }
}
@media(prefers-reduced-motion:reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
