:root {
  --espresso: #1a1612;
  --black-coffee: #120f0c;
  --coffee: #2d2418;
  --tobacco: #4a3f2e;
  --brown: #6f563e;
  --bronze: #8b7355;
  --sand: #c4b49a;
  --cream: #f5f0e6;
  --sepia: #d4c5a9;
  --amber: #d4a574;
  --parchment: #e8dcc8;
  --cyan: #5f8a8b;
  --rust: #a34e32;
  --green: #8fa36c;
  --line: rgba(212, 165, 116, 0.24);
  --line-strong: rgba(212, 165, 116, 0.48);
  --muted: rgba(245, 240, 230, 0.66);
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.38);
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
  --display: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --sans: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--espresso);
  color: var(--cream);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100dvh;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 14%, rgba(95, 138, 139, 0.14), transparent 27%),
    radial-gradient(circle at 84% 72%, rgba(163, 78, 50, 0.16), transparent 28%),
    linear-gradient(135deg, var(--espresso), var(--black-coffee) 52%, var(--coffee));
  color: var(--cream);
  font-family: var(--sans);
  letter-spacing: 0;
}

body.content-loading #projectGrid,
body.content-loading [data-managed] {
  opacity: 0.45;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.noise-layer,
.scanline-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.noise-layer {
  z-index: 100;
  opacity: 0.055;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 220 220' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.75' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

.scanline-layer {
  z-index: 99;
  opacity: 0.22;
  background:
    linear-gradient(to bottom, transparent 50%, rgba(0, 0, 0, 0.16) 51%, transparent 52%);
  background-size: 100% 5px;
}

.app-shell {
  position: fixed;
  inset: 0;
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  overflow: hidden;
}

.side-rail {
  position: relative;
  z-index: 30;
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-width: 0;
  border-right: 1px solid var(--line);
  background: rgba(18, 15, 12, 0.82);
  backdrop-filter: blur(18px);
}

.rail-brand {
  display: grid;
  gap: 10px;
  justify-items: center;
  padding: 18px 10px;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 9px;
  line-height: 1.2;
  color: var(--sepia);
  text-align: center;
  text-transform: uppercase;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border: 1px solid var(--amber);
  background:
    linear-gradient(135deg, transparent 38%, rgba(212, 165, 116, 0.55) 39% 43%, transparent 44%),
    radial-gradient(circle, var(--amber) 0 2px, transparent 3px),
    var(--coffee);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%);
}

.node-map {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 14px 0;
}

.node-link {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 7px;
  width: 100%;
  color: rgba(245, 240, 230, 0.42);
  transition: color 160ms ease;
}

.node-link span {
  width: max-content;
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1;
  text-transform: uppercase;
  transform: rotate(-90deg);
  transform-origin: center;
}

.node-link i {
  width: 9px;
  height: 9px;
  border: 1px solid currentColor;
  border-radius: 50%;
  transition: background 160ms ease, box-shadow 160ms ease;
}

.node-link:hover,
.node-link.active {
  color: var(--amber);
}

.node-link.active i {
  background: var(--amber);
  box-shadow: 0 0 14px rgba(212, 165, 116, 0.7);
}

.rail-footer {
  display: grid;
  gap: 8px;
  padding: 16px 8px;
  border-top: 1px solid var(--line);
  color: rgba(245, 240, 230, 0.35);
  font-family: var(--mono);
  font-size: 8px;
  text-align: center;
}

.system-bar {
  position: fixed;
  z-index: 28;
  top: 0;
  right: 0;
  left: 92px;
  min-height: 64px;
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 22px;
  padding: 14px 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(18, 15, 12, 0.72);
  backdrop-filter: blur(16px);
}

.status-line,
.top-links,
.bar-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1;
  text-transform: uppercase;
}

.status-line {
  color: var(--amber);
}

.status-line .desktop-only {
  color: rgba(245, 240, 230, 0.38);
}

.status-dot {
  width: 7px;
  height: 7px;
  display: inline-block;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 10px var(--green);
}

.top-links {
  color: rgba(245, 240, 230, 0.62);
}

.top-links a:hover {
  color: var(--amber);
}

.bar-cta,
.button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid var(--line);
  padding: 13px 18px;
  border-radius: 0;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.1;
  text-transform: uppercase;
  cursor: pointer;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%);
  transition: transform 180ms ease, background 180ms ease, color 180ms ease, border-color 180ms ease;
}

.bar-cta,
.button.primary {
  border-color: var(--amber);
  background: var(--amber);
  color: var(--espresso);
}

.button.secondary {
  background: rgba(45, 36, 24, 0.44);
  color: var(--cream);
}

.bar-cta:hover,
.button:hover {
  transform: translateY(-2px);
}

.button.secondary:hover {
  border-color: var(--amber);
  background: rgba(74, 63, 46, 0.7);
}

.snap-container {
  grid-column: 2;
  height: 100dvh;
  overflow: hidden;
  overflow-x: hidden;
  scroll-snap-type: y mandatory;
  scrollbar-width: thin;
  scrollbar-color: var(--tobacco) transparent;
}

.snap-container::-webkit-scrollbar {
  width: 5px;
}

.snap-container::-webkit-scrollbar-track {
  background: transparent;
}

.snap-container::-webkit-scrollbar-thumb {
  background: var(--tobacco);
}

.snap-section {
  position: relative;
  height: 100dvh;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  overflow: hidden;
  padding: 76px clamp(20px, 3vw, 52px) 24px;
  border-bottom: 1px solid rgba(212, 165, 116, 0.13);
}

.screen-inner {
  position: relative;
  z-index: 2;
  width: min(1120px, 100%);
  height: calc(100dvh - 100px);
  margin: 0 auto;
  display: grid;
  align-content: center;
}

.screen-inner.wide {
  width: min(1280px, 100%);
}

.split-layout {
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: clamp(28px, 5vw, 78px);
  align-items: center;
}

.chaos-grid {
  position: absolute;
  inset: 0;
  opacity: 0.16;
  background-image: radial-gradient(rgba(196, 180, 154, 0.35) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: radial-gradient(circle at center, #000, transparent 75%);
}

.eyebrow,
.section-label,
.file-tag,
.state-tag {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.2;
  color: var(--amber);
  text-transform: uppercase;
}

.section-label::before,
.eyebrow::before {
  content: "";
  width: 24px;
  height: 1px;
  background: currentColor;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1,
h2 {
  max-width: 980px;
  font-family: var(--display);
  font-weight: 800;
  line-height: 0.98;
}

h1 {
  margin-top: 18px;
  font-size: clamp(46px, 5.2vw, 78px);
  font-style: normal;
  letter-spacing: 0;
}

.mobile-break {
  display: none;
}

h2 {
  font-size: clamp(34px, 4vw, 62px);
  font-style: normal;
  letter-spacing: 0;
}

h3 {
  font-size: 20px;
  line-height: 1.15;
}

p {
  color: var(--muted);
  line-height: 1.65;
}

.hero-layout {
  position: relative;
  z-index: 2;
  width: min(1240px, 100%);
  height: calc(100dvh - 100px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(390px, 0.96fr);
  gap: clamp(28px, 5vw, 78px);
  align-items: center;
}

.hero-copy {
  min-width: 0;
}

.crossed {
  color: var(--amber);
  text-decoration: line-through;
  text-decoration-color: var(--rust);
  text-decoration-thickness: 0.08em;
}

.accent-underline {
  position: relative;
  color: var(--cream);
}

.accent-underline::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.02em;
  height: 0.11em;
  background: rgba(212, 165, 116, 0.34);
  transform: skewX(-16deg);
}

.hero-text {
  max-width: 660px;
  margin-top: 20px;
  font-size: 16px;
}

.hero-actions,
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.proof-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.proof-strip span {
  padding: 7px 10px;
  border: 1px solid rgba(212, 165, 116, 0.2);
  background: rgba(26, 22, 18, 0.55);
  color: rgba(245, 240, 230, 0.54);
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
}

.hero-collage {
  position: relative;
  min-height: 500px;
}

.author-photo,
.identity-photo {
  position: relative;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background:
    linear-gradient(135deg, rgba(212, 165, 116, 0.08), transparent),
    var(--coffee);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 22px), calc(100% - 22px) 100%, 0 100%);
}

.author-photo {
  position: absolute;
  inset: 34px 28px 46px 64px;
  box-shadow: var(--shadow);
  transform: rotate(1.5deg);
}

.author-photo::before,
.identity-photo::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(to bottom, transparent 50%, rgba(0, 0, 0, 0.16) 51%, transparent 52%),
    radial-gradient(circle at 70% 20%, rgba(212, 165, 116, 0.16), transparent 32%);
  background-size: 100% 4px, auto;
  pointer-events: none;
  mix-blend-mode: multiply;
}

.author-photo img,
.identity-photo img {
  width: 100%;
  height: 100%;
  min-height: 100%;
  object-fit: cover;
  filter: sepia(0.24) saturate(0.88) contrast(1.06);
  opacity: 0;
  transition: opacity 220ms ease;
}

.photo-ready img,
.identity-photo img[src] {
  opacity: 1;
}

.collage-chip,
.route-board,
.floating-label {
  position: absolute;
  z-index: 3;
  border: 1px solid var(--line);
  background: rgba(232, 220, 200, 0.94);
  color: var(--espresso);
  box-shadow: 7px 7px 0 rgba(18, 15, 12, 0.75);
}

.collage-chip {
  width: min(260px, 58%);
  padding: 15px;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.45;
}

.collage-chip span {
  display: block;
  margin-bottom: 8px;
  color: var(--rust);
  font-size: 10px;
  font-weight: 800;
}

.collage-chip p {
  color: rgba(26, 22, 18, 0.78);
}

.chip-before {
  left: 0;
  top: 86px;
  transform: rotate(-5deg);
}

.chip-after {
  right: 0;
  bottom: 118px;
  transform: rotate(4deg);
}

.route-board {
  left: 30px;
  right: 44px;
  bottom: 4px;
  padding: 16px;
  background: rgba(45, 36, 24, 0.92);
  color: var(--cream);
  box-shadow: 7px 7px 0 rgba(212, 165, 116, 0.16);
  transform: rotate(-2deg);
}

.route-nodes {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 12px;
}

.route-nodes::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 12%;
  right: 12%;
  height: 1px;
  background: var(--line-strong);
}

.route-nodes span {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  min-height: 42px;
  border: 1px solid var(--line);
  background: var(--espresso);
  color: var(--amber);
  font-family: var(--mono);
  font-size: 10px;
}

.route-board strong {
  font-family: var(--mono);
  font-size: 11px;
  color: rgba(245, 240, 230, 0.7);
}

.floating-label {
  padding: 7px 10px;
  background: var(--espresso);
  color: var(--amber);
  font-family: var(--mono);
  font-size: 9px;
}

.label-a {
  top: 24px;
  right: 24px;
}

.label-b {
  bottom: 76px;
  left: 4px;
  color: var(--cyan);
}

.identity-card {
  position: relative;
  min-height: 500px;
  padding: 18px;
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at 18% 10%, rgba(95, 138, 139, 0.13), transparent 28%),
    rgba(45, 36, 24, 0.58);
  box-shadow: var(--shadow);
}

.file-tag {
  position: absolute;
  z-index: 3;
  top: 18px;
  left: 18px;
  padding: 7px 10px;
  background: rgba(212, 165, 116, 0.18);
  border: 1px solid rgba(212, 165, 116, 0.35);
}

.identity-photo {
  height: 320px;
}

.identity-facts {
  display: grid;
  gap: 1px;
  margin-top: 18px;
  background: rgba(212, 165, 116, 0.18);
  border: 1px solid var(--line);
}

.identity-facts div {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 14px;
  align-items: center;
  padding: 14px;
  background: var(--parchment);
  color: var(--espresso);
}

.identity-facts strong {
  font-family: var(--display);
  font-size: 46px;
  line-height: 1;
}

.identity-facts span {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.35;
  text-transform: uppercase;
}

.manifest {
  display: grid;
  gap: 24px;
}

.manifest h2 {
  font-size: clamp(34px, 4vw, 58px);
}

.manifest p {
  max-width: 670px;
  font-size: 15px;
}

.manifest-list {
  display: grid;
  gap: 12px;
  max-width: 560px;
}

.manifest-list span {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  color: rgba(245, 240, 230, 0.78);
  font-family: var(--mono);
  font-size: 12px;
}

.section-heading {
  display: grid;
  gap: 14px;
  margin-bottom: 32px;
}

.chaos-switch {
  display: grid;
  grid-template-columns: 1fr;
  min-height: 360px;
  border: 1px solid var(--line);
  background: rgba(18, 15, 12, 0.45);
  box-shadow: var(--shadow);
}

.chaos-panel,
.system-panel {
  position: relative;
  overflow: hidden;
  padding: clamp(20px, 3vw, 38px);
}

.chaos-panel {
  background:
    radial-gradient(circle at 20% 20%, rgba(163, 78, 50, 0.17), transparent 34%),
    linear-gradient(rgba(212, 165, 116, 0.04), rgba(212, 165, 116, 0.04)),
    repeating-linear-gradient(90deg, transparent 0 20px, rgba(196, 180, 154, 0.06) 21px);
}

.system-panel {
  display: none;
  background:
    radial-gradient(circle at 70% 24%, rgba(95, 138, 139, 0.17), transparent 36%),
    rgba(26, 22, 18, 0.58);
}

.state-tag {
  position: absolute;
  z-index: 3;
  top: 18px;
  padding: 7px 12px;
  color: var(--cream);
}

.state-tag.danger {
  left: 18px;
  background: var(--rust);
}

.state-tag.ok {
  right: 18px;
  background: var(--amber);
  color: var(--espresso);
}

.chaos-node {
  position: absolute;
  z-index: 2;
  padding: 11px 12px;
  border: 1px solid rgba(245, 240, 230, 0.18);
  background: rgba(245, 240, 230, 0.07);
  color: rgba(245, 240, 230, 0.72);
  font-family: var(--mono);
  font-size: 10px;
  transition: opacity 260ms ease, transform 320ms ease;
}

.node-a { top: 96px; left: 12%; transform: rotate(10deg); }
.node-b { top: 44%; right: 11%; transform: rotate(-7deg); }
.node-c { bottom: 24%; left: 9%; transform: rotate(-3deg); }
.node-d { bottom: 18%; right: 22%; transform: rotate(4deg); }

.chaos-panel p {
  position: absolute;
  left: 36px;
  right: 36px;
  bottom: 36px;
  font-family: var(--mono);
  font-size: 12px;
}

.chaos-switch.system-mode .chaos-panel {
  display: none;
}

.chaos-switch.system-mode .system-panel {
  display: block;
}

.system-flow {
  display: grid;
  gap: 12px;
  padding-top: 42px;
}

.system-flow article {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(212, 165, 116, 0.22);
  background: rgba(18, 15, 12, 0.48);
}

.system-flow span {
  grid-row: span 2;
  color: var(--amber);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 800;
}

.system-flow strong {
  font-size: 16px;
}

.system-flow p {
  font-size: 12px;
  line-height: 1.45;
}

.mode-controls {
  position: relative;
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 18px;
}

.mode-button,
.filter {
  border: 1px solid var(--line);
  background: rgba(18, 15, 12, 0.45);
  color: rgba(245, 240, 230, 0.58);
  padding: 10px 14px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease;
}

.mode-button[data-mode="system"] {
  position: relative;
  border-color: rgba(212, 165, 116, 0.78);
  box-shadow:
    0 0 0 2px rgba(212, 165, 116, 0.22),
    0 0 28px rgba(212, 165, 116, 0.16);
}

.mode-button[data-mode="system"]::before {
  content: "нажми";
  position: absolute;
  right: -38px;
  top: -44px;
  padding: 5px 7px;
  border: 1px solid rgba(212, 165, 116, 0.52);
  background: rgba(18, 15, 12, 0.86);
  color: var(--amber);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
  transform: rotate(-8deg);
  pointer-events: none;
}

.mode-button[data-mode="system"]::after {
  content: "↙";
  position: absolute;
  right: 8px;
  top: -34px;
  color: var(--amber);
  font-family: var(--mono);
  font-size: 30px;
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 0 18px rgba(212, 165, 116, 0.3);
  pointer-events: none;
}

.chaos-switch.system-mode + .mode-controls .mode-button[data-mode="system"]::before,
.chaos-switch.system-mode + .mode-controls .mode-button[data-mode="system"]::after {
  display: none;
}

.mode-button.active,
.filter.active,
.filter:hover,
.mode-button:hover {
  border-color: var(--amber);
  background: rgba(212, 165, 116, 0.18);
  color: var(--amber);
}

.archive-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
  margin-bottom: 18px;
}

.archive-head h2 {
  margin-top: 8px;
}

.archive-head p {
  max-width: 640px;
  margin-top: 10px;
  font-size: 14px;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.project-grid {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 6px 4px 18px;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: var(--amber) rgba(245, 240, 230, 0.08);
}

.project-grid::-webkit-scrollbar {
  height: 8px;
}

.project-grid::-webkit-scrollbar-track {
  background: rgba(245, 240, 230, 0.08);
}

.project-grid::-webkit-scrollbar-thumb {
  background: linear-gradient(90deg, var(--amber), var(--bronze));
  border-radius: 999px;
}

.project-card {
  position: relative;
  flex: 0 0 min(360px, 31vw);
  min-height: 330px;
  display: grid;
  grid-template-rows: 170px 1fr;
  scroll-snap-align: start;
  overflow: hidden;
  border: 1px solid var(--line);
  background: rgba(45, 36, 24, 0.62);
  color: var(--cream);
  cursor: pointer;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 18px), calc(100% - 18px) 100%, 0 100%);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.project-card::before {
  content: attr(data-file);
  position: absolute;
  z-index: 3;
  top: 12px;
  left: 12px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  background: rgba(18, 15, 12, 0.74);
  color: var(--amber);
  font-family: var(--mono);
  font-size: 9px;
}

.project-card:hover {
  transform: translateY(-6px) rotate(var(--tilt, 0deg));
  border-color: var(--amber);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
}

.project-image {
  position: relative;
  overflow: hidden;
  background: var(--coffee);
}

.project-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, transparent 50%, rgba(0, 0, 0, 0.18) 51%, transparent 52%),
    linear-gradient(0deg, rgba(26, 22, 18, 0.66), transparent 46%);
  background-size: 100% 4px, auto;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: sepia(0.24) saturate(0.82);
  transition: transform 450ms ease;
}

.project-card:hover .project-image img {
  transform: scale(1.06);
}

.project-content {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 18px;
}

.project-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: rgba(245, 240, 230, 0.48);
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
}

.project-content h3 {
  font-family: var(--display);
  font-size: 28px;
  font-style: normal;
  letter-spacing: 0;
}

.project-content p {
  font-size: 12px;
  line-height: 1.55;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.project-tags span {
  padding: 6px 8px;
  border: 1px solid rgba(212, 165, 116, 0.18);
  background: rgba(18, 15, 12, 0.58);
  color: rgba(245, 240, 230, 0.64);
  font-family: var(--mono);
  font-size: 9px;
  text-transform: uppercase;
}

.bots-copy {
  display: grid;
  gap: 20px;
}

.bots-copy h2 {
  font-size: clamp(34px, 4vw, 58px);
}

.bot-metrics {
  display: grid;
  gap: 1px;
  border: 1px solid var(--line);
  background: rgba(212, 165, 116, 0.16);
}

.bot-metrics div {
  padding: 16px;
  background: rgba(18, 15, 12, 0.72);
}

.bot-metrics strong {
  display: block;
  margin-bottom: 5px;
  color: var(--amber);
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
}

.bot-metrics span {
  color: rgba(245, 240, 230, 0.6);
  font-size: 13px;
}

.bot-console {
  position: relative;
  min-height: 420px;
  padding: 24px;
  border: 1px solid var(--line-strong);
  background:
    radial-gradient(circle at 74% 14%, rgba(95, 138, 139, 0.18), transparent 30%),
    rgba(18, 15, 12, 0.72);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.bot-console::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.13;
  background-image: radial-gradient(var(--sand) 1px, transparent 1px);
  background-size: 18px 18px;
}

.console-top {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
  color: var(--amber);
  font-family: var(--mono);
  font-size: 11px;
}

.console-lines {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 16px;
  margin-top: 34px;
  font-family: var(--mono);
  font-size: 13px;
  color: rgba(245, 240, 230, 0.78);
}

.console-lines span:nth-child(2n) {
  color: var(--green);
}

.message-stack {
  position: absolute;
  right: 24px;
  bottom: 24px;
  left: 24px;
  z-index: 1;
  display: grid;
  gap: 8px;
}

.message-stack div {
  padding: 12px;
  border: 1px solid rgba(212, 165, 116, 0.18);
  background: rgba(45, 36, 24, 0.92);
  color: rgba(245, 240, 230, 0.72);
  font-family: var(--mono);
  font-size: 11px;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.service-card {
  min-height: 260px;
  display: grid;
  align-content: space-between;
  gap: 18px;
  padding: 22px;
  border: 1px solid var(--line);
  background: rgba(45, 36, 24, 0.58);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 15px), calc(100% - 15px) 100%, 0 100%);
}

.service-card span,
.service-card b {
  color: var(--amber);
  font-family: var(--mono);
  font-size: 10px;
}

.service-card h3 {
  font-family: var(--display);
  font-size: 26px;
  font-style: normal;
  letter-spacing: 0;
}

.service-card p {
  font-size: 13px;
}

.process-intro {
  display: grid;
  gap: 18px;
}

.terminal-note {
  display: grid;
  gap: 8px;
  max-width: 430px;
  padding: 18px;
  border: 1px solid var(--line);
  background: rgba(18, 15, 12, 0.62);
  color: var(--green);
  font-family: var(--mono);
  font-size: 12px;
}

.work-steps {
  position: relative;
  display: grid;
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.work-steps::before {
  content: "";
  position: absolute;
  top: 12px;
  bottom: 12px;
  left: 19px;
  width: 1px;
  background: var(--line);
}

.work-steps li {
  position: relative;
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 12px;
  padding-left: 0;
}

.work-steps span {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--amber);
  background: var(--espresso);
  color: var(--amber);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 800;
}

.work-steps strong {
  align-self: end;
  font-size: 20px;
}

.work-steps p {
  grid-column: 2;
  font-size: 13px;
}

.contact-screen {
  display: grid;
  place-items: center;
}

.contact-card {
  width: min(920px, 100%);
  display: grid;
  justify-items: center;
  gap: 24px;
  text-align: center;
}

.contact-card .section-label {
  padding: 8px 12px;
  background: var(--amber);
  color: var(--espresso);
}

.contact-card .section-label::before {
  display: none;
}

.contact-card h2 {
  font-size: clamp(54px, 7vw, 100px);
}

.contact-card p {
  max-width: 680px;
}

.footer-signal {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
  margin-top: 28px;
  color: rgba(245, 240, 230, 0.28);
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
}

.mobile-nav {
  display: none;
}

.project-modal {
  width: min(1120px, calc(100% - 28px));
  max-height: calc(100dvh - 38px);
  padding: 0;
  border: 1px solid var(--amber);
  background: var(--coffee);
  color: var(--cream);
  box-shadow: var(--shadow);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 22px), calc(100% - 22px) 100%, 0 100%);
}

.project-modal::backdrop {
  background: rgba(18, 15, 12, 0.78);
  backdrop-filter: blur(12px);
}

.modal-close {
  position: absolute;
  z-index: 4;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  background: rgba(18, 15, 12, 0.86);
  color: var(--amber);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.modal-body {
  max-height: calc(100dvh - 38px);
  overflow: auto;
}

.modal-hero {
  display: grid;
  grid-template-columns: minmax(300px, 0.9fr) minmax(0, 1.1fr);
  gap: 28px;
  padding: 28px;
}

.modal-preview {
  align-self: start;
  position: sticky;
  top: 24px;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--espresso);
}

.modal-browser-bar {
  height: 38px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 12px;
  border-bottom: 1px solid var(--line);
}

.modal-browser-bar span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(212, 165, 116, 0.42);
}

.modal-preview-stage {
  min-height: 430px;
  max-height: min(66dvh, 680px);
  display: grid;
  place-items: center;
  overflow: auto;
}

.modal-preview-stage img {
  width: 100%;
  min-height: 100%;
  object-fit: cover;
  filter: sepia(0.22) saturate(0.86);
}

.modal-copy {
  align-self: center;
  display: grid;
  gap: 18px;
  padding-right: 34px;
}

.modal-copy h2 {
  font-size: clamp(42px, 4vw, 68px);
}

.modal-points {
  display: grid;
  gap: 10px;
}

.modal-points div {
  padding: 14px;
  border: 1px solid rgba(212, 165, 116, 0.2);
  background: rgba(18, 15, 12, 0.48);
}

.modal-points strong {
  display: block;
  margin-bottom: 5px;
  color: var(--amber);
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
}

.modal-points span {
  color: rgba(245, 240, 230, 0.67);
  font-size: 13px;
  line-height: 1.45;
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 520ms ease, transform 520ms ease;
}

.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1180px) {
  .project-grid {
    display: flex;
  }

  .service-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  body {
    height: 100dvh;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .side-rail,
  .system-bar .top-links,
  .system-bar .bar-cta,
  .desktop-only {
    display: none;
  }

  .system-bar {
    left: 0;
    min-height: 44px;
    grid-template-columns: 1fr;
    padding: 9px 16px;
    background: rgba(18, 15, 12, 0.62);
  }

  .snap-container {
    grid-column: 1;
    height: 100dvh;
    overflow: hidden;
    padding-bottom: 0;
    scroll-snap-type: y mandatory;
    scrollbar-width: none;
  }

  .snap-container::-webkit-scrollbar {
    display: none;
  }

  .snap-section {
    height: 100dvh;
    min-height: 0;
    padding: 48px 20px 66px;
    scroll-snap-align: start;
  }

  .screen-inner,
  .hero-layout {
    width: calc(100vw - 40px);
    max-width: 100%;
    margin-inline: auto;
    height: calc(100dvh - 114px);
    min-height: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .split-layout {
    display: flex;
    flex-direction: column;
    gap: 22px;
    align-items: stretch;
  }

  h1 {
    margin-top: 12px;
    font-size: clamp(26px, 7.6vw, 31px);
    line-height: 1.02;
  }

  .mobile-break {
    display: block;
  }

  h2,
  .manifest h2,
  .bots-copy h2 {
    font-size: clamp(28px, 8.2vw, 38px);
    line-height: 1.05;
  }

  .eyebrow,
  .section-label {
    font-size: 9px;
  }

  .hero-layout {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .hero-copy {
    width: 100%;
    min-width: 0;
  }

  .hero-screen::after {
    content: "ХАОС";
    position: absolute;
    top: 56px;
    right: 14px;
    color: rgba(245, 240, 230, 0.07);
    font-family: var(--mono);
    font-size: 58px;
    font-weight: 900;
    pointer-events: none;
  }

  .hero-text {
    margin-top: 10px;
    font-size: 11px;
    line-height: 1.34;
    max-width: 315px;
    overflow-wrap: anywhere;
  }

  .hero-actions,
  .contact-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    width: 100%;
    max-width: 330px;
    margin-top: 16px;
  }

  .button {
    width: 100%;
    min-height: 38px;
    justify-content: space-between;
    padding: 11px 14px;
    font-size: 9px;
  }

  .proof-strip {
    display: none;
  }

  .hero-collage {
    width: 100%;
    min-height: 116px;
    order: -1;
  }

  .author-photo {
    inset: 0 auto 0 0;
    width: 112px;
    min-height: 116px;
    transform: rotate(-2deg);
  }

  .collage-chip {
    width: min(164px, 57%);
    padding: 7px;
    font-size: 7px;
    box-shadow: 4px 4px 0 rgba(18, 15, 12, 0.75);
  }

  .chip-before {
    left: auto;
    right: 0;
    top: 4px;
  }

  .chip-after {
    right: 4px;
    bottom: 2px;
  }

  .route-board,
  .floating-label {
    display: none;
  }

  .identity-card {
    display: none;
  }

  .identity-photo {
    height: 210px;
  }

  .identity-facts div {
    grid-template-columns: 48px 1fr;
    padding: 10px;
  }

  .identity-facts strong {
    font-size: 30px;
  }

  .identity-facts span {
    font-size: 8px;
  }

  .manifest {
    width: 100%;
    max-width: 330px;
    gap: 12px;
  }

  .manifest h2 {
    font-size: clamp(28px, 8vw, 34px);
  }

  .manifest p,
  .bots-copy p,
  .process-intro p {
    max-width: 315px;
    font-size: 11px;
    line-height: 1.45;
    overflow-wrap: anywhere;
  }

  .manifest-list span {
    font-size: 9px;
    padding: 8px 0;
  }

  .section-heading {
    width: 100%;
    max-width: 330px;
    margin-bottom: 18px;
  }

  .section-heading h2,
  .bots-copy h2 {
    max-width: 330px;
    overflow-wrap: anywhere;
  }

  .system-screen .section-heading {
    margin-bottom: 12px;
  }

  .system-screen .section-heading h2 {
    font-size: clamp(27px, 7.8vw, 34px);
    line-height: 1.04;
  }

  .services-screen .section-heading h2,
  .process-intro h2 {
    max-width: 330px;
    font-size: clamp(28px, 8vw, 34px);
    line-height: 1.05;
  }

  .process-screen .split-layout {
    width: 100%;
    max-width: 330px;
    gap: 12px;
  }

  .chaos-switch {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
    max-width: 330px;
    height: 220px;
    min-height: 0;
    flex: 0 0 auto;
  }

  .chaos-panel,
  .system-panel {
    height: 100%;
    min-height: 0;
    padding: 14px;
  }

  .chaos-panel {
    border-right: 0;
  }

  .system-panel {
    display: none;
  }

  .chaos-switch.system-mode .chaos-panel {
    display: none;
  }

  .chaos-switch.system-mode .system-panel {
    display: block;
  }

  .state-tag {
    top: 10px;
    font-size: 7px;
  }

  .state-tag.danger {
    left: 10px;
  }

  .state-tag.ok {
    right: 12px;
  }

  .chaos-node {
    padding: 7px;
    font-size: 7px;
  }

  .chaos-panel p {
    left: 14px;
    right: 14px;
    bottom: 14px;
    font-size: 9px;
    line-height: 1.35;
  }

  .system-flow {
    gap: 6px;
    padding-top: 28px;
  }

  .system-flow article {
    grid-template-columns: 28px 1fr;
    gap: 7px;
    padding: 7px;
  }

  .system-flow span {
    font-size: 9px;
  }

  .system-flow strong {
    font-size: 11px;
  }

  .system-flow p {
    display: none;
  }

  .mode-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
    max-width: 330px;
    gap: 8px;
  }

  .mode-button[data-mode="system"]::before {
    right: 3px;
    top: -42px;
    font-size: 8px;
  }

  .mode-button[data-mode="system"]::after {
    right: 42px;
    top: -31px;
    font-size: 26px;
  }

  .archive-head {
    display: grid;
    align-items: start;
    gap: 16px;
    margin-bottom: 16px;
  }

  .archive-head h2 {
    font-size: 32px;
  }

  .archive-head p {
    display: none;
  }

  .filters {
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 3px;
  }

  .filter {
    flex: 0 0 auto;
    border-radius: 999px;
    padding: 8px 12px;
  }

  .project-grid {
    gap: 12px;
    max-height: none;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 2px 4px 14px;
  }

  .project-card {
    flex: 0 0 74vw;
    min-height: 360px;
    grid-template-columns: 1fr;
    grid-template-rows: 142px 1fr;
  }

  .project-card::before {
    top: 8px;
    left: 8px;
    font-size: 7px;
  }

  .project-content {
    padding: 12px;
    gap: 8px;
  }

  .project-content h3 {
    font-size: 20px;
  }

  .project-content p {
    font-size: 10px;
  }

  .project-tags span {
    font-size: 7px;
    padding: 4px 5px;
  }

  .project-meta {
    font-size: 8px;
    display: grid;
    gap: 2px;
  }

  .bot-console {
    width: 100%;
    max-width: 330px;
    min-height: 0;
    padding: 12px;
  }

  .console-lines {
    margin-top: 14px;
    gap: 6px;
    font-size: 8px;
  }

  .console-lines span:nth-child(n + 4) {
    display: none;
  }

  .message-stack {
    display: none;
  }

  .bots-copy {
    width: 100%;
    max-width: 330px;
    gap: 10px;
  }

  .bots-copy h2 {
    font-size: clamp(27px, 7.7vw, 34px);
    line-height: 1.05;
  }

  .bot-metrics {
    grid-template-columns: 1fr;
    max-width: 330px;
  }

  .bot-metrics div {
    padding: 8px 10px;
  }

  .bot-metrics strong {
    margin-bottom: 2px;
    font-size: 9px;
  }

  .bot-metrics span {
    font-size: 9px;
    line-height: 1.35;
  }

  .service-grid {
    display: flex;
    grid-template-columns: none;
    max-height: none;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 10px;
    padding-bottom: 12px;
    scroll-snap-type: x mandatory;
  }

  .service-card {
    flex: 0 0 72vw;
    min-height: 250px;
    padding: 14px;
    scroll-snap-align: start;
  }

  .service-card h3 {
    font-size: 20px;
  }

  .service-card p {
    font-size: 10px;
    line-height: 1.42;
  }

  .service-card b,
  .service-card span {
    font-size: 8px;
  }

  .terminal-note {
    max-width: 315px;
    padding: 10px;
    font-size: 9px;
    gap: 5px;
  }

  .work-steps {
    gap: 8px;
  }

  .work-steps strong {
    font-size: 14px;
  }

  .work-steps p {
    display: none;
  }

  .contact-card {
    width: calc(100vw - 40px);
    max-width: 100%;
    margin-inline: auto;
    justify-items: stretch;
    text-align: left;
    gap: 14px;
  }

  .contact-card .section-label {
    justify-self: start;
  }

  .contact-card h2 {
    font-size: clamp(30px, 9.2vw, 38px);
    line-height: 1.04;
  }

  .contact-card p {
    max-width: 315px;
    font-size: 12px;
    line-height: 1.45;
    overflow-wrap: anywhere;
  }

  .contact-card .contact-actions {
    grid-template-columns: 1fr;
    margin-top: 4px;
  }

  .footer-signal {
    justify-content: flex-start;
    font-size: 8px;
    gap: 8px;
    margin-top: 4px;
  }

  .mobile-nav {
    position: fixed;
    z-index: 32;
    left: 10px;
    right: 10px;
    bottom: 8px;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 4px;
    padding: 8px;
    border: 1px solid var(--line);
    background: rgba(18, 15, 12, 0.9);
    backdrop-filter: blur(18px);
  }

  .mobile-nav-item {
    display: grid;
    justify-items: center;
    gap: 4px;
    color: rgba(245, 240, 230, 0.48);
  }

  .mobile-nav-item span {
    width: 16px;
    height: 16px;
    border: 1px solid currentColor;
    border-radius: 50%;
    background:
      linear-gradient(135deg, transparent 40%, currentColor 41% 48%, transparent 49%);
  }

  .mobile-nav-item b {
    font-family: var(--mono);
    font-size: 7px;
    font-weight: 700;
    line-height: 1;
    text-transform: uppercase;
  }

  .mobile-nav-item.active {
    color: var(--amber);
  }

  .mobile-nav-item.active span {
    background: var(--amber);
    box-shadow: 0 0 12px rgba(212, 165, 116, 0.52);
  }

  .project-modal {
    width: 100%;
    max-width: none;
    max-height: 90dvh;
    margin: auto 0 0;
    clip-path: none;
    border-width: 1px 0 0;
  }

  .modal-body {
    max-height: 90dvh;
  }

  .modal-hero {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 16px;
  }

  .modal-preview {
    position: relative;
    top: auto;
  }

  .modal-browser-bar {
    height: 30px;
  }

  .modal-preview-stage {
    min-height: 190px;
    max-height: 34dvh;
  }

  .modal-copy {
    padding-right: 0;
    gap: 14px;
  }

  .modal-copy h2 {
    font-size: 32px;
  }

  .modal-copy p {
    font-size: 12px;
  }

  .modal-points span {
    font-size: 11px;
  }

  .modal-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
}

@media (max-width: 420px) {
  .snap-section {
    padding-left: 16px;
    padding-right: 16px;
  }

  .screen-inner,
  .hero-layout,
  .contact-card {
    width: calc(100vw - 32px);
  }

  .status-line {
    font-size: 9px;
  }

  .hero-collage {
    min-height: 108px;
  }

  .author-photo {
    width: 104px;
    min-height: 108px;
  }

  .collage-chip {
    width: 61%;
  }

  .project-card {
    flex-basis: 74vw;
  }
}

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

  .reveal {
    opacity: 1;
    transform: none;
  }
}
