:root {
  color-scheme: light;
  --bg: #f3f0e9;
  --bg-soft: #e9e5dc;
  --placeholder: #ddd9d1;
  --ink: #20211f;
  --text: #464843;
  --muted: #5f615b;
  --line: #cfcec7;
  --rule: #20211f;
  --accent: #945540;
  --on-accent: #fbf8f2;
  --header-bg: rgb(243 240 233 / 90%);
  --selection: #e2bca8;
  --focus: #945540;
  --stage: #e7e3da;
  --stage-ink: #20211f;
  --stage-muted: #585a54;
  --stage-line: #d3cec3;
  --stage-control: #8d8e87;
  --band: #1d201e;
  --band-ink: #f3f0e9;
  --band-text: #d4d5cf;
  --band-muted: #a9a8a1;
  --band-line: #555852;
  --band-accent: #dca78f;
  --shadow: 0 20px 40px rgb(0 0 0 / 12%);
  --gutter: clamp(20px, 5vw, 76px);
  --header-height: 76px;
  --font-sans: "Onest", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --font-serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #141614;
  --bg-soft: #1c1f1c;
  --placeholder: #232623;
  --ink: #ece8df;
  --text: #c3c1b9;
  --muted: #a09e96;
  --line: #333632;
  --rule: #62655e;
  --accent: #d8977b;
  --on-accent: #141614;
  --header-bg: rgb(20 22 20 / 88%);
  --selection: #6e3f2d;
  --focus: #e3a98f;
  --stage: #0d0f0d;
  --stage-ink: #ece8df;
  --stage-muted: #a3a19a;
  --stage-line: #2a2d29;
  --stage-control: #6f726c;
  --band: #1e211e;
  --band-ink: #ece8df;
  --band-text: #c9c7bf;
  --band-muted: #9d9b93;
  --band-line: #464943;
  --band-accent: #dca78f;
  --shadow: 0 20px 40px rgb(0 0 0 / 45%);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --bg: #141614;
    --bg-soft: #1c1f1c;
    --placeholder: #232623;
    --ink: #ece8df;
    --text: #c3c1b9;
    --muted: #a09e96;
    --line: #333632;
    --rule: #62655e;
    --accent: #d8977b;
    --on-accent: #141614;
    --header-bg: rgb(20 22 20 / 88%);
    --selection: #6e3f2d;
    --focus: #e3a98f;
    --stage: #0d0f0d;
    --stage-ink: #ece8df;
    --stage-muted: #a3a19a;
    --stage-line: #2a2d29;
    --stage-control: #6f726c;
    --band: #1e211e;
    --band-ink: #ece8df;
    --band-text: #c9c7bf;
    --band-muted: #9d9b93;
    --band-line: #464943;
    --band-accent: #dca78f;
    --shadow: 0 20px 40px rgb(0 0 0 / 45%);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html.has-lightbox { overflow: hidden; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font-sans); font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
img, video { display: block; max-width: 100%; }
picture { display: contents; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4 { text-wrap: balance; }
p { text-wrap: pretty; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; }
::selection { background: var(--selection); color: var(--ink); }
.shell { width: min(calc(100% - var(--gutter) * 2), 1360px); margin-inline: auto; }
.skip-link { position: fixed; top: -100px; left: 16px; z-index: 100; background: var(--ink); color: var(--bg); padding: 12px 18px; }
.skip-link:focus { top: 16px; }
.eyebrow { margin: 0; color: var(--accent); font-size: 13px; font-weight: 600; letter-spacing: .12em; line-height: 1.5; text-transform: uppercase; }
.eyebrow span { margin-inline: .4em; }

html.theme-transition,
html.theme-transition *,
html.theme-transition *::before,
html.theme-transition *::after { transition: background-color .35s ease, color .35s ease, border-color .35s ease, fill .35s ease, stroke .35s ease !important; }

/* Шапка */
.site-header { position: sticky; top: 0; z-index: 20; background: var(--header-bg); border-bottom: 1px solid var(--line); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
.site-header__inner { min-height: var(--header-height); display: flex; align-items: center; gap: 40px; }
.brand { display: flex; align-items: baseline; gap: 1px; white-space: nowrap; font-size: 26px; font-weight: 700; letter-spacing: -.06em; }
.brand > span { color: var(--accent); }
.brand small { margin-left: 14px; color: var(--muted); font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.desktop-nav { display: flex; gap: clamp(20px, 3vw, 40px); margin-left: auto; }
.desktop-nav a, .header-contact { font-size: 15px; font-weight: 600; }
.desktop-nav a { position: relative; padding-block: 6px; }
.desktop-nav a::after { content: ""; position: absolute; inset: auto 0 0; height: 2px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .25s ease; }
.desktop-nav a[aria-current="true"] { color: var(--accent); }
.desktop-nav a[aria-current="true"]::after { transform: scaleX(1); }
.desktop-nav a:hover, .header-contact:hover { color: var(--accent); }
.header-contact { display: flex; align-items: center; gap: 20px; padding-bottom: 6px; border-bottom: 1px solid currentColor; }
.theme-toggle { flex: none; width: 42px; height: 42px; display: grid; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: transparent; cursor: pointer; transition: border-color .2s ease, color .2s ease; }
.theme-toggle:hover { border-color: var(--ink); }
.theme-toggle svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.theme-toggle__sun { display: none; }
:root[data-theme="dark"] .theme-toggle__sun { display: block; }
:root[data-theme="dark"] .theme-toggle__moon { display: none; }
:root:not([data-theme]) .theme-toggle { display: none; }
.mobile-nav { display: none; }

/* Первый экран */
.hero { min-height: 680px; padding-block: 56px 80px; display: grid; grid-template-columns: 1.08fr .92fr; align-items: center; gap: clamp(50px, 8vw, 120px); }
.hero__copy { align-self: stretch; display: flex; flex-direction: column; justify-content: center; padding-top: 40px; }
.hero h1 { margin: 22px 0 30px; font-size: clamp(76px, 8.8vw, 144px); font-weight: 600; letter-spacing: -.05em; line-height: .92; }
.hero__dot { color: var(--accent); }
.hero__lead { max-width: 540px; margin: 0; font-size: clamp(19px, 1.8vw, 24px); line-height: 1.45; letter-spacing: -.01em; }
.hero__actions { display: flex; align-items: center; flex-wrap: wrap; gap: 28px; margin-top: 38px; }
.button { min-height: 54px; padding: 0 22px; display: inline-flex; align-items: center; justify-content: space-between; gap: 38px; font-size: 15px; font-weight: 600; transition: background .2s ease, color .2s ease, transform .2s ease; }
.button:hover { transform: translateY(-2px); }
.button--dark { background: var(--ink); color: var(--bg); }
.button--dark:hover { background: var(--accent); color: var(--on-accent); }
.text-link { padding-block: 8px; border-bottom: 1px solid currentColor; font-size: 15px; font-weight: 600; }
.text-link span { margin-left: 12px; }
.text-link:hover { color: var(--accent); }
.hero__note { display: flex; align-items: center; gap: 18px; margin: auto 0 0; padding-top: 48px; color: var(--muted); font-size: 13px; line-height: 1.5; text-transform: uppercase; letter-spacing: .07em; }
.hero__line { width: 30px; height: 1px; background: var(--accent); }
.hero__visual { position: relative; justify-self: end; width: min(100%, 500px, max(320px, calc((100vh - 220px) * .75))); width: min(100%, 500px, max(320px, calc((100svh - 220px) * .75))); aspect-ratio: 3 / 4; background: var(--placeholder); overflow: hidden; }
.hero__visual img { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }

/* Проекты */
.projects { padding-block: 52px 120px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 36px; margin-bottom: 42px; padding-top: 32px; border-top: 1px solid var(--rule); }
.section-heading h2 { margin: 10px 0 0; font-size: clamp(56px, 6.6vw, 100px); font-weight: 600; letter-spacing: -.05em; line-height: 1; }
.section-heading h2 span { color: var(--accent); }
.section-heading > p { max-width: 340px; margin: 0 0 6px; color: var(--muted); font-size: 16px; line-height: 1.5; }
.project-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 34px; row-gap: 72px; }
.project-card { display: block; min-width: 0; }
.project-card__image { display: block; aspect-ratio: 1.42; overflow: hidden; background: var(--placeholder); }
.project-card__image img { width: 100%; height: 100%; object-fit: cover; transition: transform .55s cubic-bezier(.18,.68,.24,1); }
.project-card:hover img, .project-card:focus-visible img { transform: scale(1.045); }
.project-card__meta { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 18px; color: var(--muted); font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.project-card__meta span:last-child { color: var(--accent); text-align: right; }
.project-card__title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-top: 10px; font-size: clamp(24px, 2.3vw, 34px); font-weight: 600; letter-spacing: -.03em; line-height: 1.15; }
.project-card__title span { font-size: .7em; font-weight: 400; transition: transform .25s ease; }
.project-card:hover .project-card__title span { transform: translateY(3px); color: var(--accent); }

/* Кейсы */
.cases { padding-bottom: 100px; }
.case { padding-block: 40px 96px; border-top: 1px solid var(--rule); scroll-margin-top: calc(var(--header-height) - 1px); }
.case h3 { max-width: 1000px; margin: 12px 0 0; font-size: clamp(38px, 4.8vw, 68px); font-weight: 600; letter-spacing: -.04em; line-height: 1.04; }
.case__facts { display: flex; flex-wrap: wrap; gap: 14px 48px; margin: 28px 0 0; }
.case__facts div { display: grid; gap: 4px; }
.case__facts dt { color: var(--muted); font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.case__facts dd { margin: 0; font-size: 17px; font-weight: 500; }
.case__summary { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(44px, 8vw, 120px); margin: 40px 0 48px; padding-top: 36px; border-top: 1px solid var(--line); }
.case__summary p { margin: 0; line-height: 1.65; }
.case__summary .case__lead { max-width: 580px; font-size: clamp(22px, 2.2vw, 30px); letter-spacing: -.02em; line-height: 1.35; }
.case__summary > div { max-width: 540px; color: var(--text); font-size: 17px; }
.case__summary .case__role { margin-top: 20px; }
.case__role strong { display: block; margin-bottom: 6px; color: var(--ink); font-size: 13px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }

/* Галереи */
.gallery { background: var(--stage); color: var(--stage-ink); --focus: var(--accent); }
.gallery__track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-inline: contain; }
.gallery__track::-webkit-scrollbar { display: none; }
.gallery__slide { min-width: 100%; width: 100%; margin: 0; scroll-snap-align: start; display: grid; grid-template-rows: minmax(0, 1fr) auto; }
.gallery__open { position: relative; display: block; width: 100%; padding: 24px 24px 0; border: 0; background: none; cursor: zoom-in; }
.gallery__open img { width: 100%; height: min(60vw, max(380px, calc(100vh - 300px)), 680px); height: min(60vw, max(380px, calc(100svh - 300px)), 680px); object-fit: contain; }
.gallery__open::after { content: ""; position: absolute; top: 36px; right: 36px; width: 40px; height: 40px; border-radius: 50%; background: rgb(20 22 20 / 72%) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 4h6v6M10 20H4v-6M20 4l-7 7M4 20l7-7'/%3E%3C/svg%3E") center / 18px no-repeat; opacity: 0; transition: opacity .2s ease; }
.gallery__open:hover::after, .gallery__open:focus-visible::after { opacity: 1; }
.gallery__open:focus-visible { outline-offset: -4px; }
.gallery__slide figcaption { min-height: 48px; padding: 14px 24px; color: var(--stage-muted); font-size: 14px; }
.gallery__controls { min-height: 80px; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 12px 24px; border-top: 1px solid var(--stage-line); }
.gallery__thumbs { position: relative; display: flex; gap: 8px; min-width: 0; padding: 4px; overflow-x: auto; scrollbar-width: none; }
.gallery__thumbs::-webkit-scrollbar { display: none; }
.gallery__thumb { flex: none; width: 64px; height: 48px; padding: 0; border: 0; background: var(--placeholder); cursor: pointer; opacity: .5; transition: opacity .2s ease, box-shadow .2s ease; }
.gallery__thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery__thumb:hover { opacity: .85; }
.gallery__thumb[aria-current="true"] { opacity: 1; box-shadow: 0 0 0 2px var(--stage), 0 0 0 4px var(--accent); }
.gallery__buttons { flex: none; display: flex; align-items: center; gap: 16px; margin-left: auto; }
.gallery__buttons button { width: 44px; height: 44px; border: 1px solid var(--stage-control); border-radius: 50%; background: none; color: var(--stage-ink); cursor: pointer; font-size: 20px; transition: background .2s ease, color .2s ease; }
.gallery__buttons button:hover:not(:disabled) { background: var(--stage-ink); color: var(--stage); }
.gallery__buttons button:disabled { opacity: .35; cursor: default; }
.gallery__count { min-width: 64px; text-align: center; font-size: 14px; font-weight: 600; letter-spacing: .06em; font-variant-numeric: tabular-nums; }

/* Сравнение коллажа и визуализации */
.comparison__header { display: flex; align-items: end; justify-content: space-between; gap: 24px; padding: 28px 32px; border-bottom: 1px solid var(--stage-line); }
.comparison__header h4 { margin: 0; font-size: clamp(24px, 2.4vw, 32px); font-weight: 600; letter-spacing: -.03em; }
.comparison__header p { max-width: 460px; margin: 0; color: var(--stage-muted); font-size: 15px; line-height: 1.5; }
.comparison__track { align-items: center; }
.comparison__slide { display: flex; flex-direction: column; align-items: center; }
.comparison__stage { width: 100%; height: 680px; display: flex; align-items: center; justify-content: center; padding: 16px 24px; }
.comparison__frame { position: relative; width: min(100%, var(--frame-width)); aspect-ratio: var(--frame-ratio); max-height: 650px; overflow: hidden; background: var(--placeholder); cursor: ew-resize; touch-action: pan-x pan-y; user-select: none; -webkit-user-select: none; }
.comparison__frame img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.comparison__reveal { position: absolute; inset: 0; clip-path: inset(0 0 0 var(--split)); pointer-events: none; }
.comparison__label { position: absolute; top: 16px; z-index: 1; padding: 7px 11px; background: rgb(20 22 20 / 80%); color: #fff; font-size: 13px; font-weight: 600; }
.comparison__label--collage { left: 16px; }
.comparison__label--ai { right: 16px; }
.comparison__divider { position: absolute; inset-block: 0; left: var(--split); z-index: 2; width: 2px; transform: translateX(-1px); background: #fff; touch-action: none; }
.comparison__divider::before { content: ""; position: absolute; inset-block: 0; left: 50%; width: 48px; transform: translateX(-50%); }
.comparison__handle { position: absolute; top: 50%; left: 50%; width: 44px; height: 44px; display: grid; place-items: center; transform: translate(-50%, -50%); border: 2px solid #fff; border-radius: 50%; background: #1d201e; color: #fff; font-size: 20px; box-shadow: 0 4px 14px rgb(0 0 0 / 30%); }
.comparison__slide:has(.comparison__range:focus-visible) .comparison__handle { outline: 2px solid var(--focus); outline-offset: 3px; }
.comparison__slide .comparison__caption { position: relative; width: 100%; min-height: 60px; display: flex; align-items: center; padding: 8px 32px 20px; }
.comparison__caption strong { color: var(--stage-ink); font-size: 16px; font-weight: 600; }
.comparison__range { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

/* Видео */
.case__video { margin-top: 40px; padding: 28px; background: var(--bg-soft); }
.case__video-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.case__video h4 { margin: 8px 0 0; font-size: clamp(26px, 2.8vw, 40px); font-weight: 600; letter-spacing: -.035em; line-height: 1.1; }
.case__video-head > p { max-width: 360px; margin: 0; color: var(--text); font-size: 16px; line-height: 1.5; }
.case__video video { width: 100%; aspect-ratio: 16 / 9; background: #000; }

/* Навигация по кейсам */
.case__nav { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-top: 32px; }
.case__back { padding-bottom: 5px; border-bottom: 1px solid currentColor; font-size: 15px; font-weight: 600; }
.case__back:hover { color: var(--accent); }
.case__next { display: grid; justify-items: end; gap: 4px; text-align: right; font-size: clamp(19px, 1.8vw, 24px); font-weight: 600; letter-spacing: -.02em; }
.case__next small { color: var(--muted); font-size: 13px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.case__next:hover { color: var(--accent); }

/* Обо мне */
.about { overflow: hidden; background: var(--band); color: var(--band-ink); scroll-margin-top: var(--header-height); --focus: var(--band-accent); }
.about__inner { min-height: 660px; display: grid; grid-template-columns: 1fr .8fr; align-items: center; gap: clamp(50px, 8vw, 110px); padding-block: 88px; }
.about .eyebrow { color: var(--band-accent); }
.about h2 { margin: 16px 0 32px; font-size: clamp(44px, 5vw, 76px); font-weight: 600; letter-spacing: -.045em; line-height: 1.06; }
.about h2 em, .contact h2 em { font-family: var(--font-serif); font-size: 1.1em; font-weight: 500; letter-spacing: -.02em; line-height: .9; }
.about__copy > p:not(.eyebrow) { max-width: 620px; color: var(--band-text); font-size: 17px; line-height: 1.65; }
.about__image { width: 100%; height: 550px; object-fit: cover; object-position: 56% center; }
.skills { display: grid; gap: 14px; max-width: 700px; margin: 36px 0 0; }
.skills > div { display: grid; grid-template-columns: 180px 1fr; align-items: baseline; gap: 12px; }
.skills dt { color: var(--band-muted); font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.skills dd { margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.skills dd span { padding: 6px 12px; border: 1px solid var(--band-line); color: var(--band-text); font-size: 14px; }

/* Контакты */
.contact { padding-block: 136px 144px; scroll-margin-top: var(--header-height); }
.contact h2 { margin: 15px 0 64px; font-size: clamp(64px, 8.4vw, 136px); font-weight: 600; letter-spacing: -.05em; line-height: .96; }
.contact h2 em { color: var(--accent); }
.contact__main { display: flex; align-items: end; justify-content: space-between; gap: 30px; padding-bottom: 28px; border-bottom: 1px solid var(--rule); }
.contact__email { font-size: clamp(26px, 3.8vw, 56px); font-weight: 600; letter-spacing: -.04em; overflow-wrap: anywhere; }
.contact__email:hover { color: var(--accent); }
.contact__email span { font-size: .6em; vertical-align: top; }
.contact__main p { max-width: 260px; margin: 0; color: var(--muted); font-size: 16px; line-height: 1.5; }
.contact__links { display: flex; flex-wrap: wrap; align-items: center; gap: 24px 48px; margin-top: 28px; }
.contact__links a, .contact__copy { font-size: 16px; font-weight: 600; }
.contact__links a:hover, .contact__copy:hover { color: var(--accent); }
.contact__copy { padding: 0 0 4px; border: 0; border-bottom: 1px dashed currentColor; background: none; cursor: pointer; }

.site-footer { background: var(--band); color: var(--band-text); --focus: var(--band-accent); }
.site-footer > div { min-height: 80px; display: flex; align-items: center; justify-content: space-between; gap: 16px; font-size: 14px; }
.site-footer a:hover { color: var(--band-ink); }

/* Просмотр на весь экран */
.lightbox { width: 100%; max-width: none; height: 100%; max-height: none; margin: 0; padding: 0; border: 0; background: #0e0f0e; color: #ece8df; --focus: #e3a98f; }
.lightbox::backdrop { background: rgb(0 0 0 / 85%); }
.lightbox[open] { display: grid; grid-template-rows: auto minmax(0, 1fr); animation: lightbox-in .2s ease; }
@keyframes lightbox-in { from { opacity: 0; } }
.lightbox__bar { display: flex; align-items: center; gap: 16px; padding: 12px 16px 12px 24px; border-bottom: 1px solid #2a2d29; }
.lightbox__count { flex: none; font-size: 14px; font-weight: 600; letter-spacing: .06em; font-variant-numeric: tabular-nums; }
.lightbox__caption { flex: 1; min-width: 0; margin: 0; overflow: hidden; color: #c9c7bf; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.lightbox__button { flex: none; min-height: 40px; padding: 0 16px; border: 1px solid #4a4d48; border-radius: 999px; background: none; cursor: pointer; font-size: 14px; font-weight: 600; }
.lightbox__button:hover { background: #ece8df; color: #0e0f0e; }
.lightbox__close { width: 40px; padding: 0; font-size: 16px; }
.lightbox__viewport { display: flex; min-height: 0; padding: 16px 80px; overflow: hidden; touch-action: pinch-zoom; }
.lightbox__image { flex: none; margin: auto; max-width: 100%; max-height: 100%; object-fit: contain; cursor: zoom-in; user-select: none; -webkit-user-select: none; -webkit-user-drag: none; }
.lightbox.is-zoomed .lightbox__viewport { padding: 0; overflow: auto; touch-action: auto; cursor: grab; }
.lightbox.is-zoomed .lightbox__image { max-width: none; max-height: none; cursor: zoom-out; }
.lightbox__nav { position: absolute; top: 50%; z-index: 2; width: 52px; height: 52px; border: 1px solid #4a4d48; border-radius: 50%; background: rgb(14 15 14 / 72%); cursor: pointer; font-size: 20px; transform: translateY(-50%); }
.lightbox__nav:hover:not(:disabled) { background: #ece8df; color: #0e0f0e; }
.lightbox__nav:disabled { opacity: .3; cursor: default; }
.lightbox__nav--prev { left: 16px; }
.lightbox__nav--next { right: 16px; }

@media (hover: none) {
  .gallery__open::after { opacity: .9; }
}

@media (max-width: 900px) {
  .site-header__inner { gap: 24px; }
  .brand small { display: none; }
  .hero { min-height: 600px; gap: 50px; }
  .hero h1 { font-size: clamp(68px, 9vw, 100px); }
  .case__summary { gap: 35px; }
  .skills > div { grid-template-columns: 1fr; gap: 8px; }
}

@media (max-width: 700px) {
  :root { --header-height: 64px; }
  .site-header__inner { justify-content: space-between; gap: 12px; }
  .brand { font-size: 24px; }
  .desktop-nav, .header-contact { display: none; }
  .theme-toggle { margin-left: auto; width: 40px; height: 40px; }
  .mobile-nav { position: relative; display: block; }
  .mobile-nav summary { width: 40px; height: 40px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; cursor: pointer; list-style: none; }
  .mobile-nav summary::-webkit-details-marker { display: none; }
  .mobile-nav summary span { width: 22px; height: 2px; background: var(--ink); transition: transform .2s ease; }
  .mobile-nav[open] summary span:first-child { transform: translateY(4px) rotate(45deg); }
  .mobile-nav[open] summary span:last-child { transform: translateY(-4px) rotate(-45deg); }
  .mobile-nav nav { position: absolute; top: 50px; right: 0; width: min(280px, calc(100vw - 40px)); padding: 12px 22px; display: grid; background: var(--bg); border: 1px solid var(--line); box-shadow: var(--shadow); }
  .mobile-nav nav a { padding: 15px 0; border-bottom: 1px solid var(--line); font-size: 17px; font-weight: 500; }
  .mobile-nav nav a:last-child { border: 0; color: var(--accent); }
  .hero { display: flex; flex-direction: column; align-items: stretch; gap: 38px; min-height: 0; padding-block: 48px 80px; }
  .hero__copy { padding: 0; }
  .hero h1 { margin-block: 16px 24px; font-size: clamp(64px, 17vw, 104px); }
  .hero__lead { max-width: 560px; font-size: clamp(19px, 4.8vw, 23px); }
  .hero__actions { margin-top: 30px; }
  .hero__note { margin-top: 28px; padding: 0; }
  .hero__visual { justify-self: stretch; width: 100%; }
  .projects { padding-block: 12px 72px; }
  .section-heading { align-items: start; flex-direction: column; gap: 16px; margin-bottom: 30px; }
  .section-heading h2 { font-size: clamp(60px, 13vw, 88px); }
  .section-heading > p { max-width: 420px; }
  .project-grid { grid-template-columns: 1fr; row-gap: 48px; }
  .project-card__image { aspect-ratio: 1.38; }
  .project-card__title { font-size: clamp(26px, 7vw, 34px); }
  .cases { padding-bottom: 20px; }
  .case { padding-block: 28px 72px; }
  .case h3 { font-size: clamp(34px, 9.5vw, 52px); }
  .case__facts { gap: 14px 28px; margin-top: 22px; }
  .case__facts dd { font-size: 16px; }
  .case__summary { grid-template-columns: 1fr; gap: 18px; margin-block: 28px; padding-top: 24px; }
  .case__summary .case__lead { font-size: 22px; }
  .gallery__open { padding: 12px 12px 0; }
  .gallery__open img { height: min(84vw, 530px); }
  .gallery__open::after { top: 20px; right: 20px; width: 36px; height: 36px; }
  .gallery__slide figcaption { padding-inline: 16px; }
  .gallery__controls { padding-inline: 16px; }
  .gallery__thumbs { display: none; }
  .gallery__buttons { width: 100%; justify-content: space-between; margin-left: 0; }
  .comparison__header { display: block; padding: 20px 16px; }
  .comparison__header p { margin-top: 8px; }
  .comparison__stage { height: min(112vw, 450px); padding: 12px; }
  .comparison__label { top: 8px; padding: 5px 8px; font-size: 12px; }
  .comparison__label--collage { left: 8px; }
  .comparison__label--ai { right: 8px; }
  .comparison__slide .comparison__caption { min-height: 52px; padding: 8px 16px 16px; }
  .case__video { padding: 18px; }
  .case__video-head { display: block; margin-bottom: 16px; }
  .case__video-head > p { margin-top: 8px; }
  .case__nav { flex-direction: column-reverse; align-items: stretch; gap: 28px; }
  .case__back { align-self: flex-start; }
  .case__next { justify-items: start; text-align: left; padding: 18px 0; border-block: 1px solid var(--line); }
  .about__inner { display: flex; flex-direction: column; align-items: stretch; gap: 30px; padding-block: 80px; }
  .about h2 { font-size: clamp(46px, 11vw, 68px); }
  .about__image { height: 370px; }
  .contact { padding-block: 92px; }
  .contact h2 { margin-bottom: 52px; font-size: clamp(60px, 15vw, 100px); }
  .contact__main { align-items: start; flex-direction: column; }
  .contact__links { flex-direction: column; align-items: flex-start; gap: 20px; }
  .site-footer > div { min-height: 100px; flex-wrap: wrap; padding-block: 20px; }
  .lightbox__bar { padding: 8px 8px 8px 16px; gap: 10px; }
  .lightbox__caption { font-size: 14px; }
  .lightbox__viewport { padding: 0; }
  .lightbox__nav { top: auto; bottom: 16px; transform: none; }
}

@media (max-width: 380px) {
  .hero h1 { font-size: 18vw; }
  .project-card__meta { font-size: 12px; letter-spacing: .04em; }
  .contact h2 { font-size: 16vw; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
