:root {
  color-scheme: light;
  --font-body: "Manrope", ui-sans-serif, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Arial, sans-serif;
  --font-display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --color-ink: #1d3440;
  --color-ink-strong: #062332;
  --color-muted: #65787e;
  --color-paper: #fffaf2;
  --color-surface: #fffdf8;
  --color-surface-soft: #edf9f8;
  --color-night: #061f2a;
  --color-teal: #0d7c83;
  --color-teal-deep: #064b56;
  --color-coral: #d56f5c;
  --color-coral-deep: #9a4938;
  --color-sand: #b6945f;
  --color-sky: #dff7f6;
  --color-cream: #fffaf2;
  --color-hero-start: #fffaf2;
  --color-hero-mid: #fbf4e9;
  --color-hero-end: #e7f8f7;
  --color-hero-lede: #566d74;
  --color-hero-note: #6d7b7d;

  --ink: var(--color-ink);
  --ink-strong: var(--color-ink-strong);
  --muted: var(--color-muted);
  --paper: var(--color-paper);
  --surface: var(--color-surface);
  --surface-soft: var(--color-surface-soft);
  --night: var(--color-night);
  --teal: var(--color-teal);
  --teal-deep: var(--color-teal-deep);
  --coral: var(--color-coral);
  --sand: var(--color-sand);
  --sky: var(--color-sky);
  --cream: var(--color-cream);

  --line: rgba(6, 35, 50, 0.14);
  --line-soft: rgba(6, 35, 50, 0.08);
  --selection-bg: rgba(181, 142, 89, 0.24);
  --teal-tint-subtle: rgba(13, 124, 131, 0.07);
  --teal-tint: rgba(13, 124, 131, 0.11);
  --teal-border-soft: rgba(13, 124, 131, 0.18);
  --teal-border-strong: rgba(13, 124, 131, 0.28);
  --teal-border-featured: rgba(13, 124, 131, 0.24);
  --teal-border-hover: rgba(13, 124, 131, 0.34);
  --teal-deep-tint: rgba(6, 75, 86, 0.12);
  --teal-deep-border-soft: rgba(6, 75, 86, 0.2);
  --coral-tint: rgba(213, 111, 92, 0.12);
  --sand-tint: rgba(182, 148, 95, 0.16);
  --ink-tint: rgba(6, 35, 50, 0.08);
  --surface-glass: rgba(255, 253, 248, 0.82);
  --surface-stroke-strong: rgba(255, 253, 248, 0.86);
  --text-underline-muted: rgba(101, 120, 126, 0.38);
  --footer-text: rgba(255, 250, 242, 0.74);
  --footer-link: rgba(255, 250, 242, 0.72);
  --footer-copy: rgba(255, 250, 242, 0.7);
  --footer-heading: rgba(255, 250, 242, 0.55);

  --border-width: 1px;
  --page-width: 1080px;
  --doc-width: var(--page-width);
  --container-width: min(var(--page-width), calc(100vw - (var(--gutter) * 2)));
  --gutter: clamp(18px, 4vw, 32px);
  --header-height: 88px;
  --header-height-mobile: 115px;
  --app-subnav-height: 62px;
  --app-subnav-height-mobile: 58px;
  --store-badge-width-base: 180px;
  --store-badge-width: var(--store-badge-width-base);
  --store-badge-ratio: 180 / 52;

  --radius: 8px;
  --radius-pill: 999px;
  --radius-store-badge: 6px;
  --radius-code: 4px;
  --radius-portrait: 26px;
  --radius-portrait-shadow: 28px;

  --space-0: 0;
  --space-1: 1px;
  --space-2: 2px;
  --space-3: 3px;
  --space-4: 4px;
  --space-6: 6px;
  --space-7: 7px;
  --space-8: 8px;
  --space-9: 9px;
  --space-10: 10px;
  --space-12: 12px;
  --space-14: 14px;
  --space-16: 16px;
  --space-18: 18px;
  --space-20: 20px;
  --space-22: 22px;
  --space-24: 24px;
  --space-26: 26px;
  --space-28: 28px;
  --space-30: 30px;
  --space-34: 34px;
  --space-36: 36px;
  --space-42: 42px;
  --space-44: 44px;
  --space-50: 50px;
  --space-58: 58px;
  --space-62: 62px;
  --space-64: 64px;
  --space-68: 68px;
  --space-72: 72px;
  --space-76: 76px;
  --space-84: 84px;
  --space-86: 86px;
  --space-96: 96px;
  --space-104: 104px;
  --space-132: 132px;

  --space-section-y: clamp(var(--space-58), 8vw, var(--space-96));
  --space-section-heading-gap: clamp(var(--space-24), 5vw, var(--space-64));
  --space-section-heading-bottom: clamp(var(--space-28), 5vw, var(--space-44));
  --space-card: clamp(var(--space-22), 3vw, var(--space-30));
  --space-hero-y: clamp(var(--space-72), 9vw, var(--space-132));
  --space-hero-grid-gap: clamp(var(--space-36), 7vw, var(--space-96));
  --space-legal-page-top: clamp(var(--space-44), 8vw, var(--space-86));
  --space-legal-page-bottom: clamp(var(--space-62), 9vw, var(--space-104));
  --space-legal-block-y: clamp(var(--space-34), 5vw, var(--space-50));
  --space-footer-y: clamp(var(--space-50), 8vw, var(--space-72));
  --space-footer-grid: clamp(var(--space-34), 7vw, var(--space-84));

  --text-body-size: 17px;
  --text-body-size-mobile: 16px;
  --text-nav: 0.9rem;
  --text-nav-mobile: 0.86rem;
  --text-button: 0.95rem;
  --text-button-small: 0.9rem;
  --text-label: 0.78rem;
  --text-label-small: 0.76rem;
  --text-note: 0.8rem;
  --text-chip: 0.82rem;
  --text-copy-sm: 0.94rem;
  --text-copy: 0.98rem;
  --text-meta: 0.96rem;
  --text-copy-md: 1.04rem;
  --text-copy-lg: 1.08rem;
  --text-hero: clamp(4rem, 7.3vw, 6.35rem);
  --text-hero-mobile: clamp(3rem, 15vw, 4.15rem);
  --text-hero-lede: clamp(1.06rem, 1.9vw, 1.28rem);
  --text-section-title: clamp(2.8rem, 4.6vw, 4rem);
  --text-project-title: clamp(2rem, 3vw, 2.6rem);
  --text-document-title: clamp(3.2rem, 5.2vw, 4.7rem);
  --text-document-title-mobile: 2.25rem;
  --text-document-section-title: clamp(1.18rem, 2.4vw, 1.42rem);

  --leading-body: 1.65;
  --leading-ui: 1.2;
  --leading-comfort: 1.25;
  --leading-tight: 1.05;
  --leading-hero: 0.86;
  --leading-hero-lede: 1.62;
  --leading-document-title: 1.04;
  --leading-document-section-title: 1.22;
  --leading-project-title: 1.1;
  --leading-copy: 1.7;
  --leading-copy-loose: 1.74;
  --leading-copy-compact: 1.55;
  --leading-meta: 1.45;
  --leading-footer: 1.35;

  --weight-nav: 740;
  --weight-button: 760;
  --weight-label: 780;
  --weight-heading: 600;
  --weight-strong-heading: 800;
  --weight-hero: 600;

  --tracking-none: 0;
  --tracking-language: 0.02em;
  --tracking-meta: 0.04em;
  --tracking-label: 0.06em;
  --underline-offset: 0.18em;
  --underline-thickness: 0.08em;
  --external-link-gap: 0.34em;
  --external-link-icon-size: 0.82em;
  --external-link-icon-stroke: 2.1;
  --external-link-icon-shift: -0.04em;

  --control-height: 44px;
  --control-height-small: 40px;
  --nav-link-height: 38px;
  --nav-link-height-mobile: 34px;
  --language-button-width: 38px;
  --language-button-height: 32px;
  --hero-min-height: clamp(660px, 78svh, 860px);
  --hero-copy-width: 560px;
  --hero-text-width: 520px;
  --hero-media-min-width: 320px;
  --portrait-width: 520px;
  --portrait-width-tablet: 360px;
  --portrait-width-mobile: min(320px, 88vw);
  --document-title-width: 14ch;
  --document-text-width: 64ch;
  --document-meta-width: 190px;
  --document-meta-wide-width: 330px;
  --legal-section-label-width: 176px;
  --section-copy-width: 660px;
  --contact-copy-width: 640px;
  --project-grid-columns: repeat(3, minmax(0, 1fr));
  --project-media-ratio: 520 / 360;
  --project-icon-size: 68px;
  --project-card-min-height: 520px;
  --legal-section-label-track: 0.48fr;
  --footer-brand-track: 1.1fr;
  --footer-nav-track: 1.7fr;
  --list-indent: 1.15rem;
  --list-marker-gap: 0.18rem;
  --code-padding-y: 0.08em;
  --code-padding-x: 0.28em;
  --code-font-size: 0.92em;

  --duration-fast: 160ms;
  --button-hover-y: -1px;
  --skip-link-hidden-y: -140%;
  --disabled-opacity: 0.48;
  --store-disabled-opacity: 0.5;
  --shadow-portrait: 0 28px 80px rgba(6, 31, 42, 0.16);
  --shadow-card: 0 24px 70px rgba(6, 31, 42, 0.08);
  --hero-bg: linear-gradient(116deg, var(--color-hero-start) 0%, var(--color-hero-mid) 54%, var(--color-hero-end) 100%),
    var(--paper);
  --home-hero-overlay: linear-gradient(
      116deg,
      rgba(255, 255, 255, 0.54) 0%,
      rgba(255, 255, 255, 0.12) 52%,
      var(--teal-deep-tint) 100%
    ),
    linear-gradient(180deg, rgba(182, 148, 95, 0.13) 0%, rgba(182, 148, 95, 0) 52%);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: var(--space-0);
  background: var(--paper);
  color: var(--ink);
  font: var(--text-body-size) / var(--leading-body) var(--font-body);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body > [data-lang-content] {
  min-height: 100vh;
  flex-direction: column;
}

html[data-site-lang="en"] body > [data-lang-content="en"],
html[data-site-lang="ru"] body > [data-lang-content="ru"] {
  display: flex;
}

html[data-site-lang="en"] body > [data-lang-content="ru"],
html[data-site-lang="ru"] body > [data-lang-content="en"] {
  display: none;
}

::selection {
  background: var(--selection-bg);
}

a {
  color: inherit;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  border: 0;
}

img,
svg {
  display: block;
}

code {
  overflow-wrap: anywhere;
}

main {
  flex: 1 0 auto;
}

.home-page {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
}

.home-page > main {
  flex: 1 0 auto;
}

.container {
  width: var(--container-width);
  margin: var(--space-0) auto;
}

.sr-only {
  position: absolute;
  width: var(--space-1);
  height: var(--space-1);
  padding: var(--space-0);
  margin: calc(var(--space-1) * -1);
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: var(--space-0);
}

.skip-link {
  position: absolute;
  top: var(--space-12);
  left: var(--space-16);
  z-index: 10;
  padding: var(--space-10) var(--space-14);
  border: var(--border-width) solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  transform: translateY(var(--skip-link-hidden-y));
  transition: transform var(--duration-fast) ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.external-link,
.button.is-external {
  display: inline-flex;
  align-items: center;
  gap: var(--external-link-gap);
}

.external-link-icon {
  flex: 0 0 auto;
  width: var(--external-link-icon-size);
  height: var(--external-link-icon-size);
  stroke: currentColor;
  stroke-width: var(--external-link-icon-stroke);
  stroke-linecap: round;
  stroke-linejoin: round;
  transform: translateY(var(--external-link-icon-shift));
}

.site-header {
  flex: 0 0 auto;
  min-height: var(--header-height);
  border-bottom: var(--border-width) solid var(--line-soft);
  background: var(--paper);
  color: var(--ink);
}

.plain-header {
  background: var(--paper);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-24);
  width: var(--container-width);
  min-height: calc(var(--header-height) - var(--border-width));
  margin: var(--space-0) auto;
  padding: var(--space-24) var(--space-0);
}

.brand {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  color: var(--ink-strong);
  font-weight: var(--weight-strong-heading);
  line-height: 1;
  text-decoration: none;
  letter-spacing: var(--tracking-none);
}

.brand:hover,
.brand:focus-visible {
  color: var(--teal-deep);
}

.nav-links {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-8);
  color: var(--ink);
  font-size: var(--text-nav);
  line-height: var(--leading-ui);
}

.nav-links > a,
.nav-links .external-link {
  position: relative;
  min-height: var(--nav-link-height);
  padding: var(--space-10) var(--space-12);
  border-radius: 0;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}

.nav-links > a::after,
.nav-links .external-link::after {
  content: "";
  position: absolute;
  right: var(--space-12);
  bottom: var(--space-6);
  left: var(--space-12);
  height: var(--border-width);
  background: var(--color-sand);
  opacity: 0;
  transform: scaleX(0.45);
  transform-origin: center;
  transition:
    opacity var(--duration-fast) ease,
    transform var(--duration-fast) ease;
}

.nav-links > a:hover,
.nav-links > a:focus-visible,
.nav-links .external-link:hover,
.nav-links .external-link:focus-visible {
  background: transparent;
  color: var(--color-sand);
  outline: none;
}

.nav-links > a[aria-current="page"] {
  background: transparent;
  color: var(--color-sand);
}

.nav-links > a[aria-current="page"]::after {
  opacity: 1;
  transform: scaleX(1);
}

.language-switcher {
  display: inline-flex;
  flex: 0 0 auto;
  gap: var(--space-3);
  padding: var(--space-3);
  border: var(--border-width) solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--surface);
}

.language-switcher button {
  min-width: var(--language-button-width);
  min-height: var(--language-button-height);
  padding: var(--space-6) var(--space-10);
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: var(--text-label);
  font-weight: var(--weight-label);
  letter-spacing: var(--tracking-language);
}

.language-switcher button[aria-pressed="true"] {
  background: var(--night);
  color: var(--cream);
}

.app-subnav {
  flex: 0 0 auto;
  border-bottom: var(--border-width) solid var(--line);
  background: var(--paper);
}

.app-subnav .container {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  min-height: var(--app-subnav-height);
  overflow-x: auto;
  scrollbar-width: none;
}

.app-subnav .container::-webkit-scrollbar {
  display: none;
}

.app-subnav a {
  flex: 0 0 auto;
  padding: var(--space-9) var(--space-12);
  border: var(--border-width) solid transparent;
  border-radius: var(--radius);
  color: var(--muted);
  font-size: var(--text-button-small);
  font-weight: var(--weight-nav);
  line-height: var(--leading-comfort);
  text-decoration: none;
  white-space: nowrap;
}

.app-subnav a:hover,
.app-subnav a:focus-visible {
  background: var(--teal-tint-subtle);
  color: var(--teal-deep);
  outline: none;
}

.app-subnav a[aria-current="page"] {
  border: var(--border-width) solid var(--teal-border-strong);
  background: var(--teal-tint);
  color: var(--teal-deep);
}

.button {
  display: inline-flex;
  min-height: var(--control-height);
  align-items: center;
  justify-content: center;
  gap: var(--space-8);
  padding: var(--space-10) var(--space-16);
  border: var(--border-width) solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--teal-deep);
  cursor: pointer;
  font-size: var(--text-button);
  font-weight: var(--weight-button);
  line-height: var(--leading-ui);
  text-align: center;
  text-decoration: none;
  transition:
    background var(--duration-fast) ease,
    border-color var(--duration-fast) ease,
    color var(--duration-fast) ease,
    transform var(--duration-fast) ease;
}

.button:hover,
.button:focus-visible {
  border-color: var(--teal-border-hover);
  background: var(--teal-tint-subtle);
  color: var(--teal-deep);
  outline: none;
  transform: translateY(var(--button-hover-y));
}

.button.primary {
  border-color: var(--teal-deep);
  background: var(--teal-deep);
  color: var(--cream);
}

.button.primary:hover,
.button.primary:focus-visible {
  background: var(--night);
  color: var(--cream);
}

.button-disabled,
.button:disabled {
  cursor: not-allowed;
  opacity: var(--disabled-opacity);
  transform: none;
}

.hero {
  position: relative;
  flex: 0 0 auto;
  display: grid;
  align-items: center;
  min-height: var(--hero-min-height);
  background: var(--hero-bg);
  color: var(--ink);
  overflow: hidden;
  isolation: isolate;
}

.home-hero {
  border-bottom: var(--border-width) solid var(--line-soft);
}

.home-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--home-hero-overlay);
}

.hero-inner {
  width: var(--container-width);
  margin: var(--space-0) auto;
  padding: var(--space-hero-y) var(--space-0);
}

.home-hero-grid {
  display: grid;
  grid-template-columns: minmax(var(--hero-media-min-width), var(--portrait-width)) minmax(0, 1fr);
  gap: var(--space-hero-grid-gap);
  align-items: center;
}

.hero-copy {
  max-width: var(--hero-copy-width);
}

.hero-copy h1 {
  max-width: var(--hero-copy-width);
  margin: var(--space-0);
  color: var(--ink-strong);
  font-family: var(--font-display);
  font-size: var(--text-hero);
  font-weight: var(--weight-hero);
  line-height: var(--leading-hero);
  letter-spacing: var(--tracking-none);
  text-wrap: balance;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: var(--space-14);
  margin: var(--space-0) var(--space-0) var(--space-24);
  color: var(--color-sand);
  font-family: var(--font-body);
  font-size: var(--text-label);
  font-weight: var(--weight-strong-heading);
  line-height: var(--leading-ui);
  text-transform: uppercase;
  letter-spacing: 0.32em;
}

.hero-kicker::after {
  content: "";
  width: var(--space-34);
  height: var(--border-width);
  background: currentColor;
}

.hero-lede {
  max-width: var(--hero-text-width);
  margin: var(--space-26) var(--space-0) var(--space-0);
  color: var(--color-hero-lede);
  font-size: var(--text-hero-lede);
  line-height: var(--leading-hero-lede);
}

.actions,
.small-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-10);
}

.actions {
  margin-top: var(--space-30);
}

.hero-note {
  display: flex;
  align-items: flex-start;
  gap: var(--space-14);
  max-width: var(--hero-text-width);
  margin: var(--space-24) var(--space-0) var(--space-0);
  color: var(--color-hero-note);
  font-size: var(--text-button);
  line-height: var(--leading-copy-compact);
}

.hero-note span {
  flex: 0 0 auto;
  color: var(--color-sand);
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: var(--weight-heading);
  line-height: 0.9;
  letter-spacing: var(--tracking-none);
}

.home-hero .button.primary {
  border-color: var(--teal-deep);
  background: var(--teal-deep);
}

.home-hero .button:not(.primary) {
  border-color: var(--teal-deep-border-soft);
  background: var(--surface-glass);
}

.hero-portrait {
  position: relative;
  width: min(100%, var(--portrait-width));
  margin: var(--space-0);
  justify-self: start;
}

.hero-portrait::before {
  content: "";
  position: absolute;
  inset: var(--space-16) calc(var(--space-18) * -1) calc(var(--space-18) * -1) var(--space-18);
  z-index: -1;
  border-radius: var(--radius-portrait-shadow);
  background: var(--teal-deep-tint);
}

.hero-portrait img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  border: var(--border-width) solid var(--surface-stroke-strong);
  border-radius: var(--radius-portrait);
  box-shadow: var(--shadow-portrait);
  object-fit: cover;
  object-position: center;
}

.section {
  padding: var(--space-section-y) var(--space-0);
}

.section + .section {
  border-top: var(--border-width) solid var(--line-soft);
}

.section.alt {
  background: var(--surface-soft);
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr);
  gap: var(--space-section-heading-gap);
  align-items: start;
  margin-bottom: var(--space-section-heading-bottom);
}

.section-kicker {
  margin: var(--space-0) var(--space-0) var(--space-12);
  color: var(--teal-deep);
  font-family: var(--font-mono);
  font-size: var(--text-label);
  font-weight: var(--weight-strong-heading);
  line-height: var(--leading-ui);
  text-transform: uppercase;
  letter-spacing: var(--tracking-label);
}

.section-heading h2 {
  margin: var(--space-0);
  color: var(--ink-strong);
  font-family: var(--font-display);
  font-size: var(--text-section-title);
  font-weight: var(--weight-heading);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-none);
}

.section-heading > p {
  max-width: var(--section-copy-width);
  margin: var(--space-3) var(--space-0) var(--space-0);
  color: var(--muted);
  font-size: var(--text-copy-md);
  line-height: var(--leading-copy);
}

.about-section {
  background: var(--paper);
}

.about-editorial {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1fr);
  gap: var(--space-section-heading-gap);
  align-items: center;
}

.about-editorial > p {
  max-width: var(--section-copy-width);
  margin: var(--space-0);
  padding-left: var(--space-section-heading-gap);
  border-left: var(--border-width) solid var(--line);
  color: var(--muted);
  font-size: var(--text-copy-md);
  line-height: var(--leading-copy);
}

.about-editorial h2 {
  margin: var(--space-0);
  color: var(--ink-strong);
  font-family: var(--font-display);
  font-size: var(--text-section-title);
  font-weight: var(--weight-heading);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-none);
  text-wrap: balance;
}

.projects-section {
  background:
    linear-gradient(180deg, var(--surface-soft) 0%, var(--paper) 100%),
    var(--surface-soft);
}

.project-shelf {
  display: grid;
  grid-template-columns: var(--project-grid-columns);
  gap: var(--space-16);
}

.project-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  min-height: var(--project-card-min-height);
  padding: var(--space-card);
  border: var(--border-width) solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-card);
}

.project-card.featured {
  border-color: var(--teal-border-featured);
}

.project-copy {
  display: flex;
  min-width: 0;
  min-height: 100%;
  max-width: min(100%, 340px);
  flex-direction: column;
  position: relative;
  z-index: 2;
}

.app-badge {
  width: fit-content;
  max-width: 100%;
  margin-bottom: var(--space-18);
  padding: var(--space-6) var(--space-9);
  border-radius: var(--radius-pill);
  background: var(--teal-tint);
  color: var(--teal-deep);
  font-size: var(--text-label-small);
  font-weight: var(--weight-label);
  line-height: var(--leading-ui);
}

.archive-badge {
  background: var(--coral-tint);
  color: var(--color-coral-deep);
}

.music-badge {
  background: var(--ink-tint);
  color: var(--ink);
}

.project-card h3 {
  margin: var(--space-0);
  color: var(--ink-strong);
  font-family: var(--font-display);
  font-size: var(--text-project-title);
  font-weight: var(--weight-heading);
  line-height: var(--leading-project-title);
  letter-spacing: var(--tracking-none);
}

.project-card p {
  margin: var(--space-14) var(--space-0) var(--space-0);
  color: var(--muted);
  font-size: var(--text-copy);
  line-height: var(--leading-body);
}

.project-card-icon {
  display: inline-grid;
  width: var(--project-icon-size);
  height: var(--project-icon-size);
  place-items: center;
  margin: var(--space-4) var(--space-0) var(--space-20);
  border: var(--border-width) solid var(--line-soft);
  border-radius: 18px;
  background: var(--teal-tint-subtle);
  color: var(--teal-deep);
}

.project-card-icon::before {
  color: currentColor;
  font-size: 1.85rem;
  line-height: 1;
}

.project-card-icon-carkeeper::before {
  content: "C";
  font-family: var(--font-display);
  font-weight: var(--weight-heading);
}

.project-card-icon-youtube {
  background: var(--coral-tint);
  color: var(--color-coral-deep);
}

.project-card-icon-youtube::before {
  content: "B";
  font-family: var(--font-display);
  font-weight: var(--weight-heading);
}

.project-card-icon-music {
  background: var(--teal-tint);
}

.project-card-icon-music::before {
  content: "V";
  font-family: var(--font-display);
  font-weight: var(--weight-heading);
}

.compact-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-7);
  margin: var(--space-18) var(--space-0) var(--space-0);
  padding: var(--space-0);
  list-style: none;
}

.compact-tags li {
  padding: var(--space-6) var(--space-9);
  border: var(--border-width) solid var(--line);
  border-radius: var(--radius-pill);
  color: var(--muted);
  font-size: var(--text-chip);
  line-height: var(--leading-ui);
}

.secondary-links {
  margin-top: var(--space-20);
}

.small-actions .button,
.small-actions .button-disabled {
  min-height: var(--control-height-small);
  padding: var(--space-9) var(--space-12);
  font-size: var(--text-button-small);
}

.inline-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-12);
  margin-top: var(--space-16);
  font-size: var(--text-button-small);
}

.inline-links a {
  color: var(--muted);
  text-decoration-color: var(--text-underline-muted);
  text-underline-offset: var(--underline-offset);
}

.inline-links a:hover,
.inline-links a:focus-visible {
  color: var(--teal-deep);
}

.project-card-media {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  display: block;
  width: 100%;
  min-height: 0;
  aspect-ratio: var(--project-media-ratio);
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: hidden;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(0deg, black 0 62%, transparent 100%);
  mask-image: linear-gradient(0deg, black 0 62%, transparent 100%);
}

.project-card-media img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 0;
  object-fit: cover;
}

.project-card-media-carkeeper,
.project-card-media-youtube,
.project-card-media-music {
  transform: translateY(7%);
}

.contact-band {
  background: var(--paper);
}

.contact-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--space-24);
  align-items: end;
  padding-top: var(--space-4);
}

.contact-panel h2 {
  margin: var(--space-0);
  color: var(--ink-strong);
  font-family: var(--font-display);
  font-size: var(--text-section-title);
  font-weight: var(--weight-heading);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-none);
}

.contact-panel p:last-child {
  max-width: var(--contact-copy-width);
  margin: var(--space-14) var(--space-0) var(--space-0);
  color: var(--muted);
  line-height: var(--leading-copy);
}

.store-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: var(--space-12);
}

.google-play-badge,
.app-store-badge {
  display: inline-flex;
  width: var(--store-badge-width);
  aspect-ratio: var(--store-badge-ratio);
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-store-badge);
  color: inherit;
  text-decoration: none;
}

.google-play-badge img,
.app-store-badge img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.ios-store-group {
  display: inline-flex;
  width: var(--store-badge-width);
  flex-direction: column;
  gap: var(--space-6);
}

.app-store-badge.is-disabled {
  cursor: not-allowed;
  opacity: var(--store-disabled-opacity);
}

.store-note {
  padding-left: var(--space-1);
  color: var(--muted);
  font-size: var(--text-note);
  line-height: var(--leading-comfort);
}

.legal-page {
  width: var(--container-width);
  margin: var(--space-0) auto;
  padding: var(--space-legal-page-top) var(--space-0) var(--space-legal-page-bottom);
  background: var(--paper);
}

.legal-page article {
  width: 100%;
}

.legal-document {
  width: 100%;
  color: var(--ink);
}

.legal-page .legal-document#russian {
  display: none;
}

html[data-site-lang="en"] .legal-page .legal-document#english {
  display: block;
}

html[data-site-lang="en"] .legal-page .legal-document#russian {
  display: none;
}

html[data-site-lang="ru"] .legal-page .legal-document#english {
  display: none;
}

html[data-site-lang="ru"] .legal-page .legal-document#russian {
  display: block;
}

.legal-document-header {
  padding-bottom: var(--space-legal-block-y);
  border-bottom: var(--border-width) solid var(--line);
}

.legal-document h1 {
  max-width: var(--document-title-width);
  margin: var(--space-0);
  color: var(--ink-strong);
  font-family: var(--font-display);
  font-size: var(--text-document-title);
  font-weight: var(--weight-label);
  line-height: var(--leading-document-title);
  letter-spacing: var(--tracking-none);
}

.legal-document-description {
  max-width: var(--document-text-width);
  margin: var(--space-18) var(--space-0) var(--space-0);
  color: var(--muted);
  font-size: var(--text-copy-lg);
  line-height: var(--leading-body);
}

.legal-meta-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-24) var(--space-30);
  margin: var(--space-30) var(--space-0) var(--space-0);
  padding: var(--space-0);
}

.legal-meta-list div {
  min-width: min(var(--document-meta-width), 100%);
}

.legal-meta-list .document-meta-wide {
  flex: 1 1 var(--document-meta-wide-width);
  min-width: min(var(--document-meta-wide-width), 100%);
}

.legal-meta-list dt {
  color: var(--muted);
  font-size: var(--text-label-small);
  font-weight: var(--weight-button);
  line-height: var(--leading-ui);
  text-transform: uppercase;
  letter-spacing: var(--tracking-meta);
}

.legal-meta-list dd {
  margin: var(--space-8) var(--space-0) var(--space-0);
  color: var(--ink);
  font-size: var(--text-meta);
  line-height: var(--leading-meta);
  overflow-wrap: anywhere;
}

.legal-meta-list .document-meta-wide dd {
  margin-top: var(--space-12);
}

.legal-meta-list .store-badges {
  gap: var(--space-12);
}

.legal-document-content {
  display: grid;
}

.legal-section {
  display: grid;
  grid-template-columns: minmax(var(--legal-section-label-width), var(--legal-section-label-track)) minmax(0, 1fr);
  gap: var(--space-24) clamp(var(--space-44), 7vw, var(--space-76));
  padding: var(--space-legal-block-y) var(--space-0);
  border-top: var(--border-width) solid var(--line-soft);
}

.legal-document-content .legal-section:first-child {
  border-top: 0;
}

.legal-section-header h2 {
  margin: var(--space-0);
  color: var(--ink-strong);
  font-family: var(--font-display);
  font-size: var(--text-document-section-title);
  font-weight: var(--weight-button);
  line-height: var(--leading-document-section-title);
  letter-spacing: var(--tracking-none);
}

.legal-section-header p {
  margin: var(--space-10) var(--space-0) var(--space-0);
  color: var(--muted);
  font-size: var(--text-meta);
  line-height: var(--leading-copy-compact);
}

.legal-section-body {
  max-width: var(--document-text-width);
}

.legal-section-body p,
.legal-section-body li {
  color: var(--ink);
  font-size: var(--text-copy-md);
  line-height: var(--leading-copy-loose);
}

.legal-section-body p {
  margin: var(--space-0) var(--space-0) var(--space-14);
}

.legal-section-body p:last-child {
  margin-bottom: 0;
}

.legal-section-body ul {
  margin: var(--space-0);
  padding: var(--space-0) var(--space-0) var(--space-0) var(--list-indent);
}

.legal-section-body li {
  margin: var(--space-0);
  padding-left: var(--list-marker-gap);
}

.legal-section-body li + li {
  margin-top: var(--space-10);
}

.document-feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-12);
  margin-top: var(--space-22);
}

.document-feature-card {
  min-width: 0;
  padding: var(--space-16);
  border: var(--border-width) solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.document-feature-card h3 {
  margin: var(--space-0);
  color: var(--ink-strong);
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: var(--weight-label);
  line-height: var(--leading-comfort);
  letter-spacing: var(--tracking-none);
}

.document-feature-card p {
  margin: var(--space-8) var(--space-0) var(--space-0);
  color: var(--muted);
  font-size: var(--text-copy-sm);
  line-height: var(--leading-copy-compact);
}

.document-callout {
  padding: var(--space-18) var(--space-20);
  border: var(--border-width) solid var(--teal-border-soft);
  border-radius: var(--radius);
  background: var(--teal-tint-subtle);
}

.document-feature-grid + .document-callout,
.document-callout + .document-feature-grid {
  margin-top: var(--space-16);
}

.document-callout p {
  color: var(--ink);
}

.legal-section-body .store-badges {
  margin-top: var(--space-2);
}

.legal-page a {
  color: var(--teal-deep);
  text-decoration-thickness: var(--underline-thickness);
  text-underline-offset: var(--underline-offset);
}

.legal-page code {
  padding: var(--code-padding-y) var(--code-padding-x);
  border-radius: var(--radius-code);
  background: var(--teal-tint);
  color: var(--teal-deep);
  font-family: var(--font-mono);
  font-size: var(--code-font-size);
}

.footer {
  flex: 0 0 auto;
  margin-top: auto;
  background: var(--night);
  color: var(--footer-text);
}

.footer .container {
  display: grid;
  grid-template-columns: minmax(0, var(--footer-brand-track)) minmax(0, var(--footer-nav-track));
  gap: var(--space-footer-grid);
  padding: var(--space-footer-y) var(--space-0);
}

.footer-brand {
  display: grid;
  gap: var(--space-12);
  align-content: start;
}

.footer-brand strong {
  color: var(--cream);
  font-size: 1.06rem;
}

.footer-brand span,
.footer-brand a {
  color: var(--footer-copy);
  font-size: var(--text-meta);
}

.footer a {
  text-decoration: none;
}

.footer a:hover,
.footer a:focus-visible {
  color: var(--cream);
  outline: none;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-28);
}

.footer-grid div {
  display: grid;
  gap: var(--space-10);
  align-content: start;
}

.footer-grid h2 {
  margin: var(--space-0) var(--space-0) var(--space-4);
  color: var(--footer-heading);
  font-size: var(--text-label);
  font-weight: var(--weight-strong-heading);
  line-height: var(--leading-ui);
  text-transform: uppercase;
  letter-spacing: var(--tracking-label);
}

.footer-grid a {
  color: var(--footer-link);
  font-size: var(--text-button);
  line-height: var(--leading-footer);
}

@media (max-width: 980px) {
  .home-hero-grid {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    order: 1;
  }

  .hero-portrait {
    order: 2;
    width: min(var(--portrait-width-tablet), 100%);
    justify-self: start;
  }

  .project-shelf {
    grid-template-columns: 1fr;
  }

  .project-card {
    min-height: var(--project-card-min-height);
  }
}

@media (max-width: 760px) {
  :root {
    --header-height: var(--header-height-mobile);
    --store-badge-width: min(
      var(--store-badge-width-base),
      calc((100vw - (var(--gutter) * 2) - var(--space-12)) / 2)
    );
    --text-body-size: var(--text-body-size-mobile);
  }

  .nav {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "brand language"
      "links links";
    gap: var(--space-10) var(--space-12);
    padding: var(--space-18) var(--space-0);
  }

  .brand {
    grid-area: brand;
  }

  .language-switcher {
    grid-area: language;
  }

  .nav-links {
    grid-area: links;
    justify-content: flex-start;
    gap: var(--space-4);
    overflow-x: auto;
    scrollbar-width: none;
  }

  .nav-links::-webkit-scrollbar {
    display: none;
  }

  .nav-links > a,
  .nav-links .external-link {
    min-height: var(--nav-link-height-mobile);
    padding: var(--space-8) var(--space-10);
    font-size: var(--text-nav-mobile);
  }

  .app-subnav .container {
    min-height: var(--app-subnav-height-mobile);
  }

  .hero {
    min-height: auto;
  }

  .hero-inner {
    padding: var(--space-58) var(--space-0) var(--space-68);
  }

  .hero-copy h1 {
    max-width: 8ch;
    font-size: var(--text-hero-mobile);
  }

  .hero-lede {
    margin-top: var(--space-20);
  }

  .hero-portrait {
    width: var(--portrait-width-mobile);
  }

  .hero-portrait::before {
    inset: var(--space-12) calc(var(--space-12) * -1) calc(var(--space-12) * -1) var(--space-12);
  }

  .section-heading,
  .about-editorial,
  .contact-panel,
  .legal-section {
    grid-template-columns: 1fr;
  }

  .section-heading {
    gap: var(--space-14);
  }

  .about-editorial > p {
    padding-left: var(--space-0);
    border-left: 0;
  }

  .legal-page {
    padding: var(--space-42) var(--space-0) var(--space-68);
  }

  .legal-document h1 {
    max-width: 100%;
    font-size: var(--text-document-title-mobile);
  }

  .legal-document-description,
  .legal-section-body p,
  .legal-section-body li {
    font-size: 1rem;
  }

  .legal-meta-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-12);
  }

  .document-feature-grid {
    grid-template-columns: 1fr;
  }

  .footer .container,
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 430px) {
  .actions,
  .small-actions,
  .store-badges {
    width: 100%;
  }

  .actions .button,
  .small-actions .button,
  .small-actions .button-disabled {
    width: 100%;
  }
}
