/* Layout: cinematic editorial. Full-bleed Ken Burns hero, cream "chapters" with italic serif titles,
   dark cinematic bands for the agent and contact. Single deliberate look (cream + night), not theme-switched. */
@font-face { font-family: "Instrument Serif"; src: url("fonts/instrument-serif-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("fonts/instrument-serif-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Manrope"; src: url("fonts/manrope-var.woff2") format("woff2"); font-weight: 200 800; font-style: normal; font-display: swap; }

:root {
  --cream: #F3EDE2;
  --paper: #FBF8F2;
  --ink: #1A1610;
  --ink-2: #4B4337;
  --muted: #847968;
  --line: #DDD3C3;
  --gold: #A9822F;
  --gold-soft: #D8BC80;
  --night: #0F0D0A;
  --night-2: #1B1712;
  --night-line: #332C22;
  --on-night: #EFE7D8;
  --on-night-2: #B5AA97;
  --ok: #3F7D58;

  --f-display: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --f-body: "Manrope", "Segoe UI", system-ui, -apple-system, sans-serif;

  --s-hero: clamp(2.6rem, 7.2vw, 6.4rem);
  --s-h2: clamp(2.4rem, 5vw, 4.2rem);
  --s-h3: clamp(1.6rem, 2.4vw, 2.1rem);
  --s-lead: clamp(1.15rem, 1.6vw, 1.4rem);
  --gutter: max(20px, env(safe-area-inset-left, 0px));
  --ease: cubic-bezier(.2, .7, .1, 1);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--cream); color: var(--ink);
  font: 400 1rem/1.65 var(--f-body); -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 2px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--paper); padding: 8px 14px; z-index: 100; }
.skip:focus { left: 8px; }
.wrap {
  max-width: 1240px; margin: 0 auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}
.eyebrow { font: 600 .72rem/1.2 var(--f-body); letter-spacing: .22em; text-transform: uppercase; color: var(--gold); }
h1, h2, h3, h4 { font-family: var(--f-display); font-weight: 400; margin: 0; text-wrap: balance; letter-spacing: -.01em; }
em, .it { font-style: italic; }

/* ---------- reveal on scroll (only hides once JS is running) ---------- */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
.js .reveal[data-d="1"] { transition-delay: .08s; }
.js .reveal[data-d="2"] { transition-delay: .16s; }
.js .reveal[data-d="3"] { transition-delay: .24s; }
.js .reveal[data-d="4"] { transition-delay: .32s; }

/* ---------- header ---------- */
.hdr {
  position: fixed; inset: 0 0 auto; z-index: 40;
  padding-top: env(safe-area-inset-top, 0px);
  transition: background .4s, border-color .4s, color .4s;
  color: var(--on-night); border-bottom: 1px solid transparent;
}
.hdr.solid { background: color-mix(in srgb, var(--cream) 92%, transparent); backdrop-filter: blur(10px); color: var(--ink); border-color: var(--line); }
.hdr .wrap { display: flex; align-items: center; gap: 24px; height: 72px; }
.brand { font: italic 400 1.5rem/1 var(--f-display); text-decoration: none; white-space: nowrap; }
.brand b { font-style: normal; color: var(--gold-soft); font-weight: 400; }
.hdr.solid .brand b { color: var(--gold); }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a {
  position: relative; text-decoration: none; font-size: .86rem; font-weight: 600; letter-spacing: .04em; padding: 8px 12px;
}
.nav a::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 3px; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease); }
.nav a:hover::after, .nav a[aria-current="true"]::after { transform: scaleX(1); }
.tools { display: flex; align-items: center; gap: 10px; }
.lang { display: inline-flex; border: 1px solid currentColor; border-radius: 99px; padding: 2px; opacity: .9; }
.lang button { border: 0; background: none; cursor: pointer; font-size: .72rem; font-weight: 700; letter-spacing: .1em; padding: 5px 9px; border-radius: 99px; }
.lang button[aria-pressed="true"] { background: currentColor; }
.lang button[aria-pressed="true"] span { color: var(--night); }
.hdr.solid .lang button[aria-pressed="true"] span { color: var(--cream); }
.btn-cv {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none; white-space: nowrap;
  font-size: .8rem; font-weight: 700; letter-spacing: .06em; padding: 9px 16px; border-radius: 99px;
  background: var(--gold-soft); color: var(--night); transition: background .3s;
}
.btn-cv:hover { background: #E7CF9C; }
.hdr.solid .btn-cv { background: var(--ink); color: var(--paper); }
.btn-cv svg { width: 14px; height: 14px; }
.burger { display: none; background: none; border: 0; cursor: pointer; width: 44px; height: 44px; margin-right: -10px; }
.burger span { display: block; width: 22px; height: 1.5px; background: currentColor; margin: 6px auto; transition: transform .3s; }

/* full-screen mobile menu */
.menu {
  position: fixed; inset: 0; z-index: 60; background: var(--night); color: var(--on-night);
  display: flex; flex-direction: column; justify-content: center; gap: 8px;
  padding: calc(80px + env(safe-area-inset-top, 0px)) max(28px, env(safe-area-inset-right, 0px)) calc(32px + env(safe-area-inset-bottom, 0px)) max(28px, env(safe-area-inset-left, 0px));
  opacity: 0; visibility: hidden; transition: opacity .4s, visibility .4s;
}
.menu.open { opacity: 1; visibility: visible; }
.menu a.big { font: italic 400 clamp(2.6rem, 11vw, 3.6rem)/1.1 var(--f-display); text-decoration: none; transform: translateY(20px); opacity: 0; transition: transform .6s var(--ease), opacity .6s; }
.menu.open a.big { transform: none; opacity: 1; }
.menu.open a.big:nth-child(2) { transition-delay: .06s; } .menu.open a.big:nth-child(3) { transition-delay: .12s; }
.menu.open a.big:nth-child(4) { transition-delay: .18s; } .menu.open a.big:nth-child(5) { transition-delay: .24s; }
.menu .menu-foot { margin-top: 28px; display: flex; gap: 12px; flex-wrap: wrap; align-items: center; color: var(--on-night); }
.menu-close { position: absolute; top: calc(14px + env(safe-area-inset-top, 0px)); right: max(14px, env(safe-area-inset-right, 0px)); width: 48px; height: 48px; border: 0; background: none; cursor: pointer; font-size: 1.8rem; color: var(--on-night); }

/* ---------- hero ---------- */
.hero { position: relative; height: 100svh; min-height: 560px; overflow: hidden; background: var(--night); color: var(--on-night); }
.slides, .slide { position: absolute; inset: 0; }
.slide { opacity: 0; transition: opacity 1.6s ease; }
.slide.on { opacity: 1; }
.slide img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.02); }
.slide.on img { animation: kenburns 9s ease-out forwards; }
.slide:nth-child(2n).on img { animation-name: kenburns-b; }
@keyframes kenburns { from { transform: scale(1.02) translate(0, 0); } to { transform: scale(1.14) translate(-1.5%, -1%); } }
@keyframes kenburns-b { from { transform: scale(1.14) translate(1.5%, 0); } to { transform: scale(1.03) translate(0, -1%); } }
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(10,8,6,.55) 0%, rgba(10,8,6,.15) 30%, rgba(10,8,6,.35) 60%, rgba(10,8,6,.88) 100%),
    radial-gradient(ellipse at 50% 55%, transparent 40%, rgba(10,8,6,.45) 100%);
}
.hero-in { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; justify-content: flex-end; padding-bottom: calc(clamp(40px, 8vh, 96px) + env(safe-area-inset-bottom, 0px)); }
.hero .eyebrow { color: var(--gold-soft); }
.quote { font-size: var(--s-hero); line-height: 1.02; margin: 18px 0 0; max-width: 15ch; }
.quote em { color: var(--gold-soft); }
.hero-meta { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; color: var(--on-night-2); font-size: .92rem; }
.hero-meta .who { color: var(--on-night); font-weight: 600; }
.to-work { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--on-night); font-weight: 600; font-size: .9rem; border-bottom: 1px solid var(--gold-soft); padding-bottom: 3px; }
.to-work svg { transition: transform .3s; } .to-work:hover svg { transform: translateY(3px); }
.dots { position: absolute; z-index: 3; right: max(20px, env(safe-area-inset-right, 0px)); bottom: calc(clamp(40px, 8vh, 96px) + env(safe-area-inset-bottom, 0px)); display: flex; gap: 8px; align-items: center; }
.dots button { width: 36px; height: 24px; border: 0; background: none; cursor: pointer; padding: 0; position: relative; }
.dots button::before { content: ""; position: absolute; left: 0; right: 0; top: 11px; height: 2px; background: rgba(239,231,216,.3); }
.dots button i { position: absolute; left: 0; top: 11px; height: 2px; width: 0; background: var(--gold-soft); }
.dots button.on i { animation: fill 7s linear forwards; }
@keyframes fill { to { width: 100%; } }
.slide-cap { position: absolute; z-index: 3; left: max(20px, env(safe-area-inset-left, 0px)); top: calc(92px + env(safe-area-inset-top, 0px)); font-size: .72rem; letter-spacing: .18em; text-transform: uppercase; color: var(--on-night-2); }

/* ---------- intro + stats ---------- */
.intro { padding-block: clamp(72px, 10vw, 140px) clamp(48px, 6vw, 80px); }
.intro-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); align-items: end; }
.intro .lead { font: 400 clamp(1.9rem, 3.6vw, 3rem)/1.15 var(--f-display); margin: 14px 0 0; text-wrap: balance; }
.intro .lead em { color: var(--gold); }
.intro p.sub { color: var(--ink-2); margin: 0; max-width: 46ch; }
.stats { margin-top: clamp(48px, 6vw, 80px); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.stat { padding: 22px 20px 0 0; }
.stat + .stat { padding-left: 20px; border-left: 1px solid var(--line); }
.stat b { display: block; font: 400 clamp(2.4rem, 4.4vw, 3.6rem)/1 var(--f-display); font-variant-numeric: tabular-nums; }
.stat span { display: block; margin-top: 8px; font-size: .88rem; color: var(--ink-2); max-width: 24ch; }

/* ---------- chapters ---------- */
.chapter { padding-block: clamp(64px, 9vw, 128px); }
.ch-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px 48px; align-items: end; margin-bottom: clamp(36px, 5vw, 64px); }
.ch-num { font: italic 400 1.1rem/1 var(--f-display); color: var(--gold); display: flex; align-items: center; gap: 14px; }
.ch-num::after { content: ""; flex: 0 0 56px; height: 1px; background: var(--gold); }
.ch-title { font-size: var(--s-h2); line-height: 1; margin-top: 14px; }
.ch-title em { color: var(--gold); }
.ch-head p { margin: 0; color: var(--ink-2); max-width: 48ch; justify-self: end; }

/* ---------- work grid ---------- */
.work-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: clamp(16px, 2vw, 28px); }
.card { grid-column: span 6; position: relative; display: block; text-align: left; border: 0; padding: 0; background: none; cursor: pointer; color: var(--ink); }
.card.wide { grid-column: span 8; } .card.narrow { grid-column: span 4; }
.card.third { grid-column: span 4; }
.card-media { position: relative; overflow: hidden; aspect-ratio: 4 / 3; background: var(--night-2); border-radius: 2px; }
.card.wide .card-media { aspect-ratio: 16 / 10; }
.card.narrow .card-media { aspect-ratio: 8 / 10.2; }
.card-flag { display: inline-flex; align-items: center; gap: 8px; margin-top: 6px; font-size: .78rem; font-weight: 700; color: var(--ok); letter-spacing: .02em; }
.card-flag::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.card-media img, .card-media .mock { width: 100%; height: 100%; object-fit: cover; object-position: top left; transition: transform 1.1s var(--ease); }
.card-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, rgba(12,10,7,.82)); opacity: .0; transition: opacity .6s; }
.card:hover .card-media img, .card:hover .card-media .mock, .card:focus-visible .card-media img { transform: scale(1.05); }
.card:hover .card-media::after, .card:focus-visible .card-media::after { opacity: 1; }
.card-reveal {
  position: absolute; left: 22px; right: 22px; bottom: 20px; z-index: 2; color: var(--on-night);
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  transform: translateY(14px); opacity: 0; transition: transform .6s var(--ease), opacity .6s;
  font-weight: 600; font-size: .9rem;
}
.card:hover .card-reveal, .card:focus-visible .card-reveal { transform: none; opacity: 1; }
.card-reveal .arrow { width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(239,231,216,.6); display: grid; place-items: center; }
.card-body { padding-top: 16px; display: grid; gap: 4px; }
.card-tag { font-size: .7rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.card h3 { font-size: var(--s-h3); line-height: 1.05; }
.card p { margin: 2px 0 0; color: var(--ink-2); font-size: .95rem; max-width: 52ch; }

/* HTML mock thumbnails (PO toolkit, agent) */
.mock { position: relative; }
.mock-po { background: #EAE2D3; padding: 7% 7% 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 4%; align-content: start; }
.mock-po .col { display: grid; gap: 7%; align-content: start; }
.mock-po .col > b { font: 700 clamp(.5rem, .9vw, .7rem)/1 var(--f-body); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); padding-bottom: 4%; border-bottom: 1px solid #CFC3AE; }
.mock-po .sticky { background: var(--paper); padding: 9% 9% 11%; border-radius: 2px; box-shadow: 0 6px 14px -10px rgba(40,30,10,.5); font: 600 clamp(.5rem, 1vw, .8rem)/1.3 var(--f-body); color: var(--ink); }
.mock-po .sticky i { display: block; font-style: normal; font-weight: 700; font-size: .78em; color: var(--gold); letter-spacing: .08em; margin-bottom: 4%; }
.mock-po .sticky:nth-child(3) { transform: rotate(-1.2deg); } .mock-po .col:nth-child(2) .sticky:nth-child(2) { transform: rotate(1deg); }
.mock-agent { background: radial-gradient(ellipse at 30% 20%, #2A2318, var(--night)); display: grid; place-items: center; }
.phone { width: 44%; aspect-ratio: 9 / 17; background: #0B0A08; border-radius: 22px; border: 1px solid #3A3226; padding: 7% 5%; display: grid; gap: 5%; align-content: start; box-shadow: 0 30px 60px -30px #000; }
.phone .bub { background: #1E1A14; color: var(--on-night); border-radius: 10px; padding: 7% 8%; font: 500 clamp(.42rem, .8vw, .66rem)/1.35 var(--f-body); }
.phone .bub b { color: var(--gold-soft); font-weight: 700; }
.phone .bub small { display: block; color: var(--on-night-2); font-size: .85em; margin-top: 2px; }
.phone .head { color: var(--on-night-2); font: 700 clamp(.4rem, .7vw, .58rem)/1 var(--f-body); letter-spacing: .14em; text-transform: uppercase; text-align: center; }

/* ---------- route / experience ---------- */
.route { background: var(--paper); }
.timeline { display: grid; gap: 0; border-top: 1px solid var(--line); }
.stop { display: grid; grid-template-columns: 11rem minmax(0, 1.2fr) minmax(0, 1.5fr); gap: 16px 40px; padding-block: 30px; border-bottom: 1px solid var(--line); align-items: start; }
.stop .when { font-size: .85rem; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; padding-top: 8px; }
.stop h3 { font-size: var(--s-h3); line-height: 1.05; }
.stop .org { margin-top: 6px; font-size: .9rem; color: var(--ink-2); }
.stop ul { margin: 6px 0 0; padding-left: 18px; color: var(--ink-2); display: grid; gap: 6px; }
.stop ul li::marker { color: var(--gold); }
.stop .now { display: inline-block; margin-left: 10px; vertical-align: 6px; font: 700 .64rem/1 var(--f-body); letter-spacing: .14em; text-transform: uppercase; color: var(--ok); border: 1px solid currentColor; border-radius: 99px; padding: 4px 8px; }
.edu-head { margin-top: 56px; margin-bottom: 8px; font-size: 1.6rem; font-style: italic; }
.edu { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--line); }
.edu > div { padding: 20px 20px 20px 0; min-width: 0; }
.edu > div + div { padding-left: 20px; border-left: 1px solid var(--line); }
.edu .when { font-size: .8rem; font-weight: 600; color: var(--muted); }
.edu b { display: block; font-family: var(--f-display); font-weight: 400; font-size: 1.3rem; line-height: 1.15; margin-top: 6px; }
.edu span { display: block; font-size: .88rem; color: var(--ink-2); margin-top: 4px; }

/* ---------- about ---------- */
.about-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(36px, 6vw, 96px); align-items: start; }
.photos { position: relative; padding-bottom: 18%; padding-right: 16%; }
.photo-main { margin: 0; }
.photo-main img { width: 100%; height: auto; border-radius: 2px; box-shadow: 0 40px 80px -50px rgba(30,20,5,.6); }
.photo-second { position: absolute; right: 0; bottom: 0; width: 44%; margin: 0; border: 8px solid var(--cream); border-radius: 2px; box-shadow: 0 30px 60px -30px rgba(30,20,5,.55); transform: rotate(2deg); transition: transform .6s var(--ease); }
.photo-second:hover { transform: rotate(0) scale(1.02); }
.photo-second img { width: 100%; height: auto; }
.photos figcaption { font-size: .78rem; color: var(--muted); margin-top: 10px; }
.about-text .lead { font: 400 clamp(1.7rem, 2.8vw, 2.4rem)/1.2 var(--f-display); margin: 0 0 22px; text-wrap: balance; }
.about-text .lead em { color: var(--gold); }
.about-text p { color: var(--ink-2); margin: 0 0 16px; max-width: 60ch; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; margin: 28px 0 0; border-top: 1px solid var(--line); }
.facts div { padding: 14px 16px 14px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.facts dt { font-size: .68rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.facts dd { margin: 4px 0 0; font-weight: 600; font-size: .95rem; }
.principles { margin-top: 40px; display: grid; gap: 22px; }
.principle { display: grid; grid-template-columns: 2.4rem minmax(0, 1fr); gap: 14px; }
.principle .n { font: italic 400 1.8rem/1 var(--f-display); color: var(--gold); }
.principle h4 { font-size: 1.45rem; line-height: 1.1; }
.principle p { margin: 4px 0 0; color: var(--ink-2); font-size: .95rem; }
.skills { margin-top: 40px; }
.skills h4 { font-size: 1.45rem; margin-bottom: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.chips li { font-size: .82rem; font-weight: 600; padding: 6px 13px; border: 1px solid var(--line); border-radius: 99px; background: var(--paper); }

/* ---------- agent ---------- */
.agent { background: var(--night); color: var(--on-night); position: relative; overflow: hidden; }
.agent::before { content: ""; position: absolute; inset: -20% -10% auto auto; width: 60vw; height: 60vw; background: radial-gradient(circle, rgba(216,188,128,.12), transparent 60%); pointer-events: none; }
.agent .ch-head p { color: var(--on-night-2); }
.agent .ch-num { color: var(--gold-soft); } .agent .ch-num::after { background: var(--gold-soft); }
.agent .ch-title em { color: var(--gold-soft); }
.console { position: relative; display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); border: 1px solid var(--night-line); border-radius: 4px; background: rgba(27,23,18,.6); min-height: 520px; }
.topics { border-right: 1px solid var(--night-line); padding: 18px; display: grid; gap: 4px; align-content: start; }
.topics .tl { font-size: .68rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--on-night-2); padding: 4px 10px 10px; }
.topic { display: flex; justify-content: space-between; align-items: center; gap: 10px; width: 100%; text-align: left; border: 0; background: none; cursor: pointer; padding: 11px 12px; border-radius: 4px; color: var(--on-night-2); font-weight: 600; font-size: .92rem; transition: background .25s, color .25s; }
.topic small { font-weight: 600; font-size: .72rem; opacity: .7; }
.topic:hover { background: rgba(239,231,216,.05); color: var(--on-night); }
.topic[aria-selected="true"] { background: rgba(216,188,128,.12); color: var(--gold-soft); }
.agent-badge { margin: 14px 10px 0; font-size: .74rem; line-height: 1.45; color: var(--on-night-2); border-top: 1px solid var(--night-line); padding-top: 14px; }
.agent-badge b { color: var(--gold-soft); font-weight: 700; letter-spacing: .1em; font-size: .68rem; display: block; margin-bottom: 4px; }
.chat { display: grid; grid-template-rows: minmax(0, 1fr) auto; min-width: 0; }
.log { padding: 22px clamp(16px, 3vw, 32px); display: flex; flex-direction: column; gap: 16px; overflow-y: auto; max-height: 560px; min-height: 360px; scroll-behavior: smooth; }
.msg { max-width: 82%; font-size: .96rem; line-height: 1.6; animation: msg-in .5s var(--ease); }
@keyframes msg-in { from { opacity: 0; transform: translateY(10px); } }
.msg.q { align-self: flex-end; background: var(--gold-soft); color: var(--night); padding: 10px 16px; border-radius: 16px 16px 4px 16px; font-weight: 600; }
.msg.a { align-self: flex-start; display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; }
.msg.a .av { width: 34px; height: 34px; border-radius: 50%; background: var(--night-2); border: 1px solid var(--night-line); display: grid; place-items: center; font: italic 400 1rem/1 var(--f-display); color: var(--gold-soft); }
.msg.a .txt { background: var(--night-2); border: 1px solid var(--night-line); padding: 12px 16px; border-radius: 4px 16px 16px 16px; }
.msg.a .txt p { margin: 0; }
.msg.a .src { margin-top: 8px; font-size: .74rem; color: var(--on-night-2); letter-spacing: .04em; }
.typing { display: inline-flex; gap: 4px; padding: 6px 0; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--on-night-2); animation: dot 1s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 0%, 80%, 100% { opacity: .25; transform: none; } 40% { opacity: 1; transform: translateY(-3px); } }
.sugg { display: flex; flex-wrap: wrap; gap: 8px; }
.sugg button {
  border: 1px solid var(--night-line); background: transparent; color: var(--on-night); cursor: pointer;
  border-radius: 99px; padding: 8px 14px; font-size: .86rem; font-weight: 600; transition: border-color .25s, background .25s, color .25s;
}
.sugg button:hover { border-color: var(--gold-soft); color: var(--gold-soft); }
.sugg.follow button { font-size: .8rem; padding: 6px 12px; color: var(--on-night-2); }
.ask { border-top: 1px solid var(--night-line); padding: 14px clamp(16px, 3vw, 32px) 18px; display: grid; gap: 12px; }
.ask form { display: flex; gap: 10px; }
.ask input {
  flex: 1; min-width: 0; background: transparent; border: 0; border-bottom: 1px solid var(--night-line); color: var(--on-night);
  padding: 10px 2px; font: 500 1rem var(--f-body); outline: none; transition: border-color .3s;
}
.ask input::placeholder { color: #7D735F; }
.ask input:focus { border-color: var(--gold-soft); }
.ask .send { border: 0; cursor: pointer; background: var(--gold-soft); color: var(--night); width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; flex: none; }

/* ---------- contact ---------- */
.contact { position: relative; color: var(--on-night); background: var(--night); overflow: hidden; }
.contact-bg { position: absolute; inset: 0; }
.contact-bg img { width: 100%; height: 100%; object-fit: cover; opacity: .28; filter: grayscale(.4); }
.contact-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(15,13,10,.96) 30%, rgba(15,13,10,.7)); }
.contact .wrap { position: relative; }
.contact .ch-num { color: var(--gold-soft); } .contact .ch-num::after { background: var(--gold-soft); }
.contact .ch-title em { color: var(--gold-soft); }
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(36px, 6vw, 96px); }
.contact-grid > div > p { color: var(--on-night-2); max-width: 44ch; margin: 18px 0 0; }
.direct { margin-top: 36px; display: grid; gap: 0; border-top: 1px solid var(--night-line); max-width: 440px; }
.direct > div { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--night-line); }
.direct dt { font-size: .68rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--on-night-2); }
.direct dd { margin: 0; display: flex; align-items: center; gap: 10px; font-weight: 600; min-width: 0; }
.direct dd span { overflow-wrap: anywhere; user-select: all; }
.direct a { text-decoration: none; border-bottom: 1px solid var(--night-line); transition: border-color .3s; }
.direct a:hover { border-color: var(--gold-soft); }
.copy { border: 1px solid var(--night-line); background: none; color: var(--on-night-2); cursor: pointer; border-radius: 99px; font-size: .72rem; font-weight: 700; padding: 4px 10px; letter-spacing: .06em; }
.copy:hover { color: var(--gold-soft); border-color: var(--gold-soft); }
.form { display: grid; gap: 20px; align-self: start; }
.form .row2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.field { position: relative; }
.field label { display: block; font-size: .7rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--on-night-2); margin-bottom: 6px; }
.field input, .field textarea {
  width: 100%; background: rgba(239, 231, 216, .07); border: 1px solid #5A4F3E; color: var(--on-night);
  font: 500 1.02rem var(--f-body); padding: 13px 15px; outline: none; resize: vertical; border-radius: 8px;
  transition: border-color .3s, background .3s, box-shadow .3s;
}
.field input::placeholder, .field textarea::placeholder { color: #8F846F; }
.field input:hover, .field textarea:hover { border-color: #7A6C55; }
.field textarea { min-height: 140px; }
.field input:focus, .field textarea:focus { border-color: var(--gold-soft); background: rgba(239, 231, 216, .11); box-shadow: 0 0 0 3px rgba(216, 188, 128, .22); }
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: #E9A58F; }
.form { background: rgba(15, 13, 10, .72); border: 1px solid var(--night-line); border-radius: 12px; padding: clamp(20px, 3vw, 32px); backdrop-filter: blur(6px); }
.field .err { color: #E9A58F; font-size: .8rem; margin-top: 6px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.consent { font-size: .82rem; color: var(--on-night-2); }
.consent a, .linklike { color: var(--gold-soft); }
.linklike { background: none; border: 0; padding: 0; cursor: pointer; font: inherit; text-decoration: underline; text-underline-offset: 3px; }
.btn-send {
  justify-self: start; display: inline-flex; align-items: center; gap: 12px; cursor: pointer;
  border: 1px solid var(--gold-soft); background: var(--gold-soft); color: var(--night); font-weight: 700; letter-spacing: .04em;
  padding: 14px 26px; border-radius: 99px; transition: background .3s, color .3s;
}
.btn-send:hover { background: transparent; color: var(--gold-soft); }
.btn-send[disabled] { opacity: .6; cursor: wait; }

/* ---------- footer ---------- */
.foot { background: var(--night); color: var(--on-night-2); border-top: 1px solid var(--night-line); font-size: .85rem; }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 12px 28px; justify-content: space-between; align-items: center; padding-block: 26px calc(26px + env(safe-area-inset-bottom, 0px)); }
.foot nav { display: flex; gap: 20px; flex-wrap: wrap; }
.foot a, .foot button { color: var(--on-night-2); text-decoration: none; background: none; border: 0; cursor: pointer; padding: 0; font-size: .85rem; }
.foot a:hover, .foot button:hover { color: var(--gold-soft); }

/* ---------- story overlay ---------- */
.story {
  position: fixed; inset: 0; z-index: 80; background: var(--cream); overflow-y: auto; overscroll-behavior: contain;
  opacity: 0; visibility: hidden; transform: translateY(24px); transition: opacity .5s var(--ease), transform .5s var(--ease), visibility .5s;
}
.story.open { opacity: 1; visibility: visible; transform: none; }
.story-bar { position: sticky; top: 0; z-index: 2; background: color-mix(in srgb, var(--cream) 94%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); padding-top: env(safe-area-inset-top, 0px); }
.story-bar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; }
.story-bar .crumb { font-size: .78rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.story-bar .nav-s { display: flex; gap: 8px; }
.story-bar button { border: 1px solid var(--line); background: var(--paper); cursor: pointer; border-radius: 99px; padding: 8px 14px; font-size: .82rem; font-weight: 700; white-space: nowrap; }
.story-bar button:hover { border-color: var(--ink); }
.st-hero { padding-block: clamp(40px, 6vw, 80px) 32px; }
.st-hero h2 { font-size: clamp(2.8rem, 6.4vw, 5.4rem); line-height: .98; margin-top: 14px; }
.st-hero h2 em { color: var(--gold); }
.st-hero .sum { font: 400 clamp(1.3rem, 2vw, 1.7rem)/1.3 var(--f-display); color: var(--ink-2); max-width: 40ch; margin: 18px 0 0; }
.st-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-top: 36px; }
.st-facts div { padding: 16px 16px 16px 0; min-width: 0; }
.st-facts div + div { padding-left: 16px; border-left: 1px solid var(--line); }
.st-facts dt { font-size: .66rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.st-facts dd { margin: 4px 0 0; font-weight: 600; font-size: .92rem; overflow-wrap: anywhere; }
.st-facts a { color: var(--gold); }
.st-cover { margin-top: 36px; }
.st-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 28px clamp(32px, 6vw, 96px); padding-block: clamp(40px, 6vw, 72px); }
.st-body h3 { font-size: 1.9rem; font-style: italic; color: var(--gold); }
.st-body p, .st-body li { color: var(--ink-2); }
.st-body p { margin: 0 0 14px; max-width: 62ch; }
.st-body ul { margin: 0; padding-left: 18px; display: grid; gap: 10px; max-width: 66ch; }
.st-body li::marker { color: var(--gold); }
.st-note { font-size: .82rem; color: var(--muted); margin-top: 18px; font-style: italic; }
.gallery { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 20px; padding-bottom: 32px; }
.shot { grid-column: span 12; margin: 0; }
.shot.half { grid-column: span 6; }
.shot.phone-shot { grid-column: span 4; }
.shot.phone-shot .frame { border-radius: 22px; max-width: 320px; margin-inline: auto; }
.shot .frame { overflow: hidden; border-radius: 6px; background: var(--paper); border: 1px solid var(--line); box-shadow: 0 30px 60px -40px rgba(30,20,5,.45); }
.shot .chrome { display: flex; align-items: center; gap: 6px; padding: 9px 12px; border-bottom: 1px solid var(--line); background: #EFE8DB; }
.shot .chrome i { width: 9px; height: 9px; border-radius: 50%; background: #D3C7B2; }
.shot .chrome span { margin-left: 10px; font-size: .72rem; color: var(--muted); background: var(--paper); border-radius: 99px; padding: 2px 12px; }
.shot img { width: 100%; height: auto; }
.shot figcaption { font-size: .85rem; color: var(--muted); margin-top: 10px; }
.shot.print .frame { background: #E6DFD2; border: 0; padding: clamp(16px, 4vw, 48px); }
.shot.print .frame img { box-shadow: 0 30px 50px -30px rgba(20,14,4,.6); margin-inline: auto; max-height: 820px; width: auto; }
.st-next { border-top: 1px solid var(--line); padding-block: 40px calc(60px + env(safe-area-inset-bottom, 0px)); }
.st-next button { display: block; width: 100%; text-align: left; background: none; border: 0; cursor: pointer; padding: 0; }
.st-next small { font-size: .72rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.st-next b { display: block; font: italic 400 clamp(2rem, 5vw, 3.6rem)/1.05 var(--f-display); margin-top: 6px; transition: color .3s; }
.st-next button:hover b { color: var(--gold); }

/* PO documents */
.doc { background: var(--paper); border: 1px solid var(--line); border-radius: 6px; padding: clamp(18px, 3vw, 32px); box-shadow: 0 30px 60px -45px rgba(30,20,5,.5); overflow-x: auto; }
.doc-h { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; border-bottom: 1px solid var(--line); padding-bottom: 12px; margin-bottom: 18px; }
.doc-h b { font: 400 1.6rem/1.1 var(--f-display); }
.doc-h span { font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.us { font: 400 clamp(1.25rem, 2vw, 1.55rem)/1.35 var(--f-display); margin: 0 0 18px; max-width: 52ch; }
.us em { color: var(--gold); }
.ac-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ac-list li { display: grid; grid-template-columns: 4.6rem minmax(0, 1fr); gap: 12px; font-size: .92rem; padding: 10px 12px; background: var(--cream); border-radius: 4px; color: var(--ink-2); }
.ac-list li b { font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); padding-top: 3px; }
.meta-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.meta-row span { font-size: .74rem; font-weight: 700; padding: 4px 10px; border: 1px solid var(--line); border-radius: 99px; color: var(--ink-2); }
.flow { min-width: 760px; }
.flow svg { width: 100%; height: auto; display: block; }
.flow .box { fill: var(--cream); stroke: var(--ink-2); stroke-width: 1.2; }
.flow .box.hl { fill: #F1E2BF; stroke: var(--gold); }
.flow .gw { fill: var(--paper); stroke: var(--gold); stroke-width: 1.4; }
.flow .ln { stroke: var(--ink-2); stroke-width: 1.2; fill: none; }
.flow .lnd { stroke: var(--muted); stroke-width: 1.2; fill: none; stroke-dasharray: 4 4; }
.flow text { fill: var(--ink); font: 600 11.5px var(--f-body); }
.flow text.sm { fill: var(--muted); font: 600 10px var(--f-body); letter-spacing: .06em; }
.flow .ev { fill: var(--paper); stroke: var(--ink); stroke-width: 1.6; }
.flow .ev.end { stroke-width: 3.2; }
.moscow { display: grid; grid-template-columns: repeat(4, minmax(170px, 1fr)); gap: 12px; min-width: 720px; }
.moscow .mc { background: var(--cream); border-radius: 4px; padding: 14px; }
.moscow .mc h5 { margin: 0 0 10px; font: 700 .72rem/1 var(--f-body); letter-spacing: .16em; text-transform: uppercase; color: var(--gold); display: flex; justify-content: space-between; }
.moscow .mc.wont h5 { color: var(--muted); }
.moscow .it { font-style: normal; background: var(--paper); border: 1px solid var(--line); border-radius: 3px; padding: 9px 10px; font-size: .84rem; font-weight: 600; margin-bottom: 8px; }
.moscow .it small { display: block; font-weight: 500; color: var(--muted); margin-top: 3px; font-size: .78rem; }
.gate { display: grid; grid-template-columns: repeat(5, minmax(120px, 1fr)); gap: 0; min-width: 680px; align-items: stretch; }
.gate .g { position: relative; padding: 16px 14px; background: var(--cream); border-right: 2px solid var(--paper); }
.gate .g:first-child { border-radius: 4px 0 0 4px; } .gate .g:last-child { border-radius: 0 4px 4px 0; border-right: 0; background: #E3EEE6; }
.gate .g b { display: block; font: 400 1.9rem/1 var(--f-display); }
.gate .g span { display: block; font-size: .8rem; font-weight: 600; color: var(--ink-2); margin-top: 6px; }
.gate .g small { display: block; font-size: .72rem; color: var(--muted); margin-top: 4px; }
.gate .g.block { background: #F3E4DE; }
.doc-foot { margin-top: 14px; font-size: .84rem; color: var(--muted); }
.docs { display: grid; gap: 28px; padding-bottom: 32px; }

/* dialog (privacy) */
dialog { border: 0; border-radius: 6px; padding: 0; max-width: min(680px, calc(100% - 32px)); background: var(--paper); color: var(--ink); box-shadow: 0 40px 80px -30px rgba(0,0,0,.5); }
dialog::backdrop { background: rgba(15,13,10,.6); backdrop-filter: blur(3px); }
.dlg { padding: 28px clamp(20px, 4vw, 36px); }
.dlg h2 { font-size: 2.2rem; }
.dlg h3 { font: 700 .74rem/1 var(--f-body); letter-spacing: .16em; text-transform: uppercase; color: var(--gold); margin: 20px 0 6px; }
.dlg p { margin: 0 0 10px; color: var(--ink-2); font-size: .93rem; }
.dlg .x { float: right; border: 1px solid var(--line); background: none; border-radius: 99px; padding: 6px 14px; cursor: pointer; font-weight: 700; font-size: .8rem; }

.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 20px); z-index: 90; background: var(--ink); color: var(--paper); padding: 12px 20px; border-radius: 99px; font-weight: 600; font-size: .9rem; opacity: 0; transition: opacity .35s, transform .35s; pointer-events: none; max-width: calc(100% - 32px); text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .card.third { grid-column: span 6; }
  .card.third:last-child { grid-column: span 12; }
  .card.third:last-child .card-media { aspect-ratio: 21 / 9; }
}
@media (max-width: 960px) {
  .nav, .tools .btn-cv { display: none; }
  .burger { display: block; }
  .tools { margin-left: auto; }
  .intro-grid, .ch-head, .about-grid, .contact-grid, .st-body { grid-template-columns: minmax(0, 1fr); }
  .ch-head p { justify-self: start; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat:nth-child(3) { padding-left: 0; border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); margin-top: 22px; }
  .card, .card.wide, .card.narrow { grid-column: span 12; }
  .stop { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .stop .when { padding-top: 0; }
  .edu { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .edu > div:nth-child(3) { padding-left: 0; border-left: 0; }
  .edu > div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .console { grid-template-columns: minmax(0, 1fr); }
  .topics { border-right: 0; border-bottom: 1px solid var(--night-line); display: flex; gap: 6px; overflow-x: auto; padding: 12px; }
  .topics .tl, .agent-badge { display: none; }
  .topic { flex: none; width: auto; padding: 8px 14px; border: 1px solid var(--night-line); border-radius: 99px; }
  .topic small { display: none; }
  .st-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .st-facts div:nth-child(3) { padding-left: 0; border-left: 0; }
  .st-facts div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .shot.half { grid-column: span 12; }
  .shot.phone-shot { grid-column: span 6; }
  .photos { max-width: 560px; }
}
@media (max-width: 600px) {
  .card.third, .card.third:last-child { grid-column: span 12; }
  .card.third:last-child .card-media { aspect-ratio: 4 / 3; }
  .card-reveal { display: none; }
  .form .row2 { grid-template-columns: minmax(0, 1fr); }
  .msg { max-width: 100%; }
  .facts { grid-template-columns: minmax(0, 1fr); }
  .edu { grid-template-columns: minmax(0, 1fr); }
  .edu > div + div { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
  .dots { left: max(20px, env(safe-area-inset-left, 0px)); right: auto; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); }
  .lang button { padding: 5px 7px; }
  .shot.phone-shot { grid-column: span 12; }
  .story-bar .nav-s .prev { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; }
  .slide { transition: none; }
}
