/* ============================================================
   Nikita Saltykov — personal site
   Derived artifact of Executive Leadership Blueprint (Vol. V).
   No build step. Self-hosted IBM Plex Sans (variable), no CDN.
   ============================================================ */

/* ---------- Font ---------- */
@font-face {
  font-family: "IBM Plex Sans";
  src: url("fonts/plex-sans-var-cyrillic.woff2") format("woff2");
  font-weight: 100 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("fonts/plex-sans-var-latin.woff2") format("woff2");
  font-weight: 100 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
                 U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
                 U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Tokens ---------- */
:root {
  --bg:        #0e0f11;
  --bg-2:      #141517;
  --bg-3:      #1a1c1f;
  --line:      rgba(255, 255, 255, 0.08);
  --line-2:    rgba(255, 255, 255, 0.16);
  --grid:      rgba(255, 255, 255, 0.045);

  --text:      #edece8;
  --muted:     #a7a8a4;
  --dim:       #82837e;

  --accent:    #e2b04a;
  --accent-2:  #f1c86a;
  --accent-ink:#141414;
  --glow:      rgba(226, 176, 74, 0.17);

  --font: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, "Noto Sans", sans-serif;

  --maxw:      1240px;
  --gutter:    32px;
  --topbar:    64px;
  --radius:    8px;
  --ease:      cubic-bezier(.2, .7, .2, 1);
}

html[data-theme="light"] {
  --bg:        #f4f4f2;
  --bg-2:      #ffffff;
  --bg-3:      #ebebe8;
  --line:      rgba(20, 20, 18, 0.10);
  --line-2:    rgba(20, 20, 18, 0.20);
  --grid:      rgba(20, 20, 18, 0.06);

  --text:      #16171a;
  --muted:     #55575a;
  --dim:       #75777a;

  --accent:    #b07a12;
  --accent-2:  #7d5408;
  --accent-ink:#ffffff;
  --glow:      rgba(226, 176, 74, 0.28);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--topbar) + 16px);
}
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-wrap: break-word;
  font-feature-settings: "ss02" 0;
}
h1, h2, h3, h4 { margin: 0; font-weight: 500; line-height: 1.15; letter-spacing: -0.02em; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
dl, dd { margin: 0; }
em { font-style: normal; color: var(--dim); }
a { color: inherit; text-decoration: none; }
b, strong { font-weight: 500; }
button { font: inherit; color: inherit; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip {
  position: absolute; left: 16px; top: -100px; z-index: 100;
  padding: 10px 14px; background: var(--accent); color: var(--accent-ink);
  border-radius: var(--radius); font-weight: 500;
}
.skip:focus { top: 12px; }

/* ---------- i18n switching ---------- */
html[data-lang="ru"] [data-l="en"] { display: none !important; }
html[data-lang="en"] [data-l="ru"] { display: none !important; }

/* ---------- Layout ---------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: clamp(80px, 9vw, 136px) 0; border-top: 1px solid var(--line); }

.split {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  column-gap: clamp(48px, 6vw, 96px);
  row-gap: 48px;
  align-items: start;
}
.split-head { position: sticky; top: calc(var(--topbar) + 32px); }
.split-head h2 {
  font-size: clamp(28px, 3.1vw, 40px);
  letter-spacing: -0.025em;
  line-height: 1.1;
  max-width: 18ch;
  text-wrap: balance;
}
.split-head .lede {
  margin-top: 22px;
  color: var(--muted);
  font-size: 16.5px;
  line-height: 1.55;
  max-width: 42ch;
}
.split-full { grid-column: 1 / -1; }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: var(--topbar);
  gap: 24px;
}
.brand {
  display: inline-flex; align-items: center; gap: 12px;
  font-weight: 500; font-size: 15.5px; letter-spacing: -0.01em;
  justify-self: start;
}
.brand-mark {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--glow);
}
.nav { display: flex; gap: 28px; }
.nav a {
  position: relative;
  font-size: 15px; color: var(--muted);
  padding: 6px 0;
  transition: color .2s;
}
.nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0;
  height: 1px; background: var(--accent);
  transform: scaleX(0); transform-origin: left;
  transition: transform .3s var(--ease);
}
.nav a:hover { color: var(--text); }
.nav a.is-active { color: var(--text); }
.nav a.is-active::after { transform: scaleX(1); }

.controls { display: flex; align-items: center; gap: 8px; justify-self: end; }
.langswitch {
  display: inline-flex; padding: 3px;
  border: 1px solid var(--line-2); border-radius: 999px;
}
.langswitch button {
  font-size: 12.5px; font-weight: 500; letter-spacing: 0.04em;
  padding: 4px 11px; border: 0; border-radius: 999px;
  background: transparent; color: var(--dim);
  cursor: pointer; transition: background .2s, color .2s;
}
.langswitch button:hover { color: var(--text); }
.langswitch button[aria-pressed="true"] { background: var(--text); color: var(--bg); }
.iconbtn {
  display: inline-grid; place-items: center;
  width: 36px; height: 36px;
  border: 1px solid var(--line-2); border-radius: 999px;
  background: transparent; color: var(--muted);
  cursor: pointer; transition: color .2s, border-color .2s;
}
.iconbtn:hover { color: var(--text); border-color: var(--text); }
.iconbtn svg { width: 18px; height: 18px; }
html[data-theme="light"] .icon-sun { display: none; }
html:not([data-theme="light"]) .icon-moon { display: none; }
.menubtn { display: none; }
.menubtn .icon-close { display: none; }
.topbar.is-open .menubtn .icon-close { display: block; }
.topbar.is-open .menubtn .icon-menu { display: none; }

/* ---------- Buttons ---------- */
.cta { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 24px; border-radius: var(--radius);
  font-size: 15.5px; font-weight: 500; line-height: 1;
  border: 1px solid transparent; cursor: pointer;
  transition: background .2s, border-color .2s, color .2s, transform .25s var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-2); }
.btn-ghost { border-color: var(--line-2); color: var(--text); }
.btn-ghost:hover { border-color: var(--text); }
.btn svg { width: 16px; height: 16px; flex: none; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  padding: clamp(72px, 10vh, 120px) 0 clamp(64px, 7vw, 96px);
}
.hero-bg {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 72px 72px;
  background-position: center top;
  -webkit-mask-image: radial-gradient(70% 80% at 72% 0%, #000 0%, transparent 70%);
  mask-image: radial-gradient(70% 80% at 72% 0%, #000 0%, transparent 70%);
}
.hero-bg::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(55% 45% at 78% 0%, var(--glow), transparent 70%);
}
.hero .wrap { position: relative; }

.hero-id {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px;
  font-size: 15.5px; color: var(--muted);
  margin-bottom: 36px;
}
.hero-id > span:first-child { color: var(--text); font-weight: 500; }
.hero-id-sep { display: inline-block; width: 24px; height: 1px; background: var(--line-2); }

.hero h1 {
  font-size: clamp(42px, 5.9vw, 88px);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1;
  max-width: 15ch;
  text-wrap: balance;
}
.hero-lede {
  margin-top: 36px;
  max-width: 58ch;
  font-size: clamp(18px, 1.5vw, 21px);
  line-height: 1.5;
  color: var(--muted);
}
.hero-actions {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 20px 40px;
  margin-top: 44px;
}
.hero-where {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px;
  font-size: 14.5px; color: var(--dim);
}

/* Ledger of scale */
.ledger {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 32px 32px;
  margin-top: clamp(56px, 7vw, 88px);
}
.ledger li { border-top: 1px solid var(--line-2); padding-top: 20px; }
.ledger b {
  display: block;
  font-size: clamp(34px, 3.2vw, 44px);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.ledger b small { font-size: 0.55em; font-weight: 400; color: var(--muted); letter-spacing: 0; }
.ledger b i { font-style: normal; font-weight: 300; color: var(--dim); margin: 0 0.08em; }
.ledger span {
  display: block; margin-top: 10px;
  font-size: 14px; line-height: 1.4; color: var(--muted);
  max-width: 20ch;
}

/* Hero entrance: one orchestrated sequence */
@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}
[data-rise] {
  animation: rise .9s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 100ms + 60ms);
}

/* ---------- Prose ---------- */
.prose { max-width: 62ch; font-size: 18px; line-height: 1.65; color: var(--muted); }
.prose p + p { margin-top: 1.1em; }
.prose strong { color: var(--text); }

/* ---------- Two layers ---------- */
.layers { margin-top: 64px; padding-top: 56px; border-top: 1px solid var(--line); }
.layers-lede {
  font-size: clamp(19px, 1.7vw, 24px);
  line-height: 1.4;
  letter-spacing: -0.015em;
  max-width: 44ch;
  margin-bottom: 48px;
}
.layers-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 40px clamp(40px, 6vw, 96px);
}
.layer h3 { font-size: 22px; letter-spacing: -0.02em; }
.layer-sub { margin-top: 6px; font-size: 14px; color: var(--dim); }
.deflist { margin-top: 22px; border-top: 1px solid var(--line); }
.deflist li {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-size: 15.5px; line-height: 1.5; color: var(--muted);
}
.deflist strong { color: var(--text); }

/* ---------- Cases ---------- */
.case {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 24px 40px;
  padding: 40px 0;
  border-top: 1px solid var(--line);
}
.case:last-child { border-bottom: 1px solid var(--line); }
.case-figure b {
  display: block;
  font-size: 44px; font-weight: 500;
  letter-spacing: -0.03em; line-height: 1;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  color: var(--accent-2);
}
.case-figure b small { font-size: 0.5em; font-weight: 400; color: var(--muted); letter-spacing: 0; }
.case-figure b i { font-style: normal; font-weight: 300; color: var(--dim); margin: 0 0.1em; }
.case-figure span {
  display: block; margin-top: 8px;
  font-size: 13.5px; line-height: 1.4; color: var(--muted);
  max-width: 16ch;
}
.case-meta { display: flex; flex-wrap: wrap; align-items: center; font-size: 13.5px; color: var(--dim); }
.case-meta span + span::before {
  content: ""; display: inline-block; width: 1px; height: .85em;
  background: var(--line-2); margin: 0 10px -1px;
}
.case h3 {
  margin: 10px 0 14px;
  font-size: clamp(21px, 2vw, 25px);
  letter-spacing: -0.022em; line-height: 1.2;
  max-width: 30ch;
  text-wrap: balance;
}
.case-result { font-size: 17px; line-height: 1.55; color: var(--muted); max-width: 62ch; }
.case-result strong { color: var(--text); }

.case-more { margin-top: 18px; }
.case-more summary {
  display: inline-flex; align-items: center; gap: 10px;
  list-style: none; cursor: pointer;
  font-size: 15px; font-weight: 500; color: var(--accent-2);
  padding: 4px 0;
  transition: color .2s;
}
.case-more summary::-webkit-details-marker { display: none; }
.case-more summary::before {
  content: ""; width: 12px; height: 12px; flex: none;
  background:
    linear-gradient(currentColor, currentColor) center / 12px 1.5px no-repeat,
    linear-gradient(currentColor, currentColor) center / 1.5px 12px no-repeat;
  transition: transform .3s var(--ease);
}
.case-more[open] summary::before { transform: rotate(45deg); }
.case-more summary:hover { color: var(--text); }
.case-story { padding-top: 14px; max-width: 62ch; }
.case-story p { font-size: 16px; line-height: 1.55; color: var(--muted); }
.case-story p + p { margin-top: 12px; }
.case-story strong { color: var(--text); }
.nda { font-size: 14px; color: var(--dim); }

/* ---------- Experience ---------- */
.job {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 16px 40px;
  padding: 48px 0;
  border-top: 1px solid var(--line);
}
.job { grid-template-columns: 140px minmax(0, 1fr); }
.job:last-child { border-bottom: 1px solid var(--line); }
.job-when {
  display: flex; align-items: center; gap: 10px;
  font-size: 15.5px; color: var(--muted);
  font-variant-numeric: tabular-nums;
  position: sticky; top: calc(var(--topbar) + 32px);
  align-self: start;
}
.job-dash { display: inline-block; width: 14px; height: 1px; background: var(--line-2); }
.job-co { font-size: clamp(24px, 2.4vw, 30px); letter-spacing: -0.025em; }
.job-role { margin-top: 6px; font-size: 17px; display: flex; flex-wrap: wrap; gap: 4px 12px; }
.job-loc { color: var(--dim); }
.job-loc::before { content: ""; display: inline-block; width: 1px; height: .85em; background: var(--line-2); margin: 0 12px 0 0; vertical-align: -1px; }

.job-scale {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px 28px;
  margin: 26px 0;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.job-scale dt { font-size: 13px; color: var(--dim); }
.job-scale dd { margin-top: 4px; font-size: 15.5px; font-weight: 500; line-height: 1.35; }
.job-desc { font-size: 17px; line-height: 1.55; color: var(--muted); max-width: 62ch; }
.job-desc strong { color: var(--text); }

.results { margin-top: 20px; max-width: 66ch; }
.results li {
  position: relative; padding-left: 22px; margin-top: 12px;
  font-size: 16px; line-height: 1.55; color: var(--muted);
}
.results li::before {
  content: ""; position: absolute; left: 0; top: .62em;
  width: 8px; height: 1.5px; background: var(--accent);
}
.results strong { color: var(--text); }

.path { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 0; margin-top: 18px; font-size: 14.5px; color: var(--muted); }
.path li { display: inline-flex; align-items: center; }
.path li:last-child { color: var(--text); font-weight: 500; }
.path li + li::before {
  content: ""; display: inline-block; width: 14px; height: 1px;
  background: var(--line-2); margin: 0 10px;
}

/* ---------- Skills ---------- */
.lv {
  position: relative; display: inline-block; flex: none;
  width: 18px; height: 10px; margin-right: 12px;
  background: repeating-linear-gradient(to right, var(--line-2) 0 3px, transparent 3px 5px);
  background-size: 18px 100%;
}
.lv::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: 0;
  width: calc(var(--n, 0) * 5px - 2px);
  background: repeating-linear-gradient(to right, var(--accent) 0 3px, transparent 3px 5px);
}
.legend { margin-top: 28px; }
.legend li { display: flex; align-items: baseline; padding: 8px 0; font-size: 14px; border-top: 1px solid var(--line); }
.legend .lv { top: 1px; }
.legend span { font-weight: 500; min-width: 82px; }
.legend em { color: var(--dim); }

.skillgroups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 44px clamp(32px, 4vw, 64px);
}
.skillgroup h3 {
  font-size: 18px; letter-spacing: -0.015em;
  padding-bottom: 12px; border-bottom: 1px solid var(--line-2);
}
.skillgroup-sub { margin-top: 10px; font-size: 14px; color: var(--dim); }
.skillgroup ul { margin-top: 6px; }
.skillgroup li {
  display: flex; align-items: center;
  padding: 8px 0; font-size: 15.5px; line-height: 1.35;
  border-bottom: 1px solid var(--line);
}
.skillgroup li.is-dev { color: var(--muted); }
.skillgroup.is-ai { grid-column: 1 / -1; }
.skillgroup.is-ai ul { display: flex; flex-wrap: wrap; gap: 0 28px; margin-top: 10px; }
.skillgroup.is-ai li { border-bottom: 0; padding: 6px 0; }
.skillgroup.is-ai li::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); margin-right: 10px; flex: none;
}
.skillgroup-note {
  margin-top: 16px;
  font-size: 14.5px; line-height: 1.5; color: var(--muted);
}
.skillgroup-note strong { color: var(--text); }

/* ---------- Principles ---------- */
.principles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 clamp(32px, 4vw, 64px);
}
.principles li {
  padding: 22px 0;
  border-top: 1px solid var(--line);
  font-size: clamp(18px, 1.5vw, 21px);
  font-weight: 500; line-height: 1.3; letter-spacing: -0.015em;
}
.principles li:nth-last-child(-n+2) { border-bottom: 1px solid var(--line); }

/* ---------- Facts ---------- */
.section-facts { padding: clamp(56px, 6vw, 80px) 0; }
.facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 32px 40px;
}
.facts dt { font-size: 13.5px; color: var(--dim); margin-bottom: 10px; }
.facts dd { font-size: 16.5px; line-height: 1.45; }
.facts dd span { display: block; margin-top: 4px; font-size: 15px; color: var(--muted); }

/* ---------- Contact ---------- */
.section-contact { padding-bottom: clamp(96px, 10vw, 160px); }
.contact h2 {
  font-size: clamp(40px, 6vw, 84px);
  letter-spacing: -0.04em; line-height: 1;
}
.contact p {
  margin: 28px 0 48px;
  font-size: clamp(17px, 1.4vw, 19.5px); line-height: 1.55;
  color: var(--muted); max-width: 54ch;
}
.contact-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 40px;
  max-width: 880px;
}
.contact-link {
  display: block; padding: 22px 0;
  border-top: 1px solid var(--line-2);
  transition: color .2s;
}
.contact-label { display: block; font-size: 13.5px; color: var(--dim); margin-bottom: 8px; }
.contact-value {
  font-size: clamp(17px, 1.6vw, 21px); font-weight: 500; letter-spacing: -0.01em;
  overflow-wrap: anywhere;
  text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 6px;
  transition: text-decoration-color .25s;
}
.contact-link:hover .contact-value { text-decoration-color: var(--accent); }
.contact-link:hover { color: var(--accent-2); }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 30px 0 44px; font-size: 14px; color: var(--dim); }
.footer-row { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }

/* ---------- Scroll reveal (only when JS is present) ---------- */
html.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .7s ease, transform .8s var(--ease); }
html.js .reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-rise] { animation: none; }
  html.js .reveal, html.js .reveal.is-in { opacity: 1; transform: none; transition: none; }
  .btn:hover { transform: none; }
  .nav a::after, .case-more summary::before { transition: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .ledger { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 960px) {
  .split { grid-template-columns: 1fr; row-gap: 40px; }
  .split-head { position: static; }
  .split-head h2 { max-width: 22ch; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .topbar-row { grid-template-columns: 1fr auto; }
  .menubtn { display: inline-grid; }
  .nav {
    display: none;
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; gap: 0;
    padding: 8px var(--gutter) 16px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
  }
  .topbar.is-open .nav { display: flex; }
  .nav a { font-size: 17px; padding: 12px 0; border-top: 1px solid var(--line); }
  .nav a::after { display: none; }
  .nav a:first-child { border-top: 0; }
}

@media (max-width: 720px) {
  :root { --gutter: 20px; --topbar: 60px; }
  body { font-size: 16px; }
  .brand span:not(.brand-mark) { font-size: 15px; }

  .hero { padding-top: 56px; }
  .hero-id { margin-bottom: 26px; font-size: 14.5px; }
  .hero h1 { font-size: clamp(38px, 11vw, 48px); letter-spacing: -0.035em; line-height: 1.02; max-width: none; }
  .hero-lede { margin-top: 24px; font-size: 17px; }
  .hero-actions { margin-top: 32px; flex-direction: column; align-items: flex-start; gap: 18px; }
  .cta { width: 100%; }
  .cta .btn { flex: 1 1 auto; justify-content: center; padding: 15px 20px; }
  .ledger { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 24px; margin-top: 56px; }
  .ledger b { font-size: 32px; }
  .ledger span { font-size: 13.5px; max-width: none; }

  .prose { font-size: 17px; }
  .layers { margin-top: 48px; padding-top: 40px; }
  .layers-grid { grid-template-columns: 1fr; gap: 36px; }
  .layer h3 { font-size: 20px; }

  .case { grid-template-columns: 1fr; gap: 14px; padding: 32px 0; }
  .case-figure { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
  .case-figure b { font-size: 34px; }
  .case-figure span { margin-top: 0; max-width: none; }
  .case h3 { font-size: 21px; }
  .case-result, .case-story p { font-size: 16px; }

  .job { grid-template-columns: 1fr; gap: 10px; padding: 36px 0; }
  .job-when { position: static; font-size: 14.5px; }
  .job-co { font-size: 24px; }
  .job-role { font-size: 16px; }
  .job-loc { flex-basis: 100%; }
  .job-loc::before { display: none; }
  .job-scale { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 20px; margin: 20px 0; }
  .job-desc, .results li { font-size: 15.5px; }
  .hero-id-sep { display: none; }
  .hero-id, .hero-where { flex-direction: column; align-items: flex-start; gap: 4px; }
  .path { flex-direction: column; align-items: flex-start; gap: 0; font-size: 14.5px; }
  .path li { flex-direction: column; align-items: flex-start; }
  .path li + li::before { width: 1px; height: 12px; margin: 4px 0 4px 7px; }

  .skillgroups { grid-template-columns: 1fr; gap: 36px; }
  .skillgroup.is-ai ul { flex-direction: column; gap: 0; }
  .skillgroup.is-ai li { border-bottom: 1px solid var(--line); padding: 8px 0; }
  .legend { margin-top: 22px; }
  .legend span { min-width: 76px; }

  .principles { grid-template-columns: 1fr; }
  .principles li { font-size: 18px; padding: 18px 0; }
  .principles li:nth-last-child(-n+2) { border-bottom: 0; }
  .principles li:last-child { border-bottom: 1px solid var(--line); }

  .facts { grid-template-columns: 1fr; gap: 26px; }
  .contact p { margin: 22px 0 32px; }
  .contact-links { grid-template-columns: 1fr; }
  .footer-row { flex-direction: column; }
}

@media (min-width: 1600px) {
  :root { --maxw: 1320px; }
}

/* ---------- Print ---------- */
@media print {
  :root {
    --bg: #fff; --bg-2: #fff; --bg-3: #fff;
    --text: #000; --muted: #222; --dim: #555;
    --accent: #7d5408; --accent-2: #7d5408;
    --line: #ccc; --line-2: #999; --glow: transparent; --grid: transparent;
  }
  .topbar, .hero-bg, .footer, .skip, .contact p { display: none !important; }
  body { font-size: 10.5pt; background: #fff; }
  .section { padding: 14pt 0; }
  .hero { padding: 0 0 12pt; }
  .hero h1 { font-size: 26pt; max-width: none; }
  .split { grid-template-columns: 1fr; row-gap: 12pt; }
  .split-head { position: static; }
  .case, .job, .skillgroup { break-inside: avoid; }
  .case-more { display: block; }
  .case-more summary { display: none; }
  .case-more[open] > *, .case-more > * { display: block; }
  [data-rise] { animation: none; }
  .reveal, html.js .reveal { opacity: 1 !important; transform: none !important; }
  .contact-value { text-decoration: none; }
}
